aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-09 06:44:45 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-09 06:44:45 +0000
commita8a06ed07b6e69bd1e88ef59f997229e25a0d78c (patch)
tree51d384de3922135bc42514af63da8aa4587a44cb /ext
parent67500ff75b76a07e90b9a6e72025083cd72105f5 (diff)
downloadruby-a8a06ed07b6e69bd1e88ef59f997229e25a0d78c.tar.gz
* ext/tk: Tk is removed from stdlib. [Feature #8539]
https://github.com/ruby/tk is the new upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/Setup2
-rw-r--r--ext/Setup.atheos1
-rw-r--r--ext/Setup.nacl2
-rw-r--r--ext/Setup.nt1
-rw-r--r--ext/tk/ChangeLog.tkextlib949
-rw-r--r--ext/tk/MANUAL_tcltklib.eng467
-rw-r--r--ext/tk/MANUAL_tcltklib.ja578
-rw-r--r--ext/tk/README.1st19
-rw-r--r--ext/tk/README.ActiveTcl62
-rw-r--r--ext/tk/README.fork34
-rw-r--r--ext/tk/README.macosx-aqua67
-rw-r--r--ext/tk/README.tcltklib152
-rw-r--r--ext/tk/config_list.in41
-rw-r--r--ext/tk/depend28
-rw-r--r--ext/tk/extconf.rb2098
-rw-r--r--ext/tk/lib/README30
-rw-r--r--ext/tk/lib/multi-tk.rb3743
-rw-r--r--ext/tk/lib/remote-tk.rb527
-rw-r--r--ext/tk/lib/tcltk.rb369
-rw-r--r--ext/tk/lib/tk.rb5758
-rw-r--r--ext/tk/lib/tk/after.rb7
-rw-r--r--ext/tk/lib/tk/autoload.rb763
-rw-r--r--ext/tk/lib/tk/bgerror.rb30
-rw-r--r--ext/tk/lib/tk/bindtag.rb139
-rw-r--r--ext/tk/lib/tk/busy.rb119
-rw-r--r--ext/tk/lib/tk/button.rb32
-rw-r--r--ext/tk/lib/tk/canvas.rb847
-rw-r--r--ext/tk/lib/tk/canvastag.rb460
-rw-r--r--ext/tk/lib/tk/checkbutton.rb33
-rw-r--r--ext/tk/lib/tk/clipboard.rb76
-rw-r--r--ext/tk/lib/tk/clock.rb72
-rw-r--r--ext/tk/lib/tk/composite.rb485
-rw-r--r--ext/tk/lib/tk/console.rb53
-rw-r--r--ext/tk/lib/tk/dialog.rb327
-rw-r--r--ext/tk/lib/tk/encodedstr.rb188
-rw-r--r--ext/tk/lib/tk/entry.rb121
-rw-r--r--ext/tk/lib/tk/event.rb563
-rw-r--r--ext/tk/lib/tk/font.rb2352
-rw-r--r--ext/tk/lib/tk/fontchooser.rb181
-rw-r--r--ext/tk/lib/tk/frame.rb133
-rw-r--r--ext/tk/lib/tk/grid.rb280
-rw-r--r--ext/tk/lib/tk/image.rb396
-rw-r--r--ext/tk/lib/tk/itemconfig.rb1222
-rw-r--r--ext/tk/lib/tk/itemfont.rb328
-rw-r--r--ext/tk/lib/tk/kinput.rb72
-rw-r--r--ext/tk/lib/tk/label.rb23
-rw-r--r--ext/tk/lib/tk/labelframe.rb32
-rw-r--r--ext/tk/lib/tk/listbox.rb285
-rw-r--r--ext/tk/lib/tk/macpkg.rb81
-rw-r--r--ext/tk/lib/tk/menu.rb719
-rw-r--r--ext/tk/lib/tk/menubar.rb138
-rw-r--r--ext/tk/lib/tk/menuspec.rb457
-rw-r--r--ext/tk/lib/tk/message.rb25
-rw-r--r--ext/tk/lib/tk/mngfocus.rb34
-rw-r--r--ext/tk/lib/tk/msgcat.rb300
-rw-r--r--ext/tk/lib/tk/namespace.rb547
-rw-r--r--ext/tk/lib/tk/optiondb.rb372
-rw-r--r--ext/tk/lib/tk/optionobj.rb213
-rw-r--r--ext/tk/lib/tk/pack.rb108
-rw-r--r--ext/tk/lib/tk/package.rb144
-rw-r--r--ext/tk/lib/tk/palette.rb56
-rw-r--r--ext/tk/lib/tk/panedwindow.rb261
-rw-r--r--ext/tk/lib/tk/place.rb129
-rw-r--r--ext/tk/lib/tk/radiobutton.rb74
-rw-r--r--ext/tk/lib/tk/root.rb96
-rw-r--r--ext/tk/lib/tk/scale.rb113
-rw-r--r--ext/tk/lib/tk/scrollable.rb83
-rw-r--r--ext/tk/lib/tk/scrollbar.rb184
-rw-r--r--ext/tk/lib/tk/scrollbox.rb40
-rw-r--r--ext/tk/lib/tk/selection.rb87
-rw-r--r--ext/tk/lib/tk/spinbox.rb145
-rw-r--r--ext/tk/lib/tk/tagfont.rb44
-rw-r--r--ext/tk/lib/tk/text.rb1605
-rw-r--r--ext/tk/lib/tk/textimage.rb89
-rw-r--r--ext/tk/lib/tk/textmark.rb205
-rw-r--r--ext/tk/lib/tk/texttag.rb322
-rw-r--r--ext/tk/lib/tk/textwindow.rb155
-rw-r--r--ext/tk/lib/tk/timer.rb666
-rw-r--r--ext/tk/lib/tk/tk_mac.rb159
-rw-r--r--ext/tk/lib/tk/toplevel.rb265
-rw-r--r--ext/tk/lib/tk/ttk_selector.rb99
-rw-r--r--ext/tk/lib/tk/txtwin_abst.rb40
-rw-r--r--ext/tk/lib/tk/validation.rb398
-rw-r--r--ext/tk/lib/tk/variable.rb1797
-rw-r--r--ext/tk/lib/tk/virtevent.rb140
-rw-r--r--ext/tk/lib/tk/winfo.rb393
-rw-r--r--ext/tk/lib/tk/winpkg.rb157
-rw-r--r--ext/tk/lib/tk/wm.rb553
-rw-r--r--ext/tk/lib/tk/xim.rb123
-rw-r--r--ext/tk/lib/tkafter.rb5
-rw-r--r--ext/tk/lib/tkbgerror.rb5
-rw-r--r--ext/tk/lib/tkcanvas.rb5
-rw-r--r--ext/tk/lib/tkclass.rb48
-rw-r--r--ext/tk/lib/tkconsole.rb5
-rw-r--r--ext/tk/lib/tkdialog.rb5
-rw-r--r--ext/tk/lib/tkentry.rb5
-rw-r--r--ext/tk/lib/tkextlib/ICONS.rb14
-rw-r--r--ext/tk/lib/tkextlib/ICONS/icons.rb130
-rw-r--r--ext/tk/lib/tkextlib/ICONS/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/SUPPORT_STATUS193
-rw-r--r--ext/tk/lib/tkextlib/blt.rb190
-rw-r--r--ext/tk/lib/tkextlib/blt/barchart.rb80
-rw-r--r--ext/tk/lib/tkextlib/blt/bitmap.rb113
-rw-r--r--ext/tk/lib/tkextlib/blt/busy.rb84
-rw-r--r--ext/tk/lib/tkextlib/blt/component.rb2219
-rw-r--r--ext/tk/lib/tkextlib/blt/container.rb29
-rw-r--r--ext/tk/lib/tkextlib/blt/cutbuffer.rb24
-rw-r--r--ext/tk/lib/tkextlib/blt/dragdrop.rb270
-rw-r--r--ext/tk/lib/tkextlib/blt/eps.rb33
-rw-r--r--ext/tk/lib/tkextlib/blt/graph.rb68
-rw-r--r--ext/tk/lib/tkextlib/blt/htext.rb113
-rw-r--r--ext/tk/lib/tkextlib/blt/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/blt/spline.rb24
-rw-r--r--ext/tk/lib/tkextlib/blt/stripchart.rb75
-rw-r--r--ext/tk/lib/tkextlib/blt/table.rb413
-rw-r--r--ext/tk/lib/tkextlib/blt/tabnotebook.rb111
-rw-r--r--ext/tk/lib/tkextlib/blt/tabset.rb505
-rw-r--r--ext/tk/lib/tkextlib/blt/ted.rb69
-rw-r--r--ext/tk/lib/tkextlib/blt/tile.rb26
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/button.rb17
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/checkbutton.rb18
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/frame.rb17
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/label.rb17
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/radiobutton.rb18
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/scrollbar.rb17
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/toplevel.rb17
-rw-r--r--ext/tk/lib/tkextlib/blt/tree.rb1059
-rw-r--r--ext/tk/lib/tkextlib/blt/treeview.rb1288
-rw-r--r--ext/tk/lib/tkextlib/blt/unix_dnd.rb142
-rw-r--r--ext/tk/lib/tkextlib/blt/vector.rb257
-rw-r--r--ext/tk/lib/tkextlib/blt/watch.rb176
-rw-r--r--ext/tk/lib/tkextlib/blt/win_printer.rb62
-rw-r--r--ext/tk/lib/tkextlib/blt/winop.rb108
-rw-r--r--ext/tk/lib/tkextlib/bwidget.rb154
-rw-r--r--ext/tk/lib/tkextlib/bwidget/arrowbutton.rb22
-rw-r--r--ext/tk/lib/tkextlib/bwidget/bitmap.rb22
-rw-r--r--ext/tk/lib/tkextlib/bwidget/button.rb32
-rw-r--r--ext/tk/lib/tkextlib/bwidget/buttonbox.rb91
-rw-r--r--ext/tk/lib/tkextlib/bwidget/combobox.rb63
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dialog.rb195
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dragsite.rb32
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dropsite.rb40
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dynamichelp.rb64
-rw-r--r--ext/tk/lib/tkextlib/bwidget/entry.rb44
-rw-r--r--ext/tk/lib/tkextlib/bwidget/label.rb42
-rw-r--r--ext/tk/lib/tkextlib/bwidget/labelentry.rb81
-rw-r--r--ext/tk/lib/tkextlib/bwidget/labelframe.rb53
-rw-r--r--ext/tk/lib/tkextlib/bwidget/listbox.rb362
-rw-r--r--ext/tk/lib/tkextlib/bwidget/mainframe.rb133
-rw-r--r--ext/tk/lib/tkextlib/bwidget/messagedlg.rb193
-rw-r--r--ext/tk/lib/tkextlib/bwidget/notebook.rb167
-rw-r--r--ext/tk/lib/tkextlib/bwidget/pagesmanager.rb74
-rw-r--r--ext/tk/lib/tkextlib/bwidget/panedwindow.rb43
-rw-r--r--ext/tk/lib/tkextlib/bwidget/panelframe.rb68
-rw-r--r--ext/tk/lib/tkextlib/bwidget/passwddlg.rb45
-rw-r--r--ext/tk/lib/tkextlib/bwidget/progressbar.rb21
-rw-r--r--ext/tk/lib/tkextlib/bwidget/progressdlg.rb59
-rw-r--r--ext/tk/lib/tkextlib/bwidget/scrollableframe.rb41
-rw-r--r--ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb49
-rw-r--r--ext/tk/lib/tkextlib/bwidget/scrollview.rb26
-rw-r--r--ext/tk/lib/tkextlib/bwidget/selectcolor.rb74
-rw-r--r--ext/tk/lib/tkextlib/bwidget/selectfont.rb92
-rw-r--r--ext/tk/lib/tkextlib/bwidget/separator.rb21
-rw-r--r--ext/tk/lib/tkextlib/bwidget/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/bwidget/spinbox.rb99
-rw-r--r--ext/tk/lib/tkextlib/bwidget/statusbar.rb63
-rw-r--r--ext/tk/lib/tkextlib/bwidget/titleframe.rb34
-rw-r--r--ext/tk/lib/tkextlib/bwidget/tree.rb501
-rw-r--r--ext/tk/lib/tkextlib/bwidget/widget.rb130
-rw-r--r--ext/tk/lib/tkextlib/itcl.rb14
-rw-r--r--ext/tk/lib/tkextlib/itcl/incr_tcl.rb179
-rw-r--r--ext/tk/lib/tkextlib/itcl/setup.rb14
-rw-r--r--ext/tk/lib/tkextlib/itk.rb14
-rw-r--r--ext/tk/lib/tkextlib/itk/incr_tk.rb447
-rw-r--r--ext/tk/lib/tkextlib/itk/setup.rb14
-rw-r--r--ext/tk/lib/tkextlib/iwidgets.rb95
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/buttonbox.rb122
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/calendar.rb126
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb54
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb39
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/checkbox.rb131
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/combobox.rb105
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dateentry.rb21
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/datefield.rb59
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dialog.rb21
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dialogshell.rb122
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb51
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/entryfield.rb186
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/extbutton.rb41
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb47
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb34
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/feedback.rb36
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb47
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb34
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/finddialog.rb43
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/hierarchy.rb366
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb51
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/labeledframe.rb40
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb46
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/mainwindow.rb68
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/menubar.rb213
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/messagebox.rb94
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/messagedialog.rb21
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/notebook.rb176
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/optionmenu.rb93
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/panedwindow.rb135
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/promptdialog.rb132
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/pushbutton.rb36
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/radiobox.rb122
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scopedobject.rb25
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb354
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb60
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb59
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb208
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb569
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb21
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/selectionbox.rb103
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb93
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/shell.rb39
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spindate.rb49
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spinint.rb31
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spinner.rb170
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spintime.rb49
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb182
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/tabset.rb146
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/timeentry.rb26
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/timefield.rb59
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/toolbar.rb113
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/watch.rb57
-rwxr-xr-xext/tk/lib/tkextlib/pkg_checker.rb185
-rw-r--r--ext/tk/lib/tkextlib/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/tcllib.rb106
-rw-r--r--ext/tk/lib/tkextlib/tcllib/README135
-rw-r--r--ext/tk/lib/tkextlib/tcllib/autoscroll.rb159
-rw-r--r--ext/tk/lib/tkextlib/tcllib/calendar.rb56
-rw-r--r--ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb37
-rw-r--r--ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb22
-rw-r--r--ext/tk/lib/tkextlib/tcllib/chatwidget.rb152
-rw-r--r--ext/tk/lib/tkextlib/tcllib/crosshair.rb118
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ctext.rb161
-rw-r--r--ext/tk/lib/tkextlib/tcllib/cursor.rb98
-rw-r--r--ext/tk/lib/tkextlib/tcllib/dateentry.rb63
-rw-r--r--ext/tk/lib/tkextlib/tcllib/datefield.rb58
-rw-r--r--ext/tk/lib/tkextlib/tcllib/diagrams.rb225
-rw-r--r--ext/tk/lib/tkextlib/tcllib/dialog.rb85
-rw-r--r--ext/tk/lib/tkextlib/tcllib/getstring.rb135
-rw-r--r--ext/tk/lib/tkextlib/tcllib/history.rb74
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ico.rb147
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ip_entry.rb76
-rw-r--r--ext/tk/lib/tkextlib/tcllib/khim.rb69
-rw-r--r--ext/tk/lib/tkextlib/tcllib/menuentry.rb48
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ntext.rb147
-rw-r--r--ext/tk/lib/tkextlib/tcllib/panelframe.rb79
-rw-r--r--ext/tk/lib/tkextlib/tcllib/plotchart.rb1405
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ruler.rb66
-rw-r--r--ext/tk/lib/tkextlib/tcllib/screenruler.rb69
-rw-r--r--ext/tk/lib/tkextlib/tcllib/scrolledwindow.rb58
-rw-r--r--ext/tk/lib/tkextlib/tcllib/scrollwin.rb62
-rw-r--r--ext/tk/lib/tkextlib/tcllib/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/tcllib/statusbar.rb80
-rw-r--r--ext/tk/lib/tkextlib/tcllib/style.rb62
-rw-r--r--ext/tk/lib/tkextlib/tcllib/superframe.rb52
-rw-r--r--ext/tk/lib/tkextlib/tcllib/swaplist.rb151
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist.rb29
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist_core.rb1073
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb44
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tkpiechart.rb315
-rw-r--r--ext/tk/lib/tkextlib/tcllib/toolbar.rb176
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tooltip.rb105
-rw-r--r--ext/tk/lib/tkextlib/tcllib/validator.rb66
-rw-r--r--ext/tk/lib/tkextlib/tcllib/widget.rb83
-rw-r--r--ext/tk/lib/tkextlib/tclx.rb14
-rw-r--r--ext/tk/lib/tkextlib/tclx/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/tclx/tclx.rb75
-rw-r--r--ext/tk/lib/tkextlib/tile.rb450
-rw-r--r--ext/tk/lib/tkextlib/tile/dialog.rb103
-rw-r--r--ext/tk/lib/tkextlib/tile/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/tile/sizegrip.rb33
-rw-r--r--ext/tk/lib/tkextlib/tile/style.rb337
-rw-r--r--ext/tk/lib/tkextlib/tile/tbutton.rb35
-rw-r--r--ext/tk/lib/tkextlib/tile/tcheckbutton.rb39
-rw-r--r--ext/tk/lib/tkextlib/tile/tcombobox.rb56
-rw-r--r--ext/tk/lib/tkextlib/tile/tentry.rb50
-rw-r--r--ext/tk/lib/tkextlib/tile/tframe.rb35
-rw-r--r--ext/tk/lib/tkextlib/tile/tlabel.rb35
-rw-r--r--ext/tk/lib/tkextlib/tile/tlabelframe.rb39
-rw-r--r--ext/tk/lib/tkextlib/tile/tmenubutton.rb39
-rw-r--r--ext/tk/lib/tkextlib/tile/tnotebook.rb148
-rw-r--r--ext/tk/lib/tkextlib/tile/tpaned.rb246
-rw-r--r--ext/tk/lib/tkextlib/tile/tprogressbar.rb58
-rw-r--r--ext/tk/lib/tkextlib/tile/tradiobutton.rb39
-rw-r--r--ext/tk/lib/tkextlib/tile/treeview.rb1337
-rw-r--r--ext/tk/lib/tkextlib/tile/tscale.rb57
-rw-r--r--ext/tk/lib/tkextlib/tile/tscrollbar.rb64
-rw-r--r--ext/tk/lib/tkextlib/tile/tseparator.rb35
-rw-r--r--ext/tk/lib/tkextlib/tile/tspinbox.rb108
-rw-r--r--ext/tk/lib/tkextlib/tile/tsquare.rb31
-rw-r--r--ext/tk/lib/tkextlib/tkDND.rb19
-rw-r--r--ext/tk/lib/tkextlib/tkDND/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/tkDND/shape.rb126
-rw-r--r--ext/tk/lib/tkextlib/tkDND/tkdnd.rb183
-rw-r--r--ext/tk/lib/tkextlib/tkHTML.rb14
-rw-r--r--ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb454
-rw-r--r--ext/tk/lib/tkextlib/tkHTML/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/tkimg.rb37
-rw-r--r--ext/tk/lib/tkextlib/tkimg/README26
-rw-r--r--ext/tk/lib/tkextlib/tkimg/bmp.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/dted.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/gif.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/ico.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/jpeg.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/pcx.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/pixmap.rb45
-rw-r--r--ext/tk/lib/tkextlib/tkimg/png.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/ppm.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/ps.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/raw.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/tkimg/sgi.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/sun.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/tga.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/tiff.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/window.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/xbm.rb34
-rw-r--r--ext/tk/lib/tkextlib/tkimg/xpm.rb34
-rw-r--r--ext/tk/lib/tkextlib/tktable.rb15
-rw-r--r--ext/tk/lib/tkextlib/tktable/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/tktable/tktable.rb967
-rw-r--r--ext/tk/lib/tkextlib/tktrans.rb15
-rw-r--r--ext/tk/lib/tkextlib/tktrans/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/tktrans/tktrans.rb65
-rw-r--r--ext/tk/lib/tkextlib/treectrl.rb14
-rw-r--r--ext/tk/lib/tkextlib/treectrl/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/treectrl/tktreectrl.rb2523
-rw-r--r--ext/tk/lib/tkextlib/trofs.rb14
-rw-r--r--ext/tk/lib/tkextlib/trofs/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/trofs/trofs.rb52
-rw-r--r--ext/tk/lib/tkextlib/version.rb7
-rw-r--r--ext/tk/lib/tkextlib/vu.rb49
-rw-r--r--ext/tk/lib/tkextlib/vu/bargraph.rb62
-rw-r--r--ext/tk/lib/tkextlib/vu/charts.rb54
-rw-r--r--ext/tk/lib/tkextlib/vu/dial.rb103
-rw-r--r--ext/tk/lib/tkextlib/vu/pie.rb287
-rw-r--r--ext/tk/lib/tkextlib/vu/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/vu/spinbox.rb23
-rw-r--r--ext/tk/lib/tkextlib/winico.rb15
-rw-r--r--ext/tk/lib/tkextlib/winico/setup.rb9
-rw-r--r--ext/tk/lib/tkextlib/winico/winico.rb225
-rw-r--r--ext/tk/lib/tkfont.rb5
-rw-r--r--ext/tk/lib/tkmacpkg.rb5
-rw-r--r--ext/tk/lib/tkmenubar.rb5
-rw-r--r--ext/tk/lib/tkmngfocus.rb5
-rw-r--r--ext/tk/lib/tkpalette.rb5
-rw-r--r--ext/tk/lib/tkscrollbox.rb5
-rw-r--r--ext/tk/lib/tktext.rb5
-rw-r--r--ext/tk/lib/tkvirtevent.rb5
-rw-r--r--ext/tk/lib/tkwinpkg.rb5
-rw-r--r--ext/tk/old-README.tcltklib.ja159
-rw-r--r--ext/tk/old-extconf.rb441
-rw-r--r--ext/tk/sample/24hr_clock.rb287
-rw-r--r--ext/tk/sample/binding_sample.rb88
-rw-r--r--ext/tk/sample/bindtag_sample.rb128
-rw-r--r--ext/tk/sample/binstr_usage.rb46
-rw-r--r--ext/tk/sample/btn_with_frame.rb21
-rw-r--r--ext/tk/sample/cd_timer.rb82
-rw-r--r--ext/tk/sample/cmd_res_test.rb18
-rw-r--r--ext/tk/sample/cmd_resource5
-rw-r--r--ext/tk/sample/demos-en/ChangeLog64
-rw-r--r--ext/tk/sample/demos-en/ChangeLog.prev9
-rw-r--r--ext/tk/sample/demos-en/README138
-rw-r--r--ext/tk/sample/demos-en/README.1st18
-rw-r--r--ext/tk/sample/demos-en/README.tkencoding29
-rw-r--r--ext/tk/sample/demos-en/anilabel.rb175
-rw-r--r--ext/tk/sample/demos-en/aniwave.rb119
-rw-r--r--ext/tk/sample/demos-en/arrow.rb250
-rw-r--r--ext/tk/sample/demos-en/bind.rb128
-rw-r--r--ext/tk/sample/demos-en/bitmap.rb76
-rw-r--r--ext/tk/sample/demos-en/browse163
-rw-r--r--ext/tk/sample/demos-en/browse282
-rw-r--r--ext/tk/sample/demos-en/button.rb85
-rw-r--r--ext/tk/sample/demos-en/check.rb73
-rw-r--r--ext/tk/sample/demos-en/check2.rb110
-rw-r--r--ext/tk/sample/demos-en/clrpick.rb88
-rw-r--r--ext/tk/sample/demos-en/colors.rb159
-rw-r--r--ext/tk/sample/demos-en/combo.rb97
-rw-r--r--ext/tk/sample/demos-en/cscroll.rb137
-rw-r--r--ext/tk/sample/demos-en/ctext.rb208
-rw-r--r--ext/tk/sample/demos-en/dialog1.rb39
-rw-r--r--ext/tk/sample/demos-en/dialog2.rb42
-rw-r--r--ext/tk/sample/demos-en/doc.org/README7
-rw-r--r--ext/tk/sample/demos-en/doc.org/README.JP14
-rw-r--r--ext/tk/sample/demos-en/doc.org/README.tk8046
-rw-r--r--ext/tk/sample/demos-en/doc.org/license.terms39
-rw-r--r--ext/tk/sample/demos-en/doc.org/license.terms.tk8039
-rw-r--r--ext/tk/sample/demos-en/entry1.rb59
-rw-r--r--ext/tk/sample/demos-en/entry2.rb94
-rw-r--r--ext/tk/sample/demos-en/entry3.rb221
-rw-r--r--ext/tk/sample/demos-en/filebox.rb103
-rw-r--r--ext/tk/sample/demos-en/floor.rb1724
-rw-r--r--ext/tk/sample/demos-en/floor2.rb1723
-rw-r--r--ext/tk/sample/demos-en/form.rb65
-rw-r--r--ext/tk/sample/demos-en/goldberg.rb2007
-rw-r--r--ext/tk/sample/demos-en/hello14
-rw-r--r--ext/tk/sample/demos-en/hscale.rb76
-rw-r--r--ext/tk/sample/demos-en/icon.rb106
-rw-r--r--ext/tk/sample/demos-en/image1.rb66
-rw-r--r--ext/tk/sample/demos-en/image2.rb108
-rw-r--r--ext/tk/sample/demos-en/image3.rb126
-rw-r--r--ext/tk/sample/demos-en/items.rb382
-rw-r--r--ext/tk/sample/demos-en/ixset333
-rw-r--r--ext/tk/sample/demos-en/ixset2367
-rw-r--r--ext/tk/sample/demos-en/knightstour.rb272
-rw-r--r--ext/tk/sample/demos-en/label.rb73
-rw-r--r--ext/tk/sample/demos-en/labelframe.rb96
-rw-r--r--ext/tk/sample/demos-en/mclist.rb118
-rw-r--r--ext/tk/sample/demos-en/menu.rb197
-rw-r--r--ext/tk/sample/demos-en/menu84.rb216
-rw-r--r--ext/tk/sample/demos-en/menubu.rb238
-rw-r--r--ext/tk/sample/demos-en/msgbox.rb91
-rw-r--r--ext/tk/sample/demos-en/msgbox2.rb92
-rw-r--r--ext/tk/sample/demos-en/paned1.rb48
-rw-r--r--ext/tk/sample/demos-en/paned2.rb95
-rw-r--r--ext/tk/sample/demos-en/pendulum.rb241
-rw-r--r--ext/tk/sample/demos-en/plot.rb125
-rw-r--r--ext/tk/sample/demos-en/puzzle.rb135
-rw-r--r--ext/tk/sample/demos-en/radio.rb87
-rw-r--r--ext/tk/sample/demos-en/radio2.rb110
-rw-r--r--ext/tk/sample/demos-en/radio3.rb118
-rw-r--r--ext/tk/sample/demos-en/rmt268
-rw-r--r--ext/tk/sample/demos-en/rolodex320
-rw-r--r--ext/tk/sample/demos-en/ruler.rb206
-rw-r--r--ext/tk/sample/demos-en/sayings.rb107
-rw-r--r--ext/tk/sample/demos-en/search.rb188
-rw-r--r--ext/tk/sample/demos-en/spin.rb66
-rw-r--r--ext/tk/sample/demos-en/square81
-rw-r--r--ext/tk/sample/demos-en/states.rb81
-rw-r--r--ext/tk/sample/demos-en/style.rb232
-rw-r--r--ext/tk/sample/demos-en/tcolor526
-rw-r--r--ext/tk/sample/demos-en/text.rb129
-rw-r--r--ext/tk/sample/demos-en/textpeer.rb77
-rw-r--r--ext/tk/sample/demos-en/timer136
-rw-r--r--ext/tk/sample/demos-en/tkencoding.rb43
-rw-r--r--ext/tk/sample/demos-en/toolbar.rb131
-rw-r--r--ext/tk/sample/demos-en/tree.rb120
-rw-r--r--ext/tk/sample/demos-en/ttkbut.rb140
-rw-r--r--ext/tk/sample/demos-en/ttkmenu.rb86
-rw-r--r--ext/tk/sample/demos-en/ttknote.rb90
-rw-r--r--ext/tk/sample/demos-en/ttkpane.rb214
-rw-r--r--ext/tk/sample/demos-en/ttkprogress.rb67
-rw-r--r--ext/tk/sample/demos-en/twind.rb292
-rw-r--r--ext/tk/sample/demos-en/twind2.rb385
-rw-r--r--ext/tk/sample/demos-en/unicodeout.rb115
-rw-r--r--ext/tk/sample/demos-en/vscale.rb80
-rw-r--r--ext/tk/sample/demos-en/widget1087
-rw-r--r--ext/tk/sample/demos-jp/README54
-rw-r--r--ext/tk/sample/demos-jp/README.1st20
-rw-r--r--ext/tk/sample/demos-jp/anilabel.rb178
-rw-r--r--ext/tk/sample/demos-jp/aniwave.rb121
-rw-r--r--ext/tk/sample/demos-jp/arrow.rb248
-rw-r--r--ext/tk/sample/demos-jp/bind.rb126
-rw-r--r--ext/tk/sample/demos-jp/bitmap.rb75
-rw-r--r--ext/tk/sample/demos-jp/browse163
-rw-r--r--ext/tk/sample/demos-jp/browse282
-rw-r--r--ext/tk/sample/demos-jp/button.rb84
-rw-r--r--ext/tk/sample/demos-jp/check.rb71
-rw-r--r--ext/tk/sample/demos-jp/check2.rb111
-rw-r--r--ext/tk/sample/demos-jp/clrpick.rb85
-rw-r--r--ext/tk/sample/demos-jp/colors.rb156
-rw-r--r--ext/tk/sample/demos-jp/combo.rb99
-rw-r--r--ext/tk/sample/demos-jp/cscroll.rb135
-rw-r--r--ext/tk/sample/demos-jp/ctext.rb205
-rw-r--r--ext/tk/sample/demos-jp/dialog1.rb40
-rw-r--r--ext/tk/sample/demos-jp/dialog2.rb44
-rw-r--r--ext/tk/sample/demos-jp/doc.org/README7
-rw-r--r--ext/tk/sample/demos-jp/doc.org/README.JP14
-rw-r--r--ext/tk/sample/demos-jp/doc.org/README.tk8046
-rw-r--r--ext/tk/sample/demos-jp/doc.org/license.terms39
-rw-r--r--ext/tk/sample/demos-jp/doc.org/license.terms.tk8039
-rw-r--r--ext/tk/sample/demos-jp/entry1.rb61
-rw-r--r--ext/tk/sample/demos-jp/entry2.rb92
-rw-r--r--ext/tk/sample/demos-jp/entry3.rb226
-rw-r--r--ext/tk/sample/demos-jp/filebox.rb103
-rw-r--r--ext/tk/sample/demos-jp/floor.rb1722
-rw-r--r--ext/tk/sample/demos-jp/floor2.rb1720
-rw-r--r--ext/tk/sample/demos-jp/form.rb67
-rw-r--r--ext/tk/sample/demos-jp/goldberg.rb2012
-rw-r--r--ext/tk/sample/demos-jp/hello10
-rw-r--r--ext/tk/sample/demos-jp/hscale.rb79
-rw-r--r--ext/tk/sample/demos-jp/icon.rb104
-rw-r--r--ext/tk/sample/demos-jp/image1.rb65
-rw-r--r--ext/tk/sample/demos-jp/image2.rb107
-rw-r--r--ext/tk/sample/demos-jp/image3.rb128
-rw-r--r--ext/tk/sample/demos-jp/items.rb380
-rw-r--r--ext/tk/sample/demos-jp/ixset333
-rw-r--r--ext/tk/sample/demos-jp/ixset2369
-rw-r--r--ext/tk/sample/demos-jp/knightstour.rb274
-rw-r--r--ext/tk/sample/demos-jp/label.rb70
-rw-r--r--ext/tk/sample/demos-jp/labelframe.rb103
-rw-r--r--ext/tk/sample/demos-jp/mclist.rb122
-rw-r--r--ext/tk/sample/demos-jp/menu.rb202
-rw-r--r--ext/tk/sample/demos-jp/menu84.rb214
-rw-r--r--ext/tk/sample/demos-jp/menu8x.rb234
-rw-r--r--ext/tk/sample/demos-jp/menubu.rb239
-rw-r--r--ext/tk/sample/demos-jp/msgbox.rb90
-rw-r--r--ext/tk/sample/demos-jp/msgbox2.rb91
-rw-r--r--ext/tk/sample/demos-jp/paned1.rb53
-rw-r--r--ext/tk/sample/demos-jp/paned2.rb101
-rw-r--r--ext/tk/sample/demos-jp/pendulum.rb243
-rw-r--r--ext/tk/sample/demos-jp/plot.rb127
-rw-r--r--ext/tk/sample/demos-jp/puzzle.rb132
-rw-r--r--ext/tk/sample/demos-jp/radio.rb85
-rw-r--r--ext/tk/sample/demos-jp/radio2.rb113
-rw-r--r--ext/tk/sample/demos-jp/radio3.rb120
-rw-r--r--ext/tk/sample/demos-jp/rmt268
-rw-r--r--ext/tk/sample/demos-jp/rolodex320
-rw-r--r--ext/tk/sample/demos-jp/rolodex-j300
-rw-r--r--ext/tk/sample/demos-jp/ruler.rb204
-rw-r--r--ext/tk/sample/demos-jp/sayings.rb104
-rw-r--r--ext/tk/sample/demos-jp/search.rb185
-rw-r--r--ext/tk/sample/demos-jp/spin.rb72
-rw-r--r--ext/tk/sample/demos-jp/square81
-rw-r--r--ext/tk/sample/demos-jp/states.rb75
-rw-r--r--ext/tk/sample/demos-jp/style.rb271
-rw-r--r--ext/tk/sample/demos-jp/tcolor534
-rw-r--r--ext/tk/sample/demos-jp/text.rb121
-rw-r--r--ext/tk/sample/demos-jp/textpeer.rb83
-rw-r--r--ext/tk/sample/demos-jp/timer136
-rw-r--r--ext/tk/sample/demos-jp/toolbar.rb137
-rw-r--r--ext/tk/sample/demos-jp/tree.rb121
-rw-r--r--ext/tk/sample/demos-jp/ttkbut.rb146
-rw-r--r--ext/tk/sample/demos-jp/ttkmenu.rb92
-rw-r--r--ext/tk/sample/demos-jp/ttknote.rb98
-rw-r--r--ext/tk/sample/demos-jp/ttkpane.rb217
-rw-r--r--ext/tk/sample/demos-jp/ttkprogress.rb72
-rw-r--r--ext/tk/sample/demos-jp/twind.rb293
-rw-r--r--ext/tk/sample/demos-jp/twind2.rb385
-rw-r--r--ext/tk/sample/demos-jp/unicodeout.rb120
-rw-r--r--ext/tk/sample/demos-jp/vscale.rb81
-rw-r--r--ext/tk/sample/demos-jp/widget1122
-rw-r--r--ext/tk/sample/editable_listbox.rb149
-rw-r--r--ext/tk/sample/encstr_usage.rb31
-rw-r--r--ext/tk/sample/figmemo_sample.rb457
-rw-r--r--ext/tk/sample/images/earth.gifbin51712 -> 0 bytes
-rw-r--r--ext/tk/sample/images/earthris.gifbin6343 -> 0 bytes
-rw-r--r--ext/tk/sample/images/face.xbm173
-rw-r--r--ext/tk/sample/images/flagdown.xbm27
-rw-r--r--ext/tk/sample/images/flagup.xbm27
-rw-r--r--ext/tk/sample/images/gray25.xbm6
-rw-r--r--ext/tk/sample/images/grey.256
-rw-r--r--ext/tk/sample/images/grey.56
-rw-r--r--ext/tk/sample/images/letters.xbm27
-rw-r--r--ext/tk/sample/images/noletter.xbm27
-rw-r--r--ext/tk/sample/images/pattern.xbm6
-rw-r--r--ext/tk/sample/images/tcllogo.gifbin2341 -> 0 bytes
-rw-r--r--ext/tk/sample/images/teapot.ppm31
-rw-r--r--ext/tk/sample/irbtk.rb31
-rw-r--r--ext/tk/sample/irbtkw.rbw156
-rw-r--r--ext/tk/sample/iso2022-kr.txt2
-rw-r--r--ext/tk/sample/menubar1.rb52
-rw-r--r--ext/tk/sample/menubar2.rb57
-rw-r--r--ext/tk/sample/menubar3.rb73
-rw-r--r--ext/tk/sample/msgs_rb/README3
-rw-r--r--ext/tk/sample/msgs_rb/cs.msg84
-rw-r--r--ext/tk/sample/msgs_rb/de.msg88
-rw-r--r--ext/tk/sample/msgs_rb/el.msg98
-rw-r--r--ext/tk/sample/msgs_rb/en.msg83
-rw-r--r--ext/tk/sample/msgs_rb/en_gb.msg7
-rw-r--r--ext/tk/sample/msgs_rb/eo.msg87
-rw-r--r--ext/tk/sample/msgs_rb/es.msg84
-rw-r--r--ext/tk/sample/msgs_rb/fr.msg84
-rw-r--r--ext/tk/sample/msgs_rb/it.msg84
-rw-r--r--ext/tk/sample/msgs_rb/ja.msg13
-rw-r--r--ext/tk/sample/msgs_rb/nl.msg123
-rw-r--r--ext/tk/sample/msgs_rb/pl.msg87
-rw-r--r--ext/tk/sample/msgs_rb/ru.msg87
-rw-r--r--ext/tk/sample/msgs_rb2/README5
-rw-r--r--ext/tk/sample/msgs_rb2/de.msg88
-rw-r--r--ext/tk/sample/msgs_rb2/ja.msg85
-rw-r--r--ext/tk/sample/msgs_tk/README4
-rw-r--r--ext/tk/sample/msgs_tk/cs.msg84
-rw-r--r--ext/tk/sample/msgs_tk/de.msg88
-rw-r--r--ext/tk/sample/msgs_tk/el.msg103
-rw-r--r--ext/tk/sample/msgs_tk/en.msg83
-rw-r--r--ext/tk/sample/msgs_tk/en_gb.msg7
-rw-r--r--ext/tk/sample/msgs_tk/eo.msg87
-rw-r--r--ext/tk/sample/msgs_tk/es.msg84
-rw-r--r--ext/tk/sample/msgs_tk/fr.msg84
-rw-r--r--ext/tk/sample/msgs_tk/it.msg84
-rw-r--r--ext/tk/sample/msgs_tk/ja.msg13
-rw-r--r--ext/tk/sample/msgs_tk/license.terms39
-rw-r--r--ext/tk/sample/msgs_tk/nl.msg123
-rw-r--r--ext/tk/sample/msgs_tk/pl.msg87
-rw-r--r--ext/tk/sample/msgs_tk/ru.msg87
-rw-r--r--ext/tk/sample/multi-ip_sample.rb104
-rw-r--r--ext/tk/sample/multi-ip_sample2.rb30
-rw-r--r--ext/tk/sample/optobj_sample.rb68
-rw-r--r--ext/tk/sample/propagate.rb31
-rw-r--r--ext/tk/sample/remote-ip_sample.rb34
-rw-r--r--ext/tk/sample/remote-ip_sample2.rb57
-rw-r--r--ext/tk/sample/resource.en13
-rw-r--r--ext/tk/sample/resource.ja13
-rwxr-xr-xext/tk/sample/safe-tk.rb132
-rw-r--r--ext/tk/sample/scrollframe.rb250
-rw-r--r--ext/tk/sample/tcltklib/batsu.gifbin538 -> 0 bytes
-rw-r--r--ext/tk/sample/tcltklib/lines0.tcl42
-rw-r--r--ext/tk/sample/tcltklib/lines1.rb51
-rw-r--r--ext/tk/sample/tcltklib/lines2.rb55
-rw-r--r--ext/tk/sample/tcltklib/lines3.rb55
-rw-r--r--ext/tk/sample/tcltklib/lines4.rb55
-rw-r--r--ext/tk/sample/tcltklib/maru.gifbin481 -> 0 bytes
-rw-r--r--ext/tk/sample/tcltklib/safeTk.rb23
-rw-r--r--ext/tk/sample/tcltklib/sample0.rb40
-rw-r--r--ext/tk/sample/tcltklib/sample1.rb635
-rw-r--r--ext/tk/sample/tcltklib/sample2.rb452
-rw-r--r--ext/tk/sample/tkalignbox.rb236
-rw-r--r--ext/tk/sample/tkballoonhelp.rb221
-rw-r--r--ext/tk/sample/tkbiff.rb156
-rw-r--r--ext/tk/sample/tkbrowse.rb80
-rw-r--r--ext/tk/sample/tkcombobox.rb498
-rw-r--r--ext/tk/sample/tkdialog.rb62
-rw-r--r--ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt61
-rw-r--r--ext/tk/sample/tkextlib/ICONS/tkIcons195
-rw-r--r--ext/tk/sample/tkextlib/ICONS/tkIcons-sample.kde658
-rw-r--r--ext/tk/sample/tkextlib/ICONS/tkIcons.kde195
-rw-r--r--ext/tk/sample/tkextlib/ICONS/viewIcons.rb330
-rw-r--r--ext/tk/sample/tkextlib/blt/barchart5.rb102
-rw-r--r--ext/tk/sample/tkextlib/blt/calendar.rb118
-rw-r--r--ext/tk/sample/tkextlib/blt/graph6.rb2223
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7.rb41
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7a.rb64
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7b.rb42
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7c.rb46
-rw-r--r--ext/tk/sample/tkextlib/blt/images/buckskin.gifbin7561 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/blt/images/chalk.gifbin4378 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/blt/images/qv100.t.gifbin2694 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/blt/images/rain.gifbin3785 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/blt/images/sample.gifbin186103 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/blt/pareto.rb91
-rw-r--r--ext/tk/sample/tkextlib/blt/plot1.rb10
-rw-r--r--ext/tk/sample/tkextlib/blt/plot1b.rb11
-rw-r--r--ext/tk/sample/tkextlib/blt/readme.txt2
-rw-r--r--ext/tk/sample/tkextlib/blt/scripts/stipples.rb157
-rw-r--r--ext/tk/sample/tkextlib/blt/winop1.rb41
-rw-r--r--ext/tk/sample/tkextlib/blt/winop2.rb29
-rw-r--r--ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt53
-rw-r--r--ext/tk/sample/tkextlib/bwidget/basic.rb199
-rw-r--r--ext/tk/sample/tkextlib/bwidget/bwidget.xbm46
-rw-r--r--ext/tk/sample/tkextlib/bwidget/demo.rb244
-rw-r--r--ext/tk/sample/tkextlib/bwidget/dnd.rb47
-rw-r--r--ext/tk/sample/tkextlib/bwidget/manager.rb151
-rw-r--r--ext/tk/sample/tkextlib/bwidget/select.rb83
-rw-r--r--ext/tk/sample/tkextlib/bwidget/tmpldlg.rb222
-rw-r--r--ext/tk/sample/tkextlib/bwidget/tree.rb290
-rw-r--r--ext/tk/sample/tkextlib/bwidget/x1.xbm2258
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt42
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/clear.gifbin279 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/close.gifbin249 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/copy.gifbin269 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/cut.gifbin179 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/exit.gifbin396 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/find.gifbin386 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/help.gifbin591 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/mag.gifbin183 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/new.gifbin212 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/open.gifbin258 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/paste.gifbin376 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/poly.gifbin141 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/print.gifbin263 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/ruler.gifbin174 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/save.gifbin270 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/select.gifbin124 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb23
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb11
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb9
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb9
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb13
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb33
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb9
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb21
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb15
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb17
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb40
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb45
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb41
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb21
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb9
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb30
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb11
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb9
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb29
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb16
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb26
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb15
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb15
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb65
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb125
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb45
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb20
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb20
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb45
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb31
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb31
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb15
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb23
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb23
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb18
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb10
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb19
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb16
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb23
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb12
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb20
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb13
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/shell.rb18
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb11
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb34
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb27
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb31
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb35
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb9
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb153
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/watch.rb19
-rw-r--r--ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt46
-rw-r--r--ext/tk/sample/tkextlib/tcllib/datefield.rb30
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos1.rb159
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos2.rb72
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos3.rb84
-rw-r--r--ext/tk/sample/tkextlib/tcllib/xyplot.rb18
-rw-r--r--ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt30
-rw-r--r--ext/tk/sample/tkextlib/tile/demo.rb984
-rw-r--r--ext/tk/sample/tkextlib/tile/iconlib.tcl110
-rw-r--r--ext/tk/sample/tkextlib/tile/readme.txt2
-rw-r--r--ext/tk/sample/tkextlib/tile/repeater.tcl117
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl149
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gifbin315 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gifbin312 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown.gifbin313 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gifbin329 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gifbin327 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft.gifbin323 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gifbin330 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gifbin327 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright.gifbin324 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gifbin309 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gifbin313 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup.gifbin314 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gifbin696 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.gifbin770 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcfbin1942 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gifbin769 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gifbin254 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gifbin234 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nc.gifbin249 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gifbin229 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gifbin1098 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gifbin626 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nc.gifbin389 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nu.gifbin401 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gifbin343 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gifbin316 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gifbin333 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gifbin308 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/slider-p.gifbin182 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/slider.gifbin182 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gifbin183 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gifbin283 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl6
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl194
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gifbin273 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gifbin258 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gifbin292 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gifbin272 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gifbin274 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gifbin258 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gifbin286 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gifbin271 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gifbin1266 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gifbin896 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gifbin881 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gifbin625 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gifbin859 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gifbin434 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gifbin423 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gifbin401 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gifbin395 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gifbin592 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gifbin1116 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gifbin61 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gifbin1057 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gifbin1095 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gifbin695 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gifbin686 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gifbin383 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gifbin878 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gifbin907 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gifbin238 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gifbin927 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gifbin405 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gifbin399 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gifbin587 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl15
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc.rb227
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl163
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gifbin522 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gifbin554 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gifbin548 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gifbin281 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gifbin273 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gifbin303 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gifbin294 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gifbin652 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gifbin644 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gifbin632 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gifbin621 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl15
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl16
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl125
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gifbin362 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gifbin250 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gifbin378 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gifbin267 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gifbin379 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gifbin266 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gifbin363 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gifbin251 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gifbin439 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-n.gifbin443 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gifbin302 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gifbin169 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gifbin170 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gifbin235 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gifbin226 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gifbin169 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gifbin269 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gifbin342 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gifbin178 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gifbin179 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gifbin236 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gifbin178 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gifbin178 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gifbin366 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gifbin336 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tile/toolbutton.tcl152
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/Orig_COPYRIGHT.txt12
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/README12
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/hv.rb314
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image1bin8995 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image10bin3095 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image11bin1425 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image12bin2468 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image13bin4073 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image14bin53 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image2bin42 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image3bin3473 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image4bin1988 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image5bin973 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image6bin2184 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image7bin2022 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image8bin1186 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image9bin139 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/index.html115
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image1bin1966 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image10bin255 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image11bin590 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image12bin254 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image13bin493 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image14bin195 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image15bin68 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image16bin157 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image17bin81 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image18bin545 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image19bin53 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image2bin49 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image20bin533 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image21bin564 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image22bin81 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image23bin539 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image24bin151 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image25bin453 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image26bin520 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image27bin565 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image28bin416 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image29bin121 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image3bin10835 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image30bin663 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image31bin78 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image32bin556 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image33bin598 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image34bin496 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image35bin724 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image36bin404 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image37bin124 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image38bin8330 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image39bin369 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image4bin268 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image5bin492 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image6bin246 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image7bin551 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image8bin497 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image9bin492 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/index.html433
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image1bin113 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image10bin5088 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image11bin4485 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image12bin3579 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image13bin5119 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image14bin3603 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image2bin74 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image3bin681 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image4bin3056 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image5bin2297 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image6bin79 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image7bin1613 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image8bin864 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image9bin2379 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/index.html2787
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image1bin42 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image2bin14343 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image3bin17750 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image4bin61 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image5bin201 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image6bin214 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image7bin149 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image8bin203 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image9bin1504 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/index.html768
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/ss.rb437
-rw-r--r--ext/tk/sample/tkextlib/tkimg/demo.rb1479
-rw-r--r--ext/tk/sample/tkextlib/tkimg/license_terms_of_Img_extension41
-rw-r--r--ext/tk/sample/tkextlib/tkimg/readme.txt3
-rw-r--r--ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt52
-rw-r--r--ext/tk/sample/tkextlib/tktable/basic.rb61
-rw-r--r--ext/tk/sample/tkextlib/tktable/buttons.rb77
-rw-r--r--ext/tk/sample/tkextlib/tktable/command.rb90
-rw-r--r--ext/tk/sample/tkextlib/tktable/debug.rb102
-rw-r--r--ext/tk/sample/tkextlib/tktable/dynarows.rb100
-rw-r--r--ext/tk/sample/tkextlib/tktable/maxsize.rb68
-rw-r--r--ext/tk/sample/tkextlib/tktable/spreadsheet.rb138
-rw-r--r--ext/tk/sample/tkextlib/tktable/tcllogo.gifbin2341 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/tktable/valid.rb89
-rw-r--r--ext/tk/sample/tkextlib/treectrl/bitmaps.rb77
-rw-r--r--ext/tk/sample/tkextlib/treectrl/demo.rb1306
-rw-r--r--ext/tk/sample/tkextlib/treectrl/explorer.rb431
-rw-r--r--ext/tk/sample/tkextlib/treectrl/help.rb405
-rw-r--r--ext/tk/sample/tkextlib/treectrl/imovie.rb131
-rw-r--r--ext/tk/sample/tkextlib/treectrl/layout.rb160
-rw-r--r--ext/tk/sample/tkextlib/treectrl/mailwasher.rb270
-rw-r--r--ext/tk/sample/tkextlib/treectrl/outlook-folders.rb125
-rw-r--r--ext/tk/sample/tkextlib/treectrl/outlook-newgroup.rb449
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-dll.gifbin437 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-exe.gifbin368 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-file.gifbin466 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-folder.gifbin459 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-txt.gifbin392 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/checked.gifbin78 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/file.gifbin279 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/folder-closed.gifbin111 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/folder-open.gifbin120 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/help-book-closed.gifbin115 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/help-book-open.gifbin128 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/help-page.gifbin132 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-01.gifbin5406 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-02.gifbin5912 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-03.gifbin4696 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-04.gifbin5783 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-05.gifbin3238 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-06.gifbin3509 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-07.gifbin2091 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-check-off.gifbin70 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-check-on.gifbin76 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-print.gifbin124 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-radio-off.gifbin68 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-radio-on.gifbin71 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-search.gifbin114 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-security.gifbin108 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/mac-collapse.gifbin275 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/mac-expand.gifbin277 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-arrow.gifbin73 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-clip.gifbin73 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-deleted.gifbin138 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-draft.gifbin134 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-folder.gifbin133 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-group.gifbin144 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-inbox.gifbin133 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-local.gifbin146 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-main.gifbin174 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-outbox.gifbin136 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-read-2.gifbin343 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-read.gifbin304 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-sent.gifbin132 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-server.gifbin163 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-unread.gifbin303 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-watch.gifbin98 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/sky.gifbin6454 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-dll.gifbin311 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-exe.gifbin115 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-file.gifbin338 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-folder.gifbin307 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-txt.gifbin302 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/unchecked.gifbin72 -> 0 bytes
-rw-r--r--ext/tk/sample/tkextlib/treectrl/random.rb509
-rw-r--r--ext/tk/sample/tkextlib/treectrl/readme.txt2
-rw-r--r--ext/tk/sample/tkextlib/treectrl/www-options.rb304
-rw-r--r--ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt51
-rw-r--r--ext/tk/sample/tkextlib/vu/README.txt50
-rw-r--r--ext/tk/sample/tkextlib/vu/canvItems.rb91
-rw-r--r--ext/tk/sample/tkextlib/vu/canvSticker.rb83
-rw-r--r--ext/tk/sample/tkextlib/vu/canvSticker2.rb102
-rw-r--r--ext/tk/sample/tkextlib/vu/dial_demo.rb114
-rw-r--r--ext/tk/sample/tkextlib/vu/m128_000.xbm174
-rw-r--r--ext/tk/sample/tkextlib/vu/oscilloscope.rb69
-rw-r--r--ext/tk/sample/tkextlib/vu/pie.rb57
-rw-r--r--ext/tk/sample/tkextlib/vu/vu_demo.rb68
-rw-r--r--ext/tk/sample/tkfrom.rb133
-rw-r--r--ext/tk/sample/tkhello.rb11
-rw-r--r--ext/tk/sample/tkline.rb48
-rw-r--r--ext/tk/sample/tkmenubutton.rb136
-rw-r--r--ext/tk/sample/tkmsgcat-load_rb.rb103
-rw-r--r--ext/tk/sample/tkmsgcat-load_rb2.rb103
-rw-r--r--ext/tk/sample/tkmsgcat-load_tk.rb119
-rw-r--r--ext/tk/sample/tkmulticolumnlist.rb744
-rw-r--r--ext/tk/sample/tkmultilistbox.rb655
-rw-r--r--ext/tk/sample/tkmultilistframe.rb941
-rwxr-xr-xext/tk/sample/tkoptdb-safeTk.rb74
-rw-r--r--ext/tk/sample/tkoptdb.rb107
-rw-r--r--ext/tk/sample/tkrttimer.rb78
-rw-r--r--ext/tk/sample/tksleep_sample.rb30
-rw-r--r--ext/tk/sample/tktextframe.rb282
-rw-r--r--ext/tk/sample/tktextio.rb1061
-rw-r--r--ext/tk/sample/tktimer.rb51
-rw-r--r--ext/tk/sample/tktimer2.rb48
-rw-r--r--ext/tk/sample/tktimer3.rb60
-rw-r--r--ext/tk/sample/tktree.rb104
-rw-r--r--ext/tk/sample/tktree.tcl305
-rw-r--r--ext/tk/sample/ttk_wrapper.rb155
-rw-r--r--ext/tk/stubs.c592
-rw-r--r--ext/tk/stubs.h33
-rw-r--r--ext/tk/tcltklib.c11066
-rw-r--r--ext/tk/tkutil/depend13
-rw-r--r--ext/tk/tkutil/extconf.rb14
-rw-r--r--ext/tk/tkutil/tkutil.c1900
1054 files changed, 0 insertions, 156749 deletions
diff --git a/ext/Setup b/ext/Setup
index c8996be79c..0929d647ae 100644
--- a/ext/Setup
+++ b/ext/Setup
@@ -40,8 +40,6 @@
#stringio
#strscan
#syslog
-#tk
-#tk/tkutil
#win32
#win32ole
#zlib
diff --git a/ext/Setup.atheos b/ext/Setup.atheos
index 5e39de8e15..90a7d01348 100644
--- a/ext/Setup.atheos
+++ b/ext/Setup.atheos
@@ -25,6 +25,5 @@ socket
stringio
strscan
syslog
-#tk
#win32ole
zlib
diff --git a/ext/Setup.nacl b/ext/Setup.nacl
index f205e367c6..eb8a1a70cd 100644
--- a/ext/Setup.nacl
+++ b/ext/Setup.nacl
@@ -41,6 +41,4 @@
# stringio
# strscan
# #syslog
-# #tk
-# #tk/tkutil
# #zlib
diff --git a/ext/Setup.nt b/ext/Setup.nt
index 4812893eef..fb5989b87f 100644
--- a/ext/Setup.nt
+++ b/ext/Setup.nt
@@ -26,6 +26,5 @@ socket
stringio
strscan
#syslog
-#tk
win32ole
#zlib
diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib
deleted file mode 100644
index 52a0b7ea3a..0000000000
--- a/ext/tk/ChangeLog.tkextlib
+++ /dev/null
@@ -1,949 +0,0 @@
-2009-07-12 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * ext/tk/lib/tkextlib/*: update release.
- Tcllib 1.8/Tklib 0.4.1 ==> Tcllib 1.11.1/Tklib 0.5
- BWidgets 1.7 ==> BWidgets 1.8
- TkTable 2.9 ==> TkTable 2.10
- TkTreeCtrl 2005-12-02 ==> TkTreeCtrl 2.2.9
- Tile 0.8.0/8.5.1 ==> Tile 0.8.3/8.6b1
- IncrTcl 2005-02-14 ==> IncrTcl 2008-12-15
- TclX 2005-02-07 ==> TclX 2008-12-15
- Trofs 0.4.3 ==> Trofs 0.4.4
-
---------------< ... some bug fixes ... >------------------
-
-Tue Nov 25 03:37:42 2008 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * ext/tk/lib/tkextlib/blt/tabset.rb,
- ext/tk/lib/tkextlib/blt/tabnotebook.rb:
- fix many bugs. Now, those work properly.
-
-Sat Nov 22 10:31:25 2008 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * ext/tk/lib/tkextlib/blt.rb, ext/tk/lib/tkextlib/blt/vector.rb:
- fix NameError bug.
-
-2008-05-12 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name.
-
---------------< ... some changes ... >------------------
-
-2007-05-26 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * ext/tk/lib/tkextlib/tcllib/tablelist.rb: fix typo.
-
- * ext/tk/lib/tkextlib/tile/dialog.rb: forget to give an argument.
-
- * ext/tk/lib/tkextlib/version.rb: update RELEASE_DATE.
-
-2007-01-26 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * ext/tk/lib/tkextlib/iwidgets/checkbox.rb: wrong number of arguments
- [ruby-Bugs-7776].
-
- * ext/tk/lib/tkextlib/iwidgets/radiobox.rb: ditto.
-
- * ext/tk/lib/tkextlib/blt/tile/checkbutton.rb: change primary name
- of class [ruby-dev:30080].
-
- * ext/tk/lib/tkextlib/blt/tile/radiobutton.rb: ditto.
-
-2006-11-07 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tile/treeview.rb : minor bug fix.
-
- * lib/tkextlib/blt/table.rb: fix bugs which forbade use of
- '::blt::table' command. Now, probably, it'll works properly.
-
-2006-11-06 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/version.rb: keep release date of tkextlib on
- "Tk::Tkextlib_RELEASE_DATE".
-
- * lib/tkextlib/tile/treeview.rb : support Tile 0.7.8.
- Now, you can handle tree items as objects.
-
-2006-10-04 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tile.rb, lib/tkextlib/tile/* : support Tile 0.7.6.
-
-2006-10-03 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/SUPPORT_STATUS: [ruby-talk:211939] check links
- of extensions.
-
- * lib/tkextlib/blt/container.rb: define instance methods properly.
-
- * lib/tkextlib/tile/tcombobox.rb: bug fix [ruby-talk:213003].
-
- * lib/tkextlib/tile/tnotebook.rb: ditto.
-
- * lib/tkextlib/tile/treeview.rb: ditto.
-
- * lib/tkextlib/tile/sizegrip.rb: [new] add 'ttk::sizegrip' widget.
-
-2006-08-31 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt.rb: double dashes (--) option doesn't work
- properly on some versions of BLT (wrong description on the
- manual of `blt::bgexec'?).
-
-2005-12-11 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/SUPPORT_STATUS: update to support libraries in
- ActiveTcl8.4.12.0.
-
- * lib/tkextlib/tile/tnotebook.rb: add Tk::Tile::TNotebook#insert.
-
- * sample/tkextlib/tile/demo.rb: improve the look of a part of the demo.
-
-2005-11-25 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * sample/tkextlib/tile/demo.rb: bug fix
-
- * sample/tkextlib/tile/themes/*: add some themes (blue,
- keramik, and plastik; require Tile-0.5 or later).
-
-2005-11-22 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tile.rb: bug fix (Tk::Tile::USE_TTK_NAMESPACE
- is not defined).
-
-2005-11-19 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * sample/tkextlib/treectrl/demo.rb: remove dependency on Ruby's
- version (1.8 or 1.9).
-
-2005-10-23 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/*: update to support ActiveTcl8.4.11.2
-
- * lib/tkextlib/trofs/*: support Trofs 0.4.3
-
- * lib/tkextlib/tile/*: support Tile 0.7.2
-
- * lib/tkextlib/vu/*: support vu 2.3.0
-
- * lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3 part only)
-
- * lib/tkextlib/*: improve conversion of option values
-
-2005-10-04 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tktable/tktable.rb: border_* instance methods
- don't call 'border' subcommands.
-
-2005-08-10 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt/component.rb: didn't check
- __item_ruby2val_optkeys().
-
-2005-08-09 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt/barchart.rb: support to treat tkvariable-type
- configure options.
-
- * lib/tkextlib/blt/component.rb: ditto.
-
- * lib/tkextlib/blt/dragdrop.rb: ditto.
-
- * lib/tkextlib/blt/treeview.rb: ditto.
-
- * lib/tkextlib/bwidget/button.rb: ditto.
-
- * lib/tkextlib/bwidget/entry.rb: ditto.
-
- * lib/tkextlib/bwidget/label.rb: ditto.
-
- * lib/tkextlib/bwidget/labelentry.rb: ditto.
-
- * lib/tkextlib/bwidget/labelframe.rb: ditto.
-
- * lib/tkextlib/bwidget/mainframe.rb: ditto.
-
- * lib/tkextlib/bwidget/passwddlg.rb: ditto.
-
- * lib/tkextlib/bwidget/spinbox.rb: ditto.
-
- * lib/tkextlib/bwidget/tree.rb: ditto.
-
- * lib/tkextlib/iwidgets/calendar.rb: ditto.
-
- * lib/tkextlib/iwidgets/entryfield.rb: ditto.
-
- * lib/tkextlib/iwidgets/hierarchy.rb: ditto.
-
- * lib/tkextlib/iwidgets/labeledframe.rb: ditto.
-
- * lib/tkextlib/iwidgets/labeledwidget.rb: ditto.
-
- * lib/tkextlib/iwidgets/menubar.rb: ditto.
-
- * lib/tkextlib/iwidgets/scrolledlistbox.rb: ditto.
-
- * lib/tkextlib/iwidgets/spinner.rb: ditto.
-
- * lib/tkextlib/iwidgets/toolbar.rb: ditto.
-
- * lib/tkextlib/tkimg/pixmap.rb: ditto.
-
- * lib/tkextlib/tktable/tktable.rb: ditto.
-
-2005-08-06 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/tile/demo.rb: use Tk::Tile::Scale#variable.
-
-2005-08-04 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/tile/demo.rb: followed previous changes.
-
-2005-08-04 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tile/t*.rb: aliased class names starting with 'T'
- to non 'T' ones. (ie. Tk::Tile::TButton -> Tk::Tile::Button)
- [ruby-dev:26724]
-
- * lib/tkextlib/tile.rb: ditto. (autoload support)
-
-2005-08-04 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/tile/demo.rb: fixed: Tk::Tile::TProgressbar is
- supported on tile 0.6 or later, not tile 0.5.
-
- * sample/tkextlib/tile/demo.rb: updated scales demo to use
- Tk::Tile::TProgressbar for tile 0.6 or later.
-
- * sample/tkextlib/tile/demo.rb: set some TkVariable default values.
-
-2005-08-03 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tile/treeview.rb: Tk::Tile::Treeview#headingconfigure
- is now working and more. [ruby-dev:26716]
-
- * sample/tkextlib/tile/demo.rb: use Tk::Tile::Treeview#headingconfigure instead of direct Tk.tk_call.
-
-2005-08-02 ocean <ocean@ruby-lang.org>
-
- * lib/tkextlib/tile/tprogressbar.rb: Tk::Tile::TProgressbar#start
- takes optional argument `interval'.
-
- * sample/tkextlib/tile/demo.rb: emulate Tk::Tile::TProgressbar
- with Tk::Tile::TProgress in tile 0.4. (repeating buttons demo)
-
-2005-08-02 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/tile/demo.rb: added repeating buttons demo.
-
- * sample/tkextlib/tile/repeater.tcl: ditto. (new file)
-
-2005-08-01 ocean <ocean@ruby-lang.org>
-
- * lib/tkextlib/tile.rb: fixed autoload for Treeview.
-
- * lib/tkextlib/tile/treeview.rb: replaced `ary2tk_list(items)' with
- `*items'.
-
- * sample/tkextlib/tile/demo.rb: added treeview demo. (tile 0.5 or
- later is required) [ruby-dev:26668]
-
-2005-08-01 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/tile/demo.rb: added combobox demo.
-
-2005-07-27 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/tile/demo.rb: fixed typo.
-
-2005-06-16 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/SUPPOPRT_STATUS: add RELEASE_DATE information.
-
- * lib/tkextlib/tile/style.rb: add "style element options <elem>"
- command support.
-
-2005-06-08 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/ICONS/icons.rb: fail to create instances of
- Tk::ICONS [ruby-dev:26305].
-
-2005-06-07 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/tile/themes/kroc.{rb,tcl}: also support tile 0.4.
-
-2005-06-07 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/tile/themes/kroc.{rb,tcl}: support tile 0.5 or later.
- ("pixmap" element constructor replaced by "image")
-
-2005-06-05 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * sample/tkextlib/tile/demo.rb: fix TypeError & create Console
-
-2005-05-30 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt.rb: add PACKAGE_NAME information of Tcl/Tk
- Extension.
-
- * lib/tkextlib/bwidget.rb: ditto.
-
- * lib/tkextlib/iwidgets.rb: ditto.
-
- * lib/tkextlib/tile.rb: ditto.
-
- * lib/tkextlib/tkimg.rb: ditto.
-
- * lib/tkextlib/vu.rb: ditto.
-
- * lib/tkextlib/ICONS/icons.rb: ditto.
-
- * lib/tkextlib/itcl/incr_tcl.rb: ditto.
-
- * lib/tkextlib/itk/incr_tk.rb: ditto.
-
- * lib/tkextlib/tcllib/autoscroll.rb: ditto.
-
- * lib/tkextlib/tcllib/ctext.rb: ditto.
-
- * lib/tkextlib/tcllib/cursor.rb: ditto.
-
- * lib/tkextlib/tcllib/datefield.rb: ditto.
-
- * lib/tkextlib/tcllib/ico.rb: ditto.
-
- * lib/tkextlib/tcllib/ip_entry.rb: ditto.
-
- * lib/tkextlib/tcllib/plotchart.rb: ditto.
-
- * lib/tkextlib/tcllib/style.rb: ditto.
-
- * lib/tkextlib/tcllib/tkpiechart.rb: ditto.
-
- * lib/tkextlib/tclx/tclx.rb: ditto.
-
- * lib/tkextlib/tkDND/shape.rb: ditto.
-
- * lib/tkextlib/tkDND/tkdnd.rb: ditto.
-
- * lib/tkextlib/tkHTML/htmlwidget.rb: ditto.
-
- * lib/tkextlib/tkimg/bmp.rb: ditto.
-
- * lib/tkextlib/tkimg/gif.rb: ditto.
-
- * lib/tkextlib/tkimg/ico.rb: ditto.
-
- * lib/tkextlib/tkimg/jpeg.rb: ditto.
-
- * lib/tkextlib/tkimg/pcx.rb: ditto.
-
- * lib/tkextlib/tkimg/pixmap.rb: ditto.
-
- * lib/tkextlib/tkimg/png.rb: ditto.
-
- * lib/tkextlib/tkimg/ppm.rb: ditto.
-
- * lib/tkextlib/tkimg/ps.rb: ditto.
-
- * lib/tkextlib/tkimg/sgi.rb: ditto.
-
- * lib/tkextlib/tkimg/sun.rb: ditto.
-
- * lib/tkextlib/tkimg/tga.rb: ditto.
-
- * lib/tkextlib/tkimg/tiff.rb: ditto.
-
- * lib/tkextlib/tkimg/window.rb: ditto.
-
- * lib/tkextlib/tkimg/xbm.rb: ditto.
-
- * lib/tkextlib/tkimg/xpm.rb: ditto.
-
- * lib/tkextlib/tktable/tktable.rb: ditto.
-
- * lib/tkextlib/tktrans/tktrans.rb: ditto.
-
- * lib/tkextlib/treectrl/tktreectrl.rb: ditto.
-
- * lib/tkextlib/winico/winico.rb: ditto.
-
-2005-05-25 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/iwidgets/scrolledlistbox.rb: follow the change
- of tk.rb. modify to attend encoding.
-
- * lib/tkextlib/iwidgets/scrolledtext.rb: ditto.
-
- * lib/tkextlib/iwidgets/scrolledcanvas.rb: bug fix on
- TkCanvas#delete when given non-TkcItem arguments.
-
-2005-05-10 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt/winop.rb: fix typo
-
-2005-05-08 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/vu/pie.rb: fix typo
-
-2005-04-10 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/mailwasher.rb: fixed typo. [ruby-dev:26008]
-
-2005-04-09 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * sample/tkextlib/tile/demo.rb: new demo of Tile extension.
-
- * sample/tkextlib/tile/iconlib.tcl: part of the demo.
-
- * sample/tkextlib/tile/toolbutton.tcl: ditto.
-
- * sample/tkextlib/tile/readme.txt: document of the demo.
-
- * sample/tkextlib/tile/Orig_LICENSE.txt: ditto.
-
- * sample/tkextlib/tile/themes/kroc.tcl: sample theme written with Tcl.
-
- * sample/tkextlib/tile/themes/pkgIndex.tcl: pkgIndex of kroc.tcl.
-
- * sample/tkextlib/tile/themes/kroc.rb: Kroc theme written with Ruby.
-
- * sample/tkextlib/tile/themes/kroc/button-h.gif: images for Kroc theme.
-
- * sample/tkextlib/tile/themes/kroc/button-n.gif: ditto.
-
- * sample/tkextlib/tile/themes/kroc/button-p.gif: ditto.
-
- * sample/tkextlib/tile/themes/kroc/check-hc.gif: ditto.
-
- * sample/tkextlib/tile/themes/kroc/check-hu.gif: ditto.
-
- * sample/tkextlib/tile/themes/kroc/check-nc.gif: ditto.
-
- * sample/tkextlib/tile/themes/kroc/check-nu.gif: ditto.
-
- * sample/tkextlib/tile/themes/kroc/radio-hc.gif: ditto.
-
- * sample/tkextlib/tile/themes/kroc/radio-hu.gif: ditto.
-
- * sample/tkextlib/tile/themes/kroc/radio-nc.gif: ditto.
-
- * sample/tkextlib/tile/themes/kroc/radio-nu.gif: ditto.
-
- * lib/tkextlib/tile.rb: bug fix (tested on the new demo).
-
- * lib/tkextlib/tile/style.rb: ditto.
-
- * lib/tkextlib/tile/tbutton.rb: ditto.
-
- * lib/tkextlib/tile/tcheckbutton.rb: ditto.
-
- * lib/tkextlib/tile/tcombobox.rb: ditto.
-
- * lib/tkextlib/tile/tentry.rb: ditto.
-
- * lib/tkextlib/tile/tframe.rb: ditto.
-
- * lib/tkextlib/tile/tlabel.rb: ditto.
-
- * lib/tkextlib/tile/tlabelframe.rb: ditto.
-
- * lib/tkextlib/tile/tmenubutton.rb: ditto.
-
- * lib/tkextlib/tile/tnotebook.rb: ditto.
-
- * lib/tkextlib/tile/tprogressbar.rb: ditto.
-
- * lib/tkextlib/tile/tradiobutton.rb: ditto.
-
- * lib/tkextlib/tile/treeview.rb: ditto.
-
- * lib/tkextlib/tile/tscrollbar.rb: ditto.
-
- * lib/tkextlib/tile/tseparator.rb: ditto.
-
- * lib/tkextlib/tile/tsquare.rb: ditto.
-
- * lib/tkextlib/tile/tpaned.rb: new library
-
- * lib/tkextlib/tile/tscale.rb: ditto.
-
- * lib/tkextlib/SUPPORT_STATUS: update support status of Tile extension.
-
- * lib/tkextlib/tcllib/ctext.rb: use TkCommandNames on create_self().
-
- * lib/tkextlib/tcllib/datefield.rb: ditto.
-
- * lib/tkextlib/tcllib/ip_entry.rb: ditto.
-
- * lib/tkextlib/tkHTML/htmlwidget.rb: ditto.
-
- * lib/tkextlib/treectrl/tktreectrl.rb: ditto.
-
-2005-04-09 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/explorer.rb: File.executable? returns true
- even if it's plain text file. (this function only checks access right)
-
-2005-04-09 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/{help,www-options}.rb: fixed typo.
- (click or resize column header)
-
-2005-04-09 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/imovie.rb: fixed typo. (click on clip title)
-
-2005-04-08 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/random.rb: fixed typo. (drop node outside of
- widget, or reenter widget while dragging)
-
-2005-04-08 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/outlook-newgrounp.rb: image had disappered when
- node was selected.
-
-2005-04-08 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/{random,outlook-newgroup}.rb:
- tk::treectrl uses 'afterId' not 'afterID'.
-
- * sample/tkextlib/treectrl/{random,outlook-newgroup}.rb:
- item_firstchild can return empty string. (drop node to leaf node)
-
- * sample/tkextlib/treectrl/random.rb: Enumerable#find didn't work properly
- because tried to compare String with Integer. (drag node and leave widget)
-
- * sample/tkextlib/treectrl/random.rb: and some fixes.
-
-2005-04-08 ocean <ocean@ruby-lang.org>
-
- * lib/tkextlib/treectrl/tktreectrl.rb (selection_clear): fixed typo.
-
- * sample/tkextlib/treectrl/random.rb: node deselection now works.
-
- * sample/tkextlib/treectrl/demo.rb: fixed typo. (popup menu on column header)
-
-2005-04-08 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/help.rb: fixed typo. (wrong color)
-
-2005-04-08 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/random.rb: fixed typo. (wrong itemheight)
-
- * sample/tkextlib/treectrl/outlook-newgroup.rb: ditto.
-
- * sample/tkextlib/treectrl/explorer.rb: ditto.
-
- * sample/tkextlib/treectrl/help.rb: ditto.
-
-2005-04-07 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/*.rb: some speed up... cache the result of
- version checking.
-
-2005-04-07 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/treectrl/tktreectrl.rb: performance tuning by calling
- tk_send_without_enc. [ruby-dev:25997]
-
-2005-04-04 ocean <ocean@ruby-lang.org>
-
- * lib/tkextlib/tktable/tktable.rb: added Tk::TkTable#selection_present.
-
-2005-04-02 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/treectrl/tktreectrl.rb: support TreeCtrl's cvs head.
-
-2005-04-02 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt/component.rb: add TreeCtrl#legend_window_create().
-
- * sample/tkextlib/blt/graph6.rb: use legend_window_create().
-
- * lib/tkextlib/blt/tree.rb: forget to call tagid().
-
- * lib/tkextlib/blt/treeview.rb: ditto.
-
-2005-04-01 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * sample/tkextlib/treectrl/demo.rb: bridge the gap of
- Hash#index or Hash#key between ruby 1.8 and 1.9
-
-2005-04-01 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt/component.rb: bug fix on treatment of
- component objects.
-
- * sample/tkextlib/blt/graph6.rb: a new sample script.
-
-2005-03-31 ocean <ocean@ruby-lang.org>
-
- * sample/tkextlib/treectrl/demo.rb: should use Hash#index.
-
- * sample/tkextlib/treectrl/demo.rb: TkImage was not
- cached properly.
-
- * sample/tkextlib/treectrl/random.rb: fixed typo.
-
-2005-03-31 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * sample/tkextlib/iwidgets/sample/hierarchy.rb: show basename
- only [ruby-dev:25970]
-
- * sample/tkextlib/treectrl/demo.rb: add check for existence of
- 'backgroundimage' option.
-
- * sample/tkextlib/treectrl/bitmaps.rb: ditto.
-
- * sample/tkextlib/treectrl/outlook-newgroup.rb: lack of '%I'
- event callback argument.
-
-2005-03-31 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * sample/tkextlib/iwidgets/sample/hierarchy.rb: fail to treat
- Japanese (i18n?) filenames.
-
-2005-03-30 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * sample/tkextlib/bwidget/tree.rb: use 'return' in the Proc object.
-
- * sample/tkextlib/tkHTML/hv.rb: ditto.
-
- * sample/tkextlib/tkHTML/ss.rb: ditto.
-
- * sample/tkextlib/tktable/basic.rb: ditto.
-
- * sample/tkextlib/tktable/command.rb: ditto.
-
- * sample/tkextlib/tktable/debug.rb: ditto.
-
- * sample/tkextlib/tktable/maxsize.rb: ditto.
-
- * sample/tkextlib/treectrl/demo.rb: ditto.
-
-2005-03-29 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt/component.rb: cannot create elements except
- default type of element.
-
- * lib/tkextlib/blt/barchart.rb: ditto.
-
- * lib/tkextlib/blt/graph.rb: ditto.
-
- * lib/tkextlib/blt/stripchart.rb: ditto.
-
- * lib/tkextlib/blt/component.rb: axis command option gets
- proper object type of arguments.
-
- * sample/tkextlib/blt/calendar.rb: new sample.
-
- * sample/tkextlib/blt/pareto.rb: ditto.
-
-2005-03-28 ocean <ocean@ruby-lang.org>
-
- * lib/tkextlib/iwidgets/notebook.rb: fixed typo.
-
-2005-03-26 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt.rb: add commands for zooming.
-
- * lib/tkextlib/blt/bitmap.rb (new_with_name): add for using
- given name.
-
- * lib/tkextlib/blt/busy.rb: bug fix on Tk::BLT::Busy::Shild class.
-
- * lib/tkextlib/blt/component.rb: typo fix.
-
- * lib/tkextlib/blt/component.rb: fix lack of *_create methods
-
- * lib/tkextlib/blt/component.rb: proper call on xaxis_* and so on.
-
- * lib/tkextlib/blt/htext.rb: add TkVariable object to access
- special Tcl variables.
-
- * lib/tkextlib/treectrl/tktreectrl.rb: typo fix.
-
- * lib/tkextlib/treectrl/tktreectrl.rb: proper treatment
- of 'font' option of element_configure.
-
- * lib/tkextlib/treectrl/tktreectrl.rb: bug fix on item_sort.
-
- * lib/tkextlib/treectrl/tktreectrl.rb: add methods to
- call TreeCtrl commands for bindings.
-
- * sample/tkextlib/blt/*: add some sample scripts.
-
- * sample/tkextlib/treectrl/*: add some sample scripts.
-
-2005-03-18 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/treectrl/tktreectrl.rb: bug fix and define some
- classes for components of Tk::TreeCtrl
-
-2005-03-17 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/treectrl/tktreectrl.rb: call wrong method in
- Tk::TreeCtrl#*_configinfo and current_*_configinfo method
-
-2005-03-16 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/SUPPORT_STATUS: change the status of TkImg
-
- * lib/tkextlib/treectrl/tktreectrl.rb: bug fix and support
- TkTreeCtrl-1.1
-
- * lib/tkextlib/SUPPORT_STATUS: change the supported version of
- TkTreeCtrl
-
-2005-03-15 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * sample/tkextlib/tkimg: add sample
-
-2005-03-06 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/SUPPORT_STATUS: add version info of each extension
-
-2005-03-05 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tile.rb: lack of "autoload TProgressbar"
-
-2005-03-05 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tile.rb: support tile-0.6
-
- * lib/tkextlib/tile/tbutton.rb: ditto
-
- * lib/tkextlib/tile/tcheckbutton.rb: ditto
-
- * lib/tkextlib/tile/tlabel.rb: ditto
-
- * lib/tkextlib/tile/tmenubutton.rb: ditto
-
- * lib/tkextlib/tile/tnotebook.rb: ditto
-
- * lib/tkextlib/tile/tradiobutton.rb: ditto
-
- * lib/tkextlib/tile/tcombobox.rb: [new] ditto
-
- * lib/tkextlib/tile/tentry.rb: [new] ditto
-
- * lib/tkextlib/tile/tframe.rb: [new] ditto
-
- * lib/tkextlib/tile/tlabelframe.rb: [new] ditto
-
- * lib/tkextlib/tile/tprogressbar.rb: [new] ditto
-
- * lib/tkextlib/tile/treeview.rb: [new] ditto
-
- * lib/tkextlib/tile/tscrollbar.rb: [new] ditto
-
- * lib/tkextlib/tile/tseparator.rb: [new] ditto
-
- * lib/tkextlib/tile/tsquare.rb: [new] ditto
-
-2005-02-20 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tclx/tclx.rb: warning TclX's 'signal' command.
-
-2005-01-25 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt/component.rb: bug fix. cannot accept
- a callback ID string for a command argument. [ruby-dev:25479]
-
- * lib/tkextlib/blt/tabset.rb: ditto
-
- * lib/tkextlib/blt/treeview.rb: ditto
-
- * lib/tkextlib/bwidget/labelentry.rb: ditto
-
- * lib/tkextlib/bwidget/listbox.rb: ditto
-
- * lib/tkextlib/bwidget/notebook.rb: ditto
-
- * lib/tkextlib/bwidget/spinbox.rb: ditto
-
- * lib/tkextlib/bwidget/tree.rb: ditto
-
- * lib/tkextlib/itk/incr_tk.rb: ditto
-
- * lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto
-
- * lib/tkextlib/tkDND/tkdnd.rb: ditto
-
- * lib/tkextlib/treectrl/tktreectrl.rb: ditto
-
- * sample/tkextlib/tkHTML/ss.rb: local variable scope bug fix
- [ruby-dev:25479]
-
- * sample/tkextlib/vu/vu_demo.rb: rename from vu.rb; avoid the bug on
- Windows version of Tcl/Tk. The trouble based on the bug occurs when
- the script name (without extension) is a same name as a Tcl/Tk's
- library file name (without extension) required in the script.
-
-2004-12-24 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/blt: add BLT extension support
-
-2004-12-16 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/bwidget/labelentry.rb: use TkCore.callback_obj?()
-
- * lib/tkextlib/bwidget/listbox.rb: ditto
-
- * lib/tkextlib/bwidget/notebook.rb: ditto
-
- * lib/tkextlib/bwidget/spinbox.rb: ditto
-
- * lib/tkextlib/itk/incr_tk.rb: ditto
-
- * lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto
-
- * lib/tkextlib/tkDND/tkdnd.rb: ditto
-
- * lib/tkextlib/treectrl/tktreectrl.rb: ditto
-
- * lib/tkextlib/winico/winico.rb: ditto
-
-2004-12-10 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tile/style.rb: 'theme_use' method bug fix
-
-2004-12-08 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/bwidget/notebook.rb: raise method cannot return
- the raised page.
-
- * lib/tkextlib/bwidget/labelentry.rb: bind methods accept
- subst_args + block
-
- * lib/tkextlib/bwidget/listbox.rb: ditto
-
- * lib/tkextlib/bwidget/notebook.rb: ditto
-
- * lib/tkextlib/bwidget/spinbox.rb: ditto
-
- * lib/tkextlib/bwidget/tree.rb: ditto
-
- * lib/tkextlib/itk/incr_tk.rb: ditto
-
- * lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto
-
- * lib/tkextlib/tkDND/tkdnd.rb: ditto
-
- * lib/tkextlib/treectrl/tktreectrl.rb: ditto
-
-2004-11-26 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/bwidget/notebook.rb: uses epath
-
- * lib/tkextlib/bwidget/widget.rb: ditto
-
- * lib/tkextlib/tktable/tktable.rb: ditto
-
- * lib/tkextlib/tcllib/cursor.rb: ditto, and bug fix
-
-2004-11-10 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tile/style.rb: bug fix
-
-2004-11-07 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/iwidgets/scrolledcanvas.rb: bind-event methods
- accept multi substitution arguments.
-
- * lib/tkextlib/tktable/tktable.rb: ditto.
-
- * lib/tkextlib/treectrl/tktreectrl.rb: ditto
-
-2004-11-03 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/SUPPORT_STATUS: BLT moves to 'plan to support'
- from 'not determined'
-
- * lib/tkextlib/itk/incr_tk.rb: __cget_cmd and __config_cmd are
- private methods
-
- * lib/tkextlib/tcllib/autoscroll.rb: extend TkCore
-
- * lib/tkextlib/tcllib/cursor.rb: ditto.
-
- * lib/tkextlib/tcllib/plotchart.rb: ditto.
-
- * lib/tkextlib/tcllib/style.rb: ditto.
-
- * lib/tkextlib/tile/style.rb: ditto.
-
- * lib/tkextlib/tkDND/shape.rb: ditto.
-
-2004-10-24 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/bwidget/tree.rb: bug fix on Windows
-
-2004-10-16 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/tcllib/ico.rb: new library (Tk::Tcllib:ICO)
-
- * lib/tkextlib/tcllib.rb: add Tk::Tcllib::ICO (based on tcllib 1.7)
-
-2004-10-06 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/bwidget.rb (BWidget.grab): bug fix
-
- * lib/tkextlib/tcllib.rb: typo fix
-
-2004-07-28 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/add winico support
-
-2004-07-23 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * lib/tkextlib/add TclX support (partially; infox command and
- XPG/3 MsgCat only)
-
-2004-07-15 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * bug fix
-
- * support TkTable extension
-
-2004-07-12 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * bug fix
-
- * support Iwidgets extension
-
-2004-07-10 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * bug fix
-
- * add more part of [incr Widget] support (about 65%? are complete)
-
- * use Tk::ValidateConfigure.__def_validcmd() method
- (new function to define validatecommand methods easier)
-
- * tcllib.rb : avoid the loading trouble that almost all part of
- the extension is not available when some libraries are invalid.
-
-2004-07-09 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * add some part of [incr Widget] support (about 50%? are complete)
-
-2004-07-07 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * add [incr Tck], [incr Tk] support
-
-2004-07-06 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * support BWidget extension
-
- * add BWidget extension demo
-
- * add ICONS extension demo
-
- * many bug fix
-
-2004-07-01 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
- * 1st release of tkextlib ( to support Tcl/Tk extensions )
diff --git a/ext/tk/MANUAL_tcltklib.eng b/ext/tk/MANUAL_tcltklib.eng
deleted file mode 100644
index 7d4804ef8a..0000000000
--- a/ext/tk/MANUAL_tcltklib.eng
+++ /dev/null
@@ -1,467 +0,0 @@
-(tof)
- 2005/07/05 Hidetoshi NAGAI
-
-This document describes about the 'tcltklib' library. Although there
-is the 'tcltk' library (tcltk.rb) under this directory, no description
-in this document (because it is not maintained recently).
-
-==============================================================
-module TclTklib
- : Defines methods to do operations which are independed on
- : Tcl/Tk interpreters
-
- module TclTkLib::EventFlag
- : Defines flags to define target events on 'do_one_event' methods.
- : When to give, please use bit-operator (e.g. WINDOW | DONT_WAIT).
-
- [constants]
- NONE
- : Is 0. It means "there is no target". But on the real
- : operation, it is same to ALL.
-
- WINDOW
- : 'window' event is processed.
-
- FILE
- : 'file' event is processed.
-
- TIMER
- : 'timer' event is processed.
-
- IDLE
- : 'idle' operation (e.g. 're-draw'; the operations when the
- : other kinds of events doesn't occur) is processed.
-
- ALL
- : All kinds of events are processed.
- : Same to 'WINDOW | FILE | TIMER | IDLE'.
-
- DONT_WAIT
- : Without this flag, 'do_one_event' waits the occurrence of
- : a target event. With this flag, doesn't wait and returns
- : false if there is no target event for processing.
-
- module TclTkLib::VarAccessFlag
- : Defines flags to give '_get_variable' and so on. When to give,
- : please use bit-operator (e.g. GLOBAL_ONLY | LEAVE_ERR_MSG ).
-
- [constants]
- NONE
- : Is 0. It means "set no flag".
-
- GLOBAL_ONLY
- : (site Tcl/Tk's man page)
- : Under normal circumstances the procedures look up
- : variables as follows: If a procedure call is active
- : in interp, a variable is looked up at the current
- : level of procedure call. Otherwise, a variable is
- : looked up first in the current namespace, then in
- : the global namespace. However, if this bit is set
- : in flags then the variable is looked up only in the
- : global namespace even if there is a procedure call
- : active. If both GLOBAL_ONLY and NAMESPACE_ONLY are
- : given, GLOBAL_ONLY is ignored.
- :
- : *** ATTENTION ***
- : Tcl7.6 doesn't have namespaces. So NAMESPACE_ONLY
- : is defined as 0, and then GLOBAL_ONLY is available
- : even if flag is (GLOBAL_ONLY | NAMESPACE_ONLY).
-
- NAMESPACE_ONLY
- : (site Tcl/Tk's man page)
- : Under normal circumstances the procedures look up
- : variables as follows: If a procedure call is active
- : in interp, a variable is looked up at the current
- : level of procedure call. Otherwise, a variable is
- : looked up first in the current namespace, then in
- : the global namespace. However, if this bit is set
- : in flags then the variable is looked up only in the
- : current namespace even if there is a procedure call
- : active.
- :
- : *** ATTENTION ***
- : Tcl7.6 doesn't have namespaces. So NAMESPACE_ONLY
- : is defined as 0.
-
- LEAVE_ERR_MSG
- : (site Tcl/Tk's man page)
- : If an error is returned and this bit is set in flags,
- : then an error message will be left in the interpreter's
- : result, where it can be retrieved with Tcl_GetObjResult
- : or Tcl_GetStringResult. If this flag bit isn't set then
- : no error message is left and the interpreter's result
- : will not be modified.
-
- APPEND_VALUE
- : (site Tcl/Tk's man page)
- : If this bit is set then newValue is appended to the
- : current value, instead of replacing it. If the variable
- : is currently undefined, then this bit is ignored.
-
- LIST_ELEMENT
- : (site Tcl/Tk's man page)
- : If this bit is set, then newValue is converted to a
- : valid Tcl list element before setting (or appending
- : to) the variable. A separator space is appended before
- : the new list element unless the list element is going
- : to be the first element in a list or sublist (i.e. the
- : variable's current value is empty, or contains the
- : single character ``{'', or ends in `` }'').
-
- PARSE_VARNAME
- : (site Tcl/Tk's man page)
- : If this bit is set when calling _set_variable and so
- : on, var_name argument may contain both an array and an
- : element name: if the name contains an open parenthesis
- : and ends with a close parenthesis, then the value
- : between the parentheses is treated as an element name
- : (which can have any string value) and the characters
- : before the first open parenthesis are treated as the
- : name of an array variable. If the flag PARSE_VARNAME
- : is given, index_name argument should be 'nil' since the
- : array and element names are taken from var_name.
- :
- : *** ATTENTION ***
- : Tcl7.6 doesn't have this flag. So PARSE_VARNAME is
- : defined as 0.
-
- module TclTkLib::RELEASE_TYPE
- : Defines release type number of Tcl/Tk
-
- ALPHA
- : ALPHA release
-
- BETA
- : BETA release
-
- FINAL
- : FINAL release
-
- [module methods]
- get_version()
- : return an array of major, minor, release-type number,
- : and patchlevel of current Tcl/Tk library.
-
- mainloop(check_root = true)
- : Starts the eventloop. If 'check_root' is true, this method
- : doesn't return when a root widget exists.
- : If 'check_root' is false, doesn't return by the other
- : reasons than exceptions.
-
- mainloop_thread?
- : Returns whether the current thread executes the eventloop.
- : If true, the eventloop is working on the current thread.
- : If no eventloop is working, this method returns nil.
- : And if the other thread executes the eventloop, returns false.
- :
- : *** ATTENTION ***
- : When this methods returns false, it is dangerous to call a Tk
- : interpreter directly.
-
- mainloop_watchdog(check_root = true)
- : On the normal eventloop, some kinds of callback operations
- : cause deadlock. To avoid some of such deadlocks, this
- : method starts an eventloop and a watchdog-thread.
-
- do_one_event(flag = TclTkLib::EventFlag::ALL |
- TclTkLib::EventFlag::DONT_WAIT)
- : Do one event for processing. When processed an event,
- : returns true.
- : If NOT set DONT_WAIT flag, this method waits occurrence of
- : a target event.
- : If set DONT_WAIT flag and no event for processing, returns
- : false immediately.
- : If $SAFE >= 1 and the flag is tainted,
- : force to set DONT_WAIT flag.
-
- set_eventloop_tick(timer_tick)
- : Define the interval of thread-switching with an integer
- : value of mili-seconds.
- : Default timer_tick is 0. It means that thread-switching
- : is based on the count of processed events.
- : ( see 'set_eventloop_weight' method )
- : However, if the eventloop thread is the only thread,
- : timer_tick cannot be set to 0. If 0, then is set to 100 ms
- : automatically (see NO_THREAD_INTERRUPT_TIME on tcltklib.c).
-
- get_eventloop_tick
- : Get current value of 'timer_tick'
-
- set_no_event_wait(no_event_wait)
- : Define sleeping time of the eventloop when two or more
- : thread are running and there is no event for processing.
- : Default value is 20 (ms).
- : If the eventloop thread is the only thread, this value is
- : invalid.
-
- get_no_event_wait
- : Get current value of 'no_event_wait'.
-
- set_eventloop_weight(loop_max, no_event_tick)
- : Define the weight parameters for the eventloop thread.
- : That is invalid when the eventloop is the only thread.
- : 'loop_max' is the max events for thread-switching.
- : 'no_event_tick' is the increment value of the event count
- : when no event for processing (And then, the eventloop thread
- : sleeps 'no_event_wait' mili-seconds).
- : 'loop_max == 800' and 'no_event_tick == 10' are default.
-
- get_eventloop_weight
- : Get current values of 'loop_max' and 'no_event_tick'.
-
- mainloop_abort_on_exception=(bool)
- : Define whether the eventloop stops on exception or not.
- : If true (default value), stops on exception.
- : If false, show a warning message but ignore the exception.
- : If nil, no warning message and ignore the exception.
- : This parameter is sometimes useful when multiple Tk
- : interpreters are working. Because the only one eventloop
- : admins all Tk interpreters, sometimes exception on a
- : interpreter kills the eventloop thread. Even if such
- : situation, when abort_on_exception == false or nil,
- : the eventloop ignores the exception and continue to working.
-
- mainloop_abort_on_exception
- : Get current status of that.
-
- num_of_mainwindows
- : Returns the number of main-windows (root-widget).
- : Because there is only one main-window for one Tk interpreter,
- : the value is same to the number of interpreters which has
- : available Tk functions.
-
- _merge_tklist(str, str, ... )
- : Get a Tcl's list string from arguments with a Tcl/Tk's
- : library function. Each argument is converted to a valid
- : Tcl list element.
-
- _conv_listelement(str)
- : Convert the argument to a valid Tcl list element with
- : Tcl/Tk's library function.
-
- _toUTF8(str, encoding=nil)
- _fromUTF8(str, encoding=nil)
- : Call the function (which is internal function of Tcl/Tk) to
- : convert to/from a UTF8 string.
-
- _subst_UTF_backslash(str)
- _subst_Tcl_backslash(str)
- : Substitute backslash sequence with Tcl's rule (include \uhhhh;
- : give a sixteen-bit hexadecimal value for Unicode character).
- : _subst_Tcl_backslash method parses all backslash sequence.
- : _subst_UTF_backslash method parses \uhhhh only.
-
- encoding_system
- encoding_system=(encoding)
- : Get and set Tcl's system encoding.
-
- encoding
- encoding=(encoding)
- : alias of encoding_system / encoding_system=
- : ( probably, Ruby/Tk's tk.rb will override them )
-
-
-class TclTkIp
- [class methods]
- new(ip_name=nil, options='')
- : Generate an instance of TclTkIp class.
- : If 'ip_name' argument is given as a string, it is the name
- : of the Tk interpreter which is shown by 'winfo interps'
- : command.
- : 'options' argument accepts a string which is the command
- : line options of wish; such as '-geometry' or '-use'.
- : The information is used to generate the root widget of the
- : interpreter.
- : ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') )
- : If is given nil or false for the 'option' argument, generates
- : the Tcl interpreter without Tk library. Then the interpreter
- : doesn't need GUI environment. Therefore, even if a window
- : system doesn't exist or cannot be used, Ruby can control the
- : Tcl interpreter and the extension libraries loaded on the
- : interpreter.
-
- [instance methods]
- create_slave(name, safe=false)
- : Create a slave interpreter.
- : The parent of the interpreter is the receiver of this method.
- : The name of the slave interpreter is given by 'name' argument.
- : The 'safe' argument decides whether the slave interpreter is
- : created as a safe interpreter or not. If true, create a safe
- : interpreter. Default is false. However, if the parent
- : interpreter is a safe interpreter, the created interpreter is
- : a safe interpreter (ignore 'safe' argument value).
-
- make_safe
- : Make the interpreter to the safe interpreter, and returns
- : self. If fail, raise RuntimeError.
-
- safe?
- : Check whether the interpreter is the safe interpreter.
- : If is the safe interpreter, returns true.
-
- allow_ruby_exit?
- : Return the mode whether 'exit' function of ruby or 'exit'
- : command of Tcl/Tk can quit the ruby process or not on the
- : interpreter. If false, such a command quit the interpreter
- : only.
- : The default value for a master interpreter is true, and
- : for a slave interpreter is false.
-
- allow_ruby_exit=(mode)
- : Change the mode of 'allow_ruby_exit?'.
- : If the interpreter is a "safe" interpreter,
- : this is not permitted (raise an exception).
-
- delete
- : Delete the interpreter.
- : The deleted interpreter doesn't accept command and then
- : raise an exception.
-
- deleted?
- : Check whether the interpreter is already deleted.
- : If deleted, returns true.
-
- has_mainwindow?
- : Check whether the interpreter has a MainWindow (root widget).
- : If has, returns true. If doesn't, returns false.
- : If IP is already deleted, returns nil.
-
- restart
- : Restart Tk part of the interpreter.
- : Use this when you need Tk functions after destroying the
- : root widget.
-
- _eval(str)
- _invoke(*args)
- : Estimates the arguments as a command on the Tk interpreter.
- : The argument of _eval is a script of Tcl/Tk.
- : Each argument of _invoke is a token of one command line of
- : Tcl/Tk.
- : Because the operation of _invoke doesn't through the
- : command line parser of Tk interpreter, the cost of
- : estimation is smaller than _eval. However, auto_load
- : mechanism of the Tk interpreter doesn't work on _invoke.
- : So _invoke can call only the command which already
- : registered on the interpreter by 'load' command and so on.
- : On _eval command, auto_load mechanism words. So if succeed
- : to _eval and register the command once, after that, the
- : command can be called by _invoke.
-
- _cancel_eval(str)
- _cancel_eval_unwind(str)
- : (Tcl/Tk8.6 or later)
- : Call Tcl_CancelEval() function, and cancel evaluation.
-
- _toUTF8(str, encoding=nil)
- _fromUTF8(str, encoding=nil)
- : Call the function (which is internal function of Tcl/Tk) to
- : convert to/from a UTF8 string.
-
- _thread_vwait(var_name)
- _thread_tkwait(mode, target)
- : 'vwait' or 'tkwait' with thread support.
- : The difference from normal 'vwait' or 'tkwait' command is
- : doing independent wait from the vwait stack when they are
- : called on the other thread than the eventloop thread.
- : In the case of Tcl/Tk's vwait / tkwait, if 2nd vwait /
- : tkwait is called on waiting for 1st vwait / tkwait,
- : returns the order of [2nd]->[1st] regardless of the order
- : of when the wait condition was fulfilled.
- : If _thread_vwait / _thread_tkwait is called on the
- : eventloop thread, there is no difference from vwait /
- : tkwait. But if called on the other thread than the
- : eventloop, stops the thread. And when the wait condition
- : is fulfilled, the thread restarts. The meaning of
- : "independent from the vwait stack" is that the timing of
- : restarting is independent from the waiting status of the
- : other threads. That is, even if the eventloop thread is
- : waiting by vwait and is not fulfilled the condition,
- : _thread_vwait completes the waiting when its waiting
- : condition is fulfilled and the thread which stopped by
- : _thread_vwait can continue the operation.
-
- _return_value
- : Get the last result value on the interpreter.
-
- _get_variable(var_name, flag)
- _get_variable2(var_name, index_name, flag)
- : Get the current value of a variable. If specified a
- : index_name (see also the PARSE_VARNAME flag), get the
- : value of the index_name element.
-
- _set_variable(var_name, value, flag)
- _set_variable2(var_name, index_name, value, flag)
- : Create or modify a variable. If specified a index_name
- : (see also the PARSE_VARNAME flag), create or modify the
- : index_name element.
-
- _unset_variable(var_name)
- _unset_variable2(var_name, index_name)
- : Remove a variable. If specified a index_name (see also
- : the PARSE_VARNAME flag), remove the index_name element.
-
- _get_global_var(var_name)
- _get_global_var2(var_name, index_name)
- _set_global_var(var_name, value)
- _set_global_var2(var_name, index_name, value)
- _unset_global_var(var_name)
- _unset_global_var2(var_name, index_name)
- : Call the associated method with the flag argument
- : (GLOBAL_ONLY | LEAVE_ERR_MSG).
-
- _split_tklist(str)
- : Split the argument with Tcl/Tk's library function and
- : get an array as a list of Tcl list elements.
-
- _merge_tklist(str, str, ... )
- : Get a Tcl's list string from arguments with a Tcl/Tk's
- : library function. Each argument is converted to a valid
- : Tcl list element.
-
- _conv_listelement(str)
- : Convert the argument to a valid Tcl list element with
- : Tcl/Tk's library function.
-
- mainloop
- mainloop_watchdog
- : If on the slave interpreter, never start an eventloop and
- : returns nil.
- : With the exception that, same to the TclTkLib module method
- : with the same name.
-
- do_one_event
- : With the exception that the argument is forced to set
- : DONT_WAIT flag on the slave interpreter, same to
- : TclTkLib#do_one_event.
-
- set_eventloop_tick
- get_eventloop_tick
- set_no_event_wait
- get_no_event_wait
- set_eventloop_weight
- get_eventloop_weight
- mainloop_abort_on_exception
- mainloop_abort_on_exception=
- : With the exception that it is ignored to set value on the
- : slave interpreter, same to the TclTkLib module method with
- : the same name.
-
- encoding_table
- : For Ruby m17n. Return encoding relation table between Ruby's
- : Encoding object and Tcl's encoding name.
-
-class TkCallbackBreak < StandardError
-class TkCallbackContinue < StandardError
- : They are exception classes to break or continue the Tk callback
- : operation.
- : If raise TkCallbackBreak on the callback procedure, Ruby returns
- : 'break' code to Tk interpreter (Then the Tk interpreter will
- : break the operation for the current event).
- : If raise TkCallbackContinue, returns 'continue' code (Then the Tk
- : interpreter will break the operation for the current bindtag and
- : starts the operation for the next bindtag for the current event).
- : However, current tcltklib supports Ruby's 'break' and 'next' to
- : get the same effect. That is, those classes are obsolete. Those
- : exist for backward compatibility.
-
-(eof)
diff --git a/ext/tk/MANUAL_tcltklib.ja b/ext/tk/MANUAL_tcltklib.ja
deleted file mode 100644
index 8641909517..0000000000
--- a/ext/tk/MANUAL_tcltklib.ja
+++ /dev/null
@@ -1,578 +0,0 @@
-(tof)
- 2005/07/05 Hidetoshi NAGAI
-
-本ドキュメントã«ã¯å¤ã„ tcltk ライブラリ,tcltklib ライブラリã®èª¬æ˜Ž
-ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒï¼Œãã®è¨˜è¿°å†…容ã¯å¤ã„ã‚‚ã®ã¨ãªã£ã¦ã„ã¾ã™ï¼Ž
-
-tcltk ライブラリ(tcltk.rb)ã¯ç¾åœ¨ã§ã¯ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ãŒäº‹å®Ÿä¸Šè¡Œã‚ã‚Œã¦
-ã„ãªã„ãŸã‚,å¤ã„ドキュメントã®èª¬æ˜ŽãŒãã®ã¾ã¾æœ‰åŠ¹ã§ã™ï¼Žãã‚Œã«å¯¾ã—,
-tcltklib ライブラリã«ã¤ã„ã¦ã¯ï¼Œç¾åœ¨ã® Ruby/Tk(tk.rb 以下ã®ãƒ©ã‚¤ãƒ–ラ
-リ群)を稼åƒã•ã›ã‚‹ãŸã‚ã®ä¸­å¿ƒã¨ã—ã¦ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã•ã‚Œã¦ã„ã‚‹ãŸã‚,少々
-é•ã„ãŒç”Ÿã˜ã¦ã„ã¾ã™ï¼Ž
-
-ãã“ã§ï¼Œã¾ãšå¤ã„説明文書を示ã—ãŸå¾Œï¼Œç¾åœ¨ã® tcltklib ライブラリã«ã¤
-ã„ã¦ã®èª¬æ˜Žã‚’加ãˆã¾ã™ï¼Ž
-
-以下ãŒãƒ©ã‚¤ãƒ–ラリã®å¤ã„説明文書ã§ã™ï¼Ž
-==============================================================
- MANUAL.euc
- Sep. 19, 1997 Y. Shigehiro
-
-以下, 「tcl/tkã€ã¨ã„ã†è¡¨è¨˜ã¯, tclsh ã‚„ wish を実ç¾ã—ã¦ã„ã‚‹, 一般ã§ã„ã†
-ã¨ã“ã‚ã® tcl/tk を指ã—ã¾ã™. 「tcltk ライブラリã€, 「tcltklib ライブラ
-リã€ã¨ã„ã†è¡¨è¨˜ã¯, 本パッケージã«å«ã¾ã‚Œã‚‹ ruby 用ã®ãƒ©ã‚¤ãƒ–ラリを指ã—ã¾ã™.
-
-<< tcltk ライブラリ >>
-
-tcl/tk ã® C ライブラリを利用ã™ã‚‹ãŸã‚ã®é«˜(中?)水準インターフェースをæ
-ä¾›ã—ã¾ã™.
-
-ã“ã®ãƒ©ã‚¤ãƒ–ラリ㯠ruby ã‹ã‚‰ tcl/tk ライブラリを利用ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§, 内
-部㧠tcltklib ライブラリを利用ã—ã¦ã„ã¾ã™.
-
-[説明]
-
-tcl/tk インタプリタã§ã¯, ウィジェットã«ä½•ã‹æŒ‡ç¤ºã‚’é€ã‚‹ã«ã¯, ウィジェッ
-トåã«ç¶šã„ã¦ãƒ‘ラメータを書ãã¾ã™. ã—ãŸãŒã£ã¦, ウィジェットãŒã‚ªãƒ–ジェク
-トã§ã‚ã‚Š, ãã‚Œã«å¯¾ã—ã¦ãƒ¡ã‚½ãƒƒãƒ‰ã‚’é€ã£ã¦ã„ã‚‹, ã¨ã¿ãªã™ã“ã¨ãŒã§ãã¾ã™. ã•
-ã¦, tcl/tk インタプリタã§ã¯, 組ã¿è¾¼ã¿ã‚³ãƒžãƒ³ãƒ‰ã‚‚, å‰è¿°ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã¨
-åŒã˜ã‚ˆã†ãªæ›¸å¼ã®å‘½ä»¤ã§å®Ÿè¡Œã•ã‚Œã¾ã™. ã™ãªã‚ã¡, コマンドもオブジェクトã§
-ã‚ã‚‹ã¨è€ƒãˆã‚‹ã“ã¨ãŒã§ãã¾ã™.
-
-ã“ã®ã‚ˆã†ãªè€ƒãˆã«åŸºã¥ã, tcltk ライブラリã§ã¯, tcl/tk ã®ã‚³ãƒžãƒ³ãƒ‰ã‚„ウィ
-ジェットã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトを生æˆã—ã¾ã™. オブジェクトã«å¯¾ã™ã‚‹ãƒ¡ã‚½ãƒƒ
-ド呼ã³å‡ºã—ã¯, e() メソッドã«ã‚ˆã‚Šå®Ÿè¡Œã•ã‚Œã¾ã™. 例ãˆã°, tcl/tk ã® info
-コマンドã«å¯¾å¿œã™ã‚‹ ruby ã®ã‚ªãƒ–ジェクト㌠info ã¨ã„ã†åå‰ã§ã‚ã‚‹ã¨ã™ã‚‹ã¨,
-tcl/tk ã®
- info commands
-ã¨ã„ã†å‘½ä»¤ã¯ tcltk ライブラリã§ã¯
- info.e("commands")
-ã¨è¨˜è¿°ã•ã‚Œã¾ã™. ã¾ãŸ, 「.ã€ã¨ã„ã†ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆ (wish 実行時ã«è‡ªå‹•çš„ã«ç”Ÿ
-æˆã•ã‚Œã‚‹ãƒ«ãƒ¼ãƒˆã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆ) ã«å¯¾å¿œã™ã‚‹ ruby ã®ã‚ªãƒ–ジェクト㌠root ã¨ã„
-ã†åå‰ã§ã‚ã‚‹ã¨ã™ã‚‹ã¨,
- . configure -height 300 -width 300
-ã¨ã„ㆠtcl/tk ã®å‘½ä»¤ã¯
- root.e("configure -height 300 -width 300")
-ã¨è¨˜è¿°ã•ã‚Œã¾ã™. ã“ã®ã‚ˆã†ãªè¨˜è¿°ã¯, 見ãŸã‚ã«ã¯ç¾Žã—ãã‚ã‚Šã¾ã›ã‚“ãŒ, ãã—ã¦,
-スクリプトを読む人ã«ã¯è¦‹ã¥ã‚‰ã„ã‹ã‚‚知れã¾ã›ã‚“ãŒ, 実際ã«ã‚¹ã‚¯ãƒªãƒ—トを書ã„
-ã¦ã¿ã‚‹ã¨äºˆæƒ³å¤–ã«æ‰‹è»½ã§ã™.
-
-[使用法]
-
-1. ライブラリを読ã¿è¾¼ã‚€.
- require "tcltk"
-
-2. tcl/tk インタプリタを生æˆã™ã‚‹.
- ip = TclTkInterpreter.new()
-
-3. tcl/tk ã®ã‚³ãƒžãƒ³ãƒ‰ã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトを変数ã«ä»£å…¥ã—ã¦ãŠã.
- # コマンドã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトãŒå…¥ã£ãŸ Hash ã‚’å–り出ã™.
- c = ip.commands()
- # 使ã„ãŸã„コマンドã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトを個別ã®å¤‰æ•°ã«ä»£å…¥ã™ã‚‹.
- bind, button, info, wm = c.indexes("bind", "button", "info", "wm")
-
-4. å¿…è¦ãªå‡¦ç†ã‚’è¡Œã†.
- 詳ã—ãã¯, サンプルをå‚ç…§ã®ã“ã¨.
-
-5. 準備ãŒã§ããŸã‚‰, イベントループã«å…¥ã‚‹.
- TclTk.mainloop()
-
-(( 以下, モジュール, クラス等ã®èª¬æ˜Žã‚’書ã予定.))
-
-
-
-<< tcltklib ライブラリ >>
-
-tcl/tk ã® C ライブラリを利用ã™ã‚‹ãŸã‚ã®ä½Žæ°´æº–インターフェースをæä¾›ã—ã¾
-ã™.
-
-コンパイル/実行ã«ã¯, tcl/tk ã® C ライブラリãŒå¿…è¦ã§ã™.
-
-[説明]
-
-ã“ã®ãƒ©ã‚¤ãƒ–ラリを用ã„ã‚‹ã¨, ruby ã‹ã‚‰ tcl/tk ã® C ライブラリを利用ã§ãã¾
-ã™. 具体的ã«ã¯, ruby インタプリタã‹ã‚‰ tcl/tk インタプリタを呼ã³å‡ºã™ã“
-ã¨ãŒã§ãã¾ã™. ã•ã‚‰ã«, ãã®(ruby インタプリタã‹ã‚‰å‘¼ã³å‡ºã—ãŸ) tcl/tk イ
-ンタプリタã‹ã‚‰, 逆㫠ruby インタプリタを呼ã³å‡ºã™ã“ã¨ã‚‚ã§ãã¾ã™.
-
-[使用法]
-
-require "tcltklib" ã™ã‚‹ã¨, 以下ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«, クラスãŒåˆ©ç”¨å¯èƒ½ã§ã™.
-
-モジュール TclTkLib
- tcl/tk ライブラリを呼ã³å‡ºã™ãƒ¡ã‚½ãƒƒãƒ‰ã‚’集ã‚ãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ã™. ãŸã ã—,
- tcl/tk インタプリタ関係ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚¯ãƒ©ã‚¹ TclTkIp ã«ã‚ã‚Šã¾ã™.
-
- モジュールメソッド mainloop()
- Tk_MainLoop を実行ã—ã¾ã™. å…¨ã¦ã® tk ã®ã‚¦ã‚¤ãƒ³ãƒ‰ã‚¦ãŒç„¡ããªã‚‹ã¨çµ‚了
- ã—ã¾ã™(例ãˆã°, tcl/tk ã§æ›¸ãã¨ã“ã‚ã® "destroy ." ã‚’ã—ãŸå ´åˆç­‰).
- 引数: ç„¡ã—
- 戻り値: nil
-
-クラス TclTkIp
- インスタンス㌠tcl/tk ã®ã‚¤ãƒ³ã‚¿ãƒ—リタã«å¯¾å¿œã—ã¾ã™. tcl/tk ã®ãƒ©ã‚¤ãƒ–
- ラリã®ä»•æ§˜é€šã‚Š, インスタンスを複数個生æˆã—ã¦ã‚‚æ­£ã—ã動作ã—ã¾ã™(ã
- ã‚“ãªã“ã¨ã‚’ã™ã‚‹å¿…è¦ã¯ã‚ã¾ã‚Šç„¡ã„ã¯ãšã§ã™ãŒ). インタプリタ㯠wish ã®
- tcl/tk コマンドを実行ã§ãã¾ã™. ã•ã‚‰ã«, 以下ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã§ãã¾
- ã™.
- コマンド ruby
- 引数を ruby ã§å®Ÿè¡Œã—ã¾ã™(ruby_eval_string を実行ã—ã¾ã™). 引数
- 㯠1 ã¤ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“. 戻り値㯠ruby ã®å®Ÿè¡Œçµæžœã§ã™.
- ruby ã®å®Ÿè¡Œçµæžœã¯ nil ã‹ String ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“.
-
- クラスメソッド new()
- TclTkIp クラスã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’生æˆã—ã¾ã™
- 引数: ç„¡ã—
- 戻り値 (TclTkIp): 生æˆã•ã‚ŒãŸã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹
-
- メソッド _eval(script)
- インタプリタ㧠script を評価ã—ã¾ã™(Tcl_Eval を実行ã—ã¾ã™). å‰è¿°
- ã®ã‚ˆã†ã«, ruby コマンドã«ã‚ˆã‚Š script 内ã‹ã‚‰ ruby スクリプトを実
- è¡Œã§ãã¾ã™.
- 引数: script (String) - インタプリタã§è©•ä¾¡ã™ã‚‹ã‚¹ã‚¯ãƒªãƒ—ト文字列
- 戻り値 (String): 評価çµæžœ ((Tcl_Interp *)->result)
-
- メソッド _return_value()
- ç›´å‰ã® Tcl_Eval ã®æˆ»ã‚Šå€¤ã‚’è¿”ã—ã¾ã™. 0(TCL_OK) ã§æ­£å¸¸çµ‚了ã§ã™.
- 引数: ç„¡ã—
- 戻り値 (Fixnum): ç›´å‰ã® Tcl_Eval() ãŒè¿”ã—ãŸå€¤.
-
-==============================================================
-
-以下ãŒæœ¬ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆæ™‚点ã§ã® tcltklib ライブラリã®èª¬æ˜Žã§ã™ï¼Ž
-==============================================================
-モジュール TclTkLib
- : 個々㮠Tcl/Tk インタープリタã«ä¾å­˜ã—ãªã„å‡¦ç† ( == イベントルー
- : プã«é–¢ã™ã‚‹å‡¦ç† ) を呼ã³å‡ºã™ãƒ¡ã‚½ãƒƒãƒ‰ã‚’定義ã—ãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ï¼Ž
-
- モジュール TclTkLib::EventFlag
- : do_one_event を呼ã³å‡ºã™éš›ã®å‡¦ç†å¯¾è±¡ã‚¤ãƒ™ãƒ³ãƒˆã‚’指定ã™ã‚‹ãŸã‚ã®
- : フラグ ( WINDOW|DONT_WAIT ã¨ã„ã†ã‚ˆã†ã«ãƒ“ット演算å­ã§é€£çµã—ã¦
- : 指定 ) を定数ã¨ã—ã¦å®šç¾©ã—ãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ï¼Žä»¥ä¸‹ã®å®šæ•°ãŒå«ã¾ã‚Œã‚‹ï¼Ž
-
- 定数 NONE
- : 値㯠0 ã§ï¼Œå€¤ã¨ã—ã¦ã¯ã„ã‹ãªã‚‹ç¨®é¡žã®ã‚¤ãƒ™ãƒ³ãƒˆã‚‚指定ã—ã¦ã„ãªã„
- : ã“ã¨ã«ãªã‚‹ãŒï¼Œå®Ÿéš›ã®å‡¦ç†ä¸Šã¯ ALL ã¨åŒã˜ã¨ã—ã¦æ‰±ã‚れる.
-
- 定数 WINDOW
- : window イベントを処ç†å¯¾è±¡ã¨ã™ã‚‹
-
- 定数 FILE
- : file イベントを処ç†å¯¾è±¡ã¨ã™ã‚‹
-
- 定数 TIMER
- : timer イベントを処ç†å¯¾è±¡ã¨ã™ã‚‹
-
- 定数 IDLE
- : ã‚¢ã‚¤ãƒ‰ãƒ«ãƒ«ãƒ¼ãƒ—å‡¦ç† ( å†æç”»ãªã©ï¼Œä»–ã®ç¨®é¡žã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿ
- : ã—ã¦ã„ãªã„ã¨ãã«è¡Œã‚ã‚Œã‚‹å‡¦ç† ) を処ç†å¯¾è±¡ã¨ã™ã‚‹
-
- 定数 ALL
- : ã™ã¹ã¦ã®ç¨®é¡žã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’処ç†å¯¾è±¡ã¨ã™ã‚‹
- : WINDOW|FILE|TIMER|IDLE ã¨åŒã˜
-
- 定数 DONT_WAIT
- : 処ç†å¯¾è±¡ã‚¤ãƒ™ãƒ³ãƒˆãŒå­˜åœ¨ã—ãªã„å ´åˆã«ï¼Œã‚¤ãƒ™ãƒ³ãƒˆç™ºç”Ÿã‚’å¾…ãŸãš
- : ã« do_one_event を終了 ( false を返㙠) ã™ã‚‹
-
- モジュール TclTkLib::VarAccessFlag
- : _get_variable ãªã©ã§ã®ãƒ•ãƒ©ã‚°ã‚’指定ã™ã‚‹ãŸã‚ã®ã‚‚ã®ï¼Žãƒ•ãƒ©ã‚°ã«
- : ã¯ä»¥ä¸‹ã®å®šæ•°ã‚’ OR ã§é€£çµã—ã¦ä¸Žãˆã‚‹ï¼Ž
-
- 定数 NONE
- : 値㯠0 ã§ï¼Œä½•ã‚‚フラグを指定ã—ã¦ã„ãªã„ã®ã«ç­‰ã—ã„.
-
- 定数 GLOBAL_ONLY
- : 通常,変数ã®æ¤œç´¢ã¯ã¾ãšæ‰‹ç¶šã呼ã³å‡ºã—ã‚’è¡Œã£ãŸãƒ¬ãƒ™ãƒ«ã§æ¤œ
- : ç´¢ã—,次ã«ç¾åœ¨ã®åå‰ç©ºé–“ã§æ¤œç´¢ï¼Œæœ€å¾Œã«ã‚°ãƒ­ãƒ¼ãƒãƒ«ç©ºé–“ã§
- : 検索を行ã†ï¼Žã—ã‹ã—,ã“ã®ãƒ•ãƒ©ã‚°ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã«ã¯ï¼Œã‚°
- : ローãƒãƒ«ç©ºé–“ã§ã®ã¿æ¤œç´¢ã™ã‚‹ï¼Ž
- : ã‚‚ã— GLOBAL_ONLY 㨠NAMESPACE_ONLY ã¨ãŒä¸¡æ–¹æŒ‡å®šã•ã‚ŒãŸå ´
- : åˆã«ã¯ï¼ŒGLOBAL_ONLY ã®æŒ‡å®šã¯ç„¡è¦–ã•ã‚Œã‚‹ï¼Ž
-
- 定数 NAMESPACE_ONLY
- : ã“ã®ãƒ•ãƒ©ã‚°ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã«ã¯ï¼Œç¾åœ¨ã®åå‰ç©ºé–“ã§ã®ã¿å¤‰
- : æ•°ã®æ¤œç´¢ã‚’è¡Œã†ï¼ŽGLOBAL_ONLY ã®èª¬æ˜Žã‚‚å‚ç…§ã™ã‚‹ã“ã¨ï¼Ž
-
- 定数 LEAVE_ERR_MSG
- : 変数アクセスã«ãŠã„ã¦ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆï¼Œã“ã®ãƒ•ãƒ©ã‚°ãŒ
- : 指定ã•ã‚Œã¦ã„ã‚Œã°ï¼Œå®Ÿè¡Œçµæžœã¨ã—㦠Tcl インタープリタã«ã‚¨
- : ラーメッセージãŒæ®‹ã•ã‚Œã‚‹ï¼Žã“ã®ãƒ•ãƒ©ã‚°ãŒæŒ‡å®šã•ã‚Œã¦ã„ãªã‘
- : ã‚Œã°ï¼Œã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ä¸€åˆ‡æ®‹ã•ã‚Œãªã„.
-
- 定数 APPEND_VALUE
- : ã“ã®ãƒ•ãƒ©ã‚°ãŒæŒ‡å®šã•ã‚Œã¦ã„ãŸå ´åˆï¼Œå¤‰æ•°ã®å€¤ã‚’ç½®ãæ›ãˆã®ã§
- : ã¯ãªã,ç¾åœ¨ã®å€¤ã«ä»£å…¥å€¤ãŒè¿½åŠ  (append; 文字列連çµ) ã•
- : れる.変数ãŒæœªå®šç¾©ã‚ã£ãŸå ´åˆï¼Œã“ã®ãƒ•ãƒ©ã‚°ã¯ç„¡è¦–ã•ã‚Œã‚‹ï¼Ž
-
- 定数 LIST_ELEMENT
- : ã“ã®ãƒ•ãƒ©ã‚°ãŒæŒ‡å®šã•ã‚Œã¦ã„ãŸå ´åˆï¼Œä»£å…¥å€¤ã¯ã¾ãš Tcl ã®ãƒªã‚¹
- : トè¦ç´ ã¨ã—ã¦é©åˆ‡ã¨ãªã‚‹ã‚ˆã†ã«å¤‰æ›ã•ã‚Œã‚‹ï¼Žä»£å…¥å€¤ãŒãƒªã‚¹ãƒˆ
- : (ã¾ãŸã¯ã‚µãƒ–リスト) ã®æœ€åˆã®è¦ç´ ã¨ãªã‚‹ã®ã§ãªã„é™ã‚Šï¼Œä»£å…¥
- : 値ã®ç›´å‰ã«ã¯ç©ºç™½æ–‡å­—ãŒè¿½åŠ ã•ã‚Œã‚‹ï¼Ž
-
- 定数 PARSE_VARNAME
- : _set_variable ãªã©ã®å‘¼ã³å‡ºã—ã«ãŠã„ã¦ã“ã®ãƒ•ãƒ©ã‚°ãŒæŒ‡å®šã•
- : ã‚Œã¦ã„ãŸå ´åˆï¼Œvar_name 引数ãŒé€£æƒ³é…列åã¨è¦ç´ åã¨ã‚’両方
- : å«ã‚€å¯èƒ½æ€§ãŒã‚ã‚‹ (é–‹ã括弧をå«ã¿ï¼Œé–‰ã˜æ‹¬å¼§ã§çµ‚ã‚ã‚‹) ã“
- : ã¨ã‚’示ã™ï¼Žãã®å ´åˆï¼Œæ‹¬å¼§ã®é–“ãŒè¦ç´ å指定,最åˆã®é–‹ã括
- : 弧ã¾ã§ãŒé€£æƒ³é…列åã¨ã—ã¦æ‰±ã‚れる._set_variable2 ãªã©ã§
- : ã“ã®ãƒ•ãƒ©ã‚°ã‚’指定ã™ã‚‹å ´åˆï¼Œé€£æƒ³é…列åã¨è¦ç´ å㯠var_name
- : ã‹ã‚‰æŠ½å‡ºã•ã‚Œã‚‹ã¯ãšã§ã‚ã‚‹ã‹ã‚‰ï¼Œindex_name 引数㯠nil ã¨
- : ã›ã­ã°ãªã‚‰ãªã„.
-
- モジュール TclTkLib::RELEASE_TYPE
- : Tcl/Tk ã®ãƒªãƒªãƒ¼ã‚¹ã‚¿ã‚¤ãƒ—番å·ã®å®šç¾©
-
- 定数 ALPHA
- : ALPHA リリース
-
- 定数 BETA
- : BETA リリース
-
- 定数 FINAL
- : FINAL リリース
-
- モジュールメソッド
- get_version()
- : Tcl/Tk ã® major, minor, release-type 番å·, patchlevel ã‚’
- : é…列ã«ã—ã¦è¿”ã™ï¼Ž
-
- mainloop(check_root = true)
- : イベントループを起動ã™ã‚‹ï¼Žcheck_root ㌠true ã§ã‚ã‚Œã°ï¼Œ
- : root widget ãŒå­˜åœ¨ã™ã‚‹é™ã‚Šï¼Œã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯çµ‚了ã—ãªã„.
- : check_root ㌠false ã®å ´åˆã¯ï¼Œroot widget ãŒæ¶ˆæ»…ã—ã¦ã‚‚
- : ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯çµ‚了ã—ãªã„ ( root widget ãŒæ¶ˆæ»…ã—ã¦ã‚‚,
- : WINDOW 以外ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ç™ºç”Ÿã—ã†ã‚‹ãŸã‚ ).終了ã«ã¯ï¼Œå¤–部
- : ã‹ã‚‰ã®åƒã掛㑠( スレッドを活用ã™ã‚‹ãªã© ) ãŒå¿…è¦ï¼Ž
-
- mainloop_thread?
- : カレントスレッドãŒã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—を実行ã—ã¦ã„るスレッド
- : ã‹ã©ã†ã‹ã‚’è¿”ã™ï¼Ž
- : イベントループを実行ã—ã¦ã„るスレッドã§ã‚れ㰠true を,
- : ã©ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ã‚‚イベントループãŒå®Ÿè¡Œã•ã‚Œã¦ã„ãªã„å ´åˆã¯
- : nil を,他ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ãŒå®Ÿè¡Œã•ã‚Œã¦ã„ã‚‹å ´
- : åˆã¯ false ã‚’è¿”ã™ï¼Ž
- : false ã®éš›ã« Tk インタープリタを直接呼ã¶ã®ã¯å±é™ºã§ã‚る.
-
- mainloop_watchdog(check_root = true)
- : 通常ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã§ã¯ï¼Œã‚¤ãƒ™ãƒ³ãƒˆå‡¦ç†ã®å†…容ã«ã‚ˆã£ã¦ã¯
- : デッドロックを引ãèµ·ã“ã™å¯èƒ½æ€§ãŒã‚ã‚‹ (例ãˆã°ã‚¤ãƒ™ãƒ³ãƒˆã«
- : 対ã™ã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯å‡¦ç†ä¸­ã§ widget æ“作をã—,ãã®çµ‚了を
- : å¾…ã¤ãªã©).ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ï¼Œãã†ã—ãŸãƒ‡ãƒƒãƒ‰ãƒ­ãƒƒã‚¯ã‚’回é¿ã™
- : ã‚‹ãŸã‚ã®ç›£è¦–スレッド付ãã§ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã‚’èµ·å‹•ã™ã‚‹
- : ( 監視スレッドを生æˆã—ãŸå¾Œã«ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—を実行ã™ã‚‹ ).
- : 引数ã®æ„味㯠mainloop ã¨åŒã˜ã§ã‚る.
-
- do_one_event(flag = TclTkLib::EventFlag::ALL |
- TclTkLib::EventFlag::DONT_WAIT)
- : 処ç†å¾…ã¡ã®ã‚¤ãƒ™ãƒ³ãƒˆ 1 個を実行ã™ã‚‹ï¼Ž
- : イベントを処ç†ã—ãŸå ´åˆã¯ true ã‚’è¿”ã™ï¼Ž
- : フラグ㧠DONT_WAIT を指定ã—ã¦ã„ãªã„å ´åˆï¼Œãƒ•ãƒ©ã‚°ã§å‡¦ç†å¯¾
- : 象ã¨ãªã£ã¦ã„る種類ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã™ã‚‹ã¾ã§å¾…ã¡ç¶šã‘る.
- : DONT_WAIT を指定ã—ã¦ã„ãŸå ´åˆï¼Œå‡¦ç†å¯¾è±¡ã‚¤ãƒ™ãƒ³ãƒˆãŒãªãã¦ã‚‚
- : ã™ãã«çµ‚了㗠false ã‚’è¿”ã™ï¼Ž
- : $SAFE >= 1 ã‹ã¤ flag ãŒæ±šæŸ“ã•ã‚Œã¦ã„ã‚‹ãªã‚‰ã°
- : flag ã«ã¯ DONT_WAIT ãŒå¼·åˆ¶çš„ã«ä»˜ã‘られる.
-
- set_eventloop_tick(timer_tick)
- : イベントループã¨åŒæ™‚ã«åˆ¥ã‚¹ãƒ¬ãƒƒãƒ‰ãŒç¨¼åƒã—ã¦ã„ã‚‹å ´åˆã«ï¼Œæ™‚
- : é–“ã«åŸºã¥ã„ãŸå¼·åˆ¶çš„ãªã‚¹ãƒ¬ãƒƒãƒ‰ã‚¹ã‚¤ãƒƒãƒãƒ³ã‚°ã‚’ã©ã®ç¨‹åº¦ã®é »åº¦
- : ( 時間間隔 ) ã§ç™ºç”Ÿã•ã›ã‚‹ã‹ã‚’ミリ秒å˜ä½ã®æ•´æ•°å€¤ã§æŒ‡å®šã™ã‚‹ï¼Ž
- : 0 を指定ã™ã‚‹ã¨ï¼Œã“ã®å¼·åˆ¶çš„ãªã‚¹ã‚¤ãƒƒãƒãƒ³ã‚°ã¯è¡Œã‚ã‚Œãªã„.
- : 標準ã§ã¯ 0 ã«è¨­å®šã•ã‚Œã¦ãŠã‚Šï¼Œã‚¤ãƒ™ãƒ³ãƒˆå‡¦ç†æ•°ã«åŸºã¥ãスイッ
- : ãƒãƒ³ã‚°ã ã‘ãŒè¡Œã‚れる ( see set_eventloop_weight ).
- : ãŸã ã—,稼åƒã—ã¦ã„るスレッドãŒã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã ã‘ã®å ´åˆï¼Œ
- : timer_tick ã‚’ 0 ã«è¨­å®šã™ã‚‹ã“ã¨ã¯ã§ããªã„.もã—設定ã•ã‚Œã¦
- : ã„ãŸã‚‰ï¼Œ100 ms ( see NO_THREAD_INTERRUPT_TIME ) ã«è‡ªå‹•è¨­
- : 定ã•ã‚Œã‚‹ï¼Ž
- : 詳細ãªèª¬æ˜Žã¯ç•¥ã™ãŒï¼Œã“れ㯠CPU パワーを節約ã—ã¤ã¤å®‰å…¨ã§
- : 安定ã—ãŸå‹•ä½œã‚’実ç¾ã™ã‚‹ãŸã‚ã«å®Ÿè£…ã—ãŸä»•æ§˜ã§ã‚る.
-
- get_eventloop_tick
- : timer_tick ã®ç¾åœ¨å€¤ã‚’è¿”ã™ï¼Ž
-
- set_no_event_wait(no_event_wait)
- : 複数ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãŒç¨¼åƒã—ã¦ã„ã‚‹å ´åˆã§ï¼Œå‡¦ç†å¾…ã¡ã‚¤ãƒ™ãƒ³ãƒˆãŒå…¨
- : ã存在ã—ãªã‹ã£ãŸéš›ã« sleep 状態ã«å…¥ã‚‹æ™‚間長を指定ã™ã‚‹ï¼Ž
- : 稼åƒã‚¹ãƒ¬ãƒƒãƒ‰ãŒã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã ã‘ã®å ´åˆã«ã¯æ„味をãªã•ãªã„.
- : デフォルトã®å€¤ã¯ 20 (ms)
-
- get_no_event_wait
- : no_event_wait ã®ç¾åœ¨å€¤ã‚’è¿”ã™ï¼Ž
-
- set_eventloop_weight(loop_max, no_event_tick)
- : 複数ã®ã‚¹ãƒ¬ãƒƒãƒ‰ãŒç¨¼åƒã—ã¦ã„る際㫠Ruby/Tk ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼
- : プã«å‰²ã‚Šå½“ã¦ã‚‹æ¯”é‡ã‚’定ã‚ã‚‹ãŸã‚ã®ãƒ‘ラメータを設定ã™ã‚‹ï¼Ž
- : 稼åƒã‚¹ãƒ¬ãƒƒãƒ‰ãŒã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã ã‘ã®å ´åˆã«ã¯æ„味をãªã•ãªã„.
- : 一度ã®ã‚¹ãƒ¬ãƒƒãƒ‰åˆ‡ã‚Šæ›¿ãˆã®é–“ã«å‡¦ç†ã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã®æœ€å¤§æ•°ã¨ï¼Œ
- : 処ç†å¾…ã¡ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒå­˜åœ¨ã—ãªã„éš›ã®åŠ ç®—æ•°ã¨ã‚’設定ã™ã‚‹ï¼Ž
- : 処ç†å¾…ã¡ã‚¤ãƒ™ãƒ³ãƒˆãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ no_event_wait ( see
- : set_no_event_wait ) ã ã‘ã®é–“ sleep 状態ã«å…¥ã‚‹ï¼Ž
- : デフォルトã§ã¯ãã‚Œãžã‚Œ 800 回㨠10 回,ã¤ã¾ã‚Šï¼Œ800 個ã®ã‚¤
- : ベント (アイドルイベントをå«ã‚€) を処ç†ã™ã‚‹ã¨ã‹ï¼Œã‚¤ãƒ™ãƒ³ãƒˆ
- : ãŒå…¨ã発生ã—ãªã„ã¾ã¾ã« 80 回ã®å‡¦ç†å¾…ã¡ã‚¤ãƒ™ãƒ³ãƒˆæ¤œæŸ»ãŒå®Œäº†
- : ã™ã‚‹ã¨ã‹ã§ã‚«ã‚¦ãƒ³ãƒˆãŒ 800 以上ã«ãªã‚‹ã¨ã‚¹ãƒ¬ãƒƒãƒ‰ã‚¹ã‚¤ãƒƒãƒãƒ³ã‚°
- : ãŒç™ºç”Ÿã™ã‚‹ã“ã¨ã«ãªã‚‹ï¼Ž
-
- get_eventloop_weight
- : ç¾åœ¨ã® loop_max 㨠no_event_tick ã¨ã®å€¤ã‚’è¿”ã™ï¼Ž
- : ( see set_eventloop_wait )
-
- mainloop_abort_on_exception=(bool)
- : Tk インタープリタ上ã§ä¾‹å¤–を発生ã—ãŸéš›ã«ï¼Œã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã‚’
- : エラーåœæ­¢ã•ã›ã‚‹ã‹ã©ã†ã‹ã‚’指定ã™ã‚‹ï¼Žtrue を指定ã—ãŸå ´åˆã¯
- : エラーåœæ­¢ã™ã‚‹ãŒï¼Œfalse ã®å ´åˆã¯ä¾‹å¤–を無視ã—ã¦ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼
- : プを継続ã™ã‚‹ï¼Žã•ã‚‰ã« nil ã®å ´åˆã¯è­¦å‘Šãƒ¢ãƒ¼ãƒ‰ã§ãªã„é™ã‚Šã¯ã‚¨
- : ラーメッセージã®å‡ºåŠ›ã™ã‚‰çœç•¥ã—ã¦ï¼Œä¾‹å¤–を無視ã™ã‚‹ï¼Ž
- : デフォルトã§ã¯ true ã«è¨­å®šã•ã‚Œã¦ã„る.
- : 1個ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタã ã‘を使ã£ã¦ã„ã‚‹å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼æ™‚ã«ãã®
- : ã¾ã¾åœæ­¢ã—ã¦ã‚‚通常ã¯å•é¡Œãªã„ãŒï¼Œè¤‡æ•°ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタãŒåŒæ™‚
- : ã«å‹•ä½œã—ã¦ã„ã‚‹å ´åˆã«ã¯ï¼Œãれらを管ç†ã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã¯ï¼‘
- : 個ã ã‘ã§ã‚ã‚‹ãŸã‚,ã„ãšã‚Œã‹ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタã®ã‚¨ãƒ©ãƒ¼ãŒåŽŸå› ã§ï¼Œ
- : ä»–ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタã®å‡¦ç†ç¶™ç¶šãŒä¸å¯èƒ½ã«ãªã‚‹ã“ã¨ãŒã‚る.ãã®
- : よã†ãªå ´åˆã§ã‚‚エラーを無視ã—ã¦ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ãŒç¨¼åƒã‚’続ã‘ã‚‹
- : ã“ã¨ã§ï¼Œä»–ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタãŒæ­£å¸¸ã«å‹•ä½œã—続ã‘ã‚‹ã“ã¨ãŒã§ãる.
-
- mainloop_abort_on_exception
- : Tk インタープリタ上ã§ä¾‹å¤–を発生ã—ãŸéš›ã«ï¼Œã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—をエ
- : ラーåœæ­¢ã•ã›ã‚‹ã‹ã©ã†ã‹ã®è¨­å®šçŠ¶æ…‹ã‚’ true/false ã§å¾—る.
-
- num_of_mainwindows
- : ç¾åœ¨ã®ãƒ¡ã‚¤ãƒ³ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ (ルートウィジェット) ã®æ•°ã‚’è¿”ã™ï¼Ž
- : メインウィンドウã¯ä¸€ã¤ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタã«ä»˜ã最大一ã¤ã§ã‚ã‚‹
- : ã®ã§ï¼Œã“ã®å€¤ã¯ç¾åœ¨ Tk ã®æ©Ÿèƒ½ãŒæœ‰åŠ¹ã§ã‚るインタープリタã®ç·
- : æ•°ã«ç­‰ã—ã„.
-
- _merge_tklist(str, str, ... )
- : Tcl/Tk ã®ãƒ©ã‚¤ãƒ–ラリ関数を使ã£ã¦ï¼Œå¼•æ•°ã®æ–‡å­—列ãŒãã‚Œãžã‚Œ
- : æ­£ã—ã一ã¤ã®ãƒªã‚¹ãƒˆè¦ç´ ã¨ãªã‚‹ã‚ˆã†ã«é€£çµã—ãŸæ–‡å­—列を返ã™ï¼Ž
-
- _conv_listelement(str)
- : Tcl/Tk ã®ãƒ©ã‚¤ãƒ–ラリ関数を使ã£ã¦ï¼Œå¼•æ•°ã®æ–‡å­—列㌠Tcl ã®
- : 一ã¤ã®ãƒªã‚¹ãƒˆè¦ç´ ã¨ã—ã¦é©åˆ‡ãªè¡¨ç¾ã«ãªã‚‹ã‚ˆã†ã«å¤‰æ›ã—ãŸæ–‡
- : 字列を返ã™ï¼Ž
-
- _toUTF8(str, encoding=nil)
- _fromUTF8(str, encoding=nil)
- : Tcl/Tk ãŒå†…蔵ã—ã¦ã„ã‚‹ UTF8 変æ›å‡¦ç†ã‚’呼ã³å‡ºã™ï¼Ž
-
- _subst_UTF_backslash(str)
- _subst_Tcl_backslash(str)
- : Tcl ã®ãƒ«ãƒ¼ãƒ«ã§ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥è¨˜æ³• ( \uhhhh ã«ã‚ˆã‚‹
- : Unicode 文字表ç¾ã‚’å«ã‚€ ) を解æžã™ã‚‹ï¼Ž
- : _subst_Tcl_backslash ã¯ã™ã¹ã¦ã®ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥è¨˜æ³•ã‚’
- : ç½®ãæ›ãˆã‚‹ã®ã«å¯¾ã—,_subst_UTF_backslash 㯠\uhhhh
- : ã«ã‚ˆã‚‹ Unicode 文字表ç¾ã ã‘ã‚’ç½®ãæ›ãˆã‚‹ï¼Ž
-
- encoding_system
- encoding_system=(encoding)
- : Tcl ã® system encoding ã®ç²å¾—ãŠã‚ˆã³è¨­å®š
-
- encoding
- encoding=(encoding)
- : encoding_system / encoding_system= ã® alias
- : ( Ruby/Tk ã® tk.rb ã§ã¯ç½®ãæ›ãˆã‚‰ã‚Œã‚‹äºˆå®šã®ã‚‚ã®ï¼Ž)
-
-
-クラス TclTkIp
- クラスメソッド
- new(ip_name=nil, options='')
- : TclTkIp クラスã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’生æˆã™ã‚‹ï¼Ž
- : ip_name ã«æ–‡å­—列を与ãˆãŸå ´åˆã¯ï¼Œãれ㌠winfo interps ãªã©ã§
- : 表示ã•ã‚Œã‚‹åå‰ã«ãªã‚‹ï¼Ž
- : options ã«ã¯ï¼Œ-geometry ã‚„ -use ãªã©ï¼Œwish ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³
- : 引数ã¨ã—ã¦ä¸Žãˆã‚‹ã‚ªãƒ—ションã¨åŒæ§˜ã®æƒ…報を文字列ã¨ã—ã¦ä¸Žãˆã‚‹ï¼Ž
- : 与ãˆã‚‰ã‚ŒãŸæƒ…å ±ã¯ï¼Œroot widget 生æˆã®éš›ã«ç”¨ã„られる.
- : ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') )
- : ã‚‚ã— options ã«æ•¢ãˆã¦ nil ã¾ãŸã¯ false を与ãˆãŸå ´åˆï¼ŒTk ライ
- : ブラリãŒå°Žå…¥ã•ã‚Œã¦ã„ãªã„ (ã¤ã¾ã‚Šã¯ Tcl ã®ã¿ã®) インタープリ
- : タを生æˆã™ã‚‹ï¼Žã“ã®å ´åˆã¯ GUI 環境ã¯å¿…è¦ãªã„ãŸã‚,ウインドウ
- : システムãŒå­˜åœ¨ã—ãªã„,ã¾ãŸã¯ä½¿ç”¨ã§ããªã„環境ã§ã‚‚ Tcl インター
- : プリタを生æˆã—,Tcl ã‚„ãã®æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリを活用ã™ã‚‹ã“ã¨ãŒã§ãる.
-
- インスタンスメソッド
- create_slave(name, safe=false)
- : レシーãƒã‚’親ã¨ã™ã‚‹ name ã¨ã„ã†åå‰ã®ã‚¹ãƒ¬ãƒ¼ãƒ–インタープリタを
- : 生æˆã™ã‚‹ï¼Ž
- : safe ã«ã¯ç”Ÿæˆã™ã‚‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタを safe インタープリタã¨ã™ã‚‹
- : ã‹ã‚’指定ã™ã‚‹ï¼Žãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯ false ã¨ã„ã†ã“ã¨ã«ãªã£ã¦ã„ã‚‹ãŒï¼Œ
- : ãŸã¨ãˆæ˜Žç¢ºã« false を指定ã—ã¦ã„ãŸã¨ã—ã¦ã‚‚,親ã¨ãªã‚‹ã‚¤ãƒ³ã‚¿ãƒ¼
- : プリタ㌠safe インタープリタã§ã‚ã‚Œã°ï¼Œãã®è¨­å®šã‚’引ã継ã„ã§
- : safe インタープリタã¨ã—ã¦ç”Ÿæˆã•ã‚Œã‚‹ï¼Ž
-
- make_safe
- : Tcl/Tk インタープリタを safe インタープリタã«å¤‰æ›´ã™ã‚‹ï¼Ž
- : 戻り値ã¯ãƒ¬ã‚·ãƒ¼ãƒã§ã‚るインタープリタ自身ã§ã‚る.
- : 失敗ã—ãŸå ´åˆã¯ RuntimeError ã®ä¾‹å¤–を発生ã™ã‚‹ï¼Ž
-
- safe?
- : Tcl/Tk インタープリタ㌠safe インタープリタã§ã‚ã‚‹ã‹ã‚’調ã¹ã‚‹ï¼Ž
- : safe インタープリタã§ã‚れ㰠true ã‚’è¿”ã™ï¼Ž
-
- allow_ruby_exit?
- : 対象ã¨ãªã‚‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタ上ã®è©•ä¾¡ã§ï¼Œruby ã® exit 関数ã¾ãŸã¯
- : Tcl/Tk 上㮠exit コマンドã«ã‚ˆã£ã¦ ruby 自体を終了ã•ã›ã‚‹ã“ã¨
- : を許ã™ã‹ã©ã†ã‹ã‚’è¿”ã™ï¼Ž
- : 許ã•ãªã„å ´åˆã¯å¯¾è±¡ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタã ã‘ãŒçµ‚了ã™ã‚‹ï¼Ž
- : マスターインタープリタã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ true,スレーブインター
- : プリタã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ false ã§ã‚る.
-
- allow_ruby_exit=(mode)
- : 対象ã¨ãªã‚‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタ㮠allow_ruby_exit? ã®çŠ¶æ…‹ã‚’変更ã™ã‚‹ï¼Ž
- : インタープリタ㌠safe インタープリタã®å ´åˆã¯å¤‰æ›´ãŒè¨±ã•ã‚Œãªã„
- : (例外を発生).
-
- delete
- : Tcl/Tk インタープリタを delete ã™ã‚‹ï¼Ž
- : delete ã•ã‚ŒãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタã¯ï¼Œä»¥å¾Œä¸€åˆ‡ã®æ“作ãŒã§ããªããªã‚Šï¼Œ
- : コマンドをé€ã£ã¦ã‚‚例外を発生ã™ã‚‹ã‚ˆã†ã«ãªã‚‹ï¼Ž
-
- deleted?
- : Tcl/Tk インタープリタãŒã™ã§ã« delete ã•ã‚Œã¦ã„ã‚‹ã‹ã‚’調ã¹ã‚‹ï¼Ž
- : delete 済ã¿ã§ã‚³ãƒžãƒ³ãƒ‰ã‚’å—ã‘付ã‘ãªã„状態ã«ãªã£ã¦ã„ã‚‹ãªã‚‰ã°
- : true ã‚’è¿”ã™ï¼Ž
-
- has_mainwindow?
- : Tcl/Tk インタープリタã«ãƒ¡ã‚¤ãƒ³ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ (root widget) ãŒ
- : 存在ã™ã‚Œã° true を,存在ã—ãªã‘れ㰠false ã‚’è¿”ã™ï¼Ž
- : インタープリタãŒæ—¢ã« delete 済ã¿ã§ã‚れ㰠nil ã‚’è¿”ã™ï¼Ž
-
- restart
- : Tcl/Tk インタープリタ㮠Tk 部分ã®åˆæœŸåŒ–,å†èµ·å‹•ã‚’è¡Œã†ï¼Ž
- : 一旦 root widget を破壊ã—ãŸå¾Œã«å†åº¦ Tk ã®æ©Ÿèƒ½ãŒå¿…è¦ã¨
- : ãªã£ãŸå ´åˆã«ç”¨ã„る.
-
- _eval(str)
- _invoke(*args)
- : Tcl/Tk インタープリタ上ã§è©•ä¾¡ã‚’è¡Œã†ï¼Ž
- : _eval ã¯è©•ä¾¡ã‚¹ã‚¯ãƒªãƒ—トãŒä¸€ã¤ã®æ–‡å­—列ã§ã‚ã‚‹ã“ã¨ã«å¯¾ã—,
- : _invoke ã¯è©•ä¾¡ã‚¹ã‚¯ãƒªãƒ—ト㮠token ã”ã¨ã«ä¸€ã¤ã®å¼•æ•°ã¨ãª
- : るよã†ã«ä¸Žãˆã‚‹ï¼Ž
- : _invoke ã®æ–¹ã¯ Tcl/Tk インタープリタã®å­—å¥è§£æžå™¨ã‚’用ã„
- : ãªã„ãŸã‚,評価ã®è² è·ãŒã‚ˆã‚Šå°‘ãªãã¦ã™ã‚€ï¼ŽãŸã ã—,ãã®ä»£
- : ã‚ã‚Šã« auto_load ã®ã‚ˆã†ãªæ©Ÿæ§‹ã¯åƒã‹ãšï¼Œload ç­‰ã«ã‚ˆã£ã¦
- : Tcl/Tk インタープリタ上ã«æ—¢ã«ç™»éŒ²æ¸ˆã¿ã®ã‚³ãƒžãƒ³ãƒ‰ã—ã‹å‘¼
- : ã³å‡ºã™ã“ã¨ãŒã§ããªã„.
- : _eval ã§ã¯ auto_load 機構ãŒåƒããŸã‚,一度 _eval を実行
- : ã—ã¦ç™»éŒ²ã«æˆåŠŸã—ã•ãˆã™ã‚Œã°ï¼Œä»¥é™ã¯ _invoke ã§ã‚‚利用ã§
- : ãるよã†ã«ãªã‚‹ï¼Ž
-
- _cancel_eval(str)
- _cancel_eval_unwind(str)
- : (Tcl/Tk8.6 or later)
- : Tcl_CancelEval() 関数を呼ã³å‡ºã—,eval ã®å®Ÿè¡Œã‚’打ã¡åˆ‡ã‚‹ï¼Ž
-
- _toUTF8(str, encoding=nil)
- _fromUTF8(str, encoding=nil)
- : Tcl/Tk ãŒå†…蔵ã—ã¦ã„ã‚‹ UTF8 変æ›å‡¦ç†ã‚’呼ã³å‡ºã™ï¼Ž
-
- _thread_vwait(var_name)
- _thread_tkwait(mode, target)
- : スレッド対応㮠vwait ã‚ã‚‹ã„㯠tkwait 相当ã®ãƒ¡ã‚½ãƒƒãƒ‰ï¼Ž
- : 通常㮠vwait ã‚ã‚‹ã„㯠tkwait コマンドã¨ç•°ãªã‚‹ã®ã¯ï¼Œã‚¤ãƒ™ãƒ³
- : トループã¨ã¯ç•°ãªã‚‹ã‚¹ãƒ¬ãƒƒãƒ‰ã‹ã‚‰å‘¼ã³å‡ºã—ãŸå ´åˆã« vwait ç­‰ã®
- : スタックã¨ã¯ç‹¬ç«‹ã«æ¡ä»¶ã®æˆç«‹å¾…ã¡ãŒãªã•ã‚Œã‚‹ã“ã¨ã§ã‚る.
- : 通常㮠vwait / tkwait ã§ã¯ï¼Œvwait / tkwait (1) ã®å¾…ã¡ã®é€”
- : 中ã§ã•ã‚‰ã« vwait / tkwait (2) ãŒå‘¼ã°ã‚ŒãŸå ´åˆï¼Œå¾…ã¡ã®å¯¾è±¡
- : ã¨ãªã£ã¦ã„ã‚‹æ¡ä»¶ã®æˆç«‹é †åºãŒã©ã†ã‚れ,(2)->(1) ã®é †ã§å¾…ã¡
- : を終了ã—ã¦æˆ»ã£ã¦ãる.
- : _thread_vwait / _thread_tkwait ã¯ï¼Œã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã®ã‚¹ãƒ¬ãƒƒ
- : ドã§å‘¼ã°ã‚ŒãŸå ´åˆã¯é€šå¸¸ã® vwait / tkwait ã¨åŒæ§˜ã«å‹•ä½œã™ã‚‹
- : ãŒï¼Œã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—以外ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§å‘¼ã°ã‚ŒãŸå ´åˆã«ã¯ãã®ã‚¹
- : レッドをåœæ­¢ã•ã›ã¦å¾…ã¡ã«å…¥ã‚Šï¼Œæ¡ä»¶ãŒæˆç«‹ã—ãŸæ™‚ã«ã‚¹ãƒ¬ãƒƒãƒ‰
- : ã®å®Ÿè¡Œã‚’å†é–‹ã™ã‚‹ï¼Žã€Œvwait ç­‰ã®å¾…ã¡ã‚¹ã‚¿ãƒƒã‚¯ã¨ã¯ç‹¬ç«‹ã€ã¨ã„
- : ã†æ„味ã¯ï¼Œã“ã®å†é–‹ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ãŒä»–ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ã®å¾…ã¡çŠ¶æ³
- : ã¨ã¯ç„¡é–¢ä¿‚ã¨ã„ã†ã“ã¨ã§ã‚る.ã¤ã¾ã‚Šï¼Œã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ç­‰ã®ä»–
- : ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã§ vwait ç­‰ã§å¾…ã¡ã®çŠ¶æ…‹ã«ã‚ã£ãŸã¨ã—ã¦ã‚‚ãã®å®Œäº†
- : ã‚’å¾…ã¤ã“ã¨ãªã,自らã®å¾…ã¡æ¡ä»¶ãŒæˆç«‹æ¬¡ç¬¬ï¼Œå‡¦ç†ã‚’継続ã™ã‚‹
- : ã“ã¨ã«ãªã‚‹ï¼Ž
-
- _return_value
- : ç›´å‰ã® Tcl/Tk 上ã§ã®è©•ä¾¡ã®å®Ÿè¡Œçµæžœã¨ã—ã¦ã®æˆ»ã‚Šå€¤ã‚’è¿”ã™ï¼Ž
-
- _get_variable(var_name, flag)
- _get_variable2(var_name, index_name, flag)
- : Tcl/Tk 上㮠var ã¨ã„ã†å¤‰æ•°åã®å¤‰æ•°ã®å€¤ã‚’è¿”ã™ï¼Ž
- : ã‚‚ã— index_name ãŒæŒ‡å®š (PARSE_VARNAME フラグã®èª¬æ˜Žã‚‚å‚ç…§)
- : ã•ã‚ŒãŸå ´åˆã¯é€£æƒ³é…列 var_name ã® index_name ã®è¦ç´ ã‚’è¿”ã™ï¼Ž
- : flag ã«ã¯å¤‰æ•°ã‚’検索ã™ã‚‹éš›ã®æ¡ä»¶ã‚’指定ã™ã‚‹ï¼Žflag ã«ä¸Žãˆã‚‹
- : 値ã¯ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ« TclTkLib::VarAccessFlag ã‚’å‚ç…§ã™ã‚‹ã“ã¨ï¼Ž
-
- _set_variable(var_name, value, flag)
- _set_variable2(var_name, index_name, value, flag)
- : Tcl/Tk 上㮠var ã¨ã„ã†å¤‰æ•°åã®å¤‰æ•°ã«å€¤ã‚’設定ã™ã‚‹ï¼Ž
- : ã‚‚ã— index_name ãŒæŒ‡å®š (PARSE_VARNAME フラグã®èª¬æ˜Žã‚‚å‚ç…§)
- : ã•ã‚ŒãŸå ´åˆã¯é€£æƒ³é…列 var_name ã® index_name ã®è¦ç´ ã‚’設定
- : ã™ã‚‹ï¼Ž
- : flag ã«ã¯å¤‰æ•°ã‚’検索ã™ã‚‹éš›ã®æ¡ä»¶ã‚’指定ã™ã‚‹ï¼Žflag ã«ä¸Žãˆã‚‹
- : 値ã¯ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ« TclTkLib::VarAccessFlag ã‚’å‚ç…§ã™ã‚‹ã“ã¨ï¼Ž
-
- _unset_variable(var_name)
- _unset_variable2(var_name, index_name)
- : Tcl/Tk 上㮠var_name ã¨ã„ã†å¤‰æ•°åã®å¤‰æ•°ã‚’消去ã™ã‚‹ï¼Ž
- : ã‚‚ã— index_name ãŒæŒ‡å®š (PARSE_VARNAME フラグã®èª¬æ˜Žã‚‚å‚ç…§)
- : ã•ã‚ŒãŸå ´åˆã¯é€£æƒ³é…列 var_name ã‹ã‚‰ index_name ã®è¦ç´ ã ã‘
- : を消去ã™ã‚‹ï¼Ž
-
- _get_global_var(var_name)
- _get_global_var2(var_name, index_name)
- _set_global_var(var_name, value)
- _set_global_var2(var_name, index_name, value)
- _unset_global_var(var_name)
- _unset_global_var2(var_name, index_name)
- : ãã‚Œãžã‚Œï¼Œå¯¾å¿œã™ã‚‹å¤‰æ•°ã‚¢ã‚¯ã‚»ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã® flag ã«å¯¾ã—ã¦
- : (GLOBAL_ONLY | LEAVE_ERR_MSG) を与ãˆãŸã‚‚ã®ï¼Ž
-
- _split_tklist(str)
- : Tcl/Tk ã®ãƒ©ã‚¤ãƒ–ラリ関数を使ã£ã¦ï¼Œæ–‡å­—列 str をリストã«
- : 分割ã™ã‚‹ (文字列ã®é…列ã¨ã—ã¦è¿”ã™).
-
- _merge_tklist(str, str, ... )
- : Tcl/Tk ã®ãƒ©ã‚¤ãƒ–ラリ関数を使ã£ã¦ï¼Œå¼•æ•°ã®æ–‡å­—列ãŒãã‚Œãžã‚Œ
- : æ­£ã—ã一ã¤ã®ãƒªã‚¹ãƒˆè¦ç´ ã¨ãªã‚‹ã‚ˆã†ã«é€£çµã—ãŸæ–‡å­—列を返ã™ï¼Ž
-
- _conv_listelement(str)
- : Tcl/Tk ã®ãƒ©ã‚¤ãƒ–ラリ関数を使ã£ã¦ï¼Œå¼•æ•°ã®æ–‡å­—列㌠Tcl ã®
- : 一ã¤ã®ãƒªã‚¹ãƒˆè¦ç´ ã¨ã—ã¦é©åˆ‡ãªè¡¨ç¾ã«ãªã‚‹ã‚ˆã†ã«å¤‰æ›ã—ãŸæ–‡
- : 字列を返ã™ï¼Ž
-
- mainloop
- mainloop_watchdog
- : スレーブ IP ã®å ´åˆã«ã¯ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã‚’èµ·å‹•ã›ãšã« nil ã‚’è¿”ã™ï¼Ž
- : ãれ以外ã®ç‚¹ã§ã¯å¼•æ•°ã‚’å«ã‚㦠TclTkLib ã®åŒåメソッドã«åŒã˜ï¼Ž
-
- do_one_event
- : スレーブ IP ã®å ´åˆã«ã¯å¼•æ•°ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ•ãƒ©ã‚°ã« DONT_WAIT ãŒ
- : 強制的ã«è¿½åŠ ã•ã‚Œã‚‹ (イベント待ã¡ã§ã‚¹ãƒªãƒ¼ãƒ—ã™ã‚‹ã“ã¨ã¯ç¦æ­¢).
- : ãれ以外ã®ç‚¹ã§ã¯å¼•æ•°ã‚’å«ã‚㦠TclTkLib ã®åŒåメソッドã«åŒã˜ï¼Ž
-
- set_eventloop_tick
- get_eventloop_tick
- set_no_event_wait
- get_no_event_wait
- set_eventloop_weight
- get_eventloop_weight
- mainloop_abort_on_exception
- mainloop_abort_on_exception=
- : スレーブ IP ã®å ´åˆã«ã¯å€¤ã®è¨­å®šãŒè¨±ã•ã‚Œãªã„ (無視ã•ã‚Œã‚‹).
- : ãれ以外ã®ç‚¹ã§ã¯å¼•æ•°ã‚’å«ã‚㦠TclTkLib ã®åŒåメソッドã«åŒã˜ï¼Ž
-
- encoding_table
- : Ruby m17n 用㫠Ruby 㨠Tk ã¨ã®é–“ã® encoding 対応表を返ã™ï¼Ž
-
-クラス TkCallbackBreak < StandardError
-クラス TkCallbackContinue < StandardError
- : ã“れらã¯ã‚¤ãƒ™ãƒ³ãƒˆã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã«ãŠã„ã¦ï¼Œã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯å‡¦ç†ã‚’é©åˆ‡ã«ä¸­
- : æ–­ã—ãŸã‚Šï¼Œæ¬¡ã®ãƒã‚¤ãƒ³ãƒ‰ã‚¿ã‚°ã®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°å‡¦ç†ã«é€²ã‚ãŸã‚Šã™ã‚‹ã“ã¨
- : ã‚’å¯èƒ½ã«ã™ã‚‹ãŸã‚ã®ä¾‹å¤–クラスã§ã‚る.
- : コールãƒãƒƒã‚¯ã§ break ã‚„ continue を実ç¾ã™ã‚‹ãŸã‚ã«ã¯ï¼Œã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯
- : ã§ã‚ã‚‹ Ruby 手続ã㌠Tcl/Tk インタープリタå´ã«é©åˆ‡ãªãƒªã‚¿ãƒ¼ãƒ³ã‚³ãƒ¼
- : ドを返ã™å¿…è¦ãŒã‚る.Ruby ã®æ‰‹ç¶šããŒæ™®é€šã«å€¤ã‚’è¿”ã™ã®ã§ã¯ï¼Œãã‚ŒãŒæ™®
- : 通ã®æˆ»ã‚Šå€¤ã§ã‚ã‚‹ã®ã‹å¦ã‹ã‚’区別ãŒã§ããªã„ãŸã‚,例外発生を利用ã—ãŸ
- : 実装を行ã£ã¦ã„る.
- : ãŸã ã—ç¾åœ¨ã§ã¯ï¼Œã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯æ‰‹ç¶šãã‚’ Ruby ã® break, next ã§çµ‚了ã™
- : ã‚‹ã“ã¨ã§åŒç­‰ã®çµæžœã‚’å¾—ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã£ã¦ã„る.ãれゆãˆï¼Œ
- : ã“れらã¯å¿…è¦ãªã„ã‚‚ã®ã§ã¯ã‚ã‚‹ãŒï¼Œäº’æ›æ€§ã®ãŸã‚ã«æ®‹ã—ã¦ã‚る.
-
-(eof)
diff --git a/ext/tk/README.1st b/ext/tk/README.1st
deleted file mode 100644
index 4ffef34f1d..0000000000
--- a/ext/tk/README.1st
+++ /dev/null
@@ -1,19 +0,0 @@
-If you want to use Ruby/Tk (tk.rb and so on), you must have tcltklib.so
-which is working correctly. When you have some troubles on compiling,
-please read README.tcltklib and README.ActiveTcl.
-Even if there is a tcltklib.so on your Ruby library directory, it will not
-work without Tcl/Tk libraries (e.g. libtcl8.4.so) on your environment.
-You must also check that your Tcl/Tk is installed properly.
-
---------------------------------------------
- ( the following is written in UTF-8 )
-
-Ruby/Tk (tk.rb ãªã©) を使ã„ãŸã„å ´åˆã«ã¯ï¼Œtcltklib.so ãŒæ­£ã—ãå‹•ã„ã¦ã„ãª
-ã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“.コンパイル時ã«ä½•ã‹å•é¡ŒãŒç”Ÿã˜ãŸå ´åˆã¯ï¼ŒREADME.tcltklib
-ã‚„ README.ActiveTcl を見ã¦ãã ã•ã„.
-ãŸã¨ãˆ Ruby ã®ãƒ©ã‚¤ãƒ–ラリディレクトリ㫠tcltklib.so ãŒå­˜åœ¨ã—ã¦ã„ãŸã¨ã—ã¦
-も,実行環境㫠Tcl/Tk ライブラリ (libtcl8.4.so ãªã©) ãŒãªã‘ã‚Œã°æ©Ÿèƒ½ã—ã¾
-ã›ã‚“.Tcl/Tk ãŒæ­£ã—ãインストールã•ã‚Œã¦ã„ã‚‹ã‹ã‚‚ãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„.
-
-==========================================================
- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
diff --git a/ext/tk/README.ActiveTcl b/ext/tk/README.ActiveTcl
deleted file mode 100644
index 990f612648..0000000000
--- a/ext/tk/README.ActiveTcl
+++ /dev/null
@@ -1,62 +0,0 @@
-ActiveTcl is ActiveState's quality-assured distribution of Tcl.
-
-# see <http://www.activestate.com/Products/ActiveTcl/>
-# <http://www.tcl.tk/>
-
-First of all, please try to configure without any options.
-"extconf.rb" searches ActiveTcl as default action.
-If you have ActiveTcl and standard (or your own) Tcl/Tk on your
-environment and don't want to use ActiveTcl on your Ruby/Tk, please
-use --without-ActiveTcl option.
-
-When "extconf.rb" fails to find your ActiveTcl libraries, please try
-the followings.
-
-If you want to use ActiveTcl binary package as the Tcl/Tk libraries,
-please use the following configure options.
-
- --with-ActiveTcl=<ActiveTcl_root>
- ( When without argument; no <ActiveTcl_root>; only '--with-ActiveTcl',
- it same to '--with-ActiveTcl=/opt/ActiveTcl*/lib' )
-
- --with-tcl-dir=<ActiveTcl_root>
- --with-tk-dir=<ActiveTcl_root>
-
-And use the followings if you need.
-
- --with-tcllib=<libname>
- --with-tklib=<libname>
- --enable-tcltk-stubs
-
-For example, when you install ActiveTcl-8.4.x to '/usr/local/ActiveTcl',
-
- configure --with-tcl-dir=/usr/local/ActiveTcl/ \
- --with-tk-dir=/usr/local/ActiveTcl/ \
- --with-tcllib=tclstub8.4 \
- --with-tklib=tkstub8.4 \
- --enable-tcltk-stubs
-
-It depends on your environment that you have to add the directory of
-ActiveTcl's libraries to your library path when execute Ruby/Tk.
-One of the way is to add entries to TCLLIBPATH environment variable,
-and one of the others add to LD_LIBRARY_PATH environment variable
-
-Probably, using TCLLIBPATH is better. The value is appended at the
-head of Tcl's 'auto_path' variable. You can see the value of the
-variable by using 'Tk::AUTO_PATH.value' or 'Tk::AUTO_PATH.list'.
-
-For example, on Linux, one of the ways is to use LD_LIBRARY_PATH
-environment variable.
--------------------------------------------------------------------------
- [bash]$ LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH \
- ruby your-Ruby/Tk-script
-
- [bash]$ LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH irb
--------------------------------------------------------------------------
-Based on it, the Tcl interpreter changes auto_path variable's value.
-
-Then, you'll be able to use Tcl/Tk extension libraries included in the
-ActiveTcl package (e.g. call TkPackage.require('BWidget'), and then,
-use functions/widgets of BWidget extension).
-
- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
diff --git a/ext/tk/README.fork b/ext/tk/README.fork
deleted file mode 100644
index c58d75883b..0000000000
--- a/ext/tk/README.fork
+++ /dev/null
@@ -1,34 +0,0 @@
-Ruby/Tk does NOT support forking the process on which Tk interpreter
-is running (unless NEVER control Tk interpreter under the forked child
-process). In the library 'tk.rb', a Tk interpreter is initialized.
-Therefore, if you want running Tk under a child process, please call
-"require 'tk'" in the child process.
-
-# If do fork and exec(<new Ruby/Tk>) on the child process, you can
-# control Ruby/Tk interpreter on the child process by 'send' command
-# of Tcl/Tk. About this, please see Tk.appsend and Tk.rb_appsend, or
-# 'remote-tk.rb' and the sample 'sample/remote-ip_sample.rb'.
-
-For example, the following sample1 will NOT work, and sample2 will
-work properly.
-
----<sample1: NOT work>---------------------------------------
-require 'tk' ## init Tk interpreter under parent process
-
-exit! if fork ## exit parent process
-
-## child process
-TkButton.new(:text=>'QUIT', :command=>proc{exit}).pack
-Tk.mainloop
--------------------------------------------------------------
-
----<sample2: will work>--------------------------------------
-exit! if fork ## exit main process
-
-## child process
-require 'tk' ## init Tk interpreter under child process
-TkButton.new(:text=>'QUIT', :command=>proc{exit}).pack
-Tk.mainloop
--------------------------------------------------------------
-
- 2004/05/22 Hidetoshi NAGAI
diff --git a/ext/tk/README.macosx-aqua b/ext/tk/README.macosx-aqua
deleted file mode 100644
index d727c01a19..0000000000
--- a/ext/tk/README.macosx-aqua
+++ /dev/null
@@ -1,67 +0,0 @@
-
- *** for MacOS X Aqua (Tcl/Tk Aqua) users ***
-
-First of all, please read README.tcltklib to use Tcl/Tk Aqua Framework.
-
-With Tcl/Tk Aqua libraries, current tcltklib sometimes freezes when
-using Aqua specific dialogs (e.g. Tk.messageBox).
-This is a known bug of Ruby-1.8.4 release.
-
-When you meet the trouble on your GUI, you'll be able to avoid the trouble
-by Tcl/Tk's traditional dialogs.
-If you want to do that, please call some of the following bits of script
-after "require 'tk'".
-
-=================================================================
-# use a traditional dialog for Tk.chooseColor()
-Tk.ip_eval(<<'EOS')
- proc ::tk_chooseColor {args} {
- return [eval tk::dialog::color:: $args]
- }
-EOS
-
-# use a traditional dialog for Tk.getOpenFile() and Tk.getMultipleOpenFile()
-Tk.ip_eval(<<'EOS')
- proc ::tk_getOpenFile {args} {
- if {$::tk_strictMotif} {
- return [eval tk::MotifFDialog open $args]
- } else {
- return [eval ::tk::dialog::file:: open $args]
- }
- }
-EOS
-
-# use a traditional dialog for Tk.getSaveFile() and Tk.getMultipleSaveFile()
-Tk.ip_eval(<<'EOS')
- proc ::tk_getSaveFile {args} {
- if {$::tk_strictMotif} {
- return [eval tk::MotifFDialog save $args]
- } else {
- return [eval ::tk::dialog::file:: save $args]
- }
- }
-EOS
-
-# use a traditional dialog for Tk.messageBox()
-Tk.ip_eval(<<'EOS')
- proc ::tk_messageBox {args} {
- return [eval tk::MessageBox $args]
- }
-EOS
-
-# use a traditional dialog for Tk.chooseDirectory()
-Tk.ip_eval(<<'EOS')
- proc ::tk_chooseDirectory {args} {
- return [eval ::tk::dialog::file::chooseDir:: $args]
- }
-EOS
-=================================================================
-
-Each of them replaces the platform specific dialog command to the
-traditional one.
-
-If you use some MultiTkIp objects, probably, you'll have to call the
-bits of script for each MultiTkIp object.
-
---
-Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
diff --git a/ext/tk/README.tcltklib b/ext/tk/README.tcltklib
deleted file mode 100644
index da343a4f3e..0000000000
--- a/ext/tk/README.tcltklib
+++ /dev/null
@@ -1,152 +0,0 @@
-To compile 'tcltklib', you must have Tcl/Tk libraries on your environment.
-Although 'extconf.rb' script searches Tcl/Tk libraries and header files
-(as default, searches tclConfig.sh/tkConfig.sh and use the defintions on
-those; ActiveTcl has high priority on searching unless --without-ActiveTcl),
-sometimes fails to find them. And then, 'tcltklib' cannot be compiled. If
-Tcl/Tk libraries or header files are installed but are not found, you can
-give the information by arguments of the 'configure' script. Please give
-some or all of the following options.
-
- --with-tk-old-extconf use old "extconf.rb" (default: false).
- If current extconf.rb doesn't work properly
- (or your install process is based on old
- documant about Ruby/Tk install), please try
- this option.
-
- --with-ActiveTcl / --without-ActiveTcl
- --with-ActiveTcl=<dir> search ActiveTcl libraries (default: true).
- When true, try to find installed ActiveTcl.
- When <dir> is given, use it as the ActiveTcl's
- top directory (use <dir>/lib, and so on).
- Old "extconf.rb" doesn't support this option.
-
- --with-tk-shlib-search-path=<paths>
- teach the paths for loading shared-libraries
- to linker.
- <paths> is a path list with the same format
- as PATH environment variable.
- This option may be experimental.
- Old "extconf.rb" doesn't support this option.
-
- --with-tcltkversion=<version>
- --with-tcltkversion=<tclversion>,<tkversion>
- force version of Tcl/Tk library
- (e.g. libtcl8.4g.so & libtk8.4g.so ==> --with-tcltkversion=8.4g
- libtcl8.4.so & libtk8.4g.so ==> --with-tcltkversion=8.4,8.4g)
-
- --enable-tcl-h-ver-check/--disable-tcl-h-ver-check
- --enable-tk-h-ver-check/--disable-tk-h-ver-check
- enable or disable for checking MAJOR_VERSION and
- MINOR_VERSION on tcl.h/tk.h whether match with
- Tcl/Tk libraries' version or not.
-
- --with-tcl-build-dir=<dir>
- --with-tk-build-dir=<dir> If you want to compile with libraries on Tcl/Tk
- build dir (still NOT installed), you must use
- these options.
- (e.g. --with-tcl-build-dir=./build/tcl8.5.9/unix)
- When use these options, --with-tclConfig-dir and
- --with-tkConfig-dir options are ignored (however,
- --with-tclConfig-file and --with-tkConfig-file
- options are still available).
-
- --with-tclConfig-file=<file>/--without-tclConfig-file
- --with-tkConfig-file=<file>/--without-tkConfig-file
- file path of tclConfig.sh/tkConfig.sh, or don't
- refer those.
- If you want use non-standard filenames of config
- files (e.g. tclConfig-static.sh), you must use
- these options.
-
- --with-tclConfig-dir=<dir>
- --with-tkConfig-dir=<dir> the directory contains 'tclConfig.sh' and
- 'tkConfig.sh'.
- Current "extconf.rb" uses the information
- on tclConfig.sh/tkConfig.rb, if possible.
- Old "extconf.rb" doesn't support this option.
-
- --with-tcllib=<libname> (e.g. libtcl8.4.so ==> --with-tcllib=tcl8.4)
- --with-tklib=<libname> (e.g. libtk8.4.so ==> --with-tklib=tk8.4)
-
- --enable-tcltk-stubs (if you force to enable stubs)
- On old "extconf.rb", default is false.
- On current "extconf.rb", default is true when
- tclConfig.sh/tkConfig.sh have TCL_STUB_LIB_SPEC
- /TK_STUB_LIB_SPEC, else default is false.
-
- --with-tcl-dir=<path>
- equal to "--with-tcl-include=<path>/include --with-tcl-lib=<path>/lib"
-
- --with-tk-dir=<path>
- equal to "--with-tk-include=<path>/include --with-tk-lib=<path>/lib"
-
- --with-tcl-include=<dir> the directory contains 'tcl.h'
- --with-tk-include=<dir> the directory contains 'tk.h'
-
- --with-tcl-lib=<dir> the directory contains 'libtcl<version>.so'
- --with-tk-lib=<dir> the directory contains 'libtk<version>.so'
-
- --enable-mac-tcltk-framework (MacOS X) use Tcl/Tk framework
- (Obsolete. Please use '--enable-tcltk-framework'.)
-
- --enable-tcltk-framework use Tcl/Tk framework
-
- --with-tcltk-framework=<dir> the directory contains Tcl/Tk framework;
- "<dir>/Tcl.framework" and "<dir>/Tk.framework".
- When this option is given, it is assumed that
- --enable-tcltk-framework option is given also.
-
- --with-tcl-framework-dir=<dir>
- Tcl framework directory (e.g. "/Library/Frameworks/Tcl.framework")
-
- --with-tk-framework-dir=<dir>
- Tk framework directory (e.g. "/Library/Frameworks/Tk.framework")
-
- --with-tcl-framework-header=<dir>
- Tcl framework headers directory
- (e.g. "/Library/Frameworks/Tcl.framework/Headers")
-
- --with-tk-framework-header=<dir>
- Tk framework headers directory
- (e.g. "/Library/Frameworks/Tk.framework/Headers")
-
-
- --with-X11 / --without-X11 use / not use the X Window System
-
- --with-X11-dir=<path>
- equal to "--with-X11-include=<path>/include --with-X11-lib=<path>/lib"
-
- --with-X11-include=<dir> the directory contais X11 header files
- --with-X11-lib=<dir> the directory contais X11 libraries
-
-
-If you forgot to give the options when do 'configure' on toplevel
-directory of Ruby sources, please try something like as the followings.
-
- $ cd ext/tcltklib
- $ rm Makefile
- $ CONFIGURE_ARGS='--with-tcl-include=/usr/local/include/tcl8.4/ --with-tcllib=tcl8.4 --with-tklib=tk8.4' ruby extconf.rb
-
-
- *** ATTENTION ***
-When your Tcl/Tk libraries are compiled with "pthread support",
-Ruby/Tk may cause "Hang-up" or "Segmentation Fault" frequently.
-If you have such a trouble, please try to use the '--enable-pthread'
-option of the 'configure' command and re-compile Ruby sources.
-It may help you to avoid this trouble. The following configure
-options may be useful.
-
- --enable-tcl-thread/--disable-tcl-thread
- --with-tclConfig-file=<path of 'tclConfig.sh'>
- --with-tkConfig-file=<path of 'tkConfig.sh'>
-
-It is not need that 'tclConfig.sh' is a normal Tcl/Tk's tclConfig.sh.
-But the file is expected to include the line "TCL_THREADS=0" or "...=1".
-When no "TCL_THREADS=?" line, if Tcl version is 7.x or 8.0 which is
-given by "TCL_MAJOR_VERSION=?" line and "TCL_MINOR_VERSION=?" line,
-then --disable-tcl-thread is expected. Else, ignore the 'tclConfig.sh'.
-If --enable-tcl-thread or --disable-tcl-thread option is given, then
---with-tclConfig-file option is ignored.
-
-==========================================================
- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
diff --git a/ext/tk/config_list.in b/ext/tk/config_list.in
deleted file mode 100644
index 143a7b5df6..0000000000
--- a/ext/tk/config_list.in
+++ /dev/null
@@ -1,41 +0,0 @@
-##############################################
-# configure options for Ruby/Tk
-# release date: 2011-06-05
-##############################################
-with tk-old-extconf
-with ActiveTcl
-with tk-shlib-search-path
-enable tcltk-stubs
-with tcltkversion
-enable tcl-h-ver-check
-enable tk-h-ver-check
-with tcl-build-dir
-with tk-build-dir
-with tcl-config
-with tk-config
-with tclConfig-dir
-with tkConfig-dir
-with tclConfig-file
-with tkConfig-file
-with tcllib
-with tklib
-with tcl-dir
-with tk-dir
-with tcl-include
-with tk-include
-with tcl-lib
-with tk-lib
-enable mac-tcltk-framework
-enable tcltk-framework
-with tcltk-framework
-with tcl-framework-dir
-with tk-framework-dir
-with tcl-framework-header
-with tk-framework-header
-with X11
-with X11-dir
-with X11-include
-with X11-lib
-enable pthread
-enable tcl-thread
-enable space-on-tk-libpath
diff --git a/ext/tk/depend b/ext/tk/depend
deleted file mode 100644
index ddbd46ae27..0000000000
--- a/ext/tk/depend
+++ /dev/null
@@ -1,28 +0,0 @@
-# AUTOGENERATED DEPENDENCIES START
-stubs.o: $(RUBY_EXTCONF_H)
-stubs.o: $(arch_hdrdir)/ruby/config.h
-stubs.o: $(hdrdir)/ruby/backward.h
-stubs.o: $(hdrdir)/ruby/defines.h
-stubs.o: $(hdrdir)/ruby/intern.h
-stubs.o: $(hdrdir)/ruby/missing.h
-stubs.o: $(hdrdir)/ruby/ruby.h
-stubs.o: $(hdrdir)/ruby/st.h
-stubs.o: $(hdrdir)/ruby/subst.h
-stubs.o: $(top_srcdir)/include/ruby.h
-stubs.o: stubs.c
-stubs.o: stubs.h
-tcltklib.o: $(RUBY_EXTCONF_H)
-tcltklib.o: $(arch_hdrdir)/ruby/config.h
-tcltklib.o: $(hdrdir)/ruby/backward.h
-tcltklib.o: $(hdrdir)/ruby/defines.h
-tcltklib.o: $(hdrdir)/ruby/encoding.h
-tcltklib.o: $(hdrdir)/ruby/intern.h
-tcltklib.o: $(hdrdir)/ruby/missing.h
-tcltklib.o: $(hdrdir)/ruby/oniguruma.h
-tcltklib.o: $(hdrdir)/ruby/ruby.h
-tcltklib.o: $(hdrdir)/ruby/st.h
-tcltklib.o: $(hdrdir)/ruby/subst.h
-tcltklib.o: $(top_srcdir)/include/ruby.h
-tcltklib.o: stubs.h
-tcltklib.o: tcltklib.c
-# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
deleted file mode 100644
index cb131f07b1..0000000000
--- a/ext/tk/extconf.rb
+++ /dev/null
@@ -1,2098 +0,0 @@
-# frozen_string_literal: false
-##############################################################
-# extconf.rb for tcltklib
-# release date: 2010-07-30
-##############################################################
-require 'mkmf'
-
-TkLib_Config = {}
-TkLib_Config['search_versions'] =
- # %w[8.9 8.8 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6 4.2]
- # %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0]
- # %w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps
- %w[8.6 8.5 8.4]
-
-TkLib_Config['unsupported_versions'] =
- %w[8.8 8.7]
-
-TkLib_Config['major_nums'] = '87'
-
-
-##############################################################
-
-TkLib_Config['enable-shared'] = enable_config("shared")
-
-
-##############################################################
-# use old extconf.rb ?
-##############################################################
-if with_config('tk-old-extconf')
- require File.join(File.dirname(__FILE__), 'old-extconf.rb')
- exit
-end
-
-
-##############################################################
-# check configs
-##############################################################
-($cleanfiles ||= "") << 'config_list'
-config_list_file = 'config_list'
-config_list_file_source = File.join(File.dirname(__FILE__),'config_list.in')
-if !File.exist?(config_list_file) ||
- File.ctime(config_list_file_source) > File.ctime(config_list_file)
- old_config_list_file = config_list_file_source
-else
- old_config_list_file = config_list_file
-end
-
-current_configs = {'with'=>{}, 'enable'=>{}}
-
-# setup keys by config_list.in
-IO.foreach(config_list_file_source){|line|
- line.chomp!
- line.lstrip!
- next if line.empty? || line =~ /^\#/ #
- mode, key, value = line.split(/\s+/, 3)
- value ||= ""
- current_configs[mode][key] = value rescue nil
-}
-
-# define current value of keys
-IO.foreach(old_config_list_file){|line|
- line.chomp!
- line.lstrip!
- next if line.empty? || line =~ /^\#/ #
- mode, key, value = line.split(/\s+/, 3)
- value ||= ""
- if current_configs[mode] && current_configs[mode].has_key?(key)
- current_configs[mode][key] = value
- end
-}
-
-update_flag = false
-current_configs['with'].each_key{|key|
- if (value = with_config(key).to_s) != current_configs['with'][key]
- update_flag = true
- current_configs['with'][key] = value
- end
-}
-current_configs['enable'].each_key{|key|
- if (value = enable_config(key).to_s) != current_configs['enable'][key]
- update_flag = true
- current_configs['enable'][key] = value
- end
-}
-
-# update current_configs
-if update_flag || !File.exist?(config_list_file)
- open(config_list_file, 'w'){|fobj|
- fobj.print("# values of current configure options (generated by extconf.rb)\n");
- ['with', 'enable'].each{|mode|
- current_configs[mode].each_key{|key|
- fobj.print("#{mode} #{key} #{current_configs[mode][key]}\n")
- }
- }
- }
-end
-
-if update_flag
- puts "Configure options for Ruby/Tk may be updated."
- puts "So, delete files which depend on old configs."
- File.delete(*Dir.glob("*.#{CONFIG['DLEXT']}", File::FNM_CASEFOLD))
- File.delete(*Dir.glob("*.#{$OBJEXT}", File::FNM_CASEFOLD))
- File.delete('Makefile') rescue nil
-
-else
- makefile = 'Makefile'
- if File.exist?(makefile) &&
- File.ctime(config_list_file) > File.ctime(makefile)
- # no need to update Makefile
- exit
- end
-end
-
-
-##############################################################
-# functions
-##############################################################
-def is_win32?
- /mswin|mingw|cygwin|bccwin/ =~ RUBY_PLATFORM
-end
-
-def is_macosx?
- /darwin/ =~ RUBY_PLATFORM
-end
-
-def maybe_64bit?
- /64|universal|s390x/ =~ RUBY_PLATFORM
-end
-
-if defined?(Logging.quiet) and Logging.quiet and /--jobserver-fds=/ !~ ENV["MAKEFLAGS"]
- def progress(s)
- print(s)
- end
- def newline
- end
-else
- def progress(s)
- end
- def newline
- puts
- end
-end
-
-def check_tcltk_version(version)
- return [nil, nil] unless version.kind_of? String
-
- tclver, tkver = version.split(',')
- tclver = tclver.strip
- return [tclver, tkver.strip] if tkver
-
- dot = major = minor_dot = minor = plvl_dot = plvl = ext = nil
- if tclver =~ /^(\d)(\.?)(\d)(\.?)(\d*)(.*)$/
- major = $1; minor_dot = $2; minor = $3; plvl_dot = $4; plvl = $5; ext = $6
- dot = ! minor_dot.empty?
- if plvl_dot.empty? && ! plvl.empty?
- minor << plvl
- end
- elsif tclver =~ /^(\d)(\.?)(\d?)(.*)$/
- major = $1; minor_dot = $2; minor = $3; ext = $4
- dot = ! minor_dot.empty?
- else # unknown -> believe user
- return [tclver, tkver]
- end
-
- # check Tcl7.6 / Tk4.2 ?
- if major == "7" # Tcl7.6 ( not support Tclversion < 7.6 )
- # Tk4.2
- tkver = "4" + ((dot)? ".": "") + ((minor.empty)? "": "2") + ext
- elsif major == "4" # Tk4.2 ( not support Tkversion < 4.2 )
- # Tcl7.6
- tkver = tclver
- tclver = "7" + ((dot)? ".": "") + ((minor.empty)? "": "6") + ext
- end
-
- tkver = tclver unless tkver
-
- [tclver, tkver]
-end
-
-def get_shlib_versions(major = 8, minor_max = 9, minor_min = 0, ext = "")
- if tclcfg = TkLib_Config["tclConfig_info"]
- major = tclcfg['TCL_MAJOR_VERSION'].to_i
- minor_min = tclcfg['TCL_MINOR_VERSION'].to_i
-
- elsif TkLib_Config["tcltkversion"]
- tclver, tkver = TkLib_Config["tcltkversion"]
- if tclver =~ /8\.?(\d)(.*)/
- minor_min = $1.to_i
- ext = $2
- else
- # unsupported version
- return [""]
- end
- end
-
- # if disable-stubs, version is fixed.
- minor_max = minor_min unless TkLib_Config["tcltk-stubs"]
-
- vers = []
- minor_max.downto(minor_min){|minor|
- vers << "#{major}.#{minor}#{ext}" unless ext.empty?
- vers << "#{major}.#{minor}"
- }
-
- vers << ""
-end
-
-def get_shlib_path_head
- path_head = []
- path_dirs = []
-
- if TkLib_Config["ActiveTcl"].kind_of?(String) # glob path
- # path_head << TkLib_Config["ActiveTcl"]
- path_head.concat Dir.glob(TkLib_Config["ActiveTcl"], File::FNM_CASEFOLD).sort.reverse
- # path_dirs.concat Dir.glob(File.join(TkLib_Config["ActiveTcl"], 'lib'), File::FNM_CASEFOLD).sort.reverse
- end
-
- if CROSS_COMPILING
- elsif is_win32?
- if TkLib_Config["ActiveTcl"]
- path_head.concat ["c:/ActiveTcl", "c:/Program Files/ActiveTcl",
- "c:/Program Files (x86)/ActiveTcl"]
- end
- path_head.concat [
- "c:/Tcl", "c:/Program Files/Tcl", "c:/Program Files (x86)/Tcl",
- "/Tcl", "/Program Files/Tcl", "/Program Files (x86)/Tcl"
- ]
- path_head.uniq!
- #path_head.each{|dir| path_dirs << dir.dup if File.directory? dir}
- path_head.each{|dir| path_dirs << File.expand_path(dir) if File.directory? dir}
-
- # for MinGW
- ["/usr/local/lib64", "/usr/lib64", "/usr/local/lib", "/usr/lib"].each{|dir|
- #path_dirs << dir if File.directory? dir
- path_dirs << File.expand_path(dir) if File.directory? dir
- }
- path_dirs |= ENV['LIBRARY_PATH'].split(';').find_all{|dir| File.directory? dir}.map{|dir| File.expand_path(dir)} if ENV['LIBRARY_PATH']
- path_dirs |= ENV['PATH'].split(';').find_all{|dir| File.directory? dir}.map{|dir| File.expand_path(dir)} if ENV['PATH']
-
- else
- [
- '/opt', '/pkg', '/share',
- '/usr/local/opt', '/usr/local/pkg', '/usr/local/share', '/usr/local',
- '/usr/opt', '/usr/pkg', '/usr/share', '/usr/contrib', '/usr'
- ].each{|dir|
- next unless File.directory?(dir)
-
- path_dirs << "#{dir}/lib64" if maybe_64bit?
- path_dirs << "#{dir}/lib"
- path_dirs << "#{dir}" unless Dir.glob("#{dir}/lib*.*", File::FNM_CASEFOLD).empty?
-
- dirnames = []
- if TkLib_Config["ActiveTcl"]
- dirnames.concat ["ActiveTcl"]
- end
- dirnames.concat ["TclTk","Tcl_Tk","Tcl-Tk"]
-
- dirnames.each{|name|
- path_dirs << "#{dir}/#{name}" if File.directory?("#{dir}/#{name}")
- path_head << "#{dir}/#{name}" unless Dir.glob("#{dir}/#{name}[-89_]*", File::FNM_CASEFOLD).empty?
- }
- }
- end
-
- unless TkLib_Config["space-on-tk-libpath"]
- path_head.delete_if{|path| path =~ / /}
- path_dirs.delete_if{|path| path =~ / /}
- end
-
- [path_head, path_dirs]
-end
-
-def find_macosx_framework
- use_framework = is_macosx? && TkLib_Config["ActiveTcl"]
-
- use_framework ||= (tcl_hdr = with_config("tcl-framework-header"))
- use_framework ||= (tk_hdr = with_config("tk-framework-header"))
- tcl_hdr = nil unless tcl_hdr.kind_of? String
- tk_hdr = nil unless tk_hdr.kind_of? String
- TkLib_Config["tcl-framework-header"] = tcl_hdr
- TkLib_Config["tk-framework-header"] = tk_hdr
-
- use_framework ||= (tcl_dir = with_config("tcl-framework-dir"))
- tcl_dir = nil unless tcl_dir.kind_of? String
- if !tcl_dir && tcl_hdr
- # e.g. /Library/Frameworks/Tcl.framework/Headers
- # ==> /Library/Frameworks/Tcl.framework
- tcl_dir = File.dirname(tcl_hdr.strip.chomp('/'))
- end
- TkLib_Config["tcl-framework-dir"] = tcl_dir
-
- use_framework ||= (tk_dir = with_config("tk-framework-dir"))
- tk_dir = nil unless tk_dir.kind_of? String
- if !tk_dir && tk_hdr
- # e.g. /Library/Frameworks/Tk.framework/Headers
- # ==> /Library/Frameworks/Tk.framework
- tk_dir = File.dirname(tk_hdr.strip.chomp('/'))
- end
- TkLib_Config["tk-framework-dir"] = tk_dir
-
- if tcl_dir && !tk_dir
- tk_dir = File.join(File.dirname(tcl_dir), 'Tk.framework')
- TkLib_Config["tk-framework-dir"] = tk_dir
- elsif !tcl_dir && tk_dir
- tcl_dir = File.join(File.dirname(tk_dir), 'Tcl.framework')
- TkLib_Config["tcl-framework-dir"] = tcl_dir
- end
- if tcl_dir && tk_dir
- TkLib_Config["tcltk-framework"] = File.dirname(tcl_dir) unless TkLib_Config["tcltk-framework"]
- return [tcl_dir, tk_dir]
- end
-
- # framework is disabled?
- if with_config("tcltk-framework") == false ||
- enable_config("tcltk-framework") == false
- return false
- end
-
- use_framework ||= (framework_dir = with_config("tcltk-framework"))
- if framework_dir.kind_of? String
- TkLib_Config["tcltk-framework"] = framework_dir.strip.chomp('/')
- return [File.join(TkLib_Config["tcltk-framework"], 'Tcl.framework'),
- File.join(TkLib_Config["tcltk-framework"], 'Tk.framework')]
- end
-
- unless enable_config("tcltk-framework", use_framework) ||
- enable_config("mac-tcltk-framework", use_framework)
- TkLib_Config["tcltk-framework"] = false
- return false
- end
-
- paths = [
- #"~/Library/Frameworks",
- "/Library/Frameworks",
- "/Network/Library/Frameworks", "/System/Library/Frameworks"
- ]
- paths.reverse! unless TkLib_Config["ActiveTcl"] # system has higher priority
-
- paths.map{|dir| dir.strip.chomp('/')}.each{|dir|
- next unless File.exist?(File.join(dir, "Tcl.framework", "Headers"))
- next unless File.directory?(tcldir = File.join(dir, "Tcl.framework"))
- next unless File.exist?(File.join(dir, "Tk.framework", "Headers"))
- next unless File.directory?(tkdir = File.join(dir, "Tk.framework"))
- TkLib_Config["tcltk-framework"] = dir
- return [tcldir, tkdir]
- }
-
- nil
-end
-
-def collect_tcltk_defs(tcl_defs_str, tk_defs_str)
- conflicts = [
- 'PACKAGE_NAME', 'PACKAGE_TARNAME', 'PACKAGE_VERSION',
- 'PACKAGE_STRING', 'PACKAGE_BUGREPORT'
- ]
-
- begin
- # Ruby 1.9.x or later
- arch_config_h = RbConfig.expand($arch_hdrdir + "/ruby/config.h")
- if File.exist?(arch_config_h)
- keys = []
- IO.foreach(arch_config_h){|line|
- if line =~ /^#define +([^ ]+)/
- keys << $1
- end
- }
- conflicts = keys
- end
- rescue
- # ignore, use default
- end
-
- if tcl_defs_str
- tcl_defs = tcl_defs_str.split(/(?:\A|\s)\s*-D/).map{|s|
- s =~ /^([^=]+)(.*)$/
- [$1, $2]
- }
- else
- tcl_defs = []
- end
-
- if tk_defs_str
- tk_defs = tk_defs_str.split(/(?:\A|\s)\s*-D/).map{|s|
- s =~ /^([^=]+)(.*)$/
- [$1, $2]
- }
- else
- tk_defs = []
- end
-
- defs = tcl_defs | tk_defs
-
- defs.delete_if{|name,value|
- conflicts.include?(name) ||
- ( (vtcl = tcl_defs.assoc(name)) && (vtk = tk_defs.assoc(name)) &&
- vtcl != vtk )
- }
-
- defs.map{|ary| /\S/ =~ (s = ary.join('')) and "-D" << s.strip}.compact
-end
-
-def parse_tclConfig(file)
- # check tclConfig.sh/tkConfig.sh
- tbl = Hash.new{|h,k| h[k] = ""}
- return tbl unless file
- IO.foreach(file){|line|
- line.strip!
- next if line !~ /^([^\#=][^=]*)=(['"]|)(.*)\2$/
- key, val = $1, $3
- tbl[key] = val.gsub(/\$\{([^}]+)\}/){|s|
- subst = $1
- (tbl[subst])? tbl[subst]: s
- } rescue nil
- }
- tbl
-end
-
-def get_libpath(lib_flag, lib_spec)
- # get libpath from {TCL,Tk}_LIB_FLAG and {TCL,Tk}_LIB_SPEC
- lib_spec.gsub(/(#{lib_flag}|-L)/, "").strip
-end
-
-def get_tclConfig_dirs
- config_dir = []
-
- if CROSS_COMPILING
- elsif is_win32?
- if TkLib_Config["ActiveTcl"]
- dirs = []
- if TkLib_Config["ActiveTcl"].kind_of?(String)
- dirs << File.join(TkLib_Config["ActiveTcl"], 'lib')
- end
- dirs.concat [
- "c:/ActiveTcl*/lib", "c:/Tcl*/lib",
- "c:/Program Files*/ActiveTcl*/lib", "c:/Program Files*/Tcl*/lib",
- "/ActiveTcl*/lib", "/Tcl*/lib",
- "/Program Files*/ActiveTcl*/lib", "/Program Files*/Tcl*/lib"
- ]
- else
- dirs = [
- "c:/Tcl*/lib", "c:/Program Files*/Tcl*/lib",
- "/Tcl*/lib", "/Program Files*/Tcl*/lib"
- ]
- end
- dirs = dirs.collect{|d| Dir.glob(d, File::FNM_CASEFOLD)}.flatten.uniq
-
- dirs |= ENV['LIBRARY_PATH'].split(';') if ENV['LIBRARY_PATH']
- dirs |= ENV['PATH'].split(';') if ENV['PATH']
-
- exeext = RbConfig::CONFIG['EXEEXT']
- ENV['PATH'].split(File::PATH_SEPARATOR).each{|dir|
- dir.tr!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
- next if Dir.glob(File.join(dir, "{tclsh,wish}*#{exeext}"), File::FNM_CASEFOLD).empty?
- dirs << File.expand_path(File.join(dir, '..', 'lib'))
- dirs << dir
- # dirs << File.expand_path(File.join(dir, '..'))
- }
-
- unless TkLib_Config["space-on-tk-libpath"]
- dirs.delete_if{|path| path =~ / /}
- end
-
- config_dir.concat(dirs.zip(dirs))
-
- else
- if framework = find_macosx_framework()
- config_dir.unshift(framework)
- end
-
- if activeTcl = TkLib_Config['ActiveTcl']
- # check latest version at first
- if is_macosx?
- base = File.expand_path(activeTcl)
- config_dir << [
- File.join(base, 'Tcl.framework'), File.join(base, 'Tk.framework')
- ]
-
- config_dir << [
- File.join(base, 'Tcl.framework', 'Versions', 'Current'),
- File.join(base, 'Tk.framework', 'Versions', 'Current')
- ]
-
- Dir.glob(File.join(base, 'Tcl.framework',
- 'Versions', '*')).sort.reverse.each{|dir|
- next if dir =~ /Current/
- config_dir << [dir, dir.gsub(/Tcl/, 'Tk')]
- }
- else
- config_dir.concat(Dir.glob(File.join(activeTcl, 'lib'), File::FNM_CASEFOLD).sort.reverse)
- end
- end
-
- config_dir << RbConfig::CONFIG['libdir']
-
- ((maybe_64bit?)? ['lib64', 'lib']: ['lib']).each{|dir|
- config_dir.concat [
- File.join(RbConfig::CONFIG['exec_prefix'], dir),
- File.join(RbConfig::CONFIG['prefix'], dir),
- "/usr/local/opt/#{dir}", "/usr/local/pkg/#{dir}",
- "/usr/local/share/#{dir}", "/usr/local/#{dir}",
- "/usr/opt/#{dir}", "/usr/pkg/#{dir}", "/usr/share/#{dir}",
- "/usr/contrib/#{dir}", "/usr/#{dir}"
- ]
- }
-
- config_dir.concat [
- '/opt', '/pkg', '/share',
- '/usr/local/opt', '/usr/local/pkg', '/usr/local/share', '/usr/local',
- '/usr/opt', '/usr/pkg', '/usr/share', '/usr/contrib', '/usr'
- ].map{|dir|
- Dir.glob(dir + "/{tcltk,tcl,tk}[#{TkLib_Config['major_nums']}*/lib",
- File::FNM_CASEFOLD)
- Dir.glob(dir + "/{tcltk,tcl,tk}[#{TkLib_Config['major_nums']}*",
- File::FNM_CASEFOLD)
- Dir.glob(dir + '/{tcltk,tcl,tk}/lib', File::FNM_CASEFOLD)
- Dir.glob(dir + '/{tcltk,tcl,tk}', File::FNM_CASEFOLD)
- }.flatten!
-
- exeext = RbConfig::CONFIG['EXEEXT']
- ENV['PATH'].split(File::PATH_SEPARATOR).each{|dir|
- dir.tr!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
- next if Dir.glob(File.join(dir, "{tclsh,wish}*#{exeext}"), File::FNM_CASEFOLD).empty?
- config_dir << File.expand_path(File.join(dir, '..', 'lib'))
- }
-
- # for MacOS X
- paths = [
- #"~/Library/Tcl",
- "/Library/Tcl", "/Network/Library/Tcl", "/System/Library/Tcl"
- ]
- paths.reverse! unless TkLib_Config["ActiveTcl"]
-
- paths.each{|path|
- config_dir << path
- config_dir.concat(Dir.glob(File.join(path, '{tcl,tk}*'), File::FNM_CASEFOLD).sort.reverse.find_all{|d| File.directory?(d)})
- }
-
- paths = [
- #"~/Library/Frameworks",
- "/Library/Frameworks",
- "/Network/Library/Frameworks", "/System/Library/Frameworks"
- ]
- paths.reverse! unless TkLib_Config["ActiveTcl"]
-
- paths.each{|frmwk|
- base = File.expand_path(frmwk)
- config_dir << [
- File.join(base, 'Tcl.framework'), File.join(base, 'Tk.framework')
- ]
-
- config_dir << [
- File.join(base, 'Tcl.framework', 'Versions', 'Current'),
- File.join(base, 'Tk.framework', 'Versions', 'Current')
- ]
-
- Dir.glob(File.join(base, 'Tcl.framework',
- 'Versions', '*')).sort.reverse.each{|dir|
- next if dir =~ /Current/
- config_dir << [dir, dir.gsub(/Tcl/, 'Tk')]
- }
- }
- end
-
- config_dir
-end
-
-def get_ext_list()
- exts = [CONFIG['DLEXT']]
- exts.concat %w(dll) if is_win32?
- exts.concat %w(bundle dylib) if is_macosx?
-
- if TkLib_Config["tcltk-stubs"] || TkLib_Config['enable-shared'] == false
- exts.unshift "lib" if is_win32?
- exts.unshift "a"
- exts.unshift CONFIG['LIBEXT']
- end
-
- if is_win32?
- exts.map!{|ext| [ext.downcase, ext.upcase]}.flatten!
- end
-
- exts
-end
-
-def libcheck_for_tclConfig(tcldir, tkdir, tclconf, tkconf)
- tcllib_ok = tklib_ok = false
-
- if TkLib_Config["tcltk-stubs"]
- stub = "stub"
- tclfunc = "Tcl_InitStubs"
- tkfunc = "Tk_InitStubs"
- else
- stub = ""
- tclfunc = "Tcl_FindExecutable"
- tkfunc = "Tk_Init"
- end
-
- incflags = ($INCFLAGS ||= "").dup
- libpath = ($LIBPATH ||= []).dup
- libs_param = ($libs ||= "").dup
- tcllibs = nil
- mkmf_param = nil
-
- tclver, tkver = TkLib_Config["tcltkversion"]
- exts = "(" + get_ext_list.join('|') + ")"
-
- if tclver
- tcl_glob = "*tcl#{stub}#{tclver}.*"
- tcl_regexp = /^.*(tcl#{stub}#{tclver}.*)\.(#{exts}).*$/
- elsif tclconf
- tcl_glob = "*tcl#{stub}#{tclconf['TCL_MAJOR_VERSION']}{.,}#{tclconf['TCL_MINOR_VERSION']}*.*"
- tcl_regexp = /^.*(tcl#{stub}#{tclconf['TCL_MAJOR_VERSION']}(?:\.|)#{tclconf['TCL_MINOR_VERSION']}.*)\.(#{exts}).*$/
- end
- if tkver
- tk_glob = "*tk#{stub}#{tkver}.*"
- tk_regexp = /^.*(tk#{stub}#{tkver}.*)\.(#{exts}).*$/
- elsif tkconf
- tk_glob = "*tk#{stub}#{tkconf['TK_MAJOR_VERSION']}{.,}#{tkconf['TK_MINOR_VERSION']}*.*"
- tk_regexp = /^.*(tk#{stub}#{tkconf['TK_MAJOR_VERSION']}(?:\.|)#{tkconf['TK_MINOR_VERSION']}.*)\.#{exts}.*$/
- end
-
- tcllib_ok ||= !tclconf || Dir.glob(File.join(tcldir, tcl_glob), File::FNM_CASEFOLD).find{|file|
- if file =~ tcl_regexp
- libname = $1
- ext = $2.downcase
- begin
- $INCFLAGS = incflags.dup << " " << tclconf["TCL_INCLUDE_SPEC"]
- #puts "check #{file} #{$1} #{tclfunc} #{tcldir}"
- #find_library($1, tclfunc, tcldir)
- if (tclconf && tclconf["TCL_SHARED_BUILD"] == "0") ||
- (ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a"
- # static link
- tcllibs = $libs + " -DSTATIC_BUILD " + file.quote
-
- # FIX ME: avoid pathname trouble (fail to find) on MinGW.
- # e.g. TCL_INCLUDE_SPEC describes "-I/usr/local/include",
- # but compiler can find "-IC:/msys/1.0/local/include" only.
- $INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32?
- else
- tcllibs = append_library($libs, libname)
- tcllibs = "#{libpathflag([tcldir])} #{tcllibs}"
-
- # FIX ME: avoid pathname trouble (fail to find) on MinGW.
- $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
- end
-
- $LIBPATH = libpath | [tcldir]
- try_func(tclfunc, tcllibs, ["tcl.h"]) ||
- ( try_func(tclfunc, tcllibs << " " << tclconf['TCL_LIBS'], ["tcl.h"]) if tclconf['TCL_LIBS'] )
-
- ensure
- mkmf_param = {
- 'PATH' => file,
- 'LIBNAME' => libname,
- 'libs' => tcllibs.dup,
- 'INCFLAGS' => $INCFLAGS.dup,
- 'LIBPATH' => $LIBPATH.dup,
- }
- $LIBPATH = libpath.dup
- $libs = libs_param.dup
- end
- end
- }
- tclconf['MKMF_PARAMS'] = mkmf_param if tclconf && tcllib_ok
-
- tklib_ok ||= !tkconf || Dir.glob(File.join(tkdir, tk_glob), File::FNM_CASEFOLD).find{|file|
- if file =~ tk_regexp
- libname = $1
- ext = $2.downcase
- begin
- #puts "check #{file} #{$1} #{tkfunc} #{tkdir}"
- # find_library($1, tkfunc, tkdir)
- if (tkconf && tkconf["TCL_SHARED_BUILD"] == "0") ||
- (ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) || ext == "a"
- # static link
- tklibs = " -DSTATIC_BUILD " + file.quote
-
- # FIX ME: avoid pathname trouble (fail to find) on MinGW.
- $INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32?
- else
- tklibs = append_library("", libname)
- #tklibs = append_library("", $1)
- tklibs = "#{libpathflag([tkdir])} #{tklibs}"
-
- # FIX ME: avoid pathname trouble (fail to find) on MinGW.
- $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
- end
-
- tklibs << " " << tcllibs if tcllibs
- tmp_tklibs = tklibs.dup
- $LIBPATH = libpath | [tkdir]
- try_func(tkfunc, tklibs, ["tcl.h", "tk.h"]) ||
- ( try_func(tkfunc, tklibs << " " << tkconf['TK_LIBS'], ["tcl.h", "tk.h"]) if tkconf['TK_LIBS'] ) ||
- ( try_func(tkfunc, (tklibs = tmp_tklibs.dup) << " " << tkconf['TK_XLIBSW'], ["tcl.h", "tk.h"]) if tkconf['TK_XLIBSW'] ) ||
- ( try_func(tkfunc, tklibs << " " << tkconf['TK_LIBS'], ["tcl.h", "tk.h"]) if tkconf['TK_LIBS'] )
-
- ensure
- mkmf_param = {
- 'PATH' => file,
- 'LIBNAME' => libname,
- 'libs' => tklibs.dup,
- 'INCFLAGS' => $INCFLAGS.dup,
- 'LIBPATH' => $LIBPATH.dup,
- }
- $LIBPATH = libpath.dup
- $libs = libs_param.dup
- end
- end
- }
-
- $INCFLAGS = incflags.dup
- tkconf['MKMF_PARAMS'] = mkmf_param if tkconf && tklib_ok
-
- [tcllib_ok, tklib_ok]
-end
-
-def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
- TkLib_Config["tclConfig_paths"] = []
-
- paths.compact!
- if paths.empty?
- config_dir = get_tclConfig_dirs
- elsif paths.length == 1 && !paths[0][0] && !paths[0][1]
- config_dir = get_tclConfig_dirs.map{|dir|
- if dir.kind_of? Array
- [ (paths[0][0] == false)? nil: dir[0],
- (paths[0][1] == false)? nil: dir[1] ]
- else
- [ (paths[0][0] == false)? nil: dir,
- (paths[0][1] == false)? nil: dir ]
- end
- }
- else
- # fixed tclConfig
- config_dir = []
- paths.each{|path|
- if path.kind_of?(Array)
- config_dir << path
- else
- dirs = Dir.glob(path, File::FNM_CASEFOLD)
- config_dir.concat(dirs.zip(dirs))
- end
- }
- end
-
- tclver, tkver = TkLib_Config['tcltkversion']
- if tclver && tclver =~ /^\D*(\d)\.?(\d)?/ # ignore PATCH_LEVEL
- tclver_major = $1
- tclver_minor = $2
- else
- tclver_major = nil
- tclver_minor = nil
- end
- if tkver && tkver =~ /^\D*(\d)\.?(\d)?/ # ignore PATCH_LEVEL
- tkver_major = $1
- tkver_minor = $2
- else
- tkver_major = nil
- tkver_minor = nil
- end
-
- conf = nil
- progress_flag = false
-
- config_dir.uniq!
- config_dir.map{|dir|
- if dir.kind_of? Array
- [ (dir[0])? dir[0].strip.chomp('/'): nil,
- (dir[1])? dir[1].strip.chomp('/'): nil ]
- else
- dir.strip.chomp('/')
- end
- }.each{|dir|
- progress("."); progress_flag = true
- # print("check #{dir} ==>");
- if dir.kind_of? Array
- tcldir, tkdir = dir
- else
- tcldir = tkdir = dir
- end
-
- tails = ['Config-shared.sh', 'config-shared.sh', 'Config.sh', 'config.sh']
-
- if tcldir
- if File.file?(tcldir)
- tclcfg_files = [tcldir] * tails.length
- else
- tclcfg_files = tails.map{|f| File.join(tcldir, 'tcl' << f)}
- end
- else
- tclcfg_files = [nil] * tails.length
- end
-
- if tkdir
- if File.file?(tkdir)
- tkcfg_files = [tkdir] * tails.length
- else
- tkcfg_files = tails.map{|f| File.join(tkdir, 'tk' << f)}
- end
- else
- tkcfg_files = [nil] * tails.length
- end
-
- tclcfg_files.zip(tkcfg_files).map{|tclpath, tkpath|
- [ (tclpath && File.exist?(tclpath))? File.expand_path(tclpath): tclpath,
- (tkpath && File.exist?(tkpath))? File.expand_path(tkpath): tkpath ]
- }.uniq.each{|tclpath, tkpath|
- next if tclpath && !File.exist?(tclpath)
- next if tkpath && !File.exist?(tkpath)
-
- # parse tclConfig.sh/tkConfig.sh
- tclconf = (tclpath)? parse_tclConfig(tclpath): nil
- if tclconf
- if tclver && ((tclver_major && tclver_major != tclconf['TCL_MAJOR_VERSION']) || (tclver_minor && tclver_minor != tclconf['TCL_MINOR_VERSION']))
- print("\n") if progress_flag
- puts "Ignore \"#{tclpath}\" (unmatch with configured version)."
- progress_flag = false
- next
- end
- if TkLib_Config['unsupported_versions'].find{|ver| ver == "#{tclconf['TCL_MAJOR_VERSION']}.#{tclconf['TCL_MINOR_VERSION']}"}
- print("\n") if progress_flag
- puts "Ignore \"#{tclpath}\" (unsupported version of Tcl/Tk)."
- progress_flag = false
- next
- end
- end
-
- tkconf = (tkpath)? parse_tclConfig(tkpath): nil
- if tkconf
- if tkver && ((tkver_major && tkver_major != tkconf['TK_MAJOR_VERSION']) || (tkver_minor && tkver_minor != tkconf['TK_MINOR_VERSION']))
- print("\n") if progress_flag
- puts "Ignore \"#{tkpath}\" (unmatch with configured version)."
- progress_flag = false
- next
- end
- if TkLib_Config['unsupported_versions'].find{|ver| ver == "#{tkconf['TK_MAJOR_VERSION']}.#{tkconf['TK_MINOR_VERSION']}"}
- print("\n") if progress_flag
- puts "Ignore \"#{tkpath}\" (unsupported version of Tcl/Tk)."
- progress_flag = false
- next
- end
- end
-
- # nativethread check
- if !TkLib_Config["ruby_with_thread"]
- if tclconf
- if tclconf['TCL_THREADS'] == '1'
- puts "\nWARNING: found #{tclpath.inspect}, but it WITH nativethread-support under ruby WITHOUT nativethread-support. So, ignore it."
- TkLib_Config["tcl-NG-path"] << File.dirname(tclpath)
- next
- end
- else
- puts "\nWARNING: When not refer tclConfig.sh, cannot check native-thread support on Tcl/Tk libraries. Ruby, which is used now, does NOT support native-thread. So, if Tcl/Tk libraries support native-thread, it will NOT work properly."
- end
- end
-
- # find tclConfig.sh & tkConfig.sh
- conf = [tclconf, tkconf] unless conf
-
- # check Tcl library
- if is_macosx? && TkLib_Config["tcltk-framework"]
- # if use framework, not check (believe it is installed properly)
- tcllib_ok = tklib_ok = true
- else
- tcllib_ok, tklib_ok =
- libcheck_for_tclConfig((tclpath)? File.dirname(tclpath): nil,
- (tkpath)? File.dirname(tkpath): nil,
- tclconf, tkconf)
- end
-
- unless tcllib_ok && tklib_ok
- unless tcllib_ok
- puts "\nWARNING: found #{tclpath.inspect}, but cannot find valid Tcl library for the tclConfig.sh. So, ignore it."
- TkLib_Config["tcl-NG-path"] << File.dirname(tclpath)
- end
- unless tklib_ok
- puts "\nWARNING: found #{tkpath.inspect}, but cannot find valid Tk library for the tkConfig.sh. So, ignore it."
- TkLib_Config["tk-NG-path"] << File.dirname(tkpath)
- end
- next
- end
-
- #return [tclpath, tkpath]
- # print(" #{[tclpath, tkpath].inspect}");
- TkLib_Config["tclConfig_paths"] << [tclpath, tkpath]
- }
-
- # print("\n");
- }
-
- if is_macosx? && TkLib_Config["tcltk-stubs"]
- CONFIG['LDSHARED'] << " -Xlinker -bind_at_load"
- if config_string('LDSHAREDXX')
- config_string('LDSHAREDXX') << " -Xlinker -bind_at_load"
- end
- end
-
- if TkLib_Config["tclConfig_paths"].empty?
- [nil, nil]
- else
- # find tclConfig.sh and tkConfig.sh
- TkLib_Config["tclConfig_info"], TkLib_Config["tkConfig_info"] = conf
- TkLib_Config["tclConfig_paths"][0]
- end
-end
-
-def get_tclConfig(tclConfig_file, tkConfig_file, tclConfig_dir, tkConfig_dir)
- use_tclConfig = tclConfig_file != false && tclConfig_dir != false
- use_tkConfig = tkConfig_file != false && tkConfig_dir != false
-
- unless use_tclConfig || use_tkConfig
- puts("Don't use [tclConfig.sh, tkConfig.sh]")
- return [nil, nil]
- end
-
- tclConfig_file = nil unless tclConfig_file.kind_of? String
- tkConfig_file = nil unless tkConfig_file.kind_of? String
- tclConfig_dir = nil unless tclConfig_dir.kind_of? String
- tkConfig_dir = nil unless tkConfig_dir.kind_of? String
-
- if use_tclConfig && !tclConfig_dir
- if tclConfig_file
- tclConfig_dir = File.dirname(tclConfig_file)
- elsif tkConfig_dir
- tclConfig_dir = tkConfig_dir
- end
- end
- if use_tkConfig && !tkConfig_dir
- if tkConfig_file
- tkConfig_dir = File.dirname(tkConfig_file)
- elsif tclConfig_dir
- tkConfig_dir = tclConfig_dir
- end
- end
- tkConfig_dir ||= tclConfig_dir
-
- if use_tclConfig
- TkLib_Config["tclConfig-file"] = tclConfig_file
- TkLib_Config["tclConfig-dir"] = tclConfig_dir
- else
- tclConfig_file = false
- tclConfig_dir = false
- end
- if use_tkConfig
- TkLib_Config["tkConfig-file"] = tkConfig_file
- TkLib_Config["tkConfig-dir"] = tkConfig_dir
- else
- tkConfig_file = false
- tkConfig_dir = false
- end
-
- print ("Don't use tclConfig.sh (specified by configure option).\n") unless use_tclConfig
- print ("Don't use tkConfig.sh (specified by configure option).\n") unless use_tkConfig
- print("Search ")
- print("tclConfig.sh", (tclConfig_dir)? " (in #{tclConfig_dir})": "") if use_tclConfig
- print((use_tclConfig)? " and ": "", "tkConfig.sh", (tkConfig_dir)? " (in #{tkConfig_dir})": "") if use_tkConfig
- print(".")
-
- if tclConfig_dir || tkConfig_dir || !use_tclConfig || !use_tkConfig
- tclConfig, tkConfig =
- search_tclConfig([ ((tclConfig_file)? tclConfig_file: tclConfig_dir),
- ((tkConfig_file)? tkConfig_file: tkConfig_dir) ])
- else
- tclConfig, tkConfig = search_tclConfig()
- end
- print("\n")
- # TclConfig_Info = TkLib_Config["tclConfig_info"]
- # TkConfig_Info = TkLib_Config["tkConfig_info"]
-
- if tclConfig || tkConfig
- dirs = TkLib_Config["tclConfig_paths"].map{|tclpath, tkpath|
- [ (tclpath)? File.dirname(tclpath): nil,
- (tkpath)? File.dirname(tkpath): nil ]
- }
- dirs |= dirs
- puts("Valid [tclConfig.sh, tkConfig.sh] are found in #{dirs.inspect}")
- puts("Use [tclConfig.sh, tkConfig.sh] == #{[tclConfig, tkConfig].inspect}")
- $LIBPATH ||= []
- $LIBPATH |= [File.dirname(tclConfig)] if tclConfig
- $LIBPATH |= [File.dirname(tkConfig)] if tkConfig
- #TkLib_Config["tclConfig_paths"].each{|tclcfg, tkcfg|
- # $LIBPATH |= [File.dirname(tclcfg)] | [File.dirname(tkcfg)]
- #}
- else
- puts("Fail to find [tclConfig.sh, tkConfig.sh]")
- end
-
- [tclConfig, tkConfig]
-end
-
-def check_tcl_NG_path(path_list)
- path_list.find_all{|path| not TkLib_Config["tcl-NG-path"].include?(path) }
-end
-
-def check_tk_NG_path(path_list)
- path_list.find_all{|path| not TkLib_Config["tk-NG-path"].include?(path) }
-end
-
-def check_NG_path(path_list)
- path_list.find_all{|path|
- not (TkLib_Config["tcl-NG-path"].include?(path) &&
- TkLib_Config["tk-NG-path"].include?(path))
- }
-end
-
-def check_shlib_search_path(paths)
- if !paths || paths.empty?
- path_list = []
-
- #if TkLib_Config["ActiveTcl"]
- # path_list.concat Dir.glob(TkLib_Config["ActiveTcl"], File::FNM_CASEFOLD).sort.reverse
- #end
- if TkLib_Config["ActiveTcl"].kind_of?(String) # glob path
- path_list.concat Dir.glob(TkLib_Config["ActiveTcl"], File::FNM_CASEFOLD).sort.reverse
- end
-
- vers = get_shlib_versions
- path_head, path_dirs = get_shlib_path_head
-
- path_list.concat vers.map{|ver|
- path_head.map{|head|
- if ver.empty?
- head + "/lib"
- else
- dirs = []
-
- if Dir.glob(head, File::FNM_CASEFOLD).find{|dir| dir == head}
- dirs << head + "/lib"
- end
-
- if !Dir.glob(head + "-*", File::FNM_CASEFOLD).empty?
- dirs << head + "-#{ver}/lib" if !Dir.glob(head + "-[89].*", File::FNM_CASEFOLD).empty?
- dirs << head + "-#{ver.delete('.')}/lib" if !Dir.glob(head + "-[89][0-9]*", File::FNM_CASEFOLD).empty?
- end
-
- if !Dir.glob(head + "[_-]*", File::FNM_CASEFOLD).empty?
- dirs << head + "_#{ver}/lib" if !Dir.glob(head + "_[89].*", File::FNM_CASEFOLD).empty?
- dirs << head + "-#{ver}/lib" if !Dir.glob(head + "-[89].*", File::FNM_CASEFOLD).empty?
- dirs << head + "_#{ver.delete('.')}/lib" if !Dir.glob(head + "_[89][0-9]*", File::FNM_CASEFOLD).empty?
- dirs << head + "-#{ver.delete('.')}/lib" if !Dir.glob(head + "-[89][0-9]*", File::FNM_CASEFOLD).empty?
- end
-
- dirs
- end
- }
- }.flatten!
-
- path_list.concat path_dirs
-
- else
- # paths is a string with PATH environment style
- path_list = paths.split((is_win32?)? ';': ':')
- end
-
- path_list = check_NG_path(path_list)
- path_list.map!{|path| path.strip}
-
- if !CROSS_COMPILING and (is_win32? || is_macosx?)
- # exist-dir only
- path_list.delete_if{|path| Dir.glob(File.join(path, "*.{a,so,dll,lib}")).empty?}
- end
-
- # keep paths for searching dynamic libs
- #$LIBPATH |= path_list
- path_list.uniq
-end
-
-def search_vers_on_path(vers, path, *heads)
- exts = get_ext_list.join(',')
- files = Dir.glob(File.join(path, "*{#{heads.join(',')}}*.{#{exts}}"), File::FNM_CASEFOLD)
- vers.find_all{|ver| files.find{|f| f =~ /(#{ver}|#{ver.delete('.')})/} }
-end
-
-def find_tcl(tcllib, stubs, version, *opt_paths)
- if TclConfig_Info['MKMF_PARAMS']
- # already checked existence of tcl library based on tclConfig.sh
- ($INCFLAGS ||= "") << " " << TclConfig_Info['MKMF_PARAMS']['INCFLAGS']
- $LIBPATH ||= []; $LIBPATH |= TclConfig_Info['MKMF_PARAMS']['LIBPATH']
- ($libs ||= "") << " " << TclConfig_Info['MKMF_PARAMS']['libs']
- return [true, nil, nil, nil]
- end
- # else, no available tclConfig.sh on the system
-
- print "Search Tcl library"
-
- if stubs
- func = "Tcl_InitStubs"
- lib = "tclstub"
- else
- func = "Tcl_FindExecutable"
- lib = "tcl"
- end
-
- if version && ! version.empty?
- versions = [version]
- else
- versions = TkLib_Config['search_versions']
- end
-
- default_paths = []
-
- default_paths.concat [
- RbConfig::CONFIG['libdir'],
- File.join(RbConfig::CONFIG['exec_prefix'], 'lib'),
- File.join(RbConfig::CONFIG['prefix'], 'lib'),
- "/usr/local/lib", "/usr/pkg/lib", "/usr/contrib/lib", "/usr/lib"
- ].find_all{|dir| File.directory?(dir)} unless CROSS_COMPILING
-
- if TkLib_Config["ActiveTcl"].kind_of?(String) # glob path
- default_paths.concat Dir.glob(TkLib_Config["ActiveTcl"]).sort.reverse.map{|d| d << "/lib"}
- end
-
- if !CROSS_COMPILING and is_win32?
- default_paths.concat [
- "c:/Tcl/lib","c:/Program Files/Tcl/lib","c:/Program Files (x86)/Tcl/lib",
- "/Tcl/lib","/Program Files/Tcl/lib","/Program Files (x86)/Tcl/lib"
- ].find_all{|dir| File.directory?(dir)}.map{|dir| File.expand_path(dir)}
-
- # for MinGW
- ["/usr/local/lib64", "/usr/lib64", "/usr/local/lib", "/usr/lib"].each{|dir|
- default_paths << File.expand_path(dir) if File.directory? dir
- }
-
- default_paths |= ENV['LIBRARY_PATH'].split(';').find_all{|dir| File.directory? dir}.map{|dir| File.expand_path(dir)} if ENV['LIBRARY_PATH']
- default_paths |= ENV['PATH'].split(';').find_all{|dir| File.directory? dir}.map{|dir| File.expand_path(dir)} if ENV['PATH']
- end
-
- default_paths |= TkLib_Config["checked_shlib_dirs"]
-
- unless TkLib_Config["space-on-tk-libpath"]
- default_paths.delete_if{|path| path =~ / /}
- end
-
- if (paths = opt_paths.compact).empty?
- paths = check_tcl_NG_path(default_paths)
- end
-
- incflags = ($INCFLAGS ||= "").dup
- libpath = ($LIBPATH ||= []).dup
- libs_param = ($libs ||= "").dup
- tcllibs = nil
-
- exts = "(" + get_ext_list.join('|') + ")"
-
- paths.map{|path|
- lib_w_sufx = lib
- begin
- $LIBPATH |= [path]
- inc = [File.join(File.dirname(path),"include"), File.dirname(path)]
- inc.each{|f| $INCFLAGS << " -I" << f }
-
- if tcllib
- print(".")
- if have_library(tcllib, func, ["tcl.h"])
- return [true, path, tcllib, nil, *inc]
- end
- else
- sufx_list = ['', 't', 'g', 's', 'x']
- search_vers_on_path(versions, path, lib, 'tcl').find{|ver|
- dir_enum = Dir.foreach(path)
- no_dot_ver = ver.delete('.')
- libnames = ["#{lib}#{ver}", "#{lib}#{no_dot_ver}"]
- libnames << "tcl#{ver}" << "tcl#{no_dot_ver}" if lib != "tcl"
- libnames.find{|libname|
- sufx_list.find{|sufx|
- print(".")
- dir_enum.map{|fname|
- if fname =~ /^.*(#{libname}.*#{sufx})\.(#{exts}).*$/
- [fname, $1, $2]
- end
- }.compact.find{|fname, lib_w_sufx, ext|
- ext.downcase!
- if (ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) ||
- ext == "a"
- # static link
- tcllibs = libs_param + " -DSTATIC_BUILD " + fname.quote
- else
- tcllibs = append_library($libs, lib_w_sufx)
- tcllibs = "#{libpathflag([path])} #{tcllibs}"
- end
- if try_func(func, tcllibs, ["tcl.h"])
- return [true, path, nil, tcllibs, *inc]
- end
- }
- }
- }
- }
- if (!version && (print(".");try_func(func, libs_param, ["tcl.h"])))
- return [true, path, lib_w_sufx, nil, *inc]
- end
- end
- ensure
- $LIBPATH = libpath.dup
- $libs = libs_param.dup
- $INCFLAGS = incflags.dup
- end
- }
-
- progress("\n")
- [false, nil, nil, nil]
-end
-
-def parse_TK_LIBS(tklibs)
- sfx = "lib|shlib|dll|so"
- re = /(("|')[^"']+\.(#{sfx})\2|[^"' ]+\.(#{sfx})|-l("|')[^"']+\5|-l[^" ]+)/#'
-
- tklibs.scan(re).map{|lib,|
- if lib =~ /^("|')([^"]+)\.(#{sfx})\1/
- "\"-l#{$2}\""
- elsif lib =~ /([^" ]+)\.(#{sfx})/
- "-l#{$1}"
- else
- lib
- end
- }.join(' ')
-end
-
-def find_tk(tklib, stubs, version, *opt_paths)
- if TkConfig_Info['MKMF_PARAMS']
- # already checked existence of tcl library based on tkConfig.sh
- ($INCFLAGS ||= "") << " " << TkConfig_Info['MKMF_PARAMS']['INCFLAGS']
- $LIBPATH ||= []; $LIBPATH |= TkConfig_Info['MKMF_PARAMS']['LIBPATH']
- ($libs ||= "") << " " << TkConfig_Info['MKMF_PARAMS']['libs']
- return [true, nil, nil, nil]
- end
- # else, no available tkConfig.sh on the system
-
- print "Search Tk library"
-
- if stubs
- func = "Tk_InitStubs"
- lib = "tkstub"
- else
- func = "Tk_Init"
- lib = "tk"
- end
-
- if version && ! version.empty?
- versions = [version]
- else
- versions = TkLib_Config['search_versions']
- end
-
- default_paths = []
-
- default_paths.concat [
- RbConfig::CONFIG['libdir'],
- File.join(RbConfig::CONFIG['exec_prefix'], 'lib'),
- File.join(RbConfig::CONFIG['prefix'], 'lib'),
- "/usr/local/lib", "/usr/pkg/lib", "/usr/contrib/lib", "/usr/lib"
- ].find_all{|dir| File.directory?(dir)} unless CROSS_COMPILING
-
- if !CROSS_COMPILING and is_win32?
- default_paths.concat [
- "c:/Tcl/lib","c:/Program Files/Tcl/lib","c:/Program Files (x86)/Tcl/lib",
- "/Tcl/lib","/Program Files/Tcl/lib","/Program Files (x86)/Tcl/lib"
- ].find_all{|dir| File.directory?(dir)}
-
- # for MinGW
- ["/usr/local/lib64", "/usr/lib64", "/usr/local/lib", "/usr/lib"].each{|dir|
- default_paths << File.expand_path(dir) if File.directory? dir
- }
-
- default_paths |= ENV['LIBRARY_PATH'].split(';').find_all{|dir| File.directory? dir}.map{|dir| File.expand_path(dir)} if ENV['LIBRARY_PATH']
- default_paths |= ENV['PATH'].split(';').find_all{|dir| File.directory? dir}.map{|dir| File.expand_path(dir)} if ENV['PATH']
- end
-
- default_paths |= TkLib_Config["checked_shlib_dirs"]
-
- unless TkLib_Config["space-on-tk-libpath"]
- default_paths.delete_if{|path| path =~ / /}
- end
-
- if (paths = opt_paths.compact).empty?
- paths = check_tk_NG_path(default_paths)
- end
-
- incflags = ($INCFLAGS ||= "").dup
- libpath = ($LIBPATH ||= []).dup
- libs_param = ($libs ||= "").dup
- tcllibs = nil
-
- exts = "(" + get_ext_list.join('|') + ")"
-
- paths.map{|path|
- lib_w_sufx = lib
- begin
- $LIBPATH |= [path]
- inc = [File.join(File.dirname(path),"include"), File.dirname(path)]
- inc.each{|f| $INCFLAGS << " -I" << f }
-
- if tklib
- print(".")
- if have_library(tklib, func, ["tcl.h", "tk.h"])
- return [true, path, tklib, nil, *inc]
- end
- else
- sufx_list = ['', 't', 'g', 's', 'x']
- search_vers_on_path(versions, path, lib, 'tk').find{|ver|
- dir_enum = Dir.foreach(path)
- no_dot_ver = ver.delete('.')
- libnames = ["#{lib}#{ver}", "#{lib}#{no_dot_ver}"]
- libnames << "tk#{ver}" << "tk#{no_dot_ver}" if lib != "tk"
- libnames.find{|libname|
- sufx_list.find{|sufx|
- print(".")
- dir_enum.map{|fname|
- if fname =~ /^.*(#{libname}.*#{sufx})\.(#{exts}).*$/
- [fname, $1, $2]
- end
- }.compact.find{|fname, lib_w_sufx, ext|
- if (ext != CONFIG['DLEXT'] && ext == CONFIG['LIBEXT']) ||
- ext == "a"
- # static link
- tklibs = libs_param + " -DSTATIC_BUILD " + fname.quote
- else
- tklibs = append_library($libs, lib_w_sufx)
- tklibs = "#{libpathflag([path])} #{tklibs}"
- end
- if try_func(func, tklibs, ["tcl.h", "tk.h"])
- return [true, path, nil, tklibs, *inc]
- end
- }
- }
- }
- }
- if (!version && (print(".");try_func(func, libs_param, ["tcl.h", "tk.h"])))
- return [true, path, lib_w_sufx, nil, *inc]
- end
- end
- ensure
- $LIBPATH = libpath
- $libs = libs_param
- $INCFLAGS = incflags.dup
- end
- }
-
- progress("\n")
- [false, nil, nil, nil]
-end
-
-def find_tcltk_library(tcllib, tklib, stubs, tclversion, tkversion,
- tcl_opt_paths, tk_opt_paths)
- st,path,lib,libs,*inc = find_tcl(tcllib, stubs, tclversion, *tcl_opt_paths)
- if !st && TkLib_Config['enable-shared'] == nil
- TkLib_Config['enable-shared'] = false
- st,path,lib,libs,*inc = find_tcl(tcllib, stubs, tclversion, *tcl_opt_paths)
- end
- unless st
- puts("\n""Warning:: cannot find Tcl library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options.")
- return false
- else
- ($LIBPATH ||= []; $LIBPATH |= [path]) if path
- $libs = append_library($libs, lib) if lib
- ($libs ||= "") << " " << libs if libs
- $INCFLAGS ||= ""
- inc.each{|f| $INCFLAGS << " -I" << f}
- end
-
- st,path,lib,libs,*inc = find_tk(tklib, stubs, tkversion, *tk_opt_paths)
- if !st && TkLib_Config['enable-shared'] == nil
- TkLib_Config['enable-shared'] = false
- st,path,lib,libs,*inc = find_tk(tklib, stubs, tkversion, *tk_opt_paths)
- end
- unless st
- puts("\n""Warning:: cannot find Tk library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options.")
- return false
- else
- ($LIBPATH ||= []; $LIBPATH |= [path]) if path
- $libs = append_library($libs, lib) if lib && !lib.empty?
- ($libs ||= "") << " " << libs if libs
- $INCFLAGS ||= ""
- inc.each{|f| $INCFLAGS << " -I" << f}
- end
-
- true
-end
-
-def find_tcltk_header(tclver, tkver)
- base_dir = []
-
- base_dir.concat [
- File.join(RbConfig::CONFIG['prefix'], 'include'),
- "/usr/local/include", "/usr/pkg/include", "/usr/contrib/include",
- "/usr/include"
- ].find_all{|dir| File.directory?(dir)}.map{|dir| File.expand_path(dir)}
-
- if !CROSS_COMPILING && is_win32?
- base_dir.concat [
- "c:/Tcl/include","c:/Program Files/Tcl/include",
- "c:/Program Files (x86)/Tcl/include",
- "/Tcl/include","/Program Files/Tcl/include",
- "/Program Files (x86)/Tcl/include"
- ].find_all{|dir| File.directory?(dir)}.map{|dir| File.expand_path(dir)}
-
- if ENV['CPATH']
- base_dir |= ENV['CPATH'].split(';').find_all{|dir| File.directory?(dir)}.map{|dir| File.expand_path(dir)}
- end
- end
-
- base_dir |= TkLib_Config["checked_shlib_dirs"]
-
- unless TkLib_Config["space-on-tk-libpath"]
- base_dir.delete_if{|path| path =~ / /}
- end
-
- # tcl.h
- if TclConfig_Info['MKMF_PARAMS']
- # already checked existence of tcl headers based on tclConfig.sh
- have_tcl_h = true
- else
- print "Search tcl.h"
- newline
- if enable_config("tcl-h-ver-check", true) &&
- tclver && tclver =~ /^\D*(\d)\.?(\d)/
- major = $1; minor = $2
- else
- major = minor = nil
- end
- progress(".")
- if major && minor
- # version check on tcl.h
- version_check = proc {|code|
- code << ("#if TCL_MAJOR_VERSION != #{major} || TCL_MINOR_VERSION != #{minor}\n" \
- "#error VERSION does not match\n" \
- "#endif")
- }
- else
- version_check = nil
- end
- have_tcl_h = have_header('tcl.h', &version_check)
- unless have_tcl_h
- if tclver && ! tclver.empty?
- versions = [tclver]
- else
- versions = TkLib_Config['search_versions']
- end
- paths = base_dir.dup
- (versions + [""]).each{|ver|
- paths.concat(base_dir.map{|dir|
- [
- dir + '/tcl' + ver,
- dir + '/tcl' + ver + '/include',
- dir + '/tcl' + ver.delete('.'),
- dir + '/tcl' + ver.delete('.') + '/include'
- ]
- }.flatten)
- }
- paths = paths.map{|dir|
- (File.directory?(dir))? File.expand_path(dir): nil
- }.compact.uniq
-
- if major || minor
- version_check = proc {|code|
- code << "#if TCL_MAJOR_VERSION != #{major}\n#error MAJOR_VERSION does not match\n#endif\n" if major
- code << "#if TCL_MINOR_VERSION != #{minor}\n#error MINOR_VERSION does not match\n#endif\n" if minor
- code
- }
- else
- version_check = nil
- end
- have_tcl_h = paths.find{|path|
- progress(".")
- inc_opt = " -I#{path.quote}"
- if try_header("tcl", inc_opt, &version_check)
- ($INCFLAGS ||= "") << inc_opt
- true
- else
- false
- end
- }
- end
- progress("\n")
- end
-
- # tk.h
- if TkConfig_Info['MKMF_PARAMS']
- # already checked existence of tk headers based on tkConfig.sh
- have_tk_h = true
- else
- print "Search tk.h"
- newline
- if enable_config("tk-h-ver-check", true) &&
- tkver && tkver =~ /^\D*(\d)\.?(\d)/
- major = $1; minor = $2
- else
- major = minor = nil
- end
- progress(".")
- if major && minor
- # version check on tk.h
- version_check = proc {|code|
- code << ("#if TK_MAJOR_VERSION != #{major} || TK_MINOR_VERSION != #{minor}\n" \
- "#error VERSION does not match\n" \
- "#endif")
- }
- else
- version_check = nil
- end
- have_tk_h = have_header('tk.h')
- unless have_tk_h
- if tkver && ! tkver.empty?
- versions = [tkver]
- else
- versions = TkLib_Config['search_versions']
- end
- paths = base_dir.dup
- (versions + [""]).each{|ver|
- paths.concat(base_dir.map{|dir|
- [
- dir + '/tk' + ver,
- dir + '/tk' + ver + '/include',
- dir + '/tk' + ver.delete('.'),
- dir + '/tk' + ver.delete('.') + '/include'
- ]
- }.flatten)
- }
- paths = paths.map{|dir|
- (File.directory?(dir))? File.expand_path(dir): nil
- }.compact.uniq
-
- if major || minor
- version_check = proc {|code|
- code << "#if TK_MAJOR_VERSION != #{major}\n#error MAJOR_VERSION does not match\n#endif\n" if major
- code << "#if TK_MINOR_VERSION != #{minor}\n#error MINOR_VERSION does not match\n#endif\n" if minor
- code
- }
- else
- version_check = nil
- end
- have_tk_h = paths.find{|path|
- progress(".")
- inc_opt = " -I#{path.quote}"
- if try_header(%w'tcl.h tk.h', inc_opt, &version_check)
- ($INCFLAGS ||= "") << inc_opt
- true
- else
- false
- end
- }
- end
- progress("\n")
- end
-
- puts "Can't find \"tcl.h\"." unless have_tcl_h
- puts "Can't find \"tk.h\"." unless have_tk_h
- have_tcl_h && have_tk_h
-end
-
-def setup_for_macosx_framework(tclver, tkver)
- # use framework, but no tclConfig.sh
- unless $LIBS && $LIBS.include?('-framework')
- ($LIBS ||= "") << ' -framework Tk -framework Tcl'
- end
-
- if TkLib_Config["tcl-framework-header"]
- TclConfig_Info['TCL_INCLUDE_SPEC'][0,0] =
- " -I#{TkLib_Config["tcl-framework-header"].quote} "
- else
- tcl_base = File.join(TkLib_Config["tcltk-framework"], 'Tcl.framework')
- if tclver
- TclConfig_Info['TCL_INCLUDE_SPEC'] <<
- " -I#{File.join(tcl_base, 'Versions', tclver, 'Headers').quote} "
- end
-
- TclConfig_Info['TCL_INCLUDE_SPEC'] << File.join(tcl_base, 'Headers')
-
- unless tclver
- dir = Dir.glob(File.join(tcl_base, 'Versions', '*', 'Headers'),
- File::FNM_CASEFOLD).sort.reverse[0]
- TclConfig_Info['TCL_INCLUDE_SPEC'] << "-I#{dir.quote} " if dir
- end
- end
-
- if TkLib_Config["tk-framework-header"]
- TkConfig_Info['TK_INCLUDE_SPEC'][0,0] =
- " -I#{TkLib_Config["tk-framework-header"].quote} "
- else
- tk_base = File.join(TkLib_Config["tcltk-framework"], 'Tk.framework')
- if tkver
- TkConfig_Info['TK_INCLUDE_SPEC'] <<
- " -I#{File.join(tk_base, 'Versions', tkver, 'Headers').quote} "
- end
-
- TkConfig_Info['TK_INCLUDE_SPEC'] << File.join(tk_base, 'Headers')
-
- unless tkver
- dir = Dir.glob(File.join(tk_base, 'Versions', '*', 'Headers'),
- File::FNM_CASEFOLD).sort.reverse[0]
- TkConfig_Info['TK_INCLUDE_SPEC'] << "-I#{dir.quote} " if dir
- end
- end
-end
-
-def find_X11(*opt_paths)
- defaults =
- [ "/usr/X11*/lib", "/usr/lib/X11*", "/usr/local/X11*", "/usr/openwin/lib" ]
- paths = []
- opt_paths.compact.each{|path| paths.concat(Dir.glob(path.strip.chomp('/'), File::FNM_CASEFOLD))}
- defaults.compact.each{|path| paths.concat(Dir.glob(path.strip.chomp('/'), File::FNM_CASEFOLD))}
- st = find_library("X11", "XOpenDisplay", *paths)
- unless st
- puts("\n""Warning:: cannot find X11 library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options. If your Tcl/Tk don't require X11, please try --without-X11.")
- end
- st
-end
-
-def search_X_libraries
- use_tkConfig = false
- if TkConfig_Info['config_file_path']
- # use definitions on tkConfig.sh
- if (/\S/ =~ TkConfig_Info['TK_XINCLUDES'] ||
- /\S/ =~ TkConfig_Info['TK_XLIBSW'])
- use_tkConfig = true
- #use_X = true && with_config("X11", ! is_win32?)
- use_X = with_config("X11", true)
- else
- #use_X = false || with_config("X11", false)
- use_X = with_config("X11", false)
- end
- else
- # depend on configure options
- use_X = with_config("X11", !(is_win32? || TkLib_Config["tcltk-framework"]))
- end
-
- if /\S/ =~ TkConfig_Info['TK_XINCLUDES']
- ($INCFLAGS ||= "") << " " << TkConfig_Info['TK_XINCLUDES'].strip
- end
-
- if use_X
- puts("Use X11 libraries (or use TK_XINCLUDES/TK_XLIBSW information on tkConfig.sh).")
- x11_idir, x11_ldir = dir_config("X11")
- x11_ldir2 = with_config("X11-lib")
- unless find_X11(x11_ldir2, x11_ldir)
- puts("Can't find X11 libraries. ")
- if use_tkConfig &&
- /\S/ =~ TkConfig_Info['TK_XLIBSW']
- puts("But, try to use TK_XLIBSW information (believe tkConfig.sh).")
- ($libs ||= "") << " " << TkConfig_Info['TK_XLIBSW'] << " "
- else
- puts("So, can't make tcltklib.so which is required by Ruby/Tk.")
- exit
- end
- end
- end
-
- use_X
-end
-
-def pthread_check()
- tcl_major_ver = nil
- tcl_minor_ver = nil
-
- # Is tcl-thread given by user ?
- case enable_config("tcl-thread")
- when true
- tcl_enable_thread = true
- when false
- tcl_enable_thread = false
- else
- tcl_enable_thread = nil
- end
-
- if TclConfig_Info['config_file_path']
- if tcl_enable_thread == true
- puts("\n""Warning: definition of tclConfig.sh is ignored, because --enable-tcl-thread option is given.")
- elsif tcl_enable_thread == false
- puts("\n""Warning: definition of tclConfig.sh is ignored, because --disable-tcl-thread option is given.")
- else
- # tcl-thread is unknown and tclConfig.sh is given
- if TclConfig_Info['TCL_THREADS']
- tcl_enable_thread = (TclConfig_Info['TCL_THREADS'] == "1")
- else
- tcl_major_ver = TclConfig_Info['TCL_MAJOR_VERSION'].to_i
- tcl_minor_ver = TclConfig_Info['TCL_MINOR_VERSION'].to_i
- if tcl_major_ver < 8 || (tcl_major_ver == 8 && tcl_minor_ver == 0)
- tcl_enable_thread = false
- end
- end
-
- if tcl_enable_thread == nil
- # cannot find definition
- if tcl_major_ver
- puts("\n""Warning: '#{TclConfig_Info['config_file_path']}' doesn't include TCL_THREADS definition.")
- else
- puts("\n""Warning: '#{TclConfig_Info['config_file_path']}' may not be a tclConfig file.")
- end
- #tclConfig = false
- end
- end
- end
-
- if tcl_enable_thread == nil && !TclConfig_Info['config_file_path']
- # tcl-thread is unknown and tclConfig is unavailable
- begin
- try_run("int main() { exit(0); }")
- rescue Exception
- # cannot try_run. Is CROSS-COMPILE environment?
- puts(%Q'\
-*****************************************************************************
-**
-** NATIVETHREAD SUPPORT CHECK WARNING:
-**
-** We cannot check the consistency of nativethread support between
-** Ruby and the Tcl/Tk library in your environment (are you perhaps
-** cross-compiling?). If nativethread support for these 2 packages
-** is inconsistent you may find you get errors when running Ruby/Tk
-** (e.g. hangs or segmentation faults). We strongly recommend
-** you to check the consistency manually.
-**
-*****************************************************************************
-')
- return true
- end
- end
-
- if tcl_enable_thread == nil
- # tcl-thread is unknown
- if try_run(<<EOF)
-#include <tcl.h>
-int main() {
- Tcl_Interp *ip;
- ip = Tcl_CreateInterp();
- exit((Tcl_Eval(ip, "set tcl_platform(threaded)") == TCL_OK)? 0: 1);
-}
-EOF
- tcl_enable_thread = true
- elsif try_run(<<EOF)
-#include <tcl.h>
-static Tcl_ThreadDataKey dataKey;
-int main() { exit((Tcl_GetThreadData(&dataKey, 1) == dataKey)? 1: 0); }
-EOF
- tcl_enable_thread = true
- else
- tcl_enable_thread = false
- end
- end
-
- # check pthread mode
- if (TkLib_Config["ruby_with_thread"])
- $CPPFLAGS ||= ""
-
- # ruby -> enable
- unless tcl_enable_thread
- # ruby -> enable && tcl -> disable
- puts(%Q'\
-*****************************************************************************
-**
-** NATIVETHREAD SUPPORT MODE WARNING:
-**
-** Ruby is compiled with --enable-pthread, but your Tcl/Tk library
-** seems to be compiled without nativethread support. Although you can
-** create the tcltklib library, this combination may cause errors (e.g.
-** hangs or segmentation faults). If you have no reason to keep the
-** current nativethread support status, we recommend you reconfigure and
-** recompile the libraries so that both or neither support nativethreads.
-**
-** If you want change the status of nativethread support, please recompile
-** Ruby without "--enable-pthread" configure option (If you use Ruby 1.9.x
-** or later, you cannot remove this option, because it requires native-
-** thread support.) or recompile Tcl/Tk with "--enable-threads" configure
-** option (if your Tcl/Tk is later than or equal to Tcl/Tk 8.1).
-**
-*****************************************************************************
-')
- end
-
- # ruby -> enable && tcl -> enable/disable
- if tcl_enable_thread
- $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1'
- else
- $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0'
- end
-
- return true
-
- else
- # ruby -> disable
- if tcl_enable_thread
- # ruby -> disable && tcl -> enable
- puts(%Q'\
-*****************************************************************************
-**
-** NATIVETHREAD SUPPORT MODE ERROR:
-**
-** Ruby is not compiled with --enable-pthread, but your Tcl/Tk
-** library seems to be compiled with nativethread support. This
-** combination may cause frequent hang or segmentation fault
-** errors when Ruby/Tk is working. We recommend that you NEVER
-** create the library with such a combination of nativethread support.
-**
-** Please recompile Ruby with the "--enable-pthread" configure option
-** or recompile Tcl/Tk with the "--disable-threads" configure option.
-**
-*****************************************************************************
-')
- $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1'
- return false
- else
- # ruby -> disable && tcl -> disable
- $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0'
- return true
- end
- end
-end
-
-##############################################################
-# main
-##############################################################
-# check header file
-print("check functions.")
-
-%w"ruby_native_thread_p rb_errinfo rb_safe_level rb_hash_lookup
- rb_proc_new rb_obj_untrust rb_obj_taint rb_set_safe_level_force
- rb_sourcefile rb_thread_alive_p rb_thread_check_trap_pending
- ruby_enc_find_basename
-".each do |func|
- have_func(func, "ruby.h")
- progress(".")
-end
-progress("\n")
-
-# check libraries
-unless is_win32?
- print("check libraries.")
- have_library("nsl", "t_open")
- progress(".")
- have_library("socket", "socket")
- progress(".")
- have_library("dl", "dlopen")
- progress(".")
- have_library("m", "log", "math.h")
- progress("\n")
-end
-$CPPFLAGS ||= ""
-$CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
-
-# Does ruby have nativethread ?
-TkLib_Config["ruby_with_thread"] =
- macro_defined?('HAVE_NATIVETHREAD', '#include "ruby.h"')
-
-
-#---------------------------------------------------
-TclConfig_Info = {}
-TkConfig_Info = {}
-
-# use Tcl/Tk build dir? (has highest priority)
-TkLib_Config["tcl-build-dir"] = with_config("tcl-build-dir")
-TkLib_Config["tk-build-dir"] = with_config("tk-build-dir")
-if TkLib_Config["tcl-build-dir"]
- puts("use Tcl build (pre-install) dir \"#{TkLib_Config["tcl-build-dir"]}\"")
- TkLib_Config["tcl-build-dir"] = File.expand_path(TkLib_Config["tcl-build-dir"])
- base = File.dirname(TkLib_Config["tcl-build-dir"])
- ($INCFLAGS ||= "") << " -I#{File.join(base, "generic").quote} -I#{TkLib_Config["tcl-build-dir"].quote}"
- $LIBPATH ||= []; $LIBPATH |= [TkLib_Config["tcl-build-dir"]]
-end
-if TkLib_Config["tk-build-dir"]
- puts("use Tk build (pre-install) dir \"#{TkLib_Config["tk-build-dir"]}\"")
- TkLib_Config["tk-build-dir"] = File.expand_path(TkLib_Config["tk-build-dir"])
- base = File.dirname(TkLib_Config["tk-build-dir"])
- ($INCFLAGS ||= "") << " -I#{File.join(base, "generic").quote} -I#{TkLib_Config["tk-build-dir"].quote}"
- $LIBPATH ||= []; $LIBPATH |= [TkLib_Config["tk-build-dir"]]
-end
-
-# check requirement of Tcl/tk version
-tcltk_version = with_config("tcltkversion")
-TkLib_Config["tcltkversion"] = check_tcltk_version(tcltk_version)
-
-if TkLib_Config["tcl-build-dir"]
- if (cfgfile = with_config("tclConfig-file", Dir.glob(File.join(TkLib_Config["tcl-build-dir"], "tclConfig*.sh"), File::FNM_CASEFOLD)[0]))
- TclConfig_Info['config_file_path'] = cfgfile
- TkLib_Config["tclConfig_info"] = cfginfo = parse_tclConfig(cfgfile)
- if tclver = TkLib_Config["tcltkversion"][0]
- TkLib_Config["tcltkversion"][0].sub!(/\d(\.?)\d/, "#{cfginfo['TCL_MAJOR_VERSION']}\\1#{cfginfo['TCL_MINOR_VERSION']}")
- else
- TkLib_Config["tcltkversion"][0] = "#{cfginfo['TCL_MAJOR_VERSION']}.#{cfginfo['TCL_MINOR_VERSION']}"
- end
- end
-end
-if TkLib_Config["tk-build-dir"]
- if (cfgfile = with_config("tkConfig-file", Dir.glob(File.join(TkLib_Config["tk-build-dir"], "tkConfig*.sh"), File::FNM_CASEFOLD)[0]))
- TkConfig_Info['config_file_path'] = cfgfile
- TkLib_Config["tkConfig_info"] = cfginfo = parse_tclConfig(cfgfile)
- if TkLib_Config["tcltkversion"][1]
- TkLib_Config["tcltkversion"][1].sub!(/\d(\.?)\d/, "#{cfginfo['TK_MAJOR_VERSION']}\\1#{cfginfo['TK_MINOR_VERSION']}")
- else
- TkLib_Config["tcltkversion"][1] = "#{cfginfo['TK_MAJOR_VERSION']}.#{cfginfo['TK_MINOR_VERSION']}"
- end
- end
-end
-
-tclver, tkver = TkLib_Config["tcltkversion"]
-puts("Specified Tcl/Tk version is #{[tclver, tkver].inspect}") if tclver||tkver
-
-# use ActiveTcl ?
-#if activeTcl = with_config("ActiveTcl")
-#if activeTcl = with_config("ActiveTcl", true)
-if activeTcl = with_config("ActiveTcl", !(TkLib_Config["tcl-build-dir"] && TkLib_Config["tk-build-dir"]))
- puts("Use ActiveTcl libraries (if available).")
- unless activeTcl.kind_of? String
- # set default ActiveTcl path
- if CROSS_COMPILING
- elsif is_win32?
- activeTcl = 'c:/Tcl*'
- elsif is_macosx?
- activeTcl = '/Library/Frameworks'
- else
- activeTcl = '/opt/ActiveTcl*'
- end
- end
-end
-TkLib_Config["ActiveTcl"] = activeTcl
-
-# allow space chars on a libpath
-TkLib_Config["space-on-tk-libpath"] =
- enable_config("space-on-tk-libpath", ! is_win32?)
-
-# enable Tcl/Tk stubs?
-=begin
-if /\S/ =~ TclConfig_Info['TCL_STUB_LIB_SPEC'] &&
- /\S/ =~ TkConfig_Info['TK_STUB_LIB_SPEC']
- stubs = true
- unless (st = enable_config("tcltk-stubs")).nil?
- stubs &&= st
- end
- unless (st = with_config("tcltk-stubs")).nil?
- stubs &&= st
- end
-else
- stubs = enable_config("tcltk-stubs") || with_config("tcltk-stubs")
-end
-=end
-stubs = enable_config("tcltk-stubs") || with_config("tcltk-stubs")
-if (TkLib_Config["tcltk-stubs"] = stubs)
- puts("Compile with Tcl/Tk stubs.")
- $CPPFLAGS ||= ""; $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS'
-end
-
-# directory configuration of Tcl/Tk libraries
-if TkLib_Config["tcl-build-dir"]
- tcl_idir = File.join(File.dirname(TkLib_Config["tcl-build-dir"]),"generic")
- tcl_ldir = TkLib_Config["tcl-build-dir"]
-else
- tcl_idir, tcl_ldir = dir_config("tcl")
-end
-if TkLib_Config["tk-build-dir"]
- tk_idir = File.join(File.dirname(TkLib_Config["tk-build-dir"]),"generic")
- tk_ldir = TkLib_Config["tk-build-dir"]
-else
- tk_idir, tk_ldir = dir_config("tk")
-end
-
-tcl_idir = tk_idir unless tcl_idir
-tcl_ldir = tk_ldir unless tcl_ldir
-tk_idir = tcl_idir unless tk_idir
-tk_ldir = tcl_ldir unless tk_ldir
-
-TclConfig_Info['TCL_INCLUDE_SPEC'] ||= ""
-TkConfig_Info['TK_INCLUDE_SPEC'] ||= ""
-TclConfig_Info['TCL_INCLUDE_SPEC'][0,0] = "-I#{tcl_idir.quote} " if tcl_idir
-TkConfig_Info['TK_INCLUDE_SPEC'][0,0] = "-I#{tk_idir.quote} " if tk_idir
-
-# get tclConfig.sh/tkConfig.sh
-TkLib_Config["tcl-NG-path"] = []
-TkLib_Config["tk-NG-path"] = []
-tclcfg, tkcfg =
- get_tclConfig(
- TclConfig_Info['config_file_path'] || with_config("tclConfig-file", true),
- TkConfig_Info['config_file_path'] || with_config("tkConfig-file", true),
- (TclConfig_Info['config_file_path'])?
- File.dirname(TclConfig_Info['config_file_path']) :
- with_config("tclConfig-dir", tcl_ldir || true),
- (TkConfig_Info['config_file_path'])?
- File.dirname(TkConfig_Info['config_file_path']) :
- with_config("tkConfig-dir", tk_ldir || true)
- )
-TclConfig_Info.merge!(TkLib_Config["tclConfig_info"]) if TkLib_Config["tclConfig_info"]
-TkConfig_Info.merge!(TkLib_Config["tkConfig_info"]) if TkLib_Config["tkConfig_info"]
-TclConfig_Info['config_file_path'] ||= tclcfg
-TkConfig_Info['config_file_path'] ||= tkcfg
-
-tk_cfg_dir = File.dirname(TkConfig_Info['config_file_path']) rescue nil
-tcl_cfg_dir = File.dirname(TclConfig_Info['config_file_path']) rescue nil
-
-tk_ldir_list = [tk_ldir, tk_cfg_dir].uniq
-tcl_ldir_list = [tcl_ldir, tcl_cfg_dir].uniq
-
-if TkConfig_Info['config_file_path']
- if TkLib_Config["tk-build-dir"]
- spec_dir = get_libpath(TkConfig_Info['TK_LIB_FLAG'], TkConfig_Info['TK_BUILD_LIB_SPEC'])
- else
- spec_dir = get_libpath(TkConfig_Info['TK_LIB_FLAG'], TkConfig_Info['TK_LIB_SPEC'])
- end
- tk_ldir_list << spec_dir if File.directory?(spec_dir)
-end
-if TclConfig_Info['config_file_path']
- if TkLib_Config["tcl-build-dir"]
- spec_dir = get_libpath(TclConfig_Info['TCL_LIB_FLAG'], TclConfig_Info['TCL_BUILD_LIB_SPEC'])
- else
- spec_dir = get_libpath(TclConfig_Info['TCL_LIB_FLAG'], TclConfig_Info['TCL_LIB_SPEC'])
- end
- tcl_ldir_list << spec_dir if File.directory?(spec_dir)
-end
-
-# check tk_shlib_search_path
-TkLib_Config["checked_shlib_dirs"] =
- check_shlib_search_path(with_config('tk-shlib-search-path'))
-
-# set TCL_DEFS and TK_DEFS
-$CPPFLAGS ||= ""
-# $CPPFLAGS += " #{TclConfig_Info['TCL_DEFS']}"
-# $CPPFLAGS += " #{TkConfig_Info['TK_DEFS']}"
-$defs += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS'])
-
-# MacOS X Frameworks?
-if TkLib_Config["tcltk-framework"]
- puts("Use MacOS X Frameworks.")
- ($LDFLAGS ||= "") << " " << libpathflag([TkLib_Config["tcl-build-dir"]]) if TkLib_Config["tcl-build-dir"]
-
- libs = ''
- if tcl_cfg_dir
- TclConfig_Info['TCL_LIBS'] ||= ""
- ($INCFLAGS ||= "") << ' ' << TclConfig_Info['TCL_INCLUDE_SPEC']
- libs << ' ' << TclConfig_Info['TCL_LIBS']
- if stubs
- if TkLib_Config["tcl-build-dir"] &&
- /\S/ =~ TclConfig_Info['TCL_BUILD_STUB_LIB_SPEC']
- libs << ' ' << TclConfig_Info['TCL_BUILD_STUB_LIB_SPEC']
- else
- libs << ' ' << TclConfig_Info['TCL_STUB_LIB_SPEC']
- end
- else
- if TkLib_Config["tcl-build-dir"] &&
- /\S/ =~ TclConfig_Info['TCL_BUILD_LIB_SPEC']
- libs << ' ' << TclConfig_Info['TCL_BUILD_LIB_SPEC']
- else
- libs << ' ' << TclConfig_Info['TCL_LIB_SPEC']
- end
- end
- end
-
- libs << " " << libpathflag([TkLib_Config["tk-build-dir"]]) if TkLib_Config["tk-build-dir"]
-
- if tk_cfg_dir
- TkConfig_Info['TK_LIBS'] ||= ""
- ($INCFLAGS ||= "") << ' ' << TkConfig_Info['TK_INCLUDE_SPEC']
- libs << ' ' << TkConfig_Info['TK_LIBS']
- if stubs
- if TkLib_Config["tk-build-dir"] &&
- /\S/ =~ TclConfig_Info['TK_BUILD_STUB_LIB_SPEC']
- libs << ' ' << TkConfig_Info['TK_BUILD_STUB_LIB_SPEC']
- else
- libs << ' ' << TkConfig_Info['TK_STUB_LIB_SPEC']
- end
- else
- if TkLib_Config["tk-build-dir"] &&
- /\S/ =~ TclConfig_Info['TK_BUILD_LIB_SPEC']
- libs << ' ' << TkConfig_Info['TK_BUILD_LIB_SPEC']
- else
- libs << ' ' << TkConfig_Info['TK_LIB_SPEC']
- end
- end
- end
- $LDFLAGS << ' ' << libs
- setup_for_macosx_framework(tclver, tkver) if tcl_cfg_dir && tk_cfg_dir
-end
-
-# name of Tcl/Tk libraries
-tklib = with_config("tklib")
-tcllib = with_config("tcllib")
-
-# search X libraries
-use_X = search_X_libraries
-
-
-#---------------------------------------------------
-if (TkLib_Config["tcltk-framework"] ||
- ( find_tcltk_header(tclver, tkver) &&
- find_tcltk_library(tcllib, tklib, stubs, tclver, tkver,
- tcl_ldir_list, tk_ldir_list) ) ) &&
- (stubs || pthread_check())
- # create Makefile
-
- # for SUPPORT_STATUS
- $INSTALLFILES ||= []
- $INSTALLFILES << ["lib/tkextlib/SUPPORT_STATUS", "$(RUBYLIBDIR)", "lib"]
-
- # remove harmful definitions.
- $defs.delete_if{|x|/^-Du?intptr_t=/ =~ x}
-
- create_makefile("tcltklib")
-
- puts "\nFind Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk."
-else
- puts "\nCan't find proper Tcl/Tk libraries. So, can't make tcltklib.so which is required by Ruby/Tk."
- puts "If you have Tcl/Tk libraries on your environment, you may be able to use them with configure options (see ext/tk/README.tcltklib)."
- puts "At present, Tcl/Tk8.6 is not supported. Although you can try to use Tcl/Tk8.6 with configure options, it will not work correctly. I recommend you to use Tcl/Tk8.5 or 8.4."
-end
diff --git a/ext/tk/lib/README b/ext/tk/lib/README
deleted file mode 100644
index df1c7906ea..0000000000
--- a/ext/tk/lib/README
+++ /dev/null
@@ -1,30 +0,0 @@
-README this file
-multi-tk.rb multiple Tk interpreter (included safe-Tk) support
-remotei-tk.rb control remote Tk interpreter on the other process support
-tk.rb Tk interface
-
-tk/ library files construct Ruby/Tk
-
-tkextlib/ non-standard Tcl/Tk extension support libraries
-
-*********************************************************************
-*** The followings exists for backward compatibility only.
-*** The only thing which they work is that requires current
-*** library files ( tk/*.rb ).
-*********************************************************************
-tkafter.rb handles Tcl after
-tkbgerror.rb Tk error module
-tkcanvas.rb Tk canvas interface
-tkclass.rb provides generic names for Tk classes
-tkconsole.rb console command support
-tkdialog.rb Tk dialog class
-tkentry.rb Tk entry class
-tkfont.rb Tk font support
-tkmacpkg.rb Mac resource support
-tkmenubar.rb TK menubar utility
-tkmngfocus.rb focus manager
-tkpalette.rb palette support
-tkscrollbox.rb scroll box, also example of compound widget
-tktext.rb text classes
-tkvirtevent.rb virtual event support
-tkwinpkg.rb Win DDE and registry support
diff --git a/ext/tk/lib/multi-tk.rb b/ext/tk/lib/multi-tk.rb
deleted file mode 100644
index 0fe766c049..0000000000
--- a/ext/tk/lib/multi-tk.rb
+++ /dev/null
@@ -1,3743 +0,0 @@
-# frozen_string_literal: false
-#
-# multi-tk.rb - supports multi Tk interpreters
-# by Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
-require 'tcltklib'
-require 'tkutil'
-require 'thread'
-
-if defined? Tk
- fail RuntimeError,"'multi-tk' library must be required before requiring 'tk'"
-end
-
-################################################
-# ignore exception on the mainloop?
-
-TclTkLib.mainloop_abort_on_exception = true
-# TclTkLib.mainloop_abort_on_exception = false
-# TclTkLib.mainloop_abort_on_exception = nil
-
-
-################################################
-# add ThreadGroup check to TclTkIp.new
-class << TclTkIp
- alias __new__ new
- private :__new__
-
- def new(*args)
- if Thread.current.group != ThreadGroup::Default
- raise SecurityError, 'only ThreadGroup::Default can call TclTkIp.new'
- end
- obj = __new__(*args)
- obj.instance_eval{
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
- }
- obj
- end
-end
-
-
-################################################
-# exception to treat the return value from IP
-class MultiTkIp_OK < Exception
- def self.send(thread, ret=nil)
- thread.raise self.new(ret)
- end
-
- def initialize(ret=nil)
- super('succeed')
- @return_value = ret
- end
-
- attr_reader :return_value
- alias value return_value
-end
-MultiTkIp_OK.freeze
-
-
-################################################
-# methods for construction
-class MultiTkIp
- class Command_Queue < Queue
- def initialize(interp)
- @interp = interp
- super()
- end
-
- def push(value)
- if !@interp || @interp.deleted?
- fail RuntimeError, "Tk interpreter is already deleted"
- end
- super(value)
- end
- alias << push
- alias enq push
-
- def close
- @interp = nil
- end
- end
- Command_Queue.freeze
-
- BASE_DIR = File.dirname(__FILE__)
-
- WITH_RUBY_VM = Object.const_defined?(:RubyVM) && ::RubyVM.class == Class
- WITH_ENCODING = defined?(::Encoding.default_external)
- #WITH_ENCODING = Object.const_defined?(:Encoding) && ::Encoding.class == Class
-
- (@@SLAVE_IP_ID = ['slave'.freeze, TkUtil.untrust('0')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- @@IP_TABLE = TkUtil.untrust({}) unless defined?(@@IP_TABLE)
-
- @@INIT_IP_ENV = TkUtil.untrust([]) unless defined?(@@INIT_IP_ENV) # table of Procs
- @@ADD_TK_PROCS = TkUtil.untrust([]) unless defined?(@@ADD_TK_PROCS) # table of [name, args, body]
-
- @@TK_TABLE_LIST = TkUtil.untrust([]) unless defined?(@@TK_TABLE_LIST)
-
- unless defined?(@@TK_CMD_TBL)
- @@TK_CMD_TBL = TkUtil.untrust(Object.new)
-
- # @@TK_CMD_TBL.instance_variable_set('@tbl', {}.taint)
- tbl_obj = TkUtil.untrust(Hash.new{|hash,key|
- fail IndexError, "unknown command ID '#{key}'"
- })
- @@TK_CMD_TBL.instance_variable_set('@tbl', tbl_obj)
-
- class << @@TK_CMD_TBL
- allow = [
- '__send__', '__id__', 'freeze', 'inspect', 'kind_of?', 'object_id',
- '[]', '[]=', 'delete', 'each', 'has_key?'
- ]
- instance_methods.each{|m| undef_method(m) unless allow.index(m.to_s)}
-
- def kind_of?(klass)
- @tbl.kind_of?(klass)
- end
-
- def inspect
- if Thread.current.group == ThreadGroup::Default
- @tbl.inspect
- else
- ip = MultiTkIp.__getip
- @tbl.reject{|idx, ent| ent.respond_to?(:ip) && ent.ip != ip}.inspect
- end
- end
-
- def [](idx)
- return unless (ent = @tbl[idx])
- if Thread.current.group == ThreadGroup::Default
- ent
- elsif ent.respond_to?(:ip)
- (ent.ip == MultiTkIp.__getip)? ent: nil
- else
- ent
- end
- end
-
- def []=(idx,val)
- if self.has_key?(idx) && Thread.current.group != ThreadGroup::Default
- fail SecurityError,"cannot change the entried command"
- end
- @tbl[idx] = val
- end
-
- def delete(idx, &blk)
- # if gets an entry, is permitted to delete
- if self[idx]
- @tbl.delete(idx)
- elsif blk
- blk.call(idx)
- else
- nil
- end
- end
-
- def each(&blk)
- if Thread.current.group == ThreadGroup::Default
- @tbl.each(&blk)
- else
- ip = MultiTkIp.__getip
- @tbl.each{|idx, ent|
- blk.call(idx, ent) unless ent.respond_to?(:ip) && ent.ip != ip
- }
- end
- self
- end
-
- def has_key?(k)
- @tbl.has_key?(k)
- end
- alias include? has_key?
- alias key? has_key?
- alias member? has_key?
- end
-
- @@TK_CMD_TBL.freeze
- end
-
- ######################################
-
- @@CB_ENTRY_CLASS = Class.new(TkCallbackEntry){
- def initialize(ip, cmd)
- @ip = ip
- @safe = safe = $SAFE
- # @cmd = cmd
- cmd = MultiTkIp._proc_on_safelevel(&cmd)
- @cmd = proc{|*args| cmd.call(safe, *args)}
- self.freeze
- end
- attr_reader :ip, :cmd
- def inspect
- cmd.inspect
- end
- def call(*args)
- unless @ip.deleted?
- current = Thread.current
- backup_ip = current[:callback_ip]
- current[:callback_ip] = @ip
- begin
- ret = @ip.cb_eval(@cmd, *args)
- fail ret if ret.kind_of?(Exception)
- ret
- rescue TkCallbackBreak, TkCallbackContinue => e
- fail e
- rescue SecurityError => e
- # in 'exit', 'exit!', and 'abort' : security error --> delete IP
- if e.backtrace[0] =~ /^(.+?):(\d+):in `(exit|exit!|abort)'/
- @ip.delete
- elsif @ip.safe?
- if @ip.respond_to?(:cb_error)
- @ip.cb_error(e)
- else
- nil # ignore
- end
- else
- fail e
- end
- rescue Exception => e
- fail e if e.message =~ /^TkCallback/
-
- if @ip.safe?
- if @ip.respond_to?(:cb_error)
- @ip.cb_error(e)
- else
- nil # ignore
- end
- else
- fail e
- end
- ensure
- current[:callback_ip] = backup_ip
- end
- end
- end
- }.freeze
-
- ######################################
-
- def _keys2opts(src_keys)
- return nil if src_keys == nil
- keys = {}; src_keys.each{|k, v| keys[k.to_s] = v}
- #keys.collect{|k,v| "-#{k} #{v}"}.join(' ')
- keys.collect{|k,v| "-#{k} #{TclTkLib._conv_listelement(TkComm::_get_eval_string(v))}"}.join(' ')
- end
- private :_keys2opts
-
- def _check_and_return(thread, exception, wait=0)
- unless thread
- unless exception.kind_of?(MultiTkIp_OK)
- msg = "#{exception.class}: #{exception.message}"
-
- if @interp.deleted?
- warn("Warning (#{self}): " + msg)
- return nil
- end
-
- if safe?
- warn("Warning (#{self}): " + msg) if $DEBUG
- return nil
- end
-
- begin
- @interp._eval_without_enc(@interp._merge_tklist('bgerror', msg))
- rescue Exception => e
- warn("Warning (#{self}): " + msg)
- end
- end
- return nil
- end
-
- if wait == 0
- # no wait
- Thread.pass
- if thread.stop?
- thread.raise exception
- end
- return thread
- end
-
- # wait to stop the caller thread
- wait.times{
- if thread.stop?
- # ready to send exception
- thread.raise exception
- return thread
- end
-
- # wait
- Thread.pass
- }
-
- # unexpected error
- thread.raise RuntimeError, "the thread may not wait for the return value"
- return thread
- end
-
- ######################################
-
- def set_cb_error(cmd = Proc.new)
- @cb_error_proc[0] = cmd
- end
-
- def cb_error(e)
- if @cb_error_proc[0].respond_to?(:call)
- @cb_error_proc[0].call(e)
- end
- end
-
- ######################################
-
- def set_safe_level(safe)
- if safe > @safe_level[0]
- @safe_level[0] = safe
- @cmd_queue.enq([@system, 'set_safe_level', safe])
- end
- @safe_level[0]
- end
- def safe_level=(safe)
- set_safe_level(safe)
- end
- def self.set_safe_level(safe)
- __getip.set_safe_level(safe)
- end
- def self.safe_level=(safe)
- self.set_safe_level(safe)
- end
- def safe_level
- @safe_level[0]
- end
- def self.safe_level
- __getip.safe_level
- end
-
- def wait_on_mainloop?
- @wait_on_mainloop[0]
- end
- def wait_on_mainloop=(bool)
- @wait_on_mainloop[0] = bool
- end
-
- def running_mainloop?
- @wait_on_mainloop[1] > 0
- end
-
- def _destroy_slaves_of_slaveIP(ip)
- unless ip.deleted?
- # ip._split_tklist(ip._invoke('interp', 'slaves')).each{|name|
- ip._split_tklist(ip._invoke_without_enc('interp', 'slaves')).each{|name|
- name = _fromUTF8(name)
- begin
- # ip._eval_without_enc("#{name} eval {foreach i [after info] {after cancel $i}}")
- after_ids = ip._eval_without_enc("#{name} eval {after info}")
- ip._eval_without_enc("#{name} eval {foreach i {#{after_ids}} {after cancel $i}}")
- rescue Exception
- end
- begin
- # ip._invoke('interp', 'eval', name, 'destroy', '.')
- ip._invoke(name, 'eval', 'destroy', '.')
- rescue Exception
- end
-
- # safe_base?
- if ip._eval_without_enc("catch {::safe::interpConfigure #{name}}") == '0'
- begin
- ip._eval_without_enc("::safe::interpDelete #{name}")
- rescue Exception
- end
- end
-=begin
- if ip._invoke('interp', 'exists', name) == '1'
- begin
- ip._invoke(name, 'eval', 'exit')
- rescue Exception
- end
- end
-=end
- unless ip.deleted?
- if ip._invoke('interp', 'exists', name) == '1'
- begin
- ip._invoke('interp', 'delete', name)
- rescue Exception
- end
- end
- end
- }
- end
- end
-
- def _receiver_eval_proc_core(safe_level, thread, cmd, *args)
- begin
- #ret = proc{$SAFE = safe_level; cmd.call(*args)}.call
- #ret = cmd.call(safe_level, *args)
- normal_ret = false
- ret = catch(:IRB_EXIT) do # IRB hack
- retval = cmd.call(safe_level, *args)
- normal_ret = true
- retval
- end
- unless normal_ret
- # catch IRB_EXIT
- exit(ret)
- end
- ret
- rescue SystemExit => e
- # delete IP
- unless @interp.deleted?
- @slave_ip_tbl.each{|name, subip|
- _destroy_slaves_of_slaveIP(subip)
- begin
- # subip._eval_without_enc("foreach i [after info] {after cancel $i}")
- after_ids = subip._eval_without_enc("after info")
- subip._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}")
- rescue Exception
- end
-=begin
- begin
- subip._invoke('destroy', '.') unless subip.deleted?
- rescue Exception
- end
-=end
- # safe_base?
- if @interp._eval_without_enc("catch {::safe::interpConfigure #{name}}") == '0'
- begin
- @interp._eval_without_enc("::safe::interpDelete #{name}")
- rescue Exception
- else
- next if subip.deleted?
- end
- end
- if subip.respond_to?(:safe_base?) && subip.safe_base? &&
- !subip.deleted?
- # do 'exit' to call the delete_hook procedure
- begin
- subip._eval_without_enc('exit')
- rescue Exception
- end
- else
- begin
- subip.delete unless subip.deleted?
- rescue Exception
- end
- end
- }
-
- begin
- # @interp._eval_without_enc("foreach i [after info] {after cancel $i}")
- after_ids = @interp._eval_without_enc("after info")
- @interp._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}")
- rescue Exception
- end
- begin
- @interp._invoke('destroy', '.') unless @interp.deleted?
- rescue Exception
- end
- if @safe_base && !@interp.deleted?
- # do 'exit' to call the delete_hook procedure
- @interp._eval_without_enc('exit')
- else
- @interp.delete unless @interp.deleted?
- end
- end
-
- if e.backtrace[0] =~ /^(.+?):(\d+):in `(exit|exit!|abort)'/
- _check_and_return(thread, MultiTkIp_OK.new($3 == 'exit'))
- else
- _check_and_return(thread, MultiTkIp_OK.new(nil))
- end
-
- # if master? && !safe? && allow_ruby_exit?
- if !@interp.deleted? && master? && !safe? && allow_ruby_exit?
-=begin
- ObjectSpace.each_object(TclTkIp){|obj|
- obj.delete unless obj.deleted?
- }
-=end
- #exit(e.status)
- fail e
- end
- # break
-
- rescue SecurityError => e
- # in 'exit', 'exit!', and 'abort' : security error --> delete IP
- if e.backtrace[0] =~ /^(.+?):(\d+):in `(exit|exit!|abort)'/
- ret = ($3 == 'exit')
- unless @interp.deleted?
- @slave_ip_tbl.each{|name, subip|
- _destroy_slaves_of_slaveIP(subip)
- begin
- # subip._eval_without_enc("foreach i [after info] {after cancel $i}")
- after_ids = subip._eval_without_enc("after info")
- subip._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}")
- rescue Exception
- end
-=begin
- begin
- subip._invoke('destroy', '.') unless subip.deleted?
- rescue Exception
- end
-=end
- # safe_base?
- if @interp._eval_without_enc("catch {::safe::interpConfigure #{name}}") == '0'
- begin
- @interp._eval_without_enc("::safe::interpDelete #{name}")
- rescue Exception
- else
- next if subip.deleted?
- end
- end
- if subip.respond_to?(:safe_base?) && subip.safe_base? &&
- !subip.deleted?
- # do 'exit' to call the delete_hook procedure
- begin
- subip._eval_without_enc('exit')
- rescue Exception
- end
- else
- begin
- subip.delete unless subip.deleted?
- rescue Exception
- end
- end
- }
-
- begin
- # @interp._eval_without_enc("foreach i [after info] {after cancel $i}")
- after_ids = @interp._eval_without_enc("after info")
- @interp._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}")
- rescue Exception
- end
-=begin
- begin
- @interp._invoke('destroy', '.') unless @interp.deleted?
- rescue Exception
- end
-=end
- if @safe_base && !@interp.deleted?
- # do 'exit' to call the delete_hook procedure
- @interp._eval_without_enc('exit')
- else
- @interp.delete unless @interp.deleted?
- end
- end
- _check_and_return(thread, MultiTkIp_OK.new(ret))
- # break
-
- else
- # raise security error
- _check_and_return(thread, e)
- end
-
- rescue Exception => e
- # raise exception
- begin
- bt = _toUTF8(e.backtrace.join("\n"))
- if MultiTkIp::WITH_ENCODING
- bt.force_encoding('utf-8')
- else
- bt.instance_variable_set(:@encoding, 'utf-8')
- end
- rescue Exception
- bt = e.backtrace.join("\n")
- end
- begin
- @interp._set_global_var('errorInfo', bt)
- rescue Exception
- end
- _check_and_return(thread, e)
-
- else
- # no exception
- _check_and_return(thread, MultiTkIp_OK.new(ret))
- end
- end
-
- def _receiver_eval_proc(last_thread, safe_level, thread, cmd, *args)
- if thread
- Thread.new{
- last_thread.join if last_thread
- unless @interp.deleted?
- _receiver_eval_proc_core(safe_level, thread, cmd, *args)
- end
- }
- else
- Thread.new{
- unless @interp.deleted?
- _receiver_eval_proc_core(safe_level, thread, cmd, *args)
- end
- }
- last_thread
- end
- end
-
- private :_receiver_eval_proc, :_receiver_eval_proc_core
-
- def _receiver_mainloop(check_root)
- if @evloop_thread[0] && @evloop_thread[0].alive?
- @evloop_thread[0]
- else
- @evloop_thread[0] = Thread.new{
- while !@interp.deleted?
- #if check_root
- # inf = @interp._invoke_without_enc('info', 'command', '.')
- # break if !inf.kind_of?(String) || inf != '.'
- #end
- break if check_root && !@interp.has_mainwindow?
- sleep 0.5
- end
- }
- @evloop_thread[0]
- end
- end
-
- def _create_receiver_and_watchdog(lvl = $SAFE)
- lvl = $SAFE if lvl < $SAFE
-
- # command-procedures receiver
- receiver = Thread.new(lvl){|safe_level|
- last_thread = {}
-
- loop do
- break if @interp.deleted?
- thread, cmd, *args = @cmd_queue.deq
- if thread == @system
- # control command
- case cmd
- when 'set_safe_level'
- begin
- safe_level = args[0] if safe_level < args[0]
- rescue Exception
- end
- when 'call_mainloop'
- thread = args.shift
- _check_and_return(thread,
- MultiTkIp_OK.new(_receiver_mainloop(*args)))
- else
- # ignore
- end
-
- else
- # procedure
- last_thread[thread] = _receiver_eval_proc(last_thread[thread],
- safe_level, thread,
- cmd, *args)
- end
- end
- }
-
- # watchdog of receiver
- watchdog = Thread.new{
- begin
- loop do
- sleep 1
- if @interp.deleted?
- receiver.kill
- @cmd_queue.close
- end
- break unless receiver.alive?
- end
- rescue Exception
- # ignore all kind of Exception
- end
-
- # receiver is dead
- retry_count = 3
- loop do
- Thread.pass
- begin
- thread, cmd, *args = @cmd_queue.deq(true) # non-block
- rescue ThreadError
- # queue is empty
- retry_count -= 1
- break if retry_count <= 0
- sleep 0.5
- retry
- end
- next unless thread
- if thread.alive?
- if @interp.deleted?
- thread.raise RuntimeError, 'the interpreter is already deleted'
- else
- thread.raise RuntimeError,
- 'the interpreter no longer receives command procedures'
- end
- end
- end
- }
-
- # return threads
- [receiver, watchdog]
- end
- private :_check_and_return, :_create_receiver_and_watchdog
-
- ######################################
-
- unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
- ### Ruby 1.9 !!!!!!!!!!!!!!!!!!!!!!!!!!
- RUN_EVENTLOOP_ON_MAIN_THREAD = false
- end
-
- if self.const_defined? :DEFAULT_MASTER_NAME
- name = DEFAULT_MASTER_NAME.to_s
- else
- name = nil
- end
- if self.const_defined?(:DEFAULT_MASTER_OPTS) &&
- DEFAULT_MASTER_OPTS.kind_of?(Hash)
- keys = DEFAULT_MASTER_OPTS
- else
- keys = {}
- end
-
- @@DEFAULT_MASTER = self.allocate
- @@DEFAULT_MASTER.instance_eval{
- @tk_windows = TkUtil.untrust({})
-
- @tk_table_list = TkUtil.untrust([])
-
- @slave_ip_tbl = TkUtil.untrust({})
-
- @slave_ip_top = TkUtil.untrust({})
-
- @evloop_thread = TkUtil.untrust([])
-
- unless keys.kind_of? Hash
- fail ArgumentError, "expecting a Hash object for the 2nd argument"
- end
-
- if !WITH_RUBY_VM || RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!!
- @interp = TclTkIp.new(name, _keys2opts(keys))
- else ### Ruby 1.9 !!!!!!!!!!!
- @interp_thread = Thread.new{
- current = Thread.current
- begin
- current[:interp] = interp = TclTkIp.new(name, _keys2opts(keys))
- rescue e
- current[:interp] = e
- raise e
- end
- #sleep
- current[:mutex] = mutex = Mutex.new
- current[:root_check] = cond_var = ConditionVariable.new
-
- status = [nil]
- def status.value
- self[0]
- end
- def status.value=(val)
- self[0] = val
- end
- current[:status] = status
-
- begin
- begin
- #TclTkLib.mainloop_abort_on_exception = false
- #Thread.current[:status].value = TclTkLib.mainloop(true)
- interp.mainloop_abort_on_exception = true
- current[:status].value = interp.mainloop(true)
- rescue SystemExit=>e
- current[:status].value = e
- rescue Exception=>e
- current[:status].value = e
- retry if interp.has_mainwindow?
- ensure
- mutex.synchronize{ cond_var.broadcast }
- end
-
- #Thread.current[:status].value = TclTkLib.mainloop(false)
- current[:status].value = interp.mainloop(false)
-
- ensure
- # interp must be deleted before the thread for interp is dead.
- # If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
- # deleted by the wrong thread.
- interp.delete
- end
- }
- until @interp_thread[:interp]
- Thread.pass
- end
- # INTERP_THREAD.run
- raise @interp_thread[:interp] if @interp_thread[:interp].kind_of? Exception
- @interp = @interp_thread[:interp]
-
- # delete the interpreter and kill the eventloop thread at exit
- interp = @interp
- interp_thread = @interp_thread
- END{
- if interp_thread.alive?
- interp.delete
- interp_thread.kill
- end
- }
-
- def self.mainloop(check_root = true)
- begin
- TclTkLib.set_eventloop_window_mode(true)
- @interp_thread.value
- ensure
- TclTkLib.set_eventloop_window_mode(false)
- end
- end
- end
-
- @interp.instance_eval{
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
- }
-
- @ip_name = nil
-
- @callback_status = TkUtil.untrust([])
-
- @system = Object.new
-
- @wait_on_mainloop = TkUtil.untrust([true, 0])
-
- @threadgroup = Thread.current.group
-
- @safe_base = false
-
- @safe_level = [$SAFE]
-
- @cmd_queue = MultiTkIp::Command_Queue.new(@interp)
-
- @cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog(@safe_level[0])
-
- @threadgroup.add @cmd_receiver
- @threadgroup.add @receiver_watchdog
-
- # NOT enclose @threadgroup for @@DEFAULT_MASTER
-
- @@IP_TABLE[ThreadGroup::Default] = self
- @@IP_TABLE[@threadgroup] = self
-
- #################################
-
- @pseudo_toplevel = [false, nil]
-
- def self.__pseudo_toplevel
- Thread.current.group == ThreadGroup::Default &&
- MultiTkIp.__getip == @@DEFAULT_MASTER &&
- self.__pseudo_toplevel_evaluable? && @pseudo_toplevel[1]
- end
-
- def self.__pseudo_toplevel=(m)
- unless (Thread.current.group == ThreadGroup::Default &&
- MultiTkIp.__getip == @@DEFAULT_MASTER)
- fail SecurityError, "no permission to manipulate"
- end
-
- # if m.kind_of?(Module) && m.respond_to?(:pseudo_toplevel_evaluable?)
- if m.respond_to?(:pseudo_toplevel_evaluable?)
- @pseudo_toplevel[0] = true
- @pseudo_toplevel[1] = m
- else
- fail ArgumentError, 'fail to set pseudo-toplevel'
- end
- self
- end
-
- def self.__pseudo_toplevel_evaluable?
- begin
- @pseudo_toplevel[0] && @pseudo_toplevel[1].pseudo_toplevel_evaluable?
- rescue Exception
- false
- end
- end
-
- def self.__pseudo_toplevel_evaluable=(mode)
- unless (Thread.current.group == ThreadGroup::Default &&
- MultiTkIp.__getip == @@DEFAULT_MASTER)
- fail SecurityError, "no permission to manipulate"
- end
-
- @pseudo_toplevel[0] = (mode)? true: false
- end
-
- #################################
-
- @assign_request = Class.new(Exception){
- def self.new(target, ret)
- obj = super()
- obj.target = target
- obj.ret = ret
- obj
- end
- attr_accessor :target, :ret
- }
-
- @assign_thread = Thread.new{
- loop do
- begin
- Thread.stop
- rescue @assign_request=>req
- begin
- req.ret[0] = req.target.instance_eval{
- @cmd_receiver, @receiver_watchdog =
- _create_receiver_and_watchdog(@safe_level[0])
- @threadgroup.add @cmd_receiver
- @threadgroup.add @receiver_watchdog
- @threadgroup.enclose
- true
- }
- rescue Exception=>e
- begin
- req.ret[0] = e
- rescue Exception
- # ignore
- end
- end
- rescue Exception
- # ignore
- end
- end
- }
-
- def self.assign_receiver_and_watchdog(target)
- ret = [nil]
- @assign_thread.raise(@assign_request.new(target, ret))
- while ret[0] == nil
- unless @assign_thread.alive?
- raise RuntimeError, 'lost the thread to assign a receiver and a watchdog thread'
- end
- end
- if ret[0].kind_of?(Exception)
- raise ret[0]
- else
- ret[0]
- end
- end
-
- #################################
-
- @init_ip_env_queue = Queue.new
- Thread.new{
- current = Thread.current
- loop {
- mtx, cond, ret, table, script = @init_ip_env_queue.deq
- begin
- ret[0] = table.each{|tg, ip| ip._init_ip_env(script) }
- rescue Exception => e
- ret[0] = e
- ensure
- mtx.synchronize{ cond.signal }
- end
- mtx = cond = ret = table = script = nil # clear variables for GC
- }
- }
-
- def self.__init_ip_env__(table, script)
- ret = []
- mtx = (Thread.current[:MultiTk_ip_Mutex] ||= Mutex.new)
- cond = (Thread.current[:MultiTk_ip_CondVar] ||= ConditionVariable.new)
- mtx.synchronize{
- @init_ip_env_queue.enq([mtx, cond, ret, table, script])
- cond.wait(mtx)
- }
- if ret[0].kind_of?(Exception)
- raise ret[0]
- else
- ret[0]
- end
- end
-
- #################################
-
- class << self
- undef :instance_eval
- end
- }
-
- @@DEFAULT_MASTER.freeze # defend against modification
-
- ######################################
-
- def self.inherited(subclass)
- # trust if on ThreadGroup::Default or @@DEFAULT_MASTER's ThreadGroup
- if @@IP_TABLE[Thread.current.group] == @@DEFAULT_MASTER
- begin
- class << subclass
- self.methods.each{|m|
- name = m.to_s
- begin
- unless name == '__id__' || name == '__send__' || name == 'freeze'
- undef_method(m)
- end
- rescue Exception
- # ignore all exceptions
- end
- }
- end
- ensure
- subclass.freeze
- fail SecurityError,
- "cannot create subclass of MultiTkIp on a untrusted ThreadGroup"
- end
- end
- end
-
- ######################################
-
- @@SAFE_OPT_LIST = [
- 'accessPath'.freeze,
- 'statics'.freeze,
- 'nested'.freeze,
- 'deleteHook'.freeze
- ].freeze
-
- def _parse_slaveopts(keys)
- name = nil
- safe = false
- safe_opts = {}
- tk_opts = {}
-
- keys.each{|k,v|
- k_str = k.to_s
- if k_str == 'name'
- name = v
- elsif k_str == 'safe'
- safe = v
- elsif @@SAFE_OPT_LIST.member?(k_str)
- safe_opts[k_str] = v
- else
- tk_opts[k_str] = v
- end
- }
-
- if keys['without_tk'] || keys[:without_tk]
- [name, safe, safe_opts, nil]
- else
- [name, safe, safe_opts, tk_opts]
- end
- end
- private :_parse_slaveopts
-
- def _create_slave_ip_name
- @@SLAVE_IP_ID.mutex.synchronize{
- name = @@SLAVE_IP_ID.join('')
- @@SLAVE_IP_ID[1].succ!
- name.freeze
- }
- end
- private :_create_slave_ip_name
-
- ######################################
-
- def __check_safetk_optkeys(optkeys)
- # based on 'safetk.tcl'
- new_keys = {}
- optkeys.each{|k,v| new_keys[k.to_s] = v}
-
- # check 'display'
- if !new_keys.key?('display')
- begin
- #new_keys['display'] = @interp._invoke('winfo screen .')
- new_keys['display'] = @interp._invoke('winfo', 'screen', '.')
- rescue
- if ENV[DISPLAY]
- new_keys['display'] = ENV[DISPLAY]
- elsif !new_keys.key?('use')
- warn "Warning: no screen info or ENV[DISPLAY], so use ':0.0'"
- new_keys['display'] = ':0.0'
- end
- end
- end
-
- # check 'use'
- if new_keys.key?('use')
- # given 'use'
- case new_keys['use']
- when TkWindow
- new_keys['use'] = TkWinfo.id(new_keys['use'])
- #assoc_display = @interp._eval('winfo screen .')
- assoc_display = @interp._invoke('winfo', 'screen', '.')
- when /^\..*/
- new_keys['use'] = @interp._invoke('winfo', 'id', new_keys['use'])
- assoc_display = @interp._invoke('winfo', 'screen', new_keys['use'])
- else
- begin
- pathname = @interp._invoke('winfo', 'pathname', new_keys['use'])
- assoc_display = @interp._invoke('winfo', 'screen', pathname)
- rescue
- assoc_display = new_keys['display']
- end
- end
-
- # match display?
- if assoc_display != new_keys['display']
- if optkeys.key?(:display) || optkeys.key?('display')
- fail RuntimeError,
- "conflicting 'display'=>#{new_keys['display']} " +
- "and display '#{assoc_display}' on 'use'=>#{new_keys['use']}"
- else
- new_keys['display'] = assoc_display
- end
- end
- end
-
- # return
- new_keys
- end
- private :__check_safetk_optkeys
-
- def __create_safetk_frame(slave_ip, slave_name, app_name, keys)
- # display option is used by ::safe::loadTk
- loadTk_keys = {}
- loadTk_keys['display'] = keys['display']
- dup_keys = keys.dup
-
- # keys for toplevel : allow followings
- toplevel_keys = {}
- ['height', 'width', 'background', 'menu'].each{|k|
- toplevel_keys[k] = dup_keys.delete(k) if dup_keys.key?(k)
- }
- toplevel_keys['classname'] = 'SafeTk'
- toplevel_keys['screen'] = dup_keys.delete('display')
-
- # other keys used by pack option of container frame
-
- # create toplevel widget
- begin
- top = TkToplevel.new(toplevel_keys)
- rescue NameError => e
- fail e unless @interp.safe?
- fail SecurityError, "unable create toplevel on the safe interpreter"
- end
- msg = "Untrusted Ruby/Tk applet (#{slave_name})"
- if app_name.kind_of?(String)
- top.title "#{app_name} (#{slave_name})"
- else
- top.title msg
- end
-
- # procedure to delete slave interpreter
- slave_delete_proc = proc{
- unless slave_ip.deleted?
- #if slave_ip._invoke('info', 'command', '.') != ""
- # slave_ip._invoke('destroy', '.')
- #end
- #slave_ip.delete
- slave_ip._eval_without_enc('exit')
- end
- begin
- top.destroy if top.winfo_exist?
- rescue
- # ignore
- end
- }
- tag = TkBindTag.new.bind('Destroy', slave_delete_proc)
-
- top.bindtags = top.bindtags.unshift(tag)
-
- # create control frame
- TkFrame.new(top, :bg=>'red', :borderwidth=>3, :relief=>'ridge') {|fc|
- fc.bindtags = fc.bindtags.unshift(tag)
-
- TkFrame.new(fc, :bd=>0){|f|
- TkButton.new(f,
- :text=>'Delete', :bd=>1, :padx=>2, :pady=>0,
- :highlightthickness=>0, :command=>slave_delete_proc
- ).pack(:side=>:right, :fill=>:both)
- f.pack(:side=>:right, :fill=>:both, :expand=>true)
- }
-
- TkLabel.new(fc, :text=>msg, :padx=>2, :pady=>0,
- :anchor=>:w).pack(:side=>:left, :fill=>:both, :expand=>true)
-
- fc.pack(:side=>:bottom, :fill=>:x)
- }
-
- # container frame for slave interpreter
- dup_keys['fill'] = :both unless dup_keys.key?('fill')
- dup_keys['expand'] = true unless dup_keys.key?('expand')
- c = TkFrame.new(top, :container=>true).pack(dup_keys)
- c.bind('Destroy', proc{top.destroy})
-
- # return keys
- loadTk_keys['use'] = TkWinfo.id(c)
- [loadTk_keys, top.path]
- end
- private :__create_safetk_frame
-
- def __create_safe_slave_obj(safe_opts, app_name, tk_opts)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- # safe interpreter
- ip_name = _create_slave_ip_name
- slave_ip = @interp.create_slave(ip_name, true)
- slave_ip.instance_eval{
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
- }
- @slave_ip_tbl[ip_name] = slave_ip
- def slave_ip.safe_base?
- true
- end
-
- @interp._eval("::safe::interpInit #{ip_name}")
-
- slave_ip._invoke('set', 'argv0', app_name) if app_name.kind_of?(String)
-
- if tk_opts
- tk_opts = __check_safetk_optkeys(tk_opts)
- if tk_opts.key?('use')
- @slave_ip_top[ip_name] = ''
- else
- tk_opts, top_path = __create_safetk_frame(slave_ip, ip_name, app_name,
- tk_opts)
- @slave_ip_top[ip_name] = top_path
- end
- @interp._eval("::safe::loadTk #{ip_name} #{_keys2opts(tk_opts)}")
- @interp._invoke('__replace_slave_tk_commands__', ip_name)
- else
- @slave_ip_top[ip_name] = nil
- end
-
- if safe_opts.key?('deleteHook') || safe_opts.key?(:deleteHook)
- @interp._eval("::safe::interpConfigure #{ip_name} " +
- _keys2opts(safe_opts))
- else
- @interp._eval("::safe::interpConfigure #{ip_name} " +
- _keys2opts(safe_opts) + '-deleteHook {' +
- TkComm._get_eval_string(proc{|slave|
- self._default_delete_hook(slave)
- }) + '}')
- end
-
- [slave_ip, ip_name]
- end
-
- def __create_trusted_slave_obj(name, keys)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- ip_name = _create_slave_ip_name
- slave_ip = @interp.create_slave(ip_name, false)
- slave_ip.instance_eval{
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
- }
- slave_ip._invoke('set', 'argv0', name) if name.kind_of?(String)
- slave_ip._invoke('set', 'argv', _keys2opts(keys))
- @interp._invoke('load', '', 'Tk', ip_name)
- @interp._invoke('__replace_slave_tk_commands__', ip_name)
- @slave_ip_tbl[ip_name] = slave_ip
- [slave_ip, ip_name]
- end
-
- ######################################
-
- def _create_slave_object(keys={})
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- ip = MultiTkIp.new_slave(self, keys={})
- @slave_ip_tbl[ip.name] = ip
- end
-
- ######################################
-
- def initialize(master, safeip=true, keys={})
- if master.deleted? && safeip == nil
- fail RuntimeError, "cannot create a slave of a deleted interpreter"
- end
-
- if !master.deleted? && !master.master? && master.safe?
- fail SecurityError, "safe-slave-ip cannot create a new interpreter"
- end
-
- if safeip == nil && !master.master?
- fail SecurityError, "slave-ip cannot create a master-ip"
- end
-
- unless keys.kind_of? Hash
- fail ArgumentError, "expecting a Hash object for the 2nd argument"
- end
-
- @tk_windows = {}
- @tk_table_list = []
- @slave_ip_tbl = {}
- @slave_ip_top = {}
- @cb_error_proc = []
- @evloop_thread = []
-
- TkUtil.untrust(@tk_windows) unless @tk_windows.tainted?
- TkUtil.untrust(@tk_table_list) unless @tk_table_list.tainted?
- TkUtil.untrust(@slave_ip_tbl) unless @slave_ip_tbl.tainted?
- TkUtil.untrust(@slave_ip_top) unless @slave_ip_top.tainted?
- TkUtil.untrust(@cb_error_proc) unless @cb_error_proc.tainted?
- TkUtil.untrust(@evloop_thread) unless @evloop_thread.tainted?
-
- @callback_status = []
-
- name, safe, safe_opts, tk_opts = _parse_slaveopts(keys)
-
- safe = 1 if safe && !safe.kind_of?(Fixnum)
-
- @safe_base = false
-
- if safeip == nil
- # create master-ip
- unless WITH_RUBY_VM
- @interp = TclTkIp.new(name, _keys2opts(tk_opts))
- @interp.instance_eval{
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
- }
-
- else ### Ruby 1.9 !!!!!!!!!!!
-=begin
- @interp_thread = Thread.new{
- Thread.current[:interp] = interp = TclTkIp.new(name, _keys2opts(tk_opts))
- interp.instance_eval{
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
- }
-
- #sleep
- TclTkLib.mainloop(true)
- }
- until @interp_thread[:interp]
- Thread.pass
- end
- # INTERP_THREAD.run
- @interp = @interp_thread[:interp]
-=end
- @interp_thread = Thread.new{
- current = Thread.current
- begin
- current[:interp] = interp = TclTkIp.new(name, _keys2opts(tk_opts))
- rescue e
- current[:interp] = e
- raise e
- end
- #sleep
- #TclTkLib.mainloop(true)
- current[:mutex] = mutex = Mutex.new
- current[:root_check] = cond_ver = ConditionVariable.new
-
- status = [nil]
- def status.value
- self[0]
- end
- def status.value=(val)
- self[0] = val
- end
- current[:status] = status
-
- begin
- begin
- current[:status].value = interp.mainloop(true)
- rescue SystemExit=>e
- current[:status].value = e
- rescue Exception=>e
- current[:status].value = e
- retry if interp.has_mainwindow?
- ensure
- mutex.synchronize{ cond_var.broadcast }
- end
- current[:status].value = interp.mainloop(false)
- ensure
- interp.delete
- end
- }
- until @interp_thread[:interp]
- Thread.pass
- end
- # INTERP_THREAD.run
- @interp = @interp_thread[:interp]
-
- @evloop_thread[0] = @interp_thread
-
- def self.mainloop(check_root = true)
- begin
- TclTkLib.set_eventloop_window_mode(true)
- @interp_thread.value
- ensure
- TclTkLib.set_eventloop_window_mode(false)
- end
- end
- end
-
- @interp.instance_eval{
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
- }
-
- @ip_name = nil
-
- if safe
- safe = $SAFE if safe < $SAFE
- @safe_level = [safe]
- else
- @safe_level = [$SAFE]
- end
-
- else
- # create slave-ip
- if safeip || master.safe?
- @safe_base = true
- @interp, @ip_name = master.__create_safe_slave_obj(safe_opts,
- name, tk_opts)
- # @interp_thread = nil if RUBY_VERSION < '1.9.0' ### !!!!!!!!!!!
- @interp_thread = nil unless WITH_RUBY_VM ### Ruby 1.9 !!!!!!!!!!!
- if safe
- safe = master.safe_level if safe < master.safe_level
- @safe_level = [safe]
- else
- @safe_level = [1]
- end
- else
- @interp, @ip_name = master.__create_trusted_slave_obj(name, tk_opts)
- # @interp_thread = nil if RUBY_VERSION < '1.9.0' ### !!!!!!!!!!!
- @interp_thread = nil unless WITH_RUBY_VM ### Ruby 1.9 !!!!!!!!!!!
- if safe
- safe = master.safe_level if safe < master.safe_level
- @safe_level = [safe]
- else
- @safe_level = [master.safe_level]
- end
- end
- @set_alias_proc = proc{|name|
- master._invoke('interp', 'alias', @ip_name, name, '', name)
- }.freeze
- end
-
- @system = Object.new
-
- @wait_on_mainloop = TkUtil.untrust([true, 0])
- # @wait_on_mainloop = TkUtil.untrust([false, 0])
-
- @threadgroup = ThreadGroup.new
-
- @pseudo_toplevel = [false, nil]
-
- @cmd_queue = MultiTkIp::Command_Queue.new(@interp)
-
-=begin
- @cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog(@safe_level[0])
-
- @threadgroup.add @cmd_receiver
- @threadgroup.add @receiver_watchdog
-
- @threadgroup.enclose
-=end
- @@DEFAULT_MASTER.assign_receiver_and_watchdog(self)
-
- @@IP_TABLE[@threadgroup] = self
- @@TK_TABLE_LIST.size.times{
- @tk_table_list << TkUtil.untrust({})
- }
- _init_ip_internal(@@INIT_IP_ENV, @@ADD_TK_PROCS)
-
- class << self
- undef :instance_eval
- end
-
- # dummy call for initialization
- self.eval_proc{ Tk.tk_call('set', 'tcl_patchLevel') }
-
- self.freeze # defend against modification
- end
-
- ######################################
-
- def _default_delete_hook(slave)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @slave_ip_tbl.delete(slave)
- top = @slave_ip_top.delete(slave)
- if top.kind_of?(String)
- # call default hook of safetk.tcl (ignore exceptions)
- if top == ''
- begin
- @interp._eval("::safe::disallowTk #{slave}")
- rescue
- warn("Warning: fail to call '::safe::disallowTk'") if $DEBUG
- end
- else # toplevel path
- begin
- @interp._eval("::safe::tkDelete {} #{top} #{slave}")
- rescue
- warn("Warning: fail to call '::safe::tkDelete'") if $DEBUG
- begin
- @interp._eval("destroy #{top}")
- rescue
- warn("Warning: fail to destroy toplevel") if $DEBUG
- end
- end
- end
- end
- end
-
-end
-
-
-# get target IP
-class MultiTkIp
- @@CALLBACK_SUBTHREAD = Class.new(Thread){
- def self.new(interp, &blk)
- super(interp){|ip| Thread.current[:callback_ip] = ip; blk.call}
- end
-
- @table = TkUtil.untrust(Hash.new{|h,k| h[k] = TkUtil.untrust([])})
- def self.table
- @table
- end
- }
-
- def self._ip_id_
- __getip._ip_id_
- end
- def _ip_id_
- # for RemoteTkIp
- ''
- end
-
- def self.__getip
- current = Thread.current
- if current.kind_of?(@@CALLBACK_SUBTHREAD)
- return current[:callback_ip]
- end
- if TclTkLib.mainloop_thread? != false && current[:callback_ip]
- return current[:callback_ip]
- end
- if current.group == ThreadGroup::Default
- @@DEFAULT_MASTER
- else
- ip = @@IP_TABLE[current.group]
- unless ip
- fail SecurityError,
- "cannot call Tk methods on #{Thread.current.inspect}"
- end
- ip
- end
- end
-end
-
-
-# aliases of constructor
-class << MultiTkIp
- alias __new new
- private :__new
-
- def new_master(safe=nil, keys={}, &blk)
- if MultiTkIp::WITH_RUBY_VM
- #### TODO !!!!!!
- fail RuntimeError,
- 'sorry, still not support multiple master-interpreters on RubyVM'
- end
-
- if safe.kind_of?(Hash)
- keys = safe
- elsif safe.kind_of?(Integer)
- raise ArgumentError, "unexpected argument(s)" unless keys.kind_of?(Hash)
- if !keys.key?(:safe) && !keys.key?('safe')
- keys[:safe] = safe
- end
- elsif safe == nil
- # do nothing
- else
- raise ArgumentError, "unexpected argument(s)"
- end
-
- ip = __new(__getip, nil, keys)
- #ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call) if block_given?
- if block_given?
- #Thread.new{ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call)}
- #Thread.new{ip.eval_proc(proc{$SAFE=ip.safe_level; yield}.call)}
- ip._proc_on_safelevel(&blk).call(ip.safe_level)
- end
- ip
- end
-
- alias new new_master
-
- def new_slave(safe=nil, keys={}, &blk)
- if safe.kind_of?(Hash)
- keys = safe
- elsif safe.kind_of?(Integer)
- raise ArgumentError, "unexpected argument(s)" unless keys.kind_of?(Hash)
- if !keys.key?(:safe) && !keys.key?('safe')
- keys[:safe] = safe
- end
- elsif safe == nil
- # do nothing
- else
- raise ArgumentError, "unexpected argument(s)"
- end
-
- ip = __new(__getip, false, keys)
- # ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call) if block_given?
- if block_given?
- #Thread.new{ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call)}
- #Thread.new{ip.eval_proc(proc{$SAFE=ip.safe_level; yield}.call)}
- ip._proc_on_safelevel(&blk).call(ip.safe_level)
- end
- ip
- end
- alias new_trusted_slave new_slave
-
- def new_safe_slave(safe=1, keys={}, &blk)
- if safe.kind_of?(Hash)
- keys = safe
- elsif safe.kind_of?(Integer)
- raise ArgumentError, "unexpected argument(s)" unless keys.kind_of?(Hash)
- if !keys.key?(:safe) && !keys.key?('safe')
- keys[:safe] = safe
- end
- else
- raise ArgumentError, "unexpected argument(s)"
- end
-
- ip = __new(__getip, true, keys)
- # ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call) if block_given?
- if block_given?
- #Thread.new{ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call)}
- #Thread.new{ip.eval_proc(proc{$SAFE=ip.safe_level; yield}.call)}
- ip._proc_on_safelevel(&blk).call(ip.safe_level)
- end
- ip
- end
- alias new_safeTk new_safe_slave
-end
-
-
-# get info
-class MultiTkIp
- def inspect
- s = self.to_s.chop!
- if self.manipulable?
- if master?
- if @interp.deleted?
- s << ':deleted-master'
- else
- s << ':master'
- end
- else
- if @interp.deleted?
- s << ':deleted-slave'
- elsif @interp.safe?
- s << ':safe-slave'
- else
- s << ':trusted-slave'
- end
- end
- end
- s << '>'
- end
-
- def master?
- if @ip_name
- false
- else
- true
- end
- end
- def self.master?
- __getip.master?
- end
-
- def slave?
- not master?
- end
- def self.slave?
- not self.master?
- end
-
- def alive?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- begin
- return false unless @cmd_receiver.alive?
- return false if @interp.deleted?
- return false if @interp._invoke('interp', 'exists', '') == '0'
- rescue Exception
- return false
- end
- true
- end
- def self.alive?
- __getip.alive?
- end
-
- def path
- @ip_name || ''
- end
- def self.path
- __getip.path
- end
- def ip_name
- @ip_name || ''
- end
- def self.ip_name
- __getip.ip_name
- end
- def to_eval
- @ip_name || ''
- end
- def self.to_eval
- __getip.to_eval
- end
-
- def slaves(all = false)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp','slaves').split.map!{|name|
- if @slave_ip_tbl.key?(name)
- @slave_ip_tbl[name]
- elsif all
- name
- else
- nil
- end
- }.compact!
- end
- def self.slaves(all = false)
- __getip.slaves(all)
- end
-
- def manipulable?
- return true if (Thread.current.group == ThreadGroup::Default)
- ip = MultiTkIp.__getip
- (ip == self) || ip._is_master_of?(@interp)
- end
- def self.manipulable?
- true
- end
-
- def _is_master_of?(tcltkip_obj)
- tcltkip_obj.slave_of?(@interp)
- end
- protected :_is_master_of?
-end
-
-
-# instance methods to treat tables
-class MultiTkIp
- def _tk_cmd_tbl
- tbl = {}
- MultiTkIp.tk_cmd_tbl.each{|id, ent| tbl[id] = ent if ent.ip == self }
- tbl
- end
-
- def _tk_windows
- @tk_windows
- end
-
- def _tk_table_list
- @tk_table_list
- end
-
- def _add_new_tables
- (@@TK_TABLE_LIST.size - @tk_table_list.size).times{
- @tk_table_list << TkUtil.untrust({})
- }
- end
-
- def _init_ip_env(script)
- self.eval_proc{script.call(self)}
- end
-
- def _add_tk_procs(name, args, body)
- return if slave?
- @interp._invoke('proc', name, args, body) if args && body
- @interp._invoke('interp', 'slaves').split.each{|slave|
- @interp._invoke('interp', 'alias', slave, name, '', name)
- }
- end
-
- def _remove_tk_procs(*names)
- return if slave?
- names.each{|name|
- name = name.to_s
-
- return if @interp.deleted?
- @interp._invoke('rename', name, '')
-
- return if @interp.deleted?
- @interp._invoke('interp', 'slaves').split.each{|slave|
- return if @interp.deleted?
- @interp._invoke('interp', 'alias', slave, name, '') rescue nil
- }
- }
- end
-
- def _init_ip_internal(init_ip_env, add_tk_procs)
- #init_ip_env.each{|script| self.eval_proc{script.call(self)}}
- init_ip_env.each{|script| self._init_ip_env(script)}
- add_tk_procs.each{|name, args, body|
- if master?
- @interp._invoke('proc', name, args, body) if args && body
- else
- @set_alias_proc.call(name)
- end
- }
- end
-end
-
-
-# class methods to treat tables
-class MultiTkIp
- def self.tk_cmd_tbl
- @@TK_CMD_TBL
- end
- def self.tk_windows
- __getip._tk_windows
- end
- def self.tk_object_table(id)
- __getip._tk_table_list[id]
- end
- def self.create_table
- if __getip.slave?
- begin
- raise SecurityError, "slave-IP has no permission creating a new table"
- rescue SecurityError => e
- #p e.backtrace
- # Is called on a Ruby/Tk library?
- caller_info = e.backtrace[1]
- if caller_info =~ %r{^#{MultiTkIp::BASE_DIR}/(tk|tkextlib)/[^:]+\.rb:}
- # Probably, caller is a Ruby/Tk library --> allow creating
- else
- raise e
- end
- end
- end
-
- id = @@TK_TABLE_LIST.size
- obj = Object.new
- @@TK_TABLE_LIST << obj
- obj.instance_variable_set(:@id, id)
- obj.instance_variable_set(:@mutex, Mutex.new)
- obj.instance_eval{
- def self.mutex
- @mutex
- end
- def self.method_missing(m, *args)
- MultiTkIp.tk_object_table(@id).__send__(m, *args)
- end
- }
- obj.freeze
- @@IP_TABLE.each{|tg, ip| ip._add_new_tables }
- return obj
- end
-
- def self.init_ip_env(script = Proc.new)
- @@INIT_IP_ENV << script
- if __getip.slave?
- begin
- raise SecurityError, "slave-IP has no permission initializing IP env"
- rescue SecurityError => e
- #p e.backtrace
- # Is called on a Ruby/Tk library?
- caller_info = e.backtrace[1]
- if caller_info =~ %r{^#{MultiTkIp::BASE_DIR}/(tk|tkextlib)/[^:]+\.rb:}
- # Probably, caller is a Ruby/Tk library --> allow creating
- else
- raise e
- end
- end
- end
-
- # @@IP_TABLE.each{|tg, ip|
- # ip._init_ip_env(script)
- # }
- @@DEFAULT_MASTER.__init_ip_env__(@@IP_TABLE, script)
- end
-
- def self.add_tk_procs(name, args=nil, body=nil)
- if name.kind_of?(Array) # => an array of [name, args, body]
- name.each{|param| self.add_tk_procs(*param)}
- else
- name = name.to_s
- @@ADD_TK_PROCS << [name, args, body]
- @@IP_TABLE.each{|tg, ip|
- ip._add_tk_procs(name, args, body)
- }
- end
- end
-
- def self.remove_tk_procs(*names)
- names.each{|name|
- name = name.to_s
- @@ADD_TK_PROCS.delete_if{|elem|
- elem.kind_of?(Array) && elem[0].to_s == name
- }
- }
- @@IP_TABLE.each{|tg, ip|
- ip._remove_tk_procs(*names)
- }
- end
-
- def self.init_ip_internal
- __getip._init_ip_internal(@@INIT_IP_ENV, @@ADD_TK_PROCS)
- end
-end
-
-# for callback operation
-class MultiTkIp
- def self.cb_entry_class
- @@CB_ENTRY_CLASS
- end
- def self.get_cb_entry(cmd)
- @@CB_ENTRY_CLASS.new(__getip, cmd).freeze
- end
-
-=begin
- def cb_eval(cmd, *args)
- #self.eval_callback{ TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *args)) }
- #ret = self.eval_callback{ TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *args)) }
- ret = self.eval_callback(*args){|safe, *params|
- $SAFE=safe if $SAFE < safe
- TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params))
- }
- if ret.kind_of?(Exception)
- raise ret
- end
- ret
- end
-=end
- def cb_eval(cmd, *args)
- self.eval_callback(*args,
- &_proc_on_safelevel{|*params|
- TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params))
- })
- end
-=begin
- def cb_eval(cmd, *args)
- self.eval_callback(*args){|safe, *params|
- $SAFE=safe if $SAFE < safe
- # TkUtil.eval_cmd(cmd, *params)
- TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params))
- }
- end
-=end
-=begin
- def cb_eval(cmd, *args)
- @callback_status[0] ||= TkVariable.new
- @callback_status[1] ||= TkVariable.new
- st, val = @callback_status
- th = Thread.new{
- self.eval_callback(*args){|safe, *params|
- #p [status, val, safe, *params]
- $SAFE=safe if $SAFE < safe
- begin
- TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params))
- rescue TkCallbackContinue
- st.value = 4
- rescue TkCallbackBreak
- st.value = 3
- rescue TkCallbackReturn
- st.value = 2
- rescue Exception => e
- val.value = e.message
- st.value = 1
- else
- st.value = 0
- end
- }
- }
- begin
- st.wait
- status = st.numeric
- retval = val.value
- rescue => e
- fail e
- end
-
- if status == 1
- fail RuntimeError, retval
- elsif status == 2
- fail TkCallbackReturn, "Tk callback returns 'return' status"
- elsif status == 3
- fail TkCallbackBreak, "Tk callback returns 'break' status"
- elsif status == 4
- fail TkCallbackContinue, "Tk callback returns 'continue' status"
- else
- ''
- end
- end
-=end
-
-end
-
-# pseudo-toplevel operation support
-class MultiTkIp
- # instance method
- def __pseudo_toplevel
- ip = MultiTkIp.__getip
- (ip == @@DEFAULT_MASTER || ip == self) &&
- self.__pseudo_toplevel_evaluable? && @pseudo_toplevel[1]
- end
-
- def __pseudo_toplevel=(m)
- unless (Thread.current.group == ThreadGroup::Default &&
- MultiTkIp.__getip == @@DEFAULT_MASTER)
- fail SecurityError, "no permission to manipulate"
- end
-
- # if m.kind_of?(Module) && m.respond_to?(:pseudo_toplevel_evaluable?)
- if m.respond_to?(:pseudo_toplevel_evaluable?)
- @pseudo_toplevel[0] = true
- @pseudo_toplevel[1] = m
- else
- fail ArgumentError, 'fail to set pseudo-toplevel'
- end
- self
- end
-
- def __pseudo_toplevel_evaluable?
- begin
- @pseudo_toplevel[0] && @pseudo_toplevel[1].pseudo_toplevel_evaluable?
- rescue Exception
- false
- end
- end
-
- def __pseudo_toplevel_evaluable=(mode)
- unless (Thread.current.group == ThreadGroup::Default &&
- MultiTkIp.__getip == @@DEFAULT_MASTER)
- fail SecurityError, "no permission to manipulate"
- end
-
- @pseudo_toplevel[0] = (mode)? true: false
- end
-end
-
-
-################################################
-# use pseudo-toplevel feature of MultiTkIp ?
-if (!defined?(Use_PseudoToplevel_Feature_of_MultiTkIp) ||
- Use_PseudoToplevel_Feature_of_MultiTkIp)
- module MultiTkIp_PseudoToplevel_Evaluable
- #def pseudo_toplevel_eval(body = Proc.new)
- # Thread.current[:TOPLEVEL] = self
- # begin
- # body.call
- # ensure
- # Thread.current[:TOPLEVEL] = nil
- # end
- #end
-
- def pseudo_toplevel_evaluable?
- @pseudo_toplevel_evaluable
- end
-
- def pseudo_toplevel_evaluable=(mode)
- @pseudo_toplevel_evaluable = (mode)? true: false
- end
-
- def self.extended(mod)
- mod.__send__(:extend_object, mod)
- mod.instance_variable_set('@pseudo_toplevel_evaluable', true)
- end
- end
-
- class Object
- alias __method_missing_alias_for_MultiTkIp__ method_missing
- private :__method_missing_alias_for_MultiTkIp__
-
- def method_missing(id, *args)
- begin
- has_top = (top = MultiTkIp.__getip.__pseudo_toplevel) &&
- top.respond_to?(:pseudo_toplevel_evaluable?) &&
- top.pseudo_toplevel_evaluable? &&
- top.respond_to?(id)
- rescue Exception => e
- has_top = false
- end
-
- if has_top
- top.__send__(id, *args)
- else
- __method_missing_alias_for_MultiTkIp__(id, *args)
- end
- end
- end
-else
- # dummy
- module MultiTkIp_PseudoToplevel_Evaluable
- def pseudo_toplevel_evaluable?
- false
- end
- end
-end
-
-
-################################################
-# evaluate a procedure on the proper interpreter
-class MultiTkIp
- # instance & class method
- def _proc_on_safelevel(cmd=nil) # require a block for eval
- if cmd
- if cmd.kind_of?(Method)
- _proc_on_safelevel{|*args| cmd.call(*args)}
- else
- _proc_on_safelevel(&cmd)
- end
- else
- #Proc.new{|safe, *args| $SAFE=safe if $SAFE < safe; yield(*args)}
- Proc.new{|safe, *args|
- # avoid security error on Exception objects
- untrust_proc = proc{|err|
- begin
- err.untrust if err.respond_to?(:untrust)
- rescue SecurityError
- end
- err
- }
- $SAFE=safe if $SAFE < safe;
- begin
- yield(*args)
- rescue Exception => e
- fail untrust_proc.call(e)
- end
- }
- end
- end
- def MultiTkIp._proc_on_safelevel(cmd=nil, &blk)
- MultiTkIp.__getip._proc_on_safelevel(cmd, &blk)
- end
-
- def _proc_on_current_safelevel(cmd=nil, &blk) # require a block for eval
- safe = $SAFE
- cmd = _proc_on_safelevel(cmd, &blk)
- Proc.new{|*args| cmd.call(safe, *args)}
- end
- def MultiTkIp._proc_on_current_safelevel(cmd=nil, &blk)
- MultiTkIp.__getip._proc_on_current_safelevel(cmd, &blk)
- end
-
- ######################################
- # instance method
- def eval_proc_core(req_val, cmd, *args)
- # check
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- unless cmd.kind_of?(Proc) || cmd.kind_of?(Method)
- raise RuntimeError, "A Proc/Method object is expected for the 'cmd' argument"
- end
-
- # on IP thread
- if @cmd_receiver == Thread.current ||
- (!req_val && TclTkLib.mainloop_thread? != false) # callback
- begin
- ret = cmd.call(safe_level, *args)
- rescue SystemExit => e
- # exit IP
- warn("Warning: "+ e.inspect + " on " + self.inspect) if $DEBUG
- begin
- self._eval_without_enc('exit')
- rescue Exception => e
- end
- self.delete
- ret = nil
- rescue Exception => e
- if $DEBUG
- warn("Warning: " + e.class.inspect +
- ((e.message.length > 0)? ' "' + e.message + '"': '') +
- " on " + self.inspect)
- end
-=begin
- begin
- bt = _toUTF8(e.backtrace.join("\n"))
- bt.instance_variable_set(:@encoding, 'utf-8')
- rescue Exception
- bt = e.backtrace.join("\n")
- end
- begin
- @interp._set_global_var('errorInfo', bt)
- rescue Exception
- end
-=end
- ret = e
- end
- return ret
- end
-
- # send cmd to the proc-queue
- unless req_val
- begin
- @cmd_queue.enq([nil, cmd, *args])
- rescue Exception => e
- # ignore
- if $DEBUG
- warn("Warning: " + e.class.inspect +
- ((e.message.length > 0)? ' "' + e.message + '"': '') +
- " on " + self.inspect)
- end
- return e
- end
- return nil
- end
-
- # send and get return value by exception
- begin
- @cmd_queue.enq([Thread.current, cmd, *args])
- Thread.stop
- rescue MultiTkIp_OK => ret
- # return value
- return ret.value
- rescue SystemExit => e
- # exit IP
- warn("Warning: " + e.inspect + " on " + self.inspect) if $DEBUG
- begin
- self._eval_without_enc('exit')
- rescue Exception
- end
- if !self.deleted? && !safe? && allow_ruby_exit?
- self.delete
- fail e
- else
- self.delete
- end
- rescue Exception => e
- if $DEBUG
- warn("Warning: " + e.class.inspect +
- ((e.message.length > 0)? ' "' + e.message + '"': '') +
- " on " + self.inspect)
- end
- return e
- end
- return nil
- end
- private :eval_proc_core
-
-if false && WITH_RUBY_VM ### Ruby 1.9
- # Not stable, so disable this feature
- def eval_callback(*args)
- if block_given?
- cmd = Proc.new
- else
- cmd = args.shift
- end
- begin
- if @@CALLBACK_SUBTHREAD.table[self].index(Thread.current)
- last_th = nil
- else
- last_th = @@CALLBACK_SUBTHREAD.table[self][-1]
- end
- @@CALLBACK_SUBTHREAD.new(self){
- @@CALLBACK_SUBTHREAD.table[self] << Thread.current
- begin
- last_th.join if last_th
- eval_proc_core(false, cmd, *args)
- rescue Exception=>e
- e
- ensure
- @@CALLBACK_SUBTHREAD.table[self].delete(Thread.current)
- end
- }
- end
- end
-else ### Ruby 1.8
- def eval_callback(*args)
- if block_given?
- cmd = Proc.new
- else
- cmd = args.shift
- end
- begin
- eval_proc_core(false, cmd, *args)
- rescue Exception=>e
- e
- ensure
- end
- end
-end
-
- def eval_proc(*args, &blk)
- if block_given?
- cmd = _proc_on_safelevel(&blk)
- else
- unless (cmd = args.shift)
- fail ArgumentError, "A Proc or Method object is expected for 1st argument"
- end
- cmd = _proc_on_safelevel(&cmd)
- end
- if TclTkLib.mainloop_thread? == true
- # call from eventloop
- current = Thread.current
- backup_ip = current[:callback_ip]
- current[:callback_ip] = self
- begin
- eval_proc_core(false, cmd, *args)
- ensure
- current[:callback_ip] = backup_ip
- end
- else
- eval_proc_core(true,
- proc{|safe, *params|
- Thread.new{cmd.call(safe, *params)}.value
- },
- *args)
- end
- end
-=begin
- def eval_proc(*args)
- # The scope of the eval-block of 'eval_proc' method is different from
- # the external. If you want to pass local values to the eval-block,
- # use arguments of eval_proc method. They are passed to block-arguments.
- if block_given?
- cmd = Proc.new
- else
- unless (cmd = args.shift)
- fail ArgumentError, "A Proc or Method object is expected for 1st argument"
- end
- end
- if TclTkLib.mainloop_thread? == true
- # call from eventloop
- current = Thread.current
- backup_ip = current[:callback_ip]
- current[:callback_ip] = self
- begin
- eval_proc_core(false,
- proc{|safe, *params|
- $SAFE=safe if $SAFE < safe
- cmd.call(*params)
- }, *args)
- ensure
- current[:callback_ip] = backup_ip
- end
- else
- eval_proc_core(true,
- proc{|safe, *params|
- $SAFE=safe if $SAFE < safe
- Thread.new(*params, &cmd).value
- },
- *args)
- end
- end
-=end
- alias call eval_proc
-
- def bg_eval_proc(*args)
- if block_given?
- cmd = Proc.new
- else
- unless (cmd = args.shift)
- fail ArgumentError, "A Proc or Method object is expected for 1st argument"
- end
- end
- Thread.new{
- eval_proc(cmd, *args)
-=begin
- eval_proc_core(false,
- proc{|safe, *params|
- $SAFE=safe if $SAFE < safe
- Thread.new(*params, &cmd).value
- },
- safe_level, *args)
-=end
- }
- end
- alias background_eval_proc bg_eval_proc
- alias thread_eval_proc bg_eval_proc
- alias bg_call bg_eval_proc
- alias background_call bg_eval_proc
-
- def eval_string(cmd, *eval_args)
- # cmd string ==> proc
- unless cmd.kind_of?(String)
- raise RuntimeError, "A String object is expected for the 'cmd' argument"
- end
-
- eval_proc_core(true,
- proc{|safe|
- Kernel.eval("$SAFE=#{safe} if $SAFE < #{safe};" << cmd,
- *eval_args)
- })
- end
- alias eval_str eval_string
-
- def bg_eval_string(cmd, *eval_args)
- # cmd string ==> proc
- unless cmd.kind_of?(String)
- raise RuntimeError, "A String object is expected for the 'cmd' argument"
- end
- Thread.new{
- eval_proc_core(true,
- proc{|safe|
- Kernel.eval("$SAFE=#{safe} if $SAFE < #{safe};" << cmd,
- *eval_args)
- })
- }
- end
- alias background_eval_string bg_eval_string
- alias bg_eval_str bg_eval_string
- alias background_eval_str bg_eval_string
-
- def eval(*args, &blk)
- if block_given?
- eval_proc(*args, &blk)
- elsif args[0]
- if args[0].respond_to?(:call)
- eval_proc(*args)
- else
- eval_string(*args)
- end
- else
- fail ArgumentError, "no argument to eval"
- end
- end
-
- def bg_eval(*args, &blk)
- if block_given?
- bg_eval_proc(*args, &blk)
- elsif args[0]
- if args[0].respond_to?(:call)
- bg_eval_proc(*args)
- else
- bg_eval_string(*args)
- end
- else
- fail ArgumentError, "no argument to eval"
- end
- end
- alias background_eval bg_eval
-end
-
-class << MultiTkIp
- # class method
- def eval_proc(*args, &blk)
- # class ==> interp object
- __getip.eval_proc(*args, &blk)
- end
- alias call eval_proc
-
- def bg_eval_proc(*args, &blk)
- # class ==> interp object
- __getip.bg_eval_proc(*args, &blk)
- end
- alias background_eval_proc bg_eval_proc
- alias thread_eval_proc bg_eval_proc
- alias bg_call bg_eval_proc
- alias background_call bg_eval_proc
-
- def eval_string(cmd, *eval_args)
- # class ==> interp object
- __getip.eval_string(cmd, *eval_args)
- end
- alias eval_str eval_string
-
- def bg_eval_string(cmd, *eval_args)
- # class ==> interp object
- __getip.bg_eval_string(cmd, *eval_args)
- end
- alias background_eval_string bg_eval_string
- alias bg_eval_str bg_eval_string
- alias background_eval_str bg_eval_string
-
- def eval(*args, &blk)
- # class ==> interp object
- __getip.eval(*args, &blk)
- end
- def bg_eval(*args, &blk)
- # class ==> interp object
- __getip.bg_eval(*args, &blk)
- end
- alias background_eval bg_eval
-end
-
-
-# event loop
-# all master/slave IPs are controlled by only one event-loop
-class MultiTkIp
- def self.default_master?
- __getip == @@DEFAULT_MASTER
- end
-end
-class << MultiTkIp
- def mainloop(check_root = true)
- __getip.mainloop(check_root)
- end
- def mainloop_watchdog(check_root = true)
- __getip.mainloop_watchdog(check_root)
- end
- def do_one_event(flag = TclTkLib::EventFlag::ALL)
- __getip.do_one_event(flag)
- end
- def mainloop_abort_on_exception
- # __getip.mainloop_abort_on_exception
- TclTkLib.mainloop_abort_on_exception
- end
- def mainloop_abort_on_exception=(mode)
- # __getip.mainloop_abort_on_exception=(mode)
- TclTkLib.mainloop_abort_on_exception=(mode)
- end
- def set_eventloop_tick(tick)
- __getip.set_eventloop_tick(tick)
- end
- def get_eventloop_tick
- __getip.get_eventloop_tick
- end
- def set_no_event_wait(tick)
- __getip.set_no_event_wait(tick)
- end
- def get_no_event_wait
- __getip.get_no_event_wait
- end
- def set_eventloop_weight(loop_max, no_event_tick)
- __getip.set_eventloop_weight(loop_max, no_event_tick)
- end
- def get_eventloop_weight
- __getip.get_eventloop_weight
- end
-end
-
-# class methods to delegate to TclTkIp
-class << MultiTkIp
- def method_missing(id, *args)
- __getip.__send__(id, *args)
- end
-
- def make_safe
- __getip.make_safe
- end
-
- def safe?
- __getip.safe?
- end
-
- def safe_base?
- begin
- __getip.safe_base?
- rescue
- false
- end
- end
-
- def allow_ruby_exit?
- __getip.allow_ruby_exit?
- end
-
- def allow_ruby_exit= (mode)
- __getip.allow_ruby_exit = mode
- end
-
- def delete
- __getip.delete
- end
-
- def deleted?
- __getip.deleted?
- end
-
- def has_mainwindow?
- __getip.has_mainwindow?
- end
-
- def invalid_namespace?
- __getip.invalid_namespace?
- end
-
- def abort(msg = nil)
- __getip.abort(msg)
- end
-
- def exit(st = true)
- __getip.exit(st)
- end
-
- def exit!(st = false)
- __getip.exit!(st)
- end
-
- def restart(app_name = nil, keys = {})
- init_ip_internal
-
- __getip._invoke('set', 'argv0', app_name) if app_name
- if keys.kind_of?(Hash)
- __getip._invoke('set', 'argv', _keys2opts(keys))
- end
-
- __getip.restart
- end
-
- def _eval(str)
- __getip._eval(str)
- end
-
- def _invoke(*args)
- __getip._invoke(*args)
- end
-
- def _eval_without_enc(str)
- __getip._eval_without_enc(str)
- end
-
- def _invoke_without_enc(*args)
- __getip._invoke_without_enc(*args)
- end
-
- def _eval_with_enc(str)
- __getip._eval_with_enc(str)
- end
-
- def _invoke_with_enc(*args)
- __getip._invoke_with_enc(*args)
- end
-
- def _toUTF8(str, encoding=nil)
- __getip._toUTF8(str, encoding)
- end
-
- def _fromUTF8(str, encoding=nil)
- __getip._fromUTF8(str, encoding)
- end
-
- def _thread_vwait(var)
- __getip._thread_vwait(var)
- end
-
- def _thread_tkwait(mode, target)
- __getip._thread_tkwait(mode, target)
- end
-
- def _return_value
- __getip._return_value
- end
-
- def _get_variable(var, flag)
- __getip._get_variable(var, flag)
- end
- def _get_variable2(var, idx, flag)
- __getip._get_variable2(var, idx, flag)
- end
- def _set_variable(var, value, flag)
- __getip._set_variable(var, value, flag)
- end
- def _set_variable2(var, idx, value, flag)
- __getip._set_variable2(var, idx, value, flag)
- end
- def _unset_variable(var, flag)
- __getip._unset_variable(var, flag)
- end
- def _unset_variable2(var, idx, flag)
- __getip._unset_variable2(var, idx, flag)
- end
-
- def _get_global_var(var)
- __getip._get_global_var(var)
- end
- def _get_global_var2(var, idx)
- __getip._get_global_var2(var, idx)
- end
- def _set_global_var(var, value)
- __getip._set_global_var(var, value)
- end
- def _set_global_var2(var, idx, value)
- __getip._set_global_var2(var, idx, value)
- end
- def _unset_global_var(var)
- __getip._unset_global_var(var)
- end
- def _unset_global_var2(var, idx)
- __getip._unset_global_var2(var, idx)
- end
-
- def _make_menu_embeddable(menu_path)
- __getip._make_menu_embeddable(menu_path)
- end
-
- def _split_tklist(str)
- __getip._split_tklist(str)
- end
- def _merge_tklist(*args)
- __getip._merge_tklist(*args)
- end
- def _conv_listelement(arg)
- __getip._conv_listelement(arg)
- end
-
- def _create_console
- __getip._create_console
- end
-end
-
-
-# wrap methods on TclTkLib : not permit calling TclTkLib module methods
-class << TclTkLib
- def mainloop(check_root = true)
- MultiTkIp.mainloop(check_root)
- end
- def mainloop_watchdog(check_root = true)
- MultiTkIp.mainloop_watchdog(check_root)
- end
- def do_one_event(flag = TclTkLib::EventFlag::ALL)
- MultiTkIp.do_one_event(flag)
- end
- #def mainloop_abort_on_exception
- # MultiTkIp.mainloop_abort_on_exception
- #end
- #def mainloop_abort_on_exception=(mode)
- # MultiTkIp.mainloop_abort_on_exception=(mode)
- #end
- def set_eventloop_tick(tick)
- MultiTkIp.set_eventloop_tick(tick)
- end
- def get_eventloop_tick
- MultiTkIp.get_eventloop_tick
- end
- def set_no_event_wait(tick)
- MultiTkIp.set_no_event_wait(tick)
- end
- def get_no_event_wait
- MultiTkIp.get_no_event_wait
- end
- def set_eventloop_weight(loop_max, no_event_tick)
- MultiTkIp.set_eventloop_weight(loop_max, no_event_tick)
- end
- def get_eventloop_weight
- MultiTkIp.get_eventloop_weight
- end
- def restart(*args)
- MultiTkIp.restart(*args)
- end
-
- def _merge_tklist(*args)
- MultiTkIp._merge_tklist(*args)
- end
- def _conv_listelement(arg)
- MultiTkIp._conv_listelement(arg)
- end
-end
-
-
-# depend on TclTkIp
-class MultiTkIp
-# def mainloop(check_root = true, restart_on_dead = true)
- def mainloop(check_root = true, restart_on_dead = false)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- if WITH_RUBY_VM ### Ruby 1.9 !!!!!!!!!!!
- return @interp_thread.value if @interp_thread
- end
-
- #return self if self.slave?
- #return self if self != @@DEFAULT_MASTER
- if self != @@DEFAULT_MASTER
- if @wait_on_mainloop[0]
- begin
- @wait_on_mainloop[1] += 1
- @cmd_queue.enq([@system, 'call_mainloop',
- Thread.current, check_root])
- Thread.stop
- rescue MultiTkIp_OK => ret
- # return value
- if ret.value.kind_of?(Thread)
- return ret.value.value
- else
- return ret.value
- end
- rescue SystemExit => e
- # exit IP
- warn("Warning: " + e.inspect + " on " + self.inspect) if $DEBUG
- begin
- self._eval_without_enc('exit')
- rescue Exception
- end
- self.delete
- rescue StandardError => e
- if $DEBUG
- warn("Warning: " + e.class.inspect +
- ((e.message.length > 0)? ' "' + e.message + '"': '') +
- " on " + self.inspect)
- end
- return e
- rescue Exception => e
- return e
- ensure
- @wait_on_mainloop[1] -= 1
- end
- end
- return
- end
-
- unless restart_on_dead
- @wait_on_mainloop[1] += 1
-=begin
- begin
- @interp.mainloop(check_root)
- rescue StandardError => e
- if $DEBUG
- warn("Warning: " + e.class.inspect +
- ((e.message.length > 0)? ' "' + e.message + '"': '') +
- " on " + self.inspect)
- end
- end
-=end
- begin
- @interp.mainloop(check_root)
- ensure
- @wait_on_mainloop[1] -= 1
- end
- else
- loop do
- break unless self.alive?
- if check_root
- begin
- break if TclTkLib.num_of_mainwindows == 0
- rescue StandardError
- break
- end
- end
- break if @interp.deleted?
- begin
- @wait_on_mainloop[1] += 1
- @interp.mainloop(check_root)
- rescue StandardError => e
- if TclTkLib.mainloop_abort_on_exception != nil
- #STDERR.print("Warning: Tk mainloop receives ", $!.class.inspect,
- # " exception (ignore) : ", $!.message, "\n");
- if $DEBUG
- warn("Warning: Tk mainloop receives " << e.class.inspect <<
- " exception (ignore) : " << e.message);
- end
- end
- #raise e
- rescue Exception => e
-=begin
- if TclTkLib.mainloop_abort_on_exception != nil
- #STDERR.print("Warning: Tk mainloop receives ", $!.class.inspect,
- # " exception (ignore) : ", $!.message, "\n");
- if $DEBUG
- warn("Warning: Tk mainloop receives " << e.class.inspect <<
- " exception (ignore) : " << e.message);
- end
- end
-=end
- raise e
- ensure
- @wait_on_mainloop[1] -= 1
- Thread.pass # avoid eventloop conflict
- end
- end
- end
- self
- end
-
- def make_safe
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.make_safe
- end
-
- def safe?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.safe?
- end
-
- def safe_base?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @safe_base
- end
-
- def allow_ruby_exit?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.allow_ruby_exit?
- end
-
- def allow_ruby_exit= (mode)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.allow_ruby_exit = mode
- end
-
- def delete
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @slave_ip_tbl.each{|name, subip|
- _destroy_slaves_of_slaveIP(subip)
-=begin
- begin
- subip._invoke('destroy', '.') unless subip.deleted?
- rescue Exception
- end
-=end
- begin
- # subip._eval_without_enc("foreach i [after info] {after cancel $i}")
- unless subip.deleted?
- after_ids = subip._eval_without_enc("after info")
- subip._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}")
- end
- rescue Exception
- end
-
- # safe_base?
- if @interp._eval_without_enc("catch {::safe::interpConfigure #{name}}") == '0'
- begin
- @interp._eval_without_enc("::safe::interpDelete #{name}")
- rescue Exception
- else
- next if subip.deleted?
- end
- end
- if subip.respond_to?(:safe_base?) && subip.safe_base? &&
- !subip.deleted?
- # do 'exit' to call the delete_hook procedure
- begin
- subip._eval_without_enc('exit')
- rescue Exception
- end
- else
- begin
- subip.delete unless subip.deleted?
- rescue Exception
- end
- end
- }
-
- begin
- # @interp._eval_without_enc("foreach i [after info] {after cancel $i}")
- after_ids = @interp._eval_without_enc("after info")
- @interp._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}")
- rescue Exception
- end
-
- begin
- @interp._invoke('destroy', '.') unless @interp.deleted?
- rescue Exception
- end
-
- if @safe_base && !@interp.deleted?
- # do 'exit' to call the delete_hook procedure
- @interp._eval_without_enc('exit')
- end
- @interp.delete
- self
- end
-
- def deleted?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.deleted?
- end
-
- def has_mainwindow?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.has_mainwindow?
- end
-
- def invalid_namespace?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.invalid_namespace?
- end
-
- def abort(msg = nil)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- if master? && !safe? && allow_ruby_exit?
- if msg
- Kernel.abort(msg)
- else
- Kernel.abort
- end
- else
- # ignore msg
- delete
- 1
- end
- end
-
- def exit(st = true)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- if master? && !safe? && allow_ruby_exit?
- Kernel.exit(st)
- else
- delete
- st
- end
- end
-
- def exit!(st = false)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- if master? && !safe? && allow_ruby_exit?
- Kernel.exit!(st)
- else
- delete
- st
- end
- end
-
- def restart(app_name = nil, keys = {})
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- _init_ip_internal(@@INIT_IP_ENV, @@ADD_TK_PROCS)
-
- @interp._invoke('set', 'argv0', app_name) if app_name
- if keys.kind_of?(Hash)
- @interp._invoke('set', 'argv', _keys2opts(keys))
- end
-
- @interp.restart
- end
-
- def __eval(str)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.__eval(str)
- end
-
- def __invoke(*args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.__invoke(*args)
- end
-
- def _eval(str)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._eval(str)
- end
-
- def _invoke(*args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke(*args)
- end
-
- def _eval_without_enc(str)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._eval_without_enc(str)
- end
-
- def _invoke_without_enc(*args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke_without_enc(*args)
- end
-
- def _eval_with_enc(str)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._eval_with_enc(str)
- end
-
- def _invoke_with_enc(*args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke_with_enc(*args)
- end
-
- def _toUTF8(str, encoding=nil)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._toUTF8(str, encoding)
- end
-
- def _fromUTF8(str, encoding=nil)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._fromUTF8(str, encoding)
- end
-
- def _thread_vwait(var)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._thread_vwait(var)
- end
-
- def _thread_tkwait(mode, target)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._thread_tkwait(mode, target)
- end
-
- def _return_value
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._return_value
- end
-
- def _get_variable(var, flag)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._get_variable(var, flag)
- end
- def _get_variable2(var, idx, flag)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._get_variable2(var, idx, flag)
- end
- def _set_variable(var, value, flag)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._set_variable(var, value, flag)
- end
- def _set_variable2(var, idx, value, flag)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._set_variable2(var, idx, value, flag)
- end
- def _unset_variable(var, flag)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._unset_variable(var, flag)
- end
- def _unset_variable2(var, idx, flag)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._unset_variable2(var, idx, flag)
- end
-
- def _get_global_var(var)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._get_global_var(var)
- end
- def _get_global_var2(var, idx)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._get_global_var2(var, idx)
- end
- def _set_global_var(var, value)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._set_global_var(var, value)
- end
- def _set_global_var2(var, idx, value)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._set_global_var2(var, idx, value)
- end
- def _unset_global_var(var)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._unset_global_var(var)
- end
- def _unset_global_var2(var, idx)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._unset_global_var2(var, idx)
- end
-
- def _make_menu_embeddable(menu_path)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._make_menu_embeddable(menu_path)
- end
-
- def _split_tklist(str)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._split_tklist(str)
- end
- def _merge_tklist(*args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._merge_tklist(*args)
- end
- def _conv_listelement(arg)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._conv_listelement(arg)
- end
-end
-
-
-# interp command support
-class MultiTkIp
- def _lst2ary(str)
- return [] if str == ""
- idx = str.index('{')
- while idx and idx > 0 and str[idx-1] == ?\\
- idx = str.index('{', idx+1)
- end
- return str.split unless idx
-
- list = str[0,idx].split
- str = str[idx+1..-1]
- i = -1
- brace = 1
- str.each_byte {|c|
- c = c.chr
- i += 1
- brace += 1 if c == '{'
- brace -= 1 if c == '}'
- break if brace == 0
- }
- if i == 0
- list.push ''
- elsif str[0, i] == ' '
- list.push ' '
- else
- list.push str[0..i-1]
- end
- #list += _lst2ary(str[i+1..-1])
- list.concat(_lst2ary(str[i+1..-1]))
- list
- end
- private :_lst2ary
-
- def _slavearg(slave)
- if slave.kind_of?(MultiTkIp)
- slave.path
- elsif slave.kind_of?(String)
- slave
- else
- slave.to_s
- end
- end
- private :_slavearg
-
- def alias_info(slave, cmd_name)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- _lst2ary(@interp._invoke('interp', 'alias', _slavearg(slave), cmd_name))
- end
- def self.alias_info(slave, cmd_name)
- __getip.alias_info(slave, cmd_name)
- end
-
- def alias_delete(slave, cmd_name)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'alias', _slavearg(slave), cmd_name, '')
- self
- end
- def self.alias_delete(slave, cmd_name)
- __getip.alias_delete(slave, cmd_name)
- self
- end
-
- def def_alias(slave, new_cmd, org_cmd, *args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- ret = @interp._invoke('interp', 'alias', _slavearg(slave), new_cmd,
- '', org_cmd, *args)
- (ret == new_cmd)? self: nil
- end
- def self.def_alias(slave, new_cmd, org_cmd, *args)
- ret = __getip.def_alias(slave, new_cmd, org_cmd, *args)
- (ret == new_cmd)? self: nil
- end
-
- def aliases(slave = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- _lst2ary(@interp._invoke('interp', 'aliases', _slavearg(slave)))
- end
- def self.aliases(slave = '')
- __getip.aliases(slave)
- end
-
- def delete_slaves(*args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- slaves = args.collect{|s| _slavearg(s)}
- @interp._invoke('interp', 'delete', *slaves) if slaves.size > 0
- self
- end
- def self.delete_slaves(*args)
- __getip.delete_slaves(*args)
- self
- end
-
- def exist?(slave = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- ret = @interp._invoke('interp', 'exists', _slavearg(slave))
- (ret == '1')? true: false
- end
- def self.exist?(slave = '')
- __getip.exist?(slave)
- end
-
- def delete_cmd(slave, cmd)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- slave_invoke = @interp._invoke('list', 'rename', cmd, '')
- @interp._invoke('interp', 'eval', _slavearg(slave), slave_invoke)
- self
- end
- def self.delete_cmd(slave, cmd)
- __getip.delete_cmd(slave, cmd)
- self
- end
-
- def expose_cmd(slave, cmd, aliasname = nil)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- if aliasname
- @interp._invoke('interp', 'expose', _slavearg(slave), cmd, aliasname)
- else
- @interp._invoke('interp', 'expose', _slavearg(slave), cmd)
- end
- self
- end
- def self.expose_cmd(slave, cmd, aliasname = nil)
- __getip.expose_cmd(slave, cmd, aliasname)
- self
- end
-
- def hide_cmd(slave, cmd, aliasname = nil)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- if aliasname
- @interp._invoke('interp', 'hide', _slavearg(slave), cmd, aliasname)
- else
- @interp._invoke('interp', 'hide', _slavearg(slave), cmd)
- end
- self
- end
- def self.hide_cmd(slave, cmd, aliasname = nil)
- __getip.hide_cmd(slave, cmd, aliasname)
- self
- end
-
- def hidden_cmds(slave = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- _lst2ary(@interp._invoke('interp', 'hidden', _slavearg(slave)))
- end
- def self.hidden_cmds(slave = '')
- __getip.hidden_cmds(slave)
- end
-
- def invoke_hidden(slave, cmd, *args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- else
- keys = []
- end
- keys << _slavearg(slave)
- if Tk::TCL_MAJOR_VERSION > 8 ||
- (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5)
- keys << '--'
- end
- keys << cmd
- keys.concat(args)
- @interp._invoke('interp', 'invokehidden', *keys)
- end
- def self.invoke_hidden(slave, cmd, *args)
- __getip.invoke_hidden(slave, cmd, *args)
- end
-
- def invoke_hidden_on_global(slave, cmd, *args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- else
- keys = []
- end
- keys << _slavearg(slave)
- keys << '-global'
- if Tk::TCL_MAJOR_VERSION > 8 ||
- (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5)
- keys << '--'
- end
- keys << cmd
- keys.concat(args)
- @interp._invoke('interp', 'invokehidden', *keys)
- end
- def self.invoke_hidden_on_global(slave, cmd, *args)
- __getip.invoke_hidden_on_global(slave, cmd, *args)
- end
-
- def invoke_hidden_on_namespace(slave, ns, cmd, *args)
- # for Tcl8.5 or later
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- else
- keys = []
- end
- keys << _slavearg(slave)
- keys << '-namespace' << TkComm._get_eval_string(ns)
- keys << '--' << cmd
- keys.concat(args)
- @interp._invoke('interp', 'invokehidden', *keys)
- end
- def self.invoke_hidden_on_namespace(slave, ns, cmd, *args)
- __getip.invoke_hidden_on_namespace(slave, ns, cmd, *args)
- end
-
- def mark_trusted(slave = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'marktrusted', _slavearg(slave))
- self
- end
- def self.mark_trusted(slave = '')
- __getip.mark_trusted(slave)
- self
- end
-
- def set_bgerror_handler(cmd = Proc.new, slave = nil, &b)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- unless TkComm._callback_entry?(cmd)
- if !slave && b
- slave = cmd
- cmd = Proc.new(&b)
- end
- end
- slave = '' unless slave
-
- @interp._invoke('interp', 'bgerror', _slavearg(slave), cmd)
- end
- def self.bgerror(cmd = Proc.new, slave = nil, &b)
- __getip.bgerror(cmd, slave, &b)
- end
-
- def get_bgerror_handler(slave = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- procedure(@interp._invoke('interp', 'bgerror', _slavearg(slave)))
- end
- def self.bgerror(slave = '')
- __getip.bgerror(slave)
- end
-
- def set_limit(limit_type, slave = '', opts = {})
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'limit', _slavearg(slave), limit_type, opts)
- end
- def self.set_limit(limit_type, slave = '', opts = {})
- __getip.set_limit(limit_type, slave, opts)
- end
-
- def get_limit(limit_type, slave = '', slot = nil)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- if slot
- num_or_str(@interp._invoke('interp', 'limit', _slavearg(slave),
- limit_type, slot))
- else
- l = @interp._split_tklist(@interp._invoke_without_enc('interp', 'limit',
- _slavearg(slave),
- limit_type))
- l.map!{|s| _fromUTF8(s)}
- r = {}
- until l.empty?
- key = l.shift[1..-1]
- val = l.shift
- val = num_or_str(val) if val
- r[key] = val
- end
- r
- end
- end
- def self.get_limit(limit_type, slave = '', slot = nil)
- __getip.get_limit(limit_type, slave, slot)
- end
-
- def recursion_limit(slave = '', limit = None)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- number(@interp._invoke('interp', 'recursionlimit',
- _slavearg(slave), limit))
- end
- def self.recursion_limit(slave = '', limit = None)
- __getip.recursion_limit(slave)
- end
-
- def alias_target(aliascmd, slave = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'target', _slavearg(slave), aliascmd)
- end
- def self.alias_target(aliascmd, slave = '')
- __getip.alias_target(aliascmd, slave)
- end
-
- def share_stdin(dist, src = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'share', src, 'stdin', dist)
- self
- end
- def self.share_stdin(dist, src = '')
- __getip.share_stdin(dist, src)
- self
- end
-
- def share_stdout(dist, src = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'share', src, 'stdout', dist)
- self
- end
- def self.share_stdout(dist, src = '')
- __getip.share_stdout(dist, src)
- self
- end
-
- def share_stderr(dist, src = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'share', src, 'stderr', dist)
- self
- end
- def self.share_stderr(dist, src = '')
- __getip.share_stderr(dist, src)
- self
- end
-
- def transfer_stdin(dist, src = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'transfer', src, 'stdin', dist)
- self
- end
- def self.transfer_stdin(dist, src = '')
- __getip.transfer_stdin(dist, src)
- self
- end
-
- def transfer_stdout(dist, src = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'transfer', src, 'stdout', dist)
- self
- end
- def self.transfer_stdout(dist, src = '')
- __getip.transfer_stdout(dist, src)
- self
- end
-
- def transfer_stderr(dist, src = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'transfer', src, 'stderr', dist)
- self
- end
- def self.transfer_stderr(dist, src = '')
- __getip.transfer_stderr(dist, src)
- self
- end
-
- def share_stdio(dist, src = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'share', src, 'stdin', dist)
- @interp._invoke('interp', 'share', src, 'stdout', dist)
- @interp._invoke('interp', 'share', src, 'stderr', dist)
- self
- end
- def self.share_stdio(dist, src = '')
- __getip.share_stdio(dist, src)
- self
- end
-
- def transfer_stdio(dist, src = '')
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._invoke('interp', 'transfer', src, 'stdin', dist)
- @interp._invoke('interp', 'transfer', src, 'stdout', dist)
- @interp._invoke('interp', 'transfer', src, 'stderr', dist)
- self
- end
- def self.transfer_stdio(dist, src = '')
- __getip.transfer_stdio(dist, src)
- self
- end
-end
-
-
-# Safe Base :: manipulating safe interpreter
-class MultiTkIp
- def safeip_configure(slot, value=None)
- # use for '-noStatics' option ==> {statics=>false}
- # for '-nestedLoadOk' option ==> {nested=>true}
- if slot.kind_of?(Hash)
- ip = MultiTkIp.__getip
- ip._eval('::safe::interpConfigure ' + @ip_name + ' ' + _keys2opts(slot))
- else
- ip._eval('::safe::interpConfigure ' + @ip_name + ' ' +
- "-#{slot} #{_get_eval_string(value)}")
- end
- self
- end
-
- def safeip_configinfo(slot = nil)
- ip = MultiTkIp.__getip
- ret = {}
- if slot
- conf = _lst2ary(ip._eval("::safe::interpConfigure " +
- @ip_name + " -#{slot}"))
- if conf[0] == '-deleteHook'
-=begin
- if conf[1] =~ /^rb_out\S* (c(_\d+_)?\d+)/
- ret[conf[0][1..-1]] = MultiTkIp._tk_cmd_tbl[$1]
-=end
- if conf[1] =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/
- ret[conf[0][1..-1]] = MultiTkIp._tk_cmd_tbl[$4]
- else
- ret[conf[0][1..-1]] = conf[1]
- end
- else
- ret[conf[0][1..-1]] = conf[1]
- end
- else
- Hash[*_lst2ary(ip._eval("::safe::interpConfigure " +
- @ip_name))].each{|k, v|
- if k == '-deleteHook'
-=begin
- if v =~ /^rb_out\S* (c(_\d+_)?\d+)/
- ret[k[1..-1]] = MultiTkIp._tk_cmd_tbl[$1]
-=end
- if v =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/
- ret[k[1..-1]] = MultiTkIp._tk_cmd_tbl[$4]
- else
- ret[k[1..-1]] = v
- end
- else
- ret[k[1..-1]] = v
- end
- }
- end
- ret
- end
-
- def safeip_delete
- ip = MultiTkIp.__getip
- ip._eval("::safe::interpDelete " + @ip_name)
- end
-
- def safeip_add_to_access_path(dir)
- ip = MultiTkIp.__getip
- ip._eval("::safe::interpAddToAccessPath #{@ip_name} #{dir}")
- end
-
- def safeip_find_in_access_path(dir)
- ip = MultiTkIp.__getip
- ip._eval("::safe::interpFindInAccessPath #{@ip_name} #{dir}")
- end
-
- def safeip_set_log_cmd(cmd = Proc.new)
- ip = MultiTkIp.__getip
- ip._eval("::safe::setLogCmd #{@ip_name} #{_get_eval_string(cmd)}")
- end
-end
-
-
-# encoding convert
-class << MultiTkIp
- def encoding_table
- __getip.encoding_table
- end
-
- def force_default_encoding=(mode)
- __getip.force_default_encoding=(mode)
- end
-
- def force_default_encoding?
- __getip.force_default_encoding?
- end
-
- def default_encoding=(enc)
- __getip.default_encoding=(enc)
- end
-
- def encoding=(enc)
- __getip.encoding=(enc)
- end
-
- def encoding_name
- __getip.encoding_name
- end
-
- def encoding_obj
- __getip.encoding_obj
- end
- alias encoding encoding_name
- alias default_encoding encoding_name
-
- def encoding_convertfrom(str, enc=None)
- __getip.encoding_convertfrom(str, enc)
- end
- alias encoding_convert_from encoding_convertfrom
-
- def encoding_convertto(str, enc=None)
- __getip.encoding_convertto(str, enc)
- end
- alias encoding_convert_to encoding_convertto
-end
-class MultiTkIp
- def encoding_table
- @interp.encoding_table
- end
-
- def force_default_encoding=(mode)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.force_default_encoding = mode
- end
- def force_default_encoding?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.force_default_encoding?
- end
-
- def default_encoding=(enc)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.default_encoding = enc
- end
-
- def encoding=(enc)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.encoding = enc
- end
- def encoding_name
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.encoding_name
- end
- def encoding_obj
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.encoding_obj
- end
- alias encoding encoding_name
- alias default_encoding encoding_name
-
- def encoding_convertfrom(str, enc=None)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.encoding_convertfrom(str, enc)
- end
- alias encoding_convert_from encoding_convertfrom
-
- def encoding_convertto(str, enc=None)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp.encoding_convertto(str, enc)
- end
- alias encoding_convert_to encoding_convertto
-end
-
-
-# remove methods for security
-=begin
-class MultiTkIp
- INTERP_THREAD = @@DEFAULT_MASTER.instance_variable_get('@interp_thread')
- INTERP_MUTEX = INTERP_THREAD[:mutex]
- INTERP_ROOT_CHECK = INTERP_THREAD[:root_check]
-
- # undef_method :instance_eval
- undef_method :instance_variable_get
- undef_method :instance_variable_set
-end
-
-module TkCore
- if MultiTkIp::WITH_RUBY_VM &&
- ! MultiTkIp::RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!!
- INTERP_THREAD = MultiTkIp::INTERP_THREAD
- INTERP_MUTEX = MultiTkIp::INTERP_MUTEX
- INTERP_ROOT_CHECK = MultiTkIp::INTERP_ROOT_CHECK
- end
-end
-class MultiTkIp
- remove_const(:INTERP_THREAD)
- remove_const(:INTERP_MUTEX)
- remove_const(:INTERP_ROOT_CHECK)
-end
-=end
-if MultiTkIp::WITH_RUBY_VM &&
- ! MultiTkIp::RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!!
- class MultiTkIp
- INTERP_THREAD = @@DEFAULT_MASTER.instance_variable_get('@interp_thread')
- INTERP_THREAD_STATUS = INTERP_THREAD[:status]
- INTERP_MUTEX = INTERP_THREAD[:mutex]
- INTERP_ROOT_CHECK = INTERP_THREAD[:root_check]
- end
- module TkCore
- INTERP_THREAD = MultiTkIp::INTERP_THREAD
- INTERP_THREAD_STATUS = MultiTkIp::INTERP_THREAD_STATUS
- INTERP_MUTEX = MultiTkIp::INTERP_MUTEX
- INTERP_ROOT_CHECK = MultiTkIp::INTERP_ROOT_CHECK
- end
- class MultiTkIp
- remove_const(:INTERP_THREAD)
- remove_const(:INTERP_THREAD_STATUS)
- remove_const(:INTERP_MUTEX)
- remove_const(:INTERP_ROOT_CHECK)
- end
-end
-
-class MultiTkIp
- # undef_method :instance_eval
- undef_method :instance_variable_get
- undef_method :instance_variable_set
-end
-# end of MultiTkIp definition
-
-# defend against modification
-#MultiTkIp.freeze
-#TclTkLib.freeze
-
-########################################
-# start Tk which depends on MultiTkIp
-module TkCore
- INTERP = MultiTkIp
-end
-require 'tk'
diff --git a/ext/tk/lib/remote-tk.rb b/ext/tk/lib/remote-tk.rb
deleted file mode 100644
index 4d33637c30..0000000000
--- a/ext/tk/lib/remote-tk.rb
+++ /dev/null
@@ -1,527 +0,0 @@
-# frozen_string_literal: false
-#
-# remote-tk.rb - supports to control remote Tk interpreters
-# by Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
-
-if defined? MultiTkIp
- fail RuntimeError, "'remote-tk' library must be required before requiring 'multi-tk'"
-end
-
-require 'tkutil'
-
-class MultiTkIp; end
-class RemoteTkIp < MultiTkIp; end
-
-class MultiTkIp
- @@IP_TABLE = TkUtil.untrust({}) unless defined?(@@IP_TABLE)
- @@TK_TABLE_LIST = TkUtil.untrust([]) unless defined?(@@TK_TABLE_LIST)
- def self._IP_TABLE; @@IP_TABLE; end
- def self._TK_TABLE_LIST; @@TK_TABLE_LIST; end
-
- @flag = true
- def self._DEFAULT_MASTER
- # work only once
- if @flag
- @flag = nil
- @@DEFAULT_MASTER
- else
- nil
- end
- end
-end
-class RemoteTkIp
- @@IP_TABLE = MultiTkIp._IP_TABLE unless defined?(@@IP_TABLE)
- @@TK_TABLE_LIST = MultiTkIp._TK_TABLE_LIST unless defined?(@@TK_TABLE_LIST)
-end
-class << MultiTkIp
- undef _IP_TABLE
- undef _TK_TABLE_LIST
-end
-
-require 'multi-tk'
-
-class RemoteTkIp
- if defined?(@@DEFAULT_MASTER)
- MultiTkIp._DEFAULT_MASTER
- else
- @@DEFAULT_MASTER = MultiTkIp._DEFAULT_MASTER
- end
-end
-
-
-###############################
-
-class << RemoteTkIp
- undef new_master, new_slave, new_safe_slave
- undef new_trusted_slave, new_safeTk
-
- def new(*args, &b)
- ip = __new(*args)
- ip.eval_proc(&b) if b
- ip
- end
-end
-
-class RemoteTkIp
- def initialize(remote_ip, displayof=nil, timeout=5)
- @interp = MultiTkIp.__getip
- if @interp.safe?
- fail SecurityError, "safe-IP cannot create RemoteTkIp"
- end
-
-
- @interp.allow_ruby_exit = false
- @appname = @interp._invoke('tk', 'appname')
- @remote = remote_ip.to_s.dup.freeze
- if displayof.kind_of?(TkWindow)
- @displayof = displayof.path.dup.freeze
- else
- @displayof = nil
- end
- if self.deleted?
- fail RuntimeError, "no Tk application named \"#{@remote}\""
- end
-
- @tk_windows = {}
- @tk_table_list = []
- @slave_ip_tbl = {}
- @slave_ip_top = {}
-
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
-
- TkUtil.untrust(@tk_windows) unless @tk_windows.tainted?
- TkUtil.untrust(@tk_table_list) unless @tk_table_list.tainted?
- TkUtil.untrust(@slave_ip_tbl) unless @slave_ip_tbl.tainted?
- TkUtil.untrust(@slave_ip_top) unless @slave_ip_top.tainted?
-
- @system = Object.new
-
- @threadgroup = ThreadGroup.new
-
- @safe_level = [$SAFE]
-
- @wait_on_mainloop = [true, 0]
-
- @cmd_queue = Queue.new
-
-=begin
- @cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog()
-
- @threadgroup.add @cmd_receiver
- @threadgroup.add @receiver_watchdog
-
- @threadgroup.enclose
-=end
- @@DEFAULT_MASTER.assign_receiver_and_watchdog(self)
-
- @@IP_TABLE[@threadgroup] = self
- @@TK_TABLE_LIST.size.times{
- (tbl = {}).tainted? || TkUtil.untrust(tbl)
- @tk_table_list << tbl
- }
-
- @ret_val = TkVariable.new
- if timeout > 0 && ! _available_check(timeout)
- fail RuntimeError, "cannot create connection"
- end
- @ip_id = _create_connection
-
- class << self
- undef :instance_eval
- end
-
- self.freeze # defend against modification
- end
-
- def manipulable?
- return true if (Thread.current.group == ThreadGroup::Default)
- MultiTkIp.__getip == @interp && ! @interp.safe?
- end
- def self.manipulable?
- true
- end
-
- def _is_master_of?(tcltkip_obj)
- tcltkip_obj == @interp
- end
- protected :_is_master_of?
-
- def _ip_id_
- @ip_id
- end
-
- def _available_check(timeout = 5)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- return nil if timeout < 1
- @ret_val.value = ''
- @interp._invoke('send', '-async', @remote,
- 'send', '-async', Tk.appname,
- "set #{@ret_val.id} ready")
- Tk.update
- if @ret_val != 'ready'
- (1..(timeout*5)).each{
- sleep 0.2
- Tk.update
- break if @ret_val == 'ready'
- }
- end
- @ret_val.value == 'ready'
- end
- private :_available_check
-
- def _create_connection
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- ip_id = '_' + @interp._invoke('send', @remote, <<-'EOS') + '_'
- if {[catch {set _rubytk_control_ip_id_} ret] != 0} {
- set _rubytk_control_ip_id_ 0
- } else {
- set _rubytk_control_ip_id_ [expr $ret + 1]
- }
- return $_rubytk_control_ip_id_
- EOS
-
- @interp._invoke('send', @remote, <<-EOS)
- proc rb_out#{ip_id} args {
- send #{@appname} rb_out \$args
- }
- EOS
-
- ip_id
- end
- private :_create_connection
-
- def _appsend(enc_mode, async, *cmds)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- p ['_appsend', [@remote, @displayof], enc_mode, async, cmds] if $DEBUG
- if $SAFE >= 1 && cmds.find{|obj| obj.tainted?}
- fail SecurityError, "cannot send tainted commands at level #{$SAFE}"
- end
-
- cmds = @interp._merge_tklist(*TkUtil::_conv_args([], enc_mode, *cmds))
- if @displayof
- if async
- @interp.__invoke('send', '-async', '-displayof', @displayof,
- '--', @remote, *cmds)
- else
- @interp.__invoke('send', '-displayof', @displayof,
- '--', @remote, *cmds)
- end
- else
- if async
- @interp.__invoke('send', '-async', '--', @remote, *cmds)
- else
- @interp.__invoke('send', '--', @remote, *cmds)
- end
- end
- end
- private :_appsend
-
- def ready?(timeout=5)
- if timeout < 0
- fail ArgumentError, "timeout must be positive number"
- end
- _available_check(timeout)
- end
-
- def is_rubytk?
- return false if _appsend(false, false, 'info', 'command', 'ruby') == ""
- [ _appsend(false, false, 'ruby', 'RUBY_VERSION'),
- _appsend(false, false, 'set', 'tk_patchLevel') ]
- end
-
- def appsend(async, *args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- if async != true && async != false && async != nil
- args.unshift(async)
- async = false
- end
- if @displayof
- Tk.appsend_displayof(@remote, @displayof, async, *args)
- else
- Tk.appsend(@remote, async, *args)
- end
- end
-
- def rb_appsend(async, *args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- if async != true && async != false && async != nil
- args.unshift(async)
- async = false
- end
- if @displayof
- Tk.rb_appsend_displayof(@remote, @displayof, async, *args)
- else
- Tk.rb_appsend(@remote, async, *args)
- end
- end
-
- def create_slave(name, safe=false)
- if safe
- safe_opt = ''
- else
- safe_opt = '-safe'
- end
- _appsend(false, false, "interp create #{safe_opt} -- #{name}")
- end
-
- def make_safe
- fail RuntimeError, 'cannot change safe mode of the remote interpreter'
- end
-
- def safe?
- _appsend(false, false, 'interp issafe')
- end
-
- def safe_base?
- false
- end
-
- def allow_ruby_exit?
- false
- end
-
- def allow_ruby_exit= (mode)
- fail RuntimeError, 'cannot change mode of the remote interpreter'
- end
-
- def delete
- _appsend(false, true, 'exit')
- end
-
- def deleted?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- if @displayof
- lst = @interp._invoke_without_enc('winfo', 'interps',
- '-displayof', @displayof)
- else
- lst = @interp._invoke_without_enc('winfo', 'interps')
- end
- # unless @interp._split_tklist(lst).index(@remote)
- unless @interp._split_tklist(lst).index(_toUTF8(@remote))
- true
- else
- false
- end
- end
-
- def has_mainwindow?
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
-
- begin
- inf = @interp._invoke_without_enc('info', 'command', '.')
- rescue Exception
- return nil
- end
- if !inf.kind_of?(String) || inf != '.'
- false
- else
- true
- end
- end
-
- def invalid_namespace?
- false
- end
-
- def restart
- fail RuntimeError, 'cannot restart the remote interpreter'
- end
-
- def __eval(str)
- _appsend(false, false, str)
- end
- def _eval(str)
- _appsend(nil, false, str)
- end
- def _eval_without_enc(str)
- _appsend(false, false, str)
- end
- def _eval_with_enc(str)
- _appsend(true, false, str)
- end
-
- def _invoke(*args)
- _appsend(nil, false, *args)
- end
-
- def __invoke(*args)
- _appsend(false, false, *args)
- end
- def _invoke(*args)
- _appsend(nil, false, *args)
- end
- def _invoke_without_enc(*args)
- _appsend(false, false, *args)
- end
- def _invoke_with_enc(*args)
- _appsend(true, false, *args)
- end
-
- def _toUTF8(str, encoding=nil)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._toUTF8(str, encoding)
- end
-
- def _fromUTF8(str, encoding=nil)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._fromUTF8(str, encoding)
- end
-
- def _thread_vwait(var_name)
- _appsend(false, 'thread_vwait', varname)
- end
-
- def _thread_tkwait(mode, target)
- _appsend(false, 'thread_tkwait', mode, target)
- end
-
- def _return_value
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._return_value
- end
-
- def _get_variable(var_name, flag)
- # ignore flag
- _appsend(false, 'set', TkComm::_get_eval_string(var_name))
- end
- def _get_variable2(var_name, index_name, flag)
- # ignore flag
- _appsend(false, 'set', "#{TkComm::_get_eval_string(var_name)}(#{TkComm::_get_eval_string(index_name)})")
- end
-
- def _set_variable(var_name, value, flag)
- # ignore flag
- _appsend(false, 'set', TkComm::_get_eval_string(var_name), TkComm::_get_eval_string(value))
- end
- def _set_variable2(var_name, index_name, value, flag)
- # ignore flag
- _appsend(false, 'set', "#{TkComm::_get_eval_string(var_name)}(#{TkComm::_get_eval_string(index_name)})", TkComm::_get_eval_string(value))
- end
-
- def _unset_variable(var_name, flag)
- # ignore flag
- _appsend(false, 'unset', TkComm::_get_eval_string(var_name))
- end
- def _unset_variable2(var_name, index_name, flag)
- # ignore flag
- _appsend(false, 'unset', "#{var_name}(#{index_name})")
- end
-
- def _get_global_var(var_name)
- _appsend(false, 'set', TkComm::_get_eval_string(var_name))
- end
- def _get_global_var2(var_name, index_name)
- _appsend(false, 'set', "#{TkComm::_get_eval_string(var_name)}(#{TkComm::_get_eval_string(index_name)})")
- end
-
- def _set_global_var(var_name, value)
- _appsend(false, 'set', TkComm::_get_eval_string(var_name), TkComm::_get_eval_string(value))
- end
- def _set_global_var2(var_name, index_name, value)
- _appsend(false, 'set', "#{TkComm::_get_eval_string(var_name)}(#{TkComm::_get_eval_string(index_name)})", TkComm::_get_eval_string(value))
- end
-
- def _unset_global_var(var_name)
- _appsend(false, 'unset', TkComm::_get_eval_string(var_name))
- end
- def _unset_global_var2(var_name, index_name)
- _appsend(false, 'unset', "#{var_name}(#{index_name})")
- end
-
- def _split_tklist(str)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._split_tklist(str)
- end
-
- def _merge_tklist(*args)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._merge_tklist(*args)
- end
-
- def _conv_listelement(str)
- raise SecurityError, "no permission to manipulate" unless self.manipulable?
- @interp._conv_listelement(str)
- end
-
- def _create_console
- fail RuntimeError, 'not support "_create_console" on the remote interpreter'
- end
-
- def mainloop
- fail RuntimeError, 'not support "mainloop" on the remote interpreter'
- end
- def mainloop_watchdog
- fail RuntimeError, 'not support "mainloop_watchdog" on the remote interpreter'
- end
- def do_one_event(flag = nil)
- fail RuntimeError, 'not support "do_one_event" on the remote interpreter'
- end
- def mainloop_abort_on_exception
- fail RuntimeError, 'not support "mainloop_abort_on_exception" on the remote interpreter'
- end
- def mainloop_abort_on_exception=(mode)
- fail RuntimeError, 'not support "mainloop_abort_on_exception=" on the remote interpreter'
- end
- def set_eventloop_tick(*args)
- fail RuntimeError, 'not support "set_eventloop_tick" on the remote interpreter'
- end
- def get_eventloop_tick
- fail RuntimeError, 'not support "get_eventloop_tick" on the remote interpreter'
- end
- def set_no_event_wait(*args)
- fail RuntimeError, 'not support "set_no_event_wait" on the remote interpreter'
- end
- def get_no_event_wait
- fail RuntimeError, 'not support "get_no_event_wait" on the remote interpreter'
- end
- def set_eventloop_weight(*args)
- fail RuntimeError, 'not support "set_eventloop_weight" on the remote interpreter'
- end
- def get_eventloop_weight
- fail RuntimeError, 'not support "get_eventloop_weight" on the remote interpreter'
- end
-end
-
-class << RemoteTkIp
- def mainloop(*args)
- fail RuntimeError, 'not support "mainloop" on the remote interpreter'
- end
- def mainloop_watchdog(*args)
- fail RuntimeError, 'not support "mainloop_watchdog" on the remote interpreter'
- end
- def do_one_event(flag = nil)
- fail RuntimeError, 'not support "do_one_event" on the remote interpreter'
- end
- def mainloop_abort_on_exception
- fail RuntimeError, 'not support "mainloop_abort_on_exception" on the remote interpreter'
- end
- def mainloop_abort_on_exception=(mode)
- fail RuntimeError, 'not support "mainloop_abort_on_exception=" on the remote interpreter'
- end
- def set_eventloop_tick(*args)
- fail RuntimeError, 'not support "set_eventloop_tick" on the remote interpreter'
- end
- def get_eventloop_tick
- fail RuntimeError, 'not support "get_eventloop_tick" on the remote interpreter'
- end
- def set_no_event_wait(*args)
- fail RuntimeError, 'not support "set_no_event_wait" on the remote interpreter'
- end
- def get_no_event_wait
- fail RuntimeError, 'not support "get_no_event_wait" on the remote interpreter'
- end
- def set_eventloop_weight(*args)
- fail RuntimeError, 'not support "set_eventloop_weight" on the remote interpreter'
- end
- def get_eventloop_weight
- fail RuntimeError, 'not support "get_eventloop_weight" on the remote interpreter'
- end
-end
diff --git a/ext/tk/lib/tcltk.rb b/ext/tk/lib/tcltk.rb
deleted file mode 100644
index 121f42c26e..0000000000
--- a/ext/tk/lib/tcltk.rb
+++ /dev/null
@@ -1,369 +0,0 @@
-# frozen_string_literal: false
-# tof
-
-#### tcltk library, more direct manipulation of tcl/tk
-#### Sep. 5, 1997 Y. Shigehiro
-
-require "tcltklib"
-
-################
-
-# module TclTk: collection of tcl/tk utilities (supplies namespace.)
-module TclTk
-
- # initialize Hash to hold unique symbols and such
- @namecnt = {}
-
- # initialize Hash to hold callbacks
- @callback = {}
-end
-
-# TclTk.mainloop(): call TclTkLib.mainloop()
-def TclTk.mainloop()
- print("mainloop: start\n") if $DEBUG
- TclTkLib.mainloop()
- print("mainloop: end\n") if $DEBUG
-end
-
-# TclTk.deletecallbackkey(ca): remove callback from TclTk module
-# this does not remove callbacks from tcl/tk interpreter
-# without calling this method, TclTkInterpreter will not be GCed
-# ca: callback(TclTkCallback)
-def TclTk.deletecallbackkey(ca)
- print("deletecallbackkey: ", ca.to_s(), "\n") if $DEBUG
- @callback.delete(ca.to_s)
-end
-
-# TclTk.dcb(ca, wid, W): call TclTk.deletecallbackkey() for each callbacks
-# in an array.
-# this is for callback for top-level <Destroy>
-# ca: array of callbacks(TclTkCallback)
-# wid: top-level widget(TclTkWidget)
-# w: information about window given by %W(String)
-def TclTk.dcb(ca, wid, w)
- if wid.to_s() == w
- ca.each{|i|
- TclTk.deletecallbackkey(i)
- }
- end
-end
-
-# TclTk._addcallback(ca): register callback
-# ca: callback(TclTkCallback)
-def TclTk._addcallback(ca)
- print("_addcallback: ", ca.to_s(), "\n") if $DEBUG
- @callback[ca.to_s()] = ca
-end
-
-# TclTk._callcallback(key, arg): invoke registered callback
-# key: key to select callback (to_s value of the TclTkCallback)
-# arg: parameter from tcl/tk interpreter
-def TclTk._callcallback(key, arg)
- print("_callcallback: ", @callback[key].inspect, "\n") if $DEBUG
- @callback[key]._call(arg)
- # throw out callback value
- # should return String to satisfy rb_eval_string()
- return ""
-end
-
-# TclTk._newname(prefix): generate unique name(String)
-# prefix: prefix of the unique name
-def TclTk._newname(prefix)
- # generated name counter is stored in @namecnt
- if !@namecnt.key?(prefix)
- # first appearing prefix, initialize
- @namecnt[prefix] = 1
- else
- # already appeared prefix, generate next name
- @namecnt[prefix] += 1
- end
- return "#{prefix}#{@namecnt[prefix]}"
-end
-
-################
-
-# class TclTkInterpreter: tcl/tk interpreter
-class TclTkInterpreter
-
- # initialize():
- def initialize()
- # generate interpreter object
- @ip = TclTkIp.new()
-
- # add ruby_fmt command to tcl interpreter
- # ruby_fmt command format arguments by `format' and call `ruby' command
- # (notice ruby command receives only one argument)
- if $DEBUG
- @ip._eval("proc ruby_fmt {fmt args} { puts \"ruby_fmt: $fmt $args\" ; set cmd [list ruby [format $fmt $args]] ; uplevel $cmd }")
- else
- @ip._eval("proc ruby_fmt {fmt args} { set cmd [list ruby [format $fmt $args]] ; uplevel $cmd }")
- end
-
- # @ip._get_eval_string(*args): generate string to evaluate in tcl interpreter
- # *args: script which is going to be evaluated under tcl/tk
- def @ip._get_eval_string(*args)
- argstr = ""
- args.each{|arg|
- argstr += " " if argstr != ""
- # call to_eval if it is defined
- if (arg.respond_to?(:to_eval))
- argstr += arg.to_eval()
- else
- # call to_s unless defined
- argstr += arg.to_s()
- end
- }
- return argstr
- end
-
- # @ip._eval_args(*args): evaluate string under tcl/tk interpreter
- # returns result string.
- # *args: script which is going to be evaluated under tcl/tk
- def @ip._eval_args(*args)
- # calculate the string to eval in the interpreter
- argstr = _get_eval_string(*args)
-
- # evaluate under the interpreter
- print("_eval: \"", argstr, "\"") if $DEBUG
- res = _eval(argstr)
- if $DEBUG
- print(" -> \"", res, "\"\n")
- elsif _return_value() != 0
- print(res, "\n")
- end
- fail(%Q/can't eval "#{argstr}"/) if _return_value() != 0 #'
- return res
- end
-
- # generate tcl/tk command object and register in the hash
- @commands = {}
- # for all commands registered in tcl/tk interpreter:
- @ip._eval("info command").split(/ /).each{|comname|
- if comname =~ /^[.]/
- # if command is a widget (path), generate TclTkWidget,
- # and register it in the hash
- @commands[comname] = TclTkWidget.new(@ip, comname)
- else
- # otherwise, generate TclTkCommand
- @commands[comname] = TclTkCommand.new(@ip, comname)
- end
- }
- end
-
- # commands(): returns hash of the tcl/tk commands
- def commands()
- return @commands
- end
-
- # rootwidget(): returns root widget(TclTkWidget)
- def rootwidget()
- return @commands["."]
- end
-
- # _tcltkip(): returns @ip(TclTkIp)
- def _tcltkip()
- return @ip
- end
-
- # method_missing(id, *args): execute undefined method as tcl/tk command
- # id: method symbol
- # *args: method arguments
- def method_missing(id, *args)
- # if command named by id registered, then execute it
- if @commands.key?(id.id2name)
- return @commands[id.id2name].e(*args)
- else
- # otherwise, exception
- super
- end
- end
-end
-
-# class TclTkObject: base class of the tcl/tk objects
-class TclTkObject
-
- # initialize(ip, exp):
- # ip: interpreter(TclTkIp)
- # exp: tcl/tk representation
- def initialize(ip, exp)
- fail("type is not TclTkIp") if !ip.kind_of?(TclTkIp)
- @ip = ip
- @exp = exp
- end
-
- # to_s(): returns tcl/tk representation
- def to_s()
- return @exp
- end
-end
-
-# class TclTkCommand: tcl/tk commands
-# you should not call TclTkCommand.new()
-# commands are created by TclTkInterpreter:initialize()
-class TclTkCommand < TclTkObject
-
- # e(*args): execute command. returns String (e is for exec or eval)
- # *args: command arguments
- def e(*args)
- return @ip._eval_args(to_s(), *args)
- end
-end
-
-# class TclTkLibCommand: tcl/tk commands in the library
-class TclTkLibCommand < TclTkCommand
-
- # initialize(ip, name):
- # ip: interpreter(TclTkInterpreter)
- # name: command name (String)
- def initialize(ip, name)
- super(ip._tcltkip, name)
- end
-end
-
-# class TclTkVariable: tcl/tk variable
-class TclTkVariable < TclTkObject
-
- # initialize(interp, dat):
- # interp: interpreter(TclTkInterpreter)
- # dat: the value to set(String)
- # if nil, not initialize variable
- def initialize(interp, dat)
- # auto-generate tcl/tk representation (variable name)
- exp = TclTk._newname("v_")
- # initialize TclTkObject
- super(interp._tcltkip(), exp)
- # safe this for `set' command
- @set = interp.commands()["set"]
- # set value
- set(dat) if dat
- end
-
- # although you can set/read variables by using set in tcl/tk,
- # we provide the method for accessing variables
-
- # set(data): set tcl/tk variable using `set'
- # data: new value
- def set(data)
- @set.e(to_s(), data.to_s())
- end
-
- # get(): read tcl/tk variable(String) using `set'
- def get()
- return @set.e(to_s())
- end
-end
-
-# class TclTkWidget: tcl/tk widget
-class TclTkWidget < TclTkCommand
-
- # initialize(*args):
- # *args: parameters
- def initialize(*args)
- if args[0].kind_of?(TclTkIp)
- # in case the 1st argument is TclTkIp:
-
- # Wrap tcl/tk widget by TclTkWidget
- # (used in TclTkInterpreter#initialize())
-
- # need two arguments
- fail("invalid # of parameter") if args.size != 2
-
- # ip: interpreter(TclTkIp)
- # exp: tcl/tk representation
- ip, exp = args
-
- # initialize TclTkObject
- super(ip, exp)
- elsif args[0].kind_of?(TclTkInterpreter)
- # in case 1st parameter is TclTkInterpreter:
-
- # generate new widget from parent widget
-
- # interp: interpreter(TclTkInterpreter)
- # parent: parent widget
- # command: widget generating tk command(label ç­‰)
- # *args: argument to the command
- interp, parent, command, *args = args
-
- # generate widget name
- exp = parent.to_s()
- exp += "." if exp !~ /[.]$/
- exp += TclTk._newname("w_")
- # initialize TclTkObject
- super(interp._tcltkip(), exp)
- # generate widget
- res = @ip._eval_args(command, exp, *args)
-# fail("can't create Widget") if res != exp
- # for tk_optionMenu, it is legal res != exp
- return res
- else
- fail("first parameter is not TclTkInterpreter")
- end
- end
-end
-
-# class TclTkCallback: tcl/tk callbacks
-class TclTkCallback < TclTkObject
-
- # initialize(interp, pr, arg):
- # interp: interpreter(TclTkInterpreter)
- # pr: callback procedure(Proc)
- # arg: string to pass as block parameters of pr
- # bind command of tcl/tk uses % replacement for parameters
- # pr can receive replaced data using block parameter
- # its format is specified by arg string
- # You should not specify arg for the command like
- # scrollbar with -command option, which receives parameters
- # without specifying any replacement
- def initialize(interp, pr, arg = nil)
- # auto-generate tcl/tk representation (variable name)
- exp = TclTk._newname("c_")
- # initialize TclTkObject
- super(interp._tcltkip(), exp)
- # save parameters
- @pr = pr
- @arg = arg
- # register in the module
- TclTk._addcallback(self)
- end
-
- # to_eval(): returns string representation for @ip._eval_args
- def to_eval()
- if @arg
- # bind replaces %s before calling ruby_fmt, so %%s is used
- s = %Q/{ruby_fmt {TclTk._callcallback("#{to_s()}", "%%s")} #{@arg}}/
- else
- s = %Q/{ruby_fmt {TclTk._callcallback("#{to_s()}", "%s")}}/
- end
-
- return s
- end
-
- # _call(arg): invoke callback
- # arg: callback parameter
- def _call(arg)
- @pr.call(arg)
- end
-end
-
-# class TclTkImage: tcl/tk images
-class TclTkImage < TclTkCommand
-
- # initialize(interp, t, *args):
- # generating image is done by TclTkImage.new()
- # destroying is done by image delete (inconsistent, sigh)
- # interp: interpreter(TclTkInterpreter)
- # t: image type (photo, bitmap, etc.)
- # *args: command argument
- def initialize(interp, t, *args)
- # auto-generate tcl/tk representation
- exp = TclTk._newname("i_")
- # initialize TclTkObject
- super(interp._tcltkip(), exp)
- # generate image
- res = @ip._eval_args("image create", t, exp, *args)
- fail("can't create Image") if res != exp
- end
-end
-
-# eof
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
deleted file mode 100644
index 956313b54e..0000000000
--- a/ext/tk/lib/tk.rb
+++ /dev/null
@@ -1,5758 +0,0 @@
-# frozen_string_literal: false
-#
-# tk.rb - Tk interface module using tcltklib
-# by Yukihiro Matsumoto <matz@netlab.jp>
-
-# use Shigehiro's tcltklib
-require 'tcltklib'
-require 'tkutil'
-
-# autoload
-require 'tk/autoload'
-
-# for Mutex
-require 'thread'
-
-class TclTkIp
- # backup original (without encoding) _eval and _invoke
- alias _eval_without_enc _eval
- alias __eval__ _eval
- alias _invoke_without_enc _invoke
- alias __invoke__ _invoke
-
- def _ip_id_
- # for RemoteTkIp
- ''
- end
-
- alias __initialize__ initialize
- private :__initialize__
-
- def initialize(*args)
- __initialize__(*args)
-
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
- end
-end
-
-# define TkComm module (step 1: basic functions)
-module TkComm
- include TkUtil
- extend TkUtil
-
- WidgetClassNames = TkUtil.untrust({})
- TkExtlibAutoloadModule = TkUtil.untrust([])
-
- # None = Object.new ### --> definition is moved to TkUtil module
- # def None.to_s
- # 'None'
- # end
- # None.freeze
-
- #Tk_CMDTBL = {}
- #Tk_WINDOWS = {}
- Tk_IDs = [
- TkUtil.untrust("00000"), # [0]-cmdid
- TkUtil.untrust("00000") # [1]-winid
- ]
- Tk_IDs.instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- # for backward compatibility
- Tk_CMDTBL = Object.new
- def Tk_CMDTBL.method_missing(id, *args)
- TkCore::INTERP.tk_cmd_tbl.__send__(id, *args)
- end
- Tk_CMDTBL.freeze
- Tk_WINDOWS = Object.new
- def Tk_WINDOWS.method_missing(id, *args)
- TkCore::INTERP.tk_windows.__send__(id, *args)
- end
- Tk_WINDOWS.freeze
-
- self.instance_eval{
- @cmdtbl = TkUtil.untrust([])
- }
-
- unless const_defined?(:GET_CONFIGINFO_AS_ARRAY)
- # GET_CONFIGINFO_AS_ARRAY = false => returns a Hash { opt =>val, ... }
- # true => returns an Array [[opt,val], ... ]
- # val is a list which includes resource info.
- GET_CONFIGINFO_AS_ARRAY = true
- end
- unless const_defined?(:GET_CONFIGINFOwoRES_AS_ARRAY)
- # for configinfo without resource info; list of [opt, value] pair
- # false => returns a Hash { opt=>val, ... }
- # true => returns an Array [[opt,val], ... ]
- GET_CONFIGINFOwoRES_AS_ARRAY = true
- end
- # *** ATTENTION ***
- # 'current_configinfo' method always returns a Hash under all cases of above.
-
- def error_at
- frames = caller()
- frames.delete_if do |c|
- c =~ %r!/tk(|core|thcore|canvas|text|entry|scrollbox)\.rb:\d+!
- end
- frames
- end
- private :error_at
-
- def _genobj_for_tkwidget(path)
- return TkRoot.new if path == '.'
-
- begin
- #tk_class = TkCore::INTERP._invoke('winfo', 'class', path)
- tk_class = Tk.ip_invoke_without_enc('winfo', 'class', path)
- rescue
- return path
- end
-
- if ruby_class = WidgetClassNames[tk_class]
- ruby_class_name = ruby_class.name
- # gen_class_name = ruby_class_name + 'GeneratedOnTk'
- gen_class_name = ruby_class_name
- classname_def = ''
- else # ruby_class == nil
- if Tk.const_defined?(tk_class)
- Tk.const_get(tk_class) # auto_load
- ruby_class = WidgetClassNames[tk_class]
- end
-
- unless ruby_class
- mods = TkExtlibAutoloadModule.find_all{|m| m.const_defined?(tk_class)}
- mods.each{|mod|
- begin
- mod.const_get(tk_class) # auto_load
- break if (ruby_class = WidgetClassNames[tk_class])
- rescue LoadError
- # ignore load error
- end
- }
- end
-
- unless ruby_class
- std_class = 'Tk' << tk_class
- if Object.const_defined?(std_class)
- Object.const_get(std_class) # auto_load
- ruby_class = WidgetClassNames[tk_class]
- end
- end
-
- unless ruby_class
- if Tk.const_defined?('TOPLEVEL_ALIASES') &&
- Tk::TOPLEVEL_ALIASES.const_defined?(std_class)
- Tk::TOPLEVEL_ALIASES.const_get(std_class) # auto_load
- ruby_class = WidgetClassNames[tk_class]
- end
- end
-
- if ruby_class
- # found
- ruby_class_name = ruby_class.name
- gen_class_name = ruby_class_name
- classname_def = ''
- else
- # unknown
- ruby_class_name = 'TkWindow'
- gen_class_name = 'TkWidget_' + tk_class
- classname_def = "WidgetClassName = '#{tk_class}'.freeze"
- end
- end
-
-###################################
-=begin
- if ruby_class = WidgetClassNames[tk_class]
- ruby_class_name = ruby_class.name
- # gen_class_name = ruby_class_name + 'GeneratedOnTk'
- gen_class_name = ruby_class_name
- classname_def = ''
- else
- mod = TkExtlibAutoloadModule.find{|m| m.const_defined?(tk_class)}
- if mod
- ruby_class_name = mod.name + '::' + tk_class
- gen_class_name = ruby_class_name
- classname_def = ''
- elsif Object.const_defined?('Tk' + tk_class)
- ruby_class_name = 'Tk' + tk_class
- # gen_class_name = ruby_class_name + 'GeneratedOnTk'
- gen_class_name = ruby_class_name
- classname_def = ''
- else
- ruby_class_name = 'TkWindow'
- # gen_class_name = ruby_class_name + tk_class + 'GeneratedOnTk'
- gen_class_name = 'TkWidget_' + tk_class
- classname_def = "WidgetClassName = '#{tk_class}'.freeze"
- end
- end
-=end
-
-=begin
- unless Object.const_defined? gen_class_name
- Object.class_eval "class #{gen_class_name}<#{ruby_class_name}
- #{classname_def}
- end"
- end
- Object.class_eval "#{gen_class_name}.new('widgetname'=>'#{path}',
- 'without_creating'=>true)"
-=end
- base = Object
- gen_class_name.split('::').each{|klass|
- next if klass == ''
- if base.const_defined?(klass)
- base = base.class_eval klass
- else
- base = base.class_eval "class #{klass}<#{ruby_class_name}
- #{classname_def}
- end
- #{klass}"
- end
- }
- base.class_eval "#{gen_class_name}.new('widgetname'=>'#{path}',
- 'without_creating'=>true)"
- end
- private :_genobj_for_tkwidget
- module_function :_genobj_for_tkwidget
-
- def _at(x,y=nil)
- if y
- "@#{Integer(x)},#{Integer(y)}"
- else
- "@#{Integer(x)}"
- end
- end
- module_function :_at
-
- def tk_tcl2ruby(val, enc_mode = false, listobj = true)
-=begin
- if val =~ /^rb_out\S* (c(_\d+_)?\d+)/
- #return Tk_CMDTBL[$1]
- return TkCore::INTERP.tk_cmd_tbl[$1]
- #cmd_obj = TkCore::INTERP.tk_cmd_tbl[$1]
- #if cmd_obj.kind_of?(Proc) || cmd_obj.kind_of?(Method)
- # cmd_obj
- #else
- # cmd_obj.cmd
- #end
- end
-=end
- if val =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/
- return TkCore::INTERP.tk_cmd_tbl[$4]
- end
- #if val.include? ?\s
- # return val.split.collect{|v| tk_tcl2ruby(v)}
- #end
- case val
- when /\A@font\S+\z/
- TkFont.get_obj(val)
- when /\A-?\d+\z/
- val.to_i
- when /\A\.\S*\z/
- #Tk_WINDOWS[val] ? Tk_WINDOWS[val] : _genobj_for_tkwidget(val)
- TkCore::INTERP.tk_windows[val]?
- TkCore::INTERP.tk_windows[val] : _genobj_for_tkwidget(val)
- when /\Ai(_\d+_)?\d+\z/
- TkImage::Tk_IMGTBL.mutex.synchronize{
- TkImage::Tk_IMGTBL[val]? TkImage::Tk_IMGTBL[val] : val
- }
- when /\A-?\d+\.?\d*(e[-+]?\d+)?\z/
- val.to_f
- when /\\ /
- val.gsub(/\\ /, ' ')
- when /[^\\] /
- if listobj
- #tk_split_escstr(val).collect{|elt|
- # tk_tcl2ruby(elt, enc_mode, listobj)
- #}
- val = _toUTF8(val) unless enc_mode
- tk_split_escstr(val, false, false).collect{|elt|
- tk_tcl2ruby(elt, true, listobj)
- }
- elsif enc_mode
- _fromUTF8(val)
- else
- val
- end
- else
- if enc_mode
- _fromUTF8(val)
- else
- val
- end
- end
- end
-
- private :tk_tcl2ruby
- module_function :tk_tcl2ruby
- #private_class_method :tk_tcl2ruby
-
-unless const_defined?(:USE_TCLs_LIST_FUNCTIONS)
- USE_TCLs_LIST_FUNCTIONS = true
-end
-
-if USE_TCLs_LIST_FUNCTIONS
- ###########################################################################
- # use Tcl function version of split_list
- ###########################################################################
-
- def tk_split_escstr(str, src_enc=true, dst_enc=true)
- str = _toUTF8(str) if src_enc
- if dst_enc
- TkCore::INTERP._split_tklist(str).map!{|s| _fromUTF8(s)}
- else
- TkCore::INTERP._split_tklist(str)
- end
- end
-
- def tk_split_sublist(str, depth=-1, src_enc=true, dst_enc=true)
- # return [] if str == ""
- # list = TkCore::INTERP._split_tklist(str)
- str = _toUTF8(str) if src_enc
-
- if depth == 0
- return "" if str == ""
- list = [str]
- else
- return [] if str == ""
- list = TkCore::INTERP._split_tklist(str)
- end
- if list.size == 1
- # tk_tcl2ruby(list[0], nil, false)
- tk_tcl2ruby(list[0], dst_enc, false)
- else
- list.collect{|token| tk_split_sublist(token, depth - 1, false, dst_enc)}
- end
- end
-
- def tk_split_list(str, depth=0, src_enc=true, dst_enc=true)
- return [] if str == ""
- str = _toUTF8(str) if src_enc
- TkCore::INTERP._split_tklist(str).map!{|token|
- tk_split_sublist(token, depth - 1, false, dst_enc)
- }
- end
-
- def tk_split_simplelist(str, src_enc=true, dst_enc=true)
- #lst = TkCore::INTERP._split_tklist(str)
- #if (lst.size == 1 && lst =~ /^\{.*\}$/)
- # TkCore::INTERP._split_tklist(str[1..-2])
- #else
- # lst
- #end
-
- str = _toUTF8(str) if src_enc
- if dst_enc
- TkCore::INTERP._split_tklist(str).map!{|s| _fromUTF8(s)}
- else
- TkCore::INTERP._split_tklist(str)
- end
- end
-
- def array2tk_list(ary, enc=nil)
- return "" if ary.size == 0
-
- sys_enc = TkCore::INTERP.encoding
- sys_enc = TclTkLib.encoding_system unless sys_enc
-
- dst_enc = (enc == nil)? sys_enc: enc
-
- dst = ary.collect{|e|
- if e.kind_of? Array
- s = array2tk_list(e, enc)
- elsif e.kind_of? Hash
- tmp_ary = []
- #e.each{|k,v| tmp_ary << k << v }
- e.each{|k,v| tmp_ary << "-#{_get_eval_string(k)}" << v }
- s = array2tk_list(tmp_ary, enc)
- else
- s = _get_eval_string(e, enc)
- end
-
- if dst_enc != true && dst_enc != false
- if (s_enc = s.instance_variable_get(:@encoding))
- s_enc = s_enc.to_s
- elsif TkCore::WITH_ENCODING
- s_enc = s.encoding.name
- else
- s_enc = sys_enc
- end
- dst_enc = true if s_enc != dst_enc
- end
-
- s
- }
-
- if sys_enc && dst_enc
- dst.map!{|s| _toUTF8(s)}
- ret = TkCore::INTERP._merge_tklist(*dst)
- if TkCore::WITH_ENCODING
- if dst_enc.kind_of?(String)
- ret = _fromUTF8(ret, dst_enc)
- ret.force_encoding(dst_enc)
- else
- ret.force_encoding('utf-8')
- end
- else # without encoding
- if dst_enc.kind_of?(String)
- ret = _fromUTF8(ret, dst_enc)
- ret.instance_variable_set(:@encoding, dst_enc)
- else
- ret.instance_variable_set(:@encoding, 'utf-8')
- end
- end
- ret
- else
- TkCore::INTERP._merge_tklist(*dst)
- end
- end
-
-else
- ###########################################################################
- # use Ruby script version of split_list (traditional methods)
- ###########################################################################
-
- def tk_split_escstr(str, src_enc=true, dst_enc=true)
- return [] if str == ""
- list = []
- token = nil
- escape = false
- brace = 0
- str.split('').each {|c|
- brace += 1 if c == '{' && !escape
- brace -= 1 if c == '}' && !escape
- if brace == 0 && c == ' ' && !escape
- list << token.gsub(/^\{(.*)\}$/, '\1') if token
- token = nil
- else
- token = (token || "") << c
- end
- escape = (c == '\\' && !escape)
- }
- list << token.gsub(/^\{(.*)\}$/, '\1') if token
- list
- end
-
- def tk_split_sublist(str, depth=-1, src_enc=true, dst_enc=true)
- #return [] if str == ""
- #return [tk_split_sublist(str[1..-2])] if str =~ /^\{.*\}$/
- #list = tk_split_escstr(str)
- if depth == 0
- return "" if str == ""
- str = str[1..-2] if str =~ /^\{.*\}$/
- list = [str]
- else
- return [] if str == []
- return [tk_split_sublist(str[1..-2], depth - 1)] if str =~ /^\{.*\}$/
- list = tk_split_escstr(str)
- end
- if list.size == 1
- tk_tcl2ruby(list[0], nil, false)
- else
- list.collect{|token| tk_split_sublist(token, depth - 1)}
- end
- end
-
- def tk_split_list(str, depth=0, src_enc=true, dst_enc=true)
- return [] if str == ""
- tk_split_escstr(str).collect{|token|
- tk_split_sublist(token, depth - 1)
- }
- end
-
- def tk_split_simplelist(str, src_enc=true, dst_enc=true)
- return [] if str == ""
- list = []
- token = nil
- escape = false
- brace = 0
- str.split('').each {|c|
- if c == '\\' && !escape
- escape = true
- token = (token || "") << c if brace > 0
- next
- end
- brace += 1 if c == '{' && !escape
- brace -= 1 if c == '}' && !escape
- if brace == 0 && c == ' ' && !escape
- list << token.gsub(/^\{(.*)\}$/, '\1') if token
- token = nil
- else
- token = (token || "") << c
- end
- escape = false
- }
- list << token.gsub(/^\{(.*)\}$/, '\1') if token
- list
- end
-
- def array2tk_list(ary, enc=nil)
- ary.collect{|e|
- if e.kind_of? Array
- "{#{array2tk_list(e, enc)}}"
- elsif e.kind_of? Hash
- # "{#{e.to_a.collect{|ee| array2tk_list(ee)}.join(' ')}}"
- e.each{|k,v| tmp_ary << "-#{_get_eval_string(k)}" << v }
- array2tk_list(tmp_ary, enc)
- else
- s = _get_eval_string(e, enc)
- (s.index(/\s/) || s.size == 0)? "{#{s}}": s
- end
- }.join(" ")
- end
-end
-
- private :tk_split_escstr, :tk_split_sublist
- private :tk_split_list, :tk_split_simplelist
- private :array2tk_list
-
- module_function :tk_split_escstr, :tk_split_sublist
- module_function :tk_split_list, :tk_split_simplelist
- module_function :array2tk_list
-
- private_class_method :tk_split_escstr, :tk_split_sublist
- private_class_method :tk_split_list, :tk_split_simplelist
-# private_class_method :array2tk_list
-
-=begin
- ### --> definition is moved to TkUtil module
- def _symbolkey2str(keys)
- h = {}
- keys.each{|key,value| h[key.to_s] = value}
- h
- end
- private :_symbolkey2str
- module_function :_symbolkey2str
-=end
-
-=begin
- ### --> definition is moved to TkUtil module
- # def hash_kv(keys, enc_mode = nil, conf = [], flat = false)
- def hash_kv(keys, enc_mode = nil, conf = nil)
- # Hash {key=>val, key=>val, ... } or Array [ [key, val], [key, val], ... ]
- # ==> Array ['-key', val, '-key', val, ... ]
- dst = []
- if keys and keys != None
- keys.each{|k, v|
- #dst.push("-#{k}")
- dst.push('-' + k.to_s)
- if v != None
- # v = _get_eval_string(v, enc_mode) if (enc_mode || flat)
- v = _get_eval_string(v, enc_mode) if enc_mode
- dst.push(v)
- end
- }
- end
- if conf
- conf + dst
- else
- dst
- end
- end
- private :hash_kv
- module_function :hash_kv
-=end
-
-=begin
- ### --> definition is moved to TkUtil module
- def bool(val)
- case val
- when "1", 1, 'yes', 'true'
- true
- else
- false
- end
- end
-
- def number(val)
- case val
- when /^-?\d+$/
- val.to_i
- when /^-?\d+\.?\d*(e[-+]?\d+)?$/
- val.to_f
- else
- fail(ArgumentError, "invalid value for Number:'#{val}'")
- end
- end
- def string(val)
- if val == "{}"
- ''
- elsif val[0] == ?{ && val[-1] == ?}
- val[1..-2]
- else
- val
- end
- end
- def num_or_str(val)
- begin
- number(val)
- rescue ArgumentError
- string(val)
- end
- end
-=end
-
- def list(val, depth=0, enc=true)
- tk_split_list(val, depth, enc, enc)
- end
- def simplelist(val, src_enc=true, dst_enc=true)
- tk_split_simplelist(val, src_enc, dst_enc)
- end
- def window(val)
- if val =~ /^\./
- #Tk_WINDOWS[val]? Tk_WINDOWS[val] : _genobj_for_tkwidget(val)
- TkCore::INTERP.tk_windows[val]?
- TkCore::INTERP.tk_windows[val] : _genobj_for_tkwidget(val)
- else
- nil
- end
- end
- def image_obj(val)
- if val =~ /^i(_\d+_)?\d+$/
- TkImage::Tk_IMGTBL.mutex.synchronize{
- TkImage::Tk_IMGTBL[val]? TkImage::Tk_IMGTBL[val] : val
- }
- else
- val
- end
- end
- def procedure(val)
-=begin
- if val =~ /^rb_out\S* (c(_\d+_)?\d+)/
- #Tk_CMDTBL[$1]
- #TkCore::INTERP.tk_cmd_tbl[$1]
- TkCore::INTERP.tk_cmd_tbl[$1].cmd
-=end
- if val =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/
- return TkCore::INTERP.tk_cmd_tbl[$4].cmd
- else
- #nil
- val
- end
- end
- private :bool, :number, :num_or_str, :num_or_nil, :string
- private :list, :simplelist, :window, :image_obj, :procedure
- module_function :bool, :number, :num_or_str, :num_or_nil, :string
- module_function :list, :simplelist, :window, :image_obj, :procedure
-
- if (RUBY_VERSION.split('.').map{|n| n.to_i} <=> [1,8,7]) < 0
- def slice_ary(ary, size)
- sliced = []
- wk_ary = ary.dup
- until wk_ary.size.zero?
- sub_ary = []
- size.times{ sub_ary << wk_ary.shift }
- yield(sub_ary) if block_given?
- sliced << sub_ary
- end
- (block_given?)? ary: sliced
- end
- else
- def slice_ary(ary, size, &b)
- if b
- ary.each_slice(size, &b)
- else
- ary.each_slice(size).to_a
- end
- end
- end
- private :slice_ary
- module_function :slice_ary
-
- def subst(str, *opts)
- # opts := :nobackslashes | :nocommands | novariables
- tk_call('subst',
- *(opts.collect{|opt|
- opt = opt.to_s
- (opt[0] == ?-)? opt: '-' << opt
- } << str))
- end
-
- def _toUTF8(str, encoding = nil)
- TkCore::INTERP._toUTF8(str, encoding)
- end
- def _fromUTF8(str, encoding = nil)
- TkCore::INTERP._fromUTF8(str, encoding)
- end
- private :_toUTF8, :_fromUTF8
- module_function :_toUTF8, :_fromUTF8
-
- def _callback_entry_class?(cls)
- cls <= Proc || cls <= Method || cls <= TkCallbackEntry
- end
- private :_callback_entry_class?
- module_function :_callback_entry_class?
-
- def _callback_entry?(obj)
- obj.kind_of?(Proc) || obj.kind_of?(Method) || obj.kind_of?(TkCallbackEntry)
- end
- private :_callback_entry?
- module_function :_callback_entry?
-
-=begin
- ### --> definition is moved to TkUtil module
- def _get_eval_string(str, enc_mode = nil)
- return nil if str == None
- if str.kind_of?(TkObject)
- str = str.path
- elsif str.kind_of?(String)
- str = _toUTF8(str) if enc_mode
- elsif str.kind_of?(Symbol)
- str = str.id2name
- str = _toUTF8(str) if enc_mode
- elsif str.kind_of?(Hash)
- str = hash_kv(str, enc_mode).join(" ")
- elsif str.kind_of?(Array)
- str = array2tk_list(str)
- str = _toUTF8(str) if enc_mode
- elsif str.kind_of?(Proc)
- str = install_cmd(str)
- elsif str == nil
- str = ""
- elsif str == false
- str = "0"
- elsif str == true
- str = "1"
- elsif (str.respond_to?(:to_eval))
- str = str.to_eval()
- str = _toUTF8(str) if enc_mode
- else
- str = str.to_s() || ''
- unless str.kind_of? String
- fail RuntimeError, "fail to convert the object to a string"
- end
- str = _toUTF8(str) if enc_mode
- end
- return str
- end
-=end
-=begin
- def _get_eval_string(obj, enc_mode = nil)
- case obj
- when Numeric
- obj.to_s
- when String
- (enc_mode)? _toUTF8(obj): obj
- when Symbol
- (enc_mode)? _toUTF8(obj.id2name): obj.id2name
- when TkObject
- obj.path
- when Hash
- hash_kv(obj, enc_mode).join(' ')
- when Array
- (enc_mode)? _toUTF8(array2tk_list(obj)): array2tk_list(obj)
- when Proc, Method, TkCallbackEntry
- install_cmd(obj)
- when false
- '0'
- when true
- '1'
- when nil
- ''
- when None
- nil
- else
- if (obj.respond_to?(:to_eval))
- (enc_mode)? _toUTF8(obj.to_eval): obj.to_eval
- else
- begin
- obj = obj.to_s || ''
- rescue
- fail RuntimeError, "fail to convert object '#{obj}' to string"
- end
- (enc_mode)? _toUTF8(obj): obj
- end
- end
- end
- private :_get_eval_string
- module_function :_get_eval_string
-=end
-
-=begin
- ### --> definition is moved to TkUtil module
- def _get_eval_enc_str(obj)
- return obj if obj == None
- _get_eval_string(obj, true)
- end
- private :_get_eval_enc_str
- module_function :_get_eval_enc_str
-=end
-
-=begin
- ### --> obsolete
- def ruby2tcl(v, enc_mode = nil)
- if v.kind_of?(Hash)
- v = hash_kv(v)
- v.flatten!
- v.collect{|e|ruby2tcl(e, enc_mode)}
- else
- _get_eval_string(v, enc_mode)
- end
- end
- private :ruby2tcl
-=end
-
-=begin
- ### --> definition is moved to TkUtil module
- def _conv_args(args, enc_mode, *src_args)
- conv_args = []
- src_args.each{|arg|
- conv_args << _get_eval_string(arg, enc_mode) unless arg == None
- # if arg.kind_of?(Hash)
- # arg.each{|k, v|
- # args << '-' + k.to_s
- # args << _get_eval_string(v, enc_mode)
- # }
- # elsif arg != None
- # args << _get_eval_string(arg, enc_mode)
- # end
- }
- args + conv_args
- end
- private :_conv_args
-=end
-
- def _curr_cmd_id
- #id = format("c%.4d", Tk_IDs[0])
- id = "c" + TkCore::INTERP._ip_id_ + TkComm::Tk_IDs[0]
- end
- def _next_cmd_id
- TkComm::Tk_IDs.mutex.synchronize{
- id = _curr_cmd_id
- #Tk_IDs[0] += 1
- TkComm::Tk_IDs[0].succ!
- id
- }
- end
- private :_curr_cmd_id, :_next_cmd_id
- module_function :_curr_cmd_id, :_next_cmd_id
-
- def TkComm.install_cmd(cmd, local_cmdtbl=nil)
- return '' if cmd == ''
- begin
- ns = TkCore::INTERP._invoke_without_enc('namespace', 'current')
- ns = nil if ns == '::' # for backward compatibility
- rescue
- # probably, Tcl7.6
- ns = nil
- end
- id = _next_cmd_id
- #Tk_CMDTBL[id] = cmd
- if cmd.kind_of?(TkCallbackEntry)
- TkCore::INTERP.tk_cmd_tbl[id] = cmd
- else
- TkCore::INTERP.tk_cmd_tbl[id] = TkCore::INTERP.get_cb_entry(cmd)
- end
- @cmdtbl = [] unless defined? @cmdtbl
- TkUtil.untrust(@cmdtbl) unless @cmdtbl.tainted?
- @cmdtbl.push id
-
- if local_cmdtbl && local_cmdtbl.kind_of?(Array)
- begin
- local_cmdtbl << id
- rescue Exception
- # ignore
- end
- end
-
- #return Kernel.format("rb_out %s", id);
- if ns
- 'rb_out' << TkCore::INTERP._ip_id_ << ' ' << ns << ' ' << id
- else
- 'rb_out' << TkCore::INTERP._ip_id_ << ' ' << id
- end
- end
- def TkComm.uninstall_cmd(id, local_cmdtbl=nil)
- #id = $1 if /rb_out\S* (c(_\d+_)?\d+)/ =~ id
- id = $4 if id =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/
-
- if local_cmdtbl && local_cmdtbl.kind_of?(Array)
- begin
- local_cmdtbl.delete(id)
- rescue Exception
- # ignore
- end
- end
- @cmdtbl.delete(id)
-
- #Tk_CMDTBL.delete(id)
- TkCore::INTERP.tk_cmd_tbl.delete(id)
- end
- # private :install_cmd, :uninstall_cmd
- # module_function :install_cmd, :uninstall_cmd
- def install_cmd(cmd)
- TkComm.install_cmd(cmd, @cmdtbl)
- end
- def uninstall_cmd(id)
- TkComm.uninstall_cmd(id, @cmdtbl)
- end
-
-=begin
- def install_win(ppath,name=nil)
- if !name or name == ''
- #name = format("w%.4d", Tk_IDs[1])
- #Tk_IDs[1] += 1
- name = "w" + Tk_IDs[1]
- Tk_IDs[1].succ!
- end
- if name[0] == ?.
- @path = name.dup
- elsif !ppath or ppath == "."
- @path = Kernel.format(".%s", name);
- else
- @path = Kernel.format("%s.%s", ppath, name)
- end
- #Tk_WINDOWS[@path] = self
- TkCore::INTERP.tk_windows[@path] = self
- end
-=end
- def install_win(ppath,name=nil)
- if name
- if name == ''
- raise ArgumentError, "invalid widget-name '#{name}'"
- end
- if name[0] == ?.
- @path = '' + name
- @path.freeze
- return TkCore::INTERP.tk_windows[@path] = self
- end
- else
- Tk_IDs.mutex.synchronize{
- name = "w" + TkCore::INTERP._ip_id_ + Tk_IDs[1]
- Tk_IDs[1].succ!
- }
- end
- if !ppath or ppath == '.'
- @path = '.' + name
- else
- @path = ppath + '.' + name
- end
- @path.freeze
- TkCore::INTERP.tk_windows[@path] = self
- end
-
- def uninstall_win()
- #Tk_WINDOWS.delete(@path)
- TkCore::INTERP.tk_windows.delete(@path)
- end
- private :install_win, :uninstall_win
-
- def _epath(win)
- if win.kind_of?(TkObject)
- win.epath
- elsif win.respond_to?(:epath)
- win.epath
- else
- win
- end
- end
- private :_epath
-end
-
-# define TkComm module (step 2: event binding)
-module TkComm
- include TkEvent
- extend TkEvent
-
- def tk_event_sequence(context)
- if context.kind_of? TkVirtualEvent
- context = context.path
- end
- if context.kind_of? Array
- context = context.collect{|ev|
- if ev.kind_of? TkVirtualEvent
- ev.path
- else
- ev
- end
- }.join("><")
- end
- if /,/ =~ context
- context = context.split(/\s*,\s*/).join("><")
- else
- context
- end
- end
-
- def _bind_core(mode, what, context, cmd, *args)
- id = install_bind(cmd, *args) if cmd
- begin
- tk_call_without_enc(*(what + ["<#{tk_event_sequence(context)}>",
- mode + id]))
- rescue
- uninstall_cmd(id) if cmd
- fail
- end
- end
-
- def _bind(what, context, cmd, *args)
- _bind_core('', what, context, cmd, *args)
- end
-
- def _bind_append(what, context, cmd, *args)
- _bind_core('+', what, context, cmd, *args)
- end
-
- def _bind_remove(what, context)
- tk_call_without_enc(*(what + ["<#{tk_event_sequence(context)}>", '']))
- end
-
- def _bindinfo(what, context=nil)
- if context
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- enum_obj = tk_call_without_enc(*what+["<#{tk_event_sequence(context)}>"]).each_line
- else
- enum_obj = tk_call_without_enc(*what+["<#{tk_event_sequence(context)}>"])
- end
- enum_obj.collect {|cmdline|
-=begin
- if cmdline =~ /^rb_out\S* (c(?:_\d+_)?\d+)\s+(.*)$/
- #[Tk_CMDTBL[$1], $2]
- [TkCore::INTERP.tk_cmd_tbl[$1], $2]
-=end
- if cmdline =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/
- [TkCore::INTERP.tk_cmd_tbl[$4], $5]
- else
- cmdline
- end
- }
- else
- tk_split_simplelist(tk_call_without_enc(*what)).collect!{|seq|
- l = seq.scan(/<*[^<>]+>*/).collect!{|subseq|
- case (subseq)
- when /^<<[^<>]+>>$/
- TkVirtualEvent.getobj(subseq[1..-2])
- when /^<[^<>]+>$/
- subseq[1..-2]
- else
- subseq.split('')
- end
- }.flatten
- (l.size == 1) ? l[0] : l
- }
- end
- end
-
- def _bind_core_for_event_class(klass, mode, what, context, cmd, *args)
- id = install_bind_for_event_class(klass, cmd, *args) if cmd
- begin
- tk_call_without_enc(*(what + ["<#{tk_event_sequence(context)}>",
- mode + id]))
- rescue
- uninstall_cmd(id) if cmd
- fail
- end
- end
-
- def _bind_for_event_class(klass, what, context, cmd, *args)
- _bind_core_for_event_class(klass, '', what, context, cmd, *args)
- end
-
- def _bind_append_for_event_class(klass, what, context, cmd, *args)
- _bind_core_for_event_class(klass, '+', what, context, cmd, *args)
- end
-
- def _bind_remove_for_event_class(klass, what, context)
- _bind_remove(what, context)
- end
-
- def _bindinfo_for_event_class(klass, what, context=nil)
- _bindinfo(what, context)
- end
-
- private :tk_event_sequence
- private :_bind_core, :_bind, :_bind_append, :_bind_remove, :_bindinfo
- private :_bind_core_for_event_class, :_bind_for_event_class,
- :_bind_append_for_event_class, :_bind_remove_for_event_class,
- :_bindinfo_for_event_class
-
- #def bind(tagOrClass, context, cmd=Proc.new, *args)
- # _bind(["bind", tagOrClass], context, cmd, *args)
- # tagOrClass
- #end
- def bind(tagOrClass, context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind(["bind", tagOrClass], context, cmd, *args)
- tagOrClass
- end
-
- #def bind_append(tagOrClass, context, cmd=Proc.new, *args)
- # _bind_append(["bind", tagOrClass], context, cmd, *args)
- # tagOrClass
- #end
- def bind_append(tagOrClass, context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append(["bind", tagOrClass], context, cmd, *args)
- tagOrClass
- end
-
- def bind_remove(tagOrClass, context)
- _bind_remove(['bind', tagOrClass], context)
- tagOrClass
- end
-
- def bindinfo(tagOrClass, context=nil)
- _bindinfo(['bind', tagOrClass], context)
- end
-
- #def bind_all(context, cmd=Proc.new, *args)
- # _bind(['bind', 'all'], context, cmd, *args)
- # TkBindTag::ALL
- #end
- def bind_all(context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind(['bind', 'all'], context, cmd, *args)
- TkBindTag::ALL
- end
-
- #def bind_append_all(context, cmd=Proc.new, *args)
- # _bind_append(['bind', 'all'], context, cmd, *args)
- # TkBindTag::ALL
- #end
- def bind_append_all(context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append(['bind', 'all'], context, cmd, *args)
- TkBindTag::ALL
- end
-
- def bind_remove_all(context)
- _bind_remove(['bind', 'all'], context)
- TkBindTag::ALL
- end
-
- def bindinfo_all(context=nil)
- _bindinfo(['bind', 'all'], context)
- end
-end
-
-
-module TkCore
- include TkComm
- extend TkComm
-
- WITH_RUBY_VM = Object.const_defined?(:RubyVM) && ::RubyVM.class == Class
- WITH_ENCODING = defined?(::Encoding.default_external) && true
- #WITH_ENCODING = Object.const_defined?(:Encoding) && ::Encoding.class == Class
-
- unless self.const_defined? :INTERP
- if self.const_defined? :IP_NAME
- name = IP_NAME.to_s
- else
- #name = nil
- name = $0
- end
- if self.const_defined? :IP_OPTS
- if IP_OPTS.kind_of?(Hash)
- opts = hash_kv(IP_OPTS).join(' ')
- else
- opts = IP_OPTS.to_s
- end
- else
- opts = ''
- end
-
- # RUN_EVENTLOOP_ON_MAIN_THREAD = true
-
- unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
- if WITH_RUBY_VM ### check Ruby 1.9 !!!!!!!
- # *** NEED TO FIX ***
- case RUBY_PLATFORM
- when /cygwin/
- RUN_EVENTLOOP_ON_MAIN_THREAD = true
- when /darwin/ # MacOS X
-=begin
- ip = TclTkIp.new(name, opts)
- if ip._invoke_without_enc('tk', 'windowingsystem') == 'aqua' &&
- (TclTkLib.get_version<=>[8,4,TclTkLib::RELEASE_TYPE::FINAL,6]) > 0
-=end
- if TclTkLib::WINDOWING_SYSTEM == 'aqua' &&
- (TclTkLib.get_version<=>[8,4,TclTkLib::RELEASE_TYPE::FINAL,6]) > 0
- # *** KNOWN BUG ***
- # Main event loop thread of TkAqua (> Tk8.4.9) must be the main
- # application thread. So, ruby1.9 users must call Tk.mainloop on
- # the main application thread.
- #
- # *** ADD (2009/05/10) ***
- # In some cases (I don't know the description of conditions),
- # TkAqua 8.4.7 has a same kind of hang-up trouble.
- # So, if 8.4.7 or later, set RUN_EVENTLOOP_ON_MAIN_THREAD to true.
- # When you want to control this mode, please call the following
- # (set true/false as you want) before "require 'tk'".
- # ----------------------------------------------------------
- # module TkCore; RUN_EVENTLOOP_ON_MAIN_THREAD = true; end
- # ----------------------------------------------------------
- #
- # *** ADD (2010/07/05) ***
- # The value of TclTkLib::WINDOWING_SYSTEM is defined at compiling.
- # If it is inconsistent with linked DLL, please call the following
- # before "require 'tk'".
- # ----------------------------------------------------------
- # require 'tcltklib'
- # module TclTkLib
- # remove_const :WINDOWING_SYSTEM
- # WINDOWING_SYSTEM = 'x11' # or 'aqua'
- # end
- # ----------------------------------------------------------
- #
- RUN_EVENTLOOP_ON_MAIN_THREAD = true
- else
- RUN_EVENTLOOP_ON_MAIN_THREAD = false
-=begin
- ip.delete
- ip = nil
-=end
- end
- else
- RUN_EVENTLOOP_ON_MAIN_THREAD = false
- end
-
- else # Ruby 1.8.x
- RUN_EVENTLOOP_ON_MAIN_THREAD = false
- end
- end
-
- if !WITH_RUBY_VM || RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!!
- INTERP = TclTkIp.new(name, opts) unless self.const_defined? :INTERP
- else
- INTERP_MUTEX = Mutex.new
- INTERP_ROOT_CHECK = ConditionVariable.new
- INTERP_THREAD = Thread.new{
- begin
- #Thread.current[:interp] = interp = TclTkIp.new(name, opts)
- interp = TclTkIp.new(name, opts)
- rescue => e
- Thread.current[:interp] = e
- raise e
- end
-
- interp.mainloop_abort_on_exception = true
- Thread.current.instance_variable_set("@interp", interp)
-
- status = [nil]
- def status.value
- self[0]
- end
- def status.value=(val)
- self[0] = val
- end
-
- Thread.current[:status] = status
- #sleep
-
- # like as 1.8, withdraw a root widget before calling Tk.mainloop
- interp._eval <<EOS
-wm withdraw .
-rename wm __wm_orig__
-proc wm {subcmd win args} {
- set val [eval [list __wm_orig__ $subcmd $win] $args]
- if {[string equal $subcmd withdraw] && [string equal $win .]} {
- rename wm {}
- rename __wm_orig__ wm
- }
- return $val
-}
-proc __startup_rbtk_mainloop__ {args} {
- rename __startup_rbtk_mainloop__ {}
- if {[info command __wm_orig__] == "__wm_orig__"} {
- rename wm {}
- rename __wm_orig__ wm
- if [string equal [wm state .] withdrawn] {
- wm deiconify .
- }
- }
-}
-set __initial_state_of_rubytk__ 1
-trace add variable __initial_state_of_rubytk__ unset __startup_rbtk_mainloop__
-
-# complete initializing
-ruby {TkCore::INTERP_THREAD[:interp] = TkCore::INTERP_THREAD.instance_variable_get('@interp')}
-EOS
-
- begin
- begin
- #TclTkLib.mainloop_abort_on_exception = false
- #interp.mainloop_abort_on_exception = true
- #Thread.current[:interp] = interp
- #Thread.current[:status].value = TclTkLib.mainloop(true)
- Thread.current[:status].value = interp.mainloop(true)
- rescue SystemExit=>e
- Thread.current[:status].value = e
- rescue Exception=>e
- Thread.current[:status].value = e
- p e if $DEBUG
- retry if interp.has_mainwindow?
- ensure
- INTERP_MUTEX.synchronize{ INTERP_ROOT_CHECK.broadcast }
- end
-
- unless interp.deleted?
- begin
- #Thread.current[:status].value = TclTkLib.mainloop(false)
- Thread.current[:status].value = interp.mainloop(false)
- rescue Exception=>e
- puts "ignore exception on interp: #{e.inspect}\n" if $DEBUG
- end
- end
-
- ensure
- # interp must be deleted before the thread for interp is dead.
- # If not, raise Tcl_Panic on Tcl_AsyncDelete because async handler
- # deleted by the wrong thread.
- interp.delete
- end
- }
-
- # check a Tcl/Tk interpreter is initialized
- until INTERP_THREAD[:interp]
- # Thread.pass
- INTERP_THREAD.run
- end
-
- # INTERP_THREAD.run
- raise INTERP_THREAD[:interp] if INTERP_THREAD[:interp].kind_of? Exception
-
- # check an eventloop is running
- while INTERP_THREAD.alive? && TclTkLib.mainloop_thread?.nil?
- INTERP_THREAD.run
- end
-
- INTERP = INTERP_THREAD[:interp]
- INTERP_THREAD_STATUS = INTERP_THREAD[:status]
-
- # delete the interpreter and kill the eventloop thread at exit
- END{
- if INTERP_THREAD.alive?
- INTERP.delete
- INTERP_THREAD.kill
- end
- }
-
- # (for safety's sake) force the eventloop to run
- INTERP_THREAD.run
- end
-
- def INTERP.__getip
- self
- end
- def INTERP.default_master?
- true
- end
-
- INTERP.instance_eval{
- # @tk_cmd_tbl = TkUtil.untrust({})
- @tk_cmd_tbl =
- TkUtil.untrust(Hash.new{|hash, key|
- fail IndexError, "unknown command ID '#{key}'"
- })
- def @tk_cmd_tbl.[]=(idx,val)
- if self.has_key?(idx) && Thread.current.group != ThreadGroup::Default
- fail SecurityError,"cannot change the entried command"
- end
- super(idx,val)
- end
-
- @tk_windows = TkUtil.untrust({})
-
- @tk_table_list = TkUtil.untrust([])
-
- @init_ip_env = TkUtil.untrust([]) # table of Procs
- @add_tk_procs = TkUtil.untrust([]) # table of [name, args, body]
-
- @force_default_encoding ||= TkUtil.untrust([false])
- @encoding ||= TkUtil.untrust([nil])
- def @encoding.to_s; self.join(nil); end
-
- @cb_entry_class = Class.new(TkCallbackEntry){
- class << self
- def inspect
- sprintf("#<Class(TkCallbackEntry):%0x>", self.__id__)
- end
- alias to_s inspect
- end
-
- def initialize(ip, cmd)
- @ip = ip
- @cmd = cmd
- end
- attr_reader :ip, :cmd
- def call(*args)
- @ip.cb_eval(@cmd, *args)
- end
- def inspect
- sprintf("#<cb_entry:%0x>", self.__id__)
- end
- alias to_s inspect
- }.freeze
- }
-
- def INTERP.cb_entry_class
- @cb_entry_class
- end
- def INTERP.tk_cmd_tbl
- @tk_cmd_tbl
- end
- def INTERP.tk_windows
- @tk_windows
- end
-
- class Tk_OBJECT_TABLE
- def initialize(id)
- @id = id
- @mutex = Mutex.new
- end
- def mutex
- @mutex
- end
- def method_missing(m, *args, &b)
- TkCore::INTERP.tk_object_table(@id).__send__(m, *args, &b)
- end
- end
-
- def INTERP.tk_object_table(id)
- @tk_table_list[id]
- end
- def INTERP.create_table
- id = @tk_table_list.size
- (tbl = {}).tainted? || TkUtil.untrust(tbl)
- @tk_table_list << tbl
-# obj = Object.new
-# obj.instance_eval <<-EOD
-# def self.method_missing(m, *args)
-# TkCore::INTERP.tk_object_table(#{id}).send(m, *args)
-# end
-# EOD
-# return obj
- Tk_OBJECT_TABLE.new(id)
- end
-
- def INTERP.get_cb_entry(cmd)
- @cb_entry_class.new(__getip, cmd).freeze
- end
- def INTERP.cb_eval(cmd, *args)
- TkUtil._get_eval_string(TkUtil.eval_cmd(cmd, *args))
- end
-
- def INTERP.init_ip_env(script = Proc.new)
- @init_ip_env << script
- script.call(self)
- end
- def INTERP.add_tk_procs(name, args = nil, body = nil)
- if name.kind_of?(Array)
- name.each{|param| self.add_tk_procs(*param)}
- else
- name = name.to_s
- @add_tk_procs << [name, args, body]
- self._invoke('proc', name, args, body) if args && body
- end
- end
- def INTERP.remove_tk_procs(*names)
- names.each{|name|
- name = name.to_s
- @add_tk_procs.delete_if{|elem|
- elem.kind_of?(Array) && elem[0].to_s == name
- }
- #self._invoke('rename', name, '')
- self.__invoke__('rename', name, '')
- }
- end
- def INTERP.init_ip_internal
- ip = self
- @init_ip_env.each{|script| script.call(ip)}
- @add_tk_procs.each{|name,args,body| ip._invoke('proc',name,args,body)}
- end
- end
-
- unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
- ### Ruby 1.9 !!!!!!!!!!!!!!!!!!!!!!!!!!
- RUN_EVENTLOOP_ON_MAIN_THREAD = false
- end
-
- WIDGET_DESTROY_HOOK = '<WIDGET_DESTROY_HOOK>'
- INTERP._invoke_without_enc('event', 'add',
- "<#{WIDGET_DESTROY_HOOK}>", '<Destroy>')
- INTERP._invoke_without_enc('bind', 'all', "<#{WIDGET_DESTROY_HOOK}>",
- install_cmd(proc{|path|
- unless TkCore::INTERP.deleted?
- begin
- if (widget=TkCore::INTERP.tk_windows[path])
- if widget.respond_to?(:__destroy_hook__)
- widget.__destroy_hook__
- end
- end
- rescue Exception=>e
- p e if $DEBUG
- end
- end
- }) << ' %W')
-
- INTERP.add_tk_procs(TclTkLib::FINALIZE_PROC_NAME, '',
- "catch { bind all <#{WIDGET_DESTROY_HOOK}> {} }")
-
- INTERP.add_tk_procs('rb_out', 'ns args', <<-'EOL')
- if [regexp {^::} $ns] {
- set cmd {namespace eval $ns {ruby_cmd TkCore callback} $args}
- } else {
- set cmd {eval {ruby_cmd TkCore callback} $ns $args}
- }
- if {[set st [catch $cmd ret]] != 0} {
- #return -code $st $ret
- set idx [string first "\n\n" $ret]
- if {$idx > 0} {
- return -code $st \
- -errorinfo [string range $ret [expr $idx + 2] \
- [string length $ret]] \
- [string range $ret 0 [expr $idx - 1]]
- } else {
- return -code $st $ret
- }
- } else {
- return $ret
- }
- EOL
-=begin
- INTERP.add_tk_procs('rb_out', 'args', <<-'EOL')
- if {[set st [catch {eval {ruby_cmd TkCore callback} $args} ret]] != 0} {
- #return -code $st $ret
- set idx [string first "\n\n" $ret]
- if {$idx > 0} {
- return -code $st \
- -errorinfo [string range $ret [expr $idx + 2] \
- [string length $ret]] \
- [string range $ret 0 [expr $idx - 1]]
- } else {
- return -code $st $ret
- }
- } else {
- return $ret
- }
- EOL
-=end
-=begin
- INTERP.add_tk_procs('rb_out', 'args', <<-'EOL')
- #regsub -all {\\} $args {\\\\} args
- #regsub -all {!} $args {\\!} args
- #regsub -all "{" $args "\\{" args
- regsub -all {(\\|!|\{|\})} $args {\\\1} args
- if {[set st [catch {ruby [format "TkCore.callback %%Q!%s!" $args]} ret]] != 0} {
- #return -code $st $ret
- set idx [string first "\n\n" $ret]
- if {$idx > 0} {
- return -code $st \
- -errorinfo [string range $ret [expr $idx + 2] \
- [string length $ret]] \
- [string range $ret 0 [expr $idx - 1]]
- } else {
- return -code $st $ret
- }
- } else {
- return $ret
- }
- EOL
-=end
-
- if !WITH_RUBY_VM || RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!!
- at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) }
- else
- at_exit{
- Tk.root.destroy
- INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME)
- INTERP_THREAD.kill.join
- }
- end
-
- EventFlag = TclTkLib::EventFlag
-
- def callback_break
- fail TkCallbackBreak, "Tk callback returns 'break' status"
- end
-
- def callback_continue
- fail TkCallbackContinue, "Tk callback returns 'continue' status"
- end
-
- def callback_return
- fail TkCallbackReturn, "Tk callback returns 'return' status"
- end
-
- def TkCore.callback(*arg)
- begin
- if TkCore::INTERP.tk_cmd_tbl.kind_of?(Hash)
- #TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
- normal_ret = false
- ret = catch(:IRB_EXIT) do # IRB hack
- retval = TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
- normal_ret = true
- retval
- end
- unless normal_ret
- # catch IRB_EXIT
- exit(ret)
- end
- ret
- end
- rescue SystemExit=>e
- exit(e.status)
- rescue Interrupt=>e
- fail(e)
- rescue Exception => e
- begin
- msg = _toUTF8(e.class.inspect) + ': ' +
- _toUTF8(e.message) + "\n" +
- "\n---< backtrace of Ruby side >-----\n" +
- _toUTF8(e.backtrace.join("\n")) +
- "\n---< backtrace of Tk side >-------"
- if TkCore::WITH_ENCODING
- msg.force_encoding('utf-8')
- else
- msg.instance_variable_set(:@encoding, 'utf-8')
- end
- rescue Exception
- msg = e.class.inspect + ': ' + e.message + "\n" +
- "\n---< backtrace of Ruby side >-----\n" +
- e.backtrace.join("\n") +
- "\n---< backtrace of Tk side >-------"
- end
- # TkCore::INTERP._set_global_var('errorInfo', msg)
- # fail(e)
- fail(e, msg)
- end
- end
-=begin
- def TkCore.callback(arg_str)
- # arg = tk_split_list(arg_str)
- arg = tk_split_simplelist(arg_str)
- #_get_eval_string(TkUtil.eval_cmd(Tk_CMDTBL[arg.shift], *arg))
- #_get_eval_string(TkUtil.eval_cmd(TkCore::INTERP.tk_cmd_tbl[arg.shift],
- # *arg))
- # TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
- begin
- TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
- rescue Exception => e
- raise(e, e.class.inspect + ': ' + e.message + "\n" +
- "\n---< backtrace of Ruby side >-----\n" +
- e.backtrace.join("\n") +
- "\n---< backtrace of Tk side >-------")
- end
-#=begin
-# cb_obj = TkCore::INTERP.tk_cmd_tbl[arg.shift]
-# unless $DEBUG
-# cb_obj.call(*arg)
-# else
-# begin
-# raise 'check backtrace'
-# rescue
-# # ignore backtrace before 'callback'
-# pos = -($!.backtrace.size)
-# end
-# begin
-# cb_obj.call(*arg)
-# rescue
-# trace = $!.backtrace
-# raise $!, "\n#{trace[0]}: #{$!.message} (#{$!.class})\n" +
-# "\tfrom #{trace[1..pos].join("\n\tfrom ")}"
-# end
-# end
-#=end
- end
-=end
-
- def load_cmd_on_ip(tk_cmd)
- bool(tk_call('auto_load', tk_cmd))
- end
-
- def after(ms, cmd=Proc.new)
- cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(cmdid); ret})
- after_id = tk_call_without_enc("after",ms,cmdid)
- after_id.instance_variable_set('@cmdid', cmdid)
- after_id
- end
-=begin
- def after(ms, cmd=Proc.new)
- crit_bup = Thread.critical
- Thread.critical = true
-
- myid = _curr_cmd_id
- cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret})
-
- Thread.critical = crit_bup
-
- tk_call_without_enc("after",ms,cmdid) # return id
-# return
-# if false #defined? Thread
-# Thread.start do
-# ms = Float(ms)/1000
-# ms = 10 if ms == 0
-# sleep ms/1000
-# cmd.call
-# end
-# else
-# cmdid = install_cmd(cmd)
-# tk_call("after",ms,cmdid)
-# end
- end
-=end
-
- def after_idle(cmd=Proc.new)
- cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(cmdid); ret})
- after_id = tk_call_without_enc('after','idle',cmdid)
- after_id.instance_variable_set('@cmdid', cmdid)
- after_id
- end
-=begin
- def after_idle(cmd=Proc.new)
- crit_bup = Thread.critical
- Thread.critical = true
-
- myid = _curr_cmd_id
- cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret})
-
- Thread.critical = crit_bup
-
- tk_call_without_enc('after','idle',cmdid)
- end
-=end
-
- def after_cancel(afterId)
- tk_call_without_enc('after','cancel',afterId)
- if (cmdid = afterId.instance_variable_get('@cmdid'))
- afterId.instance_variable_set('@cmdid', nil)
- uninstall_cmd(cmdid)
- end
- afterId
- end
-
- def windowingsystem
- tk_call_without_enc('tk', 'windowingsystem')
- end
-
- def scaling(scale=nil)
- if scale
- tk_call_without_enc('tk', 'scaling', scale)
- else
- Float(number(tk_call_without_enc('tk', 'scaling')))
- end
- end
- def scaling_displayof(win, scale=nil)
- if scale
- tk_call_without_enc('tk', 'scaling', '-displayof', win, scale)
- else
- Float(number(tk_call_without_enc('tk', '-displayof', win, 'scaling')))
- end
- end
-
- def inactive
- Integer(tk_call_without_enc('tk', 'inactive'))
- end
- def inactive_displayof(win)
- Integer(tk_call_without_enc('tk', 'inactive', '-displayof', win))
- end
- def reset_inactive
- tk_call_without_enc('tk', 'inactive', 'reset')
- end
- def reset_inactive_displayof(win)
- tk_call_without_enc('tk', 'inactive', '-displayof', win, 'reset')
- end
-
- def appname(name=None)
- tk_call('tk', 'appname', name)
- end
-
- def appsend_deny
- tk_call('rename', 'send', '')
- end
-
- def appsend(interp, async, *args)
- if $SAFE >= 1 && args.find{|obj| obj.tainted?}
- fail SecurityError, "cannot send tainted Tk commands at level #{$SAFE}"
- end
- if async != true && async != false && async != nil
- args.unshift(async)
- async = false
- end
- if async
- tk_call('send', '-async', '--', interp, *args)
- else
- tk_call('send', '--', interp, *args)
- end
- end
-
- def rb_appsend(interp, async, *args)
- if $SAFE >= 1 && args.find{|obj| obj.tainted?}
- fail SecurityError, "cannot send tainted Ruby commands at level #{$SAFE}"
- end
- if async != true && async != false && async != nil
- args.unshift(async)
- async = false
- end
- #args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')}
- args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"\\]/, '\\\\\&')}
- # args.push(').to_s"')
- # appsend(interp, async, 'ruby "(', *args)
- args.push('}.call)"')
- appsend(interp, async, 'ruby "TkComm._get_eval_string(proc{', *args)
- end
-
- def appsend_displayof(interp, win, async, *args)
- if $SAFE >= 1 && args.find{|obj| obj.tainted?}
- fail SecurityError, "cannot send tainted Tk commands at level #{$SAFE}"
- end
- win = '.' if win == nil
- if async != true && async != false && async != nil
- args.unshift(async)
- async = false
- end
- if async
- tk_call('send', '-async', '-displayof', win, '--', interp, *args)
- else
- tk_call('send', '-displayor', win, '--', interp, *args)
- end
- end
-
- def rb_appsend_displayof(interp, win, async, *args)
- if $SAFE >= 1 && args.find{|obj| obj.tainted?}
- fail SecurityError, "cannot send tainted Ruby commands at level #{$SAFE}"
- end
- win = '.' if win == nil
- if async != true && async != false && async != nil
- args.unshift(async)
- async = false
- end
- #args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')}
- args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"\\]/, '\\\\\&')}
- # args.push(').to_s"')
- # appsend_displayof(interp, win, async, 'ruby "(', *args)
- args.push('}.call)"')
- appsend(interp, win, async, 'ruby "TkComm._get_eval_string(proc{', *args)
- end
-
- def info(*args)
- tk_call('info', *args)
- end
-
- def mainloop(check_root = true)
- if !TkCore::WITH_RUBY_VM
- TclTkLib.mainloop(check_root)
-
- elsif TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
- # if TclTkLib::WINDOWING_SYSTEM == 'aqua' &&
- #if TkCore::INTERP._invoke_without_enc('tk','windowingsystem')=='aqua' &&
- # Thread.current != Thread.main &&
- # (TclTkLib.get_version <=> [8,4,TclTkLib::RELEASE_TYPE::FINAL,9]) > 0
- # raise RuntimeError,
- # "eventloop on TkAqua ( > Tk8.4.9 ) works on the main thread only"
- #end
- if Thread.current != Thread.main
- raise RuntimeError, "Tk.mainloop is allowed on the main thread only"
- end
- TclTkLib.mainloop(check_root)
-
- else ### Ruby 1.9 !!!!!
- unless TkCore::INTERP.default_master?
- # [MultiTkIp] slave interp ?
- return TkCore::INTERP._thread_tkwait('window', '.') if check_root
- end
-
- # like as 1.8, withdraw a root widget before calling Tk.mainloop
- TkCore::INTERP._eval_without_enc('catch {unset __initial_state_of_rubytk__}')
- INTERP_THREAD.run
-
- begin
- TclTkLib.set_eventloop_window_mode(true)
-
- # force run the eventloop
- TkCore::INTERP._eval_without_enc('update')
- TkCore::INTERP._eval_without_enc('catch {set __initial_state_of_rubytk__}')
- INTERP_THREAD.run
- if check_root
- INTERP_MUTEX.synchronize{
- INTERP_ROOT_CHECK.wait(INTERP_MUTEX)
- status = INTERP_THREAD_STATUS.value
- if status && TkCore::INTERP.default_master?
- INTERP_THREAD_STATUS.value = nil
- raise status if status.kind_of?(Exception)
- end
- }
- else
- # INTERP_THREAD.value
- begin
- INTERP_THREAD.value
- rescue Exception => e
- raise e
- end
- end
- rescue Exception => e
- raise e
- ensure
- TclTkLib.set_eventloop_window_mode(false)
- end
- end
- end
-
- def mainloop_thread?
- # true : current thread is mainloop
- # nil : there is no mainloop
- # false : mainloop is running on the other thread
- # ( At then, it is dangerous to call Tk interpreter directly. )
- if !TkCore::WITH_RUBY_VM || TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD
- ### Ruby 1.9 !!!!!!!!!!!
- TclTkLib.mainloop_thread?
- else
- Thread.current == INTERP_THREAD
- end
- end
-
- def mainloop_exist?
- TclTkLib.mainloop_thread? != nil
- end
-
- def is_mainloop?
- TclTkLib.mainloop_thread? == true
- end
-
- def mainloop_watchdog(check_root = true)
- # watchdog restarts mainloop when mainloop is dead
- TclTkLib.mainloop_watchdog(check_root)
- end
-
- def do_one_event(flag = TclTkLib::EventFlag::ALL)
- TclTkLib.do_one_event(flag)
- end
-
- def set_eventloop_tick(timer_tick)
- TclTkLib.set_eventloop_tick(timer_tick)
- end
-
- def get_eventloop_tick()
- TclTkLib.get_eventloop_tick
- end
-
- def set_no_event_wait(wait)
- TclTkLib.set_no_even_wait(wait)
- end
-
- def get_no_event_wait()
- TclTkLib.get_no_eventloop_wait
- end
-
- def set_eventloop_weight(loop_max, no_event_tick)
- TclTkLib.set_eventloop_weight(loop_max, no_event_tick)
- end
-
- def get_eventloop_weight()
- TclTkLib.get_eventloop_weight
- end
-
- def restart(app_name = nil, keys = {})
- TkCore::INTERP.init_ip_internal
-
- tk_call('set', 'argv0', app_name) if app_name
- if keys.kind_of?(Hash)
- # tk_call('set', 'argc', keys.size * 2)
- tk_call('set', 'argv', hash_kv(keys).join(' '))
- end
-
- INTERP.restart
- nil
- end
-
- def event_generate(win, context, keys=nil)
- #win = win.path if win.kind_of?(TkObject)
- if context.kind_of?(TkEvent::Event)
- context.generate(win, ((keys)? keys: {}))
- elsif keys
- tk_call_without_enc('event', 'generate', win,
- "<#{tk_event_sequence(context)}>",
- *hash_kv(keys, true))
- else
- tk_call_without_enc('event', 'generate', win,
- "<#{tk_event_sequence(context)}>")
- end
- nil
- end
-
- def messageBox(keys)
- tk_call('tk_messageBox', *hash_kv(keys))
- end
-
- def getOpenFile(keys = nil)
- tk_call('tk_getOpenFile', *hash_kv(keys))
- end
- def getMultipleOpenFile(keys = nil)
- simplelist(tk_call('tk_getOpenFile', '-multiple', '1', *hash_kv(keys)))
- end
-
- def getSaveFile(keys = nil)
- tk_call('tk_getSaveFile', *hash_kv(keys))
- end
- def getMultipleSaveFile(keys = nil)
- simplelist(tk_call('tk_getSaveFile', '-multiple', '1', *hash_kv(keys)))
- end
-
- def chooseColor(keys = nil)
- tk_call('tk_chooseColor', *hash_kv(keys))
- end
-
- def chooseDirectory(keys = nil)
- tk_call('tk_chooseDirectory', *hash_kv(keys))
- end
-
- def _ip_eval_core(enc_mode, cmd_string)
- case enc_mode
- when nil
- res = INTERP._eval(cmd_string)
- when false
- res = INTERP._eval_without_enc(cmd_string)
- when true
- res = INTERP._eval_with_enc(cmd_string)
- end
- if INTERP._return_value() != 0
- fail RuntimeError, res, error_at
- end
- return res
- end
- private :_ip_eval_core
-
- def ip_eval(cmd_string)
- _ip_eval_core(nil, cmd_string)
- end
-
- def ip_eval_without_enc(cmd_string)
- _ip_eval_core(false, cmd_string)
- end
-
- def ip_eval_with_enc(cmd_string)
- _ip_eval_core(true, cmd_string)
- end
-
- def _ip_invoke_core(enc_mode, *args)
- case enc_mode
- when false
- res = INTERP._invoke_without_enc(*args)
- when nil
- res = INTERP._invoke(*args)
- when true
- res = INTERP._invoke_with_enc(*args)
- end
- if INTERP._return_value() != 0
- fail RuntimeError, res, error_at
- end
- return res
- end
- private :_ip_invoke_core
-
- def ip_invoke(*args)
- _ip_invoke_core(nil, *args)
- end
-
- def ip_invoke_without_enc(*args)
- _ip_invoke_core(false, *args)
- end
-
- def ip_invoke_with_enc(*args)
- _ip_invoke_core(true, *args)
- end
-
- def _tk_call_core(enc_mode, *args)
- ### puts args.inspect if $DEBUG
- #args.collect! {|x|ruby2tcl(x, enc_mode)}
- #args.compact!
- #args.flatten!
- args = _conv_args([], enc_mode, *args)
- puts 'invoke args => ' + args.inspect if $DEBUG
- ### print "=> ", args.join(" ").inspect, "\n" if $DEBUG
- begin
- # res = TkUtil.untrust(INTERP._invoke(*args))
- # res = INTERP._invoke(enc_mode, *args)
- res = _ip_invoke_core(enc_mode, *args)
- # >>>>> _invoke returns a TAINTED string <<<<<
- rescue NameError => err
- # err = $!
- begin
- args.unshift "unknown"
- #res = TkUtil.untrust(INTERP._invoke(*args))
- #res = INTERP._invoke(enc_mode, *args)
- res = _ip_invoke_core(enc_mode, *args)
- # >>>>> _invoke returns a TAINTED string <<<<<
- rescue StandardError => err2
- fail err2 unless /^invalid command/ =~ err2.message
- fail err
- end
- end
- if INTERP._return_value() != 0
- fail RuntimeError, res, error_at
- end
- ### print "==> ", res.inspect, "\n" if $DEBUG
- return res
- end
- private :_tk_call_core
-
- def tk_call(*args)
- _tk_call_core(nil, *args)
- end
-
- def tk_call_without_enc(*args)
- _tk_call_core(false, *args)
- end
-
- def tk_call_with_enc(*args)
- _tk_call_core(true, *args)
- end
-
- def _tk_call_to_list_core(depth, arg_enc, val_enc, *args)
- args = _conv_args([], arg_enc, *args)
- val = _tk_call_core(false, *args)
- if !depth.kind_of?(Integer) || depth == 0
- tk_split_simplelist(val, false, val_enc)
- else
- tk_split_list(val, depth, false, val_enc)
- end
- end
- #private :_tk_call_to_list_core
-
- def tk_call_to_list(*args)
- _tk_call_to_list_core(-1, nil, true, *args)
- end
-
- def tk_call_to_list_without_enc(*args)
- _tk_call_to_list_core(-1, false, false, *args)
- end
-
- def tk_call_to_list_with_enc(*args)
- _tk_call_to_list_core(-1, true, true, *args)
- end
-
- def tk_call_to_simplelist(*args)
- _tk_call_to_list_core(0, nil, true, *args)
- end
-
- def tk_call_to_simplelist_without_enc(*args)
- _tk_call_to_list_core(0, false, false, *args)
- end
-
- def tk_call_to_simplelist_with_enc(*args)
- _tk_call_to_list_core(0, true, true, *args)
- end
-end
-
-
-module Tk
- include TkCore
- extend Tk
-
- TCL_VERSION = INTERP._invoke_without_enc("info", "tclversion").freeze
- TCL_PATCHLEVEL = INTERP._invoke_without_enc("info", "patchlevel").freeze
-
- major, minor = TCL_VERSION.split('.')
- TCL_MAJOR_VERSION = major.to_i
- TCL_MINOR_VERSION = minor.to_i
-
- TK_VERSION = INTERP._invoke_without_enc("set", "tk_version").freeze
- TK_PATCHLEVEL = INTERP._invoke_without_enc("set", "tk_patchLevel").freeze
-
- major, minor = TK_VERSION.split('.')
- TK_MAJOR_VERSION = major.to_i
- TK_MINOR_VERSION = minor.to_i
-
- JAPANIZED_TK = (INTERP._invoke_without_enc("info", "commands",
- "kanji") != "").freeze
-
- def Tk.const_missing(sym)
- case(sym)
- when :TCL_LIBRARY
- INTERP._invoke_without_enc('global', 'tcl_library')
- INTERP._invoke("set", "tcl_library").freeze
-
- when :TK_LIBRARY
- INTERP._invoke_without_enc('global', 'tk_library')
- INTERP._invoke("set", "tk_library").freeze
-
- when :LIBRARY
- INTERP._invoke("info", "library").freeze
-
- #when :PKG_PATH, :PACKAGE_PATH, :TCL_PACKAGE_PATH
- # INTERP._invoke_without_enc('global', 'tcl_pkgPath')
- # tk_split_simplelist(INTERP._invoke('set', 'tcl_pkgPath'))
-
- #when :LIB_PATH, :LIBRARY_PATH, :TCL_LIBRARY_PATH
- # INTERP._invoke_without_enc('global', 'tcl_libPath')
- # tk_split_simplelist(INTERP._invoke('set', 'tcl_libPath'))
-
- when :PLATFORM, :TCL_PLATFORM
- INTERP._invoke_without_enc('global', 'tcl_platform')
- Hash[*tk_split_simplelist(INTERP._invoke_without_enc('array', 'get',
- 'tcl_platform'))]
-
- when :ENV
- INTERP._invoke_without_enc('global', 'env')
- Hash[*tk_split_simplelist(INTERP._invoke('array', 'get', 'env'))]
-
- #when :AUTO_PATH #<===
- # tk_split_simplelist(INTERP._invoke('set', 'auto_path'))
-
- #when :AUTO_OLDPATH
- # tk_split_simplelist(INTERP._invoke('set', 'auto_oldpath'))
-
- when :AUTO_INDEX
- INTERP._invoke_without_enc('global', 'auto_index')
- Hash[*tk_split_simplelist(INTERP._invoke('array', 'get', 'auto_index'))]
-
- when :PRIV, :PRIVATE, :TK_PRIV
- priv = {}
- if INTERP._invoke_without_enc('info', 'vars', 'tk::Priv') != ""
- var_nam = 'tk::Priv'
- else
- var_nam = 'tkPriv'
- end
- INTERP._invoke_without_enc('global', var_nam)
- Hash[*tk_split_simplelist(INTERP._invoke('array', 'get',
- var_nam))].each{|k,v|
- k.freeze
- case v
- when /^-?\d+$/
- priv[k] = v.to_i
- when /^-?\d+\.?\d*(e[-+]?\d+)?$/
- priv[k] = v.to_f
- else
- priv[k] = v.freeze
- end
- }
- priv
-
- else
- raise NameError, 'uninitialized constant Tk::' + sym.id2name
- end
- end
-
- def Tk.errorInfo
- INTERP._invoke_without_enc('global', 'errorInfo')
- INTERP._invoke_without_enc('set', 'errorInfo')
- end
-
- def Tk.errorCode
- INTERP._invoke_without_enc('global', 'errorCode')
- code = tk_split_simplelist(INTERP._invoke_without_enc('set', 'errorCode'))
- case code[0]
- when 'CHILDKILLED', 'CHILDSTATUS', 'CHILDSUSP'
- begin
- pid = Integer(code[1])
- code[1] = pid
- rescue
- end
- end
- code
- end
-
- def Tk.has_mainwindow?
- INTERP.has_mainwindow?
- end
-
- def root
- Tk::Root.new
- end
-
- def Tk.load_tclscript(file, enc=nil)
- if enc
- # TCL_VERSION >= 8.5
- tk_call('source', '-encoding', enc, file)
- else
- tk_call('source', file)
- end
- end
-
- def Tk.load_tcllibrary(file, pkg_name=None, interp=None)
- tk_call('load', file, pkg_name, interp)
- end
-
- def Tk.unload_tcllibrary(*args)
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- nocomp = (keys['nocomplain'])? '-nocomplain': None
- keeplib = (keys['keeplibrary'])? '-keeplibrary': None
- tk_call('unload', nocomp, keeplib, '--', *args)
- else
- tk_call('unload', *args)
- end
- end
-
- def Tk.pkgconfig_list(mod)
- # Tk8.5 feature
- if mod.kind_of?(Module)
- if mod.respond_to?(:package_name)
- pkgname = mod.package_name
- elsif mod.const_defined?(:PACKAGE_NAME)
- pkgname = mod::PACKAGE_NAME
- else
- fail NotImplementedError, 'may not be a module for a Tcl extension'
- end
- else
- pkgname = mod.to_s
- end
-
- pkgname = '::' << pkgname unless pkgname =~ /^::/
-
- tk_split_list(tk_call(pkgname + '::pkgconfig', 'list'))
- end
-
- def Tk.pkgconfig_get(mod, key)
- # Tk8.5 feature
- if mod.kind_of?(Module)
- if mod.respond_to?(:package_name)
- pkgname = mod.package_name
- else
- fail NotImplementedError, 'may not be a module for a Tcl extension'
- end
- else
- pkgname = mod.to_s
- end
-
- pkgname = '::' << pkgname unless pkgname =~ /^::/
-
- tk_call(pkgname + '::pkgconfig', 'get', key)
- end
-
- def Tk.tcl_pkgconfig_list
- # Tk8.5 feature
- Tk.pkgconfig_list('::tcl')
- end
-
- def Tk.tcl_pkgconfig_get(key)
- # Tk8.5 feature
- Tk.pkgconfig_get('::tcl', key)
- end
-
- def Tk.tk_pkgconfig_list
- # Tk8.5 feature
- Tk.pkgconfig_list('::tk')
- end
-
- def Tk.tk_pkgconfig_get(key)
- # Tk8.5 feature
- Tk.pkgconfig_get('::tk', key)
- end
-
- def Tk.bell(nice = false)
- if nice
- tk_call_without_enc('bell', '-nice')
- else
- tk_call_without_enc('bell')
- end
- nil
- end
-
- def Tk.bell_on_display(win, nice = false)
- if nice
- tk_call_without_enc('bell', '-displayof', win, '-nice')
- else
- tk_call_without_enc('bell', '-displayof', win)
- end
- nil
- end
-
- def Tk.destroy(*wins)
- #tk_call_without_enc('destroy', *wins)
- tk_call_without_enc('destroy', *(wins.collect{|win|
- if win.kind_of?(TkWindow)
- win.epath
- else
- win
- end
- }))
- end
-
- def Tk.exit
- TkCore::INTERP.has_mainwindow? && tk_call_without_enc('destroy', '.')
- end
-
- ################################################
-
- def Tk.sleep(ms = nil, id = nil)
- if id
- var = (id.kind_of?(TkVariable))? id: TkVarAccess.new(id.to_s)
- else
- var = TkVariable.new
- end
-
- var.value = tk_call_without_enc('after', ms, proc{ var.value = 0 }) if ms
- var.thread_wait
- ms
- end
-
- def Tk.wakeup(id)
- ((id.kind_of?(TkVariable))? id: TkVarAccess.new(id.to_s)).value = 0
- nil
- end
-
- ################################################
-
- def Tk.pack(*args)
- TkPack.configure(*args)
- end
- def Tk.pack_forget(*args)
- TkPack.forget(*args)
- end
- def Tk.unpack(*args)
- TkPack.forget(*args)
- end
-
- def Tk.grid(*args)
- TkGrid.configure(*args)
- end
- def Tk.grid_forget(*args)
- TkGrid.forget(*args)
- end
- def Tk.ungrid(*args)
- TkGrid.forget(*args)
- end
-
- def Tk.place(*args)
- TkPlace.configure(*args)
- end
- def Tk.place_forget(*args)
- TkPlace.forget(*args)
- end
- def Tk.unplace(*args)
- TkPlace.forget(*args)
- end
-
- def Tk.update(idle=nil)
- if idle
- tk_call_without_enc('update', 'idletasks')
- else
- tk_call_without_enc('update')
- end
- end
- def Tk.update_idletasks
- update(true)
- end
- def update(idle=nil)
- # only for backward compatibility (This never be recommended to use)
- Tk.update(idle)
- self
- end
-
- # NOTE::
- # If no eventloop-thread is running, "thread_update" method is same
- # to "update" method. Else, "thread_update" method waits to complete
- # idletask operation on the eventloop-thread.
- def Tk.thread_update(idle=nil)
- if idle
- tk_call_without_enc('thread_update', 'idletasks')
- else
- tk_call_without_enc('thread_update')
- end
- end
- def Tk.thread_update_idletasks
- thread_update(true)
- end
-
- def Tk.lower_window(win, below=None)
- tk_call('lower', _epath(win), _epath(below))
- nil
- end
- def Tk.raise_window(win, above=None)
- tk_call('raise', _epath(win), _epath(above))
- nil
- end
-
- def Tk.current_grabs(win = nil)
- if win
- window(tk_call_without_enc('grab', 'current', win))
- else
- tk_split_list(tk_call_without_enc('grab', 'current'))
- end
- end
-
- def Tk.focus(display=nil)
- if display == nil
- window(tk_call_without_enc('focus'))
- else
- window(tk_call_without_enc('focus', '-displayof', display))
- end
- end
-
- def Tk.focus_to(win, force=false)
- if force
- tk_call_without_enc('focus', '-force', win)
- else
- tk_call_without_enc('focus', win)
- end
- end
-
- def Tk.focus_lastfor(win)
- window(tk_call_without_enc('focus', '-lastfor', win))
- end
-
- def Tk.focus_next(win)
- TkManageFocus.next(win)
- end
-
- def Tk.focus_prev(win)
- TkManageFocus.prev(win)
- end
-
- def Tk.strictMotif(mode=None)
- bool(tk_call_without_enc('set', 'tk_strictMotif', mode))
- end
-
- def Tk.show_kinsoku(mode='both')
- begin
- if /^8\.*/ === TK_VERSION && JAPANIZED_TK
- tk_split_simplelist(tk_call('kinsoku', 'show', mode))
- end
- rescue
- end
- end
- def Tk.add_kinsoku(chars, mode='both')
- begin
- if /^8\.*/ === TK_VERSION && JAPANIZED_TK
- tk_split_simplelist(tk_call('kinsoku', 'add', mode,
- *(chars.split(''))))
- else
- []
- end
- rescue
- []
- end
- end
- def Tk.delete_kinsoku(chars, mode='both')
- begin
- if /^8\.*/ === TK_VERSION && JAPANIZED_TK
- tk_split_simplelist(tk_call('kinsoku', 'delete', mode,
- *(chars.split(''))))
- end
- rescue
- end
- end
-
- def Tk.toUTF8(str, encoding = nil)
- _toUTF8(str, encoding)
- end
-
- def Tk.fromUTF8(str, encoding = nil)
- _fromUTF8(str, encoding)
- end
-end
-
-###########################################
-# string with Tcl's encoding
-###########################################
-module Tk
- def Tk.subst_utf_backslash(str)
- Tk::EncodedString.subst_utf_backslash(str)
- end
- def Tk.subst_tk_backslash(str)
- Tk::EncodedString.subst_tk_backslash(str)
- end
- def Tk.utf_to_backslash_sequence(str)
- Tk::EncodedString.utf_to_backslash_sequence(str)
- end
- def Tk.utf_to_backslash(str)
- Tk::EncodedString.utf_to_backslash_sequence(str)
- end
- def Tk.to_backslash_sequence(str)
- Tk::EncodedString.to_backslash_sequence(str)
- end
-end
-
-
-###########################################
-# convert kanji string to/from utf-8
-###########################################
-if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK)
- module Tk
- module Encoding
- extend Encoding
-
- TkCommandNames = ['encoding'.freeze].freeze
-
- #############################################
-
- if TkCore::WITH_ENCODING ### Ruby 1.9
- RubyEncoding = ::Encoding
-
- # for saving GC cost
- #ENCNAMES_CMD = ['encoding'.freeze, 'names'.freeze]
- BINARY_NAME = 'binary'.freeze
- UTF8_NAME = 'utf-8'.freeze
- DEFAULT_EXTERNAL_NAME = RubyEncoding.default_external.name.freeze
- DEFAULT_INTERNAL_NAME = RubyEncoding.default_internal.name.freeze rescue nil
-
- BINARY = RubyEncoding.find(BINARY_NAME)
- UNKNOWN = RubyEncoding.find('ASCII-8BIT')
-
- ### start of creating ENCODING_TABLE
- ENCODING_TABLE = TkCore::INTERP.encoding_table
-=begin
- ENCODING_TABLE = {
- 'binary' => BINARY,
- # 'UNKNOWN-8BIT' => UNKNOWN,
- }
-
- list = TkCore::INTERP._invoke_without_enc(ENCNAMES_CMD[0],
- ENCNAMES_CMD[1])
- TkCore::INTERP._split_tklist(list).each{|name|
- begin
- enc = RubyEncoding.find(name)
- rescue ArgumentError
- case name
- when 'identity'
- enc = BINARY
- when 'shiftjis'
- enc = RubyEncoding.find('Shift_JIS')
- when 'unicode'
- enc = RubyEncoding.find('UTF-8')
- #if Tk.tk_call('set', 'tcl_platform(byteOrder)') =='littleEndian'
- # enc = RubyEncoding.find('UTF-16LE')
- #else
- # enc = RubyEncoding.find('UTF-16BE')
- #end
- when 'symbol'
- # single byte data
- enc = RubyEncoding.find('ASCII-8BIT') ### ???
- else
- # unsupported on Ruby, but supported on Tk
- enc = TkCore::INTERP.create_dummy_encoding_for_tk(name)
- end
- end
- ENCODING_TABLE[name.freeze] = enc
- }
-=end
-=begin
- def ENCODING_TABLE.get_name(enc)
- orig_enc = enc
-
- # unless enc, use system default
- # 1st: Ruby/Tk default encoding
- # 2nd: Tcl/Tk default encoding
- # 3rd: Ruby's default_external
- enc ||= TkCore::INTERP.encoding
- enc ||= TclTkLib.encoding_system
- enc ||= DEFAULT_EXTERNAL_NAME
-
- if enc.kind_of?(RubyEncoding)
- # Ruby's Encoding object
- if (name = self.key(enc))
- return name
- end
-
- # Is it new ?
- list = TkCore::INTERP._invoke_without_enc(ENCNAMES_CMD[0],
- ENCNAMES_CMD[1])
- TkComm.simplelist(list).each{|name|
- if ((enc == RubyEncoding.find(name)) rescue false)
- # new relation!! update table
- self[name.freeze] = enc
- return name
- end
- }
- else
- # String or Symbol ?
- if self[name = enc.to_s]
- return name
- end
-
- # Is it new ?
- if (enc_obj = (RubyEncoding.find(name) rescue false))
- list = TkCore::INTERP._invoke_without_enc(ENCNAMES_CMD[0],
- ENCNAMES_CMD[1])
- if TkComm.simplelist(list).index(name)
- # Tk's encoding name ?
- self[name.freeze] = enc_obj # new relation!! update table
- return name
- else
- # Ruby's encoding name ?
- if (name = self.key(enc_obj))
- return name
- end
- end
- end
- end
-
- fail ArgumentError, "unsupported Tk encoding '#{orig_enc}'"
- end
-
- def ENCODING_TABLE.get_obj(enc)
- # returns the encoding object.
- # If 'enc' is the encoding name on Tk only, it returns nil.
- ((obj = self[self.get_name(enc)]).kind_of?(RubyEncoding))? obj: nil
- end
-=end
- ### end of creating ENCODING_TABLE
-
- end
-
- #############################################
-
- if TkCore::WITH_ENCODING
- ################################
- ### Ruby 1.9
- ################################
- def force_default_encoding(mode)
- TkCore::INTERP.force_default_encoding = mode
- end
-
- def force_default_encoding?
- TkCore::INTERP.force_default_encoding?
- end
-
- def default_encoding=(enc)
- TkCore::INTERP.default_encoding = Tk::Encoding::ENCODING_TABLE.get_name(enc)
- end
-
- def encoding=(enc)
- TkCore::INTERP.encoding = Tk::Encoding::ENCODING_TABLE.get_name(enc)
- end
-
- def encoding_name
- Tk::Encoding::ENCODING_TABLE.get_name(TkCore::INTERP.encoding)
- end
- def encoding_obj
- Tk::Encoding::ENCODING_TABLE.get_obj(TkCore::INTERP.encoding)
- end
- alias encoding encoding_name
- alias default_encoding encoding_name
-
- def tk_encoding_names
- #TkComm.simplelist(TkCore::INTERP._invoke_without_enc(Tk::Encoding::ENCNAMES_CMD[0], Tk::Encoding::ENCNAMES_CMD[1]))
- TkComm.simplelist(TkCore::INTERP._invoke_without_enc('encoding', 'names'))
- end
- def encoding_names
- self.tk_encoding_names.find_all{|name|
- Tk::Encoding::ENCODING_TABLE.get_name(name) rescue false
- }
- end
- def encoding_objs
- self.tk_encoding_names.map!{|name|
- Tk::Encoding::ENCODING_TABLE.get_obj(name) rescue nil
- }.compact
- end
-
- def encoding_system=(enc)
- TclTkLib.encoding_system = Tk::Encoding::ENCODING_TABLE.get_name(enc)
- end
-
- def encoding_system_name
- Tk::Encoding::ENCODING_TABLE.get_name(TclTkLib.encoding_system)
- end
- def encoding_system_obj
- Tk::Encoding::ENCODING_TABLE.get_obj(TclTkLib.encoding_system)
- end
- alias encoding_system encoding_system_name
-
- ################################
- else
- ################################
- ### Ruby 1.8-
- ################################
- def force_default_encoding=(mode)
- true
- end
-
- def force_default_encoding?
- true
- end
-
- def default_encoding=(enc)
- TkCore::INTERP.default_encoding = enc
- end
-
- def encoding=(enc)
- TkCore::INTERP.encoding = enc
- end
-
- def encoding_obj
- TkCore::INTERP.encoding
- end
- def encoding_name
- TkCore::INTERP.encoding
- end
- alias encoding encoding_name
- alias default_encoding encoding_name
-
- def tk_encoding_names
- TkComm.simplelist(Tk.tk_call('encoding', 'names'))
- end
- def encoding_objs
- self.tk_encoding_names
- end
- def encoding_names
- self.tk_encoding_names
- end
-
- def encoding_system=(enc)
- TclTkLib.encoding_system = enc
- end
-
- def encoding_system_name
- TclTkLib.encoding_system
- end
- def encoding_system_obj
- TclTkLib.encoding_system
- end
- alias encoding_system encoding_system_name
-
- ################################
- end
-
- def encoding_convertfrom(str, enc=nil)
- enc = encoding_system_name unless enc
- str = str.dup
- if TkCore::WITH_ENCODING
- if str.kind_of?(Tk::EncodedString)
- str.__instance_variable_set('@encoding', nil)
- else
- str.instance_variable_set('@encoding', nil)
- end
- str.force_encoding('binary')
- else
- str.instance_variable_set('@encoding', 'binary')
- end
- ret = TkCore::INTERP._invoke_without_enc('encoding', 'convertfrom',
- enc, str)
- if TkCore::WITH_ENCODING
- ret.force_encoding('utf-8')
- else
- Tk::UTF8_String.new(ret)
- end
- ret
- end
- alias encoding_convert_from encoding_convertfrom
-
- def encoding_convertto(str, enc=nil)
- # str must be a UTF-8 string
- enc = encoding_system_name unless enc
- ret = TkCore::INTERP._invoke_without_enc('encoding', 'convertto',
- enc, str)
- #ret.instance_variable_set('@encoding', 'binary')
- if TkCore::WITH_ENCODING
- #ret.force_encoding(Tk::Encoding::ENCODING_TABLE.get_obj('binary'))
- ret.force_encoding(Tk::Encoding::ENCODING_TABLE.get_obj(enc))
- end
- ret
- end
- alias encoding_convert_to encoding_convertto
-
- def encoding_dirs
- # Tcl8.5 feature
- TkComm.simplelist(Tk.tk_call_without_enc('encoding', 'dirs'))
- end
-
- def encoding_dirs=(dir_list) # an array or a Tcl's list string
- # Tcl8.5 feature
- Tk.tk_call_without_enc('encoding', 'dirs', dir_list)
- end
- end
-
- extend Encoding
- end
-
- class TclTkIp
- def force_default_encoding=(mode)
- @force_default_encoding[0] = (mode)? true: false
- end
-
- def force_default_encoding?
- @force_default_encoding[0] ||= false
- end
-
- def default_encoding=(name)
- name = name.name if Tk::WITH_ENCODING && name.kind_of?(::Encoding)
- @encoding[0] = name.to_s.dup
- end
-
- # from tkencoding.rb by ttate@jaist.ac.jp
- #attr_accessor :encoding
- def encoding=(name)
- self.force_default_encoding = true # for compatibility
- self.default_encoding = name
- end
-
- def encoding_name
- (@encoding[0])? @encoding[0].dup: nil
- end
- alias encoding encoding_name
- alias default_encoding encoding_name
-
- def encoding_obj
- if Tk::WITH_ENCODING
- Tk::Encoding.tcl2rb_encoding(@encoding[0])
- else
- (@encoding[0])? @encoding[0].dup: nil
- end
- end
-
- alias __toUTF8 _toUTF8
- alias __fromUTF8 _fromUTF8
-
- if Object.const_defined?(:Encoding) && ::Encoding.class == Class
- # with Encoding (Ruby 1.9+)
- #
- # use functions on Tcl as default.
- # but when unsupported encoding on Tcl, use methods on Ruby.
- #
- def _toUTF8(str, enc = nil)
- if enc
- # use given encoding
- begin
- enc_name = Tk::Encoding::ENCODING_TABLE.get_name(enc)
- rescue
- # unknown encoding for Tk -> try to convert encoding on Ruby
- str = str.dup.force_encoding(enc)
- str.encode!(Tk::Encoding::UTF8_NAME) # modify self !!
- return str # if no error, probably succeed converting
- end
- end
-
- enc_name ||= str.instance_variable_get(:@encoding)
-
- enc_name ||=
- Tk::Encoding::ENCODING_TABLE.get_name(str.encoding) rescue nil
-
- if enc_name
- # str has its encoding information
- encstr = __toUTF8(str, enc_name)
- encstr.force_encoding(Tk::Encoding::UTF8_NAME)
- return encstr
- else
- # str.encoding isn't supported by Tk -> try to convert on Ruby
- begin
- return str.encode(Tk::Encoding::UTF8_NAME) # new string
- rescue
- # error -> ignore, try to use default encoding of Ruby/Tk
- end
- end
-
- #enc_name ||=
- # Tk::Encoding::ENCODING_TABLE.get_name(Tk.encoding) rescue nil
- enc_name ||= Tk::Encoding::ENCODING_TABLE.get_name(nil)
-
- # is 'binary' encoding?
- if enc_name == Tk::Encoding::BINARY_NAME
- return str.dup.force_encoding(Tk::Encoding::BINARY_NAME)
- end
-
- # force default encoding?
- if ! str.kind_of?(Tk::EncodedString) && self.force_default_encoding?
- enc_name = Tk::Encoding::ENCODING_TABLE.get_name(Tk.default_encoding)
- end
-
- encstr = __toUTF8(str, enc_name)
- encstr.force_encoding(Tk::Encoding::UTF8_NAME)
- encstr
- end
- def _fromUTF8(str, enc = nil)
- # str must be UTF-8 or binary.
- enc_name = str.instance_variable_get(:@encoding)
- enc_name ||=
- Tk::Encoding::ENCODING_TABLE.get_name(str.encoding) rescue nil
-
- # is 'binary' encoding?
- if enc_name == Tk::Encoding::BINARY_NAME
- return str.dup.force_encoding(Tk::Encoding::BINARY_NAME)
- end
-
- # get target encoding name (if enc == nil, use default encoding)
- begin
- enc_name = Tk::Encoding::ENCODING_TABLE.get_name(enc)
- rescue
- # then, enc != nil
- # unknown encoding for Tk -> try to convert encoding on Ruby
- str = str.dup.force_encoding(Tk::Encoding::UTF8_NAME)
- str.encode!(enc) # modify self !!
- return str # if no error, probably succeed converting
- end
-
- encstr = __fromUTF8(str, enc_name)
- encstr.force_encoding(Tk::Encoding::ENCODING_TABLE.get_obj(enc_name))
- encstr
- end
- ###
- else
- # without Encoding (Ruby 1.8)
- def _toUTF8(str, encoding = nil)
- __toUTF8(str, encoding)
- end
- def _fromUTF8(str, encoding = nil)
- __fromUTF8(str, encoding)
- end
- ###
- end
-
- alias __eval _eval
- alias __invoke _invoke
-
- def _eval(cmd)
- _fromUTF8(__eval(_toUTF8(cmd)))
- end
-
- def _invoke(*cmds)
- _fromUTF8(__invoke(*(cmds.collect{|cmd| _toUTF8(cmd)})))
- end
-
- alias _eval_with_enc _eval
- alias _invoke_with_enc _invoke
-
-=begin
- #### --> definition is moved to TclTkIp module
-
- def _toUTF8(str, encoding = nil)
- # decide encoding
- if encoding
- encoding = encoding.to_s
- elsif str.kind_of?(Tk::EncodedString) && str.encoding != nil
- encoding = str.encoding.to_s
- elsif str.instance_variable_get(:@encoding)
- encoding = str.instance_variable_get(:@encoding).to_s
- elsif defined?(@encoding) && @encoding != nil
- encoding = @encoding.to_s
- else
- encoding = __invoke('encoding', 'system')
- end
-
- # convert
- case encoding
- when 'utf-8', 'binary'
- str
- else
- __toUTF8(str, encoding)
- end
- end
-
- def _fromUTF8(str, encoding = nil)
- unless encoding
- if defined?(@encoding) && @encoding != nil
- encoding = @encoding.to_s
- else
- encoding = __invoke('encoding', 'system')
- end
- end
-
- if str.kind_of?(Tk::EncodedString)
- if str.encoding == 'binary'
- str
- else
- __fromUTF8(str, encoding)
- end
- elsif str.instance_variable_get(:@encoding).to_s == 'binary'
- str
- else
- __fromUTF8(str, encoding)
- end
- end
-=end
-
-=begin
- def _eval(cmd)
- if defined?(@encoding) && @encoding != 'utf-8'
- ret = if cmd.kind_of?(Tk::EncodedString)
- case cmd.encoding
- when 'utf-8', 'binary'
- __eval(cmd)
- else
- __eval(_toUTF8(cmd, cmd.encoding))
- end
- elsif cmd.instance_variable_get(:@encoding) == 'binary'
- __eval(cmd)
- else
- __eval(_toUTF8(cmd, @encoding))
- end
- if ret.kind_of?(String) && ret.instance_variable_get(:@encoding) == 'binary'
- ret
- else
- _fromUTF8(ret, @encoding)
- end
- else
- __eval(cmd)
- end
- end
-
- def _invoke(*cmds)
- if defined?(@encoding) && @encoding != 'utf-8'
- cmds = cmds.collect{|cmd|
- if cmd.kind_of?(Tk::EncodedString)
- case cmd.encoding
- when 'utf-8', 'binary'
- cmd
- else
- _toUTF8(cmd, cmd.encoding)
- end
- elsif cmd.instance_variable_get(:@encoding) == 'binary'
- cmd
- else
- _toUTF8(cmd, @encoding)
- end
- }
- ret = __invoke(*cmds)
- if ret.kind_of?(String) && ret.instance_variable_get(:@encoding) == 'binary'
- ret
- else
- _fromUTF8(ret, @encoding)
- end
- else
- __invoke(*cmds)
- end
- end
-=end
- end
-
- module TclTkLib
- class << self
- def force_default_encoding=(mode)
- TkCore::INTERP.force_default_encoding = mode
- end
-
- def force_default_encoding?
- TkCore::INTERP.force_default_encoding?
- end
-
- def default_encoding=(name)
- TkCore::INTERP.default_encoding = name
- end
-
- alias _encoding encoding
- alias _encoding= encoding=
- def encoding=(name)
- name = name.name if name.kind_of?(::Encoding) if Tk::WITH_ENCODING
- TkCore::INTERP.encoding = name
- end
-
- def encoding_name
- TkCore::INTERP.encoding
- end
- alias encoding encoding_name
- alias default_encoding encoding_name
-
- def encoding_obj
- if Tk::WITH_ENCODING
- Tk::Encoding.tcl2rb_encoding(TkCore::INTERP.encoding)
- else
- TkCore::INTERP.encoding
- end
- end
- end
- end
-
- # estimate encoding
- unless TkCore::WITH_ENCODING
- case $KCODE
- when /^e/i # EUC
- Tk.encoding = 'euc-jp'
- Tk.encoding_system = 'euc-jp'
- when /^s/i # SJIS
- begin
- if Tk.encoding_system == 'cp932'
- Tk.encoding = 'cp932'
- else
- Tk.encoding = 'shiftjis'
- Tk.encoding_system = 'shiftjis'
- end
- rescue StandardError, NameError
- Tk.encoding = 'shiftjis'
- Tk.encoding_system = 'shiftjis'
- end
- when /^u/i # UTF8
- Tk.encoding = 'utf-8'
- Tk.encoding_system = 'utf-8'
- else # NONE
- if defined? DEFAULT_TK_ENCODING
- Tk.encoding_system = DEFAULT_TK_ENCODING
- end
- begin
- Tk.encoding = Tk.encoding_system
- rescue StandardError, NameError
- Tk.encoding = 'utf-8'
- Tk.encoding_system = 'utf-8'
- end
- end
-
- else ### Ruby 1.9 !!!!!!!!!!!!
- # loc_enc_obj = (::Encoding.find(::Encoding.locale_charmap) rescue Tk::Encoding::UNKNOWN)
- loc_enc_obj = ::Encoding.find("locale")
- ext_enc_obj = ::Encoding.default_external
- int_enc_obj = ::Encoding.default_internal || ext_enc_obj
- tksys_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(Tk.encoding_system)
- # p [Tk.encoding, Tk.encoding_system, loc_enc_obj, ext_enc_obj]
-
-=begin
- if ext_enc_obj == Tk::Encoding::UNKNOWN
- if defined? DEFAULT_TK_ENCODING
- if DEFAULT_TK_ENCODING.kind_of?(::Encoding)
- tk_enc_name = DEFAULT_TK_ENCODING.name
- tksys_enc_name = DEFAULT_TK_ENCODING.name
- else
- tk_enc_name = DEFAULT_TK_ENCODING
- tksys_enc_name = DEFAULT_TK_ENCODING
- end
- else
- tk_enc_name = loc_enc_obj.name
- tksys_enc_name = loc_enc_obj.name
- end
- else
- tk_enc_name = ext_enc_obj.name
- tksys_enc_name = ext_enc_obj.name
- end
-
- # Tk.encoding = tk_enc_name
- Tk.default_encoding = tk_enc_name
- Tk.encoding_system = tksys_enc_name
-=end
-
- if ext_enc_obj == Tk::Encoding::UNKNOWN
- if loc_enc_obj == Tk::Encoding::UNKNOWN
- # use Tk.encoding_system
- else
- # use locale_charmap
- begin
- loc_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(loc_enc_obj)
- if loc_enc_name && loc_enc_name != tksys_enc_name
- # use locale_charmap
- Tk.encoding_system = loc_enc_name
- else
- # use Tk.encoding_system
- end
- rescue ArgumentError
- # unsupported encoding on Tk -> use Tk.encoding_system
- end
- end
- else
- begin
- ext_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(ext_enc_obj)
- if ext_enc_name && ext_enc_name != tksys_enc_name
- # use default_external
- Tk.encoding_system = ext_enc_name
- else
- # use Tk.encoding_system
- end
- rescue ArgumentError
- # unsupported encoding on Tk -> use Tk.encoding_system
- end
- end
-
- # setup Tk.encoding
- enc_name = nil
-
- begin
- default_def = DEFAULT_TK_ENCODING
- if ::Encoding.find(default_def.to_s) != Tk::Encoding::UNKNOWN
- enc_name = Tk::Encoding::ENCODING_TABLE.get_name(default_def)
- end
- rescue NameError
- # ignore
- enc_name = nil
- rescue ArgumentError
- enc_name = nil
- fail ArgumentError,
- "DEFAULT_TK_ENCODING has an unknown encoding #{default_def}"
- end
-
- unless enc_name
- #if ext_enc_obj == Tk::Encoding::UNKNOWN
- if int_enc_obj == Tk::Encoding::UNKNOWN
- if loc_enc_obj == Tk::Encoding::UNKNOWN
- # use Tk.encoding_system
- enc_name = tksys_enc_name
- else
- # use locale_charmap
- begin
- loc_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(loc_enc_obj)
- if loc_enc_name
- # use locale_charmap
- enc_name = loc_enc_name
- else
- # use Tk.encoding_system
- enc_name = tksys_enc_name
- end
- rescue ArgumentError
- # unsupported encoding on Tk -> use Tk.encoding_system
- enc_name = tksys_enc_name
- end
- end
- else
- begin
- #ext_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(ext_enc_obj)
- #if ext_enc_name && ext_enc_name != tksys_enc_name
- int_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(int_enc_obj)
- if int_enc_name
- # use default_internal
- enc_name = int_enc_name
- else
- # use Tk.encoding_system
- enc_name = tksys_enc_name
- end
- rescue ArgumentError
- # unsupported encoding on Tk -> use Tk.encoding_system
- enc_name = tksys_enc_name
- end
- end
- end
-
- Tk.default_encoding = (enc_name)? enc_name: tksys_enc_name
- end
-
-else
- # dummy methods
- module Tk
- module Encoding
- extend Encoding
-
- def force_default_encoding=(mode)
- nil
- end
-
- def force_default_encoding?
- nil
- end
-
- def default_encoding=(enc)
- nil
- end
- def default_encoding
- nil
- end
-
- def encoding=(name)
- nil
- end
- def encoding
- nil
- end
- def encoding_names
- nil
- end
- def encoding_system
- nil
- end
- def encoding_system=(enc)
- nil
- end
-
- def encoding_convertfrom(str, enc=None)
- str
- end
- alias encoding_convert_from encoding_convertfrom
-
- def encoding_convertto(str, enc=None)
- str
- end
- alias encoding_convert_to encoding_convertto
- def encoding_dirs
- nil
- end
- def encoding_dirs=(dir_array)
- nil
- end
- end
-
- extend Encoding
- end
-
- class TclTkIp
- attr_accessor :encoding
-
- alias __eval _eval
- alias __invoke _invoke
-
- alias _eval_with_enc _eval
- alias _invoke_with_enc _invoke
- end
-end
-
-
-module TkBindCore
- #def bind(context, cmd=Proc.new, *args)
- # Tk.bind(self, context, cmd, *args)
- #end
- def bind(context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- Tk.bind(self, context, cmd, *args)
- end
-
- #def bind_append(context, cmd=Proc.new, *args)
- # Tk.bind_append(self, context, cmd, *args)
- #end
- def bind_append(context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- Tk.bind_append(self, context, cmd, *args)
- end
-
- def bind_remove(context)
- Tk.bind_remove(self, context)
- end
-
- def bindinfo(context=nil)
- Tk.bindinfo(self, context)
- end
-end
-
-
-module TkTreatFont
- def __font_optkeys
- ['font']
- end
- private :__font_optkeys
-
- def __pathname
- self.path
- end
- private :__pathname
-
- ################################
-
- def font_configinfo(key = nil)
- optkeys = __font_optkeys
- if key && !optkeys.find{|opt| opt.to_s == key.to_s}
- fail ArgumentError, "unknown font option name `#{key}'"
- end
-
- win, tag = __pathname.split(':')
-
- if key
- pathname = [win, tag, key].join(';')
- TkFont.used_on(pathname) ||
- TkFont.init_widget_font(pathname, *__confinfo_cmd)
- elsif optkeys.size == 1
- pathname = [win, tag, optkeys[0]].join(';')
- TkFont.used_on(pathname) ||
- TkFont.init_widget_font(pathname, *__confinfo_cmd)
- else
- fonts = {}
- optkeys.each{|k|
- k = k.to_s
- pathname = [win, tag, k].join(';')
- fonts[k] =
- TkFont.used_on(pathname) ||
- TkFont.init_widget_font(pathname, *__confinfo_cmd)
- }
- fonts
- end
- end
- alias fontobj font_configinfo
-
- def font_configure(slot)
- pathname = __pathname
-
- slot = _symbolkey2str(slot)
-
- __font_optkeys.each{|optkey|
- optkey = optkey.to_s
- l_optkey = 'latin' << optkey
- a_optkey = 'ascii' << optkey
- k_optkey = 'kanji' << optkey
-
- if slot.key?(optkey)
- fnt = slot.delete(optkey)
- if fnt.kind_of?(TkFont)
- slot.delete(l_optkey)
- slot.delete(a_optkey)
- slot.delete(k_optkey)
-
- fnt.call_font_configure([pathname, optkey], *(__config_cmd << {}))
- next
- else
- if fnt
- if (slot.key?(l_optkey) ||
- slot.key?(a_optkey) ||
- slot.key?(k_optkey))
- fnt = TkFont.new(fnt)
-
- lfnt = slot.delete(l_optkey)
- lfnt = slot.delete(a_optkey) if slot.key?(a_optkey)
- kfnt = slot.delete(k_optkey)
-
- fnt.latin_replace(lfnt) if lfnt
- fnt.kanji_replace(kfnt) if kfnt
-
- fnt.call_font_configure([pathname, optkey],
- *(__config_cmd << {}))
- next
- else
- fnt = hash_kv(fnt) if fnt.kind_of?(Hash)
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- tk_call(*(__config_cmd << "-#{optkey}" << fnt))
- else
- begin
- tk_call(*(__config_cmd << "-#{optkey}" << fnt))
- rescue
- # ignore
- end
- end
- end
- end
- next
- end
- end
-
- lfnt = slot.delete(l_optkey)
- lfnt = slot.delete(a_optkey) if slot.key?(a_optkey)
- kfnt = slot.delete(k_optkey)
-
- if lfnt && kfnt
- TkFont.new(lfnt, kfnt).call_font_configure([pathname, optkey],
- *(__config_cmd << {}))
- elsif lfnt
- latinfont_configure([lfnt, optkey])
- elsif kfnt
- kanjifont_configure([kfnt, optkey])
- end
- }
-
- # configure other (without font) options
- tk_call(*(__config_cmd.concat(hash_kv(slot)))) if slot != {}
- self
- end
-
- def latinfont_configure(ltn, keys=nil)
- if ltn.kind_of?(Array)
- key = ltn[1]
- ltn = ltn[0]
- else
- key = nil
- end
-
- optkeys = __font_optkeys
- if key && !optkeys.find{|opt| opt.to_s == key.to_s}
- fail ArgumentError, "unknown font option name `#{key}'"
- end
-
- win, tag = __pathname.split(':')
-
- optkeys = [key] if key
-
- optkeys.each{|optkey|
- optkey = optkey.to_s
-
- pathname = [win, tag, optkey].join(';')
-
- if (fobj = TkFont.used_on(pathname))
- fobj = TkFont.new(fobj) # create a new TkFont object
- elsif Tk::JAPANIZED_TK
- fobj = fontobj # create a new TkFont object
- else
- ltn = hash_kv(ltn) if ltn.kind_of?(Hash)
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- tk_call(*(__config_cmd << "-#{optkey}" << ltn))
- else
- begin
- tk_call(*(__config_cmd << "-#{optkey}" << ltn))
- rescue => e
- # ignore
- end
- end
- next
- end
-
- if fobj.kind_of?(TkFont)
- if ltn.kind_of?(TkFont)
- conf = {}
- ltn.latin_configinfo.each{|k,val| conf[k] = val}
- if keys
- fobj.latin_configure(conf.update(keys))
- else
- fobj.latin_configure(conf)
- end
- else
- fobj.latin_replace(ltn)
- end
- end
-
- fobj.call_font_configure([pathname, optkey], *(__config_cmd << {}))
- }
- self
- end
- alias asciifont_configure latinfont_configure
-
- def kanjifont_configure(knj, keys=nil)
- if knj.kind_of?(Array)
- key = knj[1]
- knj = knj[0]
- else
- key = nil
- end
-
- optkeys = __font_optkeys
- if key && !optkeys.find{|opt| opt.to_s == key.to_s}
- fail ArgumentError, "unknown font option name `#{key}'"
- end
-
- win, tag = __pathname.split(':')
-
- optkeys = [key] if key
-
- optkeys.each{|optkey|
- optkey = optkey.to_s
-
- pathname = [win, tag, optkey].join(';')
-
- if (fobj = TkFont.used_on(pathname))
- fobj = TkFont.new(fobj) # create a new TkFont object
- elsif Tk::JAPANIZED_TK
- fobj = fontobj # create a new TkFont object
- else
- knj = hash_kv(knj) if knj.kind_of?(Hash)
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- tk_call(*(__config_cmd << "-#{optkey}" << knj))
- else
- begin
- tk_call(*(__config_cmd << "-#{optkey}" << knj))
- rescue => e
- # ignore
- end
- end
- next
- end
-
- if fobj.kind_of?(TkFont)
- if knj.kind_of?(TkFont)
- conf = {}
- knj.kanji_configinfo.each{|k,val| conf[k] = val}
- if keys
- fobj.kanji_configure(conf.update(keys))
- else
- fobj.kanji_configure(conf)
- end
- else
- fobj.kanji_replace(knj)
- end
- end
-
- fobj.call_font_configure([pathname, optkey], *(__config_cmd << {}))
- }
- self
- end
-
- def font_copy(win, wintag=nil, winkey=nil, targetkey=nil)
- if wintag
- if winkey
- fnt = win.tagfontobj(wintag, winkey).dup
- else
- fnt = win.tagfontobj(wintag).dup
- end
- else
- if winkey
- fnt = win.fontobj(winkey).dup
- else
- fnt = win.fontobj.dup
- end
- end
-
- if targetkey
- fnt.call_font_configure([__pathname, targetkey], *(__config_cmd << {}))
- else
- fnt.call_font_configure(__pathname, *(__config_cmd << {}))
- end
- self
- end
-
- def latinfont_copy(win, wintag=nil, winkey=nil, targetkey=nil)
- if targetkey
- fontobj(targetkey).dup.call_font_configure([__pathname, targetkey],
- *(__config_cmd << {}))
- else
- fontobj.dup.call_font_configure(__pathname, *(__config_cmd << {}))
- end
-
- if wintag
- if winkey
- fontobj.latin_replace(win.tagfontobj(wintag, winkey).latin_font_id)
- else
- fontobj.latin_replace(win.tagfontobj(wintag).latin_font_id)
- end
- else
- if winkey
- fontobj.latin_replace(win.fontobj(winkey).latin_font_id)
- else
- fontobj.latin_replace(win.fontobj.latin_font_id)
- end
- end
- self
- end
- alias asciifont_copy latinfont_copy
-
- def kanjifont_copy(win, wintag=nil, winkey=nil, targetkey=nil)
- if targetkey
- fontobj(targetkey).dup.call_font_configure([__pathname, targetkey],
- *(__config_cmd << {}))
- else
- fontobj.dup.call_font_configure(__pathname, *(__config_cmd << {}))
- end
-
- if wintag
- if winkey
- fontobj.kanji_replace(win.tagfontobj(wintag, winkey).kanji_font_id)
- else
- fontobj.kanji_replace(win.tagfontobj(wintag).kanji_font_id)
- end
- else
- if winkey
- fontobj.kanji_replace(win.fontobj(winkey).kanji_font_id)
- else
- fontobj.kanji_replace(win.fontobj.kanji_font_id)
- end
- end
- self
- end
-end
-
-
-module TkConfigMethod
- include TkUtil
- include TkTreatFont
-
- def TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- @mode || false
- end
- def TkConfigMethod.__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode)
- @mode = (mode)? true: false
- end
-
- def __cget_cmd
- [self.path, 'cget']
- end
- private :__cget_cmd
-
- def __config_cmd
- [self.path, 'configure']
- end
- private :__config_cmd
-
- def __confinfo_cmd
- __config_cmd
- end
- private :__confinfo_cmd
-
- def __configinfo_struct
- {:key=>0, :alias=>1, :db_name=>1, :db_class=>2,
- :default_value=>3, :current_value=>4}
- end
- private :__configinfo_struct
-
- def __optkey_aliases
- {}
- end
- private :__optkey_aliases
-
- def __numval_optkeys
- []
- end
- private :__numval_optkeys
-
- def __numstrval_optkeys
- []
- end
- private :__numstrval_optkeys
-
- def __boolval_optkeys
- ['exportselection', 'jump', 'setgrid', 'takefocus']
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- [
- 'text', 'label', 'show', 'data', 'file',
- 'activebackground', 'activeforeground', 'background',
- 'disabledforeground', 'disabledbackground', 'foreground',
- 'highlightbackground', 'highlightcolor', 'insertbackground',
- 'selectbackground', 'selectforeground', 'troughcolor'
- ]
- end
- private :__strval_optkeys
-
- def __listval_optkeys
- []
- end
- private :__listval_optkeys
-
- def __numlistval_optkeys
- []
- end
- private :__numlistval_optkeys
-
- def __tkvariable_optkeys
- ['variable', 'textvariable']
- end
- private :__tkvariable_optkeys
-
- def __val2ruby_optkeys # { key=>proc, ... }
- # The method is used to convert a opt-value to a ruby's object.
- # When get the value of the option "key", "proc.call(value)" is called.
- {}
- end
- private :__val2ruby_optkeys
-
- def __ruby2val_optkeys # { key=>proc, ... }
- # The method is used to convert a ruby's object to a opt-value.
- # When set the value of the option "key", "proc.call(value)" is called.
- # That is, "-#{key} #{proc.call(value)}".
- {}
- end
- private :__ruby2val_optkeys
-
- def __methodcall_optkeys # { key=>method, ... }
- # The method is used to both of get and set.
- # Usually, the 'key' will not be a widget option.
- {}
- end
- private :__methodcall_optkeys
-
- def __keyonly_optkeys # { def_key=>undef_key or nil, ... }
- {}
- end
- private :__keyonly_optkeys
-
- def __conv_keyonly_opts(keys)
- return keys unless keys.kind_of?(Hash)
- keyonly = __keyonly_optkeys
- keys2 = {}
- keys.each{|k, v|
- optkey = keyonly.find{|kk,vv| kk.to_s == k.to_s}
- if optkey
- defkey, undefkey = optkey
- if v
- keys2[defkey.to_s] = None
- elsif undefkey
- keys2[undefkey.to_s] = None
- else
- # remove key
- end
- else
- keys2[k.to_s] = v
- end
- }
- keys2
- end
- private :__conv_keyonly_opts
-
- def config_hash_kv(keys, enc_mode = nil, conf = nil)
- hash_kv(__conv_keyonly_opts(keys), enc_mode, conf)
- end
-
- ################################
-
- def [](id)
- cget(id)
- end
-
- def []=(id, val)
- configure(id, val)
- val
- end
-
- def cget_tkstring(option)
- opt = option.to_s
- fail ArgumentError, "Invalid option `#{option.inspect}'" if opt.length == 0
- tk_call_without_enc(*(__cget_cmd << "-#{opt}"))
- end
-
- def __cget_core(slot)
- orig_slot = slot
- slot = slot.to_s
-
- if slot.length == 0
- fail ArgumentError, "Invalid option `#{orig_slot.inspect}'"
- end
-
- alias_name, real_name = __optkey_aliases.find{|k, v| k.to_s == slot}
- if real_name
- slot = real_name.to_s
- end
-
- if ( method = _symbolkey2str(__val2ruby_optkeys())[slot] )
- optval = tk_call_without_enc(*(__cget_cmd << "-#{slot}"))
- begin
- return method.call(optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG
- return optval
- end
- end
-
- if ( method = _symbolkey2str(__methodcall_optkeys)[slot] )
- return self.__send__(method)
- end
-
- case slot
- when /^(#{__numval_optkeys.join('|')})$/
- begin
- number(tk_call_without_enc(*(__cget_cmd << "-#{slot}")))
- rescue
- nil
- end
-
- when /^(#{__numstrval_optkeys.join('|')})$/
- num_or_str(tk_call_without_enc(*(__cget_cmd << "-#{slot}")))
-
- when /^(#{__boolval_optkeys.join('|')})$/
- begin
- bool(tk_call_without_enc(*(__cget_cmd << "-#{slot}")))
- rescue
- nil
- end
-
- when /^(#{__listval_optkeys.join('|')})$/
- simplelist(tk_call_without_enc(*(__cget_cmd << "-#{slot}")))
-
- when /^(#{__numlistval_optkeys.join('|')})$/
- conf = tk_call_without_enc(*(__cget_cmd << "-#{slot}"))
- if conf =~ /^[0-9+-]/
- list(conf)
- else
- conf
- end
-
- when /^(#{__strval_optkeys.join('|')})$/
- _fromUTF8(tk_call_without_enc(*(__cget_cmd << "-#{slot}")))
-
- when /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/
- fontcode = $1
- fontkey = $2
- fnt = tk_tcl2ruby(tk_call_without_enc(*(__cget_cmd << "-#{fontkey}")), true)
- unless fnt.kind_of?(TkFont)
- fnt = fontobj(fontkey)
- end
- if fontcode == 'kanji' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/
- # obsolete; just for compatibility
- fnt.kanji_font
- else
- fnt
- end
-
- when /^(#{__tkvariable_optkeys.join('|')})$/
- v = tk_call_without_enc(*(__cget_cmd << "-#{slot}"))
- (v.empty?)? nil: TkVarAccess.new(v)
-
- else
- tk_tcl2ruby(tk_call_without_enc(*(__cget_cmd << "-#{slot}")), true)
- end
- end
- private :__cget_core
-
- def cget(slot)
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- __cget_core(slot)
- else
- begin
- __cget_core(slot)
- rescue => e
- if current_configinfo.has_key?(slot.to_s)
- # error on known option
- fail e
- else
- # unknown option
- nil
- end
- end
- end
- end
- def cget_strict(slot)
- # never use TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- __cget_core(slot)
- end
-
- def __configure_core(slot, value=None)
- if slot.kind_of? Hash
- slot = _symbolkey2str(slot)
-
- __optkey_aliases.each{|alias_name, real_name|
- alias_name = alias_name.to_s
- if slot.has_key?(alias_name)
- slot[real_name.to_s] = slot.delete(alias_name)
- end
- }
-
- __methodcall_optkeys.each{|key, method|
- value = slot.delete(key.to_s)
- self.__send__(method, value) if value
- }
-
- __ruby2val_optkeys.each{|key, method|
- key = key.to_s
- slot[key] = method.call(slot[key]) if slot.has_key?(key)
- }
-
- __keyonly_optkeys.each{|defkey, undefkey|
- conf = slot.find{|kk, vv| kk == defkey.to_s}
- if conf
- k, v = conf
- if v
- slot[k] = None
- else
- slot[undefkey.to_s] = None if undefkey
- slot.delete(k)
- end
- end
- }
-
- if (slot.find{|k, v| k =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/})
- font_configure(slot)
- elsif slot.size > 0
- tk_call(*(__config_cmd.concat(hash_kv(slot))))
- end
-
- else
- orig_slot = slot
- slot = slot.to_s
- if slot.length == 0
- fail ArgumentError, "Invalid option `#{orig_slot.inspect}'"
- end
-
- alias_name, real_name = __optkey_aliases.find{|k, v| k.to_s == slot}
- if real_name
- slot = real_name.to_s
- end
-
- if ( conf = __keyonly_optkeys.find{|k, v| k.to_s == slot} )
- defkey, undefkey = conf
- if value
- tk_call(*(__config_cmd << "-#{defkey}"))
- elsif undefkey
- tk_call(*(__config_cmd << "-#{undefkey}"))
- end
- elsif ( method = _symbolkey2str(__ruby2val_optkeys)[slot] )
- tk_call(*(__config_cmd << "-#{slot}" << method.call(value)))
- elsif ( method = _symbolkey2str(__methodcall_optkeys)[slot] )
- self.__send__(method, value)
- elsif (slot =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/)
- if value == None
- fontobj($2)
- else
- font_configure({slot=>value})
- end
- else
- tk_call(*(__config_cmd << "-#{slot}" << value))
- end
- end
- self
- end
- private :__configure_core
-
- def __check_available_configure_options(keys)
- availables = self.current_configinfo.keys
-
- # add non-standard keys
- availables |= __font_optkeys.map{|k|
- [k.to_s, "latin#{k}", "ascii#{k}", "kanji#{k}"]
- }.flatten
- availables |= __methodcall_optkeys.keys.map{|k| k.to_s}
- availables |= __keyonly_optkeys.keys.map{|k| k.to_s}
-
- keys = _symbolkey2str(keys)
- keys.delete_if{|k, v| !(availables.include?(k))}
- end
-
- def configure(slot, value=None)
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- __configure_core(slot, value)
- else
- if slot.kind_of?(Hash)
- begin
- __configure_core(slot)
- rescue
- slot = __check_available_configure_options(slot)
- __configure_core(slot) unless slot.empty?
- end
- else
- begin
- __configure_core(slot, value)
- rescue => e
- if current_configinfo.has_key?(slot.to_s)
- # error on known option
- fail e
- else
- # unknown option
- nil
- end
- end
- end
- end
- self
- end
-
- def configure_cmd(slot, value)
- configure(slot, install_cmd(value))
- end
-
- def __configinfo_core(slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if (slot &&
- slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/)
- fontkey = $2
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")), false, true)
- conf[__configinfo_struct[:key]] =
- conf[__configinfo_struct[:key]][1..-1]
- if ( ! __configinfo_struct[:alias] \
- || conf.size > __configinfo_struct[:alias] + 1 )
- fnt = conf[__configinfo_struct[:default_value]]
- if TkFont.is_system_font?(fnt)
- conf[__configinfo_struct[:default_value]] = TkNamedFont.new(fnt)
- end
- conf[__configinfo_struct[:current_value]] = fontobj(fontkey)
- elsif ( __configinfo_struct[:alias] \
- && conf.size == __configinfo_struct[:alias] + 1 \
- && conf[__configinfo_struct[:alias]][0] == ?- )
- conf[__configinfo_struct[:alias]] =
- conf[__configinfo_struct[:alias]][1..-1]
- end
- conf
- else
- if slot
- slot = slot.to_s
-
- alias_name, real_name = __optkey_aliases.find{|k, v| k.to_s == slot}
- if real_name
- slot = real_name.to_s
- end
-
- case slot
- when /^(#{__val2ruby_optkeys().keys.join('|')})$/
- method = _symbolkey2str(__val2ruby_optkeys())[slot]
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd() << "-#{slot}")), false, true)
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- optval = conf[__configinfo_struct[:default_value]]
- begin
- val = method.call(optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__configinfo_struct[:default_value]] = val
- end
- if ( conf[__configinfo_struct[:current_value]] )
- optval = conf[__configinfo_struct[:current_value]]
- begin
- val = method.call(optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__configinfo_struct[:current_value]] = val
- end
-
- when /^(#{__methodcall_optkeys.keys.join('|')})$/
- method = _symbolkey2str(__methodcall_optkeys)[slot]
- return [slot, '', '', '', self.__send__(method)]
-
- when /^(#{__numval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]])
- begin
- conf[__configinfo_struct[:default_value]] =
- number(conf[__configinfo_struct[:default_value]])
- rescue
- conf[__configinfo_struct[:default_value]] = nil
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- begin
- conf[__configinfo_struct[:current_value]] =
- number(conf[__configinfo_struct[:current_value]])
- rescue
- conf[__configinfo_struct[:current_value]] = nil
- end
- end
-
- when /^(#{__numstrval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]])
- conf[__configinfo_struct[:default_value]] =
- num_or_str(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] )
- conf[__configinfo_struct[:current_value]] =
- num_or_str(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__boolval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]])
- begin
- conf[__configinfo_struct[:default_value]] =
- bool(conf[__configinfo_struct[:default_value]])
- rescue
- conf[__configinfo_struct[:default_value]] = nil
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- begin
- conf[__configinfo_struct[:current_value]] =
- bool(conf[__configinfo_struct[:current_value]])
- rescue
- conf[__configinfo_struct[:current_value]] = nil
- end
- end
-
- when /^(#{__listval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]])
- conf[__configinfo_struct[:default_value]] =
- simplelist(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] )
- conf[__configinfo_struct[:current_value]] =
- simplelist(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__numlistval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] \
- && conf[__configinfo_struct[:default_value]] =~ /^[0-9]/ )
- conf[__configinfo_struct[:default_value]] =
- list(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] \
- && conf[__configinfo_struct[:current_value]] =~ /^[0-9]/ )
- conf[__configinfo_struct[:current_value]] =
- list(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__strval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- when /^(#{__tkvariable_optkeys.join('|')})$/
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]])
- v = conf[__configinfo_struct[:default_value]]
- if v.empty?
- conf[__configinfo_struct[:default_value]] = nil
- else
- conf[__configinfo_struct[:default_value]] = TkVarAccess.new(v)
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- v = conf[__configinfo_struct[:current_value]]
- if v.empty?
- conf[__configinfo_struct[:current_value]] = nil
- else
- conf[__configinfo_struct[:current_value]] = TkVarAccess.new(v)
- end
- end
-
- else
- # conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- # conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), 0, false, true)
- conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), 1, false, true)
- end
- conf[__configinfo_struct[:key]] =
- conf[__configinfo_struct[:key]][1..-1]
-
- if ( __configinfo_struct[:alias] \
- && conf.size == __configinfo_struct[:alias] + 1 \
- && conf[__configinfo_struct[:alias]][0] == ?- )
- conf[__configinfo_struct[:alias]] =
- conf[__configinfo_struct[:alias]][1..-1]
- end
-
- conf
-
- else
- # ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).collect{|conflist|
- # conf = tk_split_simplelist(conflist)
- ret = tk_split_simplelist(tk_call_without_enc(*__confinfo_cmd), false, false).collect{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- conf[__configinfo_struct[:key]] =
- conf[__configinfo_struct[:key]][1..-1]
-
- optkey = conf[__configinfo_struct[:key]]
- case optkey
- when /^(#{__val2ruby_optkeys().keys.join('|')})$/
- method = _symbolkey2str(__val2ruby_optkeys())[optkey]
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- optval = conf[__configinfo_struct[:default_value]]
- begin
- val = method.call(optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__configinfo_struct[:default_value]] = val
- end
- if ( conf[__configinfo_struct[:current_value]] )
- optval = conf[__configinfo_struct[:current_value]]
- begin
- val = method.call(optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__configinfo_struct[:current_value]] = val
- end
-
- when /^(#{__strval_optkeys.join('|')})$/
- # do nothing
-
- when /^(#{__numval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- begin
- conf[__configinfo_struct[:default_value]] =
- number(conf[__configinfo_struct[:default_value]])
- rescue
- conf[__configinfo_struct[:default_value]] = nil
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- begin
- conf[__configinfo_struct[:current_value]] =
- number(conf[__configinfo_struct[:current_value]])
- rescue
- conf[__configinfo_struct[:current_value]] = nil
- end
- end
-
- when /^(#{__numstrval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- conf[__configinfo_struct[:default_value]] =
- num_or_str(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] )
- conf[__configinfo_struct[:current_value]] =
- num_or_str(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__boolval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- begin
- conf[__configinfo_struct[:default_value]] =
- bool(conf[__configinfo_struct[:default_value]])
- rescue
- conf[__configinfo_struct[:default_value]] = nil
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- begin
- conf[__configinfo_struct[:current_value]] =
- bool(conf[__configinfo_struct[:current_value]])
- rescue
- conf[__configinfo_struct[:current_value]] = nil
- end
- end
-
- when /^(#{__listval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- conf[__configinfo_struct[:default_value]] =
- simplelist(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] )
- conf[__configinfo_struct[:current_value]] =
- simplelist(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__numlistval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] \
- && conf[__configinfo_struct[:default_value]] =~ /^[0-9]/ )
- conf[__configinfo_struct[:default_value]] =
- list(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] \
- && conf[__configinfo_struct[:current_value]] =~ /^[0-9]/ )
- conf[__configinfo_struct[:current_value]] =
- list(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__tkvariable_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- v = conf[__configinfo_struct[:default_value]]
- if v.empty?
- conf[__configinfo_struct[:default_value]] = nil
- else
- conf[__configinfo_struct[:default_value]] = TkVarAccess.new(v)
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- v = conf[__configinfo_struct[:current_value]]
- if v.empty?
- conf[__configinfo_struct[:current_value]] = nil
- else
- conf[__configinfo_struct[:current_value]] = TkVarAccess.new(v)
- end
- end
-
- else
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- if conf[__configinfo_struct[:default_value]].index('{')
- conf[__configinfo_struct[:default_value]] =
- tk_split_list(conf[__configinfo_struct[:default_value]])
- else
- conf[__configinfo_struct[:default_value]] =
- tk_tcl2ruby(conf[__configinfo_struct[:default_value]])
- end
- end
- if conf[__configinfo_struct[:current_value]]
- if conf[__configinfo_struct[:current_value]].index('{')
- conf[__configinfo_struct[:current_value]] =
- tk_split_list(conf[__configinfo_struct[:current_value]])
- else
- conf[__configinfo_struct[:current_value]] =
- tk_tcl2ruby(conf[__configinfo_struct[:current_value]])
- end
- end
- end
-
- if ( __configinfo_struct[:alias] \
- && conf.size == __configinfo_struct[:alias] + 1 \
- && conf[__configinfo_struct[:alias]][0] == ?- )
- conf[__configinfo_struct[:alias]] =
- conf[__configinfo_struct[:alias]][1..-1]
- end
-
- conf
- }
-
- __font_optkeys.each{|optkey|
- optkey = optkey.to_s
- fontconf = ret.assoc(optkey)
- if fontconf && fontconf.size > 2
- ret.delete_if{|inf| inf[0] =~ /^(|latin|ascii|kanji)#{optkey}$/}
- fnt = fontconf[__configinfo_struct[:default_value]]
- if TkFont.is_system_font?(fnt)
- fontconf[__configinfo_struct[:default_value]] \
- = TkNamedFont.new(fnt)
- end
- fontconf[__configinfo_struct[:current_value]] = fontobj(optkey)
- ret.push(fontconf)
- end
- }
-
- __methodcall_optkeys.each{|optkey, m|
- ret << [optkey.to_s, '', '', '', self.__send__(m)]
- }
-
- ret
- end
- end
-
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if (slot &&
- slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/)
- fontkey = $2
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")), false, true)
- conf[__configinfo_struct[:key]] =
- conf[__configinfo_struct[:key]][1..-1]
-
- if ( ! __configinfo_struct[:alias] \
- || conf.size > __configinfo_struct[:alias] + 1 )
- fnt = conf[__configinfo_struct[:default_value]]
- if TkFont.is_system_font?(fnt)
- conf[__configinfo_struct[:default_value]] = TkNamedFont.new(fnt)
- end
- conf[__configinfo_struct[:current_value]] = fontobj(fontkey)
- { conf.shift => conf }
- elsif ( __configinfo_struct[:alias] \
- && conf.size == __configinfo_struct[:alias] + 1 )
- if conf[__configinfo_struct[:alias]][0] == ?-
- conf[__configinfo_struct[:alias]] =
- conf[__configinfo_struct[:alias]][1..-1]
- end
- { conf[0] => conf[1] }
- else
- { conf.shift => conf }
- end
- else
- if slot
- slot = slot.to_s
-
- alias_name, real_name = __optkey_aliases.find{|k,var| k.to_s == slot}
- if real_name
- slot = real_name.to_s
- end
-
- case slot
- when /^(#{__val2ruby_optkeys().keys.join('|')})$/
- method = _symbolkey2str(__val2ruby_optkeys())[slot]
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- optval = conf[__configinfo_struct[:default_value]]
- begin
- val = method.call(optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__configinfo_struct[:default_value]] = val
- end
- if ( conf[__configinfo_struct[:current_value]] )
- optval = conf[__configinfo_struct[:current_value]]
- begin
- val = method.call(optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__configinfo_struct[:current_value]] = val
- end
-
- when /^(#{__methodcall_optkeys.keys.join('|')})$/
- method = _symbolkey2str(__methodcall_optkeys)[slot]
- return {slot => ['', '', '', self.__send__(method)]}
-
- when /^(#{__numval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- begin
- conf[__configinfo_struct[:default_value]] =
- number(conf[__configinfo_struct[:default_value]])
- rescue
- conf[__configinfo_struct[:default_value]] = nil
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- begin
- conf[__configinfo_struct[:current_value]] =
- number(conf[__configinfo_struct[:current_value]])
- rescue
- conf[__configinfo_struct[:current_value]] = nil
- end
- end
-
- when /^(#{__numstrval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- conf[__configinfo_struct[:default_value]] =
- num_or_str(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] )
- conf[__configinfo_struct[:current_value]] =
- num_or_str(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__boolval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- begin
- conf[__configinfo_struct[:default_value]] =
- bool(conf[__configinfo_struct[:default_value]])
- rescue
- conf[__configinfo_struct[:default_value]] = nil
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- begin
- conf[__configinfo_struct[:current_value]] =
- bool(conf[__configinfo_struct[:current_value]])
- rescue
- conf[__configinfo_struct[:current_value]] = nil
- end
- end
-
- when /^(#{__listval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- conf[__configinfo_struct[:default_value]] =
- simplelist(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] )
- conf[__configinfo_struct[:current_value]] =
- simplelist(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__numlistval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] \
- && conf[__configinfo_struct[:default_value]] =~ /^[0-9]/ )
- conf[__configinfo_struct[:default_value]] =
- list(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] \
- && conf[__configinfo_struct[:current_value]] =~ /^[0-9]/ )
- conf[__configinfo_struct[:current_value]] =
- list(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__tkvariable_optkeys.join('|')})$/
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
-
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- v = conf[__configinfo_struct[:default_value]]
- if v.empty?
- conf[__configinfo_struct[:default_value]] = nil
- else
- conf[__configinfo_struct[:default_value]] = TkVarAccess.new(v)
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- v = conf[__configinfo_struct[:current_value]]
- if v.empty?
- conf[__configinfo_struct[:current_value]] = nil
- else
- conf[__configinfo_struct[:current_value]] = TkVarAccess.new(v)
- end
- end
-
- when /^(#{__strval_optkeys.join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
- else
- # conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
- conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), 0, false, true)
- end
- conf[__configinfo_struct[:key]] =
- conf[__configinfo_struct[:key]][1..-1]
-
- if ( __configinfo_struct[:alias] \
- && conf.size == __configinfo_struct[:alias] + 1 )
- if conf[__configinfo_struct[:alias]][0] == ?-
- conf[__configinfo_struct[:alias]] =
- conf[__configinfo_struct[:alias]][1..-1]
- end
- { conf[0] => conf[1] }
- else
- { conf.shift => conf }
- end
-
- else
- ret = {}
- # tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).each{|conflist|
- # conf = tk_split_simplelist(conflist)
- tk_split_simplelist(tk_call_without_enc(*__confinfo_cmd), false, false).each{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- conf[__configinfo_struct[:key]] =
- conf[__configinfo_struct[:key]][1..-1]
-
- optkey = conf[__configinfo_struct[:key]]
- case optkey
- when /^(#{__val2ruby_optkeys().keys.join('|')})$/
- method = _symbolkey2str(__val2ruby_optkeys())[optkey]
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- optval = conf[__configinfo_struct[:default_value]]
- begin
- val = method.call(optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__configinfo_struct[:default_value]] = val
- end
- if ( conf[__configinfo_struct[:current_value]] )
- optval = conf[__configinfo_struct[:current_value]]
- begin
- val = method.call(optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__configinfo_struct[:current_value]] = val
- end
-
- when /^(#{__strval_optkeys.join('|')})$/
- # do nothing
-
- when /^(#{__numval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- begin
- conf[__configinfo_struct[:default_value]] =
- number(conf[__configinfo_struct[:default_value]])
- rescue
- conf[__configinfo_struct[:default_value]] = nil
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- begin
- conf[__configinfo_struct[:current_value]] =
- number(conf[__configinfo_struct[:current_value]])
- rescue
- conf[__configinfo_struct[:current_value]] = nil
- end
- end
-
- when /^(#{__numstrval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- conf[__configinfo_struct[:default_value]] =
- num_or_str(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] )
- conf[__configinfo_struct[:current_value]] =
- num_or_str(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__boolval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- begin
- conf[__configinfo_struct[:default_value]] =
- bool(conf[__configinfo_struct[:default_value]])
- rescue
- conf[__configinfo_struct[:default_value]] = nil
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- begin
- conf[__configinfo_struct[:current_value]] =
- bool(conf[__configinfo_struct[:current_value]])
- rescue
- conf[__configinfo_struct[:current_value]] = nil
- end
- end
-
- when /^(#{__listval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- conf[__configinfo_struct[:default_value]] =
- simplelist(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] )
- conf[__configinfo_struct[:current_value]] =
- simplelist(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__numlistval_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] \
- && conf[__configinfo_struct[:default_value]] =~ /^[0-9]/ )
- conf[__configinfo_struct[:default_value]] =
- list(conf[__configinfo_struct[:default_value]])
- end
- if ( conf[__configinfo_struct[:current_value]] \
- && conf[__configinfo_struct[:current_value]] =~ /^[0-9]/ )
- conf[__configinfo_struct[:current_value]] =
- list(conf[__configinfo_struct[:current_value]])
- end
-
- when /^(#{__tkvariable_optkeys.join('|')})$/
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- v = conf[__configinfo_struct[:default_value]]
- if v.empty?
- conf[__configinfo_struct[:default_value]] = nil
- else
- conf[__configinfo_struct[:default_value]] = TkVarAccess.new
- end
- end
- if ( conf[__configinfo_struct[:current_value]] )
- v = conf[__configinfo_struct[:current_value]]
- if v.empty?
- conf[__configinfo_struct[:current_value]] = nil
- else
- conf[__configinfo_struct[:current_value]] = TkVarAccess.new
- end
- end
-
- else
- if ( __configinfo_struct[:default_value] \
- && conf[__configinfo_struct[:default_value]] )
- if conf[__configinfo_struct[:default_value]].index('{')
- conf[__configinfo_struct[:default_value]] =
- tk_split_list(conf[__configinfo_struct[:default_value]])
- else
- conf[__configinfo_struct[:default_value]] =
- tk_tcl2ruby(conf[__configinfo_struct[:default_value]])
- end
- end
- if conf[__configinfo_struct[:current_value]]
- if conf[__configinfo_struct[:current_value]].index('{')
- conf[__configinfo_struct[:current_value]] =
- tk_split_list(conf[__configinfo_struct[:current_value]])
- else
- conf[__configinfo_struct[:current_value]] =
- tk_tcl2ruby(conf[__configinfo_struct[:current_value]])
- end
- end
- end
-
- if ( __configinfo_struct[:alias] \
- && conf.size == __configinfo_struct[:alias] + 1 )
- if conf[__configinfo_struct[:alias]][0] == ?-
- conf[__configinfo_struct[:alias]] =
- conf[__configinfo_struct[:alias]][1..-1]
- end
- ret[conf[0]] = conf[1]
- else
- ret[conf.shift] = conf
- end
- }
-
- __font_optkeys.each{|optkey|
- optkey = optkey.to_s
- fontconf = ret[optkey]
- if fontconf.kind_of?(Array)
- ret.delete(optkey)
- ret.delete('latin' << optkey)
- ret.delete('ascii' << optkey)
- ret.delete('kanji' << optkey)
- fnt = fontconf[__configinfo_struct[:default_value]]
- if TkFont.is_system_font?(fnt)
- fontconf[__configinfo_struct[:default_value]] \
- = TkNamedFont.new(fnt)
- end
- fontconf[__configinfo_struct[:current_value]] = fontobj(optkey)
- ret[optkey] = fontconf
- end
- }
-
- __methodcall_optkeys.each{|optkey, m|
- ret[optkey.to_s] = ['', '', '', self.__send__(m)]
- }
-
- ret
- end
- end
- end
- end
- private :__configinfo_core
-
- def configinfo(slot = nil)
- if slot && TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- begin
- __configinfo_core(slot)
- rescue
- Array.new(__configinfo_struct.values.max).unshift(slot.to_s)
- end
- else
- __configinfo_core(slot)
- end
- end
-
- def current_configinfo(slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- org_slot = slot
- begin
- conf = configinfo(slot)
- if ( ! __configinfo_struct[:alias] \
- || conf.size > __configinfo_struct[:alias] + 1 )
- return {conf[0] => conf[-1]}
- end
- slot = conf[__configinfo_struct[:alias]]
- end while(org_slot != slot)
- fail RuntimeError,
- "there is a configure alias loop about '#{org_slot}'"
- else
- ret = {}
- configinfo().each{|cnf|
- if ( ! __configinfo_struct[:alias] \
- || cnf.size > __configinfo_struct[:alias] + 1 )
- ret[cnf[0]] = cnf[-1]
- end
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- configinfo(slot).each{|key, cnf|
- ret[key] = cnf[-1] if cnf.kind_of?(Array)
- }
- ret
- end
- end
-end
-
-class TkObject<TkKernel
- extend TkCore
- include Tk
- include TkConfigMethod
- include TkBindCore
-
-### --> definition is moved to TkUtil module
-# def path
-# @path
-# end
-
- def epath
- @path
- end
-
- def to_eval
- @path
- end
-
- def tk_send(cmd, *rest)
- tk_call(path, cmd, *rest)
- end
- def tk_send_without_enc(cmd, *rest)
- tk_call_without_enc(path, cmd, *rest)
- end
- def tk_send_with_enc(cmd, *rest)
- tk_call_with_enc(path, cmd, *rest)
- end
- # private :tk_send, :tk_send_without_enc, :tk_send_with_enc
-
- def tk_send_to_list(cmd, *rest)
- tk_call_to_list(path, cmd, *rest)
- end
- def tk_send_to_list_without_enc(cmd, *rest)
- tk_call_to_list_without_enc(path, cmd, *rest)
- end
- def tk_send_to_list_with_enc(cmd, *rest)
- tk_call_to_list_with_enc(path, cmd, *rest)
- end
- def tk_send_to_simplelist(cmd, *rest)
- tk_call_to_simplelist(path, cmd, *rest)
- end
- def tk_send_to_simplelist_without_enc(cmd, *rest)
- tk_call_to_simplelist_without_enc(path, cmd, *rest)
- end
- def tk_send_to_simplelist_with_enc(cmd, *rest)
- tk_call_to_simplelist_with_enc(path, cmd, *rest)
- end
-
- def method_missing(id, *args)
- name = id.id2name
- case args.length
- when 1
- if name[-1] == ?=
- configure name[0..-2], args[0]
- args[0]
- else
- configure name, args[0]
- self
- end
- when 0
- begin
- cget(name)
- rescue
- if self.kind_of?(TkWindow) && name != "to_ary" && name != "to_str"
- fail NameError,
- "unknown option '#{id}' for #{self.inspect} (deleted widget?)"
- else
- super(id, *args)
- end
-# fail NameError,
-# "undefined local variable or method `#{name}' for #{self.to_s}",
-# error_at
- end
- else
- super(id, *args)
-# fail NameError, "undefined method `#{name}' for #{self.to_s}", error_at
- end
- end
-
-=begin
- def [](id)
- cget(id)
- end
-
- def []=(id, val)
- configure(id, val)
- val
- end
-=end
-
- def event_generate(context, keys=nil)
- if context.kind_of?(TkEvent::Event)
- context.generate(self, ((keys)? keys: {}))
- elsif keys
- #tk_call('event', 'generate', path,
- # "<#{tk_event_sequence(context)}>", *hash_kv(keys))
- tk_call_without_enc('event', 'generate', path,
- "<#{tk_event_sequence(context)}>",
- *hash_kv(keys, true))
- else
- #tk_call('event', 'generate', path, "<#{tk_event_sequence(context)}>")
- tk_call_without_enc('event', 'generate', path,
- "<#{tk_event_sequence(context)}>")
- end
- end
-
- def tk_trace_variable(v)
- #unless v.kind_of?(TkVariable)
- # fail(ArgumentError, "type error (#{v.class}); must be TkVariable object")
- #end
- v
- end
- private :tk_trace_variable
-
- def destroy
- #tk_call 'trace', 'vdelete', @tk_vn, 'w', @var_id if @var_id
- end
-end
-
-
-class TkWindow<TkObject
- include TkWinfo
- extend TkBindCore
- include Tk::Wm_for_General
- include Tk::Busy
-
- @@WIDGET_INSPECT_FULL = false
- def TkWindow._widget_inspect_full_?
- @@WIDGET_INSPECT_FULL
- end
- def TkWindow._widget_inspect_full_=(mode)
- @@WIDGET_INSPECT_FULL = (mode && true) || false
- end
-
- TkCommandNames = [].freeze
- ## ==> If TkCommandNames[0] is a string (not a null string),
- ## assume the string is a Tcl/Tk's create command of the widget class.
- WidgetClassName = ''.freeze
- # WidgetClassNames[WidgetClassName] = self
- ## ==> If self is a widget class, entry to the WidgetClassNames table.
- def self.to_eval
- self::WidgetClassName
- end
-
- def initialize(parent=nil, keys=nil)
- if parent.kind_of? Hash
- keys = _symbolkey2str(parent)
- parent = keys.delete('parent')
- widgetname = keys.delete('widgetname')
- install_win(if parent then parent.path end, widgetname)
- without_creating = keys.delete('without_creating')
- # if without_creating && !widgetname
- # fail ArgumentError,
- # "if set 'without_creating' to true, need to define 'widgetname'"
- # end
- elsif keys
- keys = _symbolkey2str(keys)
- widgetname = keys.delete('widgetname')
- install_win(if parent then parent.path end, widgetname)
- without_creating = keys.delete('without_creating')
- # if without_creating && !widgetname
- # fail ArgumentError,
- # "if set 'without_creating' to true, need to define 'widgetname'"
- # end
- else
- install_win(if parent then parent.path end)
- end
- if self.method(:create_self).arity == 0
- p 'create_self has no arg' if $DEBUG
- create_self unless without_creating
- if keys
- # tk_call @path, 'configure', *hash_kv(keys)
- configure(keys)
- end
- else
- p 'create_self has args' if $DEBUG
- fontkeys = {}
- methodkeys = {}
- if keys
- #['font', 'kanjifont', 'latinfont', 'asciifont'].each{|key|
- # fontkeys[key] = keys.delete(key) if keys.key?(key)
- #}
- __font_optkeys.each{|key|
- fkey = key.to_s
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
-
- fkey = "kanji#{key}"
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
-
- fkey = "latin#{key}"
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
-
- fkey = "ascii#{key}"
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
- }
-
- __optkey_aliases.each{|alias_name, real_name|
- alias_name = alias_name.to_s
- if keys.has_key?(alias_name)
- keys[real_name.to_s] = keys.delete(alias_name)
- end
- }
-
- __methodcall_optkeys.each{|key|
- key = key.to_s
- methodkeys[key] = keys.delete(key) if keys.key?(key)
- }
-
- __ruby2val_optkeys.each{|key, method|
- key = key.to_s
- keys[key] = method.call(keys[key]) if keys.has_key?(key)
- }
- end
- if without_creating && keys
- #configure(keys)
- configure(__conv_keyonly_opts(keys))
- else
- #create_self(keys)
- create_self(__conv_keyonly_opts(keys))
- end
- font_configure(fontkeys) unless fontkeys.empty?
- configure(methodkeys) unless methodkeys.empty?
- end
- end
-
- def create_self(keys)
- # may need to override
- begin
- cmd = self.class::TkCommandNames[0]
- fail unless (cmd.kind_of?(String) && cmd.length > 0)
- rescue
- fail RuntimeError, "class #{self.class} may be an abstract class"
- end
-
- if keys and keys != None
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- tk_call_without_enc(cmd, @path, *hash_kv(keys, true))
- else
- begin
- tk_call_without_enc(cmd, @path, *hash_kv(keys, true))
- rescue => e
- tk_call_without_enc(cmd, @path)
- keys = __check_available_configure_options(keys)
- unless keys.empty?
- begin
- # try to configure
- configure(keys)
- rescue
- # fail => includes options adaptable when creation only?
- begin
- tk_call_without_enc('destroy', @path)
- rescue
- # cannot rescue options error
- fail e
- else
- # re-create widget
- tk_call_without_enc(cmd, @path, *hash_kv(keys, true))
- end
- end
- end
- end
- end
- else
- tk_call_without_enc(cmd, @path)
- end
- end
- private :create_self
-
- def inspect
- if @@WIDGET_INSPECT_FULL
- super
- else
- str = super
- str[0..(str.index(' '))] << '@path=' << @path.inspect << '>'
- end
- end
-
- def exist?
- TkWinfo.exist?(self)
- end
-
- alias subcommand tk_send
-
- def bind_class
- @db_class || self.class()
- end
-
- def database_classname
- TkWinfo.classname(self)
- end
- def database_class
- name = database_classname()
- if WidgetClassNames[name]
- WidgetClassNames[name]
- else
- TkDatabaseClass.new(name)
- end
- end
- def self.database_classname
- self::WidgetClassName
- end
- def self.database_class
- WidgetClassNames[self::WidgetClassName]
- end
-
- def pack(keys = nil)
- #tk_call_without_enc('pack', epath, *hash_kv(keys, true))
- if keys
- TkPack.configure(self, keys)
- else
- TkPack.configure(self)
- end
- self
- end
-
- def pack_in(target, keys = nil)
- if keys
- keys = keys.dup
- keys['in'] = target
- else
- keys = {'in'=>target}
- end
- #tk_call 'pack', epath, *hash_kv(keys)
- TkPack.configure(self, keys)
- self
- end
-
- def pack_forget
- #tk_call_without_enc('pack', 'forget', epath)
- TkPack.forget(self)
- self
- end
- alias unpack pack_forget
-
- def pack_config(slot, value=None)
- #if slot.kind_of? Hash
- # tk_call 'pack', 'configure', epath, *hash_kv(slot)
- #else
- # tk_call 'pack', 'configure', epath, "-#{slot}", value
- #end
- if slot.kind_of? Hash
- TkPack.configure(self, slot)
- else
- TkPack.configure(self, slot=>value)
- end
- end
- alias pack_configure pack_config
-
- def pack_info()
- #ilist = list(tk_call('pack', 'info', epath))
- #info = {}
- #while key = ilist.shift
- # info[key[1..-1]] = ilist.shift
- #end
- #return info
- TkPack.info(self)
- end
-
- def pack_propagate(mode=None)
- #if mode == None
- # bool(tk_call('pack', 'propagate', epath))
- #else
- # tk_call('pack', 'propagate', epath, mode)
- # self
- #end
- if mode == None
- TkPack.propagate(self)
- else
- TkPack.propagate(self, mode)
- self
- end
- end
-
- def pack_slaves()
- #list(tk_call('pack', 'slaves', epath))
- TkPack.slaves(self)
- end
-
- def grid(keys = nil)
- #tk_call 'grid', epath, *hash_kv(keys)
- if keys
- TkGrid.configure(self, keys)
- else
- TkGrid.configure(self)
- end
- self
- end
-
- def grid_in(target, keys = nil)
- if keys
- keys = keys.dup
- keys['in'] = target
- else
- keys = {'in'=>target}
- end
- #tk_call 'grid', epath, *hash_kv(keys)
- TkGrid.configure(self, keys)
- self
- end
-
- def grid_anchor(anchor=None)
- if anchor == None
- TkGrid.anchor(self)
- else
- TkGrid.anchor(self, anchor)
- self
- end
- end
-
- def grid_forget
- #tk_call('grid', 'forget', epath)
- TkGrid.forget(self)
- self
- end
- alias ungrid grid_forget
-
- def grid_bbox(*args)
- #list(tk_call('grid', 'bbox', epath, *args))
- TkGrid.bbox(self, *args)
- end
-
- def grid_config(slot, value=None)
- #if slot.kind_of? Hash
- # tk_call 'grid', 'configure', epath, *hash_kv(slot)
- #else
- # tk_call 'grid', 'configure', epath, "-#{slot}", value
- #end
- if slot.kind_of? Hash
- TkGrid.configure(self, slot)
- else
- TkGrid.configure(self, slot=>value)
- end
- end
- alias grid_configure grid_config
-
- def grid_columnconfig(index, keys)
- #tk_call('grid', 'columnconfigure', epath, index, *hash_kv(keys))
- TkGrid.columnconfigure(self, index, keys)
- end
- alias grid_columnconfigure grid_columnconfig
-
- def grid_rowconfig(index, keys)
- #tk_call('grid', 'rowconfigure', epath, index, *hash_kv(keys))
- TkGrid.rowconfigure(self, index, keys)
- end
- alias grid_rowconfigure grid_rowconfig
-
- def grid_columnconfiginfo(index, slot=nil)
- #if slot
- # tk_call('grid', 'columnconfigure', epath, index, "-#{slot}").to_i
- #else
- # ilist = list(tk_call('grid', 'columnconfigure', epath, index))
- # info = {}
- # while key = ilist.shift
- # info[key[1..-1]] = ilist.shift
- # end
- # info
- #end
- TkGrid.columnconfiginfo(self, index, slot)
- end
-
- def grid_rowconfiginfo(index, slot=nil)
- #if slot
- # tk_call('grid', 'rowconfigure', epath, index, "-#{slot}").to_i
- #else
- # ilist = list(tk_call('grid', 'rowconfigure', epath, index))
- # info = {}
- # while key = ilist.shift
- # info[key[1..-1]] = ilist.shift
- # end
- # info
- #end
- TkGrid.rowconfiginfo(self, index, slot)
- end
-
- def grid_column(index, keys=nil)
- if keys.kind_of?(Hash)
- grid_columnconfigure(index, keys)
- else
- grid_columnconfiginfo(index, keys)
- end
- end
-
- def grid_row(index, keys=nil)
- if keys.kind_of?(Hash)
- grid_rowconfigure(index, keys)
- else
- grid_rowconfiginfo(index, keys)
- end
- end
-
- def grid_info()
- #list(tk_call('grid', 'info', epath))
- TkGrid.info(self)
- end
-
- def grid_location(x, y)
- #list(tk_call('grid', 'location', epath, x, y))
- TkGrid.location(self, x, y)
- end
-
- def grid_propagate(mode=None)
- #if mode == None
- # bool(tk_call('grid', 'propagate', epath))
- #else
- # tk_call('grid', 'propagate', epath, mode)
- # self
- #end
- if mode == None
- TkGrid.propagate(self)
- else
- TkGrid.propagate(self, mode)
- self
- end
- end
-
- def grid_remove()
- #tk_call 'grid', 'remove', epath
- TkGrid.remove(self)
- self
- end
-
- def grid_size()
- #list(tk_call('grid', 'size', epath))
- TkGrid.size(self)
- end
-
- def grid_slaves(keys = nil)
- #list(tk_call('grid', 'slaves', epath, *hash_kv(args)))
- TkGrid.slaves(self, keys)
- end
-
- def place(keys)
- #tk_call 'place', epath, *hash_kv(keys)
- TkPlace.configure(self, keys)
- self
- end
-
- def place_in(target, keys = nil)
- if keys
- keys = keys.dup
- keys['in'] = target
- else
- keys = {'in'=>target}
- end
- #tk_call 'place', epath, *hash_kv(keys)
- TkPlace.configure(self, keys)
- self
- end
-
- def place_forget
- #tk_call 'place', 'forget', epath
- TkPlace.forget(self)
- self
- end
- alias unplace place_forget
-
- def place_config(slot, value=None)
- #if slot.kind_of? Hash
- # tk_call 'place', 'configure', epath, *hash_kv(slot)
- #else
- # tk_call 'place', 'configure', epath, "-#{slot}", value
- #end
- TkPlace.configure(self, slot, value)
- end
- alias place_configure place_config
-
- def place_configinfo(slot = nil)
- # for >= Tk8.4a2 ?
- #if slot
- # conf = tk_split_list(tk_call('place', 'configure', epath, "-#{slot}") )
- # conf[0] = conf[0][1..-1]
- # conf
- #else
- # tk_split_simplelist(tk_call('place',
- # 'configure', epath)).collect{|conflist|
- # conf = tk_split_simplelist(conflist)
- # conf[0] = conf[0][1..-1]
- # conf
- # }
- #end
- TkPlace.configinfo(self, slot)
- end
-
- def place_info()
- #ilist = list(tk_call('place', 'info', epath))
- #info = {}
- #while key = ilist.shift
- # info[key[1..-1]] = ilist.shift
- #end
- #return info
- TkPlace.info(self)
- end
-
- def place_slaves()
- #list(tk_call('place', 'slaves', epath))
- TkPlace.slaves(self)
- end
-
- def set_focus(force=false)
- if force
- tk_call_without_enc('focus', '-force', path)
- else
- tk_call_without_enc('focus', path)
- end
- self
- end
- alias focus set_focus
-
- def grab(opt = nil)
- unless opt
- tk_call_without_enc('grab', 'set', path)
- return self
- end
-
- case opt
- when 'set', :set
- tk_call_without_enc('grab', 'set', path)
- return self
- when 'global', :global
- #return(tk_call('grab', 'set', '-global', path))
- tk_call_without_enc('grab', 'set', '-global', path)
- return self
- when 'release', :release
- #return tk_call('grab', 'release', path)
- tk_call_without_enc('grab', 'release', path)
- return self
- when 'current', :current
- return window(tk_call_without_enc('grab', 'current', path))
- when 'status', :status
- return tk_call_without_enc('grab', 'status', path)
- else
- return tk_call_without_enc('grab', opt, path)
- end
- end
-
- def grab_current
- grab('current')
- end
- alias current_grab grab_current
- def grab_release
- grab('release')
- end
- alias release_grab grab_release
- def grab_set
- grab('set')
- end
- alias set_grab grab_set
- def grab_set_global
- grab('global')
- end
- alias set_global_grab grab_set_global
- def grab_status
- grab('status')
- end
-
- def lower(below=None)
- # below = below.epath if below.kind_of?(TkObject)
- below = _epath(below)
- tk_call 'lower', epath, below
- self
- end
- alias lower_window lower
- def raise(above=None)
- #above = above.epath if above.kind_of?(TkObject)
- above = _epath(above)
- tk_call 'raise', epath, above
- self
- end
- alias raise_window raise
-
- def command(cmd=nil, &b)
- if cmd
- configure_cmd('command', cmd)
- elsif b
- configure_cmd('command', Proc.new(&b))
- else
- cget('command')
- end
- end
-
- def colormodel(model=None)
- tk_call('tk', 'colormodel', path, model)
- self
- end
-
- def caret(keys=nil)
- TkXIM.caret(path, keys)
- end
-
- def destroy
- super
- children = []
- rexp = /^#{self.path}\.[^.]+$/
- TkCore::INTERP.tk_windows.each{|path, obj|
- children << [path, obj] if path =~ rexp
- }
- if defined?(@cmdtbl)
- for id in @cmdtbl
- uninstall_cmd id
- end
- end
-
- children.each{|path, obj|
- obj.instance_eval{
- if defined?(@cmdtbl)
- for id in @cmdtbl
- uninstall_cmd id
- end
- end
- }
- TkCore::INTERP.tk_windows.delete(path)
- }
-
- begin
- tk_call_without_enc('destroy', epath)
- rescue
- end
- uninstall_win
- end
-
- def wait_visibility(on_thread = true)
- on_thread &= (Thread.list.size != 1)
- if on_thread
- INTERP._thread_tkwait('visibility', path)
- else
- INTERP._invoke('tkwait', 'visibility', path)
- end
- end
- def eventloop_wait_visibility
- wait_visibility(false)
- end
- def thread_wait_visibility
- wait_visibility(true)
- end
- alias wait wait_visibility
- alias tkwait wait_visibility
- alias eventloop_wait eventloop_wait_visibility
- alias eventloop_tkwait eventloop_wait_visibility
- alias eventloop_tkwait_visibility eventloop_wait_visibility
- alias thread_wait thread_wait_visibility
- alias thread_tkwait thread_wait_visibility
- alias thread_tkwait_visibility thread_wait_visibility
-
- def wait_destroy(on_thread = true)
- on_thread &= (Thread.list.size != 1)
- if on_thread
- INTERP._thread_tkwait('window', epath)
- else
- INTERP._invoke('tkwait', 'window', epath)
- end
- end
- alias wait_window wait_destroy
- def eventloop_wait_destroy
- wait_destroy(false)
- end
- alias eventloop_wait_window eventloop_wait_destroy
- def thread_wait_destroy
- wait_destroy(true)
- end
- alias thread_wait_window thread_wait_destroy
-
- alias tkwait_destroy wait_destroy
- alias tkwait_window wait_destroy
-
- alias eventloop_tkwait_destroy eventloop_wait_destroy
- alias eventloop_tkwait_window eventloop_wait_destroy
-
- alias thread_tkwait_destroy thread_wait_destroy
- alias thread_tkwait_window thread_wait_destroy
-
- def bindtags(taglist=nil)
- if taglist
- fail ArgumentError, "taglist must be Array" unless taglist.kind_of? Array
- tk_call('bindtags', path, taglist)
- taglist
- else
- list(tk_call('bindtags', path)).collect{|tag|
- if tag.kind_of?(String)
- if cls = WidgetClassNames[tag]
- cls
- elsif btag = TkBindTag.id2obj(tag)
- btag
- else
- tag
- end
- else
- tag
- end
- }
- end
- end
-
- def bindtags=(taglist)
- bindtags(taglist)
- taglist
- end
-
- def bindtags_shift
- taglist = bindtags
- tag = taglist.shift
- bindtags(taglist)
- tag
- end
-
- def bindtags_unshift(tag)
- bindtags(bindtags().unshift(tag))
- end
-end
-TkWidget = TkWindow
-
-# freeze core modules
-#TclTkLib.freeze
-#TclTkIp.freeze
-#TkUtil.freeze
-#TkKernel.freeze
-#TkComm.freeze
-#TkComm::Event.freeze
-#TkCore.freeze
-#Tk.freeze
-
-module Tk
- RELEASE_DATE = '2014-10-19'.freeze
-
- autoload :AUTO_PATH, 'tk/variable'
- autoload :TCL_PACKAGE_PATH, 'tk/variable'
- autoload :PACKAGE_PATH, 'tk/variable'
- autoload :TCL_LIBRARY_PATH, 'tk/variable'
- autoload :LIBRARY_PATH, 'tk/variable'
- autoload :TCL_PRECISION, 'tk/variable'
-end
-
-# call setup script for Tk extension libraries (base configuration)
-begin
- require 'tkextlib/version.rb'
- require 'tkextlib/setup.rb'
-rescue LoadError
- # ignore
-end
diff --git a/ext/tk/lib/tk/after.rb b/ext/tk/lib/tk/after.rb
deleted file mode 100644
index 3213a6b818..0000000000
--- a/ext/tk/lib/tk/after.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/after.rb : methods for Tcl/Tk after command
-#
-# $Id$
-#
-require 'tk/timer'
diff --git a/ext/tk/lib/tk/autoload.rb b/ext/tk/lib/tk/autoload.rb
deleted file mode 100644
index ef82c8944c..0000000000
--- a/ext/tk/lib/tk/autoload.rb
+++ /dev/null
@@ -1,763 +0,0 @@
-# frozen_string_literal: false
-#
-# autoload
-#
-############################################
-# geometry manager
-module Tk
- autoload :Grid, 'tk/grid'
- def Grid(*args); TkGrid.configure(*args); end
-
- autoload :Pack, 'tk/pack'
- def Pack(*args); TkPack.configure(*args); end
-
- autoload :Place, 'tk/place'
- def Place(*args); TkPlace.configure(*args); end
-end
-
-autoload :TkGrid, 'tk/grid'
-def TkGrid(*args); TkGrid.configure(*args); end
-
-autoload :TkPack, 'tk/pack'
-def TkPack(*args); TkPack.configure(*args); end
-
-autoload :TkPlace, 'tk/place'
-def TkPlace(*args); TkPlace.configure(*args); end
-
-
-############################################
-# classes on Tk module
-module Tk
- autoload :Busy, 'tk/busy'
-
- autoload :Button, 'tk/button'
-
- autoload :Canvas, 'tk/canvas'
-
- autoload :CheckButton, 'tk/checkbutton'
- autoload :Checkbutton, 'tk/checkbutton'
-
- autoload :Entry, 'tk/entry'
-
- autoload :Frame, 'tk/frame'
-
- autoload :Label, 'tk/label'
-
- autoload :LabelFrame, 'tk/labelframe'
- autoload :Labelframe, 'tk/labelframe'
-
- autoload :Listbox, 'tk/listbox'
-
- autoload :Menu, 'tk/menu'
- autoload :MenuClone, 'tk/menu'
- autoload :CloneMenu, 'tk/menu'
- autoload :SystemMenu, 'tk/menu'
- autoload :SysMenu_Help, 'tk/menu'
- autoload :SysMenu_System, 'tk/menu'
- autoload :SysMenu_Apple, 'tk/menu'
- autoload :Menubutton, 'tk/menu'
- autoload :MenuButton, 'tk/menu'
- autoload :OptionMenubutton, 'tk/menu'
- autoload :OptionMenBbutton, 'tk/menu'
-
- autoload :Message, 'tk/message'
-
- autoload :PanedWindow, 'tk/panedwindow'
- autoload :Panedwindow, 'tk/panedwindow'
-
- autoload :RadioButton, 'tk/radiobutton'
- autoload :Radiobutton, 'tk/radiobutton'
-
- autoload :Root, 'tk/root'
-
- autoload :Scale, 'tk/scale'
-
- autoload :Scrollbar, 'tk/scrollbar'
- autoload :XScrollbar, 'tk/scrollbar'
- autoload :YScrollbar, 'tk/scrollbar'
-
- autoload :Spinbox, 'tk/spinbox'
-
- autoload :Text, 'tk/text'
-
- autoload :Toplevel, 'tk/toplevel'
-end
-
-
-############################################
-# sub-module of Tk
-module Tk
- autoload :Clock, 'tk/clock'
-
- autoload :OptionObj, 'tk/optionobj'
-
- autoload :X_Scrollable, 'tk/scrollable'
- autoload :Y_Scrollable, 'tk/scrollable'
- autoload :Scrollable, 'tk/scrollable'
-
- autoload :Fontchooser, 'tk/fontchooser'
-
- autoload :Wm, 'tk/wm'
- autoload :Wm_for_General, 'tk/wm'
-
- autoload :MacResource, 'tk/macpkg'
-
- autoload :WinDDE, 'tk/winpkg'
- autoload :WinRegistry, 'tk/winpkg'
-
- autoload :ValidateConfigure, 'tk/validation'
- autoload :ItemValidateConfigure, 'tk/validation'
-
- autoload :EncodedString, 'tk/encodedstr'
- def Tk.EncodedString(str, enc = nil); Tk::EncodedString.new(str, enc); end
-
- autoload :BinaryString, 'tk/encodedstr'
- def Tk.BinaryString(str); Tk::BinaryString.new(str); end
-
- autoload :UTF8_String, 'tk/encodedstr'
- def Tk.UTF8_String(str); Tk::UTF8_String.new(str); end
-
-end
-
-
-############################################
-# toplevel classes/modules (fixed)
-autoload :TkBgError, 'tk/bgerror'
-
-autoload :TkBindTag, 'tk/bindtag'
-autoload :TkBindTagAll, 'tk/bindtag'
-autoload :TkDatabaseClass, 'tk/bindtag'
-
-autoload :TkConsole, 'tk/console'
-
-autoload :TkcItem, 'tk/canvas'
-autoload :TkcArc, 'tk/canvas'
-autoload :TkcBitmap, 'tk/canvas'
-autoload :TkcImage, 'tk/canvas'
-autoload :TkcLine, 'tk/canvas'
-autoload :TkcOval, 'tk/canvas'
-autoload :TkcPolygon, 'tk/canvas'
-autoload :TkcRectangle, 'tk/canvas'
-autoload :TkcText, 'tk/canvas'
-autoload :TkcWindow, 'tk/canvas'
-
-autoload :TkcTagAccess, 'tk/canvastag'
-autoload :TkcTag, 'tk/canvastag'
-autoload :TkcTagString, 'tk/canvastag'
-autoload :TkcNamedTag, 'tk/canvastag'
-autoload :TkcTagAll, 'tk/canvastag'
-autoload :TkcTagCurrent, 'tk/canvastag'
-autoload :TkcTagGroup, 'tk/canvastag'
-
-autoload :TkClipboard, 'tk/clipboard'
-
-autoload :TkComposite, 'tk/composite'
-
-autoload :TkConsole, 'tk/console'
-
-autoload :TkDialog, 'tk/dialog'
-autoload :TkDialog2, 'tk/dialog'
-autoload :TkDialogObj, 'tk/dialog'
-autoload :TkWarning, 'tk/dialog'
-autoload :TkWarning2, 'tk/dialog'
-autoload :TkWarningObj, 'tk/dialog'
-
-autoload :TkEvent, 'tk/event'
-
-autoload :TkFont, 'tk/font'
-autoload :TkNamedFont, 'tk/font'
-
-autoload :TkImage, 'tk/image'
-autoload :TkBitmapImage, 'tk/image'
-autoload :TkPhotoImage, 'tk/image'
-
-autoload :TkItemConfigMethod, 'tk/itemconfig'
-
-autoload :TkTreatItemFont, 'tk/itemfont'
-
-autoload :TkKinput, 'tk/kinput'
-
-autoload :TkSystemMenu, 'tk/menu'
-
-autoload :TkMenubar, 'tk/menubar'
-
-autoload :TkMenuSpec, 'tk/menuspec'
-
-autoload :TkManageFocus, 'tk/mngfocus'
-
-autoload :TkMsgCatalog, 'tk/msgcat'
-autoload :TkMsgCat, 'tk/msgcat'
-
-autoload :TkNamespace, 'tk/namespace'
-
-autoload :TkOptionDB, 'tk/optiondb'
-autoload :TkOption, 'tk/optiondb'
-autoload :TkResourceDB, 'tk/optiondb'
-
-autoload :TkPackage, 'tk/package'
-
-autoload :TkPalette, 'tk/palette'
-
-autoload :TkRoot, 'tk/root'
-
-autoload :TkScrollbox, 'tk/scrollbox'
-
-autoload :TkSelection, 'tk/selection'
-
-autoload :TkTreatTagFont, 'tk/tagfont'
-
-autoload :TkTextImage, 'tk/textimage'
-autoload :TktImage, 'tk/textimage'
-
-autoload :TkTextMark, 'tk/textmark'
-autoload :TkTextNamedMark, 'tk/textmark'
-autoload :TkTextMarkInsert, 'tk/textmark'
-autoload :TkTextMarkCurrent, 'tk/textmark'
-autoload :TkTextMarkAnchor, 'tk/textmark'
-autoload :TktMark, 'tk/textmark'
-autoload :TktNamedMark, 'tk/textmark'
-autoload :TktMarkInsert, 'tk/textmark'
-autoload :TktMarkCurrent, 'tk/textmark'
-autoload :TktMarkAnchor, 'tk/textmark'
-
-autoload :TkTextTag, 'tk/texttag'
-autoload :TkTextNamedTag, 'tk/texttag'
-autoload :TkTextTagSel, 'tk/texttag'
-autoload :TktTag, 'tk/texttag'
-autoload :TktNamedTag, 'tk/texttag'
-autoload :TktTagSel, 'tk/texttag'
-
-autoload :TkTextWindow, 'tk/textwindow'
-autoload :TktWindow, 'tk/textwindow'
-
-autoload :TkAfter, 'tk/timer'
-autoload :TkTimer, 'tk/timer'
-autoload :TkRTTimer, 'tk/timer'
-
-autoload :TkTextWin, 'tk/txtwin_abst'
-
-autoload :TkValidation, 'tk/validation'
-autoload :TkValidateCommand, 'tk/validation'
-
-autoload :TkVariable, 'tk/variable'
-autoload :TkVarAccess, 'tk/variable'
-
-autoload :TkVirtualEvent, 'tk/virtevent'
-autoload :TkNamedVirtualEvent,'tk/virtevent'
-
-autoload :TkWinfo, 'tk/winfo'
-
-autoload :TkXIM, 'tk/xim'
-
-
-############################################
-# toplevel classes/modules (switchable)
-module Tk
- @TOPLEVEL_ALIAS_TABLE = {}
- @TOPLEVEL_ALIAS_TABLE[:Tk] = {
- :TkButton => 'tk/button',
-
- :TkCanvas => 'tk/canvas',
-
- :TkCheckButton => 'tk/checkbutton',
- :TkCheckbutton => 'tk/checkbutton',
-
- # :TkDialog => 'tk/dialog',
- # :TkDialog2 => 'tk/dialog',
- # :TkDialogObj => 'tk/dialog',
- # :TkWarning => 'tk/dialog',
- # :TkWarning2 => 'tk/dialog',
- # :TkWarningObj => 'tk/dialog',
-
- :TkEntry => 'tk/entry',
-
- :TkFrame => 'tk/frame',
-
- :TkLabel => 'tk/label',
-
- :TkLabelFrame => 'tk/labelframe',
- :TkLabelframe => 'tk/labelframe',
-
- :TkListbox => 'tk/listbox',
-
- :TkMacResource => 'tk/macpkg',
-
- :TkMenu => 'tk/menu',
- :TkMenuClone => 'tk/menu',
- :TkCloneMenu => 'tk/menu',
- # :TkSystemMenu => 'tk/menu',
- :TkSysMenu_Help => 'tk/menu',
- :TkSysMenu_System => 'tk/menu',
- :TkSysMenu_Apple => 'tk/menu',
- :TkMenubutton => 'tk/menu',
- :TkMenuButton => 'tk/menu',
- :TkOptionMenubutton => 'tk/menu',
- :TkOptionMenuButton => 'tk/menu',
-
- :TkMessage => 'tk/message',
-
- :TkPanedWindow => 'tk/panedwindow',
- :TkPanedwindow => 'tk/panedwindow',
-
- :TkRadioButton => 'tk/radiobutton',
- :TkRadiobutton => 'tk/radiobutton',
-
- # :TkRoot => 'tk/root',
-
- :TkScale => 'tk/scale',
-
- :TkScrollbar => 'tk/scrollbar',
- :TkXScrollbar => 'tk/scrollbar',
- :TkYScrollbar => 'tk/scrollbar',
-
- :TkSpinbox => 'tk/spinbox',
-
- :TkText => 'tk/text',
-
- :TkToplevel => 'tk/toplevel',
-
- :TkWinDDE => 'tk/winpkg',
- :TkWinRegistry => 'tk/winpkg',
- }
-
- @TOPLEVEL_ALIAS_OWNER = {}
-
- @TOPLEVEL_ALIAS_SETUP_PROC = {}
-
- @AUTOLOAD_FILE_SYM_TABLE = Hash.new{|h,k| h[k]={}} # TABLE[file][sym] -> obj
-
- @current_default_widget_set = nil
-
- module TOPLEVEL_ALIASES; end
-end
-
-class Object
- include Tk::TOPLEVEL_ALIASES
-end
-
-############################################
-# methods to control default widget set
-############################################
-
-class << Tk
- def default_widget_set
- @current_default_widget_set
- end
-
- def default_widget_set=(target)
- target = target.to_sym
- return target if target == @current_default_widget_set
-
- if (cmd = @TOPLEVEL_ALIAS_SETUP_PROC[target])
- cmd.call(target)
- end
-
- _replace_toplevel_aliases(target)
- end
-
- def widget_set_symbols
- @TOPLEVEL_ALIAS_TABLE.keys
- end
-
- def toplevel_aliases_on_widget_set(widget_set)
- if (tbl = @TOPLEVEL_ALIAS_TABLE[widget_set.to_sym])
- tbl.collect{|k, v| (v.nil?)? nil: k}.compact
- else
- fail ArgumentError, "unknown widget_set #{widget_set.to_sym.inspect}"
- end
- end
-
- def __toplevel_alias_setup_proc__(*target_list, &cmd)
- target_list.each{|target| @TOPLEVEL_ALIAS_SETUP_PROC[target.to_sym] = cmd}
- end
-
- def topobj_defined?(sym) #=> alias_filename or object or false
- Object.autoload?(sym) ||
- (Object.const_defined?(sym) && Object.const_get(sym))
- end
- def topalias_defined?(sym) #=> alias_filename or object or false
- Tk::TOPLEVEL_ALIASES.autoload?(sym) ||
- (Tk::TOPLEVEL_ALIASES.const_defined?(sym) &&
- Tk::TOPLEVEL_ALIASES.const_get(sym))
- end
- def define_topobj(sym, obj)
- if obj.kind_of? String
- # obj is an autoload path
- Object.autoload(sym, obj)
- unless Object.autoload?(sym)
- # file is autoloaded?
- if @AUTOLOAD_FILE_SYM_TABLE.has_key?(obj) &&
- (loaded_obj = @AUTOLOAD_FILE_SYM_TABLE[obj][sym])
- Object.const_set(sym, loaded_obj)
- else
- fail ArgumentError, "cannot define autoload file (already loaded?)"
- end
- end
- else
- # object
- Object.const_set(sym, obj)
- end
- end
- def define_topalias(sym, obj)
- if obj.kind_of? String
- # obj is an autoload path
- Tk::TOPLEVEL_ALIASES.autoload(sym, obj)
- unless Tk::TOPLEVEL_ALIASES.autoload?(sym)
- # file is autoloaded?
- if @AUTOLOAD_FILE_SYM_TABLE.has_key?(obj) &&
- (loaded_obj = @AUTOLOAD_FILE_SYM_TABLE[obj][sym])
- Tk::TOPLEVEL_ALIASES.const_set(sym, loaded_obj)
- else
- fail ArgumentError, "cannot define autoload file (already loaded?)"
- end
- end
- else
- # object
- Tk::TOPLEVEL_ALIASES.const_set(sym, obj)
- end
- end
- def replace_topobj(sym, obj) #=> old_obj (alias_filename or object) or nil
- if old_obj = topobj_defined?(sym)
- Object.class_eval{remove_const sym} rescue nil # ignore err
- end
- define_topobj(sym, obj)
- old_obj
- end
- def replace_topalias(sym, obj) #=> old_obj (alias_filename or object) or nil
- if old_obj = topalias_defined?(sym)
- Tk::TOPLEVEL_ALIASES.module_eval{remove_const sym} rescue nil #ignore err
- end
- define_topalias(sym, obj)
- old_obj
- end
- private :topobj_defined?, :topalias_defined?
- private :define_topobj, :define_topalias
- private :replace_topobj, :replace_topalias
-
- def __regist_toplevel_aliases__(target, obj, *symbols)
- # initial regist
- @TOPLEVEL_ALIAS_TABLE[target = target.to_sym] ||= {}
- symbols.each{|sym|
- @TOPLEVEL_ALIAS_TABLE[target][sym = sym.to_sym] = obj
- if !topalias_defined?(sym) || target == @current_default_widget_set
- @TOPLEVEL_ALIAS_OWNER[sym] = target
- replace_topalias(sym, obj)
- replace_topobj(sym, obj) unless obj.kind_of?(String) # NOT autoload
- end
- }
- end
-
- def regist_sym_for_loaded_file(auto, obj, sym)
- @AUTOLOAD_FILE_SYM_TABLE[auto][sym] = obj
-
- reg = /^#{Regexp.quote(auto)}(\.rb|\.so|)$/
- @TOPLEVEL_ALIAS_TABLE.each_key{|set|
- if @TOPLEVEL_ALIAS_TABLE[set][sym] =~ reg
- @TOPLEVEL_ALIAS_TABLE[set][sym] = obj
- if @TOPLEVEL_ALIAS_OWNER[sym].nil? || @TOPLEVEL_ALIAS_OWNER[sym] == set
- replace_topalias(sym, obj)
- replace_topobj(sym, obj) if set == @current_default_widget_set
- end
- end
- }
- if (f = Object.autoload?(sym)) && f =~ reg
- replace_topobj(sym, obj)
- end
- if (f = Tk::TOPLEVEL_ALIASES.autoload?(sym)) && f =~ reg
- replace_topalias(sym, obj)
- end
- end
- private :regist_sym_for_loaded_file
-
- def set_topalias(target, obj, sym)
- # obj is a kind of String : define autoload path
- # Class : use the class object
- if target == @current_default_widget_set
- case @TOPLEVEL_ALIAS_OWNER[sym]
- when false
- # Object::sym is out of control. --> not change
- # Make ALIAS::sym under control, because target widget set is current.
- # Keep OWNER[sym]
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- replace_topalias(sym, obj)
-
- when target
- if current_obj = topobj_defined?(sym)
- if current_obj == obj
- # Make current_obj under control.
- # Keep Object::sym.
- # Keep OWNER[sym].
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- replace_topalias(sym, obj)
-
- else # current_obj != obj
- if current_obj == topalias_defined?(sym)
- # Change controlled object
- # Keep OWNER[sym].
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- replace_topalias(sym, obj)
- replace_topobj(sym, obj)
-
- else # current_obj != topalias_defined?(sym)
- # Maybe current_obj is defined by user. --> OWNER[sym] = false
- # Keep Object::sym.
- @TOPLEVEL_ALIAS_OWNER[sym] = false
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- replace_topalias(sym, obj)
- end
- end
-
- else # NOT topobj_defined?(sym)
- # New definition for sym at target.
- # Keep OWNER[sym].
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- replace_topalias(sym, obj)
- define_topobj(sym, obj)
- end
-
- when nil
- # New definition for sym at target.
- @TOPLEVEL_ALIAS_OWNER[sym] = target
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- replace_topalias(sym, obj)
-
- else # others
- # Maybe planning to make sym under control.
- @TOPLEVEL_ALIAS_OWNER[sym] = target
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- replace_topalias(sym, obj)
- replace_topobj(sym, obj)
- end
-
- else # target != @current_default_widget_set
- case @TOPLEVEL_ALIAS_OWNER[sym]
- when false
- # Object::sym is out of control. --> not change
- if topalias_defined?(sym)
- # ALIAS[sym] may be defined by other widget set.
- # Keep Object::sym (even if it is not defined)
- # Keep ALIAS[sym].
- # Keep OWNER[sym].
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
-
- else # NOT topalias_defined?(sym)
- # Nobody controls ALIAS[sym].
- # At least, current widget set doesn't control ALIAS[sym].
- # Keep Object::sym (even if it is not defined)
- # Keep OWNER[sym].
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- define_topalias(sym, obj)
- end
-
- when target
- # Maybe change controlled object, because Object::sym is under control.
- # Keep OWNER[sym].
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- replace_topalias(sym, obj)
- replace_topobj(sym, obj)
-
- when nil
- # New definition for sym
- @TOPLEVEL_ALIAS_OWNER[sym] = target
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
- replace_topalias(sym, obj)
- replace_topobj(sym, obj)
-
- else # others
- # An other widget set controls sym.
- # Keep Object::sym (even if it is not defined)
- # Keep ALIAS[sym].
- # Keep OWNER[sym].
- @TOPLEVEL_ALIAS_TABLE[target][sym] = obj
-
- end
- end
-
- sym
- end
- private :set_topalias
-
- def __set_toplevel_aliases__(target, obj, *symbols)
- # obj is a kind of String : define autoload path
- # Class : use the class object
- target = target.to_sym
- symbols.each{|sym| set_topalias(target, obj, sym.to_sym)}
- end
-
- def __set_loaded_toplevel_aliases__(autopath, target, obj, *symbols)
- # autopath is an autoload file
- # Currently, this method doesn't support that autoload loads
- # different toplevels between <basename>.rb and <basename>.so extension.
- shortpath = (autopath =~ /^(.*)(.rb|.so)$/)? $1: autopath
- target = target.to_sym
- symbols.map!{|sym| sym.to_sym}
-
- symbols.each{|sym| regist_sym_for_loaded_file(shortpath, obj, sym) }
- symbols.each{|sym| set_topalias(target, obj, sym)}
- end
-
- def backup_current_topdef(sym)
- return if (current = @current_default_widget_set).nil?
-
- case @TOPLEVEL_ALIAS_OWNER[sym]
- when false
- # Object::sym is out of control.
- if (cur_alias = topalias_defined?(sym)) && ! cur_alias.kind_of?(String)
- @TOPLEVEL_ALIAS_TABLE[current][sym] = cur_alias
- end
-
- when current
- if cur_obj = topobj_defined?(sym)
- if ! cur_obj.kind_of?(String) && (cur_alias = topalias_defined?(sym))
- if cur_alias.kind_of?(String)
- # Maybe, user replaced Object::sym.
- # Make Object::sym out of control.
- @TOPLEVEL_ALIAS_OWNER[sym] = false
- elsif cur_obj == cur_alias
- # Possibly, defined normally. Backup it
- @TOPLEVEL_ALIAS_TABLE[current][sym] = cur_alias
- else
- # Maybe, user replaced Object::sym.
- # Make Object::sym out of control.
- @TOPLEVEL_ALIAS_OWNER[sym] = false
- end
- end
- else
- # Maybe, user replaced Object::sym.
- # Make Object::sym out of control.
- @TOPLEVEL_ALIAS_OWNER[sym] = false
- end
-
- when nil
- # Object::sym is out of control.
- if (cur_alias = topalias_defined?(sym)) && ! cur_alias.kind_of?(String)
- # Possibly, defined normally. Backup it.
- @TOPLEVEL_ALIAS_TABLE[current][sym] = cur_alias
- end
- else
- # No authority to control Object::sym and ALIASES::sym.
- # Do nothing.
- end
- end
- private :backup_current_topdef
-
- def _replace_toplevel_aliases(target)
- # backup
- @TOPLEVEL_ALIAS_TABLE[target].each_key{|sym|
- backup_current_topdef(sym)
- }
-
- # replace
- @TOPLEVEL_ALIAS_TABLE[target].each_key{|sym|
- next if (obj = @TOPLEVEL_ALIAS_TABLE[target][sym]).nil?
- if @TOPLEVEL_ALIAS_OWNER[sym] == false
- # Object::sym is out of control. --> not change
- # Keep OWNER[sym].
- replace_topalias(sym, obj)
- else
- # New definition
- @TOPLEVEL_ALIAS_OWNER[sym] = target
- replace_topalias(sym, obj)
- replace_topobj(sym, obj)
- end
- }
-
- # change default_widget_set
- @current_default_widget_set = target
- end
- private :_replace_toplevel_aliases
-
- def __import_toplevel_aliases__(target, *symbols)
- current = @current_default_widget_set
- symbols.each{|sym|
- sym = sym.to_sym
- if (obj = @TOPLEVEL_ALIAS_TABLE[target][sym]).nil?
- # remove
- @TOPLEVEL_ALIAS_TABLE[current].delete(sym)
- @TOPLEVEL_ALIAS_OWNER.delete(sym)
- Tk::TOPLEVEL_ALIASES.module_eval{remove_const sym} if topalias_defined?(sym)
- Object.class_eval{remove_const sym} if topobj_defined?(sym)
-
- elsif obj == false
- # remove, but OWNER[sym] <- false and not treat Object::sym
- @TOPLEVEL_ALIAS_TABLE[current].delete(sym)
- @TOPLEVEL_ALIAS_OWNER[sym] = false
- Tk::TOPLEVEL_ALIASES.module_eval{remove_const sym} if topalias_defined?(sym)
-
- elsif @TOPLEVEL_ALIAS_OWNER[sym] == false
- # Object::sym is out of control. --> not change
- # Keep OWNER[sym].
- @TOPLEVEL_ALIAS_TABLE[current][sym] = obj
- replace_topalias(sym, obj)
-
- else
- # new definition under control
- @TOPLEVEL_ALIAS_OWNER[sym] = current
- @TOPLEVEL_ALIAS_TABLE[current][sym] = obj
- replace_topalias(sym, obj)
- replace_topobj(sym, obj)
- end
- }
- end
-
- def __remove_toplevel_aliases__(*symbols)
- # remove toplevel aliases of current widget set
- current = @current_default_widget_set
- symbols.each{|sym|
- sym = sym.to_sym
- @TOPLEVEL_ALIAS_TABLE[current].delete(sym)
- @TOPLEVEL_ALIAS_OWNER.delete(sym)
- Tk::TOPLEVEL_ALIASES.module_eval{remove_const sym} if topalias_defined?(sym)
- Object.class_eval{remove_const sym} if topobj_defined?(sym)
- }
- end
-
- def __reset_toplevel_owner__(*symbols)
- symbols.each{|sym| @TOPLEVEL_ALIAS_OWNER.delete(sym.to_sym)}
- end
-
- def __disable_toplevel_control__(*symbols)
- symbols.each{|sym| @TOPLEVEL_ALIAS_OWNER[sym.to_sym] = false}
- end
-
- def __create_widget_set__(new_set, src_set={})
- new_set = new_set.to_sym
- if @TOPLEVEL_ALIAS_TABLE[new_set]
- fail RuntimeError, "A widget-set #{new_set.inspect} is already exist."
- end
- if src_set.kind_of?(Symbol)
- # new_set is an alias name of existed widget set.
- @TOPLEVEL_ALIAS_TABLE[new_set] = @TOPLEVEL_ALIAS_TABLE[src_set]
- else
- @TOPLEVEL_ALIAS_TABLE[new_set] = {}
- src_set.each{|sym, obj| set_topalias(new_set, obj, sym.to_sym) }
- end
- end
-end
-
-
-############################################
-# setup default widget set => :Tk
-Tk.default_widget_set = :Tk
-
-
-############################################
-# depend on the version of Tcl/Tk
-# major, minor, type, patchlevel = TclTkLib.get_version
-
-############################################
-# Ttk (Tile) support
-=begin
-if major > 8 ||
- (major == 8 && minor > 5) ||
- (major == 8 && minor == 5 && type >= TclTkLib::RELEASE_TYPE::BETA)
- # Tcl/Tk 8.5 beta or later
- Object.autoload :Ttk, 'tkextlib/tile'
- Tk.autoload :Tile, 'tkextlib/tile'
-
- require 'tk/ttk_selector'
-end
-=end
-Object.autoload :Ttk, 'tkextlib/tile'
-Tk.autoload :Tile, 'tkextlib/tile'
-require 'tk/ttk_selector'
diff --git a/ext/tk/lib/tk/bgerror.rb b/ext/tk/lib/tk/bgerror.rb
deleted file mode 100644
index 9d2f59357e..0000000000
--- a/ext/tk/lib/tk/bgerror.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: false
-#
-# tkbgerror -- bgerror ( tkerror ) module
-# 1998/07/16 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
-#
-require 'tk'
-
-module TkBgError
- extend Tk
-
- TkCommandNames = ['bgerror'.freeze].freeze
-
- def bgerror(message)
- tk_call('bgerror', message)
- end
- alias tkerror bgerror
- alias show bgerror
- module_function :bgerror, :tkerror, :show
-
- def set_handler(hdlr = Proc.new) #==> handler :: proc{|msg| ...body... }
- tk_call('proc', 'bgerror', 'msg', install_cmd(hdlr) + ' $msg')
- end
- def set_default
- begin
- tk_call('rename', 'bgerror', '')
- rescue RuntimeError
- end
- end
- module_function :set_handler, :set_default
-end
diff --git a/ext/tk/lib/tk/bindtag.rb b/ext/tk/lib/tk/bindtag.rb
deleted file mode 100644
index ad3c90b505..0000000000
--- a/ext/tk/lib/tk/bindtag.rb
+++ /dev/null
@@ -1,139 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/bind.rb : control event binding
-#
-require 'tk'
-
-class TkBindTag
- include TkBindCore
-
- #BTagID_TBL = {}
- BTagID_TBL = TkCore::INTERP.create_table
-
- (Tk_BINDTAG_ID = ["btag".freeze, TkUtil.untrust("00000")]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- BTagID_TBL.mutex.synchronize{ BTagID_TBL.clear }
- }
-
- def TkBindTag.id2obj(id)
- BTagID_TBL.mutex.synchronize{
- (BTagID_TBL[id])? BTagID_TBL[id]: id
- }
- end
-
-=begin
- def TkBindTag.new_by_name(name, *args, &b)
- BTagID_TBL.mutex.synchronize{
- return BTagID_TBL[name] if BTagID_TBL[name]
- }
-
- self.new.instance_eval{
- BTagID_TBL.mutex.synchronize{
- BTagID_TBL.delete @id
- @id = name
- BTagID_TBL[@id] = self
- }
- bind(*args, &b) if args != []
- self
- }
- end
-=end
- def TkBindTag.new_by_name(name, *args, &b)
- obj = nil
- BTagID_TBL.mutex.synchronize{
- if BTagID_TBL[name]
- obj = BTagID_TBL[name]
- else
- (obj = BTagID_TBL[name] = self.allocate).instance_eval{
- @id = name
- }
- end
- }
- bind(*args, &b) if obj && args != []
- obj
- end
-
- def initialize(*args, &b)
- Tk_BINDTAG_ID.mutex.synchronize{
- # @id = Tk_BINDTAG_ID.join('')
- @id = Tk_BINDTAG_ID.join(TkCore::INTERP._ip_id_)
- Tk_BINDTAG_ID[1].succ!
- }
- BTagID_TBL.mutex.synchronize{
- BTagID_TBL[@id] = self
- }
- bind(*args, &b) if args != []
- end
-
- ALL = self.new_by_name('all')
-
- def name
- @id
- end
-
- def to_eval
- @id
- end
-
- def inspect
- #Kernel.format "#<TkBindTag: %s>", @id
- '#<TkBindTag: ' + @id + '>'
- end
-end
-
-
-class TkBindTagAll<TkBindTag
- def TkBindTagAll.new(*args, &b)
- $stderr.puts "Warning: TkBindTagALL is obsolete. Use TkBindTag::ALL\n"
-
- TkBindTag::ALL.bind(*args, &b) if args != []
- TkBindTag::ALL
- end
-end
-
-
-class TkDatabaseClass<TkBindTag
-=begin
- def self.new(name, *args, &b)
- BTagID_TBL.mutex.synchronize{
- return BTagID_TBL[name] if BTagID_TBL[name]
- }
- super(name, *args, &b)
- end
-
- def initialize(name, *args, &b)
- @id = name
- BTagID_TBL.mutex.synchronize{
- BTagID_TBL[@id] = self
- }
- bind(*args, &b) if args != []
- end
-=end
- def self.new(name, *args, &b)
- BTagID_TBL.mutex.synchronize{
- if BTagID_TBL[name]
- BTagID_TBL[name]
- else
- BTagID_TBL[name] = self.allocate.instance_eval{
- initialize(name, *args, &b)
- self
- }
- end
- }
- end
-
- def initialize(name, *args, &b)
- @id = name
- bind(*args, &b) if args != []
- end
-
- def inspect
- #Kernel.format "#<TkDatabaseClass: %s>", @id
- '#<TkDatabaseClass: ' + @id + '>'
- end
-end
diff --git a/ext/tk/lib/tk/busy.rb b/ext/tk/lib/tk/busy.rb
deleted file mode 100644
index 18ebede9dd..0000000000
--- a/ext/tk/lib/tk/busy.rb
+++ /dev/null
@@ -1,119 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/busy.rb: support 'tk busy' command (Tcl/Tk8.6 or later)
-#
-require 'tk'
-
-module Tk::Busy
- include TkCore
- extend TkCore
- extend TkItemConfigMethod
-end
-
-class << Tk::Busy
- def __item_cget_cmd(win)
- # maybe need to override
- ['tk', 'busy', 'cget', win.path]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(win)
- # maybe need to override
- ['tk', 'busy', 'configure', win.path]
- end
- private :__item_config_cmd
-
- def __item_confinfo_cmd(win)
- # maybe need to override
- __item_config_cmd(win)
- end
- private :__item_confinfo_cmd
-
- alias cget_tkstring itemcget_tkstring
- alias cget itemcget
- alias cget_strict itemcget_strict
- alias configure itemconfigure
- alias configinfo itemconfiginfo
- alias current_configinfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- def method_missing(id, *args)
- name = id.id2name
- case args.length
- when 1
- if name[-1] == ?=
- configure name[0..-2], args[0]
- args[0]
- else
- configure name, args[0]
- self
- end
- when 0
- begin
- cget(name)
- rescue
- super(id, *args)
- end
- else
- super(id, *args)
- end
- end
-
- def hold(win, keys={})
- tk_call_without_enc('tk', 'busy', 'hold', win, *hash_kv(keys))
- win
- end
-
- def forget(*wins)
- tk_call_without_enc('tk', 'busy', 'forget', *wins)
- self
- end
-
- def current(pat=None)
- list(tk_call('tk', 'busy', 'current', pat))
- end
-
- def status(win)
- bool(tk_call_without_enc('tk', 'busy', 'status', win))
- end
-end
-
-module Tk::Busy
- def busy_configinfo(option=nil)
- Tk::Busy.configinfo(self, option)
- end
-
- def busy_current_configinfo(option=nil)
- Tk::Busy.current_configinfo(self, option)
- end
-
- def busy_configure(option, value=None)
- Tk::Busy.configure(self, option, value)
- self
- end
-
- def busy_cget(option)
- Tk::Busy.configure(self, option)
- end
-
- def busy(keys={})
- Tk::Busy.hold(self, keys)
- self
- end
- alias busy_hold busy
-
- def busy_forget
- Tk::Busy.forget(self)
- self
- end
-
- def busy_current?
- ! Tk::Busy.current(self.path).empty?
- end
-
- def busy_status
- Tk::Busy.status(self)
- end
-end
diff --git a/ext/tk/lib/tk/button.rb b/ext/tk/lib/tk/button.rb
deleted file mode 100644
index dc252d8e82..0000000000
--- a/ext/tk/lib/tk/button.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/button.rb : treat button widget
-#
-require 'tk'
-require 'tk/label'
-
-class Tk::Button<Tk::Label
- TkCommandNames = ['button'.freeze].freeze
- WidgetClassName = 'Button'.freeze
- WidgetClassNames[WidgetClassName] ||= self
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('button', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('button', @path)
- # end
- #end
- #private :create_self
-
- def invoke
- _fromUTF8(tk_send_without_enc('invoke'))
- end
- def flash
- tk_send_without_enc('flash')
- self
- end
-end
-
-#TkButton = Tk::Button unless Object.const_defined? :TkButton
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Button, :TkButton)
-Tk.__set_loaded_toplevel_aliases__('tk/button.rb', :Tk, Tk::Button, :TkButton)
diff --git a/ext/tk/lib/tk/canvas.rb b/ext/tk/lib/tk/canvas.rb
deleted file mode 100644
index d707733d8c..0000000000
--- a/ext/tk/lib/tk/canvas.rb
+++ /dev/null
@@ -1,847 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/canvas.rb - Tk canvas classes
-# by Yukihiro Matsumoto <matz@caelum.co.jp>
-#
-require 'tk'
-require 'tk/canvastag'
-require 'tk/itemconfig'
-require 'tk/scrollable'
-
-module TkCanvasItemConfig
- include TkItemConfigMethod
-
- def __item_strval_optkeys(id)
- # maybe need to override
- super(id) + [
- 'fill', 'activefill', 'disabledfill',
- 'outline', 'activeoutline', 'disabledoutline'
- ]
- end
- private :__item_strval_optkeys
-
- def __item_methodcall_optkeys(id)
- {'coords'=>'coords'}
- end
- private :__item_methodcall_optkeys
-
- def __item_val2ruby_optkeys(id) # { key=>proc, ... }
- super(id).update('window'=>proc{|i, v| window(v)},
- 'tags'=>proc{|i, v|
- simplelist(v).collect{|tag| TkcTag.id2obj(self, tag)}
- })
- end
- private :__item_val2ruby_optkeys
-
- def __item_pathname(tagOrId)
- if tagOrId.kind_of?(TkcItem) || tagOrId.kind_of?(TkcTag)
- self.path + ';' + tagOrId.id.to_s
- else
- self.path + ';' + tagOrId.to_s
- end
- end
- private :__item_pathname
-end
-
-class Tk::Canvas<TkWindow
- include TkCanvasItemConfig
- include Tk::Scrollable
-
- TkCommandNames = ['canvas'.freeze].freeze
- WidgetClassName = 'Canvas'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __destroy_hook__
- TkcItem::CItemID_TBL.delete(@path)
- end
-
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('canvas', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('canvas', @path)
- # end
- #end
- #private :create_self
-
- def __numval_optkeys
- super() + ['closeenough']
- end
- private :__numval_optkeys
-
- def __boolval_optkeys
- super() + ['confine']
- end
- private :__boolval_optkeys
-
- def tagid(tag)
- if tag.kind_of?(TkcItem) || tag.kind_of?(TkcTag)
- tag.id
- else
- tag # maybe an Array of configure parameters
- end
- end
- private :tagid
-
-
- # create a canvas item without creating a TkcItem object
- def create(type, *args)
- if type.kind_of?(Class) && type < TkcItem
- # do nothing
- elsif TkcItem.type2class(type.to_s)
- type = TkcItem.type2class(type.to_s)
- else
- fail ArgumentError, "type must a subclass of TkcItem class, or a string in CItemTypeToClass"
- end
- type.create(self, *args)
- end
-
- def addtag(tag, mode, *args)
- mode = mode.to_s
- if args[0] && mode =~ /^(above|below|with(tag)?)$/
- args[0] = tagid(args[0])
- end
- tk_send_without_enc('addtag', tagid(tag), mode, *args)
- self
- end
- def addtag_above(tagOrId, target)
- addtag(tagOrId, 'above', tagid(target))
- end
- def addtag_all(tagOrId)
- addtag(tagOrId, 'all')
- end
- def addtag_below(tagOrId, target)
- addtag(tagOrId, 'below', tagid(target))
- end
- def addtag_closest(tagOrId, x, y, halo=None, start=None)
- addtag(tagOrId, 'closest', x, y, halo, start)
- end
- def addtag_enclosed(tagOrId, x1, y1, x2, y2)
- addtag(tagOrId, 'enclosed', x1, y1, x2, y2)
- end
- def addtag_overlapping(tagOrId, x1, y1, x2, y2)
- addtag(tagOrId, 'overlapping', x1, y1, x2, y2)
- end
- def addtag_withtag(tagOrId, tag)
- addtag(tagOrId, 'withtag', tagid(tag))
- end
-
- def bbox(tagOrId, *tags)
- list(tk_send_without_enc('bbox', tagid(tagOrId),
- *tags.collect{|t| tagid(t)}))
- end
-
- #def itembind(tag, context, cmd=Proc.new, *args)
- # _bind([path, "bind", tagid(tag)], context, cmd, *args)
- # self
- #end
- def itembind(tag, context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, "bind", tagid(tag)], context, cmd, *args)
- self
- end
-
- #def itembind_append(tag, context, cmd=Proc.new, *args)
- # _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
- # self
- #end
- def itembind_append(tag, context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
- self
- end
-
- def itembind_remove(tag, context)
- _bind_remove([path, "bind", tagid(tag)], context)
- self
- end
-
- def itembindinfo(tag, context=nil)
- _bindinfo([path, "bind", tagid(tag)], context)
- end
-
- def canvasx(screen_x, *args)
- #tk_tcl2ruby(tk_send_without_enc('canvasx', screen_x, *args))
- number(tk_send_without_enc('canvasx', screen_x, *args))
- end
- def canvasy(screen_y, *args)
- #tk_tcl2ruby(tk_send_without_enc('canvasy', screen_y, *args))
- number(tk_send_without_enc('canvasy', screen_y, *args))
- end
- alias canvas_x canvasx
- alias canvas_y canvasy
-
- def coords(tag, *args)
- if args.empty?
- tk_split_list(tk_send_without_enc('coords', tagid(tag)))
- else
- tk_send_without_enc('coords', tagid(tag), *(args.flatten))
- self
- end
- end
-
- def dchars(tag, first, last=None)
- tk_send_without_enc('dchars', tagid(tag),
- _get_eval_enc_str(first), _get_eval_enc_str(last))
- self
- end
-
- def delete(*args)
- tbl = nil
- TkcItem::CItemID_TBL.mutex.synchronize{
- tbl = TkcItem::CItemID_TBL[self.path]
- }
- if tbl
- args.each{|tag|
- find('withtag', tag).each{|item|
- if item.kind_of?(TkcItem)
- TkcItem::CItemID_TBL.mutex.synchronize{
- tbl.delete(item.id)
- }
- end
- }
- }
- end
- tk_send_without_enc('delete', *args.collect{|t| tagid(t)})
- self
- end
- alias remove delete
-
- def dtag(tag, tag_to_del=None)
- tk_send_without_enc('dtag', tagid(tag), tagid(tag_to_del))
- self
- end
- alias deltag dtag
-
- def find(mode, *args)
- list(tk_send_without_enc('find', mode, *args)).collect!{|id|
- TkcItem.id2obj(self, id)
- }
- end
- def find_above(target)
- find('above', tagid(target))
- end
- def find_all
- find('all')
- end
- def find_below(target)
- find('below', tagid(target))
- end
- def find_closest(x, y, halo=None, start=None)
- find('closest', x, y, halo, start)
- end
- def find_enclosed(x1, y1, x2, y2)
- find('enclosed', x1, y1, x2, y2)
- end
- def find_overlapping(x1, y1, x2, y2)
- find('overlapping', x1, y1, x2, y2)
- end
- def find_withtag(tag)
- find('withtag', tag)
- end
-
- def itemfocus(tagOrId=nil)
- if tagOrId
- tk_send_without_enc('focus', tagid(tagOrId))
- self
- else
- ret = tk_send_without_enc('focus')
- if ret == ""
- nil
- else
- TkcItem.id2obj(self, ret)
- end
- end
- end
-
- def gettags(tagOrId)
- list(tk_send_without_enc('gettags', tagid(tagOrId))).collect{|tag|
- TkcTag.id2obj(self, tag)
- }
- end
-
- def icursor(tagOrId, index)
- tk_send_without_enc('icursor', tagid(tagOrId), index)
- self
- end
-
- def imove(tagOrId, idx, x, y)
- tk_send_without_enc('imove', tagid(tagOrId), idx, x, y)
- self
- end
- alias i_move imove
-
- def index(tagOrId, idx)
- number(tk_send_without_enc('index', tagid(tagOrId), idx))
- end
-
- def insert(tagOrId, index, string)
- tk_send_without_enc('insert', tagid(tagOrId), index,
- _get_eval_enc_str(string))
- self
- end
-
-=begin
- def itemcget(tagOrId, option)
- case option.to_s
- when 'dash', 'activedash', 'disableddash'
- conf = tk_send_without_enc('itemcget', tagid(tagOrId), "-#{option}")
- if conf =~ /^[0-9]/
- list(conf)
- else
- conf
- end
- when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile'
- _fromUTF8(tk_send_without_enc('itemcget', tagid(tagOrId), "-#{option}"))
- when 'font', 'kanjifont'
- #fnt = tk_tcl2ruby(tk_send('itemcget', tagid(tagOrId), "-#{option}"))
- fnt = tk_tcl2ruby(_fromUTF8(tk_send_with_enc('itemcget', tagid(tagOrId), '-font')))
- unless fnt.kind_of?(TkFont)
- fnt = tagfontobj(tagid(tagOrId), fnt)
- end
- if option.to_s == 'kanjifont' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/
- # obsolete; just for compatibility
- fnt.kanji_font
- else
- fnt
- end
- else
- tk_tcl2ruby(_fromUTF8(tk_send_without_enc('itemcget', tagid(tagOrId),
- "-#{option}")))
- end
- end
-
- def itemconfigure(tagOrId, key, value=None)
- if key.kind_of? Hash
- key = _symbolkey2str(key)
- coords = key.delete('coords')
- self.coords(tagOrId, coords) if coords
-
- if ( key['font'] || key['kanjifont'] \
- || key['latinfont'] || key['asciifont'] )
- tagfont_configure(tagid(tagOrId), key.dup)
- else
- _fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId),
- *hash_kv(key, true)))
- end
-
- else
- if ( key == 'coords' || key == :coords )
- self.coords(tagOrId, value)
- elsif ( key == 'font' || key == :font ||
- key == 'kanjifont' || key == :kanjifont ||
- key == 'latinfont' || key == :latinfont ||
- key == 'asciifont' || key == :asciifont )
- if value == None
- tagfontobj(tagid(tagOrId))
- else
- tagfont_configure(tagid(tagOrId), {key=>value})
- end
- else
- _fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId),
- "-#{key}", _get_eval_enc_str(value)))
- end
- end
- self
- end
-# def itemconfigure(tagOrId, key, value=None)
-# if key.kind_of? Hash
-# tk_send 'itemconfigure', tagid(tagOrId), *hash_kv(key)
-# else
-# tk_send 'itemconfigure', tagid(tagOrId), "-#{key}", value
-# end
-# end
-# def itemconfigure(tagOrId, keys)
-# tk_send 'itemconfigure', tagid(tagOrId), *hash_kv(keys)
-# end
-
- def itemconfiginfo(tagOrId, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- case key.to_s
- when 'coords'
- return ['coords', '', '', '', self.coords(tagOrId)]
- when 'dash', 'activedash', 'disableddash'
- conf = tk_split_simplelist(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}"))
- if conf[3] && conf[3] =~ /^[0-9]/
- conf[3] = list(conf[3])
- end
- if conf[4] && conf[4] =~ /^[0-9]/
- conf[4] = list(conf[4])
- end
- when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}")))
- when 'font', 'kanjifont'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId),"-#{key}")))
- conf[4] = tagfont_configinfo(tagid(tagOrId), conf[4])
- else
- conf = tk_split_list(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}")))
- end
- conf[0] = conf[0][1..-1]
- conf
- else
- ret = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId)))).collect{|conflist|
- conf = tk_split_simplelist(conflist)
- conf[0] = conf[0][1..-1]
- case conf[0]
- when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile'
- when 'dash', 'activedash', 'disableddash'
- if conf[3] && conf[3] =~ /^[0-9]/
- conf[3] = list(conf[3])
- end
- if conf[4] && conf[4] =~ /^[0-9]/
- conf[4] = list(conf[4])
- end
- else
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf[4]
- if conf[4].index('{')
- conf[4] = tk_split_list(conf[4])
- else
- conf[4] = tk_tcl2ruby(conf[4])
- end
- end
- end
- conf[1] = conf[1][1..-1] if conf.size == 2 # alias info
- conf
- }
-
- fontconf = ret.assoc('font')
- if fontconf
- ret.delete_if{|item| item[0] == 'font' || item[0] == 'kanjifont'}
- fontconf[4] = tagfont_configinfo(tagid(tagOrId), fontconf[4])
- ret.push(fontconf)
- end
-
- ret << ['coords', '', '', '', self.coords(tagOrId)]
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- case key.to_s
- when 'coords'
- {'coords' => ['', '', '', self.coords(tagOrId)]}
- when 'dash', 'activedash', 'disableddash'
- conf = tk_split_simplelist(tk_send_without_enc('itemconfigure',
- tagid(tagOrId),
- "-#{key}"))
- if conf[3] && conf[3] =~ /^[0-9]/
- conf[3] = list(conf[3])
- end
- if conf[4] && conf[4] =~ /^[0-9]/
- conf[4] = list(conf[4])
- end
- when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}")))
- when 'font', 'kanjifont'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId),"-#{key}")))
- conf[4] = tagfont_configinfo(tagid(tagOrId), conf[4])
- else
- conf = tk_split_list(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}")))
- end
- key = conf.shift[1..-1]
- { key => conf }
- else
- ret = {}
- tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId)))).each{|conflist|
- conf = tk_split_simplelist(conflist)
- key = conf.shift[1..-1]
- case key
- when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile'
- when 'dash', 'activedash', 'disableddash'
- if conf[2] && conf[2] =~ /^[0-9]/
- conf[2] = list(conf[2])
- end
- if conf[3] && conf[3] =~ /^[0-9]/
- conf[3] = list(conf[3])
- end
- else
- if conf[2]
- if conf[2].index('{')
- conf[2] = tk_split_list(conf[2])
- else
- conf[2] = tk_tcl2ruby(conf[2])
- end
- end
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- end
- if conf.size == 1
- ret[key] = conf[0][1..-1] # alias info
- else
- ret[key] = conf
- end
- }
-
- fontconf = ret['font']
- if fontconf
- ret.delete('font')
- ret.delete('kanjifont')
- fontconf[3] = tagfont_configinfo(tagid(tagOrId), fontconf[3])
- ret['font'] = fontconf
- end
-
- ret['coords'] = ['', '', '', self.coords(tagOrId)]
-
- ret
- end
- end
- end
-
- def current_itemconfiginfo(tagOrId, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- conf = itemconfiginfo(tagOrId, key)
- {conf[0] => conf[4]}
- else
- ret = {}
- itemconfiginfo(tagOrId).each{|conf|
- ret[conf[0]] = conf[4] if conf.size > 2
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- itemconfiginfo(tagOrId, key).each{|k, conf|
- ret[k] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-=end
-
- def lower(tag, below=nil)
- if below
- tk_send_without_enc('lower', tagid(tag), tagid(below))
- else
- tk_send_without_enc('lower', tagid(tag))
- end
- self
- end
-
- def move(tag, dx, dy)
- tk_send_without_enc('move', tagid(tag), dx, dy)
- self
- end
-
- def moveto(tag, x, y)
- # Tcl/Tk 8.6 or later
- tk_send_without_enc('moveto', tagid(tag), x, y)
- self
- end
- alias move_to moveto
-
- def postscript(keys)
- tk_send("postscript", *hash_kv(keys))
- end
-
- def raise(tag, above=nil)
- if above
- tk_send_without_enc('raise', tagid(tag), tagid(above))
- else
- tk_send_without_enc('raise', tagid(tag))
- end
- self
- end
-
- def rchars(tag, first, last, str_or_coords)
- # Tcl/Tk 8.6 or later
- str_or_coords = str_or_coords.flatten if str_or_coords.kinad_of? Array
- tk_send_without_enc('rchars', tagid(tag), first, last, str_or_coords)
- self
- end
- alias replace_chars rchars
- alias replace_coords rchars
-
- def scale(tag, x, y, xs, ys)
- tk_send_without_enc('scale', tagid(tag), x, y, xs, ys)
- self
- end
-
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y, gain=None)
- tk_send_without_enc('scan', 'dragto', x, y, gain)
- self
- end
-
- def select(mode, *args)
- r = tk_send_without_enc('select', mode, *args)
- (mode == 'item')? TkcItem.id2obj(self, r): self
- end
- def select_adjust(tagOrId, index)
- select('adjust', tagid(tagOrId), index)
- end
- def select_clear
- select('clear')
- end
- def select_from(tagOrId, index)
- select('from', tagid(tagOrId), index)
- end
- def select_item
- select('item')
- end
- def select_to(tagOrId, index)
- select('to', tagid(tagOrId), index)
- end
-
- def itemtype(tag)
- TkcItem.type2class(tk_send('type', tagid(tag)))
- end
-
- def create_itemobj_from_id(idnum)
- id = TkcItem.id2obj(self, idnum.to_i)
- return id if id.kind_of?(TkcItem)
-
- typename = tk_send('type', id)
- unless type = TkcItem.type2class(typename)
- (itemclass = typename.dup)[0,1] = typename[0,1].upcase
- type = TkcItem.const_set(itemclass, Class.new(TkcItem))
- type.const_set("CItemTypeName", typename.freeze)
- TkcItem::CItemTypeToClass[typename] = type
- end
-
- canvas = self
- (obj = type.allocate).instance_eval{
- @parent = @c = canvas
- @path = canvas.path
- @id = id
- TkcItem::CItemID_TBL.mutex.synchronize{
- TkcItem::CItemID_TBL[@path] = {} unless TkcItem::CItemID_TBL[@path]
- TkcItem::CItemID_TBL[@path][@id] = self
- }
- }
- end
-end
-
-#TkCanvas = Tk::Canvas unless Object.const_defined? :TkCanvas
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Canvas, :TkCanvas)
-Tk.__set_loaded_toplevel_aliases__('tk/canvas.rb', :Tk, Tk::Canvas, :TkCanvas)
-
-
-class TkcItem<TkObject
- extend Tk
- include TkcTagAccess
- extend TkItemFontOptkeys
- extend TkItemConfigOptkeys
-
- CItemTypeName = nil
- CItemTypeToClass = {}
-
- CItemID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- CItemID_TBL.mutex.synchronize{ CItemID_TBL.clear }
- }
-
- def TkcItem.type2class(type)
- CItemTypeToClass[type]
- end
-
- def TkcItem.id2obj(canvas, id)
- cpath = canvas.path
- CItemID_TBL.mutex.synchronize{
- if CItemID_TBL[cpath]
- CItemID_TBL[cpath][id]? CItemID_TBL[cpath][id]: id
- else
- id
- end
- }
- end
-
- ########################################
- def self._parse_create_args(args)
- fontkeys = {}
- methodkeys = {}
- if args[-1].kind_of? Hash
- keys = _symbolkey2str(args.pop)
- if args.size == 0
- args = keys.delete('coords')
- unless args.kind_of?(Array)
- fail "coords parameter must be given by an Array"
- end
- end
-
- #['font', 'kanjifont', 'latinfont', 'asciifont'].each{|key|
- # fontkeys[key] = keys.delete(key) if keys.key?(key)
- #}
- __item_font_optkeys(nil).each{|key|
- fkey = key.to_s
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
-
- fkey = "kanji#{key}"
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
-
- fkey = "latin#{key}"
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
-
- fkey = "ascii#{key}"
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
- }
-
- __item_optkey_aliases(nil).each{|alias_name, real_name|
- alias_name = alias_name.to_s
- if keys.has_key?(alias_name)
- keys[real_name.to_s] = keys.delete(alias_name)
- end
- }
-
- __item_methodcall_optkeys(nil).each{|key|
- key = key.to_s
- methodkeys[key] = keys.delete(key) if keys.key?(key)
- }
-
- __item_ruby2val_optkeys(nil).each{|key, method|
- key = key.to_s
- keys[key] = method.call(keys[key]) if keys.has_key?(key)
- }
-
- #args = args.flatten.concat(hash_kv(keys))
- args = args.flatten.concat(itemconfig_hash_kv(nil, keys))
- else
- args = args.flatten
- end
-
- [args, fontkeys, methodkeys]
- end
- private_class_method :_parse_create_args
-
- def self.create(canvas, *args)
- unless self::CItemTypeName
- fail RuntimeError, "#{self} is an abstract class"
- end
- args, fontkeys, methodkeys = _parse_create_args(args)
- idnum = tk_call_without_enc(canvas.path, 'create',
- self::CItemTypeName, *args)
- canvas.itemconfigure(idnum, fontkeys) unless fontkeys.empty?
- canvas.itemconfigure(idnum, methodkeys) unless methodkeys.empty?
- idnum.to_i # 'canvas item id' is an integer number
- end
- ########################################
-
- def initialize(parent, *args)
- #unless parent.kind_of?(Tk::Canvas)
- # fail ArgumentError, "expect Tk::Canvas for 1st argument"
- #end
- @parent = @c = parent
- @path = parent.path
-
- @id = create_self(*args) # an integer number as 'canvas item id'
- CItemID_TBL.mutex.synchronize{
- CItemID_TBL[@path] = {} unless CItemID_TBL[@path]
- CItemID_TBL[@path][@id] = self
- }
- end
- def create_self(*args)
- self.class.create(@c, *args) # return an integer number as 'canvas item id'
- end
- private :create_self
-
- def id
- @id
- end
-
- def exist?
- if @c.find_withtag(@id)
- true
- else
- false
- end
- end
-
- def delete
- @c.delete @id
- CItemID_TBL.mutex.synchronize{
- CItemID_TBL[@path].delete(@id) if CItemID_TBL[@path]
- }
- self
- end
- alias remove delete
- alias destroy delete
-end
-
-class TkcArc<TkcItem
- CItemTypeName = 'arc'.freeze
- CItemTypeToClass[CItemTypeName] = self
-end
-
-class TkcBitmap<TkcItem
- CItemTypeName = 'bitmap'.freeze
- CItemTypeToClass[CItemTypeName] = self
-end
-
-class TkcImage<TkcItem
- CItemTypeName = 'image'.freeze
- CItemTypeToClass[CItemTypeName] = self
-end
-
-class TkcLine<TkcItem
- CItemTypeName = 'line'.freeze
- CItemTypeToClass[CItemTypeName] = self
-end
-
-class TkcOval<TkcItem
- CItemTypeName = 'oval'.freeze
- CItemTypeToClass[CItemTypeName] = self
-end
-
-class TkcPolygon<TkcItem
- CItemTypeName = 'polygon'.freeze
- CItemTypeToClass[CItemTypeName] = self
-end
-
-class TkcRectangle<TkcItem
- CItemTypeName = 'rectangle'.freeze
- CItemTypeToClass[CItemTypeName] = self
-end
-
-class TkcText<TkcItem
- CItemTypeName = 'text'.freeze
- CItemTypeToClass[CItemTypeName] = self
- def self.create(canvas, *args)
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- txt = keys['text']
- keys['text'] = _get_eval_enc_str(txt) if txt
- args.push(keys)
- end
- super(canvas, *args)
- end
-end
-
-class TkcWindow<TkcItem
- CItemTypeName = 'window'.freeze
- CItemTypeToClass[CItemTypeName] = self
- def self.create(canvas, *args)
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- win = keys['window']
- # keys['window'] = win.epath if win.kind_of?(TkWindow)
- keys['window'] = _epath(win) if win
- args.push(keys)
- end
- super(canvas, *args)
- end
-end
diff --git a/ext/tk/lib/tk/canvastag.rb b/ext/tk/lib/tk/canvastag.rb
deleted file mode 100644
index 4a14cd78a9..0000000000
--- a/ext/tk/lib/tk/canvastag.rb
+++ /dev/null
@@ -1,460 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/canvastag.rb - methods for treating canvas tags
-#
-require 'tk'
-require 'tk/tagfont'
-
-module TkcTagAccess
- include TkComm
- include TkTreatTagFont
-end
-
-require 'tk/canvas'
-
-module TkcTagAccess
- def addtag(tag)
- @c.addtag(tag, 'withtag', @id)
- self
- end
-
- def bbox
- @c.bbox(@id)
- end
-
- #def bind(seq, cmd=Proc.new, *args)
- # @c.itembind(@id, seq, cmd, *args)
- # self
- #end
- def bind(seq, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- @c.itembind(@id, seq, cmd, *args)
- self
- end
-
- #def bind_append(seq, cmd=Proc.new, *args)
- # @c.itembind_append(@id, seq, cmd, *args)
- # self
- #end
- def bind_append(seq, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- @c.itembind_append(@id, seq, cmd, *args)
- self
- end
-
- def bind_remove(seq)
- @c.itembind_remove(@id, seq)
- self
- end
-
- def bindinfo(seq=nil)
- @c.itembindinfo(@id, seq)
- end
-
- def cget_tkstring(option)
- @c.itemcget_tkstring(@id, option)
- end
- def cget(option)
- @c.itemcget(@id, option)
- end
- def cget_strict(option)
- @c.itemcget_strict(@id, option)
- end
-
- def configure(key, value=None)
- @c.itemconfigure(@id, key, value)
- self
- end
-# def configure(keys)
-# @c.itemconfigure @id, keys
-# end
-
- def configinfo(key=nil)
- @c.itemconfiginfo(@id, key)
- end
-
- def current_configinfo(key=nil)
- @c.current_itemconfiginfo(@id, key)
- end
-
- def coords(*args)
- @c.coords(@id, *args)
- end
-
- def dchars(first, last=None)
- @c.dchars(@id, first, last)
- self
- end
-
- def dtag(tag_to_del=None)
- @c.dtag(@id, tag_to_del)
- self
- end
- alias deltag dtag
-
- def find
- @c.find('withtag', @id)
- end
- alias list find
-
- def focus
- @c.itemfocus(@id)
- end
-
- def gettags
- @c.gettags(@id)
- end
-
- def icursor(index)
- @c.icursor(@id, index)
- self
- end
-
- def imove(idx, x, y)
- # Tcl/Tk 8.6 or later
- @c.imove(@id, idx, x, y)
- self
- end
- alias i_move imove
-
- def index(idx)
- @c.index(@id, idx)
- end
-
- def insert(beforethis, string)
- @c.insert(@id, beforethis, string)
- self
- end
-
- def lower(belowthis=None)
- @c.lower(@id, belowthis)
- self
- end
-
- def move(xamount, yamount)
- @c.move(@id, xamount, yamount)
- self
- end
-
- def moveto(x, y)
- # Tcl/Tk 8.6 or later
- @c.moveto(@id, x, y)
- self
- end
- alias move_to moveto
-
- def raise(abovethis=None)
- @c.raise(@id, abovethis)
- self
- end
-
- def scale(xorigin, yorigin, xscale, yscale)
- @c.scale(@id, xorigin, yorigin, xscale, yscale)
- self
- end
-
- def rchars(first, last, str_or_coords)
- # Tcl/Tk 8.6 or later
- @c.rchars(@id, first, last, str_or_coords)
- self
- end
- alias replace_chars rchars
- alias replace_coords rchars
-
- def select_adjust(index)
- @c.select('adjust', @id, index)
- self
- end
- def select_from(index)
- @c.select('from', @id, index)
- self
- end
- def select_to(index)
- @c.select('to', @id, index)
- self
- end
-
- def itemtype
- @c.itemtype(@id)
- end
-
- # Following operators support logical expressions of canvas tags
- # (for Tk8.3+).
- # If tag1.path is 't1' and tag2.path is 't2', then
- # ltag = tag1 & tag2; ltag.path => "(t1)&&(t2)"
- # ltag = tag1 | tag2; ltag.path => "(t1)||(t2)"
- # ltag = tag1 ^ tag2; ltag.path => "(t1)^(t2)"
- # ltag = - tag1; ltag.path => "!(t1)"
- def & (tag)
- if tag.kind_of? TkObject
- TkcTagString.new(@c, '(' + @id + ')&&(' + tag.path + ')')
- else
- TkcTagString.new(@c, '(' + @id + ')&&(' + tag.to_s + ')')
- end
- end
-
- def | (tag)
- if tag.kind_of? TkObject
- TkcTagString.new(@c, '(' + @id + ')||(' + tag.path + ')')
- else
- TkcTagString.new(@c, '(' + @id + ')||(' + tag.to_s + ')')
- end
- end
-
- def ^ (tag)
- if tag.kind_of? TkObject
- TkcTagString.new(@c, '(' + @id + ')^(' + tag.path + ')')
- else
- TkcTagString.new(@c, '(' + @id + ')^(' + tag.to_s + ')')
- end
- end
-
- def -@
- TkcTagString.new(@c, '!(' + @id + ')')
- end
-end
-
-class TkcTag<TkObject
- include TkcTagAccess
-
- CTagID_TBL = TkCore::INTERP.create_table
-
- (Tk_CanvasTag_ID = ['ctag'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- CTagID_TBL.mutex.synchronize{ CTagID_TBL.clear }
- }
-
- def TkcTag.id2obj(canvas, id)
- cpath = canvas.path
- CTagID_TBL.mutex.synchronize{
- if CTagID_TBL[cpath]
- CTagID_TBL[cpath][id]? CTagID_TBL[cpath][id]: id
- else
- id
- end
- }
- end
-
- def initialize(parent, mode=nil, *args)
- #unless parent.kind_of?(TkCanvas)
- # fail ArgumentError, "expect TkCanvas for 1st argument"
- #end
- @c = parent
- @cpath = parent.path
- Tk_CanvasTag_ID.mutex.synchronize{
- # @path = @id = Tk_CanvasTag_ID.join('')
- @path = @id = Tk_CanvasTag_ID.join(TkCore::INTERP._ip_id_)
- Tk_CanvasTag_ID[1].succ!
- }
- CTagID_TBL.mutex.synchronize{
- CTagID_TBL[@cpath] = {} unless CTagID_TBL[@cpath]
- CTagID_TBL[@cpath][@id] = self
- }
- if mode
- tk_call_without_enc(@c.path, "addtag", @id, mode, *args)
- end
- end
- def id
- @id
- end
-
- def exist?
- if @c.find_withtag(@id)
- true
- else
- false
- end
- end
-
- def delete
- @c.delete @id
- CTagID_TBL.mutex.synchronize{
- CTagID_TBL[@cpath].delete(@id) if CTagID_TBL[@cpath]
- }
- self
- end
- alias remove delete
- alias destroy delete
-
- def set_to_above(target)
- @c.addtag_above(@id, target)
- self
- end
- alias above set_to_above
-
- def set_to_all
- @c.addtag_all(@id)
- self
- end
- alias all set_to_all
-
- def set_to_below(target)
- @c.addtag_below(@id, target)
- self
- end
- alias below set_to_below
-
- def set_to_closest(x, y, halo=None, start=None)
- @c.addtag_closest(@id, x, y, halo, start)
- self
- end
- alias closest set_to_closest
-
- def set_to_enclosed(x1, y1, x2, y2)
- @c.addtag_enclosed(@id, x1, y1, x2, y2)
- self
- end
- alias enclosed set_to_enclosed
-
- def set_to_overlapping(x1, y1, x2, y2)
- @c.addtag_overlapping(@id, x1, y1, x2, y2)
- self
- end
- alias overlapping set_to_overlapping
-
- def set_to_withtag(target)
- @c.addtag_withtag(@id, target)
- self
- end
- alias withtag set_to_withtag
-end
-
-class TkcTagString<TkcTag
- def self.new(parent, name, mode=nil, *args)
- obj = nil
- CTagID_TBL.mutex.synchronize{
- if CTagID_TBL[parent.path] && CTagID_TBL[parent.path][name]
- obj = CTagID_TBL[parent.path][name]
- else
- # super(parent, name, *args)
- (obj = self.allocate).instance_eval{
- @c = parent
- @cpath = parent.path
- @path = @id = name
- CTagID_TBL[@cpath] = {} unless CTagID_TBL[@cpath]
- CTagID_TBL[@cpath][@id] = self
- }
- end
- }
- if obj && mode
- tk_call_without_enc(@c.path, "addtag", @id, mode, *args)
- end
- obj
- end
-
- def initialize(parent, name, mode=nil, *args)
- # dummy:: not called by 'new' method
-
- #unless parent.kind_of?(TkCanvas)
- # fail ArgumentError, "expect TkCanvas for 1st argument"
- #end
- @c = parent
- @cpath = parent.path
- @path = @id = name
-
- if mode
- tk_call_without_enc(@c.path, "addtag", @id, mode, *args)
- end
- end
-end
-TkcNamedTag = TkcTagString
-
-class TkcTagAll<TkcTagString
- def self.new(parent)
- super(parent, 'all')
- end
-=begin
- def initialize(parent)
- #unless parent.kind_of?(TkCanvas)
- # fail ArgumentError, "expect TkCanvas for 1st argument"
- #end
- @c = parent
- @cpath = parent.path
- @path = @id = 'all'
- CTagID_TBL.mutex.synchronize{
- CTagID_TBL[@cpath] = {} unless CTagID_TBL[@cpath]
- CTagID_TBL[@cpath][@id] = self
- }
- end
-=end
-end
-
-class TkcTagCurrent<TkcTagString
- def self.new(parent)
- super(parent, 'current')
- end
-=begin
- def initialize(parent)
- #unless parent.kind_of?(TkCanvas)
- # fail ArgumentError, "expect TkCanvas for 1st argument"
- #end
- @c = parent
- @cpath = parent.path
- @path = @id = 'current'
- CTagID_TBL.mutex.synchronize{
- CTagID_TBL[@cpath] = {} unless CTagID_TBL[@cpath]
- CTagID_TBL[@cpath][@id] = self
- }
- end
-=end
-end
-
-class TkcGroup<TkcTag
- (Tk_cGroup_ID = ['tkcg'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- #def create_self(parent, *args)
- def initialize(parent, *args)
- #unless parent.kind_of?(TkCanvas)
- # fail ArgumentError, "expect TkCanvas for 1st argument"
- #end
- @c = parent
- @cpath = parent.path
- Tk_cGroup_ID.mutex.synchronize{
- # @path = @id = Tk_cGroup_ID.join('')
- @path = @id = Tk_cGroup_ID.join(TkCore::INTERP._ip_id_)
- Tk_cGroup_ID[1].succ!
- }
- CTagID_TBL.mutex.synchronize{
- CTagID_TBL[@cpath] = {} unless CTagID_TBL[@cpath]
- CTagID_TBL[@cpath][@id] = self
- }
- include(*args) if args != []
- end
- #private :create_self
-
- def include(*tags)
- for i in tags
- #i.addtag(@id)
- @c.addtag_withtag(@id, i)
- end
- self
- end
- alias add include
-
- def exclude(*tags)
- for i in tags
- #i.dtag(@id)
- @c.dtag(i, @id)
- end
- self
- end
-end
diff --git a/ext/tk/lib/tk/checkbutton.rb b/ext/tk/lib/tk/checkbutton.rb
deleted file mode 100644
index 521b015b3e..0000000000
--- a/ext/tk/lib/tk/checkbutton.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/checkbutton.rb : treat checkbutton widget
-#
-require 'tk'
-require 'tk/radiobutton'
-
-class Tk::CheckButton<Tk::RadioButton
- TkCommandNames = ['checkbutton'.freeze].freeze
- WidgetClassName = 'Checkbutton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('checkbutton', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('checkbutton', @path)
- # end
- #end
- #private :create_self
-
- def toggle
- tk_send_without_enc('toggle')
- self
- end
-end
-
-Tk::Checkbutton = Tk::CheckButton
-#TkCheckButton = Tk::CheckButton unless Object.const_defined? :TkCheckButton
-#TkCheckbutton = Tk::Checkbutton unless Object.const_defined? :TkCheckbutton
-#Tk.__set_toplevel_aliases__(:Tk, Tk::CheckButton,
-# :TkCheckButton, :TkCheckbutton)
-Tk.__set_loaded_toplevel_aliases__('tk/checkbutton.rb', :Tk, Tk::CheckButton,
- :TkCheckButton, :TkCheckbutton)
diff --git a/ext/tk/lib/tk/clipboard.rb b/ext/tk/lib/tk/clipboard.rb
deleted file mode 100644
index c5f481f979..0000000000
--- a/ext/tk/lib/tk/clipboard.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/clipboard.rb : methods to treat clipboard
-#
-require 'tk'
-
-module TkClipboard
- include Tk
- extend Tk
-
- TkCommandNames = ['clipboard'.freeze].freeze
-
- def self.clear(win=nil)
- if win
- tk_call_without_enc('clipboard', 'clear', '-displayof', win)
- else
- tk_call_without_enc('clipboard', 'clear')
- end
- end
- def self.clear_on_display(win)
- tk_call_without_enc('clipboard', 'clear', '-displayof', win)
- end
-
- def self.get(type=nil)
- if type
- tk_call_without_enc('clipboard', 'get', '-type', type)
- else
- tk_call_without_enc('clipboard', 'get')
- end
- end
- def self.get_on_display(win, type=nil)
- if type
- tk_call_without_enc('clipboard', 'get', '-displayof', win, '-type', type)
- else
- tk_call_without_enc('clipboard', 'get', '-displayof', win)
- end
- end
-
- def self.set(data, keys=nil)
- clear
- append(data, keys)
- end
- def self.set_on_display(win, data, keys=nil)
- clear(win)
- append_on_display(win, data, keys)
- end
-
- def self.append(data, keys=nil)
- args = ['clipboard', 'append']
- args.concat(hash_kv(keys))
- args.concat(['--', data])
- tk_call(*args)
- end
- def self.append_on_display(win, data, keys=nil)
- args = ['clipboard', 'append', '-displayof', win]
- args.concat(hash_kv(keys))
- args.concat(['--', data])
- tk_call(*args)
- end
-
- def clear
- TkClipboard.clear_on_display(self)
- self
- end
- def get(type=nil)
- TkClipboard.get_on_display(self, type)
- end
- def set(data, keys=nil)
- TkClipboard.set_on_display(self, data, keys)
- self
- end
- def append(data, keys=nil)
- TkClipboard.append_on_display(self, data, keys)
- self
- end
-end
diff --git a/ext/tk/lib/tk/clock.rb b/ext/tk/lib/tk/clock.rb
deleted file mode 100644
index df900d7364..0000000000
--- a/ext/tk/lib/tk/clock.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/clock.rb : methods for clock command
-#
-require 'tk'
-
-module Tk
- module Clock
- include Tk
- extend TkCore
-
- def self.add(clk, *args)
- tk_call_without_enc('clock','add', clk, *args).to_i
- end
-
- def self.clicks(ms=nil)
- ms = ms.to_s if ms.kind_of?(Symbol)
- case ms
- when nil, ''
- tk_call_without_enc('clock','clicks').to_i
- when /^mic/
- tk_call_without_enc('clock','clicks','-microseconds').to_i
- when /^mil/
- tk_call_without_enc('clock','clicks','-milliseconds').to_i
- else
- tk_call_without_enc('clock','clicks','-milliseconds').to_i
- end
- end
-
- def self.format(clk, form=nil)
- if form
- tk_call('clock','format',clk,'-format',form)
- else
- tk_call('clock','format',clk)
- end
- end
-
- def self.formatGMT(clk, form=nil)
- if form
- tk_call('clock','format',clk,'-format',form,'-gmt','1')
- else
- tk_call('clock','format',clk,'-gmt','1')
- end
- end
-
- def self.scan(str, base=nil)
- if base
- tk_call('clock','scan',str,'-base',base).to_i
- else
- tk_call('clock','scan',str).to_i
- end
- end
-
- def self.scanGMT(str, base=nil)
- if base
- tk_call('clock','scan',str,'-base',base,'-gmt','1').to_i
- else
- tk_call('clock','scan',str,'-gmt','1').to_i
- end
- end
-
- def self.seconds
- tk_call_without_enc('clock','seconds').to_i
- end
- def self.milliseconds
- tk_call_without_enc('clock','milliseconds').to_i
- end
- def self.microseconds
- tk_call_without_enc('clock','microseconds').to_i
- end
- end
-end
diff --git a/ext/tk/lib/tk/composite.rb b/ext/tk/lib/tk/composite.rb
deleted file mode 100644
index 830d383d69..0000000000
--- a/ext/tk/lib/tk/composite.rb
+++ /dev/null
@@ -1,485 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/composite.rb :
-#
-require 'tk'
-
-module TkComposite
- include Tk
- extend Tk
-
-=begin
- def initialize(parent=nil, *args)
- @delegates = {}
- @option_methods = {}
- @option_setting = {}
-
- if parent.kind_of? Hash
- keys = _symbolkey2str(parent)
- parent = keys.delete('parent')
- @frame = TkFrame.new(parent)
- @path = @epath = @frame.path
- initialize_composite(keys)
- else
- @frame = TkFrame.new(parent)
- @path = @epath = @frame.path
- initialize_composite(*args)
- end
- end
-=end
-
- def _choice_classname_of_baseframe
- base_class_name = nil
-
- klass = WidgetClassNames[self.class::WidgetClassName]
-
- if klass
- # WidgetClassName is a known class
- #if klass <= TkFrame || klass < TkComposite
- if klass <= TkFrame || klass < Tk::Frame || klass < TkComposite
- # klass is valid for the base frame
- if self.class <= klass
- # use my classname
- base_class_name = self.class.name
- if base_class_name == ''
- # anonymous class -> use ancestor's name
- base_class_name = klass.name
- end
- else
- # not subclass -> use WidgetClassName
- base_class_name = klass.name
- end
-
- else
- # klass is invalid for the base frame
- #if self.class < TkFrame || self.class.superclass < TkComposite
- if self.class < TkFrame || self.class.superclass < Tk::Frame || self.class.superclass < TkComposite
- # my class name is valid for the base frame -> use my classname
- base_class_name = self.class.name
- if base_class_name == ''
- # anonymous class -> use TkFrame
- base_class_name = nil
- end
- else
- # no idea for the base frame -> use TkFrame
- base_class_name = nil
- end
- end
-
- elsif self.class::WidgetClassName && ! self.class::WidgetClassName.empty?
- # unknown WidgetClassName is defined -> use it for the base frame
- base_class_name = self.class::WidgetClassName
-
- else
- # no valid WidgetClassName
- #if self.class < TkFrame || self.class.superclass < TkComposite
- if self.class < TkFrame || self.class.superclass < Tk::Frame || self.class.superclass < TkComposite
- # my class name is valid for the base frame -> use my classname
- base_class_name = self.class.name
- if base_class_name == ''
- # anonymous class -> use TkFrame
- base_class_name = nil
- end
- else
- # no idea for the base frame -> use TkFrame
- base_class_name = nil
- end
- end
-
- base_class_name
- end
- private :_choice_classname_of_baseframe
-
- # def initialize(parent=nil, *args)
- def initialize(*args)
- @delegates = {}
- @option_methods = {}
- @option_setting = {}
-
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- else
- keys = {}
- end
- parent = args.shift
- parent = keys.delete('parent') if keys.has_key?('parent')
-
- if keys.key?('classname')
- keys['class'] = keys.delete('classname')
- end
- if (base_class_name = (keys.delete('class')).to_s).empty?
- base_class_name = _choice_classname_of_baseframe
- end
-
- if base_class_name
- # @frame = Tk::Frame.new(parent, :class=>base_class_name)
- # --> use current TkFrame class
- @frame = TkFrame.new(parent, :class=>base_class_name)
- else
- # @frame = Tk::Frame.new(parent)
- # --> use current TkFrame class
- @frame = TkFrame.new(parent)
- end
- @path = @epath = @frame.path
-
- args.push(keys) unless keys.empty?
- initialize_composite(*args)
- end
-
- def database_classname
- @frame.database_classname
- end
-
- def database_class
- @frame.database_class
- end
-
- def epath
- @epath
- end
-
- def initialize_composite(*args) end
- private :initialize_composite
-
- def inspect
- str = super
- str.chop << ' @epath=' << @epath.inspect << '>'
- end
-
- def _get_opt_method_list(arg)
- m_set, m_cget, m_info = arg
- m_set = m_set.to_s
- m_cget = m_set if !m_cget && self.method(m_set).arity == -1
- m_cget = m_cget.to_s if m_cget
- m_info = m_info.to_s if m_info
- [m_set, m_cget, m_info]
- end
- private :_get_opt_method_list
-
- def option_methods(*opts)
- if opts.size == 1 && opts[0].kind_of?(Hash)
- # {name => [m_set, m_cget, m_info], name => method} style
- opts[0].each{|name, arg|
- m_set, m_cget, m_info = _get_opt_method_list(arg)
- @option_methods[name.to_s] = {
- :set => m_set, :cget => m_cget, :info => m_info
- }
- }
- else
- # [m_set, m_cget, m_info] or method style
- opts.each{|arg|
- m_set, m_cget, m_info = _get_opt_method_list(arg)
- @option_methods[m_set] = {
- :set => m_set, :cget => m_cget, :info => m_info
- }
- }
- end
- end
-
- def delegate_alias(alias_opt, option, *wins)
- if wins.length == 0
- fail ArgumentError, "target widgets are not given"
- end
- if alias_opt != option && (alias_opt == 'DEFAULT' || option == 'DEFAULT')
- fail ArgumentError, "cannot alias 'DEFAULT' option"
- end
- alias_opt = alias_opt.to_s
- option = option.to_s
- if @delegates[alias_opt].kind_of?(Array)
- if (elem = @delegates[alias_opt].assoc(option))
- wins.each{|w| elem[1].push(w)}
- else
- @delegates[alias_opt] << [option, wins]
- end
- else
- @delegates[alias_opt] = [ [option, wins] ]
- end
- end
-
- def delegate(option, *wins)
- delegate_alias(option, option, *wins)
- end
-
- def __cget_delegates(slot)
- slot = slot.to_s
-
- if @option_methods.include?(slot)
- if @option_methods[slot][:cget]
- return self.__send__(@option_methods[slot][:cget])
- else
- if @option_setting[slot]
- return @option_setting[slot]
- else
- return ''
- end
- end
- end
-
- tbl = @delegates[slot]
- tbl = @delegates['DEFAULT'] unless tbl
-
- begin
- if tbl
- opt, wins = tbl[-1]
- opt = slot if opt == 'DEFAULT'
- if wins && wins[-1]
- # return wins[-1].cget(opt)
- return wins[-1].cget_strict(opt)
- end
- end
- rescue
- end
-
- return None
- end
- private :__cget_delegates
-
- def cget_tkstring(slot)
- if (ret = __cget_delegates(slot)) == None
- super(slot)
- else
- _get_eval_string(ret)
- end
- end
-
- def cget(slot)
- if (ret = __cget_delegates(slot)) == None
- super(slot)
- else
- ret
- end
- end
-
- def cget_strict(slot)
- if (ret = __cget_delegates(slot)) == None
- super(slot)
- else
- ret
- end
- end
-
-=begin
- def cget(slot)
- slot = slot.to_s
-
- if @option_methods.include?(slot)
- if @option_methods[slot][:cget]
- return self.__send__(@option_methods[slot][:cget])
- else
- if @option_setting[slot]
- return @option_setting[slot]
- else
- return ''
- end
- end
- end
-
- tbl = @delegates[slot]
- tbl = @delegates['DEFAULT'] unless tbl
-
- begin
- if tbl
- opt, wins = tbl[-1]
- opt = slot if opt == 'DEFAULT'
- if wins && wins[-1]
- return wins[-1].cget(opt)
- end
- end
- rescue
- end
-
- super(slot)
- end
-=end
-
- def configure(slot, value=None)
- if slot.kind_of? Hash
- slot.each{|slot,value| configure slot, value}
- return self
- end
-
- slot = slot.to_s
-
- if @option_methods.include?(slot)
- unless @option_methods[slot][:cget]
- if value.kind_of?(Symbol)
- @option_setting[slot] = value.to_s
- else
- @option_setting[slot] = value
- end
- end
- return self.__send__(@option_methods[slot][:set], value)
- end
-
- tbl = @delegates[slot]
- tbl = @delegates['DEFAULT'] unless tbl
-
- begin
- if tbl
- last = nil
- tbl.each{|opt, wins|
- opt = slot if opt == 'DEFAULT'
- wins.each{|w| last = w.configure(opt, value)}
- }
- return last
- end
- rescue
- end
-
- super(slot, value)
- end
-
- def configinfo(slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- slot = slot.to_s
- if @option_methods.include?(slot)
- if @option_methods[slot][:info]
- return self.__send__(@option_methods[slot][:info])
- else
- return [slot, '', '', '', self.cget(slot)]
- end
- end
-
- tbl = @delegates[slot]
- tbl = @delegates['DEFAULT'] unless tbl
-
- begin
- if tbl
- if tbl.length == 1
- opt, wins = tbl[0]
- if slot == opt || opt == 'DEFAULT'
- return wins[-1].configinfo(slot)
- else
- info = wins[-1].configinfo(opt)
- info[0] = slot
- return info
- end
- else
- opt, wins = tbl[-1]
- return [slot, '', '', '', wins[-1].cget(opt)]
- end
- end
- rescue
- end
-
- super(slot)
-
- else # slot == nil
- info_list = super(slot)
-
- tbl = @delegates['DEFAULT']
- if tbl
- wins = tbl[0][1]
- if wins && wins[-1]
- wins[-1].configinfo.each{|info|
- slot = info[0]
- info_list.delete_if{|i| i[0] == slot} << info
- }
- end
- end
-
- @delegates.each{|slot, tbl|
- next if slot == 'DEFAULT'
- if tbl.length == 1
- opt, wins = tbl[0]
- next unless wins && wins[-1]
- if slot == opt
- info_list.delete_if{|i| i[0] == slot} <<
- wins[-1].configinfo(slot)
- else
- info = wins[-1].configinfo(opt)
- info[0] = slot
- info_list.delete_if{|i| i[0] == slot} << info
- end
- else
- opt, wins = tbl[-1]
- info_list.delete_if{|i| i[0] == slot} <<
- [slot, '', '', '', wins[-1].cget(opt)]
- end
- }
-
- @option_methods.each{|slot, m|
- if m[:info]
- info = self.__send__(m[:info])
- else
- info = [slot, '', '', '', self.cget(slot)]
- end
- info_list.delete_if{|i| i[0] == slot} << info
- }
-
- info_list
- end
-
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- slot = slot.to_s
- if @option_methods.include?(slot)
- if @option_methods[slot][:info]
- return self.__send__(@option_methods[slot][:info])
- else
- return {slot => ['', '', '', self.cget(slot)]}
- end
- end
-
- tbl = @delegates[slot]
- tbl = @delegates['DEFAULT'] unless tbl
-
- begin
- if tbl
- if tbl.length == 1
- opt, wins = tbl[0]
- if slot == opt || opt == 'DEFAULT'
- return wins[-1].configinfo(slot)
- else
- return {slot => wins[-1].configinfo(opt)[opt]}
- end
- else
- opt, wins = tbl[-1]
- return {slot => ['', '', '', wins[-1].cget(opt)]}
- end
- end
- rescue
- end
-
- super(slot)
-
- else # slot == nil
- info_list = super(slot)
-
- tbl = @delegates['DEFAULT']
- if tbl
- wins = tbl[0][1]
- info_list.update(wins[-1].configinfo) if wins && wins[-1]
- end
-
- @delegates.each{|slot, tbl|
- next if slot == 'DEFAULT'
- if tbl.length == 1
- opt, wins = tbl[0]
- next unless wins && wins[-1]
- if slot == opt
- info_list.update(wins[-1].configinfo(slot))
- else
- info_list.update({slot => wins[-1].configinfo(opt)[opt]})
- end
- else
- opt, wins = tbl[-1]
- info_list.update({slot => ['', '', '', wins[-1].cget(opt)]})
- end
- }
-
- @option_methods.each{|slot, m|
- if m[:info]
- info = self.__send__(m[:info])
- else
- info = {slot => ['', '', '', self.cget(slot)]}
- end
- info_list.update(info)
- }
-
- info_list
- end
- end
- end
-end
diff --git a/ext/tk/lib/tk/console.rb b/ext/tk/lib/tk/console.rb
deleted file mode 100644
index c560912da8..0000000000
--- a/ext/tk/lib/tk/console.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/console.rb : control the console on system without a real console
-#
-require 'tk'
-
-module TkConsole
- include Tk
- extend Tk
-
- TkCommandNames = ['console'.freeze, 'consoleinterp'.freeze].freeze
-
- def self.create
- TkCore::INTERP._create_console
- end
- self.create # initialize console
-
- def self.title(str=None)
- tk_call 'console', str
- end
- def self.hide
- tk_call_without_enc('console', 'hide')
- end
- def self.show
- tk_call_without_enc('console', 'show')
- end
- def self.eval(tcl_script)
- #
- # supports a Tcl script only
- # I have no idea to support a Ruby script seamlessly.
- #
- _fromUTF8(tk_call_without_enc('console', 'eval',
- _get_eval_enc_str(tcl_script)))
- end
- def self.maininterp_eval(tcl_script)
- #
- # supports a Tcl script only
- # I have no idea to support a Ruby script seamlessly.
- #
- _fromUTF8(tk_call_without_enc('consoleinterp', 'eval',
- _get_eval_enc_str(tcl_script)))
-
- end
- def self.maininterp_record(tcl_script)
- #
- # supports a Tcl script only
- # I have no idea to support a Ruby script seamlessly.
- #
- _fromUTF8(tk_call_without_enc('consoleinterp', 'record',
- _get_eval_enc_str(tcl_script)))
-
- end
-end
diff --git a/ext/tk/lib/tk/dialog.rb b/ext/tk/lib/tk/dialog.rb
deleted file mode 100644
index 0b19be7cfa..0000000000
--- a/ext/tk/lib/tk/dialog.rb
+++ /dev/null
@@ -1,327 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/dialog.rb : create dialog boxes
-#
-require 'tk'
-require 'tk/variable.rb'
-
-class TkDialogObj < TkWindow
- extend Tk
-
- TkCommandNames = ['tk_dialog'.freeze].freeze
-
- def self.show(*args)
- dlog = self.new(*args)
- dlog.show
- dlog
- end
-
- def _set_button_config(configs)
- set_config = proc{|c,i|
- if $VERBOSE && (c.has_key?('command') || c.has_key?(:command))
- STDERR.print("Warning: cannot give a command option " +
- "to the dialog button#{i}. It was removed.\n")
- end
- c.delete('command'); c.delete(:command)
- # @config << Kernel.format("%s.button%s configure %s; ",
- # @path, i, hash_kv(c).join(' '))
- # @config << @path+'.button'+i.to_s+' configure '+hash_kv(c).join(' ')+'; '
- @config << @path+'.button'+i.to_s+' configure '+
- array2tk_list(hash_kv(c))+'; '
- }
- case configs
- when Proc
- @buttons.each_index{|i|
- if (c = configs.call(i)).kind_of?(Hash)
- set_config.call(c,i)
- end
- }
-
- when Array
- @buttons.each_index{|i|
- if (c = configs[i]).kind_of?(Hash)
- set_config.call(c,i)
- end
- }
-
- when Hash
- @buttons.each_with_index{|s,i|
- if (c = configs[s]).kind_of?(Hash)
- set_config.call(c,i)
- end
- }
- end
- # @config = 'after idle {' + @config + '};' if @config != ""
- @config = array2tk_list(['after', 'idle', @config]) << ';' if @config != ""
- end
- private :_set_button_config
-
- # initialize tk_dialog
- def create_self(keys)
- # @var = TkVariable.new
- @val = nil
-
- @title = title
-
- @message = message
- @message_config = message_config
- @msgframe_config = msgframe_config
-
- @bitmap = bitmap
- @bitmap_config = message_config
-
- @default_button = default_button
-
- @buttons = buttons
- @button_configs = proc{|num| button_configs(num)}
- @btnframe_config = btnframe_config
-
- #@config = "puts [winfo children .w0000];"
- @config = ""
-
- @command = prev_command
-
- if keys.kind_of?(Hash)
- @title = keys['title'] if keys.key? 'title'
- @message = keys['message'] if keys.key? 'message'
- @bitmap = keys['bitmap'] if keys.key? 'bitmap'
- # @bitmap = '{}' if @bitmap == nil || @bitmap == ""
- @bitmap = '' unless @bitmap
- @default_button = keys['default'] if keys.key? 'default'
- @buttons = keys['buttons'] if keys.key? 'buttons'
-
- @command = keys['prev_command'] if keys.key? 'prev_command'
-
- @message_config = keys['message_config'] if keys.key? 'message_config'
- @msgframe_config = keys['msgframe_config'] if keys.key? 'msgframe_config'
- @bitmap_config = keys['bitmap_config'] if keys.key? 'bitmap_config'
- @button_configs = keys['button_configs'] if keys.key? 'button_configs'
- @btnframe_config = keys['btnframe_config'] if keys.key? 'btnframe_config'
- end
-
- #if @title.include? ?\s
- # @title = '{' + @title + '}'
- #end
-
- if @buttons.kind_of?(Array)
- _set_button_config(@buttons.collect{|cfg|
- (cfg.kind_of? Array)? cfg[1]: nil})
- @buttons = @buttons.collect{|cfg| (cfg.kind_of? Array)? cfg[0]: cfg}
- end
- if @buttons.kind_of?(Hash)
- _set_button_config(@buttons)
- @buttons = @buttons.keys
- end
- @buttons = tk_split_simplelist(@buttons) if @buttons.kind_of?(String)
- @buttons = [] unless @buttons
-=begin
- @buttons = @buttons.collect{|s|
- if s.kind_of?(Array)
- s = s.join(' ')
- end
- if s.include? ?\s
- '{' + s + '}'
- else
- s
- end
- }
-=end
-
- if @message_config.kind_of?(Hash)
- # @config << Kernel.format("%s.msg configure %s;",
- # @path, hash_kv(@message_config).join(' '))
- # @config << @path+'.msg configure '+hash_kv(@message_config).join(' ')+';'
- @config << @path+'.msg configure '+
- array2tk_list(hash_kv(@message_config))+';'
- end
-
- if @msgframe_config.kind_of?(Hash)
- # @config << Kernel.format("%s.top configure %s;",
- # @path, hash_kv(@msgframe_config).join(' '))
- # @config << @path+'.top configure '+hash_kv(@msgframe_config).join(' ')+';'
- @config << @path+'.top configure '+
- array2tk_list(hash_kv(@msgframe_config))+';'
- end
-
- if @btnframe_config.kind_of?(Hash)
- # @config << Kernel.format("%s.bot configure %s;",
- # @path, hash_kv(@btnframe_config).join(' '))
- # @config << @path+'.bot configure '+hash_kv(@btnframe_config).join(' ')+';'
- @config << @path+'.bot configure '+
- array2tk_list(hash_kv(@btnframe_config))+';'
- end
-
- if @bitmap_config.kind_of?(Hash)
- # @config << Kernel.format("%s.bitmap configure %s;",
- # @path, hash_kv(@bitmap_config).join(' '))
- # @config << @path+'.bitmap configure '+hash_kv(@bitmap_config).join(' ')+';'
- @config << @path+'.bitmap configure '+
- array2tk_list(hash_kv(@bitmap_config))+';'
- end
-
- _set_button_config(@button_configs) if @button_configs
- end
- private :create_self
-
- def show
- # if @command.kind_of?(Proc)
- if TkComm._callback_entry?(@command)
- @command.call(self)
- end
-
- if @default_button.kind_of?(String)
- default_button = @buttons.index(@default_button)
- else
- default_button = @default_button
- end
- # default_button = '{}' if default_button == nil
- default_button = '' if default_button == nil
- #Tk.ip_eval('eval {global '+@var.id+';'+@config+
- # 'set '+@var.id+' [tk_dialog '+
- # @path+" "+@title+" {#{@message}} "+@bitmap+" "+
- # String(default_button)+" "+@buttons.join(' ')+']}')
- Tk.ip_eval(@config)
- # @val = Tk.ip_eval('tk_dialog ' + @path + ' ' + @title +
- # ' {' + @message + '} ' + @bitmap + ' ' +
- # String(default_button) + ' ' + @buttons.join(' ')).to_i
- # @val = Tk.ip_eval(self.class::TkCommandNames[0] + ' ' + @path + ' ' +
- # @title + ' {' + @message + '} ' + @bitmap + ' ' +
- # String(default_button) + ' ' + @buttons.join(' ')).to_i
- @val = Tk.ip_eval(array2tk_list([
- self.class::TkCommandNames[0],
- @path, @title, @message, @bitmap,
- String(default_button)
- ].concat(@buttons))).to_i
- end
-
- def value
- # @var.value.to_i
- @val
- end
-
- def name
- (@val)? @buttons[@val]: nil
- end
-
- ############################################################
- # #
- # following methods should be overridden for each dialog #
- # #
- ############################################################
- private
-
- def title
- # returns a title string of the dialog window
- return "DIALOG"
- end
- def message
- # returns a message text to display on the dialog
- return "MESSAGE"
- end
- def message_config
- # returns a Hash {option=>value, ...} for the message text
- return nil
- end
- def msgframe_config
- # returns a Hash {option=>value, ...} for the message text frame
- return nil
- end
- def bitmap
- # returns a bitmap name or a bitmap file path
- # (@ + path ; e.g. '@/usr/share/bitmap/sample.xbm')
- return "info"
- end
- def bitmap_config
- # returns nil or a Hash {option=>value, ...} for the bitmap
- return nil
- end
- def default_button
- # returns a default button's number or name
- # if nil or null string, set no-default
- return 0
- end
- def buttons
- #return "BUTTON1 BUTTON2"
- return ["BUTTON1", "BUTTON2"]
- end
- def button_configs(num)
- # returns nil / Proc / Array or Hash (see _set_button_config)
- return nil
- end
- def btnframe_config
- # returns nil or a Hash {option=>value, ...} for the button frame
- return nil
- end
- def prev_command
- # returns nil or a Proc
- return nil
- end
-end
-TkDialog2 = TkDialogObj
-
-#
-# TkDialog : with showing at initialize
-#
-class TkDialog < TkDialogObj
- def self.show(*args)
- self.new(*args)
- end
-
- def initialize(*args)
- super(*args)
- show
- end
-end
-
-
-#
-# dialog for warning
-#
-class TkWarningObj < TkDialogObj
- def initialize(parent = nil, mes = nil)
- if !mes
- if parent.kind_of?(TkWindow)
- mes = ""
- else
- mes = parent.to_s
- parent = nil
- end
- end
- super(parent, :message=>mes)
- end
-
- def show(mes = nil)
- mes_bup = @message
- @message = mes if mes
- ret = super()
- @message = mes_bup
- ret
- end
-
- #######
- private
-
- def title
- return "WARNING";
- end
- def bitmap
- return "warning";
- end
- def default_button
- return 0;
- end
- def buttons
- return "OK";
- end
-end
-TkWarning2 = TkWarningObj
-
-class TkWarning < TkWarningObj
- def self.show(*args)
- self.new(*args)
- end
- def initialize(*args)
- super(*args)
- show
- end
-end
diff --git a/ext/tk/lib/tk/encodedstr.rb b/ext/tk/lib/tk/encodedstr.rb
deleted file mode 100644
index 9ca13b3d1a..0000000000
--- a/ext/tk/lib/tk/encodedstr.rb
+++ /dev/null
@@ -1,188 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/encodedstr.rb : Tk::EncodedString class
-#
-require 'tk'
-
-###########################################
-# string with Tcl's encoding
-###########################################
-module Tk
- class EncodedString < String
- Encoding = nil
-
- def self.subst_utf_backslash(str)
- # str.gsub(/\\u([0-9A-Fa-f]{1,4})/){[$1.hex].pack('U')}
- TclTkLib._subst_UTF_backslash(str)
- end
- def self.utf_backslash(str)
- self.subst_utf_backslash(str)
- end
-
- def self.subst_tk_backslash(str)
- TclTkLib._subst_Tcl_backslash(str)
- end
-
- def self.utf_to_backslash_sequence(str)
- str.unpack('U*').collect{|c|
- if c <= 0xFF # ascii character
- c.chr
- else
- format('\u%X', c)
- end
- }.join('')
- end
- def self.utf_to_backslash(str)
- self.utf_to_backslash_sequence(str)
- end
-
- def self.to_backslash_sequence(str)
- str.unpack('U*').collect{|c|
- if c <= 0x1F # control character
- case c
- when 0x07; '\a'
- when 0x08; '\b'
- when 0x09; '\t'
- when 0x0a; '\n'
- when 0x0b; '\v'
- when 0x0c; '\f'
- when 0x0d; '\r'
- else
- format('\x%02X', c)
- end
- elsif c <= 0xFF # ascii character
- c.chr
- else
- format('\u%X', c)
- end
- }.join('')
- end
-
- def self.new_with_utf_backslash(str, enc = nil)
- self.new('', enc).replace(self.subst_utf_backslash(str))
- end
-
- def self.new_without_utf_backslash(str, enc = nil)
- self.new('', enc).replace(str)
- end
-
- def initialize(str, enc = nil)
- super(str)
- # @encoding = ( enc ||
- # ((self.class::Encoding)?
- # self.class::Encoding : Tk.encoding_system) )
- enc ||= (self.class::Encoding)?
- self.class::Encoding :
- ((Tk.encoding)? Tk.encoding : Tk.encoding_system)
- if TkCore::WITH_ENCODING
- unless encobj = Tk::Encoding::ENCODING_TABLE.get_obj(enc)
- fail ArgumentError, "unsupported Tk encoding '#{enc}'"
- end
- self.force_encoding(encobj)
- else
- @encoding = enc
- end
- end
-
- if TkCore::WITH_ENCODING
- alias encoding_obj encoding
- alias __encoding encoding
- def encoding
- Tk::Encoding::ENCODING_TABLE.get_name(super())
- end
- else
- def encoding
- @encoding
- end
- alias encoding_obj encoding
- end
-
- if TkCore::WITH_ENCODING
- # wrapper methods for compatibility
- alias __instance_variable_get instance_variable_get
- alias __instance_variable_set instance_variable_set
- alias __instance_eval instance_eval
- alias __instance_variables instance_variables
-
- def instance_variable_get(key)
- if (key.to_s == '@encoding')
- self.encoding
- else
- super(key)
- end
- end
-
- def instance_variable_set(key, value)
- if (key.to_s == '@encoding')
- if value
- self.force_encoding(value)
- else
- self.force_encoding(Tk::Encoding::UNKNOWN)
- end
- value
- else
- super(key, value)
- end
- end
-
- def instance_eval(*args, &b)
- old_enc = @encoding = self.encoding
-
- ret = super(*args, &b)
-
- if @encoding
- if @encoding != old_enc
- # modified by user
- self.force_encoding(@encoding)
- end
- remove_instance_variable(:@encoding)
- else
- begin
- remove_instance_variable(:@encoding)
- # user sets to nil -> use current default
- self.force_encoding(Tk.encoding)
- rescue NameError
- # removed by user -> ignore, because user don't use @encoding
- end
- end
- ret
- end
- end
-
- def instance_variables
- ret = super()
- ret << :@encoding # fake !!
- ret
- end
- end
- # def Tk.EncodedString(str, enc = nil)
- # Tk::EncodedString.new(str, enc)
- # end
-
- ##################################
-
- class BinaryString < EncodedString
- Encoding = 'binary'.freeze
- end
- # def Tk.BinaryString(str)
- # Tk::BinaryString.new(str)
- # end
-
- ##################################
-
- class UTF8_String < EncodedString
- Encoding = 'utf-8'.freeze
- def self.new(str)
- super(self.subst_utf_backslash(str))
- end
-
- def to_backslash_sequence
- Tk::EncodedString.utf_to_backslash_sequence(self)
- end
- alias to_backslash to_backslash_sequence
- end
- # def Tk.UTF8_String(str)
- # Tk::UTF8_String.new(str)
- # end
-
-end
diff --git a/ext/tk/lib/tk/entry.rb b/ext/tk/lib/tk/entry.rb
deleted file mode 100644
index aa40e4755c..0000000000
--- a/ext/tk/lib/tk/entry.rb
+++ /dev/null
@@ -1,121 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/entry.rb - Tk entry classes
-# by Yukihiro Matsumoto <matz@caelum.co.jp>
-
-require 'tk'
-require 'tk/label'
-require 'tk/scrollable'
-require 'tk/validation'
-
-class Tk::Entry<Tk::Label
- include X_Scrollable
- include TkValidation
-
- TkCommandNames = ['entry'.freeze].freeze
- WidgetClassName = 'Entry'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- #def create_self(keys)
- # super(__conv_vcmd_on_hash_kv(keys))
- #end
- #private :create_self
-
- def __strval_optkeys
- super() + ['show', 'disabledbackground', 'readonlybackground']
- end
- private :__strval_optkeys
-
- def bbox(index)
- list(tk_send_without_enc('bbox', index))
- end
- def cursor
- number(tk_send_without_enc('index', 'insert'))
- end
- alias icursor cursor
- def cursor=(index)
- tk_send_without_enc('icursor', index)
- #self
- index
- end
- alias icursor= cursor=
- def index(idx)
- number(tk_send_without_enc('index', idx))
- end
- def insert(pos,text)
- tk_send_without_enc('insert', pos, _get_eval_enc_str(text))
- self
- end
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
- def mark(pos)
- tk_send_without_enc('scan', 'mark', pos)
- self
- end
- def dragto(pos)
- tk_send_without_enc('scan', 'dragto', pos)
- self
- end
- def selection_adjust(index)
- tk_send_without_enc('selection', 'adjust', index)
- self
- end
- def selection_clear
- tk_send_without_enc('selection', 'clear')
- self
- end
- def selection_from(index)
- tk_send_without_enc('selection', 'from', index)
- self
- end
- def selection_present()
- bool(tk_send_without_enc('selection', 'present'))
- end
- def selection_range(s, e)
- tk_send_without_enc('selection', 'range', s, e)
- self
- end
- def selection_to(index)
- tk_send_without_enc('selection', 'to', index)
- self
- end
-
- def invoke_validate
- bool(tk_send_without_enc('validate'))
- end
- def validate(mode = nil)
- if mode
- configure 'validate', mode
- else
- invoke_validate
- end
- end
-
- def value
- _fromUTF8(tk_send_without_enc('get'))
- end
- def value= (val)
- tk_send_without_enc('delete', 0, 'end')
- tk_send_without_enc('insert', 0, _get_eval_enc_str(val))
- val
- end
- alias get value
- alias set value=
-
- def [](*args)
- self.value[*args]
- end
- def []=(*args)
- val = args.pop
- str = self.value
- str[*args] = val
- self.value = str
- val
- end
-end
-
-#TkEntry = Tk::Entry unless Object.const_defined? :TkEntry
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Entry, :TkEntry)
-Tk.__set_loaded_toplevel_aliases__('tk/entry.rb', :Tk, Tk::Entry, :TkEntry)
diff --git a/ext/tk/lib/tk/event.rb b/ext/tk/lib/tk/event.rb
deleted file mode 100644
index 5658e92874..0000000000
--- a/ext/tk/lib/tk/event.rb
+++ /dev/null
@@ -1,563 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/event.rb - module for event
-#
-
-module TkEvent
-end
-
-########################
-
-require 'tkutil'
-require 'tk' unless Object.const_defined? :TkComm
-
-########################
-
-module TkEvent
- class Event < TkUtil::CallbackSubst
- module Grp
- KEY = 0x1
- BUTTON = 0x2
- MOTION = 0x4
- CROSSING = 0x8
- FOCUS = 0x10
- EXPOSE = 0x20
- VISIBILITY = 0x40
- CREATE = 0x80
- DESTROY = 0x100
- UNMAP = 0x200
- MAP = 0x400
- REPARENT = 0x800
- CONFIG = 0x1000
- GRAVITY = 0x2000
- CIRC = 0x4000
- PROP = 0x8000
- COLORMAP = 0x10000
- VIRTUAL = 0x20000
- ACTIVATE = 0x40000
- MAPREQ = 0x80000
- CONFIGREQ = 0x100000
- RESIZEREQ = 0x200000
- CIRCREQ = 0x400000
-
- MWHEEL = KEY
-
- STRING_DATA = 0x80000000 # special flag for 'data' field
-
- ALL = 0xFFFFFFFF
-
- KEY_BUTTON_MOTION_VIRTUAL = (KEY|MWHEEL|BUTTON|MOTION|VIRTUAL)
- KEY_BUTTON_MOTION_CROSSING = (KEY|MWHEEL|BUTTON|MOTION|CROSSING|VIRTUAL)
- end
-
- type_data = [
- #-----+-------------------+------------------+-----------------------#
- # ID | const | group_flag | context_name #
- #-----+-------------------+------------------+-----------------------#
- [ 2, :KeyPress, Grp::KEY, 'KeyPress', 'Key' ],
- [ 3, :KeyRelease, Grp::KEY, 'KeyRelease' ],
- [ 4, :ButtonPress, Grp::BUTTON, 'ButtonPress', 'Button' ],
- [ 5, :ButtonRelease, Grp::BUTTON, 'ButtonRelease' ],
- [ 6, :MotionNotify, Grp::MOTION, 'Motion' ],
- [ 7, :EnterNotify, Grp::CROSSING, 'Enter' ],
- [ 8, :LeaveNotify, Grp::CROSSING, 'Leave' ],
- [ 9, :FocusIn, Grp::FOCUS, 'FocusIn' ],
- [ 10, :FocusOut, Grp::FOCUS, 'FocusOut' ],
- [ 11, :KeymapNotify, 0, ],
- [ 12, :Expose, Grp::EXPOSE, 'Expose' ],
- [ 13, :GraphicsExpose, Grp::EXPOSE, ],
- [ 14, :NoExpose, 0, ],
- [ 15, :VisibilityNotify, Grp::VISIBILITY, 'Visibility' ],
- [ 16, :CreateNotify, Grp::CREATE, 'Create' ],
- [ 17, :DestroyNotify, Grp::DESTROY, 'Destroy' ],
- [ 18, :UnmapNotify, Grp::UNMAP, 'Unmap' ],
- [ 19, :MapNotify, Grp::MAP, 'Map' ],
- [ 20, :MapRequest, Grp::MAPREQ, 'MapRequest' ],
- [ 21, :ReparentNotify, Grp::REPARENT, 'Reparent' ],
- [ 22, :ConfigureNotify, Grp::CONFIG, 'Configure' ],
- [ 23, :ConfigureRequest, Grp::CONFIGREQ, 'ConfigureRequest' ],
- [ 24, :GravityNotify, Grp::GRAVITY, 'Gravity' ],
- [ 25, :ResizeRequest, Grp::RESIZEREQ, 'ResizeRequest' ],
- [ 26, :CirculateNotify, Grp::CIRC, 'Circulate' ],
- [ 27, :CirculateRequest, 0, 'CirculateRequest' ],
- [ 28, :PropertyNotify, Grp::PROP, 'Property' ],
- [ 29, :SelectionClear, 0, ],
- [ 30, :SelectionRequest, 0, ],
- [ 31, :SelectionNotify, 0, ],
- [ 32, :ColormapNotify, Grp::COLORMAP, 'Colormap' ],
- [ 33, :ClientMessage, 0, ],
- [ 34, :MappingNotify, 0, ],
- [ 35, :VirtualEvent, Grp::VIRTUAL, ],
- [ 36, :ActivateNotify, Grp::ACTIVATE, 'Activate' ],
- [ 37, :DeactivateNotify, Grp::ACTIVATE, 'Deactivate' ],
- [ 38, :MouseWheelEvent, Grp::MWHEEL, 'MouseWheel' ],
- [ 39, :TK_LASTEVENT, 0, ]
- ]
-
- module TypeNum
- end
-
- TYPE_NAME_TBL = Hash.new
- TYPE_ID_TBL = Hash.new
- TYPE_GROUP_TBL = Hash.new
-
- type_data.each{|id, c_name, g_flag, *t_names|
- TypeNum.const_set(c_name, id)
- t_names.each{|t_name| t_name.freeze; TYPE_NAME_TBL[t_name] = id }
- TYPE_ID_TBL[id] = t_names
- TYPE_GROUP_TBL[id] = g_flag
- }
-
- TYPE_NAME_TBL.freeze
- TYPE_ID_TBL.freeze
-
- def self.type_id(name)
- TYPE_NAME_TBL[name.to_s]
- end
-
- def self.type_name(id)
- TYPE_ID_TBL[id] && TYPE_ID_TBL[id][0]
- end
-
- def self.group_flag(id)
- TYPE_GROUP_TBL[id] || 0
- end
-
- #############################################
-
- module StateMask
- ShiftMask = (1<<0)
- LockMask = (1<<1)
- ControlMask = (1<<2)
- Mod1Mask = (1<<3)
- Mod2Mask = (1<<4)
- Mod3Mask = (1<<5)
- Mod4Mask = (1<<6)
- Mod5Mask = (1<<7)
- Button1Mask = (1<<8)
- Button2Mask = (1<<9)
- Button3Mask = (1<<10)
- Button4Mask = (1<<11)
- Button5Mask = (1<<12)
-
- AnyModifier = (1<<15)
-
- META_MASK = (AnyModifier<<1)
- ALT_MASK = (AnyModifier<<2)
- EXTENDED_MASK = (AnyModifier<<3)
-
- CommandMask = Mod1Mask
- OptionMask = Mod2Mask
- end
-
- #############################################
-
- FIELD_FLAG = {
- # key => flag
- 'above' => Grp::CONFIG,
- 'borderwidth' => (Grp::CREATE|Grp::CONFIG),
- 'button' => Grp::BUTTON,
- 'count' => Grp::EXPOSE,
- 'data' => (Grp::VIRTUAL|Grp::STRING_DATA),
- 'delta' => Grp::MWHEEL,
- 'detail' => (Grp::FOCUS|Grp::CROSSING),
- 'focus' => Grp::CROSSING,
- 'height' => (Grp::EXPOSE|Grp::CONFIG),
- 'keycode' => Grp::KEY,
- 'keysym' => Grp::KEY,
- 'mode' => (Grp::CROSSING|Grp::FOCUS),
- 'override' => (Grp::CREATE|Grp::MAP|Grp::REPARENT|Grp::CONFIG),
- 'place' => Grp::CIRC,
- 'root' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING),
- 'rootx' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING),
- 'rooty' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING),
- 'sendevent' => Grp::ALL,
- 'serial' => Grp::ALL,
- 'state' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|
- Grp::CROSSING|Grp::VISIBILITY),
- 'subwindow' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING),
- 'time' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING|
- Grp::PROP),
- 'warp' => Grp::KEY_BUTTON_MOTION_VIRTUAL,
- 'width' => (Grp::EXPOSE|Grp::CREATE|Grp::CONFIG),
- 'window' => (Grp::CREATE|Grp::UNMAP|Grp::MAP|Grp::REPARENT|
- Grp::CONFIG|Grp::GRAVITY|Grp::CIRC),
- 'when' => Grp::ALL,
- 'x' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING|
- Grp::EXPOSE|Grp::CREATE|Grp::CONFIG|Grp::GRAVITY|
- Grp::REPARENT),
- 'y' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING|
- Grp::EXPOSE|Grp::CREATE|Grp::CONFIG|Grp::GRAVITY|
- Grp::REPARENT),
- }
-
- FIELD_OPERATION = {
- 'root' => proc{|val|
- begin
- Tk.tk_call_without_enc('winfo', 'pathname', val)
- val
- rescue
- nil
- end
- },
-
- 'subwindow' => proc{|val|
- begin
- Tk.tk_call_without_enc('winfo', 'pathname', val)
- val
- rescue
- nil
- end
- },
-
- 'window' => proc{|val| nil}
- }
-
- #-------------------------------------------
-
- def valid_fields(group_flag=nil)
- group_flag = self.class.group_flag(self.type) unless group_flag
-
- fields = {}
- FIELD_FLAG.each{|key, flag|
- next if (flag & group_flag) == 0
- begin
- val = self.__send__(key)
- rescue
- next
- end
- # next if !val || val == '??'
- next if !val || (val == '??' && (flag & Grp::STRING_DATA))
- fields[key] = val
- }
-
- fields
- end
-
- def valid_for_generate(group_flag=nil)
- fields = valid_fields(group_flag)
-
- FIELD_OPERATION.each{|key, cmd|
- next unless fields.has_key?(key)
- val = FIELD_OPERATION[key].call(fields[key])
- if val
- fields[key] = val
- else
- fields.delete(key)
- end
- }
-
- fields
- end
-
- def generate(win, modkeys={})
- klass = self.class
-
- if modkeys.has_key?(:type) || modkeys.has_key?('type')
- modkeys = TkComm._symbolkey2str(modkeys)
- type_id = modkeys.delete('type')
- else
- type_id = self.type
- end
-
- type_name = klass.type_name(type_id)
- unless type_name
- fail RuntimeError, "type_id #{type_id} is invalid"
- end
-
- group_flag = klass.group_flag(type_id)
-
- opts = valid_for_generate(group_flag)
-
- modkeys.each{|key, val|
- if val
- opts[key.to_s] = val
- else
- opts.delete(key.to_s)
- end
- }
-
- if group_flag != Grp::KEY
- Tk.event_generate(win, type_name, opts)
- else
- # If type is KEY event, focus should be set to target widget.
- # If not set, original widget will get the same event.
- # That will make infinite loop.
- w = Tk.tk_call_without_enc('focus')
- begin
- Tk.tk_call_without_enc('focus', win)
- Tk.event_generate(win, type_name, opts)
- ensure
- Tk.tk_call_without_enc('focus', w)
- end
- end
- end
-
- #############################################
-
- # [ <'%' subst-key char>, <proc type char>, <instance var (accessor) name>]
- KEY_TBL = [
- [ ?#, ?n, :serial ],
- [ ?a, ?s, :above ],
- [ ?b, ?n, :num ],
- [ ?c, ?n, :count ],
- [ ?d, ?s, :detail ],
- # ?e
- [ ?f, ?b, :focus ],
- # ?g
- [ ?h, ?n, :height ],
- [ ?i, ?s, :win_hex ],
- # ?j
- [ ?k, ?n, :keycode ],
- # ?l
- [ ?m, ?s, :mode ],
- # ?n
- [ ?o, ?b, :override ],
- [ ?p, ?s, :place ],
- # ?q
- # ?r
- [ ?s, ?x, :state ],
- [ ?t, ?n, :time ],
- # ?u
- [ ?v, ?n, :value_mask ],
- [ ?w, ?n, :width ],
- [ ?x, ?n, :x ],
- [ ?y, ?n, :y ],
- # ?z
- [ ?A, ?s, :char ],
- [ ?B, ?n, :borderwidth ],
- # ?C
- [ ?D, ?n, :wheel_delta ],
- [ ?E, ?b, :send_event ],
- # ?F
- # ?G
- # ?H
- # ?I
- # ?J
- [ ?K, ?s, :keysym ],
- # ?L
- # ?M
- [ ?N, ?n, :keysym_num ],
- # ?O
- [ ?P, ?s, :property ],
- # ?Q
- [ ?R, ?s, :rootwin_id ],
- [ ?S, ?s, :subwindow ],
- [ ?T, ?n, :type ],
- # ?U
- # ?V
- [ ?W, ?w, :widget ],
- [ ?X, ?n, :x_root ],
- [ ?Y, ?n, :y_root ],
- # ?Z
- nil
- ]
-
- # [ <'%' subst-key str>, <proc type char>, <instance var (accessor) name>]
- # the subst-key string will be converted to a bytecode (128+idx).
- LONGKEY_TBL = [
- # for example, for %CTT and %CST subst-key on tkdnd-2.0
- # ['CTT', ?l, :drop_target_type],
- # ['CST', ?l, :drop_source_type],
- ]
-
- # [ <proc type char>, <proc/method to convert tcl-str to ruby-obj>]
- PROC_TBL = [
- [ ?n, TkComm.method(:num_or_str) ],
- [ ?s, TkComm.method(:string) ],
- [ ?b, TkComm.method(:bool) ],
- [ ?w, TkComm.method(:window) ],
-
- [ ?x, proc{|val|
- begin
- TkComm::number(val)
- rescue ArgumentError
- val
- end
- }
- ],
-
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- # setup tables to be used by scan_args, _get_subst_key, _get_all_subst_keys
- #
- # _get_subst_key() and _get_all_subst_keys() generates key-string
- # which describe how to convert callback arguments to ruby objects.
- # When binding parameters are given, use _get_subst_key().
- # But when no parameters are given, use _get_all_subst_keys() to
- # create a Event class object as a callback parameter.
- #
- # scan_args() is used when doing callback. It convert arguments
- # ( which are Tcl strings ) to ruby objects based on the key string
- # that is generated by _get_subst_key() or _get_all_subst_keys().
- #
- _setup_subst_table(KEY_TBL, PROC_TBL)
- # _setup_subst_table(KEY_TBL, LONGKEY_TBL, PROC_TBL) # if use longname-keys
-
- #
- # NOTE: The order of parameters which passed to callback procedure is
- # <extra_arg>, <extra_arg>, ... , <subst_arg>, <subst_arg>, ...
- #
-
- # If you need support extra arguments given by Tcl/Tk,
- # please override _get_extra_args_tbl
- #
- #def self._get_extra_args_tbl
- # # return an array of convert procs
- # []
- #end
-
-=begin
- alias button num
- alias delta wheel_delta
- alias root rootwin_id
- alias rootx x_root
- alias root_x x_root
- alias rooty y_root
- alias root_y y_root
- alias sendevent send_event
-=end
- ALIAS_TBL = {
- :button => :num,
- :data => :detail,
- :delta => :wheel_delta,
- :root => :rootwin_id,
- :rootx => :x_root,
- :root_x => :x_root,
- :rooty => :y_root,
- :root_y => :y_root,
- :sendevent => :send_event,
- :window => :widget
- }
-
- _define_attribute_aliases(ALIAS_TBL)
-
- end
-
- ###############################################
-
- def install_bind_for_event_class(klass, cmd, *args)
- extra_args_tbl = klass._get_extra_args_tbl
-
- if args.compact.size > 0
- args.map!{|arg| klass._sym2subst(arg)}
- args = args.join(' ')
- keys = klass._get_subst_key(args)
-
- if cmd.kind_of?(String)
- id = cmd
- elsif cmd.kind_of?(TkCallbackEntry)
- id = install_cmd(cmd)
- else
- id = install_cmd(proc{|*arg|
- ex_args = []
- extra_args_tbl.reverse_each{|conv| ex_args << conv.call(arg.pop)}
- begin
- TkUtil.eval_cmd(cmd, *(ex_args.concat(klass.scan_args(keys, arg))))
- rescue Exception=>e
- if TkCore::INTERP.kind_of?(TclTkIp)
- fail e
- else
- # MultiTkIp
- fail Exception, "#{e.class}: #{e.message.dup}"
- end
- end
- })
- end
- elsif cmd.respond_to?(:arity) && cmd.arity == 0 # args.size == 0
- args = ''
- if cmd.kind_of?(String)
- id = cmd
- elsif cmd.kind_of?(TkCallbackEntry)
- id = install_cmd(cmd)
- else
- id = install_cmd(proc{
- begin
- TkUtil.eval_cmd(cmd)
- rescue Exception=>e
- if TkCore::INTERP.kind_of?(TclTkIp)
- fail e
- else
- # MultiTkIp
- fail Exception, "#{e.class}: #{e.message.dup}"
- end
- end
- })
- end
- else
- keys, args = klass._get_all_subst_keys
-
- if cmd.kind_of?(String)
- id = cmd
- elsif cmd.kind_of?(TkCallbackEntry)
- id = install_cmd(cmd)
- else
- id = install_cmd(proc{|*arg|
- ex_args = []
- extra_args_tbl.reverse_each{|conv| ex_args << conv.call(arg.pop)}
- begin
- TkUtil.eval_cmd(cmd, *(ex_args << klass.new(*klass.scan_args(keys, arg))))
- rescue Exception=>e
- if TkCore::INTERP.kind_of?(TclTkIp)
- fail e
- else
- # MultiTkIp
- fail Exception, "#{e.class}: #{e.message.dup}"
- end
- end
- })
- end
- end
-
- if TkCore::INTERP.kind_of?(TclTkIp)
- id + ' ' + args
- else
- # MultiTkIp
- "if {[set st [catch {#{id} #{args}} ret]] != 0} {
- if {$st == 4} {
- return -code continue $ret
- } elseif {$st == 3} {
- return -code break $ret
- } elseif {$st == 2} {
- return -code return $ret
- } elseif {[regexp {^Exception: (TkCallbackContinue: .*)$} \
- $ret m msg]} {
- return -code continue $msg
- } elseif {[regexp {^Exception: (TkCallbackBreak: .*)$} $ret m msg]} {
- return -code break $msg
- } elseif {[regexp {^Exception: (TkCallbackReturn: .*)$} $ret m msg]} {
- return -code return $msg
- } elseif {[regexp {^Exception: (\\S+: .*)$} $ret m msg]} {
- return -code return $msg
- } else {
- return -code error $ret
- }
- } else {
- set ret
- }"
- end
- end
-
- def install_bind(cmd, *args)
- install_bind_for_event_class(TkEvent::Event, cmd, *args)
- end
-end
diff --git a/ext/tk/lib/tk/font.rb b/ext/tk/lib/tk/font.rb
deleted file mode 100644
index 6ae46ebb8e..0000000000
--- a/ext/tk/lib/tk/font.rb
+++ /dev/null
@@ -1,2352 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/font.rb - the class to treat fonts on Ruby/Tk
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-class TkFont
- include Tk
- extend TkCore
-
- TkCommandNames = ['font'.freeze].freeze
-
- (Tk_FontID = ["@font".freeze, TkUtil.untrust("00000")]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- Tk_FontNameTBL = TkCore::INTERP.create_table
- Tk_FontUseTBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- Tk_FontNameTBL.mutex.synchronize{ Tk_FontNameTBL.clear }
- Tk_FontUseTBL.mutex.synchronize{ Tk_FontUseTBL.clear }
- }
-
- # option_type : default => string
- OptionType = Hash.new(?s)
- OptionType['size'] = ?n
- OptionType['pointadjust'] = ?n
- OptionType['underline'] = ?b
- OptionType['overstrike'] = ?b
-
- # metric_type : default => num_or_str
- MetricType = Hash.new(?n)
- MetricType['fixed'] = ?b
-
- # system font names
- SYSTEM_FONT_NAMES = []
- def SYSTEM_FONT_NAMES.add(font_names)
- (@mutex ||= Mutex.new).synchronize{
- self.replace(self | font_names.map{|name| name.to_s})
- }
- end
- def SYSTEM_FONT_NAMES.include?(name)
- (@mutex ||= Mutex.new).synchronize{
- super(name.to_s)
- }
- end
-
- # set default font
- case Tk::TK_VERSION
- when /^4\..*/
- DEFAULT_LATIN_FONT_NAME = 'a14'.freeze
- DEFAULT_KANJI_FONT_NAME = 'k14'.freeze
-
- when /^8\.[0-4]/
- if JAPANIZED_TK
- begin
- fontnames = tk_call('font', 'names')
- case fontnames
- when /defaultgui/
- # Tcl/Tk-JP for Windows
- ltn = 'defaultgui'
- knj = 'defaultgui'
- when /Mincho:Helvetica-Bold-12/
- # Tcl/Tk-JP for UNIX/X
- ltn, knj = tk_split_simplelist(tk_call('font', 'configure',
- 'Mincho:Helvetica-Bold-12',
- '-compound'))
- else
- # unknown Tcl/Tk-JP
- #platform = tk_call('set', 'tcl_platform(platform)')
- platform = Tk::PLATFORM['platform']
- case platform
- when 'unix'
- ltn = {'family'=>'Helvetica'.freeze,
- 'size'=>-12, 'weight'=>'bold'.freeze}
- #knj = 'k14'
- #knj = '-misc-fixed-medium-r-normal--14-*-*-*-c-*-jisx0208.1983-0'
- knj = '-*-fixed-bold-r-normal--12-*-*-*-c-*-jisx0208.1983-0'
- when 'windows'
- ltn = {'family'=>'MS Sans Serif'.freeze, 'size'=>8}
- knj = 'mincho'
- when 'macintosh'
- ltn = 'system'
- knj = 'mincho'
- else # unknown
- ltn = 'Helvetica'
- knj = 'mincho'
- end
- end
- rescue
- ltn = 'Helvetica'
- knj = 'mincho'
- end
-
- else # not JAPANIZED_TK
- begin
- #platform = tk_call('set', 'tcl_platform(platform)')
- platform = Tk::PLATFORM['platform']
- case platform
- when 'unix'
- ltn = {'family'=>'Helvetica'.freeze,
- 'size'=>-12, 'weight'=>'bold'.freeze}
- when 'windows'
- ltn = {'family'=>'MS Sans Serif'.freeze, 'size'=>8}
- when 'macintosh'
- ltn = 'system'
- else # unknown
- ltn = 'Helvetica'
- end
- rescue
- ltn = 'Helvetica'
- end
-
- knj = ltn.dup
- end
-
- DEFAULT_LATIN_FONT_NAME = ltn.freeze
- DEFAULT_KANJI_FONT_NAME = knj.freeze
-
- when /^8\.[5-9]/, /^9\..*/
- if tk_call('font', 'names') =~ /\bTkDefaultFont\b/
- DEFAULT_LATIN_FONT_NAME = 'TkDefaultFont'.freeze
- DEFAULT_KANJI_FONT_NAME = 'TkDefaultFont'.freeze
- else
- DEFAULT_LATIN_FONT_NAME = 'Helvetica'.freeze
- DEFAULT_KANJI_FONT_NAME = 'mincho'.freeze
- end
-
- else # unknown version
- DEFAULT_LATIN_FONT_NAME = 'Helvetica'.freeze
- DEFAULT_KANJI_FONT_NAME = 'mincho'.freeze
-
- end
-
- if $DEBUG
- print "default latin font = "; p DEFAULT_LATIN_FONT_NAME
- print "default kanji font = "; p DEFAULT_KANJI_FONT_NAME
- end
-
-
- ###################################
- class DescendantFont
- def initialize(compound, type)
- unless compound.kind_of?(TkFont)
- fail ArgumentError, "a TkFont object is expected for the 1st argument"
- end
-
- @compound = compound
- case type
- when 'kanji', 'latin', 'ascii'
- @type = type
- when :kanji, :latin, :ascii
- @type = type.to_s
- else
- fail ArgumentError, "unknown type '#{type}'"
- end
- end
-
- def dup
- fail RuntimeError, "cannot duplicate a descendant font"
- end
- def clone
- fail RuntimeError, "cannot clone a descendant font"
- end
-
- def to_eval
- @compound.__send__(@type + '_font_id')
- end
- def font
- @compound.__send__(@type + '_font_id')
- end
- alias font_id font
- alias name font
- alias to_s font
-
- def [](slot)
- @compound.__send__(@type + '_configinfo', slot)
- end
- def []=(slot, value)
- @compound.__send__(@type + '_configure', slot, value)
- value
- end
-
- def method_missing(id, *args)
- @compound.__send__(@type + '_' + id.id2name, *args)
- end
- end
-
-
- ###################################
- # class methods
- ###################################
- def TkFont.is_system_font?(fnt)
- # true --> system font which is available on the current system
- # false --> not system font (or unknown system font)
- # nil --> system font name, but not available on the current system
- fnt = fnt.to_s
- SYSTEM_FONT_NAMES.include?(fnt) && self.names.index(fnt) && true
- end
-
- def TkFont.actual(fnt, option=nil)
- fnt = '{}' if fnt == ''
- if fnt.kind_of?(TkFont)
- fnt.actual(option)
- else
- actual_core(fnt, nil, option)
- end
- end
- def TkFont.actual_hash(fnt, option=nil)
- Hash[TkFont.actual(fnt, option)]
- end
-
- def TkFont.actual_displayof(fnt, win, option=nil)
- fnt = '{}' if fnt == ''
- if fnt.kind_of?(TkFont)
- fnt.actual_displayof(win, option)
- else
- win = '.' unless win
- actual_core(fnt, win, option)
- end
- end
- def TkFont.actual_hash_displayof(fnt, option=nil)
- Hash[TkFont.actual_displayof(fnt, option)]
- end
-
- def TkFont.configure(fnt, slot, value=None)
- if fnt.kind_of?(TkFont)
- fnt.configure(fnt, slot, value)
- else
- configure_core(fnt, slot, value)
- end
- fnt
- end
-
- def TkFont.configinfo(fnt, slot=nil)
- if fnt.kind_of?(TkFont)
- fnt.configinfo(fnt, slot)
- else
- configinfo_core(fnt, slot)
- end
- end
-
- def TkFont.current_configinfo(fnt, slot=nil)
- if fnt.kind_of?(TkFont)
- fnt.current_configinfo(fnt, slot)
- else
- current_configinfo_core(fnt, slot)
- end
- end
-
- def TkFont.measure(fnt, text)
- fnt = '{}' if fnt == ''
- if fnt.kind_of?(TkFont)
- fnt.measure(text)
- else
- measure_core(fnt, nil, text)
- end
- end
-
- def TkFont.measure_displayof(fnt, win, text)
- fnt = '{}' if fnt == ''
- if fnt.kind_of?(TkFont)
- fnt.measure_displayof(win, text)
- else
- win = '.' unless win
- measure_core(fnt, win, text)
- end
- end
-
- def TkFont.metrics(fnt, option=nil)
- fnt = '{}' if fnt == ''
- if fnt.kind_of?(TkFont)
- fnt.metrics(option)
- else
- metrics_core(fnt, nil, option)
- end
- end
- def TkFont.metrics_hash(fnt, option=nil)
- if option
- val = TkFont.metrics(fnt, option)
- case TkFont::MetricsType[option.to_s]
- when ?n
- val = TkComm::num_or_str(val)
- when ?b
- val = TkComm::bool(val)
- else
- # do nothing
- end
- return val
- end
-
- h = Hash[TkFont.metrics(fnt)]
- h.keys.each{|k|
- case TkFont::MetricsType[k.to_s]
- when ?n
- h[k] = TkComm::num_or_str(h[k])
- when ?b
- h[k] = TkComm::bool(h[k])
- else
- # do nothing
- end
- }
- h
- end
-
- def TkFont.metrics_displayof(fnt, win, option=nil)
- fnt = '{}' if fnt == ''
- if fnt.kind_of?(TkFont)
- font.metrics_displayof(win, option=nil)
- else
- win = '.' unless win
- metrics_core(fnt, win, option)
- end
- end
- def TkFont.metrics_hash_displayof(fnt, win, option=nil)
- if option
- val = TkFont.metrics_displayof(fnt, win, option)
- case TkFont::MetricsType[option.to_s]
- when ?n
- val = TkComm::num_or_str(val)
- when ?b
- val = TkComm::bool(val)
- else
- # do nothing
- end
- return val
- end
-
- h = Hash[TkFont.metrics_displayof(fnt, win, option)]
- h.keys.each{|k|
- case TkFont::MetricsType[k.to_s]
- when ?n
- h[k] = TkComm::num_or_str(h[k])
- when ?b
- h[k] = TkComm::bool(h[k])
- else
- # do nothing
- end
- }
- h
- end
-
- def TkFont.families(win=nil)
- case (Tk::TK_VERSION)
- when /^4\..*/
- ['fixed']
-
- when /^8\..*/
- if win
- tk_split_simplelist(tk_call('font', 'families', '-displayof', win))
- else
- tk_split_simplelist(tk_call('font', 'families'))
- end
- end
- end
-
- def TkFont.names
- case (Tk::TK_VERSION)
- when /^4\..*/
- r = ['fixed']
- r += ['a14', 'k14'] if JAPANIZED_TK
- Tk_FontNameTBL.mutex.synchronize{
- Tk_FontNameTBL.each_value{|obj| r.push(obj)}
- }
- #r | []
- r.uniq
-
- when /^8\..*/
- tk_split_simplelist(tk_call('font', 'names'))
-
- end
- end
-
- def TkFont.create_copy(font)
- fail 'source-font must be a TkFont object' unless font.kind_of? TkFont
- if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- keys = {}
- font.configinfo.each{|key,value| keys[key] = value }
- TkFont.new(font.latin_font_id, font.kanji_font_id, keys)
- else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- TkFont.new(font.latin_font_id, font.kanji_font_id, font.configinfo)
- end
- end
-
- def TkFont.get_obj(name)
- name = name.to_s
- if name =~ /^(@font[0-9]+)(|c|l|k)$/
- Tk_FontNameTBL.mutex.synchronize{
- Tk_FontNameTBL[$1]
- }
- else
- Tk_FontNameTBL.mutex.synchronize{
- Tk_FontNameTBL[name]
- }
- end
- end
-
- def TkFont.init_widget_font(pathname, *args)
- win, tag, key = pathname.split(';')
- key = 'font' if key == nil || key == ''
- path = [win, tag, key].join(';')
-
- case (Tk::TK_VERSION)
- when /^4\..*/
- regexp = /^-(|kanji)#{key} /
-
- conf_list = tk_split_simplelist(tk_call(*args)).
- find_all{|prop| prop =~ regexp}.
- collect{|prop| tk_split_simplelist(prop)}
-
- if conf_list.size == 0
- raise RuntimeError, "the widget may not support 'font' option"
- end
-
- args << {}
-
- ltn_key = "-#{key}"
- knj_key = "-kanji#{key}"
-
- ltn_info = conf_list.find{|conf| conf[0] == ltn_key}
- ltn = ltn_info[-1]
- ltn = nil if ltn == [] || ltn == ""
-
- knj_info = conf_list.find{|conf| conf[0] == knj_key}
- knj = knj_info[-1]
- knj = nil if knj == [] || knj == ""
-
- TkFont.new(ltn, knj).call_font_configure([path, key], *args)
-
- when /^8\.[0-4]/
- regexp = /^-#{key} /
-
- conf_list = tk_split_simplelist(tk_call(*args)).
- find_all{|prop| prop =~ regexp}.
- collect{|prop| tk_split_simplelist(prop)}
-
- if conf_list.size == 0
- raise RuntimeError, "the widget may not support 'font' option"
- end
-
- args << {}
-
- optkey = "-#{key}"
-
- info = conf_list.find{|conf| conf[0] == optkey}
- fnt = info[-1]
- fnt = nil if fnt == [] || fnt == ""
-
- unless fnt
- # create dummy
- # TkFont.new(nil, nil).call_font_configure([path, key], *args)
- dummy_fnt = TkFont.allocate
- dummy_fnt.instance_eval{ init_dummy_fontobj() }
- dummy_fnt
- else
- begin
- compound = tk_split_simplelist(
- Hash[*tk_split_simplelist(tk_call('font', 'configure',
- fnt))].collect{|k,v|
- [k[1..-1], v]
- }.assoc('compound')[1])
- rescue
- compound = []
- end
- if compound == []
- if TkFont.is_system_font?(fnt)
- TkNamedFont.new(fnt).call_font_configure([path, key], *args)
- else
- TkFont.new(fnt).call_font_configure([path, key], *args)
- end
- else
- TkFont.new(compound[0],
- compound[1]).call_font_configure([path, key], *args)
- end
- end
-
- when /^8\.[5-9]/, /^9\..*/
- regexp = /^-#{key} /
-
- conf_list = tk_split_simplelist(tk_call(*args)).
- find_all{|prop| prop =~ regexp}.
- collect{|prop| tk_split_simplelist(prop)}
-
- if conf_list.size == 0
- raise RuntimeError, "the widget may not support 'font' option"
- end
-
- args << {}
-
- optkey = "-#{key}"
-
- info = conf_list.find{|conf| conf[0] == optkey}
- fnt = info[-1]
- fnt = nil if fnt == [] || fnt == ""
-
- unless fnt
- # create dummy
- # TkFont.new(nil, nil).call_font_configure([path, key], *args)
- dummy_fnt = TkFont.allocate
- dummy_fnt.instance_eval{ init_dummy_fontobj() }
- dummy_fnt
- else
- if TkFont.is_system_font?(fnt)
- TkNamedFont.new(fnt).call_font_configure([path, key], *args)
- else
- TkFont.new(fnt).call_font_configure([path, key], *args)
- end
- end
- end
- end
-
- def TkFont.used_on(path=nil)
- Tk_FontUseTBL.mutex.synchronize{
- if path
- Tk_FontUseTBL[path]
- else
- # Tk_FontUseTBL.values | []
- Tk_FontUseTBL.values.uniq
- end
- }
- end
-
- def TkFont.failsafe(font)
- begin
- if /^8\..*/ === Tk::TK_VERSION && JAPANIZED_TK
- tk_call('font', 'failsafe', font)
- end
- rescue
- end
- end
-
- ###################################
- # instance methods
- ###################################
- private
- ###################################
- def init_dummy_fontobj
- Tk_FontID.mutex.synchronize{
- @id = Tk_FontID.join(TkCore::INTERP._ip_id_)
- Tk_FontID[1].succ!
- }
- Tk_FontNameTBL.mutex.synchronize{
- Tk_FontNameTBL[@id] = self
- }
-
- # @latin_desscendant = nil
- # @kanji_desscendant = nil
- @descendant = [nil, nil] # [latin, kanji]
-
- case (Tk::TK_VERSION)
- when /^4\..*/
- @latinfont = ""
- @kanjifont = ""
- if JAPANIZED_TK
- @compoundfont = [[@latinfont], [@kanjifont]]
- @fontslot = {'font'=>@latinfont, 'kanjifont'=>@kanjifont}
- else
- @compoundfont = @latinfont
- @fontslot = {'font'=>@latinfont}
- end
- else
- @latinfont = @id + 'l'
- @kanjifont = @id + 'k'
- @compoundfont = @id + 'c'
-
- if JAPANIZED_TK
- tk_call('font', 'create', @latinfont, '-charset', 'iso8859')
- tk_call('font', 'create', @kanjifont, '-charset', 'jisx0208.1983')
- tk_call('font', 'create', @compoundfont,
- '-compound', [@latinfont, @kanjifont])
- else
- tk_call('font', 'create', @latinfont)
- tk_call('font', 'create', @kanjifont)
- tk_call('font', 'create', @compoundfont)
- end
-
- @fontslot = {'font'=>@compoundfont}
- end
-
- self
- end
-
- def initialize(ltn=nil, knj=nil, keys=nil)
- ltn = '{}' if ltn == ''
- knj = '{}' if knj == ''
-
- Tk_FontID.mutex.synchronize{
- # @id = Tk_FontID.join('')
- @id = Tk_FontID.join(TkCore::INTERP._ip_id_)
- Tk_FontID[1].succ!
- }
- Tk_FontNameTBL.mutex.synchronize{
- Tk_FontNameTBL[@id] = self
- }
-
- # @latin_desscendant = nil
- # @kanji_desscendant = nil
- @descendant = [nil, nil] # [latin, kanji]
-
- # @latinfont = @id + 'l'
- # @kanjifont = @id + 'k'
- # @compoundfont = @id + 'c'
- # @fontslot = {}
-
- if knj.kind_of?(Hash) && !keys
- keys = knj
- knj = nil
- end
-
- # compound font check
- if Tk::TK_VERSION == '8.0' && JAPANIZED_TK
- begin
- compound = tk_split_simplelist(tk_call('font', 'configure',
- ltn, '-compound'))
- if knj == nil
- if compound != []
- ltn, knj = compound
- end
- else
- if compound != []
- ltn = compound[0]
- end
- compound = tk_split_simplelist(tk_call('font', 'configure',
- knj, '-compound'))
- if compound != []
- knj = compound[1]
- end
- end
- rescue
- end
- end
-
- if ltn
- if JAPANIZED_TK && !knj
- if Tk::TK_VERSION =~ /^4..*/
- knj = DEFAULT_KANJI_FONT_NAME
- else
- knj = ltn
- end
- end
- else
- ltn = DEFAULT_LATIN_FONT_NAME
- knj = DEFAULT_KANJI_FONT_NAME if JAPANIZED_TK && !knj
- end
-
- create_compoundfont(ltn, knj, keys)
- end
-
- def initialize_copy(font)
- unless font.kind_of?(TkFont)
- fail TypeError, '"initialize_copy should take same class object'
- end
- if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- keys = {}
- font.configinfo.each{|key,value| keys[key] = value }
- initialize(font.latin_font_id, font.kanji_font_id, keys)
- else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- initialize(font.latin_font_id, font.kanji_font_id, font.configinfo)
- end
- end
-
- def _get_font_info_from_hash(font)
- font = _symbolkey2str(font)
- foundry = (info = font['foundry'] .to_s)? info: '*'
- family = (info = font['family'] .to_s)? info: '*'
- weight = (info = font['weight'] .to_s)? info: '*'
- slant = (info = font['slant'] .to_s)? info: '*'
- swidth = (info = font['swidth'] .to_s)? info: '*'
- adstyle = (info = font['adstyle'] .to_s)? info: '*'
- pixels = (info = font['pixels'] .to_s)? info: '*'
- points = (info = font['points'] .to_s)? info: '*'
- resx = (info = font['resx'] .to_s)? info: '*'
- resy = (info = font['resy'] .to_s)? info: '*'
- space = (info = font['space'] .to_s)? info: '*'
- avgWidth = (info = font['avgWidth'].to_s)? info: '*'
- charset = (info = font['charset'] .to_s)? info: '*'
- encoding = (info = font['encoding'].to_s)? info: '*'
-
- [foundry, family, weight, slant, swidth, adstyle,
- pixels, points, resx, resy, space, avgWidth, charset, encoding]
- end
-
- def create_latinfont_tk4x(font)
- if font.kind_of? Hash
- @latinfont = '-' + _get_font_info_from_hash(font).join('-') + '-'
-
- elsif font.kind_of? Array
- finfo = {}
- finfo['family'] = font[0].to_s
- if font[1]
- fsize = font[1].to_s
- if fsize != '0' && fsize =~ /^(|\+|-)([0-9]+)$/
- if $1 == '-'
- finfo['pixels'] = $2
- else
- finfo['points'] = $2
- end
- else
- finfo['points'] = '13'
- end
- end
- font[2..-1].each{|style|
- case (style)
- when 'normal'
- finfo['weight'] = style
- when 'bold'
- finfo['weight'] = style
- when 'roman'
- finfo['slant'] = 'r'
- when 'italic'
- finfo['slant'] = 'i'
- end
- }
-
- @latinfont = '-' + _get_font_info_from_hash(finfo).join('-') + '-'
-
- elsif font.kind_of? TkFont
- @latinfont = font.latin_font
-
- else
- if font
- @latinfont = font
- else
- @latinfont = DEFAULT_LATIN_FONT_NAME
- end
-
- end
- end
-
- def create_kanjifont_tk4x(font)
- unless JAPANIZED_TK
- @kanjifont = ""
- return
- end
-
- if font.kind_of? Hash
- @kanjifont = '-' + _get_font_info_from_hash(font).join('-') + '-'
-
- elsif font.kind_of? Array
- finfo = {}
- finfo['family'] = font[0].to_s
- if font[1]
- fsize = font[1].to_s
- if fsize != '0' && fsize =~ /^(|\+|-)([0-9]+)$/
- if $1 == '-'
- finfo['pixels'] = $2
- else
- finfo['points'] = $2
- end
- else
- finfo['points'] = '13'
- end
- end
- font[2..-1].each{|style|
- case (style)
- when 'normal'
- finfo['weight'] = style
- when 'bold'
- finfo['weight'] = style
- when 'roman'
- finfo['slant'] = 'r'
- when 'italic'
- finfo['slant'] = 'i'
- end
- }
-
- @kanjifont = '-' + _get_font_info_from_hash(finfo).join('-') + '-'
- elsif font.kind_of? TkFont
- @kanjifont = font.kanji_font_id
- else
- if font
- @kanjifont = font
- else
- @kanjifont = DEFAULT_KANJI_FONT_NAME
- end
- end
- end
-
- def create_compoundfont_tk4x(ltn, knj, keys)
- create_latinfont(ltn)
- create_kanjifont(knj)
-
- if JAPANIZED_TK
- @compoundfont = [[@latinfont], [@kanjifont]]
- @fontslot = {'font'=>@latinfont, 'kanjifont'=>@kanjifont}
- # @fontslot.clear
- # @fontslot['font'] = @latinfont
- # @fontslot['kanjifont'] = @kanjifont
- else
- @compoundfont = @latinfont
- @fontslot = {'font'=>@latinfont}
- # @fontslot.clear
- # @fontslot['font'] = @latinfont
- end
- end
-
- def create_latinfont_tk8x(font)
- @latinfont = @id + 'l'
-
- if JAPANIZED_TK
- if font.kind_of? Hash
- if font[:charset] || font['charset']
- tk_call('font', 'create', @latinfont, *hash_kv(font))
- else
- tk_call('font', 'create', @latinfont,
- '-charset', 'iso8859', *hash_kv(font))
- end
- elsif font.kind_of? Array
- tk_call('font', 'create', @latinfont, '-copy', array2tk_list(font))
- tk_call('font', 'configure', @latinfont, '-charset', 'iso8859')
- elsif font.kind_of? TkFont
- tk_call('font', 'create', @latinfont, '-copy', font.latin_font)
- elsif font
- tk_call('font', 'create', @latinfont, '-copy', font,
- '-charset', 'iso8859')
- else
- tk_call('font', 'create', @latinfont, '-charset', 'iso8859')
- end
- else
- if font.kind_of? Hash
- tk_call('font', 'create', @latinfont, *hash_kv(font))
- else
- keys = {}
- if font.kind_of? Array
- actual_core(array2tk_list(font)).each{|key,val| keys[key] = val}
- elsif font.kind_of? TkFont
- actual_core(font.latin_font).each{|key,val| keys[key] = val}
- elsif font
- actual_core(font).each{|key,val| keys[key] = val}
- end
- tk_call('font', 'create', @latinfont, *hash_kv(keys))
- end
-
- if font && @compoundfont
- keys = {}
- actual_core(@latinfont).each{|key,val| keys[key] = val}
- tk_call('font', 'configure', @compoundfont, *hash_kv(keys))
- end
- end
- end
-
- def create_kanjifont_tk8x(font)
- @kanjifont = @id + 'k'
-
- if JAPANIZED_TK
- if font.kind_of? Hash
- if font[:charset] || font['charset']
- tk_call('font', 'create', @kanjifont, *hash_kv(font))
- else
- tk_call('font', 'create', @kanjifont,
- '-charset', 'jisx0208.1983', *hash_kv(font))
- end
- elsif font.kind_of? Array
- tk_call('font', 'create', @kanjifont, '-copy', array2tk_list(font))
- tk_call('font', 'configure', @kanjifont, '-charset', 'jisx0208.1983')
- elsif font.kind_of? TkFont
- tk_call('font', 'create', @kanjifont, '-copy', font.kanji_font_id)
- elsif font
- tk_call('font', 'create', @kanjifont, '-copy', font,
- '-charset', 'jisx0208.1983')
- else
- tk_call('font', 'create', @kanjifont, '-charset', 'jisx0208.1983')
- end
- # end of JAPANIZED_TK
-
- else
- if font.kind_of? Hash
- tk_call('font', 'create', @kanjifont, *hash_kv(font))
- else
- keys = {}
- if font.kind_of? Array
- actual_core(array2tk_list(font)).each{|key,val| keys[key] = val}
- elsif font.kind_of? TkFont
- actual_core(font.kanji_font_id).each{|key,val| keys[key] = val}
- elsif font
- actual_core(font).each{|key,val| keys[key] = val}
- end
- tk_call('font', 'create', @kanjifont, *hash_kv(keys))
- end
-
- if font && @compoundfont
- keys = {}
- actual_core(@kanjifont).each{|key,val| keys[key] = val}
- tk_call('font', 'configure', @compoundfont, *hash_kv(keys))
- end
- end
- end
-
- def create_compoundfont_tk8x(ltn, knj, keys)
- if knj
- create_latinfont(ltn)
- create_kanjifont(knj)
- else
- cfnt = ltn
- create_kanjifont(cfnt)
- create_latinfont(cfnt)
- end
-
- @compoundfont = @id + 'c'
-
- if JAPANIZED_TK
- unless keys
- keys = {}
- else
- keys = keys.dup
- end
- if (tk_call('font', 'configure', @latinfont, '-underline') == '1' &&
- tk_call('font', 'configure', @kanjifont, '-underline') == '1' &&
- !keys.key?('underline'))
- keys['underline'] = true
- end
- if (tk_call('font', 'configure', @latinfont, '-overstrike') == '1' &&
- tk_call('font', 'configure', @kanjifont, '-overstrike') == '1' &&
- !keys.key?('overstrike'))
- keys['overstrike'] = true
- end
-
- @fontslot = {'font'=>@compoundfont}
- # @fontslot['font'] = @compoundfont
- begin
- tk_call('font', 'create', @compoundfont,
- '-compound', [@latinfont, @kanjifont], *hash_kv(keys))
- rescue RuntimeError => e
- if ltn == knj
- if e.message =~ /kanji font .* specified/
- tk_call('font', 'delete', @latinfont)
- create_latinfont(DEFAULT_LATIN_FONT_NAME)
- opts = []
- Hash[*(tk_split_simplelist(tk_call('font', 'configure',
- @kanjifont)))].each{|k,v|
- case k
- when '-size', '-weight', '-slant', '-underline', '-overstrike'
- opts << k << v
- end
- }
- tk_call('font', 'configure', @latinfont, *opts)
- tk_call('font', 'create', @compoundfont,
- '-compound', [@latinfont, @kanjifont], *hash_kv(keys))
-
- elsif e.message =~ /ascii font .* specified/
- tk_call('font', 'delete', @kanjifont)
- create_kanjifont(DEFAULT_KANJI_FONT_NAME)
- opts = []
- Hash[*(tk_split_simplelist(tk_call('font', 'configure',
- @latinfont)))].each{|k,v|
- case k
- when '-size', '-weight', '-slant', '-underline', '-overstrike'
- opts << k << v
- end
- }
- tk_call('font', 'configure', @kanjifont, *opts)
- tk_call('font', 'create', @compoundfont,
- '-compound', [@latinfont, @kanjifont], *hash_kv(keys))
-
- else
- raise e
- end
- else
- raise e
- end
- end
- else
- tk_call('font', 'create', @compoundfont)
-
- latinkeys = {}
- begin
- actual_core(@latinfont).each{|key,val| latinkeys[key] = val}
- rescue
- latinkeys = {}
- end
- if latinkeys != {}
- tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))
- end
-
- if knj
- compoundkeys = nil
- kanjikeys = {}
- begin
- actual_core(@kanjifont).each{|key,val| kanjikeys[key] = val}
- rescue
- kanjikeys = {}
- end
- if kanjikeys != {}
- tk_call('font', 'configure', @compoundfont, *hash_kv(kanjikeys))
- end
- end
-
- if cfnt
- if cfnt.kind_of?(Hash)
- compoundkeys = cfnt.dup
- else
- compoundkeys = {}
- actual_core(cfnt).each{|key,val| compoundkeys[key] = val}
- end
- compoundkeys.update(_symbolkey2str(keys))
- keys = compoundkeys
- end
-
- @fontslot = {'font'=>@compoundfont}
- # @fontslot['font'] = @compoundfont
- tk_call('font', 'configure', @compoundfont, *hash_kv(keys))
- end
- end
-
- ###################################
- public
- ###################################
- def inspect
- sprintf("#<%s:%0x:%s>", self.class.inspect, self.__id__, @compoundfont)
- end
-
- def method_missing(id, *args)
- name = id.id2name
- case args.length
- when 1
- if name[-1] == ?=
- configure name[0..-2], args[0]
- args[0]
- else
- configure name, args[0]
- self
- end
- when 0
- begin
- configinfo name
- rescue
- super(id, *args)
-# fail NameError, "undefined local variable or method `#{name}' for #{self.to_s}", error_at
- end
- else
- super(id, *args)
-# fail NameError, "undefined method `#{name}' for #{self.to_s}", error_at
- end
- end
-
- def call_font_configure(path, *args)
- if path.kind_of?(Array)
- # [path, optkey]
- win, tag = path[0].split(';')
- optkey = path[1].to_s
- else
- win, tag, optkey = path.split(';')
- end
-
- fontslot = _symbolkey2str(@fontslot)
- if optkey && optkey != ""
- ltn = fontslot.delete('font')
- knj = fontslot.delete('kanjifont')
- fontslot[optkey] = ltn if ltn
- fontslot["kanji#{optkey}"] = knj if knj
- end
-
- keys = _symbolkey2str(args.pop).update(fontslot)
- args.concat(hash_kv(keys))
- begin
- tk_call(*args)
- rescue => e
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- fail e
- end
- end
- Tk_FontUseTBL.mutex.synchronize{
- Tk_FontUseTBL[[win, tag, optkey].join(';')] = self
- }
- self
- end
-
- def used
- ret = []
- table = nil
- Tk_FontUseTBL.mutex.synchronize{
- table = Tk_FontUseTBL.clone # to avoid deadlock
- }
- table.each{|key,value|
- next unless self == value
- if key.include?(';')
- win, tag, optkey = key.split(';')
- winobj = tk_tcl2ruby(win)
- #if winobj.kind_of? TkText
- if winobj.kind_of?(TkText) || winobj.kind_of?(Tk::Text)
- if optkey
- ret.push([winobj, winobj.tagid2obj(tag), optkey])
- else
- ret.push([winobj, winobj.tagid2obj(tag)])
- end
- #elsif winobj.kind_of? TkCanvas
- elsif winobj.kind_of?(TkCanvas) || winobj.kind_of?(Tk::Canvas)
- if (tagobj = TkcTag.id2obj(winobj, tag)).kind_of? TkcTag
- if optkey
- ret.push([winobj, tagobj, optkey])
- else
- ret.push([winobj, tagobj])
- end
- elsif (tagobj = TkcItem.id2obj(winobj, tag)).kind_of? TkcItem
- if optkey
- ret.push([winobj, tagobj, optkey])
- else
- ret.push([winobj, tagobj])
- end
- else
- if optkey
- ret.push([winobj, tag, optkey])
- else
- ret.push([winobj, tag])
- end
- end
- #elsif winobj.kind_of? TkMenu
- elsif winobj.kind_of?(TkMenu) || winobj.kind_of?(Tk::Menu)
- if optkey
- ret.push([winobj, tag, optkey])
- else
- ret.push([winobj, tag])
- end
- else
- if optkey
- ret.push([win, tag, optkey])
- else
- ret.push([win, tag])
- end
- end
- else
- ret.push(tk_tcl2ruby(key))
- end
- }
- ret
- end
-
- def id
- @id
- end
-
- def to_eval
- font
- end
-
- def font
- @compoundfont
- end
- alias font_id font
- alias name font
- alias to_s font
-
- def latin_font_id
- @latinfont
- end
-
- def latin_font
- # @latinfont
- if @descendant[0] # [0] -> latin
- @descendant[0]
- else
- @descendant[0] = DescendantFont.new(self, 'latin')
- end
-=begin
- if @latin_descendant
- @latin_descendant
- else
- @latin_descendant = DescendantFont.new(self, 'latin')
- end
-=end
- end
- alias latinfont latin_font
-
- def kanji_font_id
- @kanjifont
- end
-
- def kanji_font
- # @kanjifont
- if @descendant[1] # [1] -> kanji
- @descendant[1]
- else
- @descendant[1] = DescendantFont.new(self, 'kanji')
- end
-=begin
- if @kanji_descendant
- @kanji_descendant
- else
- @kanji_descendant = DescendantFont.new(self, 'kanji')
- end
-=end
- end
- alias kanjifont kanji_font
-
- def actual(option=nil)
- actual_core(@compoundfont, nil, option)
- end
- def actual_hash(option=nil)
- Hash[actual(option)]
- end
-
- def actual_displayof(win, option=nil)
- win = '.' unless win
- actual_core(@compoundfont, win, option)
- end
- def actual_hash_displayof(win, option=nil)
- Hash[actual_displayof(win, option)]
- end
-
- def latin_actual(option=nil)
- if @latinfont == nil
- actual_core(@compoundfont, nil, option) # use @compoundfont
- else
- actual_core(@latinfont, nil, option)
- end
- end
- def latin_actual_hash(option=nil)
- Hash[latin_actual(option)]
- end
-
- def latin_actual_displayof(win, option=nil)
- win = '.' unless win
- if @latinfont == nil
- actual_core(@compoundfont, win, option) # use @compoundfont
- else
- actual_core(@latinfont, win, option)
- end
- end
- def latin_actual_hash_displayof(win, option=nil)
- Hash[latin_actual_displayof(win, option)]
- end
-
- def kanji_actual(option=nil)
- #if JAPANIZED_TK
- if @kanjifont == nil
- actual_core(@compoundfont, nil, option) # use @compoundfont
- elsif @kanjifont != ""
- actual_core(@kanjifont, nil, option)
- else
- actual_core_tk4x(nil, nil, option)
- end
- end
- def kanji_actual_hash(option=nil)
- Hash[kanji_actual(option)]
- end
-
- def kanji_actual_displayof(win, option=nil)
- #if JAPANIZED_TK
- if @kanjifont == nil
- actual_core(@compoundfont, nil, option) # use @compoundfont
- elsif @kanjifont != ""
- win = '.' unless win
- actual_core(@kanjifont, win, option)
- else
- actual_core_tk4x(nil, win, option)
- end
- end
- def kanji_actual_hash_displayof(win, option=nil)
- Hash[kanji_actual_displayof(win, option)]
- end
-
- def [](slot)
- configinfo slot
- end
-
- def []=(slot, val)
- configure slot, val
- val
- end
-
- def configure(slot, value=None)
- configure_core(@compoundfont, slot, value)
- self
- end
-
- def configinfo(slot=nil)
- configinfo_core(@compoundfont, slot)
- end
-
- def current_configinfo(slot=nil)
- current_configinfo_core(@compoundfont, slot)
- end
-
- def delete
- delete_core
- end
-
- def latin_configure(slot, value=None)
- if JAPANIZED_TK
- configure_core(@latinfont, slot, value)
- else
- configure(slot, value)
- end
- self
- end
-
- def latin_configinfo(slot=nil)
- if JAPANIZED_TK
- configinfo_core(@latinfont, slot)
- else
- configinfo(slot)
- end
- end
- def latin_current_configinfo(slot=nil)
- Hash[latin_configinfo(slot)]
- end
-
- def kanji_configure(slot, value=None)
- #if JAPANIZED_TK
- if @kanjifont == nil
- configure_core(@compoundfont, slot, value) # use @compoundfont
- elsif @kanjifont != ""
- configure_core(@kanjifont, slot, value)
- configure('size'=>configinfo('size')) # to reflect new configuration
- else
- #""
- configure(slot, value)
- end
- self
- end
-
- def kanji_configinfo(slot=nil)
- #if JAPANIZED_TK
- if @kanjifont == nil
- configure_core(@compoundfont, slot) # use @compoundfont
- elsif @kanjifont != ""
- configinfo_core(@kanjifont, slot)
- else
- #[]
- configinfo(slot)
- end
- end
- def kanji_current_configinfo(slot=nil)
- Hash[kanji_configinfo(slot)]
- end
-
- def replace(ltn, knj=None)
- knj = ltn if knj == None
- latin_replace(ltn)
- kanji_replace(knj)
- self
- end
-
- def latin_replace(ltn)
- if @latinfont
- latin_replace_core(ltn)
- reset_pointadjust
- else
- # not compound font -> copy properties of ltn
- latinkeys = {}
- begin
- actual_core(ltn).each{|key,val| latinkeys[key] = val}
- rescue
- latinkeys = {}
- end
- begin
- tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))
- rescue
- # not exist? (deleted?) -> create font
- tk_call('font', 'create', @compoundfont, *hash_kv(latinkeys))
- end
- end
-
- self
- end
-
- def kanji_replace(knj)
- return self unless @kanjifont # ignore
- kanji_replace_core(knj)
- reset_pointadjust
- self
- end
-
- def measure(text)
- measure_core(@compoundfont, nil, text)
- end
-
- def measure_displayof(win, text)
- win = '.' unless win
- measure_core(@compoundfont, win, text)
- end
-
- def metrics(option=nil)
- metrics_core(@compoundfont, nil, option)
- end
- def metrics_hash(option=nil)
- if option
- val = metrics(option)
- case TkFont::MetricsType[option.to_s]
- when ?n
- val = TkComm::num_or_str(val)
- when ?b
- val = TkComm::bool(val)
- else
- # do nothing
- end
- return val
- end
-
- h = Hash[metrics(option)]
- h.keys.each{|k|
- case TkFont::MetricsType[k.to_s]
- when ?n
- h[k] = TkComm::num_or_str(h[k])
- when ?b
- h[k] = TkComm::bool(h[k])
- else
- # do nothing
- end
- }
- h
- end
-
- def metrics_displayof(win, option=nil)
- win = '.' unless win
- metrics_core(@compoundfont, win, option)
- end
- def metrics_hash_displayof(win, option=nil)
- if option
- val = metrics_displayof(win, option)
- case TkFont::MetricsType[option.to_s]
- when ?n
- val = TkComm::num_or_str(val)
- when ?b
- val = TkComm::bool(val)
- else
- # do nothing
- end
- return val
- end
-
- h = Hash[metrics_displayof(win, option)]
- h.keys.each{|k|
- case TkFont::MetricsType[k.to_s]
- when ?n
- h[k] = TkComm::num_or_str(h[k])
- when ?b
- h[k] = TkComm::bool(h[k])
- else
- # do nothing
- end
- }
- h
- end
-
- def latin_metrics(option=nil)
- if @latinfont == nil
- metrics_core(@compoundfont, nil, option) # use @compoundfont
- else
- metrics_core(@latinfont, nil, option)
- end
- end
- def latin_metrics_hash(option=nil)
- if option
- val = latin_metrics(option)
- case TkFont::MetricsType[option.to_s]
- when ?n
- val = TkComm::num_or_str(val)
- when ?b
- val = TkComm::bool(val)
- else
- # do nothing
- end
- return val
- end
-
- h = Hash[latin_metrics(option)]
- h.keys.each{|k|
- case TkFont::MetricsType[k.to_s]
- when ?n
- h[k] = TkComm::num_or_str(h[k])
- when ?b
- h[k] = TkComm::bool(h[k])
- else
- # do nothing
- end
- }
- h
- end
-
- def latin_metrics_displayof(win, option=nil)
- win = '.' unless win
- if @latinfont == nil
- metrics_core(@compoundfont, win, option) # use @compoundfont
- else
- metrics_core(@latinfont, win, option)
- end
- end
- def latin_metrics_hash_displayof(win, option=nil)
- if option
- val = latin_metrics_displayof(win, option)
- case TkFont::MetricsType[option.to_s]
- when ?n
- val = TkComm::num_or_str(val)
- when ?b
- val = TkComm::bool(val)
- else
- # do nothing
- end
- return val
- end
-
- h = Hash[latin_metrics_displayof(win, option)]
- h.keys.each{|k|
- case TkFont::MetricsType[k.to_s]
- when ?n
- h[k] = TkComm::num_or_str(h[k])
- when ?b
- h[k] = TkComm::bool(h[k])
- else
- # do nothing
- end
- }
- h
- end
-
- def kanji_metrics(option=nil)
- if @latinfont == nil
- metrics_core(@compoundfont, nil, option) # use @compoundfont
- elsif JAPANIZED_TK
- metrics_core(@kanjifont, nil, option)
- else
- metrics_core_tk4x(nil, nil, option)
- end
- end
- def kanji_metrics_hash(option=nil)
- if option
- val = kanji_metrics(option)
- case TkFont::MetricsType[option.to_s]
- when ?n
- val = TkComm::num_or_str(val)
- when ?b
- val = TkComm::bool(val)
- else
- # do nothing
- end
- return val
- end
-
- h = Hash[kanji_metrics(option)]
- h.keys.each{|k|
- case TkFont::MetricsType[k.to_s]
- when ?n
- h[k] = TkComm::num_or_str(h[k])
- when ?b
- h[k] = TkComm::bool(h[k])
- else
- # do nothing
- end
- }
- h
- end
-
- def kanji_metrics_displayof(win, option=nil)
- win = '.' unless win
- if @latinfont == nil
- metrics_core(@compoundfont, win, option) # use @compoundfont
- elsif JAPANIZED_TK
- metrics_core(@kanjifont, win, option)
- else
- metrics_core_tk4x(nil, win, option)
- end
- end
- def kanji_metrics_hash_displayof(win, option=nil)
- if option
- val = kanji_metrics_displayof(win, option)
- case TkFont::MetricsType[option.to_s]
- when ?n
- val = TkComm::num_or_str(val)
- when ?b
- val = TkComm::bool(val)
- else
- # do nothing
- end
- return val
- end
-
- h = Hash[kanji_metrics_displayof(win, option)]
- h.keys.each{|k|
- case TkFont::MetricsType[k.to_s]
- when ?n
- h[k] = TkComm::num_or_str(h[k])
- when ?b
- h[k] = TkComm::bool(h[k])
- else
- # do nothing
- end
- }
- h
- end
-
- def reset_pointadjust
- begin
- if /^8\..*/ === Tk::TK_VERSION && JAPANIZED_TK
- configure('pointadjust' => latin_actual.assoc('size')[1].to_f /
- kanji_actual.assoc('size')[1].to_f )
- end
- rescue
- end
- self
- end
-
- ###################################
- # private alias
- ###################################
- case (Tk::TK_VERSION)
- when /^4\..*/
- alias create_latinfont create_latinfont_tk4x
- alias create_kanjifont create_kanjifont_tk4x
- alias create_compoundfont create_compoundfont_tk4x
-
- when /^8\.[0-5]/
- alias create_latinfont create_latinfont_tk8x
- alias create_kanjifont create_kanjifont_tk8x
- alias create_compoundfont create_compoundfont_tk8x
-
- else
- alias create_latinfont create_latinfont_tk8x
- alias create_kanjifont create_kanjifont_tk8x
- alias create_compoundfont create_compoundfont_tk8x
-
- end
-
- ###################################
- # public alias
- ###################################
- alias ascii_font latin_font
- alias asciifont latinfont
- alias create_asciifont create_latinfont
- alias ascii_actual latin_actual
- alias ascii_actual_displayof latin_actual_displayof
- alias ascii_configure latin_configure
- alias ascii_configinfo latin_configinfo
- alias ascii_replace latin_replace
- alias ascii_metrics latin_metrics
-
- ###################################
-=begin
- def dup
- TkFont.new(self)
- end
- def clone
- TkFont.new(self)
- end
-=end
-end
-
-module TkFont::CoreMethods
- include Tk
- extend TkCore
-
- private
-
- def actual_core_tk4x(font, win=nil, option=nil)
- # dummy
- if option == 'pointadjust' || option == :pointadjust
- 1.0
- elsif option
- case TkFont::OptionType[option.to_s]
- when ?n
- 0
- when ?b
- false
- else
- ''
- end
- else
- [['family',''], ['size',0], ['weight',''], ['slant',''],
- ['underline',false], ['overstrike',false], ['charset',''],
- ['pointadjust',0]]
- end
- end
-
- def actual_core_tk8x(font, win=nil, option=nil)
- font = '{}' if font == ''
-
- if option == 'compound' || option == :compound
- ""
- elsif option
- if win
- val = tk_call('font', 'actual', font,
- "-displayof", win, "-#{option}")
- else
- val = tk_call('font', 'actual', font, "-#{option}")
- end
- case TkFont::OptionType[option.to_s]
- when ?n
- num_or_str(val)
- when ?b
- bool(val)
- else
- val
- end
- else
- l = tk_split_simplelist(if win
- tk_call('font', 'actual', font,
- "-displayof", win)
- else
- tk_call('font', 'actual', font)
- end)
- r = []
- while key=l.shift
- if key == '-compound'
- l.shift
- else
- key = key[1..-1]
- val = l.shift
- case TkFont::OptionType[key]
- when ?n
- r.push [key, num_or_str(val)]
- when ?b
- r.push [key, bool(val)]
- else
- r.push [key, val]
- end
- end
- end
- r
- end
- end
-
- def configure_core_tk4x(font, slot, value=None)
- #""
- self
- end
-
- def configinfo_core_tk4x(font, option=nil)
- # dummy
- if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- if option == 'pointadjust' || option == :pointadjust
- 1.0
- elsif option
- case TkFont::OptionType[option.to_s]
- when ?n
- 0
- when ?b
- false
- else
- ''
- end
- else
- [['family',''], ['size',0], ['weight',''], ['slant',''],
- ['underline',false], ['overstrike',false], ['charset',''],
- ['pointadjust',1.0]]
- end
- else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- current_configinfo_core_tk4x(font, option)
- end
- end
-
- def current_configinfo_core_tk4x(font, option=nil)
- if option
- case TkFont::OptionType[option.to_s]
- when ?n
- 0
- when ?b
- false
- else
- ''
- end
- else
- {'family'=>'', 'size'=>0, 'weight'=>'', 'slant'=>'',
- 'underline'=>false, 'overstrike'=>false,
- 'charset'=>false, 'pointadjust'=>1.0}
- end
- end
-
- def configure_core_tk8x(font, slot, value=None)
- if JAPANIZED_TK
- begin
- padjust = tk_call('font', 'configure', font, '-pointadjust')
- rescue
- padjust = nil
- end
- else
- padjust = nil
- end
- if slot.kind_of? Hash
- if JAPANIZED_TK && (slot.key?('family') || slot.key?(:family))
- slot = _symbolkey2str(slot)
- configure_core_tk8x(font, 'family', slot.delete('family'))
- end
-
- if ((slot.key?('size') || slot.key?(:size)) &&
- padjust && !slot.key?('pointadjust') && !slot.key?(:pointadjust))
- tk_call('font', 'configure', font,
- '-pointadjust', padjust, *hash_kv(slot))
- else
- tk_call('font', 'configure', font, *hash_kv(slot))
- end
- elsif (slot == 'size' || slot == :size) && padjust != nil
- tk_call('font', 'configure', font,
- "-#{slot}", value, '-pointadjust', padjust)
- elsif JAPANIZED_TK && (slot == 'family' || slot == :family)
- # compound font?
- begin
- compound = tk_split_simplelist(tk_call('font', 'configure',
- font, '-compound'))
- rescue
- tk_call('font', 'configure', font, '-family', value)
- return self
- end
- if compound == []
- tk_call('font', 'configure', font, '-family', value)
- return self
- end
- ltn, knj = compound
-
- lfnt = tk_call('font', 'create', '-copy', ltn)
- begin
- tk_call('font', 'configure', lfnt, '-family', value)
- latin_replace_core_tk8x(lfnt)
- rescue RuntimeError => e
- fail e if $DEBUG
- ensure
- tk_call('font', 'delete', lfnt) if lfnt != ''
- end
-
- kfnt = tk_call('font', 'create', '-copy', knj)
- begin
- tk_call('font', 'configure', kfnt, '-family', value)
- kanji_replace_core_tk8x(lfnt)
- rescue RuntimeError => e
- fail e if $DEBUG
- ensure
- tk_call('font', 'delete', kfnt) if kfnt != ''
- end
-
- else
- tk_call('font', 'configure', font, "-#{slot}", value)
- end
- self
- end
-
- def configinfo_core_tk8x(font, option=nil)
- if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- if option == 'compound' || option == :compound
- ""
- elsif option
- val = tk_call('font', 'configure', font, "-#{option}")
- case TkFont::OptionType[option.to_s]
- when ?n
- num_or_str(val)
- when ?b
- bool(val)
- else
- val
- end
- else
- l = tk_split_simplelist(tk_call('font', 'configure', font))
- r = []
- while key=l.shift
- if key == '-compound'
- l.shift
- else
- key = key[1..-1]
- val = l.shift
- case TkFont::OptionType[key]
- when ?n
- r.push [key, num_or_str(val)]
- when ?b
- r.push [key, bool(val)]
- else
- r.push [key, val]
- end
- end
- end
- r
- end
- else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- current_configinfo_core_tk8x(font, option)
- end
- end
-
- def current_configinfo_core_tk8x(font, option=nil)
- if option == 'compound'
- ""
- elsif option
- val = tk_call('font', 'configure', font, "-#{option}")
- case TkFont::OptionType[option.to_s]
- when ?n
- num_or_str(val)
- when ?b
- bool(val)
- else
- val
- end
- else
- l = tk_split_simplelist(tk_call('font', 'configure', font))
- h = {}
- while key=l.shift
- if key == '-compound'
- l.shift
- else
- key = key[1..-1]
- val = l.shift
- case TkFont::OptionType[key]
- when ?n
- h[key] = num_or_str(val)
- when ?b
- h[key] = bool(val)
- else
- h[key] = val
- end
- end
- end
- h
- end
- end
-
- def delete_core_tk4x
- TkFont::Tk_FontNameTBL.mutex.synchronize{
- TkFont::Tk_FontNameTBL.delete(@id)
- }
- TkFont::Tk_FontUseTBL.mutex.synchronize{
- TkFont::Tk_FontUseTBL.delete_if{|key,value| value == self}
- }
- end
-
- def delete_core_tk8x
- begin
- tk_call('font', 'delete', @latinfont) if @latinfont
- rescue
- end
- begin
- tk_call('font', 'delete', @kanjifont) if @kanjifont
- rescue
- end
- begin
- tk_call('font', 'delete', @compoundfont) if @compoundfont
- rescue
- end
- TkFont::Tk_FontNameTBL.mutex.synchronize{
- TkFont::Tk_FontNameTBL.delete(@id)
- }
- TkFont::Tk_FontUseTBL.mutex.synchronize{
- TkFont::Tk_FontUseTBL.delete_if{|key,value| value == self}
- }
- end
-
- def latin_replace_core_tk4x(ltn)
- create_latinfont_tk4x(ltn)
- @compoundfont[0] = [@latinfont] if JAPANIZED_TK
- @fontslot['font'] = @latinfont
- table = nil
- TkFont::Tk_FontUseTBL.mutex.synchronize{
- table = TkFont::Tk_FontUseTBL.clone
- }
- table.each{|w, fobj|
- if self == fobj
- begin
- if w.include?(';')
- win, tag, optkey = w.split(';')
- optkey = 'font' if optkey == nil || optkey == ''
- winobj = tk_tcl2ruby(win)
-# winobj.tagfont_configure(tag, {'font'=>@latinfont})
- #if winobj.kind_of? TkText
- if winobj.kind_of?(TkText) || winobj.kind_of?(Tk::Text)
- tk_call(win, 'tag', 'configure', tag, "-#{optkey}", @latinfont)
- #elsif winobj.kind_of? TkCanvas
- elsif winobj.kind_of?(TkCanvas) || winobj.kind_of?(Tk::Canvas)
- tk_call(win, 'itemconfigure', tag, "-#{optkey}", @latinfont)
- #elsif winobj.kind_of? TkMenu
- elsif winobj.kind_of?(TkMenu) || winobj.kind_of?(Tk::Menu)
- tk_call(win, 'entryconfigure', tag, "-#{optkey}", @latinfont)
- else
- raise RuntimeError, "unknown widget type"
- end
- else
-# tk_tcl2ruby(w).font_configure('font'=>@latinfont)
- tk_call(w, 'configure', '-font', @latinfont)
- end
- rescue
- TkFont::Tk_FontUseTBL.mutex.synchronize{
- TkFont::Tk_FontUseTBL.delete(w)
- }
- end
- end
- }
- self
- end
-
- def kanji_replace_core_tk4x(knj)
- return self unless JAPANIZED_TK
-
- create_kanjifont_tk4x(knj)
- @compoundfont[1] = [@kanjifont]
- @fontslot['kanjifont'] = @kanjifont
- table = nil
- TkFont::Tk_FontUseTBL.mutex.synchronize{
- table = TkFont::Tk_FontUseTBL.clone
- }
- table.dup.each{|w, fobj|
- if self == fobj
- begin
- if w.include?(';')
- win, tag, optkey = w.split(';')
- optkey = 'kanjifont' unless optkey
- winobj = tk_tcl2ruby(win)
-# winobj.tagfont_configure(tag, {'kanjifont'=>@kanjifont})
- #if winobj.kind_of? TkText
- if winobj.kind_of?(TkText) || winobj.kind_of?(Tk::Text)
- tk_call(win, 'tag', 'configure', tag, "-#{optkey}", @kanjifont)
- #elsif winobj.kind_of? TkCanvas
- elsif winobj.kind_of?(TkCanvas) || winobj.kind_of?(Tk::Canvas)
- tk_call(win, 'itemconfigure', tag, "-#{optkey}", @kanjifont)
- #elsif winobj.kind_of? TkMenu
- elsif winobj.kind_of?(TkMenu) || winobj.kind_of?(Tk::Menu)
- tk_call(win, 'entryconfigure', tag, "-#{optkey}", @latinfont)
- else
- raise RuntimeError, "unknown widget type"
- end
- else
-# tk_tcl2ruby(w).font_configure('kanjifont'=>@kanjifont)
- tk_call(w, 'configure', '-kanjifont', @kanjifont)
- end
- rescue
- Tk_FontUseTBL.mutex.synchronize{
- TkFont::Tk_FontUseTBL.delete(w)
- }
- end
- end
- }
- self
- end
-
- def latin_replace_core_tk8x(ltn)
- ltn = '{}' if ltn == ''
-
- if JAPANIZED_TK
- begin
- tk_call('font', 'delete', '@font_tmp')
- rescue
- end
- begin
- fnt_bup = tk_call('font', 'create', '@font_tmp', '-copy', @latinfont)
- rescue
- #fnt_bup = ''
- fnt_bup = TkFont::DEFAULT_LATIN_FONT_NAME
- end
- end
-
- begin
- tk_call('font', 'delete', @latinfont)
- rescue
- end
- create_latinfont(ltn)
-
- if JAPANIZED_TK
- keys = self.configinfo
- tk_call('font', 'delete', @compoundfont)
- begin
- tk_call('font', 'create', @compoundfont,
- '-compound', [@latinfont, @kanjifont], *hash_kv(keys))
-=begin
- latinkeys = {}
- begin
- actual_core(@latinfont).each{|key,val| latinkeys[key] = val}
- rescue
- latinkeys = {}
- end
- if latinkeys != {}
- tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))
- end
-=end
- rescue RuntimeError => e
- tk_call('font', 'delete', @latinfont)
- if fnt_bup && fnt_bup != ''
- tk_call('font', 'create', @latinfont, '-copy', fnt_bup)
- tk_call('font', 'create', @compoundfont,
- '-compound', [@latinfont, @kanjifont], *hash_kv(keys))
- tk_call('font', 'delete', fnt_bup)
- else
- fail e
- end
- end
-
- else
- latinkeys = {}
- begin
- actual_core(@latinfont).each{|key,val| latinkeys[key] = val}
- rescue
- latinkeys = {}
- end
- begin
- tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))
- rescue
- # not exist? (deleted?) -> create font
- tk_call('font', 'create', @compoundfont, *hash_kv(latinkeys))
- end
- end
- self
- end
-
- def kanji_replace_core_tk8x(knj)
- knj = '{}' if knj == ''
-
- if JAPANIZED_TK
- begin
- tk_call('font', 'delete', '@font_tmp')
- rescue
- end
- begin
- fnt_bup = tk_call('font', 'create', '@font_tmp', '-copy', @kanjifont)
- rescue
- #fnt_bup = ''
- fnt_bup = TkFont::DEFAULT_KANJI_FONT_NAME
- end
- end
-
- begin
- tk_call('font', 'delete', @kanjifont)
- rescue
- end
- create_kanjifont(knj)
-
- if JAPANIZED_TK
- keys = self.configinfo
- tk_call('font', 'delete', @compoundfont)
- begin
- tk_call('font', 'create', @compoundfont,
- '-compound', [@latinfont, @kanjifont], *hash_kv(keys))
- rescue RuntimeError => e
- tk_call('font', 'delete', @kanjifont)
- if fnt_bup && fnt_bup != ''
- tk_call('font', 'create', @kanjifont, '-copy', fnt_bup)
- tk_call('font', 'create', @compoundfont,
- '-compound', [@latinfont, @kanjifont], *hash_kv(keys))
- tk_call('font', 'delete', fnt_bup)
- else
- fail e
- end
- end
- end
- self
- end
-
- def measure_core_tk4x(font, win, text)
- 0
- end
-
- def measure_core_tk8x(font, win, text)
- font = '{}' if font == ''
-
- if win
- number(tk_call('font', 'measure', font,
- '-displayof', win, text))
- else
- number(tk_call('font', 'measure', font, text))
- end
- end
-
- def metrics_core_tk4x(font, win, option=nil)
- # dummy
- if option
- ""
- else
- [['ascent',[]], ['descent',[]], ['linespace',[]], ['fixed',[]]]
- end
- end
-
- def metrics_core_tk8x(font, win, option=nil)
- font = '{}' if font == ''
-
- if option
- if win
- number(tk_call('font', 'metrics', font,
- "-displayof", win, "-#{option}"))
- else
- number(tk_call('font', 'metrics', font, "-#{option}"))
- end
- else
- l = tk_split_list(if win
- tk_call('font','metrics',font,"-displayof",win)
- else
- tk_call('font','metrics',font)
- end)
- r = []
- while key=l.shift
- r.push [key[1..-1], l.shift.to_i]
-=begin
- if key == '-fixed' # boolean value
- r.push [key[1..-1], bool(l.shift)]
- else
- r.push [key[1..-1], l.shift.to_i]
- end
-=end
- end
- r
- end
- end
-
- ###################################
- # private alias
- ###################################
- case (Tk::TK_VERSION)
- when /^4\..*/
- alias actual_core actual_core_tk4x
- alias configure_core configure_core_tk4x
- alias configinfo_core configinfo_core_tk4x
- alias current_configinfo_core current_configinfo_core_tk4x
- alias delete_core delete_core_tk4x
- alias latin_replace_core latin_replace_core_tk4x
- alias kanji_replace_core kanji_replace_core_tk4x
- alias measure_core measure_core_tk4x
- alias metrics_core metrics_core_tk4x
-
- when /^8\.[0-9]/
- alias actual_core actual_core_tk8x
- alias configure_core configure_core_tk8x
- alias configinfo_core configinfo_core_tk8x
- alias current_configinfo_core current_configinfo_core_tk8x
- alias delete_core delete_core_tk8x
- alias latin_replace_core latin_replace_core_tk8x
- alias kanji_replace_core kanji_replace_core_tk8x
- alias measure_core measure_core_tk8x
- alias metrics_core metrics_core_tk8x
-
- else
- alias actual_core actual_core_tk8x
- alias configure_core configure_core_tk8x
- alias configinfo_core configinfo_core_tk8x
- alias current_configinfo_core current_configinfo_core_tk8x
- alias delete_core delete_core_tk8x
- alias latin_replace_core latin_replace_core_tk8x
- alias kanji_replace_core kanji_replace_core_tk8x
- alias measure_core measure_core_tk8x
- alias metrics_core metrics_core_tk8x
-
- end
-end
-
-class TkFont
- include TkFont::CoreMethods
- extend TkFont::CoreMethods
-end
-
-class TkNamedFont < TkFont
- # for built-in named fonts
- def TkNamedFont.find(name)
- name = name.to_s
- unless (obj = Tk_FontNameTBL[name])
- obj = self.new(name) if TkFont.is_system_font?(name)
- end
- obj
- end
-
- def TkNamedFont.new(name, keys=nil)
- name = name.to_s
- obj = nil
- Tk_FontNameTBL.mutex.synchronize{
- unless (obj = Tk_FontNameTBL[name])
- (obj = self.allocate).instance_eval{
- @id = @compoundfont = name.to_s
- @latinfont = nil
- @kanjifont = nil
- @descendant = [self, self] # [latin, kanji] : dummy
- Tk_FontNameTBL[@id] = self
- }
- end
- }
- obj.instance_eval{ initialize(name, keys) }
- obj
- end
-
- ###########################
- private
- ###########################
- def initialize(name, keys=nil)
- @id = @compoundfont = name.to_s
-
- # if not exist named font, create it.
- begin
- if keys
- tk_call('font', 'configure', @compoundfont, keys)
- else
- tk_call('font', 'configure', @compoundfont)
- end
- rescue
- # the named font doesn't exist -> create
- if keys
- tk_call('font', 'create', @compoundfont, keys)
- else
- tk_call('font', 'create', @compoundfont)
- end
- end
- end
-
- def create_latinfont(fnt)
- # ignore
- end
- def create_kanjifont(fnt)
- # ignore
- end
- def create_compoundfont(ltn, knj, keys)
- # ignore
- end
-
- ###########################
- public
- ###########################
- def latin_font_id
- @compoundfont
- end
- def kanji_font_id
- @compoundfont
- end
-end
-
-#######################################
-# define system font names
-#######################################
-if Tk::TCL_MAJOR_VERSION > 8 ||
- (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5)
- # add standard fonts of Tcl/Tk 8.5+
- TkFont::SYSTEM_FONT_NAMES.add [
- 'TkDefaultFont', 'TkTextFont', 'TkFixedFont', 'TkMenuFont',
- 'TkHeadingFont', 'TkCaptionFont', 'TkSmallCaptionFont',
- 'TkIconFont', 'TkTooltipFont'
- ]
-end
-
-# platform-specific fonts
-# -- windows
-TkFont::SYSTEM_FONT_NAMES.add [
- 'ansifixed', 'ansi', 'device', 'oemfixed', 'systemfixed', 'system'
-]
-
-# -- macintosh, macosx
-TkFont::SYSTEM_FONT_NAMES.add ['system', 'application']
-
-if Tk::TCL_MAJOR_VERSION > 8 ||
- (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5)
- TkFont::SYSTEM_FONT_NAMES.add ['menu']
-end
-
-# -- macosx (Aqua theme)
-if Tk::TCL_MAJOR_VERSION > 8 ||
- (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5)
- TkFont::SYSTEM_FONT_NAMES.add [
- 'systemSystemFont', 'systemEmphasizedSystemFont',
- 'systemSmallSystemFont', 'systemSmallEmphasizedSystemFont',
- 'systemApplicationFont', 'systemLabelFont', 'systemViewsFont',
- 'systemMenuTitleFont', 'systemMenuItemFont', 'systemMenuItemMarkFont',
- 'systemMenuItemCmdKeyFont', 'systemWindowTitleFont',
- 'systemPushButtonFont', 'systemUtilityWindowTitleFont',
- 'systemAlertHeaderFont', 'systemToolbarFont', 'systemMiniSystemFont',
- 'systemDetailSystemFont', 'systemDetailEmphasizedSystemFont'
- ]
-end
-
-#######################################
-# autoload
-#######################################
-class TkFont
- autoload :Chooser, 'tk/fontchooser'
-end
diff --git a/ext/tk/lib/tk/fontchooser.rb b/ext/tk/lib/tk/fontchooser.rb
deleted file mode 100644
index 325ca4dbd2..0000000000
--- a/ext/tk/lib/tk/fontchooser.rb
+++ /dev/null
@@ -1,181 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/fontchooser.rb -- "tk fontchooser" support (Tcl/Tk8.6 or later)
-#
-require 'tk'
-require 'tk/font'
-
-module TkFont::Chooser
- extend TkCore
-end
-
-module Tk
- Fontchooser = TkFont::Chooser
-end
-
-class << TkFont::Chooser
- def method_missing(id, *args)
- name = id.id2name
- case args.length
- when 1
- if name[-1] == ?=
- configure name[0..-2], args[0]
- args[0]
- else
- configure name, args[0]
- self
- end
- when 0
- begin
- cget(name)
- rescue
- super(id, *args)
- end
- else
- super(id, *args)
- end
- end
-
- def __configinfo_value(key, val)
- case key
- when 'parent'
- window(val)
- when 'title'
- val
- when 'font'
- if (lst = tk_split_simplelist(val)).size == 1
- lst[0]
- else
- lst.map{|elem| num_or_str(elem)}
- end
- when 'command'
- tk_tcl2ruby(val)
- when 'visible'
- bool(val)
- else # unknown
- val
- end
- end
- private :__configinfo_value
-
- def configinfo(option=nil)
- if !option && TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- lst = tk_split_simplelist(tk_call('tk', 'fontchooser', 'configure'))
- ret = []
- TkComm.slice_ary(lst, 2){|k, v|
- k = k[1..-1]
- ret << [k, __configinfo_value(k, v)]
- }
- ret
- else
- current_configinfo(option)
- end
- end
-
- def current_configinfo(option=nil)
- if option
- opt = option.to_s
- fail ArgumentError, "Invalid option `#{option.inspect}'" if opt.empty?
- __configinfo_value(option.to_s, tk_call('tk','fontchooser',
- 'configure',"-#{opt}"))
- else
- lst = tk_split_simplelist(tk_call('tk', 'fontchooser', 'configure'))
- ret = {}
- TkComm.slice_ary(lst, 2){|k, v|
- k = k[1..-1]
- ret[k] = __configinfo_value(k, v)
- }
- ret
- end
- end
-
- def configure(option, value=None)
- if option.kind_of? Hash
- tk_call('tk', 'fontchooser', 'configure',
- *hash_kv(_symbolkey2str(option)))
- else
- opt = option.to_s
- fail ArgumentError, "Invalid option `#{option.inspect}'" if opt.empty?
- tk_call('tk', 'fontchooser', 'configure', "-#{opt}", value)
- end
- self
- end
-
- def configure_cmd(slot, value)
- configure(slot, install_cmd(value))
- end
-
- def command(cmd=nil, &b)
- if cmd
- configure_cmd('command', cmd)
- elsif b
- configure_cmd('command', Proc.new(&b))
- else
- cget('command')
- end
- end
-
- def cget(slot)
- configinfo slot
- end
-
- def [](slot)
- cget slot
- end
-
- def []=(slot, val)
- configure slot, val
- val
- end
-
- def show
- tk_call('tk', 'fontchooser', 'show')
- self
- end
-
- def hide
- tk_call('tk', 'fontchooser', 'hide')
- self
- end
-
- def toggle
- cget(:visible) ? hide: show
- self
- end
-
- def set_for(target, title="Font")
- if target.kind_of? TkFont
- configs = {
- :font=>target.actual_hash,
- :command=>proc{|fnt, *args|
- target.configure(TkFont.actual_hash(fnt))
- }
- }
- elsif target.kind_of? Hash
- # key=>value list or OptionObj
- fnt = target[:font] rescue ''
- fnt = fnt.actual_hash if fnt.kind_of?(TkFont)
- configs = {
- :font => fnt,
- :command=>proc{|fnt, *args|
- target[:font] = TkFont.actual_hash(fnt)
- }
- }
- else
- configs = {
- :font=>target.cget_tkstring(:font),
- :command=>proc{|fnt, *args|
- target.font = TkFont.actual_hash_displayof(fnt, target)
- }
- }
- end
-
- configs[:title] = title if title
- configure(configs)
- target
- end
-
- def unset
- configure(:command, nil)
- end
-end
diff --git a/ext/tk/lib/tk/frame.rb b/ext/tk/lib/tk/frame.rb
deleted file mode 100644
index 0682faf3fe..0000000000
--- a/ext/tk/lib/tk/frame.rb
+++ /dev/null
@@ -1,133 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/frame.rb : treat frame widget
-#
-require 'tk'
-
-class Tk::Frame<TkWindow
- TkCommandNames = ['frame'.freeze].freeze
- WidgetClassName = 'Frame'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
-################# old version
-# def initialize(parent=nil, keys=nil)
-# if keys.kind_of? Hash
-# keys = keys.dup
-# @classname = keys.delete('classname') if keys.key?('classname')
-# @colormap = keys.delete('colormap') if keys.key?('colormap')
-# @container = keys.delete('container') if keys.key?('container')
-# @visual = keys.delete('visual') if keys.key?('visual')
-# end
-# super(parent, keys)
-# end
-#
-# def create_self
-# s = []
-# s << "-class" << @classname if @classname
-# s << "-colormap" << @colormap if @colormap
-# s << "-container" << @container if @container
-# s << "-visual" << @visual if @visual
-# tk_call 'frame', @path, *s
-# end
-#################
-
- def __boolval_optkeys
- super() << 'container'
- end
- private :__boolval_optkeys
-
- def initialize(parent=nil, keys=nil)
- my_class_name = nil
- if self.class < WidgetClassNames[self.class::WidgetClassName]
- my_class_name = self.class.name
- my_class_name = nil if my_class_name == ''
- end
- if parent.kind_of? Hash
- keys = _symbolkey2str(parent)
- else
- if keys
- keys = _symbolkey2str(keys)
- keys['parent'] = parent
- else
- keys = {'parent'=>parent}
- end
- end
- if keys.key?('classname')
- keys['class'] = keys.delete('classname')
- end
- @classname = keys['class']
- @colormap = keys['colormap']
- @container = keys['container']
- @visual = keys['visual']
- if !@classname && my_class_name
- keys['class'] = @classname = my_class_name
- end
- if @classname.kind_of? TkBindTag
- @db_class = @classname
- @classname = @classname.id
- elsif @classname
- @db_class = TkDatabaseClass.new(@classname)
- else
- @db_class = self.class
- @classname = @db_class::WidgetClassName
- end
- super(keys)
- end
-
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('frame', @path, *hash_kv(keys))
- # else
- # tk_call_without_enc( 'frame', @path)
- # end
- #end
- #private :create_self
-
- def database_classname
- @classname
- end
-
- def self.database_class
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- self
- else
- TkDatabaseClass.new(self.name)
- end
- end
- def self.database_classname
- self.database_class.name
- end
-
- def self.bind(*args, &b)
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args, &b)
- else
- TkDatabaseClass.new(self.name).bind(*args, &b)
- end
- end
- def self.bind_append(*args, &b)
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args, &b)
- else
- TkDatabaseClass.new(self.name).bind_append(*args, &b)
- end
- end
- def self.bind_remove(*args)
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args)
- else
- TkDatabaseClass.new(self.name).bind_remove(*args)
- end
- end
- def self.bindinfo(*args)
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args)
- else
- TkDatabaseClass.new(self.name).bindinfo(*args)
- end
- end
-end
-
-#TkFrame = Tk::Frame unless Object.const_defined? :TkFrame
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Frame, :TkFrame)
-Tk.__set_loaded_toplevel_aliases__('tk/frame.rb', :Tk, Tk::Frame, :TkFrame)
diff --git a/ext/tk/lib/tk/grid.rb b/ext/tk/lib/tk/grid.rb
deleted file mode 100644
index 5a4a26403a..0000000000
--- a/ext/tk/lib/tk/grid.rb
+++ /dev/null
@@ -1,280 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/grid.rb : control grid geometry manager
-#
-require 'tk'
-
-module TkGrid
- include Tk
- extend Tk
-
- TkCommandNames = ['grid'.freeze].freeze
-
- def anchor(master, anchor=None)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- tk_call_without_enc('grid', 'anchor', master, anchor)
- end
-
- def bbox(master, *args)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- args.unshift(master)
- list(tk_call_without_enc('grid', 'bbox', *args))
- end
-
-=begin
- def configure(win, *args)
- if args[-1].kind_of?(Hash)
- opts = args.pop
- else
- opts = {}
- end
- params = []
- params.push(_epath(win))
- args.each{|win|
- case win
- when '-', 'x', '^' # RELATIVE PLACEMENT
- params.push(win)
- else
- params.push(_epath(win))
- end
- }
- opts.each{|k, v|
- params.push("-#{k}")
- params.push((v.kind_of?(TkObject))? v.epath: v)
- }
- if Tk::TCL_MAJOR_VERSION < 8 ||
- (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION <= 3)
- if params[0] == '-' || params[0] == 'x' || params[0] == '^'
- tk_call_without_enc('grid', *params)
- else
- tk_call_without_enc('grid', 'configure', *params)
- end
- else
- tk_call_without_enc('grid', 'configure', *params)
- end
- end
-=end
- def configure(*args)
- if args[-1].kind_of?(Hash)
- opts = args.pop
- else
- opts = {}
- end
- fail ArgumentError, 'no widget is given' if args.empty?
- params = []
- args.flatten(1).each{|win|
- case win
- when '-', ?- # RELATIVE PLACEMENT (increase columnspan)
- params.push('-')
- when /^-+$/ # RELATIVE PLACEMENT (increase columnspan)
- params.concat(win.to_s.split(//))
- when '^', ?^ # RELATIVE PLACEMENT (increase rowspan)
- params.push('^')
- when /^\^+$/ # RELATIVE PLACEMENT (increase rowspan)
- params.concat(win.to_s.split(//))
- when 'x', :x, ?x, nil, '' # RELATIVE PLACEMENT (empty column)
- params.push('x')
- when /^x+$/ # RELATIVE PLACEMENT (empty column)
- params.concat(win.to_s.split(//))
- else
- params.push(_epath(win))
- end
- }
- opts.each{|k, v|
- params.push("-#{k}")
- params.push(_epath(v)) # have to use 'epath' (hash_kv() is unavailable)
- }
- if Tk::TCL_MAJOR_VERSION < 8 ||
- (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION <= 3)
- if params[0] == '-' || params[0] == 'x' || params[0] == '^'
- tk_call_without_enc('grid', *params)
- else
- tk_call_without_enc('grid', 'configure', *params)
- end
- else
- tk_call_without_enc('grid', 'configure', *params)
- end
- end
- alias grid configure
-
- def columnconfigure(master, index, args)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- tk_call_without_enc("grid", 'columnconfigure',
- master, index, *hash_kv(args))
- end
-
- def rowconfigure(master, index, args)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- tk_call_without_enc("grid", 'rowconfigure', master, index, *hash_kv(args))
- end
-
- def columnconfiginfo(master, index, slot=nil)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- if slot
- case slot
- when 'uniform', :uniform
- tk_call_without_enc('grid', 'columnconfigure',
- master, index, "-#{slot}")
- else
- num_or_str(tk_call_without_enc('grid', 'columnconfigure',
- master, index, "-#{slot}"))
- end
- else
- #ilist = list(tk_call_without_enc('grid','columnconfigure',master,index))
- ilist = simplelist(tk_call_without_enc('grid', 'columnconfigure',
- master, index))
- info = {}
- while key = ilist.shift
- case key
- when 'uniform'
- info[key[1..-1]] = ilist.shift
- else
- info[key[1..-1]] = tk_tcl2ruby(ilist.shift)
- end
- end
- info
- end
- end
-
- def rowconfiginfo(master, index, slot=nil)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- if slot
- case slot
- when 'uniform', :uniform
- tk_call_without_enc('grid', 'rowconfigure',
- master, index, "-#{slot}")
- else
- num_or_str(tk_call_without_enc('grid', 'rowconfigure',
- master, index, "-#{slot}"))
- end
- else
- #ilist = list(tk_call_without_enc('grid', 'rowconfigure', master, index))
- ilist = simplelist(tk_call_without_enc('grid', 'rowconfigure',
- master, index))
- info = {}
- while key = ilist.shift
- case key
- when 'uniform'
- info[key[1..-1]] = ilist.shift
- else
- info[key[1..-1]] = tk_tcl2ruby(ilist.shift)
- end
- end
- info
- end
- end
-
- def column(master, index, keys=nil)
- if keys.kind_of?(Hash)
- columnconfigure(master, index, keys)
- else
- columnconfiginfo(master, index, keys)
- end
- end
-
- def row(master, index, keys=nil)
- if keys.kind_of?(Hash)
- rowconfigure(master, index, keys)
- else
- rowconfiginfo(master, index, keys)
- end
- end
-
- def add(widget, *args)
- configure(widget, *args)
- end
-
- def forget(*args)
- return '' if args.size == 0
- wins = args.collect{|win|
- # (win.kind_of?(TkObject))? win.epath: win
- _epath(win)
- }
- tk_call_without_enc('grid', 'forget', *wins)
- end
-
- def info(slave)
- # slave = slave.epath if slave.kind_of?(TkObject)
- slave = _epath(slave)
- #ilist = list(tk_call_without_enc('grid', 'info', slave))
- ilist = simplelist(tk_call_without_enc('grid', 'info', slave))
- info = {}
- while key = ilist.shift
- #info[key[1..-1]] = ilist.shift
- info[key[1..-1]] = tk_tcl2ruby(ilist.shift)
- end
- return info
- end
-
- def location(master, x, y)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- list(tk_call_without_enc('grid', 'location', master, x, y))
- end
-
- def propagate(master, mode=None)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- if mode == None
- bool(tk_call_without_enc('grid', 'propagate', master))
- else
- tk_call_without_enc('grid', 'propagate', master, mode)
- end
- end
-
- def remove(*args)
- return '' if args.size == 0
- wins = args.collect{|win|
- # (win.kind_of?(TkObject))? win.epath: win
- _epath(win)
- }
- tk_call_without_enc('grid', 'remove', *wins)
- end
-
- def size(master)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- list(tk_call_without_enc('grid', 'size', master))
- end
-
- def slaves(master, keys=nil)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- list(tk_call_without_enc('grid', 'slaves', master, *hash_kv(args)))
- end
-
- module_function :anchor, :bbox, :add, :forget, :propagate, :info
- module_function :remove, :size, :slaves, :location
- module_function :grid, :configure, :columnconfigure, :rowconfigure
- module_function :column, :row, :columnconfiginfo, :rowconfiginfo
-end
-=begin
-def TkGrid(win, *args)
- if args[-1].kind_of?(Hash)
- opts = args.pop
- else
- opts = {}
- end
- params = []
- params.push((win.kind_of?(TkObject))? win.epath: win)
- args.each{|win|
- case win
- when '-', 'x', '^' # RELATIVE PLACEMENT
- params.push(win)
- else
- params.push((win.kind_of?(TkObject))? win.epath: win)
- end
- }
- opts.each{|k, v|
- params.push("-#{k}")
- params.push((v.kind_of?(TkObject))? v.epath: v)
- }
- tk_call_without_enc("grid", *params)
-end
-=end
diff --git a/ext/tk/lib/tk/image.rb b/ext/tk/lib/tk/image.rb
deleted file mode 100644
index ec23e495d0..0000000000
--- a/ext/tk/lib/tk/image.rb
+++ /dev/null
@@ -1,396 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/image.rb : treat Tk image objects
-#
-
-require 'tk'
-
-class TkImage<TkObject
- include Tk
-
- TkCommandNames = ['image'.freeze].freeze
-
- Tk_IMGTBL = TkCore::INTERP.create_table
-
- (Tk_Image_ID = ['i'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- Tk_IMGTBL.mutex.synchronize{ Tk_IMGTBL.clear }
- }
-
- def self.new(keys=nil)
- if keys.kind_of?(Hash)
- name = nil
- if keys.key?(:imagename)
- name = keys[:imagename]
- elsif keys.key?('imagename')
- name = keys['imagename']
- end
- if name
- if name.kind_of?(TkImage)
- obj = name
- else
- name = _get_eval_string(name)
- obj = nil
- Tk_IMGTBL.mutex.synchronize{
- obj = Tk_IMGTBL[name]
- }
- end
- if obj
- if !(keys[:without_creating] || keys['without_creating'])
- keys = _symbolkey2str(keys)
- keys.delete('imagename')
- keys.delete('without_creating')
- obj.instance_eval{
- tk_call_without_enc('image', 'create',
- @type, @path, *hash_kv(keys, true))
- }
- end
- return obj
- end
- end
- end
- (obj = self.allocate).instance_eval{
- Tk_IMGTBL.mutex.synchronize{
- initialize(keys)
- Tk_IMGTBL[@path] = self
- }
- }
- obj
- end
-
- def initialize(keys=nil)
- @path = nil
- without_creating = false
- if keys.kind_of?(Hash)
- keys = _symbolkey2str(keys)
- @path = keys.delete('imagename')
- without_creating = keys.delete('without_creating')
- end
- unless @path
- Tk_Image_ID.mutex.synchronize{
- @path = Tk_Image_ID.join(TkCore::INTERP._ip_id_)
- Tk_Image_ID[1].succ!
- }
- end
- unless without_creating
- tk_call_without_enc('image', 'create',
- @type, @path, *hash_kv(keys, true))
- end
- end
-
- def delete
- Tk_IMGTBL.mutex.synchronize{
- Tk_IMGTBL.delete(@id) if @id
- }
- tk_call_without_enc('image', 'delete', @path)
- self
- end
- def height
- number(tk_call_without_enc('image', 'height', @path))
- end
- def inuse
- bool(tk_call_without_enc('image', 'inuse', @path))
- end
- def itemtype
- tk_call_without_enc('image', 'type', @path)
- end
- def width
- number(tk_call_without_enc('image', 'width', @path))
- end
-
- def TkImage.names
- Tk_IMGTBL.mutex.synchronize{
- Tk.tk_call_without_enc('image', 'names').split.collect!{|id|
- (Tk_IMGTBL[id])? Tk_IMGTBL[id] : id
- }
- }
- end
-
- def TkImage.types
- Tk.tk_call_without_enc('image', 'types').split
- end
-end
-
-class TkBitmapImage<TkImage
- def __strval_optkeys
- super() + ['maskdata', 'maskfile']
- end
- private :__strval_optkeys
-
- def initialize(*args)
- @type = 'bitmap'
- super(*args)
- end
-end
-
-# A photo is an image whose pixels can display any color or be transparent.
-# At present, only GIF and PPM/PGM formats are supported, but an interface
-# exists to allow additional image file formats to be added easily.
-#
-# This class documentation is a copy from the original Tcl/Tk at
-# http://www.tcl.tk/man/tcl8.5/TkCmd/photo.htm with some rewritten parts.
-class TkPhotoImage<TkImage
- NullArgOptionKeys = [ "shrink", "grayscale" ]
-
- def _photo_hash_kv(keys)
- keys = _symbolkey2str(keys)
- NullArgOptionKeys.collect{|opt|
- if keys[opt]
- keys[opt] = None
- else
- keys.delete(opt)
- end
- }
- keys.collect{|k,v|
- ['-' << k, v]
- }.flatten
- end
- private :_photo_hash_kv
-
- # Create a new image with the given options.
- # == Examples of use :
- # === Create an empty image of 300x200 pixels
- #
- # image = TkPhotoImage.new(:height => 200, :width => 300)
- #
- # === Create an image from a file
- #
- # image = TkPhotoImage.new(:file: => 'my_image.gif')
- #
- # == Options
- # Photos support the following options:
- # * :data
- # Specifies the contents of the image as a string.
- # * :format
- # Specifies the name of the file format for the data.
- # * :file
- # Gives the name of a file that is to be read to supply data for the image.
- # * :gamma
- # Specifies that the colors allocated for displaying this image in a window
- # should be corrected for a non-linear display with the specified gamma
- # exponent value.
- # * height
- # Specifies the height of the image, in pixels. This option is useful
- # primarily in situations where the user wishes to build up the contents of
- # the image piece by piece. A value of zero (the default) allows the image
- # to expand or shrink vertically to fit the data stored in it.
- # * palette
- # Specifies the resolution of the color cube to be allocated for displaying
- # this image.
- # * width
- # Specifies the width of the image, in pixels. This option is useful
- # primarily in situations where the user wishes to build up the contents of
- # the image piece by piece. A value of zero (the default) allows the image
- # to expand or shrink horizontally to fit the data stored in it.
- def initialize(*args)
- @type = 'photo'
- super(*args)
- end
-
- # Blank the image; that is, set the entire image to have no data, so it will
- # be displayed as transparent, and the background of whatever window it is
- # displayed in will show through.
- def blank
- tk_send_without_enc('blank')
- self
- end
-
- def cget_strict(option)
- case option.to_s
- when 'data', 'file'
- tk_send 'cget', '-' << option.to_s
- else
- tk_tcl2ruby(tk_send('cget', '-' << option.to_s))
- end
- end
-
- # Returns the current value of the configuration option given by option.
- # Example, display name of the file from which <tt>image</tt> was created:
- # puts image.cget :file
- def cget(option)
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- cget_strict(option)
- else
- begin
- cget_strict(option)
- rescue => e
- if current_configinfo.has_key?(option.to_s)
- # error on known option
- fail e
- else
- # unknown option
- nil
- end
- end
- end
- end
-
- # Copies a region from the image called source to the image called
- # destination, possibly with pixel zooming and/or subsampling. If no options
- # are specified, this method copies the whole of source into destination,
- # starting at coordinates (0,0) in destination. The following options may be
- # specified:
- #
- # * :from [x1, y1, x2, y2]
- # Specifies a rectangular sub-region of the source image to be copied.
- # (x1,y1) and (x2,y2) specify diagonally opposite corners of the rectangle.
- # If x2 and y2 are not specified, the default value is the bottom-right
- # corner of the source image. The pixels copied will include the left and
- # top edges of the specified rectangle but not the bottom or right edges.
- # If the :from option is not given, the default is the whole source image.
- # * :to [x1, y1, x2, y2]
- # Specifies a rectangular sub-region of the destination image to be
- # affected. (x1,y1) and (x2,y2) specify diagonally opposite corners of the
- # rectangle. If x2 and y2 are not specified, the default value is (x1,y1)
- # plus the size of the source region (after subsampling and zooming, if
- # specified). If x2 and y2 are specified, the source region will be
- # replicated if necessary to fill the destination region in a tiled fashion.
- # * :shrink
- # Specifies that the size of the destination image should be reduced, if
- # necessary, so that the region being copied into is at the bottom-right
- # corner of the image. This option will not affect the width or height of
- # the image if the user has specified a non-zero value for the :width or
- # :height configuration option, respectively.
- # * :zoom [x, y]
- # Specifies that the source region should be magnified by a factor of x
- # in the X direction and y in the Y direction. If y is not given, the
- # default value is the same as x. With this option, each pixel in the
- # source image will be expanded into a block of x x y pixels in the
- # destination image, all the same color. x and y must be greater than 0.
- # * :subsample [x, y]
- # Specifies that the source image should be reduced in size by using only
- # every xth pixel in the X direction and yth pixel in the Y direction.
- # Negative values will cause the image to be flipped about the Y or X axes,
- # respectively. If y is not given, the default value is the same as x.
- # * :compositingrule rule
- # Specifies how transparent pixels in the source image are combined with
- # the destination image. When a compositing rule of <tt>overlay</tt> is set,
- # the old contents of the destination image are visible, as if the source
- # image were printed on a piece of transparent film and placed over the
- # top of the destination. When a compositing rule of <tt>set</tt> is set,
- # the old contents of the destination image are discarded and the source
- # image is used as-is. The default compositing rule is <tt>overlay</tt>.
- def copy(src, *opts)
- if opts.size == 0
- tk_send('copy', src)
- elsif opts.size == 1 && opts[0].kind_of?(Hash)
- tk_send('copy', src, *_photo_hash_kv(opts[0]))
- else
- # for backward compatibility
- args = opts.collect{|term|
- if term.kind_of?(String) && term.include?(?\s)
- term.split
- else
- term
- end
- }.flatten
- tk_send('copy', src, *args)
- end
- self
- end
-
- # Returns image data in the form of a string. The following options may be
- # specified:
- # * :background color
- # If the color is specified, the data will not contain any transparency
- # information. In all transparent pixels the color will be replaced by the
- # specified color.
- # * :format format-name
- # Specifies the name of the image file format handler to be used.
- # Specifically, this subcommand searches for the first handler whose name
- # matches an initial substring of format-name and which has the capability
- # to read this image data. If this option is not given, this subcommand
- # uses the first handler that has the capability to read the image data.
- # * :from [x1, y1, x2, y2]
- # Specifies a rectangular region of imageName to be returned. If only x1
- # and y1 are specified, the region extends from (x1,y1) to the bottom-right
- # corner of imageName. If all four coordinates are given, they specify
- # diagonally opposite corners of the rectangular region, including x1,y1
- # and excluding x2,y2. The default, if this option is not given, is the
- # whole image.
- # * :grayscale
- # If this options is specified, the data will not contain color information.
- # All pixel data will be transformed into grayscale.
- def data(keys={})
- tk_split_list(tk_send('data', *_photo_hash_kv(keys)))
- end
-
- # Returns the color of the pixel at coordinates (x,y) in the image as a list
- # of three integers between 0 and 255, representing the red, green and blue
- # components respectively.
- def get(x, y)
- tk_send('get', x, y).split.collect{|n| n.to_i}
- end
-
- def put(data, *opts)
- if opts.empty?
- tk_send('put', data)
- elsif opts.size == 1 && opts[0].kind_of?(Hash)
- tk_send('put', data, *_photo_hash_kv(opts[0]))
- else
- # for backward compatibility
- tk_send('put', data, '-to', *opts)
- end
- self
- end
-
- def read(file, *opts)
- if opts.size == 0
- tk_send('read', file)
- elsif opts.size == 1 && opts[0].kind_of?(Hash)
- tk_send('read', file, *_photo_hash_kv(opts[0]))
- else
- # for backward compatibility
- args = opts.collect{|term|
- if term.kind_of?(String) && term.include?(?\s)
- term.split
- else
- term
- end
- }.flatten
- tk_send('read', file, *args)
- end
- self
- end
-
- def redither
- tk_send 'redither'
- self
- end
-
- # Returns a boolean indicating if the pixel at (x,y) is transparent.
- def get_transparency(x, y)
- bool(tk_send('transparency', 'get', x, y))
- end
-
- # Makes the pixel at (x,y) transparent if <tt>state</tt> is true, and makes
- # that pixel opaque otherwise.
- def set_transparency(x, y, state)
- tk_send('transparency', 'set', x, y, state)
- self
- end
-
- def write(file, *opts)
- if opts.size == 0
- tk_send('write', file)
- elsif opts.size == 1 && opts[0].kind_of?(Hash)
- tk_send('write', file, *_photo_hash_kv(opts[0]))
- else
- # for backward compatibility
- args = opts.collect{|term|
- if term.kind_of?(String) && term.include?(?\s)
- term.split
- else
- term
- end
- }.flatten
- tk_send('write', file, *args)
- end
- self
- end
-end
diff --git a/ext/tk/lib/tk/itemconfig.rb b/ext/tk/lib/tk/itemconfig.rb
deleted file mode 100644
index e615fa0950..0000000000
--- a/ext/tk/lib/tk/itemconfig.rb
+++ /dev/null
@@ -1,1222 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/itemconfig.rb : control item/tag configuration of widget
-#
-require 'tk'
-require 'tkutil'
-require 'tk/itemfont.rb'
-
-module TkItemConfigOptkeys
- include TkUtil
-
- def __item_optkey_aliases(id)
- {}
- end
- private :__item_optkey_aliases
-
- def __item_numval_optkeys(id)
- []
- end
- private :__item_numval_optkeys
-
- def __item_numstrval_optkeys(id)
- []
- end
- private :__item_numstrval_optkeys
-
- def __item_boolval_optkeys(id)
- ['exportselection', 'jump', 'setgrid', 'takefocus']
- end
- private :__item_boolval_optkeys
-
- def __item_strval_optkeys(id)
- # maybe need to override
- [
- 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile',
- 'activebackground', 'activeforeground', 'background',
- 'disabledforeground', 'disabledbackground', 'foreground',
- 'highlightbackground', 'highlightcolor', 'insertbackground',
- 'selectbackground', 'selectforeground', 'troughcolor'
- ]
- end
- private :__item_strval_optkeys
-
- def __item_listval_optkeys(id)
- []
- end
- private :__item_listval_optkeys
-
- def __item_numlistval_optkeys(id)
- # maybe need to override
- ['dash', 'activedash', 'disableddash']
- end
- private :__item_numlistval_optkeys
-
- def __item_tkvariable_optkeys(id)
- ['variable', 'textvariable']
- end
- private :__item_tkvariable_optkeys
-
- def __item_val2ruby_optkeys(id) # { key=>method, ... }
- # The method is used to convert a opt-value to a ruby's object.
- # When get the value of the option "key", "method.call(id, val)" is called.
- {}
- end
- private :__item_val2ruby_optkeys
-
- def __item_ruby2val_optkeys(id) # { key=>method, ... }
- # The method is used to convert a ruby's object to a opt-value.
- # When set the value of the option "key", "method.call(id, val)" is called.
- # That is, "-#{key} #{method.call(id, value)}".
- {}
- end
- private :__item_ruby2val_optkeys
-
- def __item_methodcall_optkeys(id) # { key=>method, ... }
- # Use the method for both of get and set.
- # Usually, the 'key' will not be a widget option.
- #
- # maybe need to override
- # {'coords'=>'coords'}
- {}
- end
- private :__item_methodcall_optkeys
-
- ################################################
-
- def __item_keyonly_optkeys(id) # { def_key=>(undef_key|nil), ... }
- # maybe need to override
- {}
- end
- private :__item_keyonly_optkeys
-
-
- def __conv_item_keyonly_opts(id, keys)
- return keys unless keys.kind_of?(Hash)
- keyonly = __item_keyonly_optkeys(id)
- keys2 = {}
- keys.each{|k, v|
- optkey = keyonly.find{|kk,vv| kk.to_s == k.to_s}
- if optkey
- defkey, undefkey = optkey
- if v
- keys2[defkey.to_s] = None
- else
- keys2[undefkey.to_s] = None
- end
- else
- keys2[k.to_s] = v
- end
- }
- keys2
- end
-
- def itemconfig_hash_kv(id, keys, enc_mode = nil, conf = nil)
- hash_kv(__conv_item_keyonly_opts(id, keys), enc_mode, conf)
- end
-end
-
-module TkItemConfigMethod
- include TkUtil
- include TkTreatItemFont
- include TkItemConfigOptkeys
-
- def TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- @mode || false
- end
- def TkItemConfigMethod.__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode)
- @mode = (mode)? true: false
- end
-
- def __item_cget_cmd(id)
- # maybe need to override
- [self.path, 'itemcget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- # maybe need to override
- [self.path, 'itemconfigure', id]
- end
- private :__item_config_cmd
-
- def __item_confinfo_cmd(id)
- # maybe need to override
- __item_config_cmd(id)
- end
- private :__item_confinfo_cmd
-
- def __item_configinfo_struct(id)
- # maybe need to override
- {:key=>0, :alias=>1, :db_name=>1, :db_class=>2,
- :default_value=>3, :current_value=>4}
- end
- private :__item_configinfo_struct
-
- ################################################
-
- def tagid(tagOrId)
- # maybe need to override
- tagOrId
- end
-
- ################################################
-
-
- def itemcget_tkstring(tagOrId, option)
- opt = option.to_s
- fail ArgumentError, "Invalid option `#{option.inspect}'" if opt.length == 0
- tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{opt}"))
- end
-
- def __itemcget_core(tagOrId, option)
- orig_opt = option
- option = option.to_s
-
- if option.length == 0
- fail ArgumentError, "Invalid option `#{orig_opt.inspect}'"
- end
-
- alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == option}
- if real_name
- option = real_name.to_s
- end
-
- if ( method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[option] )
- optval = tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}"))
- begin
- return method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- return optval
- end
- end
-
- if ( method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[option] )
- return self.__send__(method, tagOrId)
- end
-
- case option
- when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- number(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")))
- rescue
- nil
- end
-
- when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
- num_or_str(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")))
-
- when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- bool(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")))
- rescue
- nil
- end
-
- when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
- simplelist(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")))
-
- when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
- conf = tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}"))
- if conf =~ /^[0-9]/
- list(conf)
- else
- conf
- end
-
- when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/
- v = tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}"))
- (v.empty?)? nil: TkVarAccess.new(v)
-
- when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
- _fromUTF8(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")))
-
- when /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/
- fontcode = $1
- fontkey = $2
- fnt = tk_tcl2ruby(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{fontkey}")), true)
- unless fnt.kind_of?(TkFont)
- fnt = tagfontobj(tagid(tagOrId), fontkey)
- end
- if fontcode == 'kanji' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/
- # obsolete; just for compatibility
- fnt.kanji_font
- else
- fnt
- end
- else
- tk_tcl2ruby(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")), true)
- end
- end
- private :__itemcget_core
-
- def itemcget(tagOrId, option)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- __itemcget_core(tagOrId, option)
- else
- begin
- __itemcget_core(tagOrId, option)
- rescue => e
- begin
- if __current_itemconfiginfo(tagOrId).has_key?(option.to_s)
- # not tag error & option is known -> error on known option
- fail e
- else
- # not tag error & option is unknown
- nil
- end
- rescue
- fail e # tag error
- end
- end
- end
- end
- def itemcget_strict(tagOrId, option)
- # never use TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- __itemcget_core(tagOrId, option)
- end
-
- def __itemconfigure_core(tagOrId, slot, value=None)
- if slot.kind_of? Hash
- slot = _symbolkey2str(slot)
-
- __item_optkey_aliases(tagid(tagOrId)).each{|alias_name, real_name|
- alias_name = alias_name.to_s
- if slot.has_key?(alias_name)
- slot[real_name.to_s] = slot.delete(alias_name)
- end
- }
-
- __item_methodcall_optkeys(tagid(tagOrId)).each{|key, method|
- value = slot.delete(key.to_s)
- self.__send__(method, tagOrId, value) if value
- }
-
- __item_ruby2val_optkeys(tagid(tagOrId)).each{|key, method|
- key = key.to_s
- slot[key] = method.call(tagOrId, slot[key]) if slot.has_key?(key)
- }
-
- __item_keyonly_optkeys(tagid(tagOrId)).each{|defkey, undefkey|
- conf = slot.find{|kk, vv| kk == defkey.to_s}
- if conf
- k, v = conf
- if v
- slot[k] = None
- else
- slot[undefkey.to_s] = None if undefkey
- slot.delete(k)
- end
- end
- }
-
- if (slot.find{|k, v| k =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/})
- tagfont_configure(tagid(tagOrId), slot)
- elsif slot.size > 0
- tk_call(*(__item_config_cmd(tagid(tagOrId)).concat(hash_kv(slot))))
- end
-
- else
- orig_slot = slot
- slot = slot.to_s
- if slot.length == 0
- fail ArgumentError, "Invalid option `#{orig_slot.inspect}'"
- end
-
- alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot}
- if real_name
- slot = real_name.to_s
- end
-
- if ( conf = __item_keyonly_optkeys(tagid(tagOrId)).find{|k, v| k.to_s == slot } )
- defkey, undefkey = conf
- if value
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{defkey}"))
- elsif undefkey
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{undefkey}"))
- end
- elsif ( method = _symbolkey2str(__item_ruby2val_optkeys(tagid(tagOrId)))[slot] )
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}" << method.call(tagOrId, value)))
- elsif ( method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot] )
- self.__send__(method, tagOrId, value)
- elsif (slot =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
- if value == None
- tagfontobj(tagid(tagOrId), $2)
- else
- tagfont_configure(tagid(tagOrId), {slot=>value})
- end
- else
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}" << value))
- end
- end
- self
- end
- private :__itemconfigure_core
-
- def __check_available_itemconfigure_options(tagOrId, keys)
- id = tagid(tagOrId)
-
- availables = self.__current_itemconfiginfo(id).keys
-
- # add non-standard keys
- availables |= __font_optkeys.map{|k|
- [k.to_s, "latin#{k}", "ascii#{k}", "kanji#{k}"]
- }.flatten
- availables |= __item_methodcall_optkeys(id).keys.map{|k| k.to_s}
- availables |= __item_keyonly_optkeys(id).keys.map{|k| k.to_s}
-
- keys = _symbolkey2str(keys)
-
- keys.delete_if{|k, v| !(availables.include?(k))}
- end
-
- def itemconfigure(tagOrId, slot, value=None)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- __itemconfigure_core(tagOrId, slot, value)
- else
- if slot.kind_of?(Hash)
- begin
- __itemconfigure_core(tagOrId, slot)
- rescue
- slot = __check_available_itemconfigure_options(tagOrId, slot)
- __itemconfigure_core(tagOrId, slot) unless slot.empty?
- end
- else
- begin
- __itemconfigure_core(tagOrId, slot, value)
- rescue => e
- begin
- if __current_itemconfiginfo(tagOrId).has_key?(slot.to_s)
- # not tag error & option is known -> error on known option
- fail e
- else
- # not tag error & option is unknown
- nil
- end
- rescue
- fail e # tag error
- end
- end
- end
- end
- self
- end
-
- def __itemconfiginfo_core(tagOrId, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
- fontkey = $2
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")), false, true)
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
- if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
- || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
- fnt = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- if TkFont.is_system_font?(fnt)
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkNamedFont.new(fnt)
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = tagfontobj(tagid(tagOrId), fontkey)
- elsif ( __item_configinfo_struct(tagid(tagOrId))[:alias] \
- && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?- )
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1]
- end
- conf
- else
- if slot
- slot = slot.to_s
-
- alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot}
- if real_name
- slot = real_name.to_s
- end
-
- case slot
- when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot]
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- optval = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = val
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- optval = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}lcall(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = val
- end
-
- when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot]
- return [slot, '', '', '', self.__send__(method, tagOrId)]
-
- when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- number(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- number(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- end
- end
-
- when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- bool(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- bool(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- end
- end
-
- when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =~ /^[0-9]/ )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =~ /^[0-9]/ )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- v = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- if v.empty?
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkVarAccess.new(v)
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- v = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- if v.empty?
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new(v)
- end
- end
-
- else
- # conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_list(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), 0, false, true)
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:alias] \
- && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?- )
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1]
- end
-
- conf
-
- else
- # ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).collect{|conflist|
- # conf = tk_split_simplelist(conflist)
- ret = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false).collect{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
-
- optkey = conf[__item_configinfo_struct(tagid(tagOrId))[:key]]
- case optkey
- when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[optkey]
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- optval = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- begin
- val = method(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = val
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- optval = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = val
- end
-
- when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
- # do nothing
-
- when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- number(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- number(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- end
- end
-
- when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- bool(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- bool(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- end
- end
-
- when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =~ /^[0-9]/ )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =~ /^[0-9]/ )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- v = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- if v.empty?
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkVarAccess.new(v)
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- v = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- if v.empty?
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new(v)
- end
- end
-
- else
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- if conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]].index('{')
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- tk_split_list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- tk_tcl2ruby(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- end
- if conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- if conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]].index('{')
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- tk_split_list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- tk_tcl2ruby(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
- end
- end
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:alias] \
- && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?- )
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1]
- end
-
- conf
- }
-
- __item_font_optkeys(tagid(tagOrId)).each{|optkey|
- optkey = optkey.to_s
- fontconf = ret.assoc(optkey)
- if fontconf && fontconf.size > 2
- ret.delete_if{|inf| inf[0] =~ /^(|latin|ascii|kanji)#{optkey}$/}
- fnt = fontconf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- if TkFont.is_system_font?(fnt)
- fontconf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkNamedFont.new(fnt)
- end
- fontconf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = tagfontobj(tagid(tagOrId), optkey)
- ret.push(fontconf)
- end
- }
-
- __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method|
- ret << [optkey.to_s, '', '', '', self.__send__(method, tagOrId)]
- }
-
- ret
- end
- end
-
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
- fontkey = $2
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")), false, true)
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
-
- if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
- || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
- fnt = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- if TkFont.is_system_font?(fnt)
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkNamedFont.new(fnt)
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = tagfontobj(tagid(tagOrId), fontkey)
- { conf.shift => conf }
- elsif ( __item_configinfo_struct(tagid(tagOrId))[:alias] \
- && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
- if conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?-
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1]
- end
- { conf[0] => conf[1] }
- else
- { conf.shift => conf }
- end
- else
- if slot
- slot = slot.to_s
-
- alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot}
- if real_name
- slot = real_name.to_s
- end
-
- case slot
- when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot]
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- optval = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = val
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- optval = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = val
- end
-
- when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot]
- return {slot => ['', '', '', self.__send__(method, tagOrId)]}
-
- when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- number(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- number(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- end
- end
-
- when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- num_or_stre(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- bool(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- bool(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- end
- end
-
- when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =~ /^[0-9]/ )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =~ /^[0-9]/ )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
- # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/
- conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- v = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- if v.empty?
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkVarAccess.new(v)
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- v = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- if v.empty?
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new(v)
- end
- end
-
- else
- # conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
- conf = tk_split_list(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), 0, false, true)
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:alias] \
- && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
- if conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?-
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1]
- end
- { conf[0] => conf[1] }
- else
- { conf.shift => conf }
- end
-
- else
- ret = {}
- # tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).each{|conflist|
- # conf = tk_split_simplelist(conflist)
- tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false).each{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
-
- optkey = conf[__item_configinfo_struct(tagid(tagOrId))[:key]]
- case optkey
- when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[optkey]
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- optval = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = val
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- optval = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = val
- end
-
- when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
- # do nothing
-
- when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- number(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- number(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- end
- end
-
- when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- bool(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- begin
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- bool(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- rescue
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- end
- end
-
- when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =~ /^[0-9]/ )
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =~ /^[0-9]/ )
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
-
- when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- v = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- if v.empty?
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkVarAccess.new(v)
- end
- end
- if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] )
- v = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- if v.empty?
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new(v)
- end
- end
-
- else
- if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
- && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
- if conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]].index('{')
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- tk_split_list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =
- tk_tcl2ruby(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]])
- end
- end
- if conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]
- if conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]].index('{')
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- tk_split_list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- else
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =
- tk_tcl2ruby(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]])
- end
- end
- end
-
- if ( __item_configinfo_struct(tagid(tagOrId))[:alias] \
- && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
- if conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?-
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] =
- conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1]
- end
- ret[conf[0]] = conf[1]
- else
- ret[conf.shift] = conf
- end
- }
-
- __item_font_optkeys(tagid(tagOrId)).each{|optkey|
- optkey = optkey.to_s
- fontconf = ret[optkey]
- if fontconf.kind_of?(Array)
- ret.delete(optkey)
- ret.delete('latin' << optkey)
- ret.delete('ascii' << optkey)
- ret.delete('kanji' << optkey)
- fnt = fontconf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]
- if TkFont.is_system_font?(fnt)
- fontconf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkNamedFont.new(fnt)
- end
- fontconf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = tagfontobj(tagid(tagOrId), optkey)
- ret[optkey] = fontconf
- end
- }
-
- __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method|
- ret[optkey.to_s] = ['', '', '', self.__send__(method, tagOrId)]
- }
-
- ret
- end
- end
- end
- end
- private :__itemconfiginfo_core
-
- def itemconfiginfo(tagOrId, slot = nil)
- if slot && TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- begin
- __itemconfiginfo_core(tagOrId, slot)
- rescue => e
- begin
- __itemconfiginfo_core(tagOrId)
- # not tag error -> option is unknown
- Array.new(__item_configinfo_struct.values.max).unshift(slot.to_s)
- rescue
- fail e # tag error
- end
- end
- else
- __itemconfiginfo_core(tagOrId, slot)
- end
- end
-
- def __current_itemconfiginfo(tagOrId, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- org_slot = slot
- begin
- conf = __itemconfiginfo_core(tagOrId, slot)
- if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
- || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
- return {conf[0] => conf[-1]}
- end
- slot = conf[__item_configinfo_struct(tagid(tagOrId))[:alias]]
- end while(org_slot != slot)
- fail RuntimeError,
- "there is a configure alias loop about '#{org_slot}'"
- else
- ret = {}
- __itemconfiginfo_core(tagOrId).each{|conf|
- if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
- || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
- ret[conf[0]] = conf[-1]
- end
- }
-
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- __itemconfiginfo_core(tagOrId, slot).each{|key, conf|
- ret[key] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-
- def current_itemconfiginfo(tagOrId, slot = nil)
- __current_itemconfiginfo(tagOrId, slot)
- end
-end
diff --git a/ext/tk/lib/tk/itemfont.rb b/ext/tk/lib/tk/itemfont.rb
deleted file mode 100644
index 92f75ac388..0000000000
--- a/ext/tk/lib/tk/itemfont.rb
+++ /dev/null
@@ -1,328 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/itemfont.rb : control font of widget items
-#
-require 'tk'
-
-module TkItemFontOptkeys
- def __item_font_optkeys(id)
- # maybe need to override
- ['font']
- end
- private :__item_font_optkeys
-end
-
-module TkTreatItemFont
- include TkItemFontOptkeys
-
- def __item_pathname(id)
- # maybe need to override
- [self.path, id].join(';')
- end
- private :__item_pathname
-
- ################################################
-
- def tagfont_configinfo(tagOrId, key = nil)
- optkeys = __item_font_optkeys(tagid(tagOrId))
- if key && !optkeys.find{|opt| opt.to_s == key.to_s}
- fail ArgumentError, "unknown font option name `#{key}'"
- end
-
- win, tag = __item_pathname(tagid(tagOrId)).split(';')
-
- if key
- pathname = [win, tag, key].join(';')
- TkFont.used_on(pathname) ||
- TkFont.init_widget_font(pathname,
- *(__item_confinfo_cmd(tagid(tagOrId))))
- elsif optkeys.size == 1
- pathname = [win, tag, optkeys[0]].join(';')
- TkFont.used_on(pathname) ||
- TkFont.init_widget_font(pathname,
- *(__item_confinfo_cmd(tagid(tagOrId))))
- else
- fonts = {}
- optkeys.each{|key|
- key = key.to_s
- pathname = [win, tag, key].join(';')
- fonts[key] =
- TkFont.used_on(pathname) ||
- TkFont.init_widget_font(pathname,
- *(__item_confinfo_cmd(tagid(tagOrId))))
- }
- fonts
- end
- end
- alias tagfontobj tagfont_configinfo
-
- def tagfont_configure(tagOrId, slot)
- pathname = __item_pathname(tagid(tagOrId))
-
- slot = _symbolkey2str(slot)
-
- __item_font_optkeys(tagid(tagOrId)).each{|optkey|
- optkey = optkey.to_s
- l_optkey = 'latin' << optkey
- a_optkey = 'ascii' << optkey
- k_optkey = 'kanji' << optkey
-
- if slot.key?(optkey)
- fnt = slot.delete(optkey)
- if fnt.kind_of?(TkFont)
- slot.delete(l_optkey)
- slot.delete(a_optkey)
- slot.delete(k_optkey)
-
- fnt.call_font_configure([pathname, optkey],
- *(__item_config_cmd(tagid(tagOrId)) << {}))
- next
- else
- if fnt
- if (slot.key?(l_optkey) ||
- slot.key?(a_optkey) ||
- slot.key?(k_optkey))
- fnt = TkFont.new(fnt)
-
- lfnt = slot.delete(l_optkey)
- lfnt = slot.delete(a_optkey) if slot.key?(a_optkey)
- kfnt = slot.delete(k_optkey)
-
- fnt.latin_replace(lfnt) if lfnt
- fnt.kanji_replace(kfnt) if kfnt
-
- fnt.call_font_configure([pathname, optkey],
- *(__item_config_cmd(tagid(tagOrId)) << {}))
- next
- else
- fnt = hash_kv(fnt) if fnt.kind_of?(Hash)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << fnt))
- else
- begin
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << fnt))
- rescue => e
- # ignore
- end
- end
- end
- end
- next
- end
- end
-
- lfnt = slot.delete(l_optkey)
- lfnt = slot.delete(a_optkey) if slot.key?(a_optkey)
- kfnt = slot.delete(k_optkey)
-
- if lfnt && kfnt
- TkFont.new(lfnt, kfnt).call_font_configure([pathname, optkey],
- *(__item_config_cmd(tagid(tagOrId)) << {}))
- elsif lfnt
- latintagfont_configure([lfnt, optkey])
- elsif kfnt
- kanjitagfont_configure([kfnt, optkey])
- end
- }
-
- # configure other (without font) options
- tk_call(*(__item_config_cmd(tagid(tagOrId)).concat(hash_kv(slot)))) if slot != {}
- self
- end
-
- def latintagfont_configure(tagOrId, ltn, keys=nil)
- if ltn.kind_of?(Array)
- key = ltn[1]
- ltn = ltn[0]
- else
- key = nil
- end
-
- optkeys = __item_font_optkeys(tagid(tagOrId))
- if key && !optkeys.find{|opt| opt.to_s == key.to_s}
- fail ArgumentError, "unknown font option name `#{key}'"
- end
-
- win, tag = __item_pathname(tagid(tagOrId)).split(';')
-
- optkeys = [key] if key
-
- optkeys.each{|optkey|
- optkey = optkey.to_s
-
- pathname = [win, tag, optkey].join(';')
-
- if (fobj = TkFont.used_on(pathname))
- fobj = TkFont.new(fobj) # create a new TkFont object
- elsif Tk::JAPANIZED_TK
- fobj = fontobj # create a new TkFont object
- else
- ltn = hash_kv(ltn) if ltn.kind_of?(Hash)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << ltn))
- else
- begin
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << ltn))
- rescue => e
- # ignore
- end
- end
- next
- end
-
- if fobj.kind_of?(TkFont)
- if ltn.kind_of?(TkFont)
- conf = {}
- ltn.latin_configinfo.each{|key,val| conf[key] = val}
- if keys
- fobj.latin_configure(conf.update(keys))
- else
- fobj.latin_configure(conf)
- end
- else
- fobj.latin_replace(ltn)
- end
- end
-
- fobj.call_font_configure([pathname, optkey], *(__item_config_cmd(tagid(tagOrId)) << {}))
- }
- self
- end
- alias asciitagfont_configure latintagfont_configure
-
- def kanjitagfont_configure(tagOrId, knj, keys=nil)
- if knj.kind_of?(Array)
- key = knj[1]
- knj = knj[0]
- else
- key = nil
- end
-
- optkeys = __item_font_optkeys(tagid(tagOrId))
- if key && !optkeys.find{|opt| opt.to_s == key.to_s}
- fail ArgumentError, "unknown font option name `#{key}'"
- end
-
- win, tag = __item_pathname(tagid(tagOrId)).split(';')
-
- optkeys = [key] if key
-
- optkeys.each{|optkey|
- optkey = optkey.to_s
-
- pathname = [win, tag, optkey].join(';')
-
- if (fobj = TkFont.used_on(pathname))
- fobj = TkFont.new(fobj) # create a new TkFont object
- elsif Tk::JAPANIZED_TK
- fobj = fontobj # create a new TkFont object
- else
- knj = hash_kv(knj) if knj.kind_of?(Hash)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << knj))
- else
- begin
- tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << knj))
- rescue => e
- # ignore
- end
- end
- next
- end
-
- if fobj.kind_of?(TkFont)
- if knj.kind_of?(TkFont)
- conf = {}
- knj.kanji_configinfo.each{|key,val| conf[key] = val}
- if keys
- fobj.kanji_configure(conf.update(keys))
- else
- fobj.kanji_configure(conf)
- end
- else
- fobj.kanji_replace(knj)
- end
- end
-
- fobj.call_font_configure([pathname, optkey], *(__item_config_cmd(tagid(tagOrId)) << {}))
- }
- self
- end
-
- def tagfont_copy(tagOrId, win, wintag=nil, winkey=nil, targetkey=nil)
- if wintag
- if winkey
- fnt = win.tagfontobj(wintag, winkey).dup
- else
- fnt = win.tagfontobj(wintag).dup
- end
- else
- if winkey
- fnt = win.fontobj(winkey).dup
- else
- fnt = win.fontobj.dup
- end
- end
-
- if targetkey
- fnt.call_font_configure([__item_pathname(tagid(tagOrId)), targetkey],
- *(__item_config_cmd(tagid(tagOrId)) << {}))
- else
- fnt.call_font_configure(__item_pathname(tagid(tagOrId)),
- *(__item_config_cmd(tagid(tagOrId)) << {}))
- end
- self
- end
-
-
- def latintagfont_copy(tagOrId, win, wintag=nil, winkey=nil, targetkey=nil)
- if targetkey
- fontobj(targetkey).dup.call_font_configure([__item_pathname(tagid(tagOrId)), targetkey],
- *(__item_config_cmd(tagid(tagOrId)) << {}))
- else
- fontobj.dup.call_font_configure(__item_pathname(tagid(tagOrId)),
- *(__item_config_cmd(tagid(tagOrId)) << {}))
- end
-
- if wintag
- if winkey
- fontobj.latin_replace(win.tagfontobj(wintag, winkey).latin_font_id)
- else
- fontobj.latin_replace(win.tagfontobj(wintag).latin_font_id)
- end
- else
- if winkey
- fontobj.latin_replace(win.fontobj(winkey).latin_font_id)
- else
- fontobj.latin_replace(win.fontobj.latin_font_id)
- end
- end
- self
- end
- alias asciitagfont_copy latintagfont_copy
-
- def kanjifont_copy(tagOrId, win, wintag=nil, winkey=nil, targetkey=nil)
- if targetkey
- fontobj(targetkey).dup.call_font_configure([__item_pathname(tagid(tagOrId)), targetkey],
- *(__item_config_cmd(tagid(tagOrId)) << {}))
- else
- fontobj.dup.call_font_configure(__item_pathname(tagid(tagOrId)),
- *(__item_config_cmd(tagid(tagOrId)) << {}))
- end
-
- if wintag
- if winkey
- fontobj.kanji_replace(win.tagfontobj(wintag, winkey).kanji_font_id)
- else
- fontobj.kanji_replace(win.tagfontobj(wintag).kanji_font_id)
- end
- else
- if winkey
- fontobj.kanji_replace(win.fontobj(winkey).kanji_font_id)
- else
- fontobj.kanji_replace(win.fontobj.kanji_font_id)
- end
- end
- self
- end
-end
diff --git a/ext/tk/lib/tk/kinput.rb b/ext/tk/lib/tk/kinput.rb
deleted file mode 100644
index 6d2b3d7a7a..0000000000
--- a/ext/tk/lib/tk/kinput.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/kinput.rb : control kinput
-#
-require 'tk'
-
-module TkKinput
- include Tk
- extend Tk
-
- TkCommandNames = [
- 'kinput_start'.freeze,
- 'kinput_send_spot'.freeze,
- 'kanjiInput'.freeze
- ].freeze
-
- def TkKinput.start(win, style=None)
- tk_call('kinput_start', win, style)
- end
- def kinput_start(style=None)
- TkKinput.start(self, style)
- end
-
- def TkKinput.send_spot(win)
- tk_call('kinput_send_spot', win)
- end
- def kinput_send_spot
- TkKinput.send_spot(self)
- end
-
- def TkKinput.input_start(win, keys=nil)
- tk_call('kanjiInput', 'start', win, *hash_kv(keys))
- end
- def kanji_input_start(keys=nil)
- TkKinput.input_start(self, keys)
- end
-
- def TkKinput.attribute_config(win, slot, value=None)
- if slot.kind_of? Hash
- tk_call('kanjiInput', 'attribute', win, *hash_kv(slot))
- else
- tk_call('kanjiInput', 'attribute', win, "-#{slot}", value)
- end
- end
- def kinput_attribute_config(slot, value=None)
- TkKinput.attribute_config(self, slot, value)
- end
-
- def TkKinput.attribute_info(win, slot=nil)
- if slot
- conf = tk_split_list(tk_call('kanjiInput', 'attribute',
- win, "-#{slot}"))
- conf[0] = conf[0][1..-1]
- conf
- else
- tk_split_list(tk_call('kanjiInput', 'attribute', win)).collect{|conf|
- conf[0] = conf[0][1..-1]
- conf
- }
- end
- end
- def kinput_attribute_info(slot=nil)
- TkKinput.attribute_info(self, slot)
- end
-
- def TkKinput.input_end(win)
- tk_call('kanjiInput', 'end', win)
- end
- def kanji_input_end
- TkKinput.input_end(self)
- end
-end
diff --git a/ext/tk/lib/tk/label.rb b/ext/tk/lib/tk/label.rb
deleted file mode 100644
index 48f67deb31..0000000000
--- a/ext/tk/lib/tk/label.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/label.rb : treat label widget
-#
-require 'tk'
-
-class Tk::Label<TkWindow
- TkCommandNames = ['label'.freeze].freeze
- WidgetClassName = 'Label'.freeze
- WidgetClassNames[WidgetClassName] ||= self
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('label', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('label', @path)
- # end
- #end
- #private :create_self
-end
-
-#TkLabel = Tk::Label unless Object.const_defined? :TkLabel
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Label, :TkLabel)
-Tk.__set_loaded_toplevel_aliases__('tk/label.rb', :Tk, Tk::Label, :TkLabel)
diff --git a/ext/tk/lib/tk/labelframe.rb b/ext/tk/lib/tk/labelframe.rb
deleted file mode 100644
index f9497dc2f0..0000000000
--- a/ext/tk/lib/tk/labelframe.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/labelframe.rb : treat labelframe widget
-#
-require 'tk'
-require 'tk/frame'
-
-class Tk::LabelFrame<Tk::Frame
- TkCommandNames = ['labelframe'.freeze].freeze
- WidgetClassName = 'Labelframe'.freeze
- WidgetClassNames[WidgetClassName] ||= self
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('labelframe', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('labelframe', @path)
- # end
- #end
- #private :create_self
-
- def __val2ruby_optkeys # { key=>proc, ... }
- super().update('labelwidget'=>proc{|v| window(v)})
- end
- private :__val2ruby_optkeys
-end
-
-Tk::Labelframe = Tk::LabelFrame
-#TkLabelFrame = Tk::LabelFrame unless Object.const_defined? :TkLabelFrame
-#TkLabelframe = Tk::Labelframe unless Object.const_defined? :TkLabelframe
-#Tk.__set_toplevel_aliases__(:Tk, Tk::LabelFrame, :TkLabelFrame, :TkLabelframe)
-Tk.__set_loaded_toplevel_aliases__('tk/labelframe.rb', :Tk, Tk::LabelFrame,
- :TkLabelFrame, :TkLabelframe)
diff --git a/ext/tk/lib/tk/listbox.rb b/ext/tk/lib/tk/listbox.rb
deleted file mode 100644
index df4d422007..0000000000
--- a/ext/tk/lib/tk/listbox.rb
+++ /dev/null
@@ -1,285 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/listbox.rb : treat listbox widget
-#
-require 'tk'
-require 'tk/itemconfig'
-require 'tk/scrollable'
-require 'tk/txtwin_abst'
-
-module TkListItemConfig
- include TkItemConfigMethod
-
- def __item_listval_optkeys(id)
- []
- end
- private :__item_listval_optkeys
-end
-
-class Tk::Listbox<TkTextWin
- include TkListItemConfig
- include Scrollable
-
- TkCommandNames = ['listbox'.freeze].freeze
- WidgetClassName = 'Listbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('listbox', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('listbox', @path)
- # end
- #end
- #private :create_self
-
- def __tkvariable_optkeys
- super() << 'listvariable'
- end
- private :__tkvariable_optkeys
-
- def tagid(id)
- #id.to_s
- _get_eval_string(id)
- end
-
- def activate(y)
- tk_send_without_enc('activate', y)
- self
- end
- def curselection
- list(tk_send_without_enc('curselection'))
- end
- def get(first, last=nil)
- if last
- # tk_split_simplelist(_fromUTF8(tk_send_without_enc('get', first, last)))
- tk_split_simplelist(tk_send_without_enc('get', first, last), false, true)
- else
- _fromUTF8(tk_send_without_enc('get', first))
- end
- end
- def nearest(y)
- tk_send_without_enc('nearest', y).to_i
- end
- def size
- tk_send_without_enc('size').to_i
- end
- def selection_anchor(index)
- tk_send_without_enc('selection', 'anchor', index)
- self
- end
- def selection_clear(first, last=None)
- tk_send_without_enc('selection', 'clear', first, last)
- self
- end
- def selection_includes(index)
- bool(tk_send_without_enc('selection', 'includes', index))
- end
- def selection_set(first, last=None)
- tk_send_without_enc('selection', 'set', first, last)
- self
- end
-
- def index(idx)
- tk_send_without_enc('index', idx).to_i
- end
-
- def value
- get('0', 'end')
- end
-
- def value= (vals)
- unless vals.kind_of?(Array)
- fail ArgumentError, 'an Array is expected'
- end
- tk_send_without_enc('delete', '0', 'end')
- tk_send_without_enc('insert', '0',
- *(vals.collect{|v| _get_eval_enc_str(v)}))
- vals
- end
-
- def clear
- tk_send_without_enc('delete', '0', 'end')
- self
- end
- alias erase clear
-
-=begin
- def itemcget(index, key)
- case key.to_s
- when 'text', 'label', 'show'
- _fromUTF8(tk_send_without_enc('itemcget', index, "-#{key}"))
- when 'font', 'kanjifont'
- #fnt = tk_tcl2ruby(tk_send('itemcget', index, "-#{key}"))
- fnt = tk_tcl2ruby(_fromUTF8(tk_send_without_enc('itemcget', index,
- '-font')))
- unless fnt.kind_of?(TkFont)
- fnt = tagfontobj(index, fnt)
- end
- if key.to_s == 'kanjifont' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/
- # obsolete; just for compatibility
- fnt.kanji_font
- else
- fnt
- end
- else
- tk_tcl2ruby(_fromUTF8(tk_send_without_enc('itemcget', index, "-#{key}")))
- end
- end
- def itemconfigure(index, key, val=None)
- if key.kind_of? Hash
- if (key['font'] || key[:font] ||
- key['kanjifont'] || key[:kanjifont] ||
- key['latinfont'] || key[:latinfont] ||
- key['asciifont'] || key[:asciifont] )
- tagfont_configure(index, _symbolkey2str(key))
- else
- tk_send_without_enc('itemconfigure', index, *hash_kv(key, true))
- end
-
- else
- if (key == 'font' || key == :font ||
- key == 'kanjifont' || key == :kanjifont ||
- key == 'latinfont' || key == :latinfont ||
- key == 'asciifont' || key == :asciifont )
- if val == None
- tagfontobj(index)
- else
- tagfont_configure(index, {key=>val})
- end
- else
- tk_call('itemconfigure', index, "-#{key}", val)
- end
- end
- self
- end
-
- def itemconfiginfo(index, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- case key.to_s
- when 'text', 'label', 'show'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}")))
- when 'font', 'kanjifont'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}")))
- conf[4] = tagfont_configinfo(index, conf[4])
- else
- conf = tk_split_list(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}")))
- end
- conf[0] = conf[0][1..-1]
- conf
- else
- ret = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', index))).collect{|conflist|
- conf = tk_split_simplelist(conflist)
- conf[0] = conf[0][1..-1]
- case conf[0]
- when 'text', 'label', 'show'
- else
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf[4]
- if conf[4].index('{')
- conf[4] = tk_split_list(conf[4])
- else
- conf[4] = tk_tcl2ruby(conf[4])
- end
- end
- end
- conf[1] = conf[1][1..-1] if conf.size == 2 # alias info
- conf
- }
- fontconf = ret.assoc('font')
- if fontconf
- ret.delete_if{|item| item[0] == 'font' || item[0] == 'kanjifont'}
- fontconf[4] = tagfont_configinfo(index, fontconf[4])
- ret.push(fontconf)
- else
- ret
- end
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- case key.to_s
- when 'text', 'label', 'show'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}")))
- when 'font', 'kanjifont'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}")))
- conf[4] = tagfont_configinfo(index, conf[4])
- else
- conf = tk_split_list(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}")))
- end
- key = conf.shift[1..-1]
- { key => conf }
- else
- ret = {}
- tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', index))).each{|conflist|
- conf = tk_split_simplelist(conflist)
- key = conf.shift[1..-1]
- case key
- when 'text', 'label', 'show'
- else
- if conf[2]
- if conf[2].index('{')
- conf[2] = tk_split_list(conf[2])
- else
- conf[2] = tk_tcl2ruby(conf[2])
- end
- end
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- end
- if conf.size == 1
- ret[key] = conf[0][1..-1] # alias info
- else
- ret[key] = conf
- end
- }
- fontconf = ret['font']
- if fontconf
- ret.delete('font')
- ret.delete('kanjifont')
- fontconf[3] = tagfont_configinfo(index, fontconf[3])
- ret['font'] = fontconf
- end
- ret
- end
- end
- end
-
- def current_itemconfiginfo(index, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- conf = itemconfiginfo(index, key)
- {conf[0] => conf[4]}
- else
- ret = {}
- itemconfiginfo(index).each{|conf|
- ret[conf[0]] = conf[4] if conf.size > 2
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- itemconfiginfo(index, key).each{|k, conf|
- ret[k] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-=end
-end
-
-#TkListbox = Tk::Listbox unless Object.const_defined? :TkListbox
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Listbox, :TkListbox)
-Tk.__set_loaded_toplevel_aliases__('tk/listbox.rb', :Tk, Tk::Listbox,
- :TkListbox)
diff --git a/ext/tk/lib/tk/macpkg.rb b/ext/tk/lib/tk/macpkg.rb
deleted file mode 100644
index abf9b176fb..0000000000
--- a/ext/tk/lib/tk/macpkg.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/macpkg.rb : methods for Tcl/Tk packages for Macintosh
-# 2000/11/22 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
-#
-# ATTENTION !!
-# This is NOT TESTED. Because I have no test-environment.
-#
-#
-require 'tk'
-
-module Tk
- def Tk.load_tclscript_rsrc(resource_name, file=None)
- # Mac only
- tk_call('source', '-rsrc', resource_name, file)
- end
-
- def Tk.load_tclscript_rsrcid(resource_id, file=None)
- # Mac only
- tk_call('source', '-rsrcid', resource_id, file)
- end
-end
-
-module Tk::MacResource
-end
-#TkMacResource = Tk::MacResource
-#Tk.__set_toplevel_aliases__(:Tk, Tk::MacResource, :TkMacResource)
-Tk.__set_loaded_toplevel_aliases__('tk/macpkg.rb', :Tk, Tk::MacResource,
- :TkMacResource)
-
-module Tk::MacResource
- extend Tk
- extend Tk::MacResource
-
- TkCommandNames = ['resource'.freeze].freeze
-
- PACKAGE_NAME = 'resource'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- tk_call_without_enc('package', 'require', 'resource')
-
- def close(rsrcRef)
- tk_call('resource', 'close', rsrcRef)
- end
-
- def delete(rsrcType, opts=nil)
- tk_call('resource', 'delete', *(hash_kv(opts) << rsrcType))
- end
-
- def files(rsrcRef=nil)
- if rsrcRef
- tk_call('resource', 'files', rsrcRef)
- else
- tk_split_simplelist(tk_call('resource', 'files'))
- end
- end
-
- def list(rsrcType, rsrcRef=nil)
- tk_split_simplelist(tk_call('resource', 'list', rsrcType, rsrcRef))
- end
-
- def open(fname, access=nil)
- tk_call('resource', 'open', fname, access)
- end
-
- def read(rsrcType, rsrcID, rsrcRef=nil)
- tk_call('resource', 'read', rsrcType, rsrcID, rsrcRef)
- end
-
- def types(rsrcRef=nil)
- tk_split_simplelist(tk_call('resource', 'types', rsrcRef))
- end
-
- def write(rsrcType, data, opts=nil)
- tk_call('resource', 'write', *(hash_kv(opts) << rsrcType << data))
- end
-
- module_function :close, :delete, :files, :list, :open, :read, :types, :write
-end
diff --git a/ext/tk/lib/tk/menu.rb b/ext/tk/lib/tk/menu.rb
deleted file mode 100644
index a466a11012..0000000000
--- a/ext/tk/lib/tk/menu.rb
+++ /dev/null
@@ -1,719 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/menu.rb : treat menu and menubutton
-#
-require 'tk'
-require 'tk/itemconfig'
-require 'tk/menuspec'
-
-module TkMenuEntryConfig
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'entrycget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'entryconfigure', id]
- end
- private :__item_config_cmd
-
- def __item_strval_optkeys(id)
- super(id) << 'selectcolor'
- end
- private :__item_strval_optkeys
-
- def __item_listval_optkeys(id)
- []
- end
- private :__item_listval_optkeys
-
- def __item_val2ruby_optkeys(id) # { key=>proc, ... }
- super(id).update('menu'=>proc{|i, v| window(v)})
- end
- private :__item_val2ruby_optkeys
-
- alias entrycget_tkstring itemcget_tkstring
- alias entrycget itemcget
- alias entrycget_strict itemcget_strict
- alias entryconfigure itemconfigure
- alias entryconfiginfo itemconfiginfo
- alias current_entryconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-end
-
-class Tk::Menu<TkWindow
- include Wm
- include TkMenuEntryConfig
- extend TkMenuSpec
-
- TkCommandNames = ['menu'.freeze].freeze
- WidgetClassName = 'Menu'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('menu', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('menu', @path)
- # end
- #end
- #private :create_self
-
- def __strval_optkeys
- super() << 'selectcolor' << 'title'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'tearoff'
- end
- private :__boolval_optkeys
-
- def self.new_menuspec(menu_spec, parent = nil, tearoff = false, keys = nil)
- if parent.kind_of?(Hash)
- keys = _symbolkey2str(parent)
- parent = keys.delete('parent')
- tearoff = keys.delete('tearoff')
- elsif tearoff.kind_of?(Hash)
- keys = _symbolkey2str(tearoff)
- tearoff = keys.delete('tearoff')
- elsif keys
- keys = _symbolkey2str(keys)
- else
- keys = {}
- end
-
- widgetname = keys.delete('widgetname')
- _create_menu(parent, menu_spec, widgetname, tearoff, keys)
- end
-
- def tagid(id)
- #id.to_s
- _get_eval_string(id)
- end
-
- def activate(index)
- tk_send_without_enc('activate', _get_eval_enc_str(index))
- self
- end
- def add(type, keys=nil)
- tk_send_without_enc('add', type, *hash_kv(keys, true))
- self
- end
- def add_cascade(keys=nil)
- add('cascade', keys)
- end
- def add_checkbutton(keys=nil)
- add('checkbutton', keys)
- end
- def add_command(keys=nil)
- add('command', keys)
- end
- def add_radiobutton(keys=nil)
- add('radiobutton', keys)
- end
- def add_separator(keys=nil)
- add('separator', keys)
- end
-
- def clone_menu(*args)
- if args[0].kind_of?(TkWindow)
- parent = args.shift
- else
- parent = self
- end
-
- if args[0].kind_of?(String) || args[0].kind_of?(Symbol) # menu type
- type = args.shift
- else
- type = None # 'normal'
- end
-
- if args[0].kind_of?(Hash)
- keys = _symbolkey2str(args.shift)
- else
- keys = {}
- end
-
- parent = keys.delete('parent') if keys.has_key?('parent')
- type = keys.delete('type') if keys.has_key?('type')
-
- if keys.empty?
- Tk::MenuClone.new(self, parent, type)
- else
- Tk::MenuClone.new(self, parent, type, keys)
- end
- end
-
- def index(idx)
- ret = tk_send_without_enc('index', _get_eval_enc_str(idx))
- (ret == 'none')? nil: number(ret)
- end
- def invoke(index)
- _fromUTF8(tk_send_without_enc('invoke', _get_eval_enc_str(index)))
- end
- def insert(index, type, keys=nil)
- tk_send_without_enc('insert', _get_eval_enc_str(index),
- type, *hash_kv(keys, true))
- self
- end
- def delete(first, last=nil)
- if last
- tk_send_without_enc('delete', _get_eval_enc_str(first),
- _get_eval_enc_str(last))
- else
- tk_send_without_enc('delete', _get_eval_enc_str(first))
- end
- self
- end
- def popup(x, y, index=nil)
- if index
- tk_call_without_enc('tk_popup', path, x, y,
- _get_eval_enc_str(index))
- else
- tk_call_without_enc('tk_popup', path, x, y)
- end
- self
- end
- def post(x, y)
- _fromUTF8(tk_send_without_enc('post', x, y))
- end
- def postcascade(index)
- tk_send_without_enc('postcascade', _get_eval_enc_str(index))
- self
- end
- def postcommand(cmd=Proc.new)
- configure_cmd 'postcommand', cmd
- self
- end
- def set_focus
- tk_call_without_enc('tk_menuSetFocus', path)
- self
- end
- def tearoffcommand(cmd=Proc.new)
- configure_cmd 'tearoffcommand', cmd
- self
- end
- def menutype(index)
- tk_send_without_enc('type', _get_eval_enc_str(index))
- end
- def unpost
- tk_send_without_enc('unpost')
- self
- end
- def xposition(index)
- number(tk_send_without_enc('xposition', _get_eval_enc_str(index)))
- end
- def yposition(index)
- number(tk_send_without_enc('yposition', _get_eval_enc_str(index)))
- end
-
-=begin
- def entrycget(index, key)
- case key.to_s
- when 'text', 'label', 'show'
- _fromUTF8(tk_send_without_enc('entrycget',
- _get_eval_enc_str(index), "-#{key}"))
- when 'font', 'kanjifont'
- #fnt = tk_tcl2ruby(tk_send('entrycget', index, "-#{key}"))
- fnt = tk_tcl2ruby(_fromUTF8(tk_send_without_enc('entrycget', _get_eval_enc_str(index), '-font')))
- unless fnt.kind_of?(TkFont)
- fnt = tagfontobj(index, fnt)
- end
- if key.to_s == 'kanjifont' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/
- # obsolete; just for compatibility
- fnt.kanji_font
- else
- fnt
- end
- else
- tk_tcl2ruby(_fromUTF8(tk_send_without_enc('entrycget', _get_eval_enc_str(index), "-#{key}")))
- end
- end
- def entryconfigure(index, key, val=None)
- if key.kind_of? Hash
- if (key['font'] || key[:font] ||
- key['kanjifont'] || key[:kanjifont] ||
- key['latinfont'] || key[:latinfont] ||
- key['asciifont'] || key[:asciifont])
- tagfont_configure(index, _symbolkey2str(key))
- else
- tk_send_without_enc('entryconfigure', _get_eval_enc_str(index),
- *hash_kv(key, true))
- end
-
- else
- if (key == 'font' || key == :font ||
- key == 'kanjifont' || key == :kanjifont ||
- key == 'latinfont' || key == :latinfont ||
- key == 'asciifont' || key == :asciifont )
- if val == None
- tagfontobj(index)
- else
- tagfont_configure(index, {key=>val})
- end
- else
- tk_call('entryconfigure', index, "-#{key}", val)
- end
- end
- self
- end
-
- def entryconfiginfo(index, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- case key.to_s
- when 'text', 'label', 'show'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}")))
- when 'font', 'kanjifont'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}")))
- conf[4] = tagfont_configinfo(index, conf[4])
- else
- conf = tk_split_list(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}")))
- end
- conf[0] = conf[0][1..-1]
- conf
- else
- ret = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure', _get_eval_enc_str(index)))).collect{|conflist|
- conf = tk_split_simplelist(conflist)
- conf[0] = conf[0][1..-1]
- case conf[0]
- when 'text', 'label', 'show'
- else
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf[4]
- if conf[4].index('{')
- conf[4] = tk_split_list(conf[4])
- else
- conf[4] = tk_tcl2ruby(conf[4])
- end
- end
- end
- conf[1] = conf[1][1..-1] if conf.size == 2 # alias info
- conf
- }
- if fontconf
- ret.delete_if{|item| item[0] == 'font' || item[0] == 'kanjifont'}
- fontconf[4] = tagfont_configinfo(index, fontconf[4])
- ret.push(fontconf)
- else
- ret
- end
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- case key.to_s
- when 'text', 'label', 'show'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}")))
- when 'font', 'kanjifont'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}")))
- conf[4] = tagfont_configinfo(index, conf[4])
- else
- conf = tk_split_list(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}")))
- end
- key = conf.shift[1..-1]
- { key => conf }
- else
- ret = {}
- tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure', _get_eval_enc_str(index)))).each{|conflist|
- conf = tk_split_simplelist(conflist)
- key = conf.shift[1..-1]
- case key
- when 'text', 'label', 'show'
- else
- if conf[2]
- if conf[2].index('{')
- conf[2] = tk_split_list(conf[2])
- else
- conf[2] = tk_tcl2ruby(conf[2])
- end
- end
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- end
- if conf.size == 1
- ret[key] = conf[0][1..-1] # alias info
- else
- ret[key] = conf
- end
- }
- fontconf = ret['font']
- if fontconf
- ret.delete('font')
- ret.delete('kanjifont')
- fontconf[3] = tagfont_configinfo(index, fontconf[3])
- ret['font'] = fontconf
- end
- ret
- end
- end
- end
-
- def current_entryconfiginfo(index, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- conf = entryconfiginfo(index, key)
- {conf[0] => conf[4]}
- else
- ret = {}
- entryconfiginfo(index).each{|conf|
- ret[conf[0]] = conf[4] if conf.size > 2
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- entryconfiginfo(index, key).each{|k, conf|
- ret[k] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-=end
-end
-
-#TkMenu = Tk::Menu unless Object.const_defined? :TkMenu
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Menu, :TkMenu)
-Tk.__set_loaded_toplevel_aliases__('tk/menu.rb', :Tk, Tk::Menu, :TkMenu)
-
-
-module Tk::Menu::TkInternalFunction; end
-class << Tk::Menu::TkInternalFunction
- # These methods calls internal functions of Tcl/Tk.
- # So, They may not work on your Tcl/Tk.
- def next_menu(menu, dir='next')
- dir = dir.to_s
- case dir
- when 'next', 'forward', 'down'
- dir = 'right'
- when 'previous', 'backward', 'up'
- dir = 'left'
- end
-
- Tk.tk_call('::tk::MenuNextMenu', menu, dir)
- end
-
- def next_entry(menu, delta)
- # delta is increment value of entry index.
- # For example, +1 denotes 'next entry' and -1 denotes 'previous entry'.
- Tk.tk_call('::tk::MenuNextEntry', menu, delta)
- end
-end
-
-class Tk::MenuClone<Tk::Menu
-=begin
- def initialize(parent, type=None)
- widgetname = nil
- if parent.kind_of? Hash
- keys = _symbolkey2str(parent)
- parent = keys.delete('parent')
- widgetname = keys.delete('widgetname')
- type = keys.delete('type'); type = None unless type
- end
- #unless parent.kind_of?(TkMenu)
- # fail ArgumentError, "parent must be TkMenu"
- #end
- @parent = parent
- install_win(@parent.path, widgetname)
- tk_call_without_enc(@parent.path, 'clone', @path, type)
- end
-=end
- def initialize(src_menu, *args)
- widgetname = nil
-
- if args[0].kind_of?(TkWindow) # parent window
- parent = args.shift
- else
- parent = src_menu
- end
-
- if args[0].kind_of?(String) || args[0].kind_of?(Symbol) # menu type
- type = args.shift
- else
- type = None # 'normal'
- end
-
- if args[0].kind_of?(Hash)
- keys = _symbolkey2str(args.shift)
- parent = keys.delete('parent') if keys.has_key?('parent')
- widgetname = keys.delete('widgetname')
- type = keys.delete('type') if keys.has_key?('type')
- else
- keys = nil
- end
-
- @src_menu = src_menu
- @parent = parent
- @type = type
- install_win(@parent.path, widgetname)
- tk_call_without_enc(@src_menu.path, 'clone', @path, @type)
- configure(keys) if keys && !keys.empty?
- end
-
- def source_menu
- @src_menu
- end
-end
-Tk::CloneMenu = Tk::MenuClone
-#TkMenuClone = Tk::MenuClone unless Object.const_defined? :TkMenuClone
-#TkCloneMenu = Tk::CloneMenu unless Object.const_defined? :TkCloneMenu
-#Tk.__set_toplevel_aliases__(:Tk, Tk::MenuClone, :TkMenuClone, :TkCloneMenu)
-Tk.__set_loaded_toplevel_aliases__('tk/menu.rb', :Tk, Tk::MenuClone,
- :TkMenuClone, :TkCloneMenu)
-
-module Tk::SystemMenu
- def initialize(parent, keys=nil)
- if parent.kind_of? Hash
- keys = _symbolkey2str(parent)
- parent = keys.delete('parent')
- end
- #unless parent.kind_of? TkMenu
- # fail ArgumentError, "parent must be a TkMenu object"
- #end
- # @path = Kernel.format("%s.%s", parent.path, self.class::SYSMENU_NAME)
- @path = parent.path + '.' + self.class::SYSMENU_NAME
- #TkComm::Tk_WINDOWS[@path] = self
- TkCore::INTERP.tk_windows[@path] = self
- if self.method(:create_self).arity == 0
- p 'create_self has no arg' if $DEBUG
- create_self
- configure(keys) if keys
- else
- p 'create_self has an arg' if $DEBUG
- create_self(keys)
- end
- end
-end
-TkSystemMenu = Tk::SystemMenu
-
-
-class Tk::SysMenu_Help<Tk::Menu
- # for all platform
- include Tk::SystemMenu
- SYSMENU_NAME = 'help'
-end
-#TkSysMenu_Help = Tk::SysMenu_Help unless Object.const_defined? :TkSysMenu_Help
-#Tk.__set_toplevel_aliases__(:Tk, Tk::SysMenu_Help, :TkSysMenu_Help)
-Tk.__set_loaded_toplevel_aliases__('tk/menu.rb', :Tk, Tk::SysMenu_Help,
- :TkSysMenu_Help)
-
-
-class Tk::SysMenu_System<Tk::Menu
- # for Windows
- include Tk::SystemMenu
- SYSMENU_NAME = 'system'
-end
-#TkSysMenu_System = Tk::SysMenu_System unless Object.const_defined? :TkSysMenu_System
-#Tk.__set_toplevel_aliases__(:Tk, Tk::SysMenu_System, :TkSysMenu_System)
-Tk.__set_loaded_toplevel_aliases__('tk/menu.rb', :Tk, Tk::SysMenu_System,
- :TkSysMenu_System)
-
-
-class Tk::SysMenu_Apple<Tk::Menu
- # for Macintosh
- include Tk::SystemMenu
- SYSMENU_NAME = 'apple'
-end
-#TkSysMenu_Apple = Tk::SysMenu_Apple unless Object.const_defined? :TkSysMenu_Apple
-#Tk.__set_toplevel_aliases__(:Tk, Tk::SysMenu_Apple, :TkSysMenu_Apple)
-Tk.__set_loaded_toplevel_aliases__('tk/menu.rb', :Tk, Tk::SysMenu_Apple,
- :TkSysMenu_Apple)
-
-
-class Tk::Menubutton<Tk::Label
- TkCommandNames = ['menubutton'.freeze].freeze
- WidgetClassName = 'Menubutton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
- def create_self(keys)
- if keys and keys != None
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- # tk_call_without_enc('menubutton', @path, *hash_kv(keys, true))
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- begin
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- rescue
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- keys = __check_available_configure_options(keys)
- unless keys.empty?
- tk_call_without_enc('destroy', @path) rescue nil
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- end
- end
- end
- else
- # tk_call_without_enc('menubutton', @path)
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def __boolval_optkeys
- super() << 'indicatoron'
- end
- private :__boolval_optkeys
-
-end
-Tk::MenuButton = Tk::Menubutton
-#TkMenubutton = Tk::Menubutton unless Object.const_defined? :TkMenubutton
-#TkMenuButton = Tk::MenuButton unless Object.const_defined? :TkMenuButton
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Menubutton, :TkMenubutton, :TkMenuButton)
-Tk.__set_loaded_toplevel_aliases__('tk/menu.rb', :Tk, Tk::Menubutton,
- :TkMenubutton, :TkMenuButton)
-
-
-class Tk::OptionMenubutton<Tk::Menubutton
- TkCommandNames = ['tk_optionMenu'.freeze].freeze
-
- class OptionMenu<TkMenu
- def initialize(path) #==> return value of tk_optionMenu
- @path = path
- #TkComm::Tk_WINDOWS[@path] = self
- TkCore::INTERP.tk_windows[@path] = self
- end
- end
-
- def initialize(*args)
- # args :: [parent,] [var,] [value[, ...],] [keys]
- # parent --> TkWindow or nil
- # var --> TkVariable or nil
- # keys --> Hash
- # keys[:parent] or keys['parent'] --> parent
- # keys[:variable] or keys['variable'] --> var
- # keys[:values] or keys['values'] --> value, ...
- # other Hash keys are menubutton options
- keys = {}
- keys = args.pop if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(keys)
-
- parent = nil
- if !args.empty? && (args[0].kind_of?(TkWindow) || args[0] == nil)
- keys.delete('parent') # ignore
- parent = args.shift
- else
- parent = keys.delete('parent')
- end
-
- @variable = nil
- if !args.empty? && (args[0].kind_of?(TkVariable) || args[0] == nil)
- keys.delete('variable') # ignore
- @variable = args.shift
- else
- @variable = keys.delete('variable')
- end
- @variable = TkVariable.new unless @variable
-
- (args = keys.delete('values') || []) if args.empty?
- if args.empty?
- args << @variable.value
- else
- @variable.value = args[0]
- end
-
- install_win(if parent then parent.path end)
- @menu = OptionMenu.new(tk_call('tk_optionMenu',
- @path, @variable.id, *args))
-
- configure(keys) if keys
- end
-
- def value
- @variable.value
- end
-
- def value=(val)
- @variable.value = val
- end
-
- def activate(index)
- @menu.activate(index)
- self
- end
- def add(value)
- @menu.add('radiobutton', 'variable'=>@variable,
- 'label'=>value, 'value'=>value)
- self
- end
- def index(index)
- @menu.index(index)
- end
- def invoke(index)
- @menu.invoke(index)
- end
- def insert(index, value)
- @menu.insert(index, 'radiobutton', 'variable'=>@variable,
- 'label'=>value, 'value'=>value)
- self
- end
- def delete(index, last=None)
- @menu.delete(index, last)
- self
- end
- def xposition(index)
- @menu.xposition(index)
- end
- def yposition(index)
- @menu.yposition(index)
- end
- def menu
- @menu
- end
- def menucget(key)
- @menu.cget(key)
- end
- def menucget_strict(key)
- @menu.cget_strict(key)
- end
- def menuconfigure(key, val=None)
- @menu.configure(key, val)
- self
- end
- def menuconfiginfo(key=nil)
- @menu.configinfo(key)
- end
- def current_menuconfiginfo(key=nil)
- @menu.current_configinfo(key)
- end
- def entrycget(index, key)
- @menu.entrycget(index, key)
- end
- def entrycget_strict(index, key)
- @menu.entrycget_strict(index, key)
- end
- def entryconfigure(index, key, val=None)
- @menu.entryconfigure(index, key, val)
- self
- end
- def entryconfiginfo(index, key=nil)
- @menu.entryconfiginfo(index, key)
- end
- def current_entryconfiginfo(index, key=nil)
- @menu.current_entryconfiginfo(index, key)
- end
-end
-
-Tk::OptionMenuButton = Tk::OptionMenubutton
-#TkOptionMenubutton = Tk::OptionMenubutton unless Object.const_defined? :TkOptionMenubutton
-#TkOptionMenuButton = Tk::OptionMenuButton unless Object.const_defined? :TkOptionMenuButton
-#Tk.__set_toplevel_aliases__(:Tk, Tk::OptionMenubutton,
-# :TkOptionMenubutton, :TkOptionMenuButton)
-Tk.__set_loaded_toplevel_aliases__('tk/menu.rb', :Tk, Tk::OptionMenubutton,
- :TkOptionMenubutton, :TkOptionMenuButton)
diff --git a/ext/tk/lib/tk/menubar.rb b/ext/tk/lib/tk/menubar.rb
deleted file mode 100644
index 73f8801d98..0000000000
--- a/ext/tk/lib/tk/menubar.rb
+++ /dev/null
@@ -1,138 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/menubar.rb
-#
-# Original version:
-# Copyright (C) 1998 maeda shugo. All rights reserved.
-# This file can be distributed under the terms of the Ruby.
-
-# Usage:
-#
-# menu_spec = [
-# [['File', 0],
-# ['Open', proc{puts('Open clicked')}, 0],
-# '---',
-# ['Quit', proc{exit}, 0]],
-# [['Edit', 0],
-# ['Cut', proc{puts('Cut clicked')}, 2],
-# ['Copy', proc{puts('Copy clicked')}, 0],
-# ['Paste', proc{puts('Paste clicked')}, 0]]
-# ]
-# menubar = TkMenubar.new(nil, menu_spec,
-# 'tearoff'=>false,
-# 'foreground'=>'grey40',
-# 'activeforeground'=>'red',
-# 'font'=>'-adobe-helvetica-bold-r-*--12-*-iso8859-1')
-# menubar.pack('side'=>'top', 'fill'=>'x')
-#
-#
-# OR
-#
-#
-# menubar = TkMenubar.new
-# menubar.add_menu([['File', 0],
-# ['Open', proc{puts('Open clicked')}, 0],
-# '---',
-# ['Quit', proc{exit}, 0]])
-# menubar.add_menu([['Edit', 0],
-# ['Cut', proc{puts('Cut clicked')}, 2],
-# ['Copy', proc{puts('Copy clicked')}, 0],
-# ['Paste', proc{puts('Paste clicked')}, 0]])
-# menubar.configure('tearoff', false)
-# menubar.configure('foreground', 'grey40')
-# menubar.configure('activeforeground', 'red')
-# menubar.configure('font', '-adobe-helvetica-bold-r-*--12-*-iso8859-1')
-# menubar.pack('side'=>'top', 'fill'=>'x')
-#
-#
-# OR
-#
-# radio_var = TkVariable.new('y')
-# menu_spec = [
-# [['File', 0],
-# {:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0},
-# '---',
-# ['Check_A', TkVariable.new(true), 6],
-# {:type=>'checkbutton', :label=>'Check_B',
-# :variable=>TkVariable.new, :underline=>6},
-# '---',
-# ['Radio_X', [radio_var, 'x'], 6],
-# ['Radio_Y', [radio_var, 'y'], 6],
-# ['Radio_Z', [radio_var, 'z'], 6],
-# '---',
-# ['cascade', [
-# ['sss', proc{p 'sss'}, 0],
-# ['ttt', proc{p 'ttt'}, 0],
-# ['uuu', proc{p 'uuu'}, 0],
-# ['vvv', proc{p 'vvv'}, 0],
-# ], 0],
-# '---',
-# ['Quit', proc{exit}, 0]],
-# [['Edit', 0],
-# ['Cut', proc{puts('Cut clicked')}, 2],
-# ['Copy', proc{puts('Copy clicked')}, 0],
-# ['Paste', proc{puts('Paste clicked')}, 0]]
-# ]
-# menubar = TkMenubar.new(nil, menu_spec,
-# 'tearoff'=>false,
-# 'foreground'=>'grey40',
-# 'activeforeground'=>'red',
-# 'font'=>'Helvetica 12 bold')
-# menubar.pack('side'=>'top', 'fill'=>'x')
-
-# See tk/menuspec.rb about the format of the menu_spec
-
-# To use add_menu, configuration must be done by calling configure after
-# adding all menus by add_menu, not by the constructor arguments.
-
-require 'tk'
-require 'tk/frame'
-require 'tk/composite'
-require 'tk/menuspec'
-
-class TkMenubar<Tk::Frame
- include TkComposite
- include TkMenuSpec
-
- def initialize(parent = nil, spec = nil, options = {})
- if parent.kind_of? Hash
- options = parent
- parent = nil
- spec = (options.has_key?('spec'))? options.delete('spec'): nil
- end
-
- _symbolkey2str(options)
- menuspec_opt = {}
- TkMenuSpec::MENUSPEC_OPTKEYS.each{|key|
- menuspec_opt[key] = options.delete(key) if options.has_key?(key)
- }
-
- super(parent, options)
-
- @menus = []
-
- spec.each{|info| add_menu(info, menuspec_opt)} if spec
-
- options.each{|key, value| configure(key, value)} if options
- end
-
- def add_menu(menu_info, menuspec_opt={})
- mbtn, menu = _create_menubutton(@frame, menu_info, menuspec_opt)
-
- submenus = _get_cascade_menus(menu).flatten
-
- @menus.push([mbtn, menu])
- delegate('tearoff', menu, *submenus)
- delegate('foreground', mbtn, menu, *submenus)
- delegate('background', mbtn, menu, *submenus)
- delegate('disabledforeground', mbtn, menu, *submenus)
- delegate('activeforeground', mbtn, menu, *submenus)
- delegate('activebackground', mbtn, menu, *submenus)
- delegate('font', mbtn, menu, *submenus)
- delegate('kanjifont', mbtn, menu, *submenus)
- end
-
- def [](index)
- return @menus[index]
- end
-end
diff --git a/ext/tk/lib/tk/menuspec.rb b/ext/tk/lib/tk/menuspec.rb
deleted file mode 100644
index 8039676e69..0000000000
--- a/ext/tk/lib/tk/menuspec.rb
+++ /dev/null
@@ -1,457 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/menuspec.rb
-# Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# based on tkmenubar.rb :
-# Copyright (C) 1998 maeda shugo. All rights reserved.
-# This file can be distributed under the terms of the Ruby.
-#
-# The format of the menu_spec is:
-# [ menubutton_info, menubutton_info, ... ]
-#
-# The format of the menubutton_info is:
-# [ menubutton_info, entry_info, entry_info, ... ]
-#
-# And each format of *_info is:
-# [
-# [text, underline, configs], # menu button/entry (*1)
-# [label, command, underline, accelerator, configs], # command entry
-# [label, TkVar_obj, underline, accelerator, configs], # checkbutton entry
-# [label, [TkVar_obj, value],
-# underline, accelerator, configs], # radiobutton entry
-# [label, [[...menu_info...], [...menu_info...], ...],
-# underline, accelerator, configs], # cascade entry (*2)
-# '---', # separator
-# ...
-# ]
-#
-# A menu_info is an array of menu entries:
-# [ entry_info, entry_info, ... ]
-#
-#
-# underline, accelerator, and configs are optional parameters.
-# Hashes are OK instead of Arrays. Then the entry type ('command',
-# 'checkbutton', 'radiobutton' or 'cascade') is given by 'type' key
-# (e.g. :type=>'cascade'). When type is 'cascade', an array of menu_info
-# is acceptable for 'menu' key (then, create sub-menu).
-#
-# If the value of underline is true instead of an integer,
-# check whether the text/label string contains a '&' character.
-# When includes, the first '&' is removed and its following character is
-# converted the corresponding 'underline' option (first '&' is removed).
-# Else if the value of underline is a String or a Regexp,
-# use the result of label.index(underline) as the index of underline
-# (don't remove matched substring).
-#
-# NOTE: (*1)
-# If you want to make special menus (*.help for UNIX, *.system for Win,
-# and *.apple for Mac), append 'menu_name'=>name (name is 'help' for UNIX,
-# 'system' for Win, and 'apple' for Mac) option to the configs hash of
-# menu button/entry information.
-#
-# NOTE: (*2)
-# If you want to configure a cascade menu, add :menu_config=>{...configs..}
-# to the configs of the cascade entry.
-
-module TkMenuSpec
- extend TkMenuSpec
-
- MENUSPEC_OPTKEYS = [ 'layout_proc' ]
-
- def _create_menu(parent, menu_info, menu_name = nil,
- tearoff = false, default_opts = nil)
- if tearoff.kind_of?(Hash)
- default_opts = tearoff
- tearoff = false
- end
-
- if menu_name.kind_of?(Hash)
- default_opts = menu_name
- menu_name = nil
- tearoff = false
- end
-
- if default_opts.kind_of?(Hash)
- orig_opts = _symbolkey2str(default_opts)
- else
- orig_opts = {}
- end
-
- tearoff = orig_opts.delete('tearoff') if orig_opts.key?('tearoff')
- tearoff = false unless tearoff # nil --> false
-
- if menu_name
- #menu = Tk::Menu.new(parent, :widgetname=>menu_name, :tearoff=>tearoff)
- # --> use current TkMenu class
- menu = TkMenu.new(parent, :widgetname=>menu_name, :tearoff=>tearoff)
- else
- #menu = Tk::Menu.new(parent, :tearoff=>tearoff)
- # --> use current TkMenu class
- menu = TkMenu.new(parent, :tearoff=>tearoff)
- end
-
- for item_info in menu_info
- if item_info.kind_of?(Hash)
- options = orig_opts.dup
- options.update(_symbolkey2str(item_info))
- item_type = (options.delete('type') || 'command').to_s
- menu_name = options.delete('menu_name')
- menu_opts = orig_opts.dup
- menu_opts.update(_symbolkey2str(options.delete('menu_config') || {}))
- if item_type == 'cascade' && options['menu'].kind_of?(Array)
- # create cascade menu
- submenu = _create_menu(menu, options['menu'], menu_name,
- tearoff, menu_opts)
- options['menu'] = submenu
- end
- case options['underline']
- when String, Regexp
- if options['label'] &&
- (idx = options['label'].index(options['underline']))
- options['underline'] = idx
- else
- options['underline'] = -1
- end
- when true
- if options['label'] && (idx = options['label'].index('&'))
- options['label'] = options['label'].dup
- options['label'][idx] = ''
- options['underline'] = idx
- else
- options['underline'] = -1
- end
- end
- menu.add(item_type, options)
-
- elsif item_info.kind_of?(Array)
- options = orig_opts.dup
-
- options['label'] = item_info[0] if item_info[0]
-
- case item_info[1]
- when TkVariable
- # checkbutton
- item_type = 'checkbutton'
- options['variable'] = item_info[1]
- options['onvalue'] = true
- options['offvalue'] = false
-
- when Array
- # radiobutton or cascade
- if item_info[1][0].kind_of?(TkVariable)
- # radiobutton
- item_type = 'radiobutton'
- options['variable'] = item_info[1][0]
- options['value'] = item_info[1][1] if item_info[1][1]
-
- else
- # cascade
- item_type = 'cascade'
- menu_opts = orig_opts.dup
- if item_info[4] && item_info[4].kind_of?(Hash)
- opts = _symbolkey2str(item_info[4])
- menu_name = opts.delete('menu_name')
- menu_config = opts.delete('menu_config') || {}
- menu_opts.update(_symbolkey2str(menu_config))
- end
- submenu = _create_menu(menu, item_info[1], menu_name,
- tearoff, menu_opts)
- options['menu'] = submenu
- end
-
- else
- # command
- item_type = 'command'
- options['command'] = item_info[1] if item_info[1]
- end
-
- options['underline'] = item_info[2] if item_info[2]
- options['accelerator'] = item_info[3] if item_info[3]
- if item_info[4] && item_info[4].kind_of?(Hash)
- opts = _symbolkey2str(item_info[4])
- if item_type == 'cascade'
- opts.delete('menu_name')
- opts.delete('menu_config')
- end
- options.update(opts)
- end
-
- case options['underline']
- when String, Regexp
- if options['label'] &&
- (idx = options['label'].index(options['underline']))
- options['underline'] = idx
- else
- options['underline'] = -1
- end
- when true
- if options['label'] && (idx = options['label'].index('&'))
- options['label'] = options['label'].dup
- options['label'][idx] = ''
- options['underline'] = idx
- else
- options['underline'] = -1
- end
- end
-
- menu.add(item_type, options)
-
- elsif /^-+$/ =~ item_info
- menu.add('separator')
-
- else
- menu.add('command', 'label' => item_info)
- end
- end
-
- menu
- end
- private :_create_menu
-
- def _use_menubar?(parent)
- use_menubar = false
- if parent.kind_of?(Tk::Root) || parent.kind_of?(Tk::Toplevel)
- true
- elsif parent.current_configinfo.has_key?('menu')
- true
- else
- false
- end
- end
- private :_use_menubar?
-
- def _create_menu_for_menubar(parent)
- #unless (mbar = parent.menu).kind_of?(TkMenu)
- # --> use current TkMenu class
- mbar = parent.menu
- unless mbar.kind_of?(Tk::Menu) || mbar.kind_of?(TkMenu)
- #mbar = Tk::Menu.new(parent, :tearoff=>false)
- mbar = TkMenu.new(parent, :tearoff=>false)
- parent.menu(mbar)
- end
- mbar
- end
- private :_create_menu_for_menubar
-
- def _create_menubutton(parent, menu_info, tearoff=false, default_opts = {})
- btn_info = menu_info[0]
-
- if tearoff.kind_of?(Hash)
- default_opts = tearoff
- tearoff = false
- end
-
- if default_opts.kind_of?(Hash)
- default_opts = _symbolkey2str(default_opts)
-
- if default_opts.has_key?('layout_proc')
- layout_proc = default_opts.delete('layout_proc')
- end
-
- _vertical_mbar_bind_proc = proc{|m, dir|
- Tk::Menu::TkInternalFunction.next_menu(m, dir) rescue nil
- # ignore error when the internal function doesn't exist
- }
-
- case layout_proc
- when :vertical, 'vertical', :vertical_left, 'vertical_left'
- layout_proc = proc{|_parent, _mbtn|
- _mbtn.direction :right
- _mbtn.pack(:side=>:top, :fill=>:x)
-
- menu = _mbtn.menu
- menu.bind('Tab', _vertical_mbar_bind_proc, :widget, 'forward')
- menu.bind('Alt-Tab', _vertical_mbar_bind_proc, :widget, 'backward')
- }
- when :vertical_right, 'vertical_right'
- layout_proc = proc{|_parent, _mbtn|
- _mbtn.direction :left
- _mbtn.pack(:side=>:top, :fill=>:x)
-
- menu = _mbtn.menu
- menu.bind('Tab', _vertical_mbar_bind_proc, :widget, 'forward')
- menu.bind('Alt-Tab', _vertical_mbar_bind_proc, :widget, 'backward')
- }
- when :horizontal, 'horizontal'
- layout_proc = proc{|_parent, _mbtn| _mbtn.pack(:side=>:left)}
- else
- # do nothing
- end
- end
-
- keys = (default_opts)? default_opts.dup: {}
-
- tearoff = keys.delete('tearoff') if keys.key?('tearoff')
- tearoff = false unless tearoff # nil --> false
-
- if _use_menubar?(parent) && ! layout_proc
- # menubar by menu entries
- mbar = _create_menu_for_menubar(parent)
-
- menu_name = nil
-
- if btn_info.kind_of?(Hash)
- keys.update(_symbolkey2str(btn_info))
- menu_name = keys.delete('menu_name')
- keys['label'] = keys.delete('text') || ''
-
- case keys['underline']
- when String, Regexp
- if idx = keys['label'].index(keys['underline'])
- keys['underline'] = idx
- else
- keys['underline'] = -1
- end
- when true
- if idx = keys['label'].index('&')
- keys['label'] = keys['label'].dup
- keys['label'][idx] = ''
- keys['underline'] = idx
- else
- keys['underline'] = -1
- end
- end
-
- elsif btn_info.kind_of?(Array)
- keys['label'] = btn_info[0] if btn_info[0]
-
- case btn_info[1]
- when Integer
- keys['underline'] = btn_info[1]
- when String, Regexp
- if idx = keys['label'].index(btn_info[1])
- keys['underline'] = idx
- else
- keys['underline'] = -1
- end
- when true
- if idx = keys['label'].index('&')
- keys['label'] = keys['label'].dup
- keys['label'][idx] = ''
- keys['underline'] = idx
- else
- keys['underline'] = -1
- end
- end
-
- if btn_info[2]&&btn_info[2].kind_of?(Hash)
- keys.update(_symbolkey2str(btn_info[2]))
- menu_name = keys.delete('menu_name')
- end
-
- else
- keys = {:label=>btn_info}
- end
-
- menu = _create_menu(mbar, menu_info[1..-1], menu_name,
- tearoff, default_opts)
- menu.tearoff(tearoff)
-
- keys['menu'] = menu
- mbar.add('cascade', keys)
-
- [mbar, menu]
-
- else
- # menubar by menubuttons
- #mbtn = Tk::Menubutton.new(parent)
- # --> use current TkMenubutton class
- mbtn = TkMenubutton.new(parent)
-
- menu_name = nil
-
- if btn_info.kind_of?(Hash)
- keys.update(_symbolkey2str(btn_info))
- menu_name = keys.delete('menu_name')
- keys['text'] = keys.delete('label') || ''
- case keys['underline']
- when String, Regexp
- if idx = keys['text'].index(keys['underline'])
- keys['underline'] = idx
- else
- keys['underline'] = -1
- end
- when true
- if idx = keys['text'].index('&')
- keys['text'] = keys['text'].dup
- keys['text'][idx] = ''
- keys['underline'] = idx
- else
- keys['underline'] = -1
- end
- end
- mbtn.configure(keys)
-
- elsif btn_info.kind_of?(Array)
- case btn_info[1]
- when String, Regexp
- if btn_info[0] && (idx = btn_info[0].index(btn_info[1]))
- btn_info[1] = idx
- else
- btn_info[1] = -1
- end
- when true
- if btn_info[0] && (idx = btn_info[0].index('&'))
- btn_info[0] = btn_info[0].dup
- btn_info[0][idx] = ''
- btn_info[1] = idx
- else
- btn_info[1] = -1
- end
- end
- mbtn.configure('text', btn_info[0]) if btn_info[0]
- mbtn.configure('underline', btn_info[1]) if btn_info[1]
- # mbtn.configure('accelerator', btn_info[2]) if btn_info[2]
- if btn_info[2]&&btn_info[2].kind_of?(Hash)
- keys.update(_symbolkey2str(btn_info[2]))
- menu_name = keys.delete('menu_name')
- mbtn.configure(keys)
- end
-
- else
- mbtn.configure('text', btn_info)
- end
-
- menu = _create_menu(mbtn, menu_info[1..-1], menu_name,
- tearoff, default_opts)
- mbtn.menu(menu)
-
- if layout_proc.kind_of?(Proc) || layout_proc.kind_of?(Method)
- # e.g. make a vertical menubar
- # :layout_proc => proc{|parent, btn| btn.pack(:side=>:top, :fill=>:x)}
- layout_proc.call(parent, mbtn)
- else
- mbtn.pack('side' => 'left')
- end
-
- [mbtn, menu]
- end
- end
- private :_create_menubutton
-
- def _create_menubar(parent, menu_spec, tearoff = false, opts = nil)
- if tearoff.kind_of?(Hash)
- opts = tearoff
- tearoff = false
- end
- tearoff = false unless tearoff # nil --> false
- menu_spec.each{|menu_info|
- _create_menubutton(parent, menu_info, tearoff, opts)
- }
- parent
- end
- private :_create_menubar
-
- def _get_cascade_menus(menu)
- menus = []
- (0..(menu.index('last'))).each{|idx|
- if menu.menutype(idx) == 'cascade'
- submenu = menu.entrycget(idx, 'menu')
- menus << [submenu, _get_cascade_menus(submenu)]
- end
- }
- menus
- end
- private :_get_cascade_menus
-end
diff --git a/ext/tk/lib/tk/message.rb b/ext/tk/lib/tk/message.rb
deleted file mode 100644
index 432e9667bd..0000000000
--- a/ext/tk/lib/tk/message.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/message.rb : treat message widget
-#
-require 'tk'
-require 'tk/label'
-
-class Tk::Message<Tk::Label
- TkCommandNames = ['message'.freeze].freeze
- WidgetClassName = 'Message'.freeze
- WidgetClassNames[WidgetClassName] ||= self
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('message', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('message', @path)
- # end
- #end
- private :create_self
-end
-
-#TkMessage = Tk::Message unless Object.const_defined? :TkMessage
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Message, :TkMessage)
-Tk.__set_loaded_toplevel_aliases__('tk/message.rb', :Tk, Tk::Message,
- :TkMessage)
diff --git a/ext/tk/lib/tk/mngfocus.rb b/ext/tk/lib/tk/mngfocus.rb
deleted file mode 100644
index 06b20eb6ab..0000000000
--- a/ext/tk/lib/tk/mngfocus.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/mngfocus.rb : methods for Tcl/Tk standard library 'focus.tcl'
-# by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
-#
-require 'tk'
-
-module TkManageFocus
- extend Tk
-
- TkCommandNames = [
- 'tk_focusFollowMouse'.freeze,
- 'tk_focusNext'.freeze,
- 'tk_focusPrev'.freeze
- ].freeze
-
- def TkManageFocus.followsMouse
- tk_call_without_enc('tk_focusFollowsMouse')
- end
-
- def TkManageFocus.next(win)
- tk_tcl2ruby(tk_call('tk_focusNext', win))
- end
- def focusNext
- TkManageFocus.next(self)
- end
-
- def TkManageFocus.prev(win)
- tk_tcl2ruby(tk_call('tk_focusPrev', win))
- end
- def focusPrev
- TkManageFocus.prev(self)
- end
-end
diff --git a/ext/tk/lib/tk/msgcat.rb b/ext/tk/lib/tk/msgcat.rb
deleted file mode 100644
index 1e98889faf..0000000000
--- a/ext/tk/lib/tk/msgcat.rb
+++ /dev/null
@@ -1,300 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/msgcat.rb : methods for Tcl message catalog
-# by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
-#
-require 'tk'
-
-#class TkMsgCatalog
-class TkMsgCatalog < TkObject
- include TkCore
- extend Tk
- #extend TkMsgCatalog
-
- TkCommandNames = [
- '::msgcat::mc'.freeze,
- '::msgcat::mcmax'.freeze,
- '::msgcat::mclocale'.freeze,
- '::msgcat::mcpreferences'.freeze,
- '::msgcat::mcload'.freeze,
- '::msgcat::mcset'.freeze,
- '::msgcat::mcmset'.freeze,
- '::msgcat::mcunknown'.freeze
- ].freeze
-
- tk_call_without_enc('package', 'require', 'Tcl', '8.2')
-
- PACKAGE_NAME = 'msgcat'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- if self.const_defined? :FORCE_VERSION
- tk_call_without_enc('package', 'require', 'msgcat', FORCE_VERSION)
- else
- tk_call_without_enc('package', 'require', 'msgcat')
- end
-
- MSGCAT_EXT = '.msg'
-
- UNKNOWN_CBTBL = TkUtil.untrust(Hash.new{|hash,key| hash[key] = {}})
-
- TkCore::INTERP.add_tk_procs('::msgcat::mcunknown', 'args', <<-'EOL')
- if {[set st [catch {eval {ruby_cmd TkMsgCatalog callback} [namespace current] $args} ret]] != 0} {
- #return -code $st $ret
- set idx [string first "\n\n" $ret]
- if {$idx > 0} {
- return -code $st \
- -errorinfo [string range $ret [expr $idx + 2] \
- [string length $ret]] \
- [string range $ret 0 [expr $idx - 1]]
- } else {
- return -code $st $ret
- }
- } else {
- return $ret
- }
- EOL
-
- def self.callback(namespace, locale, src_str, *args)
- src_str = sprintf(src_str, *args) unless args.empty?
- cmd_tbl = TkMsgCatalog::UNKNOWN_CBTBL[TkCore::INTERP.__getip]
- cmd = cmd_tbl[namespace]
- cmd = cmd_tbl['::'] unless cmd # use global scope as interp default
- return src_str unless cmd # no cmd -> return src-str (default action)
- begin
- cmd.call(locale, src_str)
- rescue SystemExit
- exit(0)
- rescue Interrupt
- exit!(1)
- rescue Exception => e
- begin
- msg = _toUTF8(e.class.inspect) + ': ' +
- _toUTF8(e.message) + "\n" +
- "\n---< backtrace of Ruby side >-----\n" +
- _toUTF8(e.backtrace.join("\n")) +
- "\n---< backtrace of Tk side >-------"
- if TkCore::WITH_ENCODING
- msg.force_encoding('utf-8')
- else
- msg.instance_variable_set(:@encoding, 'utf-8')
- end
- rescue Exception
- msg = e.class.inspect + ': ' + e.message + "\n" +
- "\n---< backtrace of Ruby side >-----\n" +
- e.backtrace.join("\n") +
- "\n---< backtrace of Tk side >-------"
- end
- fail(e, msg)
- end
- end
-
- def initialize(namespace = nil)
- if namespace.kind_of?(TkNamespace)
- @namespace = namespace
- elsif namespace == nil
- @namespace = TkNamespace.new('::') # global namespace
- else
- @namespace = TkNamespace.new(namespace)
- end
- @path = @namespace.path
-
- @msgcat_ext = '.msg'
- end
- attr_accessor :msgcat_ext
-
- def method_missing(id, *args)
- # locale(src, trans) ==> set_translation(locale, src, trans)
- loc = id.id2name
- case args.length
- when 0 # set locale
- self.locale=(loc)
-
- when 1 # src only, or trans_list
- if args[0].kind_of?(Array)
- # trans_list
- #list = args[0].collect{|src, trans|
- # [ Tk::UTF8_String.new(src), Tk::UTF8_String.new(trans) ]
- #}
- self.set_translation_list(loc, args[0])
- else
- # src
- #self.set_translation(loc, Tk::UTF8_String.new(args[0]))
- self.set_translation(loc, args[0])
- end
-
- when 2 # src and trans, or, trans_list and enc
- if args[0].kind_of?(Array)
- # trans_list
- self.set_translation_list(loc, *args)
- else
- #self.set_translation(loc, args[0], Tk::UTF8_String.new(args[1]))
- self.set_translation(loc, *args)
- end
-
- when 3 # src and trans and enc
- self.set_translation(loc, *args)
-
- else
- super(id, *args)
-# fail NameError, "undefined method `#{name}' for #{self.to_s}", error_at
-
- end
- end
-
- # *args ::= form, arg, arg, ...
- def self.translate(*args)
- dst = args.collect{|src|
- tk_call_without_enc('::msgcat::mc', _get_eval_string(src, true))
- }
- Tk.UTF8_String(sprintf(*dst))
- end
- class << self
- alias mc translate
- alias [] translate
- end
- def translate(*args)
- dst = args.collect{|src|
- @namespace.eval{tk_call_without_enc('::msgcat::mc',
- _get_eval_string(src, true))}
- }
- Tk.UTF8_String(sprintf(*dst))
- end
- alias mc translate
- alias [] translate
-
- def self.maxlen(*src_strings)
- tk_call('::msgcat::mcmax', *src_strings).to_i
- end
- def maxlen(*src_strings)
- @namespace.eval{tk_call('::msgcat::mcmax', *src_strings).to_i}
- end
-
- def self.locale
- tk_call('::msgcat::mclocale')
- end
- def locale
- @namespace.eval{tk_call('::msgcat::mclocale')}
- end
-
- def self.locale=(locale)
- tk_call('::msgcat::mclocale', locale)
- end
- def locale=(locale)
- @namespace.eval{tk_call('::msgcat::mclocale', locale)}
- end
-
- def self.preferences
- tk_split_simplelist(tk_call('::msgcat::mcpreferences'))
- end
- def preferences
- tk_split_simplelist(@namespace.eval{tk_call('::msgcat::mcpreferences')})
- end
-
- def self.load_tk(dir)
- number(tk_call('::msgcat::mcload', dir))
- end
-
- def self.load_rb(dir)
- count = 0
- preferences().each{|loc|
- file = File.join(dir, loc + self::MSGCAT_EXT)
- if File.readable?(file)
- count += 1
- if TkCore::WITH_ENCODING
- eval(IO.read(file, :encoding=>"ASCII-8BIT"))
- else
- eval(IO.read(file))
- end
- end
- }
- count
- end
-
- def load_tk(dir)
- number(@namespace.eval{tk_call('::msgcat::mcload', dir)})
- end
-
- def load_rb(dir)
- count = 0
- preferences().each{|loc|
- file = File.join(dir, loc + @msgcat_ext)
- if File.readable?(file)
- count += 1
- if TkCore::WITH_ENCODING
- @namespace.eval(IO.read(file, :encoding=>"ASCII-8BIT"))
- else
- @namespace.eval(IO.read(file))
- end
- end
- }
- count
- end
-
- def self.load(dir)
- self.load_rb(dir)
- end
- alias load load_rb
-
- def self.set_translation(locale, src_str, trans_str=None, enc='utf-8')
- if trans_str && trans_str != None
- trans_str = Tk.UTF8_String(_toUTF8(trans_str, enc))
- Tk.UTF8_String(ip_eval_without_enc("::msgcat::mcset {#{locale}} {#{_get_eval_string(src_str, true)}} {#{trans_str}}"))
- else
- Tk.UTF8_String(ip_eval_without_enc("::msgcat::mcset {#{locale}} {#{_get_eval_string(src_str, true)}}"))
- end
- end
- def set_translation(locale, src_str, trans_str=None, enc='utf-8')
- if trans_str && trans_str != None
- trans_str = Tk.UTF8_String(_toUTF8(trans_str, enc))
- Tk.UTF8_String(@namespace.eval{
- ip_eval_without_enc("::msgcat::mcset {#{locale}} {#{_get_eval_string(src_str, true)}} {#{trans_str}}")
- })
- else
- Tk.UTF8_String(@namespace.eval{
- ip_eval_without_enc("::msgcat::mcset {#{locale}} {#{_get_eval_string(src_str, true)}}")
- })
- end
- end
-
- def self.set_translation_list(locale, trans_list, enc='utf-8')
- # trans_list ::= [ [src, trans], [src, trans], ... ]
- list = []
- trans_list.each{|src, trans|
- if trans && trans != None
- list << _get_eval_string(src, true)
- list << Tk.UTF8_String(_toUTF8(trans, enc))
- else
- list << _get_eval_string(src, true) << ''
- end
- }
- #number(tk_call_without_enc('::msgcat::mcmset', locale, list))
- number(ip_eval_without_enc("::msgcat::mcmset {#{locale}} {#{_get_eval_string(list)}}"))
- end
- def set_translation_list(locale, trans_list, enc='utf-8')
- # trans_list ::= [ [src, trans], [src, trans], ... ]
- list = []
- trans_list.each{|src, trans|
- if trans && trans != None
- list << _get_eval_string(src, true)
- list << Tk.UTF8_String(_toUTF8(trans, enc))
- else
- list << _get_eval_string(src, true) << ''
- end
- }
- number(@namespace.eval{
- #tk_call_without_enc('::msgcat::mcmset', locale, list)
- ip_eval_without_enc("::msgcat::mcmset {#{locale}} {#{_get_eval_string(list)}}")
- })
- end
-
- def self.def_unknown_proc(cmd=Proc.new)
- TkMsgCatalog::UNKNOWN_CBTBL[TkCore::INTERP.__getip]['::'] = cmd
- end
- def def_unknown_proc(cmd=Proc.new)
- TkMsgCatalog::UNKNOWN_CBTBL[TkCore::INTERP.__getip][@namespace.path] = cmd
- end
-end
-
-TkMsgCat = TkMsgCatalog
diff --git a/ext/tk/lib/tk/namespace.rb b/ext/tk/lib/tk/namespace.rb
deleted file mode 100644
index 1cab6fa060..0000000000
--- a/ext/tk/lib/tk/namespace.rb
+++ /dev/null
@@ -1,547 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/namespace.rb : methods to manipulate Tcl/Tk namespace
-# by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
-#
-require 'tk'
-
-class TkNamespace < TkObject
- extend Tk
-
- TkCommandNames = [
- 'namespace'.freeze,
- ].freeze
-
- Tk_Namespace_ID_TBL = TkCore::INTERP.create_table
-
- (Tk_Namespace_ID = ["ns".freeze, TkUtil.untrust("00000")]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- Tk_NsCode_RetObjID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- Tk_Namespace_ID_TBL.mutex.synchronize{ Tk_Namespace_ID_TBL.clear }
- Tk_NsCode_RetObjID_TBL.mutex.synchronize{ Tk_NsCode_RetObjID_TBL.clear }
- }
-
- def TkNamespace.id2obj(id)
- Tk_Namespace_ID_TBL.mutex.synchronize{
- Tk_Namespace_ID_TBL[id]? Tk_Namespace_ID_TBL[id]: id
- }
- end
-
- #####################################
-
- class Ensemble < TkObject
- def __cget_cmd
- ['namespace', 'ensemble', 'configure', self.path]
- end
- private :__cget_cmd
-
- def __config_cmd
- ['namespace', 'ensemble', 'configure', self.path]
- end
- private :__config_cmd
-
- def __configinfo_struct
- {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil,
- :default_value=>nil, :current_value=>2}
- end
- private :__configinfo_struct
-
- def __boolval_optkeys
- ['prefixes']
- end
- private :__boolval_optkeys
-
- def __listval_optkeys
- ['map', 'subcommands', 'unknown']
- end
- private :__listval_optkeys
-
- def self.exist?(ensemble)
- bool(tk_call('namespace', 'ensemble', 'exists', ensemble))
- end
-
- def initialize(keys = {})
- @ensemble = @path = tk_call('namespace', 'ensemble', 'create', keys)
- end
-
- def cget(slot)
- if slot == :namespace || slot == 'namespace'
- ns = super(slot)
- Tk_Namespace_ID_TBL.mutex.synchronize{
- if TkNamespace::Tk_Namespace_ID_TBL.key?(ns)
- TkNamespace::Tk_Namespace_ID_TBL[ns]
- else
- ns
- end
- }
- else
- super(slot)
- end
- end
- def cget_strict(slot)
- if slot == :namespace || slot == 'namespace'
- ns = super(slot)
- Tk_Namespace_ID_TBL.mutex.synchronize{
- if TkNamespace::Tk_Namespace_ID_TBL.key?(ns)
- TkNamespace::Tk_Namespace_ID_TBL[ns]
- else
- ns
- end
- }
- else
- super(slot)
- end
- end
-
- def configinfo(slot = nil)
- if slot
- if slot == :namespace || slot == 'namespace'
- val = super(slot)
- Tk_Namespace_ID_TBL.mutex.synchronize{
- if TkNamespace::Tk_Namespace_ID_TBL.key?(val)
- val = TkNamespace::Tk_Namespace_ID_TBL[val]
- end
- }
- else
- val = super(slot)
- end
-
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- [slot.to_s, val]
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- {slot.to_s => val}
- end
-
- else
- info = super()
-
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- Tk_Namespace_ID_TBL.mutex.synchronize{
- info.map!{|inf|
- if inf[0] == 'namespace' &&
- TkNamespace::Tk_Namespace_ID_TBL.key?(inf[-1])
- [inf[0], TkNamespace::Tk_Namespace_ID_TBL[inf[-1]]]
- else
- inf
- end
- }
- }
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- val = info['namespace']
- Tk_Namespace_ID_TBL.mutex.synchronize{
- if TkNamespace::Tk_Namespace_ID_TBL.key?(val)
- info['namespace'] = TkNamespace::Tk_Namespace_ID_TBL[val]
- end
- }
- end
-
- info
- end
- end
-
- def exists?
- bool(tk_call('namespace', 'ensemble', 'exists', @path))
- end
- end
-
- #####################################
-
- class ScopeArgs < Array
- include Tk
-
- # alias __tk_call tk_call
- # alias __tk_call_without_enc tk_call_without_enc
- # alias __tk_call_with_enc tk_call_with_enc
- def tk_call(*args)
- #super('namespace', 'eval', @namespace, *args)
- args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''}
- super('namespace', 'eval', @namespace,
- TkCore::INTERP._merge_tklist(*args))
- end
- def tk_call_without_enc(*args)
- #super('namespace', 'eval', @namespace, *args)
- args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''}
- super('namespace', 'eval', @namespace,
- TkCore::INTERP._merge_tklist(*args))
- end
- def tk_call_with_enc(*args)
- #super('namespace', 'eval', @namespace, *args)
- args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''}
- super('namespace', 'eval', @namespace,
- TkCore::INTERP._merge_tklist(*args))
- end
-
- def initialize(namespace, *args)
- @namespace = namespace
- super(args.size)
- self.replace(args)
- end
- end
-
- #####################################
-
- class NsCode < TkObject
- def initialize(scope, use_obj_id = false)
- @scope = scope + ' '
- @use_obj_id = use_obj_id
- end
- def path
- @scope
- end
- def to_eval
- @scope
- end
- def call(*args)
- ret = TkCore::INTERP._eval_without_enc(@scope + array2tk_list(args))
- if @use_obj_id
- ret = TkNamespace::Tk_NsCode_RetObjID_TBL.delete(ret.to_i)
- end
- ret
- end
- end
-
- #####################################
-
- def install_cmd(cmd)
- lst = tk_split_simplelist(super(cmd), false, false)
- if lst[1] =~ /^::/
- lst[1] = @fullname
- else
- lst.insert(1, @fullname)
- end
- TkCore::INTERP._merge_tklist(*lst)
- end
-
- alias __tk_call tk_call
- alias __tk_call_without_enc tk_call_without_enc
- alias __tk_call_with_enc tk_call_with_enc
- def tk_call(*args)
- #super('namespace', 'eval', @fullname, *args)
- args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''}
- super('namespace', 'eval', @fullname,
- TkCore::INTERP._merge_tklist(*args))
- end
- def tk_call_without_enc(*args)
- #super('namespace', 'eval', @fullname, *args)
- args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''}
- super('namespace', 'eval', @fullname,
- TkCore::INTERP._merge_tklist(*args))
- end
- def tk_call_with_enc(*args)
- #super('namespace', 'eval', @fullname, *args)
- args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''}
- super('namespace', 'eval', @fullname,
- TkCore::INTERP._merge_tklist(*args))
- end
- alias ns_tk_call tk_call
- alias ns_tk_call_without_enc tk_call_without_enc
- alias ns_tk_call_with_enc tk_call_with_enc
-
- def initialize(name = nil, parent = nil)
- unless name
- Tk_Namespace_ID.mutex.synchronize{
- # name = Tk_Namespace_ID.join('')
- name = Tk_Namespace_ID.join(TkCore::INTERP._ip_id_)
- Tk_Namespace_ID[1].succ!
- }
- end
- name = __tk_call('namespace', 'current') if name == ''
- if parent
- if parent =~ /^::/
- if name =~ /^::/
- @fullname = parent + name
- else
- @fullname = parent +'::'+ name
- end
- else
- ancestor = __tk_call('namespace', 'current')
- ancestor = '' if ancestor == '::'
- if name =~ /^::/
- @fullname = ancestor + '::' + parent + name
- else
- @fullname = ancestor + '::'+ parent +'::'+ name
- end
- end
- else # parent == nil
- ancestor = __tk_call('namespace', 'current')
- ancestor = '' if ancestor == '::'
- if name =~ /^::/
- @fullname = name
- else
- @fullname = ancestor + '::' + name
- end
- end
- @path = @fullname
- @parent = __tk_call('namespace', 'qualifiers', @fullname)
- @name = __tk_call('namespace', 'tail', @fullname)
-
- # create namespace
- __tk_call('namespace', 'eval', @fullname, '')
-
- Tk_Namespace_ID_TBL.mutex.synchronize{
- Tk_Namespace_ID_TBL[@fullname] = self
- }
- end
-
- def self.children(*args)
- # args ::= [<namespace>] [<pattern>]
- # <pattern> must be glob-style pattern
- tk_split_simplelist(tk_call('namespace', 'children', *args)).collect{|ns|
- # ns is fullname
- Tk_Namespace_ID_TBL.mutex.synchronize{
- if Tk_Namespace_ID_TBL.key?(ns)
- Tk_Namespace_ID_TBL[ns]
- else
- ns
- end
- }
- }
- end
- def children(pattern=None)
- TkNamespace.children(@fullname, pattern)
- end
-
- def self.code(script = Proc.new)
- TkNamespace.new('').code(script)
- end
-=begin
- def code(script = Proc.new)
- if script.kind_of?(String)
- cmd = proc{|*args| ScopeArgs.new(@fullname,*args).instance_eval(script)}
- elsif script.kind_of?(Proc)
- cmd = proc{|*args| ScopeArgs.new(@fullname,*args).instance_eval(&script)}
- else
- fail ArgumentError, "String or Proc is expected"
- end
- TkNamespace::NsCode.new(tk_call_without_enc('namespace', 'code',
- _get_eval_string(cmd, false)))
- end
-=end
- def code(script = Proc.new)
- if script.kind_of?(String)
- cmd = proc{|*args|
- ret = ScopeArgs.new(@fullname,*args).instance_eval(script)
- id = ret.object_id
- TkNamespace::Tk_NsCode_RetObjID_TBL[id] = ret
- id
- }
- elsif script.kind_of?(Proc)
- cmd = proc{|*args|
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- obj = ScopeArgs.new(@fullname,*args)
- ret = obj.instance_exec(obj, &script)
- else
- ret = ScopeArgs.new(@fullname,*args).instance_eval(&script)
- end
- id = ret.object_id
- TkNamespace::Tk_NsCode_RetObjID_TBL[id] = ret
- id
- }
- else
- fail ArgumentError, "String or Proc is expected"
- end
- TkNamespace::NsCode.new(tk_call_without_enc('namespace', 'code',
- _get_eval_string(cmd, false)),
- true)
- end
-
- def self.current_path
- tk_call('namespace', 'current')
- end
- def current_path
- @fullname
- end
-
- def self.current
- ns = self.current_path
- Tk_Namespace_ID_TBL.mutex.synchronize{
- if Tk_Namespace_ID_TBL.key?(ns)
- Tk_Namespace_ID_TBL[ns]
- else
- ns
- end
- }
- end
- def current_namespace
- # ns_tk_call('namespace', 'current')
- # @fullname
- self
- end
- alias current current_namespace
-
- def self.delete(*ns_list)
- tk_call('namespace', 'delete', *ns_list)
- ns_list.each{|ns|
- Tk_Namespace_ID_TBL.mutex.synchronize{
- if ns.kind_of?(TkNamespace)
- Tk_Namespace_ID_TBL.delete(ns.path)
- else
- Tk_Namespace_ID_TBL.delete(ns.to_s)
- end
- }
- }
- end
- def delete
- TkNamespece.delete(@fullname)
- end
-
- def self.ensemble_create(*keys)
- tk_call('namespace', 'ensemble', 'create', *hash_kv(keys))
- end
- def self.ensemble_configure(cmd, slot, value=None)
- if slot.kind_of?(Hash)
- tk_call('namespace', 'ensemble', 'configure', cmd, *hash_kv(slot))
- else
- tk_call('namespace', 'ensemble', 'configure', cmd, '-'+slot.to_s, value)
- end
- end
- def self.ensemble_configinfo(cmd, slot = nil)
- if slot
- tk_call('namespace', 'ensemble', 'configure', cmd, '-' + slot.to_s)
- else
- inf = {}
- Hash(*tk_split_simplelist(tk_call('namespace', 'ensemble', 'configure', cmd))).each{|k, v| inf[k[1..-1]] = v}
- inf
- end
- end
- def self.ensemble_exist?(cmd)
- bool(tk_call('namespace', 'ensemble', 'exists', cmd))
- end
-
- def self.eval(namespace, cmd = Proc.new, *args)
- #tk_call('namespace', 'eval', namespace, cmd, *args)
- TkNamespace.new(namespace).eval(cmd, *args)
- end
-=begin
- def eval(cmd = Proc.new, *args)
- #TkNamespace.eval(@fullname, cmd, *args)
- #ns_tk_call(cmd, *args)
- code_obj = code(cmd)
- ret = code_obj.call(*args)
- # uninstall_cmd(TkCore::INTERP._split_tklist(code_obj.path)[-1])
- uninstall_cmd(_fromUTF8(TkCore::INTERP._split_tklist(_toUTF8(code_obj.path))[-1]))
- tk_tcl2ruby(ret)
- end
-=end
- def eval(cmd = Proc.new, *args)
- code_obj = code(cmd)
- ret = code_obj.call(*args)
- uninstall_cmd(_fromUTF8(TkCore::INTERP._split_tklist(_toUTF8(code_obj.path))[-1]))
- ret
- end
-
- def self.exist?(ns)
- bool(tk_call('namespace', 'exists', ns))
- end
- def exist?
- TkNamespece.exist?(@fullname)
- end
-
- def self.export(*patterns)
- tk_call('namespace', 'export', *patterns)
- end
- def self.export_with_clear(*patterns)
- tk_call('namespace', 'export', '-clear', *patterns)
- end
- def export
- TkNamespace.export(@fullname)
- end
- def export_with_clear
- TkNamespace.export_with_clear(@fullname)
- end
-
- def self.forget(*patterns)
- tk_call('namespace', 'forget', *patterns)
- end
- def forget
- TkNamespace.forget(@fullname)
- end
-
- def self.import(*patterns)
- tk_call('namespace', 'import', *patterns)
- end
- def self.force_import(*patterns)
- tk_call('namespace', 'import', '-force', *patterns)
- end
- def import
- TkNamespace.import(@fullname)
- end
- def force_import
- TkNamespace.force_import(@fullname)
- end
-
- def self.inscope(namespace, script, *args)
- tk_call('namespace', 'inscope', namespace, script, *args)
- end
- def inscope(script, *args)
- TkNamespace.inscope(@fullname, script, *args)
- end
-
- def self.origin(cmd)
- tk_call('namespace', 'origin', cmd)
- end
-
- def self.parent(namespace=None)
- ns = tk_call('namespace', 'parent', namespace)
- Tk_Namespace_ID_TBL.mutex.synchronize{
- if Tk_Namespace_ID_TBL.key?(ns)
- Tk_Namespace_ID_TBL[ns]
- else
- ns
- end
- }
- end
- def parent
- tk_call('namespace', 'parent', @fullname)
- end
-
- def self.get_path
- tk_call('namespace', 'path')
- end
- def self.set_path(*namespace_list)
- tk_call('namespace', 'path', array2tk_list(namespace_list))
- end
- def set_path
- tk_call('namespace', 'path', @fullname)
- end
-
- def self.qualifiers(str)
- tk_call('namespace', 'qualifiers', str)
- end
-
- def self.tail(str)
- tk_call('namespace', 'tail', str)
- end
-
- def self.upvar(namespace, *var_pairs)
- tk_call('namespace', 'upvar', namespace, *(var_pairs.flatten))
- end
- def upvar(*var_pairs)
- TkNamespace.inscope(@fullname, *(var_pairs.flatten))
- end
-
- def self.get_unknown_handler
- tk_tcl2ruby(tk_call('namespace', 'unknown'))
- end
- def self.set_unknown_handler(cmd = Proc.new)
- tk_call('namespace', 'unknown', cmd)
- end
-
- def self.which(name)
- tk_call('namespace', 'which', name)
- end
- def self.which_command(name)
- tk_call('namespace', 'which', '-command', name)
- end
- def self.which_variable(name)
- tk_call('namespace', 'which', '-variable', name)
- end
-end
-
-TkNamespace::Global = TkNamespace.new('::')
diff --git a/ext/tk/lib/tk/optiondb.rb b/ext/tk/lib/tk/optiondb.rb
deleted file mode 100644
index ced8a111e4..0000000000
--- a/ext/tk/lib/tk/optiondb.rb
+++ /dev/null
@@ -1,372 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/optiondb.rb : treat option database
-#
-require 'tk'
-
-module TkOptionDB
- include Tk
- extend Tk
-
- TkCommandNames = ['option'.freeze].freeze
- (CmdClassID = ['CMD_CLASS'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- module Priority
- WidgetDefault = 20
- StartupFile = 40
- UserDefault = 60
- Interactive = 80
- end
-
- def add(pat, value, pri=None)
- tk_call('option', 'add', pat, value, pri)
- end
- def clear
- tk_call_without_enc('option', 'clear')
- end
- def get(win, name, klass)
- tk_call('option', 'get', win ,name, klass)
- end
- def readfile(file, pri=None)
- tk_call('option', 'readfile', file, pri)
- end
- alias read_file readfile
- module_function :add, :clear, :get, :readfile, :read_file
-
- def read_entries(file, f_enc=nil)
- if TkCore::INTERP.safe?
- fail SecurityError,
- "can't call 'TkOptionDB.read_entries' on a safe interpreter"
- end
-
- i_enc = ((Tk.encoding)? Tk.encoding : Tk.encoding_system)
-
- unless f_enc
- f_enc = i_enc
- end
-
- ent = []
- cline = ''
- open(file, 'r') {|f|
- while line = f.gets
- #cline += line.chomp!
- cline.concat(line.chomp!)
- case cline
- when /\\$/ # continue
- cline.chop!
- next
- when /^\s*(!|#)/ # comment
- cline = ''
- next
- when /^([^:]+):(.*)$/
- pat = $1.strip
- val = $2.lstrip
- p "ResourceDB: #{[pat, val].inspect}" if $DEBUG
- pat = TkCore::INTERP._toUTF8(pat, f_enc)
- pat = TkCore::INTERP._fromUTF8(pat, i_enc)
- val = TkCore::INTERP._toUTF8(val, f_enc)
- val = TkCore::INTERP._fromUTF8(val, i_enc)
- ent << [pat, val]
- cline = ''
- else # unknown --> ignore
- cline = ''
- next
- end
- end
- }
- ent
- end
- module_function :read_entries
-
- def read_with_encoding(file, f_enc=nil, pri=None)
- # try to read the file as an OptionDB file
- read_entries(file, f_enc).each{|pat, val|
- add(pat, val, pri)
- }
-
-=begin
- i_enc = Tk.encoding()
-
- unless f_enc
- f_enc = i_enc
- end
-
- cline = ''
- open(file, 'r') {|f|
- while line = f.gets
- cline += line.chomp!
- case cline
- when /\\$/ # continue
- cline.chop!
- next
- when /^\s*!/ # comment
- cline = ''
- next
- when /^([^:]+):\s(.*)$/
- pat = $1
- val = $2
- p "ResourceDB: #{[pat, val].inspect}" if $DEBUG
- pat = TkCore::INTERP._toUTF8(pat, f_enc)
- pat = TkCore::INTERP._fromUTF8(pat, i_enc)
- val = TkCore::INTERP._toUTF8(val, f_enc)
- val = TkCore::INTERP._fromUTF8(val, i_enc)
- add(pat, val, pri)
- cline = ''
- else # unknown --> ignore
- cline = ''
- next
- end
- end
- }
-=end
- end
- module_function :read_with_encoding
-
- # support procs on the resource database
- @@resource_proc_class = Class.new
-
- @@resource_proc_class.const_set(:CARRIER, '.'.freeze)
-
- @@resource_proc_class.instance_variable_set('@method_tbl',
- TkCore::INTERP.create_table)
- @@resource_proc_class.instance_variable_set('@add_method', false)
- @@resource_proc_class.instance_variable_set('@safe_mode', 4)
-
- class << @@resource_proc_class
- private :new
-
-=begin
- CARRIER = '.'.freeze
- METHOD_TBL = TkCore::INTERP.create_table
- ADD_METHOD = false
- SAFE_MODE = 4
-=end
-
-=begin
- def __closed_block_check__(str)
- depth = 0
- str.scan(/[{}]/){|x|
- if x == "{"
- depth += 1
- elsif x == "}"
- depth -= 1
- end
- if depth <= 0 && !($' =~ /\A\s*\Z/)
- fail RuntimeError, "bad string for procedure : #{str.inspect}"
- end
- }
- str
- end
- private :__closed_block_check__
-=end
-
- def __check_proc_string__(str)
- # If you want to check the proc_string, do it in this method.
- # Please define this in the block given to 'new_proc_class' method.
- str
- end
-
- def method_missing(id, *args)
- #res_proc, proc_str = self::METHOD_TBL[id]
- res_proc, proc_str = @method_tbl[id]
-
- proc_source = TkOptionDB.get(self::CARRIER, id.id2name, '').strip
- res_proc = nil if proc_str != proc_source # resource is changed
-
- # unless res_proc.kind_of?(Proc)
- unless TkComm._callback_entry?(res_proc)
- #if id == :new || !(self::METHOD_TBL.has_key?(id) || self::ADD_METHOD)
- if id == :new || !(@method_tbl.has_key?(id) || @add_method)
- raise NoMethodError,
- "not support resource-proc '#{id.id2name}' for #{self.name}"
- end
- proc_str = proc_source
- proc_str = '{' + proc_str + '}' unless /\A\{.*\}\Z/ =~ proc_str
- #proc_str = __closed_block_check__(proc_str)
- proc_str = __check_proc_string__(proc_str)
- res_proc = proc{
- begin
- #eval("$SAFE = #{self::SAFE_MODE};\nProc.new" + proc_str)
- eval("$SAFE = #{@safe_mode};\nProc.new" + proc_str)
- rescue SyntaxError=>err
- raise SyntaxError,
- TkCore::INTERP._toUTF8(err.message.gsub(/\(eval\):\d:/,
- "(#{id.id2name}):"))
- end
- }.call
- #self::METHOD_TBL[id] = [res_proc, proc_source]
- @method_tbl[id] = [res_proc, proc_source]
- end
- res_proc.call(*args)
- end
-
- private :__check_proc_string__, :method_missing
- end
- @@resource_proc_class.freeze
-
-=begin
- def __create_new_class(klass, func, safe = 4, add = false, parent = nil)
- klass = klass.to_s if klass.kind_of? Symbol
- unless (?A..?Z) === klass[0]
- fail ArgumentError, "bad string '#{klass}' for class name"
- end
- unless func.kind_of? Array
- fail ArgumentError, "method-list must be Array"
- end
- func_str = func.join(' ')
- if parent == nil
- install_win(parent)
- elsif parent <= @@resource_proc_class
- install_win(parent::CARRIER)
- else
- fail ArgumentError, "parent must be Resource-Proc class"
- end
- carrier = Tk.tk_call_without_enc('frame', @path, '-class', klass)
-
- body = <<-"EOD"
- class #{klass} < TkOptionDB.module_eval('@@resource_proc_class')
- CARRIER = '#{carrier}'.freeze
- METHOD_TBL = TkCore::INTERP.create_table
- ADD_METHOD = #{add}
- SAFE_MODE = #{safe}
- %w(#{func_str}).each{|f| METHOD_TBL[f.intern] = nil }
- end
- EOD
-
- if parent.kind_of?(Class) && parent <= @@resource_proc_class
- parent.class_eval(body)
- eval(parent.name + '::' + klass)
- else
- eval(body)
- eval('TkOptionDB::' + klass)
- end
- end
-=end
- def __create_new_class(klass, func, safe = 4, add = false, parent = nil)
- if klass.kind_of?(TkWindow)
- carrier = klass.path
- CmdClassID.mutex.synchronize{
- klass = CmdClassID.join(TkCore::INTERP._ip_id_)
- CmdClassID[1].succ!
- }
- parent = nil # ignore parent
- else
- klass = klass.to_s if klass.kind_of?(Symbol)
- unless (?A..?Z) === klass[0]
- fail ArgumentError, "bad string '#{klass}' for class name"
- end
- if parent == nil
- install_win(nil)
- elsif parent.kind_of?(TkWindow)
- install_win(parent.path)
- elsif parent <= @@resource_proc_class
- install_win(parent::CARRIER)
- else
- fail ArgumentError, "parent must be Resource-Proc class"
- end
- carrier = Tk.tk_call_without_enc('frame', @path, '-class', klass)
- end
-
- unless func.kind_of?(Array)
- fail ArgumentError, "method-list must be Array"
- end
- func_str = func.join(' ')
-
- if parent.kind_of?(Class) && parent <= @@resource_proc_class
- cmd_klass = Class.new(parent)
- else
- cmd_klass = Class.new(TkOptionDB.module_eval('@@resource_proc_class'))
- end
- cmd_klass.const_set(:CARRIER, carrier.dup.freeze)
-
- cmd_klass.instance_variable_set('@method_tbl', TkCore::INTERP.create_table)
- cmd_klass.instance_variable_set('@add_method', add)
- cmd_klass.instance_variable_set('@safe_mode', safe)
- func.each{|f|
- cmd_klass.instance_variable_get('@method_tbl')[f.to_s.intern] = nil
- }
-=begin
- cmd_klass.const_set(:METHOD_TBL, TkCore::INTERP.create_table)
- cmd_klass.const_set(:ADD_METHOD, add)
- cmd_klass.const_set(:SAFE_MODE, safe)
- func.each{|f| cmd_klass::METHOD_TBL[f.to_s.intern] = nil }
-=end
-
- cmd_klass
- end
- module_function :__create_new_class
- private_class_method :__create_new_class
-
- def __remove_methods_of_proc_class(klass)
- # for security, make these methods invalid
- class << klass
- def __null_method(*args); nil; end
- [ :class_eval, :name, :superclass, :clone, :dup, :autoload, :autoload?,
- :ancestors, :const_defined?, :const_get, :const_set, :const_missing,
- :class_variables, :constants, :included_modules, :instance_methods,
- :method_defined?, :module_eval, :private_instance_methods,
- :protected_instance_methods, :public_instance_methods,
- :singleton_methods, :remove_const, :remove_method, :undef_method,
- :to_s, :inspect, :display, :method, :methods, :respond_to?,
- :instance_variable_get, :instance_variable_set, :instance_method,
- :instance_eval, :instance_exec, :instance_variables, :kind_of?, :is_a?,
- :private_methods, :protected_methods, :public_methods ].each{|m|
- alias_method(m, :__null_method)
- }
- end
- end
- module_function :__remove_methods_of_proc_class
- private_class_method :__remove_methods_of_proc_class
-
- RAND_BASE_CNT = [0]
- RAND_BASE_HEAD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- RAND_BASE_CHAR = RAND_BASE_HEAD + 'abcdefghijklmnopqrstuvwxyz0123456789_'
- def __get_random_basename
- name = '%s%03d' % [RAND_BASE_HEAD[rand(RAND_BASE_HEAD.size),1],
- RAND_BASE_CNT[0]]
- len = RAND_BASE_CHAR.size
- (6+rand(10)).times{
- name << RAND_BASE_CHAR[rand(len),1]
- }
- RAND_BASE_CNT[0] = RAND_BASE_CNT[0] + 1
- name
- end
- module_function :__get_random_basename
- private_class_method :__get_random_basename
-
- # define new proc class :
- # If you want to modify the new class or create a new subclass,
- # you must do such operation in the block parameter.
- # Because the created class is frozen after evaluating the block.
- def new_proc_class(klass, func, safe = 4, add = false, parent = nil, &b)
- new_klass = __create_new_class(klass, func, safe, add, parent)
- new_klass.class_eval(&b) if block_given?
- __remove_methods_of_proc_class(new_klass)
- new_klass.freeze
- new_klass
- end
- module_function :new_proc_class
-
- def eval_under_random_base(parent = nil, &b)
- new_klass = __create_new_class(__get_random_basename(),
- [], 4, false, parent)
- ret = new_klass.class_eval(&b) if block_given?
- __remove_methods_of_proc_class(new_klass)
- new_klass.freeze
- ret
- end
- module_function :eval_under_random_base
-
- def new_proc_class_random(klass, func, safe = 4, add = false, &b)
- eval_under_random_base(){
- TkOptionDB.new_proc_class(klass, func, safe, add, self, &b)
- }
- end
- module_function :new_proc_class_random
-end
-TkOption = TkOptionDB
-TkResourceDB = TkOptionDB
diff --git a/ext/tk/lib/tk/optionobj.rb b/ext/tk/lib/tk/optionobj.rb
deleted file mode 100644
index 4219e4be71..0000000000
--- a/ext/tk/lib/tk/optionobj.rb
+++ /dev/null
@@ -1,213 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/optionobj.rb : control options for a group of widgets
-#
-# NOTE: If you want to use key-only option (no value),
-# use Tk::None for the value of the key-only option.
-#
-# e.g. hash_kv({'aaa'=>1, 'bbb'=>Tk::None, 'ccc'=>3})
-# => ["-aaa", 1, "-bbb", "-ccc", 3]
-#
-require 'tk'
-
-module Tk
- class OptionObj < Hash
- include TkUtil
-
- def initialize(hash = nil)
- super()
- @observ = []
- update_without_notify(_symbolkey2str(hash)) if hash
- end
-
- def observ_info
- @observ.dup
- end
-
- def observs
- @observ.collect{|win|
- if win.kind_of?(Array)
- win[0]
- else
- win
- end
- }
- end
-
- def _remove_win(win)
- if win.kind_of?(Array)
- widget, method = win
- @observ.delete_if{|x|
- if x.kind_of?(Array)
- x[0] == widget
- else
- x == widget
- end
- }
- else
- @observ.delete_if{|x|
- if x.kind_of?(Array)
- x[0] == win
- else
- x == win
- end
- }
- end
- end
- private :_remove_win
-
- def assign(*wins)
- # win :=
- # widget #==> call widget.configure(hash)
- # [widget] #==> call widget.configure(hash)
- # [widget, nil, {src=>target, ... }]
- # #==> call widget.configure(hash)
- # with converting hash-key
- # [widget, method] #==> call widget.method(hash)
- # [widget, method, {src=>target, ... }]
- # #==> call widget.method(hash)
- # with converting hash-key
- # [widget [receiver, method, arg, ... ]]
- # #==> call receiver.method(arg, ... , hash)
- # [widget [receiver, method, arg, ... ], {src=>target, ... }]
- # #==> call receiver.method(arg, ... , hash)
- # with onverting hash-key
- #
- # src := option_name_on_optobj
- #
- # target :=
- # nil #==> not use the src
- # option_name_on_target_widget
- # [ option_name_on_target_widget, ... ]
- # #==> set all of them
- #
- wins.each{|win|
- _remove_win(win)
- @observ << win
- notify(win)
- }
- self
- end
-
- def unassign(*wins)
- wins.each{|win|
- _remove_win(win)
- }
- self
- end
-
- def notify(target = nil)
- if target
- targets = [target]
- elsif @observ.empty?
- return self
- else
- targets = @observ.dup
- end
-
- return self if empty?
-
- org_hash = _symbolkey2str(self)
-
- targets.each{|win|
- widget = receiver = win
- hash = org_hash
- begin
- if win.kind_of?(Array)
- widget, method, conv_tbl = win
- receiver = widget
-
- if conv_tbl
- hash = {}
- org_hash.each{|key, val|
- key = conv_tbl[key] if conv_tbl.key?(key)
- next unless key
- if key.kind_of?(Array)
- key.each{|k| hash[k] = val}
- else
- hash[key] = val
- end
- }
- end
-
- if method.kind_of?(Array)
- receiver, method, *args = method
- receiver.__send__(method, *(args << hash))
- elsif method
- widget.__send__(method, hash)
- else
- widget.configure(hash)
- end
-
- else
- widget.configure(self)
- end
- rescue => e
- if ( ( widget.kind_of?(TkObject) \
- && widget.respond_to?('exist?') \
- && ! receiver.exist? ) \
- || ( receiver.kind_of?(TkObject) \
- && receiver.respond_to?('exist?') \
- && ! receiver.exist? ) )
- @observ.delete(win)
- else
- fail e
- end
- end
- }
-
- self
- end
- alias apply notify
-
- def +(hash)
- unless hash.kind_of?(Hash)
- fail ArgumentError, "expect a Hash"
- end
- new_obj = self.dup
- new_obj.update_without_notify(_symbolkey2str(hash))
- new_obj
- end
-
- alias update_without_notify update
-
- def update(hash)
- update_without_notify(_symbolkey2str(hash))
- notify
- end
-
- def configure(key, value=nil)
- if key.kind_of?(Hash)
- update(key)
- else
- store(key,value)
- end
- end
-
- def [](key)
- super(key.to_s)
- end
- alias cget []
-
- def store(key, val)
- key = key.to_s
- super(key, val)
- notify
- end
- def []=(key, val)
- store(key,val)
- end
-
- def replace(hash)
- super(_symbolkey2str(hash))
- notify
- end
-
- def default(opt)
- fail RuntimeError, "unknown option `#{opt}'"
- end
- private :default
-
- undef :default=
- end
-end
diff --git a/ext/tk/lib/tk/pack.rb b/ext/tk/lib/tk/pack.rb
deleted file mode 100644
index 45926d4043..0000000000
--- a/ext/tk/lib/tk/pack.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/pack.rb : control pack geometry manager
-#
-require 'tk'
-
-module TkPack
- include Tk
- extend Tk
-
- TkCommandNames = ['pack'.freeze].freeze
-
-=begin
- def configure(win, *args)
- if args[-1].kind_of?(Hash)
- opts = args.pop
- else
- opts = {}
- end
- params = []
- # params.push((win.kind_of?(TkObject))? win.epath: win)
- params.push(_epath(win))
- args.each{|win|
- # params.push((win.kind_of?(TkObject))? win.epath: win)
- params.push(_epath(win))
- }
- opts.each{|k, v|
- params.push("-#{k}")
- # params.push((v.kind_of?(TkObject))? v.epath: v)
- params.push(_epath(v))
- }
- tk_call_without_enc("pack", 'configure', *params)
- end
-=end
- def configure(*args)
- if args[-1].kind_of?(Hash)
- opts = args.pop
- else
- opts = {}
- end
- fail ArgumentError, 'no widget is given' if args.empty?
- params = []
- args.flatten(1).each{|win| params.push(_epath(win))}
- opts.each{|k, v|
- params.push("-#{k}")
- params.push(_epath(v)) # have to use 'epath' (hash_kv() is unavailable)
- }
- tk_call_without_enc("pack", 'configure', *params)
- end
- alias pack configure
-
- def forget(*args)
- return '' if args.size == 0
- wins = args.collect{|win|
- # (win.kind_of?(TkObject))? win.epath: win
- _epath(win)
- }
- tk_call_without_enc('pack', 'forget', *wins)
- end
-
- def info(slave)
- # slave = slave.epath if slave.kind_of?(TkObject)
- slave = _epath(slave)
- ilist = list(tk_call_without_enc('pack', 'info', slave))
- info = {}
- while key = ilist.shift
- info[key[1..-1]] = ilist.shift
- end
- return info
- end
-
- def propagate(master, mode=None)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- if mode == None
- bool(tk_call_without_enc('pack', 'propagate', master))
- else
- tk_call_without_enc('pack', 'propagate', master, mode)
- end
- end
-
- def slaves(master)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- list(tk_call_without_enc('pack', 'slaves', master))
- end
-
- module_function :pack, :configure, :forget, :info, :propagate, :slaves
-end
-=begin
-def TkPack(win, *args)
- if args[-1].kind_of?(Hash)
- opts = args.pop
- else
- opts = {}
- end
- params = []
- params.push((win.kind_of?(TkObject))? win.epath: win)
- args.each{|win|
- params.push((win.kind_of?(TkObject))? win.epath: win)
- }
- opts.each{|k, v|
- params.push("-#{k}")
- params.push((v.kind_of?(TkObject))? v.epath: v)
- }
- tk_call_without_enc("pack", *params)
-end
-=end
diff --git a/ext/tk/lib/tk/package.rb b/ext/tk/lib/tk/package.rb
deleted file mode 100644
index fe6939c2d4..0000000000
--- a/ext/tk/lib/tk/package.rb
+++ /dev/null
@@ -1,144 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/package.rb : package command
-#
-require 'tk'
-
-module TkPackage
- include TkCore
- extend TkPackage
-
- TkCommandNames = ['package'.freeze].freeze
-
- def add_path(path)
- Tk::AUTO_PATH.value = Tk::AUTO_PATH.to_a << path
- end
-
- def forget(package)
- tk_call('package', 'forget', package)
- nil
- end
-
- def if_needed(pkg, ver, *arg, &b)
- size = arg.size
-
- if size==0 && !b
- # proc info
- procedure(tk_call('package', 'ifneeded', pkg, ver))
-
- elsif size==0 && b
- # set proc
- cmd = proc(&b)
- tk_call('package', 'ifneeded', pkg, ver, cmd)
- cmd
-
- elsif size==1 && !b
- # set proc
- cmd = arg[0]
- if cmd
- tk_call('package', 'ifneeded', pkg, ver, cmd)
- cmd
- else
- # remove proc
- tk_call('package', 'ifneeded', pkg, ver, '')
- nil
- end
-
- else
- fail ArgumentError, 'too many arguments'
- end
- end
-
- def names
- tk_split_simplelist(tk_call('package', 'names'))
- end
-
- def provide(package, version=nil)
- if version
- tk_call('package', 'provide', package, version)
- end
- if (ret = tk_call('package', 'provide', package)) == ''
- nil
- else
- ret
- end
- end
-
- def present(package, version=None)
- begin
- tk_call('package', 'present', package, version)
- rescue => e
- fail e.class, 'TkPackage ' << e.message
- end
- end
-
- def present_exact(package, version)
- begin
- tk_call('package', 'present', '-exact', package, version)
- rescue => e
- fail e.class, 'TkPackage ' << e.message
- end
- end
-
- def require(package, version=None)
- begin
- tk_call('package', 'require', package, version)
- rescue => e
- fail e.class, 'TkPackage ' << e.message
- end
- end
-
- def require_exact(package, version)
- begin
- tk_call('package', 'require', '-exact', package, version)
- rescue => e
- fail e.class, 'TkPackage ' << e.message
- end
- end
-
- def unknown_proc(*arg, &b)
- size = arg.size
-
- if size==0 && !b
- # proc info
- procedure(tk_call('package', 'unknown'))
-
- elsif size==0 && b
- # set proc
- cmd = proc(&b)
- tk_call('package', 'unknown', cmd)
- cmd
-
- elsif size==1 && !b
- # set proc
- cmd = arg[0]
- if cmd
- tk_call('package', 'unknown', cmd)
- cmd
- else
- # remove proc
- tk_call('package', 'unknown', '')
- nil
- end
-
- else
- fail ArgumentError, 'too many arguments'
- end
- end
-
- def versions(package)
- tk_split_simplelist(tk_call('package', 'versions', package))
- end
-
- def vcompare(version1, version2)
- number(tk_call('package', 'vcompare', version1, version2))
- end
-
- def vsatisfies(version1, version2)
- bool(tk_call('package', 'vsatisfies', version1, version2))
- end
-
- def prefer(setting = None)
- tk_call('package', 'prefer', setting)
- end
-end
diff --git a/ext/tk/lib/tk/palette.rb b/ext/tk/lib/tk/palette.rb
deleted file mode 100644
index e118e8dbe5..0000000000
--- a/ext/tk/lib/tk/palette.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/palette.rb : methods for Tcl/Tk standard library 'palette.tcl'
-# 1998/06/21 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
-#
-require 'tk'
-
-module TkPalette
- include Tk
- extend Tk
-
- TkCommandNames = [
- 'tk_setPalette'.freeze,
- 'tk_bisque'.freeze,
- 'tkDarken'.freeze
- ].freeze
-
- def TkPalette.set(*args)
- args = args[0].to_a.flatten if args[0].kind_of? Hash
- tk_call('tk_setPalette', *args)
- end
- def TkPalette.setPalette(*args)
- TkPalette.set(*args)
- end
-
- def TkPalette.bisque
- tk_call('tk_bisque')
- end
-
- def TkPalette.darken(color, percent)
- tk_call('tkDarken', color, percent)
- end
-
- def TkPalette.recolorTree(win, colors)
- if not colors.kind_of?(Hash)
- fail "2nd arg need to be Hash"
- end
-
- tk_call('global', "tkPalette")
- colors.each{|key, value|
- begin
- if win.cget(key) == tk_call('set', "tkPalette(#{key})")
- win[key] = colors[key]
- end
- rescue
- # ignore
- end
- }
-
- TkWinfo.children(win).each{|w| TkPalette.recolorTree(w, colors)}
- end
-
- def recolorTree(colors)
- TkPalette.recolorTree(self, colors)
- end
-end
diff --git a/ext/tk/lib/tk/panedwindow.rb b/ext/tk/lib/tk/panedwindow.rb
deleted file mode 100644
index 285292f018..0000000000
--- a/ext/tk/lib/tk/panedwindow.rb
+++ /dev/null
@@ -1,261 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/panedwindow.rb : treat panedwindow
-#
-require 'tk'
-
-class Tk::PanedWindow<TkWindow
- TkCommandNames = ['panedwindow'.freeze].freeze
- WidgetClassName = 'Panedwindow'.freeze
- WidgetClassNames[WidgetClassName] ||= self
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('panedwindow', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('panedwindow', @path)
- # end
- #end
- #private :create_self
-
- def add(*args)
- keys = args.pop
- fail ArgumentError, "no window in arguments" unless keys
- if keys && keys.kind_of?(Hash)
- fail ArgumentError, "no window in arguments" if args == []
- # args = args.collect{|w| (w.kind_of?(TkObject))? w.epath: w }
- args = args.collect{|w| _epath(w) }
- #args.push(hash_kv(keys))
- args.concat(hash_kv(keys))
- else
- args.push(keys) if keys
- # args = args.collect{|w| (w.kind_of?(TkObject))? w.epath: w }
- args = args.collect{|w| _epath(w) }
- end
- tk_send_without_enc('add', *args)
- self
- end
-
- def forget(win, *wins)
- wins.unshift(win)
- # tk_send_without_enc('forget', *((w.kind_of?(TkObject))? w.epath: w))
- tk_send_without_enc('forget', *(wins.collect{|w| _epath(w)}))
- self
- end
- alias del forget
- alias delete forget
- alias remove forget
-
- def identify(x, y)
- list(tk_send_without_enc('identify', x, y))
- end
-
- def proxy_coord
- list(tk_send_without_enc('proxy', 'coord'))
- end
- def proxy_forget
- tk_send_without_enc('proxy', 'forget')
- self
- end
- def proxy_place(x, y)
- tk_send_without_enc('proxy', 'place', x, y)
- self
- end
-
- def sash_coord(index)
- list(tk_send('sash', 'coord', index))
- end
- def sash_dragto(index, x, y)
- tk_send('sash', 'dragto', index, x, y)
- self
- end
- def sash_mark(index, x, y)
- tk_send('sash', 'mark', index, x, y)
- self
- end
- def sash_place(index, x, y)
- tk_send('sash', 'place', index, x, y)
- self
- end
-
- def panecget_strict(win, key)
- # win = win.epath if win.kind_of?(TkObject)
- win = _epath(win)
- tk_tcl2ruby(tk_send_without_enc('panecget', win, "-#{key}"))
- end
- def panecget(win, key)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- panecget_strict(win, key)
- else
- begin
- panecget_strict(win, key)
- rescue => e
- begin
- if current_paneconfiginfo(win).has_key?(option.to_s)
- # not tag error & option is known -> error on known option
- fail e
- else
- # not tag error & option is unknown
- nil
- end
- rescue
- fail e # tag error
- end
- end
- end
- end
-
- def paneconfigure(win, key, value=nil)
- # win = win.epath if win.kind_of?(TkObject)
- win = _epath(win)
- if key.kind_of? Hash
- params = []
- key.each{|k, v|
- params.push("-#{k}")
- # params.push((v.kind_of?(TkObject))? v.epath: v)
- params.push(_epath(v))
- }
- tk_send_without_enc('paneconfigure', win, *params)
- else
- # value = value.epath if value.kind_of?(TkObject)
- value = _epath(value)
- tk_send_without_enc('paneconfigure', win, "-#{key}", value)
- end
- self
- end
- alias pane_config paneconfigure
-
- def paneconfiginfo(win, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- # win = win.epath if win.kind_of?(TkObject)
- win = _epath(win)
- if key
- #conf = tk_split_list(tk_send_without_enc('paneconfigure',
- # win, "-#{key}"))
- conf = tk_split_list(tk_send_without_enc('paneconfigure',
- win, "-#{key}"),
- false, true)
- conf[0] = conf[0][1..-1]
- if conf[0] == 'hide'
- conf[3] = bool(conf[3]) unless conf[3].empty?
- conf[4] = bool(conf[4]) unless conf[4].empty?
- end
- conf
- else
- #tk_split_simplelist(tk_send_without_enc('paneconfigure',
- # win)).collect{|conflist|
- # conf = tk_split_simplelist(conflist)
- tk_split_simplelist(tk_send_without_enc('paneconfigure', win),
- false, false).collect{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- conf[0] = conf[0][1..-1]
- if conf[3]
- if conf[0] == 'hide'
- conf[3] = bool(conf[3]) unless conf[3].empty?
- elsif conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf[4]
- if conf[0] == 'hide'
- conf[4] = bool(conf[4]) unless conf[4].empty?
- elsif conf[4].index('{')
- conf[4] = tk_split_list(conf[4])
- else
- conf[4] = tk_tcl2ruby(conf[4])
- end
- end
- conf[1] = conf[1][1..-1] if conf.size == 2 # alias info
- conf
- }
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- # win = win.epath if win.kind_of?(TkObject)
- win = _epath(win)
- if key
- #conf = tk_split_list(tk_send_without_enc('paneconfigure',
- # win, "-#{key}"))
- conf = tk_split_list(tk_send_without_enc('paneconfigure',
- win, "-#{key}"),
- false, true)
- key = conf.shift[1..-1]
- if key == 'hide'
- conf[2] = bool(conf[2]) unless conf[2].empty?
- conf[3] = bool(conf[3]) unless conf[3].empty?
- end
- { key => conf }
- else
- ret = {}
- #tk_split_simplelist(tk_send_without_enc('paneconfigure',
- # win)).each{|conflist|
- # conf = tk_split_simplelist(conflist)
- tk_split_simplelist(tk_send_without_enc('paneconfigure', win),
- false, false).each{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- key = conf.shift[1..-1]
- if key
- if key == 'hide'
- conf[2] = bool(conf[2]) unless conf[2].empty?
- elsif conf[2].index('{')
- conf[2] = tk_split_list(conf[2])
- else
- conf[2] = tk_tcl2ruby(conf[2])
- end
- end
- if conf[3]
- if key == 'hide'
- conf[3] = bool(conf[3]) unless conf[3].empty?
- elsif conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf.size == 1
- ret[key] = conf[0][1..-1] # alias info
- else
- ret[key] = conf
- end
- }
- ret
- end
- end
- end
- alias pane_configinfo paneconfiginfo
-
- def current_paneconfiginfo(win, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- conf = paneconfiginfo(win, key)
- {conf[0] => conf[4]}
- else
- ret = {}
- paneconfiginfo(win).each{|conf|
- ret[conf[0]] = conf[4] if conf.size > 2
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- paneconfiginfo(win, key).each{|k, conf|
- ret[k] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-
- alias current_pane_configinfo current_paneconfiginfo
-
- def panes
- list(tk_send_without_enc('panes'))
- end
-end
-
-Tk::Panedwindow = Tk::PanedWindow
-#TkPanedWindow = Tk::PanedWindow unless Object.const_defined? :TkPanedWindow
-#TkPanedwindow = Tk::Panedwindow unless Object.const_defined? :TkPanedwindow
-#Tk.__set_toplevel_aliases__(:Tk, Tk::PanedWindow,
-# :TkPanedWindow, :TkPanedwindow)
-Tk.__set_loaded_toplevel_aliases__('tk/panedwindow.rb', :Tk, Tk::PanedWindow,
- :TkPanedWindow, :TkPanedwindow)
diff --git a/ext/tk/lib/tk/place.rb b/ext/tk/lib/tk/place.rb
deleted file mode 100644
index efda36df5e..0000000000
--- a/ext/tk/lib/tk/place.rb
+++ /dev/null
@@ -1,129 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/place.rb : control place geometry manager
-#
-require 'tk'
-
-module TkPlace
- include Tk
- extend Tk
-
- TkCommandNames = ['place'.freeze].freeze
-
- def configure(win, slot, value=None)
- # for >= Tk8.4a2 ?
- # win = win.epath if win.kind_of?(TkObject)
- win = _epath(win)
- if slot.kind_of? Hash
- params = []
- slot.each{|k, v|
- params.push("-#{k}")
- # params.push((v.kind_of?(TkObject))? v.epath: v)
- params.push(_epath(v))
- }
- tk_call_without_enc('place', 'configure', win, *params)
- else
- # value = value.epath if value.kind_of?(TkObject)
- value = _epath(value)
- tk_call_without_enc('place', 'configure', win, "-#{slot}", value)
- end
- end
- alias place configure
-
- def configinfo(win, slot = nil)
- # for >= Tk8.4a2 ?
- if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- # win = win.epath if win.kind_of?(TkObject)
- win = _epath(win)
- if slot
- #conf = tk_split_list(tk_call_without_enc('place', 'configure',
- # win, "-#{slot}") )
- conf = tk_split_simplelist(tk_call_without_enc('place', 'configure',
- win, "-#{slot}") )
- conf[0] = conf[0][1..-1]
- conf[1] = tk_tcl2ruby(conf[1])
- conf[2] = tk_tcl2ruby(conf[1])
- conf[3] = tk_tcl2ruby(conf[1])
- conf[4] = tk_tcl2ruby(conf[1])
- conf
- else
- tk_split_simplelist(tk_call_without_enc('place', 'configure',
- win)).collect{|conflist|
- #conf = list(conflist)
- conf = simplelist(conflist).collect!{|inf| tk_tcl2ruby(inf)}
- conf[0] = conf[0][1..-1]
- conf
- }
- end
- else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- current_configinfo(win, slot)
- end
- end
-
- def current_configinfo(win, slot = nil)
- # win = win.epath if win.kind_of?(TkObject)
- win = _epath(win)
- if slot
- #conf = tk_split_list(tk_call_without_enc('place', 'configure',
- # win, "-#{slot}") )
- conf = tk_split_simplelist(tk_call_without_enc('place', 'configure',
- win, "-#{slot}") )
- # { conf[0][1..-1] => conf[1] }
- { conf[0][1..-1] => tk_tcl2ruby(conf[4]) }
- else
- ret = {}
- #tk_split_list(tk_call_without_enc('place','configure',win)).each{|conf|
- tk_split_simplelist(tk_call_without_enc('place', 'configure',
- win)).each{|conf_list|
- #ret[conf[0][1..-1]] = conf[1]
- conf = simplelist(conf_list)
- ret[conf[0][1..-1]] = tk_tcl2ruby(conf[4])
- }
- ret
- end
- end
-
- def forget(win)
- # win = win.epath if win.kind_of?(TkObject)
- win = _epath(win)
- tk_call_without_enc('place', 'forget', win)
- end
-
- def info(win)
- # win = win.epath if win.kind_of?(TkObject)
- win = _epath(win)
- #ilist = list(tk_call_without_enc('place', 'info', win))
- ilist = simplelist(tk_call_without_enc('place', 'info', win))
- info = {}
- while key = ilist.shift
- #info[key[1..-1]] = ilist.shift
- info[key[1..-1]] = tk_tcl2ruby(ilist.shift)
- end
- return info
- end
-
- def slaves(master)
- # master = master.epath if master.kind_of?(TkObject)
- master = _epath(master)
- list(tk_call('place', 'slaves', master))
- end
-
- module_function :place, :configure, :configinfo, :current_configinfo
- module_function :forget, :info, :slaves
-end
-=begin
-def TkPlace(win, slot, value=None)
- win = win.epath if win.kind_of?(TkObject)
- if slot.kind_of? Hash
- params = []
- slot.each{|k, v|
- params.push("-#{k}")
- params.push((v.kind_of?(TkObject))? v.epath: v)
- }
- tk_call_without_enc('place', win, *params)
- else
- value = value.epath if value.kind_of?(TkObject)
- tk_call_without_enc('place', win, "-#{slot}", value)
- end
-end
-=end
diff --git a/ext/tk/lib/tk/radiobutton.rb b/ext/tk/lib/tk/radiobutton.rb
deleted file mode 100644
index b0858df2b4..0000000000
--- a/ext/tk/lib/tk/radiobutton.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/radiobutton.rb : treat radiobutton widget
-#
-require 'tk'
-require 'tk/button'
-
-class Tk::RadioButton<Tk::Button
- TkCommandNames = ['radiobutton'.freeze].freeze
- WidgetClassName = 'Radiobutton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('radiobutton', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('radiobutton', @path)
- # end
- #end
- #private :create_self
-
- def __boolval_optkeys
- super() << 'indicatoron'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'selectcolor'
- end
- private :__strval_optkeys
-
- def __ruby2val_optkeys # { key=>proc, ... }
- {
- 'variable'=>proc{|v| tk_trace_variable(v)} # for backward compatibility
- }
- end
- private :__ruby2val_optkeys
-
-
- def deselect
- tk_send_without_enc('deselect')
- self
- end
- def select
- tk_send_without_enc('select')
- self
- end
-
- def get_value
- var = tk_send_without_enc('cget', '-variable')
- if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS
- _fromUTF8(INTERP._get_global_var(var))
- else
- INTERP._eval(Kernel.format('global %s; set %s', var, var))
- end
- end
-
- def set_value(val)
- var = tk_send_without_enc('cget', '-variable')
- if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS
- _fromUTF8(INTERP._set_global_var(var, _get_eval_string(val, true)))
- else
- s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
- INTERP._eval(Kernel.format('global %s; set %s %s', var, var, s))
- end
- end
-end
-
-Tk::Radiobutton = Tk::RadioButton
-#TkRadioButton = Tk::RadioButton unless Object.const_defined? :TkRadioButton
-#TkRadiobutton = Tk::Radiobutton unless Object.const_defined? :TkRadiobutton
-#Tk.__set_toplevel_aliases__(:Tk, Tk::RadioButton,
-# :TkRadioButton, :TkRadiobutton)
-Tk.__set_loaded_toplevel_aliases__('tk/radiobutton.rb', :Tk, Tk::RadioButton,
- :TkRadioButton, :TkRadiobutton)
diff --git a/ext/tk/lib/tk/root.rb b/ext/tk/lib/tk/root.rb
deleted file mode 100644
index b92732fd7d..0000000000
--- a/ext/tk/lib/tk/root.rb
+++ /dev/null
@@ -1,96 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/root.rb : treat root widget
-#
-require 'tk'
-require 'tk/wm'
-require 'tk/menuspec'
-
-class Tk::Root<TkWindow
- include Wm
- include TkMenuSpec
-
- def __methodcall_optkeys # { key=>method, ... }
- TOPLEVEL_METHODCALL_OPTKEYS
- end
- private :__methodcall_optkeys
-
- def Root.new(keys=nil, &b)
- unless TkCore::INTERP.tk_windows['.']
- TkCore::INTERP.tk_windows['.'] =
- super(:without_creating=>true, :widgetname=>'.'){}
- end
- root = TkCore::INTERP.tk_windows['.']
-
- keys = _symbolkey2str(keys)
-
- # wm commands
- root.instance_eval{
- __methodcall_optkeys.each{|key, method|
- value = keys.delete(key.to_s)
- self.__send__(method, value) if value
- }
- }
-
- if keys # wm commands ( for backward compatibility )
- keys.each{|k,v|
- if v.kind_of? Array
- root.__send__(k,*v)
- else
- root.__send__(k,v)
- end
- }
- end
-
- if block_given?
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- root.instance_exec(root, &b)
- else
- root.instance_eval(&b)
- end
- end
- root
- end
-
- WidgetClassName = 'Tk'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.to_eval
- # self::WidgetClassName
- '.'
- end
-
- def create_self
- @path = '.'
- end
- private :create_self
-
- def path
- "."
- end
-
- def add_menu(menu_info, tearoff=false, opts=nil)
- # See tk/menuspec.rb for menu_info.
- # opts is a hash of default configs for all of cascade menus.
- # Configs of menu_info can override it.
- if tearoff.kind_of?(Hash)
- opts = tearoff
- tearoff = false
- end
- _create_menubutton(self, menu_info, tearoff, opts)
- end
-
- def add_menubar(menu_spec, tearoff=false, opts=nil)
- # See tk/menuspec.rb for menu_spec.
- # opts is a hash of default configs for all of cascade menus.
- # Configs of menu_spec can override it.
- menu_spec.each{|info| add_menu(info, tearoff, opts)}
- self.menu
- end
-
- def Root.destroy
- TkCore::INTERP._invoke('destroy', '.')
- end
-end
-
-TkRoot = Tk::Root unless Object.const_defined? :TkRoot
diff --git a/ext/tk/lib/tk/scale.rb b/ext/tk/lib/tk/scale.rb
deleted file mode 100644
index f6f60e3c25..0000000000
--- a/ext/tk/lib/tk/scale.rb
+++ /dev/null
@@ -1,113 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/scale.rb : treat scale widget
-#
-require 'tk'
-
-class Tk::Scale<TkWindow
- TkCommandNames = ['scale'.freeze].freeze
- WidgetClassName = 'Scale'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def create_self(keys)
- if keys and keys != None
- if keys.key?('command') && ! keys['command'].kind_of?(String)
- cmd = keys.delete('command')
- keys['command'] = proc{|val| cmd.call(val.to_f)}
- end
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- #tk_call_without_enc('scale', @path, *hash_kv(keys, true))
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- begin
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- rescue
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- keys = __check_available_configure_options(keys)
- unless keys.empty?
- begin
- tk_call_without_enc('destroy', @path)
- rescue
- # cannot destroy
- configure(keys)
- else
- # re-create widget
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- end
- end
- end
- end
- else
- #tk_call_without_enc('scale', @path)
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def __strval_optkeys
- super() << 'label'
- end
- private :__strval_optkeys
-
- def _wrap_command_arg(cmd)
- proc{|val|
- if val.kind_of?(String)
- cmd.call(number(val))
- else
- cmd.call(val)
- end
- }
- end
- private :_wrap_command_arg
-
- def configure_cmd(slot, value)
- configure(slot=>value)
- end
-
- def configure(slot, value=None)
- if (slot == 'command' || slot == :command)
- configure('command'=>value)
- elsif slot.kind_of?(Hash) &&
- (slot.key?('command') || slot.key?(:command))
- slot = _symbolkey2str(slot)
- slot['command'] = _wrap_command_arg(slot.delete('command'))
- end
- super(slot, value)
- end
-
- def command(cmd=Proc.new)
- configure('command'=>cmd)
- end
-
- def get(x=None, y=None)
- number(tk_send_without_enc('get', x, y))
- end
-
- def coords(val=None)
- tk_split_list(tk_send_without_enc('coords', val))
- end
-
- def identify(x, y)
- tk_send_without_enc('identify', x, y)
- end
-
- def set(val)
- tk_send_without_enc('set', val)
- end
-
- def value
- get
- end
-
- def value= (val)
- set(val)
- val
- end
-end
-
-#TkScale = Tk::Scale unless Object.const_defined? :TkScale
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Scale, :TkScale)
-Tk.__set_loaded_toplevel_aliases__('tk/scale.rb', :Tk, Tk::Scale, :TkScale)
diff --git a/ext/tk/lib/tk/scrollable.rb b/ext/tk/lib/tk/scrollable.rb
deleted file mode 100644
index e9b4a93d6d..0000000000
--- a/ext/tk/lib/tk/scrollable.rb
+++ /dev/null
@@ -1,83 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/scrollable.rb : module for scrollable widget
-#
-require 'tk'
-
-module Tk
- module XScrollable
- def xscrollcommand(cmd=Proc.new)
- configure_cmd 'xscrollcommand', cmd
- # Tk.update # avoid scrollbar trouble
- self
- end
-
- def xview(*index)
- if index.size == 0
- list(tk_send_without_enc('xview'))
- else
- tk_send_without_enc('xview', *index)
- self
- end
- end
- def xview_moveto(*index)
- xview('moveto', *index)
- end
- def xview_scroll(*index)
- xview('scroll', *index)
- end
-
- def xscrollbar(bar=nil)
- if bar
- @xscrollbar = bar
- @xscrollbar.orient 'horizontal'
- self.xscrollcommand {|*arg| @xscrollbar.set(*arg)}
- @xscrollbar.command {|*arg| self.xview(*arg)}
- Tk.update # avoid scrollbar trouble
- end
- @xscrollbar
- end
- end
-
- module YScrollable
- def yscrollcommand(cmd=Proc.new)
- configure_cmd 'yscrollcommand', cmd
- # Tk.update # avoid scrollbar trouble
- self
- end
-
- def yview(*index)
- if index.size == 0
- list(tk_send_without_enc('yview'))
- else
- tk_send_without_enc('yview', *index)
- self
- end
- end
- def yview_moveto(*index)
- yview('moveto', *index)
- end
- def yview_scroll(*index)
- yview('scroll', *index)
- end
-
- def yscrollbar(bar=nil)
- if bar
- @yscrollbar = bar
- @yscrollbar.orient 'vertical'
- self.yscrollcommand {|*arg| @yscrollbar.set(*arg)}
- @yscrollbar.command {|*arg| self.yview(*arg)}
- Tk.update # avoid scrollbar trouble
- end
- @yscrollbar
- end
- end
-
- X_Scrollable = XScrollable
- Y_Scrollable = YScrollable
-
- module Scrollable
- include XScrollable
- include YScrollable
- end
-end
diff --git a/ext/tk/lib/tk/scrollbar.rb b/ext/tk/lib/tk/scrollbar.rb
deleted file mode 100644
index c16ed38756..0000000000
--- a/ext/tk/lib/tk/scrollbar.rb
+++ /dev/null
@@ -1,184 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/scrollbar.rb : treat scrollbar widget
-#
-require 'tk'
-
-class Tk::Scrollbar<TkWindow
- TkCommandNames = ['scrollbar'.freeze].freeze
- WidgetClassName = 'Scrollbar'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def create_self(keys)
- @assigned = []
- @scroll_proc = proc{|*args|
- if self.orient == 'horizontal'
- @assigned.each{|w| w.xview(*args)}
- else # 'vertical'
- @assigned.each{|w| w.yview(*args)}
- end
- }
-
- if keys and keys != None
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- #tk_call_without_enc('scrollbar', @path, *hash_kv(keys, true))
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- begin
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- rescue
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- keys = __check_available_configure_options(keys)
- unless keys.empty?
- begin
- tk_call_without_enc('destroy', @path)
- rescue
- # cannot destroy
- configure(keys)
- else
- # re-create widget
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- end
- end
- end
- end
- else
- #tk_call_without_enc('scrollbar', @path)
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def propagate_set(src_win, first, last)
- self.set(first, last)
- if self.orient == 'horizontal'
- @assigned.each{|w| w.xview('moveto', first) if w != src_win}
- else # 'vertical'
- @assigned.each{|w| w.yview('moveto', first) if w != src_win}
- end
- end
-
- def assign(*wins)
- begin
- self.command(@scroll_proc) if self.cget('command').cmd != @scroll_proc
- rescue Exception
- self.command(@scroll_proc)
- end
- orient = self.orient
- wins.each{|w|
- @assigned << w unless @assigned.index(w)
- if orient == 'horizontal'
- w.xscrollcommand proc{|first, last| self.propagate_set(w, first, last)}
- else # 'vertical'
- w.yscrollcommand proc{|first, last| self.propagate_set(w, first, last)}
- end
- }
- Tk.update # avoid scrollbar trouble
- self
- end
-
- def assigned_list
- begin
- return @assigned.dup if self.cget('command').cmd == @scroll_proc
- rescue Exception
- end
- fail RuntimeError, "not depend on the assigned_list"
- end
-
- def configure(*args)
- ret = super(*args)
- # Tk.update # avoid scrollbar trouble
- ret
- end
-
- #def delta(deltax=None, deltay=None)
- def delta(deltax, deltay)
- number(tk_send_without_enc('delta', deltax, deltay))
- end
-
- #def fraction(x=None, y=None)
- def fraction(x, y)
- number(tk_send_without_enc('fraction', x, y))
- end
-
- def identify(x, y)
- tk_send_without_enc('identify', x, y)
- end
-
- def get
- #ary1 = tk_send('get').split
- #ary2 = []
- #for i in ary1
- # ary2.push number(i)
- #end
- #ary2
- list(tk_send_without_enc('get'))
- end
-
- def set(first, last)
- tk_send_without_enc('set', first, last)
- self
- end
-
- def activate(element=None)
- tk_send_without_enc('activate', element)
- end
-
- def moveto(fraction)
- tk_send_without_enc('moveto', fraction)
- self
- end
-
- def scroll(*args)
- tk_send_without_enc('scroll', *args)
- self
- end
-
- def scroll_units(num)
- scroll(num, 'units')
- self
- end
-
- def scroll_pages(num)
- scroll(num, 'pages')
- self
- end
-end
-
-#TkScrollbar = Tk::Scrollbar unless Object.const_defined? :TkScrollbar
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Scrollbar, :TkScrollbar)
-Tk.__set_loaded_toplevel_aliases__('tk/scrollbar.rb', :Tk, Tk::Scrollbar,
- :TkScrollbar)
-
-
-class Tk::XScrollbar<Tk::Scrollbar
- def create_self(keys)
- keys = {} unless keys
- keys['orient'] = 'horizontal'
- super(keys)
- end
- private :create_self
-end
-
-#TkXScrollbar = Tk::XScrollbar unless Object.const_defined? :TkXScrollbar
-#Tk.__set_toplevel_aliases__(:Tk, Tk::XScrollbar, :TkXScrollbar)
-Tk.__set_loaded_toplevel_aliases__('tk/scrollbar.rb', :Tk, Tk::XScrollbar,
- :TkXScrollbar)
-
-
-class Tk::YScrollbar<Tk::Scrollbar
- def create_self(keys)
- keys = {} unless keys
- keys['orient'] = 'vertical'
- super(keys)
- end
- private :create_self
-end
-
-#TkYScrollbar = Tk::YScrollbar unless Object.const_defined? :TkYScrollbar
-#Tk.__set_toplevel_aliases__(:Tk, Tk::YScrollbar, :TkYScrollbar)
-Tk.__set_loaded_toplevel_aliases__('tk/scrollbar.rb', :Tk, Tk::YScrollbar,
- :TkYScrollbar)
diff --git a/ext/tk/lib/tk/scrollbox.rb b/ext/tk/lib/tk/scrollbox.rb
deleted file mode 100644
index a470765d7c..0000000000
--- a/ext/tk/lib/tk/scrollbox.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/scrollbox.rb - Tk Listbox with Scrollbar
-# as an example of Composite Widget
-# by Yukihiro Matsumoto <matz@netlab.co.jp>
-#
-require 'tk'
-require 'tk/listbox'
-
-class TkScrollbox<Tk::Listbox
- include TkComposite
- def initialize_composite(keys=nil)
- #list = Tk::Listbox.new(@frame)
- # -> use current TkListbox class
- list = TkListbox.new(@frame)
- #scroll = Tk::Scrollbar.new(@frame)
- # -> use current TkScrollbar class
- scroll = TkScrollbar.new(@frame)
- @path = list.path
-
-=begin
- list.configure 'yscroll', scroll.path+" set"
- list.pack 'side'=>'left','fill'=>'both','expand'=>'yes'
- scroll.configure 'command', list.path+" yview"
- scroll.pack 'side'=>'right','fill'=>'y'
-=end
- list.yscrollbar(scroll)
- list.pack('side'=>'left','fill'=>'both','expand'=>'yes')
- scroll.pack('side'=>'right','fill'=>'y')
-
- delegate('DEFAULT', list)
- delegate('foreground', list)
- delegate('background', list, scroll)
- delegate('borderwidth', @frame)
- delegate('relief', @frame)
-
- configure keys if keys
- end
- private :initialize_composite
-end
diff --git a/ext/tk/lib/tk/selection.rb b/ext/tk/lib/tk/selection.rb
deleted file mode 100644
index 085d8b2d2d..0000000000
--- a/ext/tk/lib/tk/selection.rb
+++ /dev/null
@@ -1,87 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/selection.rb : control selection
-#
-require 'tk'
-
-module TkSelection
- include Tk
- extend Tk
-
- TkCommandNames = ['selection'.freeze].freeze
-
- def self.clear(sel=nil)
- if sel
- tk_call_without_enc('selection', 'clear', '-selection', sel)
- else
- tk_call_without_enc('selection', 'clear')
- end
- end
- def self.clear_on_display(win, sel=nil)
- if sel
- tk_call_without_enc('selection', 'clear',
- '-displayof', win, '-selection', sel)
- else
- tk_call_without_enc('selection', 'clear', '-displayof', win)
- end
- end
- def clear(sel=nil)
- TkSelection.clear_on_display(self, sel)
- self
- end
-
- def self.get(keys=nil)
- #tk_call('selection', 'get', *hash_kv(keys))
- _fromUTF8(tk_call_without_enc('selection', 'get', *hash_kv(keys)))
- end
- def self.get_on_display(win, keys=nil)
- #tk_call('selection', 'get', '-displayof', win, *hash_kv(keys))
- _fromUTF8(tk_call_without_enc('selection', 'get', '-displayof',
- win, *hash_kv(keys)))
- end
- def get(keys=nil)
- TkSelection.get_on_display(self, sel)
- end
-
- def self.handle(win, func=Proc.new, keys=nil, &b)
- if func.kind_of?(Hash) && keys == nil
- keys = func
- func = Proc.new(&b)
- end
- args = ['selection', 'handle']
- args.concat(hash_kv(keys))
- args.concat([win, func])
- tk_call_without_enc(*args)
- end
- def handle(func=Proc.new, keys=nil, &b)
- TkSelection.handle(self, func, keys, &b)
- end
-
- def self.get_owner(sel=nil)
- if sel
- window(tk_call_without_enc('selection', 'own', '-selection', sel))
- else
- window(tk_call_without_enc('selection', 'own'))
- end
- end
- def self.get_owner_on_display(win, sel=nil)
- if sel
- window(tk_call_without_enc('selection', 'own',
- '-displayof', win, '-selection', sel))
- else
- window(tk_call_without_enc('selection', 'own', '-displayof', win))
- end
- end
- def get_owner(sel=nil)
- TkSelection.get_owner_on_display(self, sel)
- self
- end
-
- def self.set_owner(win, keys=nil)
- tk_call_without_enc('selection', 'own', *(hash_kv(keys) << win))
- end
- def set_owner(keys=nil)
- TkSelection.set_owner(self, keys)
- self
- end
-end
diff --git a/ext/tk/lib/tk/spinbox.rb b/ext/tk/lib/tk/spinbox.rb
deleted file mode 100644
index 4be41c4266..0000000000
--- a/ext/tk/lib/tk/spinbox.rb
+++ /dev/null
@@ -1,145 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/spinbox.rb - Tk spinbox classes
-# by Yukihiro Matsumoto <matz@caelum.co.jp>
-#
-require 'tk'
-require 'tk/entry'
-
-class Tk::Spinbox<Tk::Entry
- TkCommandNames = ['spinbox'.freeze].freeze
- WidgetClassName = 'Spinbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- class SpinCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?d, ?s, :direction ],
- [ ?s, ?e, :current ],
- [ ?W, ?w, :widget ],
- nil
- ]
-
- PROC_TBL = [
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
-
- [ ?e, proc{|val|
- #enc = Tk.encoding
- enc = ((Tk.encoding)? Tk.encoding : Tk.encoding_system)
- if enc
- Tk.fromUTF8(TkComm::string(val), enc)
- else
- TkComm::string(val)
- end
- }
- ],
-
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- (val)? '1': '0'
- end
- end
-
- def self._config_keys
- ['command']
- end
- end
-
- def __validation_class_list
- super() << SpinCommand
- end
-
- Tk::ValidateConfigure.__def_validcmd(binding, SpinCommand)
-
- #def create_self(keys)
- # tk_call_without_enc('spinbox', @path)
- # if keys and keys != None
- # configure(keys)
- # end
- #end
- #private :create_self
-
- def __boolval_optkeys
- super() << 'wrap'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'buttonbackground' << 'format'
- end
- private :__strval_optkeys
-
- def __listval_optkeys
- super() << 'values'
- end
- private :__listval_optkeys
-
- def identify(x, y)
- tk_send_without_enc('identify', x, y)
- end
-
- def invoke(elem)
- tk_send_without_enc('invoke', elem)
- self
- end
-
- def spinup
- begin
- tk_send_without_enc('invoke', 'buttonup')
- rescue RuntimeError => e
- # old version of element?
- begin
- tk_send_without_enc('invoke', 'spinup')
- rescue
- fail e
- end
- end
- self
- end
-
- def spindown
- begin
- tk_send_without_enc('invoke', 'buttondown')
- rescue RuntimeError => e
- # old version of element?
- begin
- tk_send_without_enc('invoke', 'spinup')
- rescue
- fail e
- end
- end
- self
- end
-
- def set(str)
- _fromUTF8(tk_send_without_enc('set', _get_eval_enc_str(str)))
- end
-end
-
-#TkSpinbox = Tk::Spinbox unless Object.const_defined? :TkSpinbox
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Spinbox, :TkSpinbox)
-Tk.__set_loaded_toplevel_aliases__('tk/spinbox.rb', :Tk, Tk::Spinbox,
- :TkSpinbox)
diff --git a/ext/tk/lib/tk/tagfont.rb b/ext/tk/lib/tk/tagfont.rb
deleted file mode 100644
index e3fd60465c..0000000000
--- a/ext/tk/lib/tk/tagfont.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/tagfont.rb : control font of tags
-#
-require 'tk'
-
-module TkTreatTagFont
- def font_configinfo
- @parent.tagfont_configinfo(@id)
- end
-# alias font font_configinfo
-
- def font_configure(slot)
- @parent.tagfont_configure(@id, slot)
- self
- end
-
- def latinfont_configure(ltn, keys=nil)
- @parent.latintagfont_configure(@id, ltn, keys)
- self
- end
- alias asciifont_configure latinfont_configure
-
- def kanjifont_configure(knj, keys=nil)
- @parent.kanjitagfont_configure(@id, ltn, keys)
- self
- end
-
- def font_copy(win, wintag=nil)
- @parent.tagfont_copy(@id, win, wintag)
- self
- end
-
- def latinfont_copy(win, wintag=nil)
- @parent.latintagfont_copy(@id, win, wintag)
- self
- end
- alias asciifont_copy latinfont_copy
-
- def kanjifont_copy(win, wintag=nil)
- @parent.kanjitagfont_copy(@id, win, wintag)
- self
- end
-end
diff --git a/ext/tk/lib/tk/text.rb b/ext/tk/lib/tk/text.rb
deleted file mode 100644
index 616c3ae89c..0000000000
--- a/ext/tk/lib/tk/text.rb
+++ /dev/null
@@ -1,1605 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/text.rb - Tk text classes
-# by Yukihiro Matsumoto <matz@caelum.co.jp>
-require 'tk'
-require 'tk/itemfont'
-require 'tk/itemconfig'
-require 'tk/scrollable'
-require 'tk/txtwin_abst'
-
-module TkTextTagConfig
- include TkTreatItemFont
- include TkItemConfigMethod
-
- def __item_cget_cmd(id) # id := [ type, tagOrId ]
- [self.path, id[0], 'cget', id[1]]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id) # id := [ type, tagOrId ]
- [self.path, id[0], 'configure', id[1]]
- end
- private :__item_config_cmd
-
- def __item_pathname(id)
- if id.kind_of?(Array)
- id = tagid(id[1])
- end
- [self.path, id].join(';')
- end
- private :__item_pathname
-
- def tag_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['tag', tagOrId], option)
- end
- def tag_cget(tagOrId, option)
- itemcget(['tag', tagOrId], option)
- end
- def tag_cget_strict(tagOrId, option)
- itemcget_strict(['tag', tagOrId], option)
- end
- def tag_configure(tagOrId, slot, value=None)
- itemconfigure(['tag', tagOrId], slot, value)
- end
- def tag_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['tag', tagOrId], slot)
- end
- def current_tag_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['tag', tagOrId], slot)
- end
-
- def window_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['window', tagOrId], option)
- end
- def window_cget(tagOrId, option)
- itemcget(['window', tagOrId], option)
- end
- def window_cget_strict(tagOrId, option)
- itemcget_strict(['window', tagOrId], option)
- end
- def window_configure(tagOrId, slot, value=None)
- itemconfigure(['window', tagOrId], slot, value)
- end
- def window_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['window', tagOrId], slot)
- end
- def current_window_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['window', tagOrId], slot)
- end
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-end
-
-class Tk::Text<TkTextWin
- ItemConfCMD = ['tag'.freeze, 'configure'.freeze].freeze
- #include TkTreatTextTagFont
- include TkTextTagConfig
- include Scrollable
-
- #######################################
-
- module IndexModMethods
- def +(mod)
- return chars(mod) if mod.kind_of?(Numeric)
-
- mod = mod.to_s
- if mod =~ /^\s*[+-]?\d/
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod)
- else
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod)
- end
- end
-
- def -(mod)
- return chars(-mod) if mod.kind_of?(Numeric)
-
- mod = mod.to_s
- if mod =~ /^\s*[+-]?\d/
- Tk::Text::IndexString.new(String.new(id) << ' - ' << mod)
- elsif mod =~ /^\s*[-]\s+(\d.*)$/
- Tk::Text::IndexString.new(String.new(id) << ' - -' << $1)
- else
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod)
- end
- end
-
- def chars(mod)
- fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer)
- if mod < 0
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' chars')
- else
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' chars')
- end
- end
- alias char chars
-
- def display_chars(mod)
- # Tk8.5 feature
- fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer)
- if mod < 0
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' display chars')
- else
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' display chars')
- end
- end
- alias display_char display_chars
-
- def any_chars(mod)
- # Tk8.5 feature
- fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer)
- if mod < 0
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' any chars')
- else
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' any chars')
- end
- end
- alias any_char any_chars
-
- def indices(mod)
- # Tk8.5 feature
- fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer)
- if mod < 0
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' indices')
- else
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' indices')
- end
- end
-
- def display_indices(mod)
- # Tk8.5 feature
- fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer)
- if mod < 0
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' display indices')
- else
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' display indices')
- end
- end
-
- def any_indices(mod)
- # Tk8.5 feature
- fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer)
- if mod < 0
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' any indices')
- else
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' any indices')
- end
- end
-
- def lines(mod)
- fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer)
- if mod < 0
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' lines')
- else
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' lines')
- end
- end
- alias line lines
-
- def display_lines(mod)
- # Tk8.5 feature
- fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer)
- if mod < 0
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' display_lines')
- else
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' display lines')
- end
- end
- alias display_line display_lines
-
- def any_lines(mod)
- # Tk8.5 feature
- fail ArgumentError, 'expect Integer' unless mod.kind_of?(Integer)
- if mod < 0
- Tk::Text::IndexString.new(String.new(id) << ' ' << mod.to_s << ' any_lines')
- else
- Tk::Text::IndexString.new(String.new(id) << ' + ' << mod.to_s << ' any lines')
- end
- end
- alias any_line any_lines
-
- def linestart
- Tk::Text::IndexString.new(String.new(id) << ' linestart')
- end
- def lineend
- Tk::Text::IndexString.new(String.new(id) << ' lineend')
- end
-
- def display_linestart
- # Tk8.5 feature
- Tk::Text::IndexString.new(String.new(id) << ' display linestart')
- end
- def display_lineend
- # Tk8.5 feature
- Tk::Text::IndexString.new(String.new(id) << ' display lineend')
- end
-
- def wordstart
- Tk::Text::IndexString.new(String.new(id) << ' wordstart')
- end
- def wordend
- Tk::Text::IndexString.new(String.new(id) << ' wordend')
- end
-
- def display_wordstart
- # Tk8.5 feature
- Tk::Text::IndexString.new(String.new(id) << ' display wordstart')
- end
- def display_wordend
- # Tk8.5 feature
- Tk::Text::IndexString.new(String.new(id) << ' display wordend')
- end
- end
-
- class IndexString < String
- include IndexModMethods
-
- def self.at(x,y)
- self.new("@#{x},#{y}")
- end
-
- def self.new(str)
- if str.kind_of?(String)
- super(str)
- elsif str.kind_of?(Symbol)
- super(str.to_s)
- else
- str
- end
- end
-
- def id
- self
- end
- end
-
- #######################################
-
- TkCommandNames = ['text'.freeze].freeze
- WidgetClassName = 'Text'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.new(*args, &block)
- obj = super(*args){}
- obj.init_instance_variable
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- obj.instance_exec(obj, &block) if defined? yield
- else
- obj.instance_eval(&block) if defined? yield
- end
- obj
- end
-
- def init_instance_variable
- @cmdtbl = []
- @tags = {}
- end
-
- def __destroy_hook__
- TkTextTag::TTagID_TBL.mutex.synchronize{
- TkTextTag::TTagID_TBL.delete(@path)
- }
- TkTextTag::TMarkID_TBL.mutex.synchronize{
- TkTextMark::TMarkID_TBL.delete(@path)
- }
- end
-
- def create_self(keys)
- #if keys and keys != None
- # #tk_call_without_enc('text', @path, *hash_kv(keys, true))
- # tk_call_without_enc(self.class::TkCommandNames[0], @path,
- # *hash_kv(keys, true))
- #else
- # #tk_call_without_enc('text', @path)
- # tk_call_without_enc(self.class::TkCommandNames[0], @path)
- #end
- super(keys)
- init_instance_variable
- end
- private :create_self
-
- def __strval_optkeys
- super() << 'inactiveseletcionbackground'
- end
- private :__strval_optkeys
-
- def self.at(x, y)
- Tk::Text::IndexString.at(x, y)
- end
-
- def at(x, y)
- Tk::Text::IndexString.at(x, y)
- end
-
- def index(idx)
- Tk::Text::IndexString.new(tk_send_without_enc('index',
- _get_eval_enc_str(idx)))
- end
-
- def get_displaychars(*index)
- # Tk8.5 feature
- get('-displaychars', *index)
- end
-
- def value
- _fromUTF8(tk_send_without_enc('get', "1.0", "end - 1 char"))
- end
-
- def value= (val)
- tk_send_without_enc('delete', "1.0", 'end')
- tk_send_without_enc('insert', "1.0", _get_eval_enc_str(val))
- val
- end
-
- def clear
- tk_send_without_enc('delete', "1.0", 'end')
- self
- end
- alias erase clear
-
- def _addcmd(cmd)
- @cmdtbl.push cmd
- end
-
- def _addtag(name, obj)
- @tags[name] = obj
- end
-
- def tagid(tag)
- if tag.kind_of?(TkTextTag) \
- || tag.kind_of?(TkTextMark) \
- || tag.kind_of?(TkTextImage) \
- || tag.kind_of?(TkTextWindow)
- tag.id
- else
- tag # maybe an Array of configure parameters
- end
- end
- private :tagid
-
- def tagid2obj(tagid)
- if @tags[tagid]
- @tags[tagid]
- else
- tagid
- end
- end
-
- def tag_names(index=None)
- #tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag', 'names', _get_eval_enc_str(index)))).collect{|elt|
- tk_split_simplelist(tk_send_without_enc('tag', 'names', _get_eval_enc_str(index)), false, true).collect{|elt|
- tagid2obj(elt)
- }
- end
-
- def mark_names
- #tk_split_simplelist(_fromUTF8(tk_send_without_enc('mark', 'names'))).collect{|elt|
- tk_split_simplelist(tk_send_without_enc('mark', 'names'), false, true).collect{|elt|
- tagid2obj(elt)
- }
- end
-
- def mark_gravity(mark, direction=nil)
- if direction
- tk_send_without_enc('mark', 'gravity',
- _get_eval_enc_str(mark), direction)
- self
- else
- tk_send_without_enc('mark', 'gravity', _get_eval_enc_str(mark))
- end
- end
-
- def mark_set(mark, index)
- tk_send_without_enc('mark', 'set', _get_eval_enc_str(mark),
- _get_eval_enc_str(index))
- self
- end
- alias set_mark mark_set
-
- def mark_unset(*marks)
- tk_send_without_enc('mark', 'unset',
- *(marks.collect{|mark| _get_eval_enc_str(mark)}))
- self
- end
- alias unset_mark mark_unset
-
- def mark_next(index)
- tagid2obj(_fromUTF8(tk_send_without_enc('mark', 'next',
- _get_eval_enc_str(index))))
- end
- alias next_mark mark_next
-
- def mark_previous(index)
- tagid2obj(_fromUTF8(tk_send_without_enc('mark', 'previous',
- _get_eval_enc_str(index))))
- end
- alias previous_mark mark_previous
-
- def image_cget_strict(index, slot)
- case slot.to_s
- when 'text', 'label', 'show', 'data', 'file'
- _fromUTF8(tk_send_without_enc('image', 'cget',
- _get_eval_enc_str(index), "-#{slot}"))
- else
- tk_tcl2ruby(_fromUTF8(tk_send_without_enc('image', 'cget',
- _get_eval_enc_str(index),
- "-#{slot}")))
- end
- end
-
- def image_cget(index, slot)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- image_cget_strict(index, slot)
- else
- begin
- image_cget_strict(index, slot)
- rescue => e
- begin
- if current_image_configinfo(index).has_key?(slot.to_s)
- # not tag error & option is known -> error on known option
- fail e
- else
- # not tag error & option is unknown
- nil
- end
- rescue
- fail e # tag error
- end
- end
- end
- end
-
- def image_configure(index, slot, value=None)
- if slot.kind_of?(Hash)
- _fromUTF8(tk_send_without_enc('image', 'configure',
- _get_eval_enc_str(index),
- *hash_kv(slot, true)))
- else
- _fromUTF8(tk_send_without_enc('image', 'configure',
- _get_eval_enc_str(index),
- "-#{slot}",
- _get_eval_enc_str(value)))
- end
- self
- end
-
- def image_configinfo(index, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- case slot.to_s
- when 'text', 'label', 'show', 'data', 'file'
- #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}")))
- conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true)
- else
- #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}")))
- conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true)
- end
- conf[0] = conf[0][1..-1]
- conf
- else
- # tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).collect{|conflist|
- # conf = tk_split_simplelist(conflist)
- tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).collect{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- conf[0] = conf[0][1..-1]
- case conf[0]
- when 'text', 'label', 'show', 'data', 'file'
- else
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf[4]
- if conf[4].index('{')
- conf[4] = tk_split_list(conf[4])
- else
- conf[4] = tk_tcl2ruby(conf[4])
- end
- end
- end
- conf[1] = conf[1][1..-1] if conf.size == 2 # alias info
- conf
- }
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- case slot.to_s
- when 'text', 'label', 'show', 'data', 'file'
- #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}")))
- conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true)
- else
- #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}")))
- conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true)
- end
- key = conf.shift[1..-1]
- { key => conf }
- else
- ret = {}
- #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).each{|conflist|
- # conf = tk_split_simplelist(conflist)
- tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).each{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- key = conf.shift[1..-1]
- case key
- when 'text', 'label', 'show', 'data', 'file'
- else
- if conf[2]
- if conf[2].index('{')
- conf[2] = tk_split_list(conf[2])
- else
- conf[2] = tk_tcl2ruby(conf[2])
- end
- end
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- end
- if conf.size == 1
- ret[key] = conf[0][1..-1] # alias info
- else
- ret[key] = conf
- end
- }
- ret
- end
- end
- end
-
- def current_image_configinfo(index, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- conf = image_configinfo(index, slot)
- {conf[0] => conf[4]}
- else
- ret = {}
- image_configinfo(index).each{|conf|
- ret[conf[0]] = conf[4] if conf.size > 2
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- image_configinfo(index, slot).each{|k, conf|
- ret[k] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-
- def image_names
- #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'names'))).collect{|elt|
- tk_split_simplelist(tk_send_without_enc('image', 'names'), false, true).collect{|elt|
- tagid2obj(elt)
- }
- end
-
- def set_insert(index)
- tk_send_without_enc('mark','set','insert', _get_eval_enc_str(index))
- self
- end
-
- def set_current(index)
- tk_send_without_enc('mark','set','current', _get_eval_enc_str(index))
- self
- end
-
- def insert(index, chars, *tags)
- if tags[0].kind_of?(Array)
- # multiple chars-taglist argument :: str, [tag,...], str, [tag,...], ...
- args = [chars]
- while tags.size > 0
- args << tags.shift.collect{|x|_get_eval_string(x)}.join(' ') # taglist
- args << tags.shift if tags.size > 0 # chars
- end
- super(index, *args)
- else
- # single chars-taglist argument :: str, tag, tag, ...
- if tags.size == 0
- super(index, chars)
- else
- super(index, chars, tags.collect{|x|_get_eval_string(x)}.join(' '))
- end
- end
- end
-
- def destroy
- @tags = {} unless @tags
- @tags.each_value do |t|
- t.destroy
- end
- super()
- end
-
- def backspace
- self.delete 'insert'
- end
-
- def bbox(index)
- list(tk_send_without_enc('bbox', _get_eval_enc_str(index)))
- end
-
- def compare(idx1, op, idx2)
- bool(tk_send_without_enc('compare', _get_eval_enc_str(idx1),
- op, _get_eval_enc_str(idx2)))
- end
-
- def count(idx1, idx2, *opts)
- # opts are Tk8.5 feature
- cnt = 0
- args = opts.collect{|opt|
- str = opt.to_s
- cnt += 1 if str != 'update'
- '-' + str
- }
- args << _get_eval_enc_str(idx1) << _get_eval_enc_str(idx2)
- if cnt <= 1
- number(tk_send_without_enc('count', *opts))
- else
- list(tk_send_without_enc('count', *opts))
- end
- end
-
- def count_info(idx1, idx2, update=true)
- # Tk8.5 feature
- opts = [
- :chars, :displaychars, :displayindices, :displaylines,
- :indices, :lines, :xpixels, :ypixels
- ]
- if update
- lst = count(idx1, idx2, :update, *opts)
- else
- lst = count(idx1, idx2, *opts)
- end
- info = {}
- opts.each_with_index{|key, idx| info[key] = lst[idx]}
- info
- end
-
- def peer_names()
- # Tk8.5 feature
- list(tk_send_without_enc('peer', 'names'))
- end
-
- def replace(idx1, idx2, *opts)
- tk_send('replace', idx1, idx2, *opts)
- self
- end
-
- def debug
- bool(tk_send_without_enc('debug'))
- end
- def debug=(boolean)
- tk_send_without_enc('debug', boolean)
- #self
- boolean
- end
-
- def dlineinfo(index)
- list(tk_send_without_enc('dlineinfo', _get_eval_enc_str(index)))
- end
-
- def modified?
- bool(tk_send_without_enc('edit', 'modified'))
- end
- def modified(mode)
- tk_send_without_enc('edit', 'modified', mode)
- self
- end
- def modified=(mode)
- modified(mode)
- mode
- end
-
- def edit_redo
- tk_send_without_enc('edit', 'redo')
- self
- end
- def edit_reset
- tk_send_without_enc('edit', 'reset')
- self
- end
- def edit_separator
- tk_send_without_enc('edit', 'separator')
- self
- end
- def edit_undo
- tk_send_without_enc('edit', 'undo')
- self
- end
-
- def xview_pickplace(index)
- tk_send_without_enc('xview', '-pickplace', _get_eval_enc_str(index))
- self
- end
-
- def yview_pickplace(index)
- tk_send_without_enc('yview', '-pickplace', _get_eval_enc_str(index))
- self
- end
-
- def text_copy
- # Tk8.4 feature
- tk_call_without_enc('tk_textCopy', @path)
- self
- end
-
- def text_cut
- # Tk8.4 feature
- tk_call_without_enc('tk_textCut', @path)
- self
- end
-
- def text_paste
- # Tk8.4 feature
- tk_call_without_enc('tk_textPaste', @path)
- self
- end
-
- def tag_add(tag, index1, index2=None)
- tk_send_without_enc('tag', 'add', _get_eval_enc_str(tag),
- _get_eval_enc_str(index1),
- _get_eval_enc_str(index2))
- self
- end
- alias addtag tag_add
- alias add_tag tag_add
-
- def tag_delete(*tags)
- tk_send_without_enc('tag', 'delete',
- *(tags.collect{|tag| _get_eval_enc_str(tag)}))
- TkTextTag::TTagID_TBL.mutex.synchronize{
- if TkTextTag::TTagID_TBL[@path]
- tags.each{|tag|
- if tag.kind_of?(TkTextTag)
- TkTextTag::TTagID_TBL[@path].delete(tag.id)
- else
- TkTextTag::TTagID_TBL[@path].delete(tag)
- end
- }
- end
- }
- self
- end
- alias deltag tag_delete
- alias delete_tag tag_delete
-
- #def tag_bind(tag, seq, cmd=Proc.new, *args)
- # _bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
- # self
- #end
- def tag_bind(tag, seq, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
- self
- end
-
- #def tag_bind_append(tag, seq, cmd=Proc.new, *args)
- # _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
- # self
- #end
- def tag_bind_append(tag, seq, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
- self
- end
-
- def tag_bind_remove(tag, seq)
- _bind_remove([@path, 'tag', 'bind', tag], seq)
- self
- end
-
- def tag_bindinfo(tag, context=nil)
- _bindinfo([@path, 'tag', 'bind', tag], context)
- end
-
-=begin
- def tag_cget(tag, key)
- case key.to_s
- when 'text', 'label', 'show', 'data', 'file'
- tk_call_without_enc(@path, 'tag', 'cget',
- _get_eval_enc_str(tag), "-#{key}")
- when 'font', 'kanjifont'
- #fnt = tk_tcl2ruby(tk_send('tag', 'cget', tag, "-#{key}"))
- fnt = tk_tcl2ruby(_fromUTF8(tk_send_without_enc('tag','cget',_get_eval_enc_str(tag),'-font')))
- unless fnt.kind_of?(TkFont)
- fnt = tagfontobj(tag, fnt)
- end
- if key.to_s == 'kanjifont' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/
- # obsolete; just for compatibility
- fnt.kanji_font
- else
- fnt
- end
- else
- tk_tcl2ruby(_fromUTF8(tk_call_without_enc(@path,'tag','cget',_get_eval_enc_str(tag),"-#{key}")))
- end
- end
-
- def tag_configure(tag, key, val=None)
- if key.kind_of?(Hash)
- key = _symbolkey2str(key)
- if ( key['font'] || key['kanjifont'] \
- || key['latinfont'] || key['asciifont'] )
- tagfont_configure(tag, key)
- else
- tk_send_without_enc('tag', 'configure', _get_eval_enc_str(tag),
- *hash_kv(key, true))
- end
-
- else
- if key == 'font' || key == :font ||
- key == 'kanjifont' || key == :kanjifont ||
- key == 'latinfont' || key == :latinfont ||
- key == 'asciifont' || key == :asciifont
- if val == None
- tagfontobj(tag)
- else
- tagfont_configure(tag, {key=>val})
- end
- else
- tk_send_without_enc('tag', 'configure', _get_eval_enc_str(tag),
- "-#{key}", _get_eval_enc_str(val))
- end
- end
- self
- end
-
- def tag_configinfo(tag, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- case key.to_s
- when 'text', 'label', 'show', 'data', 'file'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}")))
- when 'font', 'kanjifont'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}")))
- conf[4] = tagfont_configinfo(tag, conf[4])
- else
- conf = tk_split_list(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}")))
- end
- conf[0] = conf[0][1..-1]
- conf
- else
- ret = tk_split_simplelist(_fromUTF8(tk_send('tag','configure',_get_eval_enc_str(tag)))).collect{|conflist|
- conf = tk_split_simplelist(conflist)
- conf[0] = conf[0][1..-1]
- case conf[0]
- when 'text', 'label', 'show', 'data', 'file'
- else
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf[4]
- if conf[4].index('{')
- conf[4] = tk_split_list(conf[4])
- else
- conf[4] = tk_tcl2ruby(conf[4])
- end
- end
- end
- conf[1] = conf[1][1..-1] if conf.size == 2 # alias info
- conf
- }
- fontconf = ret.assoc('font')
- if fontconf
- ret.delete_if{|item| item[0] == 'font' || item[0] == 'kanjifont'}
- fontconf[4] = tagfont_configinfo(tag, fontconf[4])
- ret.push(fontconf)
- else
- ret
- end
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- case key.to_s
- when 'text', 'label', 'show', 'data', 'file'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}")))
- when 'font', 'kanjifont'
- conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}")))
- conf[4] = tagfont_configinfo(tag, conf[4])
- else
- conf = tk_split_list(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}")))
- end
- key = conf.shift[1..-1]
- { key => conf }
- else
- ret = {}
- tk_split_simplelist(_fromUTF8(tk_send('tag','configure',_get_eval_enc_str(tag)))).each{|conflist|
- conf = tk_split_simplelist(conflist)
- key = conf.shift[1..-1]
- case key
- when 'text', 'label', 'show', 'data', 'file'
- else
- if conf[2]
- if conf[2].index('{')
- conf[2] = tk_split_list(conf[2])
- else
- conf[2] = tk_tcl2ruby(conf[2])
- end
- end
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- end
- if conf.size == 1
- ret[key] = conf[0][1..-1] # alias info
- else
- ret[key] = conf
- end
- }
- fontconf = ret['font']
- if fontconf
- ret.delete('font')
- ret.delete('kanjifont')
- fontconf[3] = tagfont_configinfo(tag, fontconf[3])
- ret['font'] = fontconf
- end
- ret
- end
- end
- end
-
- def current_tag_configinfo(tag, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- conf = tag_configinfo(tag, key)
- {conf[0] => conf[4]}
- else
- ret = {}
- tag_configinfo(tag).each{|conf|
- ret[conf[0]] = conf[4] if conf.size > 2
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- tag_configinfo(tag, key).each{|k, conf|
- ret[k] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-=end
-
- def tag_raise(tag, above=None)
- tk_send_without_enc('tag', 'raise', _get_eval_enc_str(tag),
- _get_eval_enc_str(above))
- self
- end
-
- def tag_lower(tag, below=None)
- tk_send_without_enc('tag', 'lower', _get_eval_enc_str(tag),
- _get_eval_enc_str(below))
- self
- end
-
- def tag_remove(tag, *indices)
- tk_send_without_enc('tag', 'remove', _get_eval_enc_str(tag),
- *(indices.collect{|idx| _get_eval_enc_str(idx)}))
- self
- end
-
- def tag_ranges(tag)
- #l = tk_split_simplelist(tk_send_without_enc('tag', 'ranges',
- # _get_eval_enc_str(tag)))
- l = tk_split_simplelist(tk_send_without_enc('tag', 'ranges',
- _get_eval_enc_str(tag)),
- false, true)
- r = []
- while key=l.shift
- r.push [Tk::Text::IndexString.new(key), Tk::Text::IndexString.new(l.shift)]
- end
- r
- end
-
- def tag_nextrange(tag, first, last=None)
- simplelist(tk_send_without_enc('tag', 'nextrange',
- _get_eval_enc_str(tag),
- _get_eval_enc_str(first),
- _get_eval_enc_str(last))).collect{|idx|
- Tk::Text::IndexString.new(idx)
- }
- end
-
- def tag_prevrange(tag, first, last=None)
- simplelist(tk_send_without_enc('tag', 'prevrange',
- _get_eval_enc_str(tag),
- _get_eval_enc_str(first),
- _get_eval_enc_str(last))).collect{|idx|
- Tk::Text::IndexString.new(idx)
- }
- end
-
-=begin
- def window_cget(index, slot)
- case slot.to_s
- when 'text', 'label', 'show', 'data', 'file'
- _fromUTF8(tk_send_without_enc('window', 'cget',
- _get_eval_enc_str(index), "-#{slot}"))
- when 'font', 'kanjifont'
- #fnt = tk_tcl2ruby(tk_send('window', 'cget', index, "-#{slot}"))
- fnt = tk_tcl2ruby(_fromUTF8(tk_send_without_enc('window', 'cget', _get_eval_enc_str(index), '-font')))
- unless fnt.kind_of?(TkFont)
- fnt = tagfontobj(index, fnt)
- end
- if slot.to_s == 'kanjifont' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/
- # obsolete; just for compatibility
- fnt.kanji_font
- else
- fnt
- end
- else
- tk_tcl2ruby(_fromUTF8(tk_send_without_enc('window', 'cget', _get_eval_enc_str(index), "-#{slot}")))
- end
- end
-
- def window_configure(index, slot, value=None)
- if index.kind_of?(TkTextWindow)
- index.configure(slot, value)
- else
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- win = slot['window']
- # slot['window'] = win.epath if win.kind_of?(TkWindow)
- slot['window'] = _epath(win) if win
- if slot['create']
- p_create = slot['create']
- if p_create.kind_of?(Proc)
-#=begin
- slot['create'] = install_cmd(proc{
- id = p_create.call
- if id.kind_of?(TkWindow)
- id.epath
- else
- id
- end
- })
-#=end
- slot['create'] = install_cmd(proc{_epath(p_create.call)})
- end
- end
- tk_send_without_enc('window', 'configure',
- _get_eval_enc_str(index),
- *hash_kv(slot, true))
- else
- if slot == 'window' || slot == :window
- # id = value
- # value = id.epath if id.kind_of?(TkWindow)
- value = _epath(value)
- end
- if slot == 'create' || slot == :create
- p_create = value
- if p_create.kind_of?(Proc)
-#=begin
- value = install_cmd(proc{
- id = p_create.call
- if id.kind_of?(TkWindow)
- id.epath
- else
- id
- end
- })
-#=end
- value = install_cmd(proc{_epath(p_create.call)})
- end
- end
- tk_send_without_enc('window', 'configure',
- _get_eval_enc_str(index),
- "-#{slot}", _get_eval_enc_str(value))
- end
- end
- self
- end
-
- def window_configinfo(win, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- case slot.to_s
- when 'text', 'label', 'show', 'data', 'file'
- conf = tk_split_simplelist(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win), "-#{slot}")))
- else
- conf = tk_split_list(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win), "-#{slot}")))
- end
- conf[0] = conf[0][1..-1]
- conf
- else
- tk_split_simplelist(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win)))).collect{|conflist|
- conf = tk_split_simplelist(conflist)
- conf[0] = conf[0][1..-1]
- case conf[0]
- when 'text', 'label', 'show', 'data', 'file'
- else
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf[4]
- if conf[4].index('{')
- conf[4] = tk_split_list(conf[4])
- else
- conf[4] = tk_tcl2ruby(conf[4])
- end
- end
- end
- conf[1] = conf[1][1..-1] if conf.size == 2 # alias info
- conf
- }
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- case slot.to_s
- when 'text', 'label', 'show', 'data', 'file'
- conf = tk_split_simplelist(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win), "-#{slot}")))
- else
- conf = tk_split_list(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win), "-#{slot}")))
- end
- key = conf.shift[1..-1]
- { key => conf }
- else
- ret = {}
- tk_split_simplelist(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win)))).each{|conflist|
- conf = tk_split_simplelist(conflist)
- key = conf.shift[1..-1]
- case key
- when 'text', 'label', 'show', 'data', 'file'
- else
- if conf[2]
- if conf[2].index('{')
- conf[2] = tk_split_list(conf[2])
- else
- conf[2] = tk_tcl2ruby(conf[2])
- end
- end
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- end
- if conf.size == 1
- ret[key] = conf[0][1..-1] # alias info
- else
- ret[key] = conf
- end
- }
- ret
- end
- end
- end
-
- def current_window_configinfo(win, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- conf = window_configinfo(win, slot)
- {conf[0] => conf[4]}
- else
- ret = {}
- window_configinfo(win).each{|conf|
- ret[conf[0]] = conf[4] if conf.size > 2
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- window_configinfo(win, slot).each{|k, conf|
- ret[k] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-=end
-
- def window_names
- # tk_split_simplelist(_fromUTF8(tk_send_without_enc('window', 'names'))).collect{|elt|
- tk_split_simplelist(tk_send_without_enc('window', 'names'), false, true).collect{|elt|
- tagid2obj(elt)
- }
- end
-
- def _ktext_length(txt)
- if TkCore::WITH_ENCODING ### Ruby 1.9 !!!!!!!!!!!!!
- return txt.length
- end
- ###########################
-
- if $KCODE !~ /n/i
- return txt.gsub(/[^\Wa-zA-Z_\d]/, ' ').length
- end
-
- # $KCODE == 'NONE'
- if JAPANIZED_TK
- tk_call_without_enc('kstring', 'length',
- _get_eval_enc_str(txt)).to_i
- else
- begin
- tk_call_without_enc('encoding', 'convertto', 'ascii',
- _get_eval_enc_str(txt)).length
- rescue StandardError, NameError
- # sorry, I have no plan
- txt.length
- end
- end
- end
- private :_ktext_length
-
- def tksearch(*args)
- # call 'search' subcommand of text widget
- # args ::= [<array_of_opts>] <pattern> <start_index> [<stop_index>]
- # If <pattern> is regexp, then it must be a regular expression of Tcl
- nocase = false
- if args[0].kind_of?(Array)
- opts = args.shift.collect{|opt|
- s_opt = opt.to_s
- nocase = true if s_opt == 'nocase'
- '-' + s_opt
- }
- else
- opts = []
- end
-
- if args[0].kind_of?(Regexp)
- regexp = args.shift
- if !nocase && (regexp.options & Regexp::IGNORECASE) != 0
- opts << '-nocase'
- end
- args.unshift(regexp.source)
- end
-
- opts << '--'
-
- ret = tk_send('search', *(opts + args))
- if ret == ""
- nil
- else
- Tk::Text::IndexString.new(ret)
- end
- end
-
- def tksearch_with_count(*args)
- # call 'search' subcommand of text widget
- # args ::= [<array_of_opts>] <var> <pattern> <start_index> [<stop_index>]
- # If <pattern> is regexp, then it must be a regular expression of Tcl
- nocase = false
- if args[0].kind_of?(Array)
- opts = args.shift.collect{|opt|
- s_opt = opt.to_s
- nocase = true if s_opt == 'nocase'
- '-' + s_opt
- }
- else
- opts = []
- end
-
- opts << '-count' << args.shift
-
- if args[0].kind_of?(Regexp)
- regexp = args.shift
- if !nocase && (regexp.options & Regexp::IGNORECASE) != 0
- opts << '-nocase'
- end
- args.unshift(regexp.source)
- end
-
- opts << '--'
-
- ret = tk_send('search', *(opts + args))
- if ret == ""
- nil
- else
- Tk::Text::IndexString.new(ret)
- end
- end
-
- def search_with_length(pat,start,stop=None)
- pat = pat.chr if pat.kind_of?(Integer)
- if stop != None
- return ["", 0] if compare(start,'>=',stop)
- txt = get(start,stop)
- if (pos = txt.index(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of?(String)
- #return [index(start + " + #{pos} chars"), pat.split('').length]
- return [index(start + " + #{pos} chars"),
- _ktext_length(pat), pat.dup]
- else
- #return [index(start + " + #{pos} chars"), $&.split('').length]
- return [index(start + " + #{pos} chars"),
- _ktext_length(match), match]
- end
- else
- return ["", 0]
- end
- else
- txt = get(start,'end - 1 char')
- if (pos = txt.index(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of?(String)
- #return [index(start + " + #{pos} chars"), pat.split('').length]
- return [index(start + " + #{pos} chars"),
- _ktext_length(pat), pat.dup]
- else
- #return [index(start + " + #{pos} chars"), $&.split('').length]
- return [index(start + " + #{pos} chars"),
- _ktext_length(match), match]
- end
- else
- txt = get('1.0','end - 1 char')
- if (pos = txt.index(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of?(String)
- #return [index("1.0 + #{pos} chars"), pat.split('').length]
- return [index("1.0 + #{pos} chars"),
- _ktext_length(pat), pat.dup]
- else
- #return [index("1.0 + #{pos} chars"), $&.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(match), match]
- end
- else
- return ["", 0]
- end
- end
- end
- end
-
- def search(pat,start,stop=None)
- search_with_length(pat,start,stop)[0]
- end
-
- def rsearch_with_length(pat,start,stop=None)
- pat = pat.chr if pat.kind_of?(Integer)
- if stop != None
- return ["", 0] if compare(start,'<=',stop)
- txt = get(stop,start)
- if (pos = txt.rindex(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of?(String)
- #return [index(stop + " + #{pos} chars"), pat.split('').length]
- return [index(stop + " + #{pos} chars"), _ktext_length(pat), pat.dup]
- else
- #return [index(stop + " + #{pos} chars"), $&.split('').length]
- return [index(stop + " + #{pos} chars"), _ktext_length(match), match]
- end
- else
- return ["", 0]
- end
- else
- txt = get('1.0',start)
- if (pos = txt.rindex(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of?(String)
- #return [index("1.0 + #{pos} chars"), pat.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup]
- else
- #return [index("1.0 + #{pos} chars"), $&.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(match), match]
- end
- else
- txt = get('1.0','end - 1 char')
- if (pos = txt.rindex(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of?(String)
- #return [index("1.0 + #{pos} chars"), pat.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup]
- else
- #return [index("1.0 + #{pos} chars"), $&.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(match), match]
- end
- else
- return ["", 0]
- end
- end
- end
- end
-
- def rsearch(pat,start,stop=None)
- rsearch_with_length(pat,start,stop)[0]
- end
-
- def dump(type_info, *index, &block)
- if type_info.kind_of?(Symbol)
- type_info = [ type_info.to_s ]
- elsif type_info.kind_of?(String)
- type_info = [ type_info ]
- end
- args = type_info.collect{|inf| '-' + inf}
- args << '-command' << block if block
- str = tk_send('dump', *(args + index))
- result = []
- sel = nil
- i = 0
- while i < str.size
- # retrieve key
- idx = str.index(/ /, i)
- result.push str[i..(idx-1)]
- i = idx + 1
-
- # retrieve value
- case result[-1]
- when 'text'
- if str[i] == ?{
- # text formed as {...}
- val, i = _retrieve_braced_text(str, i)
- result.push val
- else
- # text which may contain backslashes
- val, i = _retrieve_backslashed_text(str, i)
- result.push val
- end
- else
- idx = str.index(/ /, i)
- val = str[i..(idx-1)]
- case result[-1]
- when 'mark'
- case val
- when 'insert'
- result.push TkTextMarkInsert.new(self)
- when 'current'
- result.push TkTextMarkCurrent.new(self)
- when 'anchor'
- result.push TkTextMarkAnchor.new(self)
- else
- result.push tk_tcl2ruby(val)
- end
- when 'tagon'
- if val == 'sel'
- if sel
- result.push sel
- else
- result.push TkTextTagSel.new(self)
- end
- else
- result.push tk_tcl2ruby(val)
- end
- when 'tagoff'
- result.push tk_tcl2ruby(val)
- when 'window'
- result.push tk_tcl2ruby(val)
- when 'image'
- result.push tk_tcl2ruby(val)
- end
- i = idx + 1
- end
-
- # retrieve index
- idx = str.index(/ /, i)
- if idx
- result.push(Tk::Text::IndexString.new(str[i..(idx-1)]))
- i = idx + 1
- else
- result.push(Tk::Text::IndexString.new(str[i..-1]))
- break
- end
- end
-
- kvis = []
- until result.empty?
- kvis.push [result.shift, result.shift, result.shift]
- end
- kvis # result is [[key1, value1, index1], [key2, value2, index2], ...]
- end
-
- def _retrieve_braced_text(str, i)
- cnt = 0
- idx = i
- while idx < str.size
- case str[idx]
- when ?{
- cnt += 1
- when ?}
- cnt -= 1
- if cnt == 0
- break
- end
- end
- idx += 1
- end
- return str[i+1..idx-1], idx + 2
- end
- private :_retrieve_braced_text
-
- def _retrieve_backslashed_text(str, i)
- j = i
- idx = nil
- loop {
- idx = str.index(/ /, j)
- if str[idx-1] == ?\\
- j += 1
- else
- break
- end
- }
- val = str[i..(idx-1)]
- val.gsub!(/\\( |\{|\})/, '\1')
- return val, idx + 1
- end
- private :_retrieve_backslashed_text
-
- def dump_all(*index, &block)
- dump(['all'], *index, &block)
- end
- def dump_mark(*index, &block)
- dump(['mark'], *index, &block)
- end
- def dump_tag(*index, &block)
- dump(['tag'], *index, &block)
- end
- def dump_text(*index, &block)
- dump(['text'], *index, &block)
- end
- def dump_window(*index, &block)
- dump(['window'], *index, &block)
- end
- def dump_image(*index, &block)
- dump(['image'], *index, &block)
- end
-end
-
-#TkText = Tk::Text unless Object.const_defined? :TkText
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Text, :TkText)
-Tk.__set_loaded_toplevel_aliases__('tk/text.rb', :Tk, Tk::Text, :TkText)
-
-
-#######################################
-
-class Tk::Text::Peer < Tk::Text
- # Tk8.5 feature
- def initialize(text, parent=nil, keys={})
- unless text.kind_of?(Tk::Text)
- fail ArgumentError, "Tk::Text is expected for 1st argument"
- end
- @src_text = text
- super(parent, keys)
- end
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(@src_text.path, 'peer', 'create',
- @path, *hash_kv(keys, true))
- else
- tk_call_without_enc(@src_text.path, 'peer', 'create', @path)
- end
- end
- private :create_self
-end
diff --git a/ext/tk/lib/tk/textimage.rb b/ext/tk/lib/tk/textimage.rb
deleted file mode 100644
index f7329c5dcc..0000000000
--- a/ext/tk/lib/tk/textimage.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/textimage.rb - treat Tk text image object
-#
-require 'tk'
-require 'tk/text'
-
-class TkTextImage<TkObject
- include Tk::Text::IndexModMethods
-
- def initialize(parent, index, keys)
- #unless parent.kind_of?(Tk::Text)
- # fail ArgumentError, "expect Tk::Text for 1st argument"
- #end
- @t = parent
- if index == 'end' || index == :end
- @path = TkTextMark.new(@t, tk_call(@t.path, 'index', 'end - 1 chars'))
- elsif index.kind_of? TkTextMark
- if tk_call_without_enc(@t.path,'index',index.path) == tk_call_without_enc(@t.path,'index','end')
- @path = TkTextMark.new(@t, tk_call_without_enc(@t.path, 'index',
- 'end - 1 chars'))
- else
- @path = TkTextMark.new(@t, tk_call_without_enc(@t.path, 'index',
- index.path))
- end
- else
- @path = TkTextMark.new(@t, tk_call_without_enc(@t.path, 'index',
- _get_eval_enc_str(index)))
- end
- @path.gravity = 'left'
- @index = @path.path
- @id = tk_call_without_enc(@t.path, 'image', 'create', @index,
- *hash_kv(keys, true)).freeze
- @path.gravity = 'right'
- end
-
- def id
- Tk::Text::IndexString.new(@id)
- end
- def mark
- @path
- end
-
- def [](slot)
- cget(slot)
- end
- def []=(slot, value)
- configure(slot, value)
- value
- end
-
- def cget(slot)
- @t.image_cget(@index, slot)
- end
-
- def cget_strict(slot)
- @t.image_cget_strict(@index, slot)
- end
-
- def configure(slot, value=None)
- @t.image_configure(@index, slot, value)
- self
- end
-# def configure(slot, value)
-# tk_call @t.path, 'image', 'configure', @index, "-#{slot}", value
-# end
-
- def configinfo(slot = nil)
- @t.image_configinfo(@index, slot)
- end
-
- def current_configinfo(slot = nil)
- @t.current_image_configinfo(@index, slot)
- end
-
- def image
- img = tk_call_without_enc(@t.path, 'image', 'cget', @index, '-image')
- TkImage::Tk_IMGTBL[img]? TkImage::Tk_IMGTBL[img] : img
- end
-
- def image=(value)
- tk_call_without_enc(@t.path, 'image', 'configure', @index, '-image',
- _get_eval_enc_str(value))
- #self
- value
- end
-end
-
-TktImage = TkTextImage
diff --git a/ext/tk/lib/tk/textmark.rb b/ext/tk/lib/tk/textmark.rb
deleted file mode 100644
index 80945cc70c..0000000000
--- a/ext/tk/lib/tk/textmark.rb
+++ /dev/null
@@ -1,205 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/textmark.rb - methods for treating text marks
-#
-require 'tk'
-require 'tk/text'
-
-class TkTextMark<TkObject
- include Tk::Text::IndexModMethods
-
- TMarkID_TBL = TkCore::INTERP.create_table
-
- (Tk_TextMark_ID = ['mark'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- TMarkID_TBL.mutex.synchronize{ TMarkID_TBL.clear }
- }
-
- def TkTextMark.id2obj(text, id)
- tpath = text.path
- TMarkID_TBL.mutex.synchronize{
- if TMarkID_TBL[tpath]
- TMarkID_TBL[tpath][id]? TMarkID_TBL[tpath][id]: id
- else
- id
- end
- }
- end
-
- def initialize(parent, index)
- #unless parent.kind_of?(Tk::Text)
- # fail ArgumentError, "expect Tk::Text for 1st argument"
- #end
- @parent = @t = parent
- @tpath = parent.path
- Tk_TextMark_ID.mutex.synchronize{
- # @path = @id = Tk_TextMark_ID.join('')
- @path = @id = Tk_TextMark_ID.join(TkCore::INTERP._ip_id_).freeze
- Tk_TextMark_ID[1].succ!
- }
- TMarkID_TBL.mutex.synchronize{
- TMarkID_TBL[@id] = self
- TMarkID_TBL[@tpath] = {} unless TMarkID_TBL[@tpath]
- TMarkID_TBL[@tpath][@id] = self
- }
- tk_call_without_enc(@t.path, 'mark', 'set', @id,
- _get_eval_enc_str(index))
- @t._addtag id, self
- end
-
- def id
- Tk::Text::IndexString.new(@id)
- end
-
- def exist?
- #if ( tk_split_simplelist(_fromUTF8(tk_call_without_enc(@t.path, 'mark', 'names'))).find{|id| id == @id } )
- if ( tk_split_simplelist(tk_call_without_enc(@t.path, 'mark', 'names'), false, true).find{|id| id == @id } )
- true
- else
- false
- end
- end
-
-=begin
- # move to Tk::Text::IndexModMethods module
- def +(mod)
- return chars(mod) if mod.kind_of?(Numeric)
-
- mod = mod.to_s
- if mod =~ /^\s*[+-]?\d/
- Tk::Text::IndexString.new(@id + ' + ' + mod)
- else
- Tk::Text::IndexString.new(@id + ' ' + mod)
- end
- end
-
- def -(mod)
- return chars(-mod) if mod.kind_of?(Numeric)
-
- mod = mod.to_s
- if mod =~ /^\s*[+-]?\d/
- Tk::Text::IndexString.new(@id + ' - ' + mod)
- elsif mod =~ /^\s*[-]\s+(\d.*)$/
- Tk::Text::IndexString.new(@id + ' - -' + $1)
- else
- Tk::Text::IndexString.new(@id + ' ' + mod)
- end
- end
-=end
-
- def pos
- @t.index(@id)
- end
-
- def pos=(where)
- set(where)
- end
-
- def set(where)
- tk_call_without_enc(@t.path, 'mark', 'set', @id,
- _get_eval_enc_str(where))
- self
- end
-
- def unset
- tk_call_without_enc(@t.path, 'mark', 'unset', @id)
- self
- end
- alias destroy unset
-
- def gravity
- tk_call_without_enc(@t.path, 'mark', 'gravity', @id)
- end
-
- def gravity=(direction)
- tk_call_without_enc(@t.path, 'mark', 'gravity', @id, direction)
- #self
- direction
- end
-
- def next(index = nil)
- if index
- @t.tagid2obj(_fromUTF8(tk_call_without_enc(@t.path, 'mark', 'next', _get_eval_enc_str(index))))
- else
- @t.tagid2obj(_fromUTF8(tk_call_without_enc(@t.path, 'mark', 'next', @id)))
- end
- end
-
- def previous(index = nil)
- if index
- @t.tagid2obj(_fromUTF8(tk_call_without_enc(@t.path, 'mark', 'previous', _get_eval_enc_str(index))))
- else
- @t.tagid2obj(_fromUTF8(tk_call_without_enc(@t.path, 'mark', 'previous', @id)))
- end
- end
-end
-TktMark = TkTextMark
-
-class TkTextNamedMark<TkTextMark
- def self.new(parent, name, index=nil)
- TMarkID_TBL.mutex.synchronize{
- if TMarkID_TBL[parent.path] && TMarkID_TBL[parent.path][name]
- obj = TMarkID_TBL[parent.path][name]
- else
- # super(parent, name, *args)
- (obj = self.allocate).instance_eval{
- @parent = @t = parent
- @tpath = parent.path
- @path = @id = name
- TMarkID_TBL[@id] = self
- TMarkID_TBL[@tpath] = {} unless TMarkID_TBL[@tpath]
- TMarkID_TBL[@tpath][@id] = self unless TMarkID_TBL[@tpath][@id]
- @t._addtag @id, self
- }
- obj
- end
-
- if obj && index
- tk_call_without_enc(parent.path, 'mark', 'set', name,
- _get_eval_enc_str(index))
- end
- obj
- }
- end
-
- def initialize(parent, name, index=nil)
- # dummy:: not called by 'new' method
-
- #unless parent.kind_of?(Tk::Text)
- # fail ArgumentError, "expect Tk::Text for 1st argument"
- #end
- @parent = @t = parent
- @tpath = parent.path
- @path = @id = name
- tk_call_without_enc(@t.path, 'mark', 'set', @id,
- _get_eval_enc_str(index)) if index
- @t._addtag @id, self
- end
-end
-TktNamedMark = TkTextNamedMark
-
-class TkTextMarkInsert<TkTextNamedMark
- def self.new(parent,*args)
- super(parent, 'insert', *args)
- end
-end
-TktMarkInsert = TkTextMarkInsert
-
-class TkTextMarkCurrent<TkTextNamedMark
- def self.new(parent,*args)
- super(parent, 'current', *args)
- end
-end
-TktMarkCurrent = TkTextMarkCurrent
-
-class TkTextMarkAnchor<TkTextNamedMark
- def self.new(parent,*args)
- super(parent, 'anchor', *args)
- end
-end
-TktMarkAnchor = TkTextMarkAnchor
diff --git a/ext/tk/lib/tk/texttag.rb b/ext/tk/lib/tk/texttag.rb
deleted file mode 100644
index a909596b35..0000000000
--- a/ext/tk/lib/tk/texttag.rb
+++ /dev/null
@@ -1,322 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/texttag.rb - methods for treating text tags
-#
-require 'tk'
-require 'tk/text'
-require 'tk/tagfont'
-
-class TkTextTag<TkObject
- include TkTreatTagFont
- include Tk::Text::IndexModMethods
-
- TTagID_TBL = TkCore::INTERP.create_table
-
- (Tk_TextTag_ID = ['tag'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- TTagID_TBL.mutex.synchronize{ TTagID_TBL.clear }
- }
-
- def TkTextTag.id2obj(text, id)
- tpath = text.path
- TTagID_TBL.mutex.synchronize{
- if TTagID_TBL[tpath]
- TTagID_TBL[tpath][id]? TTagID_TBL[tpath][id]: id
- else
- id
- end
- }
- end
-
- def initialize(parent, *args)
- #unless parent.kind_of?(TkText)
- # fail ArgumentError, "expect TkText for 1st argument"
- #end
- @parent = @t = parent
- @tpath = parent.path
- Tk_TextTag_ID.mutex.synchronize{
- # @path = @id = Tk_TextTag_ID.join('')
- @path = @id = Tk_TextTag_ID.join(TkCore::INTERP._ip_id_).freeze
- Tk_TextTag_ID[1].succ!
- }
- TTagID_TBL.mutex.synchronize{
- TTagID_TBL[@id] = self
- TTagID_TBL[@tpath] = {} unless TTagID_TBL[@tpath]
- TTagID_TBL[@tpath][@id] = self
- }
- #tk_call @t.path, "tag", "configure", @id, *hash_kv(keys)
- if args != []
- keys = args.pop
- if keys.kind_of?(Hash)
- add(*args) if args != []
- configure(keys)
- else
- args.push keys
- add(*args)
- end
- end
- @t._addtag id, self
- end
-
- def id
- Tk::Text::IndexString.new(@id)
- end
-
- def exist?
- #if ( tk_split_simplelist(_fromUTF8(tk_call_without_enc(@t.path, 'tag', 'names'))).find{|id| id == @id } )
- if ( tk_split_simplelist(tk_call_without_enc(@t.path, 'tag', 'names'), false, true).find{|id| id == @id } )
- true
- else
- false
- end
- end
-
- def first
- Tk::Text::IndexString.new(@id + '.first')
- end
-
- def last
- Tk::Text::IndexString.new(@id + '.last')
- end
-
- def add(*indices)
- tk_call_without_enc(@t.path, 'tag', 'add', @id,
- *(indices.collect{|idx| _get_eval_enc_str(idx)}))
- self
- end
-
- def remove(*indices)
- tk_call_without_enc(@t.path, 'tag', 'remove', @id,
- *(indices.collect{|idx| _get_eval_enc_str(idx)}))
- self
- end
-
- def ranges
- l = tk_split_simplelist(tk_call_without_enc(@t.path, 'tag', 'ranges', @id))
- r = []
- while key=l.shift
- r.push [Tk::Text::IndexString.new(key), Tk::Text::IndexString.new(l.shift)]
- end
- r
- end
-
- def nextrange(first, last=None)
- simplelist(tk_call_without_enc(@t.path, 'tag', 'nextrange', @id,
- _get_eval_enc_str(first),
- _get_eval_enc_str(last))).collect{|idx|
- Tk::Text::IndexString.new(idx)
- }
- end
-
- def prevrange(first, last=None)
- simplelist(tk_call_without_enc(@t.path, 'tag', 'prevrange', @id,
- _get_eval_enc_str(first),
- _get_eval_enc_str(last))).collect{|idx|
- Tk::Text::IndexString.new(idx)
- }
- end
-
- def [](key)
- cget key
- end
-
- def []=(key,val)
- configure key, val
- val
- end
-
- def cget_tkstring(key)
- @t.tag_cget_tkstring @id, key
- end
- def cget(key)
- @t.tag_cget @id, key
- end
- def cget_strict(key)
- @t.tag_cget_strict @id, key
- end
-=begin
- def cget(key)
- case key.to_s
- when 'text', 'label', 'show', 'data', 'file'
- _fromUTF8(tk_call_without_enc(@t.path, 'tag', 'cget', @id, "-#{key}"))
- when 'font', 'kanjifont'
- #fnt = tk_tcl2ruby(tk_call(@t.path, 'tag', 'cget', @id, "-#{key}"))
- fnt = tk_tcl2ruby(_fromUTF8(tk_call_without_enc(@t.path, 'tag', 'cget',
- @id, '-font')))
- unless fnt.kind_of?(TkFont)
- fnt = tagfontobj(@id, fnt)
- end
- if key.to_s == 'kanjifont' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/
- # obsolete; just for compatibility
- fnt.kanji_font
- else
- fnt
- end
- else
- tk_tcl2ruby(_fromUTF8(tk_call_without_enc(@t.path, 'tag', 'cget',
- @id, "-#{key}")))
- end
- end
-=end
-
- def configure(key, val=None)
- @t.tag_configure @id, key, val
- end
-# def configure(key, val=None)
-# if key.kind_of?(Hash)
-# tk_call @t.path, 'tag', 'configure', @id, *hash_kv(key)
-# else
-# tk_call @t.path, 'tag', 'configure', @id, "-#{key}", val
-# end
-# end
-# def configure(key, value)
-# if value == false
-# value = "0"
-# elsif value.kind_of?(Proc)
-# value = install_cmd(value)
-# end
-# tk_call @t.path, 'tag', 'configure', @id, "-#{key}", value
-# end
-
- def configinfo(key=nil)
- @t.tag_configinfo @id, key
- end
-
- def current_configinfo(key=nil)
- @t.current_tag_configinfo @id, key
- end
-
- #def bind(seq, cmd=Proc.new, *args)
- # _bind([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
- # self
- #end
- def bind(seq, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
- self
- end
-
- #def bind_append(seq, cmd=Proc.new, *args)
- # _bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
- # self
- #end
- def bind_append(seq, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
- self
- end
-
- def bind_remove(seq)
- _bind_remove([@t.path, 'tag', 'bind', @id], seq)
- self
- end
-
- def bindinfo(context=nil)
- _bindinfo([@t.path, 'tag', 'bind', @id], context)
- end
-
- def raise(above=None)
- tk_call_without_enc(@t.path, 'tag', 'raise', @id,
- _get_eval_enc_str(above))
- self
- end
-
- def lower(below=None)
- tk_call_without_enc(@t.path, 'tag', 'lower', @id,
- _get_eval_enc_str(below))
- self
- end
-
- def destroy
- tk_call_without_enc(@t.path, 'tag', 'delete', @id)
- TTagID_TBL.mutex.synchronize{
- TTagID_TBL[@tpath].delete(@id) if TTagID_TBL[@tpath]
- }
- self
- end
-end
-TktTag = TkTextTag
-
-class TkTextNamedTag<TkTextTag
- def self.new(parent, name, *args)
- tagobj = nil
- TTagID_TBL.mutex.synchronize{
- if TTagID_TBL[parent.path] && TTagID_TBL[parent.path][name]
- tagobj = TTagID_TBL[parent.path][name]
- else
- # super(parent, name, *args)
- (tagobj = self.allocate).instance_eval{
- @parent = @t = parent
- @tpath = parent.path
- @path = @id = name
- TTagID_TBL[@id] = self
- TTagID_TBL[@tpath] = {} unless TTagID_TBL[@tpath]
- TTagID_TBL[@tpath][@id] = self unless TTagID_TBL[@tpath][@id]
- @t._addtag @id, self
- }
- end
- }
-
- if args != []
- keys = args.pop
- if keys.kind_of?(Hash)
- tagobj.add(*args) if args != []
- tagobj.configure(keys)
- else
- args.push keys
- tagobj.add(*args)
- end
- end
-
- tagobj
- end
-
- def initialize(parent, name, *args)
- # dummy:: not called by 'new' method
-
- #unless parent.kind_of?(Tk::Text)
- # fail ArgumentError, "expect Tk::Text for 1st argument"
- #end
- @parent = @t = parent
- @tpath = parent.path
- @path = @id = name
-
- #if mode
- # tk_call @t.path, "addtag", @id, *args
- #end
- if args != []
- keys = args.pop
- if keys.kind_of?(Hash)
- add(*args) if args != []
- configure(keys)
- else
- args.push keys
- add(*args)
- end
- end
- @t._addtag @id, self
- end
-end
-TktNamedTag = TkTextNamedTag
-
-class TkTextTagSel<TkTextNamedTag
- def self.new(parent, *args)
- super(parent, 'sel', *args)
- end
-end
-TktTagSel = TkTextTagSel
diff --git a/ext/tk/lib/tk/textwindow.rb b/ext/tk/lib/tk/textwindow.rb
deleted file mode 100644
index e0be5bac7a..0000000000
--- a/ext/tk/lib/tk/textwindow.rb
+++ /dev/null
@@ -1,155 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/textwindow.rb - treat Tk text window object
-#
-require 'tk'
-require 'tk/text'
-
-class TkTextWindow<TkObject
- include Tk::Text::IndexModMethods
-
- def initialize(parent, index, keys = {})
- #unless parent.kind_of?(Tk::Text)
- # fail ArgumentError, "expect Tk::Text for 1st argument"
- #end
- @t = parent
- if index == 'end' || index == :end
- @path = TkTextMark.new(@t, tk_call_without_enc(@t.path, 'index',
- 'end - 1 chars'))
- elsif index.kind_of?(TkTextMark)
- if tk_call_without_enc(@t.path,'index',index.path) == tk_call_without_enc(@t.path,'index','end')
- @path = TkTextMark.new(@t, tk_call_without_enc(@t.path, 'index',
- 'end - 1 chars'))
- else
- @path = TkTextMark.new(@t, tk_call_without_enc(@t.path, 'index',
- index.path))
- end
- else
- @path = TkTextMark.new(@t, tk_call_without_enc(@t.path, 'index', _get_eval_enc_str(index)))
- end
- @path.gravity = 'left'
- @index = @path.path
- keys = _symbolkey2str(keys)
- @id = keys['window']
- # keys['window'] = @id.epath if @id.kind_of?(TkWindow)
- keys['window'] = _epath(@id) if @id
- if keys['create']
- @p_create = keys['create']
- # if @p_create.kind_of?(Proc)
- if TkComm._callback_entry?(@p_create)
-=begin
- keys['create'] = install_cmd(proc{
- @id = @p_create.call
- if @id.kind_of?(TkWindow)
- @id.epath
- else
- @id
- end
- })
-=end
- keys['create'] = install_cmd(proc{@id = @p_create.call; _epath(@id)})
- end
- end
- tk_call_without_enc(@t.path, 'window', 'create', @index,
- *hash_kv(keys, true))
- @path.gravity = 'right'
- end
-
- def id
- Tk::Text::IndexString.new(_epath(@id))
- end
- def mark
- @path
- end
-
- def [](slot)
- cget(slot)
- end
- def []=(slot, value)
- configure(slot, value)
- value
- end
-
- def cget(slot)
- @t.window_cget(@index, slot)
- end
- def cget_strict(slot)
- @t.window_cget_strict(@index, slot)
- end
-
- def configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- if slot['window']
- @id = slot['window']
- # slot['window'] = @id.epath if @id.kind_of?(TkWindow)
- slot['window'] = _epath(@id) if @id
- end
- if slot['create']
- self.create=slot.delete('create')
- end
- if slot.size > 0
- tk_call_without_enc(@t.path, 'window', 'configure', @index,
- *hash_kv(slot, true))
- end
- else
- if slot == 'window' || slot == :window
- @id = value
- # value = @id.epath if @id.kind_of?(TkWindow)
- value = _epath(@id) if @id
- end
- if slot == 'create' || slot == :create
- self.create=value
- else
- tk_call_without_enc(@t.path, 'window', 'configure', @index,
- "-#{slot}", _get_eval_enc_str(value))
- end
- end
- self
- end
-
- def configinfo(slot = nil)
- @t.window_configinfo(@index, slot)
- end
-
- def current_configinfo(slot = nil)
- @t.current_window_configinfo(@index, slot)
- end
-
- def window
- @id
- end
-
- def window=(value)
- @id = value
- # value = @id.epath if @id.kind_of?(TkWindow)
- value = _epath(@id) if @id
- tk_call_without_enc(@t.path, 'window', 'configure', @index,
- '-window', _get_eval_enc_str(value))
- value
- end
-
- def create
- @p_create
- end
-
- def create=(value)
- @p_create = value
- # if @p_create.kind_of?(Proc)
- if TkComm._callback_entry?(@p_create)
- value = install_cmd(proc{
- @id = @p_create.call
- if @id.kind_of?(TkWindow)
- @id.epath
- else
- @id
- end
- })
- end
- tk_call_without_enc(@t.path, 'window', 'configure', @index,
- '-create', _get_eval_enc_str(value))
- value
- end
-end
-
-TktWindow = TkTextWindow
diff --git a/ext/tk/lib/tk/timer.rb b/ext/tk/lib/tk/timer.rb
deleted file mode 100644
index c1457e274e..0000000000
--- a/ext/tk/lib/tk/timer.rb
+++ /dev/null
@@ -1,666 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/timer.rb : methods for Tcl/Tk after command
-#
-# $Id$
-#
-require 'tk'
-
-class TkTimer
- include TkCore
- extend TkCore
-
- TkCommandNames = ['after'.freeze].freeze
-
- (Tk_CBID = ['a'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- Tk_CBTBL = TkUtil.untrust({})
-
- TkCore::INTERP.add_tk_procs('rb_after', 'id', <<-'EOL')
- if {[set st [catch {eval {ruby_cmd TkTimer callback} $id} ret]] != 0} {
- return -code $st $ret
- } {
- return $ret
- }
- EOL
-
- DEFAULT_IGNORE_EXCEPTIONS = [ NameError, RuntimeError ].freeze
-
- ###############################
- # class methods
- ###############################
- def self.start(*args, &b)
- self.new(*args, &b).start
- end
-
- def self.callback(obj_id)
- ex_obj = Tk_CBTBL[obj_id]
- return "" if ex_obj == nil; # canceled
- ex_obj.cb_call
- end
-
- def self.info(obj = nil)
- if obj
- if obj.kind_of?(TkTimer)
- if obj.after_id
- inf = tk_split_list(tk_call_without_enc('after','info',obj.after_id))
- [Tk_CBTBL[inf[0][1]], inf[1]]
- else
- nil
- end
- else
- fail ArgumentError, "TkTimer object is expected"
- end
- else
- tk_call_without_enc('after', 'info').split(' ').collect!{|id|
- ret = Tk_CBTBL.find{|key,val| val.after_id == id}
- (ret == nil)? id: ret[1]
- }
- end
- end
-
-
- ###############################
- # instance methods
- ###############################
- def do_callback
- @in_callback = true
- @after_id = nil
- begin
- @return_value = @current_proc.call(self)
- rescue SystemExit
- exit(0)
- rescue Interrupt
- exit!(1)
- rescue Exception => e
- if @cancel_on_exception &&
- @cancel_on_exception.find{|exc| e.kind_of?(exc)}
- cancel
- @return_value = e
- @in_callback = false
- return e
- else
- fail e
- end
- end
- if @set_next
- set_next_callback(@current_args)
- else
- @set_next = true
- end
- @in_callback = false
- @return_value
- end
-
- def set_callback(sleep, args=nil)
- if TkCore::INTERP.deleted?
- self.cancel
- return self
- end
- @after_script = "rb_after #{@id}"
- @current_args = args
- @current_script = [sleep, @after_script]
- @after_id = tk_call_without_enc('after', sleep, @after_script)
- self
- end
-
- def set_next_callback(args)
- if @running == false || @proc_max == 0 || @do_loop == 0
- Tk_CBTBL.delete(@id) ;# for GC
- @running = false
- # @wait_var.value = 0
- __at_end__
- return
- end
- if @current_pos >= @proc_max
- if @do_loop < 0 || (@do_loop -= 1) > 0
- @current_pos = 0
- else
- Tk_CBTBL.delete(@id) ;# for GC
- @running = false
- # @wait_var.value = 0
- __at_end__
- return
- end
- end
-
- @current_args = args
-
- # if @sleep_time.kind_of?(Proc)
- if TkComm._callback_entry?(@sleep_time)
- sleep = @sleep_time.call(self)
- else
- sleep = @sleep_time
- end
- @current_sleep = sleep
-
- cmd, *cmd_args = @loop_proc[@current_pos]
- @current_pos += 1
- @current_proc = cmd
-
- set_callback(sleep, cmd_args)
- end
-
- def initialize(*args, &b)
- Tk_CBID.mutex.synchronize{
- # @id = Tk_CBID.join('')
- @id = Tk_CBID.join(TkCore::INTERP._ip_id_)
- Tk_CBID[1].succ!
- }
-
- @wait_var = TkVariable.new(0)
-
- @at_end_proc = nil
-
- @cb_cmd = TkCore::INTERP.get_cb_entry(self.method(:do_callback))
-
- @set_next = true
-
- @init_sleep = 0
- @init_proc = nil
- @init_args = []
-
- @current_script = []
- @current_proc = nil
- @current_args = nil
- @return_value = nil
-
- @sleep_time = 0
- @current_sleep = 0
- @loop_exec = 0
- @do_loop = 0
- @loop_proc = []
- @proc_max = 0
- @current_pos = 0
-
- @after_id = nil
- @after_script = nil
-
- @cancel_on_exception = DEFAULT_IGNORE_EXCEPTIONS
- # Unless @cancel_on_exception, Ruby/Tk shows an error dialog box when
- # an exception is raised on TkTimer callback procedure.
- # If @cancel_on_exception is an array of exception classes and the raised
- # exception is included in the array, Ruby/Tk cancels executing TkTimer
- # callback procedures silently (TkTimer#cancel is called and no dialog is
- # shown).
-
- if b
- case args.size
- when 0
- add_procs(b)
- when 1
- args << -1 << b
- else
- args << b
- end
- end
-
- set_procs(*args) if args != []
-
- @running = false
- @in_callback = false
- end
-
- attr :after_id
- attr :after_script
- attr :current_proc
- attr :current_args
- attr :current_sleep
- alias :current_interval :current_sleep
- attr :return_value
-
- attr_accessor :loop_exec
-
- def __at_end__
- @at_end_proc.call(self) if @at_end_proc
- @wait_var.value = 0 # for wait
- end
- private :__at_end__
-
- def cb_call
- @cb_cmd.call
- end
-
- def get_procs
- [@init_sleep, @init_proc, @init_args, @sleep_time, @loop_exec, @loop_proc]
- end
-
- def current_status
- [@running, @current_sleep, @current_proc, @current_args,
- @do_loop, @cancel_on_exception]
- end
-
- def cancel_on_exception?
- @cancel_on_exception
- end
-
- def cancel_on_exception=(mode)
- if mode.kind_of?(Array)
- @cancel_on_exception = mode
- elsif mode
- @cancel_on_exception = DEFAULT_IGNORE_EXCEPTIONS
- else
- @cancel_on_exception = false
- end
- #self
- end
-
- def running?
- @running
- end
-
- def loop_rest
- @do_loop
- end
-
- def loop_rest=(rest)
- @do_loop = rest
- #self
- end
-
- def set_interval(interval)
- #if interval != 'idle' && interval != :idle \
- # && !interval.kind_of?(Integer) && !interval.kind_of?(Proc)
- if interval != 'idle' && interval != :idle \
- && !interval.kind_of?(Integer) && !TkComm._callback_entry?(interval)
- fail ArgumentError, "expect Integer or Proc"
- end
- @sleep_time = interval
- end
-
- def set_procs(interval, loop_exec, *procs)
- #if interval != 'idle' && interval != :idle \
- # && !interval.kind_of?(Integer) && !interval.kind_of?(Proc)
- if interval != 'idle' && interval != :idle \
- && !interval.kind_of?(Integer) && !TkComm._callback_entry?(interval)
- fail ArgumentError, "expect Integer or Proc for 1st argument"
- end
- @sleep_time = interval
-
- @loop_proc = []
- procs.each{|e|
- # if e.kind_of?(Proc)
- if TkComm._callback_entry?(e)
- @loop_proc.push([e])
- else
- @loop_proc.push(e)
- end
- }
- @proc_max = @loop_proc.size
- @current_pos = 0
-
- if loop_exec.kind_of?(Integer) && loop_exec < 0
- @loop_exec = -1
- elsif loop_exec == true
- @loop_exec = -1
- elsif loop_exec == nil || loop_exec == false || loop_exec == 0
- @loop_exec = 0
- else
- if not loop_exec.kind_of?(Integer)
- fail ArgumentError, "expect Integer for 2nd argument"
- end
- @loop_exec = loop_exec
- end
- @do_loop = @loop_exec
-
- self
- end
-
- def add_procs(*procs)
- procs.each{|e|
- # if e.kind_of?(Proc)
- if TkComm._callback_entry?(e)
- @loop_proc.push([e])
- else
- @loop_proc.push(e)
- end
- }
- @proc_max = @loop_proc.size
-
- self
- end
-
- def delete_procs(*procs)
- procs.each{|e|
- # if e.kind_of?(Proc)
- if TkComm._callback_entry?(e)
- @loop_proc.delete([e])
- else
- @loop_proc.delete(e)
- end
- }
- @proc_max = @loop_proc.size
-
- cancel if @proc_max == 0
-
- self
- end
-
- def delete_at(n)
- @loop_proc.delete_at(n)
- @proc_max = @loop_proc.size
- cancel if @proc_max == 0
- self
- end
-
- def set_start_proc(sleep=nil, init_proc=nil, *init_args, &b)
- # set parameters for 'restart'
- sleep = @init_sleep unless sleep
-
- if sleep != 'idle' && sleep != :idle && !sleep.kind_of?(Integer)
- fail ArgumentError, "expect Integer or 'idle' for 1st argument"
- end
-
- @init_sleep = sleep
- @init_proc = init_proc
- @init_args = init_args
-
- @init_proc = b if !@init_proc && b
- @init_proc = proc{|*args| } if @init_sleep > 0 && !@init_proc
-
- self
- end
-
- def start(*init_args, &b)
- return nil if @running
-
- Tk_CBTBL[@id] = self
- @do_loop = @loop_exec
- @current_pos = 0
- @return_value = nil
- @after_id = nil
-
- @init_sleep = 0
- @init_proc = nil
- @init_args = nil
-
- argc = init_args.size
- if argc > 0
- sleep = init_args.shift
- if sleep != 'idle' && sleep != :idle && !sleep.kind_of?(Integer)
- fail ArgumentError, "expect Integer or 'idle' for 1st argument"
- end
- @init_sleep = sleep
- end
- @init_proc = init_args.shift if argc > 1
- @init_args = init_args if argc > 2
-
- @init_proc = b if !@init_proc && b
- @init_proc = proc{|*args| } if @init_sleep > 0 && !@init_proc
-
- @current_sleep = @init_sleep
- @running = true
- if @init_proc
- # if not @init_proc.kind_of?(Proc)
- if !TkComm._callback_entry?(@init_proc)
- fail ArgumentError, "Argument '#{@init_proc}' need to be Proc"
- end
- @current_proc = @init_proc
- set_callback(@init_sleep, @init_args)
- @set_next = false if @in_callback
- else
- set_next_callback(@init_args)
- end
-
- self
- end
-
- def reset(*reset_args)
- restart() if @running
-
- if @init_proc
- @return_value = @init_proc.call(self)
- else
- @return_value = nil
- end
-
- @current_pos = 0
- @current_args = @init_args
- @current_script = []
-
- @set_next = false if @in_callback
-
- self
- end
-
- def restart(*restart_args, &b)
- cancel if @running
- if restart_args.empty? && !b
- start(@init_sleep, @init_proc, *@init_args)
- else
- start(*restart_args, &b)
- end
- end
-
- def cancel
- @running = false
- # @wait_var.value = 0
- __at_end__
- tk_call 'after', 'cancel', @after_id if @after_id
- @after_id = nil
-
- Tk_CBTBL.delete(@id) ;# for GC
- self
- end
- alias stop cancel
-
- def continue(wait=nil)
- fail RuntimeError, "is already running" if @running
- return restart() if @current_script.empty?
- sleep, cmd = @current_script
- fail RuntimeError, "no procedure to continue" unless cmd
- if wait
- unless wait.kind_of?(Integer)
- fail ArgumentError, "expect Integer for 1st argument"
- end
- sleep = wait
- end
- Tk_CBTBL[@id] = self
- @running = true
- @after_id = tk_call_without_enc('after', sleep, cmd)
- self
- end
-
- def skip
- fail RuntimeError, "is not running now" unless @running
- cancel
- Tk_CBTBL[@id] = self
- @running = true
- set_next_callback(@current_args)
- self
- end
-
- def info
- if @after_id
- inf = tk_split_list(tk_call_without_enc('after', 'info', @after_id))
- [Tk_CBTBL[inf[0][1]], inf[1]]
- else
- nil
- end
- end
-
- def at_end(*arg, &b)
- if arg.empty?
- if b
- @at_end_proc = b
- else
- # no proc
- return @at_end_proc
- end
- else
- fail ArgumentError, "wrong number of arguments" if arg.length != 1 || b
- @at_end_proc = arg[0]
- end
- self
- end
-
- def wait(on_thread = true, check_root = false)
- unless @running
- if @return_value.kind_of?(Exception)
- fail @return_value
- else
- return @return_value
- end
- end
-
- @wait_var.wait(on_thread, check_root)
- if @return_value.kind_of?(Exception)
- fail @return_value
- else
- @return_value
- end
- end
- def eventloop_wait(check_root = false)
- wait(false, check_root)
- end
- def thread_wait(check_root = false)
- wait(true, check_root)
- end
- def tkwait(on_thread = true)
- wait(on_thread, true)
- end
- def eventloop_tkwait
- wait(false, true)
- end
- def thread_tkwait
- wait(true, true)
- end
-end
-
-TkAfter = TkTimer
-
-
-class TkRTTimer < TkTimer
- DEFAULT_OFFSET_LIST_SIZE = 5
-
- def initialize(*args, &b)
- super(*args, &b)
-
- @offset_list = Array.new(DEFAULT_OFFSET_LIST_SIZE){ [0, 0] }
- @offset_s = 0
- @offset_u = 0
- @est_time = nil
- end
-
- def start(*args, &b)
- return nil if @running
- @est_time = nil
- @cb_start_time = Time.now
- super(*args, &b)
- end
-
- def cancel
- super()
- @est_time = nil
- @cb_start_time = Time.now
- self
- end
- alias stop cancel
-
- def continue(wait=nil)
- fail RuntimeError, "is already running" if @running
- @cb_start_time = Time.now
- super(wait)
- end
-
- def set_interval(interval)
- super(interval)
- @est_time = nil
- end
-
- def _offset_ave
- size = 0
- d_sec = 0; d_usec = 0
- @offset_list.each_with_index{|offset, idx|
- # weight = 1
- weight = idx + 1
- size += weight
- d_sec += offset[0] * weight
- d_usec += offset[1] * weight
- }
- offset_s, mod = d_sec.divmod(size)
- offset_u = ((mod * 1000000 + d_usec) / size.to_f).round
- [offset_s, offset_u]
- end
- private :_offset_ave
-
- def set_next_callback(args)
- if @running == false || @proc_max == 0 || @do_loop == 0
- Tk_CBTBL.delete(@id) ;# for GC
- @running = false
- # @wait_var.value = 0
- __at_end__
- return
- end
- if @current_pos >= @proc_max
- if @do_loop < 0 || (@do_loop -= 1) > 0
- @current_pos = 0
- else
- Tk_CBTBL.delete(@id) ;# for GC
- @running = false
- # @wait_var.value = 0
- __at_end__
- return
- end
- end
-
- @current_args = args
-
- cmd, *cmd_args = @loop_proc[@current_pos]
- @current_pos += 1
- @current_proc = cmd
-
- @offset_s, @offset_u = _offset_ave
-
- if TkComm._callback_entry?(@sleep_time)
- sleep = @sleep_time.call(self)
- else
- sleep = @sleep_time
- end
-
- if @est_time
- @est_time = Time.at(@est_time.to_i, @est_time.usec + sleep*1000)
- else
- @est_time = Time.at(@cb_start_time.to_i,
- @cb_start_time.usec + sleep*1000)
- end
-
- now = Time.now
- real_sleep = ((@est_time.to_i - now.to_i + @offset_s)*1000.0 +
- (@est_time.usec - now.usec + @offset_u)/1000.0).round
- if real_sleep <= 0
- real_sleep = 0
- @offset_s = now.to_i
- @offset_u = now.usec
- end
- @current_sleep = real_sleep
-
- set_callback(real_sleep, cmd_args)
- end
-
- def cb_call
- if @est_time
- @offset_list.shift
-
- @cb_start_time = Time.now
-
- if @current_sleep == 0
- @offset_list.push([
- @offset_s - @cb_start_time.to_i,
- @offset_u - @cb_start_time.usec
- ])
- else
- @offset_list.push([
- @offset_s + (@est_time.to_i - @cb_start_time.to_i),
- @offset_u + (@est_time.usec - @cb_start_time.usec)
- ])
- end
- end
-
- @cb_cmd.call
- end
-end
diff --git a/ext/tk/lib/tk/tk_mac.rb b/ext/tk/lib/tk/tk_mac.rb
deleted file mode 100644
index ed90fd1c67..0000000000
--- a/ext/tk/lib/tk/tk_mac.rb
+++ /dev/null
@@ -1,159 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/tk_mac.rb : Access Mac-Specific functionality on OS X from Tk
-# (supported by Tk8.6 or later)
-#
-# ATTENTION !!
-# This is NOT TESTED. Because I have no test-environment.
-#
-require 'tk'
-
-module Tk
- module Mac
- end
-end
-
-module Tk::Mac
- extend TkCore
-
- # event handler callbacks
- def self.def_ShowPreferences(cmd=Proc.new)
- ip_eval("proc ::tk::mac::ShowPreferences {} { #{install_cmd(cmd)} }")
- nil
- end
-
- def self.def_OpenApplication(cmd=Proc.new)
- ip_eval("proc ::tk::mac::OpenApplication {} { #{install_cmd(cmd)} }")
- nil
- end
-
- def self.def_ReopenApplication(cmd=Proc.new)
- ip_eval("proc ::tk::mac::ReopenApplication {} { #{install_cmd(cmd)} }")
- nil
- end
-
- def self.def_OpenDocument(cmd=Proc.new)
- ip_eval("proc ::tk::mac::OpenDocument {args} { eval #{install_cmd(cmd)} $args }")
- nil
- end
-
- def self.def_PrintDocument(cmd=Proc.new)
- ip_eval("proc ::tk::mac::PrintDocument {args} { eval #{install_cmd(cmd)} $args }")
- nil
- end
-
- def self.def_Quit(cmd=Proc.new)
- ip_eval("proc ::tk::mac::Quit {} { #{install_cmd(cmd)} }")
- nil
- end
-
- def self.def_OnHide(cmd=Proc.new)
- ip_eval("proc ::tk::mac::OnHide {} { #{install_cmd(cmd)} }")
- nil
- end
-
- def self.def_OnShow(cmd=Proc.new)
- ip_eval("proc ::tk::mac::OnShow {} { #{install_cmd(cmd)} }")
- nil
- end
-
- def self.def_ShowHelp(cmd=Proc.new)
- ip_eval("proc ::tk::mac::ShowHelp {} { #{install_cmd(cmd)} }")
- nil
- end
-
-
- # additional dialogs
- def self.standardAboutPanel
- tk_call('::tk::mac::standardAboutPanel')
- nil
- end
-
-
- # system configuration
- def self.useCompatibilityMetrics(mode)
- tk_call('::tk::mac::useCompatibilityMetrics', mode)
- nil
- end
-
- def self.CGAntialiasLimit(limit)
- tk_call('::tk::mac::CGAntialiasLimit', limit)
- nil
- end
-
- def self.antialiasedtext(num)
- tk_call('::tk::mac::antialiasedtext', num)
- nil
- end
-
- def self.useThemedToplevel(mode)
- tk_call('::tk::mac::useThemedToplevel', mode)
- nil
- end
-
-end
-
-class Tk::Mac::IconBitmap < TkImage
- TkCommandNames = ['::tk::mac::iconBitmap'].freeze
-
- def self.new(width, height, keys)
- if keys.kind_of?(Hash)
- name = nil
- if keys.key?(:imagename)
- name = keys[:imagename]
- elsif keys.key?('imagename')
- name = keys['imagename']
- end
- if name
- if name.kind_of?(TkImage)
- obj = name
- else
- name = _get_eval_string(name)
- obj = nil
- Tk_IMGTBL.mutex.synchronize{
- obj = Tk_IMGTBL[name]
- }
- end
- if obj
- if !(keys[:without_creating] || keys['without_creating'])
- keys = _symbolkey2str(keys)
- keys.delete('imagename')
- keys.delete('without_creating')
- obj.instance_eval{
- tk_call_without_enc('::tk::mac::iconBitmap',
- @path, width, height, *hash_kv(keys, true))
- }
- end
- return obj
- end
- end
- end
- (obj = self.allocate).instance_eval{
- Tk_IMGTBL.mutex.synchronize{
- initialize(width, height, keys)
- Tk_IMGTBL[@path] = self
- }
- }
- obj
- end
-
- def initialize(width, height, keys)
- @path = nil
- without_creating = false
- if keys.kind_of?(Hash)
- keys = _symbolkey2str(keys)
- @path = keys.delete('imagename')
- without_creating = keys.delete('without_creating')
- end
- unless @path
- Tk_Image_ID.mutex.synchronize{
- @path = Tk_Image_ID.join(TkCore::INTERP._ip_id_)
- Tk_Image_ID[1].succ!
- }
- end
- unless without_creating
- tk_call_without_enc('::tk::mac::iconBitmap',
- @path, width, height, *hash_kv(keys, true))
- end
- end
-end
diff --git a/ext/tk/lib/tk/toplevel.rb b/ext/tk/lib/tk/toplevel.rb
deleted file mode 100644
index e66b0fc1be..0000000000
--- a/ext/tk/lib/tk/toplevel.rb
+++ /dev/null
@@ -1,265 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/toplevel.rb : treat toplevel widget
-#
-require 'tk'
-require 'tk/wm'
-require 'tk/menuspec'
-
-class Tk::Toplevel<TkWindow
- include Wm
- include TkMenuSpec
-
- TkCommandNames = ['toplevel'.freeze].freeze
- WidgetClassName = 'Toplevel'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
-################# old version
-# def initialize(parent=nil, screen=nil, classname=nil, keys=nil)
-# if screen.kind_of? Hash
-# keys = screen.dup
-# else
-# @screen = screen
-# end
-# @classname = classname
-# if keys.kind_of? Hash
-# keys = keys.dup
-# @classname = keys.delete('classname') if keys.key?('classname')
-# @colormap = keys.delete('colormap') if keys.key?('colormap')
-# @container = keys.delete('container') if keys.key?('container')
-# @screen = keys.delete('screen') if keys.key?('screen')
-# @use = keys.delete('use') if keys.key?('use')
-# @visual = keys.delete('visual') if keys.key?('visual')
-# end
-# super(parent, keys)
-# end
-#
-# def create_self
-# s = []
-# s << "-class" << @classname if @classname
-# s << "-colormap" << @colormap if @colormap
-# s << "-container" << @container if @container
-# s << "-screen" << @screen if @screen
-# s << "-use" << @use if @use
-# s << "-visual" << @visual if @visual
-# tk_call 'toplevel', @path, *s
-# end
-#################
-
- def __boolval_optkeys
- super() << 'container'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'screen'
- end
- private :__strval_optkeys
-
- def __val2ruby_optkeys # { key=>proc, ... }
- super().update('menu'=>proc{|v| window(v)})
- end
- private :__val2ruby_optkeys
-
- def __methodcall_optkeys # { key=>method, ... }
- TOPLEVEL_METHODCALL_OPTKEYS
- end
- private :__methodcall_optkeys
-
- def _wm_command_option_chk(keys)
- keys = {} unless keys
- new_keys = {}
- wm_cmds = {}
-
- conf_methods = _symbolkey2str(__methodcall_optkeys())
-
- keys.each{|k,v| # k is a String
- if conf_methods.key?(k)
- wm_cmds[conf_methods[k]] = v
- elsif Wm.method_defined?(k)
- case k
- when 'screen','class','colormap','container','use','visual'
- new_keys[k] = v
- else
- case self.method(k).arity
- when -1,1
- wm_cmds[k] = v
- else
- new_keys[k] = v
- end
- end
- else
- new_keys[k] = v
- end
- }
- [new_keys, wm_cmds]
- end
- private :_wm_command_option_chk
-
- def initialize(parent=nil, screen=nil, classname=nil, keys=nil)
- my_class_name = nil
- if self.class < WidgetClassNames[WidgetClassName]
- my_class_name = self.class.name
- my_class_name = nil if my_class_name == ''
- end
- if parent.kind_of? Hash
- keys = _symbolkey2str(parent)
- if keys.key?('classname')
- keys['class'] = keys.delete('classname')
- end
- @classname = keys['class']
- @colormap = keys['colormap']
- @container = keys['container']
- @screen = keys['screen']
- @use = keys['use']
- @visual = keys['visual']
- if !@classname && my_class_name
- keys['class'] = @classname = my_class_name
- end
- if @classname.kind_of? TkBindTag
- @db_class = @classname
- keys['class'] = @classname = @classname.id
- elsif @classname
- @db_class = TkDatabaseClass.new(@classname)
- keys['class'] = @classname
- else
- @db_class = self.class
- @classname = @db_class::WidgetClassName
- end
- keys, cmds = _wm_command_option_chk(keys)
- super(keys)
- cmds.each{|k,v|
- if v.kind_of? Array
- self.__send__(k,*v)
- else
- self.__send__(k,v)
- end
- }
- return
- end
-
- if screen.kind_of? Hash
- keys = screen
- else
- @screen = screen
- if classname.kind_of? Hash
- keys = classname
- else
- @classname = classname
- end
- end
- if keys.kind_of? Hash
- keys = _symbolkey2str(keys)
- if keys.key?('classname')
- keys['class'] = keys.delete('classname')
- end
- @classname = keys['class'] unless @classname
- @colormap = keys['colormap']
- @container = keys['container']
- @screen = keys['screen'] unless @screen
- @use = keys['use']
- @visual = keys['visual']
- else
- keys = {}
- end
- if !@classname && my_class_name
- keys['class'] = @classname = my_class_name
- end
- if @classname.kind_of? TkBindTag
- @db_class = @classname
- keys['class'] = @classname = @classname.id
- elsif @classname
- @db_class = TkDatabaseClass.new(@classname)
- keys['class'] = @classname
- else
- @db_class = self.class
- @classname = @db_class::WidgetClassName
- end
- keys, cmds = _wm_command_option_chk(keys)
- super(parent, keys)
- cmds.each{|k,v|
- if v.kind_of? Array
- self.send(k,*v)
- else
- self.send(k,v)
- end
- }
- end
-
- #def create_self(keys)
- # if keys and keys != None
- # tk_call_without_enc('toplevel', @path, *hash_kv(keys, true))
- # else
- # tk_call_without_enc('toplevel', @path)
- # end
- #end
- #private :create_self
-
- def specific_class
- @classname
- end
-
- def add_menu(menu_info, tearoff=false, opts=nil)
- # See tk/menuspec.rb for menu_info.
- # opts is a hash of default configs for all of cascade menus.
- # Configs of menu_info can override it.
- if tearoff.kind_of?(Hash)
- opts = tearoff
- tearoff = false
- end
- _create_menubutton(self, menu_info, tearoff, opts)
- end
-
- def add_menubar(menu_spec, tearoff=false, opts=nil)
- # See tk/menuspec.rb for menu_spec.
- # opts is a hash of default configs for all of cascade menus.
- # Configs of menu_spec can override it.
- menu_spec.each{|info| add_menu(info, tearoff, opts)}
- self.menu
- end
-
- def self.database_class
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- self
- else
- TkDatabaseClass.new(self.name)
- end
- end
- def self.database_classname
- self.database_class.name
- end
-
- def self.bind(*args, &b)
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args, &b)
- else
- TkDatabaseClass.new(self.name).bind(*args, &b)
- end
- end
- def self.bind_append(*args, &b)
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args, &b)
- else
- TkDatabaseClass.new(self.name).bind_append(*args, &b)
- end
- end
- def self.bind_remove(*args)
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args)
- else
- TkDatabaseClass.new(self.name).bind_remove(*args)
- end
- end
- def self.bindinfo(*args)
- if self == WidgetClassNames[WidgetClassName] || self.name == ''
- super(*args)
- else
- TkDatabaseClass.new(self.name).bindinfo(*args)
- end
- end
-end
-
-#TkToplevel = Tk::Toplevel unless Object.const_defined? :TkToplevel
-#Tk.__set_toplevel_aliases__(:Tk, Tk::Toplevel, :TkToplevel)
-Tk.__set_loaded_toplevel_aliases__('tk/toplevel.rb', :Tk, Tk::Toplevel,
- :TkToplevel)
diff --git a/ext/tk/lib/tk/ttk_selector.rb b/ext/tk/lib/tk/ttk_selector.rb
deleted file mode 100644
index 4589e7fc29..0000000000
--- a/ext/tk/lib/tk/ttk_selector.rb
+++ /dev/null
@@ -1,99 +0,0 @@
-# frozen_string_literal: false
-#
-# ttk_selector
-#
-######################################
-# toplevel classes/modules
-module Tk
- @TOPLEVEL_ALIAS_TABLE[:Ttk] = {
- :TkButton => 'tkextlib/tile/tbutton',
-
- :TkCheckbutton => 'tkextlib/tile/tcheckbutton',
- :TkCheckButton => 'tkextlib/tile/tcheckbutton',
-
- # :TkDialog => 'tkextlib/tile/dialog',
-
- :TkEntry => 'tkextlib/tile/tentry',
-
- :TkCombobox => 'tkextlib/tile/tcombobox',
-
- :TkFrame => 'tkextlib/tile/tframe',
-
- :TkLabel => 'tkextlib/tile/tlabel',
-
- :TkLabelframe => 'tkextlib/tile/tlabelframe',
- :TkLabelFrame => 'tkextlib/tile/tlabelframe',
-
- :TkMenubutton => 'tkextlib/tile/tmenubutton',
- :TkMenuButton => 'tkextlib/tile/tmenubutton',
-
- :TkNotebook => 'tkextlib/tile/tnotebook',
-
- # :TkPaned => 'tkextlib/tile/tpaned',
- :TkPanedwindow => 'tkextlib/tile/tpaned',
- :TkPanedWindow => 'tkextlib/tile/tpaned',
-
- :TkProgressbar => 'tkextlib/tile/tprogressbar',
-
- :TkRadiobutton => 'tkextlib/tile/tradiobutton',
- :TkRadioButton => 'tkextlib/tile/tradiobutton',
-
- :TkScale => 'tkextlib/tile/tscale',
- # :TkProgress => 'tkextlib/tile/tscale',
-
- :TkScrollbar => 'tkextlib/tile/tscrollbar',
- :TkXScrollbar => 'tkextlib/tile/tscrollbar',
- :TkYScrollbar => 'tkextlib/tile/tscrollbar',
-
- :TkSeparator => 'tkextlib/tile/tseparator',
-
- :TkSizeGrip => 'tkextlib/tile/sizegrip',
- :TkSizegrip => 'tkextlib/tile/sizegrip',
-
- # :TkSquare => 'tkextlib/tile/tsquare',
-
- :TkTreeview => 'tkextlib/tile/treeview',
- }
-
- # @TOPLEVEL_ALIAS_TABLE[:Tile] = @TOPLEVEL_ALIAS_TABLE[:Ttk]
- Tk.__create_widget_set__(:Tile, :Ttk)
-
- ############################################
- # depend on the version of Tcl/Tk
- major, minor, type, patchlevel = TclTkLib.get_version
-
- # ttk::spinbox is supported on Tcl/Tk8.6b1 or later
- if ([major,minor,type,patchlevel] <=>
- [8,6,TclTkLib::RELEASE_TYPE::BETA,1]) >= 0
- @TOPLEVEL_ALIAS_TABLE[:Ttk].update(
- :TkSpinbox => 'tkextlib/tile/tspinbox'
- )
- end
-
- ################################################
- # register some Ttk widgets as default
- # (Ttk is a standard library on Tcl/Tk8.5+)
- @TOPLEVEL_ALIAS_TABLE[:Ttk].each{|sym, file|
- #unless Tk::TOPLEVEL_ALIASES.autoload?(sym) || Tk::TOPLEVEL_ALIASES.const_defined?(sym)
- # @TOPLEVEL_ALIAS_OWNER[sym] = :Ttk
- # Tk::TOPLEVEL_ALIASES.autoload(sym, file)
- #end
- Tk.__regist_toplevel_aliases__(:Ttk, file, sym)
- }
-
- ################################################
-
- # @TOPLEVEL_ALIAS_SETUP_PROC[:Tile] =
- # @TOPLEVEL_ALIAS_SETUP_PROC[:Ttk] = proc{|mod|
- # unless Tk.autoload?(:Tile) || Tk.const_defined?(:Tile)
- # Object.autoload :Ttk, 'tkextlib/tile'
- # Tk.autoload :Tile, 'tkextlib/tile'
- # end
- # }
- Tk.__toplevel_alias_setup_proc__(:Ttk, :Tile){|mod|
- unless Tk.autoload?(:Tile) || Tk.const_defined?(:Tile)
- Object.autoload :Ttk, 'tkextlib/tile'
- Tk.autoload :Tile, 'tkextlib/tile'
- end
- }
-end
diff --git a/ext/tk/lib/tk/txtwin_abst.rb b/ext/tk/lib/tk/txtwin_abst.rb
deleted file mode 100644
index 32986d4788..0000000000
--- a/ext/tk/lib/tk/txtwin_abst.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/txtwin_abst.rb : TkTextWin abstract class
-#
-require 'tk'
-
-class TkTextWin<TkWindow
- TkCommandNames = [].freeze
- #def create_self
- # fail RuntimeError, "TkTextWin is an abstract class"
- #end
- #private :create_self
-
- def bbox(index)
- list(tk_send_without_enc('bbox', index))
- end
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
- def get(*index)
- _fromUTF8(tk_send_without_enc('get', *index))
- end
- def insert(index, *args)
- tk_send('insert', index, *args)
- self
- end
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send_without_enc('scan', 'dragto', x, y)
- self
- end
- def see(index)
- tk_send_without_enc('see', index)
- self
- end
-end
diff --git a/ext/tk/lib/tk/validation.rb b/ext/tk/lib/tk/validation.rb
deleted file mode 100644
index c6cbfb280e..0000000000
--- a/ext/tk/lib/tk/validation.rb
+++ /dev/null
@@ -1,398 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/validation.rb - validation support module for entry, spinbox, and so on
-#
-require 'tk'
-
-module Tk
- module ValidateConfigure
- def self.__def_validcmd(scope, klass, keys=nil)
- keys = klass._config_keys unless keys
- keys.each{|key|
- eval("def #{key}(*args, &b)
- __validcmd_call(#{klass.name}, '#{key}', *args, &b)
- end", scope)
- }
- end
-
- def __validcmd_call(klass, key, *args, &b)
- return cget(key) if args.empty? && !b
-
- cmd = (b)? proc(&b) : args.shift
-
- if cmd.kind_of?(klass)
- configure(key, cmd)
- elsif !args.empty?
- configure(key, [cmd, args])
- else
- configure(key, cmd)
- end
- end
-
- def __validation_class_list
- # maybe need to override
- []
- end
-
- def __get_validate_key2class
- k2c = {}
- __validation_class_list.each{|klass|
- klass._config_keys.each{|key|
- k2c[key.to_s] = klass
- }
- }
- k2c
- end
-
- def __conv_vcmd_on_hash_kv(keys)
- key2class = __get_validate_key2class
-
- keys = _symbolkey2str(keys)
- key2class.each{|key, klass|
- if keys[key].kind_of?(Array)
- cmd, *args = keys[key]
- #keys[key] = klass.new(cmd, args.join(' '))
- keys[key] = klass.new(cmd, *args)
- # elsif keys[key].kind_of?(Proc) || keys[key].kind_of?(Method)
- elsif TkComm._callback_entry?(keys[key])
- keys[key] = klass.new(keys[key])
- end
- }
- keys
- end
-
- def create_self(keys)
- super(__conv_vcmd_on_hash_kv(keys))
- end
- private :create_self
-
- def configure(slot, value=TkComm::None)
- if slot.kind_of?(Hash)
- super(__conv_vcmd_on_hash_kv(slot))
- else
- super(__conv_vcmd_on_hash_kv(slot=>value))
- end
- self
- end
-=begin
- def configure(slot, value=TkComm::None)
- key2class = __get_validate_key2class
-
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- key2class.each{|key, klass|
- if slot[key].kind_of?(Array)
- cmd, *args = slot[key]
- slot[key] = klass.new(cmd, args.join(' '))
- elsif slot[key].kind_of?(Proc) || slot[key].kind_of?(Method)
- slot[key] = klass.new(slot[key])
- end
- }
- super(slot)
-
- else
- slot = slot.to_s
- if (klass = key2class[slot])
- if value.kind_of?(Array)
- cmd, *args = value
- value = klass.new(cmd, args.join(' '))
- elsif value.kind_of?(Proc) || value.kind_of?(Method)
- value = klass.new(value)
- end
- end
- super(slot, value)
- end
-
- self
- end
-=end
- end
-
- module ItemValidateConfigure
- def self.__def_validcmd(scope, klass, keys=nil)
- keys = klass._config_keys unless keys
- keys.each{|key|
- eval("def item_#{key}(id, *args, &b)
- __item_validcmd_call(#{klass.name}, '#{key}', id, *args, &b)
- end", scope)
- }
- end
-
- def __item_validcmd_call(tagOrId, klass, key, *args, &b)
- return itemcget(tagid(tagOrId), key) if args.empty? && !b
-
- cmd = (b)? proc(&b) : args.shift
-
- if cmd.kind_of?(klass)
- itemconfigure(tagid(tagOrId), key, cmd)
- elsif !args.empty?
- itemconfigure(tagid(tagOrId), key, [cmd, args])
- else
- itemconfigure(tagid(tagOrId), key, cmd)
- end
- end
-
- def __item_validation_class_list(id)
- # maybe need to override
- []
- end
-
- def __get_item_validate_key2class(id)
- k2c = {}
- __item_validation_class_list(id).each{|klass|
- klass._config_keys.each{|key|
- k2c[key.to_s] = klass
- }
- }
- end
-
- def __conv_item_vcmd_on_hash_kv(keys)
- key2class = __get_item_validate_key2class(tagid(tagOrId))
-
- keys = _symbolkey2str(keys)
- key2class.each{|key, klass|
- if keys[key].kind_of?(Array)
- cmd, *args = keys[key]
- #keys[key] = klass.new(cmd, args.join(' '))
- keys[key] = klass.new(cmd, *args)
- # elsif keys[key].kind_of?(Proc) || keys[key].kind_of?(Method)
- elsif TkComm._callback_entry?(keys[key])
- keys[key] = klass.new(keys[key])
- end
- }
- keys
- end
-
- def itemconfigure(tagOrId, slot, value=TkComm::None)
- if slot.kind_of?(Hash)
- super(__conv_item_vcmd_on_hash_kv(slot))
- else
- super(__conv_item_vcmd_on_hash_kv(slot=>value))
- end
- self
- end
-=begin
- def itemconfigure(tagOrId, slot, value=TkComm::None)
- key2class = __get_item_validate_key2class(tagid(tagOrId))
-
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- key2class.each{|key, klass|
- if slot[key].kind_of?(Array)
- cmd, *args = slot[key]
- slot[key] = klass.new(cmd, args.join(' '))
- elsif slot[key].kind_of?(Proc) || slot[key].kind_of?(Method)
- slot[key] = klass.new(slot[key])
- end
- }
- super(slot)
-
- else
- slot = slot.to_s
- if (klass = key2class[slot])
- if value.kind_of?(Array)
- cmd, *args = value
- value = klass.new(cmd, args.join(' '))
- elsif value.kind_of?(Proc) || value.kind_of?(Method)
- value = klass.new(value)
- end
- end
- super(slot, value)
- end
-
- self
- end
-=end
- end
-end
-
-class TkValidateCommand
- include TkComm
- extend TkComm
-
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?d, ?n, :action ],
- [ ?i, ?x, :index ],
- [ ?s, ?e, :current ],
- [ ?v, ?s, :type ],
- [ ?P, ?e, :value ],
- [ ?S, ?e, :string ],
- [ ?V, ?s, :triggered ],
- [ ?W, ?w, :widget ],
- nil
- ]
-
- PROC_TBL = [
- [ ?n, TkComm.method(:number) ],
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
-
- [ ?e, proc{|val|
- #enc = Tk.encoding
- enc = ((Tk.encoding)? Tk.encoding : Tk.encoding_system)
- if enc
- Tk.fromUTF8(TkComm::string(val), enc)
- else
- TkComm::string(val)
- end
- }
- ],
-
- [ ?x, proc{|val|
- idx = TkComm::number(val)
- if idx < 0
- nil
- else
- idx
- end
- }
- ],
-
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- #
- # NOTE: The order of parameters which passed to callback procedure is
- # <extra_arg>, <extra_arg>, ... , <subst_arg>, <subst_arg>, ...
- #
-
- #def self._get_extra_args_tbl
- # # return an array of convert procs
- # []
- #end
-
- def self.ret_val(val)
- (val)? '1': '0'
- end
- end
-
- ###############################################
-
- def self._config_keys
- # array of config-option key (string or symbol)
- ['vcmd', 'validatecommand', 'invcmd', 'invalidcommand']
- end
-
- def _initialize_for_cb_class(klass, cmd = Proc.new, *args)
- extra_args_tbl = klass._get_extra_args_tbl
-
- if args.compact.size > 0
- args.map!{|arg| klass._sym2subst(arg)}
- args = args.join(' ')
- keys = klass._get_subst_key(args)
- if cmd.kind_of?(String)
- id = cmd
- elsif cmd.kind_of?(TkCallbackEntry)
- @id = install_cmd(cmd)
- else
- @id = install_cmd(proc{|*arg|
- ex_args = []
- extra_args_tbl.reverse_each{|conv| ex_args << conv.call(arg.pop)}
- klass.ret_val(cmd.call(
- *(ex_args.concat(klass.scan_args(keys, arg)))
- ))
- }) + ' ' + args
- end
- else
- keys, args = klass._get_all_subst_keys
- if cmd.kind_of?(String)
- id = cmd
- elsif cmd.kind_of?(TkCallbackEntry)
- @id = install_cmd(cmd)
- else
- @id = install_cmd(proc{|*arg|
- ex_args = []
- extra_args_tbl.reverse_each{|conv| ex_args << conv.call(arg.pop)}
- klass.ret_val(cmd.call(
- *(ex_args << klass.new(*klass.scan_args(keys, arg)))
- ))
- }) + ' ' + args
- end
- end
- end
-
- def initialize(cmd = Proc.new, *args)
- _initialize_for_cb_class(self.class::ValidateArgs, cmd, *args)
- end
-
- def to_eval
- @id
- end
-end
-
-module TkValidation
- include Tk::ValidateConfigure
-
- class ValidateCmd < TkValidateCommand
- module Action
- Insert = 1
- Delete = 0
- Others = -1
- Focus = -1
- Forced = -1
- Textvariable = -1
- TextVariable = -1
- end
- end
-
- #####################################
-
- def __validation_class_list
- super() << ValidateCmd
- end
-
- Tk::ValidateConfigure.__def_validcmd(binding, ValidateCmd)
-
-=begin
- def validatecommand(cmd = Proc.new, args = nil)
- if cmd.kind_of?(ValidateCmd)
- configure('validatecommand', cmd)
- elsif args
- configure('validatecommand', [cmd, args])
- else
- configure('validatecommand', cmd)
- end
- end
-=end
-# def validatecommand(*args, &b)
-# __validcmd_call(ValidateCmd, 'validatecommand', *args, &b)
-# end
-# alias vcmd validatecommand
-
-=begin
- def invalidcommand(cmd = Proc.new, args = nil)
- if cmd.kind_of?(ValidateCmd)
- configure('invalidcommand', cmd)
- elsif args
- configure('invalidcommand', [cmd, args])
- else
- configure('invalidcommand', cmd)
- end
- end
-=end
-# def invalidcommand(*args, &b)
-# __validcmd_call(ValidateCmd, 'invalidcommand', *args, &b)
-# end
-# alias invcmd invalidcommand
-end
diff --git a/ext/tk/lib/tk/variable.rb b/ext/tk/lib/tk/variable.rb
deleted file mode 100644
index 8ac0fc6ace..0000000000
--- a/ext/tk/lib/tk/variable.rb
+++ /dev/null
@@ -1,1797 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/variable.rb : treat Tk variable object
-#
-require 'tk'
-
-class TkVariable
- include Tk
- extend TkCore
-
- include Comparable
-
- #TkCommandNames = ['tkwait'.freeze].freeze
- TkCommandNames = ['vwait'.freeze].freeze
-
- #TkVar_CB_TBL = {}
- #TkVar_ID_TBL = {}
- TkVar_CB_TBL = TkCore::INTERP.create_table
- TkVar_ID_TBL = TkCore::INTERP.create_table
- (Tk_VARIABLE_ID = ["v".freeze, TkUtil.untrust("00000")]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
- TkCore::INTERP.init_ip_env{
- TkVar_CB_TBL.mutex.synchronize{ TkVar_CB_TBL.clear }
- TkVar_ID_TBL.mutex.synchronize{ TkVar_ID_TBL.clear }
- }
-
- major, minor, type, patchlevel = TclTkLib.get_version
- USE_OLD_TRACE_OPTION_STYLE = (major < 8) || (major == 8 && minor < 4)
-
- #TkCore::INTERP.add_tk_procs('rb_var', 'args',
- # "ruby [format \"TkVariable.callback %%Q!%s!\" $args]")
- TkCore::INTERP.add_tk_procs('rb_var', 'args', <<-'EOL')
- if {[set st [catch {eval {ruby_cmd TkVariable callback} $args} ret]] != 0} {
- set idx [string first "\n\n" $ret]
- if {$idx > 0} {
- global errorInfo
- set tcl_backtrace $errorInfo
- set errorInfo [string range $ret [expr $idx + 2] \
- [string length $ret]]
- append errorInfo "\n" $tcl_backtrace
- bgerror [string range $ret 0 [expr $idx - 1]]
- } else {
- bgerror $ret
- }
- return ""
- #return -code $st $ret
- } else {
- return $ret
- }
- EOL
-
- #def TkVariable.callback(args)
- def TkVariable.callback(id, name1, name2, op)
- #name1,name2,op = tk_split_list(args)
- #name1,name2,op = tk_split_simplelist(args)
- if cb_obj = TkVar_CB_TBL[id]
- #_get_eval_string(TkVar_CB_TBL[name1].trace_callback(name2,op))
- begin
- _get_eval_string(cb_obj.trace_callback(name2, op))
- rescue SystemExit
- exit(0)
- rescue Interrupt
- exit!(1)
- rescue Exception => e
- begin
- msg = _toUTF8(e.class.inspect) + ': ' +
- _toUTF8(e.message) + "\n" +
- "\n---< backtrace of Ruby side >-----\n" +
- _toUTF8(e.backtrace.join("\n")) +
- "\n---< backtrace of Tk side >-------"
- if TkCore::WITH_ENCODING
- msg.force_encoding('utf-8')
- else
- msg.instance_variable_set(:@encoding, 'utf-8')
- end
- rescue Exception
- msg = e.class.inspect + ': ' + e.message + "\n" +
- "\n---< backtrace of Ruby side >-----\n" +
- e.backtrace.join("\n") +
- "\n---< backtrace of Tk side >-------"
- end
- fail(e, msg)
- end
-=begin
- begin
- raise 'check backtrace'
- rescue
- # ignore backtrace before 'callback'
- pos = -($!.backtrace.size)
- end
- begin
- _get_eval_string(TkVar_CB_TBL[name1].trace_callback(name2,op))
- rescue
- trace = $!.backtrace
- raise $!, "\n#{trace[0]}: #{$!.message} (#{$!.class})\n" +
- "\tfrom #{trace[1..pos].join("\n\tfrom ")}"
- end
-=end
- else
- ''
- end
- end
-
- def self.new_hash(val = {})
- if val.kind_of?(Hash)
- self.new(val)
- else
- fail ArgumentError, 'Hash is expected'
- end
- end
-
- #
- # default_value is available only when the variable is an assoc array.
- #
- def default_value(val=nil, &b)
- if b
- @def_default = :proc
- @default_val = proc(&b)
- else
- @def_default = :val
- @default_val = val
- end
- self
- end
- def set_default_value(val)
- @def_default = :val
- @default_val = val
- self
- end
- alias default_value= set_default_value
- def default_proc(cmd = Proc.new)
- @def_default = :proc
- @default_val = cmd
- self
- end
-
- def undef_default
- @default_val = nil
- @def_default = false
- self
- end
-
- def default_value_type
- @type
- end
- def default_element_value_type(idxs)
- if idxs.kind_of?(Array)
- index = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',')
- else
- index = _get_eval_string(idxs, true)
- end
- @element_type[index]
- end
-
- def _set_default_value_type_core(type, idxs)
- if type.kind_of?(Class)
- if type == NilClass
- type = nil
- elsif type == Numeric
- type = :numeric
- elsif type == TrueClass || type == FalseClass
- type = :bool
- elsif type == String
- type = :string
- elsif type == Symbol
- type = :symbol
- elsif type == Array
- type = :list
- elsif type <= TkVariable
- type = :variable
- elsif type <= TkWindow
- type = :window
- elsif TkComm._callback_entry_class?(type)
- type = :procedure
- else
- type = nil
- end
- else
- case(type)
- when nil
- type = nil
- when :numeric, 'numeric'
- type = :numeric
- when true, false, :bool, 'bool'
- type = :bool
- when :string, 'string'
- type = :string
- when :symbol, 'symbol'
- type = :symbol
- when :list, 'list'
- type = :list
- when :numlist, 'numlist'
- type = :numlist
- when :variable, 'variable'
- type = :variable
- when :window, 'window'
- type = :window
- when :procedure, 'procedure'
- type = :procedure
- else
- return _set_default_value_type_core(type.class, idxs)
- end
- end
- if idxs
- if idxs.kind_of?(Array)
- index = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',')
- else
- index = _get_eval_string(idxs, true)
- end
- @element_type[index] = type
- else
- @type = type
- end
- type
- end
- private :_set_default_value_type_core
-
- def set_default_value_type(type)
- _set_default_value_type_core(type, nil)
- self
- end
- alias default_value_type= set_default_value_type
-
- def set_default_element_value_type(idxs, type)
- _set_default_value_type_core(type, idxs)
- self
- end
-
- def _to_default_type(val, idxs = nil)
- if idxs
- if idxs.kind_of?(Array)
- index = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',')
- else
- index = _get_eval_string(idxs, true)
- end
- type = @element_type[index]
- else
- type = @type
- end
- return val unless type
- if val.kind_of?(Hash)
- val.keys.each{|k| val[k] = _to_default_type(val[k], idxs) }
- val
- else
- begin
- case(type)
- when :numeric
- number(val)
- when :bool
- TkComm.bool(val)
- when :string
- val
- when :symbol
- val.intern
- when :list
- tk_split_simplelist(val)
- when :numlist
- tk_split_simplelist(val).collect!{|v| number(v)}
- when :variable
- TkVarAccess.new(val)
- when :window
- TkComm.window(val)
- when :procedure
- TkComm.procedure(val)
- else
- val
- end
- rescue
- val
- end
- end
- end
- private :_to_default_type
-
- def _to_default_element_type(idxs, val)
- _to_default_type(val, idxs)
- end
- private :_to_default_element_type
-
- def initialize(val="", type=nil)
- # @id = Tk_VARIABLE_ID.join('')
- begin
- Tk_VARIABLE_ID.mutex.synchronize{
- @id = Tk_VARIABLE_ID.join(TkCore::INTERP._ip_id_)
- Tk_VARIABLE_ID[1].succ!
- }
- end until INTERP._invoke_without_enc('info', 'globals', @id).empty?
-
- TkVar_ID_TBL.mutex.synchronize{
- TkVar_ID_TBL[@id] = self
- }
-
- @var = @id
- @elem = nil
-
- @def_default = false
- @default_val = nil
-
- @trace_var = nil
- @trace_elem = nil
- @trace_opts = nil
-
- @type = nil
- var = self
- @element_type = Hash.new{|k,v| var.default_value_type }
-
- self.default_value_type = type
-
- # teach Tk-ip that @id is global var
- INTERP._invoke_without_enc('global', @id)
- #INTERP._invoke('global', @id)
-
- # create and init
- if val.kind_of?(Hash)
- # assoc-array variable
- self[''] = 0
- self.clear
- end
- self.value = val
-
-=begin
- if val == []
- # INTERP._eval(format('global %s; set %s(0) 0; unset %s(0)',
- # @id, @id, @id))
- elsif val.kind_of?(Array)
- a = []
- # val.each_with_index{|e,i| a.push(i); a.push(array2tk_list(e))}
- # s = '"' + a.join(" ").gsub(/[\[\]$"]/, '\\\\\&') + '"'
- val.each_with_index{|e,i| a.push(i); a.push(e)}
- #s = '"' + array2tk_list(a).gsub(/[\[\]$"]/, '\\\\\&') + '"'
- s = '"' + array2tk_list(a).gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
- INTERP._eval(format('global %s; array set %s %s', @id, @id, s))
- elsif val.kind_of?(Hash)
- #s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
- # .gsub(/[\[\]$"]/, '\\\\\&') + '"'
- s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
- .gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
- INTERP._eval(format('global %s; array set %s %s', @id, @id, s))
- else
- #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
- s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
- INTERP._eval(format('global %s; set %s %s', @id, @id, s))
- end
-=end
-=begin
- if val.kind_of?(Hash)
- #s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
- # .gsub(/[\[\]$"]/, '\\\\\&') + '"'
- s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
- .gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
- INTERP._eval(Kernel.format('global %s; array set %s %s', @id, @id, s))
- else
- #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
- s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
- INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s))
- end
-=end
- end
-
- def wait(on_thread = false, check_root = false)
- on_thread &= (Thread.list.size != 1)
- if on_thread
- if check_root
- INTERP._thread_tkwait('variable', @id)
- else
- INTERP._thread_vwait(@id)
- end
- else
- if check_root
- INTERP._invoke_without_enc('tkwait', 'variable', @id)
- else
- INTERP._invoke_without_enc('vwait', @id)
- end
- end
- end
- def eventloop_wait(check_root = false)
- wait(false, check_root)
- end
- def thread_wait(check_root = false)
- wait(true, check_root)
- end
- def tkwait(on_thread = true)
- wait(on_thread, true)
- end
- def eventloop_tkwait
- wait(false, true)
- end
- def thread_tkwait
- wait(true, true)
- end
-
- def id
- @id
- end
-
- def ref(*idxs)
- # "#{@id}(#{idxs.collect{|idx| _get_eval_string(idx)}.join(',')})"
- TkVarAccess.new("#{@id}(#{idxs.collect{|idx| _get_eval_string(idx)}.join(',')})")
- end
-
- def is_hash?
- #ITNERP._eval("global #{@id}; array exist #{@id}") == '1'
- INTERP._invoke_without_enc('global', @id)
- # INTERP._invoke_without_enc('array', 'exist', @id) == '1'
- TkComm.bool(INTERP._invoke_without_enc('array', 'exist', @id))
- end
-
- def is_scalar?
- ! is_hash?
- end
-
- def exist?(*elems)
- INTERP._invoke_without_enc('global', @id)
- if elems.empty?
- TkComm.bool(tk_call('info', 'exist', @id))
- else
- # array
- index = elems.collect{|idx| _get_eval_string(idx, true)}.join(',')
- TkComm.bool(tk_call('info', 'exist', "#{@id}")) &&
- TkComm.bool(tk_call('info', 'exist', "#{@id}(#{index})"))
- end
- end
-
- def keys
- if (is_scalar?)
- fail RuntimeError, 'cannot get keys from a scalar variable'
- end
- #tk_split_simplelist(INTERP._eval("global #{@id}; array get #{@id}"))
- INTERP._invoke_without_enc('global', @id)
- #tk_split_simplelist(INTERP._fromUTF8(INTERP._invoke_without_enc('array', 'names', @id)))
- tk_split_simplelist(INTERP._invoke_without_enc('array', 'names', @id),
- false, true)
- end
-
- def size
- INTERP._invoke_without_enc('global', @id)
- TkComm.number(INTERP._invoke_without_enc('array', 'size', @id))
- end
-
- def clear
- if (is_scalar?)
- fail RuntimeError, 'cannot clear a scalar variable'
- end
- keys.each{|k| unset(k)}
- self
- end
-
- def update(hash)
- if (is_scalar?)
- fail RuntimeError, 'cannot update a scalar variable'
- end
- hash.each{|k,v| self[k] = v}
- self
- end
-
-unless const_defined?(:USE_TCLs_SET_VARIABLE_FUNCTIONS)
- USE_TCLs_SET_VARIABLE_FUNCTIONS = true
-end
-
-if USE_TCLs_SET_VARIABLE_FUNCTIONS
- ###########################################################################
- # use Tcl function version of set tkvariable
- ###########################################################################
-
- def _value
- #if INTERP._eval("global #{@id}; array exist #{@id}") == '1'
- INTERP._invoke_without_enc('global', @id)
- # if INTERP._invoke('array', 'exist', @id) == '1'
- if TkComm.bool(INTERP._invoke('array', 'exist', @id))
- #Hash[*tk_split_simplelist(INTERP._eval("global #{@id}; array get #{@id}"))]
- Hash[*tk_split_simplelist(INTERP._invoke('array', 'get', @id))]
- else
- _fromUTF8(INTERP._get_global_var(@id))
- end
- end
-
- def value=(val)
- val = val._value if !@type && @type != :variable && val.kind_of?(TkVariable)
- if val.kind_of?(Hash)
- self.clear
- val.each{|k, v|
- #INTERP._set_global_var2(@id, _toUTF8(_get_eval_string(k)),
- # _toUTF8(_get_eval_string(v)))
- INTERP._set_global_var2(@id, _get_eval_string(k, true),
- _get_eval_string(v, true))
- }
- self.value
-# elsif val.kind_of?(Array)
-=begin
- INTERP._set_global_var(@id, '')
- val.each{|v|
- #INTERP._set_variable(@id, _toUTF8(_get_eval_string(v)),
- INTERP._set_variable(@id, _get_eval_string(v, true),
- TclTkLib::VarAccessFlag::GLOBAL_ONLY |
- TclTkLib::VarAccessFlag::LEAVE_ERR_MSG |
- TclTkLib::VarAccessFlag::APPEND_VALUE |
- TclTkLib::VarAccessFlag::LIST_ELEMENT)
- }
- self.value
-=end
-# _fromUTF8(INTERP._set_global_var(@id, array2tk_list(val, true)))
- else
- #_fromUTF8(INTERP._set_global_var(@id, _toUTF8(_get_eval_string(val))))
- _fromUTF8(INTERP._set_global_var(@id, _get_eval_string(val, true)))
- end
- end
-
- def _element_value(*idxs)
- index = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',')
- begin
- _fromUTF8(INTERP._get_global_var2(@id, index))
- rescue => e
- case @def_default
- when :proc
- @default_val.call(self, *idxs)
- when :val
- @default_val
- else
- fail e
- end
- end
- #_fromUTF8(INTERP._get_global_var2(@id, index))
- #_fromUTF8(INTERP._get_global_var2(@id, _toUTF8(_get_eval_string(index))))
- #_fromUTF8(INTERP._get_global_var2(@id, _get_eval_string(index, true)))
- end
-
- def []=(*args)
- val = args.pop
- type = default_element_value_type(args)
- val = val._value if !type && type != :variable && val.kind_of?(TkVariable)
- index = args.collect{|idx| _get_eval_string(idx, true)}.join(',')
- _fromUTF8(INTERP._set_global_var2(@id, index, _get_eval_string(val, true)))
- #_fromUTF8(INTERP._set_global_var2(@id, _toUTF8(_get_eval_string(index)),
- # _toUTF8(_get_eval_string(val))))
- #_fromUTF8(INTERP._set_global_var2(@id, _get_eval_string(index, true),
- # _get_eval_string(val, true)))
- end
-
- def unset(*elems)
- if elems.empty?
- INTERP._unset_global_var(@id)
- else
- index = elems.collect{|idx| _get_eval_string(idx, true)}.join(',')
- INTERP._unset_global_var2(@id, index)
- end
- end
- alias remove unset
-
-else
- ###########################################################################
- # use Ruby script version of set tkvariable (traditional methods)
- ###########################################################################
-
- def _value
- begin
- INTERP._eval(Kernel.format('global %s; set %s', @id, @id))
- #INTERP._eval(Kernel.format('set %s', @id))
- #INTERP._invoke_without_enc('set', @id)
- rescue
- if INTERP._eval(Kernel.format('global %s; array exists %s',
- @id, @id)) != "1"
- #if INTERP._eval(Kernel.format('array exists %s', @id)) != "1"
- #if INTERP._invoke_without_enc('array', 'exists', @id) != "1"
- fail
- else
- Hash[*tk_split_simplelist(INTERP._eval(Kernel.format('global %s; array get %s', @id, @id)))]
- #Hash[*tk_split_simplelist(_fromUTF8(INTERP._invoke_without_enc('array', 'get', @id)))]
- end
- end
- end
-
- def value=(val)
- val = val._value if !@type && @type != :variable && val.kind_of?(TkVariable)
- begin
- #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
- s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
- INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s))
- #INTERP._eval(Kernel.format('set %s %s', @id, s))
- #_fromUTF8(INTERP._invoke_without_enc('set', @id, _toUTF8(s)))
- rescue
- if INTERP._eval(Kernel.format('global %s; array exists %s',
- @id, @id)) != "1"
- #if INTERP._eval(Kernel.format('array exists %s', @id)) != "1"
- #if INTERP._invoke_without_enc('array', 'exists', @id) != "1"
- fail
- else
- if val == []
- INTERP._eval(Kernel.format('global %s; unset %s; set %s(0) 0; unset %s(0)', @id, @id, @id, @id))
- #INTERP._eval(Kernel.format('unset %s; set %s(0) 0; unset %s(0)',
- # @id, @id, @id))
- #INTERP._invoke_without_enc('unset', @id)
- #INTERP._invoke_without_enc('set', @id+'(0)', 0)
- #INTERP._invoke_without_enc('unset', @id+'(0)')
- elsif val.kind_of?(Array)
- a = []
- val.each_with_index{|e,i| a.push(i); a.push(array2tk_list(e, true))}
- #s = '"' + a.join(" ").gsub(/[\[\]$"]/, '\\\\\&') + '"'
- s = '"' + a.join(" ").gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
- INTERP._eval(Kernel.format('global %s; unset %s; array set %s %s',
- @id, @id, @id, s))
- #INTERP._eval(Kernel.format('unset %s; array set %s %s',
- # @id, @id, s))
- #INTERP._invoke_without_enc('unset', @id)
- #_fromUTF8(INTERP._invoke_without_enc('array','set', @id, _toUTF8(s)))
- elsif val.kind_of?(Hash)
- #s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
- # .gsub(/[\[\]$"]/, '\\\\\&') + '"'
- s = '"' + val.to_a.collect{|e| array2tk_list(e, true)}.join(" ")\
- .gsub(/[\[\]$\\"]/, '\\\\\&') + '"'
- INTERP._eval(Kernel.format('global %s; unset %s; array set %s %s',
- @id, @id, @id, s))
- #INTERP._eval(Kernel.format('unset %s; array set %s %s',
- # @id, @id, s))
- #INTERP._invoke_without_enc('unset', @id)
- #_fromUTF8(INTERP._invoke_without_enc('array','set', @id, _toUTF8(s)))
- else
- fail
- end
- end
- end
- end
-
- def _element_value(*idxs)
- index = idxs.collect{|idx| _get_eval_string(idx)}.join(',')
- begin
- INTERP._eval(Kernel.format('global %s; set %s(%s)', @id, @id, index))
- rescue => e
- case @def_default
- when :proc
- @default_val.call(self, *idxs)
- when :val
- @default_val
- else
- fail e
- end
- end
- #INTERP._eval(Kernel.format('global %s; set %s(%s)', @id, @id, index))
- #INTERP._eval(Kernel.format('global %s; set %s(%s)',
- # @id, @id, _get_eval_string(index)))
- #INTERP._eval(Kernel.format('set %s(%s)', @id, _get_eval_string(index)))
- #INTERP._eval('set ' + @id + '(' + _get_eval_string(index) + ')')
- end
-
- def []=(*args)
- val = args.pop
- type = default_element_value_type(args)
- val = val._value if !type && type != :variable && val.kind_of?(TkVariable)
- index = args.collect{|idx| _get_eval_string(idx)}.join(',')
- INTERP._eval(Kernel.format('global %s; set %s(%s) %s', @id, @id,
- index, _get_eval_string(val)))
- #INTERP._eval(Kernel.format('global %s; set %s(%s) %s', @id, @id,
- # _get_eval_string(index), _get_eval_string(val)))
- #INTERP._eval(Kernel.format('set %s(%s) %s', @id,
- # _get_eval_string(index), _get_eval_string(val)))
- #INTERP._eval('set ' + @id + '(' + _get_eval_string(index) + ') ' +
- # _get_eval_string(val))
- end
-
- def unset(*elems)
- if elems.empty?
- INTERP._eval(Kernel.format('global %s; unset %s', @id, @id))
- #INTERP._eval(Kernel.format('unset %s', @id))
- #INTERP._eval('unset ' + @id)
- else
- index = elems.collect{|idx| _get_eval_string(idx, true)}.join(',')
- INTERP._eval(Kernel.format('global %s; unset %s(%s)', @id, @id, index))
- #INTERP._eval(Kernel.format('global %s; unset %s(%s)',
- # @id, @id, _get_eval_string(elem)))
- #INTERP._eval(Kernel.format('unset %s(%s)', @id, tk_tcl2ruby(elem)))
- #INTERP._eval('unset ' + @id + '(' + _get_eval_string(elem) + ')')
- end
- end
- alias remove unset
-
-end
-
- protected :_value, :_element_value
-
- def value
- _to_default_type(_value)
- end
-
- def [](*idxs)
- _to_default_element_type(idxs, _element_value(*idxs))
- end
-
- def set_value(val)
- self.value = val
- self
- end
-
- def to_hash
- hash = {}
- self.keys.each{|k|
- hash[k] = self[k]
- }
- hash
- end
-
- def set_element_value(idxs, val)
- if idxs.kind_of?(Array)
- self[*idxs]=val
- else
- self[idxs]=val
- end
- self
- end
-
- def set_value_type(val)
- self.default_value_type = val.class
- self.value = val
- self
- end
-
- alias value_type= set_value_type
-
- def set_element_value_type(idxs, val)
- self.set_default_element_value_type(idxs, val.class)
- if idxs.kind_of?(Array)
- self[*idxs]=val
- else
- self[idxs]=val
- end
- self
- end
-
- def numeric
- number(_value)
- end
- def numeric_element(*idxs)
- number(_element_value(*idxs))
- end
- def set_numeric(val)
- case val
- when Numeric
- self.value=(val)
- when TkVariable
- self.value=(val.numeric)
- else
- raise ArgumentError, "Numeric is expected"
- end
- self
- end
- alias numeric= set_numeric
- def set_numeric_element(idxs, val)
- case val
- when Numeric
- val
- when TkVariable
- val = val.numeric
- else
- raise ArgumentError, "Numeric is expected"
- end
- if idxs.kind_of?(Array)
- self[*idxs]=val
- else
- self[idxs]=val
- end
- self
- end
- def set_numeric_type(val)
- @type = :numeric
- self.numeric=(val)
- self
- end
- alias numeric_type= set_numeric_type
- def set_numeric_element_type(idxs, val)
- self.set_default_element_value_type(idxs, :numeric)
- self.set_numeric_element(idxs, val)
- end
-
- def bool
- TkComm.bool(_value)
-=begin
- # see Tcl_GetBoolean man-page
- case _value.downcase
- when '0', 'false', 'no', 'off'
- false
- else
- true
- end
-=end
- end
- def bool_element(*idxs)
- TkComm.bool(_element_value(*idxs))
- end
- def set_bool(val)
- if ! val
- self.value = '0'
- else
- case val.to_s.downcase
- when 'false', '0', 'no', 'off'
- self.value = '0'
- else
- self.value = '1'
- end
- end
- self
- end
- alias bool= set_bool
- def set_bool_element(idxs, val)
- if ! val
- val = '0'
- else
- case val.to_s.downcase
- when 'false', '0', 'no', 'off'
- val = '0'
- else
- val = '1'
- end
- end
- if idxs.kind_of?(Array)
- self[*idxs]=val
- else
- self[idxs]=val
- end
- self
- end
- def set_bool_type(val)
- @type = :bool
- self.bool=(val)
- self
- end
- alias bool_type= set_bool_type
- def set_bool_element_type(idxs, val)
- self.set_default_element_value_type(idxs, :bool)
- self.set_bool_element(idxs, val)
- end
-
- def variable
- # keeps a Tcl's variable name
- TkVarAccess.new(self._value)
- end
- def variable_element(*idxs)
- TkVarAccess.new(_element_value(*idxs))
- end
- def set_variable(var)
- var = var.id if var.kind_of?(TkVariable)
- self.value = var
- self
- end
- alias variable= set_variable
- def set_variable_element(idxs, var)
- var = var.id if var.kind_of?(TkVariable)
- if idxs.kind_of?(Array)
- self[*idxs]=var
- else
- self[idxs]=var
- end
- self
- end
- def set_variable_type(var)
- @type = :variable
- var = var.id if var.kind_of?(TkVariable)
- self.value = var
- self
- end
- alias variable_type= set_variable_type
- def set_variable_element_type(idxs, var)
- self.set_default_element_value_type(idxs, :variable)
- self.set_variable_element(idxs, var)
- end
-
- def window
- TkComm.window(self._value)
- end
- def window_element(*idxs)
- TkComm.window(_element_value(*idxs))
- end
- def set_window(win)
- win = win._value if win.kind_of?(TkVariable)
- self.value = win
- self
- end
- alias window= set_window
- def set_window_element(idxs, win)
- win = win._value if win.kind_of?(TkVariable)
- if idxs.kind_of?(Array)
- self[*idxs]=win
- else
- self[idxs]=win
- end
- self
- end
- def set_window_type(win)
- @type = :window
- self.window=(win)
- self
- end
- alias window_type= set_window_type
- def set_window_element_type(idxs, win)
- self.set_default_element_value_type(idxs, :window)
- self.set_window_element(idxs, win)
- end
-
- def procedure
- TkComm.procedure(self._value)
- end
- def procedure_element(*idxs)
- TkComm.procedure(_element_value(*idxs))
- end
- def set_procedure(cmd)
- self.value = cmd
- self
- end
- alias procedure= set_procedure
- def set_procedure_element(idxs, cmd)
- cmd = cmd._value if cmd.kind_of?(TkVariable)
- if idxs.kind_of?(Array)
- self[*idxs]=cmd
- else
- self[idxs]=cmd
- end
- self
- end
- def set_procedure_type(cmd)
- @type = :procedure
- self.procedure=(cmd)
- self
- end
- alias procedure_type= set_procedure_type
- def set_procedure_element_type(idxs, cmd)
- self.set_default_element_value_type(idxs, :procedure)
- self.set_proceure_element(idxs, cmd)
- end
-
- def to_proc
- cmd = self.procedure
- if cmd.respond_to?(:call)
- cmd
- else
- # cmd is a String
- cmd.to_sym.to_proc
- end
- end
-
- def to_i
- number(_value).to_i
- end
- alias to_int to_i
- def element_to_i(*idxs)
- number(_element_value(*idxs)).to_i
- end
-
- def to_f
- number(_value).to_f
- end
- def element_to_f(*idxs)
- number(_element_value(*idxs)).to_f
- end
-
- def to_s
- #string(value).to_s
- _value
- end
- alias string to_s
- alias to_str to_s
- def element_to_s(*idxs)
- _element_value(*idxs)
- end
- def string_element(*idxs)
- _element_value(*idxs)
- end
- def set_string(val)
- val = val._value if val.kind_of?(TkVariable)
- self.value=val
- self
- end
- alias string= set_string
- def set_string_element(idxs, val)
- val = val._value if val.kind_of?(TkVariable)
- if idxs.kind_of?(Array)
- self[*idxs]=val
- else
- self[idxs]=val
- end
- self
- end
- def set_string_type(val)
- @type = :string
- self.string=(val)
- self
- end
- alias string_type= set_string_type
- def set_string_element_type(idxs, val)
- self.set_default_element_value_type(idxs, :string)
- self.set_string_element(idxs, val)
- end
-
- def to_sym
- _value.intern
- end
- alias symbol to_sym
- def element_to_sym(*idxs)
- _element_value(*idxs).intern
- end
- alias symbol_element element_to_sym
- def set_symbol(val)
- val = val._value if val.kind_of?(TkVariable)
- self.value=val
- self
- end
- alias symbol= set_symbol
- def set_symbol_element(idxs, val)
- val = val._value if val.kind_of?(TkVariable)
- if idxs.kind_of?(Array)
- self[*idxs]=val
- else
- self[idxs]=val
- end
- self
- end
- def set_symbol_type(val)
- @type = :symbol
- self.value=(val)
- self
- end
- alias symbol_type= set_symbol_type
- def set_symbol_element_type(idxs, val)
- self.set_default_element_value_type(idxs, :symbol)
- self.set_symbol_element(idxs, val)
- end
-
- def list
- #tk_split_list(value)
- tk_split_simplelist(_value)
- end
- alias to_a list
- alias to_ary list
- def list_element(*idxs)
- tk_split_simplelist(_element_value(*idxs))
- end
- alias element_to_a list_element
-
- def numlist
- list.collect!{|val| number(val)}
- end
- def numlist_element(*idxs)
- list_element(*idxs).collect!{|val| number(val)}
- end
-
- def set_list(val)
- case val
- when Array
- self.value=(val)
- when TkVariable
- self.value=(val.list)
- else
- raise ArgumentError, "Array is expected"
- end
- self
- end
- alias list= set_list
-
- alias set_numlist set_list
- alias numlist= set_numlist
-
- def set_list_element(idxs, val)
- case val
- when Array
- val
- when TkVariable
- val = val.list
- else
- raise ArgumentError, "Array is expected"
- end
- if idxs.kind_of?(Array)
- self[*idxs]=val
- else
- self[idxs]=val
- end
- self
- end
- alias set_numlist_element set_list_element
-
- def set_list_type(val)
- @type = :list
- self.list=(val)
- self
- end
- alias list_type= set_list_type
- def set_list_element_type(idxs, val)
- self.set_default_element_value_type(idxs, :list)
- self.set_list_element(idxs, val)
- end
- def set_numlist_type(val)
- @type = :numlist
- self.numlist=(val)
- self
- end
- alias numlist_type= set_numlist_type
- def set_numlist_element_type(idxs, val)
- self.set_default_element_value_type(idxs, :numlist)
- self.set_numlist_element(idxs, val)
- end
-
- def lappend(*elems)
- tk_call('lappend', @id, *elems)
- self
- end
- def element_lappend(idxs, *elems)
- if idxs.kind_of?(Array)
- idxs = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',')
- end
- tk_call('lappend', "#{@id}(#{idxs})", *elems)
- self
- end
-
- def lindex(idx)
- tk_call('lindex', self._value, idx)
- end
- alias lget lindex
- def element_lindex(elem_idxs, idx)
- if elem_idxs.kind_of?(Array)
- val = _element_value(*elem_idxs)
- else
- val = _element_value(elem_idxs)
- end
- tk_call('lindex', val, idx)
- end
- alias element_lget element_lindex
-
- def lget_i(idx)
- number(lget(idx)).to_i
- end
- def element_lget_i(elem_idxs, idx)
- number(element_lget(elem_idxs, idx)).to_i
- end
-
- def lget_f(idx)
- number(lget(idx)).to_f
- end
- def element_lget_f(elem_idxs, idx)
- number(element_lget(elem_idxs, idx)).to_f
- end
-
- def lset(idx, val)
- tk_call('lset', @id, idx, val)
- self
- end
- def element_lset(elem_idxs, idx, val)
- if elem_idxs.kind_of?(Array)
- idxs = elem_idxs.collect{|i| _get_eval_string(i, true)}.join(',')
- end
- tk_call('lset', "#{@id}(#{idxs})", idx, val)
- self
- end
-
- def inspect
- #Kernel.format "#<TkVariable: %s>", @id
- '#<TkVariable: ' + @id + '>'
- end
-
- def coerce(other)
- case other
- when TkVariable
- [other._value, self._value]
- when String
- [other, self.to_s]
- when Symbol
- [other, self.to_sym]
- when Numeric
- [other, self.numeric]
- when Array
- [other, self.to_a]
- else
- [other, self._value]
- end
- end
-
- def +@
- self.numeric
- end
- def -@
- -(self.numeric)
- end
-
- def &(other)
- if other.kind_of?(Array)
- self.to_a & other.to_a
- else
- self.to_i & other.to_i
- end
- end
- def |(other)
- if other.kind_of?(Array)
- self.to_a | other.to_a
- else
- self.to_i | other.to_i
- end
- end
- def +(other)
- case other
- when Array
- self.to_a + other
- when String
- self._value + other
- else
- begin
- number(self._value) + other
- rescue
- self._value + other.to_s
- end
- end
- end
- def -(other)
- if other.kind_of?(Array)
- self.to_a - other
- else
- number(self._value) - other
- end
- end
- def *(other)
- num_or_str(self._value) * other
- #begin
- # number(self._value) * other
- #rescue
- # self._value * other
- #end
- end
- def /(other)
- number(self._value) / other
- end
- def %(other)
- num_or_str(self._value) % other
- #begin
- # number(self._value) % other
- #rescue
- # self._value % other
- #end
- end
- def **(other)
- number(self._value) ** other
- end
- def =~(other)
- self._value =~ other
- end
-
- def ==(other)
- case other
- when TkVariable
- #self.equal?(other)
- self._value == other._value
- when String
- self.to_s == other
- when Symbol
- self.to_sym == other
- when Integer
- self.to_i == other
- when Float
- self.to_f == other
- when Array
- self.to_a == other
- when Hash
- # false if self is not an assoc array
- self._value == other
- else
- # false
- self._value == _get_eval_string(other)
- end
- end
-
- def ===(other)
- if other.kind_of?(TkVariable)
- self.id == other.id
- else
- super
- end
- end
-
- def zero?
- numeric.zero?
- end
- def nonzero?
- !(numeric.zero?)
- end
-
- def <=>(other)
- if other.kind_of?(TkVariable)
- begin
- val = other.numeric
- other = val
- rescue
- other = other._value
- end
- elsif other.kind_of?(Numeric)
- begin
- return self.numeric <=> other
- rescue
- return self._value <=> other.to_s
- end
- elsif other.kind_of?(Array)
- return self.list <=> other
- else
- return self._value <=> other
- end
- end
-
- def to_eval
- @id
- end
-
- def trace_callback(elem, op)
- if @trace_var.kind_of? Array
- @trace_var.each{|m,e| e.call(self,elem,op) if m.index(op)}
- end
- if elem.kind_of?(String) && elem != ''
- if @trace_elem.kind_of?(Hash) && @trace_elem[elem].kind_of?(Array)
- @trace_elem[elem].each{|m,e| e.call(self,elem,op) if m.index(op)}
- end
- end
- end
-
- def _check_trace_opt(opts)
- if opts.kind_of?(Array)
- opt_str = opts.map{|s| s.to_s}.join(' ')
- else
- opt_str = opts.to_s
- end
-
- fail ArgumentError, 'null trace option' if opt_str.empty?
-
- if opt_str =~ /[^arwu\s]/
- # new format (Tcl/Tk8.4+?)
- if opts.kind_of?(Array)
- opt_ary = opts.map{|opt| opt.to_s.strip}
- else
- opt_ary = opt_str.split(/\s+|\|/)
- opt_ary.delete('')
- end
- if USE_OLD_TRACE_OPTION_STYLE
- opt_ary.uniq.map{|opt|
- case opt
- when 'array'
- 'a'
- when 'read'
- 'r'
- when 'write'
- 'w'
- when 'unset'
- 'u'
- else
- fail ArgumentError, "unsupported trace option '#{opt}' on Tcl/Tk#{Tk::TCL_PATCHLEVEL}"
- end
- }.join
- else
- opt_ary
- end
- else
- # old format
- opt_ary = opt_str.delete('^arwu').split(//).uniq
- if USE_OLD_TRACE_OPTION_STYLE
- opt_ary.join
- else
- opt_ary.map{|c|
- case c
- when 'a'
- 'array'
- when 'r'
- 'read'
- when 'w'
- 'write'
- when 'u'
- 'unset'
- end
- }
- end
- end
- end
- private :_check_trace_opt
-
- def trace(opts, cmd = Proc.new)
- opts = _check_trace_opt(opts)
- (@trace_var ||= []).unshift([opts,cmd])
-
- if @trace_opts == nil
- TkVar_CB_TBL[@id] = self
- @trace_opts = opts.dup
- if USE_OLD_TRACE_OPTION_STYLE
- Tk.tk_call_without_enc('trace', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- else
- Tk.tk_call_without_enc('trace', 'add', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- else
- newopts = @trace_opts.dup
- if USE_OLD_TRACE_OPTION_STYLE
- opts.each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)}
- if newopts != @trace_opts
- Tk.tk_call_without_enc('trace', 'vdelete',
- @id, @trace_opts, 'rb_var ' << @id)
- @trace_opts.replace(newopts)
- Tk.tk_call_without_enc('trace', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- else
- newopts |= opts
- unless (newopts - @trace_opts).empty?
- Tk.tk_call_without_enc('trace', 'remove', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- @trace_opts.replace(newopts)
- Tk.tk_call_without_enc('trace', 'add', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- end
- end
-
- self
- end
-
- def trace_element(elem, opts, cmd = Proc.new)
- if @elem
- fail(RuntimeError,
- "invalid for a TkVariable which denotes an element of Tcl's array")
- end
-
- opts = _check_trace_opt(opts)
-
- ((@trace_elem ||= {})[elem] ||= []).unshift([opts,cmd])
-
- if @trace_opts == nil
- TkVar_CB_TBL[@id] = self
- @trace_opts = opts.dup
- if USE_OLD_TRACE_OPTION_STYLE
- Tk.tk_call_without_enc('trace', 'add', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- else
- Tk.tk_call_without_enc('trace', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- else
- newopts = @trace_opts.dup
- if USE_OLD_TRACE_OPTION_STYLE
- opts.each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)}
- if newopts != @trace_opts
- Tk.tk_call_without_enc('trace', 'vdelete',
- @id, @trace_opts, 'rb_var ' << @id)
- @trace_opts.replace(newopts)
- Tk.tk_call_without_enc('trace', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- else
- newopts |= opts
- unless (newopts - @trace_opts).empty?
- Tk.tk_call_without_enc('trace', 'remove', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- @trace_opts.replace(newopts)
- Tk.tk_call_without_enc('trace', 'add', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- end
- end
-
- self
- end
-
- def trace_info
- return [] unless @trace_var
- @trace_var.dup
- end
- alias trace_vinfo trace_info
-
- def trace_info_for_element(elem)
- if @elem
- fail(RuntimeError,
- "invalid for a TkVariable which denotes an element of Tcl's array")
- end
- return [] unless @trace_elem
- return [] unless @trace_elem[elem]
- @trace_elem[elem].dup
- end
- alias trace_vinfo_for_element trace_info_for_element
-
- def trace_remove(opts,cmd)
- return self unless @trace_var.kind_of? Array
-
- opts = _check_trace_opt(opts)
-
- idx = -1
- if USE_OLD_TRACE_OPTION_STYLE
- newopts = ''
- @trace_var.each_with_index{|e, i|
- if idx < 0 && e[1] == cmd
- diff = false
- ['a', 'r', 'w', 'u'].each{|c|
- break if (diff = e[0].index(c) ^ opts.index(c))
- }
- unless diff
- #find
- idx = i
- next
- end
- end
- e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)}
- }
- else
- newopts = []
- @trace_var.each_with_index{|e, i|
- if idx < 0 && e[1] == cmd &&
- e[0].size == opts.size && (e[0] - opts).empty?
- # find
- idx = i
- next
- end
- newopts |= e[0]
- }
- end
-
- if idx >= 0
- @trace_var.delete_at(idx)
- else
- return self
- end
-
- (@trace_elem ||= {}).each{|elem|
- @trace_elem[elem].each{|e|
- if USE_OLD_TRACE_OPTION_STYLE
- e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)}
- else
- newopts |= e[0]
- end
- }
- }
-
- if USE_OLD_TRACE_OPTION_STYLE
- diff = false
- @trace_opts.each_byte{|c| break if (diff = ! newopts.index(c))}
- if diff
- Tk.tk_call_without_enc('trace', 'vdelete',
- @id, @trace_opts, 'rb_var ' << @id)
- @trace_opts.replace(newopts)
- unless @trace_opts.empty?
- Tk.tk_call_without_enc('trace', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- end
- else
- unless (@trace_opts - newopts).empty?
- Tk.tk_call_without_enc('trace', 'remove', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- @trace_opts.replace(newopts)
- unless @trace_opts.empty?
- Tk.tk_call_without_enc('trace', 'add', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- end
- end
-
- self
- end
- alias trace_delete trace_remove
- alias trace_vdelete trace_remove
-
- def trace_remove_for_element(elem,opts,cmd)
- if @elem
- fail(RuntimeError,
- "invalid for a TkVariable which denotes an element of Tcl's array")
- end
- return self unless @trace_elem.kind_of? Hash
- return self unless @trace_elem[elem].kind_of? Array
-
- opts = _check_trace_opt(opts)
-
- idx = -1
- if USE_OLD_TRACE_OPTION_STYLE
- @trace_elem[elem].each_with_index{|e, i|
- if idx < 0 && e[1] == cmd
- diff = false
- ['a', 'r', 'w', 'u'].each{|c|
- break if (diff = e[0].index(c) ^ opts.index(c))
- }
- unless diff
- #find
- idx = i
- next
- end
- end
- }
- else
- @trace_elem[elem].each_with_index{|e, i|
- if idx < 0 && e[1] == cmd &&
- e[0].size == opts.size && (e[0] - opts).empty?
- # find
- idx = i
- next
- end
- }
- end
-
- if idx >= 0
- @trace_elem[elem].delete_at(idx)
- else
- return self
- end
-
- if USE_OLD_TRACE_OPTION_STYLE
- newopts = ''
- @trace_var.each{|e|
- e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)}
- }
- @trace_elem.each{|elem|
- @trace_elem[elem].each{|e|
- e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)}
- }
- }
- else
- newopts = []
- @trace_var.each{|e|
- newopts |= e[0]
- }
- @trace_elem.each{|elem|
- @trace_elem[elem].each{|e|
- e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)}
- }
- }
- end
-
- if USE_OLD_TRACE_OPTION_STYLE
- diff = false
- @trace_opts.each_byte{|c| break if (diff = ! newopts.index(c))}
- if diff
- Tk.tk_call_without_enc('trace', 'vdelete',
- @id, @trace_opts, 'rb_var ' << @id)
- @trace_opts.replace(newopts)
- unless @trace_opts.empty?
- Tk.tk_call_without_enc('trace', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- end
- else
- unless (@trace_opts - newopts).empty?
- Tk.tk_call_without_enc('trace', 'remove', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- @trace_opts.replace(newopts)
- unless @trace_opts.empty?
- Tk.tk_call_without_enc('trace', 'add', 'variable',
- @id, @trace_opts, 'rb_var ' << @id)
- end
- end
- end
-
- self
- end
- alias trace_delete_for_element trace_remove_for_element
- alias trace_vdelete_for_element trace_remove_for_element
-end
-
-class TkVarAccess<TkVariable
- def self.new(name, *args)
- if name.kind_of?(TkVariable)
- name.value = args[0] unless args.empty?
- return name
- end
-
- name = name.to_s
- v = nil
- TkVar_ID_TBL.mutex.synchronize{
- if v = TkVar_ID_TBL[name]
- v.value = args[0] unless args.empty?
- return v
- else
- (v = self.allocate).instance_eval{
- @id = name
- TkVar_ID_TBL[@id] = self
- @var = @id
- }
- end
- }
-
- v.instance_eval{ initialize(name, *args) }
- v
- end
-
- def self.new_hash(name, *args)
- if name.kind_of?(TkVariable)
- unless name.is_hash?
- fail ArgumentError, "already exist as a scalar variable"
- end
- name.value = args[0] unless args.empty?
- return name
- end
-
- name = name.to_s
- v = nil
- TkVar_ID_TBL.mutex.synchronize{
- if v = TkVar_ID_TBL[name]
- unless v.is_hash?
- fail ArgumentError, "already exist as a scalar variable"
- end
- v.value = args[0] unless args.empty?
- return v
- else
- (v = self.allocate).instance_eval{
- @id = name
- TkVar_ID_TBL[@id] = self
- @var = @id
- }
- end
- }
-
- INTERP._invoke_without_enc('global', name)
- if args.empty? && INTERP._invoke_without_enc('array', 'exist', name) == '0'
- v.instance_eval{ initialize(name, {}) } # force creating
- else
- v.instance_eval{ initialize(name, *args) }
- end
- v
- end
-
- def initialize(varname, val=nil)
- # @id = varname
- # TkVar_ID_TBL[@id] = self
-
- # @var = @id
- @elem = nil
-
- @def_default = false
- @default_val = nil
-
- @trace_var = nil
- @trace_elem = nil
- @trace_opts = nil
-
- @type = nil
- var = self
- @element_type = Hash.new{|k,v| var.default_value_type }
-
- # is an element?
- if @id =~ /^([^(]+)\((.+)\)$/
- # is an element --> var == $1, elem == $2
- @var = $1
- @elem = $2
- end
-
- # teach Tk-ip that @id is global var
- INTERP._invoke_without_enc('global', @var)
-=begin
- begin
- INTERP._invoke_without_enc('global', @id)
- rescue => e
- if @id =~ /^(.+)\([^()]+\)$/
- # is an element --> varname == $1
- INTERP._invoke_without_enc('global', $1)
- else
- fail e
- end
- end
-=end
-
- if val
- if val.kind_of?(Hash)
- # assoc-array variable
- self[''] = 0
- self.clear
- end
- #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"' #"
- #s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"' #"
- #INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s))
- #INTERP._set_global_var(@id, _toUTF8(_get_eval_string(val)))
- self.value = val
- end
- end
-end
-
-module Tk
- begin
- INTERP._invoke_without_enc('global', 'auto_path')
- auto_path = INTERP._invoke('set', 'auto_path')
- rescue => e
- begin
- INTERP._invoke_without_enc('global', 'env')
- auto_path = INTERP._invoke('set', 'env(TCLLIBPATH)')
- rescue => e
- auto_path = Tk::LIBRARY
- end
- end
-
- AUTO_PATH = TkVarAccess.new('auto_path', auto_path)
-
-=begin
- AUTO_OLDPATH = tk_split_simplelist(INTERP._invoke('set', 'auto_oldpath'))
- AUTO_OLDPATH.each{|s| s.freeze}
- AUTO_OLDPATH.freeze
-=end
-
- TCL_PACKAGE_PATH = TkVarAccess.new('tcl_pkgPath')
- PACKAGE_PATH = TCL_PACKAGE_PATH
-
- TCL_LIBRARY_PATH = TkVarAccess.new('tcl_libPath')
- LIBRARY_PATH = TCL_LIBRARY_PATH
-
- TCL_PRECISION = TkVarAccess.new('tcl_precision')
-end
diff --git a/ext/tk/lib/tk/virtevent.rb b/ext/tk/lib/tk/virtevent.rb
deleted file mode 100644
index de3c33da36..0000000000
--- a/ext/tk/lib/tk/virtevent.rb
+++ /dev/null
@@ -1,140 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/virtevent.rb : treats virtual events
-# 1998/07/16 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
-#
-require 'tk'
-
-class TkVirtualEvent<TkObject
- extend Tk
-
- TkCommandNames = ['event'.freeze].freeze
-
- (TkVirtualEventID = ["VirtEvent".freeze, TkUtil.untrust("00000")]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkVirtualEventTBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- TkVirtualEventTBL.mutex.synchronize{ TkVirtualEventTBL.clear }
- }
-
- class PreDefVirtEvent<self
- def self.new(event, *sequences)
- if event =~ /^<(<.*>)>$/
- event = $1
- elsif event !~ /^<.*>$/
- event = '<' + event + '>'
- end
- TkVirtualEvent::TkVirtualEventTBL.mutex.synchronize{
- if TkVirtualEvent::TkVirtualEventTBL.has_key?(event)
- TkVirtualEvent::TkVirtualEventTBL[event]
- else
- # super(event, *sequences)
- (obj = self.allocate).instance_eval{
- initialize(event, *sequences)
- TkVirtualEvent::TkVirtualEventTBL[@id] = self
- }
- end
- }
- end
-
- def initialize(event, *sequences)
- @path = @id = event
- _add_sequences(sequences)
- end
- end
-
- def TkVirtualEvent.getobj(event)
- obj = nil
- TkVirtualEventTBL.mutex.synchronize{
- obj = TkVirtualEventTBL[event]
- }
- if obj
- obj
- else
- if tk_call_without_enc('event', 'info').index("<#{event}>")
- PreDefVirtEvent.new(event)
- else
- fail ArgumentError, "undefined virtual event '<#{event}>'"
- end
- end
- end
-
- def TkVirtualEvent.info
- tk_call_without_enc('event', 'info').split(/\s+/).collect!{|seq|
- TkVirtualEvent.getobj(seq[1..-2])
- }
- end
-
- def initialize(*sequences)
- TkVirtualEventID.mutex.synchronize{
- # @path = @id = '<' + TkVirtualEventID.join('') + '>'
- @path = @id = '<' + TkVirtualEventID.join(TkCore::INTERP._ip_id_) + '>'
- TkVirtualEventID[1].succ!
- }
- _add_sequences(sequences)
- end
-
- def _add_sequences(seq_ary)
- unless seq_ary.empty?
- tk_call_without_enc('event', 'add', "<#{@id}>",
- *(seq_ary.collect{|seq|
- "<#{tk_event_sequence(seq)}>"
- }) )
- end
- self
- end
- private :_add_sequences
-
- def add(*sequences)
- if sequences != []
- _add_sequences(sequences)
- TkVirtualEventTBL.mutex.synchronize{
- TkVirtualEventTBL[@id] = self
- }
- end
- self
- end
-
- def delete(*sequences)
- if sequences.empty?
- tk_call_without_enc('event', 'delete', "<#{@id}>")
- TkVirtualEventTBL.mutex.synchronize{
- TkVirtualEventTBL.delete(@id)
- }
- else
- tk_call_without_enc('event', 'delete', "<#{@id}>",
- *(sequences.collect{|seq|
- "<#{tk_event_sequence(seq)}>"
- }) )
- if tk_call_without_enc('event','info',"<#{@id}>").empty?
- TkVirtualEventTBL.mutex.synchronize{
- TkVirtualEventTBL.delete(@id)
- }
- end
- end
- self
- end
-
- def info
- tk_call_without_enc('event','info',"<#{@id}>").split(/\s+/).collect!{|seq|
- lst = seq.scan(/<*[^<>]+>*/).collect!{|subseq|
- case (subseq)
- when /^<<[^<>]+>>$/
- TkVirtualEvent.getobj(subseq[1..-2])
- when /^<[^<>]+>$/
- subseq[1..-2]
- else
- subseq.split('')
- end
- }.flatten
- (lst.size == 1) ? lst[0] : lst
- }
- end
-end
-
-TkNamedVirtualEvent = TkVirtualEvent::PreDefVirtEvent
diff --git a/ext/tk/lib/tk/winfo.rb b/ext/tk/lib/tk/winfo.rb
deleted file mode 100644
index 36f32e5952..0000000000
--- a/ext/tk/lib/tk/winfo.rb
+++ /dev/null
@@ -1,393 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/winfo.rb : methods for winfo command
-#
-module TkWinfo
-end
-
-require 'tk'
-
-module TkWinfo
- include Tk
- extend Tk
-
- TkCommandNames = ['winfo'.freeze].freeze
-
- def TkWinfo.atom(name, win=nil)
- if win
- number(tk_call_without_enc('winfo', 'atom', '-displayof', win,
- _get_eval_enc_str(name)))
- else
- number(tk_call_without_enc('winfo', 'atom', _get_eval_enc_str(name)))
- end
- end
- def winfo_atom(name)
- TkWinfo.atom(name, self)
- end
-
- def TkWinfo.atomname(id, win=nil)
- if win
- _fromUTF8(tk_call_without_enc('winfo', 'atomname',
- '-displayof', win, id))
- else
- _fromUTF8(tk_call_without_enc('winfo', 'atomname', id))
- end
- end
- def winfo_atomname(id)
- TkWinfo.atomname(id, self)
- end
-
- def TkWinfo.cells(win)
- number(tk_call_without_enc('winfo', 'cells', win))
- end
- def winfo_cells
- TkWinfo.cells self
- end
-
- def TkWinfo.children(win)
- list(tk_call_without_enc('winfo', 'children', win))
- end
- def winfo_children
- TkWinfo.children self
- end
-
- def TkWinfo.classname(win)
- tk_call_without_enc('winfo', 'class', win)
- end
- def winfo_classname
- TkWinfo.classname self
- end
- alias winfo_class winfo_classname
-
- def TkWinfo.colormapfull(win)
- bool(tk_call_without_enc('winfo', 'colormapfull', win))
- end
- def winfo_colormapfull
- TkWinfo.colormapfull self
- end
-
- def TkWinfo.containing(rootX, rootY, win=nil)
- if win
- window(tk_call_without_enc('winfo', 'containing',
- '-displayof', win, rootX, rootY))
- else
- window(tk_call_without_enc('winfo', 'containing', rootX, rootY))
- end
- end
- def winfo_containing(x, y)
- TkWinfo.containing(x, y, self)
- end
-
- def TkWinfo.depth(win)
- number(tk_call_without_enc('winfo', 'depth', win))
- end
- def winfo_depth
- TkWinfo.depth self
- end
-
- def TkWinfo.exist?(win)
- bool(tk_call_without_enc('winfo', 'exists', win))
- end
- def winfo_exist?
- TkWinfo.exist? self
- end
-
- def TkWinfo.fpixels(win, dist)
- number(tk_call_without_enc('winfo', 'fpixels', win, dist))
- end
- def winfo_fpixels(dist)
- TkWinfo.fpixels self, dist
- end
-
- def TkWinfo.geometry(win)
- tk_call_without_enc('winfo', 'geometry', win)
- end
- def winfo_geometry
- TkWinfo.geometry self
- end
-
- def TkWinfo.height(win)
- number(tk_call_without_enc('winfo', 'height', win))
- end
- def winfo_height
- TkWinfo.height self
- end
-
- def TkWinfo.id(win)
- tk_call_without_enc('winfo', 'id', win)
- end
- def winfo_id
- TkWinfo.id self
- end
-
- def TkWinfo.interps(win=nil)
- if win
- #tk_split_simplelist(tk_call_without_enc('winfo', 'interps',
- # '-displayof', win))
- tk_split_simplelist(tk_call_without_enc('winfo', 'interps',
- '-displayof', win),
- false, true)
- else
- #tk_split_simplelist(tk_call_without_enc('winfo', 'interps'))
- tk_split_simplelist(tk_call_without_enc('winfo', 'interps'),
- false, true)
- end
- end
- def winfo_interps
- TkWinfo.interps self
- end
-
- def TkWinfo.mapped?(win)
- bool(tk_call_without_enc('winfo', 'ismapped', win))
- end
- def winfo_mapped?
- TkWinfo.mapped? self
- end
-
- def TkWinfo.manager(win)
- tk_call_without_enc('winfo', 'manager', win)
- end
- def winfo_manager
- TkWinfo.manager self
- end
-
- def TkWinfo.appname(win)
- tk_call('winfo', 'name', win)
- end
- def winfo_appname
- TkWinfo.appname self
- end
-
- def TkWinfo.parent(win)
- window(tk_call_without_enc('winfo', 'parent', win))
- end
- def winfo_parent
- TkWinfo.parent self
- end
-
- def TkWinfo.widget(id, win=nil)
- if win
- window(tk_call_without_enc('winfo', 'pathname', '-displayof', win, id))
- else
- window(tk_call_without_enc('winfo', 'pathname', id))
- end
- end
- def winfo_widget(id)
- TkWinfo.widget id, self
- end
-
- def TkWinfo.pixels(win, dist)
- number(tk_call_without_enc('winfo', 'pixels', win, dist))
- end
- def winfo_pixels(dist)
- TkWinfo.pixels self, dist
- end
-
- def TkWinfo.reqheight(win)
- number(tk_call_without_enc('winfo', 'reqheight', win))
- end
- def winfo_reqheight
- TkWinfo.reqheight self
- end
-
- def TkWinfo.reqwidth(win)
- number(tk_call_without_enc('winfo', 'reqwidth', win))
- end
- def winfo_reqwidth
- TkWinfo.reqwidth self
- end
-
- def TkWinfo.rgb(win, color)
- list(tk_call_without_enc('winfo', 'rgb', win, color))
- end
- def winfo_rgb(color)
- TkWinfo.rgb self, color
- end
-
- def TkWinfo.rootx(win)
- number(tk_call_without_enc('winfo', 'rootx', win))
- end
- def winfo_rootx
- TkWinfo.rootx self
- end
-
- def TkWinfo.rooty(win)
- number(tk_call_without_enc('winfo', 'rooty', win))
- end
- def winfo_rooty
- TkWinfo.rooty self
- end
-
- def TkWinfo.screen(win)
- tk_call('winfo', 'screen', win)
- end
- def winfo_screen
- TkWinfo.screen self
- end
-
- def TkWinfo.screencells(win)
- number(tk_call_without_enc('winfo', 'screencells', win))
- end
- def winfo_screencells
- TkWinfo.screencells self
- end
-
- def TkWinfo.screendepth(win)
- number(tk_call_without_enc('winfo', 'screendepth', win))
- end
- def winfo_screendepth
- TkWinfo.screendepth self
- end
-
- def TkWinfo.screenheight (win)
- number(tk_call_without_enc('winfo', 'screenheight', win))
- end
- def winfo_screenheight
- TkWinfo.screenheight self
- end
-
- def TkWinfo.screenmmheight(win)
- number(tk_call_without_enc('winfo', 'screenmmheight', win))
- end
- def winfo_screenmmheight
- TkWinfo.screenmmheight self
- end
-
- def TkWinfo.screenmmwidth(win)
- number(tk_call_without_enc('winfo', 'screenmmwidth', win))
- end
- def winfo_screenmmwidth
- TkWinfo.screenmmwidth self
- end
-
- def TkWinfo.screenvisual(win)
- tk_call_without_enc('winfo', 'screenvisual', win)
- end
- def winfo_screenvisual
- TkWinfo.screenvisual self
- end
-
- def TkWinfo.screenwidth(win)
- number(tk_call_without_enc('winfo', 'screenwidth', win))
- end
- def winfo_screenwidth
- TkWinfo.screenwidth self
- end
-
- def TkWinfo.server(win)
- tk_call('winfo', 'server', win)
- end
- def winfo_server
- TkWinfo.server self
- end
-
- def TkWinfo.toplevel(win)
- window(tk_call_without_enc('winfo', 'toplevel', win))
- end
- def winfo_toplevel
- TkWinfo.toplevel self
- end
-
- def TkWinfo.visual(win)
- tk_call_without_enc('winfo', 'visual', win)
- end
- def winfo_visual
- TkWinfo.visual self
- end
-
- def TkWinfo.visualid(win)
- tk_call_without_enc('winfo', 'visualid', win)
- end
- def winfo_visualid
- TkWinfo.visualid self
- end
-
- def TkWinfo.visualsavailable(win, includeids=false)
- if includeids
- list(tk_call_without_enc('winfo', 'visualsavailable',
- win, "includeids"))
- else
- list(tk_call_without_enc('winfo', 'visualsavailable', win))
- end
- end
- def winfo_visualsavailable(includeids=false)
- TkWinfo.visualsavailable self, includeids
- end
-
- def TkWinfo.vrootheight(win)
- number(tk_call_without_enc('winfo', 'vrootheight', win))
- end
- def winfo_vrootheight
- TkWinfo.vrootheight self
- end
-
- def TkWinfo.vrootwidth(win)
- number(tk_call_without_enc('winfo', 'vrootwidth', win))
- end
- def winfo_vrootwidth
- TkWinfo.vrootwidth self
- end
-
- def TkWinfo.vrootx(win)
- number(tk_call_without_enc('winfo', 'vrootx', win))
- end
- def winfo_vrootx
- TkWinfo.vrootx self
- end
-
- def TkWinfo.vrooty(win)
- number(tk_call_without_enc('winfo', 'vrooty', win))
- end
- def winfo_vrooty
- TkWinfo.vrooty self
- end
-
- def TkWinfo.width(win)
- number(tk_call_without_enc('winfo', 'width', win))
- end
- def winfo_width
- TkWinfo.width self
- end
-
- def TkWinfo.x(win)
- number(tk_call_without_enc('winfo', 'x', win))
- end
- def winfo_x
- TkWinfo.x self
- end
-
- def TkWinfo.y(win)
- number(tk_call_without_enc('winfo', 'y', win))
- end
- def winfo_y
- TkWinfo.y self
- end
-
- def TkWinfo.viewable(win)
- bool(tk_call_without_enc('winfo', 'viewable', win))
- end
- def winfo_viewable
- TkWinfo.viewable self
- end
-
- def TkWinfo.pointerx(win)
- number(tk_call_without_enc('winfo', 'pointerx', win))
- end
- def winfo_pointerx
- TkWinfo.pointerx self
- end
-
- def TkWinfo.pointery(win)
- number(tk_call_without_enc('winfo', 'pointery', win))
- end
- def winfo_pointery
- TkWinfo.pointery self
- end
-
- def TkWinfo.pointerxy(win)
- list(tk_call_without_enc('winfo', 'pointerxy', win))
- end
- def winfo_pointerxy
- TkWinfo.pointerxy self
- end
-end
diff --git a/ext/tk/lib/tk/winpkg.rb b/ext/tk/lib/tk/winpkg.rb
deleted file mode 100644
index 2a8f724bef..0000000000
--- a/ext/tk/lib/tk/winpkg.rb
+++ /dev/null
@@ -1,157 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/winpkg.rb : methods for Tcl/Tk packages for Microsoft Windows
-# 2000/11/22 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
-#
-# ATTENTION !!
-# This is NOT TESTED. Because I have no test-environment.
-#
-require 'tk'
-
-module Tk::WinDDE
-end
-#TkWinDDE = Tk::WinDDE
-#Tk.__set_toplevel_aliases__(:Tk, Tk::WinDDE, :TkWinDDE)
-Tk.__set_loaded_toplevel_aliases__('tk/winpkg.rb', :Tk, Tk::WinDDE, :TkWinDDE)
-
-module Tk::WinDDE
- extend Tk
- extend Tk::WinDDE
-
- TkCommandNames = ['dde'.freeze].freeze
-
- PACKAGE_NAME = 'dde'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- if self.const_defined? :FORCE_VERSION
- tk_call_without_enc('package', 'require', 'dde', FORCE_VERSION)
- else
- tk_call_without_enc('package', 'require', 'dde')
- end
-
- #def servername(topic=None)
- # tk_call('dde', 'servername', topic)
- #end
- def servername(*args)
- if args.size == 0
- tk_call('dde', 'servername')
- else
- if args[-1].kind_of?(Hash) # dde 1.2 +
- keys = _symbolkey2str(args.pop)
- force = (keys.delete('force'))? '-force': None
- exact = (keys.delete('exact'))? '-exact': None
- if keys.size == 0
- tk_call('dde', 'servername', force, exact)
- elsif args.size == 0
- tk_call('dde', 'servername', force, exact, *hash_kv(keys))
- else
- tk_call('dde', 'servername', force, exact,
- *((hash_kv(keys) << '--') + args))
- end
- else
- tk_call('dde', 'servername', *args)
- end
- end
- end
-
- def execute(service, topic, data)
- tk_call('dde', 'execute', service, topic, data)
- end
-
- def async_execute(service, topic, data)
- tk_call('dde', '-async', 'execute', service, topic, data)
- end
-
- def poke(service, topic, item, data)
- tk_call('dde', 'poke', service, topic, item, data)
- end
-
- def request(service, topic, item)
- tk_call('dde', 'request', service, topic, item)
- end
-
- def binary_request(service, topic, item)
- tk_call('dde', 'request', '-binary', service, topic, item)
- end
-
- def services(service, topic)
- tk_call('dde', 'services', service, topic)
- end
-
- def eval(topic, cmd, *args)
- tk_call('dde', 'eval', topic, cmd, *args)
- end
-
- def async_eval(topic, cmd, *args)
- tk_call('dde', 'eval', -async, topic, cmd, *args)
- end
-
- module_function :servername, :execute, :async_execute,
- :poke, :request, :services, :eval
-end
-
-module Tk::WinRegistry
-end
-#TkWinRegistry = Tk::WinRegistry
-#Tk.__set_toplevel_aliases__(:Tk, Tk::WinRegistry, :TkWinRegistry)
-Tk.__set_loaded_toplevel_aliases__('tk/winpkg.rb', :Tk, Tk::WinRegistry,
- :TkWinRegistry)
-
-module Tk::WinRegistry
- extend Tk
- extend Tk::WinRegistry
-
- TkCommandNames = ['registry'.freeze].freeze
-
- if self.const_defined? :FORCE_VERSION
- tk_call('package', 'require', 'registry', FORCE_VERSION)
- else
- tk_call('package', 'require', 'registry')
- end
-
- def broadcast(keynam, timeout=nil)
- if timeout
- tk_call('registry', 'broadcast', keynam, '-timeout', timeout)
- else
- tk_call('registry', 'broadcast', keynam)
- end
- end
-
- def delete(keynam, valnam=None)
- tk_call('registry', 'delete', keynam, valnam)
- end
-
- def get(keynam, valnam)
- tk_call('registry', 'get', keynam, valnam)
- end
-
- def keys(keynam, pattern=nil)
- lst = tk_split_simplelist(tk_call('registry', 'keys', keynam))
- if pattern
- lst.find_all{|key| key =~ pattern}
- else
- lst
- end
- end
-
- def set(keynam, valnam=None, data=None, dattype=None)
- tk_call('registry', 'set', keynam, valnam, data, dattype)
- end
-
- def type(keynam, valnam)
- tk_call('registry', 'type', keynam, valnam)
- end
-
- def values(keynam, pattern=nil)
- lst = tk_split_simplelist(tk_call('registry', 'values', keynam))
- if pattern
- lst.find_all{|val| val =~ pattern}
- else
- lst
- end
- end
-
- module_function :delete, :get, :keys, :set, :type, :values
-end
diff --git a/ext/tk/lib/tk/wm.rb b/ext/tk/lib/tk/wm.rb
deleted file mode 100644
index 5aa67e37b6..0000000000
--- a/ext/tk/lib/tk/wm.rb
+++ /dev/null
@@ -1,553 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/wm.rb : methods for wm command
-#
-require 'tk'
-
-module Tk
- module Wm
- #include TkComm
- extend TkCore
-
- TkCommandNames = ['wm'.freeze].freeze
-
- TOPLEVEL_METHODCALL_OPTKEYS = {}
-
- def Wm.aspect(win, *args)
- if args.length == 0
- list(tk_call_without_enc('wm', 'aspect', win.epath))
- else
- args = args[0] if args.length == 1 && args[0].kind_of?(Array)
- tk_call('wm', 'aspect', win.epath, *args)
- win
- end
- end
- def aspect(*args)
- Wm.aspect(self, *args)
- end
- alias wm_aspect aspect
- TOPLEVEL_METHODCALL_OPTKEYS['aspect'] = 'aspect'
-
- def Wm.attributes(win, slot=nil,value=TkComm::None)
- if slot == nil
- lst = tk_split_list(tk_call('wm', 'attributes', win.epath))
- info = {}
- while key = lst.shift
- info[key[1..-1]] = lst.shift
- end
- info
- elsif slot.kind_of? Hash
- tk_call('wm', 'attributes', win.epath, *hash_kv(slot))
- win
- elsif value == TkComm::None
- tk_call('wm', 'attributes', win.epath, "-#{slot}")
- else
- tk_call('wm', 'attributes', win.epath, "-#{slot}", value)
- win
- end
- end
- def attributes(slot=nil,value=TkComm::None)
- Wm.attributes(self, slot, value)
- end
- alias wm_attributes attributes
- TOPLEVEL_METHODCALL_OPTKEYS['attributes'] = 'attributes'
-
- def Wm.client(win, name=TkComm::None)
- if name == TkComm::None
- tk_call('wm', 'client', win.epath)
- else
- name = '' if name == nil
- tk_call('wm', 'client', win.epath, name)
- win
- end
- end
- def client(name=TkComm::None)
- Wm.client(self, name)
- end
- alias wm_client client
- TOPLEVEL_METHODCALL_OPTKEYS['client'] = 'client'
-
- def Wm.colormapwindows(win, *args)
- if args.size == 0
- list(tk_call_without_enc('wm', 'colormapwindows', win.epath))
- else
- args = args[0] if args.length == 1 && args[0].kind_of?(Array)
- tk_call_without_enc('wm', 'colormapwindows', win.epath, *args)
- win
- end
- end
- def colormapwindows(*args)
- Wm.colormapwindows(self, *args)
- end
- alias wm_colormapwindows colormapwindows
- TOPLEVEL_METHODCALL_OPTKEYS['colormapwindows'] = 'colormapwindows'
-
- def Wm.command(win, value=nil)
- if value
- tk_call('wm', 'command', win.epath, value)
- win
- else
- #procedure(tk_call('wm', 'command', win.epath))
- tk_call('wm', 'command', win.epath)
- end
- end
- def wm_command(value=nil)
- Wm.command(self, value)
- end
- TOPLEVEL_METHODCALL_OPTKEYS['wm_command'] = 'wm_command'
-
- def Wm.deiconify(win, ex = true)
- if ex
- tk_call_without_enc('wm', 'deiconify', win.epath)
- else
- Wm.iconify(win)
- end
- win
- end
- def deiconify(ex = true)
- Wm.deiconify(self, ex)
- end
- alias wm_deiconify deiconify
-
- def Wm.focusmodel(win, mode = nil)
- if mode
- tk_call_without_enc('wm', 'focusmodel', win.epath, mode)
- win
- else
- tk_call_without_enc('wm', 'focusmodel', win.epath)
- end
- end
- def focusmodel(mode = nil)
- Wm.focusmodel(self, mode)
- end
- alias wm_focusmodel focusmodel
- TOPLEVEL_METHODCALL_OPTKEYS['focusmodel'] = 'focusmodel'
-
- def Wm.forget(win)
- # Tcl/Tk 8.5+
- # work with dockable frames
- tk_call_without_enc('wm', 'forget', win.epath)
- win
- end
- def wm_forget
- Wm.forget(self)
- end
-
- def Wm.frame(win)
- tk_call_without_enc('wm', 'frame', win.epath)
- end
- def frame
- Wm.frame(self)
- end
- alias wm_frame frame
-
- def Wm.geometry(win, geom=nil)
- if geom
- tk_call_without_enc('wm', 'geometry', win.epath, geom)
- win
- else
- tk_call_without_enc('wm', 'geometry', win.epath)
- end
- end
- def geometry(geom=nil)
- Wm.geometry(self, geom)
- end
- alias wm_geometry geometry
- TOPLEVEL_METHODCALL_OPTKEYS['geometry'] = 'geometry'
-
- def Wm.grid(win, *args)
- if args.size == 0
- list(tk_call_without_enc('wm', 'grid', win.epath))
- else
- args = args[0] if args.length == 1 && args[0].kind_of?(Array)
- tk_call_without_enc('wm', 'grid', win.epath, *args)
- win
- end
- end
- def wm_grid(*args)
- Wm.grid(self, *args)
- end
- TOPLEVEL_METHODCALL_OPTKEYS['wm_grid'] = 'wm_grid'
-
- def Wm.group(win, leader = nil)
- if leader
- tk_call('wm', 'group', win.epath, leader)
- win
- else
- window(tk_call('wm', 'group', win.epath))
- end
- end
- def group(leader = nil)
- Wm.group(self, leader)
- end
- alias wm_group group
- TOPLEVEL_METHODCALL_OPTKEYS['group'] = 'group'
-
- def Wm.iconbitmap(win, bmp=nil)
- if bmp
- tk_call_without_enc('wm', 'iconbitmap', win.epath, bmp)
- win
- else
- image_obj(tk_call_without_enc('wm', 'iconbitmap', win.epath))
- end
- end
- def iconbitmap(bmp=nil)
- Wm.iconbitmap(self, bmp)
- end
- alias wm_iconbitmap iconbitmap
- TOPLEVEL_METHODCALL_OPTKEYS['iconbitmap'] = 'iconbitmap'
-
- def Wm.iconphoto(win, *imgs)
- if imgs.empty?
- win.instance_eval{
- @wm_iconphoto = nil unless defined? @wm_iconphoto
- return @wm_iconphoto
- }
- end
-
- imgs = imgs[0] if imgs.length == 1 && imgs[0].kind_of?(Array)
- tk_call_without_enc('wm', 'iconphoto', win.epath, *imgs)
- win.instance_eval{ @wm_iconphoto = imgs }
- win
- end
- def iconphoto(*imgs)
- Wm.iconphoto(self, *imgs)
- end
- alias wm_iconphoto iconphoto
- TOPLEVEL_METHODCALL_OPTKEYS['iconphoto'] = 'iconphoto'
-
- def Wm.iconphoto_default(win, *imgs)
- imgs = imgs[0] if imgs.length == 1 && imgs[0].kind_of?(Array)
- tk_call_without_enc('wm', 'iconphoto', win.epath, '-default', *imgs)
- win
- end
- def iconphoto_default(*imgs)
- Wm.iconphoto_default(self, *imgs)
- end
- alias wm_iconphoto_default iconphoto_default
-
- def Wm.iconify(win, ex = true)
- if ex
- tk_call_without_enc('wm', 'iconify', win.epath)
- else
- Wm.deiconify(win)
- end
- win
- end
- def iconify(ex = true)
- Wm.iconify(self, ex)
- end
- alias wm_iconify iconify
-
- def Wm.iconmask(win, bmp=nil)
- if bmp
- tk_call_without_enc('wm', 'iconmask', win.epath, bmp)
- win
- else
- image_obj(tk_call_without_enc('wm', 'iconmask', win.epath))
- end
- end
- def iconmask(bmp=nil)
- Wm.iconmask(self, bmp)
- end
- alias wm_iconmask iconmask
- TOPLEVEL_METHODCALL_OPTKEYS['iconmask'] = 'iconmask'
-
- def Wm.iconname(win, name=nil)
- if name
- tk_call('wm', 'iconname', win.epath, name)
- win
- else
- tk_call('wm', 'iconname', win.epath)
- end
- end
- def iconname(name=nil)
- Wm.iconname(self, name)
- end
- alias wm_iconname iconname
- TOPLEVEL_METHODCALL_OPTKEYS['iconname'] = 'iconname'
-
- def Wm.iconposition(win, *args)
- if args.size == 0
- list(tk_call_without_enc('wm', 'iconposition', win.epath))
- else
- args = args[0] if args.length == 1 && args[0].kind_of?(Array)
- tk_call_without_enc('wm', 'iconposition', win.epath, *args)
- win
- end
- end
- def iconposition(*args)
- Wm.iconposition(self, *args)
- end
- alias wm_iconposition iconposition
- TOPLEVEL_METHODCALL_OPTKEYS['iconposition'] = 'iconposition'
-
- def Wm.iconwindow(win, iconwin = nil)
- if iconwin
- tk_call_without_enc('wm', 'iconwindow', win.epath, iconwin)
- win
- else
- w = tk_call_without_enc('wm', 'iconwindow', win.epath)
- (w == '')? nil: window(w)
- end
- end
- def iconwindow(iconwin = nil)
- Wm.iconwindow(self, iconwin)
- end
- alias wm_iconwindow iconwindow
- TOPLEVEL_METHODCALL_OPTKEYS['iconwindow'] = 'iconwindow'
-
- def Wm.manage(win)
- # Tcl/Tk 8.5+ feature
- tk_call_without_enc('wm', 'manage', win.epath)
- win
- end
- def wm_manage
- Wm.manage(self)
- end
-=begin
- def Wm.manage(win, use_id = nil)
- # Tcl/Tk 8.5+ feature
- # --------------------------------------------------------------
- # In the future release, I want to support to embed the 'win'
- # into the container which has window-id 'use-id'.
- # It may give users flexibility on controlling their GUI.
- # However, it may be difficult for current Tcl/Tk (Tcl/Tk8.5.1),
- # because it seems to require to modify Tcl/Tk's source code.
- # --------------------------------------------------------------
- if use_id
- tk_call_without_enc('wm', 'manage', win.epath, '-use', use_id)
- else
- tk_call_without_enc('wm', 'manage', win.epath)
- end
- win
- end
-=end
-
- def Wm.maxsize(win, *args)
- if args.size == 0
- list(tk_call_without_enc('wm', 'maxsize', win.epath))
- else
- args = args[0] if args.length == 1 && args[0].kind_of?(Array)
- tk_call_without_enc('wm', 'maxsize', win.epath, *args)
- win
- end
- end
- def maxsize(*args)
- Wm.maxsize(self, *args)
- end
- alias wm_maxsize maxsize
- TOPLEVEL_METHODCALL_OPTKEYS['maxsize'] = 'maxsize'
-
- def Wm.minsize(win, *args)
- if args.size == 0
- list(tk_call_without_enc('wm', 'minsize', win.epath))
- else
- args = args[0] if args.length == 1 && args[0].kind_of?(Array)
- tk_call_without_enc('wm', 'minsize', win.path, *args)
- win
- end
- end
- def minsize(*args)
- Wm.minsize(self, *args)
- end
- alias wm_minsize minsize
- TOPLEVEL_METHODCALL_OPTKEYS['minsize'] = 'minsize'
-
- def Wm.overrideredirect(win, mode=TkComm::None)
- if mode == TkComm::None
- bool(tk_call_without_enc('wm', 'overrideredirect', win.epath))
- else
- tk_call_without_enc('wm', 'overrideredirect', win.epath, mode)
- win
- end
- end
- def overrideredirect(mode=TkComm::None)
- Wm.overrideredirect(self, mode)
- end
- alias wm_overrideredirect overrideredirect
- TOPLEVEL_METHODCALL_OPTKEYS['overrideredirect'] = 'overrideredirect'
-
- def Wm.positionfrom(win, who=TkComm::None)
- if who == TkComm::None
- r = tk_call_without_enc('wm', 'positionfrom', win.epath)
- (r == "")? nil: r
- else
- tk_call_without_enc('wm', 'positionfrom', win.epath, who)
- win
- end
- end
- def positionfrom(who=TkComm::None)
- Wm.positionfrom(self, who)
- end
- alias wm_positionfrom positionfrom
- TOPLEVEL_METHODCALL_OPTKEYS['positionfrom'] = 'positionfrom'
-
- def Wm.protocol(win, name=nil, cmd=nil, &b)
- if cmd
- tk_call_without_enc('wm', 'protocol', win.epath, name, cmd)
- win
- elsif b
- tk_call_without_enc('wm', 'protocol', win.epath, name, proc(&b))
- win
- elsif name
- result = tk_call_without_enc('wm', 'protocol', win.epath, name)
- (result == "")? nil : tk_tcl2ruby(result)
- else
- tk_split_simplelist(tk_call_without_enc('wm', 'protocol', win.epath))
- end
- end
- def protocol(name=nil, cmd=nil, &b)
- Wm.protocol(self, name, cmd, &b)
- end
- alias wm_protocol protocol
-
- def Wm.protocols(win, kv=nil)
- unless kv
- ret = {}
- Wm.protocol(win).each{|name|
- ret[name] = Wm.protocol(win, name)
- }
- return ret
- end
-
- unless kv.kind_of?(Hash)
- fail ArgumentError, 'expect a hash of protocol=>command'
- end
- kv.each{|k, v| Wm.protocol(win, k, v)}
- win
- end
- def protocols(kv=nil)
- Wm.protocols(self, kv)
- end
- alias wm_protocols protocols
- TOPLEVEL_METHODCALL_OPTKEYS['protocols'] = 'protocols'
-
- def Wm.resizable(win, *args)
- if args.length == 0
- list(tk_call_without_enc('wm', 'resizable', win.epath)).map!{|e| bool(e)}
- else
- args = args[0] if args.length == 1 && args[0].kind_of?(Array)
- tk_call_without_enc('wm', 'resizable', win.epath, *args)
- win
- end
- end
- def resizable(*args)
- Wm.resizable(self, *args)
- end
- alias wm_resizable resizable
- TOPLEVEL_METHODCALL_OPTKEYS['resizable'] = 'resizable'
-
- def Wm.sizefrom(win, who=TkComm::None)
- if who == TkComm::None
- r = tk_call_without_enc('wm', 'sizefrom', win.epath)
- (r == "")? nil: r
- else
- tk_call_without_enc('wm', 'sizefrom', win.epath, who)
- win
- end
- end
- def sizefrom(who=TkComm::None)
- Wm.sizefrom(self, who)
- end
- alias wm_sizefrom sizefrom
- TOPLEVEL_METHODCALL_OPTKEYS['sizefrom'] = 'sizefrom'
-
- def Wm.stackorder(win)
- list(tk_call('wm', 'stackorder', win.epath))
- end
- def stackorder
- Wm.stackorder(self)
- end
- alias wm_stackorder stackorder
-
- def Wm.stackorder_isabove(win, target)
- bool(tk_call('wm', 'stackorder', win.epath, 'isabove', target))
- end
- def Wm.stackorder_is_above(win, target)
- Wm.stackorder_isabove(win, target)
- end
- def stackorder_isabove(target)
- Wm.stackorder_isabove(self, target)
- end
- alias stackorder_is_above stackorder_isabove
- alias wm_stackorder_isabove stackorder_isabove
- alias wm_stackorder_is_above stackorder_isabove
-
- def Wm.stackorder_isbelow(win, target)
- bool(tk_call('wm', 'stackorder', win.epath, 'isbelow', target))
- end
- def Wm.stackorder_is_below(win, target)
- Wm.stackorder_isbelow(win, target)
- end
- def stackorder_isbelow(target)
- Wm.stackorder_isbelow(self, target)
- end
- alias stackorder_is_below stackorder_isbelow
- alias wm_stackorder_isbelow stackorder_isbelow
- alias wm_stackorder_is_below stackorder_isbelow
-
- def Wm.state(win, st=nil)
- if st
- tk_call_without_enc('wm', 'state', win.epath, st)
- win
- else
- tk_call_without_enc('wm', 'state', win.epath)
- end
- end
- def state(st=nil)
- Wm.state(self, st)
- end
- alias wm_state state
- TOPLEVEL_METHODCALL_OPTKEYS['state'] = 'state'
-
- def Wm.title(win, str=nil)
- if str
- tk_call('wm', 'title', win.epath, str)
- win
- else
- tk_call('wm', 'title', win.epath)
- end
- end
- def title(str=nil)
- Wm.title(self, str)
- end
- alias wm_title title
- TOPLEVEL_METHODCALL_OPTKEYS['title'] = 'title'
-
- def Wm.transient(win, master=nil)
- if master
- tk_call_without_enc('wm', 'transient', win.epath, master)
- win
- else
- window(tk_call_without_enc('wm', 'transient', win.epath))
- end
- end
- def transient(master=nil)
- Wm.transient(self, master)
- end
- alias wm_transient transient
- TOPLEVEL_METHODCALL_OPTKEYS['transient'] = 'transient'
-
- def Wm.withdraw(win, ex = true)
- if ex
- tk_call_without_enc('wm', 'withdraw', win.epath)
- else
- Wm.deiconify(win)
- end
- win
- end
- def withdraw(ex = true)
- Wm.withdraw(self, ex)
- end
- alias wm_withdraw withdraw
- end
-
- module Wm_for_General
- Wm.instance_methods.each{|m|
- if (m = m.to_s) =~ /^wm_(.*)$/
- eval "def #{m}(*args, &b); Tk::Wm.#{$1}(self, *args, &b); end"
- end
- }
- end
-end
diff --git a/ext/tk/lib/tk/xim.rb b/ext/tk/lib/tk/xim.rb
deleted file mode 100644
index 08c7d0c0b7..0000000000
--- a/ext/tk/lib/tk/xim.rb
+++ /dev/null
@@ -1,123 +0,0 @@
-# frozen_string_literal: false
-#
-# tk/xim.rb : control input_method
-#
-require 'tk'
-
-module TkXIM
- include Tk
- extend Tk
-
- TkCommandNames = ['imconfigure'.freeze].freeze
-
- def TkXIM.useinputmethods(value = None, win = nil)
- if value == None
- if win
- bool(tk_call_without_enc('tk', 'useinputmethods',
- '-displayof', win))
- else
- bool(tk_call_without_enc('tk', 'useinputmethods'))
- end
- else
- if win
- bool(tk_call_without_enc('tk', 'useinputmethods',
- '-displayof', win, value))
- else
- bool(tk_call_without_enc('tk', 'useinputmethods', value))
- end
- end
- end
-
- def TkXIM.useinputmethods_displayof(win, value = None)
- TkXIM.useinputmethods(value, win)
- end
-
- def TkXIM.caret(win, keys=nil)
- if keys
- tk_call_without_enc('tk', 'caret', win, *hash_kv(keys))
- self
- else
- lst = tk_split_list(tk_call_without_enc('tk', 'caret', win))
- info = {}
- while key = lst.shift
- info[key[1..-1]] = lst.shift
- end
- info
- end
- end
-
- def TkXIM.configure(win, slot, value=None)
- begin
- if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK
- if slot.kind_of? Hash
- tk_call('imconfigure', win, *hash_kv(slot))
- else
- tk_call('imconfigure', win, "-#{slot}", value)
- end
- end
- rescue
- end
- end
-
- def TkXIM.configinfo(win, slot=nil)
- if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- begin
- if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK
- if slot
- conf = tk_split_list(tk_call('imconfigure', win, "-#{slot}"))
- conf[0] = conf[0][1..-1]
- conf
- else
- tk_split_list(tk_call('imconfigure', win)).collect{|conf|
- conf[0] = conf[0][1..-1]
- conf
- }
- end
- else
- []
- end
- rescue
- []
- end
- else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
- TkXIM.current_configinfo(win, slot)
- end
- end
-
- def TkXIM.current_configinfo(win, slot=nil)
- begin
- if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK
- if slot
- conf = tk_split_list(tk_call('imconfigure', win, "-#{slot}"))
- { conf[0][1..-1] => conf[1] }
- else
- ret = {}
- tk_split_list(tk_call('imconfigure', win)).each{|conf|
- ret[conf[0][1..-1]] = conf[1]
- }
- ret
- end
- else
- {}
- end
- rescue
- {}
- end
- end
-
- def useinputmethods(value=None)
- TkXIM.useinputmethods(value, self)
- end
-
- def caret(keys=nil)
- TkXIM.caret(self, keys=nil)
- end
-
- def imconfigure(slot, value=None)
- TkXIM.configure(self, slot, value)
- end
-
- def imconfiginfo(slot=nil)
- TkXIM.configinfo(self, slot)
- end
-end
diff --git a/ext/tk/lib/tkafter.rb b/ext/tk/lib/tkafter.rb
deleted file mode 100644
index 0ce5049d4a..0000000000
--- a/ext/tk/lib/tkafter.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkafter.rb - load tk/after.rb
-#
-require 'tk/timer'
diff --git a/ext/tk/lib/tkbgerror.rb b/ext/tk/lib/tkbgerror.rb
deleted file mode 100644
index 875f3fef2f..0000000000
--- a/ext/tk/lib/tkbgerror.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkbgerror.rb - load tk/bgerror.rb
-#
-require 'tk/bgerror'
diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb
deleted file mode 100644
index d4d0afac9e..0000000000
--- a/ext/tk/lib/tkcanvas.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkcanvas.rb - load tk/canvas.rb
-#
-require 'tk/canvas'
diff --git a/ext/tk/lib/tkclass.rb b/ext/tk/lib/tkclass.rb
deleted file mode 100644
index 947cbf3a4a..0000000000
--- a/ext/tk/lib/tkclass.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: false
-#
-# tkclass.rb - Tk classes
-# Date: 2000/11/27 09:23:36
-# by Yukihiro Matsumoto <matz@caelum.co.jp>
-#
-# $Id$
-
-require "tk"
-
-TopLevel = TkToplevel
-Frame = TkFrame
-Label = TkLabel
-Button = TkButton
-Radiobutton = TkRadioButton
-Checkbutton = TkCheckButton
-Message = TkMessage
-Entry = TkEntry
-Spinbox = TkSpinbox
-Text = TkText
-Scale = TkScale
-Scrollbar = TkScrollbar
-Listbox = TkListbox
-Menu = TkMenu
-Menubutton = TkMenubutton
-Canvas = TkCanvas
-Arc = TkcArc
-Bitmap = TkcBitmap
-Line = TkcLine
-Oval = TkcOval
-Polygon = TkcPolygon
-Rectangle = TkcRectangle
-TextItem = TkcText
-WindowItem = TkcWindow
-BitmapImage = TkBitmapImage
-PhotoImage = TkPhotoImage
-Selection = TkSelection
-Winfo = TkWinfo
-Pack = TkPack
-Grid = TkGrid
-Place = TkPlace
-Variable = TkVariable
-Font = TkFont
-VirtualEvent = TkVirtualEvent
-
-def Mainloop
- Tk.mainloop
-end
diff --git a/ext/tk/lib/tkconsole.rb b/ext/tk/lib/tkconsole.rb
deleted file mode 100644
index f4e8669c11..0000000000
--- a/ext/tk/lib/tkconsole.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkconsole.rb - load tk/console.rb
-#
-require 'tk/console'
diff --git a/ext/tk/lib/tkdialog.rb b/ext/tk/lib/tkdialog.rb
deleted file mode 100644
index 7a24e2a37a..0000000000
--- a/ext/tk/lib/tkdialog.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkdialog.rb - load tk/dialog.rb
-#
-require 'tk/dialog'
diff --git a/ext/tk/lib/tkentry.rb b/ext/tk/lib/tkentry.rb
deleted file mode 100644
index 9ae2f7c8fe..0000000000
--- a/ext/tk/lib/tkentry.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkentry.rb - load tk/entry.rb
-#
-require 'tk/entry'
diff --git a/ext/tk/lib/tkextlib/ICONS.rb b/ext/tk/lib/tkextlib/ICONS.rb
deleted file mode 100644
index 10402c1292..0000000000
--- a/ext/tk/lib/tkextlib/ICONS.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-#
-# ICONS support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/ICONS/setup.rb'
-
-# load library
-require 'tkextlib/ICONS/icons'
diff --git a/ext/tk/lib/tkextlib/ICONS/icons.rb b/ext/tk/lib/tkextlib/ICONS/icons.rb
deleted file mode 100644
index 2934757b6d..0000000000
--- a/ext/tk/lib/tkextlib/ICONS/icons.rb
+++ /dev/null
@@ -1,130 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/ICONS/icons.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/ICONS/setup.rb'
-
-# TkPackage.require('icons', '1.0')
-TkPackage.require('icons')
-
-module Tk
- class ICONS < TkImage
- extend Tk
-
- PACKAGE_NAME = 'icons'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('icons')
- rescue
- ''
- end
- end
-
- def self.create(*args) # icon, icon, ..., ?option=>value, ...?
- if args[-1].kind_of?(Hash)
- keys = args.pop
- icons = simplelist(tk_call('::icons::icons', 'create',
- *(hash_kv(keys) << (args.flatten))))
- else
- icons = simplelist(tk_call('::icons::icons', 'create',
- args.flatten))
- end
-
- icons.collect{|icon| self.new(icon, :without_creating=>true)}
- end
-
- def self.delete(*icons) # icon, icon, ...
- icons = icons.flatten
- return if icons.empty?
- icons.map!{|icon|
- if icon.kind_of?(Tk::ICONS)
- Tk_IMGTBL.delete(icon.path)
- icon.name
- elsif icon.to_s =~ /^::icon::(.*)/
- name = $1
- Tk_IMGTBL.delete(icon)
- name
- else
- Tk_IMGTBL.delete("::icon::#{icon}")
- icon
- end
- }
- tk_call('::icons::icons', 'delete', icons)
- end
-
- def self.query(*args) # icon, icon, ..., ?option=>value, ...?
- if args[-1].kind_of?(Hash)
- keys = args.pop
- simplelist(tk_call('::icons::icons', 'query',
- *(hash_kv(keys) << (args.flatten))))
- else
- simplelist(tk_call('::icons::icons', 'query', args.flatten))
- end . map{|inf| list(inf) }
- end
-
- ##########################################
-
- class << self
- alias _new new
-
- def new(name, keys=nil)
- if obj = Tk_IMGTBL["::icon::#{name}"]
- if keys
- keys = _symbolkey2str(keys)
- unless keys.delete('without_creating')
- tk_call('::icons::icons', 'create', *(hash_kv(keys) << obj.name))
- end
- end
- else
- obj = _new(name, keys)
- end
- obj
- end
- end
-
- ##########################################
-
- def initialize(name, keys=nil)
- if name.kind_of?(String) && name =~ /^::icon::(.+)$/
- @name = $1
- @path = name
- else
- @name = name.to_s
- @path = "::icon::#{@name}"
- end
- keys = _symbolkey2str(keys)
- unless keys.delete('without_creating')
- tk_call('::icons::icons', 'create', *(hash_kv(keys) << @name))
- end
- Tk_IMGTBL[@path] = self
- end
-
- def name
- @name
- end
-
- def delete
- Tk_IMGTBL.delete(@path)
- tk_call('::icons::icons', 'delete', @name)
- self
- end
-
- def query(keys={})
- list(simplelist(tk_call('::icons::icons', 'query',
- *(hash_kv(keys) << @name))
- )[0])
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/ICONS/setup.rb b/ext/tk/lib/tkextlib/ICONS/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/ICONS/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/SUPPORT_STATUS b/ext/tk/lib/tkextlib/SUPPORT_STATUS
deleted file mode 100644
index 6af915360d..0000000000
--- a/ext/tk/lib/tkextlib/SUPPORT_STATUS
+++ /dev/null
@@ -1,193 +0,0 @@
-
- [ current support status of Tcl/Tk extensions ]
-
- *** RELEASE_DATE of the libraries => see 'tkextlib/version.rb' ***
-
-The following list shows *CURRENT* status when this file was last modified.
-If you want to add other Tcl/Tk extensions to the planned list (or change
-their status position), please send a request to the ruby-talk,
-ruby-list, or ruby-dev ML. Although we cannot promise to support your
-requests, we'll try to do it.
-
-If you want to check that wrapper libraries are ready to use on your
-environment, please execute 'pkg_checker.rb' with no arguments. The
-script may give you some hints about that.
-
-
- ***** IMPORTANT NOTE **********************************************
-
- 'support' means that Ruby/Tk's wrapper libraries are released.
- 'not support' does *NOT* mean that the extension doesn't work
- on Ruby/Tk.
-
- The version number of each extension means the latest version
- which is checked its feature. That is, it does NOT means only
- version of working. Library files maybe include some features
- which is included in the former version but removed from the
- latest, and maybe able to support the later version then the
- shown version.
-
- Even if the status of the extension is 'not support', you can
- control the functions/widgets of the extension without wrapper
- libraries by Tk.tk_call(), Tk.ip_eval(), and so on.
-
- If you cannot use installed Tcl/Tk extension, please check the
- followings.
-
- (1) On your Tcl/Tk, does the extension work?
-
- (2) Do DLL libraries of the extension exist on DLL load-path?
- (See also "<ruby archive>/ext/tcltklib/README.ActiveTcl")
-
- (3) Is the Tcl library directory of the extension included in
- library search-path of the Tcl interpreter linked Ruby/Tk?
-
- The check results may request you to do some setup operations
- before using the extension. If so, then please write the step
- of setup operations into the "setup.rb" file in the directory
- of the wrapper libraries for the extension (It is the wrapper
- libraries have the standard structure of the libraries in this
- directory). The "setup" file is required before requiring the
- Tcl library package (TkPackage.require(<libname>)).
-
- *******************************************************************
-
-
-===< support with some examples (may be beta quality) >=======================
-
-Tcllib 1.11.1
-Tklib 0.5 http://sourceforge.net/projects/tcllib ==> tcllib
- ( partial support; primary support target is Tklib)
-
-IWidgets 4.0.2 http://sourceforge.net/projects/incrtcl ==> iwidgets
-
-BWidget 1.8 [ CVS/Hd(2009-07-02) ]
- http://sourceforge.net/projects/tcllib ==> bwidget
-
-TkTable 2.10 http://sourceforge.net/projects/tktable ==> tktable
- * see also <http://www.korus.hu/~fery/ruby/tktable.rb>
- written by Ferenc Engard (ferenc@engard.hu)
-
-Vu widgets 2.3.0 http://sourceforge.net/projects/tktable ==> vu
-
-TkHTML 2.0 http://www.hwaci.com/sw/tkhtml/ ==> tkHTML
-
-ICONS 1.0 http://www.satisoft.com/tcltk/icons/ ==> ICONS
-
-TkImg 1.3 http://sourceforge.net/projects/tkimg ==> tkimg
-
-
-BLT 2.4z http://sourceforge.net/projects/blt ==> blt
-
-TkTreeCtrl 2.2.9
- http://tktreectrl.sourceforge.net/ ==> treectrl
-
-Tile 0.8.3/8.6b1
- http://sourceforge.net/projects/tktable ==> tile
-
-
-
-===< support (may be alpha or beta quality) >=================================
-
-IncrTcl CVS/Hd(2008-12-15)
- http://sourceforge.net/projects/incrtcl ==> itcl, itk
-
-TclX CVS/Hd(2008-12-15)
- http://sourceforge.net/projects/tclx
- ==> tclx (partial support; infox command and
- XPG/3 message catalogs only)
-
-Trofs 0.4.4 http://math.nist.gov/~DPorter/tcltk/trofs/
-
-
-
-===< possibly available (not tested; alpha quality) >=========================
-
-winico 0.6
- http://sourceforge.net/projects/tktable
- ==> winico (win32 only)
-
-TkTrans latest(2004-10-11)
- http://www2.cmp.uea.ac.uk/~fuzz/tktrans/default.html
- ==> tktrans (win32 only)
-
-TkDND 1.0a2 http://sourceforge.net/projects/tkdnd ==> tkDND
-
-
-
-===< plan to support (alpha quality libraries may be included) >==============
-
-GraphViz *** http://www.graphviz.org/
-
-Tkgeomap *** http://tkgeomap.sourceforge.net/index.html
-
-
-
-===< not determined to supprt or not >========================================
-
-Tix *** http://tixlibrary.sourceforge.net/
-
-TkZinc *** http://www.tkzinc.org/
-
-Wbc *** http://home.t-online.de/home/csaba.nemethi/
-
-Mentry *** http://home.t-online.de/home/csaba.nemethi/
-
-Tablelist *** http://home.t-online.de/home/csaba.nemethi/
-
-ANIGIF *** http://cardtable.sourceforge.net/tcltk/
-
-IMG_ROTATE *** http://cardtable.sourceforge.net/tcltk/
-
-TclVfs *** http://sourceforge.net/projects/tclvfs/
-
-vfwtcl *** http://sourceforge.net/projects/avicaptcl
- * Win32 only
-
-multicast *** http://sourceforge.net/projects/avicaptcl
- * Win32 only
-
-XBit *** http://www.geocities.com/~chengye/
- * current implementation is for Windows only
-
-QuickTimeTcl *** http://hem.fyristorg.com/matben/qt/
- * works under Mac OS (8,9,X) or Windows
-
-
-
-===< may not support (already exist, out of Ruby/Tk scope, and so on) >=======
-
-TkCon *** http://sourceforge.net/projects/tkcon
-
-Expect *** http://sourceforge.net/projects/expect
-
-TclXML *** http://sourceforge.net/projects/tclxml
-
-TclXSLT *** http://sourceforge.net/projects/tclxml
-
-TclDOM *** http://sourceforge.net/projects/tclxml
-
-TclSOAP *** http://sourceforge.net/projects/tclsoap
-
-Snack *** http://www.speech.kth.se/~kare/snack2.2.tar.gz
- * use Snack for Ruby
- (see http://rbsnack.sourceforge.net/)
-
-Tcom *** http://www.vex.net/~cthuang/tcom/
-
-tDOM *** http://www.tdom.org
-
-Mk4tcl *** http://www.equi4.com/metakit/tcl.html
-
-Memchan *** http://sourceforge.net/projects/memchan
-
-XOTcl *** http://www.xotcl.org/
-
-
-===< tool (may not supprt) >==================================================
-
-tbcload/tclcompiler
- *** http://www.tcl.tk/software/tclpro/
-
-
-(End of List)
diff --git a/ext/tk/lib/tkextlib/blt.rb b/ext/tk/lib/tkextlib/blt.rb
deleted file mode 100644
index 665e41226f..0000000000
--- a/ext/tk/lib/tkextlib/blt.rb
+++ /dev/null
@@ -1,190 +0,0 @@
-# frozen_string_literal: false
-#
-# BLT support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/variable'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/blt/setup.rb'
-
-# load all image format handlers
-#TkPackage.require('BLT', '2.4')
-TkPackage.require('BLT')
-
-module Tk
- module BLT
- TkComm::TkExtlibAutoloadModule.unshift(self)
- # Require autoload-symbols which is a same name as widget classname.
- # Those are used at TkComm._genobj_for_tkwidget method.
-
- extend TkCore
-
- VERSION = tk_call('set', 'blt_version')
- PATCH_LEVEL = tk_call('set', 'blt_patchLevel')
-
- begin
- lib = TkCore::INTERP._invoke('set', 'blt_library')
- rescue
- lib = ''
- end
- LIBRARY = TkVarAccess.new('blt_library', lib)
-
- begin
- lib = TkCore::INTERP._invoke('set', 'blt_libPath')
- rescue
- lib = ''
- end
- LIB_PATH = TkVarAccess.new('blt_libPath', lib)
-
- PACKAGE_NAME = 'BLT'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('BLT')
- rescue
- ''
- end
- end
-
- ####################################################
-
- def self.beep(percent = 50)
- tk_call('::blt::beep', percent)
- end
-
- def self.bgexec(*args)
- if args[0].kind_of?(TkVariable)
- var = args.shift
- else
- var = TkVariable.new
- end
- params = [var]
-
- params.concat(hash_kv(args.shift, true)) if args[0].kind_of?(Hash)
-
- params << '--' if args[0] =~ /^\s*-[^-]/
- params.concat(args)
-
- tk_call('::blt::bgexec', *params)
- var
- end
-
- def self.detach_bgexec(*args)
- if args[0].kind_of?(TkVariable)
- var = args.shift
- else
- var = TkVariable.new
- end
- params = [var]
-
- params.concat(hash_kv(args.shift, true)) if args[0].kind_of?(Hash)
-
- params << '--' if args[0] =~ /^\s*-[^-]/
- params.concat(args)
- params << '&'
-
- [var, tk_split_list(tk_call('::blt::bgexec', *params))]
- end
-
- def self.bltdebug(lvl = nil)
- if lvl
- tk_call('::blt::bltdebug', lvl)
- else
- number(tk_call('::blt::bltdebug'))
- end
- end
-
- def self.crc32_file(name)
- tk_call_without_enc('::blt::crc32', name)
- end
- def self.crc32_data(dat)
- tk_call_without_enc('::blt::crc32', '-data', dat)
- end
-
- ####################################################
-
- def self.active_legend(graph)
- tk_call_without_enc('Blt_ActiveLegend', graph)
- end
- def self.crosshairs(graph)
- tk_call_without_enc('Blt_Crosshairs', graph)
- end
- def self.zoom_stack(graph)
- tk_call_without_enc('Blt_ZoomStack', graph)
- end
- def self.print_key(graph)
- tk_call_without_enc('Blt_PrintKey', graph)
- end
- def self.closest_point(graph)
- tk_call_without_enc('Blt_ClosestPoint', graph)
- end
-
- module GraphCommand
- def active_legend
- tk_call_without_enc('Blt_ActiveLegend', @path)
- self
- end
- def crosshairs
- tk_call_without_enc('Blt_Crosshairs', @path)
- self
- end
- def zoom_stack
- tk_call_without_enc('Blt_ZoomStack', @path)
- self
- end
- def print_key
- tk_call_without_enc('Blt_PrintKey', @path)
- self
- end
- def closest_point
- tk_call_without_enc('Blt_ClosestPoint', @path)
- self
- end
- end
-
- ####################################################
-
- autoload :PlotComponent,'tkextlib/blt/component.rb'
-
- autoload :Barchart, 'tkextlib/blt/barchart.rb'
- autoload :Bitmap, 'tkextlib/blt/bitmap.rb'
- autoload :Busy, 'tkextlib/blt/busy.rb'
- autoload :Container, 'tkextlib/blt/container.rb'
- autoload :CutBuffer, 'tkextlib/blt/cutbuffer.rb'
- autoload :DragDrop, 'tkextlib/blt/dragdrop.rb'
- autoload :EPS, 'tkextlib/blt/eps.rb'
- autoload :Htext, 'tkextlib/blt/htext.rb'
- autoload :Graph, 'tkextlib/blt/graph.rb'
- autoload :Spline, 'tkextlib/blt/spline.rb'
- autoload :Stripchart, 'tkextlib/blt/stripchart.rb'
- autoload :Table, 'tkextlib/blt/table.rb'
- autoload :Tabnotebook, 'tkextlib/blt/tabnotebook.rb'
- autoload :Tabset, 'tkextlib/blt/tabset.rb'
- autoload :Ted, 'tkextlib/blt/ted.rb'
- autoload :Tile, 'tkextlib/blt/tile.rb'
- autoload :Tree, 'tkextlib/blt/tree.rb'
- autoload :TreeView, 'tkextlib/blt/treeview.rb'
- autoload :Hiertable, 'tkextlib/blt/treeview.rb'
- # Hierbox is obsolete
- autoload :Vector, 'tkextlib/blt/vector.rb'
- autoload :VectorAccess, 'tkextlib/blt/vector.rb'
- autoload :Watch, 'tkextlib/blt/watch.rb'
- autoload :Winop, 'tkextlib/blt/winop.rb'
- autoload :WinOp, 'tkextlib/blt/winop.rb'
-
- # Unix only
- autoload :DnD, 'tkextlib/blt/unix_dnd.rb'
-
- # Windows only
- autoload :Printer, 'tkextlib/blt/win_printer.rb'
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/barchart.rb b/ext/tk/lib/tkextlib/blt/barchart.rb
deleted file mode 100644
index 5b6f09ead3..0000000000
--- a/ext/tk/lib/tkextlib/blt/barchart.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/barchart.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-require 'tkextlib/blt/component.rb'
-
-module Tk::BLT
- class Barchart < TkWindow
- TkCommandNames = ['::blt::barchart'.freeze].freeze
- WidgetClassName = 'Barchart'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- include PlotComponent
- include GraphCommand
-
- def __boolval_optkeys
- ['bufferelements', 'buffergraph', 'invertxy']
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- ['text', 'label', 'title', 'file',
- 'background', 'plotbackground']
- end
- private :__strval_optkeys
-
- def __tkvariable_optkeys
- super() << 'colormap' << 'fontmap'
- end
- private :__tkvariable_optkeys
-
-=begin
- BarElement_ID = ['blt_barchart_bar'.freeze, TkUtil.untrust('00000')].freeze
-
- def bar(elem=nil, keys={})
- if elem.kind_of?(Hash)
- keys = elem
- elem = nil
- end
- unless elem
- elem = BarElement_ID.join(TkCore::INTERP._ip_id_).freeze
- BarElement_ID[1].succ!
- end
- tk_send('bar', elem, keys)
- Element.new(self, elem, :without_creating=>true)
- end
-=end
-
- def extents(item)
- num_or_str(tk_send_without_enc('extents', item))
- end
-
- def invtransform(x, y)
- list(tk_send_without_enc('invtransform', x, y))
- end
-
- def inside(x, y)
- bool(tk_send_without_enc('inside', x, y))
- end
-
- def metafile(file=None)
- # Windows only
- tk_send('metafile', file)
- self
- end
-
- def snap(output, keys={})
- tk_send_without_enc('snap', *(hash_kv(keys, false) + output))
- self
- end
-
- def transform(x, y)
- list(tk_send_without_enc('transform', x, y))
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/bitmap.rb b/ext/tk/lib/tkextlib/blt/bitmap.rb
deleted file mode 100644
index b9f411044e..0000000000
--- a/ext/tk/lib/tkextlib/blt/bitmap.rb
+++ /dev/null
@@ -1,113 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/bitmap.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- class Bitmap < TkObject
- extend TkCore
-
- TkCommandNames = ['::blt::bitmap'.freeze].freeze
-
- BITMAP_ID_TBL = TkCore::INTERP.create_table
-
- (BITMAP_ID = ['blt_bitmap_id'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- BITMAP_ID_TBL.mutex.synchronize{ BITMAP_ID_TBL.clear }
- }
-
- def self.data(name)
- dat = tk_simple_list(tk_call('::blt::bitmap', 'data', name))
- [ tk_split_list(dat[0]), tk_simple_list(dat[1]) ]
- end
-
- def self.exist?(name)
- bool(tk_call('::blt::bitmap', 'exists', name))
- end
-
- def self.height(name)
- number(tk_call('::blt::bitmap', 'height', name))
- end
-
- def self.width(name)
- number(tk_call('::blt::bitmap', 'width', name))
- end
-
- def self.source(name)
- tk_simple_list(tk_call('::blt::bitmap', 'source', name))
- end
-
- #################################
-
- class << self
- alias _new new
-
- def new(data, keys={})
- _new(:data, nil, data, keys)
- end
- alias define new
-
- def new_with_name(name, data, keys={})
- _new(:data, name, data, keys)
- end
- alias define_with_name new_with_name
-
- def compose(text, keys={})
- _new(:text, nil, text, keys)
- end
-
- def compose_with_name(name, text, keys={})
- _new(:text, name, text, keys)
- end
- end
-
- def initialize(type, name, data, keys = {})
- if name
- @id = name
- else
- BITMAP_ID.mutex.synchronize{
- @id = BITMAP_ID.join(TkCore::INTERP._ip_id_)
- BITMAP_ID[1].succ!
- }
- BITMAP_ID_TBL.mutex.synchronize{
- BITMAP_ID_TBL[@id] = self
- }
- end
-
- @path = @id
-
- unless bool(tk_call('::blt::bitmap', 'exists', @id))
- if type == :text
- tk_call('::blt::bitmap', 'compose', @id, data, *hash_kv(keys))
- else # :data
- tk_call('::blt::bitmap', 'define', @id, data, *hash_kv(keys))
- end
- end
- end
-
- def exist?
- bool(tk_call('::blt::bitmap', 'exists', @id))
- end
-
- def height
- number(tk_call('::blt::bitmap', 'height', @id))
- end
-
- def width
- number(tk_call('::blt::bitmap', 'width', @id))
- end
-
- def source
- tk_simple_list(tk_call('::blt::bitmap', 'source', @id))
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/busy.rb b/ext/tk/lib/tkextlib/blt/busy.rb
deleted file mode 100644
index ab24420750..0000000000
--- a/ext/tk/lib/tkextlib/blt/busy.rb
+++ /dev/null
@@ -1,84 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/busy.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/itemconfig.rb'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module Busy
- extend TkCore
- extend TkItemConfigMethod
-
- TkCommandNames = ['::blt::busy'.freeze].freeze
-
- ###########################
-
- class Shield < TkWindow
- def self.shield_path(win)
- win = window(win) unless win.kind_of?(TkWindow)
- if win.kind_of?(Tk::Toplevel)
- win.path + '._Busy'
- else
- win.path + '_Busy'
- end
- end
-
- def initialize(win)
- @path = self.class.shield_path(win)
- end
- end
-
- def self.shield_path(win)
- Tk::BLT::Busy::Shield.shield_path(win)
- end
- end
-end
-
-class << Tk::BLT::Busy
- def __item_config_cmd(win)
- ['::blt::busy', 'configure', win]
- end
- private :__item_config_cmd
-
- undef itemcget
- undef itemcget_tkstring
- alias configure itemconfigure
- alias configinfo itemconfiginfo
- alias current_configinfo current_itemconfiginfo
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ##################################
-
- def hold(win, keys={})
- tk_call('::blt::busy', 'hold', win, *hash_kv(keys))
- end
-
- def release(*wins)
- tk_call('::blt::busy', 'release', *wins)
- end
-
- def forget(*wins)
- tk_call('::blt::busy', 'forget', *wins)
- end
-
- def is_busy(pat=None)
- tk_split_list(tk_call('::blt::busy', 'isbusy', pat))
- end
-
- def names(pat=None)
- tk_split_list(tk_call('::blt::busy', 'names', pat))
- end
- alias windows names
-
- def check(win)
- bool(tk_call('::blt::busy', 'check', win))
- end
-
- def status(win)
- bool(tk_call('::blt::busy', 'status', win))
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/component.rb b/ext/tk/lib/tkextlib/blt/component.rb
deleted file mode 100644
index a6b6f13905..0000000000
--- a/ext/tk/lib/tkextlib/blt/component.rb
+++ /dev/null
@@ -1,2219 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/component.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module PlotComponent
- include TkItemConfigMethod
-
- module OptKeys
- def __item_font_optkeys(id)
- ['font', 'tickfont', 'titlefont']
- end
- private :__item_font_optkeys
-
- def __item_numstrval_optkeys(id)
- ['xoffset', 'yoffset']
- end
- private :__item_numstrval_optkeys
-
- def __item_boolval_optkeys(id)
- ['hide', 'under', 'descending', 'logscale', 'loose', 'showticks',
- 'titlealternate', 'scalesymbols', 'minor', 'raised',
- 'center', 'decoration', 'landscape', 'maxpect']
- end
- private :__item_boolval_optkeys
-
- def __item_strval_optkeys(id)
- ['text', 'label', 'limits', 'title',
- 'show', 'file', 'maskdata', 'maskfile',
- 'color', 'titlecolor', 'fill', 'outline', 'offdash']
- end
- private :__item_strval_optkeys
-
- def __item_listval_optkeys(id)
- ['bindtags']
- end
- private :__item_listval_optkeys
-
- def __item_numlistval_optkeys(id)
- ['dashes', 'majorticks', 'minorticks']
- end
- private :__item_numlistval_optkeys
-
- def __item_tkvariable_optkeys(id)
- ['variable', 'textvariable', 'colormap', 'fontmap']
- end
- private :__item_tkvariable_optkeys
- end
-
- include OptKeys
-
- def __item_cget_cmd(id)
- if id.kind_of?(Array)
- # id := [ type, name ]
- [self.path, id[0], 'cget', id[1]]
- else
- [self.path, id, 'cget']
- end
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- if id.kind_of?(Array)
- # id := [ type, name, ... ]
- type, *names = id
- [self.path, type, 'configure'].concat(names)
- else
- [self.path, id, 'configure']
- end
- end
- private :__item_config_cmd
-
- def __item_pathname(id)
- if id.kind_of?(Array)
- id = tagid(id[1])
- end
- [self.path, id].join(';')
- end
- private :__item_pathname
-
- def axis_cget_tkstring(id, option)
- ret = itemcget_tkstring(['axis', tagid(id)], option)
- end
- def axis_cget(id, option)
- ret = itemcget(['axis', tagid(id)], option)
- end
- def axis_cget_strict(id, option)
- ret = itemcget_strict(['axis', tagid(id)], option)
- end
- def axis_configure(*args)
- slot = args.pop
- if slot.kind_of?(Hash)
- value = None
- slot = _symbolkey2str(slot)
- if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- else
- value = slot
- slot = args.pop
- if slot == :command || slot == 'command'
- cmd = value
- value = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- end
- id_list = args.flatten.collect!{|id| tagid(id)}.unshift('axis')
- itemconfigure(id_list, slot, value)
- end
- def axis_configinfo(id, slot=nil)
- itemconfiginfo(['axis', tagid(id)], slot)
- end
- def current_axis_configinfo(id, slot=nil)
- current_itemconfiginfo(['axis', tagid(id)], slot)
- end
-
- def crosshairs_cget_tkstring(option)
- itemcget_tkstring('crosshairs', option)
- end
- def crosshairs_cget(option)
- itemcget('crosshairs', option)
- end
- def crosshairs_cget_strict(option)
- itemcget_strict('crosshairs', option)
- end
- def crosshairs_configure(slot, value=None)
- itemconfigure('crosshairs', slot, value)
- end
- def crosshairs_configinfo(slot=nil)
- itemconfiginfo('crosshairs', slot)
- end
- def current_crosshairs_configinfo(slot=nil)
- current_itemconfiginfo('crosshairs', slot)
- end
-
- def element_cget_tkstring(id, option)
- itemcget_tkstring(['element', tagid(id)], option)
- end
- def element_cget(id, option)
- itemcget(['element', tagid(id)], option)
- end
- def element_cget_strict(id, option)
- itemcget_strict(['element', tagid(id)], option)
- end
- def element_configure(*args)
- slot = args.pop
- if slot.kind_of?(Hash)
- value = None
- else
- value = slot
- slot = args.pop
- end
- id_list = args.flatten.collect!{|id| tagid(id)}.unshift('element')
- itemconfigure(id_list, slot, value)
- end
- def element_configinfo(id, slot=nil)
- itemconfiginfo(['element', tagid(id)], slot)
- end
- def current_element_configinfo(id, slot=nil)
- current_itemconfiginfo(['element', tagid(id)], slot)
- end
-
- def bar_cget_tkstring(id, option)
- itemcget_tkstring(['bar', tagid(id)], option)
- end
- def bar_cget(id, option)
- itemcget(['bar', tagid(id)], option)
- end
- def bar_cget_strict(id, option)
- itemcget_strict(['bar', tagid(id)], option)
- end
- def bar_configure(*args)
- slot = args.pop
- if slot.kind_of?(Hash)
- value = None
- else
- value = slot
- slot = args.pop
- end
- id_list = args.flatten.collect!{|id| tagid(id)}.unshift('bar')
- itemconfigure(id_list, slot, value)
- end
- def bar_configinfo(id, slot=nil)
- itemconfiginfo(['bar', tagid(id)], slot)
- end
- def current_bar_configinfo(id, slot=nil)
- current_itemconfiginfo(['bar', tagid(id)], slot)
- end
-
- def line_cget_tkstring(id, option)
- itemcget_tkstring(['line', tagid(id)], option)
- end
- def line_cget(id, option)
- itemcget(['line', tagid(id)], option)
- end
- def line_cget_strict(id, option)
- itemcget_strict(['line', tagid(id)], option)
- end
- def line_configure(*args)
- slot = args.pop
- if slot.kind_of?(Hash)
- value = None
- else
- value = slot
- slot = args.pop
- end
- id_list = args.flatten.collect!{|id| tagid(id)}.unshift('line')
- itemconfigure(id_list, slot, value)
- end
- def line_configinfo(id, slot=nil)
- itemconfiginfo(['line', tagid(id)], slot)
- end
- def current_line_configinfo(id, slot=nil)
- current_itemconfiginfo(['line', tagid(id)], slot)
- end
-
- def gridline_cget_tkstring(option)
- itemcget_tkstring('grid', option)
- end
- def gridline_cget(option)
- itemcget('grid', option)
- end
- def gridline_cget_strict(option)
- itemcget_strict('grid', option)
- end
- def gridline_configure(slot, value=None)
- itemconfigure('grid', slot, value)
- end
- def gridline_configinfo(slot=nil)
- itemconfiginfo('grid', slot)
- end
- def current_gridline_configinfo(slot=nil)
- current_itemconfiginfo('grid', slot)
- end
-
- def legend_cget_tkstring(option)
- itemcget_tkstring('legend', option)
- end
- def legend_cget(option)
- itemcget('legend', option)
- end
- def legend_cget_strict(option)
- itemcget_strict('legend', option)
- end
- def legend_configure(slot, value=None)
- itemconfigure('legend', slot, value)
- end
- def legend_configinfo(slot=nil)
- itemconfiginfo('legend', slot)
- end
- def current_legend_configinfo(slot=nil)
- current_itemconfiginfo('legend', slot)
- end
-
- def pen_cget_tkstring(id, option)
- itemcget_tkstring(['pen', tagid(id)], option)
- end
- def pen_cget(id, option)
- itemcget(['pen', tagid(id)], option)
- end
- def pen_cget_strict(id, option)
- itemcget_strict(['pen', tagid(id)], option)
- end
- def pen_configure(*args)
- slot = args.pop
- if slot.kind_of?(Hash)
- value = None
- else
- value = slot
- slot = args.pop
- end
- id_list = args.flatten.collect!{|id| tagid(id)}.unshift('pen')
- itemconfigure(id_list, slot, value)
- end
- def pen_configinfo(id, slot=nil)
- itemconfiginfo(['pen', tagid(id)], slot)
- end
- def current_pen_configinfo(id, slot=nil)
- current_itemconfiginfo(['pen', tagid(id)], slot)
- end
-
- def postscript_cget_tkstring(option)
- itemcget_tkstring('postscript', option)
- end
- def postscript_cget(option)
- itemcget('postscript', option)
- end
- def postscript_cget_strict(option)
- itemcget_strict('postscript', option)
- end
- def postscript_configure(slot, value=None)
- itemconfigure('postscript', slot, value)
- end
- def postscript_configinfo(slot=nil)
- itemconfiginfo('postscript', slot)
- end
- def current_postscript_configinfo(slot=nil)
- current_itemconfiginfo('postscript', slot)
- end
-
- def marker_cget_tkstring(id, option)
- itemcget_tkstring(['marker', tagid(id)], option)
- end
- def marker_cget(id, option)
- itemcget(['marker', tagid(id)], option)
- end
- def marker_cget_strict(id, option)
- itemcget_strict(['marker', tagid(id)], option)
- end
- def marker_configure(*args)
- slot = args.pop
- if slot.kind_of?(Hash)
- value = None
- else
- value = slot
- slot = args.pop
- end
- id_list = args.flatten.collect!{|id| tagid(id)}.unshift('marker')
- itemconfigure(id_list, slot, value)
- end
- def marker_configinfo(id, slot=nil)
- itemconfiginfo(['marker', tagid(id)], slot)
- end
- def current_marker_configinfo(id, slot=nil)
- current_itemconfiginfo(['marker', tagid(id)], slot)
- end
-
- alias __itemcget_tkstring itemcget_tkstring
- alias __itemcget itemcget
- alias __itemcget_strict itemcget_strict
- alias __itemconfiginfo itemconfiginfo
- alias __current_itemconfiginfo current_itemconfiginfo
- private :__itemcget_tkstring, :__itemcget, :__itemconfiginfo, :__current_itemconfiginfo
-
- def itemcget_tkstring(tagOrId, option)
- __itemcget_tkstring(tagid(tagOrId), option)
- end
- def itemcget_strict(tagOrId, option)
- ret = __itemcget(tagid(tagOrId), option)
- if option == 'bindtags' || option == :bindtags
- ret.collect{|tag| TkBindTag.id2obj(tag)}
- else
- ret
- end
- end
- def itemcget(tagOrId, option)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- itemcget_strict(tagOrId, option)
- else
- begin
- itemcget_strict(tagOrId, option)
- rescue => e
- begin
- if current_itemconfiginfo(tagOrId).has_key?(option.to_s)
- # error on known option
- fail e
- else
- # unknown option
- nil
- end
- rescue
- fail e # tag error
- end
- end
- end
- end
- def itemconfiginfo(tagOrId, slot = nil)
- ret = __itemconfiginfo(tagid(tagOrId), slot)
-
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- if slot == 'bindtags' || slot == :bindtags
- ret[-2] = ret[-2].collect{|tag| TkBindTag.id2obj(tag)}
- ret[-1] = ret[-1].collect{|tag| TkBindTag.id2obj(tag)}
- end
- else
- if (inf = ret.assoc('bindtags'))
- inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)}
- inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)}
- end
- end
-
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if (inf = ret['bindtags'])
- inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)}
- inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)}
- ret['bindtags'] = inf
- end
- end
-
- ret
- end
- def current_itemconfiginfo(tagOrId, slot = nil)
- ret = __current_itemconfiginfo(tagid(tagOrId), slot)
-
- if (val = ret['bindtags'])
- ret['bindtags'] = val.collect{|tag| TkBindTag.id2obj(tag)}
- end
-
- ret
- end
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- #################
-
- class Axis < TkObject
- (OBJ_ID = ['blt_chart_axis'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- AxisID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- AxisID_TBL.mutex.synchronize{ AxisID_TBL.clear }
- }
-
- def self.id2obj(chart, id)
- cpath = chart.path
- AxisID_TBL.mutex.synchronize{
- return id unless AxisID_TBL[cpath]
- AxisID_TBL[cpath][id]? AxisID_TBL[cpath][id]: id
- }
- end
-
- def self.new(chart, axis=nil, keys={})
- if axis.kind_of?(Hash)
- keys = axis
- axis = nil
- end
- if keys
- keys = _symbolkey2str(keys)
- not_create = keys.delete('without_creating')
- else
- not_create = false
- end
-
- obj = nil
- AxisID_TBL.mutex.synchronize{
- chart_path = chart.path
- AxisID_TBL[chart_path] ||= {}
- if axis && AxisID_TBL[chart_path][axis]
- obj = AxisID_TBL[chart_path][axis]
- else
- (obj = self.allocate).instance_eval{
- if axis
- @axis = @id = axis.to_s
- else
- OBJ_ID.mutex.synchronize{
- @axis = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
- OBJ_ID[1].succ!
- }
- end
- @path = @id
- @parent = @chart = chart
- @cpath = @chart.path
- Axis::AxisID_TBL[@cpath][@axis] = self
- unless not_create
- tk_call(@chart, 'axis', 'create', @axis, keys)
- return obj
- end
- }
- end
- }
-
- obj.configure(keys) if obj && ! keys.empty?
- obj
- end
-
- def initialize(chart, axis=nil, keys={})
- # dummy:: not called by 'new' method
-
- if axis.kind_of?(Hash)
- keys = axis
- axis = nil
- end
- if axis
- @axis = @id = axis.to_s
- else
- OBJ_ID.mutex.synchronize{
- @axis = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
- OBJ_ID[1].succ!
- }
- end
- @path = @id
- @parent = @chart = chart
- @cpath = @chart.path
- # Axis::AxisID_TBL[@cpath][@axis] = self
- keys = _symbolkey2str(keys)
- unless keys.delete('without_creating')
- # @chart.axis_create(@axis, keys)
- tk_call(@chart, 'axis', 'create', @axis, keys)
- end
- end
-
- def id
- @id
- end
-
- def to_eval
- @id
- end
-
- def cget_tkstring(option)
- @chart.axis_cget_tkstring(@id, option)
- end
- def cget(option)
- @chart.axis_cget(@id, option)
- end
- def cget_strict(option)
- @chart.axis_cget_strict(@id, option)
- end
- def configure(key, value=None)
- @chart.axis_configure(@id, key, value)
- self
- end
- def configinfo(key=nil)
- @chart.axis_configinfo(@id, key)
- end
- def current_configinfo(key=nil)
- @chart.current_axis_configinfo(@id, key)
- end
-
- def command(cmd=nil, &b)
- if cmd
- configure('command', cmd)
- elsif b
- configure('command', Proc.new(&b))
- else
- cget('command')
- end
- end
-
- def delete
- @chart.axis_delete(@id)
- self
- end
-
- def invtransform(val)
- @chart.axis_invtransform(@id, val)
- end
-
- def limits
- @chart.axis_limits(@id)
- end
-
- def name
- @axis
- end
-
- def transform(val)
- @chart.axis_transform(@id, val)
- end
-
- def view
- @chart.axis_view(@id)
- self
- end
-
- def use(name=None) # if @id == xaxis | x2axis | yaxis | y2axis
- @chart.axis_use(@id, name)
- end
-
- def use_as(axis) # axis := xaxis | x2axis | yaxis | y2axis
- @chart.axis_use(axis, @id)
- end
- end
-
- #################
-
- class Crosshairs < TkObject
- CrosshairsID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- CrosshairsID_TBL.mutex.synchronize{ CrosshairsID_TBL.clear }
- }
-
- def self.new(chart, keys={})
- obj = nil
- CrosshairsID_TBL.mutex.synchronize{
- unless (obj = CrosshairsID_TBL[chart.path])
- (obj = self.allocate).instance_eval{
- @parent = @chart = chart
- @cpath = @chart.path
- @path = @id = 'crosshairs'
- Crosshairs::CrosshairsID_TBL[@cpath] = self
- }
- end
- }
- chart.crosshair_configure(keys) if obj && ! keys.empty?
- obj
- end
-
- def initialize(chart, keys={})
- # dummy:: not called by 'new' method
-
- @parent = @chart = chart
- @cpath = @chart.path
- # Crosshairs::CrosshairsID_TBL[@cpath] = self
- @chart.crosshair_configure(keys) unless keys.empty?
- @path = @id = 'crosshairs'
- end
-
- def id
- @id
- end
-
- def to_eval
- @id
- end
-
- def cget_tkstring(option)
- @chart.crosshair_cget_tkstring(option)
- end
- def cget(option)
- @chart.crosshair_cget(option)
- end
- def cget_strict(option)
- @chart.crosshair_cget_strict(option)
- end
- def configure(key, value=None)
- @chart.crosshair_configure(key, value)
- self
- end
- def configinfo(key=nil)
- @chart.crosshair_configinfo(key)
- end
- def current_configinfo(key=nil)
- @chart.current_crosshair_configinfo(key)
- end
-
- def off
- @chart.crosshair_off
- self
- end
- def on
- @chart.crosshair_on
- self
- end
- def toggle
- @chart.crosshair_toggle
- self
- end
- end
-
- #################
-
- class Element < TkObject
- extend Tk
- extend TkItemFontOptkeys
- extend TkItemConfigOptkeys
-
- extend Tk::BLT::PlotComponent::OptKeys
-
- ElementTypeName = 'element'
- ElementTypeToClass = { ElementTypeName=>self }
-
- ElementID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- ElementID_TBL.mutex.synchronize{ ElementID_TBL.clear }
- }
-
- (OBJ_ID = ['blt_chart_element'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- def Element.type2class(type)
- ElementTypeToClass[type]
- end
-
- def Element.id2obj(chart, id)
- cpath = chart.path
- ElementID_TBL.mutex.synchronize{
- return id unless ElementID_TBL[cpath]
- ElementID_TBL[cpath][id]? ElementID_TBL[cpath][id]: id
- }
- end
-
- def self.new(chart, element=nil, keys={})
- if element.kind_of?(Hash)
- keys = element
- element = nil
- end
- if keys
- keys = _symbolkey2str(keys)
- not_create = keys.delete('without_creating')
- else
- not_create = false
- end
-
- obj = nil
- ElementID_TBL.mutex.synchronize{
- chart_path = chart.path
- ElementID_TBL[chart_path] ||= {}
- if element && ElementID_TBL[chart_path][element]
- obj = ElementID_TBL[chart_path][element]
- else
- (obj = self.allocate).instance_eval{
- if element
- @element = @id = element.to_s
- else
- OBJ_ID.mutex.synchronize{
- @element = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
- OBJ_ID[1].succ!
- }
- end
- @path = @id
- @parent = @chart = chart
- @cpath = @chart.path
- @typename = self.class::ElementTypeName
- Element::ElementID_TBL[@cpath][@element] = self
- unless not_create
- tk_call(@chart, @typename, 'create', @element, keys)
- return obj
- end
- }
- end
- }
-
- obj.configure(keys) if obj && ! keys.empty?
- obj
- end
-
- def initialize(chart, element=nil, keys={})
- # dummy:: not called by 'new' method
-
- if element.kind_of?(Hash)
- keys = element
- element = nil
- end
- if element
- @element = @id = element.to_s
- else
- OBJ_ID.mutex.synchronize{
- @element = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
- OBJ_ID[1].succ!
- }
- end
- @path = @id
- @parent = @chart = chart
- @cpath = @chart.path
- @typename = self.class::ElementTypeName
- # Element::ElementID_TBL[@cpath][@element] = self
- keys = _symbolkey2str(keys)
- unless keys.delete('without_creating')
- # @chart.element_create(@element, keys)
- tk_call(@chart, @typename, 'create', @element, keys)
- end
- end
-
- def id
- @id
- end
-
- def to_eval
- @id
- end
-
- def cget_tkstring(option)
- # @chart.element_cget(@id, option)
- @chart.__send__(@typename + '_cget_tkstring', @id, option)
- end
- def cget(option)
- # @chart.element_cget(@id, option)
- @chart.__send__(@typename + '_cget', @id, option)
- end
- def cget_strict(option)
- @chart.__send__(@typename + '_cget_strict', @id, option)
- end
- def configure(key, value=None)
- # @chart.element_configure(@id, key, value)
- @chart.__send__(@typename + '_configure', @id, key, value)
- self
- end
- def configinfo(key=nil)
- # @chart.element_configinfo(@id, key)
- @chart.__send__(@typename + '_configinfo', @id, key)
- end
- def current_configinfo(key=nil)
- # @chart.current_element_configinfo(@id, key)
- @chart.__send__('current_' << @typename << '_configinfo', @id, key)
- end
-
- def activate(*args)
- @chart.element_activate(@id, *args)
- end
-
- def closest(x, y, var, keys={})
- # @chart.element_closest(x, y, var, @id, keys)
- @chart.__send__(@typename + '_closest', x, y, var, @id, keys)
- end
-
- def deactivate
- @chart.element_deactivate(@id)
- self
- end
-
- def delete
- @chart.element_delete(@id)
- self
- end
-
- def exist?
- @chart.element_exist?(@id)
- end
-
- def name
- @element
- end
-
- def type
- @chart.element_type(@id)
- end
- end
-
- class Bar < Element
- ElementTypeName = 'bar'.freeze
- ElementTypeToClass[ElementTypeName] = self
- end
- class Line < Element
- ElementTypeName = 'line'.freeze
- ElementTypeToClass[ElementTypeName] = self
- end
-
- #################
-
- class GridLine < TkObject
- GridLineID_TBL = TkCore::INTERP.create_table
- TkCore::INTERP.init_ip_env{
- GridLineID_TBL.mutex.synchronize{ GridLineID_TBL.clear }
- }
-
- def self.new(chart, keys={})
- obj = nil
- GridLineID_TBL.mutex.synchronize{
- unless (obj = GridLineID_TBL[chart.path])
- (obj = self.allocate).instance_eval{
- @parent = @chart = chart
- @cpath = @chart.path
- @path = @id = 'grid'
- GridLine::GridLineID_TBL[@cpath] = self
- }
- end
- }
- chart.gridline_configure(keys) if obj && ! keys.empty?
- obj
- end
-
- def initialize(chart, keys={})
- # dummy:: not called by 'new' method
-
- @parent = @chart = chart
- @cpath = @chart.path
- # GridLine::GridLineID_TBL[@cpath] = self
- @chart.gridline_configure(keys) unless keys.empty?
- @path = @id = 'grid'
- end
-
- def id
- @id
- end
-
- def to_eval
- @id
- end
-
- def cget_tkstring(option)
- @chart.gridline_cget_tkstring(option)
- end
- def cget(option)
- @chart.gridline_cget(option)
- end
- def cget_strict(option)
- @chart.gridline_cget_strict(option)
- end
- def configure(key, value=None)
- @chart.gridline_configure(key, value)
- self
- end
- def configinfo(key=nil)
- @chart.gridline_configinfo(key)
- end
- def current_configinfo(key=nil)
- @chart.current_gridline_configinfo(key)
- end
-
- def off
- @chart.gridline_off
- self
- end
- def on
- @chart.gridline_on
- self
- end
- def toggle
- @chart.gridline_toggle
- self
- end
- end
-
- #################
-
- class Legend < TkObject
- LegendID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- LegendID_TBL.mutex.synchronize{ LegendID_TBL.clear }
- }
-
- def self.new(chart, keys={})
- obj = nil
- LegenedID_TBL.mutex.synchronize{
- unless (obj = LegenedID_TBL[chart.path])
- (obj = self.allocate).instance_eval{
- @parent = @chart = chart
- @cpath = @chart.path
- @path = @id = 'crosshairs'
- Legend::LegenedID_TBL[@cpath] = self
- }
- end
- }
- chart.legend_configure(keys) if obj && ! keys.empty?
- obj
- end
-
- def initialize(chart, keys={})
- # dummy:: not called by 'new' method
-
- @parent = @chart = chart
- @cpath = @chart.path
- # Legend::LegendID_TBL[@cpath] = self
- @chart.legend_configure(keys) unless keys.empty?
- @path = @id = 'legend'
- end
-
- def id
- @id
- end
-
- def to_eval
- @id
- end
-
- def cget_tkstring(option)
- @chart.legend_cget_tkstring(option)
- end
- def cget(option)
- @chart.legend_cget(option)
- end
- def cget_strict(option)
- @chart.legend_cget_strict(option)
- end
- def configure(key, value=None)
- @chart.legend_configure(key, value)
- self
- end
- def configinfo(key=nil)
- @chart.legend_configinfo(key)
- end
- def current_configinfo(key=nil)
- @chart.current_legend_configinfo(key)
- end
-
- def activate(*args)
- @chart.legend_activate(*args)
- end
-
- def deactivate(*args)
- @chart.legend_deactivate(*args)
- end
-
- def get(pos, y=nil)
- @chart.legend_get(pos, y)
- end
- end
-
- #################
-
- class Pen < TkObject
- (OBJ_ID = ['blt_chart_pen'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- PenID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- PenID_TBL.mutex.synchronize{ PenID_TBL.clear }
- }
-
- def self.id2obj(chart, id)
- cpath = chart.path
- PenID_TBL.mutex.synchronize{
- return id unless PenID_TBL[cpath]
- PenID_TBL[cpath][id]? PenID_TBL[cpath][id]: id
- }
- end
-
- def self.new(chart, pen=nil, keys={})
- if pen.kind_of?(Hash)
- keys = pen
- pen = nil
- end
- if keys
- keys = _symbolkey2str(keys)
- not_create = keys.delete('without_creating')
- else
- not_create = false
- end
-
- obj = nil
- PenID_TBL.mutex.synchronize{
- chart_path = chart.path
- PenID_TBL[chart_path] ||= {}
- if pen && PenID_TBL[chart_path][pen]
- obj = PenID_TBL[chart_path][pen]
- else
- (obj = self.allocate).instance_eval{
- if pen
- @pen = @id = pen.to_s
- else
- OBJ_ID.mutex.synchronize{
- @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
- OBJ_ID[1].succ!
- }
- end
- @path = @id
- @parent = @chart = chart
- @cpath = @chart.path
- Pen::PenID_TBL[@cpath][@pen] = self
- unless not_create
- tk_call(@chart, 'pen', 'create', @pen, keys)
- return obj
- end
- }
- end
- }
-
- obj.configure(keys) if obj && ! keys.empty?
- obj
- end
-
- def initialize(chart, pen=nil, keys={})
- if pen.kind_of?(Hash)
- keys = pen
- pen = nil
- end
- if pen
- @pen = @id = pen.to_s
- else
- OBJ_ID.mutex.synchronize{
- @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
- OBJ_ID[1].succ!
- }
- end
- @path = @id
- @parent = @chart = chart
- @cpath = @chart.path
- Pen::PenID_TBL[@cpath][@pen] = self
- keys = _symbolkey2str(keys)
- unless keys.delete('without_creating')
- # @chart.pen_create(@pen, keys)
- tk_call(@chart, 'pen', 'create', @pen, keys)
- end
- end
-
- def id
- @id
- end
-
- def to_eval
- @id
- end
-
- def cget_tkstring(option)
- @chart.pen_cget_tkstring(@id, option)
- end
- def cget(option)
- @chart.pen_cget(@id, option)
- end
- def cget_strict(option)
- @chart.pen_cget_strict(@id, option)
- end
- def configure(key, value=None)
- @chart.pen_configure(@id, key, value)
- self
- end
- def configinfo(key=nil)
- @chart.pen_configinfo(@id, key)
- end
- def current_configinfo(key=nil)
- @chart.current_pen_configinfo(@id, key)
- end
-
- def delete
- @chart.pen_delete(@id)
- self
- end
-
- def name
- @pen
- end
- end
-
- #################
-
- class Postscript < TkObject
- PostscriptID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- PostscriptID_TBL.mutex.synchronize{ PostscriptID_TBL.clear }
- }
-
- def self.new(chart, keys={})
- obj = nil
- PostscriptID_TBL.mutex.synchronize{
- unless (obj = PostscriptID_TBL[chart.path])
- (obj = self.allocate).instance_eval{
- @parent = @chart = chart
- @cpath = @chart.path
- @path = @id = 'postscript'
- Postscript::PostscriptID_TBL[@cpath] = self
- }
- end
- }
- chart.postscript_configure(keys) if obj && ! keys.empty?
- obj
- end
-
- def initialize(chart, keys={})
- # dummy:: not called by 'new' method
-
- @parent = @chart = chart
- @cpath = @chart.path
- # Postscript::PostscriptID_TBL[@cpath] = self
- @chart.postscript_configure(keys) unless keys.empty?
- @path = @id = 'postscript'
- end
-
- def id
- @id
- end
-
- def to_eval
- @id
- end
-
- def cget_tkstring(option)
- @chart.postscript_cget_tkstring(option)
- end
- def cget(option)
- @chart.postscript_cget(option)
- end
- def cget_strict(option)
- @chart.postscript_cget_strict(option)
- end
- def configure(key, value=None)
- @chart.postscript_configure(key, value)
- self
- end
- def configinfo(key=nil)
- @chart.postscript_configinfo(key)
- end
- def current_configinfo(key=nil)
- @chart.current_postscript_configinfo(key)
- end
-
- def output(file=nil, keys={})
- if file.kind_of?(Hash)
- keys = file
- file = nil
- end
-
- ret = @chart.postscript_output(file, keys)
-
- if file
- self
- else
- ret
- end
- end
- end
-
- #################
- class Marker < TkObject
- extend Tk
- extend TkItemFontOptkeys
- extend TkItemConfigOptkeys
-
- extend Tk::BLT::PlotComponent::OptKeys
-
- MarkerTypeName = nil
- MarkerTypeToClass = {}
- MarkerID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- MarkerID_TBL.mutex.synchronize{ MarkerID_TBL.clear }
- }
-
- def Marker.type2class(type)
- MarkerTypeToClass[type]
- end
-
- def Marker.id2obj(chart, id)
- cpath = chart.path
- MarkerID_TBL.mutex.synchronize{
- if MarkerID_TBL[cpath]
- MarkerID_TBL[cpath][id]? MarkerID_TBL[cpath][id]: id
- else
- id
- end
- }
- end
-
- def self._parse_create_args(keys)
- fontkeys = {}
- methodkeys = {}
- if keys.kind_of? Hash
- keys = _symbolkey2str(keys)
-
- __item_font_optkeys(nil).each{|key|
- fkey = key.to_s
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
-
- fkey = "kanji#{key}"
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
-
- fkey = "latin#{key}"
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
-
- fkey = "ascii#{key}"
- fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
- }
-
- __item_optkey_aliases(nil).each{|alias_name, real_name|
- alias_name = alias_name.to_s
- if keys.has_key?(alias_name)
- keys[real_name.to_s] = keys.delete(alias_name)
- end
- }
-
- __item_methodcall_optkeys(nil).each{|key|
- key = key.to_s
- methodkeys[key] = keys.delete(key) if keys.key?(key)
- }
-
- __item_ruby2val_optkeys(nil).each{|key, method|
- key = key.to_s
- keys[key] = method.call(keys[key]) if keys.has_key?(key)
- }
-
- args = itemconfig_hash_kv(nil, keys)
- else
- args = []
- end
-
- [args, fontkeys, methodkeys]
- end
- private_class_method :_parse_create_args
-
- def self.create(chart, keys={})
- unless self::MarkerTypeName
- fail RuntimeError, "#{self} is an abstract class"
- end
- args, fontkeys, methodkeys = _parse_create_args(keys)
- idnum = tk_call_without_enc(chart.path, 'marker', 'create',
- self::MarkerTypeName, *args)
- chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
- chart.marker_configure(idnum, methodkeys) unless methodkeys.empty?
- idnum.to_i # 'item id' is an integer number
- end
-
- def self.create_type(chart, type, keys={})
- args, fontkeys, methodkeys = _parse_create_args(keys)
- idnum = tk_call_without_enc(chart.path, 'marker', 'create',
- type, *args)
- chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
- chart.marker_configure(idnum, methodkeys) unless methodkeys.empty?
- id = idnum.to_i # 'item id' is an integer number
- obj = self.allocate
- obj.instance_eval{
- @parent = @chart = chart
- @cpath = chart.path
- @id = id
- Tk::BLT::PlotComponent::Marker::MarkerID_TBL.mutex.synchronize{
- Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath] ||= {}
- Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath][@id] = self
- }
- }
- obj
- end
-
- def initialize(parent, *args)
- @parent = @chart = parent
- @cpath = parent.path
-
- @path = @id = create_self(*args) # an integer number as 'item id'
- Tk::BLT::PlotComponent::Marker::MarkerID_TBL.mutex.synchronize{
- Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath] ||= {}
- Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath][@id] = self
- }
- end
- def create_self(*args)
- self.class.create(@chart, *args) # return an integer as 'item id'
- end
- private :create_self
-
- def id
- @id
- end
-
- def to_eval
- @id
- end
-
- def cget_tkstring(option)
- @chart.marker_cget_tkstring(@id, option)
- end
- def cget(option)
- @chart.marker_cget(@id, option)
- end
- def cget_strict(option)
- @chart.marker_cget_strict(@id, option)
- end
- def configure(key, value=None)
- @chart.marker_configure(@id, key, value)
- self
- end
- def configinfo(key=nil)
- @chart.marker_configinfo(@id, key)
- end
- def current_configinfo(key=nil)
- @chart.current_marker_configinfo(@id, key)
- end
-
- def after(target=None)
- @chart.marker_after(@id, target)
- end
-
- def before(target=None)
- @chart.marker_before(@id, target)
- end
-
- def delete
- @chart.marker_delete(@id)
- end
-
- def exist?
- @chart.marker_exist(@id)
- end
-
- def type
- @chart.marker_type(@id)
- end
- end
-
- class TextMarker < Marker
- MarkerTypeName = 'text'.freeze
- MarkerTypeToClass[MarkerTypeName] = self
- end
- class LineMarker < Marker
- MarkerTypeName = 'line'.freeze
- MarkerTypeToClass[MarkerTypeName] = self
- end
- class BitmapMarker < Marker
- MarkerTypeName = 'bitmap'.freeze
- MarkerTypeToClass[MarkerTypeName] = self
- end
- class ImageMarker < Marker
- MarkerTypeName = 'image'.freeze
- MarkerTypeToClass[MarkerTypeName] = self
- end
- class PolygonMarker < Marker
- MarkerTypeName = 'polygon'.freeze
- MarkerTypeToClass[MarkerTypeName] = self
- end
- class WindowMarker < Marker
- MarkerTypeName = 'window'.freeze
- MarkerTypeToClass[MarkerTypeName] = self
- end
-
- #################
-
- def __destroy_hook__
- Axis::AxisID_TBL.delete(@path)
- Crosshairs::CrosshairsID_TBL.delete(@path)
- Element::ElementID_TBL.delete(@path)
- GridLine::GridLineID_TBL.delete(@path)
- Legend::LegendID_TBL.delete(@path)
- Pen::PenID_TBL.delete(@path)
- Postscript::PostscriptID_TBL.delete(@path)
- Marker::MarkerID_TBL.delete(@path)
- super()
- end
-
- #################
-
- def tagid(tag)
- if tag.kind_of?(Axis) ||
- tag.kind_of?(Crosshairs) ||
- tag.kind_of?(Element) ||
- tag.kind_of?(GridLine) ||
- tag.kind_of?(Legend) ||
- tag.kind_of?(Pen) ||
- tag.kind_of?(Postscript) ||
- tag.kind_of?(Marker)
- tag.id
- else
- tag # maybe an Array of configure parameters
- end
- end
-
- def _component_bind(target, tag, context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, target, 'bind', tagid(tag)], context, cmd, *args)
- self
- end
- def _component_bind_append(target, tag, context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, target, 'bind', tagid(tag)], context, cmd, *args)
- self
- end
- def _component_bind_remove(target, tag, context)
- _bind_remove([path, target, 'bind', tagid(tag)], context)
- self
- end
- def _component_bindinfo(target, tag, context=nil)
- _bindinfo([path, target, 'bind', tagid(tag)], context)
- end
- private :_component_bind, :_component_bind_append
- private :_component_bind_remove, :_component_bindinfo
-
- def axis_bind(tag, context, *args)
- _component_bind('axis', tag, context, *args)
- end
- def axis_bind_append(tag, context, *args)
- _component_bind_append('axis', tag, context, *args)
- end
- def axis_bind_remove(tag, context)
- _component_bind_remove('axis', tag, context)
- end
- def axis_bindinfo(tag, context=nil)
- _component_bindinfo('axis', tag, context)
- end
-
- def element_bind(tag, context, *args)
- _component_bind('element', tag, context, *args)
- end
- def element_bind_append(tag, context, *args)
- _component_bind_append('element', tag, context, *args)
- end
- def element_bind_remove(tag, context)
- _component_bind_remove('element', tag, context)
- end
- def element_bindinfo(tag, context=nil)
- _component_bindinfo('element', tag, context)
- end
-
- def bar_bind(tag, context, *args)
- _component_bind('bar', tag, context, *args)
- end
- def bar_bind_append(tag, context, *args)
- _component_bind_append('bar', tag, context, *args)
- end
- def bar_bind_remove(tag, context)
- _component_bind_remove('bar', tag, context)
- end
- def bar_bindinfo(tag, context=nil)
- _component_bindinfo('bar', tag, context)
- end
-
- def line_bind(tag, context, *args)
- _component_bind('line', tag, context, *args)
- end
- def line_bind_append(tag, context, *args)
- _component_bind_append('line', tag, context, *args)
- end
- def line_bind_remove(tag, context)
- _component_bind_remove('line', tag, context)
- end
- def line_bindinfo(tag, context=nil)
- _component_bindinfo('line', tag, context)
- end
-
- def legend_bind(tag, context, *args)
- _component_bind('legend', tag, context, *args)
- end
- def legend_bind_append(tag, context, *args)
- _component_bind_append('legend', tag, context, *args)
- end
- def legend_bind_remove(tag, context)
- _component_bind_remove('legend', tag, context)
- end
- def legend_bindinfo(tag, context=nil)
- _component_bindinfo('legend', tag, context)
- end
-
- def marker_bind(tag, context, *args)
- _component_bind('marker', tag, context, *args)
- end
- def marker_bind_append(tag, context, *args)
- _component_bind_append('marker', tag, context, *args)
- end
- def marker_bind_remove(tag, context)
- _component_bind_remove('marker', tag, context)
- end
- def marker_bindinfo(tag, context=nil)
- _component_bindinfo('marker', tag, context)
- end
-
- ###################
-
- def axis_create(id=nil, keys={})
- # tk_send('axis', 'create', tagid(id), keys)
- Tk::BLT::PlotComponent::Axis.new(self, tagid(id), keys)
- end
- def axis_delete(*ids)
- tk_send('axis', 'delete', *(ids.collect{|id| tagid(id)}))
- self
- end
- def axis_invtransform(id, val)
- list(tk_send('axis', 'invtransform', tagid(id), val))
- end
- def axis_limits(id)
- list(tk_send('axis', 'limits', tagid(id)))
- end
- def axis_names(*pats)
- simplelist(tk_send('axis', 'names',
- *(pats.collect{|pat| tagid(pat)}))).collect{|axis|
- Tk::BLT::PlotComponent::Axis.id2obj(self, axis)
- }
- end
- def axis_transform(id, val)
- list(tk_send('axis', 'transform', tagid(id), val))
- end
- def axis_view(id)
- tk_send('axis', 'view', tagid(id))
- self
- end
- def axis_use(id, target=nil)
- if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('axis', 'use',
- tagid(id), tagid(target)))
- else
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('axis', 'use', tagid(id)))
- end
- end
-
- ###################
-
- def crosshairs_off
- tk_send_without_enc('crosshairs', 'off')
- self
- end
- def crosshairs_on
- tk_send_without_enc('crosshairs', 'on')
- self
- end
- def crosshairs_toggle
- tk_send_without_enc('crosshairs', 'toggle')
- self
- end
-
- ###################
-
- def element_create(id=nil, keys={})
- # tk_send('element', 'create', tagid(id), keys)
- Tk::BLT::PlotComponent::Element.new(self, tagid(id), keys)
- end
- def element_activate(*args)
- if args.empty?
- list(tk_send('element', 'activate')).collect{|elem|
- Tk::BLT::PlotComponent::Element.id2obj(self, elem)
- }
- else
- # id, *indices
- id = args.shift
- tk_send('element', 'activate', tagid(id), *args)
- end
- end
- def element_closest(x, y, var, *args)
- if args[-1].kind_of?(Hash)
- keys = args.pop
- bool(tk_send('element', 'closest', x, y, var,
- *(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
- else
- bool(tk_send('element', 'closest', x, y, var,
- *(args.collect{|id| tagid(id)})))
- end
- end
- def element_deactivate(*ids)
- tk_send('element', 'deactivate', *(ids.collect{|id| tagid(id)}))
- self
- end
- def element_delete(*ids)
- tk_send('element', 'delete', *(ids.collect{|id| tagid(id)}))
- self
- end
- def element_exist?(id)
- bool(tk_send('element', 'exists', tagid(id)))
- end
- def element_names(*pats)
- simplelist(tk_send('element', 'names',
- *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
- Tk::BLT::PlotComponent::Element.id2obj(self, elem)
- }
- end
- def element_show(*names)
- if names.empty?
- simplelist(tk_send('element', 'show'))
- else
- tk_send('element', 'show', *(names.collect{|n| tagid(n)}))
- self
- end
- end
- def element_type(id)
- tk_send('element', 'type', tagid(id))
- end
-
- ###################
-
- def bar_create(id=nil, keys={})
- # tk_send('bar', 'create', tagid(id), keys)
- Tk::BLT::PlotComponent::Bar.new(self, tagid(id), keys)
- end
- alias bar bar_create
- def bar_activate(*args)
- if args.empty?
- list(tk_send('bar', 'activate')).collect{|elem|
- Tk::BLT::PlotComponent::Element.id2obj(self, elem)
- }
- else
- # id, *indices
- id = args.shift
- tk_send('bar', 'activate', tagid(id), *args)
- end
- end
- def bar_closest(x, y, var, *args)
- if args[-1].kind_of?(Hash)
- keys = args.pop
- bool(tk_send('bar', 'closest', x, y, var,
- *(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
- else
- bool(tk_send('bar', 'closest', x, y, var,
- *(args.collect{|id| tagid(id)})))
- end
- end
- def bar_deactivate(*ids)
- tk_send('bar', 'deactivate', *(ids.collect{|id| tagid(id)}))
- self
- end
- def bar_delete(*ids)
- tk_send('bar', 'delete', *(ids.collect{|id| tagid(id)}))
- self
- end
- def bar_exist?(id)
- bool(tk_send('bar', 'exists', tagid(id)))
- end
- def bar_names(*pats)
- simplelist(tk_send('bar', 'names',
- *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
- Tk::BLT::PlotComponent::Element.id2obj(self, elem)
- }
- end
- def bar_show(*names)
- if names.empty?
- simplelist(tk_send('bar', 'show'))
- else
- tk_send('bar', 'show', *(names.collect{|n| tagid(n)}))
- self
- end
- end
- def bar_type(id)
- tk_send('bar', 'type', tagid(id))
- end
-
- ###################
-
- def line_create(id=nil, keys={})
- # tk_send('line', 'create', tagid(id), keys)
- Tk::BLT::PlotComponent::Line.new(self, tagid(id), keys)
- end
- alias bar line_create
- def line_activate(*args)
- if args.empty?
- list(tk_send('line', 'activate')).collect{|elem|
- Tk::BLT::PlotComponent::Element.id2obj(self, elem)
- }
- else
- # id, *indices
- id = args.shift
- tk_send('line', 'activate', tagid(id), *args)
- end
- end
- def line_closest(x, y, var, *args)
- if args[-1].kind_of?(Hash)
- keys = args.pop
- bool(tk_send('line', 'closest', x, y, var,
- *(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
- else
- bool(tk_send('line', 'closest', x, y, var,
- *(args.collect{|id| tagid(id)})))
- end
- end
- def line_deactivate(*ids)
- tk_send('line', 'deactivate', *(ids.collect{|id| tagid(id)}))
- self
- end
- def line_delete(*ids)
- tk_send('line', 'delete', *(ids.collect{|id| tagid(id)}))
- self
- end
- def line_exist?(id)
- bool(tk_send('line', 'exists', tagid(id)))
- end
- def line_names(*pats)
- simplelist(tk_send('line', 'names',
- *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
- Tk::BLT::PlotComponent::Element.id2obj(self, elem)
- }
- end
- def line_show(*names)
- if names.empty?
- simplelist(tk_send('line', 'show'))
- else
- tk_send('line', 'show', *(names.collect{|n| tagid(n)}))
- self
- end
- end
- def line_type(id)
- tk_send('line', 'type', tagid(id))
- end
-
- ###################
-
- def gridline_off
- tk_send_without_enc('grid', 'off')
- self
- end
- def gridline_on
- tk_send_without_enc('grid', 'on')
- self
- end
- def gridline_toggle
- tk_send_without_enc('grid', 'toggle')
- self
- end
-
- ###################
-
- def legend_window_create(parent=nil, keys=nil)
- if parent.kind_of?(Hash)
- keys = _symbolkey2str(parent)
- parent = keys.delete('parent')
- widgetname = keys.delete('widgetname')
- keys.delete('without_creating')
- elsif keys
- keys = _symbolkey2str(keys)
- widgetname = keys.delete('widgetname')
- keys.delete('without_creating')
- end
-
- legend = self.class.new(parent, :without_creating=>true,
- :widgetname=>widgetname)
- class << legend
- def __destroy_hook__
- TkCore::INTERP.tk_windows.delete(@path)
- end
- end
-
- if keys
- self.legend_configure(keys.update('position'=>legend))
- else
- self.legend_configure('position'=>legend)
- end
- legend
- end
-
- def legend_activate(*pats)
- list(tk_send('legend', 'activate',
- *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
- Tk::BLT::PlotComponent::Element.id2obj(self, elem)
- }
- end
- def legend_deactivate(*pats)
- list(tk_send('legend', 'deactivate',
- *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
- Tk::BLT::PlotComponent::Element.id2obj(self, elem)
- }
- end
- def legend_get(pos, y=nil)
- if y
- Tk::BLT::PlotComponent::Element.id2obj(self,
- tk_send('legend', 'get',
- _at(pos, y)))
- else
- Tk::BLT::PlotComponent::Element.id2obj(self,
- tk_send('legend', 'get', pos))
- end
- end
-
- ###################
-
- def pen_create(id=nil, keys={})
- # tk_send('pen', 'create', tagid(id), keys)
- Tk::BLT::PlotComponent::Pen.new(self, tagid(id), keys)
- end
- def pen_delete(*ids)
- tk_send('pen', 'delete', *(ids.collect{|id| tagid(id)}))
- self
- end
- def pen_names(*pats)
- simplelist(tk_send('pen', 'names',
- *(pats.collect{|pat| tagid(pat)}))).collect{|pen|
- Tk::BLT::PlotComponent::Pen.id2obj(self, pen)
- }
- end
-
- ###################
-
- def postscript_output(file=nil, keys={})
- if file.kind_of?(Hash)
- keys = file
- file = nil
- end
-
- if file
- tk_send('postscript', 'output', file, keys)
- self
- else
- tk_send('postscript', 'output', keys)
- end
- end
-
- ###################
-
- def marker_create(type, keys={})
- case type
- when :text, 'text'
- Tk::BLT::PlotComponent::TextMarker.new(self, keys)
- when :line, 'line'
- Tk::BLT::PlotComponent::LineMarker.new(self, keys)
- when :bitmap, 'bitmap'
- Tk::BLT::PlotComponent::BitmapMarker.new(self, keys)
- when :image, 'image'
- Tk::BLT::PlotComponent::ImageMarker.new(self, keys)
- when :polygon, 'polygon'
- Tk::BLT::PlotComponent::PolygonMarker.new(self, keys)
- when :window, 'window'
- Tk::BLT::PlotComponent::WindowMarker.new(self, keys)
- else
- if type.kind_of?(Tk::BLT::PlotComponent::Marker)
- type.new(self, keys)
- else
- Tk::BLT::PlotComponent::Marker.create_type(self, type, keys)
- end
- end
- end
- def marker_after(id, target=nil)
- if target
- tk_send_without_enc('marker', 'after', tagid(id), tagid(target))
- else
- tk_send_without_enc('marker', 'after', tagid(id))
- end
- self
- end
- def marker_before(id, target=None)
- if target
- tk_send_without_enc('marker', 'before', tagid(id), tagid(target))
- else
- tk_send_without_enc('marker', 'before', tagid(id))
- end
- self
- end
- def marker_delete(*ids)
- tk_send('marker', 'delete', *(ids.collect{|id| tagid(id)}))
- self
- end
- def marker_exist?(id)
- bool(tk_send('marker', 'exists', tagid(id)))
- end
- def marker_names(*pats)
- simplelist(tk_send('marker', 'names',
- *(pats.collect{|pat| tagid(pat)}))).collect{|id|
- Tk::BLT::PlotComponent::Marker.id2obj(self, id)
- }
- end
- def marker_type(id)
- tk_send('marker', 'type', tagid(id))
- end
-
- ###################
-
- def xaxis_cget_tkstring(option)
- itemcget_tkstring('xaxis', option)
- end
- def xaxis_cget(option)
- itemcget('xaxis', option)
- end
- def xaxis_cget_strict(option)
- itemcget_strict('xaxis', option)
- end
- def xaxis_configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- elsif slot == :command || slot == 'command'
- cmd = value
- value = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- itemconfigure('xaxis', slot, value)
- end
- def xaxis_configinfo(slot=nil)
- itemconfiginfo('xaxis', slot)
- end
- def current_xaxis_configinfo(slot=nil)
- current_itemconfiginfo('xaxis', slot)
- end
- def xaxis_bind(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, 'xaxis', 'bind'], context, cmd, *args)
- self
- end
- def xaxis_bind_append(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, 'xaxis', 'bind'], context, cmd, *args)
- self
- end
- def xaxis_bind_remove(context)
- _bind_remove([path, 'xaxis', 'bind'], context)
- self
- end
- def xaxis_bindinfo(context=nil)
- _bindinfo([path, 'xaxis', 'bind'], context)
- end
- def xaxis_invtransform(val)
- list(tk_send('xaxis', 'invtransform', val))
- end
- def xaxis_limits
- list(tk_send('xaxis', 'limits'))
- end
- def xaxis_transform(val)
- list(tk_send('xaxis', 'transform', val))
- end
- def xaxis_use(target=nil)
- if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('xaxis', 'use',
- tagid(target)))
- else
- Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('xaxis', 'use'))
- end
- end
-
- def x2axis_cget_tkstring(option)
- itemcget_tkstring('x2axis', option)
- end
- def x2axis_cget(option)
- itemcget('x2axis', option)
- end
- def x2axis_cget_strict(option)
- itemcget_strict('x2axis', option)
- end
- def x2axis_configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- elsif slot == :command || slot == 'command'
- cmd = value
- value = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- itemconfigure('x2axis', slot, value)
- end
- def x2axis_configinfo(slot=nil)
- itemconfiginfo('x2axis', slot)
- end
- def current_x2axis_configinfo(slot=nil)
- current_itemconfiginfo('x2axis', slot)
- end
- def x2axis_bind(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, 'x2axis', 'bind'], context, cmd, *args)
- self
- end
- def x2axis_bind_append(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, 'x2axis', 'bind'], context, cmd, *args)
- self
- end
- def x2axis_bind_remove(context)
- _bind_remove([path, 'x2axis', 'bind'], context)
- self
- end
- def x2axis_bindinfo(context=nil)
- _bindinfo([path, 'x2axis', 'bind'], context)
- end
- def x2axis_invtransform(val)
- list(tk_send('x2axis', 'invtransform', val))
- end
- def x2axis_limits
- list(tk_send('x2axis', 'limits'))
- end
- def x2axis_transform(val)
- list(tk_send('x2axis', 'transform', val))
- end
- def x2axis_use(target=nil)
- if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('x2axis', 'use',
- tagid(target)))
- else
- Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('x2axis', 'use'))
- end
- end
-
- def yaxis_cget_tkstring(option)
- itemcget_tkstring('yaxis', option)
- end
- def yaxis_cget(option)
- itemcget('yaxis', option)
- end
- def yaxis_cget_strict(option)
- itemcget_strict('yaxis', option)
- end
- def yaxis_configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- elsif slot == :command || slot == 'command'
- cmd = value
- value = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- itemconfigure('yaxis', slot, value)
- end
- def yaxis_configinfo(slot=nil)
- itemconfiginfo('yaxis', slot)
- end
- def current_yaxis_configinfo(slot=nil)
- current_itemconfiginfo('yaxis', slot)
- end
- def yaxis_bind(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, 'yaxis', 'bind'], context, cmd, *args)
- self
- end
- def yaxis_bind_append(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, 'yaxis', 'bind'], context, cmd, *args)
- self
- end
- def yaxis_bind_remove(context)
- _bind_remove([path, 'yaxis', 'bind'], context)
- self
- end
- def yaxis_bindinfo(context=nil)
- _bindinfo([path, 'yaxis', 'bind'], context)
- end
- def yaxis_invtransform(val)
- list(tk_send('yaxis', 'invtransform', val))
- end
- def yaxis_limits
- list(tk_send('yaxis', 'limits'))
- end
- def yaxis_transform(val)
- list(tk_send('yaxis', 'transform', val))
- end
- def yaxis_use(target=nil)
- if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('yaxis', 'use',
- tagid(target)))
- else
- Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('yaxis', 'use'))
- end
- end
-
- def y2axis_cget_tkstring(option)
- itemcget_tkstring('y2axis', option)
- end
- def y2axis_cget(option)
- itemcget('y2axis', option)
- end
- def y2axis_cget_strict(option)
- itemcget_strict('y2axis', option)
- end
- def y2axis_configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- elsif slot == :command || slot == 'command'
- cmd = value
- value = proc{|w, tick|
- cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
- }
- end
- itemconfigure('y2axis', slot, value)
- end
- def y2axis_configinfo(slot=nil)
- axis_configinfo('y2axis', slot)
- end
- def current_y2axis_configinfo(slot=nil)
- current_itemconfiginfo('y2axis', slot)
- end
- def y2axis_bind(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, 'y2axis', 'bind'], context, cmd, *args)
- self
- end
- def y2axis_bind_append(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, 'y2axis', 'bind'], context, cmd, *args)
- self
- end
- def y2axis_bind_remove(context)
- _bind_remove([path, 'y2axis', 'bind'], context)
- self
- end
- def y2axis_bindinfo(context=nil)
- _bindinfo([path, 'y2axis', 'bind'], context)
- end
- def y2axis_invtransform(val)
- list(tk_send('y2axis', 'invtransform', val))
- end
- def y2axis_limits
- list(tk_send('y2axis', 'limits'))
- end
- def y2axis_transform(val)
- list(tk_send('y2axis', 'transform', val))
- end
- def y2axis_use(target=nil)
- if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('y2axis', 'use',
- tagid(target)))
- else
- Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('y2axis', 'use'))
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/container.rb b/ext/tk/lib/tkextlib/blt/container.rb
deleted file mode 100644
index 6ee11138d7..0000000000
--- a/ext/tk/lib/tkextlib/blt/container.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/container.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- class Container < TkWindow
- TkCommandNames = ['::blt::container'.freeze].freeze
- WidgetClassName = 'Container'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'name'
- end
- private :__strval_optkeys
-
- def find_command(pat)
- Hash[*simplelist(tk_send_without_enc('find', '-command', pat))]
- end
-
- def find_name(pat)
- Hash[*simplelist(tk_send_without_enc('find', '-name', pat))]
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/cutbuffer.rb b/ext/tk/lib/tkextlib/blt/cutbuffer.rb
deleted file mode 100644
index b36aece6e7..0000000000
--- a/ext/tk/lib/tkextlib/blt/cutbuffer.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/cutbuffer.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module CutBuffer
- TkCommandNames = ['::blt::cutbuffer'.freeze].freeze
-
- def self.get(num = 0)
- Tk.tk_call('::blt::cutbuffer', 'get', num)
- end
- def self.rotate(count = 1)
- Tk.tk_call('::blt::cutbuffer', 'rotate', count)
- end
- def self.set(val, num = 0)
- Tk.tk_call('::blt::cutbuffer', 'set', val, num)
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/dragdrop.rb b/ext/tk/lib/tkextlib/blt/dragdrop.rb
deleted file mode 100644
index dc2531b12e..0000000000
--- a/ext/tk/lib/tkextlib/blt/dragdrop.rb
+++ /dev/null
@@ -1,270 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/dragdrop.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/itemconfig'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module DragDrop
- extend TkCore
-
- TkCommandNames = ['::blt::drag&drop'.freeze].freeze
-
- class Token < TkWindow
- WidgetClassName = 'DragDropToken'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def initialize(arg)
- if arg.kind_of?(Hash) # arg is a hash includes the widgetpath of token
- arg = _symbolkey2str(arg)
- install_win(nil, arg['widgetname'])
- else # arg is a drag&drop source
- tk_call('::blt::drag&drop', 'source', arg)
- install_win(nil, tk_call('::blt::drag&drop', 'token', arg))
- end
- end
- end
-
- ###################################
-
- extend TkItemConfigMethod
- extend Tk::ValidateConfigure
-
- class << self
- def __item_config_cmd(id) # id := ['source'|'target', win]
- ['::blt::drag&drop', id[0], id[1]]
- end
- private :__item_config_cmd
-
- def __item_boolval_optkeys(id)
- super(id) << 'selftarget'
- end
- private :__item_boolval_optkeys
-
- def __item_listval_optkeys(id)
- super(id) << 'send'
- end
- private :__item_listval_optkeys
-
- def __item_strval_optkeys(id)
- super(id) << 'rejectbg' << 'rejectfg' << 'tokenbg'
- end
- private :__item_strval_optkeys
-
- undef itemcget
- undef itemcget_tkstring
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- def source_configure(win, slot, value=None)
- itemconfigure(['source', win], slot, value)
- end
- def source_configinfo(win, slot=nil)
- itemconfiginfo(['source', win], slot)
- end
- def current_source_configinfo(win, slot=nil)
- current_itemconfiginfo(['source', win], slot)
- end
- end
-
- class PackageCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?t, ?w, :token ],
- [ ?W, ?w, :widget ],
- nil
- ]
-
- PROC_TBL = [
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL)
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- ['packagecmd']
- end
- end
-
- class SiteCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?s, ?b, :compatible ],
- [ ?t, ?w, :token ],
- nil
- ]
-
- PROC_TBL = [
- [ ?b, TkComm.method(:bool) ],
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL)
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- ['sitecmd']
- end
- end
-
- def self.__validation_class_list
- super() << PackageCommand << SiteCommand
- end
-
- class << self
- Tk::ValidateConfigure.__def_validcmd(binding, PackageCommand)
- Tk::ValidateConfigure.__def_validcmd(binding, SiteCommand)
- end
-
- ###################################
-
- class DnD_Handle < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?i, ?s, :ip_name ],
- [ ?v, ?v, :value ],
- [ ?W, ?w, :widget ],
- nil
- ]
-
- PROC_TBL = [
- [ ?i, TkComm.method(:string) ],
- [ ?v, TkComm.method(:tk_tcl2ruby) ],
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL)
- end
-
- def self.source_handler(win, datatype, cmd=Proc.new, *args)
- _bind_for_event_class(DnD_Handle,
- ['::blt::drag&drop', 'source', win, 'handler'],
- cmd, *args)
- end
-
- def self.target_handler(win, datatype, cmd=Proc.new, *args)
- _bind_for_event_class(DnD_Handle,
- ['::blt::drag&drop', 'target', win, 'handler'],
- cmd, *args)
- end
-
- ###################################
-
- def self.init_source(win)
- tk_call('::blt::drag&drop', 'source', win)
- end
-
- def self.source()
- list(tk_call('::blt::drag&drop', 'source'))
- end
-
- def self.source_handler_list(win)
- simplelist(tk_call('::blt::drag&drop', 'source', win, 'handler'))
- end
- def self.source_handler_info(win, type)
- tk_tcl2ruby(tk_call('::blt::drag&drop', 'source', win, 'handler', type))
- end
-
- def self.target
- list(tk_call('::blt::drag&drop', 'target'))
- end
- def self.target_handler_list(win)
- simplelist(tk_call('::blt::drag&drop', 'target', win, 'handler'))
- end
-
- def self.handle_target(win, type, val=None)
- tk_call('::blt::drag&drop', 'target', win, 'handle', type, val)
- end
-
- def self.token(win)
- window(tk_call('::blt::drag&drop', 'token', win))
- end
-
- def self.drag(win, x, y)
- tk_call('::blt::drag&drop', 'drag', win, x, y)
- end
- def self.drop(win, x, y)
- tk_call('::blt::drag&drop', 'drop', win, x, y)
- end
-
- def self.errors(cmd=Proc.new)
- tk_call('::blt::drag&drop', 'errors', cmd)
- end
-
- def self.active
- bool(tk_call('::blt::drag&drop', 'active'))
- end
-
- def self.location(x=None, y=None)
- list(tk_call('::blt::drag&drop', 'location', x, y))
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/eps.rb b/ext/tk/lib/tkextlib/blt/eps.rb
deleted file mode 100644
index bd2d3cc47e..0000000000
--- a/ext/tk/lib/tkextlib/blt/eps.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/eps.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/canvas'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- class EPS < TkcItem
- CItemTypeName = 'eps'.freeze
- CItemTypeToClass[CItemTypeName] = self
- end
-end
-
-class Tk::Canvas
- alias __BLT_EPS_item_strval_optkeys __item_strval_optkeys
- def __item_strval_optkeys(id)
- __BLT_EPS_item_strval_optkeys(id) + [
- 'shadowcolor', 'title', 'titlecolor'
- ]
- end
- private :__item_strval_optkeys
-
- alias __BLT_EPS_item_boolval_optkeys __item_boolval_optkeys
- def __item_boolval_optkeys(id)
- __BLT_EPS_item_boolval_optkeys(id) + ['showimage']
- end
- private :__item_boolval_optkeys
-end
-
diff --git a/ext/tk/lib/tkextlib/blt/graph.rb b/ext/tk/lib/tkextlib/blt/graph.rb
deleted file mode 100644
index 02de006f33..0000000000
--- a/ext/tk/lib/tkextlib/blt/graph.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/graph.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-require 'tkextlib/blt/component.rb'
-
-module Tk::BLT
- class Graph < TkWindow
- TkCommandNames = ['::blt::graph'.freeze].freeze
- WidgetClassName = 'Graph'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- include PlotComponent
- include GraphCommand
-
- def __boolval_optkeys
- ['bufferelements', 'invertxy']
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- ['text', 'label', 'title', 'file', 'plotbackground']
- end
- private :__strval_optkeys
-
-=begin
- BarElement_ID = ['blt_graph_bar'.freeze, TkUtil.untrust('00000')].freeze
-
- def bar(elem=nil, keys={})
- if elem.kind_of?(Hash)
- keys = elem
- elem = nil
- end
- unless elem
- elem = BarElement_ID.join(TkCore::INTERP._ip_id_).freeze
- BarElement_ID[1].succ!
- end
- tk_send('bar', elem, keys)
- Element.new(self, elem, :without_creating=>true)
- end
-=end
-
- def extents(item)
- num_or_str(tk_send_without_enc('extents', item))
- end
-
- def invtransform(x, y)
- list(tk_send_without_enc('invtransform', x, y))
- end
-
- def inside(x, y)
- bool(tk_send_without_enc('inside', x, y))
- end
-
- def snap(output, keys={})
- tk_send_without_enc('snap', *(hash_kv(keys, false) + output))
- self
- end
-
- def transform(x, y)
- list(tk_send_without_enc('transform', x, y))
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/htext.rb b/ext/tk/lib/tkextlib/blt/htext.rb
deleted file mode 100644
index d0f5e8b5e6..0000000000
--- a/ext/tk/lib/tkextlib/blt/htext.rb
+++ /dev/null
@@ -1,113 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/htext.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/itemconfig.rb'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- class Htext<TkWindow
- Htext_Var = TkVarAccess.new_hash('htext')
- Htext_Widget = TkVarAccess.new('htext(widget)', :window)
- Htext_File = TkVarAccess.new('htext(file)')
- Htext_Line = TkVarAccess.new('htext(line)')
-
- include TkItemConfigMethod
- include Scrollable
-
- TkCommandNames = ['::blt::htext'.freeze].freeze
- WidgetClassName = 'Htext'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- alias window_cget_tkstring itemcget_tkstring
- alias window_cget itemcget
- alias window_cget_strict itemcget_strict
- alias window_configure itemconfigure
- alias window_configuinfo itemconfiginfo
- alias current_window_configuinfo current_itemconfiginfo
-
- def __strval_optkeys
- super() << 'filename'
- end
- private :__strval_optkeys
-
- def append(win, keys={})
- tk_send('append', _epath(win), keys)
- self
- end
-
- def goto_line(idx)
- tk_send_without_enc('gotoline', idx)
- self
- end
- def current_line
- number(tk_send_without_enc('gotoline'))
- end
-
- def index(str)
- number(tk_send('index', str))
- end
-
- def line_pos(str)
- tk_send('linepos', str)
- end
-
- def range(from=None, to=None)
- tk_send_without_enc('range', from, to)
- end
-
- def scan_mark(pos)
- tk_send_without_enc('scan', 'mark', pos)
- self
- end
-
- def scan_dragto(pos)
- tk_send_without_enc('scan', 'dragto', pos)
- self
- end
-
- def search(pat, from=None, to=None)
- num = number(tk_send('search', pat, from, to))
- (num < 0)? nil: num
- end
-
- def selection_adjust(index)
- tk_send_without_enc('selection', 'adjust', index)
- self
- end
- def selection_clear()
- tk_send_without_enc('selection', 'clear')
- self
- end
- def selection_from(index)
- tk_send_without_enc('selection', 'from', index)
- self
- end
- def selection_line(index)
- tk_send_without_enc('selection', 'line', index)
- self
- end
- def selection_present()
- bool(tk_send_without_enc('selection', 'present'))
- end
- def selection_range(first, last)
- tk_send_without_enc('selection', 'range', first, last)
- self
- end
- def selection_to(index)
- tk_send_without_enc('selection', 'to', index)
- self
- end
- def selection_word(index)
- tk_send_without_enc('selection', 'word', index)
- self
- end
-
- def windows(pat=None)
- list(tk_send('windows', pat))
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/setup.rb b/ext/tk/lib/tkextlib/blt/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/blt/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/blt/spline.rb b/ext/tk/lib/tkextlib/blt/spline.rb
deleted file mode 100644
index 84d96a08f0..0000000000
--- a/ext/tk/lib/tkextlib/blt/spline.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/spline.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module Spline
- extend TkCore
-
- TkCommandNames = ['::blt::spline'.freeze].freeze
-
- def self.natural(x, y, sx, sy)
- tk_call('::blt::spline', 'natural', x, y, sx, sy)
- end
-
- def self.quadratic(x, y, sx, sy)
- tk_call('::blt::spline', 'quadratic', x, y, sx, sy)
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/stripchart.rb b/ext/tk/lib/tkextlib/blt/stripchart.rb
deleted file mode 100644
index 332521ab0b..0000000000
--- a/ext/tk/lib/tkextlib/blt/stripchart.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/stripchart.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-require 'tkextlib/blt/component.rb'
-
-module Tk::BLT
- class Stripchart < TkWindow
- TkCommandNames = ['::blt::stripchart'.freeze].freeze
- WidgetClassName = 'Stripchart'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- include PlotComponent
- include GraphCommand
-
- def __boolval_optkeys
- ['bufferelements', 'buffergraph', 'invertxy']
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- ['text', 'label', 'title', 'file',
- 'background', 'plotbackground']
- end
- private :__strval_optkeys
-
-=begin
- BarElement_ID = ['blt_stripchart_bar'.freeze, TkUtil.untrust('00000')].freeze
-
- def bar(elem=nil, keys={})
- if elem.kind_of?(Hash)
- keys = elem
- elem = nil
- end
- unless elem
- elem = BarElement_ID.join(TkCore::INTERP._ip_id_).freeze
- BarElement_ID[1].succ!
- end
- tk_send('bar', elem, keys)
- Element.new(self, elem, :without_creating=>true)
- end
-=end
-
- def extents(item)
- num_or_str(tk_send_without_enc('extents', item))
- end
-
- def invtransform(x, y)
- list(tk_send_without_enc('invtransform', x, y))
- end
-
- def inside(x, y)
- bool(tk_send_without_enc('inside', x, y))
- end
-
- def metafile(file=None)
- # Windows only
- tk_send('metafile', file)
- self
- end
-
- def snap(output, keys={})
- tk_send_without_enc('snap', *(hash_kv(keys, false) + output))
- self
- end
-
- def transform(x, y)
- list(tk_send_without_enc('transform', x, y))
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/table.rb b/ext/tk/lib/tkextlib/blt/table.rb
deleted file mode 100644
index 39e345408d..0000000000
--- a/ext/tk/lib/tkextlib/blt/table.rb
+++ /dev/null
@@ -1,413 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/table.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/itemconfig.rb'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module Table
- include Tk
- extend Tk
- extend TkItemConfigMethod
-
- TkCommandNames = ['::blt::table'.freeze].freeze
-
- module TableContainer
- def blt_table_add(*args)
- Tk::BLT::Table.add(self, *args)
- self
- end
-
- def blt_table_arrange()
- Tk::BLT::Table.arrange(self)
- self
- end
-
- def blt_table_cget_tkstring(*args)
- Tk::BLT::Table.cget_tkstring(self, *args)
- end
- def blt_table_cget(*args)
- Tk::BLT::Table.cget(self, *args)
- end
- def blt_table_cget_strict(*args)
- Tk::BLT::Table.cget_strict(self, *args)
- end
-
- def blt_table_configure(*args)
- Tk::BLT::Table.configure(self, *args)
- self
- end
-
- def blt_table_configinfo(*args)
- Tk::BLT::Table.configinfo(self, *args)
- end
-
- def blt_table_current_configinfo(*args)
- Tk::BLT::Table.current_configinfo(self, *args)
- end
-
- def blt_table_locate(x, y)
- Tk::BLT::Table.locate(self, x, y)
- end
-
- def blt_table_delete(*args)
- Tk::BLT::Table.delete(self, *args)
- self
- end
-
- def blt_table_extents(item)
- Tk::BLT::Table.extents(self, item)
- end
-
- def blt_table_insert(*args)
- Tk::BLT::Table.insert(self, *args)
- self
- end
-
- def blt_table_insert_before(*args)
- Tk::BLT::Table.insert_before(self, *args)
- self
- end
-
- def blt_table_insert_after(*args)
- Tk::BLT::Table.insert_after(self, *args)
- self
- end
-
- def blt_table_join(first, last)
- Tk::BLT::Table.join(self, first, last)
- self
- end
-
- def blt_table_save()
- Tk::BLT::Table.save(self)
- end
-
- def blt_table_search(*args)
- Tk::BLT::Table.search(self, *args)
- end
-
- def blt_table_split(*args)
- Tk::BLT::Table.split(self, *args)
- self
- end
-
- def blt_table_itemcget_tkstring(*args)
- Tk::BLT::Table.itemcget_tkstring(self, *args)
- end
- def blt_table_itemcget(*args)
- Tk::BLT::Table.itemcget(self, *args)
- end
- def blt_table_itemcget_strict(*args)
- Tk::BLT::Table.itemcget_strict(self, *args)
- end
-
- def blt_table_itemconfigure(*args)
- Tk::BLT::Table.itemconfigure(self, *args)
- self
- end
-
- def blt_table_itemconfiginfo(*args)
- Tk::BLT::Table.itemconfiginfo(self, *args)
- end
-
- def blt_table_current_itemconfiginfo(*args)
- Tk::BLT::Table.current_itemconfiginfo(self, *args)
- end
-
- def blt_table_iteminfo(item)
- Tk::BLT::Table.iteminfo(self, item)
- end
- end
- end
-end
-
-
-############################################
-class << Tk::BLT::Table
- def __item_cget_cmd(id) # id := [ container, item ]
- win = (id[0].kind_of?(TkWindow))? id[0].path: id[0].to_s
- ['::blt::table', 'cget', win, id[1]]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id) # id := [ container, item, ... ]
- container, *items = id
- win = (container.kind_of?(TkWindow))? container.path: container.to_s
- ['::blt::table', 'configure', win, *items]
- end
- private :__item_config_cmd
-
- def __item_pathname(id)
- win = (id[0].kind_of?(TkWindow))? id[0].path: id[0].to_s
- win + ';'
- end
- private :__item_pathname
-
- alias __itemcget_tkstring itemcget_tkstring
- alias __itemcget itemcget
- alias __itemcget_strict itemcget_strict
- alias __itemconfigure itemconfigure
- alias __itemconfiginfo itemconfiginfo
- alias __current_itemconfiginfo current_itemconfiginfo
-
- private :__itemcget_tkstring, :__itemcget, :__itemcget_strict
- private :__itemconfigure, :__itemconfiginfo, :__current_itemconfiginfo
-
- def __boolval_optkeys
- super() << 'propagate'
- end
- private :__boolval_optkeys
-
- def tagid(tag)
- if tag.kind_of?(Array)
- case tag[0]
- when Integer
- # [row, col]
- tag.join(',')
- when :c, :C, 'c', 'C', :r, :R, 'r', 'R'
- # c0 or r1 or C*, and so on
- tag.collect{|elem| elem.to_s}.join('')
- else
- tag
- end
- elsif tag.kind_of?(TkWindow)
- _epath(tag)
- else
- tag
- end
- end
-
- def tagid2obj(tagid)
- tagid
- end
-
- ############################################
-
- def cget_tkstring(container, option)
- __itemcget_tkstring([container], option)
- end
- def cget(container, option)
- __itemcget([container], option)
- end
- def cget_strict(container, option)
- __itemcget_strict([container], option)
- end
-
- def configure(container, *args)
- __itemconfigure([container], *args)
- end
-
- def configinfo(container, *args)
- __itemconfiginfo([container], *args)
- end
-
- def current_configinfo(container, *args)
- __current_itemconfiginfo([container], *args)
- end
-
- def itemcget_tkstring(container, item, option)
- __itemcget_tkstring([container, tagid(item)], option)
- end
- def itemcget(container, item, option)
- __itemcget([container, tagid(item)], option)
- end
- def itemcget_strict(container, item, option)
- __itemcget_strict([container, tagid(item)], option)
- end
-
- def itemconfigure(container, *args)
- if args[-1].kind_of?(Hash)
- # container, item, item, ... , hash_optkeys
- keys = args.pop
- fail ArgumentError, 'no item is given' if args.empty?
- id = [container]
- args.each{|item| id << tagid(item)}
- __itemconfigure(id, keys)
- else
- # container, item, item, ... , option, value
- val = args.pop
- opt = args.pop
- fail ArgumentError, 'no item is given' if args.empty?
- id = [container]
- args.each{|item| id << tagid(item)}
- __itemconfigure(id, opt, val)
- end
- container
- end
-
- def itemconfiginfo(container, *args)
- slot = args[-1]
- if slot.kind_of?(String) || slot.kind_of?(Symbol)
- slot = slot.to_s
- if slot[0] == ?. || slot =~ /^\d+,\d+$/ || slot =~ /^(c|C|r|R)(\*|\d+)/
- # widget || row,col || Ci or Ri
- slot = nil
- else
- # option
- slot = args.pop
- end
- else
- slot = nil
- end
-
- fail ArgumentError, 'no item is given' if args.empty?
-
- id = [container]
- args.each{|item| id << tagid(item)}
- __itemconfiginfo(id, slot)
- end
-
- def current_itemconfiginfo(container, *args)
- slot = args[-1]
- if slot.kind_of?(String) || slot.kind_of?(Symbol)
- slot = slot.to_s
- if slot[0] == ?. || slot =~ /^\d+,\d+$/ || slot =~ /^(c|C|r|R)(\*|\d+)/
- # widget || row,col || Ci or Ri
- slot = nil
- else
- # option
- slot = args.pop
- end
- else
- slot = nil
- end
-
- fail ArgumentError, 'no item is given' if args.empty?
-
- id = [container]
- args.each{|item| id << tagid(item)}
- __current_itemconfiginfo(id, slot)
- end
-
- def info(container)
- ret = {}
- inf = list(tk_call('::blt::table', 'info', container))
- until inf.empty?
- opt = inf.slice!(0..1)
- ret[opt[1..-1]] = opt[1]
- end
- ret
- end
-
- def iteminfo(container, item)
- inf = list(tk_call('::blt::table', 'info', container, tagid(item)).chomp)
-
- ret = []
- until inf.empty? || (inf[0].kind_of?(String) && inf[0] =~ /^-/)
- ret << inf.shift
- end
-
- if inf.length > 1
- keys = {}
- while inf.length > 1
- opt = inf.slice!(0..1)
- keys[opt[0][1..-1]] = opt[1]
- end
- ret << keys
- end
-
- ret
- end
-
- ############################################
-
- def create_container(container)
- tk_call('::blt::table', container)
- begin
- class << container
- include Tk::BLT::Table::TableContainer
- end
- rescue
- warn('fail to include TableContainer methods (frozen object?)')
- end
- container
- end
-
- def add(container, *args)
- if args.empty?
- tk_call('::blt::table', container)
- else
- args = args.collect{|arg|
- if arg.kind_of?(TkWindow)
- _epath(arg)
- elsif arg.kind_of?(Array) # index
- arg.join(',')
- else
- arg
- end
- }
- tk_call('::blt::table', container, *args)
- end
- container
- end
-
- def arrange(container)
- tk_call('::blt::table', 'arrange', container)
- container
- end
-
- def delete(container, *args)
- tk_call('::blt::table', 'delete', container, *args)
- end
-
- def extents(container, item)
- ret = []
- inf = list(tk_call('::blt::table', 'extents', container, item))
- ret << inf.slice!(0..4) until inf.empty?
- ret
- end
-
- def forget(*wins)
- wins = wins.collect{|win| _epath(win)}
- tk_call('::blt::table', 'forget', *wins)
- end
-
- def insert(container, *args)
- tk_call('::blt::table', 'insert', container, *args)
- end
-
- def insert_before(container, *args)
- tk_call('::blt::table', 'insert', container, '-before', *args)
- end
-
- def insert_after(container, *args)
- tk_call('::blt::table', 'insert', container, '-after', *args)
- end
-
- def join(container, first, last)
- tk_call('::blt::table', 'join', container, first, last)
- end
-
- def locate(container, x, y)
- tk_call('::blt::table', 'locate', container, x, y)
- end
-
- def containers(arg={})
- list(tk_call('::blt::table', 'containers', *hash_kv(arg)))
- end
-
- def containers_pattern(pat)
- list(tk_call('::blt::table', 'containers', '-pattern', pat))
- end
-
- def containers_slave(win)
- list(tk_call('::blt::table', 'containers', '-slave', win))
- end
-
- def save(container)
- tk_call('::blt::table', 'save', container)
- end
-
- def search(container, keys={})
- list(tk_call('::blt::table', 'containers', *hash_kv(keys)))
- end
-
- def split(container, *args)
- tk_call('::blt::table', 'split', container, *args)
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tabnotebook.rb b/ext/tk/lib/tkextlib/blt/tabnotebook.rb
deleted file mode 100644
index f08f198163..0000000000
--- a/ext/tk/lib/tkextlib/blt/tabnotebook.rb
+++ /dev/null
@@ -1,111 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tabnotebook.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-require 'tkextlib/blt/tabset.rb'
-
-module Tk::BLT
- class Tabnotebook < Tabset
- TkCommandNames = ['::blt::tabnotebook'.freeze].freeze
- WidgetClassName = 'Tabnotebook'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- class Tab < Tk::BLT::Tabset::Tab
- def self.new(parent, pos=nil, name=nil, keys={})
- if pos.kind_of?(Hash)
- keys = pos
- name = nil
- pos = nil
- end
- if name.kind_of?(Hash)
- keys = name
- name = nil
- end
- obj = nil
- TabID_TBL.mutex.synchronize{
- if name && TabID_TBL[parent.path] && TabID_TBL[parent.path][name]
- obj = TabID_TBL[parent.path][name]
- if pos
- if pos.to_s == 'end'
- obj.move_after('end')
- else
- obj.move_before(pos)
- end
- end
- obj.configure if keys && ! keys.empty?
- else
- (obj = self.allocate).instance_eval{
- initialize(parent, pos, name, keys)
- TabID_TBL[@tpath] = {} unless TabID_TBL[@tpath]
- TabID_TBL[@tpath][@id] = self
- }
- end
- }
- obj
- end
-
- def initialize(parent, pos, name, keys)
- @t = parent
- @tpath = parent.path
- if name
- @path = @id = name
- unless (list(tk_call(@tpath, 'tab', 'names', @id)).empty?)
- if pos
- idx = tk_call(@tpath, 'index', @id)
- if pos.to_s == 'end'
- tk_call(@tpath, 'move', idx, 'after', 'end')
- else
- tk_call(@tpath, 'move', idx, 'before', pos)
- end
- end
- tk_call(@tpath, 'tab', 'configure', @id, keys)
- else
- fail ArgumentError, "can't find tab \"#{@id}\" in #{@t}"
- end
- else
- pos = 'end' unless pos
- @path = @id = tk_call(@tpath, 'insert', pos, keys)
- end
- end
- end
-
- #######################################
-
- def get_tab(index)
- if (idx = tk_send_without_enc('id', tagindex(index))).empty?
- nil
- else
- Tk::BLT::Tabset::Tab.id2obj(self, idx)
- end
- end
- alias get_id get_tab
-
- def get_tabobj(index)
- if (idx = tk_send_without_enc('id', tagindex(index))).empty?
- nil
- else
- Tk::BLT::Tabnotebook::Tab.new(self, nil, idx)
- end
- end
-
- alias index_name index
-
- def insert(pos=nil, keys={})
- if pos.kind_of?(Hash)
- keys = pos
- pos = nil
- end
- pos = 'end' if pos.nil?
- Tk::BLT::Tabnotebook::Tab.new(self, nil,
- tk_send('insert', tagindex(pos), keys))
-
- end
- undef :insert_tabs
-
- undef :tab_pageheight, :tab_pagewidth
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tabset.rb b/ext/tk/lib/tkextlib/blt/tabset.rb
deleted file mode 100644
index 022d9784e9..0000000000
--- a/ext/tk/lib/tkextlib/blt/tabset.rb
+++ /dev/null
@@ -1,505 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tabset.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- class Tabset < TkWindow
- class Tab < TkObject
- include TkTreatItemFont
-
- TabID_TBL = TkCore::INTERP.create_table
-
- (TabsetTab_ID = ['blt_tabset_tab'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- TabID_TBL.mutex.synchronize{ TabID_TBL.clear }
- }
-
- def self.id2obj(tabset, id)
- tpath = tabset.path
- TabID_TBL.mutex.synchronize{
- if TabID_TBL[tpath]
- TabID_TBL[tpath][id]? TabID_TBL[tpath][id]: id
- else
- id
- end
- }
- end
-
- def self.new(parent, pos=nil, name=nil, keys={})
- if pos.kind_of?(Hash)
- keys = pos
- name = nil
- pos = nil
- end
- if name.kind_of?(Hash)
- keys = name
- name = nil
- end
- obj = nil
- TabID_TBL.mutex.synchronize{
- if name && TabID_TBL[parent.path] && TabID_TBL[parent.path][name]
- obj = TabID_TBL[parent.path][name]
- if pos
- if pos.to_s == 'end'
- obj.move_after('end')
- else
- obj.move_before(pos)
- end
- end
- obj.configure if keys && ! keys.empty?
- else
- (obj = self.allocate).instance_eval{
- initialize(parent, pos, name, keys)
- TabID_TBL[@tpath] = {} unless TabID_TBL[@tpath]
- TabID_TBL[@tpath][@id] = self
- }
- end
- }
- obj
- end
-
- def initialize(parent, pos, name, keys)
- @t = parent
- @tpath = parent.path
- if name
- @path = @id = name
- unless (list(tk_call(@tpath, 'tab', 'names', @id)).empty?)
- if pos
- idx = tk_call(@tpath, 'index', '-name', @id)
- if pos.to_s == 'end'
- tk_call(@tpath, 'move', idx, 'after', 'end')
- else
- tk_call(@tpath, 'move', idx, 'before', pos)
- end
- end
- tk_call(@tpath, 'tab', 'configure', @id, keys)
- else
- pos = 'end' unless pos
- tk_call(@tpath, 'insert', pos, @id, keys)
- end
- else
- pos = 'end' unless pos
- TabsetTab_ID.mutex.synchronize{
- @path = @id = TabsetTab_ID.join(TkCore::INTERP._ip_id_)
- TabsetTab_ID[1].succ!
- }
- tk_call(@tpath, 'insert', pos, @id, keys)
- end
- end
-
- #def bind(context, cmd=Proc.new, *args)
- # @t.tab_bind(@id, context, cmd, *args)
- # self
- #end
- def bind(context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- @t.tab_bind(@id, context, cmd, *args)
- self
- end
- #def bind_append(context, cmd=Proc.new, *args)
- # @t.tab_bind_append(@id, context, cmd, *args)
- # self
- #end
- def bind_append(context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- @t.tab_bind_append(@id, context, cmd, *args)
- self
- end
- def bind_remove(context)
- @t.tab_bind_remove(@id, context)
- self
- end
- def bindinfo(context=nil)
- @t.tab_bindinfo(@id, context)
- end
-
- def cget_tkstring(*args)
- @t.tab_cget_tkstring(@id, *args)
- end
- def cget(*args)
- @t.tab_cget(@id, *args)
- end
- def cget_strict(*args)
- @t.tab_cget_strict(@id, *args)
- end
- def configure(*args)
- @t.tab_configure(@id, *args)
- end
- def configinfo(*args)
- @t.tab_configinfo(@id, *args)
- end
- def current_configinfo(*args)
- @t.current_tab_configinfo(@id, *args)
- end
-
- def delete()
- @t.delete(@id)
- TabID_TBL.mutex.synchronize{
- TabID_TBL[@tpath].delete(@id)
- }
- self
- end
-
- def get_name()
- @id.dup
- end
-
- def focus()
- @t.focus(self.index)
- end
-
- def index()
- @t.index_name(@id)
- end
-
- def invoke()
- @t.invoke(self.index)
- end
-
- def move_before(idx)
- @t.move_before(self.index, idx)
- end
- def move_after(idx)
- @t.move_after(self.index, idx)
- end
-
- def perforation_highlight(mode)
- @t.perforation_highlight(self.index, mode)
- end
- def perforation_invoke()
- @t.perforation_invoke(self.index)
- end
-
- def see()
- @t.see(self.index)
- end
-
- def tearoff(name=None)
- @t.tab_tearoff(self.index, *args)
- end
- end
-
- ########################################
-
- class NamedTab < Tab
- def self.new(parent, name)
- super(parent, nil, name, {})
- end
- end
-
- ########################################
-
- include X_Scrollable
- include TkItemConfigMethod
-
- TkCommandNames = ['::blt::tabset'.freeze].freeze
- WidgetClassName = 'Tabset'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __destroy_hook__
- Tk::BLT::Tabset::Tab::TabID_TBL.mutex.synchronize{
- Tk::BLT::Tabset::Tab::TabID_TBL.delete(@path)
- }
- end
-
- ########################################
-
- def __boolval_optkeys
- super() << 'samewidth' << 'tearoff'
- end
- private :__strval_optkeys
-
- def __strval_optkeys
- super() << 'tabbackground' << 'tabforeground'
- end
- private :__strval_optkeys
-
- def __item_cget_cmd(id)
- [self.path, 'tab', 'cget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'tab', 'configure', id]
- end
- private :__item_config_cmd
-
- def __item_pathname(tagOrId)
- if tagOrId.kind_of?(Tk::BLT::Tabset::Tab)
- self.path + ';' + tagOrId.id.to_s
- else
- self.path + ';' + tagOrId.to_s
- end
- end
- private :__item_pathname
-
- alias tab_cget_tkstring itemcget_tkstring
- alias tab_cget itemcget
- alias tab_cget_strict itemcget_strict
- alias tab_configure itemconfigure
- alias tab_configinfo itemconfiginfo
- alias current_tab_configinfo current_itemconfiginfo
-
- def __item_strval_optkeys(id)
- super(id) << 'shadow'
- end
- private :__item_strval_optkeys
-
- def tagid(tab)
- if tab.kind_of?(Tk::BLT::Tabset::Tab)
- tab.id
- else
- tab
- end
- end
-
- def tagindex(tab)
- if tab.kind_of?(Tk::BLT::Tabset::Tab)
- tab.index
- else
- tab
- end
- end
-
- ########################################
-
- def activate(index)
- tk_send('activate', tagindex(index))
- self
- end
- alias highlight activate
-
- #def tabbind(tag, context, cmd=Proc.new, *args)
- # _bind([path, "bind", tagid(tag)], context, cmd, *args)
- # self
- #end
- def tabbind(tag, context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, "bind", tagid(tag)], context, cmd, *args)
- self
- end
- #def tabbind_append(tag, context, cmd=Proc.new, *args)
- # _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
- # self
- #end
- def tabbind_append(tag, context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
- self
- end
- def tabbind_remove(tag, context)
- _bind_remove([path, "bind", tagid(tag)], context)
- self
- end
- def tabbindinfo(tag, context=nil)
- _bindinfo([path, "bind", tagid(tag)], context)
- end
-
- def delete(first, last=None)
- tk_send('delete', tagindex(first), tagindex(last))
- if first.kind_of?(Tk::BLT::Tabset::Tab)
- TabID_TBL.mutex.synchronize{
- TabID_TBL[@path].delete(first.id)
- }
- end
- # middle tabs of the range are unknown
- if last.kind_of?(Tk::BLT::Tabset::Tab)
- TabID_TBL.mutex.synchronize{
- TabID_TBL[@path].delete(last.id)
- }
- end
- self
- end
-
- def focus(index)
- tk_send('focus', tagindex(index))
- self
- end
-
- def get_tab(index)
- if (idx = tk_send_without_enc('get', tagindex(index))).empty?
- nil
- else
- Tk::BLT::Tabset::Tab.id2obj(self, idx)
- end
- end
- def get_tabobj(index)
- if (idx = tk_send_without_enc('get', tagindex(index))).empty?
- nil
- else
- Tk::BLT::Tabset::Tab.new(self, nil, name, {})
- end
- end
-
- def index(str)
- num_or_str(tk_send('index', str))
- end
- def index_name(tab)
- num_or_str(tk_send('index', '-name', tagid(tab)))
- end
-
- def insert(pos, tab, keys={})
- pos = 'end' if pos.nil?
- Tk::BLT::Tabset::Tab.new(self, tagindex(pos), tagid(tab), keys)
- end
- def insert_tabs(pos, *tabs)
- pos = 'end' if pos.nil?
- if tabs[-1].kind_of?(Hash)
- keys = tabs.pop
- else
- keys = {}
- end
- fail ArgumentError, 'no tabs is given' if tabs.empty?
- tabs.map!{|tab| tagid(tab)}
- tk_send('insert', tagindex(pos), *(tabs + [keys]))
- tabs.collect{|tab| Tk::BLT::Tabset::Tab.new(self, nil, tagid(tab))}
- end
-
- def invoke(index)
- tk_send('invoke', tagindex(index))
- end
-
- def move_before(index, base_idx)
- tk_send('move', tagindex(index), 'before', tagindex(base_idx))
- self
- end
- def move_after(index, base_idx)
- tk_send('move', tagindex(index), 'after', tagindex(base_idx))
- self
- end
-
- def nearest(x, y)
- Tk::BLT::Tabset::Tab.id2obj(self, num_or_str(tk_send_without_enc('nearest', x, y)))
- end
-
- def perforation_activate(mode)
- tk_send('perforation', 'activate', mode)
- self
- end
- def perforation_highlight(index, *args)
- if args.empty?
- # index --> mode
- tk_send('perforation', 'highlight', index)
- elsif args.size == 1
- # args[0] --> mode
- tk_send('perforation', 'highlight', tagindex(index), args[0])
- else # Error: call to get Tcl's error message
- tk_send('perforation', 'highlight', tagindex(index), *args)
- end
- self
- end
- def perforation_invoke(index=nil)
- if index
- tk_send('perforation', 'invoke', tagindex(index))
- else
- tk_send('perforation', 'invoke')
- end
- end
-
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send_without_enc('scan', 'dragto', x, y)
- self
- end
-
- def see(index)
- tk_send('see', tagindex(index))
- self
- end
-
- def size()
- number(tk_send_without_enc('size'))
- end
-
- def select(index)
- tk_send('select', tagindex(index))
- self
- end
-
- def tab_dockall
- tk_send('tab', 'dockall')
- self
- end
-
- def tab_names(pat=None)
- simplelist(tk_send('tab', 'names', pat)).collect{|name|
- Tk::BLT::Tabset::Tab.id2obj(self, name)
- }
- end
-
- def tab_objs(pat=None)
- simplelist(tk_send('tab', 'names', pat)).collect{|name|
- Tk::BLT::Tabset::Tab.new(self, nil, name, {})
- }
- end
-
- def tab_ids(pat=None)
- simplelist(tk_send('tab', 'names', pat))
- end
-
- def tab_pageheight
- number(tk_send('tab', 'pageheight'))
- end
-
- def tab_pagewidth
- number(tk_send('tab', 'pagewidth'))
- end
-
- def tab_tearoff(index, parent=None)
- window(tk_send('tab', 'tearoff', tagindex(index), parent))
- end
-
- def xscrollcommand(cmd=Proc.new)
- configure_cmd 'scrollcommand', cmd
- self
- end
- alias scrollcommand xscrollcommand
-
- def xview(*index)
- if index.empty?
- list(tk_send_without_enc('view'))
- else
- tk_send_without_enc('view', *index)
- self
- end
- end
- alias view xview
- alias view_moveto xview_moveto
- alias view_scroll xview_scroll
-
- alias scrollbar xscrollbar
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/ted.rb b/ext/tk/lib/tkextlib/blt/ted.rb
deleted file mode 100644
index 7e81eab27d..0000000000
--- a/ext/tk/lib/tkextlib/blt/ted.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/ted.rb
-#
-# *** This is alpha version, because there is no document on BLT. ***
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module Ted
- extend TkCore
-
- TkCommandNames = ['::blt::ted'.freeze].freeze
-
- ##############################
-
- extend TkItemConfigMethod
-
- class << self
- def __item_cget_cmd(id)
- ['::blt::ted', 'cget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- ['::blt::ted', 'configure', id]
- end
- private :__item_config_cmd
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- def cget_tkstring(master, option)
- itemcget_tkstring(master, option)
- end
- def cget(master, option)
- itemcget(master, option)
- end
- def cget_strict(master, option)
- itemcget_strict(master, option)
- end
- def configure(master, slot, value=None)
- itemconfigure(master, slot, value)
- end
- def configinfo(master, slot=nil)
- itemconfiginfo(master, slot)
- end
- def current_configinfo(master, slot=nil)
- current_itemconfiginfo(master, slot)
- end
- end
-
- ##############################
-
- def self.edit(master, *args)
- tk_call('::blt::ted', 'edit', master, *args)
- end
- def self.rep(master, *args)
- tk_call('::blt::ted', 'rep', master, *args)
- end
- def self.select(master, *args)
- tk_call('::blt::ted', 'select', master, *args)
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tile.rb b/ext/tk/lib/tkextlib/blt/tile.rb
deleted file mode 100644
index f52a5d3944..0000000000
--- a/ext/tk/lib/tkextlib/blt/tile.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tile.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module Tile
- TkComm::TkExtlibAutoloadModule.unshift(self)
- # Require autoload-symbols which is a same name as widget classname.
- # Those are used at TkComm._genobj_for_tkwidget method.
-
- autoload :Button, 'tkextlib/blt/tile/button.rb'
- autoload :CheckButton, 'tkextlib/blt/tile/checkbutton.rb'
- autoload :Checkbutton, 'tkextlib/blt/tile/checkbutton.rb'
- autoload :Radiobutton, 'tkextlib/blt/tile/radiobutton.rb'
- autoload :RadioButton, 'tkextlib/blt/tile/radiobutton.rb'
- autoload :Frame, 'tkextlib/blt/tile/frame.rb'
- autoload :Label, 'tkextlib/blt/tile/label.rb'
- autoload :Scrollbar, 'tkextlib/blt/tile/scrollbar.rb'
- autoload :Toplevel, 'tkextlib/blt/tile/toplevel.rb'
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tile/button.rb b/ext/tk/lib/tkextlib/blt/tile/button.rb
deleted file mode 100644
index e3d819edb7..0000000000
--- a/ext/tk/lib/tkextlib/blt/tile/button.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tile/button.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/button'
-require 'tkextlib/blt/tile.rb'
-
-module Tk::BLT
- module Tile
- class Button < Tk::Button
- TkCommandNames = ['::blt::tile::button'.freeze].freeze
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tile/checkbutton.rb b/ext/tk/lib/tkextlib/blt/tile/checkbutton.rb
deleted file mode 100644
index 0c8c7f9774..0000000000
--- a/ext/tk/lib/tkextlib/blt/tile/checkbutton.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tile/checkbutton.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/checkbutton'
-require 'tkextlib/blt/tile.rb'
-
-module Tk::BLT
- module Tile
- class CheckButton < Tk::CheckButton
- TkCommandNames = ['::blt::tile::checkbutton'.freeze].freeze
- end
- Checkbutton = CheckButton
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tile/frame.rb b/ext/tk/lib/tkextlib/blt/tile/frame.rb
deleted file mode 100644
index 8d979fe485..0000000000
--- a/ext/tk/lib/tkextlib/blt/tile/frame.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tile/frame.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/blt/tile.rb'
-
-module Tk::BLT
- module Tile
- class Frame < Tk::Frame
- TkCommandNames = ['::blt::tile::frame'.freeze].freeze
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tile/label.rb b/ext/tk/lib/tkextlib/blt/tile/label.rb
deleted file mode 100644
index f58450d902..0000000000
--- a/ext/tk/lib/tkextlib/blt/tile/label.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tile/label.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/label'
-require 'tkextlib/blt/tile.rb'
-
-module Tk::BLT
- module Tile
- class Label < Tk::Label
- TkCommandNames = ['::blt::tile::label'.freeze].freeze
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tile/radiobutton.rb b/ext/tk/lib/tkextlib/blt/tile/radiobutton.rb
deleted file mode 100644
index ee449c75b0..0000000000
--- a/ext/tk/lib/tkextlib/blt/tile/radiobutton.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tile/radiobutton.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/radiobutton'
-require 'tkextlib/blt/tile.rb'
-
-module Tk::BLT
- module Tile
- class RadioButton < Tk::RadioButton
- TkCommandNames = ['::blt::tile::radiobutton'.freeze].freeze
- end
- Radiobutton = RadioButton
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tile/scrollbar.rb b/ext/tk/lib/tkextlib/blt/tile/scrollbar.rb
deleted file mode 100644
index 35d878d5aa..0000000000
--- a/ext/tk/lib/tkextlib/blt/tile/scrollbar.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tile/scrollbar.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/scrollbar'
-require 'tkextlib/blt/tile.rb'
-
-module Tk::BLT
- module Tile
- class Scrollbar < Tk::Scrollbar
- TkCommandNames = ['::blt::tile::scrollbar'.freeze].freeze
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tile/toplevel.rb b/ext/tk/lib/tkextlib/blt/tile/toplevel.rb
deleted file mode 100644
index e30b8b37b5..0000000000
--- a/ext/tk/lib/tkextlib/blt/tile/toplevel.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tile/toplevel.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/toplevel'
-require 'tkextlib/blt/tile.rb'
-
-module Tk::BLT
- module Tile
- class Toplevel < Tk::Toplevel
- TkCommandNames = ['::blt::tile::toplevel'.freeze].freeze
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/tree.rb b/ext/tk/lib/tkextlib/blt/tree.rb
deleted file mode 100644
index ae235f68e8..0000000000
--- a/ext/tk/lib/tkextlib/blt/tree.rb
+++ /dev/null
@@ -1,1059 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/tree.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- class Tree < TkObject
- TkCommandNames = ['::blt::tree'.freeze].freeze
-
- ###################################
-
- class Node < TkObject
- TreeNodeID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- TreeNodeID_TBL.mutex.synchronize{ TreeNodeID_TBL.clear }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- TreeNodeID_TBL.mutex.synchronize{
- if TreeNodeID_TBL[tpath]
- if TreeNodeID_TBL[tpath][id]
- TreeNodeID_TBL[tpath][id]
- else
- begin
- # self.new(tree, nil, 'node'=>Integer(id))
- id = Integer(id)
- if bool(tk_call(@tpath, 'exists', id))
- (obj = self.allocate).instance_eval{
- @parent = @tree = tree
- @tpath = tpath
- @path = @id = id
- TreeNodeID_TBL[@tpath] = {} unless TreeNodeID_TBL[@tpath]
- TreeNodeID_TBL[@tpath][@id] = self
- }
- obj
- else
- id
- end
- rescue
- id
- end
- end
- else
- id
- end
- }
- end
-
- def self.new(tree, parent, keys={})
- keys = _symbolkey2str(keys)
- tpath = tree.path
-
- TreeNodeID_TBL.mutex.synchronize{
- TreeNodeID_TBL[tpath] ||= {}
- if (id = keys['node']) && (obj = TreeNodeID_TBL[tpath][id])
- keys.delete('node')
- tk_call(tree.path, 'move', id, parent, keys) if parent
- return obj
- end
-
- (obj = self.allocate).instance_eval{
- initialize(tree, parent, keys)
- TreeNodeID_TBL[tpath][@id] = self
- }
- obj
- }
- end
-
- def initialize(tree, parent, keys={})
- @parent = @tree = tree
- @tpath = @parent.path
-
- if (id = keys['node']) && bool(tk_call(@tpath, 'exists', id))
- @path = @id = id
- keys.delete('node')
- tk_call(@tpath, 'move', @id, parent, keys) if parent
- else
- parent = tk_call(@tpath, 'root') unless parent
- @path = @id = tk_call(@tpath, 'insert', parent, keys)
- end
- end
-
- def id
- @id
- end
-
- def apply(keys={})
- @tree.apply(@id, keys)
- self
- end
-
- def children()
- @tree.children(@id)
- end
-
- def copy(parent, keys={})
- @tree.copy(@id, parent, keys)
- end
- def copy_to(dest_tree, parent, keys={})
- @tree.copy_to(@id, dest_tree, parent, keys)
- end
-
- def degree()
- @tree.degree(@id)
- end
-
- def delete()
- @tree.delete(@id)
- self
- end
-
- def depth()
- @tree.depth(@id)
- end
-
- def dump()
- @tree.dump(@id)
- end
-
- def dump_to_file(file)
- @tree.dump_to_file(@id, file)
- self
- end
-
- def exist?(keys={})
- @tree.exist?(@id, keys)
- end
-
- def find(keys={})
- @tree.find(@id, keys)
- end
-
- def find_child(label)
- @tree.find_child(@id, label)
- end
-
- def first_child()
- @tree.first_child(@id)
- end
-
- def get()
- @tree.get(@id)
- end
- def get_value(key, default_val=None)
- @tree.get_value(@id, key, default_val)
- end
-
- def index()
- @tree.index(@id)
- end
-
- def leaf?()
- @tree.leaf?(@id)
- end
- def link?()
- @tree.link?(@id)
- end
- def root?()
- @tree.root?(@id)
- end
-
- def keys()
- @tree.keys(@id)
- end
-
- def label(text = nil)
- @tree.label(@id, nil)
- end
- def label=(text)
- @tree.label(@id, text)
- end
-
- def last_child()
- @tree.last_child(@id)
- end
-
- def move(dest, keys={})
- @tree.keys(@id, dest, keys)
- self
- end
-
- def next()
- @tree.next(@id)
- end
-
- def next_sibling()
- @tree.next_sibling(@id)
- end
-
- def parent()
- @tree.parent(@id)
- end
-
- def fullpath()
- @tree.fullpath(@id)
- end
-
- def position()
- @tree.position(@id)
- end
-
- def previous()
- @tree.previous(@id)
- end
-
- def prev_sibling()
- @tree.prev_sibling(@id)
- end
-
- def restore(str, keys={})
- @tree.restore(@id, str, keys)
- self
- end
- def restore_overwrite(str, keys={})
- @tree.restore_overwrite(@id, str, keys)
- self
- end
-
- def restore_from_file(file, keys={})
- @tree.restore_from_file(@id, file, keys)
- self
- end
- def restore_overwrite_from_file(file, keys={})
- @tree.restore_overwrite_from_file(@id, file, keys)
- self
- end
-
- def root()
- @tree.root(@id)
- self
- end
-
- def set(data)
- @tree.set(@id, data)
- self
- end
-
- def size()
- @tree.size(@id)
- end
-
- def sort(keys={})
- @tree.sort(@id, keys)
- self
- end
-
- def type(key)
- @tree.type(@id, key)
- end
-
- def unset(*keys)
- @tree.unset(@id, *keys)
- self
- end
-
- def values(key=None)
- @tree.values(@id, key)
- end
- end
-
- ###################################
-
- class Tag < TkObject
- TreeTagID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- TreeTagID_TBL.mutex.synchronize{ TreeTagID_TBL.clear }
- }
-
- (TreeTag_ID = ['blt_tree_tag'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- TreeTagID_TBL.mutex.synchronize{
- if TreeTagID_TBL[tpath]
- if TreeTagID_TBL[tpath][id]
- TreeTagID_TBL[tpath][id]
- else
- begin
- # self.new(tree, id)
- (obj = self.allocate).instance_eval{
- @parent = @tree = tree
- @tpath = @parent.path
- @path = @id = id.dup.freeze if id
- TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath]
- TreeTagID_TBL[@tpath][@id] = self
- }
- obj
- rescue
- id
- end
- end
- else
- id
- end
- }
- end
-
- def initialize(tree, tag_str = nil)
- @parent = @tree = tree
- @tpath = @parent.path
-
- if tag_str
- @path = @id = tag_str.dup.freeze
- else
- TreeTag_ID.mutex.synchronize{
- @path = @id = TreeTag_ID.join(TkCore::INTERP._ip_id_)
- TreeTag_ID[1].succ!
- }
- end
- TreeTagID_TBL.mutex.synchronize{
- TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath]
- TreeTagID_TBL[@tpath][@id] = self
- }
- end
-
- def id
- @id
- end
-
- def add(*nodes)
- tk_call(@tpath, 'tag', 'add', @id, *nodes)
- self
- end
-
- def delete(*nodes)
- tk_call(@tpath, 'tag', 'delete', @id, *nodes)
- self
- end
-
- def forget()
- tk_call(@tpath, 'tag', 'forget', @id)
- TreeTagID_TBL.mutex.synchronize{
- TreeTagID_TBL[@tpath].delete(@id)
- }
- self
- end
-
- def nodes()
- simplelist(tk_call(@tpath, 'tag', 'nodes', @id)).collect{|node|
- Tk::BLT::Tree::Node.id2obj(@path, node)
- }
- end
-
- def set(node)
- tk_call(@tpath, 'tag', 'set', node, @id)
- self
- end
-
- def unset(node)
- tk_call(@tpath, 'tag', 'unset', node, @id)
- self
- end
- end
-
- ###################################
-
- class Notify < TkObject
- NotifyID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- NotifyID_TBL.mutex.synchronize{ NotifyID_TBL.clear }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- NotifyID_TBL.mutex.synchronize{
- if NotifyID_TBL[tpath]
- if NotifyID_TBL[tpath][id]
- NotifyID_TBL[tpath][id]
- else
- (obj = self.allocate).instance_eval{
- @parent = @tree = tree
- @tpath = @parent.path
- @path = @id = id
- NotifyID_TBL[@tpath] ||= {}
- NotifyID_TBL[@tpath][@id] = self
- }
- obj
- end
- else
- return id
- end
- }
- end
-
- def self.new(tree, *args, &b)
- NotifyID_TBL.mutex.synchronize{
- if tree.kind_of?(Array)
- # not create
- tpath = tree[0].path
- NotifyID_TBL[tpath] ||= {}
- unless (obj = NotifyID_TBL[tpath][tree[1]])
- (NotifyID_TBL[tpath][tree[1]] =
- obj = self.allocate).instance_eval{
- @parent = @tree = tree[0]
- @tpath = @parent.path
- @path = @id = tree[1]
- }
- end
- return obj
- end
-
- (obj = self.allocate).instance_eval{
- initialize(tree, *args, &b)
- NotifyID_TBL[@tpath] ||= {}
- NotifyID_TBL[@tpath][@id] = self
- }
- return obj
- }
- end
-
- def initialize(tree, *args, &b)
- @parent = @tree = tree
- @tpath = @parent.path
-
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0])
- cmd = args.shift
- # elsif args[-1].kind_of?(Proc) || args[-1].kind_of?(Method)
- elsif TkComm._callback_entry?(args[-1])
- cmd = args.pop
- elsif b
- cmd = Proc.new(&b)
- else
- fail ArgumentError, "lack of 'command' argument"
- end
-
- args = args.collect{|arg| '-' << arg.to_s}
-
- args << proc{|id, type|
- cmd.call(Tk::BLT::Tree::Node.id2obj(@tree, id),
- ((type[0] == ?-)? type[1..-1]: type))
- }
-
- @path = @id = tk_call(@tpath, 'notify', 'create', *args)
- end
-
- def id
- @id
- end
-
- def delete()
- tk_call(@tpath, 'notify', 'delete', @id)
- NotifyID_TBL.mutex.synchronize{
- NotifyID_TBL[@tpath].delete(@id)
- }
- self
- end
-
- def info()
- lst = simplelist(tk_call(@tpath, 'notify', 'info', id))
- lst[0] = Tk::BLT::Tree::Notify.id2obj(@tree, lst[0])
- lst[1] = simplelist(lst[1]).collect{|flag| flag[1..-1]}
- lst[2] = tk_tcl2ruby(lst[2])
- lst
- end
- end
-
- ###################################
-
- class Trace < TkObject
- TraceID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- TraceID_TBL.mutex.synchronize{ TraceID_TBL.clear }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- TraceID_TBL.mutex.synchronize{
- if TraceID_TBL[tpath]
- if TraceID_TBL[tpath][id]
- TraceID_TBL[tpath][id]
- else
- begin
- # self.new([tree, id])
- (obj = self.allocate).instance_eval{
- @parent = @tree = tree
- @tpath = @parent.path
- @path = @id = node # == traceID
- TraceID_TBL[@tpath] ||= {}
- TraceID_TBL[@tpath][@id] = self
- }
- obj
- rescue
- id
- end
- end
- else
- id
- end
- }
- end
-
- def self.new(tree, *args, &b)
- TraceID_TBL.mutex.synchronize{
- if tree.kind_of?(Array)
- # not create
- tpath = tree[0].path
- TraceID_TBL[tpath] ||= {}
- unless (obj = TraceID_TBL[tpath][tree[1]])
- (TraceID_TBL[tpath][tree[1]] =
- obj = self.allocate).instance_eval{
- @parent = @tree = tree
- @tpath = @parent.path
- @path = @id = tree[1] # == traceID
- }
- end
- return obj
- end
-
- # super(true, tree, *args, &b)
- (obj = self.allocate).instance_eval{
- initialize(tree, *args, &b)
- TraceID_TBL[@tpath] ||= {}
- TraceID_TBL[@tpath][@id] = self
- }
- return obj
- }
- end
-
- def initialize(tree, node, key, opts, cmd=nil, &b)
- @parent = @tree = tree
- @tpath = @parent.path
-
- if !cmd
- if b
- cmd = Proc.new(&b)
- else
- fail ArgumentError, "lack of 'command' argument"
- end
- end
-
- @path = @id = tk_call(@tpath, 'trace', 'create', node, key, opts,
- proc{|t, id, k, ops|
- tobj = Tk::BLT::Tree.id2obj(t)
- if tobj.kind_of?(Tk::BLT::Tree)
- nobj = Tk::BLT::Tree::Node.id2obj(tobj, id)
- else
- nobj = id
- end
- cmd.call(tobj, nobj, k, ops)
- })
- end
-
- def id
- @id
- end
-
- def delete()
- tk_call(@tpath, 'trace', 'delete', @id)
- TraceID_TBL.mutex.synchronize{
- TraceID_TBL[tpath].delete(@id)
- }
- self
- end
-
- def info()
- lst = simplelist(tk_call(@tpath, 'trace', 'info', id))
- lst[0] = Tk::BLT::Tree::Trace.id2obj(@tree, lst[0])
- lst[2] = simplelist(lst[2])
- lst[3] = tk_tcl2ruby(lst[3])
- lst
- end
- end
-
- ###################################
-
- TreeID_TBL = TkCore::INTERP.create_table
-
- (Tree_ID = ['blt_tree'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- def __keyonly_optkeys
- {
- # apply / find command
- 'invert'=>nil, 'leafonly'=>nil, 'nocase'=>nil,
-
- # apply / find / sort command
- 'path'=>nil,
-
- # copy / restore / restorefile command
- 'overwrite'=>nil,
-
- # copy command
- 'recurse'=>nil, 'tags'=>nil,
-
- # sort command
- 'ascii'=>nil, 'decreasing'=>nil, 'disctionary'=>nil,
- 'integer'=>nil, 'real'=>nil, 'recurse'=>nil, 'reorder'=>nil,
- }
- end
-
- def self.id2obj(id)
- TreeID_TBL.mutex.synchronize{
- TreeID_TBL[id]? TreeID_TBL[id]: id
- }
- end
-
- def self.names(pat = None)
- simplelist(tk_call('::blt::tree', 'names', pat)).collect{|name|
- id2obj(name)
- }
- end
-
- def self.destroy(*names)
- tk_call('::blt::tree', 'destroy',
- *(names.collect{|n| (n.kind_of?(Tk::BLT::Tree))? n.id: n }) )
- end
-
- def self.new(name = nil)
- TreeID_TBL.mutex.synchronize{
- if name && TreeID_TBL[name]
- TreeID_TBL[name]
- else
- (obj = self.allocate).instance_eval{
- initialize(name)
- TreeID_TBL[@id] = self
- }
- obj
- end
- }
- end
-
- def initialize(name = nil)
- if name
- @path = @id = name
- else
- Tree_ID.mutex.synchronize{
- @path = @id = Tree_ID.join(TkCore::INTERP._ip_id_)
- Tree_ID[1].succ!
- }
- end
-
- tk_call('::blt::tree', 'create', @id)
- end
-
- def __destroy_hook__
- Tk::BLT::Tree::Node::TreeNodeID_TBL.mutex.synchronize{
- Tk::BLT::Tree::Node::TreeNodeID_TBL.delete(@path)
- }
- Tk::BLT::Tree::Tag::TreeTagID_TBL.mutex.synchronize{
- Tk::BLT::Tree::Tag::TreeTagID_TBL.delete(@path)
- }
- Tk::BLT::Tree::Notify::NotifyID_TBL.mutex.synchronize{
- Tk::BLT::Tree::Notify::NotifyID_TBL.delete(@path)
- }
- Tk::BLT::Tree::Trace::TraceID_TBL.mutex.synchronize{
- Tk::BLT::Tree::Trace::TraceID_TBL.delete(@path)
- }
- end
-
- def tagid(tag)
- if tag.kind_of?(Tk::BLT::Tree::Node) ||
- tag.kind_of?(Tk::BLT::Tree::Tag) ||
- tag.kind_of?(Tk::BLT::Tree::Notify) ||
- tag.kind_of?(Tk::BLT::Tree::Trace)
- tag.id
- else
- tag # maybe an Array of configure parameters
- end
- end
-
- def destroy()
- tk_call('::blt::tree', 'destroy', @id)
- self
- end
-
- def ancestor(node1, node2)
- Tk::BLT::Tree::Node.id2obj(self, tk_call('::blt::tree', 'ancestor',
- tagid(node1), tagid(node2)))
- end
-
- def apply(node, keys={})
- tk_call('::blt::tree', 'apply', tagid(node), __conv_keyonly_opts(keys))
- self
- end
-
- def attach(tree_obj)
- tk_call('::blt::tree', 'attach', tree_obj)
- self
- end
-
- def children(node)
- simplelist(tk_call('::blt::tree', 'children', tagid(node))).collect{|n|
- Tk::BLT::Tree::Node.id2obj(self, n)
- }
- end
-
- def copy(src, parent, keys={})
- id = tk_call('::blt::tree', 'copy', tagid(src), tagid(parent),
- __conv_keyonly_opts(keys))
- Tk::BLT::Tree::Node.new(self, nil, 'node'=>id)
- end
- def copy_to(src, dest_tree, parent, keys={})
- return copy(src, parent, keys={}) unless dest_tree
-
- id = tk_call('::blt::tree', 'copy', tagid(src), dest_tree,
- tagid(parent), __conv_keyonly_opts(keys))
- Tk::BLT::Tree::Node.new(dest_tree, nil, 'node'=>id)
- end
-
- def degree(node)
- number(tk_call('::blt::tree', 'degree', tagid(node)))
- end
-
- def delete(*nodes)
- tk_call('::blt::tree', 'delete', *(nodes.collect{|node| tagid(node)}))
- Tk::BLT::Tree::Node::TreeNodeID_TBL.mutex.synchronize{
- nodes.each{|node|
- if node.kind_of?(Tk::BLT::Tree::Node)
- Tk::BLT::Tree::Node::TreeNodeID_TBL[@path].delete(node.id)
- else
- Tk::BLT::Tree::Node::TreeNodeID_TBL[@path].delete(node.to_s)
- end
- }
- }
- self
- end
-
- def depth(node)
- number(tk_call('::blt::tree', 'depth', tagid(node)))
- end
-
- def dump(node)
- simplelist(tk_call('::blt::tree', 'dump', tagid(node))).collect{|n|
- simplelist(n)
- }
- end
-
- def dump_to_file(node, file)
- tk_call('::blt::tree', 'dumpfile', tagid(node), file)
- self
- end
-
- def exist?(node, key=None)
- bool(tk_call('::blt::tree', 'exists', tagid(node), key))
- end
-
- def find(node, keys={})
- simplelist(tk_call('::blt::tree', 'find', tagid(node),
- __conv_keyonly_opts(keys))).collect{|n|
- Tk::BLT::Tree::Node.id2obj(self, n)
- }
- end
-
- def find_child(node, label)
- ret = tk_call('::blt::tree', 'findchild', tagid(node), label)
- (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret)
- end
-
- def first_child(node)
- ret = tk_call('::blt::tree', 'firstchild', tagid(node))
- (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret)
- end
-
- def get(node)
- Hash[*simplelist(tk_call('::blt::tree', 'get', tagid(node)))]
- end
- def get_value(node, key, default_val=None)
- tk_call('::blt::tree', 'get', tagid(node), key, default_val)
- end
-
- def index(node)
- Tk::BLT::Tree::Node.id2obj(self,
- tk_call('::blt::tree', 'index', tagid(node)))
- end
-
- def insert(parent, keys={})
- id = tk_call('::blt::tree', 'insert', tagid(parent), keys)
- Tk::BLT::Tree::Node.new(self, nil, 'node'=>id)
- end
-
- def ancestor?(node1, node2)
- bool(tk_call('::blt::tree', 'is', 'ancestor',
- tagid(node1), tagid(node2)))
- end
- def before?(node1, node2)
- bool(tk_call('::blt::tree', 'is', 'before',
- tagid(node1), tagid(node2)))
- end
- def leaf?(node)
- bool(tk_call('::blt::tree', 'is', 'leaf', tagid(node)))
- end
- def link?(node)
- bool(tk_call('::blt::tree', 'is', 'link', tagid(node)))
- end
- def root?(node)
- bool(tk_call('::blt::tree', 'is', 'root', tagid(node)))
- end
-
- def keys(node, *nodes)
- if nodes.empty?
- simplelist(tk_call('blt::tree', 'keys', tagid(node)))
- else
- simplelist(tk_call('blt::tree', 'keys', tagid(node),
- *(nodes.collect{|n| tagid(n)}))).collect{|lst|
- simplelist(lst)
- }
- end
- end
-
- def label(node, text=nil)
- if text
- tk_call('::blt::tree', 'label', tagid(node), text)
- text
- else
- tk_call('::blt::tree', 'label', tagid(node))
- end
- end
-
- def last_child(node)
- ret = tk_call('::blt::tree', 'lastchild', tagid(node))
- (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret)
- end
-
- def link(parent, node, keys={})
- ret = tk_call('::blt::tree', 'link', tagid(parent), tagid(node),
- __conv_keyonly_opts(keys))
- (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret)
- end
-
- def move(node, dest, keys={})
- tk_call('::blt::tree', 'move', tagid(node), tagid(dest), keys)
- self
- end
-
- def next(node)
- ret = tk_call('::blt::tree', 'next', tagid(node))
- (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret)
- end
-
- def next_sibling(node)
- ret = tk_call('::blt::tree', 'nextsibling', tagid(node))
- (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret)
- end
-
- def notify_create(*args, &b)
- Tk::BLT::Tree::Notify.new(self, *args, &b)
- end
-
- def notify_delete(id)
- if id.kind_of?(Tk::BLT::Tree::Notify)
- id.delete
- else
- tk_call(@path, 'notify', 'delete', id)
- Tk::BLT::Tree::Notify::NotifyID_TBL.mutex.synchronize{
- Tk::BLT::Tree::Notify::NotifyID_TBL[@path].delete(id.to_s)
- }
- end
- self
- end
-
- def notify_info(id)
- lst = simplelist(tk_call(@path, 'notify', 'info', tagid(id)))
- lst[0] = Tk::BLT::Tree::Notify.id2obj(self, lst[0])
- lst[1] = simplelist(lst[1]).collect{|flag| flag[1..-1]}
- lst[2] = tk_tcl2ruby(lst[2])
- lst
- end
-
- def notify_names()
- tk_call(@path, 'notify', 'names').collect{|id|
- Tk::BLT::Tree::Notify.id2obj(self, id)
- }
- end
-
- def parent(node)
- ret = tk_call('::blt::tree', 'parent', tagid(node))
- (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret)
- end
-
- def fullpath(node)
- tk_call('::blt::tree', 'path', tagid(node))
- end
-
- def position(node)
- number(tk_call('::blt::tree', 'position', tagid(node)))
- end
-
- def previous(node)
- ret = tk_call('::blt::tree', 'previous', tagid(node))
- (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret)
- end
-
- def prev_sibling(node)
- ret = tk_call('::blt::tree', 'prevsibling', tagid(node))
- (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret)
- end
-
- def restore(node, str, keys={})
- tk_call('::blt::tree', 'restore', tagid(node), str,
- __conv_keyonly_opts(keys))
- self
- end
- def restore_overwrite(node, str, keys={})
- keys = __conv_keyonly_opts(keys)
- keys.delete('overwrite')
- keys.delete(:overwrite)
- tk_call('::blt::tree', 'restore', tagid(node), str, '-overwrite', keys)
- self
- end
-
- def restore_from_file(node, file, keys={})
- tk_call('::blt::tree', 'restorefile', tagid(node), file,
- __conv_keyonly_opts(keys))
- self
- end
- def restore_overwrite_from_file(node, file, keys={})
- keys = __conv_keyonly_opts(keys)
- keys.delete('overwrite')
- keys.delete(:overwrite)
- tk_call('::blt::tree', 'restorefile', tagid(node), file,
- '-overwrite', keys)
- self
- end
-
- def root(node=None)
- Tk::BLT::Tree::Node.id2obj(self, tk_call('::blt::tree', 'root',
- tagid(node)))
- end
-
- def set(node, data)
- unless data.kind_of?(Hash)
- fail ArgumentError, 'Hash is expected for data'
- end
- args = []
- data.each{|k, v| args << k << v}
- tk_call('::blt::tree', 'set', tagid(node), *args)
- self
- end
-
- def size(node)
- number(tk_call('::blt::tree', 'size', tagid(node)))
- end
-
- def sort(node, keys={})
- tk_call('::blt::tree', 'sort', tagid(node), __conv_keyonly_opts(keys))
- self
- end
-
- def tag_add(tag, *nodes)
- tk_call(@path, 'tag', 'add', tagid(tag), *(nodes.collect{|n| tagid(n)}))
- self
- end
-
- def tag_delete(tag, *nodes)
- tk_call(@path, 'tag', 'delete', tagid(tag),
- *(nodes.collect{|n| tagid(n)}))
- self
- end
-
- def tag_forget(tag)
- tag = tag.id if tag.kind_of?(Tk::BLT::Tree::Tag)
- tk_call(@path, 'tag', 'forget', tag)
- TreeTagID_TBL.mutex.synchronize{
- TreeTagID_TBL[@path].delete(tag)
- }
- self
- end
-
- def tag_get(node, *patterns)
- simplelist(tk_call(@tpath, 'tag', 'get', tagid(node),
- *(patterns.collect{|pat| tagid(pat)}))).collect{|str|
- Tk::BLT::Tree::Tag.id2obj(self, str)
- }
- end
-
- def tag_names(node = None)
- simplelist(tk_call(@tpath, 'tag', 'names', tagid(node))).collect{|str|
- Tk::BLT::Tree::Tag.id2obj(self, str)
- }
- end
-
- def tag_nodes(tag)
- simplelist(tk_call(@tpath, 'tag', 'nodes', tagid(tag))).collect{|node|
- Tk::BLT::Tree::Node.id2obj(self, node)
- }
- end
-
- def tag_set(node, *tags)
- tk_call(@path, 'tag', 'set', tagid(node), *(tags.collect{|t| tagid(t)}))
- self
- end
-
- def tag_unset(node, *tags)
- tk_call(@path, 'tag', 'unset', tagid(node),
- *(tags.collect{|t| tagid(t)}))
- self
- end
-
- def trace_create(*args, &b)
- Tk::BLT::Tree::Trace.new(self, *args, &b)
- end
-
-=begin
- def trace_delete(*args)
- args.each{|id|
- if id.kind_of?(Tk::BLT::Tree::Trace)
- id.delete
- else
- tk_call(@path, 'trace', 'delete', id)
- Tk::BLT::Tree::Trace::TraceID_TBL[@path].delete(id.to_s)
- end
- self
- }
- end
-=end
- def trace_delete(*args)
- args = args.collect{|id| tagid(id)}
- tk_call(@path, 'trace', 'delete', *args)
- Tk::BLT::Tree::Trace::TraceID_TBL.mutex.synchronize{
- args.each{|id| Tk::BLT::Tree::Trace::TraceID_TBL[@path].delete(id.to_s)}
- }
- self
- end
-
- def trace_info(id)
- lst = simplelist(tk_call(@path, 'trace', 'info', tagid(id)))
- lst[0] = Tk::BLT::Tree::Trace.id2obj(self, lst[0])
- lst[2] = simplelist(lst[2])
- lst[3] = tk_tcl2ruby(lst[3])
- lst
- end
-
- def trace_names()
- tk_call(@path, 'trace', 'names').collect{|id|
- Tk::BLT::Tree::Trace.id2obj(self, id)
- }
- end
-
- def type(node, key)
- tk_call('::blt::tree', 'type', tagid(node), key)
- end
-
- def unset(node, *keys)
- tk_call('::blt::tree', 'unset', tagid(node), *keys)
- self
- end
-
- def values(node, key=None)
- simplelist(tk_call('::blt::tree', 'values', tagid(node), key))
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/treeview.rb b/ext/tk/lib/tkextlib/blt/treeview.rb
deleted file mode 100644
index 2866ba3027..0000000000
--- a/ext/tk/lib/tkextlib/blt/treeview.rb
+++ /dev/null
@@ -1,1288 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/treeview.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-require 'tk/validation.rb'
-
-module Tk::BLT
- class Treeview < TkWindow
- module ConfigMethod
- end
-
- module TagOrID_Methods
- end
-
- class Node < TkObject
- end
-
- class Tag < TkObject
- end
- end
-
- class Hiertable < Treeview
- end
-end
-
-######################################
-
-module Tk::BLT::Treeview::ConfigMethod
- include TkItemConfigMethod
-
- def __item_boolval_optkeys(id)
- case id
- when Array
- # id := [ 'column', name ]
- ['edit', 'hide']
- when 'sort'
- ['decreasing']
- else
- []
- end
- end
- private :__item_boolval_optkeys
-
- def __item_strval_optkeys(id)
- case id
- when Array
- # id := [ 'column', name ]
- super() << 'titleforeground' << 'titleshadow'
- when 'sort'
- ['decreasing']
- else
- []
- end
- end
- private :__item_strval_optkeys
-
- def __item_listval_optkeys(id)
- case id
- when 'entry'
- ['bindtags']
- else
- []
- end
- end
- private :__item_listval_optkeys
-
- def __item_cget_cmd(id)
- if id.kind_of?(Array)
- # id := [ type, name ]
- [self.path, id[0], 'cget', id[1]]
- else
- [self.path, id, 'cget']
- end
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- if id.kind_of?(Array)
- # id := [ type, name ]
- [self.path, id[0], 'configure', id[1]]
- else
- [self.path, id, 'configure']
- end
- end
- private :__item_config_cmd
-
- def __item_pathname(id)
- if id.kind_of?(Array)
- id = tagid(id[1])
- end
- [self.path, id].join(';')
- end
- private :__item_pathname
-
- def column_cget_tkstring(name, option)
- itemcget_tkstring(['column', name], option)
- end
- def column_cget(name, option)
- itemcget(['column', name], option)
- end
- def column_cget_strict(name, option)
- itemcget_strict(['column', name], option)
- end
- def column_configure(name, slot, value=None)
- itemconfigure(['column', name], slot, value)
- end
- def column_configinfo(name, slot=nil)
- itemconfiginfo(['column', name], slot)
- end
- def current_column_configinfo(name, slot=nil)
- current_itemconfiginfo(['column', name], slot)
- end
-
- def button_cget_tkstring(option)
- itemcget_tkstring('button', option)
- end
- def button_cget(option)
- itemcget('button', option)
- end
- def button_cget_strict(option)
- itemcget_strict('button', option)
- end
- def button_configure(slot, value=None)
- itemconfigure('button', slot, value)
- end
- def button_configinfo(slot=nil)
- itemconfiginfo('button', slot)
- end
- def current_button_configinfo(slot=nil)
- current_itemconfiginfo('button', slot)
- end
-
- def entry_cget_tkstring(option)
- itemcget_tkstring('entry', option)
- end
- def entry_cget(option)
- ret = itemcget('entry', option)
- if option == 'bindtags' || option == :bindtags
- ret.collect{|tag| TkBindTag.id2obj(tag)}
- else
- ret
- end
- end
- def entry_cget_strict(option)
- ret = itemcget_strict('entry', option)
- if option == 'bindtags' || option == :bindtags
- ret.collect{|tag| TkBindTag.id2obj(tag)}
- else
- ret
- end
- end
- def entry_configure(slot, value=None)
- itemconfigure('entry', slot, value)
- end
- def entry_configinfo(slot=nil)
- ret = itemconfiginfo('entry', slot)
-
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- if slot == 'bindtags' || slot == :bindtags
- ret[-2] = ret[-2].collect{|tag| TkBindTag.id2obj(tag)}
- ret[-1] = ret[-1].collect{|tag| TkBindTag.id2obj(tag)}
- end
- else
- inf = ret.assoc('bindtags')
- inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)}
- inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)}
- end
-
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if (inf = ret['bindtags'])
- inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)}
- inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)}
- ret['bindtags'] = inf
- end
- end
-
- ret
- end
- def current_entry_configinfo(slot=nil)
- ret = current_itemconfiginfo('entry', slot)
-
- if (val = ret['bindtags'])
- ret['bindtags'] = val.collect{|tag| TkBindTag.id2obj(tag)}
- end
-
- ret
- end
-
- def sort_cget_tkstring(option)
- itemcget_tkstring('sort', option)
- end
- def sort_cget(option)
- itemcget('sort', option)
- end
- def sort_cget_strict(option)
- itemcget_strict('sort', option)
- end
- def sort_configure(slot, value=None)
- itemconfigure('sort', slot, value)
- end
- def sort_configinfo(slot=nil)
- itemconfiginfo('sort', slot)
- end
- def current_sort_configinfo(slot=nil)
- current_itemconfiginfo('sort', slot)
- end
-
- def text_cget_tkstring(option)
- itemcget_tkstring('text', option)
- end
- def text_cget(option)
- itemcget('text', option)
- end
- def text_cget_strict(option)
- itemcget_strict('text', option)
- end
- def text_configure(slot, value=None)
- itemconfigure('text', slot, value)
- end
- def text_configinfo(slot=nil)
- itemconfiginfo('text', slot)
- end
- def current_text_configinfo(slot=nil)
- current_itemconfiginfo('text', slot)
- end
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-end
-
-class Tk::BLT::Treeview
- TkCommandNames = ['::blt::treeview'.freeze].freeze
- WidgetClassName = 'TreeView'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- include Scrollable
- include ValidateConfigure
- include ItemValidateConfigure
- include Tk::BLT::Treeview::ConfigMethod
-
- ########################
-
- def __boolval_optkeys
- ['autocreate', 'allowduplicates', 'exportselection', 'flat', 'hideroot',
- 'newtags', 'showtitles', 'sortselection']
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() + ['focusforeground', 'linecolor', 'separator', 'trim']
- end
- private :__strval_optkeys
-
- ########################
-
- class OpenCloseCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?W, ?w, :widget ],
- [ ?p, ?s, :name ],
- [ ?P, ?s, :fullpath ],
- [ ?#, ?x, :node_id ],
- nil
- ]
-
- PROC_TBL = [
- [ ?x, TkComm.method(:num_or_str) ],
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- ['opencommand', 'closecomand']
- end
- end
-
- def __validation_class_list
- super() << OpenCloseCommand
- end
-
- Tk::ValidateConfigure.__def_validcmd(binding, OpenCloseCommand)
-
- ########################
-
- def __item_validation_class_list(id)
- case id
- when 'entry'
- super(id) << OpenCloseCommand
- else
- super(id)
- end
- end
-
- Tk::ItemValidateConfigure.__def_validcmd(binding, OpenCloseCommand)
-
- ########################
-
- def __destroy_hook__
- Tk::BLT::Treeview::Node::TreeNodeID_TBL.mutex.synchronize{
- Tk::BLT::Treeview::Node::TreeNodeID_TBL.delete(@path)
- }
- Tk::BLT::Treeview::Tag::TreeTagID_TBL.mutex.synchronize{
- Tk::BLT::Treeview::Tag::TreeTagID_TBL.delete(@path)
- }
- end
-
- def tagid(tag)
- if tag.kind_of?(Tk::BLT::Treeview::Node) \
- || tag.kind_of?(Tk::BLT::Treeview::Tag)
- tag.id
- else
- tag # maybe an Array of configure parameters
- end
- end
- private :tagid
-
- def tagid2obj(tagid)
- if tagid.kind_of?(Integer)
- Tk::BLT::Treeview::Node.id2obj(self, tagid.to_s)
- elsif tagid.kind_of?(String)
- if tagid =~ /^\d+$/
- Tk::BLT::Treeview::Node.id2obj(self, tagid)
- else
- Tk::BLT::Treeview::Tag.id2obj(self, tagid)
- end
- else
- tagid
- end
- end
-
- def bbox(*tags)
- list(tk_send('bbox', *(tags.collect{|tag| tagid(tag)})))
- end
-
- def screen_bbox(*tags)
- list(tk_send('bbox', '-screen', *(tags.collect{|tag| tagid(tag)})))
- end
-
- def tag_bind(tag, seq, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([@path, 'bind', tagid(tag)], seq, cmd, *args)
- self
- end
- def tag_bind_append(tag, seq, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([@path, 'bind', tagid(tag)], seq, cmd, *args)
- self
- end
- def tag_bind_remove(tag, seq)
- _bind_remove([@path, 'bind', tagid(tag)], seq)
- self
- end
- def tag_bindinfo(tag, seq=nil)
- _bindinfo([@path, 'bind', tagid(tag)], seq)
- end
-
- def button_activate(tag)
- tk_send('button', 'activate', tagid(tag))
- self
- end
-
- def button_bind(tag, seq, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([@path, 'button', 'bind', tagid(tag)], seq, cmd, *args)
- self
- end
- def button_bind_append(tag, seq, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([@path, 'button', 'bind', tagid(tag)], seq, cmd, *args)
- self
- end
- def button_bind_remove(tag, seq)
- _bind_remove([@path, 'button', 'bind', tagid(tag)], seq)
- self
- end
- def button_bindinfo(tag, seq=nil)
- _bindinfo([@path, 'button', 'bind', tagid(tag)], seq)
- end
-
- def close(*tags)
- tk_send('close', *(tags.collect{|tag| tagid(tag)}))
- self
- end
- def close_recurse(*tags)
- tk_send('close', '-recurse', *(tags.collect{|tag| tagid(tag)}))
- self
- end
-
- def column_activate(column=None)
- if column == None
- tk_send('column', 'activate')
- else
- tk_send('column', 'activate', column)
- self
- end
- end
-
- def column_delete(*fields)
- tk_send('column', 'delete', *fields)
- self
- end
- def column_insert(pos, field, *opts)
- tk_send('column', 'insert', pos, field, *opts)
- self
- end
- def column_invoke(field)
- tk_send('column', 'invoke', field)
- self
- end
- def column_move(name, dest)
- tk_send('column', 'move', name, dest)
- self
- end
- def column_names()
- simplelist(tk_send('column', 'names'))
- end
- def column_nearest(x, y=None)
- tk_send('column', 'nearest', x, y)
- end
-
- def curselection
- simplelist(tk_send('curselection')).collect{|id| tagid2obj(id)}
- end
-
- def delete(*tags)
- tk_send('delete', *(tags.collect{|tag| tagid(tag)}))
- self
- end
-
- def entry_activate(tag)
- tk_send('entry', 'activate', tagid(tag))
- self
- end
- def entry_children(tag, first=None, last=None)
- simplelist(tk_send('entry', 'children', tagid(tag),
- first, last)).collect{|id| tagid2obj(id)}
- end
- def entry_delete(tag, first=None, last=None)
- tk_send('entry', 'delete', tagid(tag), first, last)
- end
- def entry_before?(tag1, tag2)
- bool(tk_send('entry', 'isbefore', tagid(tag1), tagid(tag2)))
- end
- def entry_hidden?(tag)
- bool(tk_send('entry', 'ishidden', tagid(tag)))
- end
- def entry_open?(tag)
- bool(tk_send('entry', 'isopen', tagid(tag)))
- end
-
- def entry_size(tag)
- number(tk_send('entry', 'size', tagid(tag)))
- end
- def entry_size_recurse(tag)
- number(tk_send('entry', 'size', '-recurse', tagid(tag)))
- end
-
- def _search_flags(keys)
- keys = _symbolkey2str(keys)
- keys['exact'] = None if keys.delete('exact')
- keys['glob'] = None if keys.delete('glob')
- keys['regexp'] = None if keys.delete('regexp')
- keys['nonmatching'] = None if keys.delete('nonmatching')
- end
- private :_search_flags
-
- ################################
-
- class FindExecFlagValue < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?W, ?w, :widget ],
- [ ?p, ?s, :name ],
- [ ?P, ?s, :fullpath ],
- [ ?#, ?x, :node_id ],
- nil
- ]
-
- PROC_TBL = [
- [ ?x, TkComm.method(:num_or_str) ],
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- []
- end
- end
-
- def _find_exec_flag_value(val)
- if val.kind_of?(Array)
- cmd, *args = val
- #FindExecFlagValue.new(cmd, args.join(' '))
- FindExecFlagValue.new(cmd, *args)
- elsif TkComm._callback_entry?(val)
- FindExecFlagValue.new(val)
- else
- val
- end
- end
-
- ################################
-
- def find(first, last, keys={})
- keys = _search_flags(keys)
- keys['exec'] = _find_exec_flag_value(keys['exec']) if keys.key?('exec')
- args = hash_kv(keys) << '--' << tagid(first) << tagid(last)
- simplelist(tk_send('find', *args)).collect{|id| tagid2obj(id)}
- end
-
- def tag_focus(tag)
- tk_send('focus', tagid(tag))
- self
- end
- def get(*tags)
- simplelist(tk_send('get', *(tags.collect{|tag| tagid(tag)})))
- end
- def get_full(*tags)
- simplelist(tk_send('get', '-full', *(tags.collect{|tag| tagid(tag)})))
- end
-
- def hide(*tags)
- if tags[-1].kind_of?(Hash)
- keys = tags.pop
- else
- keys = {}
- end
- keys = _search_flags(keys)
- args = hash_kv(keys) << '--'
- args.concat(tags.collect{|t| tagid(t)})
- tk_send('hide', *args)
- self
- end
-
- def index(str)
- tagid2obj(tk_send('index', str))
- end
- def index_at(tag, str)
- tagid2obj(tk_send('index', '-at', tagid(tag), str))
- end
- def index_at_path(tag, str)
- tagid2obj(tk_send('index', '-at', tagid(tag), '-path', str))
- end
-
- def insert(pos, parent=nil, keys={})
- Tk::BLT::Treeview::Node.new(pos, parent, keys)
- end
- def insert_at(tag, pos, parent=nil, keys={})
- if parent.kind_of?(Hash)
- keys = parent
- parent = nil
- end
-
- keys = _symbolkey2str(keys)
- keys['at'] = tagid(tag)
-
- Tk::BLT::Treeview::Node.new(pos, parent, keys)
- end
-
- def move_before(tag, dest)
- tk_send('move', tagid(tag), 'before', tagid(dest))
- self
- end
- def move_after(tag, dest)
- tk_send('move', tagid(tag), 'after', tagid(dest))
- self
- end
- def move_into(tag, dest)
- tk_send('move', tagid(tag), 'into', tagid(dest))
- self
- end
-
- def nearest(x, y, var=None)
- tagid2obj(tk_send('nearest', x, y, var))
- end
-
- def open(*tags)
- tk_send('open', *(tags.collect{|tag| tagid(tag)}))
- self
- end
- def open_recurse(*tags)
- tk_send('open', '-recurse', *(tags.collect{|tag| tagid(tag)}))
- self
- end
-
- def range(first, last)
- simplelist(tk_send('range', tagid(first), tagid(last))).collect{|id|
- tagid2obj(id)
- }
- end
- def range_open(first, last)
- simplelist(tk_send('range', '-open',
- tagid(first), tagid(last))).collect{|id|
- tagid2obj(id)
- }
- end
-
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send_without_enc('scan', 'dragto', x, y)
- self
- end
-
- def see(tag)
- tk_send_without_enc('see', tagid(tag))
- self
- end
- def see_anchor(anchor, tag)
- tk_send_without_enc('see', '-anchor', anchor, tagid(tag))
- self
- end
-
- def selection_anchor(tag)
- tk_send_without_enc('selection', 'anchor', tagid(tag))
- self
- end
- def selection_cancel()
- tk_send_without_enc('selection', 'cancel')
- self
- end
- def selection_clear(first, last=None)
- tk_send_without_enc('selection', 'clear', tagid(first), tagid(last))
- self
- end
- def selection_clear_all()
- tk_send_without_enc('selection', 'clearall')
- self
- end
- def selection_mark(tag)
- tk_send_without_enc('selection', 'mark', tagid(tag))
- self
- end
- def selection_include?(tag)
- bool(tk_send('selection', 'include', tagid(tag)))
- end
- def selection_present?()
- bool(tk_send('selection', 'present'))
- end
- def selection_set(first, last=None)
- tk_send_without_enc('selection', 'set', tagid(first), tagid(last))
- self
- end
- def selection_toggle(first, last=None)
- tk_send_without_enc('selection', 'toggle', tagid(first), tagid(last))
- self
- end
-
- def show(*tags)
- if tags[-1].kind_of?(Hash)
- keys = tags.pop
- else
- keys = {}
- end
- keys = _search_flags(keys)
- args = hash_kv(keys) << '--'
- args.concat(tags.collect{|t| tagid(t)})
- tk_send('show', *args)
- self
- end
-
- def sort_auto(mode)
- tk_send('sort', 'auto', mode)
- self
- end
- def sort_auto=(mode)
- tk_send('sort', 'auto', mode)
- mode
- end
- def sort_auto?
- bool(tk_send('sort', 'auto'))
- end
- def sort_once(*tags)
- tk_send('sort', 'once', *(tags.collect{|tag| tagid(tag)}))
- self
- end
- def sort_once_recurse(*tags)
- tk_send('sort', 'once', '-recurse', *(tags.collect{|tag| tagid(tag)}))
- self
- end
-
- def tag_add(tag, *ids)
- tk_send('tag', 'add', tagid(tag), *ids)
- self
- end
- def tag_delete(tag, *ids)
- tk_send('tag', 'delete', tagid(tag), *ids)
- self
- end
- def tag_forget(tag)
- tk_send('tag', 'forget', tagid(tag))
- self
- end
- def tag_names(id=nil)
- id = (id)? tagid(id): None
-
- simplelist(tk_send('tag', 'nodes', id)).collect{|tag|
- Tk::BLT::Treeview::Tag.id2obj(self, tag)
- }
- end
- def tag_nodes(tag)
- simplelist(tk_send('tag', 'nodes', tagid(tag))).collect{|id|
- Tk::BLT::Treeview::Node.id2obj(self, id)
- }
- end
-
- def text_apply
- tk_send('text', 'apply')
- self
- end
- def text_cancel
- tk_send('text', 'cancel')
- self
- end
-
- def text_delete(first, last)
- tk_send('text', 'delete', first, last)
- self
- end
- def text_get(x, y)
- tk_send('text', 'get', x, y)
- end
- def text_get_root(x, y)
- tk_send('text', 'get', '-root', x, y)
- end
- def text_icursor(idx)
- tk_send('text', 'icursor', idx)
- self
- end
- def text_index(idx)
- num_or_str(tk_send('text', 'index', idx))
- end
- def text_insert(idx, str)
- tk_send('text', 'insert', idx, str)
- self
- end
-
- def text_selection_adjust(idx)
- tk_send('text', 'selection', 'adjust', idx)
- self
- end
- def text_selection_clear
- tk_send('text', 'selection', 'clear')
- self
- end
- def text_selection_from(idx)
- tk_send('text', 'selection', 'from', idx)
- self
- end
- def text_selection_present
- num_or_str(tk_send('text', 'selection', 'present'))
- end
- def text_selection_range(start, last)
- tk_send('text', 'selection', 'range', start, last)
- self
- end
- def text_selection_to(idx)
- tk_send('text', 'selection', 'to', idx)
- self
- end
-
- def toggle(tag)
- tk_send('toggle', tagid(tag))
- self
- end
-end
-
-######################################
-
-module Tk::BLT::Treeview::TagOrID_Methods
- def bbox
- @tree.bbox(self)
- end
- def screen_bbox
- @tree.screen_bbox(self)
- end
-
- def bind(seq, *args)
- @tree.tag_bind(self, seq, *args)
- self
- end
- def bind_append(seq, *args)
- @tree.tag_bind_append(self, seq, *args)
- self
- end
- def bind_remove(seq)
- @tree.tag_bind_remove(self, seq)
- self
- end
- def bindinfo(seq=nil)
- @tree.tag_bindinfo(self, seq)
- end
-
- def button_activate
- @tree.button_activate(self)
- self
- end
-
- def button_bind(seq, *args)
- @tree.button_bind(self, seq, *args)
- self
- end
- def button_bind_append(seq, *args)
- @tree.button_bind_append(self, seq, *args)
- self
- end
- def button_bind_remove(seq)
- @tree.button_bind_remove(self, seq)
- self
- end
- def button_bindinfo(seq=nil)
- @tree.button_bindinfo(self, seq)
- end
-
- def close
- @tree.close(self)
- self
- end
- def close_recurse
- @tree.close_recurse(self)
- self
- end
-
- def delete
- @tree.delete(self)
- self
- end
-
- def entry_activate
- @tree.entry_activate(self)
- self
- end
- def entry_children(first=None, last=None)
- @tree.entry_children(self, first, last)
- end
- def entry_delete(first=None, last=None)
- @tree.entry_delete(self, first, last)
- end
- def entry_before?(tag)
- @tree.entry_before?(self, tag)
- end
- def entry_hidden?
- @tree.entry_before?(self)
- end
- def entry_open?
- @tree.entry_open?(self)
- end
-
- def entry_size
- @tree.entry_size(self)
- end
- def entry_size_recurse
- @tree.entry_size_recurse(self)
- end
-
- def focus
- @tree.tag_focus(self)
- self
- end
-
- def get
- @tree.get(self)
- end
- def get_full
- @tree.get_full(self)
- end
-
- def hide
- @tree.hide(self)
- self
- end
-
- def index(str)
- @tree.index_at(self, str)
- end
- def index_path(str)
- @tree.index_at_path(self, str)
- end
-
- def insert(pos, parent=nil, keys={})
- @tree.insert_at(self, pos, parent, keys)
- end
-
- def move_before(dest)
- @tree.move_before(self, dest)
- self
- end
- def move_after(dest)
- @tree.move_after(self, dest)
- self
- end
- def move_into(dest)
- @tree.move_into(self, dest)
- self
- end
-
- def open
- @tree.open(self)
- self
- end
- def open_recurse
- @tree.open_recurse(self)
- self
- end
-
- def range_to(tag)
- @tree.range(self, tag)
- end
- def range_open_to(tag)
- @tree.range(self, tag)
- end
-
- def see
- @tree.see(self)
- self
- end
- def see_anchor(anchor)
- @tree.see_anchor(anchor, self)
- self
- end
-
- def selection_anchor
- @tree.selection_anchor(self)
- self
- end
- def selection_clear
- @tree.selection_clear(self)
- self
- end
- def selection_mark
- @tree.selection_mark(self)
- self
- end
- def selection_include?
- @tree.selection_include?(self)
- end
- def selection_set
- @tree.selection_set(self)
- self
- end
- def selection_toggle
- @tree.selection_toggle(self)
- self
- end
-
- def show
- @tree.show(self)
- self
- end
-
- def sort_once
- @tree.sort_once(self)
- self
- end
- def sort_once_recurse
- @tree.sort_once_recurse(self)
- self
- end
-
- def toggle
- @tree.toggle(self)
- self
- end
-end
-
-######################################
-
-class Tk::BLT::Treeview::Node < TkObject
- include Tk::BLT::Treeview::TagOrID_Methods
-
- TreeNodeID_TBL = TkCore::INTERP.create_table
-
- (TreeNode_ID = ['blt_treeview_node'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- TreeNodeID_TBL.mutex.synchronize{ TreeNodeID_TBL.clear }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- TreeNodeID_TBL.mutex.synchronize{
- if TreeNodeID_TBL[tpath]
- if TreeNodeID_TBL[tpath][id]
- TreeNodeID_TBL[tpath][id]
- else
- begin
- # self.new(tree, nil, nil, 'node'=>Integer(id))
- unless (tk_call(@tpath, 'get', id)).empty?
- id = Integer(id)
- (obj = self.allocate).instance_eval{
- @parent = @tree = tree
- @tpath = @parent.path
- @path = @id = id
- TreeNodeID_TBL[@tpath] ||= {}
- TreeNodeID_TBL[@tpath][@id] = self
- }
- obj
- else
- id
- end
- rescue
- id
- end
- end
- else
- id
- end
- }
- end
-
- def self.new(tree, pos, parent=nil, keys={})
- if parent.kind_of?(Hash)
- keys = parent
- parent = nil
- end
-
- keys = _symbolkey2str(keys)
- tpath = tree.path
-
- TreeNodeID_TBL.mutex.synchronize{
- TreeNodeID_TBL[tpath] ||= {}
- if (id = keys['node']) && (obj = TreeNodeID_TBL[tpath][id])
- keys.delete('node')
- tk_call(tree.path, 'move', id, pos, parent) if parent
- return obj
- end
-
- #super(tree, pos, parent, keys)
- (obj = self.allocate).instance_eval{
- initialize(tree, pos, parent, keys)
- TreeNodeID_TBL[tpath][@id] = self
- }
- obj
- }
- end
-
- def initialize(tree, pos, parent, keys)
- @parent = @tree = tree
- @tpath = @parent.path
-
- if (id = keys['node'])
- # if tk_call(@tpath, 'get', id).empty?
- # fail RuntimeError, "not exist the node '#{id}'"
- # end
- @path = @id = id
- tk_call(@tpath, 'move', @id, pos, tagid(parent)) if parent
- configure(keys) if keys && ! keys.empty?
- else
- name = nil
- TreeNode_ID.mutex.synchronize{
- name = TreeNode_ID.join(TkCore::INTERP._ip_id_).freeze
- TreeNode_ID[1].succ!
- }
-
- at = keys.delete['at']
-
- if parent
- if parent.kind_of?(Tk::BLT::Treeview::Node) ||
- parent.kind_of?(Tk::BLT::Treeview::Tag)
- path = [get_full(parent.id)[0], name]
- at = nil # ignore 'at' option
- else
- path = [parent.to_s, name]
- end
- else
- path = name
- end
-
- if at
- @id = tk_call(@tpath, 'insert', '-at', tagid(at), pos, path, keys)
- else
- @id = tk_call(@tpath, 'insert', pos, path, keys)
- end
- @path = @id
- end
- end
-
- def id
- @id
- end
-end
-
-######################################
-
-class Tk::BLT::Treeview::Tag < TkObject
- include Tk::BLT::Treeview::TagOrID_Methods
-
- TreeTagID_TBL = TkCore::INTERP.create_table
-
- (TreeTag_ID = ['blt_treeview_tag'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- TreeTagID_TBL.mutex.synchronize{ TreeTagID_TBL.clear }
- }
-
- def self.id2obj(tree, name)
- tpath = tree.path
- TreeTagID_TBL.mutex.synchronize{
- if TreeTagID_TBL[tpath]
- if TreeTagID_TBL[tpath][name]
- TreeTagID_TBL[tpath][name]
- else
- #self.new(tree, name)
- (obj = self.allocate).instance_eval{
- @parent = @tree = tree
- @tpath = @parent.path
- @path = @id = name
- TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath]
- TreeTagID_TBL[@tpath][@id] = self
- }
- obj
- end
- else
- id
- end
- }
- end
-
- def self.new_by_name(tree, name, *ids)
- TreeTagID_TBL.mutex.synchronize{
- unless (obj = TreeTagID_TBL[tree.path][name])
- (obj = self.allocate).instance_eval{
- initialize(tree, name, ids)
- TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath]
- TreeTagID_TBL[@tpath][@id] = self
- }
- end
- obj
- }
- end
-
- def self.new(tree, *ids)
- TreeTagID_TBL.mutex.synchronize{
- (obj = self.allocate).instance_eval{
- if tree.kind_of?(Array)
- initialize(tree[0], tree[1], ids)
- else
- initialize(tree, nil, ids)
- end
- TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath]
- TreeTagID_TBL[@tpath][@id] = self
- }
- obj
- }
- end
-
- def initialize(tree, name, ids)
- @parent = @tree = tree
- @tpath = @parent.path
-
- if name
- @path = @id = name
- else
- TreeTag_ID.mutex.synchronize{
- @path = @id = TreeTag_ID.join(TkCore::INTERP._ip_id_).freeze
- TreeTag_ID[1].succ!
- }
- end
-
- unless ids.empty?
- tk_call(@tpath, 'tag', 'add', @id, *(ids.collect{|id| tagid(id)}))
- end
- end
-
- def tagid(tag)
- if tag.kind_of?(Tk::BLT::Treeview::Node) \
- || tag.kind_of?(Tk::BLT::Treeview::Tag)
- tag.id
- else
- tag
- end
- end
- private :tagid
-
- def id
- @id
- end
-
- def add(*ids)
- tk_call(@tpath, 'tag', 'add', @id, *(ids{|id| tagid(id)}))
- self
- end
-
- def remove(*ids)
- tk_call(@tpath, 'tag', 'delete', @id, *(ids{|id| tagid(id)}))
- self
- end
-
- def forget
- tk_call(@tpath, 'tag', 'forget', @id)
- self
- end
-
- def nodes
- simplelist(tk_call(@tpath, 'tag', 'nodes', @id)).collect{|id|
- Tk::BLT::Treeview::Node.id2obj(@tree, id)
- }
- end
-end
-
-class Tk::BLT::Hiertable
- TkCommandNames = ['::blt::hiertable'.freeze].freeze
- WidgetClassName = 'Hiertable'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-end
diff --git a/ext/tk/lib/tkextlib/blt/unix_dnd.rb b/ext/tk/lib/tkextlib/blt/unix_dnd.rb
deleted file mode 100644
index 3c0cd33b79..0000000000
--- a/ext/tk/lib/tkextlib/blt/unix_dnd.rb
+++ /dev/null
@@ -1,142 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/unix_dnd.rb
-#
-# *** This is alpha version, because there is no document on BLT. ***
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module DnD
- extend TkCore
-
- TkCommandNames = ['::blt::dnd'.freeze].freeze
-
- ##############################
-
- extend TkItemConfigMethod
-
- class << self
- def __item_cget_cmd(id)
- ['::blt::dnd', *id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- ['::blt::dnd', *id]
- end
- private :__item_config_cmd
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- def cget_tkstring(win, option)
- itemcget_tkstring(['cget', win], option)
- end
- def cget(win, option)
- itemcget(['cget', win], option)
- end
- def cget_strict(win, option)
- itemcget_strict(['cget', win], option)
- end
- def configure(win, slot, value=None)
- itemconfigure(['configure', win], slot, value)
- end
- def configinfo(win, slot=nil)
- itemconfiginfo(['configure', win], slot)
- end
- def current_configinfo(win, slot=nil)
- current_itemconfiginfo(['configure', win], slot)
- end
-
- def token_cget_tkstring(win, option)
- itemcget_tkstring(['token', 'cget', win], option)
- end
- def token_cget(win, option)
- itemcget(['token', 'cget', win], option)
- end
- def token_cget_strict(win, option)
- itemcget_strict(['token', 'cget', win], option)
- end
- def token_configure(win, slot, value=None)
- itemconfigure(['token', 'configure', win], slot, value)
- end
- def token_configinfo(win, slot=nil)
- itemconfiginfo(['token', 'configure', win], slot)
- end
- def current_token_configinfo(win, slot=nil)
- current_itemconfiginfo(['token', 'configure', win], slot)
- end
-
- def token_windowconfigure(win, slot, value=None)
- itemconfigure(['token', 'window', win], slot, value)
- end
- def token_windowconfiginfo(win, slot=nil)
- itemconfiginfo(['token', 'window', win], slot)
- end
- def current_token_windowconfiginfo(win, slot=nil)
- current_itemconfiginfo(['token', 'window', win], slot)
- end
- end
-
- ##############################
-
- def self.cancel(win)
- tk_call('::blt::dnd', 'cancel', *wins)
- end
- def self.delete(*wins)
- tk_call('::blt::dnd', 'delete', *wins)
- end
- def self.delete_source(*wins)
- tk_call('::blt::dnd', 'delete', '-source', *wins)
- end
- def self.delete_target(*wins)
- tk_call('::blt::dnd', 'delete', '-target', *wins)
- end
- def self.drag(win, x, y, token=None)
- tk_call('::blt::dnd', 'drag', win, x, y, token)
- end
- def self.drop(win, x, y, token=None)
- tk_call('::blt::dnd', 'drop', win, x, y, token)
- end
- def self.get_data(win, fmt=nil, cmd=nil)
- if fmt
- tk_call('::blt::dnd', 'getdata', win, fmt, cmd)
- else
- list(tk_call('::blt::dnd', 'getdata', win))
- end
- end
- def self.names(pat=None)
- list(tk_call('::blt::dnd', 'names', pat))
- end
- def self.source_names(pat=None)
- list(tk_call('::blt::dnd', 'names', '-source', pat))
- end
- def self.target_names(pat=None)
- list(tk_call('::blt::dnd', 'names', '-target', pat))
- end
- def self.pull(win, fmt)
- tk_call('::blt::dnd', 'pull', win, fmt)
- end
- def self.register(win, keys={})
- tk_call('::blt::dnd', 'register', win, keys)
- end
- def self.select(win, x, y, timestamp)
- tk_call('::blt::dnd', 'select', win, x, y, timestamp)
- end
- def self.set_data(win, fmt=nil, cmd=nil)
- if fmt
- tk_call('::blt::dnd', 'setdata', win, fmt, cmd)
- else
- list(tk_call('::blt::dnd', 'setdata', win))
- end
- end
- def self.token(*args)
- tk_call('::blt::dnd', 'token', *args)
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/vector.rb b/ext/tk/lib/tkextlib/blt/vector.rb
deleted file mode 100644
index a3ab7e64b2..0000000000
--- a/ext/tk/lib/tkextlib/blt/vector.rb
+++ /dev/null
@@ -1,257 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/vector.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- class Vector < TkVariable
- TkCommandNames = ['::blt::vector'.freeze].freeze
-
- def self.create(*args)
- tk_call('::blt::vector', 'create', *args)
- end
-
- def self.destroy(*args)
- tk_call('::blt::vector', 'destroy', *args)
- end
-
- def self.expr(expression)
- tk_call('::blt::vector', 'expr', expression)
- end
-
- def self.names(pat=None)
- list = simplelist(tk_call('::blt::vector', 'names', pat))
- TkVar_ID_TBL.mutex.synchronize{
- list.collect{|name|
- if TkVar_ID_TBL[name]
- TkVar_ID_TBL[name]
- elsif name[0..1] == '::' && TkVar_ID_TBL[name[2..-1]]
- TkVar_ID_TBL[name[2..-1]]
- else
- name
- end
- }
- }
- end
-
- ####################################
-
- def initialize(size=nil, keys={})
- if size.kind_of?(Hash)
- keys = size
- size = nil
- end
- if size.kind_of?(Array)
- # [first, last]
- size = size.join(':')
- end
- if size
- @id = TkCore::INTERP._invoke('::blt::vector', 'create',
- "#auto(#{size})", *hash_kv(keys))
- else
- @id = TkCore::INTERP._invoke('::blt::vector', 'create',
- "#auto", *hash_kv(keys))
- end
-
- TkVar_ID_TBL.mutex.synchronize{
- TkVar_ID_TBL[@id] = self
- }
-
- @def_default = false
- @default_val = nil
-
- @trace_var = nil
- @trace_elem = nil
- @trace_opts = nil
-
- # teach Tk-ip that @id is global var
- TkCore::INTERP._invoke_without_enc('global', @id)
- end
-
- def destroy
- tk_call('::blt::vector', 'destroy', @id)
- end
-
- def inspect
- '#<Tk::BLT::Vector: ' + @id + '>'
- end
-
- def to_s
- @id
- end
-
- def *(item)
- list(tk_call(@id, '*', item))
- end
-
- def +(item)
- list(tk_call(@id, '+', item))
- end
-
- def -(item)
- list(tk_call(@id, '-', item))
- end
-
- def /(item)
- list(tk_call(@id, '/', item))
- end
-
- def append(*vectors)
- tk_call(@id, 'append', *vectors)
- end
-
- def binread(channel, len=None, keys={})
- if len.kind_of?(Hash)
- keys = len
- len = None
- end
- keys = _symbolkey2str(keys)
- keys['swap'] = None if keys.delete('swap')
- tk_call(@id, 'binread', channel, len, keys)
- end
-
- def clear()
- tk_call(@id, 'clear')
- self
- end
-
- def delete(*indices)
- tk_call(@id, 'delete', *indices)
- self
- end
-
- def dup_vector(vec)
- tk_call(@id, 'dup', vec)
- self
- end
-
- def expr(expression)
- tk_call(@id, 'expr', expression)
- self
- end
-
- def index(idx, val=None)
- number(tk_call(@id, 'index', idx, val))
- end
-
- def [](idx)
- index(idx)
- end
-
- def []=(idx, val)
- index(idx, val)
- end
-
- def length()
- number(tk_call(@id, 'length'))
- end
-
- def length=(size)
- number(tk_call(@id, 'length', size))
- end
-
- def merge(*vectors)
- tk_call(@id, 'merge', *vectors)
- self
- end
-
- def normalize(vec=None)
- tk_call(@id, 'normalize', vec)
- self
- end
-
- def notify(keyword)
- tk_call(@id, 'notify', keyword)
- self
- end
-
- def offset()
- number(tk_call(@id, 'offset'))
- end
-
- def offset=(val)
- number(tk_call(@id, 'offset', val))
- end
-
- def random()
- tk_call(@id, 'random')
- end
-
- def populate(vector, density=None)
- tk_call(@id, 'populate', vector, density)
- self
- end
-
- def range(first, last=None)
- list(tk_call(@id, 'range', first, last))
- end
-
- def search(val1, val2=None)
- list(tk_call(@id, 'search', val1, val2))
- end
-
- def set(item)
- tk_call(@id, 'set', item)
- self
- end
-
- def seq(start, finish=None, step=None)
- tk_call(@id, 'seq', start, finish, step)
- self
- end
-
- def sort(*vectors)
- tk_call(@id, 'sort', *vectors)
- self
- end
-
- def sort_reverse(*vectors)
- tk_call(@id, 'sort', '-reverse', *vectors)
- self
- end
-
- def split(*vectors)
- tk_call(@id, 'split', *vectors)
- self
- end
-
- def variable(var)
- tk_call(@id, 'variable', var)
- self
- end
- end
-
- class VectorAccess < Vector
- def self.new(name)
- TkVar_ID_TBL.mutex.synchronize{
- if TkVar_ID_TBL[name]
- TkVar_ID_TBL[name]
- else
- (obj = self.allocate).instance_eval{
- initialize(name)
- TkVar_ID_TBL[@id] = self
- }
- obj
- end
- }
- end
-
- def initialize(vec_name)
- @id = vec_name
-
- @def_default = false
- @default_val = nil
-
- @trace_var = nil
- @trace_elem = nil
- @trace_opts = nil
-
- # teach Tk-ip that @id is global var
- TkCore::INTERP._invoke_without_enc('global', @id)
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/watch.rb b/ext/tk/lib/tkextlib/blt/watch.rb
deleted file mode 100644
index b88c81c745..0000000000
--- a/ext/tk/lib/tkextlib/blt/watch.rb
+++ /dev/null
@@ -1,176 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/watch.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- class Watch < TkObject
- extend TkCore
-
- TkCommandNames = ['::blt::watch'.freeze].freeze
-
- WATCH_ID_TBL = TkCore::INTERP.create_table
-
- (BLT_WATCH_ID = ['blt_watch_id'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- WATCH_ID_TBL.mutex.synchronize{ WATCH_ID_TBL.clear }
- }
-
- def self.names(state = None)
- lst = tk_split_list(tk_call('::blt::watch', 'names', state))
- WATCH_ID_TBL.mutex.synchronize{
- lst.collect{|name|
- WATCH_ID_TBL[name] || name
- }
- }
- end
-
- def __numval_optkeys
- ['maxlevel']
- end
- private :__numval_optkeys
-
- def __boolval_optkeys
- ['active']
- end
- private :__boolval_optkeys
-
- def __config_cmd
- ['::blt::watch', 'configure', self.path]
- end
- private :__config_cmd
-
- def initialize(name = nil, keys = {})
- if name.kind_of?(Hash)
- keys = name
- name = nil
- end
-
- if name
- @id = name.to_s
- else
- BLT_WATCH_ID.mutex.synchronize{
- @id = BLT_WATCH_ID.join(TkCore::INTERP._ip_id_)
- BLT_WATCH_ID[1].succ!
- }
- end
-
- @path = @id
-
- WATCH_ID_TBL.mutex.synchronize{
- WATCH_ID_TBL[@id] = self
- }
- tk_call('::blt::watch', 'create', @id, *hash_kv(keys))
- end
-
- def activate
- tk_call('::blt::watch', 'activate', @id)
- self
- end
- def deactivate
- tk_call('::blt::watch', 'deactivate', @id)
- self
- end
- def delete
- tk_call('::blt::watch', 'delete', @id)
- self
- end
- def info
- ret = []
- lst = tk_split_simplelist(tk_call('::blt::watch', 'info', @id))
- until lst.empty?
- k, v, *lst = lst
- k = k[1..-1]
- case k
- when /^(#{__strval_optkeys.join('|')})$/
- # do nothing
-
- when /^(#{__numval_optkeys.join('|')})$/
- begin
- v = number(v)
- rescue
- v = nil
- end
-
- when /^(#{__numstrval_optkeys.join('|')})$/
- v = num_or_str(v)
-
- when /^(#{__boolval_optkeys.join('|')})$/
- begin
- v = bool(v)
- rescue
- v = nil
- end
-
- when /^(#{__listval_optkeys.join('|')})$/
- v = simplelist(v)
-
- when /^(#{__numlistval_optkeys.join('|')})$/
- v = list(v)
-
- else
- if v.index('{')
- v = tk_split_list(v)
- else
- v = tk_tcl2ruby(v)
- end
- end
-
- ret << [k, v]
- end
-
- ret
- end
- def configinfo(slot = nil)
- if slot
- slot = slot.to_s
- v = cget(slot)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- [slot, v]
- else
- {slot=>v}
- end
- else
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- info
- else
- Hash[*(info.flatten)]
- end
- end
- end
- def cget_strict(key)
- key = key.to_s
- begin
- info.assoc(key)[1]
- rescue
- fail ArgumentError, "unknown option '#{key}'"
- end
- end
- def cget(key)
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- cget_strict(key)
- else
- begin
- cget_strict(key)
- rescue => e
- if current_configinfo.has_key?(key.to_s)
- # error on known option
- fail e
- else
- # unknown option
- nil
- end
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/win_printer.rb b/ext/tk/lib/tkextlib/blt/win_printer.rb
deleted file mode 100644
index 8d609acc19..0000000000
--- a/ext/tk/lib/tkextlib/blt/win_printer.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/win_printer.rb
-#
-# *** Windows only ***
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- class Printer < TkObject
- extend TkCore
-
- TkCommandNames = ['::blt::printer'.freeze].freeze
-
- def self.enum(attribute)
- simplelist(tk_call('::blt::printer', 'enum', attribute))
- end
-
- def self.names(pat=None)
- simplelist(tk_call('::blt::printer', 'names', pat))
- end
-
- def self.open(printer)
- self.new(printer)
- end
-
- #################################
-
- def initialize(printer)
- @printer_id = tk_call('::blt::printer', 'open', printer)
- end
-
- def close
- tk_call('::blt::print', 'close', @printer_id)
- self
- end
- def get_attrs(var)
- tk_call('::blt::print', 'getattrs', @printer_id, var)
- var
- end
- def set_attrs(var)
- tk_call('::blt::print', 'setattrs', @printer_id, var)
- self
- end
- def snap(win)
- tk_call('::blt::print', 'snap', @printer_id, win)
- self
- end
- def write(str)
- tk_call('::blt::print', 'write', @printer_id, str)
- self
- end
- def write_with_title(title, str)
- tk_call('::blt::print', 'write', @printer_id, title, str)
- self
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/blt/winop.rb b/ext/tk/lib/tkextlib/blt/winop.rb
deleted file mode 100644
index 38033e1113..0000000000
--- a/ext/tk/lib/tkextlib/blt/winop.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/blt/winop.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/blt.rb'
-
-module Tk::BLT
- module Winop
- extend TkCore
-
- TkCommandNames = ['::blt::winop'.freeze].freeze
- end
- WinOp = Winop
-end
-
-class << Tk::BLT::Winop
- def changes(win)
- tk_call('::blt::winop', 'changes', win)
- end
-
- def colormap(win)
- Hash[*list(tk_call('::blt::winop', 'colormap', win))]
- end
-
- def convolve(src, dest, filter)
- tk_call('::blt::winop', 'convolve', src, dest, filter)
- end
-
- def image_convolve(src, dest, filter)
- tk_call('::blt::winop', 'image', 'convolve', src, dest, filter)
- end
- def image_gradient(photo, left, right, type)
- tk_call('::blt::winop', 'image', 'gradient', photo, left, right, type)
- end
- def image_read_jpeg(file, photo)
- tk_call('::blt::winop', 'image', 'readjpeg', file, photo)
- end
- def image_resample(src, dest, horiz_filter=None, vert_filter=None)
- tk_call('::blt::winop', 'image', 'resample',
- src, dest, horiz_filter, vert_filter)
- end
- def image_rotate(src, dest, angle)
- tk_call('::blt::winop', 'image', 'rotate', src, dest, angle)
- end
- def image_snap(win, photo, width=None, height=None)
- tk_call('::blt::winop', 'image', 'snap', win, photo, width, height)
- end
- def image_subsample(src, dest, x, y, width, height,
- horiz_filter=None, vert_filter=None)
- tk_call('::blt::winop', 'image', 'subsample',
- src, dest, x, y, width, height, horiz_filter, vert_filter)
- end
-
- def quantize(src, dest, colors)
- tk_call('::blt::winop', 'quantize', src, dest, colors)
- end
-
- def query()
- tk_call('::blt::winop', 'query')
- end
-
- def read_jpeg(file, photo)
- tk_call('::blt::winop', 'readjpeg', file, photo)
- end
-
- def resample(src, dest, horiz_filter=None, vert_filter=None)
- tk_call('::blt::winop', 'resample',
- src, dest, horiz_filter, vert_filter)
- end
-
- def subsample(src, dest, x, y, width, height,
- horiz_filter=None, vert_filter=None)
- tk_call('::blt::winop', 'subsample',
- src, dest, x, y, width, height, horiz_filter, vert_filter)
- end
-
- def raise(*wins)
- tk_call('::blt::winop', 'raise', *wins)
- end
-
- def lower(*wins)
- tk_call('::blt::winop', 'lower', *wins)
- end
-
- def map(*wins)
- tk_call('::blt::winop', 'map', *wins)
- end
-
- def unmap(*wins)
- tk_call('::blt::winop', 'unmap', *wins)
- end
-
- def move(win, x, y)
- tk_call('::blt::winop', 'move', win, x, y)
- end
-
- def snap(win, photo)
- tk_call('::blt::winop', 'snap', win, photo)
- end
-
- def warpto(win = None)
- tk_call('::blt::winop', 'warpto', win)
- end
- alias warp_to warpto
-end
diff --git a/ext/tk/lib/tkextlib/bwidget.rb b/ext/tk/lib/tkextlib/bwidget.rb
deleted file mode 100644
index 0fa9c77ecf..0000000000
--- a/ext/tk/lib/tkextlib/bwidget.rb
+++ /dev/null
@@ -1,154 +0,0 @@
-# frozen_string_literal: false
-#
-# BWidget extension support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/bwidget/setup.rb'
-
-# load all image format handlers
-#TkPackage.require('BWidget', '1.7')
-TkPackage.require('BWidget')
-
-module Tk
- module BWidget
- TkComm::TkExtlibAutoloadModule.unshift(self)
- # Require autoload-symbols which is a same name as widget classname.
- # Those are used at TkComm._genobj_for_tkwidget method.
-
- extend TkCore
-
- LIBRARY = tk_call('set', '::BWIDGET::LIBRARY')
-
- PACKAGE_NAME = 'BWidget'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('BWidget')
- rescue
- ''
- end
- end
-
- def self.XLFDfont(cmd, *args)
- if args[-1].kind_of?(Hash)
- keys = args.pop
- args.concat(hash_kv(keys))
- end
- tk_call('BWidget::XLFDfont', cmd, *args)
- end
-
- def self.assert(exp, msg=None)
- tk_call('BWidget::assert', exp, msg)
- end
-
- def self.badOptionString(type, value, list)
- tk_call('BWidget::badOptionString', type, value, list)
- end
-
- def self.bindMouseWheel(widget)
- tk_call('BWidget::bindMouseWheel', widget)
- end
-
- def self.classes(klass)
- list(tk_call('BWidget::classes', klass))
- end
-
- def self.clonename(menu)
- tk_call('BWidget::clonename', menu)
- end
-
- def self.focus(opt, path)
- tk_call('BWidget::focus', opt, path)
- end
-
- def self.get3dcolor(path, bgcolor)
- tk_call('BWidget::get3dcolor', path, bgcolor)
- end
-
- def self.getname(name)
- tk_call('BWidget::getname', name)
- end
-
- def self.grab(opt, path)
- tk_call('BWidget::grab', opt, path)
- end
-
- def self.inuse(klass)
- bool(tk_call('BWidget::inuse', klass))
- end
-
- def self.library(klass, *klasses)
- tk_call('BWidget::library', klass, *klasses)
- end
-
- def self.lreorder(list, neworder)
- tk_call('BWidget::lreorder', list, neworder)
- end
-
- def self.parsetext(text)
- tk_call('BWidget::parsetext', text)
- end
-
- def self.place(path, w, h, *args)
- if args[-1].kind_of?(Hash)
- keys = args.pop
- args.concat(hash_kv(keys))
- end
- tk_call('BWidget::place', path, w, h, *(args.flatten))
- end
-
- def self.write(file, mode=None)
- tk_call('BWidget::write', file, mode)
- end
-
- def self.wrongNumArgsString(str)
- tk_call('BWidget::wrongNumArgsString', str)
- end
-
- ####################################################
-
- autoload :ArrowButton, 'tkextlib/bwidget/arrowbutton'
- autoload :Bitmap, 'tkextlib/bwidget/bitmap'
- autoload :Button, 'tkextlib/bwidget/button'
- autoload :ButtonBox, 'tkextlib/bwidget/buttonbox'
- autoload :ComboBox, 'tkextlib/bwidget/combobox'
- autoload :Dialog, 'tkextlib/bwidget/dialog'
- autoload :DragSite, 'tkextlib/bwidget/dragsite'
- autoload :DropSite, 'tkextlib/bwidget/dropsite'
- autoload :DynamicHelp, 'tkextlib/bwidget/dynamichelp'
- autoload :Entry, 'tkextlib/bwidget/entry'
- autoload :Label, 'tkextlib/bwidget/label'
- autoload :LabelEntry, 'tkextlib/bwidget/labelentry'
- autoload :LabelFrame, 'tkextlib/bwidget/labelframe'
- autoload :ListBox, 'tkextlib/bwidget/listbox'
- autoload :MainFrame, 'tkextlib/bwidget/mainframe'
- autoload :MessageDlg, 'tkextlib/bwidget/messagedlg'
- autoload :NoteBook, 'tkextlib/bwidget/notebook'
- autoload :PagesManager, 'tkextlib/bwidget/pagesmanager'
- autoload :PanedWindow, 'tkextlib/bwidget/panedwindow'
- autoload :PasswdDlg, 'tkextlib/bwidget/passwddlg'
- autoload :ProgressBar, 'tkextlib/bwidget/progressbar'
- autoload :ProgressDlg, 'tkextlib/bwidget/progressdlg'
- autoload :ScrollableFrame, 'tkextlib/bwidget/scrollableframe'
- autoload :ScrolledWindow, 'tkextlib/bwidget/scrolledwindow'
- autoload :ScrollView, 'tkextlib/bwidget/scrollview'
- autoload :SelectColor, 'tkextlib/bwidget/selectcolor'
- autoload :SelectFont, 'tkextlib/bwidget/selectfont'
- autoload :Separator, 'tkextlib/bwidget/separator'
- autoload :SpinBox, 'tkextlib/bwidget/spinbox'
- autoload :TitleFrame, 'tkextlib/bwidget/titleframe'
- autoload :Tree, 'tkextlib/bwidget/tree'
- autoload :Widget, 'tkextlib/bwidget/widget'
-
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/arrowbutton.rb b/ext/tk/lib/tkextlib/bwidget/arrowbutton.rb
deleted file mode 100644
index a991245065..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/arrowbutton.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/arrowbutton.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/button'
-
-module Tk
- module BWidget
- class ArrowButton < Tk::BWidget::Button
- end
- end
-end
-
-class Tk::BWidget::ArrowButton
- TkCommandNames = ['ArrowButton'.freeze].freeze
- WidgetClassName = 'ArrowButton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/bitmap.rb b/ext/tk/lib/tkextlib/bwidget/bitmap.rb
deleted file mode 100644
index 3acdfdf5ec..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/bitmap.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/bitmap.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tk/image'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class Bitmap < TkPhotoImage
- end
- end
-end
-
-class Tk::BWidget::Bitmap
- def initialize(name)
- @path = tk_call_without_enc('Bitmap::get', name)
- Tk_IMGTBL[@path] = self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/button.rb b/ext/tk/lib/tkextlib/bwidget/button.rb
deleted file mode 100644
index ad880ebfdd..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/button.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/button.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/button'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class Button < Tk::Button
- end
- end
-end
-
-class Tk::BWidget::Button
- TkCommandNames = ['Button'.freeze].freeze
- WidgetClassName = 'Button'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'helptext'
- end
- private :__strval_optkeys
-
- def __tkvariable_optkeys
- super() << 'helpvar'
- end
- private :__tkvariable_optkeys
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/buttonbox.rb b/ext/tk/lib/tkextlib/bwidget/buttonbox.rb
deleted file mode 100644
index 780a6a649e..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/buttonbox.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/buttonbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/button'
-
-module Tk
- module BWidget
- class ButtonBox < TkWindow
- end
- end
-end
-
-class Tk::BWidget::ButtonBox
- TkCommandNames = ['ButtonBox'.freeze].freeze
- WidgetClassName = 'ButtonBox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- include TkItemConfigMethod
-
- def __boolval_optkeys
- super() << 'homogeneous'
- end
- private :__boolval_optkeys
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::BWidget::Button)
- name = tagOrId[:name]
- return index(name) unless name.empty?
- end
- if tagOrId.kind_of?(Tk::Button)
- return index(tagOrId[:text])
- end
- # index(tagOrId.to_s)
- index(_get_eval_string(tagOrId))
- end
-
- def add(keys={}, &b)
- win = window(tk_send('add', *hash_kv(keys)))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def delete(idx)
- tk_send('delete', tagid(idx))
- self
- end
-
- def index(idx)
- if idx.kind_of?(Tk::BWidget::Button)
- name = idx[:name]
- idx = name unless name.empty?
- end
- if idx.kind_of?(Tk::Button)
- idx = idx[:text]
- end
- number(tk_send('index', idx.to_s))
- end
-
- def insert(idx, keys={}, &b)
- win = window(tk_send('insert', tagid(idx), *hash_kv(keys)))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def invoke(idx)
- tk_send('invoke', tagid(idx))
- self
- end
-
- def set_focus(idx)
- tk_send('setfocus', tagid(idx))
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/combobox.rb b/ext/tk/lib/tkextlib/bwidget/combobox.rb
deleted file mode 100644
index b3de3186d6..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/combobox.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/combobox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/entry'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/listbox'
-require 'tkextlib/bwidget/spinbox'
-
-module Tk
- module BWidget
- class ComboBox < Tk::BWidget::SpinBox
- end
- end
-end
-
-class Tk::BWidget::ComboBox
- include Scrollable
-
- TkCommandNames = ['ComboBox'.freeze].freeze
- WidgetClassName = 'ComboBox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'autocomplete' << 'autopost'
- end
- private :__boolval_optkeys
-
- def get_listbox(&b)
- win = window(tk_send_without_enc('getlistbox'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def clear_value
- tk_send_without_enc('clearvalue')
- self
- end
- alias clearvalue clear_value
-
- def icursor(idx)
- tk_send_without_enc('icursor', idx)
- end
-
- def post
- tk_send_without_enc('post')
- self
- end
-
- def unpost
- tk_send_without_enc('unpost')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/dialog.rb b/ext/tk/lib/tkextlib/bwidget/dialog.rb
deleted file mode 100644
index ed929cb830..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/dialog.rb
+++ /dev/null
@@ -1,195 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/dialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/buttonbox'
-
-module Tk
- module BWidget
- class Dialog < TkWindow
- end
- end
-end
-
-class Tk::BWidget::Dialog
- TkCommandNames = ['Dialog'.freeze].freeze
- WidgetClassName = 'Dialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- include TkItemConfigMethod
-
- def __numstrval_optkeys
- super() << 'buttonwidth'
- end
- private :__numstrval_optkeys
-
- def __strval_optkeys
- super() << 'title' << 'geometry'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'transient' << 'homogeneous'
- end
- private :__boolval_optkeys
-
- def initialize(parent=nil, keys=nil)
- @relative = ''
- if parent.kind_of?(Hash)
- keys = _symbolkey2str(parent)
- @relative = keys['parent'] if keys.key?('parent')
- @relative = keys.delete('relative') if keys.key?('relative')
- super(keys)
- elsif keys
- keys = _symbolkey2str(keys)
- @relative = keys.delete('parent') if keys.key?('parent')
- @relative = keys.delete('relative') if keys.key?('relative')
- super(parent, keys)
- else
- super(parent)
- end
- end
-
- def create_self(keys)
- cmd = self.class::TkCommandNames[0]
- if keys and keys != None
- tk_call_without_enc(cmd, @path, '-parent', @relative,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(cmd, @path, '-parent', @relative)
- end
- end
-
- def cget_tkstring(slot)
- if slot.to_s == 'relative'
- super('parent')
- else
- super(slot)
- end
- end
- def cget_strict(slot)
- if slot.to_s == 'relative'
- super('parent')
- else
- super(slot)
- end
- end
- def cget(slot)
- if slot.to_s == 'relative'
- super('parent')
- else
- super(slot)
- end
- end
-
- def configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- slot['parent'] = slot.delete('relative') if slot.key?('relative')
- super(slot)
- else
- if slot.to_s == 'relative'
- super('parent', value)
- else
- super(slot, value)
- end
- end
- end
-
- def configinfo(slot=nil)
- if slot
- if slot.to_s == 'relative'
- super('parent')
- else
- super(slot)
- end
- else
- ret = super()
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- ret << ['relative', 'parent']
- else
- ret['relative'] = 'parent'
- end
- end
- end
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::BWidget::Button)
- name = tagOrId[:name]
- return index(name) unless name.empty?
- end
- if tagOrId.kind_of?(Tk::Button)
- return index(tagOrId[:text])
- end
- # index(tagOrId.to_s)
- index(_get_eval_string(tagOrId))
- end
-
- def add(keys={}, &b)
- win = window(tk_send('add', *hash_kv(keys)))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def get_frame(&b)
- win = window(tk_send('getframe'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def get_buttonbox(&b)
- win = window(@path + '.bbox')
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def draw(focus_win=None)
- tk_send('draw', focus_win)
- end
-
- def enddialog(ret)
- tk_send('enddialog', ret)
- end
-
- def index(idx)
- get_buttonbox.index(idx)
- end
-
- def invoke(idx)
- tk_send('invoke', tagid(idx))
- self
- end
-
- def set_focus(idx)
- tk_send('setfocus', tagid(idx))
- self
- end
-
- def withdraw
- tk_send('withdraw')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/dragsite.rb b/ext/tk/lib/tkextlib/bwidget/dragsite.rb
deleted file mode 100644
index 6c7ea4491a..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/dragsite.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/dragsite.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- module DragSite
- end
- end
-end
-
-module Tk::BWidget::DragSite
- include Tk
- extend Tk
-
- def self.include(klass, type, event)
- tk_call('DragSite::include', klass, type, event)
- end
-
- def self.register(path, keys={})
- tk_call('DragSite::register', path, *hash_kv(keys))
- end
-
- def self.set_drag(path, subpath, initcmd, endcmd, force=None)
- tk_call('DragSite::setdrag', path, subpath, initcmd, endcmd, force)
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/dropsite.rb b/ext/tk/lib/tkextlib/bwidget/dropsite.rb
deleted file mode 100644
index e5eb7f4a88..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/dropsite.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/dropsite.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- module DropSite
- end
- end
-end
-
-module Tk::BWidget::DropSite
- include Tk
- extend Tk
-
- def self.include(klass, type)
- tk_call('DropSite::include', klass, type)
- end
-
- def self.register(path, keys={})
- tk_call('DropSite::register', path, *hash_kv(keys))
- end
-
- def self.set_cursor(cursor)
- tk_call('DropSite::setcursor', cursor)
- end
-
- def self.set_drop(path, subpath, dropover, drop, force=None)
- tk_call('DropSite::setdrop', path, subpath, dropover, drop, force)
- end
-
- def self.set_operation(op)
- tk_call('DropSite::setoperation', op)
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/dynamichelp.rb b/ext/tk/lib/tkextlib/bwidget/dynamichelp.rb
deleted file mode 100644
index 7e7538fc00..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/dynamichelp.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/dynamichelp.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- module DynamicHelp
- end
- end
-end
-
-module Tk::BWidget::DynamicHelp
- include Tk
- extend Tk
-
- def self.__pathname
- 'DynamicHelp::configure'
- end
-
- def __strval_optkeys
- super() << 'topbackground'
- end
- private :__strval_optkeys
-
- def self.__cget_cmd
- ['DynamicHelp::configure']
- end
-
- def self.__config_cmd
- ['DynamicHelp::configure']
- end
-
- def self.cget_strict(slot)
- slot = slot.to_s
- info = {}
- self.current_configinfo.each{|k,v| info[k.to_s] = v if k.to_s == slot}
- fail RuntimeError, "unknown option \"-#{slot}\"" if info.empty?
- info.values[0]
- end
- def self.cget(slot)
- self.current_configinfo(slot).values[0]
- end
-
- def self.add(widget, keys={})
- tk_call('DynamicHelp::add', widget, *hash_kv(keys))
- end
-
- def self.delete(widget)
- tk_call('DynamicHelp::delete', widget)
- end
-
- def self.include(klass, type)
- tk_call('DynamicHelp::include', klass, type)
- end
-
- def self.sethelp(path, subpath, force=None)
- tk_call('DynamicHelp::sethelp', path, subpath, force)
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/entry.rb b/ext/tk/lib/tkextlib/bwidget/entry.rb
deleted file mode 100644
index bfbe2f1967..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/entry.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/entry.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/entry'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class Entry < Tk::Entry
- end
- end
-end
-
-class Tk::BWidget::Entry
- include Scrollable
-
- TkCommandNames = ['Entry'.freeze].freeze
- WidgetClassName = 'Entry'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'helptext' << 'insertbackground'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'dragenabled' << 'dropenabled' << 'editable'
- end
- private :__boolval_optkeys
-
- def __tkvariable_optkeys
- super() << 'helpvar'
- end
- private :__tkvariable_optkeys
-
- def invoke
- tk_send_without_enc('invoke')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/label.rb b/ext/tk/lib/tkextlib/bwidget/label.rb
deleted file mode 100644
index 9a0b73d95c..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/label.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/label.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/label'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class Label < Tk::Label
- end
- end
-end
-
-class Tk::BWidget::Label
- TkCommandNames = ['Label'.freeze].freeze
- WidgetClassName = 'Label'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'helptext'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'dragenabled' << 'dropenabled'
- end
- private :__boolval_optkeys
-
- def __tkvariable_optkeys
- super() << 'helpvar'
- end
- private :__tkvariable_optkeys
-
- def set_focus
- tk_send_without_enc('setfocus')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/labelentry.rb b/ext/tk/lib/tkextlib/bwidget/labelentry.rb
deleted file mode 100644
index 501f9515fa..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/labelentry.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/labelentry.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/entry'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/labelframe'
-require 'tkextlib/bwidget/entry'
-
-module Tk
- module BWidget
- class LabelEntry < Tk::Entry
- end
- end
-end
-
-class Tk::BWidget::LabelEntry
- include Scrollable
-
- TkCommandNames = ['LabelEntry'.freeze].freeze
- WidgetClassName = 'LabelEntry'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'helptext' << 'insertbackground' << 'entryfg' << 'entrybg'
- end
- private :__strval_optkeys
-
- def __tkvariable_optkeys
- super() << 'helpvar'
- end
- private :__tkvariable_optkeys
-
- def __font_optkeys
- super() << 'labelfont'
- end
- private :__font_optkeys
-
- #def entrybind(*args)
- # _bind([path, 'bind'], *args)
- # self
- #end
- def entrybind(context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, 'bind'], context, cmd, *args)
- self
- end
-
- #def entrybind_append(*args)
- # _bind_append([path, 'bind'], *args)
- # self
- #end
- def entrybind_append(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, 'bind'], context, cmd, *args)
- self
- end
-
- def entrybind_remove(*args)
- _bind_remove([path, 'bind'], *args)
- self
- end
-
- def entrybindinfo(*args)
- _bindinfo([path, 'bind'], *args)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/labelframe.rb b/ext/tk/lib/tkextlib/bwidget/labelframe.rb
deleted file mode 100644
index 21c529c6c9..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/labelframe.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/labelframe.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/label'
-
-module Tk
- module BWidget
- class LabelFrame < TkWindow
- end
- end
-end
-
-class Tk::BWidget::LabelFrame
- TkCommandNames = ['LabelFrame'.freeze].freeze
- WidgetClassName = 'LabelFrame'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'helptext'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'dragenabled' << 'dropenabled'
- end
- private :__boolval_optkeys
-
- def __tkvariable_optkeys
- super() << 'helpvar'
- end
- private :__tkvariable_optkeys
-
- def self.align(*args)
- tk_call('LabelFrame::align', *args)
- end
- def get_frame(&b)
- win = window(tk_send_without_enc('getframe'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/listbox.rb b/ext/tk/lib/tkextlib/bwidget/listbox.rb
deleted file mode 100644
index 301eb4bb54..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/listbox.rb
+++ /dev/null
@@ -1,362 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/listbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/canvas'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class ListBox < TkWindow
- # is NOT a subclass of a listbox widget class.
- # because it constructed on a canvas widget.
-
- class Item < TkObject
- end
- end
- end
-end
-
-class Tk::BWidget::ListBox
- include TkItemConfigMethod
- include Scrollable
-
- TkCommandNames = ['ListBox'.freeze].freeze
- WidgetClassName = 'ListBox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- class Event_for_Items < TkEvent::Event
- def self._get_extra_args_tbl
- [
- TkComm.method(:string) # item identifier
- ]
- end
- end
-
- def __boolval_optkeys
- super() << 'autofocus' << 'dragenabled' << 'dropenabled' << 'selectfill'
- end
- private :__boolval_optkeys
-
- def tagid(tag)
- if tag.kind_of?(Tk::BWidget::ListBox::Item)
- tag.id
- else
- # tag
- _get_eval_string(tag)
- end
- end
-
- #def imagebind(*args)
- # _bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
- # self
- #end
- def imagebind(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_for_event_class(Event_for_Items, [path, 'bindImage'],
- context, cmd, *args)
- self
- end
-
- #def imagebind_append(*args)
- # _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
- # self
- #end
- def imagebind_append(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'],
- context, cmd, *args)
- self
- end
-
- def imagebind_remove(*args)
- _bind_remove_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
- self
- end
-
- def imagebindinfo(*args)
- _bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
- end
-
- #def textbind(*args)
- # _bind_for_event_class(Event_for_Items, [path, 'bindText'], *args)
- # self
- #end
- def textbind(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_for_event_class(Event_for_Items, [path, 'bindText'],
- context, cmd, *args)
- self
- end
-
- #def textbind_append(*args)
- # _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args)
- # self
- #end
- def textbind_append(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append_for_event_class(Event_for_Items, [path, 'bindText'],
- context, cmd, *args)
- self
- end
-
- def textbind_remove(*args)
- _bind_remove_for_event_class(Event_for_Items, [path, 'bindText'], *args)
- self
- end
-
- def textbindinfo(*args)
- _bindinfo_for_event_class(Event_for_Items, [path, 'bindText'], *args)
- end
-
- def delete(*args)
- tk_send('delete', *args)
- self
- end
-
- def edit(item, text, *args)
- tk_send('edit', tagid(item), text, *args)
- self
- end
-
- def exist?(item)
- bool(tk_send('exists', tagid(item)))
- end
-
- def index(item)
- num_or_str(tk_send('index', tagid(item)))
- end
-
- def insert(idx, item, keys={})
- tk_send('insert', idx, tagid(item), *hash_kv(keys))
- self
- end
-
- def get_item(idx)
- tk_send('items', idx)
- end
-
- def items(first=None, last=None)
- list(tk_send('items', first, last))
- end
-
- def move(item, idx)
- tk_send('move', tagid(item), idx)
- self
- end
-
- def reorder(neworder)
- tk_send('reorder', neworder)
- self
- end
-
- def see(item)
- tk_send('see', tagid(item))
- self
- end
-
- def selection_clear
- tk_send_without_enc('selection', 'clear')
- self
- end
-
- def selection_set(*args)
- tk_send_without_enc('selection', 'set',
- *(args.collect{|item| tagid(item)}))
- self
- end
-
- def selection_add(*args)
- tk_send_without_enc('selection', 'add',
- *(args.collect{|item| tagid(item)}))
- self
- end
-
- def selection_remove(*args)
- tk_send_without_enc('selection', 'remove',
- *(args.collect{|item| tagid(item)}))
- self
- end
-
- def selection_get(*args)
- simplelist(tk_send_without_enc('selection', 'get')).collect{|item|
- Tk::BWidget::ListBox::Item.id2obj(self, item)
- }
- end
-end
-
-class Tk::BWidget::ListBox::Item
- include TkTreatTagFont
-
- ListItem_TBL = TkCore::INTERP.create_table
-
- (ListItem_ID = ['bw:item'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- ListItem_TBL.mutex.synchronize{ ListItem_TBL.clear }
- }
-
- def self.id2obj(lbox, id)
- lpath = lbox.path
- ListItem_TBL.mutex.synchronize{
- if ListItem_TBL[lpath]
- ListItem_TBL[lpath][id]? ListItem_TBL[lpath][id]: id
- else
- id
- end
- }
- end
-
- def initialize(lbox, *args)
- if lbox.kind_of?(Tk::BWidget::ListBox)
- @listbox = lbox
- else
- fail RuntimeError,
- "expect Tk::BWidget::ListBox or Tk::BWidget::ListBox::Item for 1st argument"
- end
-
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- else
- keys = {}
- end
-
- index = keys.delete('index')
- unless args.empty?
- index = args.shift
- end
- index = 'end' unless index
-
- unless args.empty?
- fail RuntimeError, 'too much arguments'
- end
-
- @lpath = @listbox.path
-
- if keys.key?('itemname')
- @path = @id = keys.delete('itemname')
- else
- ListItem_ID.mutex.synchronize{
- @path = @id = ListItem_ID.join(TkCore::INTERP._ip_id_)
- ListItem_ID[1].succ!
- }
- end
-
- ListItem_TBL.mutex.synchronize{
- ListItem_TBL[@id] = self
- ListItem_TBL[@lpath] = {} unless ListItem_TBL[@lpath]
- ListItem_TBL[@lpath][@id] = self
- }
-
- @listbox.insert(index, @id, keys)
- end
-
- def listbox
- @listbox
- end
-
- def id
- @id
- end
-
- def [](key)
- cget(key)
- end
-
- def []=(key, val)
- configure(key, val)
- val
- end
-
- def cget_tkstring(key)
- @listbox.itemcget_tkstring(@id, key)
- end
- def cget(key)
- @listbox.itemcget(@id, key)
- end
- def cget_strict(key)
- @listbox.itemcget_strict(@id, key)
- end
-
- def configure(key, val=None)
- @listbox.itemconfigure(@id, key, val)
- end
-
- def configinfo(key=nil)
- @listbox.itemconfiginfo(@id, key)
- end
-
- def current_configinfo(key=nil)
- @listbox.current_itemconfiginfo(@id, key)
- end
-
- def delete
- @listbox.delete(@id)
- self
- end
-
- def edit(*args)
- @listbox.edit(@id, *args)
- self
- end
-
- def exist?
- @listbox.exist?(@id)
- end
-
- def index
- @listbox.index(@id)
- end
-
- def move(index)
- @listbox.move(@id, index)
- end
-
- def see
- @listbox.see(@id)
- end
-
- def selection_add
- @listbox.selection_add(@id)
- end
-
- def selection_remove
- @listbox.selection_remove(@id)
- end
-
- def selection_set
- @listbox.selection_set(@id)
- end
-
- def selection_toggle
- @listbox.selection_toggle(@id)
- end
-end
-
diff --git a/ext/tk/lib/tkextlib/bwidget/mainframe.rb b/ext/tk/lib/tkextlib/bwidget/mainframe.rb
deleted file mode 100644
index ad097439c3..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/mainframe.rb
+++ /dev/null
@@ -1,133 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/mainframe.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/progressbar'
-
-module Tk
- module BWidget
- class MainFrame < TkWindow
- end
- end
-end
-
-class Tk::BWidget::MainFrame
- TkCommandNames = ['MainFrame'.freeze].freeze
- WidgetClassName = 'MainFrame'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'progressfg'
- end
- private :__strval_optkeys
-
- def __tkvariable_optkeys
- super() << 'progressvar'
- end
- private :__tkvariable_optkeys
-
- def __val2ruby_optkeys # { key=>proc, ... }
- # The method is used to convert a opt-value to a ruby's object.
- # When get the value of the option "key", "proc.call(value)" is called.
- {
- 'menu'=>proc{|v| simplelist(v).collect!{|elem| simplelist(v)}}
- }
- end
- private :__val2ruby_optkeys
-
- def add_indicator(keys={}, &b)
- win = window(tk_send('addindicator', *hash_kv(keys)))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def add_toolbar(&b)
- win = window(tk_send('addtoolbar'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def get_frame(&b)
- win = window(tk_send('getframe'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def get_indicator(idx, &b)
- win = window(tk_send('getindicator', idx))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def get_menu(menu_id, &b)
- win = window(tk_send('getmenu', menu_id))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def get_toolbar(idx, &b)
- win = window(tk_send('gettoolbar', idx))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def get_menustate(tag)
- tk_send('getmenustate', tag) # return state name string
- end
-
- def set_menustate(tag, state)
- tk_send('setmenustate', tag, state)
- self
- end
-
- def show_statusbar(name)
- tk_send('showstatusbar', name)
- self
- end
-
- def show_toolbar(idx, mode)
- tk_send('showtoolbar', idx, mode)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/messagedlg.rb b/ext/tk/lib/tkextlib/bwidget/messagedlg.rb
deleted file mode 100644
index 69819360a8..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/messagedlg.rb
+++ /dev/null
@@ -1,193 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/messagedlg.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/dialog.rb'
-
-module Tk
- module BWidget
- class MessageDlg < TkWindow
- end
- end
-end
-
-class Tk::BWidget::MessageDlg
- TkCommandNames = ['MessageDlg'.freeze].freeze
- WidgetClassName = 'MessageDlg'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def initialize(parent=nil, keys=nil)
- @relative = ''
- if parent.kind_of?(Hash)
- keys = _symbolkey2str(parent)
- @relative = keys['parent'] if keys.key?('parent')
- @relative = keys.delete('relative') if keys.key?('relative')
- super(keys)
- elsif keys
- keys = _symbolkey2str(keys)
- @relative = keys.delete('parent') if keys.key?('parent')
- @relative = keys.delete('relative') if keys.key?('relative')
- super(parent, keys)
- else
- super(parent)
- end
- end
-
- def create_self(keys)
- # NOT create widget.
- # Because the widget no longer exist when returning from creation.
- @keys = _symbolkey2str(keys).update('parent'=>@relative)
- @info = nil
- end
- private :create_self
-
- def __strval_optkeys
- super() << 'message' << 'title'
- end
- private :__strval_optkeys
-
- def __listval_optkeys
- super() << 'buttons'
- end
- private :__listval_optkeys
-
- def cget(slot)
- slot = slot.to_s
- if slot == 'relative'
- slot = 'parent'
- end
- if winfo_exist?
- val = super(slot)
- @keys[slot] = val
- end
- @keys[slot]
- end
- def cget_strict(slot)
- slot = slot.to_s
- if slot == 'relative'
- slot = 'parent'
- end
- if winfo_exist?
- val = super(slot)
- @keys[slot] = val
- end
- @keys[slot]
- end
-
- def configure(slot, value=None)
- if winfo_exist?
- super(slot, value)
- end
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- slot['parent'] = slot.delete('relative') if slot.key?('relative')
- @keys.update(slot)
-
- if @info
- # update @info
- slot.each{|k, v|
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if (inf = @info.assoc(k))
- inf[-1] = v
- else
- @info << [k, '', '', '', v]
- end
- else
- if (inf = @info[k])
- inf[-1] = v
- else
- @info[k] = ['', '', '', v]
- end
- end
- }
- end
-
- else # ! Hash
- slot = slot.to_s
- slot = 'parent' if slot == 'relative'
- @keys[slot] = value
-
- if @info
- # update @info
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if (inf = @info.assoc(slot))
- inf[-1] = value
- else
- @info << [slot, '', '', '', value]
- end
- else
- if (inf = @info[slot])
- inf[-1] = value
- else
- @info[slot] = ['', '', '', value]
- end
- end
- end
- end
-
- self
- end
-
- def configinfo(slot=nil)
- if winfo_exist?
- @info = super()
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- @info << ['relative', 'parent']
- else
- @info['relative'] = 'parent'
- end
- end
-
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if @info
- if winfo_exist?
- # update @keys
- @info.each{|inf| @keys[inf[0]] = inf[-1] if inf.size > 2 }
- end
- else
- @info = []
- @keys.each{|k, v|
- @info << [k, '', '', '', v]
- }
- @info << ['relative', 'parent']
- end
-
- if slot
- @info.asoc(slot.to_s).dup
- else
- @info.dup
- end
-
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if @info
- if winfo_exist?
- # update @keys
- @info.each{|k, inf| @keys[k] = inf[-1] if inf.size > 2 }
- end
- else
- @info = {}
- @keys.each{|k, v|
- @info[k] = ['', '', '', v]
- }
- @info['relative'] = 'parent'
- end
-
- if slot
- @info[slot.to_s].dup
- else
- @info.dup
- end
- end
- end
-
- def create
- # return the index of the pressed button, or nil if it is destroyed
- ret = num_or_str(tk_call(self.class::TkCommandNames[0],
- @path, *hash_kv(@keys)))
- (ret < 0)? nil: ret
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/notebook.rb b/ext/tk/lib/tkextlib/bwidget/notebook.rb
deleted file mode 100644
index 97e9670d01..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/notebook.rb
+++ /dev/null
@@ -1,167 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/notebook.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class NoteBook < TkWindow
- end
- end
-end
-
-class Tk::BWidget::NoteBook
- include TkItemConfigMethod
-
- TkCommandNames = ['NoteBook'.freeze].freeze
- WidgetClassName = 'NoteBook'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- class Event_for_Tabs < TkEvent::Event
- def self._get_extra_args_tbl
- [
- TkComm.method(:string) # page identifier
- ]
- end
- end
-
- def __boolval_optkeys
- super() << 'homogeneous'
- end
- private :__boolval_optkeys
-
- def tagid(id)
- if id.kind_of?(TkWindow)
- #id.path
- id.epath
- elsif id.kind_of?(TkObject)
- id.to_eval
- else
- # id.to_s
- _get_eval_string(id)
- end
- end
-
- #def tabbind(*args)
- # _bind_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args)
- # self
- #end
- def tabbind(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_for_event_class(Event_for_Tabs, [path, 'bindtabs'],
- context, cmd, *args)
- self
- end
-
- #def tabbind_append(*args)
- # _bind_append_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args)
- # self
- #end
- def tabbind_append(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append_for_event_class(Event_for_Tabs, [path, 'bindtabs'],
- context, cmd, *args)
- self
- end
-
- def tabbind_remove(*args)
- _bind_remove_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args)
- self
- end
-
- def tabbindinfo(*args)
- _bindinfo_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args)
- end
-
- def add(page, &b)
- win = window(tk_send('add', tagid(page)))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def compute_size
- tk_send('compute_size')
- self
- end
-
- def delete(page, destroyframe=None)
- tk_send('delete', tagid(page), destroyframe)
- self
- end
-
- def get_frame(page, &b)
- win = window(tk_send('getframe', tagid(page)))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def index(page)
- num_or_str(tk_send('index', tagid(page)))
- end
-
- def insert(index, page, keys={}, &b)
- win = window(tk_send('insert', index, tagid(page), *hash_kv(keys)))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def move(page, index)
- tk_send('move', tagid(page), index)
- self
- end
-
- def get_page(page)
- tk_send('pages', page)
- end
-
- def pages(first=None, last=None)
- list(tk_send('pages', first, last))
- end
-
- def raise(page=nil)
- if page
- tk_send('raise', page)
- self
- else
- tk_send('raise')
- end
- end
-
- def see(page)
- tk_send('see', page)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/pagesmanager.rb b/ext/tk/lib/tkextlib/bwidget/pagesmanager.rb
deleted file mode 100644
index ce18ee0edb..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/pagesmanager.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/pagesmanager.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class PagesManager < TkWindow
- end
- end
-end
-
-class Tk::BWidget::PagesManager
- TkCommandNames = ['PagesManager'.freeze].freeze
- WidgetClassName = 'PagesManager'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def tagid(id)
- # id.to_s
- _get_eval_string(id)
- end
-
- def add(page, &b)
- win = window(tk_send('add', tagid(page)))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def compute_size
- tk_send('compute_size')
- self
- end
-
- def delete(page)
- tk_send('delete', tagid(page))
- self
- end
-
- def get_frame(page, &b)
- win = window(tk_send('getframe', tagid(page)))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def get_page(page)
- tk_send('pages', page)
- end
-
- def pages(first=None, last=None)
- list(tk_send('pages', first, last))
- end
-
- def raise(page=None)
- tk_send('raise', page)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/panedwindow.rb b/ext/tk/lib/tkextlib/bwidget/panedwindow.rb
deleted file mode 100644
index 560c563479..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/panedwindow.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/panedwindow.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class PanedWindow < TkWindow
- end
- end
-end
-
-class Tk::BWidget::PanedWindow
- TkCommandNames = ['PanedWindow'.freeze].freeze
- WidgetClassName = 'PanedWindow'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'activator'
- end
- private :__strval_optkeys
-
- def add(keys={})
- window(tk_send('add', *hash_kv(keys)))
- end
-
- def get_frame(idx, &b)
- win = window(tk_send_without_enc('getframe', idx))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/panelframe.rb b/ext/tk/lib/tkextlib/bwidget/panelframe.rb
deleted file mode 100644
index 0e32f4e261..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/panelframe.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/panelframe.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class PanelFrame < TkWindow
- end
- end
-end
-
-class Tk::BWidget::PanelFrame
- TkCommandNames = ['PanelFrame'.freeze].freeze
- WidgetClassName = 'PanelFrame'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() + ['panelforeground', 'panelbackground']
- end
- private :__strval_optkeys
-
- def add(win, keys={})
- tk_send('add', win, keys)
- self
- end
-
- def delete(*wins)
- tk_send('delete', *wins)
- self
- end
-
- def get_frame(&b)
- win = window(tk_send_without_enc('getframe'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def items
- simplelist(tk_send('items')).map{|w| window(w)}
- end
-
- def remove(*wins)
- tk_send('remove', *wins)
- self
- end
-
- def remove_with_destroy(*wins)
- tk_send('remove', '-destroy', *wins)
- self
- end
-
- def delete(*wins) # same to 'remove_with_destroy'
- tk_send('delete', *wins)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/passwddlg.rb b/ext/tk/lib/tkextlib/bwidget/passwddlg.rb
deleted file mode 100644
index 9fe6fc6a02..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/passwddlg.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/passwddlg.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/messagedlg'
-
-module Tk
- module BWidget
- class PasswdDlg < Tk::BWidget::MessageDlg
- end
- end
-end
-
-class Tk::BWidget::PasswdDlg
- TkCommandNames = ['PasswdDlg'.freeze].freeze
- WidgetClassName = 'PasswdDlg'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'loginhelptext' << 'loginlabel' << 'logintext' <<
- 'passwdlabel' << 'passwdtext'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'passwdeditable' << 'homogeneous'
- end
- private :__boolval_optkeys
-
- def __tkvariable_optkeys
- super() << 'loginhelpvar' << 'logintextvariable' <<
- 'passwdhelpvar' << 'passwdtextvariable'
- end
- private :__tkvariable_optkeys
-
- def create
- login, passwd = simplelist(tk_call(self.class::TkCommandNames[0],
- @path, *hash_kv(@keys)))
- [login, passwd]
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/progressbar.rb b/ext/tk/lib/tkextlib/bwidget/progressbar.rb
deleted file mode 100644
index f06ddc164e..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/progressbar.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/progressbar.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class ProgressBar < TkWindow
- end
- end
-end
-
-class Tk::BWidget::ProgressBar
- TkCommandNames = ['ProgressBar'.freeze].freeze
- WidgetClassName = 'ProgressBar'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/progressdlg.rb b/ext/tk/lib/tkextlib/bwidget/progressdlg.rb
deleted file mode 100644
index e11a73e88d..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/progressdlg.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/progressdlg.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/variable'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/progressbar'
-require 'tkextlib/bwidget/messagedlg'
-
-module Tk
- module BWidget
- class ProgressDlg < Tk::BWidget::MessageDlg
- end
- end
-end
-
-class Tk::BWidget::ProgressDlg
- TkCommandNames = ['ProgressDlg'.freeze].freeze
- WidgetClassName = 'ProgressDlg'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def create_self(keys)
- # NOT create widget for reusing the object
- super(keys)
- @keys['textvariable'] = TkVariable.new unless @keys.key?('textvariable')
- @keys['variable'] = TkVariable.new unless @keys.key?('variable')
- end
-
- def textvariable
- @keys['textvariable']
- end
-
- def text
- @keys['textvariable'].value
- end
-
- def text= (txt)
- @keys['textvariable'].value = txt
- end
-
- def variable
- @keys['variable']
- end
-
- def value
- @keys['variable'].value
- end
-
- def value= (val)
- @keys['variable'].value = val
- end
-
- def create
- window(tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys)))
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb b/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb
deleted file mode 100644
index 2b184746a4..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/scrollableframe.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class ScrollableFrame < TkWindow
- end
- end
-end
-
-class Tk::BWidget::ScrollableFrame
- include Scrollable
-
- TkCommandNames = ['ScrollableFrame'.freeze].freeze
- WidgetClassName = 'ScrollableFrame'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def get_frame(&b)
- win = window(tk_send_without_enc('getframe'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def see(win, vert=None, horiz=None)
- tk_send_without_enc('see', win, vert, horiz)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb b/ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb
deleted file mode 100644
index 9bd5e87554..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/scrolledwindow.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class ScrolledWindow < TkWindow
- end
- end
-end
-
-class Tk::BWidget::ScrolledWindow
- TkCommandNames = ['ScrolledWindow'.freeze].freeze
- WidgetClassName = 'ScrolledWindow'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'sides'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'managed'
- end
- private :__boolval_optkeys
-
- def get_frame(&b)
- win = window(tk_send_without_enc('getframe'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def set_widget(win)
- tk_send_without_enc('setwidget', win)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/scrollview.rb b/ext/tk/lib/tkextlib/bwidget/scrollview.rb
deleted file mode 100644
index d60fdca89e..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/scrollview.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/scrollview.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class ScrollView < TkWindow
- end
- end
-end
-
-class Tk::BWidget::ScrollView
- TkCommandNames = ['ScrollView'.freeze].freeze
- WidgetClassName = 'ScrollView'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'fill'
- end
- private :__strval_optkeys
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/selectcolor.rb b/ext/tk/lib/tkextlib/bwidget/selectcolor.rb
deleted file mode 100644
index 85809b69bd..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/selectcolor.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/selectcolor.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/messagedlg'
-
-module Tk
- module BWidget
- class SelectColor < Tk::BWidget::MessageDlg
- class Dialog < Tk::BWidget::SelectColor
- end
- class Menubutton < Tk::Menubutton
- end
- MenuButton = Menubutton
- end
- end
-end
-
-class Tk::BWidget::SelectColor
- extend Tk
-
- TkCommandNames = ['SelectColor'.freeze].freeze
- WidgetClassName = 'SelectColor'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def dialog(keys={})
- newkeys = @keys.dup
- newkeys.update(_symbolkey2str(keys))
- tk_call('SelectColor::dialog', @path, *hash_kv(newkeys))
- end
-
- def menu(*args)
- if args[-1].kind_of?(Hash)
- keys = args.pop
- else
- keys = {}
- end
- place = args.flatten
- newkeys = @keys.dup
- newkeys.update(_symbolkey2str(keys))
- tk_call('SelectColor::menu', @path, place, *hash_kv(newkeys))
- end
-
- def self.set_color(idx, color)
- tk_call('SelectColor::setcolor', idx, color)
- end
-end
-
-class Tk::BWidget::SelectColor::Dialog
- def create_self(keys)
- super(keys)
- @keys['type'] = 'dialog'
- end
-
- def create
- @keys['type'] = 'dialog' # 'dialog' type returns color
- tk_call(Tk::BWidget::SelectColor::TkCommandNames[0],
- @path, *hash_kv(@keys))
- end
-end
-
-class Tk::BWidget::SelectColor::Menubutton
- def create_self(keys)
- keys = {} unless keys
- keys = _symbolkey2str(keys)
- keys['type'] = 'menubutton' # 'toolbar' type returns widget path
- window(tk_call(Tk::BWidget::SelectColor::TkCommandNames[0],
- @path, *hash_kv(keys)))
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/selectfont.rb b/ext/tk/lib/tkextlib/bwidget/selectfont.rb
deleted file mode 100644
index 4f67a2e239..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/selectfont.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/selectfont.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/messagedlg'
-
-module Tk
- module BWidget
- class SelectFont < Tk::BWidget::MessageDlg
- class Dialog < Tk::BWidget::SelectFont
- end
- class Toolbar < TkWindow
- end
- end
- end
-end
-
-class Tk::BWidget::SelectFont
- extend Tk
-
- TkCommandNames = ['SelectFont'.freeze].freeze
- WidgetClassName = 'SelectFont'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'sampletext' << 'title'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'nosizes'
- end
- private :__boolval_optkeys
-
- def __font_optkeys
- [] # without fontobj operation
- end
- private :__font_optkeys
-
- def create
- tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys))
- end
-
- def self.load_font
- tk_call('SelectFont::loadfont')
- end
-end
-
-class Tk::BWidget::SelectFont::Dialog
- def __font_optkeys
- [] # without fontobj operation
- end
-
- def create_self(keys)
- super(keys)
- @keys['type'] = 'dialog'
- end
-
- def configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot.delete['type']
- slot.delete[:type]
- return self if slot.empty?
- else
- return self if slot == 'type' || slot == :type
- end
- super(slot, value)
- end
-
- def create
- @keys['type'] = 'dialog' # 'dialog' type returns font name
- tk_call(Tk::BWidget::SelectFont::TkCommandNames[0], @path, *hash_kv(@keys))
- end
-end
-
-class Tk::BWidget::SelectFont::Toolbar
- def __font_optkeys
- [] # without fontobj operation
- end
-
- def create_self(keys)
- keys = {} unless keys
- keys = _symbolkey2str(keys)
- keys['type'] = 'toolbar' # 'toolbar' type returns widget path
- window(tk_call(Tk::BWidget::SelectFont::TkCommandNames[0],
- @path, *hash_kv(keys)))
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/separator.rb b/ext/tk/lib/tkextlib/bwidget/separator.rb
deleted file mode 100644
index 786c41c763..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/separator.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/separator.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class Separator < TkWindow
- end
- end
-end
-
-class Tk::BWidget::Separator
- TkCommandNames = ['Separator'.freeze].freeze
- WidgetClassName = 'Separator'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/setup.rb b/ext/tk/lib/tkextlib/bwidget/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/bwidget/spinbox.rb b/ext/tk/lib/tkextlib/bwidget/spinbox.rb
deleted file mode 100644
index 00fe33da39..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/spinbox.rb
+++ /dev/null
@@ -1,99 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/entry.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-require 'tkextlib/bwidget/arrowbutton'
-require 'tkextlib/bwidget/entry'
-
-module Tk
- module BWidget
- class SpinBox < Tk::Entry
- end
- end
-end
-
-class Tk::BWidget::SpinBox
- include Scrollable
-
- TkCommandNames = ['SpinBox'.freeze].freeze
- WidgetClassName = 'SpinBox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'helptext' << 'insertbackground' << 'entryfg' << 'entrybg'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'dragenabled' << 'dropenabled' << 'editable'
- end
- private :__boolval_optkeys
-
- def __listval_optkeys
- super() << 'values'
- end
- private :__listval_optkeys
-
- def __tkvariable_optkeys
- super() << 'helpvar'
- end
- private :__tkvariable_optkeys
-
- #def entrybind(*args)
- # _bind([path, 'bind'], *args)
- # self
- #end
- def entrybind(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, 'bind'], context, cmd, *args)
- self
- end
-
- #def entrybind_append(*args)
- # _bind_append([path, 'bind'], *args)
- # self
- #end
- def entrybind_append(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, 'bind'], context, cmd, *args)
- self
- end
-
- def entrybind_remove(*args)
- _bind_remove([path, 'bind'], *args)
- self
- end
-
- def entrybindinfo(*args)
- _bindinfo([path, 'bind'], *args)
- self
- end
-
- def get_index_of_value
- number(tk_send_without_enc('getvalue'))
- end
- alias get_value get_index_of_value
- alias get_value_index get_index_of_value
-
- def set_value_by_index(idx)
- idx = "@#{idx}" if idx.kind_of?(Integer)
- tk_send_without_enc('setvalue', idx)
- self
- end
- alias set_value set_value_by_index
- alias set_index_value set_value_by_index
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/statusbar.rb b/ext/tk/lib/tkextlib/bwidget/statusbar.rb
deleted file mode 100644
index 28fd6fab21..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/statusbar.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/statusbar.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class StatusBar < TkWindow
- end
- end
-end
-
-class Tk::BWidget::StatusBar
- TkCommandNames = ['StatusBar'.freeze].freeze
- WidgetClassName = 'StatusBar'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'showresize' << 'showseparator' << 'showresizesep'
- end
- private :__boolval_optkeys
-
- def add(win, keys={})
- tk_send('add', win, keys)
- self
- end
-
- def remove(*wins)
- tk_send('remove', *wins)
- self
- end
-
- def remove_with_destroy(*wins)
- tk_send('remove', '-destroy', *wins)
- self
- end
-
- def delete(*wins) # same to 'remove_with_destroy'
- tk_send('delete', *wins)
- self
- end
-
- def get_frame(&b)
- win = window(tk_send_without_enc('getframe'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def items
- simplelist(tk_send('items')).map{|w| window(w)}
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/titleframe.rb b/ext/tk/lib/tkextlib/bwidget/titleframe.rb
deleted file mode 100644
index eca622399e..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/titleframe.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/titleframe.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/frame'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class TitleFrame < TkWindow
- end
- end
-end
-
-class Tk::BWidget::TitleFrame
- TkCommandNames = ['TitleFrame'.freeze].freeze
- WidgetClassName = 'TitleFrame'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def get_frame(&b)
- win = window(tk_send_without_enc('getframe'))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/tree.rb b/ext/tk/lib/tkextlib/bwidget/tree.rb
deleted file mode 100644
index 468b5e31c4..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/tree.rb
+++ /dev/null
@@ -1,501 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/tree.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/canvas'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- class Tree < TkWindow
- class Node < TkObject
- end
- end
- end
-end
-
-class Tk::BWidget::Tree
- include TkItemConfigMethod
- include Scrollable
-
- TkCommandNames = ['Tree'.freeze].freeze
- WidgetClassName = 'Tree'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- class Event_for_Items < TkEvent::Event
- def self._get_extra_args_tbl
- [
- TkComm.method(:string) # item identifier
- ]
- end
- end
-
- def __strval_optkeys
- super() << 'crossfill' << 'linesfill'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'dragenabled' << 'dropenabled' <<
- 'redraw' << 'selectfill' << 'showlines'
- end
- private :__boolval_optkeys
-
- def __tkvariable_optkeys
- super() << 'helpvar'
- end
- private :__tkvariable_optkeys
-
- def tagid(tag)
- if tag.kind_of?(Tk::BWidget::Tree::Node)
- tag.id
- else
- # tag
- _get_eval_string(tag)
- end
- end
-
- def areabind(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_for_event_class(Event_for_Items, [path, 'bindArea'],
- context, cmd, *args)
- self
- end
-
- def areabind_append(context, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append_for_event_class(Event_for_Items, [path, 'bindArea'],
- context, cmd, *args)
- self
- end
-
- def areabind_remove(*args)
- _bind_remove_for_event_class(Event_for_Items, [path, 'bindArea'], *args)
- self
- end
-
- def areabindinfo(*args)
- _bindinfo_for_event_class(Event_for_Items, [path, 'bindArea'], *args)
- end
-
- #def imagebind(*args)
- # _bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
- # self
- #end
- def imagebind(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_for_event_class(Event_for_Items, [path, 'bindImage'],
- context, cmd, *args)
- self
- end
-
- #def imagebind_append(*args)
- # _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
- # self
- #end
- def imagebind_append(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'],
- context, cmd, *args)
- self
- end
-
- def imagebind_remove(*args)
- _bind_remove_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
- self
- end
-
- def imagebindinfo(*args)
- _bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
- end
-
- #def textbind(*args)
- # _bind_for_event_class(Event_for_Items, [path, 'bindText'], *args)
- # self
- #end
- def textbind(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_for_event_class(Event_for_Items, [path, 'bindText'],
- context, cmd, *args)
- self
- end
-
- #def textbind_append(*args)
- # _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args)
- # self
- #end
- def textbind_append(context, *args)
- #if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append_for_event_class(Event_for_Items, [path, 'bindText'],
- context, cmd, *args)
- self
- end
-
- def textbind_remove(*args)
- _bind_remove_for_event_class(Event_for_Items, [path, 'bindText'], *args)
- self
- end
-
- def textbindinfo(*args)
- _bindinfo_for_event_class(Event_for_Items, [path, 'bindText'], *args)
- end
-
- def close_tree(node, recurse=None)
- tk_send('closetree', tagid(node), recurse)
- self
- end
-
- def delete(*args)
- tk_send('delete', *(args.collect{|node| tagid(node)}))
- self
- end
-
- def edit(node, text, *args)
- tk_send('edit', tagid(node), text, *args)
- self
- end
-
- def exist?(node)
- bool(tk_send('exists', tagid(node)))
- end
-
- def find(findinfo, confine=None)
- Tk::BWidget::Tree::Node.id2obj(self, tk_send(findinfo, confine))
- end
- def find_position(x, y, confine=None)
- self.find(_at(x,y), confine)
- end
- def find_line(linenum)
- self.find(linenum)
- end
-
- def index(node)
- num_or_str(tk_send('index', tagid(node)))
- end
-
- def insert(idx, parent, node, keys={})
- tk_send('insert', idx, tagid(parent), tagid(node), *hash_kv(keys))
- self
- end
-
- def line(node)
- number(tk_send('line', tagid(node)))
- end
-
- def move(parent, node, idx)
- tk_send('move', tagid(parent), tagid(node), idx)
- self
- end
-
- def get_node(node, idx)
- Tk::BWidget::Tree::Node.id2obj(self, tk_send('nodes', tagid(node), idx))
- end
-
- def nodes(node, first=None, last=None)
- simplelist(tk_send('nodes', tagid(node), first, last)).collect{|node|
- Tk::BWidget::Tree::Node.id2obj(self, node)
- }
- end
-
- def open?(node)
- bool(self.itemcget(tagid(node), 'open'))
- end
-
- def open_tree(node, recurse=None)
- tk_send('opentree', tagid(node), recurse)
- self
- end
-
- def parent(node)
- Tk::BWidget::Tree::Node.id2obj(self, tk_send('parent', tagid(node)))
- end
-
- def reorder(node, neworder)
- tk_send('reorder', tagid(node), neworder)
- self
- end
-
- def see(node)
- tk_send('see', tagid(node))
- self
- end
-
- def selection_add(*args)
- tk_send_without_enc('selection', 'add',
- *(args.collect{|node| tagid(node)}))
- self
- end
-
- def selection_clear
- tk_send_without_enc('selection', 'clear')
- self
- end
-
- def selection_get
- list(tk_send_without_enc('selection', 'get'))
- end
-
- def selection_include?(*args)
- bool(tk_send_without_enc('selection', 'get',
- *(args.collect{|node| tagid(node)})))
- end
-
- def selection_range(*args)
- tk_send_without_enc('selection', 'range',
- *(args.collect{|node| tagid(node)}))
- self
- end
-
- def selection_remove(*args)
- tk_send_without_enc('selection', 'remove',
- *(args.collect{|node| tagid(node)}))
- self
- end
-
- def selection_set(*args)
- tk_send_without_enc('selection', 'set',
- *(args.collect{|node| tagid(node)}))
- self
- end
-
- def selection_toggle(*args)
- tk_send_without_enc('selection', 'toggle',
- *(args.collect{|node| tagid(node)}))
- self
- end
-
- def toggle(node)
- tk_send_without_enc('toggle', tagid(node))
- self
- end
-
- def visible(node)
- bool(tk_send_without_enc('visible', tagid(node)))
- end
-end
-
-class Tk::BWidget::Tree::Node
- include TkTreatTagFont
-
- TreeNode_TBL = TkCore::INTERP.create_table
-
- (TreeNode_ID = ['bw:node'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- TreeNode_TBL.mutex.synchronize{ TreeNode_TBL.clear }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- TreeNode_TBL.mutex.synchronize{
- if TreeNode_TBL[tpath]
- TreeNode_TBL[tpath][id]? TreeNode_TBL[tpath][id]: id
- else
- id
- end
- }
- end
-
- def initialize(tree, *args)
- if tree.kind_of?(Tk::BWidget::Tree)
- @tree = tree
- parent = args.shift
- if parent.kind_of?(Tk::BWidget::Tree::Node)
- if parent.tree.path != @tree.path
- fail RuntimeError, 'tree of parent node is not match'
- end
- end
- elsif tree.kind_of?(Tk::BWidget::Tree::Node)
- @tree = tree.tree
- parent = tree.parent
- else
- fail RuntimeError,
- "expect Tk::BWidget::Tree or Tk::BWidget::Tree::Node for 1st argument"
- end
-
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- else
- keys = {}
- end
-
- index = keys.delete('index')
- unless args.empty?
- index = args.shift
- end
- index = 'end' unless index
-
- unless args.empty?
- fail RuntimeError, 'too much arguments'
- end
-
- @tpath = @tree.path
-
- if keys.key?('nodename')
- @path = @id = keys.delete('nodename')
- else
- TreeNode_ID.mutex.synchronize{
- @path = @id = TreeNode_ID.join(TkCore::INTERP._ip_id_)
- TreeNode_ID[1].succ!
- }
- end
-
- TreeNode_TBL.mutex.synchronize{
- TreeNode_TBL[@id] = self
- TreeNode_TBL[@tpath] = {} unless TreeNode_TBL[@tpath]
- TreeNode_TBL[@tpath][@id] = self
- }
-
- @tree.insert(index, parent, @id, keys)
- end
-
- def tree
- @tree
- end
-
- def id
- @id
- end
-
- def [](key)
- cget(key)
- end
-
- def []=(key, val)
- configure(key, val)
- val
- end
-
- def cget_tkstring(key)
- @tree.itemcget_tkstring(@id, key)
- end
- def cget(key)
- @tree.itemcget(@id, key)
- end
- def cget_strict(key)
- @tree.itemcget_strict(@id, key)
- end
-
- def configure(key, val=None)
- @tree.itemconfigure(@id, key, val)
- end
-
- def configinfo(key=nil)
- @tree.itemconfiginfo(@id, key)
- end
-
- def current_configinfo(key=nil)
- @tree.current_itemconfiginfo(@id, key)
- end
-
- def close_tree(recurse=None)
- @tree.close_tree(@id, recurse)
- self
- end
-
- def delete
- @tree.delete(@id)
- self
- end
-
- def edit(*args)
- @tree.edit(@id, *args)
- self
- end
-
- def exist?
- @tree.exist?(@id)
- end
-
- def index
- @tree.index(@id)
- end
-
- def move(index, parent=nil)
- if parent
- @tree.move(parent, @id, index)
- else
- @tree.move(self.parent, @id, index)
- end
- end
-
- def open_tree(recurse=None)
- @tree.open_tree(@id, recurse)
- self
- end
-
- def open?
- bool(@tree.itemcget(@id, 'open'))
- end
-
- def parent
- @tree.parent(@id)
- end
-
- def reorder(neworder)
- @tree.reorder(@id, neworder)
- end
-
- def see
- @tree.see(@id)
- end
-
- def selection_add
- @tree.selection_add(@id)
- end
-
- def selection_remove
- @tree.selection_remove(@id)
- end
-
- def selection_set
- @tree.selection_set(@id)
- end
-
- def selection_toggle
- @tree.selection_toggle(@id)
- end
-
- def toggle
- @tree.toggle(@id)
- end
-
- def visible
- @tree.visible(@id)
- end
-end
diff --git a/ext/tk/lib/tkextlib/bwidget/widget.rb b/ext/tk/lib/tkextlib/bwidget/widget.rb
deleted file mode 100644
index ab08826b19..0000000000
--- a/ext/tk/lib/tkextlib/bwidget/widget.rb
+++ /dev/null
@@ -1,130 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/bwidget/widget.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/bwidget.rb'
-
-module Tk
- module BWidget
- module Widget
- end
- end
-end
-
-module Tk::BWidget::Widget
- include Tk
- extend Tk
-
- def self.__pathname
- 'Widget::configure'
- end
-
- def self.__cget_cmd
- ['Widget::cget']
- end
-
- def self.__config_cmd
- ['Widget::configure']
- end
-
- def self.cget_strict(slot)
- slot = slot.to_s
- info = {}
- self.current_configinfo.each{|k,v| info[k.to_s] = v if k.to_s == slot}
- fail RuntimeError, "unknown option \"-#{slot}\"" if info.empty?
- info.values[0]
- end
- def self.cget(slot)
- self.current_configinfo(slot).values[0]
- end
-
- def self.add_map(klass, subclass, subpath, opts)
- tk_call('Widget::addmap', klass, subclass, subpath, opts)
- end
-
- def self.bwinclude(klass, subclass, subpath, *args)
- tk_call('Widget::bwinclude', klass, subclass, subpath, *args)
- end
-
- def self.create(klass, path, rename=None, &b)
- win = window(tk_call('Widget::create', klass, path, rename))
- if b
- if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- win.instance_exec(self, &b)
- else
- win.instance_eval(&b)
- end
- end
- win
- end
-
- def self.declare(klass, optlist)
- tk_call('Widget::declare', klass, optlist)
- end
-
- def self.define(klass, filename, *args)
- tk_call('Widget::define', klass, filename, *args)
- end
-
- def self.destroy(win)
- tk_call('Widget::destroy', _epath(win))
- end
-
- def self.focus_next(win)
- tk_call('Widget::focusNext', win)
- end
-
- def self.focus_ok(win)
- tk_call('Widget::focusOk', win)
- end
-
- def self.focus_prev(win)
- tk_call('Widget::focusPrev', win)
- end
-
- def self.generate_doc(dir, widgetlist)
- tk_call('Widget::generate-doc', dir, widgetlist)
- end
-
- def self.generate_widget_doc(klass, iscmd, file)
- tk_call('Widget::generate-widget-doc', klass, iscmd, file)
- end
-
- def self.get_option(win, option)
- tk_call('Widget::getoption', win, option)
- end
-
- def self.get_variable(win, varname, my_varname=None)
- tk_call('Widget::getVariable', win, varname, my_varname)
- end
-
- def self.has_changed(win, option, pvalue)
- tk_call('Widget::hasChanged', win, option, pvalue)
- end
-
- def self.init(klass, win, options)
- tk_call('Widget::init', klass, win, options)
- end
-
- def self.set_option(win, option, value)
- tk_call('Widget::setoption', win, option, value)
- end
-
- def self.sub_cget_strict(win, subwidget)
- tk_call('Widget::subcget', win, subwidget)
- end
- def self.sub_cget(win, subwidget)
- self.sub_cget_strict(win, subwidget)
- end
-
- def self.sync_options(klass, subclass, subpath, options)
- tk_call('Widget::syncoptions', klass, subclass, subpath, options)
- end
-
- def self.tkinclude(klass, tkwidget, subpath, *args)
- tk_call('Widget::tkinclude', klass, tkwidget, subpath, *args)
- end
-end
diff --git a/ext/tk/lib/tkextlib/itcl.rb b/ext/tk/lib/tkextlib/itcl.rb
deleted file mode 100644
index 3a67b3f651..0000000000
--- a/ext/tk/lib/tkextlib/itcl.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-#
-# [incr Tcl] support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/itcl/setup.rb'
-
-# load library
-require 'tkextlib/itcl/incr_tcl.rb'
diff --git a/ext/tk/lib/tkextlib/itcl/incr_tcl.rb b/ext/tk/lib/tkextlib/itcl/incr_tcl.rb
deleted file mode 100644
index de1be12392..0000000000
--- a/ext/tk/lib/tkextlib/itcl/incr_tcl.rb
+++ /dev/null
@@ -1,179 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/itk/incr_tcl.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script
-require 'tkextlib/itcl.rb'
-
-# TkPackage.require('Itcl', '3.2')
-TkPackage.require('Itcl')
-
-module Tk
- module Itcl
- include Tk
- extend Tk
-
- LIBRARY = TkVarAccess.new('::itcl::library')
- PURIST = TkVarAccess.new('::itcl::purist')
-
- VERSION = TkCore::INTERP._invoke("set", "::itcl::version").freeze
- PATCHLEVEL = TkCore::INTERP._invoke("set", "::itcl::patchLevel").freeze
-
- PACKAGE_NAME = 'Itcl'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('Itcl')
- rescue
- ''
- end
- end
-
- ##############################################
-
- class ItclObject < TkObject
- ITCL_CLASSNAME = ''.freeze
-
- (ITCL_OBJ_ID = ['itclobj'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
- ITCL_OBJ_TBL = TkUtil.untrust({})
-
- def initialize(*args)
- if (@klass = self.class::ITCL_CLASSNAME).empty?
- fail RuntimeError, 'unknown itcl class (abstract class?)'
- end
- Tk::Itcl::ItclObject::ITCL_OBJ_ID.mutex.synchronize{
- @id = Tk::Itcl::ItclObject::TCL_OBJ_ID.join(TkCore::INTERP._ip_id_)
- Tk::Itcl::ItclObject::ITCL_OBJ_ID[1].succ!
- }
- @path = @id
- end
-
- def self.call_proc(name, *args)
- tk_call("#{ITCL_CLASSNAME}::#{cmd}", *args)
- end
-
- def call_method(name, *args)
- tk_call(@path, name, *args)
- end
-
- def isa(klass)
- bool(tk_call(@path, 'isa', klass))
- end
- alias itcl_kind_of? isa
-
- def info_class
- tk_call(@path, 'info', 'class')
- end
-
- def info_inherit
- simplelist(tk_call(@path, 'info', 'inherit'))
- end
-
- def info_heritage
- list(tk_call(@path, 'info', 'heritage'))
- end
-
- def info_function(*args)
- if args[-1].kind_of?(Array)
- params = args.pop
- params.each{|param|
- param = param.to_s
- args << ( (param[0] == ?-)? param: "-#{param}" )
- }
- end
- list(tk_call(@path, 'info', 'function', *args))
- end
-
- def info_variable(*args)
- if args[-1].kind_of?(Array)
- params = args.pop
- params.each{|param|
- param = param.to_s
- args << ( (param[0] == ?-)? param: "-#{param}" )
- }
- end
- list(tk_call(@path, 'info', 'variable', *args))
- end
- end
-
- ##############################################
-
- def self.body(klass, func, args, body)
- tk_call('::itcl::body', "#{klass}::#{func}", args, body)
- end
-
- def self.code(cmd, *args)
- tk_call('::itcl::code', cmd, *args)
- end
-
- def self.code_in_namespace(namespace, cmd, *args)
- tk_call('::itcl::code', '-namespace', namespace, cmd, *args)
- end
-
- def self.configbody(klass, var, body)
- tk_call('::itcl::configbody', "#{klass}::#{var}", body)
- end
-
- def self.create_itcl_class(name, body)
- TkCore::INTERP._invoke('::itcl::class', name, body)
- klass = Class.new(Tk::Itcl::ItclObject)
- klass.const_set('ITCL_CLASSNAME', name.dup.freeze)
- klass
- end
-
- def self.delete_itcl_class(*names)
- tk_call('::itcl::delete', 'class', *names)
- end
-
- def self.delete_itcl_object(*names)
- tk_call('::itcl::delete', 'object', *names)
- end
-
- def self.delete_namespace(*names)
- tk_call('::itcl::delete', 'namespace', *names)
- end
-
- def self.ensemble(name, *args)
- tk_call('::itcl::ensemble', name, *args)
- end
-
- def self.find_classes(pat=None)
- simplelist(tk_call('::itcl::find', 'classes', pat))
- end
-
- def self.find_objects(*args)
- simplelist(tk_call('::itcl::find', 'objects', *args))
- end
-
- def self.is_itcl_class(target)
- bool(tk_call('::itcl::is', 'class', target))
- end
-
- def self.is_itcl_object(target)
- bool(tk_call('::itcl::is', 'object', target))
- end
-
- def self.create_local_obj(klass, name, *args)
- tk_call('::itcl::local', klass, name, *args)
- end
-
- def self.is_itcl_instance(klass, target)
- bool(tk_call('::itcl::is', 'object', '-class', klass, target))
- end
-
- def self.scope(var)
- tk_call('::itcl::scope', var)
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/itcl/setup.rb b/ext/tk/lib/tkextlib/itcl/setup.rb
deleted file mode 100644
index 917b877947..0000000000
--- a/ext/tk/lib/tkextlib/itcl/setup.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
-
-
-# set [incr Tcl] library directory
-
-# ENV['ITCL_LIBRARY'] = '/usr/local/ActiveTcl/lib/itcl3.2/'
diff --git a/ext/tk/lib/tkextlib/itk.rb b/ext/tk/lib/tkextlib/itk.rb
deleted file mode 100644
index 112cb789f2..0000000000
--- a/ext/tk/lib/tkextlib/itk.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-#
-# [incr Tk] support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/itk/setup.rb'
-
-# load library
-require 'tkextlib/itk/incr_tk.rb'
diff --git a/ext/tk/lib/tkextlib/itk/incr_tk.rb b/ext/tk/lib/tkextlib/itk/incr_tk.rb
deleted file mode 100644
index 8c6fe1374f..0000000000
--- a/ext/tk/lib/tkextlib/itk/incr_tk.rb
+++ /dev/null
@@ -1,447 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/itk/incr_tk.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/menuspec'
-require 'tkextlib/itcl.rb'
-
-# call setup script
-require 'tkextlib/itk.rb'
-
-#TkPackage.require('Itk', '3.2')
-TkPackage.require('Itk')
-
-module Tk
- module Itk
- include Tk
- extend Tk
-
- LIBRARY = TkVarAccess.new('::itk::library')
-
- PACKAGE_NAME = 'Itk'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('Itk')
- rescue
- ''
- end
- end
-
- def self.usual(arg, *args)
- tk_call('::itk::usual', arg, *args)
- end
-
- def self.usual_names
- list(tk_call('::itk::usual'))
- end
-
- ############################
-
- class Archetype < TkWindow
- TkCommandNames = [].freeze
- # WidgetClassName = 'Archetype'.freeze
- # WidgetClassNames[WidgetClassName] = self
-
- def self.to_eval
- '::itk::' << self::WidgetClassName
- end
-
- def __destroy_hook__
- Tk::Itk::Component::ComponentID_TBL.delete(self.path)
- end
-
- #### [incr Tk] public methods
- def component
- simplelist(tk_send('component'))
- end
-
- def component_path(name)
- window(tk_send('component', name))
- end
- alias component_widget component_path
-
- def component_invoke(name, cmd, *args)
- window(tk_send('component', name, cmd, *args))
- end
-
- def component_obj(*names)
- names = component if names.empty?
- names.collect{|name| Tk::Itk::Component.new(self.path, name) }
- end
-
- #### [incr Tk] protected methods
-=begin
- def itk_component_add(visibility, name, create_cmds, option_cmds=None)
- args = []
- visibility.each{|v| v = v.to_s; args << ( (v[0] == ?-)? v: "-#{v}" )}
- args << '--' << name << create_cmd << option_cmds
- tk_call('itk_component', 'add', *args)
- end
-
- def itk_component_delete(*names)
- tk_call('itk_component', 'delete', *names)
- end
-
- def itk_initialize(keys={})
- tk_call('itk_initialize', keys)
- end
-
- def itk_option_add(*args)
- tk_call('itk_option', 'add', *args)
- end
-
- def itk_option_define(name, resource, klass, init, config=None)
- tk_call('itk_option', 'define', name, resource, klass, init, config)
- end
-
- def itk_option_remove(*args)
- tk_call('itk_option', 'remove', *args)
- end
-=end
- end
-
- ############################
-
- class Toplevel < Archetype
- TkCommandNames = ['::itk::Toplevel'].freeze
- WidgetClassName = 'Toplevel'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- include Wm
- include TkMenuSpec
-
- def __strval_optkeys
- super() << 'title'
- end
- private :__strval_optkeys
- end
-
- ############################
-
- class Widget < Archetype
- TkCommandNames = ['::itk::Widget'].freeze
- WidgetClassName = 'Widget'.freeze
- WidgetClassNames[WidgetClassName] ||= self
- end
-
-
- ############################
-
- class Component < TkObject
- def __cget_cmd
- [self.master, 'component', self.name, 'cget']
- end
- private :__cget_cmd
-
- def __config_cmd
- [self.master, 'component', self.name, 'configure']
- end
- private :__config_cmd
-
- ComponentID_TBL = TkCore::INTERP.create_table
-
- (Itk_Component_ID = ['itk:component'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- ComponentID_TBL.mutex.synchronize{ ComponentID_TBL.clear }
- }
-
- def self.id2obj(master, id)
- if master.kind_of?(TkObject)
- master = master.path
- else
- master = master.to_s
- end
- ComponentID_TBL.mutex.synchronize{
- if ComponentID_TBL.key?(master)
- (ComponentID_TBL[master].key?(id))? ComponentID_TBL[master][id]: id
- else
- id
- end
- }
- end
-
- def self.new(master, component=nil)
- if master.kind_of?(TkObject)
- master = master.path
- else
- master = master.to_s
- end
-
- if component.kind_of?(Tk::Itk::Component)
- component = component.name
- elsif component
- component = component.to_s
- else
- Itk_Component_ID.mutex.synchronize{
- component = Itk_Component_ID.join(TkCore::INTERP._ip_id_)
- Itk_Component_ID[1].succ!
- }
- end
-
- ComponentID_TBL.mutex.synchronize{
- if ComponentID_TBL.key?(master)
- if ComponentID_TBL[master].key?(component)
- return ComponentID_TBL[master][component]
- end
- else
- ComponentID_TBL[master] = {}
- end
- }
-
- super(master, component)
- end
-
- def initialize(master, component)
- @master = master
- @component = component
-
- ComponentID_TBL.mutex.synchronize{
- ComponentID_TBL[@master][@component] = self
- }
-
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- @widget = nil
- @path = nil
- end
- end
-
- def path
- unless @path
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- fail RuntimeError, 'component is not assigned to a widget'
- end
- end
- @path
- end
-
- def epath
- path()
- end
-
- def to_eval
- path()
- end
-
- def master
- @master
- end
-
- def name
- @component
- end
-
- def widget
- unless @widget
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- fail RuntimeError, 'component is not assigned to a widget'
- end
- end
- @widget
- end
-
- def widget_class
- unless @widget
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- @widget.classname
- rescue
- nil
- end
- end
- end
-
- def method_missing(id, *args)
- name = id.id2name
-
- # try 1 : component command
- begin
- return tk_call(@master, 'component', @component, name, *args)
- rescue
- end
-
- # try 2 : component configure
- len = args.length
- begin
- case len
- when 1
- if name[-1] == ?=
- return configure(name[0..-2], args[0])
- else
- return configure(name, args[0])
- end
- when 0
- return cget(name)
- end
- rescue
- end
-
- # try 3 : widget method or widget configure
- begin
- unless @widget
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- end
- @widget.__send__(id, *args)
- rescue
- end
-
- # unknown method
- super(id, *args)
- # fail RuntimeError, "unknown method '#{name}' for #{self.inspect}"
- end
-
- def tk_send(cmd, *rest)
- begin
- tk_call(@master, 'component', @component, cmd, *rest)
- rescue
- unless @path
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- fail RuntimeError, 'component is not assigned to a widget'
- end
- end
- tk_call(@path, cmd, *rest)
- end
- end
-
- def tk_send_without_enc(cmd, *rest)
- begin
- tk_call_without_enc(@master, 'component', @component, cmd, *rest)
- rescue
- unless @path
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- fail RuntimeError, 'component is not assigned to a widget'
- end
- end
- tk_call_without_enc(@path, cmd, *rest)
- end
- end
-
- def tk_send_with_enc(cmd, *rest)
- begin
- tk_call_with_enc(@master, 'component', @component, cmd, *rest)
- rescue
- unless @path
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- fail RuntimeError, 'component is not assigned to a widget'
- end
- end
- tk_call_with_enc(@path, cmd, *rest)
- end
- end
-
- #def bind(*args)
- # unless @widget
- # begin
- # @widget = window(tk_call(@master, 'component', @component))
- # @path = @widget.path
- # rescue
- # fail RuntimeError, 'component is not assigned to a widget'
- # end
- # end
- # @widget.bind(*args)
- #end
- def bind(context, *args)
- unless @widget
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- fail RuntimeError, 'component is not assigned to a widget'
- end
- end
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- @widget.bind(context, cmd, *args)
- end
-
- #def bind_append(*args)
- # unless @widget
- # begin
- # @widget = window(tk_call(@master, 'component', @component))
- # @path = @widget.path
- # rescue
- # fail RuntimeError, 'component is not assigned to a widget'
- # end
- # end
- # @widget.bind_append(*args)
- #end
- def bind_append(context, *args)
- unless @widget
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- fail RuntimeError, 'component is not assigned to a widget'
- end
- end
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- @widget.bind_append(context, cmd, *args)
- end
-
- def bind_remove(*args)
- unless @widget
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- fail RuntimeError, 'component is not assigned to a widget'
- end
- end
- @widget.bind_remove(*args)
- end
-
- def bindinfo(*args)
- unless @widget
- begin
- @widget = window(tk_call(@master, 'component', @component))
- @path = @widget.path
- rescue
- fail RuntimeError, 'component is not assigned to a widget'
- end
- end
- @widget.bindinfo(*args)
- end
-
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/itk/setup.rb b/ext/tk/lib/tkextlib/itk/setup.rb
deleted file mode 100644
index f32d5d6a75..0000000000
--- a/ext/tk/lib/tkextlib/itk/setup.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
-
-
-# set [incr Tk] library directory
-
-# ENV['ITK_LIBRARY'] = '/usr/local/ActiveTcl/lib/itk3.2/'
diff --git a/ext/tk/lib/tkextlib/iwidgets.rb b/ext/tk/lib/tkextlib/iwidgets.rb
deleted file mode 100644
index 2ebd9d993e..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets.rb
+++ /dev/null
@@ -1,95 +0,0 @@
-# frozen_string_literal: false
-#
-# [incr Widgets] support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/itcl'
-require 'tkextlib/itk'
-
-# call setup script for general 'tkextlib' libraries
-#require 'tkextlib/setup.rb'
-
-# call setup script
-#require 'tkextlib/iwidgets/setup.rb'
-
-# load all image format handlers
-#TkPackage.require('Iwidgets', '4.0')
-TkPackage.require('Iwidgets')
-
-module Tk
- module Iwidgets
- TkComm::TkExtlibAutoloadModule.unshift(self)
-
- extend TkCore
-
- PACKAGE_NAME = 'Iwidgets'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('Iwidgets')
- rescue
- ''
- end
- end
-
- ####################################################
-
- autoload :Buttonbox, 'tkextlib/iwidgets/buttonbox'
- autoload :Calendar, 'tkextlib/iwidgets/calendar'
- autoload :Canvasprintbox, 'tkextlib/iwidgets/canvasprintbox'
- autoload :Canvasprintdialog, 'tkextlib/iwidgets/canvasprintdialog'
- autoload :Checkbox, 'tkextlib/iwidgets/checkbox'
- autoload :Combobox, 'tkextlib/iwidgets/combobox'
- autoload :Dateentry, 'tkextlib/iwidgets/dateentry'
- autoload :Datefield, 'tkextlib/iwidgets/datefield'
- autoload :Dialog, 'tkextlib/iwidgets/dialog'
- autoload :Dialogshell, 'tkextlib/iwidgets/dialogshell'
- autoload :Disjointlistbox, 'tkextlib/iwidgets/disjointlistbox'
- autoload :Entryfield, 'tkextlib/iwidgets/entryfield'
- autoload :Extbutton, 'tkextlib/iwidgets/extbutton'
- autoload :Extfileselectionbox, 'tkextlib/iwidgets/extfileselectionbox'
- autoload :Extfileselectiondialog,'tkextlib/iwidgets/extfileselectiondialog'
- autoload :Feedback, 'tkextlib/iwidgets/feedback'
- autoload :Fileselectionbox, 'tkextlib/iwidgets/fileselectionbox'
- autoload :Fileselectiondialog, 'tkextlib/iwidgets/fileselectiondialog'
- autoload :Finddialog, 'tkextlib/iwidgets/finddialog'
- autoload :Hierarchy, 'tkextlib/iwidgets/hierarchy'
- autoload :Hyperhelp, 'tkextlib/iwidgets/hyperhelp'
- autoload :Labeledframe, 'tkextlib/iwidgets/labeledframe'
- autoload :Labeledwidget, 'tkextlib/iwidgets/labeledwidget'
- autoload :Mainwindow, 'tkextlib/iwidgets/mainwindow'
- autoload :Menubar, 'tkextlib/iwidgets/menubar'
- autoload :Messagebox, 'tkextlib/iwidgets/messagebox'
- autoload :Messagedialog, 'tkextlib/iwidgets/messagedialog'
- autoload :Notebook, 'tkextlib/iwidgets/notebook'
- autoload :Optionmenu, 'tkextlib/iwidgets/optionmenu'
- autoload :Panedwindow, 'tkextlib/iwidgets/panedwindow'
- autoload :Pushbutton, 'tkextlib/iwidgets/pushbutton'
- autoload :Promptdialog, 'tkextlib/iwidgets/promptdialog'
- autoload :Radiobox, 'tkextlib/iwidgets/radiobox'
- autoload :Scrolledcanvas, 'tkextlib/iwidgets/scrolledcanvas'
- autoload :Scrolledframe, 'tkextlib/iwidgets/scrolledframe'
- autoload :Scrolledhtml, 'tkextlib/iwidgets/scrolledhtml'
- autoload :Scrolledlistbox, 'tkextlib/iwidgets/scrolledlistbox'
- autoload :Scrolledtext, 'tkextlib/iwidgets/scrolledtext'
- autoload :Scrolledwidget, 'tkextlib/iwidgets/scrolledwidget'
- autoload :Selectionbox, 'tkextlib/iwidgets/selectionbox'
- autoload :Selectiondialog, 'tkextlib/iwidgets/selectiondialog'
- autoload :Shell, 'tkextlib/iwidgets/shell'
- autoload :Spindate, 'tkextlib/iwidgets/spindate'
- autoload :Spinint, 'tkextlib/iwidgets/spinint'
- autoload :Spinner, 'tkextlib/iwidgets/spinner'
- autoload :Spintime, 'tkextlib/iwidgets/spintime'
- autoload :Tabnotebook, 'tkextlib/iwidgets/tabnotebook'
- autoload :Tabset, 'tkextlib/iwidgets/tabset'
- autoload :Timeentry, 'tkextlib/iwidgets/timeentry'
- autoload :Timefield, 'tkextlib/iwidgets/timefield'
- autoload :Toolbar, 'tkextlib/iwidgets/toolbar'
- autoload :Watch, 'tkextlib/iwidgets/watch'
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb b/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb
deleted file mode 100644
index 0357114c83..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/buttonbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Buttonbox < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Buttonbox
- TkCommandNames = ['::iwidgets::buttonbox'.freeze].freeze
- WidgetClassName = 'Buttonbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'buttoncget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'buttonconfigure', id]
- end
- private :__item_config_cmd
-
- def __item_boolval_optkeys(id)
- super(id) << 'defaultring'
- end
- private :__item_boolval_optkeys
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- alias buttoncget_tkstring itemcget_tkstring
- alias buttoncget itemcget
- alias buttoncget_strict itemcget_strict
- alias buttonconfigure itemconfigure
- alias buttonconfiginfo itemconfiginfo
- alias current_buttonconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def add(tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- tk_call(@path, 'add', tagid(tag), *hash_kv(keys))
- tag
- end
-
- def default(idx)
- tk_call(@path, 'default', index(idx))
- self
- end
-
- def delete(idx)
- tk_call(@path, 'delete', index(idx))
- self
- end
-
- def hide(idx)
- tk_call(@path, 'hide', index(idx))
- self
- end
-
- def index(idx)
- number(tk_call(@path, 'index', tagid(idx)))
- end
-
- def insert(idx, tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys))
- tag
- end
-
- def invoke(idx=nil)
- if idx
- tk_call(@path, 'invoke', index(idx))
- else
- tk_call(@path, 'invoke')
- end
- self
- end
-
- def show(idx)
- tk_call(@path, 'show', index(idx))
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/calendar.rb b/ext/tk/lib/tkextlib/iwidgets/calendar.rb
deleted file mode 100644
index 4cfb9203c8..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/calendar.rb
+++ /dev/null
@@ -1,126 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/calendar.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Calendar < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Calendar
- TkCommandNames = ['::iwidgets::calendar'.freeze].freeze
- WidgetClassName = 'Calendar'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() + [
- 'buttonforeground', 'outline', 'selectcolor',
- 'weekdaybackground', 'weekendbackground'
- ]
- end
- private :__strval_optkeys
-
- def __listval_optkeys
- super() << 'days'
- end
- private :__listval_optkeys
-
- def __font_optkeys
- super() + ['currentdatefont', 'datefont', 'dayfont', 'titlefont']
- end
- private :__font_optkeys
-
- ####################################
-
- include Tk::ValidateConfigure
-
- class CalendarCommand < TkValidateCommand
- #class CalCmdArgs < TkUtil::CallbackSubst
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [ [?d, ?s, :date], nil ]
- PROC_TBL = [ [?s, TkComm.method(:string) ], nil ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- # array of config-option key (string or symbol)
- ['command']
- end
-
- #def initialize(cmd = Proc.new, *args)
- # _initialize_for_cb_class(CalCmdArgs, cmd, *args)
- #end
- end
-
- def __validation_class_list
- super() << CalendarCommand
- end
-
- Tk::ValidateConfigure.__def_validcmd(binding, CalendarCommand)
-=begin
- def command(cmd = Proc.new, args = nil)
- if cmd.kind_of?(CalendarCommand)
- configure('command', cmd)
- elsif args
- configure('command', [cmd, args])
- else
- configure('command', cmd)
- end
- end
-=end
-
- ####################################
-
- def get_string
- tk_call(@path, 'get', '-string')
- end
- alias get get_string
-
- def get_clicks
- number(tk_call(@path, 'get', '-clicks'))
- end
-
- def select(date)
- tk_call(@path, 'select', date)
- self
- end
-
- def show(date)
- tk_call(@path, 'show', date)
- self
- end
- def show_now
- tk_call(@path, 'show', 'now')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb b/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb
deleted file mode 100644
index 3fe489dc95..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/canvasprintbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Canvasprintbox < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Canvasprintbox
- TkCommandNames = ['::iwidgets::canvasprintbox'.freeze].freeze
- WidgetClassName = 'Canvasprintbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'filename'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'stretch'
- end
- private :__boolval_optkeys
-
- def get_output
- tk_call(@path, 'getoutput')
- end
-
- def print
- bool(tk_call(@path, 'print'))
- end
-
- def refresh
- tk_call(@path, 'refresh')
- self
- end
-
- def set_canvas(win)
- tk_call(@path, 'setcanvas', win)
- self
- end
-
- def stop
- tk_call(@path, 'stop')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb b/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb
deleted file mode 100644
index 4b5fdf5d7c..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/canvasprintdialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Canvasprintdialog < Tk::Iwidgets::Dialog
- end
- end
-end
-
-class Tk::Iwidgets::Canvasprintdialog
- TkCommandNames = ['::iwidgets::canvasprintdialog'.freeze].freeze
- WidgetClassName = 'Canvasprintdialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def get_output
- tk_call(@path, 'getoutput')
- end
-
- def print
- bool(tk_call(@path, 'print'))
- end
-
- def refresh
- tk_call(@path, 'refresh')
- self
- end
-
- def set_canvas(win)
- tk_call(@path, 'setcanvas', win)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/checkbox.rb b/ext/tk/lib/tkextlib/iwidgets/checkbox.rb
deleted file mode 100644
index 4589fe7ffa..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/checkbox.rb
+++ /dev/null
@@ -1,131 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/checkbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Checkbox < Tk::Iwidgets::Labeledframe
- end
- end
-end
-
-class Tk::Iwidgets::Checkbox
- TkCommandNames = ['::iwidgets::checkbox'.freeze].freeze
- WidgetClassName = 'Checkbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'buttoncget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'buttonconfigure', id]
- end
- private :__item_config_cmd
-
- def __item_boolval_optkeys(id)
- super(id) << 'defaultring'
- end
- private :__item_boolval_optkeys
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- alias buttoncget_tkstring itemcget_tkstring
- alias buttoncget itemcget
- alias buttoncget_strict itemcget_strict
- alias buttonconfigure itemconfigure
- alias buttonconfiginfo itemconfiginfo
- alias current_buttonconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def add(tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- tk_call(@path, 'add', tagid(tag), *hash_kv(keys))
- tag
- end
-
- def delete(idx)
- tk_call(@path, 'delete', index(idx))
- self
- end
-
- def deselect(idx)
- tk_call(@path, 'deselect', index(idx))
- self
- end
-
- def flash(idx)
- tk_call(@path, 'flash', index(idx))
- self
- end
-
- def get_tags
- simplelist(tk_call_without_enc(@path, 'get'))
- end
-
- def get_objs
- simplelist(tk_call_without_enc(@path, 'get')).collect{|id|
- Tk::Itk::Component.id2obj(self, id)
- }
- end
-
- def get(idx=nil)
- if idx
- bool(tk_call_without_enc(@path, 'get', index(idx)))
- else
- get_tags
- end
- end
-
- def index(idx)
- number(tk_call(@path, 'index', tagid(idx)))
- end
-
- def insert(idx, tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys))
- tag
- end
-
- def select(idx)
- tk_call(@path, 'select', index(idx))
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/combobox.rb b/ext/tk/lib/tkextlib/iwidgets/combobox.rb
deleted file mode 100644
index d4c05b5be5..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/combobox.rb
+++ /dev/null
@@ -1,105 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/combobox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Combobox < Tk::Iwidgets::Entryfield
- end
- end
-end
-
-class Tk::Iwidgets::Combobox
- TkCommandNames = ['::iwidgets::combobox'.freeze].freeze
- WidgetClassName = 'Combobox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'completion' << 'dropdown' << 'editable' << 'unique'
- end
- private :__boolval_optkeys
-
- def clear(component=None)
- tk_call(@path, 'clear', component)
- self
- end
-
- def delete_list(first, last=None)
- tk_call(@path, 'delete', 'list', first, last)
- self
- end
-
- def delete_entry(first, last=None)
- tk_call(@path, 'delete', 'entry', first, last)
- self
- end
-
- def get_list_contents(index)
- tk_call(@path, 'get', index)
- end
-
- def insert_list(idx, *elems)
- tk_call(@path, 'insert', 'list', idx, *elems)
- self
- end
-
- def insert_entry(idx, *elems)
- tk_call(@path, 'insert', 'entry', idx, *elems)
- self
- end
-
- # listbox methods
- def size
- tk_send_without_enc('size').to_i
- end
- def see(index)
- tk_send_without_enc('see', index)
- self
- end
- def selection_anchor(index)
- tk_send_without_enc('selection', 'anchor', index)
- self
- end
- def selection_clear(first, last=None)
- tk_send_without_enc('selection', 'clear', first, last)
- self
- end
- def selection_includes(index)
- bool(tk_send_without_enc('selection', 'includes', index))
- end
- def selection_set(first, last=None)
- tk_send_without_enc('selection', 'set', first, last)
- self
- end
-
- # scrolledlistbox methods
- def get_curselection
- tk_call(@path, 'getcurselection')
- end
- def justify(dir)
- tk_call(@path, 'justify', dir)
- self
- end
- def sort(*params, &b)
- # see 'lsort' man page about params
- if b
- tk_call(@path, 'sort', '-command', proc(&b), *params)
- else
- tk_call(@path, 'sort', *params)
- end
- self
- end
- def sort_ascending
- tk_call(@path, 'sort', 'ascending')
- self
- end
- def sort_descending
- tk_call(@path, 'sort', 'descending')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/dateentry.rb b/ext/tk/lib/tkextlib/iwidgets/dateentry.rb
deleted file mode 100644
index e135b89ed7..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/dateentry.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/dateentry.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Dateentry < Tk::Iwidgets::Datefield
- end
- end
-end
-
-class Tk::Iwidgets::Dateentry
- TkCommandNames = ['::iwidgets::dateentry'.freeze].freeze
- WidgetClassName = 'Dateentry'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/datefield.rb b/ext/tk/lib/tkextlib/iwidgets/datefield.rb
deleted file mode 100644
index 35977e1f6d..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/datefield.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/datefield.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Datefield < Tk::Iwidgets::Labeledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Datefield
- TkCommandNames = ['::iwidgets::datefield'.freeze].freeze
- WidgetClassName = 'Datefield'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'gmt'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'textbackground'
- end
- private :__strval_optkeys
-
- def __font_optkeys
- super() << 'textfont'
- end
- private :__font_optkeys
-
- def get_string
- tk_call(@path, 'get', '-string')
- end
- alias get get_string
-
- def get_clicks
- number(tk_call(@path, 'get', '-clicks'))
- end
-
- def valid?
- bool(tk_call(@path, 'isvalid'))
- end
- alias isvalid? valid?
-
- def show(date=None)
- tk_call(@path, 'show', date)
- self
- end
- def show_now
- tk_call(@path, 'show', 'now')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/dialog.rb b/ext/tk/lib/tkextlib/iwidgets/dialog.rb
deleted file mode 100644
index edefba1844..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/dialog.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/dialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Dialog < Tk::Iwidgets::Dialogshell
- end
- end
-end
-
-class Tk::Iwidgets::Dialog
- TkCommandNames = ['::iwidgets::dialog'.freeze].freeze
- WidgetClassName = 'Dialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb b/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb
deleted file mode 100644
index 009fc61c56..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/dialogshell.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Dialogshell < Tk::Iwidgets::Shell
- end
- end
-end
-
-class Tk::Iwidgets::Dialogshell
- TkCommandNames = ['::iwidgets::dialogshell'.freeze].freeze
- WidgetClassName = 'Dialogshell'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'buttoncget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'buttonconfigure', id]
- end
- private :__item_config_cmd
-
- def __item_boolval_optkeys(id)
- super(id) << 'defaultring'
- end
- private :__item_boolval_optkeys
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- alias buttoncget_tkstring itemcget_tkstring
- alias buttoncget itemcget
- alias buttoncget_strict itemcget_strict
- alias buttonconfigure itemconfigure
- alias buttonconfiginfo itemconfiginfo
- alias current_buttonconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def add(tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- tk_call(@path, 'add', tagid(tag), *hash_kv(keys))
- tag
- end
-
- def default(idx)
- tk_call(@path, 'default', index(idx))
- self
- end
-
- def delete(idx)
- tk_call(@path, 'delete', index(idx))
- self
- end
-
- def hide(idx)
- tk_call(@path, 'hide', index(idx))
- self
- end
-
- def index(idx)
- number(tk_call(@path, 'index', tagid(idx)))
- end
-
- def insert(idx, tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys))
- tag
- end
-
- def invoke(idx=nil)
- if idx
- tk_call(@path, 'invoke', index(idx))
- else
- tk_call(@path, 'invoke')
- end
- self
- end
-
- def show(idx)
- tk_call(@path, 'show', index(idx))
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb b/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb
deleted file mode 100644
index 3ae3f319b6..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/disjointlistbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Disjointlistbox < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Disjointlistbox
- TkCommandNames = ['::iwidgets::disjointlistbox'.freeze].freeze
- WidgetClassName = 'Disjointlistbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'lhslabeltext' << 'rhslabeltext' << 'lhsbuttonlabel' << 'rhsbuttonlabel'
- end
- private :__strval_optkeys
-
- def set_lhs(*items)
- tk_call(@path, 'setlhs', items)
- self
- end
- def set_rhs(*items)
- tk_call(@path, 'setrhs', items)
- self
- end
-
- def get_lhs
- simplelist(tk_call(@path, 'getlhs'))
- end
- def get_rhs
- simplelist(tk_call(@path, 'getrhs'))
- end
-
- def insert_lhs(*items)
- tk_call(@path, 'insertlhs', items)
- self
- end
- def insert_rhs(*items)
- tk_call(@path, 'insertrhs', items)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/entryfield.rb b/ext/tk/lib/tkextlib/iwidgets/entryfield.rb
deleted file mode 100644
index 75baca05d4..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/entryfield.rb
+++ /dev/null
@@ -1,186 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/entryfield.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Entryfield < Tk::Iwidgets::Labeledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Entryfield
- TkCommandNames = ['::iwidgets::entryfield'.freeze].freeze
- WidgetClassName = 'Entryfield'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __font_optkeys
- super() << 'textfont'
- end
- private :__font_optkeys
-
- ####################################
-
- include Tk::ValidateConfigure
-
- class EntryfieldValidate < TkValidateCommand
- #class CalCmdArgs < TkUtil::CallbackSubst
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?c, ?s, :char ],
- [ ?P, ?s, :post ],
- [ ?S, ?s, :current ],
- [ ?W, ?w, :widget ],
- nil
- ]
- PROC_TBL = [
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
- end
-
- def self._config_keys
- ['validate', 'invalid']
- end
- end
-
- def __validation_class_list
- super() << EntryfieldValidate
- end
-
- Tk::ValidateConfigure.__def_validcmd(binding, EntryfieldValidate)
-=begin
- def validate(cmd = Proc.new, args = nil)
- if cmd.kind_of?(ValidateCmd)
- configure('validate', cmd)
- elsif args
- configure('validate', [cmd, args])
- else
- configure('validate', cmd)
- end
- end
-
- def invalid(cmd = Proc.new, args = nil)
- if cmd.kind_of?(ValidateCmd)
- configure('invalid', cmd)
- elsif args
- configure('invalid', [cmd, args])
- else
- configure('invalid', cmd)
- end
- end
-=end
-
- ####################################
-
- def clear
- tk_call(@path, 'clear')
- self
- end
-
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
-
- def value
- _fromUTF8(tk_send_without_enc('get'))
- end
- def value= (val)
- tk_send_without_enc('delete', 0, 'end')
- tk_send_without_enc('insert', 0, _get_eval_enc_str(val))
- val
- end
- alias get value
- alias set value=
-
- def cursor=(index)
- tk_send_without_enc('icursor', index)
- #self
- index
- end
- alias icursor cursor=
-
- def index(index)
- number(tk_send_without_enc('index', index))
- end
-
- def insert(pos,text)
- tk_send_without_enc('insert', pos, _get_eval_enc_str(text))
- self
- end
-
- def mark(pos)
- tk_send_without_enc('scan', 'mark', pos)
- self
- end
- def dragto(pos)
- tk_send_without_enc('scan', 'dragto', pos)
- self
- end
- def selection_adjust(index)
- tk_send_without_enc('selection', 'adjust', index)
- self
- end
- def selection_clear
- tk_send_without_enc('selection', 'clear')
- self
- end
- def selection_from(index)
- tk_send_without_enc('selection', 'from', index)
- self
- end
- def selection_present()
- bool(tk_send_without_enc('selection', 'present'))
- end
- def selection_range(s, e)
- tk_send_without_enc('selection', 'range', s, e)
- self
- end
- def selection_to(index)
- tk_send_without_enc('selection', 'to', index)
- self
- end
-
- # based on tk/scrollable.rb
- def xview(*index)
- if index.size == 0
- list(tk_send_without_enc('xview'))
- else
- tk_send_without_enc('xview', *index)
- self
- end
- end
- def xview_moveto(*index)
- xview('moveto', *index)
- end
- def xview_scroll(*index)
- xview('scroll', *index)
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/extbutton.rb b/ext/tk/lib/tkextlib/iwidgets/extbutton.rb
deleted file mode 100644
index 3c77c2ec21..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/extbutton.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/extbutton.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Extbutton < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Extbutton
- TkCommandNames = ['::iwidgets::extbutton'.freeze].freeze
- WidgetClassName = 'Extbutton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'bitmapforeground' << 'ringbackground'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'defaultring'
- end
- private :__boolval_optkeys
-
- def invoke
- tk_call(@path, 'invoke')
- self
- end
-
- def flash
- tk_call(@path, 'flash')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb b/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb
deleted file mode 100644
index 4581771309..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/extfileselectionbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Extfileselectionbox < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Extfileselectionbox
- TkCommandNames = ['::iwidgets::extfileselectionbox'.freeze].freeze
- WidgetClassName = 'Extfileselectionbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() + [
- 'dirslabel', 'fileslabel', 'filterlabel', 'mask', 'nomatchstring',
- 'selectionlabel'
- ]
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() + ['dirson', 'fileson', 'filteron', 'selectionon']
- end
- private :__boolval_optkeys
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def filter
- tk_call(@path, 'filter')
- self
- end
-
- def get
- tk_call(@path, 'get')
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb b/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb
deleted file mode 100644
index 32a06cc46f..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/extfileselectiondialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Extfileselectiondialog < Tk::Iwidgets::Dialog
- end
- end
-end
-
-class Tk::Iwidgets::Extfileselectiondialog
- TkCommandNames = ['::iwidgets::extfileselectiondialog'.freeze].freeze
- WidgetClassName = 'Extfileselectiondialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def filter
- tk_call(@path, 'filter')
- self
- end
-
- def get
- tk_call(@path, 'get')
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/feedback.rb b/ext/tk/lib/tkextlib/iwidgets/feedback.rb
deleted file mode 100644
index e52d60edac..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/feedback.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/feedback.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Feedback < Tk::Iwidgets::Labeledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Feedback
- TkCommandNames = ['::iwidgets::feedback'.freeze].freeze
- WidgetClassName = 'Feedback'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'barcolor'
- end
- private :__strval_optkeys
-
- def reset
- tk_call(@path, 'reset')
- self
- end
-
- def step(inc=1)
- tk_call(@path, 'step', inc)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb b/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb
deleted file mode 100644
index 3811f2b57e..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/fileselectionbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Fileselectionbox < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Fileselectionbox
- TkCommandNames = ['::iwidgets::fileselectionbox'.freeze].freeze
- WidgetClassName = 'Fileselectionbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() + [
- 'directory', 'dirslabel', 'fileslabel', 'filterlabel', 'mask',
- 'nomatchstring', 'selectionlabel'
- ]
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() + ['dirson', 'fileson', 'filteron', 'selectionon']
- end
- private :__boolval_optkeys
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def filter
- tk_call(@path, 'filter')
- self
- end
-
- def get
- tk_call(@path, 'get')
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb b/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb
deleted file mode 100644
index 8d368486ea..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/fileselectiondialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Fileselectiondialog < Tk::Iwidgets::Dialog
- end
- end
-end
-
-class Tk::Iwidgets::Fileselectiondialog
- TkCommandNames = ['::iwidgets::fileselectiondialog'.freeze].freeze
- WidgetClassName = 'Fileselectiondialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def filter
- tk_call(@path, 'filter')
- self
- end
-
- def get
- tk_call(@path, 'get')
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/finddialog.rb b/ext/tk/lib/tkextlib/iwidgets/finddialog.rb
deleted file mode 100644
index ff0b587390..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/finddialog.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/finddialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Finddialog < Tk::Iwidgets::Dialogshell
- end
- end
-end
-
-class Tk::Iwidgets::Finddialog
- TkCommandNames = ['::iwidgets::finddialog'.freeze].freeze
- WidgetClassName = 'Finddialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() + [
- 'patternbackground', 'patternforeground',
- 'searchbackground', 'searchforeground'
- ]
- end
- private :__strval_optkeys
-
- def __val2ruby_optkeys # { key=>proc, ... }
- super().update('textwidget'=>proc{|v| window(v)})
- end
- private :__val2ruby_optkeys
-
- def clear
- tk_call(@path, 'clear')
- self
- end
-
- def find
- tk_call(@path, 'find')
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb b/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb
deleted file mode 100644
index af99973240..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb
+++ /dev/null
@@ -1,366 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/hierarchy.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/text'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Hierarchy < Tk::Iwidgets::Scrolledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Hierarchy
- ItemConfCMD = ['tag'.freeze, 'configure'.freeze].freeze
- include TkTextTagConfig
-
- TkCommandNames = ['::iwidgets::hierarchy'.freeze].freeze
- WidgetClassName = 'Hierarchy'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include Tk::ValidateConfigure
-
- class QueryCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [ [?n, ?s, :node], nil ]
- PROC_TBL = [ [?s, TkComm.method(:string) ], nil ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- # array of config-option key (string or symbol)
- ['querycommand']
- end
- end
-
- class IndicatorCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?n, ?s, :node ],
- [ ?s, ?b, :status ],
- nil
- ]
-
- PROC_TBL = [
- [ ?s, TkComm.method(:string) ],
- [ ?b, TkComm.method(:bool) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- # array of config-option key (string or symbol)
- ['iconcommand', 'icondblcommand', 'imagedblcommand']
- end
- end
-
- class IconCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?n, ?s, :node ],
- [ ?i, ?s, :icon ],
- nil
- ]
- PROC_TBL = [ [ ?s, TkComm.method(:string) ], nil ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- # array of config-option key (string or symbol)
- ['dblclickcommand', 'imagecommand', 'selectcommand']
- end
- end
-
- def __validation_class_list
- super() << QueryCommand << IndicatorCommand << IconCommand
- end
-
- Tk::ValidateConfigure.__def_validcmd(binding, QueryCommand)
- Tk::ValidateConfigure.__def_validcmd(binding, IndicatorCommand)
- Tk::ValidateConfigure.__def_validcmd(binding, IconCommand)
-
- ####################################
-
- def __boolval_optkeys
- super() << 'alwaysquery' << 'expanded' << 'filter'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'markbackground' << 'markforeground' << 'textbackground'
- end
- private :__strval_optkeys
-
- def __font_optkeys
- super() << 'textfont'
- end
- private :__font_optkeys
-
- def clear
- tk_call(@path, 'clear')
- self
- end
-
- def collapse(node)
- tk_call(@path, 'collapse')
- self
- end
-
- def current
- tk_call(@path, 'current')
- end
-
- def draw(mode=None)
- case mode
- when None
- # do nothing
- when 'now', :now
- mode = '-now'
- when 'eventually', :eventually
- mode = '-eventually'
- when String, Symbol
- mode = mode.to_s
- mode = '-' << mode if mode[0] != ?-
- end
- tk_call(@path, 'draw', mode)
- end
-
- def expand(node)
- tk_call(@path, 'expand', node)
- self
- end
-
- def expanded?(node)
- bool(tk_call(@path, 'expanded', node))
- end
-
- def exp_state
- list(tk_call(@path, 'expState'))
- end
- alias expand_state exp_state
- alias expanded_list exp_state
-
- def mark_clear
- tk_call(@path, 'mark', 'clear')
- self
- end
- def mark_add(*nodes)
- tk_call(@path, 'mark', 'add', *nodes)
- self
- end
- def mark_remove(*nodes)
- tk_call(@path, 'mark', 'remove', *nodes)
- self
- end
- def mark_get
- list(tk_call(@path, 'mark', 'get'))
- end
-
- def refresh(node)
- tk_call(@path, 'refresh', node)
- self
- end
-
- def prune(node)
- tk_call(@path, 'prune', node)
- self
- end
-
- def selection_clear
- tk_call(@path, 'selection', 'clear')
- self
- end
- def selection_add(*nodes)
- tk_call(@path, 'selection', 'add', *nodes)
- self
- end
- def selection_remove(*nodes)
- tk_call(@path, 'selection', 'remove', *nodes)
- self
- end
- def selection_get
- list(tk_call(@path, 'selection', 'get'))
- end
-
- def toggle(node)
- tk_call(@path, 'toggle', node)
- self
- end
-
- # based on Tk::Text widget
-
- def bbox(index)
- list(tk_send_without_enc('bbox', _get_eval_enc_str(index)))
- end
-
- def compare(idx1, op, idx2)
- bool(tk_send_without_enc('compare', _get_eval_enc_str(idx1),
- op, _get_eval_enc_str(idx2)))
- end
-
- def debug
- bool(tk_send_without_enc('debug'))
- end
- def debug=(boolean)
- tk_send_without_enc('debug', boolean)
- #self
- boolean
- end
-
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
-
- def dlineinfo(index)
- list(tk_send_without_enc('dlineinfo', _get_eval_enc_str(index)))
- end
-
- def get(*index)
- _fromUTF8(tk_send_without_enc('get', *index))
- end
-
- def index(index)
- tk_send_without_enc('index', _get_eval_enc_str(index))
- end
-
- def insert(index, chars, *tags)
- if tags[0].kind_of? Array
- # multiple chars-taglist argument :: str, [tag,...], str, [tag,...], ...
- args = [chars]
- while tags.size > 0
- args << tags.shift.collect{|x|_get_eval_string(x)}.join(' ') # taglist
- args << tags.shift if tags.size > 0 # chars
- end
- super(index, *args)
- else
- # single chars-taglist argument :: str, tag, tag, ...
- if tags.size == 0
- super(index, chars)
- else
- super(index, chars, tags.collect{|x|_get_eval_string(x)}.join(' '))
- end
- end
- end
-
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send_without_enc('scan', 'dragto', x, y)
- self
- end
- def see(index)
- tk_send_without_enc('see', index)
- self
- end
-
- # based on tk/scrollable.rb
- def xview(*index)
- if index.size == 0
- list(tk_send_without_enc('xview'))
- else
- tk_send_without_enc('xview', *index)
- self
- end
- end
- def xview_moveto(*index)
- xview('moveto', *index)
- end
- def xview_scroll(*index)
- xview('scroll', *index)
- end
-
- def yview(*index)
- if index.size == 0
- list(tk_send_without_enc('yview'))
- else
- tk_send_without_enc('yview', *index)
- self
- end
- end
- def yview_moveto(*index)
- yview('moveto', *index)
- end
- def yview_scroll(*index)
- yview('scroll', *index)
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb b/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb
deleted file mode 100644
index 1650c7af37..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/hyperhelp.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Hyperhelp < Tk::Iwidgets::Shell
- end
- end
-end
-
-class Tk::Iwidgets::Hyperhelp
- TkCommandNames = ['::iwidgets::hyperhelp'.freeze].freeze
- WidgetClassName = 'Hyperhelp'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'helpdir'
- end
- private :__strval_optkeys
-
- def __listval_optkeys
- super() << 'topics'
- end
- private :__listval_optkeys
-
- def show_topic(topic)
- tk_call(@path, 'showtopic', topic)
- self
- end
-
- def follow_link(href)
- tk_call(@path, 'followlink', href)
- self
- end
-
- def forward
- tk_call(@path, 'forward')
- self
- end
-
- def back
- tk_call(@path, 'back')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb b/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb
deleted file mode 100644
index f4f3786528..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/labeledframe.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Labeledframe < Tk::Itk::Archetype
- end
- end
-end
-
-class Tk::Iwidgets::Labeledframe
- TkCommandNames = ['::iwidgets::labeledframe'.freeze].freeze
- WidgetClassName = 'Labeledframe'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'labeltext'
- end
- private :__strval_optkeys
-
- def __tkvariable_optkeys
- super() << 'labelvariable'
- end
- private :__tkvariable_optkeys
-
- def __font_optkeys
- super() << 'labelfont'
- end
- private :__font_optkeys
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb b/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb
deleted file mode 100644
index fe3c03135c..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/labeledwidget.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Labeledwidget < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Labeledwidget
- extend TkCore
-
- TkCommandNames = ['::iwidgets::labeledwidget'.freeze].freeze
- WidgetClassName = 'Labeledwidget'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'labeltext'
- end
- private :__strval_optkeys
-
- def __tkvariable_optkeys
- super() << 'labelvariable'
- end
- private :__tkvariable_optkeys
-
- def __font_optkeys
- super() << 'labelfont'
- end
- private :__font_optkeys
-
- def self.alignlabels(*wins)
- tk_call('::iwidgets::Labeledwidget::alignlabels', *wins)
- end
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb b/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb
deleted file mode 100644
index 34c9eb52e3..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/mainwindow.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Mainwindow < Tk::Iwidgets::Shell
- end
- end
-end
-
-class Tk::Iwidgets::Mainwindow
- TkCommandNames = ['::iwidgets::mainwindow'.freeze].freeze
- WidgetClassName = 'Mainwindow'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'helpline' << 'statusline'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'menubarbackground' << 'menubarforeground' << 'toolbarforeground'
- end
- private :__strval_optkeys
-
- def __font_optkeys
- super() << 'menubarfont' << 'toolbarfont'
- end
- private :__font_optkeys
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def menubar(*args)
- unless args.empty?
- tk_call(@path, 'menubar', *args)
- end
- window(tk_call(@path, 'menubar'))
- end
-
- def mousebar(*args)
- unless args.empty?
- tk_call(@path, 'mousebar', *args)
- end
- window(tk_call(@path, 'mousebar'))
- end
-
- def msgd(*args)
- unless args.empty?
- tk_call(@path, 'msgd', *args)
- end
- window(tk_call(@path, 'msgd'))
- end
-
- def toolbar(*args)
- unless args.empty?
- tk_call(@path, 'toolbar', *args)
- end
- window(tk_call(@path, 'toolbar'))
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/menubar.rb b/ext/tk/lib/tkextlib/iwidgets/menubar.rb
deleted file mode 100644
index f729511230..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/menubar.rb
+++ /dev/null
@@ -1,213 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/menubar.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Menubar < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Menubar
- TkCommandNames = ['::iwidgets::menubar'.freeze].freeze
- WidgetClassName = 'Menubar'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'menubuttons'
- end
- private :__strval_optkeys
-
- def __tkvariable_optkeys
- super() << 'helpvariable'
- end
- private :__tkvariable_optkeys
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'menucget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'menuconfigure', id]
- end
- private :__item_config_cmd
-
- def __item_strval_optkeys(id)
- super(id) << 'selectcolor'
- end
- private :__item_strval_optkeys
-
- def __item_tkvariable_optkeys(id)
- super(id) << 'helpstr'
- end
- private :__item_tkvariable_optkeys
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- alias menucget_tkstring itemcget_tkstring
- alias menucget itemcget
- alias menucget_strict itemcget_strict
- alias menuconfigure itemconfigure
- alias menuconfiginfo itemconfiginfo
- alias current_menuconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def __methodcall_optkeys
- {'menubuttons'=>'menubuttons'}
- end
-
- def menubuttons(val = nil)
- unless val
- return tk_call(@path, 'cget', '-menubuttons')
- end
-
- tk_call(@path, 'configure', '-menubuttons', _parse_menu_spec(val))
- self
- end
-
- def _parse_menu_spec(menu_spec)
- ret = ''
- menu_spec.each{|spec|
- next unless spec
-
- if spec.kind_of?(Hash)
- args = [spec]
- type = 'options'
- else
- type, *args = spec
- end
-
- type = type.to_s
- case type
- when 'options'
- keys = args[0]
- ary = [type]
- ary.concat(hash_kv(keys))
- ret << array2tk_list(ary) << "\n"
-
- when 'menubutton', 'cascade'
- name, keys = args
- if keys
- ary = [type, name]
- keys = _symbolkey2str(keys)
- keys['menu'] = _parse_menu_spec(keys['menu']) if keys.key?('menu')
- ary.concat(hash_kv(keys))
- ret << array2tk_list(ary) << "\n"
- else
- ret << array2tk_list([type, name]) << "\n"
- end
-
- else
- name, keys = args
- if keys
- ary = [type, name]
- ary.concat(hash_kv(keys))
- ret << array2tk_list(ary) << "\n"
- else
- ret << array2tk_list([type, name]) << "\n"
- end
- end
- }
- ret
- end
-
- ####################################
-
- def add(type, tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- keys = _symbolkey2str(keys)
- keys['menu'] = _parse_menu_spec(keys['menu']) if keys.key?('menu')
- tk_call(@path, 'add', type, tagid(tag), *hash_kv(keys))
- tag
- end
-
- def delete(path1, path2=nil)
- if path2
- else
- tk_call(@path, 'delete', index(idx))
- end
- self
- end
-
- def index(idx)
- number(tk_call(@path, 'index', tagid(idx)))
- end
-
- def insert(idx, type, tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- keys = _symbolkey2str(keys)
- keys['menu'] = _parse_menu_spec(keys['menu']) if keys.key?('menu')
- tk_call(@path, 'insert', index(idx), type, tagid(tag), *hash_kv(keys))
- tag
- end
-
- def invoke(idx)
- tk_call(@path, 'invoke', index(idx))
- self
- end
-
- def menupath(pat)
- if (win = tk_call(@path, 'path', pat)) == '-1'
- return nil
- end
- window(win)
- end
- def menupath_glob(pat)
- if (win = tk_call(@path, 'path', '-glob', pat)) == '-1'
- return nil
- end
- window(win)
- end
- def menupath_tclregexp(pat)
- if (win = tk_call(@path, 'path', '-regexp', pat)) == '-1'
- return nil
- end
- window(win)
- end
-
- def type(path)
- tk_call(@path, 'type', path)
- end
-
- def yposition(path)
- number(tk_call(@path, 'yposition', path))
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/messagebox.rb b/ext/tk/lib/tkextlib/iwidgets/messagebox.rb
deleted file mode 100644
index a4c28228ee..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/messagebox.rb
+++ /dev/null
@@ -1,94 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/messagebox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Messagebox < Tk::Iwidgets::Scrolledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Messagebox
- TkCommandNames = ['::iwidgets::messagebox'.freeze].freeze
- WidgetClassName = 'Messagebox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'type', 'cget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'type', 'configure', id]
- end
- private :__item_config_cmd
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- def __item_boolval_optkeys(id)
- super(id) << 'bell' << 'show'
- end
- private :__item_boolval_optkeys
-
- alias typecget_tkstring itemcget_tkstring
- alias typecget itemcget
- alias typecget_strict itemcget_strict
- alias typeconfigure itemconfigure
- alias typeconfiginfo itemconfiginfo
- alias current_typeconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def __strval_optkeys
- super() << 'filename' << 'savedir'
- end
- private :__strval_optkeys
-
- def type_add(tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- unless tag
- tag = Tk::Itk::Component.new(self)
- end
- tk_call(@path, 'type', 'add', tagid(tag), *hash_kv(keys))
- tag
- end
-
- def clear
- tk_call(@path, 'clear')
- self
- end
-
- def export(file)
- tk_call(@path, 'export', file)
- self
- end
-
- def issue(string, type=None, *args)
- tk_call(@path, 'issue', string, tagid(type), *args)
- self
- end
-
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb b/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb
deleted file mode 100644
index 2fb4533b67..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/messagedialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Messagedialog < Tk::Iwidgets::Dialog
- end
- end
-end
-
-class Tk::Iwidgets::Messagedialog
- TkCommandNames = ['::iwidgets::messagedialog'.freeze].freeze
- WidgetClassName = 'Messagedialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/notebook.rb b/ext/tk/lib/tkextlib/iwidgets/notebook.rb
deleted file mode 100644
index ad2a372512..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/notebook.rb
+++ /dev/null
@@ -1,176 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/notebook.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Notebook < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Notebook
- TkCommandNames = ['::iwidgets::notebook'.freeze].freeze
- WidgetClassName = 'Notebook'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'pagecget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'pageconfigure', id]
- end
- private :__item_config_cmd
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- alias pagecget_tkstring itemcget_tkstring
- alias pagecget itemcget
- alias pagecget_strict itemcget_strict
- alias pageconfigure itemconfigure
- alias pageconfiginfo itemconfiginfo
- alias current_pageconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def __boolval_optkeys
- super() << 'auto'
- end
- private :__boolval_optkeys
-
- def add(keys={})
- window(tk_call(@path, 'add', *hash_kv(keys)))
- end
-
- def child_site_list
- list(tk_call(@path, 'childsite'))
- end
-
- def child_site(idx)
- if (new_idx = self.index(idx)) < 0
- new_idx = tagid(idx)
- end
- window(tk_call(@path, 'childsite', new_idx))
- end
-
- def delete(idx1, idx2=nil)
- if (new_idx1 = self.index(idx1)) < 0
- new_idx1 = tagid(idx1)
- end
- if idx2
- if (new_idx2 = self.index(idx2)) < 0
- new_idx2 = tagid(idx2)
- end
- tk_call(@path, 'delete', new_idx1, new_idx2)
- else
- tk_call(@path, 'delete', new_idx1)
- end
- self
- end
-
- def index(idx)
- number(tk_call(@path, 'index', tagid(idx)))
- end
-
- def insert(idx, keys={})
- if (new_idx = self.index(idx)) < 0
- new_idx = tagid(idx)
- end
- window(tk_call(@path, 'insert', new_idx, *hash_kv(keys)))
- end
-
- def next
- tk_call(@path, 'next')
- self
- end
-
- def prev
- tk_call(@path, 'prev')
- self
- end
-
- def select(idx)
- if (new_idx = self.index(idx)) < 0
- new_idx = tagid(idx)
- end
- tk_call(@path, 'select', new_idx)
- self
- end
-
- def scrollcommand(cmd=Proc.new)
- configure_cmd 'scrollcommand', cmd
- self
- end
- alias xscrollcommand scrollcommand
- alias yscrollcommand scrollcommand
-
- def xscrollbar(bar=nil)
- if bar
- @scrollbar = bar
- @scrollbar.orient 'horizontal'
- self.scrollcommand {|*arg| @scrollbar.set(*arg)}
- @scrollbar.command {|*arg| self.xview(*arg)}
- Tk.update # avoid scrollbar trouble
- end
- @scrollbar
- end
- def yscrollbar(bar=nil)
- if bar
- @scrollbar = bar
- @scrollbar.orient 'vertical'
- self.scrollcommand {|*arg| @scrollbar.set(*arg)}
- @scrollbar.command {|*arg| self.yview(*arg)}
- Tk.update # avoid scrollbar trouble
- end
- @scrollbar
- end
- alias scrollbar yscrollbar
-
- def view(*idxs)
- if idxs.size == 0
- idx = num_or_str(tk_send_without_enc('view'))
- if idx.kind_of?(Fixnum) && idx < 0
- nil
- else
- idx
- end
- else
- tk_send_without_enc('view', *idxs)
- self
- end
- end
- alias xview view
- alias yview view
-
- def view_moveto(*idxs)
- view('moveto', *idxs)
- end
- alias xview_moveto view_moveto
- alias yview_moveto view_moveto
- def view_scroll(index, what='pages')
- view('scroll', index, what)
- end
- alias xview_scroll view_scroll
- alias yview_scroll view_scroll
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb b/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb
deleted file mode 100644
index 642db11ff1..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb
+++ /dev/null
@@ -1,93 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/optionmenu.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Optionmenu < Tk::Iwidgets::Labeledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Optionmenu
- TkCommandNames = ['::iwidgets::optionmenu'.freeze].freeze
- WidgetClassName = 'Optionmenu'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'cyclicon'
- end
- private :__boolval_optkeys
-
- def delete(first, last=nil)
- if last
- tk_call(@path, 'delete', first, last)
- else
- tk_call(@path, 'delete', first)
- end
- self
- end
-
- def disable(idx)
- tk_call(@path, 'disable', idx)
- self
- end
-
- def enable(idx)
- tk_call(@path, 'enable', idx)
- self
- end
-
- def get(first=nil, last=nil)
- if last
- simplelist(tk_call(@path, 'get', first, last))
- elsif first
- tk_call(@path, 'get', first)
- else
- tk_call(@path, 'get')
- end
- end
- def get_range(first, last)
- get(first, last)
- end
- def get_selected
- get()
- end
-
- def index(idx)
- number(tk_call(@path, 'index', idx))
- end
-
- def insert(idx, *args)
- tk_call(@path, 'insert', idx, *args)
- self
- end
-
- def select(idx)
- tk_call(@path, 'select', idx)
- self
- end
-
- def sort(*params, &b)
- # see 'lsort' man page about params
- if b
- tk_call(@path, 'sort', '-command', proc(&b), *params)
- else
- tk_call(@path, 'sort', *params)
- end
- self
- end
- def sort_ascending
- tk_call(@path, 'sort', 'ascending')
- self
- end
- def sort_descending
- tk_call(@path, 'sort', 'descending')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb b/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb
deleted file mode 100644
index 5f17bdd862..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb
+++ /dev/null
@@ -1,135 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/panedwindow.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Panedwindow < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Panedwindow
- TkCommandNames = ['::iwidgets::panedwindow'.freeze].freeze
- WidgetClassName = 'Panedwindow'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'panecget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'paneconfigure', id]
- end
- private :__item_config_cmd
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- alias panecget_tkstring itemcget_tkstring
- alias panecget itemcget
- alias panecget_strict itemcget_strict
- alias paneconfigure itemconfigure
- alias paneconfiginfo itemconfiginfo
- alias current_paneconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def __boolval_optkeys
- super() << 'showhandle'
- end
- private :__boolval_optkeys
-
- def add(tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- window(tk_call(@path, 'add', tagid(tag), *hash_kv(keys)))
- tag
- end
-
- def child_site_list
- list(tk_call(@path, 'childsite'))
- end
-
- def child_site(idx)
- window(tk_call(@path, 'childsite', index(idx)))
- end
-
- def delete(idx)
- tk_call(@path, 'delete', index(idx))
- self
- end
-
- def fraction(*percentages)
- tk_call(@path, 'fraction', *percentages)
- self
- end
-
- def hide(idx)
- tk_call(@path, 'hide', index(idx))
- self
- end
-
- def index(idx)
- number(tk_call(@path, 'index', tagid(idx)))
- end
-
- def insert(idx, tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- window(tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys)))
- tag
- end
-
- def invoke(idx=nil)
- if idx
- tk_call(@path, 'invoke', index(idx))
- else
- tk_call(@path, 'invoke')
- end
- self
- end
-
- def reset
- tk_call(@path, 'reset')
- self
- end
-
- def show(idx)
- tk_call(@path, 'show', index(idx))
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb b/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb
deleted file mode 100644
index fc73a51742..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb
+++ /dev/null
@@ -1,132 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/promptdialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Promptdialog < Tk::Iwidgets::Dialog
- end
- end
-end
-
-class Tk::Iwidgets::Promptdialog
- TkCommandNames = ['::iwidgets::promptdialog'.freeze].freeze
- WidgetClassName = 'Promptdialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- # index method is not available, because it shows index of the entry field
- def default(name)
- tk_call(@path, 'default', tagid(name))
- self
- end
-
- def hide(name)
- tk_call(@path, 'hide', tagid(name))
- self
- end
-
- def invoke(name=nil)
- if name
- tk_call(@path, 'invoke', tagid(name))
- else
- tk_call(@path, 'invoke')
- end
- self
- end
-
- def show(name)
- tk_call(@path, 'show', tagid(name))
- self
- end
-
-
- # based on Tk::Iwidgets::Entryfield
- def clear
- tk_call(@path, 'clear')
- self
- end
-
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
-
- def value
- _fromUTF8(tk_send_without_enc('get'))
- end
- def value= (val)
- tk_send_without_enc('delete', 0, 'end')
- tk_send_without_enc('insert', 0, _get_eval_enc_str(val))
- val
- end
- alias get value
- alias set value=
-
- def cursor=(index)
- tk_send_without_enc('icursor', index)
- #self
- index
- end
- alias icursor cursor=
-
- def index(idx)
- number(tk_send_without_enc('index', idx))
- end
-
- def insert(pos,text)
- tk_send_without_enc('insert', pos, _get_eval_enc_str(text))
- self
- end
-
- def mark(pos)
- tk_send_without_enc('scan', 'mark', pos)
- self
- end
- def dragto(pos)
- tk_send_without_enc('scan', 'dragto', pos)
- self
- end
- def selection_adjust(index)
- tk_send_without_enc('selection', 'adjust', index)
- self
- end
- def selection_clear
- tk_send_without_enc('selection', 'clear')
- self
- end
- def selection_from(index)
- tk_send_without_enc('selection', 'from', index)
- self
- end
- def selection_present()
- bool(tk_send_without_enc('selection', 'present'))
- end
- def selection_range(s, e)
- tk_send_without_enc('selection', 'range', s, e)
- self
- end
- def selection_to(index)
- tk_send_without_enc('selection', 'to', index)
- self
- end
-
- def xview(*index)
- if index.size == 0
- list(tk_send_without_enc('xview'))
- else
- tk_send_without_enc('xview', *index)
- self
- end
- end
- def xview_moveto(*index)
- xview('moveto', *index)
- end
- def xview_scroll(*index)
- xview('scroll', *index)
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb b/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb
deleted file mode 100644
index cec3563ddc..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/pushbutton.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Pushbutton < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Pushbutton
- TkCommandNames = ['::iwidgets::pushbutton'.freeze].freeze
- WidgetClassName = 'Pushbutton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'defaultring'
- end
- private :__boolval_optkeys
-
- def invoke
- tk_call_without_enc(@path, 'invoke')
- self
- end
-
- def flash
- tk_call_without_enc(@path, 'flash')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/radiobox.rb b/ext/tk/lib/tkextlib/iwidgets/radiobox.rb
deleted file mode 100644
index 1c9e9f8d34..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/radiobox.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/radiobox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Radiobox < Tk::Iwidgets::Labeledframe
- end
- end
-end
-
-class Tk::Iwidgets::Radiobox
- TkCommandNames = ['::iwidgets::radiobox'.freeze].freeze
- WidgetClassName = 'Radiobox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'buttoncget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'buttonconfigure', id]
- end
- private :__item_config_cmd
-
- def __item_boolval_optkeys(id)
- super(id) << 'defaultring'
- end
- private :__item_boolval_optkeys
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- alias buttoncget_tkstring itemcget_tkstring
- alias buttoncget itemcget
- alias buttoncget_strict itemcget_strict
- alias buttonconfigure itemconfigure
- alias buttonconfiginfo itemconfiginfo
- alias current_buttonconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def add(tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- tk_call(@path, 'add', tagid(tag), *hash_kv(keys))
- tag
- end
-
- def delete(idx)
- tk_call(@path, 'delete', index(idx))
- self
- end
-
- def deselect(idx)
- tk_call(@path, 'deselect', index(idx))
- self
- end
-
- def flash(idx)
- tk_call(@path, 'flash', index(idx))
- self
- end
-
- def get_tag
- ((tag = tk_call_without_enc(@path, 'get')).empty?)? nil: tag
- end
- alias get get_tag
-
- def get_obj
- (tag = get_tag)? Tk::Itk::Component.id2obj(self, tag): nil
- end
-
- def index(idx)
- number(tk_call(@path, 'index', tagid(idx)))
- end
-
- def insert(idx, tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys))
- tag
- end
-
- def select(idx)
- tk_call(@path, 'select', index(idx))
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb b/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb
deleted file mode 100644
index e17fee98dc..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/buttonbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Scopedobject < TkObject
- end
- end
-end
-
-class Tk::Iwidgets::Scopedobject
- TkCommandNames = ['::iwidgets::scopedobject'.freeze].freeze
- WidgetClassName = 'Scopedobject'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def initialize(obj_name, keys={})
- @path = tk_call(self.class::TkCommandNames[0], obj_name, *hash_kv(keys))
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb
deleted file mode 100644
index 463689f513..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb
+++ /dev/null
@@ -1,354 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/scrolledcanvas.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/canvas'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Scrolledcanvas < Tk::Iwidgets::Scrolledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Scrolledcanvas
- TkCommandNames = ['::iwidgets::scrolledcanvas'.freeze].freeze
- WidgetClassName = 'Scrolledcanvas'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ################################
-
- def __boolval_optkeys
- super() << 'autoresize'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'textbackground'
- end
- private :__strval_optkeys
-
- def initialize(*args)
- super(*args)
- @canvas = component_widget('canvas')
- end
-
- def method_missing(id, *args)
- if @canvas.respond_to?(id)
- @canvas.__send__(id, *args)
- else
- super(id, *args)
- end
- end
-
- ################################
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def justify(dir)
- tk_call(@path, 'justify', dir)
- self
- end
-
- ##########################
- include TkCanvasItemConfig
-
- def tagid(tag)
- if tag.kind_of?(TkcItem) || tag.kind_of?(TkcTag)
- tag.id
- elsif tag.kind_of?(Tk::Itk::Component)
- tag.name
- else
- tag # maybe an Array of configure parameters
- end
- end
- private :tagid
-
- # create a canvas item without creating a TkcItem object
- def create(type, *args)
- type.create(self, *args)
- end
-
- #######################
-
- def addtag(tag, mode, *args)
- tk_send_without_enc('addtag', tagid(tag), mode, *args)
- self
- end
- def addtag_above(tagOrId, target)
- addtag(tagOrId, 'above', tagid(target))
- end
- def addtag_all(tagOrId)
- addtag(tagOrId, 'all')
- end
- def addtag_below(tagOrId, target)
- addtag(tagOrId, 'below', tagid(target))
- end
- def addtag_closest(tagOrId, x, y, halo=None, start=None)
- addtag(tagOrId, 'closest', x, y, halo, start)
- end
- def addtag_enclosed(tagOrId, x1, y1, x2, y2)
- addtag(tagOrId, 'enclosed', x1, y1, x2, y2)
- end
- def addtag_overlapping(tagOrId, x1, y1, x2, y2)
- addtag(tagOrId, 'overlapping', x1, y1, x2, y2)
- end
- def addtag_withtag(tagOrId, tag)
- addtag(tagOrId, 'withtag', tagid(tag))
- end
-
- def bbox(tagOrId, *tags)
- list(tk_send_without_enc('bbox', tagid(tagOrId),
- *tags.collect{|t| tagid(t)}))
- end
-
- #def itembind(tag, context, cmd=Proc.new, *args)
- # _bind([path, "bind", tagid(tag)], context, cmd, *args)
- # self
- #end
- def itembind(tag, context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([path, "bind", tagid(tag)], context, cmd, *args)
- self
- end
-
- #def itembind_append(tag, context, cmd=Proc.new, *args)
- # _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
- # self
- #end
- def itembind_append(tag, context, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
- self
- end
-
- def itembind_remove(tag, context)
- _bind_remove([path, "bind", tagid(tag)], context)
- self
- end
-
- def itembindinfo(tag, context=nil)
- _bindinfo([path, "bind", tagid(tag)], context)
- end
-
- def canvasx(screen_x, *args)
- #tk_tcl2ruby(tk_send_without_enc('canvasx', screen_x, *args))
- number(tk_send_without_enc('canvasx', screen_x, *args))
- end
- def canvasy(screen_y, *args)
- #tk_tcl2ruby(tk_send_without_enc('canvasy', screen_y, *args))
- number(tk_send_without_enc('canvasy', screen_y, *args))
- end
-
- def coords(tag, *args)
- if args == []
- tk_split_list(tk_send_without_enc('coords', tagid(tag)))
- else
- tk_send_without_enc('coords', tagid(tag), *(args.flatten))
- self
- end
- end
-
- def dchars(tag, first, last=None)
- tk_send_without_enc('dchars', tagid(tag),
- _get_eval_enc_str(first), _get_eval_enc_str(last))
- self
- end
-
- def delete(*args)
- tbl = nil
- TkcItem::CItemID_TBL.mutex.synchronize{
- tbl = TkcItem::CItemID_TBL[self.path]
- }
- if tbl
- find('withtag', *args).each{|item|
- if item.kind_of?(TkcItem)
- TkcItem::CItemID_TBL.mutex.synchronize{
- tbl.delete(item.id)
- }
- end
- }
- end
- tk_send_without_enc('delete', *args.collect{|t| tagid(t)})
- self
- end
- alias remove delete
-
- def dtag(tag, tag_to_del=None)
- tk_send_without_enc('dtag', tagid(tag), tag_to_del)
- self
- end
-
- def find(mode, *args)
- list(tk_send_without_enc('find', mode, *args)).collect!{|id|
- TkcItem.id2obj(self, id)
- }
- end
- def find_above(target)
- find('above', tagid(target))
- end
- def find_all
- find('all')
- end
- def find_below(target)
- find('below', tagid(target))
- end
- def find_closest(x, y, halo=None, start=None)
- find('closest', x, y, halo, start)
- end
- def find_enclosed(x1, y1, x2, y2)
- find('enclosed', x1, y1, x2, y2)
- end
- def find_overlapping(x1, y1, x2, y2)
- find('overlapping', x1, y1, x2, y2)
- end
- def find_withtag(tag)
- find('withtag', tag)
- end
-
- def itemfocus(tagOrId=nil)
- if tagOrId
- tk_send_without_enc('focus', tagid(tagOrId))
- self
- else
- ret = tk_send_without_enc('focus')
- if ret == ""
- nil
- else
- TkcItem.id2obj(self, ret)
- end
- end
- end
-
- def gettags(tagOrId)
- list(tk_send_without_enc('gettags', tagid(tagOrId))).collect{|tag|
- TkcTag.id2obj(self, tag)
- }
- end
-
- def icursor(tagOrId, index)
- tk_send_without_enc('icursor', tagid(tagOrId), index)
- self
- end
-
- def index(tagOrId, idx)
- number(tk_send_without_enc('index', tagid(tagOrId), idx))
- end
-
- def insert(tagOrId, index, string)
- tk_send_without_enc('insert', tagid(tagOrId), index,
- _get_eval_enc_str(string))
- self
- end
-
- def lower(tag, below=nil)
- if below
- tk_send_without_enc('lower', tagid(tag), tagid(below))
- else
- tk_send_without_enc('lower', tagid(tag))
- end
- self
- end
-
- def move(tag, x, y)
- tk_send_without_enc('move', tagid(tag), x, y)
- self
- end
-
- def postscript(keys)
- tk_send("postscript", *hash_kv(keys))
- end
-
- def raise(tag, above=nil)
- if above
- tk_send_without_enc('raise', tagid(tag), tagid(above))
- else
- tk_send_without_enc('raise', tagid(tag))
- end
- self
- end
-
- def scale(tag, x, y, xs, ys)
- tk_send_without_enc('scale', tagid(tag), x, y, xs, ys)
- self
- end
-
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send_without_enc('scan', 'dragto', x, y)
- self
- end
-
- def select(mode, *args)
- r = tk_send_without_enc('select', mode, *args)
- (mode == 'item')? TkcItem.id2obj(self, r): self
- end
- def select_adjust(tagOrId, index)
- select('adjust', tagid(tagOrId), index)
- end
- def select_clear
- select('clear')
- end
- def select_from(tagOrId, index)
- select('from', tagid(tagOrId), index)
- end
- def select_item
- select('item')
- end
- def select_to(tagOrId, index)
- select('to', tagid(tagOrId), index)
- end
-
- def itemtype(tag)
- TkcItem.type2class(tk_send('type', tagid(tag)))
- end
-
- def xview(*index)
- if index.size == 0
- list(tk_send_without_enc('xview'))
- else
- tk_send_without_enc('xview', *index)
- self
- end
- end
- def xview_moveto(*index)
- xview('moveto', *index)
- end
- def xview_scroll(*index)
- xview('scroll', *index)
- end
-
- def yview(*index)
- if index.size == 0
- list(tk_send_without_enc('yview'))
- else
- tk_send_without_enc('yview', *index)
- self
- end
- end
- def yview_moveto(*index)
- yview('moveto', *index)
- end
- def yview_scroll(*index)
- yview('scroll', *index)
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb
deleted file mode 100644
index f105576fd6..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/scrolledframe.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Scrolledframe < Tk::Iwidgets::Scrolledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Scrolledframe
- TkCommandNames = ['::iwidgets::scrolledframe'.freeze].freeze
- WidgetClassName = 'Scrolledframe'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def justify(dir)
- tk_call(@path, 'justify', dir)
- self
- end
-
- def xview(*index)
- if index.size == 0
- list(tk_send_without_enc('xview'))
- else
- tk_send_without_enc('xview', *index)
- self
- end
- end
- def xview_moveto(*index)
- xview('moveto', *index)
- end
- def xview_scroll(*index)
- xview('scroll', *index)
- end
-
- def yview(*index)
- if index.size == 0
- list(tk_send_without_enc('yview'))
- else
- tk_send_without_enc('yview', *index)
- self
- end
- end
- def yview_moveto(*index)
- yview('moveto', *index)
- end
- def yview_scroll(*index)
- yview('scroll', *index)
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb
deleted file mode 100644
index 4ee5abe9fc..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/scrolledhtml.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Scrolledhtml < Tk::Iwidgets::Scrolledtext
- end
- end
-end
-
-class Tk::Iwidgets::Scrolledhtml
- TkCommandNames = ['::iwidgets::scrolledhtml'.freeze].freeze
- WidgetClassName = 'Scrolledhtml'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'update'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'fontname' << 'link' << 'alink' << 'textbackground'
- end
- private :__strval_optkeys
-
- def __font_optkeys
- super() << 'fixedfont'
- end
- private :__font_optkeys
-
- def import(href)
- tk_call(@path, 'import', href)
- self
- end
-
- def import_link(href)
- tk_call(@path, 'import', '-link', href)
- self
- end
-
- def pwd
- tk_call(@path, 'pwd')
- end
-
- def render(htmltext, workdir=None)
- tk_call(@path, 'render', htmltext, workdir)
- self
- end
-
- def title
- tk_call(@path, 'title')
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb
deleted file mode 100644
index 94949c5524..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb
+++ /dev/null
@@ -1,208 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/scrolledlistbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/listbox'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Scrolledlistbox < Tk::Iwidgets::Scrolledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Scrolledlistbox
- TkCommandNames = ['::iwidgets::scrolledlistbox'.freeze].freeze
- WidgetClassName = 'Scrolledlistbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'textbackground'
- end
- private :__strval_optkeys
-
- def __tkvariable_optkeys
- super() << 'listvariable'
- end
- private :__tkvariable_optkeys
-
- def __font_optkeys
- super() << 'textfont'
- end
- private :__font_optkeys
-
- ################################
-
- def initialize(*args)
- super(*args)
- @listbox = component_widget('listbox')
- end
-
- def method_missing(id, *args)
- if @listbox.respond_to?(id)
- @listbox.__send__(id, *args)
- else
- super(id, *args)
- end
- end
-
- ################################
-
- def clear
- tk_call(@path, 'clear')
- self
- end
-
- def get_curselection
- tk_call(@path, 'getcurselection')
- end
-
- def justify(dir)
- tk_call(@path, 'justify', dir)
- self
- end
-
- def selected_item_count
- number(tk_call(@path, 'selecteditemcount'))
- end
-
- def sort(*params, &b)
- # see 'lsort' man page about params
- if b
- tk_call(@path, 'sort', '-command', proc(&b), *params)
- else
- tk_call(@path, 'sort', *params)
- end
- self
- end
- def sort_ascending
- tk_call(@path, 'sort', 'ascending')
- self
- end
- def sort_descending
- tk_call(@path, 'sort', 'descending')
- self
- end
-
- #####################################
-
- def bbox(index)
- list(tk_send_without_enc('bbox', index))
- end
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
- def get(*index)
- _fromUTF8(tk_send_without_enc('get', *index))
- end
- def insert(index, *args)
- tk_send('insert', index, *args)
- self
- end
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send_without_enc('scan', 'dragto', x, y)
- self
- end
- def see(index)
- tk_send_without_enc('see', index)
- self
- end
-
- #####################################
-
- include TkListItemConfig
-
- def tagid(tag)
- if tag.kind_of?(Tk::Itk::Component)
- tag.name
- else
- super(tag)
- end
- end
- private :tagid
-
- #####################################
-
- def activate(y)
- tk_send_without_enc('activate', y)
- self
- end
- def curselection
- list(tk_send_without_enc('curselection'))
- end
- def get(first, last=nil)
- if last
- # tk_split_simplelist(_fromUTF8(tk_send_without_enc('get', first, last)))
- tk_split_simplelist(tk_send_without_enc('get', first, last),
- false, true)
- else
- _fromUTF8(tk_send_without_enc('get', first))
- end
- end
- def nearest(y)
- tk_send_without_enc('nearest', y).to_i
- end
- def size
- tk_send_without_enc('size').to_i
- end
- def selection_anchor(index)
- tk_send_without_enc('selection', 'anchor', index)
- self
- end
- def selection_clear(first, last=None)
- tk_send_without_enc('selection', 'clear', first, last)
- self
- end
- def selection_includes(index)
- bool(tk_send_without_enc('selection', 'includes', index))
- end
- def selection_set(first, last=None)
- tk_send_without_enc('selection', 'set', first, last)
- self
- end
-
- def index(idx)
- tk_send_without_enc('index', idx).to_i
- end
-
- #####################################
-
- def xview(*index)
- if index.size == 0
- list(tk_send_without_enc('xview'))
- else
- tk_send_without_enc('xview', *index)
- self
- end
- end
- def xview_moveto(*index)
- xview('moveto', *index)
- end
- def xview_scroll(*index)
- xview('scroll', *index)
- end
-
- def yview(*index)
- if index.size == 0
- list(tk_send_without_enc('yview'))
- else
- tk_send_without_enc('yview', *index)
- self
- end
- end
- def yview_moveto(*index)
- yview('moveto', *index)
- end
- def yview_scroll(*index)
- yview('scroll', *index)
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb
deleted file mode 100644
index 1e2898988c..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb
+++ /dev/null
@@ -1,569 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/scrolledtext.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/text'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Scrolledtext < Tk::Iwidgets::Scrolledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Scrolledtext
- TkCommandNames = ['::iwidgets::scrolledtext'.freeze].freeze
- WidgetClassName = 'Scrolledtext'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'textbackground'
- end
- private :__strval_optkeys
-
- def __font_optkeys
- super() << 'textfont'
- end
- private :__font_optkeys
-
- ################################
-
- def initialize(*args)
- super(*args)
- @text = component_widget('text')
- end
-
- def method_missing(id, *args)
- if @text.respond_to?(id)
- @text.__send__(id, *args)
- else
- super(id, *args)
- end
- end
-
- ################################
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def clear
- tk_call(@path, 'clear')
- self
- end
-
- def import(file, idx=nil)
- if idx
- tk_call(@path, 'import', file, index(idx))
- else
- tk_call(@path, 'import', file)
- end
- self
- end
-
- def export(file)
- tk_call(@path, 'export', file)
- self
- end
-
- #####################################
-
- include TkTextTagConfig
-
- def tagid(tag)
- if tag.kind_of?(Tk::Itk::Component)
- tag.name
- else
- super(tag)
- end
- end
- private :tagid
-
- def bbox(index)
- list(tk_send('bbox', index))
- end
- def compare(idx1, op, idx2)
- bool(tk_send_without_enc('compare', _get_eval_enc_str(idx1),
- op, _get_eval_enc_str(idx2)))
- end
-
- def debug
- bool(tk_send_without_enc('debug'))
- end
- def debug=(boolean)
- tk_send_without_enc('debug', boolean)
- #self
- boolean
- end
-
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
-
- def dlineinfo(index)
- list(tk_send_without_enc('dlineinfo', _get_eval_enc_str(index)))
- end
-
- def get(*index)
- _fromUTF8(tk_send_without_enc('get', *index))
- end
- def get_displaychars(*index)
- # Tk8.5 feature
- get('-displaychars', *index)
- end
-
- def image_cget_tkstring(index, slot)
- _fromUTF8(tk_send_without_enc('image', 'cget',
- _get_eval_enc_str(index), "-#{slot.to_s}"))
- end
- def image_cget_strict(index, slot)
- case slot.to_s
- when 'text', 'label', 'show', 'data', 'file'
- _fromUTF8(tk_send_without_enc('image', 'cget',
- _get_eval_enc_str(index), "-#{slot}"))
- else
- tk_tcl2ruby(_fromUTF8(tk_send_without_enc('image', 'cget',
- _get_eval_enc_str(index),
- "-#{slot}")))
- end
- end
- def image_cget(index, slot)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- image_cget_strict(index, slot)
- else
- begin
- image_cget_strict(index, slot)
- rescue => e
- begin
- if current_image_configinfo.has_key?(slot.to_s)
- # error on known option
- fail e
- else
- # unknown option
- nil
- end
- rescue
- fail e # tag error
- end
- end
- end
- end
-
- def image_configure(index, slot, value=None)
- if slot.kind_of? Hash
- _fromUTF8(tk_send_without_enc('image', 'configure',
- _get_eval_enc_str(index),
- *hash_kv(slot, true)))
- else
- _fromUTF8(tk_send_without_enc('image', 'configure',
- _get_eval_enc_str(index),
- "-#{slot}",
- _get_eval_enc_str(value)))
- end
- self
- end
-
- def image_configinfo(index, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- case slot.to_s
- when 'text', 'label', 'show', 'data', 'file'
- #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}")))
- conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true)
- else
- #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}")))
- conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true)
- end
- conf[0] = conf[0][1..-1]
- conf
- else
- #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).collect{|conflist|
- # conf = tk_split_simplelist(conflist)
- tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).collect{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- conf[0] = conf[0][1..-1]
- case conf[0]
- when 'text', 'label', 'show', 'data', 'file'
- else
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf[4]
- if conf[4].index('{')
- conf[4] = tk_split_list(conf[4])
- else
- conf[4] = tk_tcl2ruby(conf[4])
- end
- end
- end
- conf[1] = conf[1][1..-1] if conf.size == 2 # alias info
- conf
- }
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- case slot.to_s
- when 'text', 'label', 'show', 'data', 'file'
- #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}")))
- conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true)
- else
- #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}")))
- conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true)
- end
- key = conf.shift[1..-1]
- { key => conf }
- else
- ret = {}
- #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).each{|conflist|
- # conf = tk_split_simplelist(conflist)
- tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).each{|conflist|
- conf = tk_split_simplelist(conflist, false, true)
- key = conf.shift[1..-1]
- case key
- when 'text', 'label', 'show', 'data', 'file'
- else
- if conf[2]
- if conf[2].index('{')
- conf[2] = tk_split_list(conf[2])
- else
- conf[2] = tk_tcl2ruby(conf[2])
- end
- end
- if conf[3]
- if conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- end
- if conf.size == 1
- ret[key] = conf[0][1..-1] # alias info
- else
- ret[key] = conf
- end
- }
- ret
- end
- end
- end
-
- def current_image_configinfo(index, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- conf = image_configinfo(index, slot)
- {conf[0] => conf[4]}
- else
- ret = {}
- image_configinfo(index).each{|conf|
- ret[conf[0]] = conf[4] if conf.size > 2
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- image_configinfo(index, slot).each{|k, conf|
- ret[k] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-
- def image_names
- #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'names'))).collect{|elt|
- tk_split_simplelist(tk_send_without_enc('image', 'names'), false, true).collect{|elt|
- tagid2obj(elt)
- }
- end
-
- def index(idx)
- tk_send_without_enc('index', _get_eval_enc_str(idx))
- end
-
- def insert(index, *args)
- tk_send('insert', index, *args)
- self
- end
-
- def mark_names
- #tk_split_simplelist(_fromUTF8(tk_send_without_enc('mark', 'names'))).collect{|elt|
- tk_split_simplelist(tk_send_without_enc('mark', 'names'), false, true).collect{|elt|
- tagid2obj(elt)
- }
- end
-
- def mark_gravity(mark, direction=nil)
- if direction
- tk_send_without_enc('mark', 'gravity',
- _get_eval_enc_str(mark), direction)
- self
- else
- tk_send_without_enc('mark', 'gravity', _get_eval_enc_str(mark))
- end
- end
-
- def mark_set(mark, index)
- tk_send_without_enc('mark', 'set', _get_eval_enc_str(mark),
- _get_eval_enc_str(index))
- self
- end
- alias set_mark mark_set
-
- def mark_unset(*marks)
- tk_send_without_enc('mark', 'unset',
- *(marks.collect{|mark| _get_eval_enc_str(mark)}))
- self
- end
- alias unset_mark mark_unset
-
- def mark_next(index)
- tagid2obj(_fromUTF8(tk_send_without_enc('mark', 'next',
- _get_eval_enc_str(index))))
- end
- alias next_mark mark_next
-
- def mark_previous(index)
- tagid2obj(_fromUTF8(tk_send_without_enc('mark', 'previous',
- _get_eval_enc_str(index))))
- end
- alias previous_mark mark_previous
-
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send_without_enc('scan', 'dragto', x, y)
- self
- end
-
-
- def _ktext_length(txt)
- if TkCore::WITH_ENCODING ### Ruby 1.9 !!!!!!!!!!!!!
- return txt.length
- end
- ###########################
-
- if $KCODE !~ /n/i
- return txt.gsub(/[^\Wa-zA-Z_\d]/, ' ').length
- end
-
- # $KCODE == 'NONE'
- if JAPANIZED_TK
- tk_call_without_enc('kstring', 'length',
- _get_eval_enc_str(txt)).to_i
- else
- begin
- tk_call_without_enc('encoding', 'convertto', 'ascii',
- _get_eval_enc_str(txt)).length
- rescue StandardError, NameError
- # sorry, I have no plan
- txt.length
- end
- end
- end
- private :_ktext_length
-
- def tksearch(*args)
- # call 'search' subcommand of text widget
- # args ::= [<array_of_opts>] <pattern> <start_index> [<stop_index>]
- # If <pattern> is regexp, then it must be a regular expression of Tcl
- if args[0].kind_of?(Array)
- opts = args.shift.collect{|opt| '-' + opt.to_s }
- else
- opts = []
- end
-
- opts << '--'
-
- ret = tk_send('search', *(opts + args))
- if ret == ""
- nil
- else
- ret
- end
- end
-
- def tksearch_with_count(*args)
- # call 'search' subcommand of text widget
- # args ::= [<array_of_opts>] <var> <pattern> <start_index> [<stop_index>]
- # If <pattern> is regexp, then it must be a regular expression of Tcl
- if args[0].kind_of?(Array)
- opts = args.shift.collect{|opt| '-' + opt.to_s }
- else
- opts = []
- end
-
- opts << '-count' << args.shift << '--'
-
- ret = tk_send('search', *(opts + args))
- if ret == ""
- nil
- else
- ret
- end
- end
-
- def search_with_length(pat,start,stop=None)
- pat = pat.chr if pat.kind_of? Integer
- if stop != None
- return ["", 0] if compare(start,'>=',stop)
- txt = get(start,stop)
- if (pos = txt.index(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of? String
- #return [index(start + " + #{pos} chars"), pat.split('').length]
- return [index(start + " + #{pos} chars"),
- _ktext_length(pat), pat.dup]
- else
- #return [index(start + " + #{pos} chars"), $&.split('').length]
- return [index(start + " + #{pos} chars"),
- _ktext_length(match), match]
- end
- else
- return ["", 0]
- end
- else
- txt = get(start,'end - 1 char')
- if (pos = txt.index(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of? String
- #return [index(start + " + #{pos} chars"), pat.split('').length]
- return [index(start + " + #{pos} chars"),
- _ktext_length(pat), pat.dup]
- else
- #return [index(start + " + #{pos} chars"), $&.split('').length]
- return [index(start + " + #{pos} chars"),
- _ktext_length(match), match]
- end
- else
- txt = get('1.0','end - 1 char')
- if (pos = txt.index(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of? String
- #return [index("1.0 + #{pos} chars"), pat.split('').length]
- return [index("1.0 + #{pos} chars"),
- _ktext_length(pat), pat.dup]
- else
- #return [index("1.0 + #{pos} chars"), $&.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(match), match]
- end
- else
- return ["", 0]
- end
- end
- end
- end
-
- def search(pat,start,stop=None)
- search_with_length(pat,start,stop)[0]
- end
-
- def rsearch_with_length(pat,start,stop=None)
- pat = pat.chr if pat.kind_of? Integer
- if stop != None
- return ["", 0] if compare(start,'<=',stop)
- txt = get(stop,start)
- if (pos = txt.rindex(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of? String
- #return [index(stop + " + #{pos} chars"), pat.split('').length]
- return [index(stop + " + #{pos} chars"), _ktext_length(pat), pat.dup]
- else
- #return [index(stop + " + #{pos} chars"), $&.split('').length]
- return [index(stop + " + #{pos} chars"), _ktext_length(match), match]
- end
- else
- return ["", 0]
- end
- else
- txt = get('1.0',start)
- if (pos = txt.rindex(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of? String
- #return [index("1.0 + #{pos} chars"), pat.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup]
- else
- #return [index("1.0 + #{pos} chars"), $&.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(match), match]
- end
- else
- txt = get('1.0','end - 1 char')
- if (pos = txt.rindex(pat))
- match = $&
- #pos = txt[0..(pos-1)].split('').length if pos > 0
- pos = _ktext_length(txt[0..(pos-1)]) if pos > 0
- if pat.kind_of? String
- #return [index("1.0 + #{pos} chars"), pat.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup]
- else
- #return [index("1.0 + #{pos} chars"), $&.split('').length]
- return [index("1.0 + #{pos} chars"), _ktext_length(match), match]
- end
- else
- return ["", 0]
- end
- end
- end
- end
-
- def rsearch(pat,start,stop=None)
- rsearch_with_length(pat,start,stop)[0]
- end
-
- def see(index)
- tk_send_without_enc('see', index)
- self
- end
-
- ###############################
-
- def xview(*index)
- if index.size == 0
- list(tk_send_without_enc('xview'))
- else
- tk_send_without_enc('xview', *index)
- self
- end
- end
- def xview_moveto(*index)
- xview('moveto', *index)
- end
- def xview_scroll(*index)
- xview('scroll', *index)
- end
-
- def yview(*index)
- if index.size == 0
- list(tk_send_without_enc('yview'))
- else
- tk_send_without_enc('yview', *index)
- self
- end
- end
- def yview_moveto(*index)
- yview('moveto', *index)
- end
- def yview_scroll(*index)
- yview('scroll', *index)
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb
deleted file mode 100644
index a8b4e5a27b..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/scrolledwidget.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Scrolledwidget < Tk::Iwidgets::Labeledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Scrolledwidget
- TkCommandNames = ['::iwidgets::scrolledwidget'.freeze].freeze
- WidgetClassName = 'Scrolledwidget'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb b/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb
deleted file mode 100644
index 333f68e306..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/selectionbox.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Selectionbox < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Selectionbox
- TkCommandNames = ['::iwidgets::selectionbox'.freeze].freeze
- WidgetClassName = 'Selectionbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'itemson' << 'selectionon'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'itemslabel' << 'selectionlabel'
- end
- private :__strval_optkeys
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def clear_items
- tk_call(@path, 'clear', 'items')
- self
- end
-
- def clear_selection
- tk_call(@path, 'clear', 'selection')
- self
- end
-
- def get
- tk_call(@path, 'get')
- end
-
- def insert_items(idx, *args)
- tk_call(@path, 'insert', 'items', idx, *args)
- end
-
- def insert_selection(pos, text)
- tk_call(@path, 'insert', 'selection', pos, text)
- end
-
- def select_item
- tk_call(@path, 'selectitem')
- self
- end
-
- # based on Tk::Listbox ( and TkTextWin )
- def curselection
- list(tk_send_without_enc('curselection'))
- end
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
- def index(idx)
- tk_send_without_enc('index', idx).to_i
- end
- def nearest(y)
- tk_send_without_enc('nearest', y).to_i
- end
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send_without_enc('scan', 'dragto', x, y)
- self
- end
- def selection_anchor(index)
- tk_send_without_enc('selection', 'anchor', index)
- self
- end
- def selection_clear(first, last=None)
- tk_send_without_enc('selection', 'clear', first, last)
- self
- end
- def selection_includes(index)
- bool(tk_send_without_enc('selection', 'includes', index))
- end
- def selection_set(first, last=None)
- tk_send_without_enc('selection', 'set', first, last)
- self
- end
- def size
- tk_send_without_enc('size').to_i
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb b/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb
deleted file mode 100644
index 0d0b94e8d2..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb
+++ /dev/null
@@ -1,93 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/selectiondialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Selectiondialog < Tk::Iwidgets::Dialog
- end
- end
-end
-
-class Tk::Iwidgets::Selectiondialog
- TkCommandNames = ['::iwidgets::selectiondialog'.freeze].freeze
- WidgetClassName = 'Selectiondialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def clear_items
- tk_call(@path, 'clear', 'items')
- self
- end
-
- def clear_selection
- tk_call(@path, 'clear', 'selection')
- self
- end
-
- def get
- tk_call(@path, 'get')
- end
-
- def insert_items(idx, *args)
- tk_call(@path, 'insert', 'items', idx, *args)
- end
-
- def insert_selection(pos, text)
- tk_call(@path, 'insert', 'selection', pos, text)
- end
-
- def select_item
- tk_call(@path, 'selectitem')
- self
- end
-
- # based on Tk::Listbox ( and TkTextWin )
- def curselection
- list(tk_send_without_enc('curselection'))
- end
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
- def index(idx)
- tk_send_without_enc('index', idx).to_i
- end
- def nearest(y)
- tk_send_without_enc('nearest', y).to_i
- end
- def scan_mark(x, y)
- tk_send_without_enc('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send_without_enc('scan', 'dragto', x, y)
- self
- end
- def selection_anchor(index)
- tk_send_without_enc('selection', 'anchor', index)
- self
- end
- def selection_clear(first, last=None)
- tk_send_without_enc('selection', 'clear', first, last)
- self
- end
- def selection_includes(index)
- bool(tk_send_without_enc('selection', 'includes', index))
- end
- def selection_set(first, last=None)
- tk_send_without_enc('selection', 'set', first, last)
- self
- end
- def size
- tk_send_without_enc('size').to_i
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/setup.rb b/ext/tk/lib/tkextlib/iwidgets/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/iwidgets/shell.rb b/ext/tk/lib/tkextlib/iwidgets/shell.rb
deleted file mode 100644
index b3f8dc7fbe..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/shell.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/shell.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Shell < Tk::Itk::Toplevel
- end
- end
-end
-
-class Tk::Iwidgets::Shell
- TkCommandNames = ['::iwidgets::shell'.freeze].freeze
- WidgetClassName = 'Shell'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def activate
- tk_call(@path, 'activate') # may return val of deactivate method
- end
-
- def center(win=None)
- tk_call(@path, 'center', win)
- self
- end
-
- def child_site
- window(tk_call(@path, 'childsite'))
- end
-
- def deactivate(val=None)
- tk_call(@path, 'deactivate', val)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/spindate.rb b/ext/tk/lib/tkextlib/iwidgets/spindate.rb
deleted file mode 100644
index 8860348cc0..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/spindate.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/spindate.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Spindate < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Spindate
- TkCommandNames = ['::iwidgets::spindate'.freeze].freeze
- WidgetClassName = 'Spindate'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'dayon' << 'monthon' << 'yearon'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'daylabel' << 'monthformat' << 'monthlabel' << 'yearlabel'
- end
- private :__strval_optkeys
-
- def get_string
- tk_call(@path, 'get', '-string')
- end
- alias get get_string
-
- def get_clicks
- number(tk_call(@path, 'get', '-clicks'))
- end
-
- def show(date=None)
- tk_call(@path, 'show', date)
- self
- end
- def show_now
- tk_call(@path, 'show', 'now')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/spinint.rb b/ext/tk/lib/tkextlib/iwidgets/spinint.rb
deleted file mode 100644
index 85736d095c..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/spinint.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/spinint.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Spinint < Tk::Iwidgets::Spinner
- end
- end
-end
-
-class Tk::Iwidgets::Spinint
- TkCommandNames = ['::iwidgets::spinint'.freeze].freeze
- WidgetClassName = 'Spinint'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'wrap'
- end
- private :__boolval_optkeys
-
- def __numlistval_optkeys
- super() << 'range'
- end
- private :__numlistval_optkeys
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/spinner.rb b/ext/tk/lib/tkextlib/iwidgets/spinner.rb
deleted file mode 100644
index 49968e86d8..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/spinner.rb
+++ /dev/null
@@ -1,170 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/spinner.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Spinner < Tk::Iwidgets::Labeledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Spinner
- TkCommandNames = ['::iwidgets::spinner'.freeze].freeze
- WidgetClassName = 'Spinner'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include Tk::ValidateConfigure
-
- class EntryfieldValidate < TkValidateCommand
- #class CalCmdArgs < TkUtil::CallbackSubst
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?c, ?s, :char ],
- [ ?P, ?s, :post ],
- [ ?S, ?s, :current ],
- [ ?W, ?w, :widget ],
- nil
- ]
- PROC_TBL = [
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
- end
-
- def self._config_keys
- ['validate', 'invalid']
- end
- end
-
- def __validation_class_list
- super() << EntryfieldValidate
- end
-
- Tk::ValidateConfigure.__def_validcmd(binding, EntryfieldValidate)
-
- ####################################
-
- def up
- tk_call_without_enc(@path, 'up')
- self
- end
-
- def down
- tk_call_without_enc(@path, 'down')
- self
- end
-
- def clear
- tk_call_without_enc(@path, 'clear')
- self
- end
-
- def delete(first, last=None)
- tk_send_without_enc('delete', first, last)
- self
- end
-
- def value
- _fromUTF8(tk_send_without_enc('get'))
- end
- def value= (val)
- tk_send_without_enc('delete', 0, 'end')
- tk_send_without_enc('insert', 0, _get_eval_enc_str(val))
- val
- end
- alias get value
- alias set value=
-
- def cursor=(index)
- tk_send_without_enc('icursor', index)
- #self
- index
- end
- alias icursor cursor=
-
- def index(idx)
- number(tk_send_without_enc('index', idx))
- end
-
- def insert(pos,text)
- tk_send_without_enc('insert', pos, _get_eval_enc_str(text))
- self
- end
-
- def mark(pos)
- tk_send_without_enc('scan', 'mark', pos)
- self
- end
- def dragto(pos)
- tk_send_without_enc('scan', 'dragto', pos)
- self
- end
- def selection_adjust(index)
- tk_send_without_enc('selection', 'adjust', index)
- self
- end
- def selection_clear
- tk_send_without_enc('selection', 'clear')
- self
- end
- def selection_from(index)
- tk_send_without_enc('selection', 'from', index)
- self
- end
- def selection_present()
- bool(tk_send_without_enc('selection', 'present'))
- end
- def selection_range(s, e)
- tk_send_without_enc('selection', 'range', s, e)
- self
- end
- def selection_to(index)
- tk_send_without_enc('selection', 'to', index)
- self
- end
-
- # based on tk/scrollable.rb
- def xview(*index)
- if index.size == 0
- list(tk_send_without_enc('xview'))
- else
- tk_send_without_enc('xview', *index)
- self
- end
- end
- def xview_moveto(*index)
- xview('moveto', *index)
- end
- def xview_scroll(*index)
- xview('scroll', *index)
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/spintime.rb b/ext/tk/lib/tkextlib/iwidgets/spintime.rb
deleted file mode 100644
index 9b280ec0e4..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/spintime.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/spintime.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Spintime < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Spintime
- TkCommandNames = ['::iwidgets::spintime'.freeze].freeze
- WidgetClassName = 'Spintime'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'houron' << 'militaryon' << 'minutelabel' << 'secondlabel'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'hourlabel' << 'minuteon' << 'secondon'
- end
- private :__strval_optkeys
-
- def get_string
- tk_call(@path, 'get', '-string')
- end
- alias get get_string
-
- def get_clicks
- number(tk_call(@path, 'get', '-clicks'))
- end
-
- def show(date=None)
- tk_call(@path, 'show', date)
- self
- end
- def show_now
- tk_call(@path, 'show', 'now')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb b/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb
deleted file mode 100644
index 89e3362185..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb
+++ /dev/null
@@ -1,182 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/tabnotebook.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Tabnotebook < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Tabnotebook
- TkCommandNames = ['::iwidgets::tabnotebook'.freeze].freeze
- WidgetClassName = 'Tabnotebook'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'pagecget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'pageconfigure', id]
- end
- private :__item_config_cmd
-
- def __item_strval_optkeys(id)
- super(id) << 'tabbackground' << 'tabforeground'
- end
- private :__item_strval_optkeys
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- alias pagecget_tkstring itemcget_tkstring
- alias pagecget itemcget
- alias pagecget_strict itemcget_strict
- alias pageconfigure itemconfigure
- alias pageconfiginfo itemconfiginfo
- alias current_pageconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def __boolval_optkeys
- super() << 'auto' << 'equaltabs' << 'raiseselect' << 'tabborders'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'backdrop' << 'tabbackground' << 'tabforeground'
- end
- private :__strval_optkeys
-
- def initialize(*args)
- super(*args)
- @tabset = self.component_widget('tabset')
- end
-
- def add(keys={})
- window(tk_call(@path, 'add', *hash_kv(keys)))
- end
-
- def child_site_list
- list(tk_call(@path, 'childsite'))
- end
-
- def child_site(idx)
- window(tk_call(@path, 'childsite', index(idx)))
- end
-
- def delete(idx1, idx2=nil)
- if idx2
- tk_call(@path, 'delete', index(idx1), index(idx2))
- else
- tk_call(@path, 'delete', index(idx1))
- end
- self
- end
-
- def index(idx)
- #number(tk_call(@path, 'index', tagid(idx)))
- @tabset.index(tagid(idx))
- end
-
- def insert(idx, keys={})
- window(tk_call(@path, 'insert', index(idx), *hash_kv(keys)))
- end
-
- def next
- tk_call(@path, 'next')
- self
- end
-
- def prev
- tk_call(@path, 'prev')
- self
- end
-
- def select(idx)
- tk_call(@path, 'select', index(idx))
- self
- end
-
- def show_tab(idx)
- @tabset.show_tab(idx)
- self
- end
-
- def scrollcommand(cmd=Proc.new)
- configure_cmd 'scrollcommand', cmd
- self
- end
- alias xscrollcommand scrollcommand
- alias yscrollcommand scrollcommand
-
- def xscrollbar(bar=nil)
- if bar
- @scrollbar = bar
- @scrollbar.orient 'horizontal'
- self.scrollcommand {|*arg| @scrollbar.set(*arg)}
- @scrollbar.command {|*arg| self.xview(*arg)}
- Tk.update # avoid scrollbar trouble
- end
- @scrollbar
- end
- def yscrollbar(bar=nil)
- if bar
- @scrollbar = bar
- @scrollbar.orient 'vertical'
- self.scrollcommand {|*arg| @scrollbar.set(*arg)}
- @scrollbar.command {|*arg| self.yview(*arg)}
- Tk.update # avoid scrollbar trouble
- end
- @scrollbar
- end
- alias scrollbar yscrollbar
-
- def view(*index)
- if index.size == 0
- idx = num_or_str(tk_send_without_enc('view'))
- if idx.kind_of?(Fixnum) && idx < 0
- nil
- else
- idx
- end
- else
- tk_send_without_enc('view', *index)
- self
- end
- end
- alias xview view
- alias yview view
-
- def view_moveto(*index)
- view('moveto', *index)
- end
- alias xview_moveto view_moveto
- alias yview_moveto view_moveto
- def view_scroll(index, what='pages')
- view('scroll', index, what)
- end
- alias xview_scroll view_scroll
- alias yview_scroll view_scroll
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/tabset.rb b/ext/tk/lib/tkextlib/iwidgets/tabset.rb
deleted file mode 100644
index 816ea087ef..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/tabset.rb
+++ /dev/null
@@ -1,146 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/tabset.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Tabset < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Tabset
- TkCommandNames = ['::iwidgets::tabset'.freeze].freeze
- WidgetClassName = 'Tabset'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'tabcget', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'tabconfigure', id]
- end
- private :__item_config_cmd
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- alias tabcget_tkstring itemcget_tkstring
- alias tabcget itemcget
- alias tabcget_strict itemcget_strict
- alias tabconfigure itemconfigure
- alias tabconfiginfo itemconfiginfo
- alias current_tabconfiginfo current_itemconfiginfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- ####################################
-
- def __boolval_optkeys
- super() << 'equaltabs' << 'raiseselect' << 'tabborders'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'backdrop'
- end
- private :__strval_optkeys
-
- def add(keys={})
- window(tk_call(@path, 'add', *hash_kv(keys)))
- end
-
- def delete(idx1, idx2=nil)
- if idx2
- tk_call(@path, 'delete', index(idx1), index(idx2))
- else
- tk_call(@path, 'delete', index(idx1))
- end
- self
- end
-
- def index(idx)
- number(tk_call(@path, 'index', tagid(idx)))
- end
-
- def insert(idx, keys={})
- window(tk_call(@path, 'insert', index(idx), *hash_kv(keys)))
- end
-
- def next
- tk_call(@path, 'next')
- self
- end
-
- def prev
- tk_call(@path, 'prev')
- self
- end
-
- def select(idx)
- tk_call(@path, 'select', index(idx))
- self
- end
-
- def show_tab(idx)
- if index(idx) == 0
- self.start = 0
- return
- end
-
- reutrn unless @canvas ||= self.winfo_children[0]
-
- delta = 1 if (delta = cget(:gap)) == 'overlap' ||
- (delta = self.winfo_pixels(delta) + 1) <= 0
-
- case cget(:tabpos)
- when 's', 'n'
- if (head = tabcget(idx, :left)) < 0
- self.start -= head
- return
- end
- tabs_size = @canvas.winfo_width
- tab_start, tab_end = @canvas .
- find_overlapping(head, 0, head + delta, @canvas.winfo_height) .
- find_all{|id| @canvas.itemtype(id) == TkcPolygon} .
- map!{|id| bbox = @canvas.bbox(id); [bbox[0], bbox[2]]} . max
-
- when 'e', 'w'
- if (head = tabcget(idx, :top)) < 0
- self.start -= head
- return
- end
- tabs_size = @canvas.winfo_height
- tab_start, tab_end = @canvas .
- find_overlapping(0, head, @canvas.winfo_width, head + delta) .
- find_all{|id| @canvas.itemtype(id) == TkcPolygon} .
- map!{|id| bbox = @canvas.bbox(id); [bbox[1], bbox[3]]} . max
- end
-
- if (size = tab_end - tab_start + 1) > tabs_size
- self.start -= tab_start
- elsif head + size > tabs_size
- self.start -= head + size - tabs_size
- end
-
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/timeentry.rb b/ext/tk/lib/tkextlib/iwidgets/timeentry.rb
deleted file mode 100644
index d4078e6e4f..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/timeentry.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/timeentry.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Timeentry < Tk::Iwidgets::Timefield
- end
- end
-end
-
-class Tk::Iwidgets::Timeentry
- TkCommandNames = ['::iwidgets::timeentry'.freeze].freeze
- WidgetClassName = 'Timeentry'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __strval_optkeys
- super() << 'closetext'
- end
- private :__strval_optkeys
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/timefield.rb b/ext/tk/lib/tkextlib/iwidgets/timefield.rb
deleted file mode 100644
index d759a0762f..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/timefield.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/timefield.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Timefield < Tk::Iwidgets::Labeledwidget
- end
- end
-end
-
-class Tk::Iwidgets::Timefield
- TkCommandNames = ['::iwidgets::timefield'.freeze].freeze
- WidgetClassName = 'Timefield'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'gmt'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'textbackground'
- end
- private :__strval_optkeys
-
- def __font_optkeys
- super() << 'textfont'
- end
- private :__font_optkeys
-
- def get_string
- tk_call(@path, 'get', '-string')
- end
- alias get get_string
-
- def get_clicks
- number(tk_call(@path, 'get', '-clicks'))
- end
-
- def valid?
- bool(tk_call(@path, 'isvalid'))
- end
- alias isvalid? valid?
-
- def show(time=None)
- tk_call(@path, 'show', time)
- self
- end
- def show_now
- tk_call(@path, 'show', 'now')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/toolbar.rb b/ext/tk/lib/tkextlib/iwidgets/toolbar.rb
deleted file mode 100644
index 7f2a54b88b..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/toolbar.rb
+++ /dev/null
@@ -1,113 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/toolbar.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Toolbar < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Toolbar
- TkCommandNames = ['::iwidgets::toolbar'.freeze].freeze
- WidgetClassName = 'Toolbar'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __tkvariable_optkeys
- super() << 'helpvariable'
- end
- private :__tkvariable_optkeys
-
- ####################################
-
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'itemcget', self.index(id)]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'itemconfigure', self.index(id)]
- end
- private :__item_config_cmd
-
- def __item_strval_optkeys(id)
- super(id) << 'helpstr' << 'balloonstr'
- end
- private :__item_strval_optkeys
-
- def tagid(tagOrId)
- if tagOrId.kind_of?(Tk::Itk::Component)
- tagOrId.name
- else
- #_get_eval_string(tagOrId)
- tagOrId
- end
- end
-
- ####################################
-
- def __strval_optkeys
- super() << 'balloonbackground' << 'balloonforeground'
- end
- private :__strval_optkeys
-
- def __tkvariable_optkeys
- super() << 'helpvariable'
- end
- private :__tkvariable_optkeys
-
- def __font_optkeys
- super() << 'balloonfont'
- end
- private :__font_optkeys
-
- def add(type, tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- window(tk_call(@path, 'add', type, tagid(tag), *hash_kv(keys)))
- tag
- end
-
- def delete(idx1, idx2=nil)
- if idx2
- tk_call(@path, 'delete', index(idx1), index(idx2))
- else
- tk_call(@path, 'delete', index(idx1))
- end
- self
- end
-
- def index(idx)
- number(tk_call(@path, 'index', tagid(idx)))
- end
-
- def insert(idx, type, tag=nil, keys={})
- if tag.kind_of?(Hash)
- keys = tag
- tag = nil
- end
- if tag
- tag = Tk::Itk::Component.new(self, tagid(tag))
- else
- tag = Tk::Itk::Component.new(self)
- end
- window(tk_call(@path, 'insert', index(idx), type,
- tagid(tag), *hash_kv(keys)))
- tag
- end
-end
diff --git a/ext/tk/lib/tkextlib/iwidgets/watch.rb b/ext/tk/lib/tkextlib/iwidgets/watch.rb
deleted file mode 100644
index c6e862b36a..0000000000
--- a/ext/tk/lib/tkextlib/iwidgets/watch.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/iwidgets/watch.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tkextlib/iwidgets.rb'
-
-module Tk
- module Iwidgets
- class Watch < Tk::Itk::Widget
- end
- end
-end
-
-class Tk::Iwidgets::Watch
- TkCommandNames = ['::iwidgets::watch'.freeze].freeze
- WidgetClassName = 'Watch'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'showampm'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'clockcolor' << 'hourcolor' << 'minutecolor' <<
- 'pivotcolor' << 'secondcolor' << 'tickcolor'
- end
- private :__strval_optkeys
-
- def get_string
- tk_call(@path, 'get', '-string')
- end
- alias get get_string
-
- def get_clicks
- number(tk_call(@path, 'get', '-clicks'))
- end
-
- def show(time=None)
- tk_call(@path, 'show', time)
- self
- end
- def show_now
- tk_call(@path, 'show', 'now')
- self
- end
-
- def watch(*args)
- unless args.empty?
- tk_call(@path, 'watch', *args)
- end
- component_path('canvas')
- end
-end
diff --git a/ext/tk/lib/tkextlib/pkg_checker.rb b/ext/tk/lib/tkextlib/pkg_checker.rb
deleted file mode 100755
index 76a25ca629..0000000000
--- a/ext/tk/lib/tkextlib/pkg_checker.rb
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# Ruby/Tk extension library checker
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-TkRoot.new.withdraw # hide root window
-
-name = File.basename(__FILE__)
-
-add_path = false
-verbose = false
-
-def help_msg
- print "Usage: #{$0} [-l] [-v] [-h] [--] [dir]\n"
- print "\tIf dir is omitted, check the directory that this command exists.\n"
- print "\tAvailable options are \n"
- print "\t -l : Add dir to $LOAD_PATH\n"
- print "\t (If dir == '<parent>/tkextlib', add <parent> also.)\n"
- print "\t -v : Verbose mode (show reason of fail)\n"
- print "\t -h : Show this message\n"
- print "\t -- : End of options\n"
-end
-
-while(ARGV[0] && ARGV[0][0] == ?-)
- case ARGV[0]
- when '--'
- ARGV.shift
- break;
- when '-l'
- ARGV.shift
- add_path = true
- when '-v'
- ARGV.shift
- verbose = true
- when '-h'
- help_msg
- exit(0)
- else
- print "Argument Error!! : unknown option '#{ARGV[0]}'\n"
- help_msg
- exit(1)
- end
-end
-
-if ARGV[0]
- dir = File.expand_path(ARGV[0])
-else
- dir = File.dirname(File.expand_path(__FILE__))
-end
-
-if add_path
- $LOAD_PATH.unshift(dir)
- if File.basename(dir) == 'tkextlib'
- $LOAD_PATH.unshift(File.dirname(dir))
- end
-end
-
-print "\nRuby/Tk extension library checker\n"
-print "( Note:: This check is very simple one. Shown status may be wrong. )\n"
-print "\n check directory :: #{dir}"
-print "\n $LOAD_PATH :: #{$LOAD_PATH.inspect}\n"
-
-def get_pkg_list(file)
- pkg_list = []
-
- File.foreach(file){|l|
- if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)TkPackage\s*\.\s*require\s*\(?\s*(["'])((\w|:)+)\1/
- pkg = [$2, :package]
- pkg_list << pkg unless pkg_list.member?(pkg)
- end
- if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)Tk\s*\.\s*load_tcllibrary\s*\(?\s*(["'])((\w|:)+)\1/
- pkg = [$2, :library]
- pkg_list << pkg unless pkg_list.member?(pkg)
- end
- if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)Tk\s*\.\s*load_tclscript\s*\(?\s*(["'])((\w|:)+)\1/
- pkg = [$2, :script]
- pkg_list << pkg unless pkg_list.member?(pkg)
- end
- if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)require\s*\(?\s*(["'])((\w|\/|:)+)\1/
- pkg = [$2, :require_ruby_lib]
- pkg_list << pkg unless pkg_list.member?(pkg)
- end
- }
-
- pkg_list
-end
-
-def check_pkg(file, verbose=false)
- pkg_list = get_pkg_list(file)
-
- error_list = []
- success_list = {}
-
- pkg_list.each{|name, type|
- next if success_list[name]
-
- begin
- case type
- when :package
- ver = TkPackage.require(name)
- success_list[name] = ver
- error_list.delete_if{|n, t| n == name}
-
- when :library
- Tk.load_tcllibrary(name)
- success_list[name] = :library
- error_list.delete_if{|n, t| n == name}
-
- when :script
- Tk.load_tclscript(name)
- success_list[name] = :script
- error_list.delete_if{|n, t| n == name}
-
- when :require_ruby_lib
- require name
-
- end
- rescue => e
- if verbose
- error_list << [name, type, e.message]
- else
- error_list << [name, type]
- end
- end
- }
-
- success_list.dup.each{|name, ver|
- unless ver.kind_of?(String)
- begin
- ver = TkPackage.require(name)
- sccess_list[name] = ver
- rescue
- end
- end
- }
-
- [success_list, error_list]
-end
-
-def subdir_check(dir, verbose=false)
- Dir.foreach(dir){|f|
- next if f == '.' || f == '..'
- if File.directory?(f)
- subdir_check(File.join(dir, f))
- elsif File.extname(f) == '.rb'
- path = File.join(dir, f)
- suc, err = check_pkg(path, verbose)
- if err.empty?
- print 'Ready : ', path, ' : require->', suc.inspect, "\n"
- else
- print '*LACK : ', path, ' : require->', suc.inspect,
- ' FAIL->', err.inspect, "\n"
- end
- end
- }
-end
-
-Dir.chdir(dir)
-
-(Dir['*.rb'] - ['setup.rb', name]).each{|f|
- subdir = File.basename(f, '.*')
-=begin
- begin
- # read 'setup.rb' as if the library has standard structure
- require File.join(subdir, 'setup.rb')
- rescue LoadError
- # ignore error
- end
-=end
- print "\n"
-
- suc, err = check_pkg(f, verbose)
- if err.empty?
- print 'Ready : ', f, ' : require->', suc.inspect, "\n"
- else
- print '*LACK : ', f, ' : require->', suc.inspect,
- ' FAIL->', err.inspect, "\n"
- end
-
- subdir_check(subdir, verbose) if File.directory?(subdir)
-}
diff --git a/ext/tk/lib/tkextlib/setup.rb b/ext/tk/lib/tkextlib/setup.rb
deleted file mode 100644
index 08ad32e99b..0000000000
--- a/ext/tk/lib/tkextlib/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before using Tk extension libraries
-#
-# If you need some setup operations for Tk extensions (for example,
-# modify the dynamic library path) required, please write the setup
-# operations in this file. This file is required at the last of
-# "require 'tk'".
-#
diff --git a/ext/tk/lib/tkextlib/tcllib.rb b/ext/tk/lib/tkextlib/tcllib.rb
deleted file mode 100644
index 75d250cba4..0000000000
--- a/ext/tk/lib/tkextlib/tcllib.rb
+++ /dev/null
@@ -1,106 +0,0 @@
-# frozen_string_literal: false
-#
-# tcllib extension support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tcllib/setup.rb'
-
-err = ''
-
-# package:: autoscroll
-target = 'tkextlib/tcllib/autoscroll'
-begin
- require target
-rescue => e
- err << "\n ['" << target << "'] " << e.class.name << ' : ' << e.message
-end
-
-# package:: cursor
-target = 'tkextlib/tcllib/cursor'
-begin
- require target
-rescue => e
- err << "\n ['" << target << "'] " << e.class.name << ' : ' << e.message
-end
-
-# package:: style
-target = 'tkextlib/tcllib/style'
-begin
- require target
-rescue => e
- err << "\n ['" << target << "'] " << e.class.name << ' : ' << e.message
-end
-
-# autoload
-module Tk
- module Tcllib
- TkComm::TkExtlibAutoloadModule.unshift(self)
-
- # package:: autoscroll
- autoload :Autoscroll, 'tkextlib/tcllib/autoscroll'
-
- # package:: ctext
- autoload :CText, 'tkextlib/tcllib/ctext'
-
- # package:: cursor
- autoload :Cursor, 'tkextlib/tcllib/cursor'
-
- # package:: datefield
- autoload :Datefield, 'tkextlib/tcllib/datefield'
- autoload :DateField, 'tkextlib/tcllib/datefield'
-
- # package:: getstring
- autoload :GetString_Dialog, 'tkextlib/tcllib/getstring'
-
- # package:: history
- autoload :History, 'tkextlib/tcllib/history'
-
- # package:: ico
- autoload :ICO, 'tkextlib/tcllib/ico'
-
- # package:: ipentry
- autoload :IP_Entry, 'tkextlib/tcllib/ip_entry'
- autoload :IPEntry, 'tkextlib/tcllib/ip_entry'
-
- # package:: khim
- autoload :KHIM, 'tkextlib/tcllib/khim'
-
- # package:: ntext
- autoload :Ntext, 'tkextlib/tcllib/ntext'
-
- # package:: Plotchart
- autoload :Plotchart, 'tkextlib/tcllib/plotchart'
-
- # package:: style
- autoload :Style, 'tkextlib/tcllib/style'
-
- # package:: swaplist
- autoload :Swaplist_Dialog, 'tkextlib/tcllib/swaplist'
-
- # package:: tablelist
- autoload :Tablelist, 'tkextlib/tcllib/tablelist'
- autoload :TableList, 'tkextlib/tcllib/tablelist'
- autoload :Tablelist_Tile, 'tkextlib/tcllib/tablelist_tile'
- autoload :TableList_Tile, 'tkextlib/tcllib/tablelist_tile'
-
- # package:: tkpiechart
- autoload :Tkpiechart, 'tkextlib/tcllib/tkpiechart'
-
- # package:: tooltip
- autoload :Tooltip, 'tkextlib/tcllib/tooltip'
-
- # package:: widget
- autoload :Widget, 'tkextlib/tcllib/widget'
- end
-end
-
-if $VERBOSE && !err.empty?
- warn("Warning: some sub-packages are failed to require : " + err)
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/README b/ext/tk/lib/tkextlib/tcllib/README
deleted file mode 100644
index 441918adce..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/README
+++ /dev/null
@@ -1,135 +0,0 @@
-
- [ tcllib extension support files ]
-
-Tcllib includes many utilities. But currently, supports TKLib part
-only (see the following 'tcllib contents').
-
-If you request to support others, please send your message to one of
-ruby-talk/ruby-list/ruby-dev/ruby-ext mailing lists.
-
------<from "What is tcllib?">----------------------------
-Tcllib is a collection of utility modules for Tcl. These modules provide
-a wide variety of functionality, from implementations of standard data
-structures to implementations of common networking protocols. The intent
-is to collect commonly used function into a single library, which users
-can rely on to be available and stable.
----------------------------------------------------------
-
------< tcllib contents (based on tcllib-1.6.1) >---------
-Programming tools
- * cmdline - Procedures to process command lines and options.
- * comm - A remote communications facility for Tcl (7.6, 8.0, and later)
- * control - Procedures for control flow structures.
- * fileutil - Procedures implementing some file utilities
- * log - Procedures to log messages of libraries and applications.
- * logger - System to control logging of events.
- * multiplexer - One-to-many communication with sockets.
- * snit - Snit's Not Incr Tcl
- * snitfaq - Snit Frequently Asked Questions
- * stooop - Object oriented extension.
- * stoop - Simple Tcl Only Object Oriented Programming
- * switched - stooop switched class
- * profiler - Tcl source code profiler
-
-Mathematics
- * math::statistics - Basic statistical functions and procedures
- * math::calculus - Integration and ordinary differential equations
- * math::optimize - Optimisation routines
- * math::fuzzy - Fuzzy comparison of floating-point numbers
- * counter - Procedures for counters and histograms
- * combinatorics - Combinatorial functions in the Tcl Math Library
-
-Data structures
- * struct::list - Procedures for manipulating lists
- * struct::set - Procedures for manipulating sets
- * struct::stack - Create and manipulate stack objects
- * struct::queue - Create and manipulate queue objects
- * struct::prioqueue - Create and manipulate prioqueue objects
- * struct::skiplist - Create and manipulate skiplists
- * struct::tree - Create and manipulate tree objects
- * struct::graph - Create and manipulate directed graph objects
- * struct::record - Define and create records (similar to 'C' structures)
- * struct::matrix - Create and manipulate matrix objects
- * struct::pool - Create and manipulate pool objects (of discrete items)
- * report - Create and manipulate report objects
-
-Text processing
- * expander - Procedures to process templates and expand text.
- * base64 - Procedures to encode and decode base64
- * yencode - encode/decoding a binary file
- * uuencode - encode/decoding a binary file
- * csv - Procedures to handle CSV data.
- * inifile - Parsing of Windows INI files
- * htmlparse - Procedures to parse HTML strings
- * mime - Manipulation of MIME body parts
- * Tcl MIME - generates and parses MIME body parts
- * textutil - Procedures to manipulate texts and strings.
- * exif - Tcl EXIF extracts and parses EXIF fields from digital images
- * EXIF - extract and parse EXIF fields from digital images
-
-Hashes, checksums, and encryption
- * cksum - calculate a cksum(1) compatible checksum
- * crc16 - Perform a 16bit Cyclic Redundancy Check
- * crc32 - Perform a 32bit Cyclic Redundancy Check
- * des - Perform DES encryption of Tcl data
- * md4 - MD4 Message-Digest Algorithm
- * md5 - MD5 Message-Digest Algorithm
- * ripemd160 - RIPEMD-160 Message-Digest Algorithm
- * ripemd128 - RIPEMD-128 Message-Digest Algorithm
- * md5crypt - MD5-based password encryption
- * sha1 - Perform sha1 hashing
- * sum - calculate a sum(1) compatible checksum
- * soundex - Soundex
-
-Documentation tools
- * mpexpand - Markup processor
- * doctools - Create and manipulate doctools converter object
- * doctoc_fmt - Specification of simple tcl markup for table of contents
- * doctools_api - Interface specification for formatter code
- * doctools_fmt - Specification of simple tcl markup for manpages
- * docidx - Create and manipulate docidx converter objects
- * docidx_api - Interface specification for index formatting code
- * docidx_fmt - Specification of simple tcl markup for an index
- * doctoc - Create and manipulate doctoc converter objects
- * doctoc_api - Interface specification for toc formatting code
- * doctools::changelog - Handle text in Emacs ChangeLog format
- * doctools::cvs - Handle text in 'cvs log' format
-
-Networking
- * uri - URI utilities
- * dns - Tcl Domain Name Service Client
- * ntp_time - Tcl Time Service Client
- * nntp - Tcl client for the NNTP protocol
- * pop3 - Tcl client for POP3 email protocol
- * pop3d - Tcl POP3 server implementation
- * pop3d::udb - Simple user database for pop3d
- * pop3d::dbox - Simple mailbox database for pop3d
- * ftp - Client-side tcl implementation of the ftp protocol
- * ftp - Client-side tcl implementation of the ftp protocol
- * ftpd - Tcl FTP server implementation
- * smtp - Client-side tcl implementation of the smtp protocol
- * smtpd - Tcl SMTP server implementation
- * irc - Create IRC connection and interface.
-
-CGI programming
- * ncgi - Procedures to manipulate CGI values.
- * html - Procedures to generate HTML structures
- * javascript - Procedures to generate HTML and Java Script structures.
-
-Grammars and finite automata
- * grammar::fa - Create and manipulate finite automatons
- * grammar::fa::op - Operations on finite automatons
- * grammar::dacceptor - Create and use deterministic acceptors
- * grammar::dexec - Execute deterministic finite automatons
-
-TKLib
- * Plotchart - Simple plotting and charting package
- * autoscroll - Provides for a scrollbar to automatically mapped and
- unmapped as needed
- * ctext - An extended text widget with customizable Syntax highlighting
- * cursor - Procedures to handle CURSOR data
- * datefield - Tk datefield widget
- * style - Changes default Tk look&feel
- * ipentry - An IP address entry widget
- * tkpiechart - Creates and dynamically updates 2D or 3D pie charts
----------------------------------------------------------
diff --git a/ext/tk/lib/tkextlib/tcllib/autoscroll.rb b/ext/tk/lib/tkextlib/tcllib/autoscroll.rb
deleted file mode 100644
index ae45b84787..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/autoscroll.rb
+++ /dev/null
@@ -1,159 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/autoscroll.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Provides for a scrollbar to automatically mapped and unmapped as needed
-#
-# (The following is the original description of the library.)
-#
-# This package allows scrollbars to be mapped and unmapped as needed
-# depending on the size and content of the scrollbars scrolled widget.
-# The scrollbar must be managed by either pack or grid, other geometry
-# managers are not supported.
-#
-# When managed by pack, any geometry changes made in the scrollbars parent
-# between the time a scrollbar is unmapped, and when it is mapped will be
-# lost. It is an error to destroy any of the scrollbars siblings while the
-# scrollbar is unmapped. When managed by grid, if anything becomes gridded
-# in the same row and column the scrollbar occupied it will be replaced by
-# the scrollbar when remapped.
-#
-# This package may be used on any scrollbar-like widget as long as it
-# supports the set subcommand in the same style as scrollbar. If the set
-# subcommand is not used then this package will have no effect.
-#
-
-require 'tk'
-require 'tk/scrollbar'
-require 'tkextlib/tcllib.rb'
-
-module Tk
- module Tcllib
- module Autoscroll
- PACKAGE_NAME = 'autoscroll'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('autoscroll')
- rescue
- ''
- end
- end
-
- def self.not_available
- fail RuntimeError, "'tkextlib/tcllib/autoscroll' extension is not available on your current environment."
- end
-
- def self.autoscroll(win)
- Tk::Tcllib::Autoscroll.not_available
- end
-
- def self.unautoscroll(win)
- Tk::Tcllib::Autoscroll.not_available
- end
- end
- end
-end
-
-module Tk
- module Scrollable
- def autoscroll(mode = nil)
- case mode
- when :x, 'x'
- if @xscrollbar
- Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar)
- end
- when :y, 'y'
- if @yscrollbar
- Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar)
- end
- when nil, :both, 'both'
- if @xscrollbar
- Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar)
- end
- if @yscrollbar
- Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar)
- end
- else
- fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected"
- end
- self
- end
- def unautoscroll(mode = nil)
- case mode
- when :x, 'x'
- if @xscrollbar
- Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar)
- end
- when :y, 'y'
- if @yscrollbar
- Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar)
- end
- when nil, :both, 'both'
- if @xscrollbar
- Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar)
- end
- if @yscrollbar
- Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar)
- end
- else
- fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected"
- end
- self
- end
- end
-end
-
-class Tk::Scrollbar
- def autoscroll
- # Arranges for the already existing scrollbar to be mapped
- # and unmapped as needed.
- #tk_call_without_enc('::autoscroll::autoscroll', @path)
- Tk::Tcllib::Autoscroll.autoscroll(self)
- self
- end
- def unautoscroll
- # Returns the scrollbar to its original static state.
- #tk_call_without_enc('::autoscroll::unautoscroll', @path)
- Tk::Tcllib::Autoscroll.unautoscroll(self)
- self
- end
-end
-
-# TkPackage.require('autoscroll', '1.0')
-# TkPackage.require('autoscroll', '1.1')
-TkPackage.require('autoscroll')
-
-module Tk
- module Tcllib
- class << Autoscroll
- undef not_available
- end
-
- module Autoscroll
- extend TkCore
- def self.autoscroll(win)
- tk_call_without_enc('::autoscroll::autoscroll', win.path)
- end
-
- def self.unautoscroll(win)
- tk_call_without_enc('::autoscroll::unautoscroll', win.path)
- end
-
- def self.wrap
- # v1.1
- tk_call_without_enc('::autoscroll::wrap')
- end
-
- def self.unwrap
- # v1.1
- tk_call_without_enc('::autoscroll::unwrap')
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/calendar.rb b/ext/tk/lib/tkextlib/tcllib/calendar.rb
deleted file mode 100644
index fa53603d91..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/calendar.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/calendar.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * calendar widget
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::calendar', '0.9')
-TkPackage.require('widget::calendar')
-
-module Tk::Tcllib
- module Widget
- class Calendar < TkCanvas
- PACKAGE_NAME = 'widget::calendar'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::calendar')
- rescue
- ''
- end
- end
- end
- end
-end
-
-class Tk::Tcllib::Widget::Calendar
- TkCommandNames = ['::widget::calendar'.freeze].freeze
-
- def __boolval_optkeys
- super() << 'showpast'
- end
- private :__boolval_optkeys
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def get(what = 'all')
- tk_send('get', what)
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb b/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
deleted file mode 100644
index f3d1847d73..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/canvas.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# *
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::canvas_sqmap', '0.2')
-TkPackage.require('widget::canvas_sqmap')
-
-module Tk::Tcllib
- module Widget
- class Canvas_Sqmap < Canvas
- TkCommandNames = ['::widget::canvas_sqmap'.freeze].freeze
-
- def image_set(cell, img)
- tk_send('image', 'set', cell, img)
- self
- end
-
- def image_unset(cell)
- tk_send('image', 'unset', cell)
- self
- end
-
- def flush
- tk_send('flush')
- self
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb b/ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb
deleted file mode 100644
index bb8b04a18b..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/canvas.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# *
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::canvas_zoom', '0.1')
-TkPackage.require('widget::canvas_zoom')
-
-module Tk::Tcllib
- module Widget
- class Canvas_Zoom < Canvas
- TkCommandNames = ['::widget::canvas_zoom'.freeze].freeze
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/chatwidget.rb b/ext/tk/lib/tkextlib/tcllib/chatwidget.rb
deleted file mode 100644
index 34a8ca5094..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/chatwidget.rb
+++ /dev/null
@@ -1,152 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/chatwidget.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * chatwidget - Provides a multi-paned view suitable for display of
-# chat room or irc channel information
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('chatwidget', '1.1.0')
-TkPackage.require('chatwidget')
-
-module Tk::Tcllib
- class ChatWidget < TkText
- PACKAGE_NAME = 'chatwidget'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('chatwidget')
- rescue
- ''
- end
- end
- end
-end
-
-class Tk::Tcllib::ChatWidget
- TkCommandNames = ['::chatwidget::chatwidget'.freeze].freeze
-
- def show_topic
- tk_send_without_enc('topic', 'show')
- self
- end
-
- def hide_topic
- tk_send_without_enc('topic', 'hide')
- self
- end
-
- def set_topic(topic)
- tk_send('topic', 'set', topic)
- end
-
- def list_name
- tk_split_simplelist(tk_send('name', 'list'))
- end
-
- def list_name_full
- tk_split_simplelist(tk_send('name', 'list')).map{|lst|
- nick, *opts = tk_split_simplelist(lst)
- h_opt = {}
- opts.slice(2){|k, v| h_opt[k[1..-1]] = tk_tcl2ruby(v)}
- [nick, h_opt]
- }
- end
-
- def add_name(nick, opts={})
- tk_send('name', 'add', nick, *(hash_kv(opts)))
- end
-
- def delete_name(nick)
- tk_send('name', 'delete', nick)
- end
-
- def get_name(nick)
- lst = tk_send('name', 'get', nick)
- return nil if lst.empty?
- nick, *opts = tk_split_simplelist(lst)
- h_opt = {}
- opts.slice(2){|k, v| h_opt[k[1..-1]] = tk_tcl2ruby(v)}
- [nick, h_opt]
- end
-
- def message(msg, opts={})
- tk_send('message', msg, *(hash_kv(opts)))
- self
- end
-
- def _parse_hook_list(lst)
- tk_split_simplelist(lst).map{|hook|
- cmd, prior = tk_split_simplelist(hook)
- [procedure(cmd), number(prior)]
- }
- end
- private :_parse_hook_list
-
- def hook_add(type, *args, &blk) # args -> [prior, cmd], [prior], [cmd]
- #type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url'
-
- if prior = args.shift
- if !prior.kind_of?(Numeric)
- cmd = prior
- if (prior = args.shift) && !prior.kind_of?(Numeric) # error
- args.unshift(prior)
- end
- args.unshift(cmd)
- end
- prior ||= 50 # default priority
- end
-
- cmd = args.shift || blk
-
- fail ArgumentError, "invalid arguments" unless args.empty?
- fail ArgumentError, "no callback is given" unless cmd
-
- _parse_hook_list(tk_send('hook', 'add', type, cmd, prior))
- end
-
- def hook_remove(type, cmd)
- #type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url'
- _parse_hook_list(tk_send('hook', 'remove', type, cmd))
- end
-
- def hook_run(type, *cmd_args)
- #type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url'
- tk_send('hook', 'run', type, *cmd_args)
- end
-
- def hook_list(type)
- #type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url'
- _parse_hook_list(tk_send('hook', 'list', type))
- end
-
- def show_names
- tk_send('names', 'show')
- self
- end
-
- def hide_names
- tk_send('names', 'hide')
- self
- end
-
- def names_widget
- window(tk_send('names'))
- end
-
- def entry_widget
- window(tk_send('entry'))
- end
-
- def chat_widget
- window(tk_send('chat'))
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/crosshair.rb b/ext/tk/lib/tkextlib/tcllib/crosshair.rb
deleted file mode 100644
index 74cc0a881c..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/crosshair.rb
+++ /dev/null
@@ -1,118 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/crosshair.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Crosshairs for Tk canvas
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('crosshair', '1.0.2')
-TkPackage.require('crosshair')
-
-module Tk::Tcllib
- module Crosshair
- PACKAGE_NAME = 'crosshair'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('crosshair')
- rescue
- ''
- end
- end
- end
-end
-
-module Tk::Tcllib::Crosshair
- include TkCore
- TkCommandNames = ['::crosshair::crosshair'.freeze].freeze
-
- def self.crosshair(w, keys={})
- Tk.tk_call('::crosshair::crosshair', w, *hash_kv(keys))
- w
- end
- def self.on(w, keys={})
- self.crosshair(w, keys)
- end
-
- def self.off(w)
- Tk.tk_call('::crosshair::off', w)
- w
- end
-
- def self.track_on(w, &b)
- Tk.tk_call('::crosshair::track_on', w, b)
- w
- end
-
- def self.track_off(w)
- Tk.tk_call('::crosshair::track_off', w)
- w
- end
-end
-
-class << Tk::Tcllib::Crosshair
- include TkComm
- include TkCanvasItemConfig
-
- def __item_methodcall_optkeys(id)
- {}
- end
- private :__item_methodcall_optkeys
-
- def __item_config_cmd(id)
- # maybe need to override
- ['::crosshair::configure', id]
- end
- private :__item_config_cmd
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-
- def confugure(w, slot, value=None)
- itemconfigure(w, slot, value)
- end
- def confuginfo(w, slot = nil)
- itemconfiginfo(w, slot)
- end
- def current_configinfo(w, slot = nil)
- current_itemconfiginfo(w, slot)
- end
- def cget(w, slot)
- current_itemconfiginfo(w, slot).values[0]
- end
-end
-
-module Tk::Tcllib::Crosshair
- def crosshair_on(keys={})
- Tk::Tcllib::Crosshair.on(self, keys)
- end
- def crosshair_off
- Tk::Tcllib::Crosshair.off(self)
- end
- def crosshair_track_on(&b)
- Tk::Tcllib::Crosshair.track_on(self, &b)
- end
- def crosshair_track_off
- Tk::Tcllib::Crosshair.track_off(self)
- end
- def crosshair_configure(*args)
- Tk::Tcllib::Crosshair.configure(self, *args)
- end
- def crosshair_configinfo(slot = nil)
- Tk::Tcllib::Crosshair.configinfo(self, slot)
- end
- def crosshair_current_configinfo(slot = nil)
- Tk::Tcllib::Crosshair.current_configinfo(self, slot)
- end
- def crosshair_cget(slot)
- Tk::Tcllib::Crosshair.cget(self, slot)
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/ctext.rb b/ext/tk/lib/tkextlib/tcllib/ctext.rb
deleted file mode 100644
index 1c61ec81a6..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/ctext.rb
+++ /dev/null
@@ -1,161 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/ctext.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Overloads the text widget and provides new commands
-#
-
-require 'tk'
-require 'tk/text'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('ctext', '3.1')
-TkPackage.require('ctext')
-
-module Tk
- module Tcllib
- class CText < Tk::Text
- PACKAGE_NAME = 'ctext'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('ctext')
- rescue
- ''
- end
- end
- end
- end
-end
-
-class Tk::Tcllib::CText
- TkCommandNames = ['ctext'.freeze].freeze
- WidgetClassName = 'Ctext'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def __strval_optkeys
- super() << 'linemapfg' << 'linemapbg' <<
- 'linemap_select_fg' << 'linemap_select_bg'
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() << 'highlight' << 'linemap_markable'
- end
- private :__boolval_optkeys
-
- def append(*args)
- tk_send('append', *args)
- end
-
- def copy
- tk_send('copy')
- end
-
- def cut
- tk_send('cut')
- end
-
- def fast_delete(*args)
- tk_send('fastdelete', *args)
- end
-
- def fast_insert(*args)
- tk_send('fastinsert', *args)
- end
-
- def highlight(*args)
- tk_send('highlight', *args)
- end
-
- def paste
- tk_send('paste')
- end
-
- def edit(*args)
- tk_send('edit', *args)
- end
-
- def add_highlight_class(klass, col, *keywords)
- tk_call('ctext::addHighlightClass', @path, klass, col, keywords.flatten)
- self
- end
-
- def add_highlight_class_for_special_chars(klass, col, *chrs)
- tk_call('ctext::addHighlightClassForSpecialChars',
- @path, klass, col, chrs.join(''))
- self
- end
-
- def add_highlight_class_for_regexp(klass, col, tcl_regexp)
- tk_call('ctext::addHighlightClassForRegexp',
- @path, klass, col, tcl_regexp)
- self
- end
-
- def add_highlight_class_with_only_char_start(klass, col, chr)
- tk_call('ctext::addHighlightClassWithOnlyCharStart',
- @path, klass, col, chr)
- self
- end
-
- def clear_highlight_classes
- tk_call('ctext::clearHighlightClasses', @path)
- self
- end
-
- def get_highlight_classes
- tk_split_simplelist(tk_call('ctext::getHighlightClasses', @path))
- end
-
- def delete_highlight_class(klass)
- tk_call('ctext::deleteHighlightClass', @path, klass)
- self
- end
-
- def enable_C_comments
- tk_call('ctext::enableComments', @path)
- self
- end
-
- def disable_C_comments
- tk_call('ctext::disableComments', @path)
- self
- end
-
- def find_next_char(idx, chr)
- tk_call('ctext::findNextChar', @path, idx, chr)
- end
-
- def find_next_space(idx)
- tk_call('ctext::findNextSpace', @path, idx)
- end
-
- def find_previous_space(idx)
- tk_call('ctext::findPreviousSpace', @path, idx)
- end
-
- def set_update_proc(cmd=Proc.new)
- tk_call('proc', 'ctext::update', '', cmd)
- self
- end
-
- def modified?(mode)
- bool(tk_call('ctext::modified', @path, mode))
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/cursor.rb b/ext/tk/lib/tkextlib/tcllib/cursor.rb
deleted file mode 100644
index 4c93cfc063..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/cursor.rb
+++ /dev/null
@@ -1,98 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/cursor.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Procedures to handle CURSOR data
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-module Tk
- module Tcllib
- module Cursor
- PACKAGE_NAME = 'cursor'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('cursor')
- rescue
- ''
- end
- end
-
- def self.not_available
- fail RuntimeError, "'tkextlib/tcllib/cursor' extension is not available on your current environment."
- end
-
- def self.cursor_display(win=None)
- Tk::Tcllib::Cursor.not_available
- end
-
- def self.cursor_propagate(win, cursor)
- Tk::Tcllib::Cursor.not_available
- end
-
- def self.cursor_restore(win, cursor = None)
- Tk::Tcllib::Cursor.not_available
- end
- end
- end
-
- def self.cursor_display(parent=None)
- # Pops up a dialog with a listbox containing all the cursor names.
- # Selecting a cursor name will display it in that dialog.
- # This is simply for viewing any available cursors on the platform .
- #tk_call_without_enc('::cursor::display', parent)
- Tk::Tcllib::Cursor.cursor_display(parent)
- end
-end
-
-class TkWindow
- def cursor_propagate(cursor)
- # Sets the cursor for self and all its descendants to cursor.
- #tk_call_without_enc('::cursor::propagate', @path, cursor)
- Tk::Tcllib::Cursor.cursor_propagate(self, cursor)
- end
- def cursor_restore(cursor = None)
- # Restore the original or previously set cursor for self and all its
- # descendants. If cursor is specified, that will be used if on any
- # widget that did not have a preset cursor (set by a previous call
- # to TkWindow#cursor_propagate).
- #tk_call_without_enc('::cursor::restore', @path, cursor)
- Tk::Tcllib::Cursor.cursor_restore(self, cursor)
- end
-end
-
-# TkPackage.require('cursor', '0.1')
-TkPackage.require('cursor')
-
-module Tk
- module Tcllib
- class << Cursor
- undef not_available
- end
-
- module Cursor
- extend TkCore
- def self.cursor_display(win=None)
- tk_call_without_enc('::cursor::display', _epath(win))
- end
-
- def self.cursor_propagate(win, cursor)
- #tk_call_without_enc('::cursor::propagate', win.path, cursor)
- tk_call_without_enc('::cursor::propagate', _epath(win), cursor)
- end
-
- def self.cursor_restore(win, cursor = None)
- #tk_call_without_enc('::cursor::restore', win.path, cursor)
- tk_call_without_enc('::cursor::restore', _epath(win), cursor)
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/dateentry.rb b/ext/tk/lib/tkextlib/tcllib/dateentry.rb
deleted file mode 100644
index 81b38515fc..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/dateentry.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/dateentry.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * dateentry widget
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::dateentry', '0.91')
-TkPackage.require('widget::dateentry')
-
-module Tk::Tcllib
- module Widget
- class Dateentry < Tk::Tile::TEntry
- PACKAGE_NAME = 'widget::dateentry'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::dateentry')
- rescue
- ''
- end
- end
- end
- DateEntry = Dateentry
- end
-end
-
-class Tk::Tcllib::Widget::Dateentry
- TkCommandNames = ['::widget::dateentry'.freeze].freeze
-
- def __strval_optkeys
- super() << ['dateformat']
- end
- private :__strval_optkeys
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def post
- tk_send('post')
- self
- end
-
- def unpost
- tk_send('unpost')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/datefield.rb b/ext/tk/lib/tkextlib/tcllib/datefield.rb
deleted file mode 100644
index ceed1260df..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/datefield.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/datefield.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Tk datefield widget
-#
-# (The following is the original description of the library.)
-#
-# The datefield package provides the datefield widget which is an enhanced
-# text entry widget for the purpose of date entry. Only valid dates of the
-# form MM/DD/YYYY can be entered.
-#
-# The datefield widget is, in fact, just an entry widget with specialized
-# bindings. This means all the command and options for an entry widget apply
-# equally here.
-
-require 'tk'
-require 'tk/entry'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('datefield', '0.1')
-TkPackage.require('datefield')
-
-module Tk
- module Tcllib
- class Datefield < Tk::Entry
- PACKAGE_NAME = 'datefield'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('datefield')
- rescue
- ''
- end
- end
- end
- DateField = Datefield
- end
-end
-
-class Tk::Tcllib::Datefield
- TkCommandNames = ['::datefield::datefield'.freeze].freeze
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/diagrams.rb b/ext/tk/lib/tkextlib/tcllib/diagrams.rb
deleted file mode 100644
index 7fb7b3c7ee..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/diagrams.rb
+++ /dev/null
@@ -1,225 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/diagrams.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Draw diagrams
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('Diagrams', '0.3')
-TkPackage.require('Diagrams')
-
-module Tk::Tcllib
- module Diagrams
- PACKAGE_NAME = 'Diagrams'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('Diagrams')
- rescue
- ''
- end
- end
- end
-end
-
-class << Tk::Tcllib::Diagrams
- include TkCore
-
- def drawin(canvas)
- tk_call('::Diagrams::drawin', canvas)
- canvas
- end
- alias draw_in drawin
-
- def saveps(filename)
- tk_call('::Diagrams::saveps', filename)
- filename
- end
- alias save_ps saveps
-
- def direction(dir)
- tk_call('::Diagrams::direction', dir)
- dir
- end
-
- def currentpos(pos)
- list(tk_call('::Diagrams::currentpos', pos))
- end
- alias current_pos currentpos
- alias currentpos= currentpos
- alias current_pos= currentpos
-
- def getpos(anchor, obj)
- list(tk_call('::Diagrams::getpos', anchor, obj))
- end
- alias get_pos getpos
-
- def position(x, y)
- list(tk_call('::Diagrams::position', x, y))
- end
-
- def box(text, width=nil, height=nil)
- if width || height
- width = '' unless width
- height = '' unless height
- list(tk_call('::Diagrams::box', text, width, height))
- else
- list(tk_call('::Diagrams::box', text))
- end
- end
-
- def plaintext(text, width=nil, height=nil)
- if width || height
- width = '' unless width
- height = '' unless height
- list(tk_call('::Diagrams::plaintext', text, width, height))
- else
- list(tk_call('::Diagrams::plaintext', text))
- end
- end
-
- def circle(text, radius=nil)
- if radius
- list(tk_call('::Diagrams::circle', text, radius))
- else
- list(tk_call('::Diagrams::circle', text))
- end
- end
-
- def slanted(text, width=nil, height=nil, angle=nil)
- if width || height || angle
- width = '' unless width
- height = '' unless height
- if angle
- list(tk_call('::Diagrams::slanted', text, width, height, angle))
- else
- list(tk_call('::Diagrams::slanted', text, width, height))
- end
- else
- list(tk_call('::Diagrams::slanted', text))
- end
- end
-
- def diamond(text, width=nil, height=nil)
- if width || height
- width = '' unless width
- height = '' unless height
- list(tk_call('::Diagrams::diamond', text, width, height))
- else
- list(tk_call('::Diagrams::diamond', text))
- end
- end
-
- def drum(text, width=nil, height=nil)
- if width || height
- width = '' unless width
- height = '' unless height
- list(tk_call('::Diagrams::drum', text, width, height))
- else
- list(tk_call('::Diagrams::drum', text))
- end
- end
-
- def arrow(text=nil, length=nil, head=nil)
- if length || head
- text = '' unless text
- length = '' unless length
- list(tk_call('::Diagrams::arrow', text, length, head))
- else
- if text
- list(tk_call('::Diagrams::arrow', text))
- else
- list(tk_call('::Diagrams::arrow'))
- end
- end
- end
-
- def line(*args)
- ary = []
- args.each{|arg|
- if arg.kind_of?(Array) && arg.length == 2 # [length, angle]
- ary.concat arg
- else # ["POSITION", x, y] or length or angle
- ary << arg
- end
- }
- list(tk_call('::Diagrams::line', *ary))
- end
-
- def bracket(dir, dist, from_pos, to_pos)
- list(tk_call('::Diagrams::bracket', dir, dist, from_pos, to_pos))
- end
-
- def attach(anchor=None)
- tk_call('::Diagrams::attach', anchor)
- end
-
- def color(name=None)
- tk_call('::Diagrams::color', name)
- end
-
- def fillcolor(name=None)
- tk_call('::Diagrams::fillcolor', name)
- end
-
- def textcolor(name=None)
- tk_call('::Diagrams::textcolor', name)
- end
-
- def usegap(mode=None)
- bool(tk_call('::Diagrams::usegap', mode))
- end
- alias use_gap usegap
-
- def xgap(val=None)
- number(tk_call('::Diagrams::xgap', val))
- end
-
- def ygap(val=None)
- number(tk_call('::Diagrams::ygap', val))
- end
-
- def textfont(fnt=None)
- tk_call('::Diagrams::textfont', fnt)
- end
-
- def linewidth(pixels=None)
- number(tk_call('::Diagrams::linewidth', pixels))
- end
-
- def linestyle(style=None)
- tk_call('::Diagrams::linestyle', style)
- end
-
- def pushstate
- tk_call('::Diagrams::pushstate')
- end
- alias push_state pushstate
-
- def popstate
- tk_call('::Diagrams::popstate')
- end
- alias pop_state popstate
-
- def computepos
- list(tk_call('::Diagrams::computepos'))
- end
- alias compute_pos computepos
-
- def boxcoords(x1, y1, x2, y2)
- list(tk_call('::Diagrams::boxcoords', x1, y1, x2, y2))
- end
-
- def moveobject(obj)
- list(tk_call('::Diagrams::moveobject', obj))
- end
- alias move_object moveobject
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/dialog.rb b/ext/tk/lib/tkextlib/tcllib/dialog.rb
deleted file mode 100644
index 46fd06f177..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/dialog.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/dialog.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Generic dialog widget (themed)
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::dialog', '1.2')
-TkPackage.require('widget::dialog')
-
-module Tk::Tcllib
- module Widget
- class Dialog < TkWindow
- PACKAGE_NAME = 'widget::dialog'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::dialog')
- rescue
- ''
- end
- end
- end
- end
-end
-
-class Tk::Tcllib::Widget::Dialog
- TkCommandNames = ['::widget::dialog'.freeze].freeze
-
- def __boolval_optkeys
- ['separator', 'synchronous', 'transient']
- end
- private :__boolval_optkeys
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def add(what, *args)
- window(tk_send('add', *args))
- end
-
- def get_frame
- window(tk_send('getframe'))
- end
-
- def set_widget(widget)
- tk_send('setwidget', widget)
- self
- end
-
- def display
- tk_send('display')
- self
- end
- alias show display
-
- def cancel
- tk_send('cancel')
- self
- end
-
- def close(reason = None)
- tk_send('close', reason)
- end
-
- def withdraw
- tk_send('withdraw')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/getstring.rb b/ext/tk/lib/tkextlib/tcllib/getstring.rb
deleted file mode 100644
index 72d9c5f517..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/getstring.rb
+++ /dev/null
@@ -1,135 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/getstring.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * A dialog which consists of an Entry, OK, and Cancel buttons.
-#
-
-require 'tk'
-require 'tk/entry'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('getstring', '0.1')
-TkPackage.require('getstring')
-
-module Tk::Tcllib
- class GetString_Dialog < TkWindow
- PACKAGE_NAME = 'getstring'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('getstring')
- rescue
- ''
- end
- end
- end
-end
-
-
-class Tk::Tcllib::GetString_Dialog
- TkCommandNames = ['::getstring::tk_getString'.freeze].freeze
- WidgetClassName = 'TkSDialog'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.show(*args)
- dialog = self.new(*args)
- dialog.show
- [dialog.status, dialog.value]
- end
- def self.display(*args)
- self.show(*args)
- end
-
- def initialize(*args) # args = (parent=nil, text='', keys=nil)
- keys = args.pop
- if keys.kind_of?(Hash)
- text = args.pop
- @keys = _symbolkey2str(keys)
- args.push(keys)
- else
- text = keys
- @keys = {}
- end
- if text
- @text = text.dup
- else
- @text = ''
- end
-
- @variable = TkVariable.new
- @status = nil
-
- super(*args)
- end
-
- def create_self(keys)
- # dummy
- end
- private :create_self
-
- def show
- @variable.value = ''
- @status = bool(tk_call(self.class::TkCommandNames[0],
- @path, @variable, @text, *hash_kv(@keys)))
- end
- alias display show
-
- def status
- @status
- end
-
- def value
- @variable.value
- end
-
- def cget_strict(slot)
- slot = slot.to_s
- if slot == 'text'
- @text
- else
- @keys[slot]
- end
- end
- def cget(slot)
- cget_strict(slot)
- end
-
- def configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot.each{|k, v| configure(k, v)}
- else
- slot = slot.to_s
- value = _symbolkey2str(value) if value.kind_of?(Hash)
- if value && value != None
- if slot == 'text'
- @text = value.to_s
- else
- @keys[slot] = value
- end
- else
- if slot == 'text'
- @text = ''
- else
- @keys.delete(slot)
- end
- end
- end
- self
- end
-
- def configinfo(slot = nil)
- if slot
- slot = slot.to_s
- [ slot, nil, nil, nil, ( (slot == 'text')? @text: @keys[slot] ) ]
- else
- @keys.collect{|k, v| [ k, nil, nil, nil, v ] } \
- << [ 'text', nil, nil, nil, @text ]
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/history.rb b/ext/tk/lib/tkextlib/tcllib/history.rb
deleted file mode 100644
index a1b92726ee..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/history.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/history.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Provides a history for Entry widgets
-#
-
-require 'tk'
-require 'tk/entry'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('history', '0.1')
-TkPackage.require('history')
-
-module Tk::Tcllib
- module History
- PACKAGE_NAME = 'history'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('history')
- rescue
- ''
- end
- end
- end
-end
-
-module Tk::Tcllib::History
- extend TkCore
-
- def self.init(entry, length=None)
- tk_call_without_enc('::history::init', entry.path, length)
- entry.extend(self) # add methods to treat history to the entry widget
- end
-
- def self.remove(entry)
- tk_call_without_enc('::history::remove', entry.path)
- entry
- end
-
- def history_remove
- tk_call_without_enc('::history::remove', @path)
- self
- end
-
- def history_add(text)
- tk_call('::history::add', @path, text)
- self
- end
-
- def history_get
- simplelist(tk_call_without_enc('::history::get', @path))
- end
-
- def history_clear
- tk_call_without_enc('::history::clear', @path)
- self
- end
-
- def history_configure(opt, value)
- tk_call('::history::configure', @path, opt, value)
- self
- end
-
- def history_configinfo(opt)
- tk_call('::history::configure', @path, opt)
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/ico.rb b/ext/tk/lib/tkextlib/tcllib/ico.rb
deleted file mode 100644
index 8814205f94..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/ico.rb
+++ /dev/null
@@ -1,147 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/ico.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Reading and writing windows icons
-#
-
-require 'tk'
-require 'tk/image'
-#require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('ico', '0.3')
-TkPackage.require('ico')
-
-module Tk
- module Tcllib
- class ICO < TkImage
- PACKAGE_NAME = 'ico'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('ico')
- rescue
- ''
- end
- end
- end
- end
-end
-
-class Tk::Tcllib::ICO
- def self.list(file, keys=nil)
- tk_split_list(tk_call_without_enc('::ico::getIconList', file,
- *hash_kv(keys, true)))
- end
-
- def self.icons(file, keys=nil)
- tk_split_simplelist(tk_call_without_enc('::ico::icons', file,
- *hash_kv(keys, true))).map{|elem|
- num_or_str(elem)
- }
- end
-
- def self.get_members(file, name, keys=nil)
- tk_split_simplelist(tk_call_without_enc('::ico::getMembers', file, name,
- *hash_kv(keys, true))).map{|elem|
- name, width, height, bpp = tk_split_simplelist(elem)
- [name, number(width), number(height), number(bpp)]
- }
- end
-
- def self.get(file, index, keys=nil)
- tk_call_without_enc('::ico::getIcon', file, index, *hash_kv(keys, true))
- end
- def self.get_icon(*args)
- get(*args)
- end
-
- def self.get_by_name(file, name, keys=nil)
- tk_call_without_enc('::ico::getIconByName', file, name,
- *hash_kv(keys, true))
- end
- def self.get_icon_by_name(*args)
- get_by_name(*args)
- end
-
- def self.get_fileicon(file, keys=nil)
- tk_call_without_enc('::ico::getFileIcon', file, *hash_kv(keys, true))
- end
-
- def self.get_image(file, index, keys={})
- keys = _symbolkey2str(keys)
- keys.delete('format')
- self.new(file, index, keys)
- end
-
- def self.get_data(file, index, keys={})
- keys['format'] = 'data'
- tk_split_list(tk_call_without_enc('::ico::getIcon', file, index,
- *hash_kv(keys, true)))
- end
-
- def self.write(file, index, depth, data, keys=nil)
- tk_call_without_enc('::ico::writeIcon', file, index, depth, data,
- *hash_kv(keys, true))
- end
-
- def self.copy(from_file, from_index, to_file, to_index, keys=nil)
- tk_call_without_enc('::ico::copyIcon',
- from_file, from_index, to_file, to_index,
- *hash_kv(keys, true))
- end
-
- def self.exe_to_ico(exe_file, ico_file, keys=nil)
- tk_call_without_enc('::ico::copyIcon', exe_file, ico_file,
- *hash_kv(keys, true))
- end
-
- def self.clear_cache(file=None)
- tk_call_without_enc('::ico::clearCache', file)
- end
-
- def self.transparent_color(image, color)
- if image.kind_of?(Array)
- tk_split_list(tk_call_without_enc('::ico::transparentColor',
- image, color))
- else
- tk_call_without_enc('::ico::transparentColor', image, color)
- end
- end
-
- def self.show(file, keys=nil)
- tk_call_without_enc('::ico::Show', file, *hash_kv(keys, true))
- end
-
- ###########################
-
- def initialize(file, index, keys=nil)
- keys = _symbolkey2str(keys)
- if keys.key?('name')
- @path = keys['name'].to_s
- else
- Tk_Image_ID.mutex.synchronize{
- @path = Tk_Image_ID.join(TkCore::INTERP._ip_id_)
- Tk_Image_ID[1].succ!
- }
- end
- tk_call_without_enc('::ico::getIcon', file, index, '-name', @path,
- '-format', 'image', *hash_kv(keys, true))
- Tk_IMGTBL[@path] = self
- end
-
- def write(file, index, depth, keys=nil)
- Tk::Tcllib::ICO.write(file, index, depth, @path, keys=nil)
- self
- end
-
- def transparent_color(color)
- tk_call_without_enc('::ico::transparentColor', @path, color)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/ip_entry.rb b/ext/tk/lib/tkextlib/tcllib/ip_entry.rb
deleted file mode 100644
index 6bbd8442a6..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/ip_entry.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/ip_entry.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * An IP address entry widget
-#
-# (The following is the original description of the library.)
-#
-# This package provides a widget for the entering of a IP address.
-# It guarantees a valid address at all times.
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('ipentry', '0.1')
-TkPackage.require('ipentry')
-
-module Tk
- module Tcllib
- class IP_Entry < Tk::Entry
- PACKAGE_NAME = 'ipentry'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('ipentry')
- rescue
- ''
- end
- end
- end
- IPEntry = IP_Entry
-
- class IP_Entry6 < IP_Entry
- end
- IPEntry6 = IP_Entry6
- IP6_Entry = IP_Entry6
- end
-end
-
-class Tk::Tcllib::IP_Entry
- TkCommandNames = ['::ipentry::ipentry'.freeze].freeze
- WidgetClassName = 'IPEntry'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def __strval_optkeys
- super() << 'fg' << 'bg' << 'insertbackground'
- end
- private :__strval_optkeys
-
- def complete?
- bool(tk_send_without_enc('complete'))
- end
-
- def insert(*ip)
- tk_send_without_enc('insert', array2tk_list(ip.flatten))
- end
-end
-
-class Tk::Tcllib::IP_Entry6 < Tk::Tcllib::IP_Entry
- TkCommandNames = ['::ipentry::ipentry6'.freeze].freeze
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/khim.rb b/ext/tk/lib/tkextlib/tcllib/khim.rb
deleted file mode 100644
index e79f26b381..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/khim.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/khim.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Kevin's Hacky Input Method
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('khim', '1.0')
-TkPackage.require('khim')
-
-module Tk::Tcllib
- class KHIM < TkToplevel
- PACKAGE_NAME = 'khim'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('khim')
- rescue
- ''
- end
- end
- end
-end
-
-class Tk::Tcllib::KHIM
- TkCommandNames = ['::khim::getOptions'.freeze].freeze
-
- def self.get_options(parent='')
- path = parent + '.tcllib_widget_khim_dialog'
- self.new(:widgetname => path)
- end
-
- def self.get_config #=> cmd_string
- Tk.tk_call_without_enc('::khim::getConfig')
- end
-
- def self.set_config(*args)
- if args.length == 1
- # cmd_string generated by
- #Tk.ip_eval_without_enc(cmd_string)
- Tk.ip_eval(cmd_string)
- else
- # args for setConfig command
- #Tk.tk_call_without_enc('::khim::setConfig', *args)
- Tk.tk_call('::khim::setConfig', *args)
- end
- end
-
- def self.showHelp
- Tk::Tcllib::KHIM::Help.new
- end
-
- def create_self(keys=None)
- @db_class = @classname = nil
- super(None) # ignore keys
- end
-end
-
-class Tk::Tcllib::KHIM::Help < TkToplevel
- TkCommandNames = ['::khim::showHelp'.freeze].freeze
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/menuentry.rb b/ext/tk/lib/tkextlib/tcllib/menuentry.rb
deleted file mode 100644
index 51521499da..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/menuentry.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/menuentry.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * menuentry widget
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::menuentry', '1.0')
-TkPackage.require('widget::menuentry')
-
-module Tk::Tcllib
- module Widget
- class Menuentry < Tk::Tile::TEntry
- PACKAGE_NAME = 'widget::menuentry'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::menuentry')
- rescue
- ''
- end
- end
- end
- MenuEntry = Menuentry
- end
-end
-
-class Tk::Tcllib::Widget::Menuentry
- TkCommandNames = ['::widget::menuentry'.freeze].freeze
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/ntext.rb b/ext/tk/lib/tkextlib/tcllib/ntext.rb
deleted file mode 100644
index 2d0c208236..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/ntext.rb
+++ /dev/null
@@ -1,147 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/ntext.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Ntext bindtag
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('ntext', '0.81')
-TkPackage.require('ntext')
-
-module Tk::Tcllib
- Ntext = TkBindTag.new_by_name('Ntext')
-end
-
-# variables
-Tk::Tcllib::Ntext.instance_eval{
- # boolean
- @classicAnchor = TkVarAccess.new('::ntext::classicAnchor')
- @classicExtras = TkVarAccess.new('::ntext::classicExtras')
- @classicMouseSelect = TkVarAccess.new('::ntext::classicMouseSelect')
- @classicWordBreak = TkVarAccess.new('::ntext::classicWordBreak')
- @classicWrap = TkVarAccess.new('::ntext::classicWrap')
- @overwrite = TkVarAccess.new('::ntext::overwrite')
-
- # regexp
- @newWrapRegexp = TkVarAccess.new('::ntext::newWrapRegexp')
-
- # variables (advanced use)
- @tcl_match_wordBreakAfter = TkVarAccess.new('::ntext::tcl_match_wordBreakAfter')
- @tcl_match_wordBreakBefore = TkVarAccess.new('::ntext::tcl_match_wordBreakBefore')
- @tcl_match_endOfWord = TkVarAccess.new('::ntext::tcl_match_endOfWord')
- @tcl_match_startOfNextWord = TkVarAccess.new('::ntext::tcl_match_startOfNextWord')
- @tcl_match_startOfPreviousWord = TkVarAccess.new('::ntext::tcl_match_startOfPreviousWord')
-}
-
-class << Tk::Tcllib::Ntext
- def wrapIndent(txt, *args)
- TK.tk_call('::next::wrapIndent', txt, *args)
- end
-
- def initializeMatchPatterns
- TK.tk_call('::next::initializeMatchPatterns')
- self
- end
-
- def createMatchPatterns(*args)
- TK.tk_call('::next::createMatchPatterns', *args)
- self
- end
-
- # functions (advanced use)
- #ntext::new_wordBreakAfter
- #ntext::new_wordBreakBefore
- #ntext::new_endOfWord
- #ntext::new_startOfNextWord
- #ntext::new_startOfPreviousWord
-
- # accessor
- def classicAnchor
- @classicAnchor.bool
- end
- def classicAnchor=(mode)
- @classicAnchor.bool = mode
- end
-
- def classicExtras
- @classicExtras.bool
- end
- def classicExtras=(mode)
- @classicExtras.bool = mode
- end
-
- def classicMouseSelect
- @classicMouseSelect.bool
- end
- def classicMouseSelect=(mode)
- @classicMouseSelect.bool = mode
- end
-
- def classicWordBreak
- @classicWordBreak.bool
- end
- def classicWordBreak=(mode)
- @classicWordBreak.bool = mode
- end
-
- def classicWrap
- @classicWrap.bool
- end
- def classicWrap=(mode)
- @classicWrap.bool = mode
- end
-
- def overwrite
- @overwrite.bool
- end
- def overwrite=(mode)
- @classic.bool = mode
- end
-
- def newWrapRegexp
- @newWrapRegexp.value
- end
- def newWrapRegexp=(val)
- @newWrapRegexp.value = val
- end
-
- def tcl_match_wordBreakAfter
- @tcl_match_wordBreakAfter.value
- end
- def tcl_match_wordBreakAfter=(val)
- @tcl_match_wordBreakAfter.value = val
- end
-
- def tcl_match_wordBreakBefore
- @tcl_match_wordBreakBefore.value
- end
- def tcl_match_wordBreakBefore=(val)
- @tcl_match_wordBreakBefore.value = val
- end
-
- def tcl_match_endOfWord
- @tcl_match_endOfWord.value
- end
- def tcl_match_endOfWord=(val)
- @tcl_match_endOfWord.value = val
- end
-
- def tcl_match_startOfNextWord
- @tcl_match_startOfNextWord.value
- end
- def tcl_match_startOfNextWord=(val)
- @tcl_match_startOfNextWord.value = val
- end
-
- def tcl_match_startOfPreviousWord
- @tcl_match_startOfPreviousWord.value
- end
- def tcl_match_startOfPreviousWord=(val)
- @tcl_match_startOfPreviousWord.value = val
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/panelframe.rb b/ext/tk/lib/tkextlib/tcllib/panelframe.rb
deleted file mode 100644
index 678d5d0a9a..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/panelframe.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/panelframe.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Create PanelFrame widgets.
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::panelframe', '1.0')
-TkPackage.require('widget::panelframe')
-
-module Tk::Tcllib
- module Widget
- class PanelFrame < TkWindow
- PACKAGE_NAME = 'widget::panelframe'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::panelframe')
- rescue
- ''
- end
- end
- end
- Panelframe = PanelFrame
- end
-end
-
-class Tk::Tcllib::Widget::PanelFrame
- TkCommandNames = ['::widget::panelframe'.freeze].freeze
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def add(what, *args)
- window(tk_send('add', *args))
- end
-
- #def get_frame
- # window(tk_send('getframe'))
- #end
-
- def set_widget(widget)
- tk_send('setwidget', widget)
- self
- end
-
- def remove(*wins)
- tk_send('remove', *wins)
- self
- end
- def remove_destroy(*wins)
- tk_send('remove', '-destroy', *wins)
- self
- end
-
- def delete(*wins)
- tk_send('delete', *wins)
- self
- end
-
- def items
- simplelist(tk_send('items')).collect!{|w| window(w)}
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/plotchart.rb b/ext/tk/lib/tkextlib/tcllib/plotchart.rb
deleted file mode 100644
index 1817f9a791..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/plotchart.rb
+++ /dev/null
@@ -1,1405 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/plotchart.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Simple plotting and charting package
-#
-# (The following is the original description of the library.)
-#
-# Plotchart is a Tcl-only package that focuses on the easy creation of
-# xy-plots, barcharts and other common types of graphical presentations.
-# The emphasis is on ease of use, rather than flexibility. The procedures
-# that create a plot use the entire canvas window, making the layout of the
-# plot completely automatic.
-#
-# This results in the creation of an xy-plot in, say, ten lines of code:
-# --------------------------------------------------------------------
-# package require Plotchart
-#
-# canvas .c -background white -width 400 -height 200
-# pack .c -fill both
-#
-# #
-# # Create the plot with its x- and y-axes
-# #
-# set s [::Plotchart::createXYPlot .c {0.0 100.0 10.0} {0.0 100.0 20.0}]
-#
-# foreach {x y} {0.0 32.0 10.0 50.0 25.0 60.0 78.0 11.0 } {
-# $s plot series1 $x $y
-# }
-#
-# $s title "Data series"
-# --------------------------------------------------------------------
-#
-# A drawback of the package might be that it does not do any data management.
-# So if the canvas that holds the plot is to be resized, the whole plot must
-# be redrawn. The advantage, though, is that it offers a number of plot and
-# chart types:
-#
-# * XY-plots like the one shown above with any number of data series.
-# * Stripcharts, a kind of XY-plots where the horizontal axis is adjusted
-# automatically. The result is a kind of sliding window on the data
-# series.
-# * Polar plots, where the coordinates are polar instead of cartesian.
-# * Isometric plots, where the scale of the coordinates in the two
-# directions is always the same, i.e. a circle in world coordinates
-# appears as a circle on the screen.
-# You can zoom in and out, as well as pan with these plots (Note: this
-# works best if no axes are drawn, the zooming and panning routines do
-# not distinguish the axes), using the mouse buttons with the control
-# key and the arrow keys with the control key.
-# * Piecharts, with automatic scaling to indicate the proportions.
-# * Barcharts, with either vertical or horizontal bars, stacked bars or
-# bars side by side.
-# * Timecharts, where bars indicate a time period and milestones or other
-# important moments in time are represented by triangles.
-# * 3D plots (both for displaying surfaces and 3D bars)
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('Plotchart', '0.9')
-# TkPackage.require('Plotchart', '1.1')
-# TkPackage.require('Plotchart', '1.6.3')
-TkPackage.require('Plotchart')
-
-module Tk
- module Tcllib
- module Plotchart
- PACKAGE_NAME = 'Plotchart'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('Plotchart')
- rescue
- ''
- end
- end
- end
- end
-end
-
-module Tk::Tcllib::Plotchart
- extend TkCore
- ############################
- def self.view_port(w, *args) # args := pxmin, pymin, pxmax, pymax
- tk_call_without_enc('::Plotchart::viewPort', w.path, *(args.flatten))
- end
-
- def self.world_coordinates(w, *args) # args := xmin, ymin, xmax, ymax
- tk_call_without_enc('::Plotchart::worldCoordinates',
- w.path, *(args.flatten))
- end
-
- def self.world_3D_coordinates(w, *args)
- # args := xmin, ymin, zmin, xmax, ymax, zmax
- tk_call_without_enc('::Plotchart::world3DCoordinates',
- w.path, *(args.flatten))
- end
-
- def self.coords_to_pixel(w, x, y)
- list(tk_call_without_enc('::Plotchart::coordsToPixel', w.path, x, y))
- end
-
- def self.coords_3D_to_pixel(w, x, y, z)
- list(tk_call_without_enc('::Plotchart::coords3DToPixel', w.path, x, y, z))
- end
-
- def self.plotconfig(*args)
- case args.length
- when 0, 1, 2
- # 0: (no args) --> list of chat types
- # 1: charttype --> list of components
- # 2: charttype, component --> list of properties
- simplelist(tk_call('::Plotchart::plotconfig', *args))
- when 3
- # 3: charttype, component, property --> current value
- tk_call('::Plotchart::plotconfig', *args)
- else
- # 4: charttype, component, property, value : set new value
- # 5+: Error on Tcl/Tk
- tk_call('::Plotchart::plotconfig', *args)
- nil
- end
- end
-
- def self.plotpack(w, dir, *plots)
- tk_call_without_enc('::Plotchart::plotpack', w.path, dir, *plots)
- w
- end
-
- def self.polar_coordinates(w, radmax)
- tk_call_without_enc('::Plotchart::polarCoordinates', w.path, radmax)
- end
-
- def self.polar_to_pixel(w, rad, phi)
- list(tk_call_without_enc('::Plotchart::polarToPixel', w.path, rad, phi))
- end
-
- def self.pixel_to_coords(w, x, y)
- list(tk_call_without_enc('::Plotchart::pixelToCoords', w.path, x, y))
- end
-
- def self.determine_scale(*args) # (xmin, xmax, inverted=false)
- tk_call_without_enc('::Plotchart::determineScale', *args)
- end
-
- def self.set_zoom_pan(w)
- tk_call_without_enc('::Plotchart::setZoomPan', w.path)
- end
-
- ############################
- module ChartMethod
- include TkCore
-
- def title(str)
- tk_call_without_enc(@chart, 'title', _get_eval_enc_str(str))
- self
- end
-
- def save_plot(filename)
- tk_call_without_enc(@chart, 'saveplot', filename)
- self
- end
-
- def xtext(str)
- tk_call_without_enc(@chart, 'xtext', _get_eval_enc_str(str))
- self
- end
-
- def ytext(str)
- tk_call_without_enc(@chart, 'ytext', _get_eval_enc_str(str))
- self
- end
-
- def xconfig(key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'xconfig', *hash_kv(key, true))
- else
- tk_call(@chart, 'xconfig', "-#{key}",value)
- end
- self
- end
-
- def yconfig(key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'yconfig', *hash_kv(key, true))
- else
- tk_call(@chart, 'yconfig', "-#{key}", value)
- end
- self
- end
-
- def background(part, color_or_image, dir)
- tk_call_without_enc(@chart, 'background',
- part, color_or_image, dir)
- self
- end
-
- def xticklines(color=None)
- tk_call(@chart, 'xticklines', color)
- self
- end
-
- def yticklines(color=None)
- tk_call(@chart, 'yticklines', color)
- self
- end
-
- def legendconfig(key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'legendconfig', *hash_kv(key, true))
- else
- tk_call(@chart, 'legendconfig', "-#{key}", value)
- end
- self
- end
-
- def legend(series, text)
- tk_call_without_enc(@chart, 'legend',
- _get_eval_enc_str(series), _get_eval_enc_str(text))
- self
- end
-
- def balloon(*args) # args => (x, y, text, dir) or ([x, y], text, dir)
- if args[0].kind_of?(Array)
- # args => ([x, y], text, dir)
- x, y = args.shift
- else
- # args => (x, y, text, dir)
- x = args.shift
- y = args.shift
- end
-
- text, dir = args
-
- tk_call_without_enc(@chart, 'balloon', x, y,
- _get_eval_enc_str(text), dir)
- self
- end
-
- def balloonconfig(key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'balloonconfig', *hash_kv(key, true))
- else
- tk_call(@chart, 'balloonconfig', "-#{key}", value)
- end
- end
-
- def plaintext(*args) # args => (x, y, text, dir) or ([x, y], text, dir)
- if args[0].kind_of?(Array)
- # args => ([x, y], text, dir)
- x, y = args.shift
- else
- # args => (x, y, text, dir)
- x = args.shift
- y = args.shift
- end
-
- text, dir = args
-
- tk_call_without_enc(@chart, 'plaintext', x, y,
- _get_eval_enc_str(text), dir)
- self
- end
-
- ############################
-
- def view_port(*args) # args := pxmin, pymin, pxmax, pymax
- tk_call_without_enc('::Plotchart::viewPort', @path, *(args.flatten))
- self
- end
-
- def world_coordinates(*args) # args := xmin, ymin, xmax, ymax
- tk_call_without_enc('::Plotchart::worldCoordinates',
- @path, *(args.flatten))
- self
- end
-
- def world_3D_coordinates(*args)
- # args := xmin, ymin, zmin, xmax, ymax, zmax
- tk_call_without_enc('::Plotchart::world3DCoordinates',
- @path, *(args.flatten))
- self
- end
-
- def coords_to_pixel(x, y)
- list(tk_call_without_enc('::Plotchart::coordsToPixel', @path, x, y))
- end
-
- def coords_3D_to_pixel(x, y, z)
- list(tk_call_without_enc('::Plotchart::coords3DToPixel', @path, x, y, z))
- end
-
- def plotpack(dir, *plots)
- tk_call_without_enc('::Plotchart::plotpack', @path, dir, *plots)
- self
- end
-
- def polar_coordinates(radmax)
- tk_call_without_enc('::Plotchart::polarCoordinates', @path, radmax)
- self
- end
-
- def polar_to_pixel(rad, phi)
- list(tk_call_without_enc('::Plotchart::polarToPixel', @path, rad, phi))
- end
-
- def pixel_to_coords(x, y)
- list(tk_call_without_enc('::Plotchart::pixelToCoords', @path, x, y))
- end
-
- def determine_scale(xmax, ymax)
- tk_call_without_enc('::Plotchart::determineScale', @path, xmax, ymax)
- self
- end
-
- def set_zoom_pan()
- tk_call_without_enc('::Plotchart::setZoomPan', @path)
- self
- end
- end
-
- ############################
- class XYPlot < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createXYPlot'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent,] xaxis, yaxis [, keys])
- # xaxis := Array of [minimum, maximum, stepsize]
- # yaxis := Array of [minimum, maximum, stepsize]
- if args[0].kind_of?(Array)
- @xaxis = args.shift
- @yaxis = args.shift
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @xaxis = args.shift
- @yaxis = args.shift
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@xaxis), array2tk_list(@yaxis))
- end
- private :_create_chart
-
- def __destroy_hook__
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.mutex.synchronize{
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.delete(@path)
- }
- end
-
- def plot(series, x, y)
- tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(series), x, y)
- self
- end
-
- def contourlines(xcrd, ycrd, vals, clss=None)
- xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array)
- ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array)
- vals = array2tk_list(vals) if vals.kind_of?(Array)
- clss = array2tk_list(clss) if clss.kind_of?(Array)
-
- tk_call(@chart, 'contourlines', xcrd, ycrd, vals, clss)
- self
- end
-
- def contourfill(xcrd, ycrd, vals, clss=None)
- xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array)
- ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array)
- vals = array2tk_list(vals) if vals.kind_of?(Array)
- clss = array2tk_list(clss) if clss.kind_of?(Array)
-
- tk_call(@chart, 'contourfill', xcrd, ycrd, vals, clss)
- self
- end
-
- def contourbox(xcrd, ycrd, vals, clss=None)
- xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array)
- ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array)
- vals = array2tk_list(vals) if vals.kind_of?(Array)
- clss = array2tk_list(clss) if clss.kind_of?(Array)
-
- tk_call(@chart, 'contourbox', xcrd, ycrd, vals, clss)
- self
- end
-
- def color_map(colors)
- colors = array2tk_list(colors) if colors.kind_of?(Array)
-
- tk_call_without_enc(@chart, 'colorMap', colors)
- self
- end
-
- def grid_cells(xcrd, ycrd)
- xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array)
- ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array)
-
- tk_call_without_enc(@chart, 'grid', xcrd, ycrd)
- self
- end
-
- def dataconfig(series, key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'dataconfig', series, *hash_kv(key, true))
- else
- tk_call(@chart, 'dataconfig', series, "-#{key}", value)
- end
- end
-
- def rescale(xscale, yscale) # xscale|yscale => [newmin, newmax, newstep]
- tk_call_without_enc(@chart, 'rescale', xscale, yscale)
- self
- end
-
- def trend(series, xcrd, ycrd)
- tk_call_without_enc(@chart, 'trend',
- _get_eval_enc_str(series), xcrd, ycrd)
- self
- end
-
- def rchart(series, xcrd, ycrd)
- tk_call_without_enc(@chart, 'rchart',
- _get_eval_enc_str(series), xcrd, ycrd)
- self
- end
-
- def interval(series, xcrd, ymin, ymax, ycenter=None)
- tk_call(@chart, 'interval', series, xcrd, ymin, ymax, ycenter)
- self
- end
-
- def box_and_whiskers(series, xcrd, ycrd)
- tk_call_without_enc(@chart, 'box-and-whiskers',
- _get_eval_enc_str(series), xcrd, ycrd)
- self
- end
- alias box_whiskers box_and_whiskers
-
- def vectorconfig(series, key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'vectorconfig',
- _get_eval_enc_str(series), *hash_kv(key, true))
- else
- tk_call(@chart, 'vectorconfig', series, "-#{key}", value)
- end
- self
- end
-
- def vector(series, xcrd, ycrd, ucmp, vcmp)
- tk_call_without_enc(@chart, 'vector', _get_eval_enc_str(series),
- xcrd, ycrd, ucmp, vcmp)
- self
- end
-
- def dotconfig(series, key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'dotconfig',
- _get_eval_enc_str(series), *hash_kv(key, true))
- else
- tk_call(@chart, 'dotconfig', series, "-#{key}", value)
- end
- self
- end
-
- def dot(series, xcrd, ycrd, value)
- tk_call_without_enc(@chart, 'dot', _get_eval_enc_str(series),
- xcrd, ycrd, value)
- self
- end
- end
-
- ############################
- class Stripchart < XYPlot
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createStripchart'.freeze
- ].freeze
- end
-
- ############################
- class TXPlot < XYPlot
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createTXPlot'.freeze
- ].freeze
- end
-
- ############################
- class XLogYPlot < XYPlot
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createXLogYPlot'.freeze
- ].freeze
- end
-
- ############################
- class Histogram < XYPlot
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createHistogram'.freeze
- ].freeze
- end
-
- ############################
- class PolarPlot < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createPolarplot'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent,] radius_data [, keys])
- # radius_data := Array of [maximum_radius, stepsize]
- if args[0].kind_of?(Array)
- @radius_data = args.shift
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @radius_data = args.shift
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@radius_data))
- end
- private :_create_chart
-
- def __destroy_hook__
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.mutex.synchronize{
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.delete(@path)
- }
- end
-
- def plot(series, radius, angle)
- tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(series),
- radius, angle)
- self
- end
-
- def dataconfig(series, key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'dataconfig', _get_eval_enc_str(series),
- *hash_kv(key, true))
- else
- tk_call(@chart, 'dataconfig', series, "-#{key}", value)
- end
- end
- end
- Polarplot = PolarPlot
-
- ############################
- class IsometricPlot < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createIsometricPlot'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent,] xaxis, yaxis, [, step] [, keys])
- # xaxis := Array of [minimum, maximum]
- # yaxis := Array of [minimum, maximum]
- # step := Float of stepsize | "noaxes" | :noaxes
- if args[0].kind_of?(Array)
- @xaxis = args.shift
- @yaxis = args.shift
-
- if args[0].kind_of?(Hash)
- @stepsize = :noaxes
- else
- @stepsize = args.shift
- end
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @xaxis = args.shift
- @yaxis = args.shift
-
- if args[0].kind_of?(Hash)
- @stepsize = :noaxes
- else
- @stepsize = args.shift
- end
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@xaxis), array2tk_list(@yaxis),
- @stepsize)
- end
- private :_create_chart
-
- def plot(type, *args)
- self.__send__("plot_#{type.to_s.tr('-', '_')}", *args)
- end
-
- def plot_rectangle(*args) # args := x1, y1, x2, y2, color
- tk_call_without_enc(@chart, 'plot', 'rectangle', *(args.flatten))
- self
- end
-
- def plot_filled_rectangle(*args) # args := x1, y1, x2, y2, color
- tk_call_without_enc(@chart, 'plot', 'filled-rectangle', *(args.flatten))
- self
- end
-
- def plot_circle(*args) # args := xc, yc, radius, color
- tk_call_without_enc(@chart, 'plot', 'circle', *(args.flatten))
- self
- end
-
- def plot_filled_circle(*args) # args := xc, yc, radius, color
- tk_call_without_enc(@chart, 'plot', 'filled-circle', *(args.flatten))
- self
- end
- end
- Isometricplot = IsometricPlot
-
- ############################
- class Plot3D < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::create3DPlot'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent,] xaxis, yaxis, zaxis [, keys])
- # xaxis := Array of [minimum, maximum, stepsize]
- # yaxis := Array of [minimum, maximum, stepsize]
- # zaxis := Array of [minimum, maximum, stepsize]
- if args[0].kind_of?(Array)
- @xaxis = args.shift
- @yaxis = args.shift
- @zaxis = args.shift
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @xaxis = args.shift
- @yaxis = args.shift
- @zaxis = args.shift
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@xaxis),
- array2tk_list(@yaxis),
- array2tk_list(@zaxis))
- end
- private :_create_chart
-
- def plot_function(cmd=Proc.new)
- Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd)} $x $y}")
- tk_call_without_enc(@chart, 'plotfunc', "#{@path}_#{@chart}")
- self
- end
-
- def plot_funcont(conts, cmd=Proc.new)
- conts = array2tk_list(conts) if conts.kind_of?(Array)
- Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd)} $x $y}")
- tk_call_without_enc(@chart, 'plotfuncont', "#{@path}_#{@chart}", conts)
- self
- end
-
- def grid_size(nxcells, nycells)
- tk_call_without_enc(@chart, 'gridsize', nxcells, nycells)
- self
- end
-
- def plot_line(dat, color)
- # dat has to be provided as a 2 level array.
- # 1st level contains rows, drawn in y-direction,
- # and each row is an array whose elements are drawn in x-direction,
- # for the columns.
- tk_call_without_enc(@chart, 'plotline', dat, color)
- self
- end
-
- def plot_data(dat)
- # dat has to be provided as a 2 level array.
- # 1st level contains rows, drawn in y-direction,
- # and each row is an array whose elements are drawn in x-direction,
- # for the columns.
- tk_call_without_enc(@chart, 'plotdata', dat)
- self
- end
-
- def zconfig(key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'zconfig', *hash_kv(key, true))
- else
- tk_call(@chart, 'zconfig', "-#{key}", value)
- end
- self
- end
-
- def colour(fill, border)
- # configure the colours to use for polygon borders and inner area
- tk_call_without_enc(@chart, 'colour', fill, border)
- self
- end
- alias colours colour
- alias colors colour
- alias color colour
- end
-
- ############################
- class Barchart3D < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::create3DBarchart'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent,] yaxis, nobars [, keys])
- # yaxis := Array of [minimum, maximum, stepsize]
- # nobars := number of bars
- if args[0].kind_of?(Array)
- @yaxis = args.shift
- @nobars = args.shift
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @yaxis = args.shift
- @nobars = args.shift
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@yaxis), @nobars)
- end
- private :_create_chart
-
- def plot(label, yvalue, color)
- tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(label),
- _get_eval_enc_str(yvalue), color)
- self
- end
-
- def config(key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'config', *hash_kv(key, true))
- else
- tk_call(@chart, 'config', "-#{key}", value)
- end
- self
- end
- end
-
- ############################
- class RibbonChart3D < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::create3DRibbonChart'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent,] names, yaxis, zaxis [, keys])
- # names := Array of the series
- # yaxis := Array of [minimum, maximum, stepsize]
- # zaxis := Array of [minimum, maximum, stepsize]
- if args[0].kind_of?(Array)
- @names = args.shift
- @yaxis = args.shift
- @zaxis = args.shift
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @names = args.shift
- @yaxis = args.shift
- @zaxis = args.shift
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@names),
- array2tk_list(@yaxis),
- array2tk_list(@zaxis))
- end
- private :_create_chart
-
- def line(*args) # xypairs, color
- color = args.pop # last argument is a color
- xypairs = TkComm.slice_ary(args.flatten, 2) # regenerate xypairs
- tk_call_without_enc(@chart, 'line', xypairs, color)
- self
- end
-
- def area(*args) # xypairs, color
- color = args.pop # last argument is a color
- xypairs = TkComm.slice_ary(args.flatten, 2) # regenerate xypairs
- tk_call_without_enc(@chart, 'area', xypairs, color)
- self
- end
-
- def zconfig(key, value=None)
- if key.kind_of?(Hash)
- tk_call_without_enc(@chart, 'zconfig', *hash_kv(key, true))
- else
- tk_call(@chart, 'zconfig',"-#{key}", value)
- end
- self
- end
- end
-
-
- ############################
- class Piechart < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createPiechart'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent] [, keys])
- if args[0].kind_of?(Tk::Canvas)
- parent = args.shift
- @path = parent.path
- else
- super(*args) # create canvas widget
- end
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path)
- end
- private :_create_chart
-
- def plot(*dat) # argument is a list of [label, value]
- tk_call(@chart, 'plot', dat.flatten)
- self
- end
-
- def colours(*list)
- tk_call_without_enc(@chart, 'colours', *list)
- self
- end
- alias colors colours
- end
-
-
- ############################
- class Radialchart < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createRadialchart'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent,] names, scale, style [, keys])
- # radius_data := Array of [maximum_radius, stepsize]
- if args[0].kind_of?(Array)
- @names = args.shift
- @scale = args.shift
- @style = args.shift
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @names = args.shift
- @scale = args.shift
- @style = args.shift
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@names), @scale, @style)
- end
- private :_create_chart
-
- def __destroy_hook__
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.mutex.synchronize{
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.delete(@path)
- }
- end
-
- def plot(data, color, thickness)
- tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(data),
- color, thickness)
- self
- end
-
- def colours(*list)
- tk_call_without_enc(@chart, 'colours', *list)
- self
- end
- alias colors colours
- end
-
- ############################
- class Barchart < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createBarchart'.freeze
- ].freeze
-
- def initialize(*args)
- # args := ([parent,] xlabels, ylabels [, series] [, keys])
- # xlabels, ylabels := labels | axis ( depend on normal or horizontal )
- # labels := Array of [label, label, ...]
- # (It determines the number of bars that will be plotted per series.)
- # axis := Array of [minimum, maximum, stepsize]
- # series := Integer number of data series | 'stacked' | :stacked
- if args[0].kind_of?(Array)
- @xlabels = args.shift
- @ylabels = args.shift
-
- if args[0].kind_of?(Hash)
- @series_size = :stacked
- else
- @series_size = args.shift
- end
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @xlabels = args.shift
- @ylabels = args.shift
-
- if args[0].kind_of?(Hash)
- @series_size = :stacked
- else
- @series_size = args.shift
- end
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@xlabels), array2tk_list(@ylabels),
- @series_size)
- end
- private :_create_chart
-
- def __destroy_hook__
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.mutex.synchronize{
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.delete(@path)
- }
- end
-
- def plot(series, dat, col=None)
- tk_call(@chart, 'plot', series, dat, col)
- self
- end
-
- def colours(*cols)
- # set the colours to be used
- tk_call(@chart, 'colours', *cols)
- self
- end
- alias colour colours
- alias colors colours
- alias color colours
- end
-
- ############################
- class HorizontalBarchart < Barchart
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createHorizontalBarchart'.freeze
- ].freeze
- end
-
- ############################
- class Boxplot < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createBoxplot'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent,] xaxis, ylabels [, keys])
- # xaxis := Array of [minimum, maximum, stepsize]
- # yaxis := List of labels for the y-axis
- if args[0].kind_of?(Array)
- @xaxis = args.shift
- @ylabels = args.shift
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @xaxis = args.shift
- @ylabels = args.shift
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@xaxis), array2tk_list(@ylabels))
- end
- private :_create_chart
-
- def __destroy_hook__
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.mutex.synchronize{
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.delete(@path)
- }
- end
-
- def plot(label, *values)
- tk_call(@chart, 'plot', label, values.flatten)
- self
- end
- end
-
- ############################
- class RightAxis < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createRightAxis'.freeze
- ].freeze
-
- def initialize(*args) # args := ([parent,] yaxis [, keys])
- # yaxis := Array of [minimum, maximum, stepsize]
- if args[0].kind_of?(Array)
- @yaxis = args.shift
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @yaxis = args.shift
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- array2tk_list(@yaxis))
- end
- private :_create_chart
-
- def __destroy_hook__
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.mutex.synchronize{
- Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.delete(@path)
- }
- end
- end
-
- ############################
- class Timechart < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createTimechart'.freeze
- ].freeze
-
- def initialize(*args)
- # args := ([parent,] time_begin, time_end, items [, keys])
- # time_begin := String of time format (e.g. "1 january 2004")
- # time_end := String of time format (e.g. "1 january 2004")
- # items := Expected/maximum number of items
- # ( This determines the vertical spacing. )
- if args[0].kind_of?(String)
- @time_begin = args.shift
- @time_end = args.shift
- @items = args.shift
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @time_begin = args.shift
- @time_end = args.shift
- @items = args.shift
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call_without_enc(self.class::TkCommandNames[1], @path,
- @time_begin, @time_end, @items)
- end
- private :_create_chart
-
- def period(txt, time_begin, time_end, col=None)
- tk_call(@chart, 'period', txt, time_begin, time_end, col)
- self
- end
-
- def milestone(txt, time, col=None)
- tk_call(@chart, 'milestone', txt, time, col)
- self
- end
-
- def vertline(txt, time)
- tk_call(@chart, 'vertline', txt, time)
- self
- end
-
- def hscroll=(scr)
- tk_call_without_enc(@chart, 'hscroll', scr)
- scr
- end
- def hscroll(scr)
- tk_call_without_enc(@chart, 'hscroll', scr)
- self
- end
-
- def vscroll=(scr)
- tk_call_without_enc(@chart, 'vscroll', scr)
- scr
- end
- def vscroll(scr)
- tk_call_without_enc(@chart, 'vscroll', scr)
- self
- end
- end
-
- ############################
- class Ganttchart < Tk::Canvas
- include ChartMethod
-
- TkCommandNames = [
- 'canvas'.freeze,
- '::Plotchart::createGanttchart'.freeze
- ].freeze
-
- def initialize(*args)
- # args := ([parent,] time_begin, time_end, items [, text_width] [, keys])
- # time_begin := String of time format (e.g. "1 january 2004")
- # time_end := String of time format (e.g. "1 january 2004")
- # args := Expected/maximum number of items
- # ( This determines the vertical spacing. ),
- # Expected/maximum width of items,
- # Option Hash ( { key=>value, ... } )
- if args[0].kind_of?(String)
- @time_begin = args.shift
- @time_end = args.shift
- @args = args
-
- super(*args) # create canvas widget
- else
- parent = args.shift
-
- @time_begin = args.shift
- @time_end = args.shift
- @args = args
-
- if parent.kind_of?(Tk::Canvas)
- @path = parent.path
- else
- super(parent, *args) # create canvas widget
- end
- end
-
- @chart = _create_chart
- end
-
- def _create_chart
- p self.class::TkCommandNames[1] if $DEBUG
- tk_call(self.class::TkCommandNames[1], @path,
- @time_begin, @time_end, *args)
- end
- private :_create_chart
-
- def task(txt, time_begin, time_end, completed=0.0)
- list(tk_call(@chart, 'task', txt, time_begin, time_end,
- completed)).collect!{|id|
- TkcItem.id2obj(self, id)
- }
- end
-
- def milestone(txt, time, col=None)
- tk_call(@chart, 'milestone', txt, time, col)
- self
- end
-
- def vertline(txt, time)
- tk_call(@chart, 'vertline', txt, time)
- self
- end
-
- def connect(from_task, to_task)
- from_task = array2tk_list(from_task) if from_task.kind_of?(Array)
- to_task = array2tk_list(to_task) if to_task.kind_of?(Array)
-
- tk_call(@chart, 'connect', from_task, to_task)
- self
- end
-
- def summary(txt, tasks)
- tasks = array2tk_list(tasks) if tasks.kind_of?(Array)
- tk_call(@chart, 'summary', tasks)
- self
- end
-
- def color_of_part(keyword, newcolor)
- tk_call(@chart, 'color', keyword, newcolor)
- self
- end
-
- def font_of_part(keyword, newfont)
- tk_call(@chart, 'font', keyword, newfont)
- self
- end
-
- def hscroll=(scr)
- tk_call_without_enc(@chart, 'hscroll', scr)
- scr
- end
- def hscroll(scr)
- tk_call_without_enc(@chart, 'hscroll', scr)
- self
- end
-
- def vscroll=(scr)
- tk_call_without_enc(@chart, 'vscroll', scr)
- scr
- end
- def vscroll(scr)
- tk_call_without_enc(@chart, 'vscroll', scr)
- self
- end
- end
-
- ############################
- class PlotSeries < TkObject
- SeriesID_TBL = TkCore::INTERP.create_table
-
- (Series_ID = ['series'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
- TkCore::INTERP.init_ip_env{
- SeriesID_TBL.mutex.synchronize{ SeriesID_TBL.clear }
- }
-
- def self.id2obj(chart, id)
- path = chart.path
- SeriesID_TBL.mutex.synchronize{
- if SeriesID_TBL[path]
- SeriesID_TBL[path][id]? SeriesID_TBL[path][id]: id
- else
- id
- end
- }
- end
-
- def initialize(chart, keys=nil)
- @parent = @chart_obj = chart
- @ppath = @chart_obj.path
- Series_ID.mutex.synchronize{
- @path = @series = @id = Series_ID.join(TkCore::INTERP._ip_id_)
- Series_ID[1].succ!
- }
- SeriesID_TBL.mutex.synchronize{
- SeriesID_TBL[@ppath] ||= {}
- SeriesID_TBL[@ppath][@id] = self
- }
- dataconfig(keys) if keys.kind_of?(Hash)
- end
-
- def plot(*args)
- @chart_obj.plot(@series, *args)
- end
-
- def dataconfig(key, value=None)
- @chart_obj.dataconfig(@series, key, value)
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/ruler.rb b/ext/tk/lib/tkextlib/tcllib/ruler.rb
deleted file mode 100644
index f57b0b0e1a..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/ruler.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/ruler.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * ruler widget
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::ruler', '1.0')
-TkPackage.require('widget::ruler')
-
-module Tk::Tcllib
- module Widget
- class Ruler < TkWindow
- PACKAGE_NAME = 'widget::ruler'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::ruler')
- rescue
- ''
- end
- end
- end
- end
-end
-
-class Tk::Tcllib::Widget::Ruler
- TkCommandNames = ['::widget::ruler'.freeze].freeze
-
- def __boolval_optkeys
- ['showvalues', 'outline', 'grid']
- end
- private :__boolval_optkeys
-
- def __numlistval_optkeys
- ['interval', 'sizes']
- end
- private :__numlistval_optkeys
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def redraw
- tk_send('redraw')
- self
- end
-
- def shade(org, dest, frac)
- tk_send('shade', org, dest, frac)
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/screenruler.rb b/ext/tk/lib/tkextlib/tcllib/screenruler.rb
deleted file mode 100644
index 64dd4f4ccc..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/screenruler.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/screenruler.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * screenruler dialog
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::screenruler', '1.1')
-TkPackage.require('widget::screenruler')
-
-module Tk::Tcllib
- module Widget
- class ScreenRuler < TkWindow
- PACKAGE_NAME = 'widget::ruler'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::screenruler')
- rescue
- ''
- end
- end
- end
- Screenruler = ScreenRuler
- end
-end
-
-class Tk::Tcllib::Widget::ScreenRuler
- TkCommandNames = ['::widget::screenruler'.freeze].freeze
-
- def __boolval_optkeys
- ['topmost', 'reflect']
- end
- private :__boolval_optkeys
-
- def __numlistval_optkeys
- ['alpha']
- end
- private :__numlistval_optkeys
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def display
- tk_send('display')
- self
- end
- alias show display
-
- def hide
- tk_send('hide')
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/scrolledwindow.rb b/ext/tk/lib/tkextlib/tcllib/scrolledwindow.rb
deleted file mode 100644
index 380d301a1a..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/scrolledwindow.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/scrolledwindow.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * scrolledwindow widget
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::scrolledwindow', '1.2')
-TkPackage.require('widget::scrolledwindow')
-
-module Tk::Tcllib
- module Widget
- class Scrolledwindow < Tk::Tile::TFrame
- PACKAGE_NAME = 'widget::scrolledwindow'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::scrolledwindow')
- rescue
- ''
- end
- end
- end
- ScrolledWindow = Scrolledwindow
- end
-end
-
-class Tk::Tcllib::Widget::ScrolledWindow
- TkCommandNames = ['::widget::scrolledwindow'.freeze].freeze
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def getframe
- window(tk_send_without_enc('getframe'))
- end
- alias get_frame getframe
-
- def setwidget(w)
- window(tk_send_without_enc('setwidget', w))
- end
- alias set_widget setwidget
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/scrollwin.rb b/ext/tk/lib/tkextlib/tcllib/scrollwin.rb
deleted file mode 100644
index f9bf127799..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/scrollwin.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/scrollwin.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Scrolled widget
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::scrolledwindow', '1.0')
-TkPackage.require('widget::scrolledwindow')
-
-module Tk::Tcllib
- module Widget
- class ScrolledWindow < TkWindow
- PACKAGE_NAME = 'widget::scrolledwindow'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::scrolledwindow')
- rescue
- ''
- end
- end
- end
- Scrolledwindow = ScrolledWindow
- end
-end
-
-class Tk::Tcllib::Widget::ScrolledWindow
- TkCommandNames = ['::widget::scrolledwindow'.freeze].freeze
-
- def __numlistval_optkeys
- ['ipad']
- end
- private :__numlistval_optkeys
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def get_frame
- window(tk_send('getframe'))
- end
-
- def set_widget(widget)
- tk_send('setwidget', widget)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/setup.rb b/ext/tk/lib/tkextlib/tcllib/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/tcllib/statusbar.rb b/ext/tk/lib/tkextlib/tcllib/statusbar.rb
deleted file mode 100644
index b2c8f54b94..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/statusbar.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/statusbar.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * statusbar widget
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::statusbar', '1.2')
-TkPackage.require('widget::statusbar')
-
-module Tk::Tcllib
- module Widget
- class Statusbar < Tk::Tile::TFrame
- PACKAGE_NAME = 'widget::statusbar'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::statusbar')
- rescue
- ''
- end
- end
- end
- end
-end
-
-class Tk::Tcllib::Widget::Statusbar
- TkCommandNames = ['::widget::statusbar'.freeze].freeze
-
- def __boolval_optkeys
- super() << 'separator' << 'resize' << 'resizeseparator'
- end
- private :__boolval_optkeys
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def getframe
- window(tk_send_without_enc('getframe'))
- end
- alias get_frame getframe
-
- def add(w, keys={})
- window(tk_send_without_enc('setwidget', *(hash_kv(keys))))
- end
-
- def remove(*wins)
- tk_send_without_enc('remove', *wins)
- self
- end
-
- def remove_with_destroy(*wins)
- tk_send_without_enc('remove', '-destroy', *wins)
- self
- end
-
- def delete(*wins)
- tk_send_without_enc('delete', *wins)
- self
- end
-
- def items(pat=None)
- tk_split_list(tk_send('items', pat))
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/style.rb b/ext/tk/lib/tkextlib/tcllib/style.rb
deleted file mode 100644
index f3b66b7861..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/style.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/style.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * select and use some 'style' of option (resource) DB
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-module Tk::Tcllib
- module Style
- PACKAGE_NAME = 'style'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('style')
- rescue
- ''
- end
- end
-
- def self.not_available
- fail RuntimeError, "'tkextlib/tcllib/style' extension is not available on your current environment."
- end
-
- def self.names
- Tk::Tcllib::Style.not_available
- end
-
- def self.use(style)
- Tk::Tcllib::Style.not_available
- end
- end
-end
-
-# TkPackage.require('style', '0.1')
-# TkPackage.require('style', '0.3')
-TkPackage.require('style')
-
-module Tk::Tcllib
- class << Style
- undef not_available
- end
-
- module Style
- extend TkCore
-
- def self.names
- tk_split_simplelist(tk_call('style::names'))
- end
-
- def self.use(style)
- tk_call('style::use', style)
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/superframe.rb b/ext/tk/lib/tkextlib/tcllib/superframe.rb
deleted file mode 100644
index 776ad7c166..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/superframe.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/superframe.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Superframe widget - enhanced labelframe widget
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::superframe', '1.0')
-TkPackage.require('widget::superframe')
-
-module Tk::Tcllib
- module Widget
- class SuperFrame < TkWindow
- PACKAGE_NAME = 'widget::superframe'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::superframe')
- rescue
- ''
- end
- end
- end
- Superframe = SuperlFrame
- end
-end
-
-class Tk::Tcllib::Widget::SuperFrame
- TkCommandNames = ['::widget::superframe'.freeze].freeze
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def labelwidget
- window(tk_send('labelwidget'))
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/swaplist.rb b/ext/tk/lib/tkextlib/tcllib/swaplist.rb
deleted file mode 100644
index 7eaed8dbaa..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/swaplist.rb
+++ /dev/null
@@ -1,151 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/swaplist.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * A dialog which allows a user to move options between two lists
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('swaplist', '0.1')
-TkPackage.require('swaplist')
-
-module Tk::Tcllib
- class Swaplist_Dialog < TkWindow
- PACKAGE_NAME = 'swaplist'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('swaplist')
- rescue
- ''
- end
- end
- end
-end
-
-
-class Tk::Tcllib::Swaplist_Dialog
- TkCommandNames = ['::swaplist::swaplist'.freeze].freeze
- WidgetClassName = 'Swaplist'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.show(*args)
- dialog = self.new(*args)
- dialog.show
- [dialog.status, dialog.value]
- end
- def self.display(*args)
- self.show(*args)
- end
-
- def initialize(*args)
- # args = (parent=nil, complete_list=[], selected_list=[], keys=nil)
- keys = args.pop
- if keys.kind_of?(Hash)
- @selected_list = args.pop
- @complete_list = args.pop
- @keys = _symbolkey2str(keys)
- args.push(keys)
- else
- @selected_list = keys
- @complete_list = args.pop
- @keys = {}
- end
-
- @selected_list = [] unless @selected_list
- @complete_list = [] unless @complete_list
-
- @variable = TkVariable.new
- @status = nil
-
- super(*args)
- end
-
- def create_self(keys)
- # dummy
- end
- private :create_self
-
- def show
- @variable.value = ''
- @status = bool(tk_call(self.class::TkCommandNames[0],
- @path, @variable,
- @complete_list, @selected_list,
- *hash_kv(@keys)))
- end
- alias display show
-
- def status
- @status
- end
-
- def value
- @variable.list
- end
- alias selected value
-
- def cget_strict(slot)
- slot = slot.to_s
- if slot == 'complete_list'
- @complete_list
- elsif slot == 'selected_list'
- @selected_list
- else
- @keys[slot]
- end
- end
- def cget(slot)
- cget_strict(slot)
- end
-
- def configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot.each{|k, v| configure(k, v)}
- else
- slot = slot.to_s
- value = _symbolkey2str(value) if value.kind_of?(Hash)
- if value && value != None
- if slot == 'complete_list'
- @complete_list = value
- elsif slot == 'selected_list'
- @selected_list = value
- else
- @keys[slot] = value
- end
- else
- if slot == 'complete_list'
- @complete_list = []
- elsif slot == 'selected_list'
- @selected_list = []
- else
- @keys.delete(slot)
- end
- end
- end
- self
- end
-
- def configinfo(slot = nil)
- if slot
- slot = slot.to_s
- if slot == 'complete_list'
- [ slot, nil, nil, nil, @complete_list ]
- elsif slot == 'selected_list'
- [ slot, nil, nil, nil, @selected_list ]
- else
- [ slot, nil, nil, nil, @keys[slot] ]
- end
- else
- @keys.collect{|k, v| [ k, nil, nil, nil, v ] } \
- << [ 'complete_list', nil, nil, nil, @complete_list ] \
- << [ 'selected_list', nil, nil, nil, @selected_list ]
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/tablelist.rb b/ext/tk/lib/tkextlib/tcllib/tablelist.rb
deleted file mode 100644
index 7cfe2faf1e..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/tablelist.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/tablelist.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * A multi-column listbox
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# check Tile extension :: If already loaded, use tablelist_tile.
-unless defined? Tk::Tcllib::Tablelist_usingTile
- Tk::Tcllib::Tablelist_usingTile =
- TkPackage.provide('tile') || TkPackage.provide('Ttk')
-end
-
-if Tk::Tcllib::Tablelist_usingTile
- # with Tile
- require 'tkextlib/tcllib/tablelist_tile'
-
-else
- # without Tile
-
- # TkPackage.require('tablelist', '4.2')
- TkPackage.require('tablelist')
-
- require 'tkextlib/tcllib/tablelist_core'
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb b/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb
deleted file mode 100644
index b45f18796a..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb
+++ /dev/null
@@ -1,1073 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/tablelist_core.rb
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * This file is required by 'tkextlib/tcllib/tablelist.rb' or
-# 'tkextlib/tcllib/tablelist_tile.rb'.
-#
-
-module Tk
- module Tcllib
- class Tablelist < TkWindow
- if Tk::Tcllib::Tablelist_usingTile
- PACKAGE_NAME = 'Tablelist_tile'.freeze
- else
- PACKAGE_NAME = 'Tablelist'.freeze
- end
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require(self.package_name)
- rescue
- ''
- end
- end
-
- def self.use_Tile?
- (Tk::Tcllib::Tablelist_usingTile)? true: false
- end
- end
- TableList = Tablelist
- end
-end
-
-module Tk::Tcllib::TablelistItemConfig
- include TkItemConfigMethod
-
- def _to_idx(idx)
- if idx.kind_of?(Array)
- idx.collect{|elem| _get_eval_string(elem)}.join(',')
- else
- idx
- end
- end
- def _from_idx(idx)
- return idx unless idx.kind_of?(String)
-
- if idx[0] == ?@ # '@x,y'
- idx
- elsif idx =~ /([^,]+),([^,]+)/
- row = $1, column = $2
- [num_or_str(row), num_or_str(column)]
- else
- num_or_str(idx)
- end
- end
- private :_to_idx, :_from_idx
-
- def __item_cget_cmd(mixed_id)
- [self.path, mixed_id[0] + 'cget', _to_idx(mixed_id[1])]
- end
- def __item_config_cmd(mixed_id)
- [self.path, mixed_id[0] + 'configure', _to_idx(mixed_id[1])]
- end
-
- def cell_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['cell', tagOrId], option)
- end
- def cell_cget(tagOrId, option)
- itemcget(['cell', tagOrId], option)
- end
- def cell_cget_strict(tagOrId, option)
- itemcget_strict(['cell', tagOrId], option)
- end
- def cell_configure(tagOrId, slot, value=None)
- itemconfigure(['cell', tagOrId], slot, value)
- end
- def cell_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['cell', tagOrId], slot)
- end
- def current_cell_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['cell', tagOrId], slot)
- end
- alias cellcget_tkstring cell_cget_tkstring
- alias cellcget cell_cget
- alias cellcget_strict cell_cget_strict
- alias cellconfigure cell_configure
- alias cellconfiginfo cell_configinfo
- alias current_cellconfiginfo current_cell_configinfo
-
- def column_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['column', tagOrId], option)
- end
- def column_cget(tagOrId, option)
- itemcget(['column', tagOrId], option)
- end
- def column_cget_strict(tagOrId, option)
- itemcget_strict(['column', tagOrId], option)
- end
- def column_configure(tagOrId, slot, value=None)
- itemconfigure(['column', tagOrId], slot, value)
- end
- def column_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['column', tagOrId], slot)
- end
- def current_column_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['column', tagOrId], slot)
- end
- alias columncget_tkstring column_cget_tkstring
- alias columncget column_cget
- alias columncget_strict column_cget_strict
- alias columnconfigure column_configure
- alias columnconfiginfo column_configinfo
- alias current_columnconfiginfo current_column_configinfo
-
- def row_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['row', tagOrId], option)
- end
- def row_cget(tagOrId, option)
- itemcget(['row', tagOrId], option)
- end
- def row_cget_strict(tagOrId, option)
- itemcget_strict(['row', tagOrId], option)
- end
- def row_configure(tagOrId, slot, value=None)
- itemconfigure(['row', tagOrId], slot, value)
- end
- def row_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['row', tagOrId], slot)
- end
- def current_row_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['row', tagOrId], slot)
- end
- alias rowcget_tkstring row_cget_tkstring
- alias rowcget row_cget
- alias rowcget_strict row_cget_strict
- alias rowconfigure row_configure
- alias rowconfiginfo row_configinfo
- alias current_rowconfiginfo current_row_configinfo
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-end
-
-class Tk::Tcllib::Tablelist
- include Tk::Tcllib::TablelistItemConfig
- include Scrollable
-
- TkCommandNames = ['::tablelist::tablelist'.freeze].freeze
- WidgetClassName = 'Tablelist'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- ##########################
-
- def __numval_optkeys
- super() + ['titlecolumns']
- end
- private :__numval_optkeys
-
- def __strval_optkeys
- super() + ['snipstring']
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- super() - ['takefocus'] + [
- 'forceeditendcommand', 'movablecolumns', 'movablerows',
- 'protecttitlecolumns', 'resizablecolumns', 'setfocus',
- 'showarrow', 'showlabels', 'showseparators'
- ]
- end
- private :__boolval_optkeys
-
- def __listval_optkeys
- super() + ['columns', 'columntitles']
- end
- private :__listval_optkeys
-
- def __tkvariable_optkeys
- super() + ['listvariable']
- end
- private :__tkvariable_optkeys
-
- def __val2ruby_optkeys # { key=>proc, ... }
- # The method is used to convert a opt-value to a ruby's object.
- # When get the value of the option "key", "proc.call(value)" is called.
- super().update('stretch'=>proc{|v|
- (v == 'all')? v: simplelist(v)
- },
- 'takefocus'=>proc{|v|
- case v
- when '1'
- true
- when '0'
- false
- when ''
- nil
- else # cmd
- tk_tcl2ruby(cmd)
- end
- })
- end
- private :__val2ruby_optkeys
-
- def __ruby2val_optkeys # { key=>proc, ... }
- # The method is used to convert a ruby's object to a opt-value.
- # When set the value of the option "key", "proc.call(value)" is called.
- # That is, "-#{key} #{proc.call(value)}".
- super().update('stretch'=>proc{|v|
- (v.kind_of?(Array))? v.collect{|e| _to_idx(e)}: v
- },
- 'takefocus'=>proc{|v|
- case v
- when true
- '1'
- when false
- '0'
- when nil
- ''
- else
- _get_eval_string(v)
- end
- })
- end
- private :__ruby2val_optkeys
-
- def __font_optkeys
- super() + ['labelfont']
- end
- private :__font_optkeys
-
- ##########################
-
- def __item_strval_optkeys(id)
- if id[0] == 'cell'
- super(id) + ['title']
- else
- super(id) - ['text'] + ['title', 'name']
- end
- end
- private :__item_strval_optkeys
-
- def __item_boolval_optkeys(id)
- super(id) + [
- 'changesnipside', 'editable', 'hide', 'resizable', 'selectable',
- 'showarrow', 'showlinenumbers', 'stretchable', 'stretchwindow', 'wrap'
- ]
- end
- private :__item_boolval_optkeys
-
- def __item_listval_optkeys(id)
- if id[0] == 'cell'
- super(id)
- else
- super(id) + ['text']
- end
- end
- private :__item_listval_optkeys
-
- def __item_font_optkeys(id)
- # maybe need to override
- super(id) + ['labelfont']
- end
- private :__item_font_optkeys
-
- ##########################
-
- def activate(index)
- tk_send('activate', _to_idx(index))
- self
- end
-
- def activate_cell(index)
- tk_send('activatecell', _to_idx(index))
- self
- end
- alias activatecell activate_cell
-
- def get_attrib(name=nil)
- if name && name != None
- tk_send('attrib', name)
- else
- ret = []
- lst = simplelist(tk_send('attrib'))
- until lst.empty?
- ret << ( [lst.shift] << lst.shift )
- end
- ret
- end
- end
- def set_attrib(*args)
- tk_send('attrib', *(args.flatten))
- self
- end
-
- def bbox(index)
- list(tk_send('bbox', _to_idx(index)))
- end
-
- def bodypath
- window(tk_send('bodypath'))
- end
-
- def bodytag
- TkBindTag.new_by_name(tk_send('bodytag'))
- end
-
- def cancel_editing
- tk_send('cancelediting')
- self
- end
- alias cancelediting cancel_editing
-
- def get_cellattrib(name=nil)
- if name && name != None
- tk_send('cellattrib', name)
- else
- ret = []
- lst = simplelist(tk_send('cellattrib'))
- until lst.empty?
- ret << ( [lst.shift] << lst.shift )
- end
- ret
- end
- end
- def set_cellattrib(*args)
- tk_send('cellattrib', *(args.flatten))
- self
- end
-
- def cellindex(idx)
- _from_idx(tk_send('cellindex', _to_idx(idx)))
- end
-
- def cellselection_anchor(idx)
- tk_send('cellselection', 'anchor', _to_idx(idx))
- self
- end
-
- def cellselection_clear(first, last=nil)
- if first.kind_of?(Array)
- tk_send('cellselection', 'clear', first.collect{|idx| _to_idx(idx)})
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- tk_send('cellselection', 'clear', first, last)
- end
- self
- end
-
- def cellselection_includes(idx)
- bool(tk_send('cellselection', 'includes', _to_idx(idx)))
- end
-
- def cellselection_set(first, last=nil)
- if first.kind_of?(Array)
- tk_send('cellselection', 'set', first.collect{|idx| _to_idx(idx)})
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- tk_send('cellselection', 'set', first, last)
- end
- self
- end
-
- def get_columnattrib(name=nil)
- if name && name != None
- tk_send('columnattrib', name)
- else
- ret = []
- lst = simplelist(tk_send('columnattrib'))
- until lst.empty?
- ret << ( [lst.shift] << lst.shift )
- end
- ret
- end
- end
- def set_columnattrib(*args)
- tk_send('columnattrib', *(args.flatten))
- self
- end
-
- def columncount
- number(tk_send('columncount'))
- end
-
- def columnindex(idx)
- number(tk_send('columnindex', _to_idx(idx)))
- end
-
- def columnwidth(idx, opt=nil)
- if opt
- number(tk_send('columnwidth', _to_idx(idx), "-#{opt}"))
- else
- number(tk_send('columnwidth', _to_idx(idx)))
- end
- end
- def requested_columnwidth(idx)
- columnwidth(idx, 'requested')
- end
- def stretched_columnwidth(idx)
- columnwidth(idx, 'stretched')
- end
- def total_columnwidth(idx)
- columnwidth(idx, 'total')
- end
-
- def configcelllist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
- ary = []
- lst.slice(3){|idx, opt, val|
- ary << _to_idx(idx) << "-#{opt}" << val
- }
- tk_send('configcelllist', ary)
- self
- end
- alias config_celllist configcelllist
-
- def configcells(*args) # args ==> idx, opt, val, idx, opt, val, ...
- ary = []
- args.slice(3){|idx, opt, val|
- ary << _to_idx(idx) << "-#{opt}" << val
- }
- tk_send('configcells', *ary)
- self
- end
- alias config_cells configcells
-
- def configcolumnlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
- ary = []
- lst.slice(3){|idx, opt, val|
- ary << _to_idx(idx) << "-#{opt}" << val
- }
- tk_send('configcolumnlist', ary)
- self
- end
- alias config_columnlist configcolumnlist
-
- def configcolumns(*args) # args ==> idx, opt, val, idx, opt, val, ...
- ary = []
- args.slice(3){|idx, opt, val|
- ary << _to_idx(idx) << "-#{opt}" << val
- }
- tk_send('configcolumns', *ary)
- self
- end
- alias config_columns configcolumns
-
- def configrowlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
- ary = []
- lst.slice(3){|idx, opt, val|
- ary << _to_idx(idx) << "-#{opt}" << val
- }
- tk_send('configrowlist', ary)
- self
- end
- alias config_rowlist configrowlist
-
- def configrows(*args) # args ==> idx, opt, val, idx, opt, val, ...
- ary = []
- args.slice(3){|idx, opt, val|
- ary << _to_idx(idx) << "-#{opt}" << val
- }
- tk_send('configrows', *ary)
- self
- end
- alias config_rows configrows
-
- def containing(y)
- idx = num_or_str(tk_send('containing', y))
- (idx.kind_of?(Fixnum) && idx < 0)? nil: idx
- end
-
- def containing_cell(x, y)
- idx = _from_idx(tk_send('containingcell', x, y))
- if idx.kind_of?(Array)
- [
- ((idx[0].kind_of?(Fixnum) && idx[0] < 0)? nil: idx[0]),
- ((idx[1].kind_of?(Fixnum) && idx[1] < 0)? nil: idx[1])
- ]
- else
- idx
- end
- end
- alias containingcell containing_cell
-
- def containing_column(x)
- idx = num_or_str(tk_send('containingcolumn', x))
- (idx.kind_of?(Fixnum) && idx < 0)? nil: idx
- end
- alias containingcolumn containing_column
-
- def curcellselection
- simplelist(tk_send('curcellselection')).collect!{|idx| _from_idx(idx)}
- end
-
- def curselection
- list(tk_send('curselection'))
- end
-
- def delete_items(first, last=nil)
- if first.kind_of?(Array)
- tk_send('delete', first.collect{|idx| _to_idx(idx)})
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- tk_send('delete', first, last)
- end
- self
- end
- alias delete delete_items
- alias deleteitems delete_items
-
- def delete_columns(first, last=nil)
- if first.kind_of?(Array)
- tk_send('deletecolumns', first.collect{|idx| _to_idx(idx)})
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- tk_send('deletecolumns', first, last)
- end
- self
- end
- alias deletecolumns delete_columns
-
- def edit_cell(idx)
- tk_send('editcell', _to_idx(idx))
- self
- end
- alias editcell edit_cell
-
- def editwintag
- TkBindTag.new_by_name(tk_send('editwintag'))
- end
-
- def editwinpath
- window(tk_send('editwinpath'))
- end
-
- def entrypath
- window(tk_send('entrypath'))
- end
-
- def fill_column(idx, txt)
- tk_send('fillcolumn', _to_idx(idx), txt)
- self
- end
- alias fillcolumn fill_column
-
- def finish_editing
- tk_send('finishediting')
- self
- end
- alias finishediting finish_editing
-
- def formatinfo
- key, row, col = simplelist(tk_send('formatinfo'))
- [key, number(row), number(col)]
- end
-
- def get(first, last=nil)
- if first.kind_of?(Array)
- simplelist(tk_send('get', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- simplelist(tk_send('get', first, last))
- end
- end
-
- def get_cells(first, last=nil)
- if first.kind_of?(Array)
- simplelist(tk_send('getcells', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- simplelist(tk_send('getcells', first, last))
- end
- end
- alias getcells get_cells
-
- def get_columns(first, last=nil)
- if first.kind_of?(Array)
- simplelist(tk_send('getcolumns', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- simplelist(tk_send('getcolumns', first, last))
- end
- end
- alias getcolumns get_columns
-
- def get_keys(first, last=nil)
- if first.kind_of?(Array)
- simplelist(tk_send('getkeys', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- simplelist(tk_send('getkeys', first, last))
- end
- end
- alias getkeys get_keys
-
- def has_attrib?(name)
- bool(tk_send('hasattrib', name))
- end
-
- def has_cellattrib?(idx, name)
- bool(tk_send('hascellattrib', _to_idx(idx), name))
- end
-
- def has_columnattrib?(idx, name)
- bool(tk_send('hascolumnattrib', _to_idx(idx), name))
- end
-
- def has_rowattrib?(idx, name)
- bool(tk_send('hasrowattrib', _to_idx(idx), name))
- end
-
- def imagelabelpath(idx)
- window(tk_send('imagelabelpath', _to_idx(idx)))
- end
-
- def index(idx)
- number(tk_send('index', _to_idx(idx)))
- end
-
- def insert(idx, *items)
- tk_send('insert', _to_idx(idx), *items)
- self
- end
-
- def insert_columnlist(idx, columnlist)
- tk_send('insertcolumnlist', _to_idx(idx), columnlist)
- self
- end
- alias insertcolumnlist insert_columnlist
-
- def insert_columns(idx, *args)
- tk_send('insertcolums', _to_idx(idx), *args)
- self
- end
- alias insertcolumns insert_columns
-
- def insert_list(idx, list)
- tk_send('insertlist', _to_idx(idx), list)
- self
- end
- alias insertlist insert_list
-
- def is_elem_snipped?(cellidx, tkvar)
- bool(tk_send('iselemsnipped', _to_idx(cellidx), tkvar))
- end
- alias elem_snipped? is_elem_snipped?
-
- def is_title_snipped?(colidx, tkvar)
- bool(tk_send('istitlesnipped', _to_idx(colidx), tkvar))
- end
- alias title_snipped? is_title_snipped?
-
- def itemlistvar
- TkVarAccess.new(tk_send('itemlistvar'))
- end
-
- def labelpath(idx)
- window(tk_send('labelpath', _to_idx(idx)))
- end
-
- def labels
- simplelist(tk_send('labels'))
- end
-
- def labeltag
- TkBindTag.new_by_name(tk_send('labeltag'))
- end
-
- def move(src, target)
- tk_send('move', _to_idx(src), _to_idx(target))
- self
- end
-
- def move_column(src, target)
- tk_send('movecolumn', _to_idx(src), _to_idx(target))
- self
- end
- alias movecolumn move_column
-
- def nearest(y)
- _from_idx(tk_send('nearest', y))
- end
-
- def nearest_cell(x, y)
- _from_idx(tk_send('nearestcell', x, y))
- end
- alias nearestcell nearest_cell
-
- def nearest_column(x)
- _from_idx(tk_send('nearestcolumn', x))
- end
- alias nearestcolumn nearest_column
-
- def reject_input
- tk_send('rejectinput')
- self
- end
- alias rejectinput reject_input
-
- def reset_sortinfo
- tk_send('resetsortinfo')
- self
- end
- alias resetsortinfo reset_sortinfo
-
- def get_rowattrib(name=nil)
- if name && name != None
- tk_send('rowattrib', name)
- else
- ret = []
- lst = simplelist(tk_send('rowattrib'))
- until lst.empty?
- ret << ( [lst.shift] << lst.shift )
- end
- ret
- end
- end
- def set_rowattrib(*args)
- tk_send('rowattrib', *(args.flatten))
- self
- end
-
- def scan_mark(x, y)
- tk_send('scan', 'mark', x, y)
- self
- end
-
- def scan_dragto(x, y)
- tk_send('scan', 'dragto', x, y)
- self
- end
-
- def see(idx)
- tk_send('see', _to_idx(idx))
- self
- end
-
- def see_cell(idx)
- tk_send('seecell', _to_idx(idx))
- self
- end
- alias seecell see_cell
-
- def see_column(idx)
- tk_send('seecolumn', _to_idx(idx))
- self
- end
- alias seecolumn see_column
-
- def selection_anchor(idx)
- tk_send('selection', 'anchor', _to_idx(idx))
- self
- end
-
- def selection_clear(first, last=nil)
- if first.kind_of?(Array)
- tk_send('selection', 'clear', first.collect{|idx| _to_idx(idx)})
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- tk_send('selection', 'clear', first, last)
- end
- self
- end
-
- def selection_includes(idx)
- bool(tk_send('selection', 'includes', _to_idx(idx)))
- end
-
- def selection_set(first, last=nil)
- if first.kind_of?(Array)
- tk_send('selection', 'set', first.collect{|idx| _to_idx(idx)})
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- tk_send('selection', 'set', first, last)
- end
- self
- end
-
- def separatorpath(idx=nil)
- if idx
- window(tk_send('separatorpath', _to_idx(idx)))
- else
- window(tk_send('separatorpath'))
- end
- end
-
- def separators
- simplelist(tk_send('separators')).collect!{|w| window(w)}
- end
-
- def size
- number(tk_send('size'))
- end
-
- def sort(order=nil)
- if order
- order = order.to_s
- order = '-' << order if order[0] != ?-
- if order.length < 2
- order = nil
- end
- end
- if order
- tk_send('sort', order)
- else
- tk_send('sort')
- end
- self
- end
- def sort_increasing
- tk_send('sort', '-increasing')
- self
- end
- def sort_decreasing
- tk_send('sort', '-decreasing')
- self
- end
-
-
- # default of 'labelcommand' option
- DEFAULT_labelcommand_value =
- DEFAULT_sortByColumn_cmd = '::tablelist::sortByColumn'
-
- # default of 'labelcommand2' option
- DEFAULT_labelcommand2_value =
- DEFAULT_addToSortColumns_cmd = '::tablelist::addToSortColumns'
-
- def sortByColumn_with_event_generate(idx)
- tk_call('::tablelist::sortByColumn', @path, _to_idx(idx))
- end
-
- def addToSortColumns_with_event_generate(idx)
- tk_call('::tablelist::addToSortColumns', @path, _to_idx(idx))
- end
-
- def sort_by_column(idx, order=nil)
- if order
- order = order.to_s
- order = '-' << order if order[0] != ?-
- if order.length < 2
- order = nil
- end
- end
- if order
- tk_send('sortbycolumn', _to_idx(idx), order)
- else
- tk_send('sortbycolumn', _to_idx(idx))
- end
- self
- end
- def sort_by_column_increasing(idx)
- tk_send('sortbycolumn', _to_idx(idx), '-increasing')
- self
- end
- def sort_by_column_decreasing(idx)
- tk_send('sortbycolumn', _to_idx(idx), '-decreasing')
- self
- end
-
- def sort_by_columnlist(idxlist, orderlist=None)
- # orderlist :: list of 'increasing' or 'decreasing'
- tk_send('sortbycolumnlist', idxlist.map{|idx| _to_idx(idx)}, orderlist)
- self
- end
-
- def sortcolumn
- idx = num_or_str(tk_send('sortcolum'))
- (idx.kind_of?(Fixnum) && idx < 0)? nil: idx
- end
-
- def sortcolumnlist
- simplelist(tk_send('sortcolumlist')).map{|col| num_or_str(col)}
- end
-
- def sortorder
- tk_send('sortorder')
- end
-
- def sortorderlist
- simplelist(tk_send('sortorderlist'))
- end
-
- def toggle_columnhide(first, last=nil)
- if first.kind_of?(Array)
- tk_send('togglecolumnhide', first.collect{|idx| _to_idx(idx)})
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- tk_send('togglecolumnhide', first, last)
- end
- end
-
- def toggle_rowhide(first, last=nil)
- if first.kind_of?(Array)
- tk_send('togglerowhide', first.collect{|idx| _to_idx(idx)})
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- tk_send('togglerowhide', first, last)
- end
- end
-
- def toggle_visibility(first, last=nil)
- if first.kind_of?(Array)
- tk_send('togglevisibility', first.collect{|idx| _to_idx(idx)})
- else
- first = _to_idx(first)
- last = (last)? _to_idx(last): first
- tk_send('togglevisibility', first, last)
- end
- self
- end
- alias togglevisibility toggle_visibility
-
- def unset_attrib(name)
- tk_send('unsetattrib', name)
- self
- end
-
- def unset_cellattrib(idx, name)
- tk_send('unsetcellattrib', _to_idx(idx), name)
- self
- end
-
- def unset_columnattrib(idx, name)
- tk_send('unsetcolumnattrib', _to_idx(idx), name)
- self
- end
-
- def unset_rowattrib(idx, name)
- tk_send('unsetrowattrib', _to_idx(idx), name)
- self
- end
-
- def windowpath(idx)
- window(tk_send('windowpath', _to_idx(idx)))
- end
-end
-
-class << Tk::Tcllib::Tablelist
- ############################################################
- # helper commands
- def getTablelistPath(descendant)
- window(Tk.tk_call('::tablelist::getTablelistPath', descendant))
- end
-
- def getTablelistColumn(descendant)
- num_or_str(Tk.tk_call('::tablelist::getTablelistColumn', headerlabel))
- end
-
-
- def convEventFields(descendant, x, y)
- window(Tk.tk_call('::tablelist::convEventFields', descendant, x, y))
- end
-
-
- ############################################################
- # with the BWidget package
- def addBWidgetEntry(name=None)
- Tk.tk_call('::tablelist::addBWidgetEntry', name)
- end
-
- def addBWidgetSpinBox(name=None)
- Tk.tk_call('::tablelist::addBWidgetSpinBox', name)
- end
-
- def addBWidgetComboBox(name=None)
- Tk.tk_call('::tablelist::addBWidgetComboBox', name)
- end
-
-
- ############################################################
- # with the Iwidgets ([incr Widgets]) package
- def addIncrEntryfield(name=None)
- Tk.tk_call('::tablelist::addIncrEntry', name)
- end
-
- def addIncrDateTimeWidget(type, seconds=false, name=None)
- # type := 'datefield'|'dateentry'|timefield'|'timeentry'
- if seconds && seconds != None
- seconds = '-seconds'
- else
- seconds = None
- end
- Tk.tk_call('::tablelist::addDateTimeWidget', type, seconds, name)
- end
-
- def addIncrSpinner(name=None)
- Tk.tk_call('::tablelist::addIncrSpinner', name)
- end
-
- def addIncrSpinint(name=None)
- Tk.tk_call('::tablelist::addIncrSpinint', name)
- end
-
- def addIncrCombobox(name=None)
- Tk.tk_call('::tablelist::addIncrCombobox', name)
- end
-
-
- ############################################################
- # with Bryan Oakley's combobox package
- def addOakleyCombobox(name=None)
- Tk.tk_call('::tablelist::addOakleyCombobox', name)
- end
-
- ############################################################
- # with the multi-entry package Mentry is a library extension
- def addDateMentry(format, separator, gmt=false, name=None)
- if gmt && gmt != None
- gmt = '-gmt'
- else
- gmt = None
- end
- Tk.tk_call('::tablelist::addDateMentry', format, separator, gmt, name)
- end
-
- def addTimeMentry(format, separator, gmt=false, name=None)
- if gmt && gmt != None
- gmt = '-gmt'
- else
- gmt = None
- end
- Tk.tk_call('::tablelist::addTimeMentry', format, separator, gmt, name)
- end
-
- def addDateTimeMentry(format, date_sep, time_sep, gmt=false, name=None)
- if gmt && gmt != None
- gmt = '-gmt'
- else
- gmt = None
- end
- Tk.tk_call('::tablelist::addDateTimeMentry',
- format, date_sep, time_sep, gmt, name)
- end
-
- def addFixedPointMentry(count1, count2, comma=false, name=None)
- if comma && comma != None
- comma = '-comma'
- else
- comma = None
- end
- Tk.tk_call('::tablelist::addFixedPoingMentry', count1, count2, comma, name)
- end
-
- def addIPAddrMentry(name=None)
- Tk.tk_call('::tablelist::addIPAddrMentry', name)
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb b/ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb
deleted file mode 100644
index d467e54970..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/tablelist_tile.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * A multi-column listbox
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('tablelist_tile', '4.2')
-TkPackage.require('tablelist_tile')
-
-unless defined? Tk::Tcllib::Tablelist_usingTile
- Tk::Tcllib::Tablelist_usingTile = true
-end
-
-require 'tkextlib/tcllib/tablelist_core'
-
-module Tk
- module Tcllib
- class Tablelist
- # commands related to tile Themems
- def self.set_theme(theme)
- Tk.tk_call('::tablelist::setTheme', theme)
- end
-
- def self.get_current_theme
- Tk.tk_call('::tablelist::getCurrentTheme')
- end
-
- def self.get_theme_list
- TkComm.simplelist(Tk.tk_call('::tablelist::getThemes'))
- end
- def self.set_theme_defaults
- Tk.tk_call('::tablelist::setThemeDefaults')
- end
- end
-
- Tablelist_Tile = Tablelist
- TableList_Tile = Tablelist
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb b/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb
deleted file mode 100644
index 2fc75a68ec..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb
+++ /dev/null
@@ -1,315 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/tkpiechart.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Create 2D or 3D pies with labels in Tcl canvases
-#
-
-require 'tk'
-require 'tk/canvas'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('tkpiechart', '6.6')
-TkPackage.require('tkpiechart')
-
-module Tk
- module Tcllib
- module Tkpiechart
- end
- end
-end
-
-module Tk::Tcllib::Tkpiechart
- PACKAGE_NAME = 'tkpiechart'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('tkpiechart')
- rescue
- ''
- end
- end
-
- module ConfigMethod
- include TkConfigMethod
-
- def __pathname
- self.path + ';' + self.tag
- end
- private :__pathname
-
- def __cget_cmd
- ['::switched::cget', self.tag]
- end
-
- def __config_cmd
- ['::switched::configure', self.tag]
- end
- private :__config_cmd
-
- def __configinfo_struct
- {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil,
- :default_value=>1, :current_value=>2}
- end
- private :__configinfo_struct
-
- def __boolval_optkeys
- super() << 'select' << 'autoupdate' << 'selectable'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'bordercolor' << 'textbackground' <<
- 'widestvaluetext' << 'title'
- end
- private :__strval_optkeys
-
- def __listval_optkeys
- super() << 'colors'
- end
- private :__listval_optkeys
- end
-
- ####################################
- class PieChartObj < TkcItem
- include ConfigMethod
-
- def __font_optkeys
- ['titlefont']
- end
- private :__font_optkeys
- end
-
- ####################################
- class Pie < TkcItem
- include ConfigMethod
-
- def create_self(x, y, width, height, keys=None)
- if keys and keys != None
- @tag_key = tk_call_without_enc('::stooop::new', 'pie',
- @c, x, y, *hash_kv(keys, true))
- else
- @tag_key = tk_call_without_enc('::stooop::new', 'pie', @c, x, y)
- end
-
- @slice_tbl = {}
-
- id = "pie(#{@tag_key})"
-
- @tag = @tag_pie = TkcNamedTag(@c, id)
- @tag_slices = TkcNamedTag(@c, "pieSlices(#{@tag_key})")
-
- id
- end
- private :create_self
-
- def tag_key
- @tag_key
- end
- def tag
- @tag
- end
- def canvas
- @c
- end
- def _entry_slice(slice)
- @slice_tbl[slice.to_eval] = slice
- end
- def _delete_slice(slice)
- @slice_tbl.delete(slice.to_eval)
- end
-
- def delete
- tk_call_without_enc('::stooop::delete', @tag_key)
- CItemID_TBL.mutex.synchronize{
- CItemID_TBL[@path].delete(@id) if CItemID_TBL[@path]
- }
- self
- end
-
- def new_slice(text=None)
- Slice.new(self, text)
- end
-
- def delete_slice(slice)
- unless slice.kind_of?(Slice)
- unless (slice = @slice_tbl[slice])
- return tk_call_without_enc('pie::deleteSlice', @tag_key, slice)
- end
- end
- unless slice.kind_of?(Slice) && slice.pie == self
- fail ArgumentError, "argument is not a slice of self"
- end
- slice.delete
- end
-
- def selected_slices
- tk_split_simplelist(tk_call_without_enc('pie::selectedSlices',
- @tag_key)).collect{|slice|
- @slice_tbl[slice] || Slice.new(:no_create, self, slice)
- }
- end
- end
-
- ####################################
- class Slice < TkcItem
- include ConfigMethod
-
- def __config_cmd
- ['::switched::configure', self.tag]
- end
- private :__config_cmd
-
- #------------------------
-
- def initialize(pie, *args)
- unless pie.kind_of?(Pie) && pie != :no_create
- fail ArgumentError, "expects TkPiechart::Pie for 1st argument"
- end
-
- if pie == :no_create
- @pie, @tag_key = args
- else
- text = args[0] || None
- @pie = pie
- @tag_key = tk_call_without_enc('pie::newSlice', @pie.tag_key, text)
- end
- @parent = @c = @pie.canvas
- @path = @parent.path
-
- @pie._entry_slice(self)
-
- @id = "slices(#{@tag_key})"
- @tag = TkcNamedTag.new(@pie.canvas, @id)
-
- CItemID_TBL.mutex.synchronize{
- CItemID_TBL[@path] = {} unless CItemID_TBL[@path]
- CItemID_TBL[@path][@id] = self
- }
- end
-
- def tag_key
- @tag_key
- end
- def tag
- @tag
- end
- def pie
- @pie
- end
-
- def delete
- tk_call_without_enc('pie::deleteSlice', @pie.tag_key, @tag_key)
- CItemID_TBL.mutex.synchronize{
- CItemID_TBL[@path].delete(@id) if CItemID_TBL[@path]
- }
- @pie._delete_slice(self)
- self
- end
-
- def size(share, disp=None)
- tk_call_without_enc('pie::sizeSlice',
- @pie.tag_key, @tag_key, share, disp)
- self
- end
-
- def label(text)
- tk_call_without_enc('pie::labelSlice', @pie.tag_key, @tag_key, text)
- self
- end
- end
-
- ####################################
- class BoxLabeler < TkcItem
- include ConfigMethod
-
- def __config_cmd
- ['::switched::configure', self.tag]
- end
- private :__config_cmd
-
- #------------------------
-
- def create_self(keys=None)
- if keys and keys != None
- @tag_key = tk_call_without_enc('::stooop::new', 'pieBoxLabeler',
- *hash_kv(keys, true))
- else
- @tag_key = tk_call_without_enc('::stooop::new', 'pieBoxLabeler')
- end
-
- id = "pieBoxLabeler(#{@tag_key})"
- @tag = TkcNamedTag(@c, id)
-
- id
- end
- private :create_self
- end
-
- ####################################
- class PeripheralLabeler < TkcItem
- include ConfigMethod
-
- def __font_optkeys
- ['font', 'smallfont']
- end
- private :__font_optkeys
-
- def __config_cmd
- ['::switched::configure', self.tag]
- end
- private :__config_cmd
-
- #------------------------
-
- def create_self(keys=None)
- if keys and keys != None
- @tag_key = tk_call_without_enc('::stooop::new',
- 'piePeripheralLabeler',
- *hash_kv(keys, true))
- else
- @tag_key = tk_call_without_enc('::stooop::new', 'piePeripheralLabeler')
- end
-
- id = "piePeripheralLabeler(#{@tag_key})"
- @tag = TkcNamedTag(@c, id)
-
- id
- end
- private :create_self
- end
-
- ####################################
- class Label < TkcItem
- include ConfigMethod
-
- def __config_cmd
- ['::switched::configure', self.tag]
- end
- private :__config_cmd
-
- #------------------------
-
- def create_self(x, y, keys=None)
- if keys and keys != None
- @tag_key = tk_call_without_enc('::stooop::new', 'canvasLabel',
- @c, x, y, width, height,
- *hash_kv(keys, true))
- else
- @tag_key = tk_call_without_enc('::stooop::new', 'canvasLabel',
- @c, x, y, width, height)
- end
-
- id = "canvasLabel(#{@tag_key})"
- @tag = TkcNamedTag(@c, id)
-
- id
- end
- private :create_self
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/toolbar.rb b/ext/tk/lib/tkextlib/tcllib/toolbar.rb
deleted file mode 100644
index a771548db4..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/toolbar.rb
+++ /dev/null
@@ -1,176 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/toolbar.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * toolbar widget
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::toolbar', '1.2')
-TkPackage.require('widget::toolbar')
-
-module Tk::Tcllib
- module Widget
- class Toolbar < TkWindow
- PACKAGE_NAME = 'widget::toolbar'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::toolbar')
- rescue
- ''
- end
- end
- end
-
- module ToolbarItemConfig
- include TkItemConfigMethod
- end
- end
-end
-
-
-class Tk::Tcllib::Widget::ToolbarItem < TkObject
- include TkTreatTagFont
-
- ToolbarItemID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- TTagID_TBL.mutex.synchronize{ TTagID_TBL.clear }
- }
-
- def ToolbarItem.id2obj(tbar, id)
- tpath = tbar.path
- ToolbarItemID_TBL.mutex.synchronize{
- if ToolbarItemID_TBL[tpath]
- ToolbarItemID_TBL[tpath][id]? ToolbarItemID_TBL[tpath][id]: id
- else
- id
- end
- }
- end
-
- def initialize(parent, *args)
- @parent = @t = parent
- @tpath = parent.path
-
- @path = @id = @t.tk_send('add', *args)
- # A same id is rejected by the Tcl function.
-
- ToolbarItemID_TBL.mutex.synchronize{
- ToolbarItemID_TBL[@id] = self
- ToolbarItemID_TBL[@tpath] = {} unless ToolbarItemID_TBL[@tpath]
- ToolbarItemID_TBL[@tpath][@id] = self
- }
- end
-
- def [](key)
- cget key
- end
-
- def []=(key,val)
- configure key, val
- val
- end
-
- def cget_tkstring(option)
- @t.itemcget_tkstring(@id, option)
- end
- def cget(option)
- @t.itemcget(@id, option)
- end
- def cget_strict(option)
- @t.itemcget_strict(@id, option)
- end
-
- def configure(key, value=None)
- @t.itemconfigure(@id, key, value)
- self
- end
-
- def configinfo(key=nil)
- @t.itemconfiginfo(@id, key)
- end
-
- def current_configinfo(key=nil)
- @t.current_itemconfiginfo(@id, key)
- end
-
- def delete
- @t.delete(@id)
- end
-
- def itemid
- @t.itemid(@id)
- end
-
- def remove
- @t.remove(@id)
- end
- def remove_with_destroy
- @t.remove_with_destroy(@id)
- end
-end
-
-class Tk::Tcllib::Widget::Toolbar
- include Tk::Tcllib::Widget::ToolbarItemConfig
-
- TkCommandNames = ['::widget::toolbar'.freeze].freeze
-
- def __destroy_hook__
- Tk::Tcllib::Widget::ToolbarItem::ToolbarItemID_TBL.mutex.synchronize{
- Tk::Tcllib::Widget::ToolbarItem::ToolbarItemID_TBL.delete(@path)
- }
- end
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def getframe
- window(tk_send('getframe'))
- end
- alias get_frame getframe
-
- def add(*args)
- Tk::Tcllib::Widget::Toolbar.new(self, *args)
- end
-
- def itemid(item)
- window(tk_send('itemid'))
- end
-
- def items(pattern)
- tk_split_simplelist(tk_send('items', pattern)).map{|id|
- Tk::Tcllib::Widget::ToolbarItem.id2obj(self, id)
- }
- end
-
- def remove(*items)
- tk_send('remove', *items)
- self
- end
-
- def remove_with_destroy(*items)
- tk_send('remove', '-destroy', *items)
- self
- end
-
- def delete(*items)
- tk_send('delete', *items)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/tooltip.rb b/ext/tk/lib/tkextlib/tcllib/tooltip.rb
deleted file mode 100644
index 4a70ec5732..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/tooltip.rb
+++ /dev/null
@@ -1,105 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/tooltip.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Provides tooltips, a small text message that is displayed when the
-# mouse hovers over a widget.
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('tooltip', '1.1')
-TkPackage.require('tooltip')
-
-module Tk::Tcllib
- module Tooltip
- PACKAGE_NAME = 'tooltip'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('tooltip')
- rescue
- ''
- end
- end
- end
-end
-
-module Tk::Tcllib::Tooltip
- extend TkCore
-
- WidgetClassName = 'Tooltip'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.database_classname
- self::WidgetClassName
- end
- def self.database_class
- WidgetClassNames[self::WidgetClassName]
- end
-
- def self.clear(glob_path_pat = None)
- self.clear_glob(glob_path_pat)
- end
-
- def self.clear_glob(glob_path_pat)
- tk_call_without_enc('::tooltip::tooltip', 'clear', glob_path_pat)
- end
-
- def self.clear_widgets(*args)
- self.clear_glob("{#{args.collect{|w| _get_eval_string(w)}.join(',')}}")
- end
-
- def self.clear_children(*args)
- self.clear_glob("{#{args.collect{|w| s = _get_eval_string(w); "#{s},#{s}.*"}.join(',')}}")
- end
-
- def self.delay(millisecs=None)
- number(tk_call_without_enc('::tooltip::tooltip', 'delay', millisecs))
- end
- def self.delay=(millisecs)
- self.delay(millisecs)
- end
-
- def self.fade?
- bool(tk_call_without_enc('::tooltip::tooltip', 'fade'))
- end
- def self.fade(mode)
- tk_call_without_enc('::tooltip::tooltip', 'fade', mode)
- end
-
- def self.disable
- tk_call_without_enc('::tooltip::tooltip', 'disable')
- false
- end
- def self.off
- self.disable
- end
-
- def self.enable
- tk_call_without_enc('::tooltip::tooltip', 'enable')
- true
- end
- def self.on
- self.enable
- end
-
- def self.register(widget, msg, keys=nil)
- if keys.kind_of?(Hash)
- args = hash_kv(keys) << msg
- else
- args = msg
- end
- tk_call('::tooltip::tooltip', widget.path, *args)
- end
-
- def self.erase(widget)
- tk_call_without_enc('::tooltip::tooltip', widget.path, '')
- end
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/validator.rb b/ext/tk/lib/tkextlib/tcllib/validator.rb
deleted file mode 100644
index c2c9dda376..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/validator.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/validator.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * Provides a unified validation API
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget::validator', '0.1')
-TkPackage.require('widget::validator')
-
-module Tk::Tcllib
- module Validator
- PACKAGE_NAME = 'widget::validator'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget::validator')
- rescue
- ''
- end
- end
- end
-end
-
-module Tk::Tcllib::Validator
- extend TkCore
-
- def self.attach(widget, color, cmd=Proc.new)
- tk_call_without_enc('::widget::validator', 'attach', widget, color, cmd)
- nil
- end
-
- def self.detach(widget)
- tk_call_without_enc('::widget::validator', 'detach', widget)
- nil
- end
-
- def self.validate(widget)
- tk_call_without_enc('::widget::validator', 'validate', widget)
- nil
- end
-
- def attach_validator(color, cmd=Proc.new)
- tk_call_without_enc('::widget::validator', 'attach', @path, color, cmd)
- self
- end
-
- def detach_validator(color, cmd=Proc.new)
- tk_call_without_enc('::widget::validator', 'detach', @path)
- self
- end
-
- def invoke_validator(color, cmd=Proc.new)
- tk_call_without_enc('::widget::validator', 'validate', @path)
- self
- end
- alias validate_validator invoke_validator
-end
diff --git a/ext/tk/lib/tkextlib/tcllib/widget.rb b/ext/tk/lib/tkextlib/tcllib/widget.rb
deleted file mode 100644
index b8d5070b0b..0000000000
--- a/ext/tk/lib/tkextlib/tcllib/widget.rb
+++ /dev/null
@@ -1,83 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tcllib/widget.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# * Part of tcllib extension
-# * megawidget package that uses snit as the object system (snidgets)
-#
-
-require 'tk'
-require 'tkextlib/tcllib.rb'
-
-# TkPackage.require('widget', '3.0')
-TkPackage.require('widget')
-
-module Tk::Tcllib
- module Widget
- PACKAGE_NAME = 'widget'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('widget')
- rescue
- ''
- end
- end
-
- #--- followings may be private functions of tklib
- def self.isa(compare_as, *args)
- begin
- return Tk.tk_call('::widget::isa', compare_as, *args)
- rescue => e
- if TkComm.bool(Tk.tk_call('info','command','::widget::isa')) ||
- ! TkComm.bool(Tk.tk_call('info','command','::widget::validate'))
- fail e
- end
- end
- Tk.tk_call('::widget::validate', compare_as, *args)
- end
- def self.validate(compare_as, *args)
- begin
- return Tk.tk_call('::widget::validate', compare_as, *args)
- rescue => e
- if TkComm.bool(Tk.tk_call('info','command','::widget::validate')) ||
- ! TkComm.bool(Tk.tk_call('info','command','::widget::isa'))
- fail e
- end
- end
- Tk.tk_call('::widget::isa', compare_as, *args)
- end
- end
-end
-
-module Tk::Tcllib::Widget
- TkComm::TkExtlibAutoloadModule.unshift(self)
-
- autoload :Calendar, 'tkextlib/tcllib/calendar'
-
- autoload :Canvas_Sqmap, 'tkextlib/tcllib/canvas_sqmap'
- autoload :Canvas_Zoom, 'tkextlib/tcllib/canvas_zoom'
-
- autoload :Dialog, 'tkextlib/tcllib/dialog'
-
- autoload :Panelframe, 'tkextlib/tcllib/panelframe'
- autoload :PanelFrame, 'tkextlib/tcllib/panelframe'
-
- autoload :Ruler, 'tkextlib/tcllib/ruler'
-
- autoload :Screenruler, 'tkextlib/tcllib/screenruler'
- autoload :ScreenRuler, 'tkextlib/tcllib/screenruler'
-
- autoload :Scrolledwindow, 'tkextlib/tcllib/scrollwin'
- autoload :ScrolledWindow, 'tkextlib/tcllib/scrollwin'
-
- autoload :Superframe, 'tkextlib/tcllib/superframe'
- autoload :SuperFrame, 'tkextlib/tcllib/superframe'
-
- autoload :Toolbar, 'tkextlib/tcllib/toolbar'
- autoload :ToolbarItem, 'tkextlib/tcllib/toolbar'
-end
diff --git a/ext/tk/lib/tkextlib/tclx.rb b/ext/tk/lib/tkextlib/tclx.rb
deleted file mode 100644
index 1189d855cb..0000000000
--- a/ext/tk/lib/tkextlib/tclx.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-#
-# TclX support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tclx/setup.rb'
-
-# load library
-require 'tkextlib/tclx/tclx'
diff --git a/ext/tk/lib/tkextlib/tclx/setup.rb b/ext/tk/lib/tkextlib/tclx/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/tclx/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/tclx/tclx.rb b/ext/tk/lib/tkextlib/tclx/tclx.rb
deleted file mode 100644
index 7360a85403..0000000000
--- a/ext/tk/lib/tkextlib/tclx/tclx.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-# frozen_string_literal: false
-#
-# tclx/tclx.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tclx/setup.rb'
-
-# TkPackage.require('Tclx', '8.0')
-TkPackage.require('Tclx')
-
-module Tk
- module TclX
- PACKAGE_NAME = 'Tclx'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('Tclx')
- rescue
- ''
- end
- end
-
- def self.infox(*args)
- Tk.tk_call('infox', *args)
- end
-
- def self.signal(*args)
- warn("Warning: Don't recommend to use TclX's 'signal' command. Please use Ruby's 'Signal.trap' method")
- Tk.tk_call('signal', *args)
- end
-
- def self.signal_restart(*args)
- warn("Warning: Don't recommend to use TclX's 'signal' command. Please use Ruby's 'Signal.trap' method")
- Tk.tk_call('signal', '-restart', *args)
- end
-
- ##############################
-
- class XPG3_MsgCat
- class << self
- alias open new
- end
-
- def initialize(catname, fail_mode=false)
- if fail_mode
- @msgcat_id = Tk.tk_call('catopen', '-fail', catname)
- else
- @msgcat_id = Tk.tk_call('catopen', '-nofail', catname)
- end
- end
-
- def close(fail_mode=false)
- if fail_mode
- Tk.tk_call('catclose', '-fail', @msgcat_id)
- else
- Tk.tk_call('catclose', '-nofail', @msgcat_id)
- end
- self
- end
-
- def get(setnum, msgnum, defaultstr)
- Tk.tk_call('catgets', @msgcat_id, setnum, msgnum, defaultstr)
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tile.rb b/ext/tk/lib/tkextlib/tile.rb
deleted file mode 100644
index 003a978e72..0000000000
--- a/ext/tk/lib/tkextlib/tile.rb
+++ /dev/null
@@ -1,450 +0,0 @@
-# frozen_string_literal: false
-#
-# Tile theme engine (tile widget set) support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/ttk_selector'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# library directory
-require 'tkextlib/tile/setup.rb'
-
-# load package
-# TkPackage.require('tile', '0.4')
-# TkPackage.require('tile', '0.6')
-# TkPackage.require('tile', '0.7')
-if Tk::TK_MAJOR_VERSION > 8 ||
- (Tk::TK_MAJOR_VERSION == 8 && Tk::TK_MINOR_VERSION >= 5)
- begin
- TkPackage.require('tile') # for compatibility (version check of 'tile')
- rescue RuntimeError
- # ignore, even if cannot find package 'tile'
- end
- pkgname = 'Ttk'
-else
- pkgname = 'tile'
-end
-
-begin
- verstr = TkPackage.require(pkgname)
-rescue RuntimeError
- # define dummy methods
- module Tk
- module Tile
- CANNOT_FIND_PACKAGE = true
- def self.const_missing(sym)
- TkPackage.require(PACKAGE_NAME)
- end
- def self.method_missing(*args)
- TkPackage.require(PACKAGE_NAME)
- end
- end
- end
- Tk.__cannot_find_tk_package_for_widget_set__(:Ttk, pkgname)
- if pkgname == 'Ttk'
- verstr = Tk::TK_PATCHLEVEL # dummy
- else
- verstr = '0.7' # dummy
- end
-end
-
-ver = verstr.split('.')
-if ver[0].to_i == 0
- # Tile extension package
- if ver[1].to_i <= 4
- # version 0.4 or former
- module Tk
- module Tile
- USE_TILE_NAMESPACE = true
- USE_TTK_NAMESPACE = false
- TILE_SPEC_VERSION_ID = 0
- end
- end
- elsif ver[1].to_i <= 6
- # version 0.5 -- version 0.6
- module Tk
- module Tile
- USE_TILE_NAMESPACE = true
- USE_TTK_NAMESPACE = true
- TILE_SPEC_VERSION_ID = 5
- end
- end
- elsif ver[1].to_i <= 7
- module Tk
- module Tile
- USE_TILE_NAMESPACE = false
- USE_TTK_NAMESPACE = true
- TILE_SPEC_VERSION_ID = 7
- end
- end
- else
- # version 0.8 or later
- module Tk
- module Tile
- USE_TILE_NAMESPACE = false
- USE_TTK_NAMESPACE = true
- TILE_SPEC_VERSION_ID = 8
- end
- end
- end
-
- module Tk::Tile
- PACKAGE_NAME = 'tile'.freeze
- end
-else
- # Ttk package merged Tcl/Tk core (Tcl/Tk 8.5+)
- module Tk
- module Tile
- USE_TILE_NAMESPACE = false
- USE_TTK_NAMESPACE = true
- TILE_SPEC_VERSION_ID = 8
-
- PACKAGE_NAME = 'Ttk'.freeze
- end
- end
-end
-
-# autoload
-module Tk
- module Tile
- TkComm::TkExtlibAutoloadModule.unshift(self)
-
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require(PACKAGE_NAME)
- rescue
- ''
- end
- end
-
- def self.__Import_Tile_Widgets__!
- warn 'Warning: "Tk::Tile::__Import_Tile_Widgets__!" is obsolete.' <<
- ' To control default widget set, use "Tk.default_widget_set = :Ttk"'
- Tk.tk_call('namespace', 'import', '-force', 'ttk::*')
- end
-
- def self.__define_LoadImages_proc_for_compatibility__!
- # Ttk 8.5 (Tile 0.8) lost 'LoadImages' utility procedure.
- # So, some old scripts don't work, because those scripts use the
- # procedure to define local styles.
- # Of course, rewriting such Tcl/Tk scripts isn't difficult for
- # Tcl/Tk users. However, it may be troublesome for Ruby/Tk users
- # who use such Tcl/Tk scripts as it is.
- # This method may help Ruby/Tk users who don't want to modify old
- # Tcl/Tk scripts for the latest version of Ttk (Tile) extension.
- # This method defines a compatible 'LoadImages' procedure on the
- # Tcl/Tk interpreter working under Ruby/Tk.
- # Please give attention to use this method. It may conflict with
- # some definitions on Tcl/Tk scripts.
- klass_name = self.name
- proc_name = 'LoadImages'
- if Tk::Tile::USE_TTK_NAMESPACE
- ns_list = ['::tile']
- if Tk.info(:commands, "::ttk::#{proc_name}").empty?
- ns_list << '::ttk'
- end
- else # Tk::Tile::USE_TILE_NAMESPACE
- ns_list = ['::ttk']
- if Tk.info(:commands, "::tile::#{proc_name}").empty?
- ns_list << '::tile'
- end
- end
-
- ns_list.each{|ns|
- cmd = "#{ns}::#{proc_name}"
- unless Tk.info(:commands, cmd).empty?
- #fail RuntimeError, "can't define '#{cmd}' command (already exist)"
-
- # do nothing !!!
- warn "Warning: can't define '#{cmd}' command (already exist)" if $DEBUG
- next
- end
- TkNamespace.eval(ns){
- TkCore::INTERP.add_tk_procs(proc_name, 'imgdir {patterns {*.gif}}',
- <<-'EOS')
- foreach pattern $patterns {
- foreach file [glob -directory $imgdir $pattern] {
- set img [file tail [file rootname $file]]
- if {![info exists images($img)]} {
- set images($img) [image create photo -file $file]
- }
- }
- }
- return [array get images]
- EOS
- }
- }
- end
-
- def self.load_images(imgdir, pat=nil)
- if Tk::Tile::TILE_SPEC_VERSION_ID < 8
- if Tk::Tile::USE_TTK_NAMESPACE
- cmd = '::ttk::LoadImages'
- else # Tk::Tile::USE_TILE_NAMESPACE
- cmd = '::tile::LoadImages'
- end
- pat ||= TkComm::None
- images = Hash[*TkComm.simplelist(Tk.tk_call(cmd, imgdir, pat))]
- images.keys.each{|k|
- images[k] = TkPhotoImage.new(:imagename=>images[k],
- :without_creating=>true)
- }
- else ## TILE_SPEC_VERSION_ID >= 8
- pat ||= '*.gif'
- if pat.kind_of?(Array)
- pat_list = pat
- else
- pat_list = [ pat ]
- end
- Dir.chdir(imgdir){
- pat_list.each{|pat|
- Dir.glob(pat).each{|f|
- img = File.basename(f, '.*')
- unless TkComm.bool(Tk.info('exists', "images(#{img})"))
- Tk.tk_call('set', "images(#{img})",
- Tk.tk_call('image', 'create', 'photo', '-file', f))
- end
- }
- }
- }
- images = Hash[*TkComm.simplelist(Tk.tk_call('array', 'get', 'images'))]
- images.keys.each{|k|
- images[k] = TkPhotoImage.new(:imagename=>images[k],
- :without_creating=>true)
- }
- end
-
- images
- end
-
- def self.style(*args)
- args.map!{|arg| TkComm._get_eval_string(arg)}.join('.')
- end
-
- def self.themes(glob_ptn = nil)
- if TILE_SPEC_VERSION_ID < 8 && Tk.info(:commands, '::ttk::themes').empty?
- fail RuntimeError, 'not support glob option' if glob_ptn
- cmd = ['::tile::availableThemes']
- else
- glob_ptn = '*' unless glob_ptn
- cmd = ['::ttk::themes', glob_ptn]
- end
-
- begin
- TkComm.simplelist(Tk.tk_call_without_enc(*cmd))
- rescue
- TkComm.simplelist(Tk.tk_call('lsearch', '-all', '-inline',
- Tk::Tile::Style.theme_names,
- glob_ptn))
- end
- end
-
- def self.set_theme(theme)
- if TILE_SPEC_VERSION_ID < 8 && Tk.info(:commands, '::ttk::setTheme').empty?
- cmd = '::tile::setTheme'
- else
- cmd = '::ttk::setTheme'
- end
-
- begin
- Tk.tk_call_without_enc(cmd, theme)
- rescue
- Tk::Tile::Style.theme_use(theme)
- end
- end
-
- module KeyNav
- if Tk::Tile::TILE_SPEC_VERSION_ID < 8
- def self.enableMnemonics(w)
- Tk.tk_call('::keynav::enableMnemonics', w)
- end
- def self.defaultButton(w)
- Tk.tk_call('::keynav::defaultButton', w)
- end
- else # dummy
- def self.enableMnemonics(w)
- ""
- end
- def self.defaultButton(w)
- ""
- end
- end
- end
-
- module Font
- Default = 'TkDefaultFont'
- Text = 'TkTextFont'
- Heading = 'TkHeadingFont'
- Caption = 'TkCaptionFont'
- Tooltip = 'TkTooltipFont'
-
- Fixed = 'TkFixedFont'
- Menu = 'TkMenuFont'
- SmallCaption = 'TkSmallCaptionFont'
- Icon = 'TkIconFont'
-
- TkFont::SYSTEM_FONT_NAMES.add [
- 'TkDefaultFont', 'TkTextFont', 'TkHeadingFont',
- 'TkCaptionFont', 'TkTooltipFont', 'TkFixedFont',
- 'TkMenuFont', 'TkSmallCaptionFont', 'TkIconFont'
- ]
- end
-
- module ParseStyleLayout
- def _style_layout(lst)
- ret = []
- until lst.empty?
- sub = [lst.shift]
- keys = {}
-
- until lst.empty?
- if lst[0][0] == ?-
- k = lst.shift[1..-1]
- children = lst.shift
- children = _style_layout(children) if children.kind_of?(Array)
- keys[k] = children
- else
- break
- end
- end
-
- sub << keys unless keys.empty?
- ret << sub
- end
- ret
- end
- private :_style_layout
- end
-
- module TileWidget
- include Tk::Tile::ParseStyleLayout
-
- def __val2ruby_optkeys # { key=>proc, ... }
- # The method is used to convert a opt-value to a ruby's object.
- # When get the value of the option "key", "proc.call(value)" is called.
- super().update('style'=>proc{|v| _style_layout(list(v))})
- end
- private :__val2ruby_optkeys
-
- def ttk_instate(state, script=nil, &b)
- if script
- tk_send('instate', state, script)
- elsif b
- tk_send('instate', state, Proc.new(&b))
- else
- bool(tk_send('instate', state))
- end
- end
- alias tile_instate ttk_instate
-
- def ttk_state(state=nil)
- if state
- tk_send('state', state)
- else
- list(tk_send('state'))
- end
- end
- alias tile_state ttk_state
-
- def ttk_identify(x, y)
- ret = tk_send_without_enc('identify', x, y)
- (ret.empty?)? nil: ret
- end
- alias tile_identify ttk_identify
-
- # remove instate/state/identify method
- # to avoid the conflict with widget options
- if Tk.const_defined?(:USE_OBSOLETE_TILE_STATE_METHOD) && Tk::USE_OBSOLETE_TILE_STATE_METHOD
- alias instate ttk_instate
- alias state ttk_state
- alias identify ttk_identify
- end
- end
-
- ######################################
-
- autoload :TButton, 'tkextlib/tile/tbutton'
- autoload :Button, 'tkextlib/tile/tbutton'
-
- autoload :TCheckButton, 'tkextlib/tile/tcheckbutton'
- autoload :CheckButton, 'tkextlib/tile/tcheckbutton'
- autoload :TCheckbutton, 'tkextlib/tile/tcheckbutton'
- autoload :Checkbutton, 'tkextlib/tile/tcheckbutton'
-
- autoload :Dialog, 'tkextlib/tile/dialog'
-
- autoload :TEntry, 'tkextlib/tile/tentry'
- autoload :Entry, 'tkextlib/tile/tentry'
-
- autoload :TCombobox, 'tkextlib/tile/tcombobox'
- autoload :Combobox, 'tkextlib/tile/tcombobox'
-
- autoload :TFrame, 'tkextlib/tile/tframe'
- autoload :Frame, 'tkextlib/tile/tframe'
-
- autoload :TLabelframe, 'tkextlib/tile/tlabelframe'
- autoload :Labelframe, 'tkextlib/tile/tlabelframe'
- autoload :TLabelFrame, 'tkextlib/tile/tlabelframe'
- autoload :LabelFrame, 'tkextlib/tile/tlabelframe'
-
- autoload :TLabel, 'tkextlib/tile/tlabel'
- autoload :Label, 'tkextlib/tile/tlabel'
-
- autoload :TMenubutton, 'tkextlib/tile/tmenubutton'
- autoload :Menubutton, 'tkextlib/tile/tmenubutton'
- autoload :TMenuButton, 'tkextlib/tile/tmenubutton'
- autoload :MenuButton, 'tkextlib/tile/tmenubutton'
-
- autoload :TNotebook, 'tkextlib/tile/tnotebook'
- autoload :Notebook, 'tkextlib/tile/tnotebook'
-
- autoload :TPaned, 'tkextlib/tile/tpaned'
- autoload :Paned, 'tkextlib/tile/tpaned'
- autoload :PanedWindow, 'tkextlib/tile/tpaned'
- autoload :Panedwindow, 'tkextlib/tile/tpaned'
-
- autoload :TProgressbar, 'tkextlib/tile/tprogressbar'
- autoload :Progressbar, 'tkextlib/tile/tprogressbar'
-
- autoload :TRadioButton, 'tkextlib/tile/tradiobutton'
- autoload :RadioButton, 'tkextlib/tile/tradiobutton'
- autoload :TRadiobutton, 'tkextlib/tile/tradiobutton'
- autoload :Radiobutton, 'tkextlib/tile/tradiobutton'
-
- autoload :TScale, 'tkextlib/tile/tscale'
- autoload :Scale, 'tkextlib/tile/tscale'
- autoload :TProgress, 'tkextlib/tile/tscale'
- autoload :Progress, 'tkextlib/tile/tscale'
-
- autoload :TScrollbar, 'tkextlib/tile/tscrollbar'
- autoload :Scrollbar, 'tkextlib/tile/tscrollbar'
- autoload :XScrollbar, 'tkextlib/tile/tscrollbar'
- autoload :YScrollbar, 'tkextlib/tile/tscrollbar'
-
- autoload :TSeparator, 'tkextlib/tile/tseparator'
- autoload :Separator, 'tkextlib/tile/tseparator'
-
- autoload :TSpinbox, 'tkextlib/tile/tspinbox'
- autoload :Spinbox, 'tkextlib/tile/tspinbox'
-
- autoload :TSquare, 'tkextlib/tile/tsquare'
- autoload :Square, 'tkextlib/tile/tsquare'
-
- autoload :SizeGrip, 'tkextlib/tile/sizegrip'
- autoload :Sizegrip, 'tkextlib/tile/sizegrip'
-
- autoload :Treeview, 'tkextlib/tile/treeview'
-
- autoload :Style, 'tkextlib/tile/style'
- end
-end
-
-Ttk = Tk::Tile
diff --git a/ext/tk/lib/tkextlib/tile/dialog.rb b/ext/tk/lib/tkextlib/tile/dialog.rb
deleted file mode 100644
index d81851bb68..0000000000
--- a/ext/tk/lib/tkextlib/tile/dialog.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-# frozen_string_literal: false
-#
-# ttk::dialog (tile-0.7+)
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class Dialog < TkWindow
- end
- end
-end
-
-begin
- TkPackage.require('ttk::dialog') # this may be required.
-rescue RuntimeError
- # ignore
-end
-
-class Tk::Tile::Dialog
- TkCommandNames = ['::ttk::dialog'.freeze].freeze
-
- def self.show(*args)
- dialog = self.new(*args)
- dialog.show
- [dialog.status, dialog.value]
- end
- def self.display(*args)
- self.show(*args)
- end
-
- def self.define_dialog_type(name, keys)
- Tk.tk_call('::ttk::dialog::define', name, keys)
- name
- end
-
- def self.style(*args)
- ['Dialog', *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-
- #########################
-
- def initialize(keys={})
- @keys = _symbolkey2str(keys)
- super(*args)
- end
-
- def create_self(keys)
- # dummy
- end
- private :create_self
-
- def show
- tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys))
- end
- alias display show
-
- def client_frame
- window(tk_call_without_enc('::ttk::dialog::clientframe', @path))
- end
-
- def cget_strict(slot)
- @keys[slot.to_s]
- end
- def cget(slot)
- @keys[slot.to_s]
- end
-=begin
- def cget(slot)
- unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- cget_strict(slot)
- else
- cget_strict(slot) rescue nil
- end
- end
-=end
-
- def configure(slot, value=None)
- if slot.kind_of?(Hash)
- slot.each{|k, v| configure(k, v)}
- else
- slot = slot.to_s
- value = _symbolkey2str(value) if value.kind_of?(Hash)
- if value && value != None
- @keys[slot] = value
- else
- @keys.delete(slot)
- end
- end
- self
- end
-
- def configinfo(slot = nil)
- if slot
- slot = slot.to_s
- [ slot, nil, nil, nil, @keys[slot] ]
- else
- @keys.collect{|k, v| [ k, nil, nil, nil, v ] }
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tile/setup.rb b/ext/tk/lib/tkextlib/tile/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/tile/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/tile/sizegrip.rb b/ext/tk/lib/tkextlib/tile/sizegrip.rb
deleted file mode 100644
index 4b9510aefa..0000000000
--- a/ext/tk/lib/tkextlib/tile/sizegrip.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: false
-#
-# ttk::sizegrip widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class SizeGrip < TkWindow
- end
- Sizegrip = SizeGrip
- end
-end
-
-class Tk::Tile::SizeGrip < TkWindow
- include Tk::Tile::TileWidget
-
- TkCommandNames = ['::ttk::sizegrip'.freeze].freeze
- WidgetClassName = 'TSizegrip'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Sizegrip,
-# :TkSizegrip, :TkSizeGrip)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/sizegrip.rb',
- :Ttk, Tk::Tile::Sizegrip,
- :TkSizegrip, :TkSizeGrip)
diff --git a/ext/tk/lib/tkextlib/tile/style.rb b/ext/tk/lib/tkextlib/tile/style.rb
deleted file mode 100644
index a96cba795f..0000000000
--- a/ext/tk/lib/tkextlib/tile/style.rb
+++ /dev/null
@@ -1,337 +0,0 @@
-# frozen_string_literal: false
-#
-# style commands
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- module Style
- end
- end
-end
-
-module Tk::Tile::Style
- extend TkCore
-end
-
-class << Tk::Tile::Style
- if Tk::Tile::TILE_SPEC_VERSION_ID < 8
- TkCommandNames = ['style'.freeze].freeze
-
- # --- Tk::Tile::Style.__define_wrapper_proc_for_compatibility__! ---
- # On Ttk (Tile) extension, 'style' command has incompatible changes
- # depend on the version of the extension. It requires modifying the
- # Tcl/Tk scripts to define local styles. The rule for modification
- # is a simple one. But, if users want to keep compatibility between
- # versions of the extension, they will have to contrive to do that.
- # It may be troublesome, especially for Ruby/Tk users.
- # This method may help such work. This method make some definitions
- # on the Tcl/Tk interpreter to work with different version of style
- # command format. Please give attention to use this method. It may
- # conflict with some definitions on Tcl/Tk scripts.
- if Tk::Tile::TILE_SPEC_VERSION_ID < 7
- def __define_wrapper_proc_for_compatibility__!
- __define_themes_and_setTheme_proc__!
-
- unless Tk.info(:commands, '::ttk::style').empty?
- # fail RuntimeError,
- # "can't define '::ttk::style' command (already exist)"
-
- # do nothing !!!
- warn "Warning: can't define '::ttk::style' command (already exist)" if $DEBUG
- return
- end
- TkCore::INTERP.add_tk_procs('::ttk::style', 'args', <<-'EOS')
- if [string equal [lrange $args 0 1] {element create}] {
- if [string equal [lindex $args 3] image] {
- set spec [lindex $args 4]
- set map [lrange $spec 1 end]
- if [llength $map] {
- # return [eval [concat [list ::style element create [lindex $args 2] image [lindex $spec 0] -map $map] [lrange $args 5 end]]]
- return [uplevel 1 [list ::style element create [lindex $args 2] image [lindex $spec 0] -map $map] [lrange $args 5 end]]
- }
- }
- }
- # return [eval "::style $args"]
- return [uplevel 1 ::style $args]
- EOS
- #########################
- end
- else ### TILE_SPEC_VERSION_ID == 7
- def __define_wrapper_proc_for_compatibility__!
- __define_themes_and_setTheme_proc__!
-
- unless Tk.info(:commands, '::ttk::style').empty?
- # fail RuntimeError,
- # "can't define '::ttk::style' command (already exist)"
-
- # do nothing !!!
- warn "Warning: can't define '::ttk::style' command (already exist)" if $DEBUG
- return
- end
- TkCore::INTERP.add_tk_procs('::ttk::style', 'args', <<-'EOS')
- if [string equal [lrange $args 0 1] {element create}] {
- if [string equal [lindex $args 3] image] {
- set spec [lindex $args 4]
- set map [lrange $spec 1 end]
- if [llength $map] {
- # return [eval [concat [list ::style element create [lindex $args 2] image [lindex $spec 0] -map $map] [lrange $args 5 end]]]
- return [uplevel 1 [list ::style element create [lindex $args 2] image [lindex $spec 0] -map $map] [lrange $args 5 end]]]
- }
- }
- } elseif [string equal [lindex $args 0] default] {
- # return [eval "::style [lreplace $args 0 0 configure]"]
- return [uplevel 1 ::style [lreplace $args 0 0 configure]]
- }
- # return [eval "::style $args"]
- return [uplevel 1 ::style $args]
- EOS
- #########################
- end
- end
- else ### TILE_SPEC_VERSION_ID >= 8
- TkCommandNames = ['::ttk::style'.freeze].freeze
-
- def __define_wrapper_proc_for_compatibility__!
- __define_themes_and_setTheme_proc__!
-
- unless Tk.info(:commands, '::style').empty?
- # fail RuntimeError, "can't define '::style' command (already exist)"
-
- # do nothing !!!
- warn "Warning: can't define '::style' command (already exist)" if $DEBUG
- return
- end
- TkCore::INTERP.add_tk_procs('::style', 'args', <<-'EOS')
- if [string equal [lrange $args 0 1] {element create}] {
- if [string equal [lindex $args 3] image] {
- set name [lindex $args 4]
- set opts [lrange $args 5 end]
- set idx [lsearch $opts -map]
- if {$idx >= 0 && [expr $idx % 2 == 0]} {
- # return [eval [concat [list ::ttk::style element create [lindex $args 2] image [concat $name [lindex $opts [expr $idx + 1]]]] [lreplace $opts $idx [expr $idx + 1]]]]
- return [uplevel 1 [list ::ttk::style element create [lindex $args 2] image [concat $name [lindex $opts [expr $idx + 1]]]] [lreplace $opts $idx [expr $idx + 1]]]
- }
- }
- } elseif [string equal [lindex $args 0] default] {
- # return [eval "::ttk::style [lreplace $args 0 0 configure]"]
- return [uplevel 1 ::ttk::style [lreplace $args 0 0 configure]]
- }
- # return [eval "::ttk::style $args"]
- return [uplevel 1 ::ttk::style $args]
- EOS
- #########################
- end
- end
-
- def __define_themes_and_setTheme_proc__!
- TkCore::INTERP.add_tk_procs('::ttk::themes', '{ptn *}', <<-'EOS')
- #set themes [list]
- set themes [::ttk::style theme names]
- foreach pkg [lsearch -inline -all -glob [package names] ttk::theme::$ptn] {
- set theme [namespace tail $pkg]
- if {[lsearch -exact $themes $theme] < 0} {
- lappend themes $theme
- }
- }
- foreach pkg [lsearch -inline -all -glob [package names] tile::theme::$ptn] {
- set theme [namespace tail $pkg]
- if {[lsearch -exact $themes $theme] < 0} {
- lappend themes $theme
- }
- }
- return $themes
- EOS
- #########################
- TkCore::INTERP.add_tk_procs('::ttk::setTheme', 'theme', <<-'EOS')
- variable currentTheme
- if {[lsearch -exact [::ttk::style theme names] $theme] < 0} {
- package require [lsearch -inline -regexp [package names] (ttk|tile)::theme::$theme]
- }
- ::ttk::style theme use $theme
- set currentTheme $theme
- EOS
- end
- private :__define_themes_and_setTheme_proc__!
-
- def configure(style=nil, keys=nil)
- if style.kind_of?(Hash)
- keys = style
- style = nil
- end
- style = '.' unless style
-
- if Tk::Tile::TILE_SPEC_VERSION_ID < 7
- sub_cmd = 'default'
- else
- sub_cmd = 'configure'
- end
-
- if keys && keys != None
- tk_call(TkCommandNames[0], sub_cmd, style, *hash_kv(keys))
- else
- tk_call(TkCommandNames[0], sub_cmd, style)
- end
- end
- alias default configure
-
- def map(style=nil, keys=nil)
- if style.kind_of?(Hash)
- keys = style
- style = nil
- end
- style = '.' unless style
-
- if keys && keys != None
- if keys.kind_of?(Hash)
- tk_call(TkCommandNames[0], 'map', style, *hash_kv(keys))
- else
- simplelist(tk_call(TkCommandNames[0], 'map', style, '-' << keys.to_s))
- end
- else
- ret = {}
- Hash[*(simplelist(tk_call(TkCommandNames[0], 'map', style)))].each{|k, v|
- ret[k[1..-1]] = list(v)
- }
- ret
- end
- end
- alias map_configure map
-
- def map_configinfo(style=nil, key=None)
- style = '.' unless style
- map(style, key)
- end
-
- def map_default_configinfo(key=None)
- map('.', key)
- end
-
- def lookup(style, opt, state=None, fallback_value=None)
- tk_call(TkCommandNames[0], 'lookup', style,
- '-' << opt.to_s, state, fallback_value)
- end
-
- include Tk::Tile::ParseStyleLayout
-
- def layout(style=nil, spec=nil)
- if style.kind_of?(Hash)
- spec = style
- style = nil
- end
- style = '.' unless style
-
- if spec
- tk_call(TkCommandNames[0], 'layout', style, spec)
- else
- _style_layout(list(tk_call(TkCommandNames[0], 'layout', style)))
- end
- end
-
- def element_create(name, type, *args)
- if type == 'image' || type == :image
- element_create_image(name, *args)
- elsif type == 'vsapi' || type == :vsapi
- element_create_vsapi(name, *args)
- else
- tk_call(TkCommandNames[0], 'element', 'create', name, type, *args)
- end
- end
-
- def element_create_image(name, *args)
- fail ArgumentError, 'Must supply a base image' unless (spec = args.shift)
- if (opts = args.shift)
- if opts.kind_of?(Hash)
- opts = _symbolkey2str(opts)
- else
- fail ArgumentError, 'bad option'
- end
- end
- fail ArgumentError, 'too many arguments' unless args.empty?
-
- if spec.kind_of?(Array)
- # probably, command format is tile 0.8+ (Tcl/Tk8.5+) style
- if Tk::Tile::TILE_SPEC_VERSION_ID >= 8
- if opts
- tk_call(TkCommandNames[0],
- 'element', 'create', name, 'image', spec, opts)
- else
- tk_call(TkCommandNames[0], 'element', 'create', name, 'image', spec)
- end
- else
- fail ArgumentError, 'illegal arguments' if opts.key?('map')
- base = spec.shift
- opts['map'] = spec
- tk_call(TkCommandNames[0],
- 'element', 'create', name, 'image', base, opts)
- end
- else
- # probably, command format is tile 0.7.8 or older style
- if Tk::Tile::TILE_SPEC_VERSION_ID >= 8
- spec = [spec, *(opts.delete('map'))] if opts.key?('map')
- end
- if opts
- tk_call(TkCommandNames[0],
- 'element', 'create', name, 'image', spec, opts)
- else
- tk_call(TkCommandNames[0], 'element', 'create', name, 'image', spec)
- end
- end
- end
-
- def element_create_vsapi(name, class_name, part_id, *args)
- # supported on Tcl/Tk 8.6 or later
-
- # argument check
- if (state_map = args.shift || None)
- if state_map.kind_of?(Hash)
- opts = _symbolkey2str(state_map)
- state_map = None
- end
- end
- opts = args.shift || None
- fail ArgumentError, "too many arguments" unless args.empty?
-
- # define a Microsoft Visual Styles element
- tk_call(TkCommandNames[0], 'element', 'create', name, 'vsapi',
- class_name, part_id, state_map, opts)
- end
-
- def element_names()
- list(tk_call(TkCommandNames[0], 'element', 'names'))
- end
-
- def element_options(elem)
- simplelist(tk_call(TkCommandNames[0], 'element', 'options', elem))
- end
-
- def theme_create(name, keys=nil)
- name = name.to_s
- if keys && keys != None
- tk_call(TkCommandNames[0], 'theme', 'create', name, *hash_kv(keys))
- else
- tk_call(TkCommandNames[0], 'theme', 'create', name)
- end
- name
- end
-
- def theme_settings(name, cmd=nil, &b)
- name = name.to_s
- cmd = Proc.new(&b) if !cmd && b
- tk_call(TkCommandNames[0], 'theme', 'settings', name, cmd)
- name
- end
-
- def theme_names()
- list(tk_call(TkCommandNames[0], 'theme', 'names'))
- end
-
- def theme_use(name)
- name = name.to_s
- tk_call(TkCommandNames[0], 'theme', 'use', name)
- name
- end
-end
diff --git a/ext/tk/lib/tkextlib/tile/tbutton.rb b/ext/tk/lib/tkextlib/tile/tbutton.rb
deleted file mode 100644
index 217da62eca..0000000000
--- a/ext/tk/lib/tkextlib/tile/tbutton.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: false
-#
-# tbutton widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TButton < Tk::Button
- end
- Button = TButton
- end
-end
-
-class Tk::Tile::TButton < Tk::Button
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::button'.freeze].freeze
- else
- TkCommandNames = ['::tbutton'.freeze].freeze
- end
- WidgetClassName = 'TButton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Button, :TkButton)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tbutton.rb',
- :Ttk, Tk::Tile::Button, :TkButton)
diff --git a/ext/tk/lib/tkextlib/tile/tcheckbutton.rb b/ext/tk/lib/tkextlib/tile/tcheckbutton.rb
deleted file mode 100644
index c0e4d4b505..0000000000
--- a/ext/tk/lib/tkextlib/tile/tcheckbutton.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: false
-#
-# tcheckbutton widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TCheckButton < Tk::CheckButton
- end
- TCheckbutton = TCheckButton
- CheckButton = TCheckButton
- Checkbutton = TCheckButton
- end
-end
-
-class Tk::Tile::TCheckButton < Tk::CheckButton
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::checkbutton'.freeze].freeze
- else
- TkCommandNames = ['::tcheckbutton'.freeze].freeze
- end
- WidgetClassName = 'TCheckbutton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Checkbutton,
-# :TkCheckbutton, :TkCheckButton)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tcheckbutton.rb',
- :Ttk, Tk::Tile::Checkbutton,
- :TkCheckbutton, :TkCheckButton)
diff --git a/ext/tk/lib/tkextlib/tile/tcombobox.rb b/ext/tk/lib/tkextlib/tile/tcombobox.rb
deleted file mode 100644
index f2dec21fbf..0000000000
--- a/ext/tk/lib/tkextlib/tile/tcombobox.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-# frozen_string_literal: false
-#
-# tcombobox widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TCombobox < Tk::Tile::TEntry
- end
- Combobox = TCombobox
- end
-end
-
-class Tk::Tile::TCombobox < Tk::Tile::TEntry
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::combobox'.freeze].freeze
- else
- TkCommandNames = ['::tcombobox'.freeze].freeze
- end
- WidgetClassName = 'TCombobox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __boolval_optkeys
- super() << 'exportselection'
- end
- private :__boolval_optkeys
-
- def __listval_optkeys
- super() << 'values'
- end
- private :__listval_optkeys
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-
- def current
- number(tk_send_without_enc('current'))
- end
- def current=(idx)
- tk_send_without_enc('current', idx)
- end
-
- def set(val)
- tk_send('set', val)
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Combobox, :TkCombobox)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tcombobox.rb',
- :Ttk, Tk::Tile::Combobox, :TkCombobox)
diff --git a/ext/tk/lib/tkextlib/tile/tentry.rb b/ext/tk/lib/tkextlib/tile/tentry.rb
deleted file mode 100644
index 5d577a65a6..0000000000
--- a/ext/tk/lib/tkextlib/tile/tentry.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-# frozen_string_literal: false
-#
-# tentry widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TEntry < Tk::Entry
- end
- Entry = TEntry
- end
-end
-
-class Tk::Tile::TEntry < Tk::Entry
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::entry'.freeze].freeze
- else
- TkCommandNames = ['::tentry'.freeze].freeze
- end
- WidgetClassName = 'TEntry'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __optkey_aliases
- {:vcmd=>:validatecommand, :invcmd=>:invalidcommand}
- end
- private :__optkey_aliases
-
- def __boolval_optkeys
- super() << 'exportselection'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'show'
- end
- private :__strval_optkeys
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Entry, :TkEntry)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tentry.rb',
- :Ttk, Tk::Tile::Entry, :TkEntry)
diff --git a/ext/tk/lib/tkextlib/tile/tframe.rb b/ext/tk/lib/tkextlib/tile/tframe.rb
deleted file mode 100644
index 5ebf19d1e8..0000000000
--- a/ext/tk/lib/tkextlib/tile/tframe.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: false
-#
-# tframe widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TFrame < Tk::Frame
- end
- Frame = TFrame
- end
-end
-
-class Tk::Tile::TFrame < Tk::Frame
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::frame'.freeze].freeze
- else
- TkCommandNames = ['::tframe'.freeze].freeze
- end
- WidgetClassName = 'TFrame'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Frame, :TkFrame)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tframe.rb',
- :Ttk, Tk::Tile::Frame, :TkFrame)
diff --git a/ext/tk/lib/tkextlib/tile/tlabel.rb b/ext/tk/lib/tkextlib/tile/tlabel.rb
deleted file mode 100644
index 3dddeafc21..0000000000
--- a/ext/tk/lib/tkextlib/tile/tlabel.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: false
-#
-# tlabel widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TLabel < Tk::Label
- end
- Label = TLabel
- end
-end
-
-class Tk::Tile::TLabel < Tk::Label
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::label'.freeze].freeze
- else
- TkCommandNames = ['::tlabel'.freeze].freeze
- end
- WidgetClassName = 'TLabel'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Label, :TkLabel)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tlabel.rb',
- :Ttk, Tk::Tile::Label, :TkLabel)
diff --git a/ext/tk/lib/tkextlib/tile/tlabelframe.rb b/ext/tk/lib/tkextlib/tile/tlabelframe.rb
deleted file mode 100644
index d512f31ffe..0000000000
--- a/ext/tk/lib/tkextlib/tile/tlabelframe.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: false
-#
-# tlabelframe widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TLabelframe < Tk::Tile::TFrame
- end
- TLabelFrame = TLabelframe
- Labelframe = TLabelframe
- LabelFrame = TLabelframe
- end
-end
-
-class Tk::Tile::TLabelframe < Tk::Tile::TFrame
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::labelframe'.freeze].freeze
- else
- TkCommandNames = ['::tlabelframe'.freeze].freeze
- end
- WidgetClassName = 'TLabelframe'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Labelframe,
-# :TkLabelframe, :TkLabelFrame)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tlabelframe.rb',
- :Ttk, Tk::Tile::Labelframe,
- :TkLabelframe, :TkLabelFrame)
diff --git a/ext/tk/lib/tkextlib/tile/tmenubutton.rb b/ext/tk/lib/tkextlib/tile/tmenubutton.rb
deleted file mode 100644
index a22ebaeca7..0000000000
--- a/ext/tk/lib/tkextlib/tile/tmenubutton.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: false
-#
-# tmenubutton widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TMenubutton < Tk::Menubutton
- end
- TMenuButton = TMenubutton
- Menubutton = TMenubutton
- MenuButton = TMenubutton
- end
-end
-
-class Tk::Tile::TMenubutton < Tk::Menubutton
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::menubutton'.freeze].freeze
- else
- TkCommandNames = ['::tmenubutton'.freeze].freeze
- end
- WidgetClassName = 'TMenubutton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Menubutton,
-# :TkMenubutton, :TkMenuButton)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tmenubutton.rb',
- :Ttk, Tk::Tile::Menubutton,
- :TkMenubutton, :TkMenuButton)
diff --git a/ext/tk/lib/tkextlib/tile/tnotebook.rb b/ext/tk/lib/tkextlib/tile/tnotebook.rb
deleted file mode 100644
index 4089dcfd4b..0000000000
--- a/ext/tk/lib/tkextlib/tile/tnotebook.rb
+++ /dev/null
@@ -1,148 +0,0 @@
-# frozen_string_literal: false
-#
-# tnotebook widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TNotebook < TkWindow
- end
- Notebook = TNotebook
- end
-end
-
-class Tk::Tile::TNotebook < TkWindow
- ################################
- include TkItemConfigMethod
-
- def __item_cget_cmd(id)
- [self.path, 'tab', id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, 'tab', id]
- end
- private :__item_config_cmd
-
- def __item_listval_optkeys(id)
- []
- end
- private :__item_listval_optkeys
-
- def __item_methodcall_optkeys(id) # { key=>method, ... }
- {}
- end
- private :__item_methodcall_optkeys
-
- #alias tabcget itemcget
- #alias tabcget_strict itemcget_strict
- alias tabconfigure itemconfigure
- alias tabconfiginfo itemconfiginfo
- alias current_tabconfiginfo current_itemconfiginfo
-
- def tabcget_tkstring(tagOrId, option)
- tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{option}")), false, true)[-1]
- end
- def tabcget_strict(tagOrId, option)
- tabconfiginfo(tagOrId, option)[-1]
- end
- def tabcget(tagOrId, option)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- tabcget_strict(tagOrId, option)
- else
- begin
- tabcget_strict(tagOrId, option)
- rescue => e
- begin
- if current_tabconfiginfo(tagOrId).has_key?(option.to_s)
- # not tag error & option is known -> error on known option
- fail e
- else
- # not tag error & option is unknown
- nil
- end
- rescue
- fail e # tag error
- end
- end
- end
- end
- ################################
-
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::notebook'.freeze].freeze
- else
- TkCommandNames = ['::tnotebook'.freeze].freeze
- end
- WidgetClassName = 'TNotebook'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-
- def enable_traversal()
- if Tk::Tile::TILE_SPEC_VERSION_ID < 5
- tk_call_without_enc('::tile::enableNotebookTraversal', @path)
- elsif Tk::Tile::TILE_SPEC_VERSION_ID < 7
- tk_call_without_enc('::tile::notebook::enableTraversal', @path)
- else
- tk_call_without_enc('::ttk::notebook::enableTraversal', @path)
- end
- self
- end
-
- def add(child, keys=nil)
- if keys && keys != None
- tk_send('add', _epath(child), *hash_kv(keys))
- else
- tk_send('add', _epath(child))
- end
- self
- end
-
- def forget(idx)
- tk_send('forget', idx)
- self
- end
-
- def hide(idx)
- tk_send('hide', idx)
- end
-
- def index(idx)
- number(tk_send('index', idx))
- end
-
- def insert(idx, subwin, keys=nil)
- if keys && keys != None
- tk_send('insert', idx, subwin, *hash_kv(keys))
- else
- tk_send('insert', idx, subwin)
- end
- self
- end
-
- def select(idx)
- tk_send('select', idx)
- self
- end
-
- def selected
- window(tk_send_without_enc('select'))
- end
-
- def tabs
- list(tk_send('tabs'))
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Notebook, :TkNotebook)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tnotebook.rb',
- :Ttk, Tk::Tile::Notebook, :TkNotebook)
diff --git a/ext/tk/lib/tkextlib/tile/tpaned.rb b/ext/tk/lib/tkextlib/tile/tpaned.rb
deleted file mode 100644
index f51a1f3b41..0000000000
--- a/ext/tk/lib/tkextlib/tile/tpaned.rb
+++ /dev/null
@@ -1,246 +0,0 @@
-# frozen_string_literal: false
-#
-# tpaned widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TPaned < TkWindow
- end
- PanedWindow = Panedwindow = Paned = TPaned
- end
-end
-
-class Tk::Tile::TPaned < TkWindow
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- if Tk::Tile::TILE_SPEC_VERSION_ID < 8
- TkCommandNames = ['::ttk::paned'.freeze].freeze
- else
- TkCommandNames = ['::ttk::panedwindow'.freeze].freeze
- end
- else
- TkCommandNames = ['::tpaned'.freeze].freeze
- end
- WidgetClassName = 'TPaned'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-
- def add(*args)
- keys = args.pop
- fail ArgumentError, "no window in arguments" unless keys
-
- if keys && keys.kind_of?(Hash)
- fail ArgumentError, "no window in arguments" if args == []
- opts = hash_kv(keys)
- else
- args.push(keys) if keys
- opts = []
- end
-
- args.each{|win|
- tk_send_without_enc('add', _epath(win), *opts)
- }
- self
- end
-
- def forget(pane)
- pane = _epath(pane)
- tk_send_without_enc('forget', pane)
- self
- end
-
- def insert(pos, win, keys)
- win = _epath(win)
- tk_send_without_enc('insert', pos, win, *hash_kv(keys))
- self
- end
-
- def panecget_tkstring(pane, slot)
- pane = _epath(pane)
- tk_send_without_enc('pane', pane, "-#{slot}")
- end
- alias pane_cget_tkstring panecget_tkstring
-
- def panecget_strict(pane, slot)
- pane = _epath(pane)
- tk_tcl2ruby(tk_send_without_enc('pane', pane, "-#{slot}"))
- end
- alias pane_cget_strict panecget_strict
-
- def panecget(pane, slot)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- panecget_strict(pane, slot)
- else
- begin
- panecget_strict(pane, slot)
- rescue => e
- begin
- if current_paneconfiginfo(pane).has_key?(slot.to_s)
- # not tag error & option is known -> error on known option
- fail e
- else
- # not tag error & option is unknown
- nil
- end
- rescue
- fail e # tag error
- end
- end
- end
- end
- alias pane_cget panecget
-
- def paneconfigure(pane, key, value=nil)
- pane = _epath(pane)
- if key.kind_of? Hash
- params = []
- key.each{|k, v|
- params.push("-#{k}")
- # params.push((v.kind_of?(TkObject))? v.epath: v)
- params.push(_epath(v))
- }
- tk_send_without_enc('pane', pane, *params)
- else
- # value = value.epath if value.kind_of?(TkObject)
- value = _epath(value)
- tk_send_without_enc('pane', pane, "-#{key}", value)
- end
- self
- end
- alias pane_config paneconfigure
- alias pane_configure paneconfigure
-
- def paneconfiginfo(win)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- win = _epath(win)
- if key
- conf = tk_split_list(tk_send_without_enc('pane', win, "-#{key}"))
- conf[0] = conf[0][1..-1]
- if conf[0] == 'hide'
- conf[3] = bool(conf[3]) unless conf[3].empty?
- conf[4] = bool(conf[4]) unless conf[4].empty?
- end
- conf
- else
- tk_split_simplelist(tk_send_without_enc('pane',
- win)).collect{|conflist|
- conf = tk_split_simplelist(conflist)
- conf[0] = conf[0][1..-1]
- if conf[3]
- if conf[0] == 'hide'
- conf[3] = bool(conf[3]) unless conf[3].empty?
- elsif conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf[4]
- if conf[0] == 'hide'
- conf[4] = bool(conf[4]) unless conf[4].empty?
- elsif conf[4].index('{')
- conf[4] = tk_split_list(conf[4])
- else
- conf[4] = tk_tcl2ruby(conf[4])
- end
- end
- conf[1] = conf[1][1..-1] if conf.size == 2 # alias info
- conf
- }
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- win = _epath(win)
- if key
- conf = tk_split_list(tk_send_without_enc('pane', win, "-#{key}"))
- key = conf.shift[1..-1]
- if key == 'hide'
- conf[2] = bool(conf[2]) unless conf[2].empty?
- conf[3] = bool(conf[3]) unless conf[3].empty?
- end
- { key => conf }
- else
- ret = {}
- tk_split_simplelist(tk_send_without_enc('pane',
- win)).each{|conflist|
- conf = tk_split_simplelist(conflist)
- key = conf.shift[1..-1]
- if key
- if key == 'hide'
- conf[2] = bool(conf[2]) unless conf[2].empty?
- elsif conf[2].index('{')
- conf[2] = tk_split_list(conf[2])
- else
- conf[2] = tk_tcl2ruby(conf[2])
- end
- end
- if conf[3]
- if key == 'hide'
- conf[3] = bool(conf[3]) unless conf[3].empty?
- elsif conf[3].index('{')
- conf[3] = tk_split_list(conf[3])
- else
- conf[3] = tk_tcl2ruby(conf[3])
- end
- end
- if conf.size == 1
- ret[key] = conf[0][1..-1] # alias info
- else
- ret[key] = conf
- end
- }
- ret
- end
- end
- end
- alias pane_configinfo paneconfiginfo
-
- def current_paneconfiginfo(win, key=nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if key
- conf = paneconfiginfo(win, key)
- {conf[0] => conf[4]}
- else
- ret = {}
- paneconfiginfo(win).each{|conf|
- ret[conf[0]] = conf[4] if conf.size > 2
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- paneconfiginfo(win, key).each{|k, conf|
- ret[k] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
- alias current_pane_configinfo current_paneconfiginfo
-
- def panes
- tk_split_simplelist(tk_send_without_enc('panes')).map{|w|
- (obj = window(w))? obj: w
- }
- end
-
- def identify(x, y)
- num_or_nil(tk_send_without_enc('identify', x, y))
- end
-
- def sashpos(idx, newpos=None)
- num_or_str(tk_send_without_enc('sashpos', idx, newpos))
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Panedwindow,
-# :TkPanedwindow, :TkPanedWindow)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tpaned.rb',
- :Ttk, Tk::Tile::Panedwindow,
- :TkPanedwindow, :TkPanedWindow)
diff --git a/ext/tk/lib/tkextlib/tile/tprogressbar.rb b/ext/tk/lib/tkextlib/tile/tprogressbar.rb
deleted file mode 100644
index 446e053e3b..0000000000
--- a/ext/tk/lib/tkextlib/tile/tprogressbar.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: false
-#
-# tprogressbar widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TProgressbar < TkWindow
- end
- Progressbar = TProgressbar
- end
-end
-
-class Tk::Tile::TProgressbar
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::progressbar'.freeze].freeze
- else
- TkCommandNames = ['::tprogressbar'.freeze].freeze
- end
- WidgetClassName = 'TProgressbar'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-
- def step(amount=None)
- tk_send_without_enc('step', amount).to_f
- end
- #def step=(amount)
- # tk_send_without_enc('step', amount)
- #end
-
- def start(interval=None)
- if Tk::Tile::TILE_SPEC_VERSION_ID < 5
- tk_call_without_enc('::tile::progressbar::start', @path, interval)
- else
- tk_send_without_enc('start', interval)
- end
- end
-
- def stop(amount=None)
- if Tk::Tile::TILE_SPEC_VERSION_ID < 5
- tk_call_without_enc('::tile::progressbar::stop', @path)
- else
- tk_send_without_enc('stop', amount)
- end
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Progressbar, :TkProgressbar)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tprogressbar.rb',
- :Ttk, Tk::Tile::Progressbar, :TkProgressbar)
diff --git a/ext/tk/lib/tkextlib/tile/tradiobutton.rb b/ext/tk/lib/tkextlib/tile/tradiobutton.rb
deleted file mode 100644
index 202de1eb25..0000000000
--- a/ext/tk/lib/tkextlib/tile/tradiobutton.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: false
-#
-# tradiobutton widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TRadioButton < Tk::RadioButton
- end
- TRadiobutton = TRadioButton
- RadioButton = TRadioButton
- Radiobutton = TRadioButton
- end
-end
-
-class Tk::Tile::TRadioButton < Tk::RadioButton
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::radiobutton'.freeze].freeze
- else
- TkCommandNames = ['::tradiobutton'.freeze].freeze
- end
- WidgetClassName = 'TRadiobutton'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Radiobutton,
-# :TkRadiobutton, :TkRadioButton)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tradiobutton.rb',
- :Ttk, Tk::Tile::Radiobutton,
- :TkRadiobutton, :TkRadioButton)
diff --git a/ext/tk/lib/tkextlib/tile/treeview.rb b/ext/tk/lib/tkextlib/tile/treeview.rb
deleted file mode 100644
index 1be8f54348..0000000000
--- a/ext/tk/lib/tkextlib/tile/treeview.rb
+++ /dev/null
@@ -1,1337 +0,0 @@
-# frozen_string_literal: false
-#
-# treeview widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class Treeview < TkWindow
- end
- end
-end
-
-module Tk::Tile::TreeviewConfig
- include TkItemConfigMethod
-
- def __item_configinfo_struct(id)
- # maybe need to override
- {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil,
- :default_value=>nil, :current_value=>1}
- end
- private :__item_configinfo_struct
-
- def __itemconfiginfo_core(tagOrId, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
- fontkey = $2
- return [slot.to_s, tagfontobj(tagid(tagOrId), fontkey)]
- else
- if slot
- slot = slot.to_s
-
- alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot}
- if real_name
- slot = real_name.to_s
- end
-
- case slot
- when /^(#{__tile_specific_item_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- # On tile-0.7.{2-8}, 'state' options has no '-' at its head.
- val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << slot))
- rescue
- # Maybe, 'state' option has '-' in future.
- val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- end
- return [slot, val]
-
- when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot]
- optval = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}lcall(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- return [slot, val]
-
- when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot]
- return [slot, self.__send__(method, tagOrId)]
-
- when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- val = number(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))
- rescue
- val = nil
- end
- return [slot, val]
-
- when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
- val = num_or_str(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))
- return [slot, val]
-
- when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- val = bool(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))
- rescue
- val = nil
- end
- return [slot, val]
-
- when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
- val = simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))
- return [slot, val]
-
- when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
- val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- if val =~ /^[0-9]/
- return [slot, list(val)]
- else
- return [slot, val]
- end
-
- when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
- val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- return [slot, val]
-
- when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/
- val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- if val.empty?
- return [slot, nil]
- else
- return [slot, TkVarAccess.new(val)]
- end
-
- else
- val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- if val.index('{')
- return [slot, tk_split_list(val)]
- else
- return [slot, tk_tcl2ruby(val)]
- end
- end
-
- else # ! slot
- ret = Hash[*(tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false))].to_a.collect{|conf|
- conf[0] = conf[0][1..-1] if conf[0][0] == ?-
- case conf[0]
- when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[conf[0]]
- optval = conf[1]
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[1] = val
-
- when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
- # do nothing
-
- when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- conf[1] = number(conf[1])
- rescue
- conf[1] = nil
- end
-
- when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
- conf[1] = num_or_str(conf[1])
-
- when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- conf[1] = bool(conf[1])
- rescue
- conf[1] = nil
- end
-
- when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
- conf[1] = simplelist(conf[1])
-
- when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
- if conf[1] =~ /^[0-9]/
- conf[1] = list(conf[1])
- end
-
- when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/
- if conf[1].empty?
- conf[1] = nil
- else
- conf[1] = TkVarAccess.new(conf[1])
- end
-
- else
- if conf[1].index('{')
- conf[1] = tk_split_list(conf[1])
- else
- conf[1] = tk_tcl2ruby(conf[1])
- end
- end
-
- conf
- }
-
- __item_font_optkeys(tagid(tagOrId)).each{|optkey|
- optkey = optkey.to_s
- fontconf = ret.assoc(optkey)
- if fontconf
- ret.delete_if{|inf| inf[0] =~ /^(|latin|ascii|kanji)#{optkey}$/}
- fontconf[1] = tagfontobj(tagid(tagOrId), optkey)
- ret.push(fontconf)
- end
- }
-
- __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method|
- ret << [optkey.to_s, self.__send__(method, tagOrId)]
- }
-
- ret
- end
- end
-
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
- fontkey = $2
- return {slot.to_s => tagfontobj(tagid(tagOrId), fontkey)}
- else
- if slot
- slot = slot.to_s
-
- alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot}
- if real_name
- slot = real_name.to_s
- end
-
- case slot
- when /^(#{__tile_specific_item_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- # On tile-0.7.{2-8}, 'state' option has no '-' at its head.
- val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << slot))
- rescue
- # Maybe, 'state' option has '-' in future.
- val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- end
- return {slot => val}
-
- when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot]
- optval = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}lcall(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- return {slot => val}
-
- when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot]
- return {slot => self.__send__(method, tagOrId)}
-
- when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- val = number(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))
- rescue
- val = nil
- end
- return {slot => val}
-
- when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
- val = num_or_str(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))
- return {slot => val}
-
- when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- val = bool(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))
- rescue
- val = nil
- end
- return {slot => val}
-
- when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
- val = simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))
- return {slot => val}
-
- when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
- val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- if val =~ /^[0-9]/
- return {slot => list(val)}
- else
- return {slot => val}
- end
-
- when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
- val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- return {slot => val}
-
- when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/
- val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- if val.empty?
- return {slot => nil}
- else
- return {slot => TkVarAccess.new(val)}
- end
-
- else
- val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))
- if val.index('{')
- return {slot => tk_split_list(val)}
- else
- return {slot => tk_tcl2ruby(val)}
- end
- end
-
- else # ! slot
- ret = {}
- ret = Hash[*(tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false))].to_a.collect{|conf|
- conf[0] = conf[0][1..-1] if conf[0][0] == ?-
-
- optkey = conf[0]
- case optkey
- when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/
- method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[optkey]
- optval = conf[1]
- begin
- val = method.call(tagOrId, optval)
- rescue => e
- warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG
- val = optval
- end
- conf[1] = val
-
- when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
- # do nothing
-
- when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- conf[1] = number(conf[1])
- rescue
- conf[1] = nil
- end
-
- when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
- conf[1] = num_or_str(conf[1])
-
- when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
- begin
- conf[1] = bool(conf[1])
- rescue
- conf[1] = nil
- end
-
- when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
- conf[1] = simplelist(conf[1])
-
- when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
- if conf[1] =~ /^[0-9]/
- conf[1] = list(conf[1])
- end
-
- when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/
- if conf[1].empty?
- conf[1] = nil
- else
- conf[1] = TkVarAccess.new(conf[1])
- end
-
- else
- if conf[1].index('{')
- return [slot, tk_split_list(conf[1])]
- else
- return [slot, tk_tcl2ruby(conf[1])]
- end
- end
-
- ret[conf[0]] = conf[1]
- }
-
- __item_font_optkeys(tagid(tagOrId)).each{|optkey|
- optkey = optkey.to_s
- fontconf = ret[optkey]
- if fontconf.kind_of?(Array)
- ret.delete(optkey)
- ret.delete('latin' << optkey)
- ret.delete('ascii' << optkey)
- ret.delete('kanji' << optkey)
- fontconf[1] = tagfontobj(tagid(tagOrId), optkey)
- ret[optkey] = fontconf
- end
- }
-
- __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method|
- ret[optkey.to_s] = self.__send__(method, tagOrId)
- }
-
- ret
- end
- end
- end
- end
-
- ###################
-
- def __item_cget_cmd(id)
- [self.path, *id]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id)
- [self.path, *id]
- end
- private :__item_config_cmd
-
- def __item_numstrval_optkeys(id)
- case id[0]
- when :item, 'item'
- ['width']
- when :column, 'column'
- super(id[1]) + ['minwidth']
- when :tag, 'tag'
- super(id[1])
- when :heading, 'heading'
- super(id[1])
- else
- super(id[1])
- end
- end
- private :__item_numstrval_optkeys
-
- def __item_strval_optkeys(id)
- case id[0]
- when :item, 'item'
- super(id) + ['id']
- when :column, 'column'
- super(id[1])
- when :tag, 'tag'
- super(id[1])
- when :heading, 'heading'
- super(id[1])
- else
- super(id[1])
- end
- end
- private :__item_strval_optkeys
-
- def __item_boolval_optkeys(id)
- case id[0]
- when :item, 'item'
- ['open']
- when :column, 'column'
- super(id[1]) + ['stretch']
- when :tag, 'tag'
- super(id[1])
- when :heading, 'heading'
- super(id[1])
- end
- end
- private :__item_boolval_optkeys
-
- def __item_listval_optkeys(id)
- case id[0]
- when :item, 'item'
- ['values']
- when :column, 'column'
- []
- when :heading, 'heading'
- []
- else
- []
- end
- end
- private :__item_listval_optkeys
-
- def __item_val2ruby_optkeys(id)
- case id[0]
- when :item, 'item'
- {
- 'tags'=>proc{|arg_id, val|
- simplelist(val).collect{|tag|
- Tk::Tile::Treeview::Tag.id2obj(self, tag)
- }
- }
- }
- when :column, 'column'
- {}
- when :heading, 'heading'
- {}
- else
- {}
- end
- end
- private :__item_val2ruby_optkeys
-
- def __tile_specific_item_optkeys(id)
- case id[0]
- when :item, 'item'
- []
- when :column, 'column'
- []
- when :heading, 'heading'
- ['state'] # On tile-0.7.{2-8}, 'state' options has no '-' at its head.
- else
- []
- end
- end
- private :__item_val2ruby_optkeys
-
- def itemconfiginfo(tagOrId, slot = nil)
- __itemconfiginfo_core(tagOrId, slot)
- end
-
- def current_itemconfiginfo(tagOrId, slot = nil)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- if slot
- org_slot = slot
- begin
- conf = __itemconfiginfo_core(tagOrId, slot)
- if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
- || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
- return {conf[0] => conf[-1]}
- end
- slot = conf[__item_configinfo_struct(tagid(tagOrId))[:alias]]
- end while(org_slot != slot)
- fail RuntimeError,
- "there is a configure alias loop about '#{org_slot}'"
- else
- ret = {}
- __itemconfiginfo_core(tagOrId).each{|conf|
- if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
- || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
- ret[conf[0]] = conf[-1]
- end
- }
- ret
- end
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- ret = {}
- __itemconfiginfo_core(tagOrId, slot).each{|key, conf|
- ret[key] = conf[-1] if conf.kind_of?(Array)
- }
- ret
- end
- end
-
- alias __itemcget_tkstring itemcget_tkstring
- alias __itemcget itemcget
- alias __itemcget_strict itemcget_strict
- alias __itemconfigure itemconfigure
- alias __itemconfiginfo itemconfiginfo
- alias __current_itemconfiginfo current_itemconfiginfo
-
- private :__itemcget_tkstring, :__itemcget, :__itemcget_strict
- private :__itemconfigure, :__itemconfiginfo, :__current_itemconfiginfo
-
- # Treeview Item
- def itemcget_tkstring(tagOrId, option)
- __itemcget_tkstring([:item, tagOrId], option)
- end
- def itemcget(tagOrId, option)
- __itemcget([:item, tagOrId], option)
- end
- def itemcget_strict(tagOrId, option)
- __itemcget_strict([:item, tagOrId], option)
- end
- def itemconfigure(tagOrId, slot, value=None)
- __itemconfigure([:item, tagOrId], slot, value)
- end
- def itemconfiginfo(tagOrId, slot=nil)
- __itemconfiginfo([:item, tagOrId], slot)
- end
- def current_itemconfiginfo(tagOrId, slot=nil)
- __current_itemconfiginfo([:item, tagOrId], slot)
- end
-
- # Treeview Column
- def columncget_tkstring(tagOrId, option)
- __itemcget_tkstring([:column, tagOrId], option)
- end
- def columncget(tagOrId, option)
- __itemcget([:column, tagOrId], option)
- end
- def columncget_strict(tagOrId, option)
- __itemcget_strict([:column, tagOrId], option)
- end
- def columnconfigure(tagOrId, slot, value=None)
- __itemconfigure([:column, tagOrId], slot, value)
- end
- def columnconfiginfo(tagOrId, slot=nil)
- __itemconfiginfo([:column, tagOrId], slot)
- end
- def current_columnconfiginfo(tagOrId, slot=nil)
- __current_itemconfiginfo([:column, tagOrId], slot)
- end
- alias column_cget_tkstring columncget_tkstring
- alias column_cget columncget
- alias column_cget_strict columncget_strict
- alias column_configure columnconfigure
- alias column_configinfo columnconfiginfo
- alias current_column_configinfo current_columnconfiginfo
-
- # Treeview Heading
- def headingcget_tkstring(tagOrId, option)
- if __tile_specific_item_optkeys([:heading, tagOrId]).index(option.to_s)
- begin
- # On tile-0.7.{2-8}, 'state' options has no '-' at its head.
- tk_call(*(__item_cget_cmd([:heading, tagOrId]) << option.to_s))
- rescue
- # Maybe, 'state' option has '-' in future.
- tk_call(*(__item_cget_cmd([:heading, tagOrId]) << "-#{option}"))
- end
- else
- __itemcget_tkstring([:heading, tagOrId], option)
- end
- end
- def headingcget_strict(tagOrId, option)
- if __tile_specific_item_optkeys([:heading, tagOrId]).index(option.to_s)
- begin
- # On tile-0.7.{2-8}, 'state' options has no '-' at its head.
- tk_call(*(__item_cget_cmd([:heading, tagOrId]) << option.to_s))
- rescue
- # Maybe, 'state' option has '-' in future.
- tk_call(*(__item_cget_cmd([:heading, tagOrId]) << "-#{option}"))
- end
- else
- __itemcget_strict([:heading, tagOrId], option)
- end
- end
- def headingcget(tagOrId, option)
- unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
- headingcget_strict(tagOrId, option)
- else
- begin
- headingcget_strict(tagOrId, option)
- rescue => e
- begin
- if current_headingconfiginfo(tagOrId).has_key?(option.to_s)
- # not tag error & option is known -> error on known option
- fail e
- else
- # not tag error & option is unknown
- nil
- end
- rescue
- fail e # tag error
- end
- end
- end
- end
- def headingconfigure(tagOrId, slot, value=None)
- if slot.kind_of?(Hash)
- slot = _symbolkey2str(slot)
- sp_kv = []
- __tile_specific_item_optkeys([:heading, tagOrId]).each{|k|
- sp_kv << k << _get_eval_string(slot.delete(k)) if slot.has_key?(k)
- }
- tk_call(*(__item_config_cmd([:heading, tagOrId]).concat(sp_kv)))
- tk_call(*(__item_config_cmd([:heading, tagOrId]).concat(hash_kv(slot))))
- elsif __tile_specific_item_optkeys([:heading, tagOrId]).index(slot.to_s)
- begin
- # On tile-0.7.{2-8}, 'state' options has no '-' at its head.
- tk_call(*(__item_cget_cmd([:heading, tagOrId]) << slot.to_s << value))
- rescue
- # Maybe, 'state' option has '-' in future.
- tk_call(*(__item_cget_cmd([:heading, tagOrId]) << "-#{slot}" << value))
- end
- else
- __itemconfigure([:heading, tagOrId], slot, value)
- end
- self
- end
- def headingconfiginfo(tagOrId, slot=nil)
- __itemconfiginfo([:heading, tagOrId], slot)
- end
- def current_headingconfiginfo(tagOrId, slot=nil)
- __current_itemconfiginfo([:heading, tagOrId], slot)
- end
- alias heading_cget_tkstring headingcget_tkstring
- alias heading_cget headingcget
- alias heading_cget_strict headingcget_strict
- alias heading_configure headingconfigure
- alias heading_configinfo headingconfiginfo
- alias current_heading_configinfo current_headingconfiginfo
-
- # Treeview Tag
- def tagcget_tkstring(tagOrId, option)
- __itemcget_tkstring([:tag, :configure, tagOrId], option)
- end
- def tagcget(tagOrId, option)
- __itemcget([:tag, :configure, tagOrId], option)
- end
- def tagcget_strict(tagOrId, option)
- __itemcget_strict([:tag, :configure, tagOrId], option)
- end
- def tagconfigure(tagOrId, slot, value=None)
- __itemconfigure([:tag, :configure, tagOrId], slot, value)
- end
- def tagconfiginfo(tagOrId, slot=nil)
- __itemconfiginfo([:tag, :configure, tagOrId], slot)
- end
- def current_tagconfiginfo(tagOrId, slot=nil)
- __current_itemconfiginfo([:tag, :configure, tagOrId], slot)
- end
- alias tag_cget_tkstring tagcget_tkstring
- alias tag_cget tagcget
- alias tag_cget_strict tagcget_strict
- alias tag_configure tagconfigure
- alias tag_configinfo tagconfiginfo
- alias current_tag_configinfo current_tagconfiginfo
-end
-
-########################
-
-class Tk::Tile::Treeview::Item < TkObject
- ItemID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{
- Tk::Tile::Treeview::Item::ItemID_TBL.clear
- }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{
- if Tk::Tile::Treeview::Item::ItemID_TBL[tpath]
- (Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id])? \
- Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id]: id
- else
- id
- end
- }
- end
-
- def self.assign(tree, id)
- tpath = tree.path
- obj = nil
- Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{
- if Tk::Tile::Treeview::Item::ItemID_TBL[tpath] &&
- Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id]
- return Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id]
- end
-
- obj = self.allocate
- obj.instance_eval{
- @parent = @t = tree
- @tpath = tpath
- @path = @id = id
- }
- Tk::Tile::Treeview::Item::ItemID_TBL[tpath] ||= {}
- Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id] = obj
- }
- obj
- end
-
- def _insert_item(tree, parent_item, idx, keys={})
- keys = _symbolkey2str(keys)
- id = keys.delete('id')
- if id
- num_or_str(tk_call(tree, 'insert',
- parent_item, idx, '-id', id, *hash_kv(keys)))
- else
- num_or_str(tk_call(tree, 'insert', parent_item, idx, *hash_kv(keys)))
- end
- end
- private :_insert_item
-
- def initialize(tree, parent_item = '', idx = 'end', keys = {})
- if parent_item.kind_of?(Hash)
- keys = parent_item
- idx = 'end'
- parent_item = ''
- elsif idx.kind_of?(Hash)
- keys = idx
- idx = 'end'
- end
-
- @parent = @t = tree
- @tpath = tree.path
- @path = @id = _insert_item(@t, parent_item, idx, keys)
- Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{
- ItemID_TBL[@tpath] = {} unless ItemID_TBL[@tpath]
- ItemID_TBL[@tpath][@id] = self
- }
- end
- def id
- @id
- end
-
- def cget_tkstring(option)
- @t.itemcget_tkstring(@id, option)
- end
- def cget(option)
- @t.itemcget(@id, option)
- end
- def cget_strict(option)
- @t.itemcget_strict(@id, option)
- end
-
- def configure(key, value=None)
- @t.itemconfigure(@id, key, value)
- self
- end
-
- def configinfo(key=nil)
- @t.itemconfiginfo(@id, key)
- end
-
- def current_configinfo(key=nil)
- @t.current_itemconfiginfo(@id, key)
- end
-
- def open?
- cget('open')
- end
- def open
- configure('open', true)
- self
- end
- def close
- configure('open', false)
- self
- end
-
- def tag_has?(tag)
- @t.tag_has?(tag, @id)
- end
- alias has_tag? tag_has?
-
- def bbox(column=None)
- @t.bbox(@id, column)
- end
-
- def children
- @t.children(@id)
- end
- def set_children(*items)
- @t.set_children(@id, *items)
- self
- end
-
- def delete
- @t.delete(@id)
- self
- end
-
- def detach
- @t.detach(@id)
- self
- end
-
- def exist?
- @t.exist?(@id)
- end
-
- def focus
- @t.focus_item(@id)
- end
-
- def index
- @t.index(@id)
- end
-
- def insert(idx='end', keys={})
- @t.insert(@id, idx, keys)
- end
-
- def move(parent, idx)
- @t.move(@id, parent, idx)
- self
- end
-
- def next_item
- @t.next_item(@id)
- end
-
- def parent_item
- @t.parent_item(@id)
- end
-
- def prev_item
- @t.prev_item(@id)
- end
-
- def see
- @t.see(@id)
- self
- end
-
- def selection_add
- @t.selection_add(@id)
- self
- end
-
- def selection_remove
- @t.selection_remove(@id)
- self
- end
-
- def selection_set
- @t.selection_set(@id)
- self
- end
-
- def selection_toggle
- @t.selection_toggle(@id)
- self
- end
-
- def get_directory
- @t.get_directory(@id)
- end
- alias get_dictionary get_directory
-
- def get(col)
- @t.get(@id, col)
- end
-
- def set(col, value)
- @t.set(@id, col, value)
- end
-end
-
-########################
-
-class Tk::Tile::Treeview::Root < Tk::Tile::Treeview::Item
- def self.new(tree, keys = {})
- tpath = tree.path
- obj = nil
- Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{
- if Tk::Tile::Treeview::Item::ItemID_TBL[tpath] &&
- Tk::Tile::Treeview::Item::ItemID_TBL[tpath]['']
- obj = Tk::Tile::Treeview::Item::ItemID_TBL[tpath]['']
- else
- #super(tree, keys)
- (obj = self.allocate).instance_eval{
- @parent = @t = tree
- @tpath = tree.path
- @path = @id = ''
- Tk::Tile::Treeview::Item::ItemID_TBL[@tpath] ||= {}
- Tk::Tile::Treeview::Item::ItemID_TBL[@tpath][@id] = self
- }
- end
- }
- obj.configure(keys) if keys && ! keys.empty?
- obj
- end
-
- def initialize(tree, keys = {})
- # dummy:: not called by 'new' method
- @parent = @t = tree
- @tpath = tree.path
- @path = @id = ''
- Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{
- Tk::Tile::Treeview::Item::ItemID_TBL[@tpath] ||= {}
- Tk::Tile::Treeview::Item::ItemID_TBL[@tpath][@id] = self
- }
- end
-end
-
-########################
-
-class Tk::Tile::Treeview::Tag < TkObject
- include TkTreatTagFont
-
- TagID_TBL = TkCore::INTERP.create_table
-
- (Tag_ID = ['tile_treeview_tag'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- Tk::Tile::Treeview::Tag::TagID_TBL.mutex.synchronize{
- Tk::Tile::Treeview::Tag::TagID_TBL.clear
- }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- Tk::Tile::Treeview::Tag::TagID_TBL.mutex.synchronize{
- if Tk::Tile::Treeview::Tag::TagID_TBL[tpath]
- (Tk::Tile::Treeview::Tag::TagID_TBL[tpath][id])? \
- Tk::Tile::Treeview::Tag::TagID_TBL[tpath][id]: id
- else
- id
- end
- }
- end
-
- def initialize(tree, keys=nil)
- @parent = @t = tree
- @tpath = tree.path
- Tag_ID.mutex.synchronize{
- @path = @id = Tag_ID.join(TkCore::INTERP._ip_id_)
- Tag_ID[1].succ!
- }
- TagID_TBL.mutex.synchronize{
- TagID_TBL[@tpath] = {} unless TagID_TBL[@tpath]
- TagID_TBL[@tpath][@id] = self
- }
- if keys && keys != None
- tk_call_without_enc(@tpath, 'tag', 'configure', @id, *hash_kv(keys,true))
- end
- end
- def id
- @id
- end
-
- def tag_has?(item)
- @t.tag_has?(@id, item)
- end
- alias added? tag_has?
-
- def tag_has
- @t.tag_has(@id)
- end
-
- def add(*items)
- @t.tag_add(@id, *items)
- end
-
- def remove(*items)
- @t.tag_remove(@id, *items)
- end
-
- def bind(seq, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- @t.tag_bind(@id, seq, cmd, *args)
- self
- end
-
- def bind_append(seq, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- @t.tag_bind_append(@id, seq, cmd, *args)
- self
- end
-
- def bind_remove(seq)
- @t.tag_bind_remove(@id, seq)
- self
- end
-
- def bindinfo(seq=nil)
- @t.tag_bindinfo(@id, seq)
- end
-
- def cget_tkstring(option)
- @t.tagcget_tkstring(@id, option)
- end
- def cget(option)
- @t.tagcget(@id, option)
- end
- def cget_strict(option)
- @t.tagcget_strict(@id, option)
- end
-
- def configure(key, value=None)
- @t.tagconfigure(@id, key, value)
- self
- end
-
- def configinfo(key=nil)
- @t.tagconfiginfo(@id, key)
- end
-
- def current_configinfo(key=nil)
- @t.current_tagconfiginfo(@id, key)
- end
-end
-
-########################
-
-class Tk::Tile::Treeview < TkWindow
- include Tk::Tile::TileWidget
- include Scrollable
-
- include Tk::Tile::TreeviewConfig
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::treeview'.freeze].freeze
- else
- TkCommandNames = ['::treeview'.freeze].freeze
- end
- WidgetClassName = 'Treeview'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __destroy_hook__
- Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{
- Tk::Tile::Treeview::Item::ItemID_TBL.delete(@path)
- }
- Tk::Tile::Treeview::Tag::ItemID_TBL.mutex.synchronize{
- Tk::Tile::Treeview::Tag::ItemID_TBL.delete(@path)
- }
- end
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-
- def tagid(id)
- if id.kind_of?(Tk::Tile::Treeview::Item) ||
- id.kind_of?(Tk::Tile::Treeview::Tag)
- id.id
- elsif id.kind_of?(Array)
- # size is 2 or 3
- id[0..-2] << _get_eval_string(id[-1])
- else
- _get_eval_string(id)
- end
- end
-
- def root
- Tk::Tile::Treeview::Root.new(self)
- end
-
- def bbox(item, column=None)
- list(tk_send('item', 'bbox', item, column))
- end
-
- def children(item)
- simplelist(tk_send_without_enc('children', item)).collect{|id|
- Tk::Tile::Treeview::Item.id2obj(self, id)
- }
- end
- def set_children(item, *items)
- tk_send_without_enc('children', item,
- array2tk_list(items.flatten, true))
- self
- end
-
- def delete(*items)
- tk_send_without_enc('delete', array2tk_list(items.flatten, true))
- self
- end
-
- def detach(*items)
- tk_send_without_enc('detach', array2tk_list(items.flatten, true))
- self
- end
-
- def exist?(item)
- bool(tk_send_without_enc('exists', _get_eval_enc_str(item)))
- end
-
- def focus_item(item = nil)
- if item
- tk_send('focus', item)
- item
- else
- id = tk_send('focus')
- (id.empty?)? nil: Tk::Tile::Treeview::Item.id2obj(self, id)
- end
- end
-
- def identify(x, y)
- # tile-0.7.2 or previous
- ret = simplelist(tk_send('identify', x, y))
- case ret[0]
- when 'heading', 'separator'
- ret[-1] = num_or_str(ret[-1])
- when 'cell'
- ret[1] = Tk::Tile::Treeview::Item.id2obj(self, ret[1])
- ret[-1] = num_or_str(ret[-1])
- when 'item', 'row'
- ret[1] = Tk::Tile::Treeview::Item.id2obj(self, ret[1])
- end
- end
-
- def identify_region(x, y)
- tk_send('identify', 'region', x, y)
- end
-
- def identify_item(x, y)
- id = tk_send('identify', 'item', x, y)
- (id.empty?)? nil: Tk::Tile::Treeview::Item.id2obj(self, id)
- end
-
- def identify_element(x, y)
- tk_send('identify', 'element', x, y)
- end
-
- def row_identify(x, y)
- id = tk_send('identify', 'row', x, y)
- (id.empty?)? nil: Tk::Tile::Treeview::Item.id2obj(self, id)
- end
- alias identify_row row_identify
-
- def column_identify(x, y)
- tk_send('identify', 'column', x, y)
- end
- alias identify_column column_identify
-
- def index(item)
- number(tk_send('index', item))
- end
-
- # def insert(parent, idx='end', keys={})
- # keys = _symbolkey2str(keys)
- # id = keys.delete('id')
- # if id
- # num_or_str(tk_send('insert', parent, idx, '-id', id, *hash_kv(keys)))
- # else
- # num_or_str(tk_send('insert', parent, idx, *hash_kv(keys)))
- # end
- # end
- def insert(parent, idx='end', keys={})
- Tk::Tile::Treeview::Item.new(self, parent, idx, keys)
- end
-
- # def instate(spec, cmd=Proc.new)
- # tk_send('instate', spec, cmd)
- # end
- # def state(spec=None)
- # tk_send('state', spec)
- # end
-
- def move(item, parent, idx)
- tk_send('move', item, parent, idx)
- self
- end
-
- def next_item(item)
- id = tk_send('next', item)
- (id.empty?)? nil: Tk::Tile::Treeview::Item.id2obj(self, id)
- end
-
- def parent_item(item)
- if (id = tk_send('parent', item)).empty?
- Tk::Tile::Treeview::Root.new(self)
- else
- Tk::Tile::Treeview::Item.id2obj(self, id)
- end
- end
-
- def prev_item(item)
- id = tk_send('prev', item)
- (id.empty?)? nil: Tk::Tile::Treeview::Item.id2obj(self, id)
- end
-
- def see(item)
- tk_send('see', item)
- self
- end
-
- def selection
- simplelist(tk_send('selection')).collect{|id|
- Tk::Tile::Treeview::Item.id2obj(self, id)
- }
- end
- alias selection_get selection
-
- def selection_add(*items)
- tk_send('selection', 'add', array2tk_list(items.flatten, true))
- self
- end
- def selection_remove(*items)
- tk_send('selection', 'remove', array2tk_list(items.flatten, true))
- self
- end
- def selection_set(*items)
- tk_send('selection', 'set', array2tk_list(items.flatten, true))
- self
- end
- def selection_toggle(*items)
- tk_send('selection', 'toggle', array2tk_list(items.flatten, true))
- self
- end
-
- def get_directory(item)
- # tile-0.7+
- ret = []
- lst = simplelist(tk_send('set', item))
- until lst.empty?
- col = lst.shift
- val = lst.shift
- ret << [col, val]
- end
- ret
- end
- alias get_dictionary get_directory
-
- def get(item, col)
- tk_send('set', item, col)
- end
- def set(item, col, value)
- tk_send('set', item, col, value)
- self
- end
-
- def tag_has?(tag, item)
- bool(tk_send('tag', 'has', tagid(tag), tagid(item)))
- end
- def tag_has(tag)
- tk_split_simplelist(tk_send('tag', 'has', tagid(tag))).collect{|id|
- Tk::Tile::Treeview::Item.id2obj(self, id)
- }
- end
-
- def tag_bind(tag, seq, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
- self
- end
- alias tagbind tag_bind
-
- def tag_bind_append(tag, seq, *args)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
- self
- end
- alias tagbind_append tag_bind_append
-
- def tag_bind_remove(tag, seq)
- _bind_remove([@path, 'tag', 'bind', tag], seq)
- self
- end
- alias tagbind_remove tag_bind_remove
-
- def tag_bindinfo(tag, context=nil)
- _bindinfo([@path, 'tag', 'bind', tag], context)
- end
- alias tagbindinfo tag_bindinfo
-
- def tag_names
- tk_split_simplelist(tk_send('tag', 'names')).collect{|id|
- Tk::Tile::Treeview::Tag.id2obj(self, id)
- }
- end
-
- def tag_add(tag, *items)
- fail ArgumentError, "no target items" if items.empty?
- tk_send('tag', 'add', tagid(tag), *(items.collect{|item| tagid(item)}))
- self
- end
-
- def tag_remove(tag, *items)
- tk_send('tag', 'remove', tagid(tag), *(items.collect{|item| tagid(item)}))
- self
- end
-
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Treeview, :TkTreeview)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/treeview.rb',
- :Ttk, Tk::Tile::Treeview, :TkTreeview)
diff --git a/ext/tk/lib/tkextlib/tile/tscale.rb b/ext/tk/lib/tkextlib/tile/tscale.rb
deleted file mode 100644
index 446344ecea..0000000000
--- a/ext/tk/lib/tkextlib/tile/tscale.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: false
-#
-# tscale & tprogress widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TScale < Tk::Scale
- end
- Scale = TScale
-
- class TProgress < TScale
- end
- Progress = TProgress
- end
-end
-
-class Tk::Tile::TScale < Tk::Scale
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::scale'.freeze].freeze
- else
- TkCommandNames = ['::tscale'.freeze].freeze
- end
- WidgetClassName = 'TScale'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-
- alias identify ttk_identify
-end
-
-class Tk::Tile::TProgress < Tk::Tile::TScale
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::progress'.freeze].freeze
- else
- TkCommandNames = ['::tprogress'.freeze].freeze
- end
- WidgetClassName = 'TProgress'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Scale, :TkScale)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tscale.rb',
- :Ttk, Tk::Tile::Scale, :TkScale)
diff --git a/ext/tk/lib/tkextlib/tile/tscrollbar.rb b/ext/tk/lib/tkextlib/tile/tscrollbar.rb
deleted file mode 100644
index 621ca48efb..0000000000
--- a/ext/tk/lib/tkextlib/tile/tscrollbar.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-# frozen_string_literal: false
-#
-# tscrollbar widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TScrollbar < Tk::Scrollbar
- end
- Scrollbar = TScrollbar
- end
-end
-
-class Tk::Tile::TScrollbar < Tk::Scrollbar
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::scrollbar'.freeze].freeze
- else
- TkCommandNames = ['::tscrollbar'.freeze].freeze
- end
- WidgetClassName = 'TScrollbar'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-
- alias identify ttk_identify
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Scrollbar, :TkScrollbar)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tscrollbar.rb',
- :Ttk, Tk::Tile::Scrollbar, :TkScrollbar)
-
-#######################################################################
-
-class Tk::Tile::XScrollbar < Tk::Tile::TScrollbar
- def create_self(keys)
- keys = {} unless keys
- keys['orient'] = 'horizontal'
- super(keys)
- end
- private :create_self
-end
-
-class Tk::Tile::YScrollbar < Tk::Tile::TScrollbar
- def create_self(keys)
- keys = {} unless keys
- keys['orient'] = 'vertical'
- super(keys)
- end
- private :create_self
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::XScrollbar, :TkXScrollbar)
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::YScrollbar, :TkYScrollbar)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tscrollbar.rb',
- :Ttk, Tk::Tile::XScrollbar, :TkXScrollbar)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tscrollbar.rb',
- :Ttk, Tk::Tile::YScrollbar, :TkYScrollbar)
diff --git a/ext/tk/lib/tkextlib/tile/tseparator.rb b/ext/tk/lib/tkextlib/tile/tseparator.rb
deleted file mode 100644
index d4a90e56db..0000000000
--- a/ext/tk/lib/tkextlib/tile/tseparator.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: false
-#
-# tseparator widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TSeparator < TkWindow
- end
- Separator = TSeparator
- end
-end
-
-class Tk::Tile::TSeparator < TkWindow
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::separator'.freeze].freeze
- else
- TkCommandNames = ['::tseparator'.freeze].freeze
- end
- WidgetClassName = 'TSeparator'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Separator, :TkSeparator)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tseparator.rb',
- :Ttk, Tk::Tile::Separator, :TkSeparator)
diff --git a/ext/tk/lib/tkextlib/tile/tspinbox.rb b/ext/tk/lib/tkextlib/tile/tspinbox.rb
deleted file mode 100644
index 47d822e68c..0000000000
--- a/ext/tk/lib/tkextlib/tile/tspinbox.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-# frozen_string_literal: false
-#
-# ttk::spinbox widget (Tcl/Tk 8.6b1 or later)
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TSpinbox < Tk::Tile::TEntry
- end
- Spinbox = TSpinbox
- end
-end
-
-class Tk::Tile::TSpinbox < Tk::Tile::TEntry
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::spinbox'.freeze].freeze
- else
- TkCommandNames = ['::tspinbox'.freeze].freeze
- end
- WidgetClassName = 'TSpinbox'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- class SpinCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?d, ?s, :direction ],
- [ ?s, ?e, :current ],
- [ ?W, ?w, :widget ],
- nil
- ]
-
- PROC_TBL = [
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
-
- [ ?e, proc{|val|
- #enc = Tk.encoding
- enc = ((Tk.encoding)? Tk.encoding : Tk.encoding_system)
- if enc
- Tk.fromUTF8(TkComm::string(val), enc)
- else
- TkComm::string(val)
- end
- }
- ],
-
- nil
- ]
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- (val)? '1': '0'
- end
- end
-
- def self._config_keys
- ['command']
- end
- end
-
- def __validation_class_list
- super() << SpinCommand
- end
-
- Tk::ValidateConfigure.__def_validcmd(binding, SpinCommand)
-
- def __boolval_optkeys
- super() << 'wrap'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'buttonbackground' << 'format'
- end
- private :__strval_optkeys
-
- def __listval_optkeys
- super() << 'values'
- end
- private :__listval_optkeys
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-
- def current
- number(tk_send_without_enc('current'))
- end
- def current=(idx)
- tk_send('current', idx)
- end
-
- def set(val)
- tk_send('set', val)
- end
-
- alias identify ttk_identify
-end
-
-#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Spinbox, :TkSpinbox)
-Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tspinbox.rb',
- :Ttk, Tk::Tile::Spinbox, :TkSpinbox)
diff --git a/ext/tk/lib/tkextlib/tile/tsquare.rb b/ext/tk/lib/tkextlib/tile/tsquare.rb
deleted file mode 100644
index 7412966708..0000000000
--- a/ext/tk/lib/tkextlib/tile/tsquare.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: false
-#
-# tsquare widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tkextlib/tile.rb'
-
-module Tk
- module Tile
- class TSquare < TkWindow
- end
- Square = TSquare
- end
-end
-
-class Tk::Tile::TSquare < TkWindow
- include Tk::Tile::TileWidget
-
- if Tk::Tile::USE_TTK_NAMESPACE
- TkCommandNames = ['::ttk::square'.freeze].freeze
- else
- TkCommandNames = ['::tsquare'.freeze].freeze
- end
- WidgetClassName = 'TSquare'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def self.style(*args)
- [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkDND.rb b/ext/tk/lib/tkextlib/tkDND.rb
deleted file mode 100644
index c76c48d169..0000000000
--- a/ext/tk/lib/tkextlib/tkDND.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: false
-#
-# TkDND (Tk Drag & Drop Extension) support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkDND/setup.rb'
-
-module Tk
- module TkDND
- autoload :DND, 'tkextlib/tkDND/tkdnd'
- autoload :Shape, 'tkextlib/tkDND/shape'
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkDND/setup.rb b/ext/tk/lib/tkextlib/tkDND/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/tkDND/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/tkDND/shape.rb b/ext/tk/lib/tkextlib/tkDND/shape.rb
deleted file mode 100644
index 06d8d64ac7..0000000000
--- a/ext/tk/lib/tkextlib/tkDND/shape.rb
+++ /dev/null
@@ -1,126 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tkDND/shape.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkDND/setup.rb'
-
-# TkPackage.require('Shape', '0.3')
-TkPackage.require('Shape')
-
-module Tk
- module TkDND
- module Shape
- extend TkCore
-
- PACKAGE_NAME = 'Shape'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
-=begin
- def self.package_version
- begin
- TkPackage.require('Shape')
- rescue
- ''
- end
- end
-=end
- class << self
- def package_version
- Tk.tk_call('set', 'shape_version')
- end
- alias shape_version package_version
-
- def package_patchlevel
- Tk.tk_call('set', 'shape_patchLevel')
- end
- alias shape_patchlevel package_patchlevel
-
- def version
- tk_call('shape', 'version')
- end
- alias xshape_version version
- end
-
- ############################
-
- def shape_bounds(kind=nil)
- if kind
- ret = tk_call('shape', 'bounds', @path, "-#{kind}")
- else
- ret = tk_call('shape', 'bounds', @path)
- end
- if ret == ""
- nil
- else
- list(ret)
- end
- end
-
- def shape_get(kind=nil)
- if kind
- list(tk_call('shape', 'get', @path, "-#{kind}"))
- else
- list(tk_call('shape', 'get', @path))
- end
- end
-
- def shape_offset(x, y, kind=nil)
- if kind
- tk_call('shape', 'get', @path, "-#{kind}", x, y)
- else
- tk_call('shape', 'get', @path, x, y)
- end
- self
- end
-
- def _parse_shapespec_param(args)
- cmd = []
-
- kind_keys = ['bounding', 'clip', 'both']
- offset_keys = ['offset']
- srckind_keys = ['bitmap', 'rectangles', 'reset', 'test', 'window']
-
- cmd << "-#{args.shift}" if kind_keys.member?(args[0].to_s)
-
- if offset_keys.member?(args[0].to_s)
- cmd << "-#{args.shift}"
- cmd << args.shift # xOffset
- cmd << args.shift # yOffset
- end
-
- if srckind_keys.member?(args[0].to_s)
- cmd << "-#{args.shift}"
- end
-
- cmd.concat(args)
-
- cmd
- end
- private :_parse_shapespec_param
-
- def shape_set(*args) # ?kind? ?offset <x> <y>? srckind ?arg ...?
- tk_call('shape', 'set', @path, *(_parse_shapespec_param(args)))
- self
- end
-
- def shape_update(op, *args) # ?kind? ?offset <x> <y>? srckind ?arg ...?
- tk_call('shape', 'update', @path, op, *(_parse_shapespec_param(args)))
- self
- end
- end
- end
-end
-
-class TkWindow
- include Tk::TkDND::Shape
-end
diff --git a/ext/tk/lib/tkextlib/tkDND/tkdnd.rb b/ext/tk/lib/tkextlib/tkDND/tkdnd.rb
deleted file mode 100644
index c2059b7c23..0000000000
--- a/ext/tk/lib/tkextlib/tkDND/tkdnd.rb
+++ /dev/null
@@ -1,183 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tkDND/tkdnd.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkDND/setup.rb'
-
-TkPackage.require('tkdnd')
-
-module Tk
- module TkDND
- PACKAGE_NAME = 'tkdnd'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('tkdnd')
- rescue
- ''
- end
- end
-
- class DND_Subst < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?a, ?l, :actions ],
- [ ?A, ?s, :action ],
- [ ?b, ?L, :codes ],
- [ ?c, ?s, :code ],
- [ ?d, ?l, :descriptions ],
- [ ?D, ?l, :data ],
- [ ?L, ?l, :source_types ],
- [ ?m, ?l, :modifiers ],
- [ ?t, ?l, :types ],
- [ ?T, ?s, :type ],
- [ ?W, ?w, :widget ],
- [ ?x, ?n, :x ],
- [ ?X, ?n, :x_root ],
- [ ?y, ?n, :y ],
- [ ?Y, ?n, :y_root ],
- nil
- ]
-
- PROC_TBL = [
- [ ?n, TkComm.method(:num_or_str) ],
- [ ?s, TkComm.method(:string) ],
- [ ?l, TkComm.method(:list) ],
- [ ?L, TkComm.method(:simplelist) ],
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- # setup tables
- _setup_subst_table(KEY_TBL, PROC_TBL);
- end
-
- module DND
- def self.version
- begin
- TkPackage.require('tkdnd')
- rescue
- ''
- end
- end
-
- def dnd_bindtarget_info(type=nil, event=nil)
- if event
- procedure(tk_call('dnd', 'bindtarget', @path, type, event))
- elsif type
- procedure(tk_call('dnd', 'bindtarget', @path, type))
- else
- simplelist(tk_call('dnd', 'bindtarget', @path))
- end
- end
-
- #def dnd_bindtarget(type, event, cmd=Proc.new, prior=50, *args)
- # event = tk_event_sequence(event)
- # if prior.kind_of?(Numeric)
- # tk_call('dnd', 'bindtarget', @path, type, event,
- # install_bind_for_event_class(DND_Subst, cmd, *args),
- # prior)
- # else
- # tk_call('dnd', 'bindtarget', @path, type, event,
- # install_bind_for_event_class(DND_Subst, cmd, prior, *args))
- # end
- # self
- #end
- def dnd_bindtarget(type, event, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
-
- prior = 50
- prior = args.shift unless args.empty?
-
- event = tk_event_sequence(event)
- if prior.kind_of?(Numeric)
- tk_call('dnd', 'bindtarget', @path, type, event,
- install_bind_for_event_class(DND_Subst, cmd, *args),
- prior)
- else
- tk_call('dnd', 'bindtarget', @path, type, event,
- install_bind_for_event_class(DND_Subst, cmd, prior, *args))
- end
- self
- end
-
- def dnd_cleartarget
- tk_call('dnd', 'cleartarget', @path)
- self
- end
-
- def dnd_bindsource_info(type=nil)
- if type
- procedure(tk_call('dnd', 'bindsource', @path, type))
- else
- simplelist(tk_call('dnd', 'bindsource', @path))
- end
- end
-
- #def dnd_bindsource(type, cmd=Proc.new, prior=None)
- # tk_call('dnd', 'bindsource', @path, type, cmd, prior)
- # self
- #end
- def dnd_bindsource(type, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
-
- args = [TkComm::None] if args.empty?
-
- tk_call('dnd', 'bindsource', @path, type, cmd, *args)
- self
- end
-
- def dnd_clearsource()
- tk_call('dnd', 'clearsource', @path)
- self
- end
-
- def dnd_drag(keys=nil)
- tk_call('dnd', 'drag', @path, *hash_kv(keys))
- self
- end
- end
- end
-end
-
-class TkWindow
- include Tk::TkDND::DND
-end
diff --git a/ext/tk/lib/tkextlib/tkHTML.rb b/ext/tk/lib/tkextlib/tkHTML.rb
deleted file mode 100644
index d64e676024..0000000000
--- a/ext/tk/lib/tkextlib/tkHTML.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-#
-# TkHtml support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkHTML/setup.rb'
-
-# load library
-require 'tkextlib/tkHTML/htmlwidget'
diff --git a/ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb b/ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb
deleted file mode 100644
index 362c381830..0000000000
--- a/ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb
+++ /dev/null
@@ -1,454 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tkHTML/htmlwidget.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkHTML/setup.rb'
-
-# TkPackage.require('Tkhtml', '2.0')
-TkPackage.require('Tkhtml')
-
-module Tk
- class HTML_Widget < TkWindow
- PACKAGE_NAME = 'Tkhtml'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('Tkhtml')
- rescue
- ''
- end
- end
-
- class ClippingWindow < TkWindow
- end
- end
-end
-
-class Tk::HTML_Widget::ClippingWindow
- WidgetClassName = 'HtmlClip'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- HtmlClip_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- HtmlClip_TBL.mutex.synchronize{ HtmlClip_TBL.clear }
- }
-
- def self.new(parent, keys={})
- if parent.kind_of?(Hash)
- keys = TkComm._symbolkey2str(parent)
- parent = keys.delete('parent')
- end
-
- if parent.kind_of?(String)
- ppath = parent.path
- elsif parent
- ppath = parent
- else
- ppath = ''
- end
- HtmlClip_TBL.mutex.synchronize{
- return HtmlClip_TBL[ppath] if HtmlClip_TBL[ppath]
- }
-
- widgetname = keys.delete('widgetname')
- if widgetname =~ /^(.*)\.[^.]+$/
- ppath2 = $1
- if ppath2[0] != ?.
- ppath2 = ppath + '.' + ppath2
- end
- HtmlClip_TBL.mutex.synchronize{
- return HtmlClip_TBL[ppath2] if HtmlClip_TBL[ppath2]
- }
-
- ppath = ppath2
- end
-
- parent = TkComm._genobj_for_tkwidget(ppath)
- unless parent.kind_of?(Tk::HTML_Widget)
- fail ArgumentError, "parent must be a Tk::HTML_Widget instance"
- end
-
- super(parent)
- end
-
- def initialize(parent)
- @parent = parent
- @ppath = parent.path
- @path = @id = @ppath + '.x'
- HtmlClip_TBL.mutex.synchronize{
- HtmlClip_TBL[@ppath] = self
- }
- end
-
- def method_missing(m, *args, &b)
- @parent.__send__(m, *args, &b)
- end
-end
-
-class Tk::HTML_Widget
- include Scrollable
-
- TkCommandNames = ['html'.freeze].freeze
- WidgetClassName = 'Html'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- def __strval_optkeys
- super() << 'base' << 'selectioncolor' << 'unvisitedcolor' << 'visitedcolor'
- end
- private :__strval_optkeys
-
- ###################################
- # class methods
- ###################################
- def self.reformat(src, dst, txt)
- tk_call('html', 'reformat', src, dst, txt)
- end
-
- def self.url_join(*args) # args := sheme authority path query fragment
- tk_call('html', 'urljoin', *args)
- end
-
- def self.url_split(uri)
- tk_call('html', 'urlsplit', uri)
- end
-
- def self.lockcopy(src, dst)
- tk_call('html', 'lockcopy', src, dst)
- end
-
- def self.gzip_file(file, dat)
- tk_call('html', 'gzip', 'file', file, dat)
- end
-
- def self.gunzip_file(file, dat)
- tk_call('html', 'gunzip', 'file', filet)
- end
-
- def self.gzip_data(dat)
- tk_call('html', 'gzip', 'data', file, dat)
- end
-
- def self.gunzip_data(dat)
- tk_call('html', 'gunzip', 'data', filet)
- end
-
- def self.base64_encode(dat)
- tk_call('html', 'base64', 'encode', dat)
- end
-
- def self.base64_decode(dat)
- tk_call('html', 'base64', 'encode', dat)
- end
-
- def self.text_format(dat, len)
- tk_call('html', 'text', 'format', dat, len)
- end
-
- def self.xor(cmd, *args)
- tk_call('html', 'xor', cmd, *args)
- end
-
- def self.stdchan(cmd, channel)
- tk_call('html', 'stdchan', cmd, channel)
- end
-
- def self.crc32(data)
- tk_call('html', 'crc32', data)
- end
-
- ###################################
- # instance methods
- ###################################
- def clipping_window
- ClippingWindow.new(self)
- end
- alias clipwin clipping_window
- alias htmlclip clipping_window
-
- def bgimage(image, tid=None)
- tk_send('bgimage', image, tid)
- self
- end
-
- def clear()
- tk_send('clear')
- self
- end
-
- def coords(index=None, percent=None)
- tk_send('coords', index, percent)
- end
-
- def forminfo(*args)
- tk_send('forminfo', *args)
- end
- alias form_info forminfo
-
- def href(x, y)
- simplelist(tk_send('href', x, y))
- end
-
- def image_add(id, img)
- tk_send('imageadd', id, img)
- self
- end
-
- def image_at(x, y)
- tk_send('imageat', x, y)
- end
-
- def images()
- list(tk_send('images'))
- end
-
- def image_set(id, num)
- tk_send('imageset', id, num)
- self
- end
-
- def image_update(id, imgs)
- tk_send('imageupdate', id, imgs)
- self
- end
-
- def index(idx, count=None, unit=None)
- tk_send('index', idx, count, unit)
- end
-
- def insert_cursor(idx)
- tk_send('insert', idx)
- end
-
- def names()
- simple_list(tk_send('names'))
- end
-
- def on_screen(id, x, y)
- bool(tk_send('onscreen', id, x, y))
- end
-
- def over(x, y)
- list(tk_send('over', x, y))
- end
-
- def over_markup(x, y)
- list(tk_send('over', x, y, '-muponly'))
- end
-
- def over_attr(x, y, attrs)
- list(tk_send('overattr', x, y, attrs))
- end
-
- def parse(txt)
- tk_send('parse', txt)
- self
- end
-
- def resolver(*uri_args)
- tk_send('resolver', *uri_args)
- end
-
- def selection_clear()
- tk_send('selection', 'clear')
- self
- end
-
- def selection_set(first, last)
- tk_send('selection', 'set', first, last)
- self
- end
-
- def refresh(*opts)
- tk_send('refresh', *opts)
- end
-
- def layout()
- tk_send('layout')
- end
-
- def sizewindow(*args)
- tk_send('sizewindow', *args)
- end
-
- def postscript(*args)
- tk_send('postscript', *args)
- end
-
- def source()
- tk_send('source')
- end
-
- def plain_text(first, last)
- tk_send('text', 'ascii', first, last)
- end
- alias ascii_text plain_text
- alias text_ascii plain_text
-
- def text_delete(first, last)
- tk_send('text', 'delete', first, last)
- self
- end
-
- def html_text(first, last)
- tk_send('text', 'html', first, last)
- end
- alias text_html html_text
-
- def text_insert(idx, txt)
- tk_send('text', 'insert', idx, txt)
- self
- end
-
- def break_text(idx)
- tk_send('text', 'break', idx)
- end
- alias text_break break_text
-
- def text_find(txt, *args)
- tk_send('text', 'find', txt, *args)
- end
-
- def text_table(idx, imgs=None, attrs=None)
- tk_send('text', 'table', idx, imgs, attrs)
- end
-
- def token_append(tag, *args)
- tk_send('token', 'append', tag, *args)
- self
- end
-
- def token_delete(first, last=None)
- tk_send('token', 'delete', first, last)
- self
- end
-
- def token_define(*args)
- tk_send('token', 'defile', *args)
- self
- end
-
- def token_find(tag, *args)
- list(tk_send('token', 'find', tag, *args))
- end
-
- def token_get(first, last=None)
- list(tk_send('token', 'get', first, last))
- end
-
- def token_list(first, last=None)
- list(tk_send('token', 'list', first, last))
- end
-
- def token_markup(first, last=None)
- list(tk_send('token', 'markup', first, last))
- end
-
- def token_DOM(first, last=None)
- list(tk_send('token', 'domtokens', first, last))
- end
- alias token_dom token_DOM
- alias token_domtokens token_DOM
- alias token_dom_tokens token_DOM
-
- def token_get_end(idx)
- tk_send('token', 'getend', idx)
- end
- alias token_getend token_get_end
-
- def token_offset(start, num1, num2)
- list(tk_send('token', 'offset', start, num1, num2))
- end
-
- def token_get_attr(idx, name=None)
- list(tk_send('token', 'attr', idx, name))
- end
-
- def token_set_attr(idx, name=None, val=None)
- tk_send('token', 'attr', idx, name, val)
- self
- end
-
- def token_handler(tag, cmd=nil, &b)
- cmd = Proc.new(&b) if !cmd && b
- if cmd
- tk_send('token', 'handler', tag, cmd)
- return self
- else
- return tk_send('token', 'handler', tag)
- end
- end
-
- def token_insert(idx, tag, *args)
- tk_send('token', 'insert', idx, tag, *args)
- self
- end
-
- def token_attrs(*args)
- list(tk_send('token', 'attrs', *args))
- end
-
- def token_unique(*args)
- list(tk_send('token', 'unique', *args))
- end
-
- def token_on_events(*args)
- list(tk_send('token', 'onEvents', *args))
- end
-
- def dom_nameidx(tag, name)
- number(tk_send('dom', 'nameidx', tag, name))
- end
- alias dom_name_index dom_nameidx
-
- def dom_radioidx(tag, name)
- number(tk_send('dom', 'radioidx', tag, name))
- end
- alias dom_radio_index dom_radioidx
-
- def dom_id(*spec)
- tk_send('dom', 'id', *spec)
- end
-
- def dom_ids(*spec)
- list(tk_send('dom', 'ids', *spec))
- end
-
- def dom_value(*spec)
- list(tk_send('dom', 'value', *spec))
- end
-
- def dom_attr(idx)
- tk_send('dom', 'attr', idx)
- end
-
- def dom_formel(name)
- tk_send('dom', 'formel', name)
- end
- alias dom_form_element dom_formel
-
- def dom_tree(idx, val)
- list(tk_send('dom', 'tree', idx, val))
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkHTML/setup.rb b/ext/tk/lib/tkextlib/tkHTML/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/tkHTML/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/tkimg.rb b/ext/tk/lib/tkextlib/tkimg.rb
deleted file mode 100644
index de4b7212c3..0000000000
--- a/ext/tk/lib/tkextlib/tkimg.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg extension support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# load all image format handlers
-#TkPackage.require('Img', '1.3')
-TkPackage.require('Img')
-
-module Tk
- module Img
- PACKAGE_NAME = 'Img'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('Img')
- rescue
- ''
- end
- end
- end
-end
-
-# autoload
-autoload :TkPixmapImage, 'tkextlib/tkimg/pixmap'
diff --git a/ext/tk/lib/tkextlib/tkimg/README b/ext/tk/lib/tkextlib/tkimg/README
deleted file mode 100644
index f5981cb98c..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/README
+++ /dev/null
@@ -1,26 +0,0 @@
-
- [ Tcl/Tk Image formats (TkImg) support ]
-
-TkImg contains a collection of format handlers for the Tk photo
-image type, and a new image type, pixmaps.
-
-Supported formats of TkImg version 1.3 are
--------------------------------------------------------
- bmp : Windows Bitmap Format
- gif : Graphics Interchange Format
- ico : Windows Icon Format
- jpeg : Joint Picture Expert Group format
- pcx : Paintbrush Format
- pixmap : Pixmap Image type
- png : Portable Network Graphics format
- ppm : Portable Pixmap format
- ps : Adobe PostScript Format
- sgi : SGI Native Format
- sun : Sun Raster Format
- tga : Truevision Targa Format
- tiff : Tagged Image File Format
- window : Tk Windows
- xbm : X Window Bitmap Format
- xpm : X Window Pixmap Format
--------------------------------------------------------
-
diff --git a/ext/tk/lib/tkextlib/tkimg/bmp.rb b/ext/tk/lib/tkextlib/tkimg/bmp.rb
deleted file mode 100644
index 48a3b7ef5f..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/bmp.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'bmp'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-#TkPackage.require('img::bmp', '1.3')
-TkPackage.require('img::bmp')
-
-module Tk
- module Img
- module BMP
- PACKAGE_NAME = 'img::bmp'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::bmp')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/dted.rb b/ext/tk/lib/tkextlib/tkimg/dted.rb
deleted file mode 100644
index 30c595c1b6..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/dted.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'DTED'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::dted', '1.4')
-TkPackage.require('img::dted')
-
-module Tk
- module Img
- module DTED
- PACKAGE_NAME = 'img::dted'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::dted')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/gif.rb b/ext/tk/lib/tkextlib/tkimg/gif.rb
deleted file mode 100644
index ce5f3e94ec..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/gif.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'gif'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::gif', '1.3')
-TkPackage.require('img::gif')
-
-module Tk
- module Img
- module GIF
- PACKAGE_NAME = 'img::gif'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::gif')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/ico.rb b/ext/tk/lib/tkextlib/tkimg/ico.rb
deleted file mode 100644
index 80656005f0..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/ico.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'ico'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::ico', '1.3')
-TkPackage.require('img::ico')
-
-module Tk
- module Img
- module ICO
- PACKAGE_NAME = 'img::ico'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::ico')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/jpeg.rb b/ext/tk/lib/tkextlib/tkimg/jpeg.rb
deleted file mode 100644
index 24e11a84de..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/jpeg.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'jpeg'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::jpeg', '1.3')
-TkPackage.require('img::jpeg')
-
-module Tk
- module Img
- module JPEG
- PACKAGE_NAME = 'img::jpeg'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::jpeg')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/pcx.rb b/ext/tk/lib/tkextlib/tkimg/pcx.rb
deleted file mode 100644
index 942d585120..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/pcx.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'pcx'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::pcx', '1.3')
-TkPackage.require('img::pcx')
-
-module Tk
- module Img
- module PCX
- PACKAGE_NAME = 'img::pcx'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::pcx')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/pixmap.rb b/ext/tk/lib/tkextlib/tkimg/pixmap.rb
deleted file mode 100644
index b90468a108..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/pixmap.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'pixmap'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::pixmap', '1.3')
-TkPackage.require('img::pixmap')
-
-module Tk
- module Img
- module PIXMAP
- PACKAGE_NAME = 'img::pixmap'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::pixmap')
- rescue
- ''
- end
- end
- end
- end
-end
-
-class TkPixmapImage<TkImage
- def self.version
- Tk::Img::PIXMAP.version
- end
-
- def initialize(*args)
- @type = 'pixmap'
- super(*args)
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/png.rb b/ext/tk/lib/tkextlib/tkimg/png.rb
deleted file mode 100644
index 76f7329772..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/png.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'png'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::png', '1.3')
-TkPackage.require('img::png')
-
-module Tk
- module Img
- module PNG
- PACKAGE_NAME = 'img::png'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::png')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/ppm.rb b/ext/tk/lib/tkextlib/tkimg/ppm.rb
deleted file mode 100644
index a6b705e6ad..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/ppm.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'ppm'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::ppm', '1.3')
-TkPackage.require('img::ppm')
-
-module Tk
- module Img
- module PPM
- PACKAGE_NAME = 'img::ppm'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::ppm')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/ps.rb b/ext/tk/lib/tkextlib/tkimg/ps.rb
deleted file mode 100644
index 2a450ed157..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/ps.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'ps'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::ps', '1.3')
-TkPackage.require('img::ps')
-
-module Tk
- module Img
- module PS
- PACKAGE_NAME = 'img::ps'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::ps')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/raw.rb b/ext/tk/lib/tkextlib/tkimg/raw.rb
deleted file mode 100644
index 2eddbbc43a..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/raw.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'Raw Data'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::raw', '1.4')
-TkPackage.require('img::raw')
-
-module Tk
- module Img
- module Raw
- PACKAGE_NAME = 'img::raw'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::raw')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/setup.rb b/ext/tk/lib/tkextlib/tkimg/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/tkimg/sgi.rb b/ext/tk/lib/tkextlib/tkimg/sgi.rb
deleted file mode 100644
index 73a5bce0ac..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/sgi.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'sgi'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::sgi', '1.3')
-TkPackage.require('img::sgi')
-
-module Tk
- module Img
- module SGI
- PACKAGE_NAME = 'img::sgi'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::sgi')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/sun.rb b/ext/tk/lib/tkextlib/tkimg/sun.rb
deleted file mode 100644
index bd1ac0e577..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/sun.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'sun'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::sun', '1.3')
-TkPackage.require('img::sun')
-
-module Tk
- module Img
- module SUN
- PACKAGE_NAME = 'img::sun'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::sun')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/tga.rb b/ext/tk/lib/tkextlib/tkimg/tga.rb
deleted file mode 100644
index 1dd499b953..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/tga.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'tga'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::tga', '1.3')
-TkPackage.require('img::tga')
-
-module Tk
- module Img
- module TGA
- PACKAGE_NAME = 'img::tga'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::tga')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/tiff.rb b/ext/tk/lib/tkextlib/tkimg/tiff.rb
deleted file mode 100644
index a2d1d8fcc5..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/tiff.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'tiff'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::tiff', '1.3')
-TkPackage.require('img::tiff')
-
-module Tk
- module Img
- module TIFF
- PACKAGE_NAME = 'img::tiff'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::tiff')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/window.rb b/ext/tk/lib/tkextlib/tkimg/window.rb
deleted file mode 100644
index 346f246aa4..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/window.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'window'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::window', '1.3')
-TkPackage.require('img::window')
-
-module Tk
- module Img
- module WINDOW
- PACKAGE_NAME = 'img::window'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::window')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/xbm.rb b/ext/tk/lib/tkextlib/tkimg/xbm.rb
deleted file mode 100644
index 0a4deffdd7..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/xbm.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'xbm'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::xbm', '1.3')
-TkPackage.require('img::xbm')
-
-module Tk
- module Img
- module XBM
- PACKAGE_NAME = 'img::xbm'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::xbm')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tkimg/xpm.rb b/ext/tk/lib/tkextlib/tkimg/xpm.rb
deleted file mode 100644
index 7708b9d427..0000000000
--- a/ext/tk/lib/tkextlib/tkimg/xpm.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: false
-#
-# TkImg - format 'xpm'
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tkimg/setup.rb'
-
-# TkPackage.require('img::xpm', '1.3')
-TkPackage.require('img::xpm')
-
-module Tk
- module Img
- module XPM
- PACKAGE_NAME = 'img::xpm'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('img::xpm')
- rescue
- ''
- end
- end
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/tktable.rb b/ext/tk/lib/tkextlib/tktable.rb
deleted file mode 100644
index a957294db0..0000000000
--- a/ext/tk/lib/tkextlib/tktable.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: false
-#
-# TkTable support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tktable/setup.rb'
-
-# load library
-require 'tkextlib/tktable/tktable'
diff --git a/ext/tk/lib/tkextlib/tktable/setup.rb b/ext/tk/lib/tkextlib/tktable/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/tktable/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/tktable/tktable.rb b/ext/tk/lib/tkextlib/tktable/tktable.rb
deleted file mode 100644
index d8811a9676..0000000000
--- a/ext/tk/lib/tkextlib/tktable/tktable.rb
+++ /dev/null
@@ -1,967 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/tktable/tktable.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-require 'tk/validation'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tktable/setup.rb'
-
-# TkPackage.require('Tktable', '2.8')
-TkPackage.require('Tktable')
-
-module Tk
- class TkTable < TkWindow
- PACKAGE_NAME = 'Tktable'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('Tktable')
- rescue
- ''
- end
- end
-
- class CellTag < TkObject
- end
-
- module ConfigMethod
- end
- end
-end
-
-module Tk::TkTable::ConfigMethod
- include TkItemConfigMethod
-
- def __item_cget_cmd(id) # id := [ type, tagOrId ]
- [self.path, id[0], 'cget', id[1]]
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(id) # id := [ type, tagOrId ]
- [self.path, id[0], 'configure', id[1]]
- end
- private :__item_config_cmd
-
- def __item_pathname(id)
- if id.kind_of?(Array)
- id = tagid(id[1])
- end
- [self.path, id].join(';')
- end
- private :__item_pathname
-
- def __item_boolval_optkeys(id)
- super(id) << 'multiline' << 'showtext' << 'wrap'
- end
- private :__item_boolval_optkeys
-
- def __item_strval_optkeys(id)
- super(id) << 'ellipsis'
- end
- private :__item_strval_optkeys
-
- def __item_val2ruby_optkeys(id) # { key=>method, ... }
- super(id).update('window'=>proc{|k,v| window(v)})
- end
- private :__item_val2ruby_optkeys
-
- def tag_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['tag', tagid(tagOrId)], option)
- end
- def tag_cget(tagOrId, option)
- itemcget(['tag', tagid(tagOrId)], option)
- end
- def tag_cget_strict(tagOrId, option)
- itemcget_strict(['tag', tagid(tagOrId)], option)
- end
- def tag_configure(tagOrId, slot, value=None)
- itemconfigure(['tag', tagid(tagOrId)], slot, value)
- end
- def tag_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['tag', tagid(tagOrId)], slot)
- end
- def current_tag_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['tag', tagid(tagOrId)], slot)
- end
-
- def window_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['window', tagid(tagOrId)], option)
- end
- def window_cget(tagOrId, option)
- itemcget(['window', tagid(tagOrId)], option)
- end
- def window_cget_strict(tagOrId, option)
- itemcget_strict(['window', tagid(tagOrId)], option)
- end
- def window_configure(tagOrId, slot, value=None)
- if slot == :window || slot == 'window'
- value = _epath(value)
- elsif slot.kind_of?(Hash)
- if slot.key?(:window) || slot.key?('window')
- slot = _symbolkey2str(slot)
- slot['window'] = _epath(slot['window'])
- end
- end
- itemconfigure(['window', tagid(tagOrId)], slot, value)
- end
- def window_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['window', tagid(tagOrId)], slot)
- end
- def current_window_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['window', tagid(tagOrId)], slot)
- end
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-end
-
-#####################################################
-
-class Tk::TkTable::CellTag
- include TkTreatTagFont
-
- CellTagID_TBL = TkCore::INTERP.create_table
-
- (CellTag_ID = ['tktbl:celltag'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- CellTagID_TBL.mutex.synchronize{ CellTagID_TBL.clear }
- }
-
- def self.id2obj(table, id)
- tpath = table.path
- CellTagID_TBL.mutex.synchronize{
- if CellTagID_TBL[tpath]
- CellTagID_TBL[tpath][id]? CellTagID_TBL[tpath][id] : id
- else
- id
- end
- }
- end
-
- def initialize(parent, keys=nil)
- @parent = @t = parent
- @tpath - parent.path
- CellTag_ID.mutex.synchronize{
- @path = @id = CellTag_ID.join(TkCore::INTERP._ip_id_)
- CellTag_ID[1].succ!
- }
- CellTagID_TBL.mutex.synchronize{
- CellTagID_TBL[@tpath] = {} unless CellTagID_TBL[@tpath]
- CellTagID_TBL[@tpath][@id] = self
- }
- configure(keys) if keys
- end
-
- def id
- @id
- end
-
- def destroy
- tk_call(@tpath, 'tag', 'delete', @id)
- CellTagID_TBL.mutex.synchronize{
- CellTagID_TBL[@tpath].delete(@id) if CellTagID_TBL[@tpath]
- }
- self
- end
- alias delete destroy
-
- def exist?
- @t.tag_exist?(@id)
- end
- def include?(idx)
- @t.tag_include?(@id, idx)
- end
-
- def add_cell(*args)
- @t.tag_cell(@id, *args)
- end
- def add_col(*args)
- @t.tag_col(@id, *args)
- end
- def add_row(*args)
- @t.tag_row(@id, *args)
- end
-
- def raise(target=None)
- @t.tag_raise(@id, target)
- end
- def lower(target=None)
- @t.tag_lower(@id, target)
- end
-
- def cget_tkstring(key)
- @t.tag_cget_tkstring(@id, key)
- end
- def cget(key)
- @t.tag_cget(@id, key)
- end
- def cget_strict(key)
- @t.tag_cget_strict(@id, key)
- end
- def configure(key, val=None)
- @t.tag_configure(@id, key, val)
- end
- def configinfo(key=nil)
- @t.tag_configinfo(@id, key)
- end
- def current_configinfo(key=nil)
- @t.current_tag_configinfo(@id, key)
- end
-end
-
-class Tk::TkTable::NamedCellTag < Tk::TkTable::CellTag
- def self.new(parent, name, keys=nil)
- obj = nil
- CellTagID_TBL.mutex.synchronize{
- if CellTagID_TBL[parent.path] && CellTagID_TBL[parent.path][name]
- obj = CellTagID_TBL[parent.path][name]
- else
- #super(parent, name, keys)
- (obj = self.allocate).instance_eval{
- @parent = @t = parent
- @tpath = parent.path
- @path = @id = name
- CellTagID_TBL[@tpath] = {} unless CellTagID_TBL[@tpath]
- CellTagID_TBL[@tpath][@id] = self
- }
- end
- }
- obj.configure(keys) if keys && ! keys.empty?
- obj
- end
-
- def initialize(parent, name, keys=nil)
- # dummy:: not called by 'new' method
- @parent = @t = parent
- @tpath = parent.path
- @path = @id = name
- CellTagID_TBL.mutex.synchronize{
- CellTagID_TBL[@tpath] = {} unless CellTagID_TBL[@tpath]
- CellTagID_TBL[@tpath][@id] = self
- }
- configure(keys) if keys && ! keys.empty?
- end
-end
-
-#####################################################
-
-class Tk::TkTable
- TkCommandNames = ['table'.freeze].freeze
- WidgetClassName = 'Table'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- include Scrollable
- include Tk::TkTable::ConfigMethod
- include Tk::ValidateConfigure
-
- def __destroy_hook__
- Tk::TkTable::CelTag::CellTagID_TBL.mutex.synchronize{
- Tk::TkTable::CelTag::CellTagID_TBL.delete(@path)
- }
- end
-
- def __boolval_optkeys
- super() << 'autoclear' << 'flashmode' << 'invertselected' <<
- 'multiline' << 'selecttitle' << 'wrap'
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() << 'colseparator' << 'ellipsis' << 'rowseparator' << 'sparsearray'
- end
- private :__strval_optkeys
-
-
- #################################
-
- class BrowseCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?c, ?n, :column ],
- [ ?C, ?s, :index ],
- [ ?i, ?x, :cursor ],
- [ ?r, ?n, :row ],
- [ ?s, ?s, :last_index ],
- [ ?S, ?s, :new_index ],
- [ ?W, ?w, :widget ],
- nil
- ]
-
- PROC_TBL = [
- [ ?n, TkComm.method(:number) ],
- [ ?x, TkComm.method(:num_or_str) ],
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- ['browsecommand', 'browsecmd']
- end
- end
- #--------------------------------
- class CellCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?c, ?n, :column ],
- [ ?C, ?s, :index ],
- [ ?i, ?m, :rw_mode ],
- [ ?r, ?n, :row ],
- [ ?s, ?v, :value ],
- [ ?W, ?w, :widget ],
- nil
- ]
-
- PROC_TBL = [
- [ ?n, TkComm.method(:number) ],
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
- [ ?m, proc{|val| (val == '0')? (:r) : (:w)} ],
- [ ?v, proc{|val| TkComm.tk_tcl2ruby(val, true, false)} ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- TkComm._get_eval_string(val)
- end
- end
-
- def self._config_keys
- ['command']
- end
- end
- #--------------------------------
- class SelectionCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?c, ?n, :sel_columns ],
- [ ?C, ?s, :sel_area ],
- [ ?i, ?n, :total ],
- [ ?r, ?n, :sel_rows ],
- [ ?s, ?s, :value ],
- [ ?W, ?w, :widget ],
- nil
- ]
-
- PROC_TBL = [
- [ ?n, TkComm.method(:number) ],
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- val.to_s
- end
- end
-
- def self._config_keys
- ['selectioncommand', 'selcmd']
- end
- end
- #--------------------------------
- class ValidateCommand < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?c, ?n, :column ],
- [ ?C, ?s, :index ],
- [ ?i, ?x, :cursor ],
- [ ?r, ?n, :row ],
- [ ?s, ?v, :current_value ],
- [ ?S, ?v, :new_value ],
- [ ?W, ?w, :widget ],
- nil
- ]
-
- PROC_TBL = [
- [ ?n, TkComm.method(:number) ],
- [ ?x, TkComm.method(:num_or_str) ],
- [ ?s, TkComm.method(:string) ],
- [ ?w, TkComm.method(:window) ],
- [ ?v, proc{|val| TkComm.tk_tcl2ruby(val, true, false)} ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
- end
-
- def self._config_keys
- ['vcmd', 'validatecommand']
- end
- end
-
- #################################
-
- def __validation_class_list
- super() <<
- BrowseCommand << CellCommand << SelectionCommand << ValidateCommand
- end
-
- Tk::ValidateConfigure.__def_validcmd(binding, BrowseCommand)
- Tk::ValidateConfigure.__def_validcmd(binding, CellCommand)
- Tk::ValidateConfigure.__def_validcmd(binding, SelectionCommand)
- Tk::ValidateConfigure.__def_validcmd(binding, ValidateCommand)
-
- #################################
-
- def activate(idx)
- tk_send('activate', tagid(idx))
- end
-
- def bbox(idx)
- list(tk_send('bbox', tagid(idx)))
- end
-
- def border_mark(x, y)
- simplelist(tk_send('border', 'mark', x, y))
- end
- def border_mark_row(x, y)
- tk_send('border', 'mark', x, y, 'row')
- end
- def border_mark_col(x, y)
- tk_send('border', 'mark', x, y, 'col')
- end
- def border_dragto(x, y)
- tk_send('border', 'dragto', x, y)
- end
-
- def clear_cache(first=None, last=None)
- tk_send('clear', 'cache', tagid(first), tagid(last))
- self
- end
- def clear_sizes(first=None, last=None)
- tk_send('clear', 'sizes', tagid(first), tagid(last))
- self
- end
- def clear_tags(first=None, last=None)
- tk_send('clear', 'tags', tagid(first), tagid(last))
- self
- end
- def clear_all(first=None, last=None)
- tk_send('clear', 'all', tagid(first), tagid(last))
- self
- end
-
- def curselection
- simplelist(tk_send('curselection'))
- end
- def curselection=(val)
- tk_send('curselection', val)
- val
- end
-
- def curvalue
- tk_tcl2ruby(tk_send('curvalue'), true, false)
- end
- def curvalue=(val)
- tk_send('curvalue', val)
- val
- end
-
- def delete_active(idx1, idx2=None)
- tk_send('delete', 'active', tagid(idx1), tagid(idx2))
- self
- end
- def delete_cols(*args) # ?switches_array?, index, ?count?
- params = []
- if args[0].kind_of?(Array)
- switches = args.shift
- switches.each{|k| params << "-#{k}"}
- end
- params << '--'
- params << tagid(args.shift)
- params.concat(args)
- tk_send('delete', 'cols', *params)
- self
- end
- def delete_rows(*args) # ?switches_array?, index, ?count?
- params = []
- if args[0].kind_of?(Array)
- switches = args.shift
- switches.each{|k| params << "-#{k}"}
- end
- params << '--'
- params << tagid(args.shift)
- params.concat(args)
- tk_send('delete', 'rows', *params)
- self
- end
-
- def get(idx)
- tk_tcl2ruby(tk_send('get', tagid(idx)), true, false)
- end
- def get_area(idx1, idx2)
- simplelist(tk_send('get', tagid(idx1), tagid(idx2))).collect{|v|
- tk_tcl2ruby(v, true, false)
- }
- end
-
- def height_list
- list(tk_send('height'))
- end
- def height(row)
- number(tk_send('height', row))
- end
- def set_height(*pairs)
- tk_send('height', *(pairs.flatten))
- self
- end
-
- def hidden_list
- simplelist(tk_send('hidden'))
- end
- def hidden?(idx, *args)
- if args.empty?
- if (ret = tk_send('hidden', tagid(idx))) == ''
- false
- else
- ret
- end
- else
- bool(tk_send('hidden', tagid(idx), *(args.collect{|i| tagid(i)})))
- end
- end
-
- def icursor
- number(tk_send('icursor'))
- end
- def icursor_set(idx)
- number(tk_send('icursor', tagid(idx)))
- end
-
- def index(idx)
- tk_send('index', tagid(idx))
- end
- def row_index(idx)
- number(tk_send('index', tagid(idx), 'row'))
- end
- def col_index(idx)
- number(tk_send('index', tagid(idx), 'col'))
- end
-
- def insert_active(idx, val)
- tk_send('insert', 'active', tagid(idx), val)
- self
- end
- def insert_cols(*args) # ?switches_array?, index, ?count?
- params = []
- if args[0].kind_of?(Array)
- switches = args.shift
- switches.each{|k| params << "-#{k}"}
- end
- params << '--'
- params.concat(args)
- params << tagid(args.shift)
- tk_send('insert', 'cols', *params)
- self
- end
- def insert_rows(*args) # ?switches_array?, index, ?count?
- params = []
- if args[0].kind_of?(Array)
- switches = args.shift
- switches.each{|k| params << "-#{k}"}
- end
- params << '--'
- params << tagid(args.shift)
- params.concat(args)
- tk_send('insert', 'rows', *params)
- self
- end
-
- # def postscript(*args)
- # tk_send('postscript', *args)
- # end
-
- def reread
- tk_send('reread')
- self
- end
-
- def scan_mark(x, y)
- tk_send('scan', 'mark', x, y)
- self
- end
- def scan_dragto(x, y)
- tk_send('scan', 'dragto', x, y)
- self
- end
-
- def see(idx)
- tk_send('see', tagid(idx))
- self
- end
-
- def selection_anchor(idx)
- tk_send('selection', 'anchor', tagid(idx))
- self
- end
- def selection_clear(first, last=None)
- tk_send('selection', 'clear', tagid(first), tagid(last))
- self
- end
- def selection_clear_all
- selection_clear('all')
- end
- def selection_include?(idx)
- bool(tk_send('selection', 'includes', tagid(idx)))
- end
- def selection_present
- bool(tk_send('selection', 'present'))
- end
- def selection_set(first, last=None)
- tk_send('selection', 'set', tagid(first), tagid(last))
- self
- end
-
- def set(*pairs) # idx, val, idx, val, ...
- args = []
- 0.step(pairs.size-1, 2){|i|
- args << tagid(pairs[i])
- args << pairs[i+1]
- }
- tk_send('set', *args)
- self
- end
- def set_row(*pairs) # idx, val, idx, val, ...
- args = []
- 0.step(pairs.size-1, 2){|i|
- args << tagid(pairs[i])
- args << pairs[i+1]
- }
- tk_send('set', 'row', *args)
- self
- end
- def set_col(*pairs) # idx, val, idx, val, ...
- args = []
- 0.step(pairs.size-1, 2){|i|
- args << tagid(pairs[i])
- args << pairs[i+1]
- }
- tk_send('set', 'col', *args)
- self
- end
-=begin
- def set(*pairs) # idx, val, idx, val, ... OR [idx, val], [idx, val], ...
- if pairs[0].kind_of?(Array)
- # [idx, val], [idx, val], ...
- args = []
- pairs.each{|idx, val| args << tagid(idx) << val }
- tk_send('set', *args)
- else
- # idx, val, idx, val, ...
- args = []
- 0.step(pairs.size-1, 2){|i|
- args << tagid(pairs[i])
- args << pairs[i+1]
- }
- tk_send('set', *args)
- end
- self
- end
- def set_row(*pairs)
- if pairs[0].kind_of?(Array)
- # [idx, val], [idx, val], ...
- args = []
- pairs.each{|idx, val| args << tagid(idx) << val }
- tk_send('set', 'row', *args)
- else
- # idx, val, idx, val, ...
- args = []
- 0.step(pairs.size-1, 2){|i|
- args << tagid(pairs[i])
- args << pairs[i+1]
- }
- tk_send('set', 'row', *args)
- end
- self
- end
- def set_col(*pairs)
- if pairs[0].kind_of?(Array)
- # [idx, val], [idx, val], ...
- args = []
- pairs.each{|idx, val| args << idx << val }
- tk_send('set', 'col', *args)
- else
- # idx, val, idx, val, ...
- args = []
- 0.step(pairs.size-1, 2){|i|
- args << tagid(pairs[i])
- args << pairs[i+1]
- }
- tk_send('set', 'col', *args)
- end
- self
- end
-=end
-
- def spans
- simplelist(tk_send('spans')).collect{|inf|
- lst = simplelist(inf)
- idx = lst[0]
- rows, cols = lst[1].split(',').map!{|n| Integer(n)}
- [idx [rows, cols]]
- }
- end
- alias span_list spans
- def span(idx)
- lst = simplelist(tk_send('spans', tagid(idx)))
- idx = lst[0]
- rows, cols = lst[1].split(',').map!{|n| Integer(n)}
- [idx [rows, cols]]
- end
- def set_spans(*pairs)
- # idx, val, idx, val, ...
- args = []
- 0.step(pairs.size-1, 2){|i|
- args << tagid(pairs[i])
- val = pairs[i+1]
- if val.kind_of?(Array)
- args << val.join(',')
- else
- args << val
- end
- }
- tk_send('spans', *args)
- self
- end
-=begin
- def set_spans(*pairs)
- if pairs[0].kind_of?(Array)
- # [idx, val], [idx, val], ...
- args = []
- pairs.each{|idx, val|
- args << tagid(idx)
- if val.kind_of?(Array)
- args << val.join(',')
- else
- args << val
- end
- }
- tk_send('spans', *args)
- else
- # idx, val, idx, val, ...
- args = []
- 0.step(pairs.size-1, 2){|i|
- args << tagid(pairs[i])
- val = pairs[i+1]
- if val.kind_of?(Array)
- args << val.join(',')
- else
- args << val
- end
- }
- tk_send('spans', *args)
- end
- self
- end
-=end
-
- def tagid(tag)
- if tag.kind_of?(Tk::TkTable::CellTag)
- tag.id
- elsif tag.kind_of?(Array)
- if tag[0].kind_of?(Integer) && tag[1].kind_of?(Integer)
- # [row, col]
- tag.join(',')
- else
- tag
- end
- else
- tag
- end
- end
-
- def tagid2obj(tagid)
- Tk::TkTable::CellTag::CellTagID_TBL.mutex.synchronize{
- if Tk::TkTable::CellTag::CellTagID_TBL.key?(@path)
- if Tk::TkTable::CellTag::CellTagID_TBL[@path].key?(tagid)
- Tk::TkTable::CellTag::CellTagID_TBL[@path][tagid]
- else
- tagid
- end
- else
- tagid
- end
- }
- end
-
- def tag_cell(tag, *cells)
- tk_send('tag', 'cell', tagid(tag), *(cells.collect{|idx| tagid(idx)}))
- self
- end
- def tag_reset(*cells)
- tk_send('tag', 'cell', '', *(cells.collect{|idx| tagid(idx)}))
- self
- end
- def tag_col(tag, *cols)
- tk_send('tag', 'col', tagid(tag), *cols)
- self
- end
- def tag_col_reset(*cols)
- tk_send('tag', 'col', '', *cols)
- self
- end
- def tag_delete(tag)
- tk_send('tag', 'delete', tagid(tag))
- Tk::TkTable::CellTag::CellTagID_TBL.mutex.synchronize{
- if Tk::TkTable::CellTag::CellTagID_TBL[@path]
- if tag.kind_of? Tk::TkTable::CellTag
- Tk::TkTable::CellTag::CellTagID_TBL[@path].delete(tag.id)
- else
- Tk::TkTable::CellTag::CellTagID_TBL[@path].delete(tag)
- end
- end
- }
- self
- end
- def tag_exist?(tag)
- bool(tk_send('tag', 'exists', tagid(tag)))
- end
- def tag_include?(tag, idx)
- bool(tk_send('tag', 'includes', tagid(tag), tagid(idx)))
- end
- def tag_lower(tag, target=None)
- tk_send('tag', 'lower', tagid(tag), tagid(target))
- self
- end
- def tag_names(pat=None)
- simplelist(tk_send('tag', 'names', pat)).collect{|tag| tagid2obj(tag)}
- end
- def tag_raise(tag, target=None)
- tk_send('tag', 'raise', tagid(tag), tagid(target))
- self
- end
- def tag_row(tag, *rows)
- tk_send('tag', 'row', tagid(tag), *rows)
- self
- end
- def tag_row_reset(*rows)
- tk_send('tag', 'row', '', *rows)
- self
- end
-
- def validate(idx)
- bool(tk_send('validate', tagid(idx)))
- end
-
- def width_list
- list(tk_send('width'))
- end
- def width(row)
- number(tk_send('width', row))
- end
- def set_width(*pairs)
- tk_send('width', *(pairs.flatten))
- self
- end
-
- def window_delete(*args)
- tk_send('window', 'delete', *(args.collect{|idx| tagid(idx)}))
- self
- end
- def window_move(from_idx, to_idx)
- tk_send('window', 'move', tagid(from_idx), tagid(to_idx))
- self
- end
- def window_names(pat=None)
- simplelist(tk_send('window', 'names', pat))
- end
-end
diff --git a/ext/tk/lib/tkextlib/tktrans.rb b/ext/tk/lib/tkextlib/tktrans.rb
deleted file mode 100644
index 031eeb9fd7..0000000000
--- a/ext/tk/lib/tkextlib/tktrans.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: false
-#
-# TkTrans support (win32 only)
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tktrans/setup.rb'
-
-# load library
-require 'tkextlib/tktrans/tktrans'
diff --git a/ext/tk/lib/tkextlib/tktrans/setup.rb b/ext/tk/lib/tkextlib/tktrans/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/tktrans/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/tktrans/tktrans.rb b/ext/tk/lib/tkextlib/tktrans/tktrans.rb
deleted file mode 100644
index e6e0e3a78d..0000000000
--- a/ext/tk/lib/tkextlib/tktrans/tktrans.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# frozen_string_literal: false
-#
-# TkTrans support (win32 only)
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tktrans/setup.rb'
-
-TkPackage.require('tktrans') rescue Tk.load_tcllibrary('tktrans')
-
-module Tk
- module TkTrans
- PACKAGE_NAME = 'tktrans'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('tktrans')
- rescue
- ''
- end
- end
- end
-end
-
-class TkWindow
- def tktrans_set_image(img)
- tk_send('tktrans::setwidget', @path, img)
- self
- end
- def tktrans_get_image()
- tk_send('tktrans::setwidget', @path)
- end
-end
-
-class Tk::Root
- undef tktrans_set_image, tktrans_get_image
-
- def tktrans_set_image(img)
- tk_send('tktrans::settoplevel', @path, img)
- self
- end
- def tktrans_get_image()
- tk_send('tktrans::settoplevel', @path)
- end
-end
-
-class Tk::Toplevel
- undef tktrans_set_image, tktrans_get_image
-
- def tktrans_set_image(img)
- tk_send('tktrans::settoplevel', @path, img)
- self
- end
- def tktrans_get_image()
- tk_send('tktrans::settoplevel', @path)
- end
-end
diff --git a/ext/tk/lib/tkextlib/treectrl.rb b/ext/tk/lib/tkextlib/treectrl.rb
deleted file mode 100644
index 227d55ff1e..0000000000
--- a/ext/tk/lib/tkextlib/treectrl.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-#
-# TkTreeCtrl support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/treectrl/setup.rb'
-
-# load library
-require 'tkextlib/treectrl/tktreectrl'
diff --git a/ext/tk/lib/tkextlib/treectrl/setup.rb b/ext/tk/lib/tkextlib/treectrl/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/treectrl/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb b/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb
deleted file mode 100644
index dbd59f8c05..0000000000
--- a/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb
+++ /dev/null
@@ -1,2523 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/treectrl/tktreectrl.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/treectrl/setup.rb'
-
-# TkPackage.require('treectrl', '1.0')
-# TkPackage.require('treectrl', '1.1')
-TkPackage.require('treectrl')
-
-module Tk
- class TreeCtrl < TkWindow
- BindTag_FileList = TkBindTag.new_by_name('TreeCtrlFileList')
-
- PACKAGE_NAME = 'treectrl'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('treectrl')
- rescue
- ''
- end
- end
-
- HasColumnCreateCommand =
- (TkPackage.vcompare(self.package_version, '1.1') >= 0)
-
- # dummy ::
- # pkgIndex.tcl of TreeCtrl-1.0 doesn't support auto_load for
- # 'loupe' command (probably it is bug, I think).
- # So, calling a 'treectrl' command for loading the dll with
- # the auto_load facility.
- begin
- tk_call('treectrl')
- rescue
- end
- def self.loupe(img, x, y, w, h, zoom)
- # NOTE: platform == 'unix' only
-
- # img => TkPhotoImage
- # x, y => screen coords
- # w, h => magnifier width and height
- # zoom => zooming rate
- Tk.tk_call_without_enc('loupe', img, x, y, w, h, zoom)
- end
-
- def self.text_layout(font, text, keys={})
- TkComm.list(Tk.tk_call_without_enc('textlayout', font, text, keys))
- end
-
- def self.image_tint(img, color, alpha)
- Tk.tk_call_without_enc('imagetint', img, color, alpha)
- end
-
- class NotifyEvent < TkUtil::CallbackSubst
- end
-
- module ConfigMethod
- end
- end
- TreeCtrl_Widget = TreeCtrl
-end
-
-##############################################
-
-class Tk::TreeCtrl::NotifyEvent
- # [ <'%' subst-key char>, <proc type char>, <instance var (accessor) name>]
- KEY_TBL = [
- [ ?c, ?n, :item_num ],
- [ ?d, ?s, :detail ],
- [ ?D, ?l, :items ],
- [ ?e, ?e, :event ],
- [ ?I, ?n, :id ],
- [ ?l, ?n, :lower_bound ],
- [ ?p, ?n, :active_id ],
- [ ?P, ?e, :pattern ],
- [ ?S, ?l, :sel_items ],
- [ ?T, ?w, :widget ],
- [ ?u, ?n, :upper_bound ],
- [ ?W, ?o, :object ],
- [ ??, ?x, :parm_info ],
- nil
- ]
-
- # [ <proc type char>, <proc/method to convert tcl-str to ruby-obj>]
- PROC_TBL = [
- [ ?n, TkComm.method(:num_or_str) ],
- [ ?s, TkComm.method(:string) ],
- [ ?l, TkComm.method(:list) ],
- [ ?w, TkComm.method(:window) ],
-
- [ ?e, proc{|val|
- case val
- when /^<<[^<>]+>>$/
- TkVirtualEvent.getobj(val[1..-2])
- when /^<[^<>]+>$/
- val[1..-2]
- else
- val
- end
- }
- ],
-
- [ ?o, proc{|val| TkComm.tk_tcl2ruby(val)} ],
-
- [ ?x, proc{|val|
- begin
- inf = {}
- Hash[*(TkComm.list(val))].each{|k, v|
- if keyinfo = KEY_TBL.assoc(k[0])
- if cmd = PROC_TBL.assoc(keyinfo[1])
- begin
- new_v = cmd.call(v)
- v = new_v
- rescue
- end
- end
- end
- inf[k] = v
- }
- inf
- rescue
- val
- end
- } ],
-
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- # setup tables to be used by scan_args, _get_subst_key, _get_all_subst_keys
- #
- # _get_subst_key() and _get_all_subst_keys() generates key-string
- # which describe how to convert callback arguments to ruby objects.
- # When binding parameters are given, use _get_subst_key().
- # But when no parameters are given, use _get_all_subst_keys() to
- # create a Event class object as a callback parameter.
- #
- # scan_args() is used when doing callback. It convert arguments
- # ( which are Tcl strings ) to ruby objects based on the key string
- # that is generated by _get_subst_key() or _get_all_subst_keys().
- #
- _setup_subst_table(KEY_TBL, PROC_TBL);
-end
-
-##############################################
-
-module Tk::TreeCtrl::ConfigMethod
- include TkItemConfigMethod
-
- def treectrl_tagid(key, obj)
- if key.kind_of?(Array)
- key = key.join(' ')
- else
- key = key.to_s
- end
-
- if (obj.kind_of?(Tk::TreeCtrl::Column) ||
- obj.kind_of?(Tk::TreeCtrl::Element) ||
- obj.kind_of?(Tk::TreeCtrl::Item) ||
- obj.kind_of?(Tk::TreeCtrl::Style))
- obj = obj.id
- end
-
- case key
- when 'column'
- obj
-
- when 'debug'
- None
-
- when 'dragimage'
- None
-
- when 'element'
- obj
-
- when 'item element'
- obj
-
- when 'marquee'
- None
-
- when 'notify'
- obj
-
- when 'style'
- obj
-
- else
- obj
- end
- end
-
- def tagid(mixed_id)
- if mixed_id == 'debug'
- ['debug', None]
- elsif mixed_id == 'dragimage'
- ['dragimage', None]
- elsif mixed_id == 'marquee'
- ['marquee', None]
- elsif mixed_id.kind_of?(Array)
- [mixed_id[0], treectrl_tagid(*mixed_id)]
- else
- tagid(mixed_id.split(':'))
- end
- end
-
- def __item_cget_cmd(mixed_id)
- if mixed_id[0] == 'column' && mixed_id[1] == 'drag'
- return [self.path, 'column', 'dragcget']
- end
-
- if mixed_id[1].kind_of?(Array)
- id = mixed_id[1]
- else
- id = [mixed_id[1]]
- end
-
- if mixed_id[0].kind_of?(Array)
- ([self.path].concat(mixed_id[0]) << 'cget').concat(id)
- else
- [self.path, mixed_id[0], 'cget'].concat(id)
- end
- end
- private :__item_cget_cmd
-
- def __item_config_cmd(mixed_id)
- if mixed_id[0] == 'column' && mixed_id[1] == 'drag'
- return [self.path, 'column', 'dragconfigure']
- end
-
- if mixed_id[1].kind_of?(Array)
- id = mixed_id[1]
- else
- id = [mixed_id[1]]
- end
-
- if mixed_id[0].kind_of?(Array)
- ([self.path].concat(mixed_id[0]) << 'configure').concat(id)
- else
- [self.path, mixed_id[0], 'configure'].concat(id)
- end
- end
- private :__item_config_cmd
-
- def __item_pathname(id)
- if id.kind_of?(Array)
- key = id[0]
- if key.kind_of?(Array)
- key = key.join(' ')
- end
-
- tag = id[1]
- if tag.kind_of?(Array)
- tag = tag.join(' ')
- end
-
- id = [key, tag].join(':')
- end
- [self.path, id].join(';')
- end
- private :__item_pathname
-
- def __item_configinfo_struct(id)
- if id.kind_of?(Array) && id[0].to_s == 'notify'
- {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil,
- :default_value=>nil, :current_value=>1}
- else
- {:key=>0, :alias=>1, :db_name=>1, :db_class=>2,
- :default_value=>3, :current_value=>4}
- end
- end
- private :__item_configinfo_struct
-
-
- def __item_font_optkeys(id)
- if id.kind_of?(Array) && (id[0] == 'element' ||
- (id[0].kind_of?(Array) && id[0][1] == 'element'))
- []
- else
- ['font']
- end
- end
- private :__item_font_optkeys
-
- def __item_numstrval_optkeys(id)
- if id == 'debug'
- ['displaydelay']
- else
- super(id)
- end
- end
- private :__item_numstrval_optkeys
-
- def __item_boolval_optkeys(id)
- if id == 'debug'
- ['data', 'display', 'enable', 'span', 'textlayout']
- elsif id == 'dragimage'
- ['visible']
- elsif id == 'marquee'
- ['visible']
- elsif id.kind_of?(Array)
- case id[0]
- when 'item'
- ['visible', 'wrap', 'open', 'returnid', 'visible']
- when 'column'
- if id[1] == 'drag'
- ['enable']
- else
- ['button', 'expand', 'resize', 'squeeze', 'sunken',
- 'visible', 'widthhack']
- end
- when 'element'
- ['draw', 'filled', 'showfocus', 'clip', 'destroy']
- when 'notify'
- ['active']
- when 'style'
- ['detach', 'indent', 'visible']
- else
- if id[0].kind_of?(Array) && id[0][1] == 'element'
- ['filled', 'showfocus']
- else
- super(id)
- end
- end
- else
- super(id)
- end
- end
- private :__item_boolval_optkeys
-
- def __item_strval_optkeys(id)
- if id == 'debug'
- ['erasecolor']
- elsif id.kind_of?(Array)
- case id[0]
- when 'column'
- if id[1] == 'drag'
- ['indicatorcolor']
- else
- super(id) << 'textcolor'
- end
- when 'element'
- super(id) << 'fill' << 'outline' << 'format'
- else
- super(id)
- end
- else
- super(id)
- end
- end
- private :__item_strval_optkeys
-
- def __item_listval_optkeys(id)
- if id.kind_of?(Array)
- case id[0]
- when 'column'
- ['itembackground']
- when 'element'
- ['relief']
- when 'style'
- ['union']
- else
- if id[0].kind_of?(Array) && id[0][1] == 'element'
- ['relief']
- else
- []
- end
- end
- else
- []
- end
- end
- private :__item_listval_optkeys
-
- def __item_val2ruby_optkeys(id)
- if id.kind_of?(Array)
- case id[0]
- when 'item'
- { 'button' => proc{|id,val| (val == 'auto')? val: TkComm.bool(val)} }
- else
- []
- end
- else
- []
- end
- end
- private :__item_val2ruby_optkeys
-
- def __item_keyonly_optkeys(id) # { def_key=>(undef_key|nil), ... }
- {
- 'notreally'=>nil,
- 'increasing'=>'decreasing',
- 'decreasing'=>'increasing',
- 'ascii'=>nil,
- 'dictionary'=>nil,
- 'integer'=>nil,
- 'real'=>nil
- }
- end
- private :__item_keyonly_optkeys
-
- def column_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['column', tagOrId], option)
- end
- def column_cget(tagOrId, option)
- itemcget(['column', tagOrId], option)
- end
- def column_cget_strict(tagOrId, option)
- itemcget_strict(['column', tagOrId], option)
- end
- def column_configure(tagOrId, slot, value=None)
- itemconfigure(['column', tagOrId], slot, value)
- end
- def column_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['column', tagOrId], slot)
- end
- def current_column_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['column', tagOrId], slot)
- end
-
- def column_dragcget_tkstring(option)
- itemcget_tkstring(['column', 'drag'], option)
- end
- def column_dragcget(option)
- itemcget(['column', 'drag'], option)
- end
- def column_dragcget_strict(option)
- itemcget_strict(['column', 'drag'], option)
- end
- def column_dragconfigure(slot, value=None)
- itemconfigure(['column', 'drag'], slot, value)
- end
- def column_dragconfiginfo(slot=nil)
- itemconfiginfo(['column', 'drag'], slot)
- end
- def current_column_dragconfiginfo(slot=nil)
- current_itemconfiginfo(['column', 'drag'], slot)
- end
-
- def debug_cget_tkstring(option)
- itemcget_tkstring('debug', option)
- end
- def debug_cget(option)
- itemcget('debug', option)
- end
- def debug_cget_strict(option)
- itemcget_strict('debug', option)
- end
- def debug_configure(slot, value=None)
- itemconfigure('debug', slot, value)
- end
- def debug_configinfo(slot=nil)
- itemconfiginfo('debug', slot)
- end
- def current_debug_configinfo(slot=nil)
- current_itemconfiginfo('debug', slot)
- end
-
- def dragimage_cget_tkstring(option)
- itemcget_tkstring('dragimage', option)
- end
- def dragimage_cget(option)
- itemcget('dragimage', option)
- end
- def dragimage_cget_strict(option)
- itemcget_strict('dragimage', option)
- end
- def dragimage_configure(slot, value=None)
- itemconfigure('dragimage', slot, value)
- end
- def dragimage_configinfo(slot=nil)
- itemconfiginfo('dragimage', slot)
- end
- def current_dragimage_configinfo(slot=nil)
- current_itemconfiginfo('dragimage', slot)
- end
-
- def element_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['element', tagOrId], option)
- end
- def element_cget(tagOrId, option)
- itemcget(['element', tagOrId], option)
- end
- def element_cget_strict(tagOrId, option)
- itemcget_strict(['element', tagOrId], option)
- end
- def element_configure(tagOrId, slot, value=None)
- itemconfigure(['element', tagOrId], slot, value)
- end
- def element_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['element', tagOrId], slot)
- end
- def current_element_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['element', tagOrId], slot)
- end
-
- def item_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['item', tagOrId], option)
- end
- def item_cget(tagOrId, option)
- itemcget(['item', tagOrId], option)
- end
- def item_cget_strict(tagOrId, option)
- itemcget_strict(['item', tagOrId], option)
- end
- def item_configure(tagOrId, slot, value=None)
- itemconfigure(['item', tagOrId], slot, value)
- end
- def item_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['item', tagOrId], slot)
- end
- def current_item_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['item', tagOrId], slot)
- end
-
- def item_element_cget_tkstring(item, column, elem, option)
- itemcget_tkstring([['item', 'element'], [item, column, elem]], option)
- end
- def item_element_cget(item, column, elem, option)
- itemcget([['item', 'element'], [item, column, elem]], option)
- end
- def item_element_cget_strict(item, column, elem, option)
- itemcget_strict([['item', 'element'], [item, column, elem]], option)
- end
- def item_element_configure(item, column, elem, slot, value=None)
- itemconfigure([['item', 'element'], [item, column, elem]], slot, value)
- end
- def item_element_configinfo(item, column, elem, slot=nil)
- itemconfiginfo([['item', 'element'], [item, column, elem]], slot)
- end
- def current_item_element_configinfo(item, column, elem, slot=nil)
- current_itemconfiginfo([['item', 'element'], [item, column, elem]], slot)
- end
-
- def marquee_cget_tkstring(option)
- itemcget_tkstring('marquee', option)
- end
- def marquee_cget(option)
- itemcget('marquee', option)
- end
- def marquee_cget_strict(option)
- itemcget_strict('marquee', option)
- end
- def marquee_configure(slot, value=None)
- itemconfigure('marquee', slot, value)
- end
- def marquee_configinfo(slot=nil)
- itemconfiginfo('marquee', slot)
- end
- def current_marquee_configinfo(slot=nil)
- current_itemconfiginfo('marquee', slot)
- end
-
- def notify_cget_tkstring(win, pattern, option)
- pattern = "<#{pattern}>"
- # "notify" doesn't have cget subcommand.
- tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(['notify', [win, pattern]])) << "-#{option}")), false, true)[-1]
- end
- def notify_cget(win, pattern, option)
- pattern = "<#{pattern}>"
- # "notify" doesn't have cget subcommand.
- current_itemconfiginfo(['notify', [win, pattern]])[option.to_s]
- end
- def notify_cget_strict(win, pattern, option)
- pattern = "<#{pattern}>"
- # "notify" doesn't have cget subcommand.
- info = current_itemconfiginfo(['notify', [win, pattern]])
- option = option.to_s
- unless info.has_key?(option)
- fail RuntimeError, "unknown option \"#{option}\""
- else
- info[option]
- end
- end
- def notify_configure(win, pattern, slot, value=None)
- pattern = "<#{pattern}>"
- itemconfigure(['notify', [win, pattern]], slot, value)
- end
- def notify_configinfo(win, pattern, slot=nil)
- pattern = "<#{pattern}>"
- itemconfiginfo(['notify', [win, pattern]], slot)
- end
- def current_notify_configinfo(tagOrId, slot=nil)
- pattern = "<#{pattern}>"
- current_itemconfiginfo(['notify', [win, pattern]], slot)
- end
-
- def style_cget_tkstring(tagOrId, option)
- itemcget_tkstring(['style', tagOrId], option)
- end
- def style_cget(tagOrId, option)
- itemcget(['style', tagOrId], option)
- end
- def style_cget_strict(tagOrId, option)
- itemcget_strict(['style', tagOrId], option)
- end
- def style_configure(tagOrId, slot, value=None)
- itemconfigure(['style', tagOrId], slot, value)
- end
- def style_configinfo(tagOrId, slot=nil)
- itemconfiginfo(['style', tagOrId], slot)
- end
- def current_style_configinfo(tagOrId, slot=nil)
- current_itemconfiginfo(['style', tagOrId], slot)
- end
-
- private :itemcget_tkstring, :itemcget, :itemcget_strict
- private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
-end
-
-##############################################
-
-class Tk::TreeCtrl
- include Tk::TreeCtrl::ConfigMethod
- include Scrollable
-
- TkCommandNames = ['treectrl'.freeze].freeze
- WidgetClassName = 'TreeCtrl'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- #########################
-
- def __destroy_hook__
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.delete(@path)
- }
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.delete(@path)
- }
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.delete(@path)
- }
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.delete(@path)
- }
- end
-
- #########################
-
- def __strval_optkeys
- super() + [
- 'buttoncolor', 'columnprefix', 'itemprefix', 'linecolor'
- ]
- end
- private :__strval_optkeys
-
- def __boolval_optkeys
- [
- 'itemwidthequal', 'usetheme',
- 'showbuttons', 'showheader', 'showlines', 'showroot',
- 'showrootbutton', 'showrootlines', 'showrootchildbuttons'
- ]
- end
- private :__boolval_optkeys
-
- def __listval_optkeys
- [ 'defaultstyle' ]
- end
- private :__listval_optkeys
-
- #########################
-
- def install_bind(cmd, *args)
- install_bind_for_event_class(Tk::TreeCtrl::NotifyEvent, cmd, *args)
- end
-
- #########################
-
- def create_self(keys)
- if keys and keys != None
- tk_call_without_enc(self.class::TkCommandNames[0], @path,
- *hash_kv(keys, true))
- else
- tk_call_without_enc(self.class::TkCommandNames[0], @path)
- end
- end
- private :create_self
-
- #########################
-
- def activate(desc)
- tk_send('activate', desc)
- self
- end
-
- def canvasx(x)
- number(tk_send('canvasx', x))
- end
-
- def canvasy(y)
- number(tk_send('canvasy', y))
- end
-
- def collapse(*dsc)
- tk_send_without_enc('collapse', *(dsc.map!{|d| _get_eval_string(d, true)}))
- self
- end
-
- def collapse_recurse(*dsc)
- tk_send_without_enc('collapse', '-recurse',
- *(dsc.map!{|d| _get_eval_string(d, true)}))
- self
- end
-
- def column_bbox(idx)
- list(tk_send('column', 'bbox', idx))
- end
-
- def column_compare(column1, op, column2)
- bool(tk_send('column', 'compare', column1, op, column2))
- end
-
- def column_count
- num_or_str(tk_send('column', 'count'))
- end
-
- def column_create(keys=nil)
- if keys && keys.kind_of?(Hash)
- num_or_str(tk_send('column', 'create', *hash_kv(keys)))
- else
- num_or_str(tk_send('column', 'create'))
- end
- end
-
- def column_delete(idx)
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{
- if Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[self.path]
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[self.path].delete(idx)
- end
- }
- tk_send('column', 'delete', idx)
- self
- end
-
- def column_index(idx)
- num_or_str(tk_send('column', 'index', idx))
- end
-
- def column_id(idx)
- tk_send('column', 'id', idx)
- end
-
- def column_list(visible=false)
- if visible
- simplelist(tk_send('column', 'list', '-visible'))
- else
- simplelist(tk_send('column', 'list'))
- end
- end
- def column_visible_list
- column_list(true)
- end
-
- def column_move(idx, before)
- tk_send('column', 'move', idx, before)
- self
- end
-
- def column_needed_width(idx)
- num_or_str(tk_send('column', 'neededwidth', idx))
- end
- alias column_neededwidth column_needed_width
-
- def column_order(column, visible=false)
- if visible
- num_or_str(tk_send('column', 'order', column, '-visible'))
- else
- num_or_str(tk_send('column', 'order', column))
- end
- end
- def column_visible_order(column)
- column_order(column, true)
- end
-
- def column_width(idx)
- num_or_str(tk_send('column', 'width', idx))
- end
-
- def compare(item1, op, item2)
- bool(tk_send('compare', item1, op, item2))
- end
-
- def contentbox()
- list(tk_send('contentbox'))
- end
-
- def depth(item=None)
- num_or_str(tk_send_without_enc('depth', _get_eval_string(item, true)))
- end
-
- def dragimage_add(item, *args)
- tk_send('dragimage', 'add', item, *args)
- self
- end
-
- def dragimage_clear()
- tk_send('dragimage', 'clear')
- self
- end
-
- def dragimage_offset(*args) # x, y
- if args.empty?
- list(tk_send('dragimage', 'offset'))
- else
- tk_send('dragimage', 'offset', *args)
- self
- end
- end
-
- def dragimage_visible(*args) # mode
- if args..empty?
- bool(tk_send('dragimage', 'visible'))
- else
- tk_send('dragimage', 'visible', *args)
- self
- end
- end
- def dragimage_visible?
- dragimage_visible()
- end
-
- def debug_dinfo
- tk_send('debug', 'dinfo')
- self
- end
-
- def debug_scroll
- tk_send('debug', 'scroll')
- end
-
- def element_create(elem, type, keys=nil)
- if keys && keys.kind_of?(Hash)
- tk_send('element', 'create', elem, type, *hash_kv(keys))
- else
- tk_send('element', 'create', elem, type)
- end
- end
-
- def element_delete(*elems)
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{
- if Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[self.path]
- elems.each{|elem|
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[self.path].delete(elem)
- }
- end
- }
- tk_send('element', 'delete', *elems)
- self
- end
-
- def element_names()
- list(tk_send('element', 'names')).collect!{|elem|
- Tk::TreeCtrl::Element.id2obj(self, elem)
- }
- end
-
- def _conv_element_perstate_val(opt, val)
- case opt
- when 'background', 'foreground', 'fill', 'outline', 'format'
- val
- when 'draw', 'filled', 'showfocus', 'destroy'
- bool(val)
- else
- tk_tcl2ruby(val)
- end
- end
- private :_conv_element_perstate_val
-
- def element_perstate(elem, opt, st_list)
- tk_send('element', 'perstate', elem, "-{opt}", st_list)
- end
-
- def element_type(elem)
- tk_send('element', 'type', elem)
- end
-
- def element_class(elem)
- Tk::TreeCtrl::Element.type2class(element_type(elem))
- end
-
- def expand(*dsc)
- tk_send('expand', *dsc)
- self
- end
-
- def expand_recurse(*dsc)
- tk_send('expand', '-recurse', *dsc)
- self
- end
-
- def identify(x, y)
- lst = list(tk_send('identify', x, y))
-
- if lst[0] == 'item'
- lst[1] = Tk::TreeCtrl::Item.id2obj(self, lst[1])
- size = lst.size
- i = 2
- while i < size
- case lst[i]
- when 'line'
- i += 1
- lst[i] = Tk::TreeCtrl::Item.id2obj(self, lst[i])
- i += 1
-
- when 'button'
- i += 1
-
- when 'column'
- i += 2
-
- when 'elem'
- i += 1
- lst[i] = Tk::TreeCtrl::Element.id2obj(self, lst[i])
- i += 1
-
- else
- i += 1
- end
- end
- end
-
- lst
- end
-
- def index(idx)
- num_or_str(tk_send('index', idx))
- end
-
- def item_ancestors(item)
- list(tk_send('item', 'ancestors', item)).collect!{|id|
- Tk::TreeCtrl::Item.id2obj(self, id)
- }
- end
-
- def item_bbox(item, *args)
- list(tk_send('item', 'bbox', item, *args))
- end
-
- def item_children(item)
- list(tk_send('item', 'children', item)).collect!{|id|
- Tk::TreeCtrl::Item.id2obj(self, id)
- }
- end
-
- def item_collapse(item)
- tk_send_without_enc('item', 'collapse', _get_eval_string(item, true))
- self
- end
-
- def item_collapse_recurse(item)
- tk_send_without_enc('item', 'collapse',
- _get_eval_string(item, true), '-recurse')
- self
- end
-
- def item_compare(item1, op, item2)
- bool(tk_send('item', 'compare', item1, op, item2))
- end
-
- def item_complex(item, *args)
- tk_send_without_enc('item', 'complex',
- _get_eval_string(item, true),
- *(args.map!{|arg| _get_eval_string(arg, true)}))
- self
- end
-
- def item_count
- num_or_str(tk_send('item', 'count'))
- end
-
- def item_create(keys={})
- num_or_str(tk_send_without_enc('item', 'create', *hash_kv(keys, true)))
- end
-
- def _erase_children(item)
- item_children(item).each{|i| _erase_children(i)}
- # table is already locked
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[self.path].delete(item)
- end
- private :_erase_children
-
- def item_delete(first, last=None)
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{
- if Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[self.path]
- if first == 'all' || first == :all || last == 'all' || last == :all
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[self.path].clear
- elsif last == None
- _erase_children(first)
- else
- self.range(first, last).each{|id|
- _erase_children(id)
- }
- end
- end
- }
- tk_send('item', 'delete', first, last)
- self
- end
-
- def item_dump(item)
- list(tk_send('item', 'dump', item))
- end
-
- def item_dump_hash(item)
- Hash[*list(tk_send('item', 'dump', item))]
- end
-
- def item_element_actual(item, column, elem, key)
- tk_send('item', 'element', 'actual', item, column, elem, "-#{key}")
- end
-
- def item_element_perstate(elem, opt, st_list)
- tk_send('item', 'element', 'perstate', elem, "-{opt}", st_list)
- end
-
- def item_expand(item)
- tk_send('item', 'expand', item)
- self
- end
-
- def item_expand_recurse(item)
- tk_send('item', 'expand', item, '-recurse')
- self
- end
-
- def item_firstchild(parent, child=nil)
- if child
- tk_send_without_enc('item', 'firstchild',
- _get_eval_string(parent, true),
- _get_eval_string(child, true))
- self
- else
- id = num_or_str(tk_send_without_enc('item', 'firstchild',
- _get_eval_string(parent, true)))
- Tk::TreeCtrl::Item.id2obj(self, id)
- end
- end
- alias item_first_child item_firstchild
-
- def item_hasbutton(item, st=None)
- if st == None
- bool(tk_send_without_enc('item', 'hasbutton',
- _get_eval_string(item, true)))
- else
- tk_send_without_enc('item', 'hasbutton',
- _get_eval_string(item, true),
- _get_eval_string(st))
- self
- end
- end
- alias item_has_button item_hasbutton
-
- def item_hasbutton?(item)
- item_hasbutton(item)
- end
- alias item_has_button? item_hasbutton?
-
- def item_id(item)
- tk_send('item', 'id', item)
- end
-
- def item_image(item, column=nil, *args)
- if args.empty?
- if column
- img = tk_send('item', 'image', item, column)
- TkImage::Tk_IMGTBL[img]? TkImage::Tk_IMGTBL[img] : img
- else
- simplelist(tk_send('item', 'image', item)).collect!{|img|
- TkImage::Tk_IMGTBL[img]? TkImage::Tk_IMGTBL[img] : img
- }
- end
- else
- tk_send('item', 'image', item, column, *args)
- self
- end
- end
- def get_item_image(item, column=nil)
- item_image(item, column)
- end
- def set_item_image(item, col, img, *args)
- item_image(item, col, img, *args)
- end
-
- def item_index(item)
- list(tk_send('item', 'index', item))
- end
-
- def item_isancestor(item, des)
- bool(tk_send('item', 'isancestor', item, des))
- end
- alias item_is_ancestor item_isancestor
- alias item_isancestor? item_isancestor
- alias item_is_ancestor? item_isancestor
-
- def item_isopen(item)
- bool(tk_send('item', 'isopen', item))
- end
- alias item_is_open item_isopen
- alias item_isopen? item_isopen
- alias item_is_open? item_isopen
- alias item_isopened? item_isopen
- alias item_is_opened? item_isopen
-
- def item_lastchild(parent, child=nil)
- if child
- tk_send_without_enc('item', 'lastchild',
- _get_eval_string(parent, true),
- _get_eval_string(child, true))
- self
- else
- id = num_or_str(tk_send_without_enc('item', 'lastchild',
- _get_eval_string(parent, true)))
- Tk::TreeCtrl::Item.id2obj(self, id)
- end
- end
- alias item_last_child item_lastchild
-
- def item_nextsibling(sibling, nxt=nil)
- if nxt
- tk_send('item', 'nextsibling', sibling, nxt)
- self
- else
- id = num_or_str(tk_send('item', 'nextsibling', sibling))
- Tk::TreeCtrl::Item.id2obj(self, id)
- end
- end
- alias item_next_sibling item_nextsibling
-
- def item_numchildren(item)
- number(tk_send_without_enc('item', 'numchildren',
- _get_eval_string(item, true)))
- end
- alias item_num_children item_numchildren
- alias item_children_size item_numchildren
-
- def item_order(item, visible=false)
- if visible
- ret = num_or_str(tk_send('item', 'order', item, '-visible'))
- else
- ret = num_or_str(tk_send('item', 'order', item))
- end
-
- (ret.kind_of?(Fixnum) && ret < 0)? nil: ret
- end
- def item_visible_order(item)
- item_order(item, true)
- end
-
- def item_parent(item)
- id = num_or_str(tk_send('item', 'parent', item))
- Tk::TreeCtrl::Item.id2obj(self, id)
- end
-
- def item_prevsibling(sibling, prev=nil)
- if prev
- tk_send('item', 'prevsibling', sibling, prev)
- self
- else
- id = num_or_str(tk_send('item', 'prevsibling', sibling))
- Tk::TreeCtrl::Item.id2obj(self, id)
- end
- end
- alias item_prev_sibling item_prevsibling
-
- def item_range(first, last)
- simplelist(tk_send('item', 'range', first, last))
- end
-
- def item_remove(item)
- tk_send('item', 'remove', item)
- self
- end
-
- def item_rnc(item)
- list(tk_send('item', 'rnc', item))
- end
-
- def _item_sort_core(real_sort, item, *opts)
- # opts ::= sort_param [, sort_param, ... ]
- # sort_param ::= {key=>val, ...}
- # [type, desc, {key=>val, ...}]
- # param
- opts = opts.collect{|param|
- if param.kind_of?(Hash)
- param = _symbolkey2str(param)
- if param.key?('column')
- key = '-column'
- desc = param.delete('column')
- elsif param.key?('element')
- key = '-element'
- desc = param.delete('element')
- else
- key = nil
- end
-
- if param.empty?
- param = None
- else
- param = hash_kv(__conv_item_keyonly_opts(item, param))
- end
-
- if key
- [key, desc].concat(param)
- else
- param
- end
-
- elsif param.kind_of?(Array)
- if param[2].kind_of?(Hash)
- param[2] = hash_kv(__conv_item_keyonly_opts(item, param[2]))
- end
- param
-
- elsif param.kind_of?(String) && param =~ /\A[a-z]+\Z/
- '-' << param
-
- elsif param.kind_of?(Symbol)
- '-' << param.to_s
-
- else
- param
- end
- }.flatten
-
- if real_sort
- tk_send('item', 'sort', item, *opts)
- self
- else
- list(tk_send('item', 'sort', item, '-notreally', *opts))
- end
- end
- private :_item_sort_core
-
- def item_sort(item, *opts)
- _item_sort_core(true, item, *opts)
- end
- def item_sort_not_really(item, *opts)
- _item_sort_core(false, item, *opts)
- end
-
- def item_span(item, column=nil, *args)
- if args.empty?
- if column
- list(tk_send('item', 'span', item, column))
- else
- simplelist(tk_send('item', 'span', item)).collect!{|elem| list(elem)}
- end
- else
- tk_send('item', 'span', item, column, *args)
- self
- end
- end
- def get_item_span(item, column=nil)
- item_span(item, column)
- end
- def set_item_span(item, col, num, *args)
- item_span(item, col, num, *args)
- end
-
- def item_state_forcolumn(item, column, *args)
- tk_send('item', 'state', 'forcolumn', item, column, *args)
- end
- alias item_state_for_column item_state_forcolumn
-
- def item_state_get(item, *args)
- if args.empty?
- list(tk_send('item', 'state', 'get', item *args))
- else
- bool(tk_send('item', 'state', 'get', item))
- end
- end
-
- def item_state_set(item, *args)
- tk_send('item', 'state', 'set', item, *args)
- end
-
- def item_style_elements(item, column)
- list(tk_send('item', 'style', 'elements', item, column)).collect!{|id|
- Tk::TreeCtrl::Style.id2obj(self, id)
- }
- end
-
- def item_style_map(item, column, style, map)
- tk_send('item', 'style', 'map', item, column, style, map)
- self
- end
-
- def item_style_set(item, column=nil, *args)
- if args.empty?
- if column
- id = tk_send_without_enc('item', 'style', 'set',
- _get_eval_string(item, true),
- _get_eval_string(column, true))
- Tk::TreeCtrl::Style.id2obj(self, id)
- else
- list(tk_send_without_enc('item', 'style', 'set',
- _get_eval_string(item, true))).collect!{|id|
- Tk::TreeCtrl::Style.id2obj(self, id)
- }
- end
- else
- tk_send_without_enc('item', 'style', 'set',
- _get_eval_string(item, true),
- _get_eval_string(column, true),
- *(args.flatten.map!{|arg|
- _get_eval_string(arg, true)
- }))
- self
- end
- end
-
- def item_text(item, column, txt=nil, *args)
- if args.empty?
- if txt
- tk_send('item', 'text', item, column, txt)
- self
- else
- tk_send('item', 'text', item, column)
- end
- else
- tk_send('item', 'text', item, column, txt, *args)
- self
- end
- end
-
- def item_toggle(item)
- tk_send('item', 'toggle', item)
- self
- end
-
- def item_toggle_recurse(item)
- tk_send('item', 'toggle', item, '-recurse')
- self
- end
-
- def item_visible(item, st=None)
- if st == None
- bool(tk_send('item', 'visible', item))
- else
- tk_send('item', 'visible', item, st)
- self
- end
- end
- def item_visible?(item)
- item_visible(item)
- end
-
- def marquee_anchor(*args)
- if args.empty?
- list(tk_send('marquee', 'anchor'))
- else
- tk_send('marquee', 'anchor', *args)
- self
- end
- end
-
- def marquee_coords(*args)
- if args.empty?
- list(tk_send('marquee', 'coords'))
- else
- tk_send('marquee', 'coords', *args)
- self
- end
- end
-
- def marquee_corner(*args)
- if args.empty?
- tk_send('marquee', 'corner')
- else
- tk_send('marquee', 'corner', *args)
- self
- end
- end
-
- def marquee_identify()
- list(tk_send('marquee', 'identify')).collect!{|id|
- Tk::TreeCtrl::Item.id2obj(self, id)
- }
- end
-
- def marquee_visible(st=None)
- if st == None
- bool(tk_send('marquee', 'visible'))
- else
- tk_send('marquee', 'visible', st)
- self
- end
- end
- def marquee_visible?()
- marquee_visible()
- end
-
- #def notify_bind(obj, event, cmd=Proc.new, *args)
- # _bind([@path, 'notify', 'bind', obj], event, cmd, *args)
- # self
- #end
- def notify_bind(obj, event, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind([@path, 'notify', 'bind', obj], event, cmd, *args)
- self
- end
-
- #def notify_bind_append(obj, event, cmd=Proc.new, *args)
- # _bind_append([@path, 'notify', 'bind', obj], event, cmd, *args)
- # self
- #end
- def notify_bind_append(obj, event, *args)
- # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0]) || !block_given?
- cmd = args.shift
- else
- cmd = Proc.new
- end
- _bind_append([@path, 'notify', 'bind', obj], event, cmd, *args)
- self
- end
-
- def notify_bind_remove(obj, event)
- _bind_remove([@path, 'notify', 'bind', obj], event)
- self
- end
-
- def notify_bindinfo(obj, event=nil)
- _bindinfo([@path, 'notify', 'bind', obj], event)
- end
-
- def notify_detailnames(event)
- list(tk_send('notify', 'detailnames', event))
- end
-
- def notify_eventnames()
- list(tk_send('notify', 'eventnames'))
- end
-
- def notify_generate(pattern, char_map=None, percents_cmd=None)
- pattern = "<#{pattern}>"
- tk_send('notify', 'generate', pattern, char_map, percents_cmd)
- self
- end
-
- def notify_install(pattern, percents_cmd=nil, &b)
- pattern = "<#{pattern}>"
- percents_cmd = Proc.new(&b) if !percents_cmd && b
- if percents_cmd
- procedure(tk_send('notify', 'install', pattern, percents_cmd))
- else
- procedure(tk_send('notify', 'install', pattern))
- end
- end
-
- def notify_install_detail(event, detail, percents_cmd=nil, &b)
- percents_cmd = Proc.new(&b) if !percents_cmd && b
- if percents_cmd
- tk_send('notify', 'install', 'detail', event, detail, percents_cmd)
- else
- tk_send('notify', 'install', 'detail', event, detail)
- end
- end
-
- def notify_install_event(event, percents_cmd=nil, &b)
- percents_cmd = Proc.new(&b) if !percents_cmd && b
- if percents_cmd
- tk_send('notify', 'install', 'event', event, percents_cmd)
- else
- tk_send('notify', 'install', 'event', event)
- end
- end
-
- def notify_linkage(pattern, detail=None)
- if detail != None
- tk_send('notify', 'linkage', pattern, detail)
- else
- begin
- if pattern.to_s.index(?-)
- # TreeCtrl 1.1 format?
- begin
- tk_send('notify', 'linkage', "<#{pattern}>")
- rescue
- # TreeCtrl 1.0?
- tk_send('notify', 'linkage', pattern)
- end
- else
- # TreeCtrl 1.0 format?
- begin
- tk_send('notify', 'linkage', pattern)
- rescue
- # TreeCtrl 1.1?
- tk_send('notify', 'linkage', "<#{pattern}>")
- end
- end
- end
- end
- end
-
- def notify_unbind(pattern=nil)
- if pattern
- tk_send('notify', 'unbind', "<#{pattern}>")
- else
- tk_send('notify', 'unbind')
- end
- self
- end
-
- def notify_uninstall(pattern)
- pattern = "<#{pattern}>"
- tk_send('notify', 'uninstall', pattern)
- self
- end
-
- def notify_uninstall_detail(event, detail)
- tk_send('notify', 'uninstall', 'detail', event, detail)
- self
- end
-
- def notify_uninstall_event(event)
- tk_send('notify', 'uninstall', 'event', event)
- self
- end
-
- def numcolumns()
- num_or_str(tk_send('numcolumns'))
- end
- alias num_columns numcolumns
- alias columns_size numcolumns
-
- def numitems()
- num_or_str(tk_send('numitems'))
- end
- alias num_items numitems
- alias items_size numitems
-
- def orphans()
- list(tk_send('orphans')).collect!{|id|
- Tk::TreeCtrl::Item.id2obj(self, id)
- }
- end
-
- def range(first, last)
- list(tk_send('range', first, last)).collect!{|id|
- Tk::TreeCtrl::Item.id2obj(self, id)
- }
- end
-
- def state_define(name)
- tk_send('state', 'define', name)
- self
- end
-
- def state_linkage(name)
- tk_send('state', 'linkage', name)
- end
-
- def state_names()
- list(tk_send('state', 'names'))
- end
-
- def state_undefine(*names)
- tk_send('state', 'undefine', *names)
- self
- end
-
- def see(item, column=None, keys={})
- tk_send('see', item, column, *hash_kv(keys))
- self
- end
-
- def selection_add(first, last=None)
- tk_send('selection', 'add', first, last)
- self
- end
-
- def selection_anchor(item=None)
- id = num_or_str(tk_send('selection', 'anchor', item))
- Tk::TreeCtrl::Item.id2obj(self, id)
- end
-
- def selection_clear(*args) # first, last
- tk_send('selection', 'clear', *args)
- self
- end
-
- def selection_count()
- number(tk_send('selection', 'count'))
- end
-
- def selection_get()
- list(tk_send('selection', 'get')).collect!{|id|
- Tk::TreeCtrl::Item.id2obj(self, id)
- }
- end
-
- def selection_includes(item)
- bool(tk_send('selection', 'includes', item))
- end
-
- def selection_modify(sel, desel)
- tk_send('selection', 'modify', sel, desel)
- self
- end
-
- def style_create(style, keys=None)
- if keys && keys != None
- tk_send('style', 'create', style, *hash_kv(keys))
- else
- tk_send('style', 'create', style)
- end
- end
-
- def style_delete(*args)
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{
- if Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[self.path]
- args.each{|sty|
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[self.path].delete(sty)
- }
- end
- }
- tk_send('style', 'delete', *args)
- self
- end
-
- def style_elements(style, *elems)
- if elems.empty?
- list(tk_send('style', 'elements', style)).collect!{|id|
- Tk::TreeCtrl::Element.id2obj(self, id)
- }
- else
- tk_send('style', 'elements', style, elems.flatten)
- self
- end
- end
-
- def _conv_style_layout_val(sty, val)
- case sty.to_s
- when 'padx', 'pady', 'ipadx', 'ipady'
- lst = list(val)
- (lst.size == 1)? lst[0]: lst
- when 'detach', 'indent'
- bool(val)
- when 'union'
- simplelist(val).collect!{|elem|
- Tk::TreeCtrl::Element.id2obj(self, elem)
- }
- else
- val
- end
- end
- private :_conv_style_layout_val
-
- def style_layout(style, elem, keys=None)
- if keys && keys != None
- if keys.kind_of?(Hash)
- tk_send('style', 'layout', style, elem, *hash_kv(keys))
- self
- else
- _conv_style_layout_val(keys,
- tk_send('style', 'layout',
- style, elem, "-#{keys}"))
- end
- else
- ret = Hash.new
- Hash[*simplelist(tk_send('style', 'layout', style, elem))].each{|k, v|
- k = k[1..-1]
- ret[k] = _conv_style_layout_val(k, v)
- }
- ret
- end
- end
- def get_style_layout(style, elem, opt=None)
- style_layout(style, elem, opt)
- end
- def set_style_layout(style, elem, slot, value=None)
- if slot.kind_of?(Hash)
- style_layout(style, elem, slot)
- else
- style_layout(style, elem, {slot=>value})
- end
- end
-
- def style_names()
- list(tk_send('style', 'names')).collect!{|id|
- Tk::TreeCtrl::Style.id2obj(self, id)
- }
- end
-
- def toggle(*items)
- tk_send('toggle', *items)
- self
- end
-
- def toggle_recurse()
- tk_send('toggle', '-recurse', *items)
- self
- end
-end
-
-#####################
-
-class Tk::TreeCtrl::Column < TkObject
- TreeCtrlColumnID_TBL = TkCore::INTERP.create_table
-
- (TreeCtrlColumnID = ['treectrl_column'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.clear
- }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{
- if Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[tpath]
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[tpath][id]? \
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[tpath][id] : id
- else
- id
- end
- }
- end
-
- def initialize(parent, keys={})
- @tree = parent
- @tpath = parent.path
-
- keys = _symbolkey2str(keys)
-
- Tk::TreeCtrl::Column::TreeCtrlColumnID.mutex.synchronize{
- @path = @id =
- keys.delete('tag') ||
- Tk::TreeCtrl::Column::TreeCtrlColumnID.join(TkCore::INTERP._ip_id_)
- Tk::TreeCtrl::Column::TreeCtrlColumnID[1].succ!
- }
-
- keys['tag'] = @id
-
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[@tpath] ||= {}
- Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[@tpath][@id] = self
- }
-
- @tree.column_create(keys)
- end
-
- def id
- @id
- end
-
- def to_s
- @id.to_s.dup
- end
-
- def cget_tkstring(opt)
- @tree.column_cget_tkstring(@tree.column_index(@id), opt)
- end
- def cget(opt)
- @tree.column_cget(@tree.column_index(@id), opt)
- end
- def cget_strict(opt)
- @tree.column_cget_strict(@tree.column_index(@id), opt)
- end
-
- def configure(*args)
- @tree.column_configure(@tree.column_index(@id), *args)
- end
-
- def configinfo(*args)
- @tree.column_configinfo(@tree.column_index(@id), *args)
- end
-
- def current_configinfo(*args)
- @tree.current_column_configinfo(@tree.column_index(@id), *args)
- end
-
- def delete
- @tree.column_delete(@tree.column_index(@id))
- self
- end
-
- def index
- @tree.column_index(@id)
- end
-
- def move(before)
- @tree.column_move(@tree.column_index(@id), before)
- self
- end
-
- def needed_width
- @tree.column_needed_width(@tree.column_index(@id))
- end
- alias neededwidth needed_width
-
- def current_width
- @tree.column_width(@tree.column_index(@id))
- end
-end
-
-#####################
-
-class Tk::TreeCtrl::Element < TkObject
- TreeCtrlElementID_TBL = TkCore::INTERP.create_table
-
- (TreeCtrlElementID = ['treectrl_element'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
- TreeCtrlElemTypeToClass = {}
-
- TkCore::INTERP.init_ip_env{
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.clear
- }
- }
-
- def self.type2class(type)
- TreeCtrlElemTypeToClass[type] || type
- end
-
- def self.id2obj(tree, id)
- tpath = tree.path
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{
- if Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[tpath]
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[tpath][id]? \
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[tpath][id] : id
- else
- id
- end
- }
- end
-
- def initialize(parent, type, keys=nil)
- @tree = parent
- @tpath = parent.path
- @type = type.to_s
- Tk::TreeCtrl::Element::TreeCtrlElementID.mutex.synchronize{
- @path = @id =
- Tk::TreeCtrl::Element::TreeCtrlElementID.join(TkCore::INTERP._ip_id_)
- Tk::TreeCtrl::Element::TreeCtrlElementID[1].succ!
- }
-
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[@tpath] ||= {}
- Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[@tpath][@id] = self
- }
-
- @tree.element_create(@id, @type, keys)
- end
-
- def id
- @id
- end
-
- def to_s
- @id.dup
- end
-
- def cget_tkstring(opt)
- @tree.element_cget_tkstring(@id, opt)
- end
- def cget(opt)
- @tree.element_cget(@id, opt)
- end
- def cget_strict(opt)
- @tree.element_cget_strict(@id, opt)
- end
-
- def configure(*args)
- @tree.element_configure(@id, *args)
- end
-
- def configinfo(*args)
- @tree.element_configinfo(@id, *args)
- end
-
- def current_configinfo(*args)
- @tree.current_element_configinfo(@id, *args)
- end
-
- def delete
- @tree.element_delete(@id)
- self
- end
-
- def element_type
- @tree.element_type(@id)
- end
-
- def element_class
- @tree.element_class(@id)
- end
-end
-
-class Tk::TreeCtrl::BitmapElement < Tk::TreeCtrl::Element
- TreeCtrlElemTypeToClass['bitmap'] = self
-
- def initialize(parent, keys=nil)
- super(parent, 'bitmap', keys)
- end
-end
-
-class Tk::TreeCtrl::BorderElement < Tk::TreeCtrl::Element
- TreeCtrlElemTypeToClass['border'] = self
-
- def initialize(parent, keys=nil)
- super(parent, 'border', keys)
- end
-end
-
-class Tk::TreeCtrl::ImageElement < Tk::TreeCtrl::Element
- TreeCtrlElemTypeToClass['image'] = self
-
- def initialize(parent, keys=nil)
- super(parent, 'image', keys)
- end
-end
-
-class Tk::TreeCtrl::RectangleElement < Tk::TreeCtrl::Element
- TreeCtrlElemTypeToClass['rect'] = self
-
- def initialize(parent, keys=nil)
- super(parent, 'rect', keys)
- end
-end
-
-#####################
-
-class Tk::TreeCtrl::Item < TkObject
- TreeCtrlItemID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.clear
- }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{
- if Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[tpath]
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[tpath][id]? \
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[tpath][id] : id
- else
- id
- end
- }
- end
-
- def initialize(parent, keys={})
- @tree = parent
- @tpath = parent.path
- @path = @id = @tree.item_create(keys)
-
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[@tpath] ||= {}
- Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[@tpath][@id] = self
- }
- end
-
- def id
- @id
- end
-
- def to_s
- @id.to_s.dup
- end
-
- def ancestors
- @tree.item_ancestors(@id)
- end
-
- def bbox(*args)
- @tree.item_bbox(@id, *args)
- end
-
- def children
- @tree.item_children(@id)
- end
-
- def collapse
- @tree.item_collapse(@id)
- self
- end
-
- def collapse_recurse
- @tree.item_collapse_recurse(@id)
- self
- end
-
- def complex(*args)
- @tree.item_complex(@id, *args)
- self
- end
-
- def cget_tkstring(opt)
- @tree.item_cget_tkstring(@id, opt)
- end
- def cget(opt)
- @tree.item_cget(@id, opt)
- end
- def cget_strict(opt)
- @tree.item_cget_strict(@id, opt)
- end
-
- def configure(*args)
- @tree.item_configure(@id, *args)
- end
-
- def configinfo(*args)
- @tree.item_configinfo(@id, *args)
- end
-
- def current_configinfo(*args)
- @tree.current_item_configinfo(@id, *args)
- end
-
- def delete
- @tree.item_delete(@id)
- self
- end
-
- def element_dump
- @tree.item_dump(@id)
- end
-
- def element_dump_hash
- @tree.item_dump_hash(@id)
- end
-
- def element_actual(column, elem, key)
- @tree.item_element_actual(@id, column, elem, key)
- end
-
- def element_cget_tkstring(opt)
- @tree.item_element_cget(@id, opt)
- end
- def element_cget_tkstring(opt)
- @tree.item_element_cget(@id, opt)
- end
- def element_cget_strict(opt)
- @tree.item_element_cget_strict(@id, opt)
- end
-
- def element_configure(*args)
- @tree.item_element_configure(@id, *args)
- end
-
- def element_configinfo(*args)
- @tree.item_element_configinfo(@id, *args)
- end
-
- def current_element_configinfo(*args)
- @tree.current_item_element_configinfo(@id, *args)
- end
-
- def expand
- @tree.item_expand(@id)
- self
- end
-
- def expand_recurse
- @tree.item_expand_recurse(@id)
- self
- end
-
- def firstchild(child=nil)
- if child
- @tree.item_firstchild(@id, child)
- self
- else
- @tree.item_firstchild(@id)
- end
- end
- alias first_child firstchild
-
- def hasbutton(st=None)
- if st == None
- @tree.item_hasbutton(@id)
- else
- @tree.item_hasbutton(@id, st)
- self
- end
- end
- alias has_button hasbutton
-
- def hasbutton?
- @tree.item_hasbutton(@id)
- end
- alias has_button? hasbutton?
-
- def index
- @tree.item_index(@id)
- end
-
- def isancestor(des)
- @tree.item_isancestor(@id, des)
- end
- alias is_ancestor isancestor
- alias isancestor? isancestor
- alias is_ancestor? isancestor
- alias ancestor? isancestor
-
- def isopen
- @tree.item_isopen(@id)
- end
- alias is_open isopen
- alias isopen? isopen
- alias is_open? isopen
- alias isopened? isopen
- alias is_opened? isopen
- alias open? isopen
-
- def lastchild(child=nil)
- if child
- @tree.item_lastchild(@id, child)
- self
- else
- @tree.item_lastchild(@id)
- end
- end
- alias last_child lastchild
-
- def nextsibling(nxt=nil)
- if nxt
- @tree.item_nextsibling(@id, nxt)
- self
- else
- @tree.item_nextsibling(@id)
- end
- end
- alias next_sibling nextsibling
-
- def numchildren
- @tree.item_numchildren(@id)
- end
- alias num_children numchildren
- alias children_size numchildren
-
- def parent_index
- @tree.item_parent(@id)
- end
-
- def prevsibling(nxt=nil)
- if nxt
- @tree.item_prevsibling(@id, nxt)
- self
- else
- @tree.item_prevsibling(@id)
- end
- end
- alias prev_sibling prevsibling
-
- def remove
- @tree.item_remove(@id)
- end
-
- def rnc
- @tree.item_rnc(@id)
- end
-
- def sort(*opts)
- @tree.item_sort(@id, *opts)
- end
- def sort_not_really(*opts)
- @tree.item_sort_not_really(@id, *opts)
- self
- end
-
- def state_forcolumn(column, *args)
- @tree.item_state_forcolumn(@id, column, *args)
- self
- end
- alias state_for_column state_forcolumn
-
- def state_get(*args)
- @tree.item_state_get(@id, *args)
- end
-
- def state_set(*args)
- @tree.item_state_set(@id, *args)
- self
- end
-
- def style_elements(column)
- @tree.item_style_elements(@id, column)
- end
-
- def style_map(column, style, map)
- @tree.item_style_map(@id, column, style, map)
- self
- end
-
- def style_set(column=nil, *args)
- if args.empty?
- @tree.item_style_set(@id, column)
- else
- @tree.item_style_set(@id, column, *args)
- self
- end
- end
-
- def item_text(column, txt=nil, *args)
- if args.empty?
- if txt
- @tree.item_text(@id, column, txt)
- self
- else
- @tree.item_text(@id, column)
- end
- else
- @tree.item_text(@id, column, txt, *args)
- self
- end
- end
-
- def toggle
- @tree.item_toggle(@id)
- self
- end
-
- def toggle_recurse
- @tree.item_toggle_recurse(@id)
- self
- end
-
- def visible(st=None)
- if st == None
- @tree.item_visible(@id)
- else
- @tree.item_visible(@id, st)
- self
- end
- end
-end
-
-#####################
-
-class Tk::TreeCtrl::Style < TkObject
- TreeCtrlStyleID_TBL = TkCore::INTERP.create_table
-
- (TreeCtrlStyleID = ['treectrl_style'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.clear
- }
- }
-
- def self.id2obj(tree, id)
- tpath = tree.path
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{
- if Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath]
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath][id]? \
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath][id] : id
- else
- id
- end
- }
- end
-
- def initialize(parent, keys=nil)
- @tree = parent
- @tpath = parent.path
-
- Tk::TreeCtrl::Style::TreeCtrlStyleID.mutex.synchronize{
- @path = @id =
- Tk::TreeCtrl::Style::TreeCtrlStyleID.join(TkCore::INTERP._ip_id_)
- Tk::TreeCtrl::Style::TreeCtrlStyleID[1].succ!
- }
-
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[@tpath] ||= {}
- Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[@tpath][@id] = self
- }
-
- @tree.style_create(@id, keys)
- end
-
- def id
- @id
- end
-
- def to_s
- @id.dup
- end
-
- def cget_tkstring(opt)
- @tree.style_cget_tkstring(@id, opt)
- end
- def cget(opt)
- @tree.style_cget(@id, opt)
- end
- def cget_strict(opt)
- @tree.style_cget_strict(@id, opt)
- end
-
- def configure(*args)
- @tree.style_configure(@id, *args)
- end
-
- def configinfo(*args)
- @tree.style_configinfo(@id, *args)
- end
-
- def current_configinfo(*args)
- @tree.current_style_configinfo(@id, *args)
- end
-
- def delete
- @tree.style_delete(@id)
- self
- end
-
- def elements(*elems)
- if elems.empty?
- @tree.style_elements(@id)
- else
- @tree.style_elements(@id, *elems)
- self
- end
- end
-
- def layout(elem, keys=None)
- if keys && keys != None && keys.kind_of?(Hash)
- @tree.style_layout(@id, elem, keys)
- self
- else
- @tree.style_layout(@id, elem, keys)
- end
- end
-end
-
-module Tk::TreeCtrl::BindCallback
- include Tk
- extend Tk
-end
-
-class << Tk::TreeCtrl::BindCallback
- def percentsCmd(*args)
- tk_call('::TreeCtrl::PercentsCmd', *args)
- end
- def cursorCheck(w, x, y)
- tk_call('::TreeCtrl::CursorCheck', w, x, y)
- end
- def cursorCheckAux(w)
- tk_call('::TreeCtrl::CursorCheckAux', w)
- end
- def cursorCancel(w)
- tk_call('::TreeCtrl::CursorCancel', w)
- end
- def buttonPress1(w, x, y)
- tk_call('::TreeCtrl::ButtonPress1', w, x, y)
- end
- def doubleButton1(w, x, y)
- tk_call('::TreeCtrl::DoubleButton1', w, x, y)
- end
- def motion1(w, x, y)
- tk_call('::TreeCtrl::Motion1', w, x, y)
- end
- def leave1(w, x, y)
- tk_call('::TreeCtrl::Leave1', w, x, y)
- end
- def release1(w, x, y)
- tk_call('::TreeCtrl::Release1', w, x, y)
- end
- def beginSelect(w, el)
- tk_call('::TreeCtrl::BeginSelect', w, el)
- end
- def motion(w, le)
- tk_call('::TreeCtrl::Motion', w, el)
- end
- def beginExtend(w, el)
- tk_call('::TreeCtrl::BeginExtend', w, el)
- end
- def beginToggle(w, el)
- tk_call('::TreeCtrl::BeginToggle', w, el)
- end
- def cancelRepeat
- tk_call('::TreeCtrl::CancelRepeat')
- end
- def autoScanCheck(w, x, y)
- tk_call('::TreeCtrl::AutoScanCheck', w, x, y)
- end
- def autoScanCheckAux(w)
- tk_call('::TreeCtrl::AutoScanCheckAux', w)
- end
- def autoScanCancel(w)
- tk_call('::TreeCtrl::AutoScanCancel', w)
- end
- def up_down(w, n)
- tk_call('::TreeCtrl::UpDown', w, n)
- end
- def left_right(w, n)
- tk_call('::TreeCtrl::LeftRight', w, n)
- end
- def setActiveItem(w, idx)
- tk_call('::TreeCtrl::SetActiveItem', w, idx)
- end
- def extendUpDown(w, amount)
- tk_call('::TreeCtrl::ExtendUpDown', w, amount)
- end
- def dataExtend(w, el)
- tk_call('::TreeCtrl::DataExtend', w, el)
- end
- def cancel(w)
- tk_call('::TreeCtrl::Cancel', w)
- end
- def selectAll(w)
- tk_call('::TreeCtrl::selectAll', w)
- end
- def marqueeBegin(w, x, y)
- tk_call('::TreeCtrl::MarqueeBegin', w, x, y)
- end
- def marqueeUpdate(w, x, y)
- tk_call('::TreeCtrl::MarqueeUpdate', w, x, y)
- end
- def marqueeEnd(w, x, y)
- tk_call('::TreeCtrl::MarqueeEnd', w, x, y)
- end
- def scanMark(w, x, y)
- tk_call('::TreeCtrl::ScanMark', w, x, y)
- end
- def scanDrag(w, x, y)
- tk_call('::TreeCtrl::ScanDrag', w, x, y)
- end
-
- # filelist-bindings
- def fileList_button1(w, x, y)
- tk_call('::TreeCtrl::FileListButton1', w, x, y)
- end
- def fileList_motion1(w, x, y)
- tk_call('::TreeCtrl::FileListMotion1', w, x, y)
- end
- def fileList_motion(w, x, y)
- tk_call('::TreeCtrl::FileListMotion', w, x, y)
- end
- def fileList_leave1(w, x, y)
- tk_call('::TreeCtrl::FileListLeave1', w, x, y)
- end
- def fileList_release1(w, x, y)
- tk_call('::TreeCtrl::FileListRelease1', w, x, y)
- end
- def fileList_edit(w, i, s, e)
- tk_call('::TreeCtrl::FileListEdit', w, i, s, e)
- end
- def fileList_editCancel(w)
- tk_call('::TreeCtrl::FileListEditCancel', w)
- end
- def fileList_autoScanCheck(w, x, y)
- tk_call('::TreeCtrl::FileListAutoScanCheck', w, x, y)
- end
- def fileList_autoScanCheckAux(w)
- tk_call('::TreeCtrl::FileListAutoScanCheckAux', w)
- end
-
- def entryOpen(w, item, col, elem)
- tk_call('::TreeCtrl::EntryOpen', w, item, col, elem)
- end
- def entryExpanderOpen(w, item, col, elem)
- tk_call('::TreeCtrl::EntryExpanderOpen', w, item, col, elem)
- end
- def entryClose(w, accept)
- tk_call('::TreeCtrl::EntryClose', w, accept)
- end
- def entryExpanderKeypress(w)
- tk_call('::TreeCtrl::EntryExpanderKeypress', w)
- end
- def textOpen(w, item, col, elem, width=0, height=0)
- tk_call('::TreeCtrl::TextOpen', w, item, col, elem, width, height)
- end
- def textExpanderOpen(w, item, col, elem, width)
- tk_call('::TreeCtrl::TextOpen', w, item, col, elem, width)
- end
- def textClose(w, accept)
- tk_call('::TreeCtrl::TextClose', w, accept)
- end
- def textExpanderKeypress(w)
- tk_call('::TreeCtrl::TextExpanderKeypress', w)
- end
-end
diff --git a/ext/tk/lib/tkextlib/trofs.rb b/ext/tk/lib/tkextlib/trofs.rb
deleted file mode 100644
index 46581a3dad..0000000000
--- a/ext/tk/lib/tkextlib/trofs.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-#
-# trofs support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/trofs/setup.rb'
-
-# load library
-require 'tkextlib/trofs/trofs.rb'
diff --git a/ext/tk/lib/tkextlib/trofs/setup.rb b/ext/tk/lib/tkextlib/trofs/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/trofs/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/trofs/trofs.rb b/ext/tk/lib/tkextlib/trofs/trofs.rb
deleted file mode 100644
index dc55ec269a..0000000000
--- a/ext/tk/lib/tkextlib/trofs/trofs.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/trofs/trofs.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/trofs/setup.rb'
-
-# TkPackage.require('trofs', '0.4')
-TkPackage.require('trofs')
-
-module Tk
- module Trofs
- extend TkCore
-
- PACKAGE_NAME = 'trofs'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('trofs')
- rescue
- ''
- end
- end
-
- ##############################################
-
- def self.create_archive(dir, archive)
- tk_call('::trofs::archive', dir, archive)
- archive
- end
-
- def self.mount(archive, mountpoint=None)
- # returns the normalized path to mountpoint
- tk_call('::trofs::mount', archive, mountpoint)
- end
-
- def self.umount(mountpoint)
- tk_call('::trofs::umount', mountpoint)
- mountpoint
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/version.rb b/ext/tk/lib/tkextlib/version.rb
deleted file mode 100644
index 68c8ae31a2..0000000000
--- a/ext/tk/lib/tkextlib/version.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: false
-#
-# release date of tkextlib
-#
-module Tk
- Tkextlib_RELEASE_DATE = '2010-02-01'.freeze
-end
diff --git a/ext/tk/lib/tkextlib/vu.rb b/ext/tk/lib/tkextlib/vu.rb
deleted file mode 100644
index 145a0b5647..0000000000
--- a/ext/tk/lib/tkextlib/vu.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# frozen_string_literal: false
-#
-# The vu widget set support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/vu/setup.rb'
-
-# load package
-# TkPackage.require('vu', '2.1')
-TkPackage.require('vu')
-
-# autoload
-module Tk
- module Vu
- TkComm::TkExtlibAutoloadModule.unshift(self)
-
- PACKAGE_NAME = 'vu'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('vu')
- rescue
- ''
- end
- end
-
- ##########################################
-
- autoload :Dial, 'tkextlib/vu/dial'
-
- autoload :Pie, 'tkextlib/vu/pie'
- autoload :PieSlice, 'tkextlib/vu/pie'
- autoload :NamedPieSlice, 'tkextlib/vu/pie'
-
- autoload :Spinbox, 'tkextlib/vu/spinbox'
-
- autoload :Bargraph, 'tkextlib/vu/bargraph'
- end
-end
diff --git a/ext/tk/lib/tkextlib/vu/bargraph.rb b/ext/tk/lib/tkextlib/vu/bargraph.rb
deleted file mode 100644
index e1d58e9555..0000000000
--- a/ext/tk/lib/tkextlib/vu/bargraph.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# frozen_string_literal: false
-#
-# ::vu::bargraph widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# create module/class
-module Tk
- module Vu
- class Bargraph < TkWindow
- end
- end
-end
-
-
-# call setup script -- <libdir>/tkextlib/vu.rb
-require 'tkextlib/vu.rb'
-
-class Tk::Vu::Bargraph < TkWindow
- TkCommandNames = ['::vu::bargraph'.freeze].freeze
- WidgetClassName = 'Bargraph'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ###############################
-
- def __boolval_optkeys
- ['showminmax', 'showvalue']
- end
- private :__boolval_optkeys
-
- def __strval_optkeys
- super() + [
- 'title',
- 'barbackground', 'barcolor', 'barcolour',
- 'tickcolor', 'tickcolour',
- 'textcolor', 'textcolour',
- ]
- end
- private :__strval_optkeys
-
- def __listval_optkeys
- ['alabels', 'blabels']
- end
- private :__listval_optkeys
-
- def __font_optkeys
- ['alabfont', 'blabfont']
- end
- private :__font_optkeys
-
- ###############################
-
- def set(val = None)
- tk_call_without_enc(@path, 'set', val)
- self
- end
-
- def get()
- num_or_str(tk_call_without_enc(@path, 'get'))
- end
-end
diff --git a/ext/tk/lib/tkextlib/vu/charts.rb b/ext/tk/lib/tkextlib/vu/charts.rb
deleted file mode 100644
index 66d5cfd394..0000000000
--- a/ext/tk/lib/tkextlib/vu/charts.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-# frozen_string_literal: false
-#
-# charts -- Create and manipulate canvas Add-On Items
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-require 'tk/canvas'
-
-# call setup script -- <libdir>/tkextlib/vu.rb
-require 'tkextlib/vu.rb'
-
-module Tk
- module Vu
- module ChartsConfig
- include TkItemConfigOptkeys
- def __item_boolval_optkeys(id)
- super(id) << 'lefttrunc' << 'autocolor'
- end
- private :__item_boolval_optkeys
-
- def __item_strval_optkeys(id)
- super(id) << 'bar' << 'color' << 'outline' <<
- 'fill' << 'scaleline' << 'stripline'
- end
- private :__item_strval_optkeys
-
- def __item_listval_optkeys(id)
- super(id) << 'values' << 'tags'
- end
- private :__item_listval_optkeys
- end
-
- class TkcSticker < TkcItem
- include ChartsConfig
-
- CItemTypeName = 'sticker'.freeze
- CItemTypeToClass[CItemTypeName] = self
- end
-
- class TkcStripchart < TkcItem
- include ChartsConfig
-
- CItemTypeName = 'stripchart'.freeze
- CItemTypeToClass[CItemTypeName] = self
- end
-
- class TkcBarchart < TkcItem
- include ChartsConfig
-
- CItemTypeName = 'barchart'.freeze
- CItemTypeToClass[CItemTypeName] = self
- end
- end
-end
diff --git a/ext/tk/lib/tkextlib/vu/dial.rb b/ext/tk/lib/tkextlib/vu/dial.rb
deleted file mode 100644
index 7eb5650df0..0000000000
--- a/ext/tk/lib/tkextlib/vu/dial.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-# frozen_string_literal: false
-#
-# ::vu::dial widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# create module/class
-module Tk
- module Vu
- class Dial < TkWindow
- end
- end
-end
-
-# call setup script -- <libdir>/tkextlib/vu.rb
-require 'tkextlib/vu.rb'
-
-# define module/class
-class Tk::Vu::Dial < TkWindow
- TkCommandNames = ['::vu::dial'.freeze].freeze
- WidgetClassName = 'Dial'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- ###############################
-
- def __methodcall_optkeys # { key=>method, ... }
- {'coords'=>'coords'}
- end
- private :__methodcall_optkeys
-
- ###############################
-
- def coords(val = nil)
- if val
- tk_send_without_enc('coords', val)
- self
- else
- tk_split_list(tk_send_without_enc('coords'))
- end
- end
-
- def constrain(val = None)
- num_or_str(tk_call(@path, 'constrain', val))
- end
-
- def get(*args)
- num_or_str(tk_call(@path, 'get', *args))
- end
-
- def identify(x, y)
- tk_call(@path, 'identify', x, y)
- end
-
- def get_label(val=nil)
- if val
- tk_call(@path, 'label', val)
- else
- ret = []
- lst = simplelist(tk_call(@path, 'label'))
- while lst.size > 0
- ret << ([num_or_str(lst.shift)] << lst.shift)
- end
- end
- end
-
- def set_label(val, str, *args)
- tk_call(@path, 'label', val, str, *args)
- self
- end
-
- def set_label_constrain(val, str, *args)
- tk_call(@path, 'label', '-constrain', val, str, *args)
- self
- end
-
- def get_tag(val=nil)
- if val
- tk_call(@path, 'tag', val)
- else
- ret = []
- lst = simplelist(tk_call(@path, 'tag'))
- while lst.size > 0
- ret << ([num_or_str(lst.shift)] << lst.shift)
- end
- end
- end
-
- def set_tag(val, str, *args)
- tk_call(@path, 'tag', val, str, *args)
- self
- end
-
- def set_tag_constrain(val, str, *args)
- tk_call(@path, 'tag', '-constrain', val, str, *args)
- self
- end
-
- def set(val = None)
- tk_call_without_enc(@path, 'set', val)
- self
- end
-end
diff --git a/ext/tk/lib/tkextlib/vu/pie.rb b/ext/tk/lib/tkextlib/vu/pie.rb
deleted file mode 100644
index fb9920cc68..0000000000
--- a/ext/tk/lib/tkextlib/vu/pie.rb
+++ /dev/null
@@ -1,287 +0,0 @@
-# frozen_string_literal: false
-#
-# ::vu::pie widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# create module/class
-module Tk
- module Vu
- module PieSliceConfigMethod
- end
- class Pie < TkWindow
- end
- class PieSlice < TkObject
- end
- class NamedPieSlice < PieSlice
- end
- end
-end
-
-# call setup script -- <libdir>/tkextlib/vu.rb
-require 'tkextlib/vu.rb'
-
-module Tk::Vu::PieSliceConfigMethod
- include TkItemConfigMethod
-
- def __item_pathname(tagOrId)
- if tagOrId.kind_of?(Tk::Vu::PieSlice)
- self.path + ';' + tagOrId.id.to_s
- else
- self.path + ';' + tagOrId.to_s
- end
- end
- private :__item_pathname
-end
-
-class Tk::Vu::Pie < TkWindow
- TkCommandNames = ['::vu::pie'.freeze].freeze
- WidgetClassName = 'Pie'.freeze
- WidgetClassNames[WidgetClassName] ||= self
-
- def __destroy_hook__
- Tk::Vu::PieSlice::SliceID_TBL.delete(@path)
- end
-
- ###############################
-
- include Tk::Vu::PieSliceConfigMethod
-
- def tagid(tag)
- if tag.kind_of?(Tk::Vu::PieSlice)
- tag.id
- else
- # tag
- _get_eval_string(tag)
- end
- end
-
- ###############################
-
- def delete(*glob_pats)
- tk_call(@path, 'delete', *glob_pats)
- self
- end
-
- def explode(slice, *args)
- tk_call(@path, 'explode', slice, *args)
- self
- end
-
- def explode_value(slice)
- num_or_str(tk_call(@path, 'explode', slice))
- end
-
- def lower(slice, below=None)
- tk_call(@path, 'lower', slice, below)
- self
- end
-
- def names(*glob_pats)
- simplelist(tk_call(@path, 'names', *glob_pats))
- end
- alias slices names
-
- def order(*args)
- tk_call(@path, 'order', *args)
- self
- end
-
- def raise(slice, above=None)
- tk_call(@path, 'raise', slice, above)
- self
- end
-
- def swap(slice1, slice2)
- tk_call(@path, 'swap', slice1, slice2)
- self
- end
-
- def set(slice, *args)
- num_or_str(tk_call(@path, 'set', slice, *args))
- end
- alias set_value set
- alias set_values set
- alias create set
-
- def slice_value(slice)
- num_or_str(tk_call(@path, 'set', slice))
- end
-
- def value(val = None)
- num_or_str(tk_call_without_enc(@path, 'value'))
- end
- alias sum_value value
-end
-
-class Tk::Vu::PieSlice
- SliceID_TBL = TkCore::INTERP.create_table
-
- (Pie_Slice_ID = ['vu:pie'.freeze, TkUtil.untrust('00000')]).instance_eval{
- @mutex = Mutex.new
- def mutex; @mutex; end
- freeze
- }
-
- TkCore::INTERP.init_ip_env{
- SliceID_TBL.mutex.synchronize{ SliceID_TBL.clear }
- }
-
- def self.id2obj(pie, id)
- pie_path = pie.path
- SliceID_TBL.mutex.synchronize{
- if SliceID_TBL[pie_path]
- SliceID_TBL[pie_path][id]? SliceID_TBL[pie_path][id]: id
- else
- id
- end
- }
- end
-
- def initialize(parent, *args)
- unless parent.kind_of?(Tk::Vu::Pie)
- fail ArgumentError, "expect a Tk::Vu::Pie instance for 1st argument"
- end
- @parent = @pie = parent
- @ppath = parent.path
- Pie_Slice_ID.mutex.synchronize{
- @path = @id = Pie_Slice_ID.join(TkCore::INTERP._ip_id_)
- Pie_Slice_ID[1].succ!
- }
- SliceID_TBL.mutex.synchronize{
- SliceID_TBL[@ppath] = {} unless SliceID_TBL[@ppath]
- SliceID_TBL[@ppath][@id] = self
- }
-
- if args[-1].kind_of?(Hash)
- keys = args.unshift
- end
- @pie.set(@id, *args)
- configure(keys)
- end
-
- def id
- @id
- end
-
- def [](key)
- cget key
- end
-
- def []=(key,val)
- configure key, val
- val
- end
-
- def cget_tkstring(slot)
- @pie.itemcget_tkstring(@id, slot)
- end
-
- def cget(slot)
- @pie.itemcget(@id, slot)
- end
-
- def cget_strict(slot)
- @pie.itemcget_strict(@id, slot)
- end
-
- def configure(*args)
- @pie.itemconfigure(@id, *args)
- self
- end
-
- def configinfo(*args)
- @pie.itemconfiginfo(@id, *args)
- end
-
- def current_configinfo(*args)
- @pie.current_itemconfiginfo(@id, *args)
- end
-
- def delete
- @pie.delete(@id)
- end
-
- def explode(value)
- @pie.explode(@id, value)
- self
- end
-
- def explode_value
- @pie.explode_value(@id)
- end
-
- def lower(other=None)
- @pie.lower(@id, other)
- self
- end
-
- def raise(other=None)
- @pie.raise(@id, other)
- self
- end
-
- def set(value)
- @pie.set(@id, value)
- self
- end
- alias set_value set
-
- def value
- @pie.set(@id)
- end
-end
-
-class Tk::Vu::NamedPieSlice
- def self.new(parent, name, *args)
- obj = nil
- SliceID_TBL.mutex.synchronize{
- if SliceID_TBL[parent.path] && SliceID_TBL[parent.path][name]
- obj = SliceID_TBL[parent.path][name]
- else
- #super(parent, name, *args)
- unless parent.kind_of?(Tk::Vu::Pie)
- fail ArgumentError, "expect a Tk::Vu::Pie instance for 1st argument"
- end
- obj = self.allocate
- obj.instance_eval{
- @parent = @pie = parent
- @ppath = parent.path
- @path = @id = name.to_s
- SliceID_TBL[@ppath] = {} unless SliceID_TBL[@ppath]
- SliceID_TBL[@ppath][@id] = self
- }
- end
- }
- obj.instance_eval{
- if args[-1].kind_of?(Hash)
- keys = args.unshift
- end
- @pie.set(@id, *args)
- configure(keys)
- }
-
- obj
- end
-
- def initialize(parent, name, *args)
- # dummy:: not called by 'new' method
- unless parent.kind_of?(Tk::Vu::Pie)
- fail ArgumentError, "expect a Tk::Vu::Pie instance for 1st argument"
- end
- @parent = @pie = parent
- @ppath = parent.path
- @path = @id = name.to_s
- SliceID_TBL.mutex.synchronize{
- SliceID_TBL[@ppath] = {} unless SliceID_TBL[@ppath]
- SliceID_TBL[@ppath][@id] = self
- }
-
- if args[-1].kind_of?(Hash)
- keys = args.unshift
- end
- @pie.set(@id, *args)
- configure(keys)
- end
-end
diff --git a/ext/tk/lib/tkextlib/vu/setup.rb b/ext/tk/lib/tkextlib/vu/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/vu/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/vu/spinbox.rb b/ext/tk/lib/tkextlib/vu/spinbox.rb
deleted file mode 100644
index 082ebd1f62..0000000000
--- a/ext/tk/lib/tkextlib/vu/spinbox.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: false
-#
-# ::vu::spinbox widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# a standard spinbox (<= 8.3)
-# This is the same as the 8.4 core spinbox widget.
-#
-require 'tk'
-
-if (Tk::TK_MAJOR_VERSION < 8 ||
- (Tk::TK_MAJOR_VERSION == 8 && Tk::TK_MINOR_VERSION < 4))
- # call setup script -- <libdir>/tkextlib/vu.rb
- require 'tkextlib/vu.rb'
-
- Tk.tk_call('namespace', 'import', '::vu::spinbox')
-end
-
-module Tk
- module Vu
- Spinbox = Tk::Spinbox
- end
-end
diff --git a/ext/tk/lib/tkextlib/winico.rb b/ext/tk/lib/tkextlib/winico.rb
deleted file mode 100644
index 996fc409b8..0000000000
--- a/ext/tk/lib/tkextlib/winico.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: false
-#
-# winico -- Windows Icon extension support
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/tktable/setup.rb'
-
-# load library
-require 'tkextlib/winico/winico'
diff --git a/ext/tk/lib/tkextlib/winico/setup.rb b/ext/tk/lib/tkextlib/winico/setup.rb
deleted file mode 100644
index cc967dced6..0000000000
--- a/ext/tk/lib/tkextlib/winico/setup.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-#
-# setup.rb -- setup script before calling TkPackage.require()
-#
-# If you need some setup operations (for example, add a library path
-# to the library search path) before using Tcl/Tk library packages
-# wrapped by Ruby scripts in this directory, please write the setup
-# operations in this file.
-#
diff --git a/ext/tk/lib/tkextlib/winico/winico.rb b/ext/tk/lib/tkextlib/winico/winico.rb
deleted file mode 100644
index dda0357a16..0000000000
--- a/ext/tk/lib/tkextlib/winico/winico.rb
+++ /dev/null
@@ -1,225 +0,0 @@
-# frozen_string_literal: false
-#
-# tkextlib/winico/winico.rb
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-
-require 'tk'
-
-# call setup script for general 'tkextlib' libraries
-require 'tkextlib/setup.rb'
-
-# call setup script
-require 'tkextlib/winico/setup.rb'
-
-# TkPackage.require('winico', '0.5')
-# TkPackage.require('winico', '0.6')
-TkPackage.require('winico')
-
-module Tk
- class Winico < TkObject
- PACKAGE_NAME = 'winico'.freeze
- def self.package_name
- PACKAGE_NAME
- end
-
- def self.package_version
- begin
- TkPackage.require('winico')
- rescue
- ''
- end
- end
- end
-end
-
-class Tk::Winico
- WinicoID_TBL = TkCore::INTERP.create_table
-
- TkCore::INTERP.init_ip_env{
- WinicoID_TBL.mutex.synchronize{ WinicoID_TBL.clear }
- }
-
- def self.id2obj(id)
- WinicoID_TBL.mutex.synchronize{
- (WinicoID_TBL.key?(id))? WinicoID_TBL[id] : id
- }
- end
-
- def self.info
- simplelist(Tk.tk_call('winico', 'info')).collect{|id|
- Tk::Winico.id2obj(id)
- }
- end
-
- def self.icon_info(id)
- simplelist(Tk.tk_call('winico', 'info', id)).collect{|inf|
- h = Hash[*list(inf)]
- h.keys.each{|k| h[k[1..-1]] = h.delete(k)}
- }
- end
-
- #################################
-
- def self.new_from_file(file_name)
- self.new(file_name)
- end
-
- def self.new_from_resource(resource_name, file_name = nil)
- self.new(file_name, resource_name)
- end
-
- def initialize(file_name, resource_name=nil, winico_id=nil)
- if resource_name
- # from resource
- if file_name
- @id = Tk.tk_call('winico', 'load', resource_name, file_name)
- else
- @id = Tk.tk_call('winico', 'load', resource_name)
- end
- elsif file_name
- # from .ico file
- @id = Tk.tk_call('winico', 'createfrom', file_name)
- elsif winico_id
- @id = winico_id
- else
- fail ArgumentError,
- "must be given proper information from where loading icons"
- end
- @path = @id
- WinicoID_TBL.mutex.synchronize{
- WinicoID_TBL[@id] = self
- }
- end
-
- def id
- @id
- end
-
- def set_window(win_id, *opts) # opts := ?'big'|'small'?, ?pos?
- # NOTE:: the window, which is denoted by win_id, MUST BE MAPPED.
- # If not, then this may fail or crash.
- tk_call('winico', 'setwindow', win_id, @id, *opts)
- end
-
- def delete
- tk_call('winico', 'delete', @id)
- WinicoID_TBL.mutex.synchronize{
- WinicoID_TBL.delete(@id)
- }
- self
- end
- alias destroy delete
-
- def info
- Tk::Winico.icon_info(@id)
- end
-
- #################################
-
- class Winico_callback < TkValidateCommand
- class ValidateArgs < TkUtil::CallbackSubst
- KEY_TBL = [
- [ ?m, ?s, :message ],
- [ ?i, ?x, :icon ],
- [ ?x, ?n, :x ],
- [ ?y, ?n, :y ],
- [ ?X, ?n, :last_x ],
- [ ?Y, ?n, :last_y ],
- [ ?t, ?n, :tickcount ],
- [ ?w, ?n, :icon_idnum ],
- [ ?l, ?n, :msg_idnum ],
- nil
- ]
-
- PROC_TBL = [
- [ ?n, TkComm.method(:number) ],
- [ ?s, TkComm.method(:string) ],
- [ ?x, proc{|id|
- Tk::Winico::WinicoID_TBL.mutex.synchronize{
- if Tk::Winico::WinicoID_TBL.key?(id)
- obj = Tk::Winico::WinicoID_TBL[id]
- else
- # Tk::Winico.new(nil, nil, id)
- obj = Tk::Winico.allocate
- obj.instance_eval{ @path = @id = id }
- Tk::Winico::WinicoID_TBL[id] = obj
- end
- obj
- }
- } ],
- nil
- ]
-
-=begin
- # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) )
- KEY_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String)
- end
- inf
- }
-
- PROC_TBL.map!{|inf|
- if inf.kind_of?(Array)
- inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String)
- end
- inf
- }
-=end
-
- _setup_subst_table(KEY_TBL, PROC_TBL);
-
- def self.ret_val(val)
- val
- end
- end
-
- def self._config_keys
- ['callback']
- end
- end
-
- #################################
-
- def add_to_taskbar(keys = {})
- keys = _symbolkey2str(keys)
- Winico_callback._config_keys.each{|k|
- if keys[k].kind_of?(Array)
- cmd, *args = keys[k]
- #keys[k] = Winico_callback.new(cmd, args.join(' '))
- keys[k] = Winico_callback.new(cmd, *args)
- # elsif keys[k].kind_of?(Proc)
- elsif TkComm._callback_entry?(keys[k])
- keys[k] = Winico_callback.new(keys[k])
- end
- }
- tk_call('winico', 'taskbar', 'add', @id, *(hash_kv(keys)))
- self
- end
- alias taskbar_add add_to_taskbar
-
- def modify_taskbar(keys = {})
- keys = _symbolkey2str(keys)
- Winico_callback._config_keys.each{|k|
- if keys[k].kind_of?(Array)
- cmd, *args = keys[k]
- #keys[k] = Winico_callback.new(cmd, args.join(' '))
- keys[k] = Winico_callback.new(cmd, *args)
- # elsif keys[k].kind_of?(Proc)
- elsif TkComm._callback_entry?(keys[k])
- keys[k] = Winico_callback.new(keys[k])
- end
- }
- tk_call('winico', 'taskbar', 'modify', @id, *(hash_kv(keys)))
- self
- end
- alias taskbar_modify modify_taskbar
-
- def delete_from_taskbar
- tk_call('winico', 'taskbar', 'delete', @id)
- self
- end
- alias taskbar_delete delete_from_taskbar
-end
diff --git a/ext/tk/lib/tkfont.rb b/ext/tk/lib/tkfont.rb
deleted file mode 100644
index 6036006aac..0000000000
--- a/ext/tk/lib/tkfont.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkfont.rb - load tk/font.rb
-#
-require 'tk/font'
diff --git a/ext/tk/lib/tkmacpkg.rb b/ext/tk/lib/tkmacpkg.rb
deleted file mode 100644
index 4f76c2feb8..0000000000
--- a/ext/tk/lib/tkmacpkg.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkmacpkg.rb - load tk/macpkg.rb
-#
-require 'tk/macpkg'
diff --git a/ext/tk/lib/tkmenubar.rb b/ext/tk/lib/tkmenubar.rb
deleted file mode 100644
index 43109e2b67..0000000000
--- a/ext/tk/lib/tkmenubar.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkmenubar.rb - load tk/menubar.rb
-#
-require 'tk/menubar'
diff --git a/ext/tk/lib/tkmngfocus.rb b/ext/tk/lib/tkmngfocus.rb
deleted file mode 100644
index 43abd210c9..0000000000
--- a/ext/tk/lib/tkmngfocus.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkmngfocus.rb - load tk/mngfocus.rb
-#
-require 'tk/mngfocus'
diff --git a/ext/tk/lib/tkpalette.rb b/ext/tk/lib/tkpalette.rb
deleted file mode 100644
index f4e7321c47..0000000000
--- a/ext/tk/lib/tkpalette.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkpalette.rb - load tk/palette.rb
-#
-require 'tk/palette'
diff --git a/ext/tk/lib/tkscrollbox.rb b/ext/tk/lib/tkscrollbox.rb
deleted file mode 100644
index c316ce2ea6..0000000000
--- a/ext/tk/lib/tkscrollbox.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkscrollbox.rb - load tk/scrollbox.rb
-#
-require 'tk/scrollbox'
diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb
deleted file mode 100644
index 8ed41ac15a..0000000000
--- a/ext/tk/lib/tktext.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tktext.rb - load tk/text.rb
-#
-require 'tk/text'
diff --git a/ext/tk/lib/tkvirtevent.rb b/ext/tk/lib/tkvirtevent.rb
deleted file mode 100644
index 4efa790505..0000000000
--- a/ext/tk/lib/tkvirtevent.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkvirtevent.rb - load tk/virtevent.rb
-#
-require 'tk/virtevent'
diff --git a/ext/tk/lib/tkwinpkg.rb b/ext/tk/lib/tkwinpkg.rb
deleted file mode 100644
index 97c84f8ab1..0000000000
--- a/ext/tk/lib/tkwinpkg.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# frozen_string_literal: false
-#
-# tkwinpkg.rb - load tk/winpkg.rb
-#
-require 'tk/winpkg'
diff --git a/ext/tk/old-README.tcltklib.ja b/ext/tk/old-README.tcltklib.ja
deleted file mode 100644
index e29b389402..0000000000
--- a/ext/tk/old-README.tcltklib.ja
+++ /dev/null
@@ -1,159 +0,0 @@
-(tof)
- 2003/06/19 Hidetoshi NAGAI
-
-本ドキュメントã«ã¯å¤ã„ tcltk ライブラリ,tcltklib ライブラリã®èª¬æ˜Ž
-ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒï¼Œãã®è¨˜è¿°å†…容ã¯å¤ã„ã‚‚ã®ã¨ãªã£ã¦ã„ã¾ã™ï¼Ž
-
-ã¾ãšï¼Œç¾åœ¨ã® Ruby/Tk ã®ä¸­å¿ƒã§ã‚ã‚‹ tk.rb 㯠wish を呼ã³å‡ºã—ãŸã‚Šã¯ã›
-ãšï¼Œtcltklib ライブラリを wrap ã—ã¦å‹•ä½œã™ã‚‹ã‚‚ã®ã¨ãªã£ã¦ã„ã¾ã™ï¼Žãã®
-ãŸã‚,å¤ã„説明記述ã§è¿°ã¹ã‚‰ã‚Œã¦ã„るよã†ãªãƒ—ロセス間通信ã«ã‚ˆã‚‹ã‚ªãƒ¼ãƒ
-ヘッドã¯å­˜åœ¨ã—ã¾ã›ã‚“.
-
-ç¾åœ¨ã® tcltklib ライブラリã§ã‚‚,Tcl/Tk ã® C ライブラリをリンクã—ã¦
-直接ã«å‹•ã‹ã™ã“ã¨ã§ï¼Œã‚ªãƒ¼ãƒãƒ˜ãƒƒãƒ‰ã‚’押ã•ãˆã¤ã¤ Tcl/Tk インタープリタ
-ã®ã»ã¼å…¨æ©Ÿèƒ½ï¼ˆæ‹¡å¼µãƒ©ã‚¤ãƒ–ラリをå«ã‚€ï¼‰ã‚’使ãˆã‚‹ç‚¹ã¯åŒã˜ã§ã™ï¼Žã—ã‹ã—,
-ãã®å½¹å‰²ã¯ã»ã¼ã€Œtk.rb 以下ã®ãƒ©ã‚¤ãƒ–ラリを効果的ã«åƒã‹ã›ã‚‹ãŸã‚ã®ã‚‚ã®ã€
-ã¨è¦‹ãªã•ã‚Œã¦ãŠã‚Šï¼Œãã®ç›®çš„ã§ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã•ã‚Œã¦ã„ã¾ã™ï¼Ž
-
-tk.rb ã®é«˜æ©Ÿèƒ½åŒ–ã«ä¼´ã£ã¦ï¼Œä¸­æ°´æº–ã®ãƒ©ã‚¤ãƒ–ラリã§ã‚ã‚‹ tcltk ライブラリ
-(tcltk.rb)ã¯ãã®å­˜åœ¨æ„義を減ã˜ã¦ãŠã‚Šï¼Œç¾åœ¨ã§ã¯ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã¯è¡Œã‚
-ã‚Œã¦ã„ã¾ã›ã‚“.
-
-ãªãŠï¼Œå¤ã„説明ã§ã¯ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã«ãŠã‘るスクリプトã®è¿½åŠ ã¯ã§ããªã„ã“
-ã¨ã¨ãªã£ã¦ã„ã¾ã™ãŒï¼Œç¾åœ¨ã® tk.rb ã§ã¯ã“れもå¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’補足ã—ã¦
-ãŠãã¾ã™ï¼Ž
-
-以下ãŒãƒ©ã‚¤ãƒ–ラリã®å¤ã„説明文書ã§ã™ï¼Ž
-==============================================================
- tcltk ライブラリ
- tcltklib ライブラリ
- Sep. 19, 1997 Y. Shigehiro
-
-以下, 「tcl/tkã€ã¨ã„ã†è¡¨è¨˜ã¯, tclsh ã‚„ wish を実ç¾ã—ã¦ã„ã‚‹, 一般ã§ã„ã†
-ã¨ã“ã‚ã® tcl/tk を指ã—ã¾ã™. 「tcltk ライブラリã€, 「tcltklib ライブラ
-リã€ã¨ã„ã†è¡¨è¨˜ã¯, 本パッケージã«å«ã¾ã‚Œã‚‹ ruby 用ã®ãƒ©ã‚¤ãƒ–ラリを指ã—ã¾ã™.
-
-[ファイルã«ã¤ã„ã¦]
-
-README.euc : ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«(注æ„, 特徴, インストールã®æ–¹æ³•).
-MANUAL.euc : マニュアル.
-
-lib/, ext/ : ライブラリã®å®Ÿä½“.
-
-sample/ : マニュアル代ã‚ã‚Šã®ã‚µãƒ³ãƒ—ルプログラム.
-sample/sample0.rb : tcltklib ライブラリã®ãƒ†ã‚¹ãƒˆ.
-sample/sample1.rb : tcltk ライブラリã®ãƒ†ã‚¹ãƒˆ.
- tcl/tk (wish) ã§ã§ããã†ãªã“ã¨ã‚’一通り書ã„ã¦ã¿ã¾ã—ãŸ.
-sample/sample2.rb : tcltk ライブラリã®ã‚µãƒ³ãƒ—ル.
- maeda shugo (shugo@po.aianet.ne.jp) æ°ã«ã‚ˆã‚‹
- (`rb.tk' ã§æ›¸ã‹ã‚Œã¦ã„ãŸ) ruby ã®ã‚µãƒ³ãƒ—ルプログラム
- http://www.aianet.or.jp/~shugo/ruby/othello.rb.gz
- ã‚’ tcltk ライブラリを使ã†ã‚ˆã†ã«, 機械的ã«å¤‰æ›´ã—ã¦ã¿ã¾ã—ãŸ.
-
-demo/ : 100 本ã®ç·šã‚’ 100 回æãデモプログラム.
- 最åˆã«ç©ºãƒ«ãƒ¼ãƒ—ã®æ™‚間を測定ã—, 続ã„ã¦å®Ÿéš›ã«ç·šã‚’引ã時間を測定ã—ã¾ã™.
- tcl/tk ã¯(å†)æç”»ã®ã¨ãã« backing store を使ã‚ãšã«å¾‹ç¾©ã« 10000 本(?)
- 線を引ãã®ã§, (å†)æ画を始ã‚ã‚‹ã¨, マシンãŒã‹ãªã‚Šé‡ããªã‚Šã¾ã™.
-demo/lines0.tcl : wish 用ã®ã‚¹ã‚¯ãƒªãƒ—ト.
-demo/lines1.rb : `tk.rb' 用ã®ã‚¹ã‚¯ãƒªãƒ—ト.
-demo/lines2.rb : tcltk ライブラリ用ã®ã‚¹ã‚¯ãƒªãƒ—ト.
-
-[注æ„]
-
-コンパイル/実行ã«ã¯, tcl/tk ã® C ライブラリãŒå¿…è¦ã§ã™.
-
-ã“ã®ãƒ©ã‚¤ãƒ–ラリã¯,
-
- ruby-1.0-970701, ruby-1.0-970911, ruby-1.0-970919
- FreeBSD 2.2.2-RELEASE
- ãŠã‚ˆã³ãã®ãƒ‘ッケージ jp-tcl-7.6.tgz, jp-tk-4.2.tgz
-
-ã§ä½œæˆ/動作確èªã—ã¾ã—ãŸ. ä»–ã®ç’°å¢ƒã§ã¯å‹•ä½œã™ã‚‹ã‹ã©ã†ã‹ã‚ã‹ã‚Šã¾ã›ã‚“.
-
-TclTkLib.mainloop を実行中㫠Control-C ãŒåŠ¹ã‹ãªã„ã®ã¯ä¸ä¾¿ãªã®ã§, ruby
-ã®ã‚½ãƒ¼ã‚¹ã‚’å‚考ã«, #include "sig.h" ã—㦠trap_immediate ã‚’æ“作ã—ã¦ã„ã¾
-ã™ãŒ, ruby ã® README.EXT ã«ã‚‚書ã„ã¦ãªã„ã®ã«, ã“ã‚“ãªã“ã¨ã‚’ã—ã¦è‰¯ã„ã®ã‹
-ã©ã†ã‹ã‚ã‹ã‚Šã¾ã›ã‚“.
-
--d オプションã§ãƒ‡ãƒãƒƒã‚°æƒ…報を表示ã•ã›ã‚‹ãŸã‚ã«, ruby ã®ã‚½ãƒ¼ã‚¹ã‚’å‚考ã«,
-debug ã¨ã„ã†å¤§åŸŸå¤‰æ•°ã‚’å‚ç…§ã—ã¦ã„ã¾ã™ãŒ, ruby ã® README.EXT ã«ã‚‚書ã„ã¦
-ãªã„ã®ã«, ã“ã‚“ãªã“ã¨ã‚’ã—ã¦è‰¯ã„ã®ã‹ã©ã†ã‹ã‚ã‹ã‚Šã¾ã›ã‚“.
-
-extconf.rb ã¯æ›¸ãã¾ã—ãŸãŒ, (ã„ã‚ã„ã‚ãªæ„味ã§)ã“ã‚Œã§è‰¯ã„ã®ã‹è‰¯ã分ã‹ã‚Š
-ã¾ã›ã‚“.
-
-[特徴]
-
-ruby ã‹ã‚‰ tcl/tk ライブラリを利用ã§ãã¾ã™.
-
-tcl/tk インタプリタã®ã‚¹ã‚¯ãƒªãƒ—トã¯, 機械的㫠tcltk ライブラリ用㮠ruby
-スクリプトã«å¤‰æ›ã§ãã¾ã™.
-
-(`tk.rb' ã¨ã®é•ã„)
-
-1. tcl/tk インタプリタã®ã‚¹ã‚¯ãƒªãƒ—トãŒ, ã©ã®ã‚ˆã†ã«, tcltk ライブラリ用ã®
- ruby スクリプトã«å¤‰æ›ã•ã‚Œã‚‹ã‹ãŒç†è§£ã§ãã‚Œã°, マニュアル類ãŒç„¡ã„ã«ç­‰
- ã—ã„ `tk.rb' ã¨ã¯ç•°ãªã‚Š
-
- tcl/tk ã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã‚„オンラインドキュメントを用ã„ã¦
-
- 効率良ãプログラミングを行ã†ã“ã¨ãŒã§ãã¾ã™.
- 記述方法ãŒã‚ã‹ã‚‰ãªã„, コマンドã«ä¸Žãˆã‚‹ãƒ‘ラメータãŒã‚ã‹ã‚‰ãªã„...
- - Canvas.new { ... } ã¨, ãªãœã‚¤ãƒ†ãƒ¬ãƒ¼ã‚¿ãƒ–ロックを書ã‘ã‚‹ã®??
- - Canvas ã® bbox ã¯æ•°å€¤ã®ãƒªã‚¹ãƒˆã‚’è¿”ã™ã®ã«, xview ã¯æ–‡å­—列を返ã™ã®??
- ã¨, ã„ã¡ã„ã¡, ライブラリã®ã‚½ãƒ¼ã‚¹ã‚’追ã„ã‹ã‘ã‚‹å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“.
-
-2. 個々ã®æ©Ÿèƒ½(オプション)を個別処ç†ã«ã‚ˆã‚Šã‚µãƒãƒ¼ãƒˆã—ã¦ãŠã‚Š, ãã®ãŸã‚サ
- ãƒãƒ¼ãƒˆã—ã¦ã„ãªã„機能ã¯ä½¿ã†ã“ã¨ãŒã§ããªã„(本当ã¯ä½¿ãˆãªã„ã“ã¨ã‚‚ãªã„ã®
- ã§ã™ãŒ) `tk.rb' ã¨ã¯ç•°ãªã‚Š, tcl/tk インタプリタã§å¯èƒ½ãªã“ã¨ã¯
-
- ã»ã¨ã‚“ã©
-
- ruby ã‹ã‚‰ã‚‚実行ã§ãã¾ã™. ç¾åœ¨, ruby ã‹ã‚‰å®Ÿè¡Œã§ããªã„ã“ã¨ãŒç¢ºèªã•ã‚Œ
- ã¦ã„ã‚‹ã®ã¯,
-
- bind コマンドã§ã‚¹ã‚¯ãƒªãƒ—トを追加ã™ã‚‹æ§‹æ–‡
- 「bind tag sequence +scriptã€
- ^
-
- ã®ã¿ã§ã™.
- - `. configure -width' ã‚’ã—よã†ã¨ã—ã¦, `Tk.root.height()' ã¨æ›¸ã„
- ãŸã®ã«, `undefined method `height'' ã¨æ€’られã¦ã—ã¾ã£ãŸ. tk.rb ã‚’
- 読んã§ã¿ã¦, ガーン. ã§ããªã„ã®ã‹...
- ã¨ã„ã†ã“ã¨ã¯ã‚ã‚Šã¾ã›ã‚“.
-
-3. wish プロセスを起動ã—プロセス間通信㧠wish を利用ã™ã‚‹ `tk.rb' ã¨ã¯
- ç•°ãªã‚Š, tcl/tk ã® C ライブラリをリンクã—
-
- より高速㫠(ã¨ã„ã£ã¦ã‚‚, æ€ã£ãŸç¨‹ã¯é€Ÿããªã„ã§ã™ãŒ)
-
- 処ç†ã‚’è¡Œã„ã¾ã™.
-
-4. `tk.rb' ã»ã©, 高水準ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚’å‚™ãˆã¦ã„ãªã„ãŸã‚, tcl/tk イ
- ンタプリタã®ç”Ÿæˆç­‰
-
- 何ã‹ã‚‰ä½•ã¾ã§è‡ªåˆ†ã§è¨˜è¿°
-
- ã—ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“(ãã®ä»£ã‚ã‚Š, tcl/tk ライブラリã®ä»•æ§˜é€šã‚Š,
- tcl/tk インタプリタを複数生æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒ).
- インターフェースã¯(ãŠãらã) ruby ã®æ€æƒ³ã«æ²¿ã£ãŸã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“.
- ã¾ãŸ, スクリプトã®è¨˜è¿°ã¯
-
- ダサダサ
-
- ã§ã™. スクリプトã¯, 一見, 読ã¿ã¥ã‚‰ã„ã‚‚ã®ã¨ãªã‚Šã¾ã™. ãŒ, 書ã人ã«ã¨ã£
- ã¦ã¯, ãã‚Œã»ã©ç…©ã‚ã—ã„ã‚‚ã®ã§ã¯ãªã„ã¨æ€ã„ã¾ã™.
-
-[インストールã®æ–¹æ³•]
-
-0. ruby ã®ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«(ruby-1.0-ãªã‚“ãŸã‚‰.tgz)を展開ã—ã¦ãŠãã¾ã™.
-
-1. ruby-1.0-ãªã‚“ãŸã‚‰/ext ã« ext/tcltklib をコピーã—ã¾ã™.
- cp -r ext/tcltklib ???/ruby-1.0-ãªã‚“ãŸã‚‰/ext/
-
-2. ruby ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ³•ã«å¾“ã„ make 等をã—ã¾ã™.
-
-3. ruby ã®ãƒ©ã‚¤ãƒ–ラリ置場㫠lib/* をコピーã—ã¾ã™.
- cp lib/* /usr/local/lib/ruby/
-
-(eof)
diff --git a/ext/tk/old-extconf.rb b/ext/tk/old-extconf.rb
deleted file mode 100644
index a13fa4c46e..0000000000
--- a/ext/tk/old-extconf.rb
+++ /dev/null
@@ -1,441 +0,0 @@
-# frozen_string_literal: false
-# extconf.rb for tcltklib
-
-require 'mkmf'
-
-is_win32 = (/mswin|mingw|cygwin|bccwin/ =~ RUBY_PLATFORM)
-#is_macosx = (/darwin/ =~ RUBY_PLATFORM)
-
-have_func("ruby_native_thread_p", "ruby.h")
-have_func("rb_errinfo", "ruby.h")
-have_func("rb_safe_level", "ruby.h")
-have_struct_member("struct RArray", "ptr", "ruby.h")
-have_struct_member("struct RArray", "len", "ruby.h")
-
-def find_framework(tcl_hdr, tk_hdr)
- if framework_dir = with_config("tcltk-framework")
- paths = [framework_dir]
- else
- unless tcl_hdr || tk_hdr ||
- enable_config("tcltk-framework", false) ||
- enable_config("mac-tcltk-framework", false)
- return false
- end
- paths = ["/Library/Frameworks", "/System/Library/Frameworks"]
- end
-
- checking_for('Tcl/Tk Framework') {
- paths.find{|dir|
- dir.strip!
- dir.chomp!('/')
- (tcl_hdr || FileTest.directory?(dir + "/Tcl.framework/") ) &&
- (tk_hdr || FileTest.directory?(dir + "/Tk.framework/") )
- }
- }
-end
-
-tcl_framework_header = with_config("tcl-framework-header")
-tk_framework_header = with_config("tk-framework-header")
-
-tcltk_framework = find_framework(tcl_framework_header, tk_framework_header)
-
-unless is_win32
- have_library("nsl", "t_open")
- have_library("socket", "socket")
- have_library("dl", "dlopen")
- have_library("m", "log")
-end
-
-tk_idir, tk_ldir = dir_config("tk")
-tcl_idir, tcl_ldir = dir_config("tcl")
-x11_idir, x11_ldir = dir_config("X11")
-
-tk_ldir2 = with_config("tk-lib")
-tcl_ldir2 = with_config("tcl-lib")
-x11_ldir2 = with_config("X11-lib")
-
-tk_ldir_list = [tk_ldir2, tk_ldir]
-tcl_ldir_list = [tcl_ldir2, tcl_ldir]
-
-tklib = with_config("tklib")
-tcllib = with_config("tcllib")
-stubs = enable_config("tcltk_stubs") || with_config("tcltk_stubs")
-
-tcltk_version = with_config("tcltkversion")
-
-use_X = with_config("X11", (! is_win32))
-
-def parse_tclConfig(file)
- # check tclConfig.sh/tkConfig.sh
- tbl = {}
- IO.foreach(file){|line|
- line.strip!
- next if line !~ /^([^\#=][^=]*)=(['"]|)(.*)\2$/
- key, val = $1, $3
- tbl[key] = val.gsub(/\$\{([^}]+)\}/){|s| tbl[$1]} rescue nil
- }
- tbl
-end
-
-def check_tcltk_version(version)
- return [nil, nil] unless version
-
- version = version.strip
-
- tclver = version.dup
- tkver = version.dup
-
- major = dot = minor = dot = plvl = ext = nil
-
- if version =~ /^(\d)(\.?)(\d)(\.?)(\d*)(.*)$/
- major = $1; minor_dot = $2; minor = $3; plvl_dot = $4; plvl = $5; ext = $6
- dot = ! minor_dot.empty?
- if plvl_dot.empty? && ! plvl.empty?
- minor << plvl
- end
- elsif version =~ /^(\d)(\.?)(\d?)(.*)$/
- major = $1; minor_dot = $2; minor = $3; ext = $4
- dot = ! minor_dot.empty?
- else # unknown -> believe user
- return [tclver, tkver]
- end
-
- # check Tcl7.6 / Tk4.2 ?
- if major == "7" # Tcl7.6 ( not support Tclversion < 7.6 )
- # Tk4.2
- tkver = "4" + ((dot)? ".": "") + ((minor.empty)? "": "2") + ext
- elsif major == "4" # Tk4.2 ( not support Tkversion < 4.2 )
- # Tcl7.6
- tclver = "7" + ((dot)? ".": "") + ((minor.empty)? "": "6") + ext
- end
-
- [tclver, tkver]
-end
-
-def find_tcl(tcllib, stubs, version, *opt_paths)
- default_paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"]
- default_paths << "/Tcl/lib" # default for ActiveTcl
-
- if (paths = opt_paths.compact).empty?
- paths = default_paths
- end
-
- if stubs
- func = "Tcl_InitStubs"
- lib = "tclstub"
- else
- func = "Tcl_FindExecutable"
- lib = "tcl"
- end
-
- if version && ! version.empty?
- versions = [version]
- else
- versions = %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6]
- end
-
- if tcllib
- st = find_library(tcllib, func, *paths)
- else
- st = versions.find { |ver|
- find_library("#{lib}#{ver}", func, *paths) or
- find_library("#{lib}#{ver.delete('.')}", func, *paths) or
- find_library("#{lib}#{ver}g", func, *paths) or
- find_library("#{lib}#{ver.delete('.')}g", func, *paths) or
- find_library("tcl#{ver}", func, *paths) or
- find_library("tcl#{ver.delete('.')}", func, *paths) or
- find_library("tcl#{ver}g", func, *paths) or
- find_library("tcl#{ver.delete('.')}g", func, *paths)
- } || (!version && find_library(lib, func, *paths))
- end
-
- unless st
- puts("Warning:: cannot find Tcl library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options.")
- end
- st
-end
-
-def find_tk(tklib, stubs, version, *opt_paths)
- default_paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"]
- default_paths << "/Tcl/lib" # default for ActiveTcl
-
- if (paths = opt_paths.compact).empty?
- paths = default_paths
- end
-
- if stubs
- func = "Tk_InitStubs"
- lib = "tkstub"
- else
- func = "Tk_Init"
- lib = "tk"
- end
-
- if version && ! version.empty?
- versions = [version]
- else
- versions = %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 4.2]
- end
-
- if tklib
- st = find_library(tklib, func, *paths)
- else
- st = versions.find { |ver|
- find_library("#{lib}#{ver}", func, *paths) or
- find_library("#{lib}#{ver.delete('.')}", func, *paths) or
- find_library("#{lib}#{ver}g", func, *paths) or
- find_library("#{lib}#{ver.delete('.')}g", func, *paths) or
- find_library("tk#{ver}", func, *paths) or
- find_library("tk#{ver.delete('.')}", func, *paths) or
- find_library("tk#{ver}g", func, *paths) or
- find_library("tk#{ver.delete('.')}g", func, *paths)
- } || (!version && find_library(lib, func, *paths))
- end
-
- unless st
- puts("Warning:: cannot find Tk library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options.")
- end
- st
-end
-
-def find_tcltk_header(tclver, tkver)
- base_dir = ['/usr/local/include', '/usr/pkg/include', '/usr/include']
- base_dir << '/Tcl/include' # default for ActiveTcl
-
- unless have_tcl_h = have_header('tcl.h')
- if tclver && ! tclver.empty?
- versions = [tclver]
- else
- versions = %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6]
- end
- paths = base_dir.dup
- versions.each{|ver| paths.concat(base_dir.map{|dir| dir + '/tcl' + ver})}
- have_tcl_h = find_header('tcl.h', *paths)
- end
-
- unless have_tk_h = have_header("tk.h")
- if tkver && ! tkver.empty?
- versions = [tkver]
- else
- versions = %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 4.2]
- end
- paths = base_dir.dup
- versions.each{|ver| paths.concat(base_dir.map{|dir| dir + '/tk' + ver})}
- have_tk_h = find_header('tk.h', *paths)
- end
-
- have_tcl_h && have_tk_h
-end
-
-def find_X11(*opt_paths)
- default_paths =
- [ "/usr/X11/lib", "/usr/lib/X11", "/usr/X11R6/lib", "/usr/openwin/lib" ]
- paths = opt_paths.compact.concat(default_paths)
- st = find_library("X11", "XOpenDisplay", *paths)
- unless st
- puts("Warning:: cannot find X11 library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options. If your Tcl/Tk don't require X11, please try --without-X11.")
- end
- st
-end
-
-def pthread_check()
- tcl_major_ver = nil
- tcl_minor_ver = nil
-
- # Is tcl-thread given by user ?
- case enable_config("tcl-thread")
- when true
- tcl_enable_thread = true
- when false
- tcl_enable_thread = false
- else
- tcl_enable_thread = nil
- end
-
- if (tclConfig = with_config("tclConfig-file"))
- if tcl_enable_thread == true
- puts("Warning: --with-tclConfig-file option is ignored, because --enable-tcl-thread option is given.")
- elsif tcl_enable_thread == false
- puts("Warning: --with-tclConfig-file option is ignored, because --disable-tcl-thread option is given.")
- else
- # tcl-thread is unknown and tclConfig.sh is given
- begin
- tbl = parse_tclConfig(tclConfig)
- if tbl['TCL_THREADS']
- tcl_enable_thread = (tbl['TCL_THREADS'] == "1")
- else
- tcl_major_ver = tbl['TCL_MAJOR_VERSION'].to_i
- tcl_minor_ver = tbl['TCL_MINOR_VERSION'].to_i
- if tcl_major_ver < 8 || (tcl_major_ver == 8 && tcl_minor_ver == 0)
- tcl_enable_thread = false
- end
- end
-
- if tcl_enable_thread == nil
- # cannot find definition
- if tcl_major_ver
- puts("Warning: '#{tclConfig}' doesn't include TCL_THREADS definition.")
- else
- puts("Warning: '#{tclConfig}' may not be a tclConfig file.")
- end
- tclConfig = false
- end
- rescue Exception
- puts("Warning: fail to read '#{tclConfig}'!! --> ignore the file")
- tclConfig = false
- end
- end
- end
-
- if tcl_enable_thread == nil && !tclConfig
- # tcl-thread is unknown and tclConfig is unavailable
- begin
- try_run_available = try_run("int main() { exit(0); }")
- rescue Exception
- # cannot try_run. Is CROSS-COMPILE environment?
- puts(%Q'\
-*****************************************************************************
-**
-** PTHREAD SUPPORT CHECK WARNING:
-**
-** We cannot check the consistency of pthread support between Ruby
-** and the Tcl/Tk library in your environment (are you perhaps
-** cross-compiling?). If pthread support for these 2 packages is
-** inconsistent you may find you get errors when running Ruby/Tk
-** (e.g. hangs or segmentation faults). We strongly recommend
-** you to check the consistency manually.
-**
-*****************************************************************************
-')
- return true
- end
- end
-
- if tcl_enable_thread == nil
- # tcl-thread is unknown
- if try_run(<<EOF)
-#include <tcl.h>
-int main() {
- Tcl_Interp *ip;
- ip = Tcl_CreateInterp();
- exit((Tcl_Eval(ip, "set tcl_platform(threaded)") == TCL_OK)? 0: 1);
-}
-EOF
- tcl_enable_thread = true
- elsif try_run(<<EOF)
-#include <tcl.h>
-static Tcl_ThreadDataKey dataKey;
-int main() { exit((Tcl_GetThreadData(&dataKey, 1) == dataKey)? 1: 0); }
-EOF
- tcl_enable_thread = true
- else
- tcl_enable_thread = false
- end
- end
-
- # check pthread mode
- if (macro_defined?('HAVE_NATIVETHREAD', '#include "ruby.h"'))
- # ruby -> enable
- unless tcl_enable_thread
- # ruby -> enable && tcl -> disable
- puts(%Q'\
-*****************************************************************************
-**
-** PTHREAD SUPPORT MODE WARNING:
-**
-** Ruby is compiled with --enable-pthread, but your Tcl/Tk library
-** seems to be compiled without pthread support. Although you can
-** create the tcltklib library, this combination may cause errors
-** (e.g. hangs or segmentation faults). If you have no reason to
-** keep the current pthread support status, we recommend you reconfigure
-** and recompile the libraries so that both or neither support pthreads.
-**
-** If you want change the status of pthread support, please recompile
-** Ruby without "--enable-pthread" configure option or recompile Tcl/Tk
-** with "--enable-threads" configure option (if your Tcl/Tk is later
-** than or equal to Tcl/Tk 8.1).
-**
-*****************************************************************************
-')
- end
-
- # ruby -> enable && tcl -> enable/disable
- if tcl_enable_thread
- $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1'
- else
- $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0'
- end
-
- return true
-
- else
- # ruby -> disable
- if tcl_enable_thread
- # ruby -> disable && tcl -> enable
- puts(%Q'\
-*****************************************************************************
-**
-** PTHREAD SUPPORT MODE ERROR:
-**
-** Ruby is not compiled with --enable-pthread, but your Tcl/Tk
-** library seems to be compiled with pthread support. This
-** combination may cause frequent hang or segmentation fault
-** errors when Ruby/Tk is working. We recommend that you NEVER
-** create the library with such a combination of pthread support.
-**
-** Please recompile Ruby with the "--enable-pthread" configure option
-** or recompile Tcl/Tk with the "--disable-threads" configure option.
-**
-*****************************************************************************
-')
- $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1'
- return false
- else
- # ruby -> disable && tcl -> disable
- $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0'
- return true
- end
- end
-end
-
-tclver, tkver = check_tcltk_version(tcltk_version)
-
-if ( tcltk_framework ||
- ( find_tcltk_header(tclver, tkver) &&
- ( !use_X || find_X11(x11_ldir2, x11_ldir) ) &&
- find_tcl(tcllib, stubs, tclver, *tcl_ldir_list) &&
- find_tk(tklib, stubs, tkver, *tk_ldir_list) ) )
- $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs
- $CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
-
- if tcltk_framework
- if tcl_framework_header
- $CPPFLAGS += " -I#{tcl_framework_header}"
- else
- $CPPFLAGS += " -I#{tcltk_framework}/Tcl.framework/Headers"
- end
-
- if tk_framework_header
- $CPPFLAGS += " -I#{tk_framework_header}"
- else
- $CPPFLAGS += " -I#{tcltk_framework}/Tk.framework/Headers"
- end
-
- $LDFLAGS += ' -framework Tk -framework Tcl'
- end
-
- if stubs or pthread_check
- # create Makefile
-
- # for SUPPORT_STATUS
- $INSTALLFILES ||= []
- $INSTALLFILES << ["lib/tkextlib/SUPPORT_STATUS", "$(RUBYLIBDIR)", "lib"]
-
- have_func("rb_hash_lookup", "ruby.h")
-
- # create
- $defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"]
- $defs << %[-DRUBY_RELEASE_DATE=\\"#{RUBY_RELEASE_DATE}\\"]
- create_makefile("tcltklib")
- end
-end
diff --git a/ext/tk/sample/24hr_clock.rb b/ext/tk/sample/24hr_clock.rb
deleted file mode 100644
index 3a030ddaf2..0000000000
--- a/ext/tk/sample/24hr_clock.rb
+++ /dev/null
@@ -1,287 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-
-class Clock
- def initialize(clock24 = true)
- @clock = (clock24)? 24: 12
-
- @size = 200
- @cdot_size = 5
-
- @cdot_color = 'black'
- @hour_hand_color = 'black'
- @minute_hand_color = 'gray25'
- @second_hand_color = 'gray50'
-
- @mark_font = 'Helvetica -14'
- @mark_width = 3
- @mark_color = 'black'
- @submark_color = 'gray50'
-
- @c = TkCanvas.new(:width=>2*@size, :height=>2*@size,
- :scrollregion=>[-@size, -@size, @size, @size]
- ).pack(:fill=>:both, :expand=>true)
-
- @tag = TkcTag.new(@c)
- @hand_tag = TkcTag.new(@c)
-
- @circle_coords = [[-0.9*@size, -0.9*@size], [0.9*@size, 0.9*@size]]
- @oval = TkcOval.new(@c, @circle_coords, :fill=>'white', :tags=>[@tag])
-
- f = TkFrame.new.pack
- TkLabel.new(f, :text=>'CURRENT:').pack(:side=>:left)
- @now = TkLabel.new(f, :text=>'00:00:00').pack(:side=>:left, :padx=>2)
- TkLabel.new(f, :text=>' ').pack(:side=>:left)
- TkLabel.new(f, :text=>' ').pack(:side=>:right)
- @l = TkLabel.new(f, :text=>'00:00').pack(:side=>:right, :padx=>2)
- TkLabel.new(f, :text=>'MOUSE-POINTER:').pack(:side=>:right)
-
- cmd = proc{|x, y|
- @l.text = '%02d:%02d' % coords_to_time(@c.canvasx(x), @c.canvasy(y))
- }
- @c.bind('Motion', cmd, '%x %y')
- @tag.bind('Motion', cmd, '%x %y')
-
- _create_hands
- _create_marks
-
- timer_proc = proc{
- t = Time.now
- @now.text = '%02d:%02d:%02d' % [t.hour, t.min, t.sec]
- set_hands(t.hour, t.min, t.sec)
- }
-
- timer_proc.call
- @timer = TkRTTimer.start(100, -1, timer_proc)
- end
-
- def _create_marks
- @mark_tag = TkcTag.new(@c)
-
- TkcLine.new(@c, 0, -0.90*@size, 0, -0.85*@size,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@mark_color)
- TkcLine.new(@c, 0.90*@size, 0, 0.85*@size, 0,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@mark_color)
- TkcLine.new(@c, 0, 0.90*@size, 0, 0.85*@size,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@mark_color)
- TkcLine.new(@c, -0.90*@size, 0, -0.85*@size, 0,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@mark_color)
-
- TkcText.new(@c, [0, -0.92*@size], :text=>0,
- :anchor=>'s', :fill=>@mark_color)
- TkcText.new(@c, [0.92*@size, 0], :text=>@clock.div(4),
- :anchor=>'w', :fill=>@mark_color)
- TkcText.new(@c, [0, 0.92*@size], :text=>@clock.div(2),
- :anchor=>'n', :fill=>@mark_color)
- TkcText.new(@c, [-0.92*@size, 0], :text=>@clock.div(4)*3,
- :anchor=>'e', :fill=>@mark_color)
-
- [30.0, 60.0].each{|angle|
- rad = Math::PI * angle / 180.0
- x_base = @size*Math::sin(rad)
- y_base = @size*Math::cos(rad)
-
- x1 = 0.90*x_base
- y1 = 0.90*y_base
-
- x2 = 0.85*x_base
- y2 = 0.85*y_base
-
- TkcLine.new(@c, x1, y1, x2, y2,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@mark_color)
- TkcLine.new(@c, x1, -y1, x2, -y2,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@mark_color)
- TkcLine.new(@c, -x1, y1, -x2, y2,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@mark_color)
- TkcLine.new(@c, -x1, -y1, -x2, -y2,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@mark_color)
-
- x3 = 0.92*x_base
- y3 = 0.92*y_base
-
- if @clock == 24
- dh = angle.to_i/15
- else # @clock == 12
- dh = angle.to_i/30
- end
-
- TkcText.new(@c, x3, -y3, :text=>dh,
- :anchor=>'sw', :fill=>@mark_color)
- TkcText.new(@c, x3, y3, :text=>@clock.div(2)-dh,
- :anchor=>'nw', :fill=>@mark_color)
- TkcText.new(@c, -x3, y3, :text=>@clock.div(2)+dh,
- :anchor=>'ne', :fill=>@mark_color)
- TkcText.new(@c, -x3, -y3, :text=>@clock-dh,
- :anchor=>'se', :fill=>@mark_color)
- }
-
- if @clock == 24
- [15.0, 45.0, 75.0].each{|angle|
- rad = Math::PI * angle / 180.0
- x_base = @size*Math::sin(rad)
- y_base = @size*Math::cos(rad)
-
- x1 = 0.90*x_base
- y1 = 0.90*y_base
-
- x2 = 0.875*x_base
- y2 = 0.875*y_base
-
- TkcLine.new(@c, x1, y1, x2, y2,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@submark_color)
- TkcLine.new(@c, x1, -y1, x2, -y2,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@submark_color)
- TkcLine.new(@c, -x1, y1, -x2, y2,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@submark_color)
- TkcLine.new(@c, -x1, -y1, -x2, -y2,
- :tags=>[@tag, @mark_tag],
- :width=>@mark_width, :fill=>@submark_color)
- }
- end
- end
-
- def _create_hands
- hour_hand_len = 0.55*@size
- minute_hand_len = 0.85*@size
- second_hand_len = 0.88*@size
-
- hour_hand_width = 1.8*@cdot_size
- minute_hand_width = 1.0*@cdot_size
- second_hand_width = 1 # 0.4*@cdot_size
-
- @hour_hand_coords = [
- [0, -0.5*@cdot_size],
- [hour_hand_width, -0.5*@cdot_size-hour_hand_width],
- [hour_hand_width, -hour_hand_len+hour_hand_width],
- [0, -hour_hand_len],
- [-hour_hand_width, -hour_hand_len+hour_hand_width],
- [-hour_hand_width, -0.5*@cdot_size-hour_hand_width],
- ]
- @minute_hand_coords = [
- [0, -0.5*@cdot_size],
- [minute_hand_width, -0.5*@cdot_size - minute_hand_width],
- [minute_hand_width, -minute_hand_len+minute_hand_width],
- [0, -minute_hand_len],
- [-minute_hand_width, -minute_hand_len+minute_hand_width],
- [-minute_hand_width, -0.5*@cdot_size-minute_hand_width],
- ]
- @second_hand_coords = [
- [0, -0.5*@cdot_size],
- [second_hand_width, -0.5*@cdot_size - second_hand_width],
- [second_hand_width, -second_hand_len+second_hand_width],
- [0, -second_hand_len],
- [-second_hand_width, -second_hand_len+second_hand_width],
- [-second_hand_width, -0.5*@cdot_size-second_hand_width],
- ]
-
- @hour_hand = TkcPolygon.new(@c, @hour_hand_coords,
- :tags=>[@tag, @hand_tag],
- :outline=>@hour_hand_color,
- :fill=>@hour_hand_color)
-
- @minute_hand = TkcPolygon.new(@c, @minute_hand_coords,
- :tags=>[@tag, @hand_tag],
- :outline=>@minute_hand_color,
- :fill=>@minute_hand_color)
-
- @second_hand = TkcPolygon.new(@c, @second_hand_coords,
- :tags=>[@tag, @hand_tag],
- :outline=>@second_hand_color,
- :fill=>@second_hand_color)
-
- @center_dot = TkcOval.new(@c,
- [-@cdot_size, -@cdot_size],
- [@cdot_size, @cdot_size],
- :outline=>@cdot_color, :fill=>@cdot_color)
- end
- private :_create_hands
-
- def _raise_hands
- @hour_hand.raise
- @minute_hand.raise
- @second_hand.raise
- @center_dot.raise
- end
- private :_raise_hands
-
- def _raise_marks
- @mark_tag.raise
- end
- private :_raise_marks
-
- def set_hands(hh, mm, ss)
- ss_angle = Math::PI * ss / 30.0
- mm_angle = Math::PI * (mm + ss/60.0) / 30.0
- hh_angle = Math::PI * (hh + (mm + ss/60.0)/60.0) / (@clock.div(2))
-
- @second_hand.coords = @second_hand_coords.collect{|x, y|
- r = Math::hypot(y, x)
- a = Math::atan2(y, x) + ss_angle
- [Math::cos(a) * r, Math::sin(a) * r]
- }
-
- @minute_hand.coords = @minute_hand_coords.collect{|x, y|
- r = Math::hypot(y, x)
- a = Math::atan2(y, x) + mm_angle
- [Math::cos(a) * r, Math::sin(a) * r]
- }
-
- @hour_hand.coords = @hour_hand_coords.collect{|x, y|
- r = Math::hypot(y, x)
- a = Math::atan2(y, x) + hh_angle
- [Math::cos(a) * r, Math::sin(a) * r]
- }
-
- _raise_hands
- _raise_marks
- end
-
- def coords_to_time(x, y)
- return ((y < 0)? [0, 0]: [@clock.div(2), 0]) if x == 0
- if @clock == 24
- offset = (x<0&&y<0)? 1800.0: 360.0
- m_half = 720.0
- else # @clock == 12
- offset = (x<0&&y<0)? 900.0: 180.0
- m_half = 360.0
- end
- (offset + m_half*Math.atan2(y,x)/Math::PI).round.divmod(60)
- end
-
- def create_pie(hh, mm, span, color='red')
- if @clock == 24
- start = 90.0 - (hh*60 + mm)/4.0 # 360.0*(hh*60+mm)/(24*60)
- extent = -span/4.0
- else # @clock == 12
- start = 90.0 - (hh*60 + mm)/2.0 # 360.0*(hh*60+mm)/(12*60)
- extent = -span/2.0
- end
-
- pie = TkcArc.new(@c, @circle_coords, :tags=>[@tag],
- :outline=>'black', 'fill'=>color,
- :start=>start, :extent=>extent)
- _raise_hands
- _raise_marks
- pie
- end
-end
-
-sched = Clock.new
-sched.create_pie(0,0, 60) # 60 minutes from 00:00
-sched.create_pie(6,30, 280, 'green') # 280 minutes from 06:30
-sched.create_pie(15,20, 90, 'blue') # 90 minutes from 15:20
-
-Tk.mainloop
diff --git a/ext/tk/sample/binding_sample.rb b/ext/tk/sample/binding_sample.rb
deleted file mode 100644
index a324a745f3..0000000000
--- a/ext/tk/sample/binding_sample.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-
-class Button_clone < TkLabel
- def initialize(*args)
- @command = nil
-
- if args[-1].kind_of?(Hash)
- keys = _symbolkey2str(args.pop)
- @command = keys.delete('command')
-
- keys['highlightthickness'] = 1 unless keys.key?('highlightthickness')
- keys['padx'] = '3m' unless keys.key?('padx')
- keys['pady'] = '1m' unless keys.key?('pady')
- keys['relief'] = 'raised' unless keys.key?('relief')
-
- args.push(keys)
- end
-
- super(*args)
-
- @press = false
-
- self.bind('Enter', proc{self.background(self.activebackground)})
- self.bind('Leave', proc{
- @press = false
- self.background(self.highlightbackground)
- self.relief('raised')
- })
-
- self.bind('ButtonPress-1', proc{@press = true; self.relief('sunken')})
- self.bind('ButtonRelease-1', proc{
- self.relief('raised')
- @command.call if @press && @command
- @press = false
- })
- end
-
- def command(cmd = Proc.new)
- @command = cmd
- end
-
- def invoke
- if @command
- @command.call
- else
- ''
- end
- end
-end
-
-TkLabel.new(:text=><<EOT).pack
-This is a sample of 'event binding'.
-The first button is a normal button widget.
-And the second one is a normal label widget
-but with some bindings like a button widget.
-EOT
-
-lbl = TkLabel.new(:foreground=>'red').pack(:pady=>3)
-
-v = TkVariable.new(0)
-
-TkFrame.new{|f|
- TkLabel.new(f, :text=>'click count : ').pack(:side=>:left)
- TkLabel.new(f, :textvariable=>v).pack(:side=>:left)
-}.pack
-
-TkButton.new(:text=>'normal Button widget',
- :command=>proc{
- puts 'button is clicked!!'
- lbl.text 'button is clicked!!'
- v.numeric += 1
- }){
- pack(:fill=>:x, :expand=>true)
-}
-
-Button_clone.new(:text=>'Label with Button binding',
- :command=>proc{
- puts 'label is clicked!!'
- lbl.text 'label is clicked!!'
- v.numeric += 1
- }){
- pack(:fill=>:x, :expand=>true)
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/bindtag_sample.rb b/ext/tk/sample/bindtag_sample.rb
deleted file mode 100644
index 7b4ac16f64..0000000000
--- a/ext/tk/sample/bindtag_sample.rb
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-
-TkLabel.new(:text=><<EOT, :justify=>:left).pack
-This is a sample of bindtags and usage of
-Tk.callback_break/Tk.callback_continue.
-Please check the work of following buttons
-(attend the difference between before/after
- pressing the bottom button), and see the
-source code.
-EOT
-
-def set_class_bind
- TkButton.bind('ButtonPress-1',
- proc{puts 'bind "ButtonPress-1" of TkButton class'})
- TkButton.bind('ButtonRelease-1',
- proc{puts 'bind "ButtonRelease-1" of TkButton class'})
-end
-
-# set root binding
-r = TkRoot.new
-r.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of root widget'})
-r.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of root widget'})
-
-# set 'all' binding
-TkBindTag::ALL.bind('ButtonPress-1',
- proc{puts 'bind "ButtonPress-1" of the tag "all"'})
-TkBindTag::ALL.bind('ButtonRelease-1',
- proc{puts 'bind "ButtonRelease-1" of the tag "all"'})
-
-# create buttons
-b1 = TkButton.new(:text=>'button-1',
- :command=>proc{puts "command of button-1"}).pack
-b2 = TkButton.new(:text=>'button-2',
- :command=>proc{puts "command of button-2"}).pack
-b3 = TkButton.new(:text=>'button-3',
- :command=>proc{puts "command of button-3"}).pack
-b4 = TkButton.new(:text=>'button-4',
- :command=>proc{puts "command of button-4"}).pack
-b5 = TkButton.new(:text=>'button-5',
- :command=>proc{puts "command of button-5"}).pack
-
-# set button binding
-b1.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-1'})
-b1.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-1'})
-
-b2.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-2'})
-b2.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-2'})
-
-b3.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-3'})
-b3.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-3'})
-
-b4.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-4'})
-b4.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-4'})
-
-b5.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-5'})
-b5.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-5'})
-
-# create bindtag and set binding
-tag1 = TkBindTag.new
-tag1.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of tag1'})
-tag1.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of tag1'})
-
-tag2 = TkBindTag.new
-tag2.bind('ButtonPress-1',
- proc{
- puts 'bind "ButtonPress-1" of tag2'
- puts 'call Tk.callback_continue'
- Tk.callback_continue
- puts 'never see this message'
- })
-tag2.bind('ButtonRelease-1',
- proc{
- puts 'bind "ButtonRelease-1" of tag2'
- puts 'call Tk.callback_continue'
- Tk.callback_continue
- puts 'never see this message'
- })
-
-tag3 = TkBindTag.new
-tag3.bind('ButtonPress-1',
- proc{
- puts 'bind "ButtonPress-1" of tag3'
- puts 'call Tk.callback_break'
- Tk.callback_break
- puts 'never see this message'
- })
-tag3.bind('ButtonRelease-1',
- proc{
- puts 'bind "ButtonRelease-1" of tag3'
- puts 'call Tk.callback_break'
- Tk.callback_break
- puts 'never see this message'
- })
-
-# set bindtags
-p b1.bindtags
-
-tags = b2.bindtags
-tags[2,0] = tag1
-tags[0,0] = tag1
-b2.bindtags(tags)
-p b2.bindtags
-
-tags = b3.bindtags
-tags[2,0] = tag2
-tags[0,0] = tag2
-b3.bindtags(tags)
-p b3.bindtags
-
-tags = b4.bindtags
-tags[2,0] = tag3
-tags[0,0] = tag3
-b4.bindtags(tags)
-p b4.bindtags
-
-b5.bindtags([tag1, TkButton, tag2, b5])
-
-# create button to set button class binding
-TkButton.new(:text=>'set binding to TkButton class',
- :command=>proc{
- puts 'call "set_class_bind"'
- set_class_bind
- }).pack(:pady=>7)
-
-# start event-loop
-Tk.mainloop
diff --git a/ext/tk/sample/binstr_usage.rb b/ext/tk/sample/binstr_usage.rb
deleted file mode 100644
index 92882b8e1b..0000000000
--- a/ext/tk/sample/binstr_usage.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require "tk"
-
-TkMessage.new(:width=>360, :text=><<EOM).pack
-This sample shows how to use a binary sequence between Ruby and Tk. \
-This reads the image data from the file as the binary sequence.
-
-To treat the difference of encodings between on Ruby and on Tk seamlessly, \
-Ruby/Tk converts the encoding of string arguments automatically. \
-I think it is comfortable for users on almost all situations. \
-However, when treats a binary sequence, the convert process makes troubles.
-
-Tk::BinaryString class (subclass of Tk::EncodedString class) is the class \
-to avoid such troubles. Please see the source code of this sample. \
-A Tk::BinaryString instance is used to create the image for the center button.
-EOM
-
-ImgFile=[File.dirname(__FILE__), 'images','tcllogo.gif'].join(File::Separator)
-
-ph1 = TkPhotoImage.new(:file=>ImgFile)
-p ph1.configinfo
-
-b_str = Tk::BinaryString(IO.read(ImgFile))
-p [b_str, b_str.encoding]
-
-ph2 = TkPhotoImage.new(:data=>b_str)
-p ph2.configinfo
-p ph2.data(:grayscale=>true)
-
-ph3 = TkPhotoImage.new(:palette=>256)
-ph3.put(ph2.data)
-
-ph4 = TkPhotoImage.new()
-ph4.put(ph2.data(:grayscale=>true))
-
-#p [b_str.encoding, b_str.rb_encoding]
-
-f = TkFrame.new.pack
-TkButton.new(:parent=>f, :image=>ph1, :command=>proc{exit}).pack(:side=>:left)
-TkButton.new(:parent=>f, :image=>ph2, :command=>proc{exit}).pack(:side=>:left)
-TkButton.new(:parent=>f, :image=>ph3, :command=>proc{exit}).pack(:side=>:left)
-TkButton.new(:parent=>f, :image=>ph4, :command=>proc{exit}).pack(:side=>:left)
-
-Tk.mainloop
diff --git a/ext/tk/sample/btn_with_frame.rb b/ext/tk/sample/btn_with_frame.rb
deleted file mode 100644
index 43e120b123..0000000000
--- a/ext/tk/sample/btn_with_frame.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: false
-require 'tk'
-
-class Button_with_Frame < TkButton
- def create_self(keys)
- @frame = TkFrame.new('widgetname'=>@path, 'background'=>'yellow')
- install_win(@path) # create new @path which is a daughter of old @path
- super(keys)
- TkPack(@path, :padx=>7, :pady=>7)
- @epath = @frame.path
- end
- def epath
- @epath
- end
-end
-
-Button_with_Frame.new(:text=>'QUIT', :command=>proc{exit}) {
- pack(:padx=>15, :pady=>5)
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/cd_timer.rb b/ext/tk/sample/cd_timer.rb
deleted file mode 100644
index 1efe8cdb7c..0000000000
--- a/ext/tk/sample/cd_timer.rb
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# countdown timer
-# usage: cd_timer min [, min ... ]
-# ( e.g. cd_timer 0.5 1 3 5 10 )
-#
-require 'tk'
-
-if ARGV.empty?
- $stderr.puts 'Error:: No time arguments for counting down'
- exit(1)
-end
-
-width = 10
-
-TkButton.new(:text=>'exit',
- :command=>proc{exit}).pack(:side=>:bottom, :fill=>:x)
-
-b = TkButton.new(:text=>'start').pack(:side=>:top, :fill=>:x)
-
-f = TkFrame.new(:relief=>:ridge, :borderwidth=>2).pack(:fill=>:x)
-TkLabel.new(f, :relief=>:flat, :pady=>3,
- :background=>'black', :foreground=>'white',
- :text=>' elapsed: ').pack(:fill=>:x, :side=>:left, :expand=>true)
-now = TkLabel.new(f, :width=>width, :relief=>:flat, :pady=>3, :anchor=>:w,
- :background=>'black', :foreground=>'white',
- :text=>'%4d:%02d.00' % [0, 0]).pack(:side=>:right)
-
-timers = [ TkRTTimer.new(10){|tm|
- t = (tm.return_value || 0) + 1
- s, u = t.divmod(100)
- m, s = s.divmod(60)
- now.text('%4d:%02d.%02d' % [m, s, u])
- t
- }.set_start_proc(0, proc{
- now.text('%4d:%02d.00' % [0,0])
- now.foreground('white')
- 0
- })
-]
-
-ARGV.collect{|arg| (Float(arg) * 60).to_i}.sort.each_with_index{|time, idx|
- f = TkFrame.new(:relief=>:ridge, :borderwidth=>2).pack(:fill=>:x)
- TkLabel.new(f, :relief=>:flat, :pady=>3,
- :text=>' %4d:%02d --> ' % (time.divmod(60))).pack(:side=>:left)
- l = TkLabel.new(f, :width=>width, :relief=>:flat, :pady=>3, :anchor=>:w,
- :text=>'%4d:%02d' % (time.divmod(60))).pack(:side=>:right)
- timers << TkRTTimer.new(1000){|tm|
- t = (tm.return_value || time) - 1
- if t < 0
- l.text('%4d:%02d' % ((-t).divmod(60)))
- else
- l.text('%4d:%02d' % (t.divmod(60)))
- end
- if t.zero?
- l.foreground('red')
- idx.times{Tk.bell}
- end
- t
- }.set_start_proc(0, proc{
- l.text('%4d:%02d' % (time.divmod(60)))
- l.foreground('black')
- time
- })
-}
-
-mode = :start
-b.command(proc{
- if mode == :start
- timers.each{|timer| timer.restart}
- b.text('reset')
- mode = :reset
- else
- timers.each{|timer| timer.stop.reset}
- b.text('start')
- mode = :start
- end
- })
-
-Tk.mainloop
-
diff --git a/ext/tk/sample/cmd_res_test.rb b/ext/tk/sample/cmd_res_test.rb
deleted file mode 100644
index 52c5bc7515..0000000000
--- a/ext/tk/sample/cmd_res_test.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: false
-require 'tk'
-TkOptionDB.readfile(File.expand_path('cmd_resource',
- File.dirname(__FILE__)))
-f = TkFrame.new(:class=>'BtnFrame').pack
-b = TkButton.new(:parent=>f, :widgetname=>'hello').pack
-cmd1 = TkOptionDB.new_proc_class(b, [:show_msg, :bye_msg], 3)
-cmd2 = TkOptionDB.new_proc_class(:ZZZ, [:show_msg, :bye_msg], 3, false, cmd1)
-cmd3 = TkOptionDB.new_proc_class(:ZZZ, [:show_msg, :bye_msg], 3, false, b)
-cmd4 = TkOptionDB.new_proc_class(:BTN_CMD, [:show_msg, :bye_msg], 3){
- def self.__check_proc_string__(str)
- "{|arg| print [arg, $SAFE].inspect, ': '; Proc.new#{str}.call(arg)}"
- end
-}
-cmd1.show_msg('cmd1')
-cmd2.show_msg('cmd2')
-cmd3.show_msg('cmd3')
-cmd4.show_msg('cmd4')
diff --git a/ext/tk/sample/cmd_resource b/ext/tk/sample/cmd_resource
deleted file mode 100644
index 9cc4915546..0000000000
--- a/ext/tk/sample/cmd_resource
+++ /dev/null
@@ -1,5 +0,0 @@
-*BtnFrame.hello.text: HELLO
-*BtnFrame.hello.command: ruby {puts "Hello World!!"}
-*BTN_CMD.show_msg: {|arg| print "Hello, #{arg}!!\n"}
-*hello.show_msg: {|arg| print "Hello, Hello, #{arg}!!\n"}
-*hello.ZZZ.show_msg: {|arg| print "Hello, Hello, ZZZ:#{arg}!!\n"}
diff --git a/ext/tk/sample/demos-en/ChangeLog b/ext/tk/sample/demos-en/ChangeLog
deleted file mode 100644
index c3f66cf409..0000000000
--- a/ext/tk/sample/demos-en/ChangeLog
+++ /dev/null
@@ -1,64 +0,0 @@
-2002-08-29 16:30 matt
-
- * ChangeLog: ChangeLog is auto-generated *from* CVS log.
-
-2002-08-29 16:27 matt
-
- * ChangeLog.prev: [no log message]
-
-2002-08-28 18:07 matt
-
- * browse1, browse2, hello, ixset, rmt, rolodex, rolodex-j, square,
- tcolor, timer, widget: Changed #! lines to the slightly more
- portable '#!/usr/bin/env ruby'.
-
-2002-08-28 17:56 matt
-
- * icon.rb, items.rb, label.rb, menu.rb, ruler.rb: Changed bitmap
- file extensions from .bmp to .xbm.
-
-2002-08-28 17:55 matt
-
- * images/: face.bmp, face.xbm, flagdown.bmp, flagdown.xbm,
- flagup.bmp, flagup.xbm, gray25.bmp, gray25.xbm, letters.bmp,
- letters.xbm, noletter.bmp, noletter.xbm, pattern.bmp, pattern.xbm:
- Changed X bitmap file extensions from .bmp to the more intuitive
- .xbm.
-
-2002-08-28 17:35 matt
-
- * bitmap.rb, colors.rb, cscroll.rb, ctext.rb, hello, ixset,
- menubu.rb, patch_1.1c1, rmt, style.rb, timer, ChangeLog, README,
- README.tkencoding, arrow.rb, bind.rb, browse1, browse2, button.rb,
- check.rb, clrpick.rb, dialog1.rb, dialog2.rb, entry1.rb, entry2.rb,
- filebox.rb, floor.rb, form.rb, hscale.rb, icon.rb, image1.rb,
- image2.rb, items.rb, label.rb, menu.rb, msgbox.rb, plot.rb,
- puzzle.rb, radio.rb, rolodex, rolodex-j, ruler.rb, sayings.rb,
- search.rb, square, states.rb, tcolor, text.rb, tkencoding.rb,
- twind.rb, vscale.rb, widget, doc.org/README, doc.org/README.JP,
- doc.org/README.tk80, doc.org/license.terms,
- doc.org/license.terms.tk80, images/earth.gif, images/earthris.gif,
- images/face.bmp, images/flagdown.bmp, images/flagup.bmp,
- images/gray25.bmp, images/grey.25, images/grey.5,
- images/letters.bmp, images/noletter.bmp, images/pattern.bmp,
- images/tcllogo.gif, images/teapot.ppm: Initial revision
-
-2002-08-28 17:35 matt
-
- * bitmap.rb, colors.rb, cscroll.rb, ctext.rb, hello, ixset,
- menubu.rb, patch_1.1c1, rmt, style.rb, timer, ChangeLog, README,
- README.tkencoding, arrow.rb, bind.rb, browse1, browse2, button.rb,
- check.rb, clrpick.rb, dialog1.rb, dialog2.rb, entry1.rb, entry2.rb,
- filebox.rb, floor.rb, form.rb, hscale.rb, icon.rb, image1.rb,
- image2.rb, items.rb, label.rb, menu.rb, msgbox.rb, plot.rb,
- puzzle.rb, radio.rb, rolodex, rolodex-j, ruler.rb, sayings.rb,
- search.rb, square, states.rb, tcolor, text.rb, tkencoding.rb,
- twind.rb, vscale.rb, widget, doc.org/README, doc.org/README.JP,
- doc.org/README.tk80, doc.org/license.terms,
- doc.org/license.terms.tk80, images/earth.gif, images/earthris.gif,
- images/face.bmp, images/flagdown.bmp, images/flagup.bmp,
- images/gray25.bmp, images/grey.25, images/grey.5,
- images/letters.bmp, images/noletter.bmp, images/pattern.bmp,
- images/tcllogo.gif, images/teapot.ppm: Taking over demo package
- from Jonathan Conway.
-
diff --git a/ext/tk/sample/demos-en/ChangeLog.prev b/ext/tk/sample/demos-en/ChangeLog.prev
deleted file mode 100644
index ba808eca8b..0000000000
--- a/ext/tk/sample/demos-en/ChangeLog.prev
+++ /dev/null
@@ -1,9 +0,0 @@
-2001-07-26 <rise@leannan.knavery.net>
-
- * Moved files to directory ruby-tk81-demos-english in tarball.
-
-2001-07-26 <rise@knavery.net>
-
- * Added test to widget and hello versus Tk::TCL_VERSION & Tk::JAPANIZED_TK (per Guy Decoux in [ruby-talk:18559]) before requiring tkencoding.rb.
-
-
diff --git a/ext/tk/sample/demos-en/README b/ext/tk/sample/demos-en/README
deleted file mode 100644
index 033dca33c6..0000000000
--- a/ext/tk/sample/demos-en/README
+++ /dev/null
@@ -1,138 +0,0 @@
-Current Maintainer:
- Jonathan Conway
- rise@knavery.net
-
- Please direct all bug reports/requests/suggestions to the above
- address.
-
-
-Notes:
-
-* The files hello and widget have been changed to test Tk::TCL_VERSION
- and Tk::JAPANIZED_TK before requiring tkencoding.rb to prevent an
- infinite loop. This test was taken from a message in
- [ruby-talk:18559] by Guy Decoux.
-
-* The .bmp files in the images directory are X bitmaps (i.e. XBM to many
- graphics packages), not Windows bitmaps (.bmp). You will not be
- able to use images exported by a graphics program as Windows
- bitmaps with this demo collection nor will you be able to edit the
- included images without setting the file type correctly.
-
--- Jonathan Conway, 2001-07-26
-
-
-#------------------------------------------------------------------------------
-# ==== Introduction. ====
-#
-# To create this version of the Ruby/Tk widget demo, I took the
-# ruby-tk81-demos and removed all the Kanji strings and comments. I
-# have tried to restore the original English strings and comments
-# using the Tcl/Tk8.2.2 version of the widget demo.
-#
-# When I tried running the Kanji version, all I got was a mostly blank
-# panel with a non-functional "File" button. I disovered that if all
-# non-ASCII characters were replaced with blanks, then I could get the
-# gutted stuff running.
-#
-# Since English Ruby/Tk documentation is lacking and I needed this
-# code to see how it worked and to use as the basis of my try-it
-# prototype (The Ruby Yielding Interactive Toolkit), plus the fact
-# that no help was forthcoming for making the Kanji version work (plus
-# the fact that I can't read Kanji anyway), I decided to embark on
-# this English restoration project.
-#
-# Thanks to everyone who worked on the original Ruby/Tk widget demo
-# (and the preceding Tcl/Tk version for that matter). The
-# comparatively simple task of changing text strings and comments has
-# made me appreciate the great amount of original work that went into
-# this.
-#
-# -- Conrad Schneiker, 2000-07-23.
-#------------------------------------------------------------------------------
-
-#------------------------------------------------------------------------------
-# ==== Known bugs. ====
-#
-# ^C-ing the demo gives Ruby interrupt and stack message; clean exit needed.
-# Font settings don't work correctly.
-# Dismissing the embedded windows demo (tkwind.rb) kills the widget demo.
-# Rerunning the canvas item demo from the code widow get errors.
-# The "press me" button in the canvas item demo doesn't time out.
-# The simple 2 d plot starts up extremely slow compared to the Tcl version.
-# The first item message on the icon menu on the menu and cascades demo doesn't work.
-#------------------------------------------------------------------------------
-
-
-###################### Original README ########################################
-
- Ruby/Tk81 widget-demo 1999/08/13
-
- 北陸先端大情報科学研究科
- 立石 <ttate@jaist.ac.jp>
-
-Tcl/Tk8.1ã§ã¯unicode(UTF8)ãŒæŽ¡ç”¨ã•ã‚Œã€unicodeã«å¤‰æ›ã•ã‚ŒãŸæ—¥æœ¬èªžã§ã‚ã‚Œã°
-Widgetã«è¡¨ç¤ºã•ã›ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚本アーカイブã«ã¯ä»¥å‰ã«æ°¸äº•ã•ã‚“ãŒä¸­å¿ƒã¨
-ãªã‚‰ã‚Œã¦ä½œæˆã•ã‚ŒãŸRuby/Tkã®ã‚µãƒ³ãƒ—ルã«ä¿®æ­£ã‚’加ãˆã€ä»¥ä¸‹ã®ç’°å¢ƒã«ãŠã„ã¦ã§å‹•ä½œ
-を確èªã—ãŸã‚‚ã®ã§ã™ã€‚
-
-* ruby-1.3.7,ruby-1.4.0
-* tcl8.1, tk8.1
-* linux-2.2
-
-Windows(Cygwin)ã«ãŠã„ã¦ã€ã‚µãƒ³ãƒ—ルを動ã‹ã™ã«ã¯rubyã‚’-Keã¨ã„ã†ã‚ªãƒ—ションを付
-ã‘ã¦èµ·å‹•ã•ã›ã‚‹ã¨è‰¯ã„ãã†ã§ã™ã€‚
- 情報æ供:渡辺ã•ã‚“
- <eban@os.rim.or.jp>
-
-----------------------------------------------------------------------------
- Ruby/Tk widget-demo
- version 1.1 ( 1998/07/24 )
- 永井@知能.ä¹å·¥å¤§ (nagai@ai.kyutech.ac.jp)
-
-標準é…布㮠Tcl/Tk 拡張パッケージをå–ã‚Šè¾¼ã‚“ã  Ruby (以下 Ruby/Tk ã¨å‘¼ã³ã¾ã™)
-ã§ã¯ï¼ŒTk widget を用ã„㟠GUI ã®ä½œæˆã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ï¼Žå®Ÿéš›ã« GUI を作æˆ
-ã—ã¦ã„ãå ´åˆã«ã¯æ§˜ã€…ãªå®Ÿä¾‹ãŒã‚µãƒ³ãƒ—ルã¨ã—ã¦å­˜åœ¨ã™ã‚‹ã¨ä¾¿åˆ©ãªã®ã§ã™ãŒï¼ŒRuby/Tk
-ã«ã¯ãã®ã‚ˆã†ãªé©å½“ãªã‚µãƒ³ãƒ—ルスクリプト集åˆã¯å­˜åœ¨ã—ã¾ã›ã‚“ã§ã—ãŸï¼Žãã‚Œã«å¯¾ã—,
-拡張パッケージã®å…ƒã§ã‚ã‚‹ Tcl/Tk ã«ã¯ï¼ŒTk widget を用ã„ã¦ã©ã®ã‚ˆã†ãªã“ã¨ãŒã§
-ãã‚‹ã‹ã‚’示ã™ã‚‚ã®ã¨ã—㦠widget-demo ãŒå­˜åœ¨ã—ãŠã‚Šï¼ŒTcl/Tk を用ã„㟠GUI ã®ä½œæˆ
-ã‚’ç¿’å¾—ã™ã‚‹éš›ã®ä»£è¡¨çš„サンプルã¨ãªã£ã¦ã„ã¾ã™ï¼Žæœ¬ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã¯ï¼ŒRuby/Tk ã®ç¿’å¾—ã®
-ãŸã‚ã®ä»£è¡¨çš„ãªã‚µãƒ³ãƒ—ルスクリプトã¨ã™ã¹ã,Tcl/Tk ã® widget-demo を移æ¤ã—ãŸã‚‚
-ã®ã§ã™ï¼Ž
-
-本アーカイブã«å«ã¾ã‚Œã‚‹ã‚¹ã‚¯ãƒªãƒ—トを実行ã™ã‚‹ãŸã‚ã«ã¯ï¼Œruby-1.1c2 以上ã§ã‚ã‚‹ã“
-ã¨ãŒå¿…è¦ã§ã™ï¼Ž1.1c1 ã®å ´åˆã¯ï¼Œæœ¬ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã«å«ã¾ã‚Œã‚‹ patck_1.1c1 ã‚’ Ruby ã®
-ライブラリã«ã‚ã¦ã¦ãã ã•ã„.組ã¿è¾¼ã‚€ Tk ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ï¼Œ4.2 ã§ã‚‚ 8.0 ã§ã‚‚ä¿®
-æ­£ãªãå‹•ã‹ã›ã‚‹ã¯ãšã§ã™ï¼ŽãŸã ã—,日本語版ã§ã®ç§»æ¤ã¨ãªã£ã¦ã„ã‚‹ãŸã‚,日本語化ã•
-れ㟠Tk ã‚’ã”利用ãã ã•ã„.スクリプトã®ãƒ†ã‚¹ãƒˆã¯ï¼ŒTk4.2jp 㨠Tk8.0jp ã®ä¸Šã§è¡Œ
-ã„ã¾ã—㟠(完璧ã«ã§ã¯ãªã„ã§ã™ãŒ).
-
-本アーカイブã«å«ã¾ã‚Œã‚‹ã‚¹ã‚¯ãƒªãƒ—トã®å¤šãã¯ï¼Œå…ƒã¨ãªã£ã¦ã„ã‚‹ Tcl/Tk 版ã«æ¯”較的近
-ã„スクリプト記述ã¨ãªã‚‹ã‚ˆã†ã«ã—ã¦ã„ã¾ã™ï¼Žãã®ãŸã‚,Ruby/Tk ã®ã‚µãƒ³ãƒ—ルã¨è¨€ã†ã«
-ã¯ï¼Œã‚ã¾ã‚Š Ruby らã—ããªã„ã¨ã‚‚言ãˆã‚‹ã§ã—ょã†ï¼Žã«ã‚‚ã‹ã‹ã‚らãšï¼Œãã®ã‚ˆã†ãªè¨˜è¿°
-ã‚’å–ã£ã¦ã„ã‚‹ç†ç”±ã¯ï¼ŒRuby/Tk ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä¸è¶³ã«ã‚ã‚Šã¾ã™ï¼Ž
-
-Tcl/Tk ã«ã¯é©å½“ãªå‚考書ãŒä½•å†Šã‹å­˜åœ¨ã—ã¦ã„ã¾ã™ã‹ã‚‰ï¼ŒRuby/Tk スクリプトを作æˆ
-ã™ã‚‹éš›ã¯ï¼Œãã®ã‚ˆã†ãª Tcl/Tk ã®å‚考書ã§æƒ…報を補ã„ãªãŒã‚‰ä½œæˆã™ã‚‹ã“ã¨ã«ãªã‚‹ã¨æ€
-ã„ã¾ã™ï¼Žå„ widget ã®ä½¿ç”¨ä¾‹ã¨ã—ã¦ï¼ŒTcl/Tk ã® widget-demo ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã‚‚ã‚ã‚‹
-ã§ã—ょã†ï¼ŽRuby/Tk 版ã®è¨˜è¿°ã‚’ widget-demo ã‚’ Tcl/Tk 版ã®è¨˜è¿°ã«è¿‘ã„ã‚‚ã®ã«ã—ã¦
-ãŠã‘ã°ï¼Œãã®å¯¾æ¯”ã«ã‚ˆã£ã¦ï¼ŒRuby/Tk ã®ç†è§£ã‚’æ—©ã‚ã‚‹ã“ã¨ãŒã§ãã‚‹ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ï¼Ž
-一旦 Ruby/Tk ã§ã® å„ widget ã®ä½¿ç”¨æ–¹æ³•ã‚’ç¿’å¾—ã—ã¦ã—ã¾ãˆã°ï¼ŒRuby らã—ã„スクリ
-プトを作æˆã™ã‚‹ã“ã¨ã¯é›£ã—ããªã„ã§ã—ょã†ï¼Žæœ¬ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã®ã‚¹ã‚¯ãƒªãƒ—トã¯ï¼ŒRuby/Tk
-を最åˆã«ç¿’å¾—ã™ã‚‹ã¾ã§ã®è¸å°ã¨ã—ã¦åˆ©ç”¨ã—ã¦ã„ãŸã ã‘ã‚Œã°å¹¸ã„ã§ã™ï¼Ž
-
-widget-demo ã®ç§»æ¤ã«ã‚ãŸã£ã¦ã¯ï¼Œæ¬¡ã®æ–¹ã«ã‚‚移æ¤ã—ãŸã‚¹ã‚¯ãƒªãƒ—トをæä¾›ã—ã¦ã„ãŸã 
-ãã¾ã—ãŸï¼Žã“ã“ã«æ„Ÿè¬ã®æ„を表ã—ã¾ã™ï¼Ž
-
- 立石@JAIST (ttate@jaist.ac.jp) ã•ã‚“
- å¹³æ¾ç¥¥å² (hiramatu@cdrom.co.jp) ã•ã‚“
-
-å¹³æ¾ã•ã‚“ã«ã‚ˆã‚‹ Ruby/Tk 入門㮠Web page (http://www.cdrom.co.jp/~hiramatu/)
-ã‚‚ Ruby/Tk ã®ç¿’å¾—ã«æœ‰ç”¨ã¨æ€ãˆã¾ã™ã®ã§ï¼Œãœã²ã”å‚ç…§ãã ã•ã„.
-
-ã¾ãŸï¼Œå‰æ©‹ (maebashi@iij.ad.jp) ã•ã‚“ã‚’ã¯ã˜ã‚ã¨ã—ã¦ï¼Œwidget-demo ã®ç§»æ¤ã«éš›ã—
-ã¦å¿…è¦ã¨ãªã£ãŸ Ruby ã® Tk 関連ライブラリ修正ã«ã¤ã„ã¦ï¼Œå•é¡Œç‚¹ï¼Œãƒã‚°ã®æŒ‡æ‘˜ã‚’ã—
-ã¦ã„ãŸã ã„ãŸæ–¹ã€…ã«ã‚‚æ„Ÿè¬è‡´ã—ã¾ã™ï¼Ž
-
-ãã—ã¦æœ€å¾Œã«æœ€å¤§ã®æ„Ÿè¬ã‚’ Ruby 設計者㮠ã¾ã¤ã‚‚㨠ゆãã²ã‚ (matz@netlab.co.jp)
-ã•ã‚“ã«æ§ã’ãŸã„ã¨æ€ã„ã¾ã™ï¼Ž
diff --git a/ext/tk/sample/demos-en/README.1st b/ext/tk/sample/demos-en/README.1st
deleted file mode 100644
index 2ba1e275c8..0000000000
--- a/ext/tk/sample/demos-en/README.1st
+++ /dev/null
@@ -1,18 +0,0 @@
-There are Ruby/Tk demo scripts.
-
-Files with '.rb' extension are sub-scripts which are launched 'widget'
-script. Those files don't work independently. Please call them from
-'widget' script.
-
-If you want start some sub-scripts at same time when the launcher
-script tarts, please give the sub-script names as arguments.
-(e.g. /usr/local/bin/ruby widget button.rb entry1.rb text.rb )
-You can ommit '.rb' of the sub-scripts
-(e.g. /usr/local/bin/ruby widget button entry1 text )
-
-If you don't need launcher's main window, give -n option.
-(e.g. /usr/local/bin/ruby widget -n button.rb entry1.rb text.rb )
-
-Others (browse1, hello, and so on) are standalone scripts.
-
- 2004/04/14 Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
diff --git a/ext/tk/sample/demos-en/README.tkencoding b/ext/tk/sample/demos-en/README.tkencoding
deleted file mode 100644
index cca8734a28..0000000000
--- a/ext/tk/sample/demos-en/README.tkencoding
+++ /dev/null
@@ -1,29 +0,0 @@
-This is a original document of 'tkencoding.rb'.
-The library 'tkencoding.rb' is obsolete.
-Functions of tkencoding.rb is already included into Ruby/Tk.
-
--------------------------------------------------
-tkencoding.rbを用ã„ãŸæ—¥æœ¬èªžã®è¡¨ç¤ºã«ã¤ã„ã¦
-
-Copyright (C) 1999/07, Takaaki Tateishi <ttate@jaist.ac.jp>
-
-
-1. tkencoding.rbã¨ã¯ï¼Ÿ
-
-tkencoding.rbã¯Tcl/Tk8.1を利用ã—ãŸRuby/Tkã®ãŸã‚ã®ãƒ©ã‚¤ãƒ–ラリ
-ã§ã™ã€‚tkencoding.rbã‚’requireã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦Wedgetã«è¡¨ç¤ºã•
-れるテキストã¯å…¨ã¦unicode(UTF8)ã¸å¤‰æ›ã•ã‚Œã¾ã™ã€‚
-
-
-2. 使ã„æ–¹
-
-tkencoding.rbã‚’requireã—ã¦Tk.encodingã§ä½¿ç”¨ã—ã¦ã„る文字コード
-を指定ã—ã¦ä¸‹ã•ã„。例ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ãªæ„Ÿã˜ã«ãªã‚Šã¾ã™ã€‚
-
-----
-require 'tk'
-require 'tkencoding'
-
-Tk.encoding = "utf-8"
-# Tk.encoding = "shiftjis"
----
diff --git a/ext/tk/sample/demos-en/anilabel.rb b/ext/tk/sample/demos-en/anilabel.rb
deleted file mode 100644
index a48f4a10e8..0000000000
--- a/ext/tk/sample/demos-en/anilabel.rb
+++ /dev/null
@@ -1,175 +0,0 @@
-# frozen_string_literal: false
-#
-# animated label widget demo (called by 'widget')
-#
-# based on Tcl/Tk8.5a2 widget demos
-
-if defined?($anilabel_demo) && $anilabel_demo
- $anilabel_demo.destroy
- $anilabel_demo = nil
-end
-
-# demo toplevel widget
-$anilabel_demo = TkToplevel.new {|w|
- title("Animated Label Demonstration")
- iconname("anilabel")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($anilabel_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "Four animated labels are displayed below; each of the labels on the left is animated by making the text message inside it appear to scroll, and the label on the right is animated by animating the image that it displays."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $anilabel_demo
- $anilabel_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'See Code'
- command proc{showCode 'anilabel'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# create frame for label demo
-f_left = TkLabelFrame.new(base_frame, :text=>'Scrolling Texts')
-f_right = TkLabelFrame.new(base_frame, :text=>'GIF Image')
-Tk.pack(f_left, f_right, 'side'=>'left', 'expand'=>'yes', 'fill'=>'both',
- 'padx'=>10, 'pady'=>10)
-
-# animated label
-class AnimatedTextLabel < TkLabel
- def initialize(*args)
- super(*args)
- @timer = TkTimer.new{ _animation_callback }
- @timer.loop_exec = -1
- # bind('Destroy'){ @timer.stop }
- @btag = TkBindTag.new('Destroy'){ @timer.stop }
- self.bindtags_unshift(@btag)
- end
-
- def _animation_callback()
- txt = self.text
- self.text = (txt[1..-1] << txt[0])
- end
- private :_animation_callback
-
- def start(interval)
- @timer.set_interval(interval)
- @timer.start
- end
-
- def stop
- @timer.stop
- end
-end
-
-# animated image
-class AnimatedImageLabel < AnimatedTextLabel
- def initialize(*args)
- super(*args)
- @destroy_image = false
- @btag.bind_append('Destroy'){
- if @destroy_image
- begin
- self.image.delete
- rescue
- end
- end
- }
- end
- attr_accessor :destroy_image
-
- def _animation_callback()
- img = self.image
-
- fmt = img.format
- if fmt.kind_of?(Array)
- if fmt[1].kind_of?(Hash)
- # fmt == ['GIF', {'index'=>idx}]
- idx = fmt[1]['index']
- else
- # fmt == ['GIF', '-index', idx] :: Ruby1.8.2 returns this.
- idx = fmt[2]
- end
- elsif fmt.kind_of?(String) && fmt =~ /GIF -index (\d+)/
- idx = $1.to_i
- else
- idx = -1
- end
-
- begin
- img.format("GIF -index #{idx + 1}")
- rescue => e
- img.format("GIF -index 0")
- end
- end
- private :_animation_callback
-end
-
-# create labels
-l1 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:ridge,
- :font=>{:family=>'Courier', :size=>10})
-l2 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:groove,
- :font=>{:family=>'Courier', :size=>10})
-l3 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:flat,
- :font=>{:family=>'Courier', :size=>10}, :width=>18)
-Tk.pack(l1, l2, l3,
- :side=>:top, :expand=>true, :anchor=>:w, :padx=>10, :pady=>10)
-
-limg = AnimatedImageLabel.new(f_right, :borderwidth=>0)
-limg.pack(:side=>:top, :expand=>true, :padx=>10, :pady=>10)
-
-# base64-encoded animated GIF file
-tclPowerdData = <<EOD
- R0lGODlhKgBAAPQAAP//////zP//AP/MzP/Mmf/MAP+Zmf+ZZv+ZAMz//8zM
- zMyZmcyZZsxmZsxmAMwzAJnMzJmZzJmZmZlmmZlmZplmM5kzM2aZzGZmzGZm
- mWZmZmYzZmYzMzNmzDMzZgAzmSH+IE1hZGUgd2l0aCBHSU1QIGJ5IExARGVt
- YWlsbHkuY29tACH5BAV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CwAuAAkABQAABRPgA4zP95zA
- eZqoWqqpyqLkZ38hACH5BAUKAAEALAcALgANAA4AAAU7ICA+jwiUJEqeKau+
- r+vGaTmac63v/GP9HM7GQyx+jsgkkoRUHJ3Qx0cK/VQVTKtWwbVKn9suNunc
- WkMAIfkEBQoAAAAsBwA3AAcABQAABRGgIHzk842j+Yjlt5KuO8JmCAAh+QQF
- CgAAACwLADcABwAFAAAFEeAnfN9TjqP5oOWziq05lmUIACH5BAUKAAAALA8A
- NwAHAAUAAAUPoPCJTymS3yiQj4qOcPmEACH5BAUKAAAALBMANwAHAAUAAAUR
- oCB+z/MJX2o+I2miKimiawgAIfkEBQoAAAAsFwA3AAcABQAABRGgIHzfY47j
- Q4qk+aHl+pZmCAAh+QQFCgAAACwbADcABwAFAAAFEaAgfs/zCV9qPiNJouo7
- ll8IACH5BAUKAAAALB8ANwADAAUAAAUIoCB8o0iWZggAOw==
-EOD
-
-l1.text('* Slow Animation *').start(300)
-l2.text('* Fast Animation *').start(80)
-l3.text('This is a longer scrolling text in a widget that will not show the whole message at once. ').start(150)
-
-limg.destroy_image = true
-limg.image(TkPhotoImage.new(:format=>'GIF', :data=>tclPowerdData)).start(100)
diff --git a/ext/tk/sample/demos-en/aniwave.rb b/ext/tk/sample/demos-en/aniwave.rb
deleted file mode 100644
index 955f202767..0000000000
--- a/ext/tk/sample/demos-en/aniwave.rb
+++ /dev/null
@@ -1,119 +0,0 @@
-# frozen_string_literal: false
-#
-# animated wave demo (called by 'widget')
-#
-# based on Tcl/Tk8.5a2 widget demos
-
-# destroy toplevel widget for this demo script
-if defined?($aniwave_demo) && $aniwave_demo
- $aniwave_demo.destroy
- $aniwave_demo = nil
-end
-
-# create toplevel widget
-$aniwave_demo = TkToplevel.new {|w|
- title("Animated Wave Demonstration")
- iconname("aniwave")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($aniwave_demo).pack(:fill=>:both, :expand=>true)
-
-# create label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text 'This demonstration contains a canvas widget with a line item inside it. The animation routines work by adjusting the coordinates list of the line.'
-}
-msg.pack('side'=>'top')
-
-# create frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $aniwave_demo
- $aniwave_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'See Code'
- command proc{showCode 'aniwave'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# animated wave
-class AnimatedWaveDemo
- def initialize(frame, dir=:left)
- @direction = dir
-
- # create canvas widget
- @c = TkCanvas.new(frame, :width=>300, :height=>200,
- :background=>'black')
- @c.pack(:padx=>10, :pady=>10, :expand=>true)
-
- # Creates a coordinates list of a wave.
- @waveCoords = []
- @backupCoords = []
- n = 0
- (-10..300).step(5){|n| @waveCoords << [n, 100]; @backupCoords << [n, 100] }
- n = 305
- @waveCoords << [n, 0]; @backupCoords << [n, 0]
- @waveCoords << [n+5, 200]; @backupCoords << [n+5, 200]
- @coordsLen = @waveCoords.length
-
- # Create a smoothed line and arrange for its coordinates to be the
- # contents of the variable waveCoords.
- @line = TkcLine.new(@c, @waveCoords,
- :width=>1, :fill=>'green', :smooth=>true)
-
- # Main animation "loop".
- # Theoretically 100 frames-per-second (==10ms between frames)
- @timer = TkTimer.new(10){ basicMotion; reverser }
-
- # Arrange for the animation loop to stop when the canvas is deleted
- @c.bindtags_unshift(TkBindTag.new('Destroy'){ @timer.stop })
- end
-
- # Basic motion handler. Given what direction the wave is travelling
- # in, it advances the y coordinates in the coordinate-list one step in
- # that direction.
- def basicMotion
- @backupCoords, @waveCoords = @waveCoords, @backupCoords
- (0...@coordsLen).each{|idx|
- if @direction == :left
- @waveCoords[idx][1] = @backupCoords[(idx+1 == @coordsLen)? 0: idx+1][1]
- else
- @waveCoords[idx][1] = @backupCoords[(idx == 0)? -1: idx-1][1]
- end
- }
- @line.coords(@waveCoords)
- end
-
- # Oscillation handler. This detects whether to reverse the direction
- # of the wave by checking to see if the peak of the wave has moved off
- # the screen (whose size we know already.)
- def reverser
- if @waveCoords[0][1] < 10
- @direction = :right
- elsif @waveCoords[-1][1] < 10
- @direction = :left
- end
- end
-
- # animation control
- def move
- @timer.start
- end
-
- def stop
- @timer.stop
- end
-end
-
-# Start the animation processing
-AnimatedWaveDemo.new(base_frame, :left).move
diff --git a/ext/tk/sample/demos-en/arrow.rb b/ext/tk/sample/demos-en/arrow.rb
deleted file mode 100644
index 46229668c2..0000000000
--- a/ext/tk/sample/demos-en/arrow.rb
+++ /dev/null
@@ -1,250 +0,0 @@
-# frozen_string_literal: false
-# arrow.rb
-#
-# This demonstration script creates a canvas widget that displays a
-# large line with an arrowhead whose shape can be edited interactively.
-#
-# arrowhead widget demo (called by 'widget')
-#
-
-# arrowSetup --
-# This method regenerates all the text and graphics in the canvas
-# window. It's called when the canvas is initially created, and also
-# whenever any of the parameters of the arrow head are changed
-# interactively.
-#
-# Arguments:
-# c - Name of the canvas widget.
-
-def arrowSetup(c)
- v = $demo_arrowInfo
-
- # Remember the current box, if there is one.
- tags = c.gettags('current')
- if tags != []
- cur = tags.find{|t| t.kind_of?(String) && t =~ /^box[1-3]$/ }
- else
- cur = nil
- end
-
- # Create the arrow and outline.
- c.delete('all')
- TkcLine.new(c, v.x1, v.y, v.x2, v.y,
- { 'width'=>10 * v.width,
- 'arrowshape'=>[10*v.a, 10*v.b, 10*v.c],
- 'arrow'=>'last'
- }.update(v.bigLineStyle) )
- xtip = v.x2 - 10*v.b
- deltaY = 10*v.c + 5*v.width
- TkcLine.new(c, v.x2, v.y, xtip, v.y + deltaY,
- v.x2 - 10*v.a, v.y, xtip, v.y - deltaY, v.x2, v.y,
- 'width'=>2, 'capstyle'=>'round', 'joinstyle'=>'round')
-
- # Create the boxes for reshaping the line and arrowhead.
- TkcRectangle.new(c, v.x2-10*v.a-5, v.y-5, v.x2-10*v.a+5, v.y+5,
- {'tags'=>['box1', $arrowTag_box]}.update(v.boxStyle) )
- TkcRectangle.new(c, xtip-5, v.y-deltaY-5, xtip+5, v.y-deltaY+5,
- {'tags'=>['box2', $arrowTag_box]}.update(v.boxStyle) )
- TkcRectangle.new(c, v.x1-5, v.y-5*v.width-5, v.x1+5, v.y-5*v.width+5,
- {'tags'=>['box3', $arrowTag_box]}.update(v.boxStyle) )
- c.itemconfigure cur, v.activeStyle if cur
-
- # Create three arrows in actual size with the same parameters
- TkcLine.new(c, v.x2+50, 0, v.x2+50, 1000, 'width'=>2)
- tmp = v.x2+100
- TkcLine.new(c, tmp, v.y-125, tmp, v.y-75, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
- TkcLine.new(c, tmp-25, v.y, tmp+25, v.y, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
- TkcLine.new(c, tmp-25, v.y+75, tmp+25, v.y+125, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
-
- # Create a bunch of other arrows and text items showing the
- # current dimensions.
- tmp = v.x2+10
- TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y-deltaY,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
- TkcText.new(c, v.x2+15, v.y-deltaY+5*v.c, 'text'=>v.c, 'anchor'=>'w')
- tmp = v.x1-10
- TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y+5*v.width,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
- TkcText.new(c, v.x1-15, v.y, 'text'=>v.width, 'anchor'=>'e')
- tmp = v.y+5*v.width+10*v.c+10
- TkcLine.new(c, v.x2-10*v.a, tmp, v.x2, tmp,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
- TkcText.new(c, v.x2-5*v.a, tmp+5, 'text'=>v.a, 'anchor'=>'n')
- tmp = tmp+25
- TkcLine.new(c, v.x2-10*v.b, tmp, v.x2, tmp,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
- TkcText.new(c, v.x2-5*v.b, tmp+5, 'text'=>v.b, 'anchor'=>'n')
-
- if $tk_version =~ /^4.*/
- TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
- TkcText.new(c, v.x1, 330,
- 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]",'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
- else
- TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
- 'font'=>'Helvetica 18')
- TkcText.new(c, v.x1, 330,
- 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]",
- 'anchor'=>'w', 'font'=>'Helvetica 18')
- end
-
- v.count += 1
-end
-
-# toplevel widget
-if defined?($arrow_demo) && $arrow_demo
- $arrow_demo.destroy
- $arrow_demo = nil
-end
-
-# demo toplevel widget
-$arrow_demo = TkToplevel.new {|w|
- title("Arrowhead Editor Demonstration")
- iconname("arrow")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($arrow_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"This widget allows you to experiment with different widths and arrowhead shapes for lines in canvases. To change the line width or the shape of the arrowhead, drag any of the three boxes attached to the oversized arrow. The arrows on the right give examples at normal scale. The text at the bottom shows the configuration options as you'd enter them for a canvas line item."){
- pack('side'=>'top')
-}
-
-# frame
-$arrow_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $arrow_demo
- $arrow_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'arrow'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$arrow_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# canvas
-$arrow_canvas = TkCanvas.new(base_frame, 'width'=>500, 'height'=>350,
- 'relief'=>'sunken', 'borderwidth'=>2)
-$arrow_canvas.pack('expand'=>'yes', 'fill'=>'both')
-
-#
-unless Struct.const_defined?("ArrowInfo")
- $demo_arrowInfo = Struct.new("ArrowInfo", :a, :b, :c, :width, :motionProc,
- :x1, :x2, :y, :smallTips, :count,
- :bigLineStyle, :boxStyle, :activeStyle).new
-end
-$demo_arrowInfo.a = 8
-$demo_arrowInfo.b = 10
-$demo_arrowInfo.c = 3
-$demo_arrowInfo.width = 2
-$demo_arrowInfo.motionProc = proc{}
-$demo_arrowInfo.x1 = 40
-$demo_arrowInfo.x2 = 350
-$demo_arrowInfo.y = 150
-$demo_arrowInfo.smallTips = [5, 5, 2]
-$demo_arrowInfo.count = 0
-if TkWinfo.depth($arrow_canvas) > 1
- $demo_arrowInfo.bigLineStyle = {'fill'=>'SkyBlue1'}
- $demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1}
- $demo_arrowInfo.activeStyle = {'fill'=>'red', 'outline'=>'black', 'width'=>1}
-else
- $demo_arrowInfo.bigLineStyle = {'fill'=>'black',
- 'stipple'=>'@'+[$demo_dir,'..','images','grey.25'].join(File::Separator)}
- $demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1}
- $demo_arrowInfo.activeStyle = {'fill'=>'black','outline'=>'black','width'=>1}
-end
-$arrowTag_box = TkcTag.new($arrow_canvas)
-arrowSetup $arrow_canvas
-$arrowTag_box.bind('Enter', proc{$arrow_canvas.itemconfigure('current', $demo_arrowInfo.activeStyle)})
-$arrowTag_box.bind('Leave', proc{$arrow_canvas.itemconfigure('current', $demo_arrowInfo.boxStyle)})
-$arrowTag_box.bind('B1-Enter', proc{})
-$arrowTag_box.bind('B1-Leave', proc{})
-$arrow_canvas.itembind('box1', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove1 $arrow_canvas, x, y}})
-$arrow_canvas.itembind('box2', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove2 $arrow_canvas, x, y}})
-$arrow_canvas.itembind('box3', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove3 $arrow_canvas, x, y}})
-$arrowTag_box.bind('B1-Motion',
- proc{|x,y| $demo_arrowInfo.motionProc.call(x,y)}, "%x %y")
-$arrow_canvas.bind('Any-ButtonRelease-1', proc{arrowSetup $arrow_canvas})
-
-# arrowMove1 --
-# This method is called for each mouse motion event on box1 (the
-# one at the vertex of the arrow). It updates the controlling parameters
-# for the line and arrowhead.
-#
-# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
-
-def arrowMove1(c,x,y)
- v = $demo_arrowInfo
- newA = (v.x2+5-c.canvasx(x).round)/10
- newA = 0 if newA < 0
- newA = 25 if newA > 25
- if newA != v.a
- c.move('box1', 10*(v.a-newA), 0)
- v.a = newA
- end
-end
-
-# arrowMove2 --
-# This method is called for each mouse motion event on box2 (the
-# one at the trailing tip of the arrowhead). It updates the controlling
-# parameters for the line and arrowhead.
-#
-# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
-
-def arrowMove2(c,x,y)
- v = $demo_arrowInfo
- newB = (v.x2+5-c.canvasx(x).round)/10
- newB = 0 if newB < 0
- newB = 25 if newB > 25
- newC = (v.y+5-c.canvasy(y).round-5*v.width)/10
- newC = 0 if newC < 0
- newC = 20 if newC > 20
- if newB != v.b || newC != v.c
- c.move('box2', 10*(v.b-newB), 10*(v.c-newC))
- v.b = newB
- v.c = newC
- end
-end
-
-# arrowMove3 --
-# This method is called for each mouse motion event on box3 (the
-# one that controls the thickness of the line). It updates the
-# controlling parameters for the line and arrowhead.
-#
-# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
-
-def arrowMove3(c,x,y)
- v = $demo_arrowInfo
- newWidth = (v.y+2-c.canvasy(y).round)/5
- newWidth = 0 if newWidth < 0
- newWidth = 20 if newWidth > 20
- if newWidth != v.width
- c.move('box3', 0, 5*(v.width-newWidth))
- v.width = newWidth
- end
-end
-
diff --git a/ext/tk/sample/demos-en/bind.rb b/ext/tk/sample/demos-en/bind.rb
deleted file mode 100644
index 38f2b46eaf..0000000000
--- a/ext/tk/sample/demos-en/bind.rb
+++ /dev/null
@@ -1,128 +0,0 @@
-# frozen_string_literal: false
-# bind.rb
-#
-# This demonstration script creates a text widget with bindings set
-# up for hypertext-like effects.
-#
-# text (tag bindings) widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($bind_demo) && $bind_demo
- $bind_demo.destroy
- $bind_demo = nil
-end
-
-# demo toplevel widget
-$bind_demo = TkToplevel.new {|w|
- title("Text Demonstration - Tag Bindings")
- iconname("bind")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($bind_demo).pack(:fill=>:both, :expand=>true)
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $bind_demo
- $bind_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'bind'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# bind
-def tag_binding_for_bind_demo(tag, enter_style, leave_style)
- tag.bind('Any-Enter', proc{tag.configure enter_style})
- tag.bind('Any-Leave', proc{tag.configure leave_style})
-end
-
-# text
-txt = TkText.new(base_frame){|t|
- #
- setgrid 'true'
- #width 60
- #height 24
- font $font
- wrap 'word'
- TkScrollbar.new(base_frame) {|s|
- pack('side'=>'right', 'fill'=>'y')
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }
- pack('expand'=>'yes', 'fill'=>'both')
-
- #
- if TkWinfo.depth($root).to_i > 1
- tagstyle_bold = {'background'=>'#43ce80', 'relief'=>'raised',
- 'borderwidth'=>1}
- tagstyle_normal = {'background'=>'', 'relief'=>'flat'}
- else
- tagstyle_bold = {'foreground'=>'white', 'background'=>'black'}
- tagstyle_normal = {'foreground'=>'', 'background'=>''}
- end
-
- # insert text
- insert 'insert', "The same tag mechanism that controls display styles in text widgets can also be used to associate Tcl commands with regions of text, so that mouse or keyboard actions on the text cause particular Tcl commands to be invoked. For example, in the text below the descriptions of the canvas demonstrations have been tagged. When you move the mouse over a demo description the description lights up, and when you press button 1 over a description then that particular demonstration is invoked.
-
-"
- insert('end', '1. Samples of all the different types of items that can be created in canvas widgets.', (d1 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end', '2. A simple two-dimensional plot that allows you to adjust the positions of the data points.', (d2 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end', '3. Anchoring and justification modes for text items.',
- (d3 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end', '4. An editor for arrow-head shapes for line items.',
- (d4 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end', '5. A ruler with facilities for editing tab stops.',
- (d5 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end',
- '6. A grid that demonstrates how canvases can be scrolled.',
- (d6 = TkTextTag.new(t)) )
-
- # binding
- [d1, d2, d3, d4, d5, d6].each{|tag|
- tag_binding_for_bind_demo(tag, tagstyle_bold, tagstyle_normal)
- }
- d1.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'items.rb'].join(File::Separator)}`, 'items.rb')
- })
- d2.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`, 'plot.rb')
- })
- d3.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`, 'ctext.rb')
- })
- d4.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`, 'arrow.rb')
- })
- d5.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`, 'ruler.rb')
- })
- d6.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`, 'cscroll.rb')
- })
-
- TkTextMarkInsert.new(t, '0.0')
- configure('state','disabled')
-}
-
-txt.width 60
-txt.height 24
diff --git a/ext/tk/sample/demos-en/bitmap.rb b/ext/tk/sample/demos-en/bitmap.rb
deleted file mode 100644
index bb7a13d7b6..0000000000
--- a/ext/tk/sample/demos-en/bitmap.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen_string_literal: false
-# bitmap.rb
-#
-# This demonstration script creates a toplevel window that displays
-# all of Tk's built-in bitmaps.#
-# bitmap widget demo (called by 'widget')
-#
-
-# bitmapRow --
-# Create a row of bitmap items in a window.
-#
-# Arguments:
-# w - The parent window that is to contain the row.
-# args - The names of one or more bitmaps, which will be displayed
-# in a new row across the bottom of w along with their
-# names.
-
-def bitmapRow(w,*args)
- TkFrame.new(w){|row|
- pack('side'=>'top', 'fill'=>'both')
- for bitmap in args
- TkFrame.new(row){|base|
- pack('side'=>'left', 'fill'=>'both', 'pady'=>'.25c', 'padx'=>'.25c')
- TkLabel.new(base, 'text'=>bitmap, 'width'=>9).pack('side'=>'bottom')
- Tk::Label.new(base, 'bitmap'=>bitmap).pack('side'=>'bottom')
- }
- end
- }
-end
-
-# toplevel widget
-if defined?($bitmap_demo) && $bitmap_demo
- $bitmap_demo.destroy
- $bitmap_demo = nil
-end
-
-# demo toplevel widget
-$bitmap_demo = TkToplevel.new {|w|
- title("Bitmap Demonstration")
- iconname("bitmap")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($bitmap_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"This window displays all of Tk's built-in bitmaps, along with the names you can use for them in Tcl scripts."){
- pack('side'=>'top')
-}
-
-# frame
-$bitmap_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $bitmap_demo
- $bitmap_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'bitmap'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$bitmap_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-TkFrame.new(base_frame){|f|
- bitmapRow(f,'error','gray25','gray50','hourglass')
- bitmapRow(f,'info','question','questhead','warning')
- pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both')
-}
-
diff --git a/ext/tk/sample/demos-en/browse1 b/ext/tk/sample/demos-en/browse1
deleted file mode 100644
index 568892e4a8..0000000000
--- a/ext/tk/sample/demos-en/browse1
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env ruby
-
-# browse --
-# This script generates a directory browser, which lists the working
-# directory and allow you to open files or subdirectories by
-# double-clicking.
-
-require 'tk'
-
-# Create a scrollbar on the right side of the main window and a listbox
-# on the left side.
-
-listbox = TkListbox.new(nil, 'relief'=>'sunken',
- 'width'=>20, 'height'=>20, 'setgrid'=>'yes') {|l|
- TkScrollbar.new(nil, 'command'=>proc{|*args| l.yview *args}) {|s|
- pack('side'=>'right', 'fill'=>'y')
- l.yscrollcommand(proc{|first,last| s.set(first,last)})
- }
-
- pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes')
-}
-
-root = TkRoot.new
-root.minsize(1,1)
-
-# The procedure below is invoked to open a browser on a given file; if the
-# file is a directory then another instance of this program is invoked; if
-# the file is a regular file then the Mx editor is invoked to display
-# the file.
-
-def browse (dir, file)
- file = dir + File::Separator + file if dir != '.'
- type = File.ftype(file)
- if type == 'directory'
- system($0 + ' ' + file + ' &')
- else
- if type == 'file'
- if ENV['EDITOR']
- system(ENV['EDITOR'] + ' ' + file + ' &')
- else
- system('xedit ' + file + ' &')
- end
- else
- STDOUT.print "\"#{file}\" isn't a directory or regular file"
- end
- end
-end
-
-# Fill the listbox with a list of all the files in the directory (run
-# the "ls" command to get that information).
-
-dir = ARGV[0] ? ARGV[0] : '.'
-open("|ls -a #{dir}", 'r'){|fid| fid.readlines}.each{|fname|
- listbox.insert('end', fname.chomp)
-}
-
-# Set up bindings for the browser.
-
-Tk.bind_all('Control-c', proc{root.destroy})
-listbox.bind('Double-Button-1',
- proc{TkSelection.get.each{|f| browse dir, f}})
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/browse2 b/ext/tk/sample/demos-en/browse2
deleted file mode 100644
index 1a511c8d29..0000000000
--- a/ext/tk/sample/demos-en/browse2
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env ruby
-
-# browse --
-# This script generates a directory browser, which lists the working
-# directory and allow you to open files or subdirectories by
-# double-clicking.
-
-require 'tk'
-
-class Browse
- BROWSE_WIN_COUNTER = TkVariable.new(0)
-
- def initialize(dir)
- BROWSE_WIN_COUNTER.value = BROWSE_WIN_COUNTER.to_i + 1
-
- # create base frame
- base = TkToplevel.new {
- minsize(1,1)
- title('Browse : ' + dir)
- }
-
- # Create a scrollbar on the right side of the main window and a listbox
- # on the left side.
- list = TkListbox.new(base, 'relief'=>'sunken',
- 'width'=>20, 'height'=>20, 'setgrid'=>'yes') {|l|
- TkScrollbar.new(base, 'command'=>proc{|*args| l.yview *args}) {|s|
- pack('side'=>'right', 'fill'=>'y')
- l.yscrollcommand(proc{|first,last| s.set(first,last)})
- }
-
- pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes')
-
- # Fill the listbox with a list of all the files in the directory (run
- # the "ls" command to get that information).
- open("|ls -a #{dir}", 'r'){|fid| fid.readlines}.each{|fname|
- l.insert('end', fname.chomp)
- }
-
- }
-
- # Set up bindings for the browser.
- base.bind('Destroy', proc{
- Browse::BROWSE_WIN_COUNTER.value = \
- Browse::BROWSE_WIN_COUNTER.to_i - 1
- })
- base.bind('Control-c', proc{base.destroy})
- list.bind('Double-Button-1',
- proc{TkSelection.get.each{|f| self.browse dir, f}})
- end
-
- # The method below is invoked to open a browser on a given file; if the
- # file is a directory then another instance of this program is invoked; if
- # the file is a regular file then the Mx editor is invoked to display
- # the file.
- def browse (dir, file)
- file = dir + File::Separator + file if dir != '.'
- type = File.ftype(file)
- if type == 'directory'
- Browse.new(file)
- else
- if type == 'file'
- if ENV['EDITOR']
- system(ENV['EDITOR'] + ' ' + file + ' &')
- else
- system('xedit ' + file + ' &')
- end
- else
- STDOUT.print "\"#{file}\" isn't a directory or regular file"
- end
- end
- end
-
-end
-
-Browse.new(ARGV[0] ? ARGV[0] : '.')
-
-TkRoot.new {
- withdraw
- Browse::BROWSE_WIN_COUNTER.trace('w', proc{exit if Browse::BROWSE_WIN_COUNTER.to_i == 0})
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/button.rb b/ext/tk/sample/demos-en/button.rb
deleted file mode 100644
index 00331002d2..0000000000
--- a/ext/tk/sample/demos-en/button.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-# frozen_string_literal: false
-# button.rb
-#
-# This demonstration script creates a toplevel window containing
-# several button widgets.
-#
-# button widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($button_demo) && $button_demo
- $button_demo.destroy
- $button_demo = nil
-end
-
-# demo toplevel widget
-$button_demo = TkToplevel.new {|w|
- title("Button Demonstration")
- iconname("button")
- positionWindow(w)
-}
-
-# label
-msg = TkLabel.new($button_demo) {
- font $kanji_font
- wraplength '4i'
- justify 'left'
- text "If you click on any of the four buttons below, the background of the button area will change to the color indicated in the button. You can press Tab to move among the buttons, then press Space to invoke the current button."
-}
-msg.pack('side'=>'top')
-
-# frame
-$button_buttons = Tk::Frame.new($button_demo) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $button_demo
- $button_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'See Code'
- command proc{showCode 'button'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# button
-TkButton.new($button_demo){
- text "Peach Puff"
- width 10
- command proc{
- $button_demo.configure('bg','PeachPuff1')
- $button_buttons.configure('bg','PeachPuff1')
- }
-}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2)
-
-TkButton.new($button_demo){
- text "Light Blue"
- width 10
- command proc{
- $button_demo.configure('bg','LightBlue1')
- $button_buttons.configure('bg','LightBlue1')
- }
-}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2)
-
-TkButton.new($button_demo){
- text "Sea Green"
- width 10
- command proc{
- $button_demo.configure('bg','SeaGreen2')
- $button_buttons.configure('bg','SeaGreen2')
- }
-}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2)
-
-TkButton.new($button_demo){
- text "Yellow"
- width 10
- command proc{
- $button_demo.configure('bg','Yellow1')
- $button_buttons.configure('bg','Yellow1')
- }
-}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2)
diff --git a/ext/tk/sample/demos-en/check.rb b/ext/tk/sample/demos-en/check.rb
deleted file mode 100644
index 3f3b07bd0a..0000000000
--- a/ext/tk/sample/demos-en/check.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# frozen_string_literal: false
-# check.rb
-#
-# This demonstration script creates a toplevel window containing
-# several checkbuttons.
-#
-# checkbutton widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($check_demo) && $check_demo
- $check_demo.destroy
- $check_demo = nil
-end
-
-# demo toplevel widget
-$check_demo = TkToplevel.new {|w|
- title("Checkbutton Demonstration")
- iconname("check")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($check_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "Three checkbuttons are displayed below. If you click on a button, it will toggle the button's selection state and set a Tcl variable to a value indicating the state of the checkbutton. Click the \"See Variables\" button to see the current values of the variables."
-}
-msg.pack('side'=>'top')
-
-#
-wipers = TkVariable.new(0)
-brakes = TkVariable.new(0)
-sober = TkVariable.new(0)
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $check_demo
- $check_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'check'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-
- TkButton.new(frame) {
- text 'See Variables'
- command proc{
- showVars(base_frame,
- ['wipers', wipers], ['brakes', brakes], ['sober', sober])
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-
-# checkbutton
-[ TkCheckButton.new(base_frame, 'text'=>'Wipers OK', 'variable'=>wipers),
- TkCheckButton.new(base_frame, 'text'=>'Brakes OK', 'variable'=>brakes),
- TkCheckButton.new(base_frame, 'text'=>'Driver Sober', 'variable'=>sober)
-].each{|w| w.relief('flat'); w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')}
-
diff --git a/ext/tk/sample/demos-en/check2.rb b/ext/tk/sample/demos-en/check2.rb
deleted file mode 100644
index d68b86438a..0000000000
--- a/ext/tk/sample/demos-en/check2.rb
+++ /dev/null
@@ -1,110 +0,0 @@
-# frozen_string_literal: false
-#
-# checkbutton widget demo2 (called by 'widget')
-#
-
-# delete old toplevel widget
-if defined?($check2_demo) && $check2_demo
- $check2_demo.destroy
- $check2_demo = nil
-end
-
-# create demo toplevel widget
-$check2_demo = TkToplevel.new {|w|
- title("Checkbutton Demonstration 2")
- iconname("check2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($check2_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "Four checkbuttons are displayed below. If you click on a button, it will toggle the button's selection state and set a Tcl variable to a value indicating the state of the checkbutton. The first button also follows the state of the other three. If only some of the three are checked, the first button will display the tri-state mode. Click the \"See Variables\" button to see the current values of the variables."
-}
-msg.pack('side'=>'top')
-
-# variable
-safety = TkVariable.new(0)
-wipers = TkVariable.new(0)
-brakes = TkVariable.new(0)
-sober = TkVariable.new(0)
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- TkButton.new(frame, :text=>'See Variables',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars($check2_demo,
- ['safety', safety], ['wipers', wipers],
- ['brakes', brakes], ['sober', sober])
- }),
- TkButton.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'check2'}),
- TkButton.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $check2_demo
- $check2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
- frame.grid_columnconfigure(0, :weight=>1)
-}.pack('side'=>'bottom', 'fill'=>'x')
-
-
-# checkbutton
-TkCheckButton.new(base_frame, :text=>'Safety Check', :variable=>safety,
- :relief=>:flat, :onvalue=>'all', :offvalue=>'none',
- :tristatevalue=>'partial'){
- pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')
-}
-
-[ TkCheckButton.new(base_frame, 'text'=>'Wipers OK', 'variable'=>wipers),
- TkCheckButton.new(base_frame, 'text'=>'Brakes OK', 'variable'=>brakes),
- TkCheckButton.new(base_frame, 'text'=>'Driver Sober', 'variable'=>sober)
-].each{|w|
- w.relief('flat')
- w.pack('side'=>'top', 'padx'=>15, 'pady'=>2, 'anchor'=>'w')
-}
-
-# tristate check
-in_check = false
-tristate_check = proc{|n1,n2,op|
- unless in_check
- in_check = true
- begin
- if n1 == safety
- if safety == 'none'
- wipers.value = 0
- brakes.value = 0
- sober.value = 0
- elsif safety == 'all'
- wipers.value = 1
- brakes.value = 1
- sober.value = 1
- end
- else
- if wipers == 1 && brakes == 1 && sober == 1
- safety.value = 'all'
- elsif wipers == 1 || brakes == 1 || sober == 1
- safety.value = 'partial'
- else
- safety.value = 'none'
- end
- end
- ensure
- in_check = false
- end
- end
-}
-
-[wipers, brakes, sober, safety].each{|v| v.trace('w', tristate_check)}
diff --git a/ext/tk/sample/demos-en/clrpick.rb b/ext/tk/sample/demos-en/clrpick.rb
deleted file mode 100644
index 081d11be4f..0000000000
--- a/ext/tk/sample/demos-en/clrpick.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-# frozen_string_literal: false
-# clrpick.rb
-#
-# This demonstration script prompts the user to select a color.
-#
-# widget demo prompts the user to select a color (called by 'widget')
-#
-# Note: don't support ttk_wrapper. work with standard widgets only.
-#
-
-# toplevel widget
-if defined?($clrpick_demo) && $clrpick_demo
- $clrpick_demo.destroy
- $clrpick_demo = nil
-end
-
-# demo toplevel widget
-$clrpick_demo = TkToplevel.new {|w|
- title("Color Selection Dialogs")
- iconname("colors")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($clrpick_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-#TkLabel.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
-Tk::Label.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"Press the buttons below to choose the foreground and background colors for the widgets in this window.").pack('side'=>'top')
-
-# frame
-#TkFrame.new($clrpick_demo) {|frame|
-Tk::Frame.new($clrpick_demo) {|frame|
- # TkButton.new(frame) {
- Tk::Button.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $clrpick_demo
- $clrpick_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- # TkButton.new(frame) {
- Tk::Button.new(frame) {
- text 'Show Code'
- command proc{showCode 'clrpick'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# button
-# TkButton.new($clrpick_demo, 'text'=>'Set background color ...') {|b|
-Tk::Button.new($clrpick_demo, 'text'=>'Set background color ...') {|b|
- command(proc{setColor $clrpick_demo, b, 'background',
- ['background', 'highlightbackground']})
- pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m')
-}
-
-# TkButton.new($clrpick_demo, 'text'=>'Set foreground color ...') {|b|
-Tk::Button.new($clrpick_demo, 'text'=>'Set foreground color ...') {|b|
- command(proc{setColor $clrpick_demo, b, 'foreground', ['foreground']})
- pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m')
-}
-
-def setColor(w,button,name,options)
- w.grab
- initialColor = button[name]
- color = Tk.chooseColor('title'=>"Choose a #{name} color", 'parent'=>w,
- 'initialcolor'=>initialColor)
- if color != ""
- setColor_helper(w,options,color)
- end
-
- w.grab('release')
-end
-
-def setColor_helper(w, options, color)
- options.each{|opt|
- begin
- w[opt] = color
- rescue
- end
- }
- TkWinfo.children(w).each{|child|
- setColor_helper child, options, color
- }
-end
-
diff --git a/ext/tk/sample/demos-en/colors.rb b/ext/tk/sample/demos-en/colors.rb
deleted file mode 100644
index dca147b51e..0000000000
--- a/ext/tk/sample/demos-en/colors.rb
+++ /dev/null
@@ -1,159 +0,0 @@
-# frozen_string_literal: false
-# colors.rb
-#
-# This demonstration script creates a listbox widget that displays
-# many of the colors from the X color database. You can click on
-# a color to change the application's palette.
-#
-# listbox widget demo 'colors' (called by 'widget')
-#
-
-# toplevel widget
-if defined?($colors_demo) && $colors_demo
- $colors_demo.destroy
- $colors_demo = nil
-end
-
-# demo toplevel widget
-$colors_demo = TkToplevel.new {|w|
- title("Listbox Demonstration (colors)")
- iconname("colors")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($colors_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "A listbox containing several color names is displayed below, along with a scrollbar. You can scan the list either using the scrollbar or by dragging in the listbox window with button 2 pressed. If you double-click button 1 on a color, then the application's color palette will be set to match that color"
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $colors_demo
- $colors_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'colors'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-colors_lbox = nil
-TkFrame.new(base_frame, 'borderwidth'=>10) {|w|
- s = TkScrollbar.new(w)
- colors_lbox = TkListbox.new(w) {
- setgrid 1
- width 10
- height 12
- yscrollcommand proc{|first,last| s.set first,last}
- }
- s.command(proc{|*args| colors_lbox.yview(*args)})
- s.pack('side'=>'right', 'fill'=>'y')
- colors_lbox.pack('side'=>'left', 'expand'=>1, 'fill'=>'both')
-}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y')
-
-#colors_lbox.bind('Double-1', proc{TkPalette.setPalette TkSelection.get})
-colors_lbox.bind('Double-1', proc{
- begin
- TkPalette.setPalette TkSelection.get
- rescue => e
- p e
- Tk.tk_call_without_enc('destroy', '.___tk_set_palette')
- end
- })
-
-ins_data = [
- 'gray60','gray70','gray80','gray85','gray90','gray95',
- 'snow1','snow2','snow3','snow4','seashell1','seashell2',
- 'seashell3','seashell4','AntiqueWhite1','AntiqueWhite2',
- 'AntiqueWhite3','AntiqueWhite4','bisque1','bisque2',
- 'bisque3','bisque4','PeachPuff1','PeachPuff2',
- 'PeachPuff3','PeachPuff4','NavajoWhite1','NavajoWhite2',
- 'NavajoWhite3','NavajoWhite4','LemonChiffon1',
- 'LemonChiffon2','LemonChiffon3','LemonChiffon4',
- 'cornsilk1','cornsilk2','cornsilk3','cornsilk4',
- 'ivory1','ivory2','ivory3','ivory4','honeydew1',
- 'honeydew2','honeydew3','honeydew4','LavenderBlush1',
- 'LavenderBlush2','LavenderBlush3','LavenderBlush4',
- 'MistyRose1','MistyRose2','MistyRose3','MistyRose4',
- 'azure1','azure2','azure3','azure4','SlateBlue1',
- 'SlateBlue2','SlateBlue3','SlateBlue4','RoyalBlue1',
- 'RoyalBlue2','RoyalBlue3','RoyalBlue4','blue1','blue2',
- 'blue3','blue4','DodgerBlue1','DodgerBlue2',
- 'DodgerBlue3','DodgerBlue4','SteelBlue1','SteelBlue2',
- 'SteelBlue3','SteelBlue4','DeepSkyBlue1','DeepSkyBlue2',
- 'DeepSkyBlue3','DeepSkyBlue4','SkyBlue1','SkyBlue2',
- 'SkyBlue3','SkyBlue4','LightSkyBlue1','LightSkyBlue2',
- 'LightSkyBlue3','LightSkyBlue4','SlateGray1',
- 'SlateGray2','SlateGray3','SlateGray4',
- 'LightSteelBlue1','LightSteelBlue2','LightSteelBlue3',
- 'LightSteelBlue4','LightBlue1','LightBlue2',
- 'LightBlue3','LightBlue4','LightCyan1','LightCyan2',
- 'LightCyan3','LightCyan4','PaleTurquoise1',
- 'PaleTurquoise2','PaleTurquoise3','PaleTurquoise4',
- 'CadetBlue1','CadetBlue2','CadetBlue3','CadetBlue4',
- 'turquoise1','turquoise2','turquoise3','turquoise4',
- 'cyan1','cyan2','cyan3','cyan4','DarkSlateGray1',
- 'DarkSlateGray2','DarkSlateGray3','DarkSlateGray4',
- 'aquamarine1','aquamarine2','aquamarine3','aquamarine4',
- 'DarkSeaGreen1','DarkSeaGreen2','DarkSeaGreen3',
- 'DarkSeaGreen4','SeaGreen1','SeaGreen2','SeaGreen3',
- 'SeaGreen4','PaleGreen1','PaleGreen2','PaleGreen3',
- 'PaleGreen4','SpringGreen1','SpringGreen2',
- 'SpringGreen3','SpringGreen4','green1','green2',
- 'green3','green4','chartreuse1','chartreuse2',
- 'chartreuse3','chartreuse4','OliveDrab1','OliveDrab2',
- 'OliveDrab3','OliveDrab4','DarkOliveGreen1',
- 'DarkOliveGreen2','DarkOliveGreen3','DarkOliveGreen4',
- 'khaki1','khaki2','khaki3','khaki4','LightGoldenrod1',
- 'LightGoldenrod2','LightGoldenrod3','LightGoldenrod4',
- 'LightYellow1','LightYellow2','LightYellow3',
- 'LightYellow4','yellow1','yellow2','yellow3','yellow4',
- 'gold1','gold2','gold3','gold4','goldenrod1',
- 'goldenrod2','goldenrod3','goldenrod4','DarkGoldenrod1',
- 'DarkGoldenrod2','DarkGoldenrod3','DarkGoldenrod4',
- 'RosyBrown1','RosyBrown2','RosyBrown3','RosyBrown4',
- 'IndianRed1','IndianRed2','IndianRed3','IndianRed4',
- 'sienna1','sienna2','sienna3','sienna4','burlywood1',
- 'burlywood2','burlywood3','burlywood4','wheat1',
- 'wheat2','wheat3','wheat4','tan1','tan2','tan3','tan4',
- 'chocolate1','chocolate2','chocolate3','chocolate4',
- 'firebrick1','firebrick2','firebrick3','firebrick4',
- 'brown1','brown2','brown3','brown4','salmon1','salmon2',
- 'salmon3','salmon4','LightSalmon1','LightSalmon2',
- 'LightSalmon3','LightSalmon4','orange1','orange2',
- 'orange3','orange4','DarkOrange1','DarkOrange2',
- 'DarkOrange3','DarkOrange4','coral1','coral2','coral3',
- 'coral4','tomato1','tomato2','tomato3','tomato4',
- 'OrangeRed1','OrangeRed2','OrangeRed3','OrangeRed4',
- 'red1','red2','red3','red4','DeepPink1','DeepPink2',
- 'DeepPink3','DeepPink4','HotPink1','HotPink2',
- 'HotPink3','HotPink4','pink1','pink2','pink3','pink4',
- 'LightPink1','LightPink2','LightPink3','LightPink4',
- 'PaleVioletRed1','PaleVioletRed2','PaleVioletRed3',
- 'PaleVioletRed4','maroon1','maroon2','maroon3',
- 'maroon4','VioletRed1','VioletRed2','VioletRed3',
- 'VioletRed4','magenta1','magenta2','magenta3',
- 'magenta4','orchid1','orchid2','orchid3','orchid4',
- 'plum1','plum2','plum3','plum4','MediumOrchid1',
- 'MediumOrchid2','MediumOrchid3','MediumOrchid4',
- 'DarkOrchid1','DarkOrchid2','DarkOrchid3',
- 'DarkOrchid4','purple1','purple2','purple3','purple4',
- 'MediumPurple1','MediumPurple2','MediumPurple3',
- 'MediumPurple4','thistle1','thistle2','thistle3', 'thistle4'
-]
-
-colors_lbox.insert(0, *ins_data)
diff --git a/ext/tk/sample/demos-en/combo.rb b/ext/tk/sample/demos-en/combo.rb
deleted file mode 100644
index b8bf2d8803..0000000000
--- a/ext/tk/sample/demos-en/combo.rb
+++ /dev/null
@@ -1,97 +0,0 @@
-# frozen_string_literal: false
-# combo.rb --
-#
-# This demonstration script creates several combobox widgets.
-#
-# based on "Id: combo.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($combo_demo) && $combo_demo
- $combo_demo.destroy
- $combo_demo = nil
-end
-
-$combo_demo = TkToplevel.new {|w|
- title("Combobox Demonstration")
- iconname("combo")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($combo_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top, :fill=>:x)
-Three different combo-boxes are displayed below. \
-You can add characters to the first \
-one by pointing, clicking and typing, just as with an entry; pressing \
-Return will cause the current value to be added to the list that is \
-selectable from the drop-down list, and you can choose other values \
-by pressing the Down key, using the arrow keys to pick another one, \
-and pressing Return again. The second combo-box is fixed to a \
-particular value, and cannot be modified at all. The third one only \
-allows you to select values from its drop-down list of Australian \
-cities.
-EOL
-
-## variables
-firstValue = TkVariable.new
-secondValue = TkVariable.new
-ozCity = TkVariable.new
-
-## See Code / Dismiss buttons
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Variables',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars(base_frame,
- ['firstVariable', firstValue],
- ['secondVariable', secondValue],
- ['ozCity', ozCity])
- }),
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'combo'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $combo_demo.destroy
- $combo_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-
-australianCities = [
- 'Canberra', 'Sydney', 'Melbourne', 'Perth', 'Adelaide', 'Brisbane',
- 'Hobart', 'Darwin', 'Alice Springs'
-]
-
-
-secondValue.value = 'unchangeable'
-ozCity.value = 'Sydney'
-
-Tk.pack(Ttk::Labelframe.new(frame, :text=>'Fully Editable'){|f|
- Ttk::Combobox.new(f, :textvariable=>firstValue){|b|
- b.bind('Return', '%W'){|w|
- w.values <<= w.value unless w.values.include?(w.value)
- }
- }.pack(:pady=>5, :padx=>10)
- },
-
- Ttk::LabelFrame.new(frame, :text=>'Disabled'){|f|
- Ttk::Combobox.new(f, :textvariable=>secondValue, :state=>:disabled) .
- pack(:pady=>5, :padx=>10)
- },
-
- Ttk::LabelFrame.new(frame, :text=>'Defined List Only'){|f|
- Ttk::Combobox.new(f, :textvariable=>ozCity, :state=>:readonly,
- :values=>australianCities) .
- pack(:pady=>5, :padx=>10)
- },
-
- :side=>:top, :pady=>5, :padx=>10)
diff --git a/ext/tk/sample/demos-en/cscroll.rb b/ext/tk/sample/demos-en/cscroll.rb
deleted file mode 100644
index eac615d035..0000000000
--- a/ext/tk/sample/demos-en/cscroll.rb
+++ /dev/null
@@ -1,137 +0,0 @@
-# frozen_string_literal: false
-# cscroll.rb
-#
-# This demonstration script creates a simple canvas that can be
-# scrolled in two dimensions.
-#
-# simple scrollable canvas widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($cscroll_demo) && $cscroll_demo
- $cscroll_demo.destroy
- $cscroll_demo = nil
-end
-
-# demo toplevel widget
-$cscroll_demo = TkToplevel.new {|w|
- title("Scrollable Canvas Demonstration")
- iconname("cscroll")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($cscroll_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i',
- 'justify'=>'left', 'text'=>"This window displays a canvas widget that can be scrolled either using the scrollbars or by dragging with button 2 in the canvas. If you click button 1 on one of the rectangles, its indices will be printed on stdout."){
- pack('side'=>'top')
-}
-
-# frame
-$cscroll_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $cscroll_demo
- $cscroll_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'cscroll'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$cscroll_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-unless $tk_version =~ /^4\.[01]/
- $cscroll_grid = TkFrame.new(base_frame) {
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
- }
- TkGrid.rowconfigure($cscroll_grid, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure($cscroll_grid, 0, 'weight'=>1, 'minsize'=>0)
-end
-
-# canvas
-$cscroll_canvas = TkCanvas.new(base_frame,
- 'relief'=>'sunken', 'borderwidth'=>2,
- 'scrollregion'=>['-11c', '-11c', '50c', '20c']
- ) {|c|
- if $tk_version =~ /^4\.[01]/
- pack('expand'=>'yes', 'fill'=>'both')
- else
- grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- end
-
- TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}) {|vs|
- c.yscrollcommand(proc{|first,last| vs.set first,last})
- if $tk_version =~ /^4\.[01]/
- pack('side'=>'right', 'fill'=>'y')
- else
- grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- end
- }
-
- TkScrollbar.new(base_frame, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}) {|hs|
- c.xscrollcommand(proc{|first,last| hs.set first,last})
- if $tk_version =~ /^4\.[01]/
- pack('side'=>'bottom', 'fill'=>'x')
- else
- grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- end
- }
-}
-
-bg = $cscroll_canvas.configinfo('bg')[4]
-(0..19).each{|i|
- x = -10+3*i
- y = -10
- (0..9).each{|j|
- TkcRectangle.new($cscroll_canvas, "#{x}c", "#{y}c", "#{x+2}c", "#{y+2}c",
- 'outline'=>'black', 'fill'=>bg, 'tags'=>'rect')
- TkcText.new($cscroll_canvas, "#{x+1}c", "#{y+1}c",
- 'text'=>"#{i},#{j}", 'anchor'=>'center', 'tags'=>'text')
- y += 3
- }
-}
-
-$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas})
-$cscroll_canvas.itembind('all', 'Any-Leave', proc{scrollLeave $cscroll_canvas})
-$cscroll_canvas.itembind('all', '1', proc{scrollButton $cscroll_canvas})
-$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas})
-$cscroll_canvas.bind('2', proc{|x,y| $cscroll_canvas.scan_mark(x,y)}, '%x %y')
-$cscroll_canvas.bind('B2-Motion',
- proc{|x,y| $cscroll_canvas.scan_dragto(x,y)}, '%x %y')
-
-def scrollEnter(c)
- id = c.find_withtag('current')[0].id
- id -= 1 if c.gettags('current').include?('text')
- $oldFill = c.itemconfiginfo(id, 'fill')[4]
- if TkWinfo.depth(c) > 1
- c.itemconfigure(id, 'fill'=>'SeaGreen1')
- else
- c.itemconfigure(id, 'fill'=>'black')
- c.itemconfigure(id+1, 'fill'=>'white')
- end
-end
-
-def scrollLeave(c)
- id = c.find_withtag('current')[0].id
- id -= 1 if c.gettags('current').include?('text')
- c.itemconfigure(id, 'fill'=>$oldFill)
- c.itemconfigure(id+1, 'fill'=>'black')
-end
-
-def scrollButton(c)
- id = c.find_withtag('current')[0].id
- id += 1 unless c.gettags('current').include?('text')
- print "You buttoned at #{c.itemconfiginfo(id,'text')[4]}\n"
-end
-
diff --git a/ext/tk/sample/demos-en/ctext.rb b/ext/tk/sample/demos-en/ctext.rb
deleted file mode 100644
index fdb2f423e2..0000000000
--- a/ext/tk/sample/demos-en/ctext.rb
+++ /dev/null
@@ -1,208 +0,0 @@
-# frozen_string_literal: false
-# ctext.rb
-#
-# This demonstration script creates a canvas widget with a text
-# item that can be edited and reconfigured in various ways.
-#
-# Canvas Text widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($ctext_demo) && $ctext_demo
- $ctext_demo.destroy
- $ctext_demo = nil
-end
-
-# demo toplevel widget
-$ctext_demo = TkToplevel.new {|w|
- title("Canvas Text Demonstration")
- iconname("Text")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ctext_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"This window displays a string of text to demonstrate the text facilities of canvas widgets. You can click in the boxes to adjust the position of the text relative to its positioning point or change its justification. The text also supports the following simple bindings for editing:
- 1. You can point, click, and type.
- 2. You can also select with button 1.
- 3. You can copy the selection to the mouse position with button 2.
- 4. Backspace and Control+h delete the selection if there is one;
- otherwise they delete the character just before the insertion cursor.
- 5. Delete deletes the selection if there is one; otherwise it deletes
- the character just after the insertion cursor."){
- pack('side'=>'top')
-}
-
-# frame
-$ctext_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $ctext_demo
- $ctext_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'ctext'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$ctext_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# canvas
-$ctext_canvas = TkCanvas.new(base_frame, 'relief'=>'flat',
- 'borderwidth'=>0, 'width'=>500, 'height'=>350)
-$ctext_canvas.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both')
-
-# font
-if $tk_version =~ /^4.*/
- textFont = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*'
-else
- textFont = 'Helvetica 24'
-end
-
-# canvas
-TkcRectangle.new($ctext_canvas, 245, 195, 255, 205,
- 'outline'=>'black', 'fill'=>'red')
-
-ctag_text_param = {
- 'text'=>"This is just a string of text to demonstrate the text facilities of canvas widgets. Bindings have been been defined to support editing (see above).",
- 'width'=>440, 'anchor'=>'n', 'justify'=>'left'
-}
-if $tk_version =~ /^4.*/
- ctag_text_param['font'] = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*'
-else
- ctag_text_param['font'] = 'Helvetica 24'
-end
-
-$ctag_text = TkcTag.new($ctext_canvas)
-$ctag_text.withtag(TkcText.new($ctext_canvas, 250, 200, ctag_text_param))
-
-$ctag_text.bind('1', proc{|x,y| textB1Press $ctext_canvas,x,y}, "%x %y")
-$ctag_text.bind('B1-Motion', proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
-$ctag_text.bind('Shift-1',
- proc{|x,y| $ctext_canvas.select_adjust 'current', "@#{x},#{y}"},
- "%x %y")
-$ctag_text.bind('Shift-B1-Motion',
- proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
-$ctag_text.bind('KeyPress', proc{|a| textInsert $ctext_canvas,a}, "%A")
-$ctag_text.bind('Return', proc{textInsert $ctext_canvas,"\n"})
-$ctag_text.bind('Control-h', proc{textBs $ctext_canvas})
-$ctag_text.bind('BackSpace', proc{textBs $ctext_canvas})
-$ctag_text.bind('Delete', proc{textDel $ctext_canvas})
-$ctag_text.bind('2', proc{|x,y| textPaste $ctext_canvas, "@#{x},#{y}"},
- "%x %y")
-
-# Next, create some items that allow the text's anchor position
-# to be edited.
-
-def mkTextConfig(w,x,y,option,value,color)
- item = TkcRectangle.new(w, x, y, x+30, y+30,
- 'outline'=>'black', 'fill'=>color, 'width'=>1)
- item.bind('1', proc{$ctag_text.configure option, value})
- w.addtag_withtag('config', item)
-end
-
-x = 50
-y = 50
-color = 'LightSkyBlue1'
-mkTextConfig $ctext_canvas, x, y, 'anchor', 'se', color
-mkTextConfig $ctext_canvas, x+30, y, 'anchor', 's', color
-mkTextConfig $ctext_canvas, x+60, y, 'anchor', 'sw', color
-mkTextConfig $ctext_canvas, x, y+30, 'anchor', 'e', color
-mkTextConfig $ctext_canvas, x+30, y+30, 'anchor', 'center', color
-mkTextConfig $ctext_canvas, x+60, y+30, 'anchor', 'w', color
-mkTextConfig $ctext_canvas, x, y+60, 'anchor', 'ne', color
-mkTextConfig $ctext_canvas, x+30, y+60, 'anchor', 'n', color
-mkTextConfig $ctext_canvas, x+60, y+60, 'anchor', 'nw', color
-item = TkcRectangle.new($ctext_canvas, x+40, y+40, x+50, y+50,
- 'outline'=>'black', 'fill'=>'red')
-item.bind('1', proc{$ctag_text.configure 'anchor', 'center'})
-if $tk_version =~ /^4.*/
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
- 'anchor'=>'s', 'fill'=>'brown')
-else
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position',
- 'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown')
-end
-
-# Lastly, create some items that allow the text's justification to be
-# changed.
-
-x = 350
-y = 50
-color = 'SeaGreen2'
-mkTextConfig $ctext_canvas, x, y, 'justify', 'left', color
-mkTextConfig $ctext_canvas, x+30, y, 'justify', 'center', color
-mkTextConfig $ctext_canvas, x+60, y, 'justify', 'right', color
-if $tk_version =~ /^4.*/
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
- 'anchor'=>'s', 'fill'=>'brown')
-else
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification',
- 'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown')
-end
-
-$ctext_canvas.itembind('config', 'Enter', proc{textEnter $ctext_canvas})
-$ctext_canvas.itembind('config', 'Leave',
- proc{$ctext_canvas\
- .itemconfigure('current',
- 'fill'=>$textConfigFill)})
-
-$textConfigFill = ''
-
-def textEnter(w)
- $textConfigFill = (w.itemconfiginfo 'current', 'fill')[4]
- w.itemconfigure 'current', 'fill', 'black'
-end
-
-def textInsert(w, string)
- return if string == ""
- begin
- $ctag_text.dchars 'sel.first', 'sel.last'
- rescue
- end
- $ctag_text.insert 'insert', string
-end
-
-def textPaste(w, pos)
- begin
- $ctag_text.insert pos, TkSelection.get
- rescue
- end
-end
-
-def textB1Press(w,x,y)
- w.icursor 'current', "@#{x},#{y}"
- w.itemfocus 'current'
- w.focus
- w.select_from 'current', "@#{x},#{y}"
-end
-
-def textB1Move(w,x,y)
- w.select_to 'current', "@#{x},#{y}"
-end
-
-def textBs(w)
- begin
- $ctag_text.dchars 'sel.first', 'sel.last'
- rescue
- char = $ctag_text.index('insert').to_i - 1
- $ctag_text.dchars(char) if char >= 0
- end
-end
-
-def textDel(w)
- begin
- $ctag_text.dchars 'sel.first', 'sel.last'
- rescue
- $ctag_text.dchars 'insert'
- end
-end
-
diff --git a/ext/tk/sample/demos-en/dialog1.rb b/ext/tk/sample/demos-en/dialog1.rb
deleted file mode 100644
index 3fd56a69c3..0000000000
--- a/ext/tk/sample/demos-en/dialog1.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: false
-#
-# a dialog box with a local grab (called by 'widget')
-#
-class TkDialog_Demo1 < TkDialog
- ###############
- private
- ###############
- def title
- "Dialog with local grab"
- end
-
- def message
- 'This is a modal dialog box. It uses Tk\'s "grab" command to create a "local grab" on the dialog box. The grab prevents any pointer-related events from getting to any other windows in the application until you have answered the dialog by invoking one of the buttons below. However, you can still interact with other applications.'
- end
-
- def bitmap
- 'info'
- end
-
- def default_button
- 0
- end
-
- def buttons
- # ["Dismiss", "", "Show Code"]
- ["OK", "Cancel", "Show Code"]
- end
-end
-
-ret = TkDialog_Demo1.new('message_config'=>{'wraplength'=>'4i'}).value
-case ret
-when 0
- print "You pressed OK\n"
-when 1
- print "You pressed Cancel\n"
-when 2
- showCode 'dialog1'
-end
diff --git a/ext/tk/sample/demos-en/dialog2.rb b/ext/tk/sample/demos-en/dialog2.rb
deleted file mode 100644
index fed14081c8..0000000000
--- a/ext/tk/sample/demos-en/dialog2.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: false
-#
-# a dialog box with a global grab (called by 'widget')
-#
-class TkDialog_Demo2 < TkDialog
- ###############
- private
- ###############
- def title
- "Dialog with global grab"
- end
-
- def message
- "This dialog box uses a global grab, so it prevents you from interacting with anything on your display until you invoke one of the buttons below. Global grabs are almost always a bad idea; don't use them unless you're truly desperate."
- end
-
- def bitmap
- 'info'
- end
-
- def default_button
- 0
- end
-
- def buttons
- ["OK", "Cancel", "Show Code"]
- end
-end
-
-ret = TkDialog_Demo2.new('message_config'=>{'wraplength'=>'4i'},
- 'prev_command'=>proc{|dialog|
- Tk.after 100, proc{dialog.grab('global')}
- }).value
-case ret
-when 0
- print "\You pressed OK\n"
-when 1
- print "You pressed Cancel\n"
-when 2
- showCode 'dialog2'
-end
-
diff --git a/ext/tk/sample/demos-en/doc.org/README b/ext/tk/sample/demos-en/doc.org/README
deleted file mode 100644
index 90677d3316..0000000000
--- a/ext/tk/sample/demos-en/doc.org/README
+++ /dev/null
@@ -1,7 +0,0 @@
-This directory contains a collection of demonstration programs that
-are translated into Japanese. You need to use a Japanized "wish" to
-see these Japanese-translated demonstration programs. You also need
-to put this directory ("demos.jp") at the next to "demos" since some
-of the programs refer to the image files at "demos".
-
-Please refer to the README file at "demos" for more detail.
diff --git a/ext/tk/sample/demos-en/doc.org/README.JP b/ext/tk/sample/demos-en/doc.org/README.JP
deleted file mode 100644
index 42b4929378..0000000000
--- a/ext/tk/sample/demos-en/doc.org/README.JP
+++ /dev/null
@@ -1,14 +0,0 @@
-This directory contains "widget" demo for the Japanized Tcl7.6/Tk4.2.
-Most of the messages in the original are translated to Japanese.
-But other tools in this directory are not translated.
-
-Following 2 kanji fonts are defined at the beginning of the file "widget."
-
- -*--24-*-jisx0208.1983-0
- -*--16-*-jisx0208.1983-0
-
-These fonts are all part of the core distribution of X11R5, so
-if you are running X11R5, you don't have to modify the file.
-
-But if you don't have these fonts, replace them with appropriate ones.
-"-*--14-*-jisx0208.1983-0" will be a good choice.
diff --git a/ext/tk/sample/demos-en/doc.org/README.tk80 b/ext/tk/sample/demos-en/doc.org/README.tk80
deleted file mode 100644
index c71f977d74..0000000000
--- a/ext/tk/sample/demos-en/doc.org/README.tk80
+++ /dev/null
@@ -1,46 +0,0 @@
-This directory contains a collection of programs to demonstrate
-the features of the Tk toolkit. The programs are all scripts for
-"wish", a windowing shell. If wish has been installed in /usr/local
-then you can invoke any of the programs in this directory just
-by typing its file name to your command shell. Otherwise invoke
-wish with the file as its first argument, e.g., "wish hello".
-The rest of this file contains a brief description of each program.
-Files with names ending in ".tcl" are procedure packages used by one
-or more of the demo programs; they can't be used as programs by
-themselves so they aren't described below.
-
-hello - Creates a single button; if you click on it, a message
- is typed and the application terminates.
-
-widget - Contains a collection of demonstrations of the widgets
- currently available in the Tk library. Most of the .tcl
- files are scripts for individual demos available through
- the "widget" program.
-
-ixset - A simple Tk-based wrapper for the "xset" program, which
- allows you to interactively query and set various X options
- such as mouse acceleration and bell volume. Thanks to
- Pierre David for contributing this example.
-
-rolodex - A mock-up of a simple rolodex application. It has much of
- the user interface for such an application but no back-end
- database. This program was written in response to Tom
- LaStrange's toolkit benchmark challenge.
-
-tcolor - A color editor. Allows you to edit colors in several
- different ways, and will also perform automatic updates
- using "send".
-
-rmt - Allows you to "hook-up" remotely to any Tk application
- on the display. Select an application with the menu,
- then just type commands: they'll go to that application.
-
-timer - Displays a seconds timer with start and stop buttons.
- Control-c and control-q cause it to exit.
-
-browse - A simple directory browser. Invoke it with and argument
- giving the name of the directory you'd like to browse.
- Double-click on files or subdirectories to browse them.
- Control-c and control-q cause the program to exit.
-
-sccs id = SCCS: @(#) README 1.3 96/02/16 10:49:14
diff --git a/ext/tk/sample/demos-en/doc.org/license.terms b/ext/tk/sample/demos-en/doc.org/license.terms
deleted file mode 100644
index c0a44d3fc2..0000000000
--- a/ext/tk/sample/demos-en/doc.org/license.terms
+++ /dev/null
@@ -1,39 +0,0 @@
-This software is copyrighted by the Regents of the University of
-California, Sun Microsystems, Inc., and other parties. 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.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-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.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
-are acquiring the software on behalf of the Department of Defense, the
-software shall be classified as "Commercial Computer Software" and the
-Government shall have only "Restricted Rights" as defined in Clause
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
-authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license.
diff --git a/ext/tk/sample/demos-en/doc.org/license.terms.tk80 b/ext/tk/sample/demos-en/doc.org/license.terms.tk80
deleted file mode 100644
index c0a44d3fc2..0000000000
--- a/ext/tk/sample/demos-en/doc.org/license.terms.tk80
+++ /dev/null
@@ -1,39 +0,0 @@
-This software is copyrighted by the Regents of the University of
-California, Sun Microsystems, Inc., and other parties. 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.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-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.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
-are acquiring the software on behalf of the Department of Defense, the
-software shall be classified as "Commercial Computer Software" and the
-Government shall have only "Restricted Rights" as defined in Clause
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
-authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license.
diff --git a/ext/tk/sample/demos-en/entry1.rb b/ext/tk/sample/demos-en/entry1.rb
deleted file mode 100644
index d6b0af2b5d..0000000000
--- a/ext/tk/sample/demos-en/entry1.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: false
-#
-# entry (no scrollbars) widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($entry1_demo) && $entry1_demo
- $entry1_demo.destroy
- $entry1_demo = nil
-end
-
-# demo toplevel widget
-$entry1_demo = TkToplevel.new {|w|
- title("Entry Demonstration (no scrollbars)")
- iconname("entry1")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($entry1_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "Three different entries are displayed below. You can add characters by pointing, clicking and typing. The normal Motif editing characters are supported, along with many Emacs bindings. For example, Backspace and Control-h delete the character to the left of the insertion cursor and Delete and Control-d delete the chararacter to the right of the insertion cursor. For entries that are too large to fit in the window all at once, you can scan through the entries by dragging with mouse button2 pressed."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $entry1_demo
- $entry1_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'entry1'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-#
-e1 = TkEntry.new(base_frame, 'relief'=>'sunken')
-e2 = TkEntry.new(base_frame, 'relief'=>'sunken')
-e3 = TkEntry.new(base_frame, 'relief'=>'sunken')
-[e1,e2,e3].each{|w| w.pack('side'=>'top', 'padx'=>10, 'pady'=>5, 'fill'=>'x')}
-
-#
-e1.insert(0, 'Initial value')
-e2.insert('end', "This entry contains a long value, much too long ")
-e2.insert('end', "to fit in the window at one time, so long in fact ")
-e2.insert('end', "that you'll have to scan or scroll to see the end.")
-e2.insert('end', "")
-
diff --git a/ext/tk/sample/demos-en/entry2.rb b/ext/tk/sample/demos-en/entry2.rb
deleted file mode 100644
index 460a0a02ea..0000000000
--- a/ext/tk/sample/demos-en/entry2.rb
+++ /dev/null
@@ -1,94 +0,0 @@
-# frozen_string_literal: false
-# entry2.rb
-#
-# This demonstration script is the same as the entry1.tcl script
-# except that it creates scrollbars for the entries.
-#
-# entry (with scrollbars) widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($entry2_demo) && $entry2_demo
- $entry2_demo.destroy
- $entry2_demo = nil
-end
-
-# demo toplevel widget
-$entry2_demo = TkToplevel.new {|w|
- title("Entry Demonstration (with scrollbars)")
- iconname("entry2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($entry2_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "Three different entries are displayed below, with a scrollbar for each entry. You can add characters by pointing, clicking and typing. The normal Motif editing characters are supported, along with many Emacs bindings. For example, Backspace and Control-h delete the character to the left of the insertion cursor and Delete and Control-d delete the chararacter to the right of the insertion cursor. For entries that are too large to fit in the window all at once, you can scan through the entries with the scrollbars, or by dragging with mouse button2 pressed."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $entry2_demo
- $entry2_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'entry2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-TkFrame.new(base_frame, 'borderwidth'=>10) {|w|
- # entry 1
- s1 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz')
- e1 = TkEntry.new(w, 'relief'=>'sunken') {
- xscrollcommand proc{|first,last| s1.set first,last}
- }
- s1.command(proc{|*args| e1.xview(*args)})
- e1.pack('side'=>'top', 'fill'=>'x')
- s1.pack('side'=>'top', 'fill'=>'x')
-
- # spacer
- TkFrame.new(w, 'width'=>20, 'height'=>10).pack('side'=>'top', 'fill'=>'x')
-
- # entry 2
- s2 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz')
- e2 = TkEntry.new(w, 'relief'=>'sunken') {
- xscrollcommand proc{|first,last| s2.set first,last}
- }
- s2.command(proc{|*args| e2.xview(*args)})
- e2.pack('side'=>'top', 'fill'=>'x')
- s2.pack('side'=>'top', 'fill'=>'x')
-
- # spacer
- TkFrame.new(w, 'width'=>20, 'height'=>10).pack('side'=>'top', 'fill'=>'x')
-
- # entry 3
- s3 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz')
- e3 = TkEntry.new(w, 'relief'=>'sunken') {
- xscrollcommand proc{|first,last| s3.set first,last}
- }
- s3.command(proc{|*args| e3.xview(*args)})
- e3.pack('side'=>'top', 'fill'=>'x')
- s3.pack('side'=>'top', 'fill'=>'x')
-
- #
- e1.insert(0, 'Initial value')
- e2.insert('end', "This entry contains a long value, much too long ")
- e2.insert('end', "to fit in the window at one time, so long in fact ")
- e2.insert('end', "that you'll have to scan or scroll to see the end.")
- e2.insert('end', "")
-
-}.pack('side'=>'top', 'fill'=>'x', 'expand'=>'yes')
-
diff --git a/ext/tk/sample/demos-en/entry3.rb b/ext/tk/sample/demos-en/entry3.rb
deleted file mode 100644
index 6170fe1365..0000000000
--- a/ext/tk/sample/demos-en/entry3.rb
+++ /dev/null
@@ -1,221 +0,0 @@
-# frozen_string_literal: false
-# entry3.rb --
-#
-# This demonstration script creates several entry widgets whose
-# permitted input is constrained in some way. It also shows off a
-# password entry.
-#
-# based on Tcl/Tk8.4.4 widget demos
-
-if defined?($entry3_demo) && $entry3_demo
- $entry3_demo.destroy
- $entry3_demo = nil
-end
-
-$entry3_demo = TkToplevel.new {|w|
- title("Constrained Entry Demonstration")
- iconname("entry3")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($entry3_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-Four different entries are displayed below. You can add characters \
-by pointing, clicking and typing, though each is constrained in what \
-it will accept. The first only accepts integers or the empty string \
-(checking when focus leaves it) and will flash to indicate any \
-problem. The second only accepts strings with fewer than ten \
-characters and sounds the bell when an attempt to go over the limit \
-is made. The third accepts US phone numbers, mapping letters to \
-their digit equivalent and sounding the bell on encountering an \
-invalid character or if trying to type over a character that is not \
-a digit. The fourth is a password field that accepts up to eight \
-characters (silently ignoring further ones), and displaying them as \
-asterisk characters.
-EOL
-
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $entry3_demo.destroy
- $entry3_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'entry3'
- }).pack(:side=>:left, :expand=>true)
-}
-
-# focusAndFlash --
-# Error handler for entry widgets that forces the focus onto the
-# widget and makes the widget flash by exchanging the foreground and
-# background colours at intervals of 200ms (i.e. at approximately
-# 2.5Hz).
-#
-# Arguments:
-# widget - entry widget to flash
-# fg - Initial foreground colour
-# bg - Initial background colour
-# count - Counter to control the number of times flashed
-def focusAndFlash(widget, fg, bg, count=5)
- return if count <= 0
- if fg && !fg.empty? && bg && !bg.empty?
- TkTimer.new(200, count,
- proc{widget.configure(:foreground=>bg, :background=>fg)},
- proc{widget.configure(:foreground=>fg, :background=>bg)}
- ).start
- else
- # TkTimer.new(150, 3){Tk.bell}.start
- Tk.bell
- TkTimer.new(200, count,
- proc{widget.configure(:foreground=>'white',
- :background=>'black')},
- proc{widget.configure(:foreground=>'black',
- :background=>'white')}
- ).at_end{begin
- widget.configure(:foreground=>fg,
- :background=>bg)
- rescue
- # ignore
- end}.start
- end
- widget.focus(true)
-end
-
-l1 = TkLabelFrame.new(base_frame, :text=>"Integer Entry")
-TkEntry.new(l1, :validate=>:focus,
- :vcmd=>[
- proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
- ]) {|e|
- fg = e.foreground
- bg = e.background
- invalidcommand [proc{|w| focusAndFlash(w, fg, bg)}, '%W']
- pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
-}
-
-l2 = TkLabelFrame.new(base_frame, :text=>"Length-Constrained Entry")
-TkEntry.new(l2, :validate=>:key, :invcmd=>proc{Tk.bell},
- :vcmd=>[proc{|s| s.length < 10}, '%P']
- ).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
-
-### PHONE NUMBER ENTRY ###
-# Note that the source to this is quite a bit longer as the behaviour
-# demonstrated is a lot more ambitious than with the others.
-
-# Initial content for the third entry widget
-entry3content = TkVariable.new("1-(000)-000-0000")
-
-# Mapping from alphabetic characters to numbers.
-$phoneNumberMap = {}
-Hash[*(%w(abc 2 def 3 ghi 4 jkl 5 mno 6 pqrs 7 tuv 8 wxyz 9))].each{|chars, n|
- chars.split('').each{|c|
- $phoneNumberMap[c] = n
- $phoneNumberMap[c.upcase] = n
- }
-}
-
-# phoneSkipLeft --
-# Skip over fixed characters in a phone-number string when moving left.
-#
-# Arguments:
-# widget - The entry widget containing the phone-number.
-def phoneSkipLeft(widget)
- idx = widget.index('insert')
- if idx == 8
- # Skip back two extra characters
- widget.cursor = idx - 2
- elsif idx == 7 || idx == 12
- # Skip back one extra character
- widget.cursor = idx - 1
- elsif idx <= 3
- # Can't move any further
- Tk.bell
- Tk.callback_break
- end
-end
-
-# phoneSkipRight --
-# Skip over fixed characters in a phone-number string when moving right.
-#
-# Arguments:
-# widget - The entry widget containing the phone-number.
-# add - Offset to add to index before calculation (used by validation.)
-def phoneSkipRight(widget, add = 0)
- idx = widget.index('insert')
- if (idx + add == 5)
- # Skip forward two extra characters
- widget.cursor = idx + 2
- elsif (idx + add == 6 || idx + add == 10)
- # Skip forward one extra character
- widget.cursor = idx + 1
- elsif (idx + add == 15 && add == 0)
- # Can't move any further
- Tk.bell
- Tk.callback_break
- end
-end
-
-# validatePhoneChange --
-# Checks that the replacement (mapped to a digit) of the given
-# character in an entry widget at the given position will leave a
-# valid phone number in the widget.
-#
-# widget - entry widget to validate
-# vmode - The widget's validation mode
-# idx - The index where replacement is to occur
-# char - The character (or string, though that will always be
-# refused) to be overwritten at that point.
-
-def validatePhoneChange(widget, vmode, idx, char)
- return true if idx == nil
- Tk.after_idle(proc{widget.configure(:validate=>vmode,
- :invcmd=>proc{Tk.bell})})
- if !(idx<3 || idx==6 || idx==7 || idx==11 || idx>15) && char =~ /[0-9A-Za-z]/
- widget.delete(idx)
- widget.insert(idx, $phoneNumberMap[char] || char)
- Tk.after_idle(proc{phoneSkipRight(widget, -1)})
- return true
- # Tk.update(true) # <- Don't work 'update' inter validation callback.
- # It depends on Tcl/Tk side (tested on Tcl/Tk8.5a1).
- end
- return false
-end
-
-
-l3 = TkLabelFrame.new(base_frame, :text=>"US Phone-Number Entry")
-TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell},
- :textvariable=>entry3content,
- :vcmd=>[
- proc{|w,v,i,s| validatePhoneChange(w,v,i,s)},
- "%W %v %i %S"
- ]){|e|
- # Click to focus goes to the first editable character...
- bind('FocusIn', proc{|d,w|
- if d != "NotifyAncestor"
- w.cursor = 3
- Tk.after_idle(proc{w.selection_clear})
- end
- }, '%d %W')
- bind('Left', proc{|w| phoneSkipLeft(w)}, '%W')
- bind('Right', proc{|w| phoneSkipRight(w)}, '%W')
- pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
-}
-
-l4 = TkLabelFrame.new(base_frame, :text=>"Password Entry")
-TkEntry.new(l4, :validate=>:key, :show=>'*',
- :vcmd=>[
- proc{|s| s.length <= 8},
- '%P'
- ]).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
-
-TkFrame.new(base_frame){|f|
- lower
- TkGrid.configure(l1, l2, :in=>f, :padx=>'3m', :pady=>'1m', :sticky=>:ew)
- TkGrid.configure(l3, l4, :in=>f, :padx=>'3m', :pady=>'1m', :sticky=>:ew)
- TkGrid.columnconfigure(f, [0,1], :uniform=>1)
- pack(:fill=>:both, :expand=>true)
-}
diff --git a/ext/tk/sample/demos-en/filebox.rb b/ext/tk/sample/demos-en/filebox.rb
deleted file mode 100644
index 2bdf0aac10..0000000000
--- a/ext/tk/sample/demos-en/filebox.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-# frozen_string_literal: false
-# filebox.rb
-#
-# This demonstration script prompts the user to select a file.#
-# widget demo prompts the user to select a file (called by 'widget')
-#
-
-# toplevel widget
-if defined?($filebox_demo) && $filebox_demo
- $filebox_demo.destroy
- $filebox_demo = nil
-end
-
-# demo toplevel widget
-$filebox_demo = TkToplevel.new {|w|
- title("File Selection Dialogs")
- iconname("filebox")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($filebox_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"Enter a file name in the entry box or click on the \"Browse\" buttons to select a file name using the file selection dialog.").pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $filebox_demo
- $filebox_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'filebox'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-['open', 'save'].each{|type|
- TkFrame.new(base_frame) {|f|
- TkLabel.new(f, 'text'=>"Select a file to #{type}: ", 'anchor'=>'e')\
- .pack('side'=>'left')
-
- TkEntry.new(f, 'width'=>20) {|e|
- pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
-
- TkButton.new(f, 'text'=>'Browse ...',
- 'command'=>proc{fileDialog base_frame,e,type})\
- .pack('side'=>'left')
- }
-
- pack('fill'=>'x', 'padx'=>'1c', 'pady'=>3)
- }
-}
-
-$tk_strictMotif = TkVarAccess.new('tk_strictMotif')
-if ($tk_platform['platform'] == 'unix')
- TkCheckButton.new(base_frame,
- 'text'=>'Use Motif Style Dialog',
- 'variable'=>$tk_strictMotif,
- 'onvalue'=>1, 'offvalue'=>0 ).pack('anchor'=>'c')
-end
-
-def fileDialog(w,ent,operation)
- # Type names Extension(s) Mac File Type(s)
- #
- #--------------------------------------------------------
- types = [
- ['Text files', ['.txt','.doc'] ],
- ['Text files', [], 'TEXT' ],
- ['Ruby Scripts', ['.rb'], 'TEXT' ],
- ['Tcl Scripts', ['.tcl'], 'TEXT' ],
- ['C Source Files', ['.c','.h'] ],
- ['All Source Files', ['.rb','.tcl','.c','.h'] ],
- ['Image Files', ['.gif'] ],
- ['Image Files', ['.jpeg','.jpg'] ],
- ['Image Files', [], ['GIFF','JPEG']],
- ['All files', '*' ]
- ]
-
- if operation == 'open'
- file = Tk.getOpenFile('filetypes'=>types, 'parent'=>w)
- else
- file = Tk.getSaveFile('filetypes'=>types, 'parent'=>w,
- 'initialfile'=>'Untitled',
- 'defaultextension'=>'.txt')
- end
- if file != ""
- ent.delete 0, 'end'
- ent.insert 0, file
- # ent.xview 'end'
- Tk.update_idletasks # need this for Tk::Tile::Entry
- # (to find right position of 'xview').
- ent.xview(ent.index('end'))
- end
-end
-
diff --git a/ext/tk/sample/demos-en/floor.rb b/ext/tk/sample/demos-en/floor.rb
deleted file mode 100644
index 4b77ea6a8a..0000000000
--- a/ext/tk/sample/demos-en/floor.rb
+++ /dev/null
@@ -1,1724 +0,0 @@
-# frozen_string_literal: false
-# floor.rb
-#
-# This demonstration script creates a canvas widget that displays the
-# floorplan for DEC's Western Research Laboratory.
-#
-# floorDisplay widget demo (called by 'widget')
-#
-
-# floorDisplay --
-# Recreate the floorplan display in the canvas given by "w". The
-# floor given by "active" is displayed on top with its office structure
-# visible.
-#
-# Arguments:
-# w - Name of the canvas window.
-# active - Number of active floor (1, 2, or 3).
-
-def floorDisplay(w,active)
- return if $activeFloor == active
-
- w.delete('all')
- $activeFloor = active
-
- # First go through the three floors, displaying the backgrounds for
- # each floor.
-
- floor_bg1(w,$floor_colors['bg1'],$floor_colors['outline1'])
- floor_bg2(w,$floor_colors['bg2'],$floor_colors['outline2'])
- floor_bg3(w,$floor_colors['bg3'],$floor_colors['outline3'])
-
- # Raise the background for the active floor so that it's on top.
-
- w.raise("floor#{active}")
-
- # Create a dummy item just to mark this point in the display list,
- # so we can insert highlights here.
-
- TkcRectangle.new(w,0,100,1,101, 'fill'=>'', 'outline'=>'', 'tags'=>'marker')
-
- # Add the walls and labels for the active floor, along with
- # transparent polygons that define the rooms on the floor.
- # Make sure that the room polygons are on top.
-
- $floorLabels.clear
- $floorItems.clear
- send("floor_fg#{active}", w, $floor_colors['offices'])
- w.raise('room')
-
- # Offset the floors diagonally from each other.
-
- w.move('floor1', '2c', '2c')
- w.move('floor2', '1c', '1c')
-
- # Create items for the room entry and its label.
- TkcWindow.new(w, 600, 100, 'anchor'=>'w', 'window'=>$floor_entry)
- TkcText.new(w, 600, 100, 'anchor'=>'e', 'text'=>"Room: ")
- w['scrollregion'] = w.bbox('all')
-end
-
-# newRoom --
-# This method is invoked whenever the mouse enters a room
-# in the floorplan. It changes tags so that the current room is
-# highlighted.
-#
-# Arguments:
-# w - The name of the canvas window.
-
-def newRoom(w)
- id = w.find_withtag('current')[0]
- $currentRoom.value = $floorLabels[id.id] if id != ""
- Tk.update(true)
-end
-
-# roomChanged --
-# This method is invoked whenever the currentRoom variable changes.
-# It highlights the current room and unhighlights any previous room.
-#
-# Arguments:
-# w - The canvas window displaying the floorplan.
-# args - Not used.
-
-def roomChanged(w,*args)
- w.delete('highlight')
- item = $floorItems[$currentRoom.value]
- return if item == nil
- new = TkcPolygon.new(w, *(w.coords(item)))
- new.configure('fill'=>$floor_colors['active'], 'tags'=>'highlight')
- w.raise(new, 'marker')
-end
-
-# floor_bg1 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor_bg1(w,fill,outline)
- TkcPolygon.new(w,347,80,349,82,351,84,353,85,363,92,375,99,386,104,
- 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
- 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
- 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
- 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
- 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
- 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
- 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
- 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
- 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
- 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
- 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
- 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
- TkcLine.new(w,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,0,337,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,3,114,3,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,162,398,162, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,398,162,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,278,484,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,559,327,508,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,644,391,559,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,644,389,644,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,725,133,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,725,129,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,802,389,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,3,337,0,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,559,391,559,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,802,389,644,389, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,8,25,8,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,8,114,3,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,30,25,8,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,278,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,30,25,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,93,5,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,98,5,93,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,104,7,98,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,110,10,104,7, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,116,16,110,10, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,119,20,116,16, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,122,28,119,20, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,123,32,122,28, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,123,68,123,32, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,220,68,123,68, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,386,129,386,104, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,386,104,375,99, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,375,99,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,353,85,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,220,68,220,34, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,337,70,352,56, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,352,56,358,48, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,358,48,363,39, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,363,39,365,29, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,365,29,348,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,348,25,335,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,335,22,321,14, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,321,14,300,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,300,5,283,1, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,283,1,260,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,260,0,246,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,246,0,242,2, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,242,2,236,4, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,236,4,231,8, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,231,8,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,223,17,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,221,22,223,17, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,220,34,221,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,340,360,335,363, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,335,363,331,365, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,331,365,326,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,326,366,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,304,355,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,395,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,404,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,409,290,404,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,413,292,409,290, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,418,297,413,292, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,421,302,418,297, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,422,309,421,302, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,421,318,422,309, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,421,318,417,325, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,417,325,411,330, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,411,330,405,332, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,405,332,397,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,397,333,344,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,344,333,340,334, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,340,334,336,336, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,336,336,335,338, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,335,338,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,331,347,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,332,351,331,347, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,334,354,332,351, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,336,357,334,354, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,341,359,336,357, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,341,359,340,360, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,395,288,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,304,355,258,355, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,347,80,344,76, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,344,76,337,70, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,349,82,347,80, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,351,84,349,82, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,353,85,351,84, 'fill'=>outline, 'tags'=>['floor1','bg'])
-end
-
-# floor_bg2 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor_bg2(w,fill,outline)
- TkcPolygon.new(w,559,129,484,129,484,162,398,162,398,129,315,129,
- 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
- 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
- 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
- 367,802,367,802,129,725,129,725,133,559,133,559,129,
- 'tags'=>['floor2','bg'], 'fill'=>fill)
- TkcLine.new(w,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,802,129,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,559,133,725,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,802,367,644,367, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,644,367,644,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,644,391,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,558,327,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,558,327,508,327, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,484,280,484,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,398,162,484,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,484,280,395,280, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,395,280,395,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,3,133,3,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,3,339,0,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,0,339,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,258,329,258,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,395,311,350,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,398,129,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,176,133,315,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,3,133,96,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,176,133,176,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
-end
-
-# floor_bg3 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor_bg3(w,fill,outline)
- TkcPolygon.new(w,159,300,107,300,107,248,159,248,159,129,96,129,96,
- 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
- TkcPolygon.new(w,258,370,258,329,350,329,350,311,399,311,399,129,
- 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
- TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,315,133,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,399,129,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,399,311,399,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,399,311,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,350,329,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,258,370,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,60,370,258,370, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,60,370,60,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,0,391,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,107,300,159,300,159,248,107,248,107,300,
- 'fill'=>outline, 'tags'=>['floor3','bg'])
-end
-
-# floor_fg1 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the first
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor_fg1(w,color)
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '101'
- $floorItems['101'] = i
- TkcText.new(w,358,209, 'text'=>'101', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Pub Lift1'
- $floorItems['Pub Lift1'] = i
- TkcText.new(w,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Priv Lift1'
- $floorItems['Priv Lift1'] = i
- TkcText.new(w,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '110'
- $floorItems['110'] = i
- TkcText.new(w,21.5,363, 'text'=>'110', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '109'
- $floorItems['109'] = i
- TkcText.new(w,67,363, 'text'=>'109', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '111'
- $floorItems['111'] = i
- TkcText.new(w,28.5,276.5, 'text'=>'111', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '117B'
- $floorItems['117B'] = i
- TkcText.new(w,88.5,278.5, 'text'=>'117B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '112'
- $floorItems['112'] = i
- TkcText.new(w,28.5,227.5, 'text'=>'112', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '113'
- $floorItems['113'] = i
- TkcText.new(w,28.5,179.5, 'text'=>'113', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '117A'
- $floorItems['117A'] = i
- TkcText.new(w,82,180.5, 'text'=>'117A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '117'
- $floorItems['117'] = i
- TkcText.new(w,65,235, 'text'=>'117', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '114'
- $floorItems['114'] = i
- TkcText.new(w,28.5,135, 'text'=>'114', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '115'
- $floorItems['115'] = i
- TkcText.new(w,74,141.5, 'text'=>'115', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '116'
- $floorItems['116'] = i
- TkcText.new(w,48.5,70, 'text'=>'116', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '118'
- $floorItems['118'] = i
- TkcText.new(w,108.5,102, 'text'=>'118', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,178,128,178,132,216,132,216,91,
- 163,91,163,112,149,112,149,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '120'
- $floorItems['120'] = i
- TkcText.new(w,189.5,111.5, 'text'=>'120', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192,
- 156,192,156,169,175,169,175,246,79,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '122'
- $floorItems['122'] = i
- TkcText.new(w,131,207.5, 'text'=>'122', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '121'
- $floorItems['121'] = i
- TkcText.new(w,146,180, 'text'=>'121', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '106A'
- $floorItems['106A'] = i
- TkcText.new(w,112.5,304.5, 'text'=>'106A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '105'
- $floorItems['105'] = i
- TkcText.new(w,124.5,278.5, 'text'=>'105', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '106B'
- $floorItems['106B'] = i
- TkcText.new(w,163,304.5, 'text'=>'106B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '104'
- $floorItems['104'] = i
- TkcText.new(w,184,278.5, 'text'=>'104', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '108'
- $floorItems['108'] = i
- TkcText.new(w,114.5,361, 'text'=>'108', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '107'
- $floorItems['107'] = i
- TkcText.new(w,198,361, 'text'=>'107', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Smoking'
- $floorItems['Smoking'] = i
- TkcText.new(w,280,341, 'text'=>'Smoking', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '123'
- $floorItems['123'] = i
- TkcText.new(w,245.5,190.5, 'text'=>'123', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '103'
- $floorItems['103'] = i
- TkcText.new(w,259,287, 'text'=>'103', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '124'
- $floorItems['124'] = i
- TkcText.new(w,356,150, 'text'=>'124', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '125'
- $floorItems['125'] = i
- TkcText.new(w,392,217.5, 'text'=>'125', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '126'
- $floorItems['126'] = i
- TkcText.new(w,436.5,185.5, 'text'=>'126', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,409,209,409,229,399,229,399,253,
- 486,253,486,239,474,239,474,209,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '127'
- $floorItems['127'] = i
- TkcText.new(w,436.5,'231', 'text'=>'127', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,501,164,501,174,495,174,495,188,
- 490,188,490,204,476,204,476,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'MShower'
- $floorItems['MShower'] = i
- TkcText.new(w,488.5,'184', 'text'=>'MShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Closet'
- $floorItems['Closet'] = i
- TkcText.new(w,502.5,190, 'text'=>'Closet', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'WShower'
- $floorItems['WShower'] = i
- TkcText.new(w,494.5,230, 'text'=>'WShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166,
- 697,166,697,275,553,275,531,254,515,254,
- 515,174,503,174,503,161,486,161,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '130'
- $floorItems['130'] = i
- TkcText.new(w,638.5,205, 'text'=>'130', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,308,242,339,242,339,248,342,248,
- 342,246,397,246,397,276,393,276,
- 393,309,300,309,300,248,308,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '102'
- $floorItems['102'] = i
- TkcText.new(w,367.5,278.5, 'text'=>'102', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '128'
- $floorItems['128'] = i
- TkcText.new(w,441.5,265.5, 'text'=>'128', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,510,309,486,309,486,255,530,255,
- 552,277,561,277,561,325,510,325,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '129'
- $floorItems['129'] = i
- TkcText.new(w,535.5,293, 'text'=>'129', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,696,281,740,281,740,387,642,387,
- 642,389,561,389,561,277,696,277,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '133'
- $floorItems['133'] = i
- TkcText.new(w,628.5,335, 'text'=>'133', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '132'
- $floorItems['132'] = i
- TkcText.new(w,771,334, 'text'=>'132', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '134'
- $floorItems['134'] = i
- TkcText.new(w,749.5,224, 'text'=>'134', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '135'
- $floorItems['135'] = i
- TkcText.new(w,763,148.5, 'text'=>'135', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366,
- 304,312,396,312,396,288,400,288,404,288,
- 409,290,413,292,418,297,421,302,422,309,
- 421,318,417,325,411,330,405,332,397,333,
- 344,333,340,334,336,336,335,338,332,342,
- 331,347,332,351,334,354,336,357,341,359,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Ramona Stair'
- $floorItems['Ramona Stair'] = i
- TkcText.new(w,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20,
- 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'University Stair'
- $floorItems['University Stair'] = i
- TkcText.new(w,155,77.5, 'text'=>'University Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56,
- 358,48,363,39,365,29,348,25,335,22,321,14,
- 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
- 227,13,223,17,221,22,220,34,260,34,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Plaza Stair'
- $floorItems['Plaza Stair'] = i
- TkcText.new(w,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49,
- 323,56,337,70,350,83,365,94,377,100,
- 386,104,386,128,220,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Plaza Deck'
- $floorItems['Plaza Deck'] = i
- TkcText.new(w,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '106'
- $floorItems['106'] = i
- TkcText.new(w,131.5,318.5, 'text'=>'106', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115,
- 95,128,114,128,114,151,157,151,157,153,112,153,
- 112,130,97,130,97,168,175,168,175,131,146,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '119'
- $floorItems['119'] = i
- TkcText.new(w,143.5,133, 'text'=>'119', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- TkcLine.new(w,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,169,176,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,176,247,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,376,246,376,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,307,247,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,147,129,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,202,133,176,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,352,258,387, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,0,337,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,3,114,3,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,237,52,273, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,189,52,225, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,140,52,177, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,395,306,395,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,531,254,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,475,178,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,502,162,398,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,398,129,398,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,208,475,208, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,484,278,484,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,559,327,508,327, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,644,391,559,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,644,389,644,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,514,205,475,205, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,496,189,496,187, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,725,149,725,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,725,129,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,802,389,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,739,167,802,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,0,337,9,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,58,337,21,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,43,391,43,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,105,337,75,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,91,387,91,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,154,337,117,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,139,387,139,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,227,337,166,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,337,251,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,328,302,328, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,302,355,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,395,311,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,484,278,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,395,294,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,473,278,473,275, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,473,256,473,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,533,257,531,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,553,276,551,274, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,698,276,553,276, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,559,391,559,327, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,802,389,644,389, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,741,314,741,389, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,698,280,698,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,707,280,698,280, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,802,280,731,280, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,741,280,741,302, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,698,167,727,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,725,137,725,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,514,254,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,496,175,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,502,175,502,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,475,166,475,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,496,176,496,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,491,189,496,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,491,205,491,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,487,238,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,487,240,487,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,487,252,487,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,315,133,304,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,256,133,280,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,247,270,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,307,247,294,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,214,133,232,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,217,247,217,266, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,217,309,217,291, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,217,309,172,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,154,309,148,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,175,300,175,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,151,300,175,300, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,151,247,151,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,237,78,265, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,286,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,106,309,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,130,309,125,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,99,309,99,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,127,299,99,299, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,127,309,127,299, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,155,191,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,137,169,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,171,78,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,190,78,218, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,86,192,86,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,86,192,78,192, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,301,3,301, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,286,52,301, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,252,3,252, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,203,3,203, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,3,156,52,156, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,8,25,8,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,63,114,3,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,75,114,97,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,108,114,129,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,129,114,129,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,114,52,128, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,132,89,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,88,25,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,88,114,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,218,89,144,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,147,111,147,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,162,111,147,111, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,162,109,162,111, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,162,96,162,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,218,89,218,94, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,218,89,218,119, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,8,25,88,25, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,337,258,328, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,113,129,96,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,302,355,258,355, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,386,104,386,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,377,100,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,365,94,377,100, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,350,83,365,94, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,337,70,350,83, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,337,70,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,312,49,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,295,40,312,49, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,282,37,295,40, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,260,34,282,37, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,253,34,260,34, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,386,128,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,113,152,113,129, 'fill'=>color, 'tags'=>['floor1','wall'])
-end
-
-# floor_fg2 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the second
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor_fg2(w,color)
- i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222,
- 800,222,800,168,748,168,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '238'
- $floorItems['238'] = i
- TkcText.new(w,774,195, 'text'=>'238', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '237'
- $floorItems['237'] = i
- TkcText.new(w,763,148.5, 'text'=>'237', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324,
- 643,324,643,291,641,291,641,205,696,205,
- 696,291,694,291,694,314,715,314,715,291,
- 715,205,755,205,755,190,724,190,724,187,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '246'
- $floorItems['246'] = i
- TkcText.new(w,600,264, 'text'=>'246', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '247'
- $floorItems['247'] = i
- TkcText.new(w,668.5,296.5, 'text'=>'247', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246,
- 397,246,397,255,476,255,476,250,482,250,559,250,
- 559,274,482,274,482,278,396,278,396,274,232,274,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '202'
- $floorItems['202'] = i
- TkcText.new(w,285.5,260, 'text'=>'202', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196,
- 306,196,306,180,175,180,175,169,156,169,
- 156,196,176,196,176,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '206'
- $floorItems['206'] = i
- TkcText.new(w,143,267, 'text'=>'206', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '212'
- $floorItems['212'] = i
- TkcText.new(w,28.5,307.5, 'text'=>'212', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '245'
- $floorItems['245'] = i
- TkcText.new(w,521.5,300.5, 'text'=>'245', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '244'
- $floorItems['244'] = i
- TkcText.new(w,579.5,357.5, 'text'=>'244', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '243'
- $floorItems['243'] = i
- TkcText.new(w,622,357.5, 'text'=>'243', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '242'
- $floorItems['242'] = i
- TkcText.new(w,666.5,340.5, 'text'=>'242', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = 'Barbecue Deck'
- $floorItems['Barbecue Deck'] = i
- TkcText.new(w,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '240'
- $floorItems['240'] = i
- TkcText.new(w,736,288, 'text'=>'240', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '241'
- $floorItems['241'] = i
- TkcText.new(w,722,340.5, 'text'=>'241', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '239'
- $floorItems['239'] = i
- TkcText.new(w,736,233.5, 'text'=>'239', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '248'
- $floorItems['248'] = i
- TkcText.new(w,669,241.5, 'text'=>'248', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '236'
- $floorItems['236'] = i
- TkcText.new(w,700,160, 'text'=>'236', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '235'
- $floorItems['235'] = i
- TkcText.new(w,651.5,160, 'text'=>'235', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,626,143,633,143,633,135,572,135,
- 572,143,579,143,579,185,626,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '234'
- $floorItems['234'] = i
- TkcText.new(w,606,160, 'text'=>'234', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,135,571,135,571,145,578,145,
- 578,185,527,185,527,131,557,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '233'
- $floorItems['233'] = i
- TkcText.new(w,552.5,158, 'text'=>'233', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '230'
- $floorItems['230'] = i
- TkcText.new(w,516.5,227, 'text'=>'230', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '232'
- $floorItems['232'] = i
- TkcText.new(w,500.5,158, 'text'=>'232', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '229'
- $floorItems['229'] = i
- TkcText.new(w,485.5,195, 'text'=>'229', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '227'
- $floorItems['227'] = i
- TkcText.new(w,436.5,185.5, 'text'=>'227', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '228'
- $floorItems['228'] = i
- TkcText.new(w,436.5,231, 'text'=>'228', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '226'
- $floorItems['226'] = i
- TkcText.new(w,392,217.5, 'text'=>'226', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '225'
- $floorItems['225'] = i
- TkcText.new(w,356.5,150, 'text'=>'225', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '224'
- $floorItems['224'] = i
- TkcText.new(w,270,223.5, 'text'=>'224', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '223'
- $floorItems['223'] = i
- TkcText.new(w,292,157, 'text'=>'223', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '222'
- $floorItems['222'] = i
- TkcText.new(w,244.5,157, 'text'=>'222', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '221'
- $floorItems['221'] = i
- TkcText.new(w,198,157, 'text'=>'221', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '204'
- $floorItems['204'] = i
- TkcText.new(w,324,301.5, 'text'=>'204', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '205'
- $floorItems['205'] = i
- TkcText.new(w,265.5,307, 'text'=>'205', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '207'
- $floorItems['207'] = i
- TkcText.new(w,234,362.5, 'text'=>'207', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '208'
- $floorItems['208'] = i
- TkcText.new(w,187,362.5, 'text'=>'208', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '209'
- $floorItems['209'] = i
- TkcText.new(w,138.5,362.5, 'text'=>'209', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '217'
- $floorItems['217'] = i
- TkcText.new(w,71,192, 'text'=>'217', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '217A'
- $floorItems['217A'] = i
- TkcText.new(w,93,179.5, 'text'=>'217A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '216'
- $floorItems['216'] = i
- TkcText.new(w,71,145.5, 'text'=>'216', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '215'
- $floorItems['215'] = i
- TkcText.new(w,28.5,157, 'text'=>'215', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '214'
- $floorItems['214'] = i
- TkcText.new(w,28.5,203.5, 'text'=>'214', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '213'
- $floorItems['213'] = i
- TkcText.new(w,28.5,252, 'text'=>'213', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '210'
- $floorItems['210'] = i
- TkcText.new(w,90.5,362.5, 'text'=>'210', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '211'
- $floorItems['211'] = i
- TkcText.new(w,33,364.5, 'text'=>'211', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '203'
- $floorItems['203'] = i
- TkcText.new(w,367.5,292.5, 'text'=>'203', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198,
- 154,198,154,192,109,192,109,169,99,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '220'
- $floorItems['220'] = i
- TkcText.new(w,132.5,208.5, 'text'=>'220', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = 'Priv Lift2'
- $floorItems['Priv Lift2'] = i
- TkcText.new(w,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = 'Pub Lift 2'
- $floorItems['Pub Lift 2'] = i
- TkcText.new(w,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '218'
- $floorItems['218'] = i
- TkcText.new(w,136,149.5, 'text'=>'218', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '219'
- $floorItems['219'] = i
- TkcText.new(w,132.5,180, 'text'=>'219', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '201'
- $floorItems['201'] = i
- TkcText.new(w,358,209, 'text'=>'201', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- TkcLine.new(w,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,634,144,627,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,572,133,572,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,572,144,579,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,129,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,174,197,175,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,175,197,175,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,206,757,221, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,727,189,725,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,747,167,802,167, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,747,167,747,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,755,189,739,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,769,224,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,802,224,802,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,802,129,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,725,189,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,725,186,690,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,676,133,676,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,627,144,627,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,629,186,593,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,579,144,579,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,526,129,526,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,540,186,581,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,528,186,523,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,511,186,475,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,496,190,496,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,496,205,496,202, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,475,205,527,205, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,205,539,205, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,205,558,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,249,475,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,662,206,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,695,206,675,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,695,278,642,278, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,642,291,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,695,291,695,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,716,208,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,206,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,221,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,793,224,802,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,262,716,262, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,716,220,716,264, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,716,315,716,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,315,703,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,325,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,367,644,367, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,689,367,689,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,647,315,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,659,315,691,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,600,325,600,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,627,325,644,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,644,391,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,615,325,575,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,644,391,558,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,563,325,558,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,391,558,314, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,327,508,327, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,275,484,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,302,558,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,484,275,484,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,475,208,408,208, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,188,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,162,484,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,475,162,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,254,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,484,280,395,280, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,395,311,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,307,197,293,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,278,197,233,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,233,197,233,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,307,179,284,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,233,249,278,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,269,179,269,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,220,179,220,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,155,191,110,191, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,90,190,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,98,169,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,133,52,165, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,214,52,177, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,226,52,262, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,274,52,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,234,275,234,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,226,339,258,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,211,387,211,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,214,339,177,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,3,133,3,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,165,339,129,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,117,339,80,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,68,339,59,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,0,339,46,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,0,339,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,258,329,258,387, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,395,311,350,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,176,133,315,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,3,133,96,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,66,387,66,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,115,387,115,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,163,387,163,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,234,275,276,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,288,275,309,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,321,275,341,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,375,275,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,376,245,376,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,245,340,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,293,250,307,250, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,271,179,238,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,226,179,195,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,174,169,176,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,162,169,90,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,96,169,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,175,227,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,90,190,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,179,3,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,228,3,228, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,276,3,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,110,191,110,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,155,189,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor2','wall'])
-end
-
-# floor_fg3 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the third
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor_fg3(w,color)
- i = TkcPolygon.new(w,89,228,89,180,70,180,70,228,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '316'
- $floorItems['316'] = i
- TkcText.new(w,79.5,204, 'text'=>'316', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '309'
- $floorItems['309'] = i
- TkcText.new(w,138.5,345.5, 'text'=>'309', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '308'
- $floorItems['308'] = i
- TkcText.new(w,187.5,345.5, 'text'=>'308', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '307'
- $floorItems['307'] = i
- TkcText.new(w,234,345.5, 'text'=>'307', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '305'
- $floorItems['305'] = i
- TkcText.new(w,270.5,301.5, 'text'=>'305', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '324B'
- $floorItems['324B'] = i
- TkcText.new(w,247.5,211, 'text'=>'324B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '324A'
- $floorItems['324A'] = i
- TkcText.new(w,247.5,240.5, 'text'=>'324A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '320'
- $floorItems['320'] = i
- TkcText.new(w,200,157, 'text'=>'320', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '310'
- $floorItems['310'] = i
- TkcText.new(w,90.5,345.5, 'text'=>'310', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '312'
- $floorItems['312'] = i
- TkcText.new(w,45.5,299, 'text'=>'312', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '313'
- $floorItems['313'] = i
- TkcText.new(w,45.5,252, 'text'=>'313', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '314'
- $floorItems['314'] = i
- TkcText.new(w,40.5,203.5, 'text'=>'314', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '315'
- $floorItems['315'] = i
- TkcText.new(w,59,157, 'text'=>'315', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '316B'
- $floorItems['316B'] = i
- TkcText.new(w,95,215, 'text'=>'316B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '316A'
- $floorItems['316A'] = i
- TkcText.new(w,95,191, 'text'=>'316A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198,
- 174,198,174,226,101,226,101,179,97,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '319'
- $floorItems['319'] = i
- TkcText.new(w,141.5,209, 'text'=>'319', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '311'
- $floorItems['311'] = i
- TkcText.new(w,29.5,361, 'text'=>'311', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '318'
- $floorItems['318'] = i
- TkcText.new(w,132.5,180, 'text'=>'318', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '317'
- $floorItems['317'] = i
- TkcText.new(w,136,149.5, 'text'=>'317', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '323'
- $floorItems['323'] = i
- TkcText.new(w,290,207.5, 'text'=>'323', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '325'
- $floorItems['325'] = i
- TkcText.new(w,290,235.5, 'text'=>'325', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '321'
- $floorItems['321'] = i
- TkcText.new(w,243.5,157, 'text'=>'321', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '322'
- $floorItems['322'] = i
- TkcText.new(w,293.5,163.5, 'text'=>'322', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = 'Pub Lift3'
- $floorItems['Pub Lift3'] = i
- TkcText.new(w,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = 'Priv Lift3'
- $floorItems['Priv Lift3'] = i
- TkcText.new(w,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '303'
- $floorItems['303'] = i
- TkcText.new(w,373.5,292.5, 'text'=>'303', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,272,203,272,249,252,249,252,230,
- 244,230,244,221,252,221,252,203,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '324'
- $floorItems['324'] = i
- TkcText.new(w,262,226, 'text'=>'324', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '304'
- $floorItems['304'] = i
- TkcText.new(w,324,301.5, 'text'=>'304', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '301'
- $floorItems['301'] = i
- TkcText.new(w,358,209, 'text'=>'301', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '327'
- $floorItems['327'] = i
- TkcText.new(w,387,215.5, 'text'=>'327', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '326'
- $floorItems['326'] = i
- TkcText.new(w,365.5,150, 'text'=>'326', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282,
- 375,274,397,274,397,248,339,248,339,242,308,242,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '302'
- $floorItems['302'] = i
- TkcText.new(w,319.5,261, 'text'=>'302', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203,
- 272,193,263,180,242,180,175,180,175,169,156,169,
- 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
- 107,248,160,248,160,301,107,301,107,275,70,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '306'
- $floorItems['306'] = i
- TkcText.new(w,200.5,284.5, 'text'=>'306', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,399,129,399,311, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,258,202,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,251,231,243,231, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,243,220,251,220, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,243,250,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,155,197,155,190, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,110,192,110,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,155,192,110,192, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,176,197,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,69,280,69,274, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,276,69,276, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,69,262,69,226, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,228,69,228, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,179,75,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,69,179,69,214, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,220,90,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,204,90,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,203,100,203, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,187,90,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,227,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,100,179,100,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,100,179,87,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,96,179,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,162,169,96,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,173,169,176,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,195,179,226,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,224,133,224,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,264,179,264,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,238,179,264,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,207,273,193, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,235,273,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,224,273,219, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,193,307,193, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,222,307,222, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,384,247,376,247, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,376,247,376,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,376,283,366,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,376,283,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,399,275,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,341,275,320,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,308,275,298,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,243,322,243,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,243,275,284,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,258,322,226,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,212,370,212,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,214,322,177,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,163,370,163,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,165,322,129,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,84,322,117,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,71,322,64,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,115,322,115,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,66,322,66,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,52,322,21,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,331,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,331,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,96,133,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,315,133,176,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,315,129,399,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,399,311,350,311, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,258,322,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,60,370,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,60,370,60,391, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,0,391,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,307,250,307,242, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,258,250,243,250, 'fill'=>color, 'tags'=>['floor3','wall'])
-end
-
-# Below is the "main program" that creates the floorplan demonstration.
-
-# toplevel widget
-if defined?($floor_demo) && $floor_demo
- $floor_demo.destroy
- $floor_demo = nil
-end
-
-# demo toplevel widget
-$floor_demo = TkToplevel.new {|w|
- title("Floorplan Canvas Demonstration")
- iconname("Floorplan")
- positionWindow(w)
- geometry('+20+20')
- minsize(100,100)
-}
-
-base_frame = TkFrame.new($floor_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
- 'text'=>"This window contains a canvas widget showing the floorplan of Digital Equipment Corporation's Western Research Laboratory. It has three levels. At any given time one of the levels is active, meaning that you can see its room structure. To activate a level, click the left mouse button anywhere on it. As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the \"Room:\" entry. You can also type a room number in the entry and the room will light up."){
- pack('side'=>'top')
-}
-
-# frame
-$floor_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $floor_demo
- $floor_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'floor'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$floor_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-#
-$floorLabels = {}
-$floorItems = {}
-
-# canvas
-if $tk_version =~ /^4\.[01]/
- $floor_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken',
- 'highlightthickness'=>2)
- $floor_canvas = TkCanvas.new($floor_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
- 'highlightthickness'=>0) {|c|
- TkScrollbar.new(base_frame, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}){|hs|
- c.xscrollcommand(proc{|first,last| hs.set first,last})
- pack('side'=>'bottom', 'fill'=>'x')
- }
- TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}){|vs|
- c.yscrollcommand(proc{|first,last| vs.set first,last})
- pack('side'=>'right', 'fill'=>'y')
- }
- }
- $floor_canvas_frame.pack('side'=>'top','fill'=>'both', 'expand'=>'yes')
- $floor_canvas.pack('expand'=>'yes', 'fill'=>'both')
-
-else
- TkFrame.new(base_frame) {|f|
- pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes')
-
- h = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'horizontal')
- v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical')
-
- TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
- $floor_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
- 'highlightthickness'=>0) {
- xscrollcommand(proc{|first,last| h.set first,last})
- yscrollcommand(proc{|first,last| v.set first,last})
- pack('expand'=>'yes', 'fill'=>'both')
- }
- grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- }
-
- v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
-
- TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
-
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
-
- v.command(proc{|*args| $floor_canvas.yview(*args)})
- h.command(proc{|*args| $floor_canvas.xview(*args)})
- }
-end
-
-
-# Create an entry for displaying and typing in current room.
-
-$currentRoom = TkVariable.new
-$floor_entry = TkEntry.new($floor_canvas, 'width'=>10, 'relief'=>'sunken',
- 'bd'=>2, 'textvariable'=>$currentRoom)
-
-# Choose colors, then fill in the floorplan.
-
-$floor_colors = {}
-if TkWinfo.depth($floor_canvas) > 1
- $floor_colors['bg1'] = '#a9c1da'
- $floor_colors['outline1'] = '#77889a'
- $floor_colors['bg2'] = '#9ab0c6'
- $floor_colors['outline2'] = '#687786'
- $floor_colors['bg3'] = '#8ba0b3'
- $floor_colors['outline3'] = '#596673'
- $floor_colors['offices'] = 'Black'
- $floor_colors['active'] = '#c4d1df'
-else
- $floor_colors['bg1'] = 'white'
- $floor_colors['outline1'] = 'black'
- $floor_colors['bg2'] = 'white'
- $floor_colors['outline2'] = 'black'
- $floor_colors['bg3'] = 'white'
- $floor_colors['outline3'] = 'black'
- $floor_colors['offices'] = 'Black'
- $floor_colors['active'] = 'black'
-end
-
-$activeFloor = ''
-floorDisplay $floor_canvas,3
-
-# Set up event bindings for canvas:
-
-$floor_canvas.itembind('floor1', '1', proc{floorDisplay $floor_canvas,1})
-$floor_canvas.itembind('floor2', '1', proc{floorDisplay $floor_canvas,2})
-$floor_canvas.itembind('floor3', '1', proc{floorDisplay $floor_canvas,3})
-$floor_canvas.itembind('room', 'Enter', proc{newRoom $floor_canvas})
-$floor_canvas.itembind('room', 'Leave', proc{$currentRoom.value = ''})
-$floor_canvas.bind('2', proc{|x,y| $floor_canvas.scan_mark x,y}, '%x %y')
-$floor_canvas.bind('B2-Motion',
- proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y')
-$floor_canvas.bind('Destroy', proc{$currentRoom.unset})
-$currentRoom.value = ''
-$currentRoom.trace('w',proc{roomChanged $floor_canvas})
-
diff --git a/ext/tk/sample/demos-en/floor2.rb b/ext/tk/sample/demos-en/floor2.rb
deleted file mode 100644
index 518dd3b0fd..0000000000
--- a/ext/tk/sample/demos-en/floor2.rb
+++ /dev/null
@@ -1,1723 +0,0 @@
-# frozen_string_literal: false
-%# floor2.rb
-#
-# This demonstration script creates a canvas widget that displays the
-# floorplan for DEC's Western Research Laboratory.
-#
-# floorDisplay widget demo (called by 'widget')
-#
-
-# floorDisplay2 --
-# Recreate the floorplan display in the canvas given by "w". The
-# floor given by "active" is displayed on top with its office structure
-# visible.
-#
-# Arguments:
-# w - Name of the canvas window.
-# active - Number of active floor (1, 2, or 3).
-
-def floorDisplay2(w,active)
- return if $activeFloor2 == active
-
- w.delete('all')
- $activeFloor2 = active
-
- # First go through the three floors, displaying the backgrounds for
- # each floor.
-
- floor2_bg1(w,$floor2_colors['bg1'],$floor2_colors['outline1'])
- floor2_bg2(w,$floor2_colors['bg2'],$floor2_colors['outline2'])
- floor2_bg3(w,$floor2_colors['bg3'],$floor2_colors['outline3'])
-
- # Raise the background for the active floor so that it's on top.
-
- w.raise("floor#{active}")
-
- # Create a dummy item just to mark this point in the display list,
- # so we can insert highlights here.
-
- w.create(TkcRectangle,0,100,1,101,'fill'=>'','outline'=>'','tags'=>'marker')
-
- # Add the walls and labels for the active floor, along with
- # transparent polygons that define the rooms on the floor.
- # Make sure that the room polygons are on top.
-
- $floorLabels2.clear
- $floorItems2.clear
- send("floor2_fg#{active}", w, $floor2_colors['offices'])
- w.raise('room')
-
- # Offset the floors diagonally from each other.
-
- w.move('floor1', '2c', '2c')
- w.move('floor2', '1c', '1c')
-
- # Create items for the room entry and its label.
- w.create(TkcWindow, 600, 100, 'anchor'=>'w', 'window'=>$floor2_entry)
- w.create(TkcText, 600, 100, 'anchor'=>'e', 'text'=>"Room: ")
- w['scrollregion'] = w.bbox('all')
-end
-
-# newRoom2 --
-# This method is invoked whenever the mouse enters a room
-# in the floorplan. It changes tags so that the current room is
-# highlighted.
-#
-# Arguments:
-# w - The name of the canvas window.
-
-def newRoom2(w)
- id = w.find_withtag('current')[0]
- $currentRoom2.value = $floorLabels2[id.id] if id != ""
- Tk.update(true)
-end
-
-# roomChanged2 --
-# This method is invoked whenever the currentRoom variable changes.
-# It highlights the current room and unhighlights any previous room.
-#
-# Arguments:
-# w - The canvas window displaying the floorplan.
-# args - Not used.
-
-def roomChanged2(w,*args)
- w.delete('highlight')
- item = $floorItems2[$currentRoom2.value]
- return if item == nil
- new = TkcPolygon.new(w, *(w.coords(item)))
- new.configure('fill'=>$floor2_colors['active'], 'tags'=>'highlight')
- w.raise(new, 'marker')
-end
-
-# floor2_bg1 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor2_bg1(w,fill,outline)
- w.create(TkcPolygon,347,80,349,82,351,84,353,85,363,92,375,99,386,104,
- 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
- 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
- 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
- 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
- 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
- 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
- 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
- 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
- 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
- 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
- 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
- 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
- w.create(TkcLine,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,0,337,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,3,114,3,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,258,387,60,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,162,398,162, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,398,162,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,278,484,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,311,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,508,327,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,559,327,508,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,644,391,559,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,644,389,644,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,559,129,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,162,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,725,133,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,559,129,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,725,129,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,802,389,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,3,337,0,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,559,391,559,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,802,389,644,389, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,725,133,725,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,8,25,8,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,8,114,3,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,30,25,8,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,278,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,30,25,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,93,5,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,98,5,93,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,104,7,98,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,110,10,104,7, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,116,16,110,10, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,119,20,116,16, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,122,28,119,20, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,123,32,122,28, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,123,68,123,32, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,220,68,123,68, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,386,129,386,104, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,386,104,375,99, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,375,99,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,353,85,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,220,68,220,34, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,337,70,352,56, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,352,56,358,48, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,358,48,363,39, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,363,39,365,29, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,365,29,348,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,348,25,335,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,335,22,321,14, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,321,14,300,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,300,5,283,1, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,283,1,260,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,260,0,246,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,246,0,242,2, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,242,2,236,4, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,236,4,231,8, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,231,8,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,223,17,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,221,22,223,17, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,220,34,221,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,340,360,335,363, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,335,363,331,365, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,331,365,326,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,326,366,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,304,355,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,395,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,404,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,409,290,404,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,413,292,409,290, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,418,297,413,292, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,421,302,418,297, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,422,309,421,302, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,421,318,422,309, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,421,318,417,325, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,417,325,411,330, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,411,330,405,332, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,405,332,397,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,397,333,344,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,344,333,340,334, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,340,334,336,336, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,336,336,335,338, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,335,338,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,331,347,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,332,351,331,347, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,334,354,332,351, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,336,357,334,354, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,341,359,336,357, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,341,359,340,360, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,395,288,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,304,355,258,355, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,347,80,344,76, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,344,76,337,70, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,349,82,347,80, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,351,84,349,82, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,353,85,351,84, 'fill'=>outline, 'tags'=>['floor1','bg'])
-end
-
-# floor2_bg2 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor2_bg2(w,fill,outline)
- w.create(TkcPolygon,559,129,484,129,484,162,398,162,398,129,315,129,
- 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
- 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
- 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
- 367,802,367,802,129,725,129,725,133,559,133,559,129,
- 'tags'=>['floor2','bg'], 'fill'=>fill)
- w.create(TkcLine,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,802,129,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,725,133,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,559,129,559,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,559,133,725,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,484,162,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,559,129,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,802,367,644,367, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,644,367,644,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,644,391,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,558,327,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,558,327,508,327, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,508,327,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,484,311,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,484,280,484,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,398,162,484,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,484,280,395,280, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,395,280,395,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,258,387,60,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,3,133,3,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,3,339,0,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,0,339,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,258,329,258,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,350,329,258,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,395,311,350,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,398,129,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,176,133,315,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,3,133,96,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,315,133,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,176,133,176,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
-end
-
-# floor2_bg3 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor2_bg3(w,fill,outline)
- w.create(TkcPolygon,159,300,107,300,107,248,159,248,159,129,96,129,96,
- 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
- w.create(TkcPolygon,258,370,258,329,350,329,350,311,399,311,399,129,
- 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
- w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,315,133,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,315,133,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,399,129,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,399,311,399,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,399,311,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,350,329,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,350,329,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,258,370,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,60,370,258,370, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,60,370,60,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,0,391,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,107,300,159,300,159,248,107,248,107,300,
- 'fill'=>outline, 'tags'=>['floor3','bg'])
-end
-
-# floor2_fg1 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the first
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor2_fg1(w,color)
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '101'
- $floorItems2['101'] = i
- w.create(TkcText,358,209, 'text'=>'101', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Pub Lift1'
- $floorItems2['Pub Lift1'] = i
- w.create(TkcText,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Priv Lift1'
- $floorItems2['Priv Lift1'] = i
- w.create(TkcText,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '110'
- $floorItems2['110'] = i
- w.create(TkcText,21.5,363, 'text'=>'110', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '109'
- $floorItems2['109'] = i
- w.create(TkcText,67,363, 'text'=>'109', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '111'
- $floorItems2['111'] = i
- w.create(TkcText,28.5,276.5, 'text'=>'111', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '117B'
- $floorItems2['117B'] = i
- w.create(TkcText,88.5,278.5, 'text'=>'117B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '112'
- $floorItems2['112'] = i
- w.create(TkcText,28.5,227.5, 'text'=>'112', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '113'
- $floorItems2['113'] = i
- w.create(TkcText,28.5,179.5, 'text'=>'113', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '117A'
- $floorItems2['117A'] = i
- w.create(TkcText,82,180.5, 'text'=>'117A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '117'
- $floorItems2['117'] = i
- w.create(TkcText,65,235, 'text'=>'117', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '114'
- $floorItems2['114'] = i
- w.create(TkcText,28.5,135, 'text'=>'114', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '115'
- $floorItems2['115'] = i
- w.create(TkcText,74,141.5, 'text'=>'115', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '116'
- $floorItems2['116'] = i
- w.create(TkcText,48.5,70, 'text'=>'116', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '118'
- $floorItems2['118'] = i
- w.create(TkcText,108.5,102, 'text'=>'118', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,178,128,178,132,216,132,216,91,
- 163,91,163,112,149,112,149,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '120'
- $floorItems2['120'] = i
- w.create(TkcText,189.5,111.5, 'text'=>'120', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192,
- 156,192,156,169,175,169,175,246,79,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '122'
- $floorItems2['122'] = i
- w.create(TkcText,131,207.5, 'text'=>'122', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '121'
- $floorItems2['121'] = i
- w.create(TkcText,146,180, 'text'=>'121', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '106A'
- $floorItems2['106A'] = i
- w.create(TkcText,112.5,304.5, 'text'=>'106A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '105'
- $floorItems2['105'] = i
- w.create(TkcText,124.5,278.5, 'text'=>'105', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '106B'
- $floorItems2['106B'] = i
- w.create(TkcText,163,304.5, 'text'=>'106B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '104'
- $floorItems2['104'] = i
- w.create(TkcText,184,278.5, 'text'=>'104', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '108'
- $floorItems2['108'] = i
- w.create(TkcText,114.5,361, 'text'=>'108', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '107'
- $floorItems2['107'] = i
- w.create(TkcText,198,361, 'text'=>'107', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Smoking'
- $floorItems2['Smoking'] = i
- w.create(TkcText,280,341, 'text'=>'Smoking', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '123'
- $floorItems2['123'] = i
- w.create(TkcText,245.5,190.5, 'text'=>'123', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '103'
- $floorItems2['103'] = i
- w.create(TkcText,259,287, 'text'=>'103', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '124'
- $floorItems2['124'] = i
- w.create(TkcText,356,150, 'text'=>'124', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '125'
- $floorItems2['125'] = i
- w.create(TkcText,392,217.5, 'text'=>'125', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '126'
- $floorItems2['126'] = i
- w.create(TkcText,436.5,185.5, 'text'=>'126', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,409,209,409,229,399,229,399,253,
- 486,253,486,239,474,239,474,209,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '127'
- $floorItems2['127'] = i
- w.create(TkcText,436.5,'231', 'text'=>'127', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,501,164,501,174,495,174,495,188,
- 490,188,490,204,476,204,476,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'MShower'
- $floorItems2['MShower'] = i
- w.create(TkcText,488.5,'184', 'text'=>'MShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Closet'
- $floorItems2['Closet'] = i
- w.create(TkcText,502.5,190, 'text'=>'Closet', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'WShower'
- $floorItems2['WShower'] = i
- w.create(TkcText,494.5,230, 'text'=>'WShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166,
- 697,166,697,275,553,275,531,254,515,254,
- 515,174,503,174,503,161,486,161,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '130'
- $floorItems2['130'] = i
- w.create(TkcText,638.5,205, 'text'=>'130', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,308,242,339,242,339,248,342,248,
- 342,246,397,246,397,276,393,276,
- 393,309,300,309,300,248,308,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '102'
- $floorItems2['102'] = i
- w.create(TkcText,367.5,278.5, 'text'=>'102', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '128'
- $floorItems2['128'] = i
- w.create(TkcText,441.5,265.5, 'text'=>'128', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,510,309,486,309,486,255,530,255,
- 552,277,561,277,561,325,510,325,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '129'
- $floorItems2['129'] = i
- w.create(TkcText,535.5,293, 'text'=>'129', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,696,281,740,281,740,387,642,387,
- 642,389,561,389,561,277,696,277,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '133'
- $floorItems2['133'] = i
- w.create(TkcText,628.5,335, 'text'=>'133', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '132'
- $floorItems2['132'] = i
- w.create(TkcText,771,334, 'text'=>'132', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '134'
- $floorItems2['134'] = i
- w.create(TkcText,749.5,224, 'text'=>'134', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '135'
- $floorItems2['135'] = i
- w.create(TkcText,763,148.5, 'text'=>'135', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366,
- 304,312,396,312,396,288,400,288,404,288,
- 409,290,413,292,418,297,421,302,422,309,
- 421,318,417,325,411,330,405,332,397,333,
- 344,333,340,334,336,336,335,338,332,342,
- 331,347,332,351,334,354,336,357,341,359,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Ramona Stair'
- $floorItems2['Ramona Stair'] = i
- w.create(TkcText,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20,
- 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'University Stair'
- $floorItems2['University Stair'] = i
- w.create(TkcText,155,77.5, 'text'=>'University Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56,
- 358,48,363,39,365,29,348,25,335,22,321,14,
- 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
- 227,13,223,17,221,22,220,34,260,34,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Plaza Stair'
- $floorItems2['Plaza Stair'] = i
- w.create(TkcText,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49,
- 323,56,337,70,350,83,365,94,377,100,
- 386,104,386,128,220,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Plaza Deck'
- $floorItems2['Plaza Deck'] = i
- w.create(TkcText,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '106'
- $floorItems2['106'] = i
- w.create(TkcText,131.5,318.5, 'text'=>'106', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115,
- 95,128,114,128,114,151,157,151,157,153,112,153,
- 112,130,97,130,97,168,175,168,175,131,146,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '119'
- $floorItems2['119'] = i
- w.create(TkcText,143.5,133, 'text'=>'119', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- w.create(TkcLine,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,169,176,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,176,247,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,247,340,224, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,376,246,376,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,307,247,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,147,129,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,202,133,176,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,398,129,315,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,352,258,387, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,60,387,60,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,0,337,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,3,114,3,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,387,60,387, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,237,52,273, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,189,52,225, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,140,52,177, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,395,306,395,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,531,254,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,475,178,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,502,162,398,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,398,129,398,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,383,188,376,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,188,408,194, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,398,227,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,227,398,227, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,222,408,227, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,206,408,210, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,208,475,208, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,484,278,484,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,484,311,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,508,327,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,559,327,508,327, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,644,391,559,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,644,389,644,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,514,205,475,205, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,496,189,496,187, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,559,129,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,484,162,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,725,133,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,559,129,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,725,149,725,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,725,129,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,802,389,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,739,167,802,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,396,188,408,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,0,337,9,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,58,337,21,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,43,391,43,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,105,337,75,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,91,387,91,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,154,337,117,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,139,387,139,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,227,337,166,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,337,251,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,328,302,328, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,302,355,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,395,311,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,484,278,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,395,294,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,473,278,473,275, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,473,256,473,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,533,257,531,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,553,276,551,274, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,698,276,553,276, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,559,391,559,327, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,802,389,644,389, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,741,314,741,389, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,698,280,698,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,707,280,698,280, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,802,280,731,280, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,741,280,741,302, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,698,167,727,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,725,137,725,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,514,254,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,496,175,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,502,175,502,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,475,166,475,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,496,176,496,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,491,189,496,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,491,205,491,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,487,238,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,487,240,487,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,487,252,487,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,315,133,304,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,256,133,280,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,247,270,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,307,247,294,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,214,133,232,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,217,247,217,266, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,217,309,217,291, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,217,309,172,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,154,309,148,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,175,300,175,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,151,300,175,300, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,151,247,151,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,237,78,265, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,286,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,106,309,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,130,309,125,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,99,309,99,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,127,299,99,299, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,127,309,127,299, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,155,191,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,137,169,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,171,78,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,190,78,218, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,86,192,86,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,86,192,78,192, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,301,3,301, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,286,52,301, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,252,3,252, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,203,3,203, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,3,156,52,156, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,8,25,8,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,63,114,3,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,75,114,97,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,108,114,129,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,129,114,129,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,114,52,128, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,132,89,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,88,25,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,88,114,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,218,89,144,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,147,111,147,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,162,111,147,111, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,162,109,162,111, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,162,96,162,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,218,89,218,94, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,218,89,218,119, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,8,25,88,25, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,337,258,328, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,113,129,96,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,302,355,258,355, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,386,104,386,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,377,100,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,365,94,377,100, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,350,83,365,94, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,337,70,350,83, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,337,70,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,312,49,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,295,40,312,49, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,282,37,295,40, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,260,34,282,37, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,253,34,260,34, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,386,128,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,113,152,113,129, 'fill'=>color, 'tags'=>['floor1','wall'])
-end
-
-# floor2_fg2 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the second
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor2_fg2(w,color)
- i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222,
- 800,222,800,168,748,168,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '238'
- $floorItems2['238'] = i
- w.create(TkcText,774,195, 'text'=>'238', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '237'
- $floorItems2['237'] = i
- w.create(TkcText,763,148.5, 'text'=>'237', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324,
- 643,324,643,291,641,291,641,205,696,205,
- 696,291,694,291,694,314,715,314,715,291,
- 715,205,755,205,755,190,724,190,724,187,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '246'
- $floorItems2['246'] = i
- w.create(TkcText,600,264, 'text'=>'246', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '247'
- $floorItems2['247'] = i
- w.create(TkcText,668.5,296.5, 'text'=>'247', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246,
- 397,246,397,255,476,255,476,250,482,250,559,250,
- 559,274,482,274,482,278,396,278,396,274,232,274,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '202'
- $floorItems2['202'] = i
- w.create(TkcText,285.5,260, 'text'=>'202', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196,
- 306,196,306,180,175,180,175,169,156,169,
- 156,196,176,196,176,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '206'
- $floorItems2['206'] = i
- w.create(TkcText,143,267, 'text'=>'206', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '212'
- $floorItems2['212'] = i
- w.create(TkcText,28.5,307.5, 'text'=>'212', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '245'
- $floorItems2['245'] = i
- w.create(TkcText,521.5,300.5, 'text'=>'245', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '244'
- $floorItems2['244'] = i
- w.create(TkcText,579.5,357.5, 'text'=>'244', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '243'
- $floorItems2['243'] = i
- w.create(TkcText,622,357.5, 'text'=>'243', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '242'
- $floorItems2['242'] = i
- w.create(TkcText,666.5,340.5, 'text'=>'242', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = 'Barbecue Deck'
- $floorItems2['Barbecue Deck'] = i
- w.create(TkcText,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '240'
- $floorItems2['240'] = i
- w.create(TkcText,736,288, 'text'=>'240', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '241'
- $floorItems2['241'] = i
- w.create(TkcText,722,340.5, 'text'=>'241', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '239'
- $floorItems2['239'] = i
- w.create(TkcText,736,233.5, 'text'=>'239', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '248'
- $floorItems2['248'] = i
- w.create(TkcText,669,241.5, 'text'=>'248', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '236'
- $floorItems2['236'] = i
- w.create(TkcText,700,160, 'text'=>'236', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '235'
- $floorItems2['235'] = i
- w.create(TkcText,651.5,160, 'text'=>'235', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,626,143,633,143,633,135,572,135,
- 572,143,579,143,579,185,626,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '234'
- $floorItems2['234'] = i
- w.create(TkcText,606,160, 'text'=>'234', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,135,571,135,571,145,578,145,
- 578,185,527,185,527,131,557,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '233'
- $floorItems2['233'] = i
- w.create(TkcText,552.5,158, 'text'=>'233', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '230'
- $floorItems2['230'] = i
- w.create(TkcText,516.5,227, 'text'=>'230', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '232'
- $floorItems2['232'] = i
- w.create(TkcText,500.5,158, 'text'=>'232', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '229'
- $floorItems2['229'] = i
- w.create(TkcText,485.5,195, 'text'=>'229', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '227'
- $floorItems2['227'] = i
- w.create(TkcText,436.5,185.5, 'text'=>'227', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '228'
- $floorItems2['228'] = i
- w.create(TkcText,436.5,231, 'text'=>'228', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '226'
- $floorItems2['226'] = i
- w.create(TkcText,392,217.5, 'text'=>'226', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '225'
- $floorItems2['225'] = i
- w.create(TkcText,356.5,150, 'text'=>'225', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '224'
- $floorItems2['224'] = i
- w.create(TkcText,270,223.5, 'text'=>'224', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '223'
- $floorItems2['223'] = i
- w.create(TkcText,292,157, 'text'=>'223', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '222'
- $floorItems2['222'] = i
- w.create(TkcText,244.5,157, 'text'=>'222', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '221'
- $floorItems2['221'] = i
- w.create(TkcText,198,157, 'text'=>'221', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '204'
- $floorItems2['204'] = i
- w.create(TkcText,324,301.5, 'text'=>'204', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '205'
- $floorItems2['205'] = i
- w.create(TkcText,265.5,307, 'text'=>'205', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '207'
- $floorItems2['207'] = i
- w.create(TkcText,234,362.5, 'text'=>'207', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '208'
- $floorItems2['208'] = i
- w.create(TkcText,187,362.5, 'text'=>'208', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '209'
- $floorItems2['209'] = i
- w.create(TkcText,138.5,362.5, 'text'=>'209', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '217'
- $floorItems2['217'] = i
- w.create(TkcText,71,192, 'text'=>'217', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '217A'
- $floorItems2['217A'] = i
- w.create(TkcText,93,179.5, 'text'=>'217A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '216'
- $floorItems2['216'] = i
- w.create(TkcText,71,145.5, 'text'=>'216', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '215'
- $floorItems2['215'] = i
- w.create(TkcText,28.5,157, 'text'=>'215', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '214'
- $floorItems2['214'] = i
- w.create(TkcText,28.5,203.5, 'text'=>'214', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '213'
- $floorItems2['213'] = i
- w.create(TkcText,28.5,252, 'text'=>'213', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '210'
- $floorItems2['210'] = i
- w.create(TkcText,90.5,362.5, 'text'=>'210', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '211'
- $floorItems2['211'] = i
- w.create(TkcText,33,364.5, 'text'=>'211', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '203'
- $floorItems2['203'] = i
- w.create(TkcText,367.5,292.5, 'text'=>'203', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198,
- 154,198,154,192,109,192,109,169,99,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '220'
- $floorItems2['220'] = i
- w.create(TkcText,132.5,208.5, 'text'=>'220', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = 'Priv Lift2'
- $floorItems2['Priv Lift2'] = i
- w.create(TkcText,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = 'Pub Lift 2'
- $floorItems2['Pub Lift 2'] = i
- w.create(TkcText,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '218'
- $floorItems2['218'] = i
- w.create(TkcText,136,149.5, 'text'=>'218', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '219'
- $floorItems2['219'] = i
- w.create(TkcText,132.5,180, 'text'=>'219', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '201'
- $floorItems2['201'] = i
- w.create(TkcText,358,209, 'text'=>'201', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- w.create(TkcLine,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,634,144,627,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,572,133,572,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,572,144,579,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,129,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,174,197,175,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,175,197,175,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,206,757,221, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,396,188,408,188, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,727,189,725,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,747,167,802,167, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,747,167,747,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,755,189,739,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,769,224,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,802,224,802,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,802,129,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,725,189,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,725,186,690,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,676,133,676,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,627,144,627,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,629,186,593,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,579,144,579,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,559,129,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,725,133,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,484,162,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,559,129,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,526,129,526,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,540,186,581,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,528,186,523,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,511,186,475,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,496,190,496,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,496,205,496,202, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,475,205,527,205, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,205,539,205, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,205,558,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,249,475,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,662,206,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,695,206,675,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,695,278,642,278, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,642,291,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,695,291,695,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,716,208,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,206,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,221,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,793,224,802,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,262,716,262, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,716,220,716,264, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,716,315,716,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,315,703,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,325,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,367,644,367, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,689,367,689,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,647,315,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,659,315,691,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,600,325,600,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,627,325,644,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,644,391,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,615,325,575,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,644,391,558,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,563,325,558,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,391,558,314, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,327,508,327, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,275,484,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,302,558,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,508,327,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,484,311,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,484,275,484,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,475,208,408,208, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,408,206,408,210, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,408,222,408,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,408,227,398,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,227,398,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,408,188,408,194, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,383,188,376,188, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,188,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,162,484,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,475,162,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,254,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,484,280,395,280, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,395,311,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,307,197,293,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,278,197,233,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,233,197,233,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,307,179,284,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,233,249,278,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,269,179,269,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,220,179,220,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,155,191,110,191, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,90,190,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,98,169,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,133,52,165, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,214,52,177, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,226,52,262, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,274,52,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,234,275,234,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,226,339,258,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,211,387,211,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,214,339,177,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,258,387,60,387, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,3,133,3,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,165,339,129,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,117,339,80,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,68,339,59,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,0,339,46,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,0,339,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,60,387,60,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,258,329,258,387, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,350,329,258,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,395,311,350,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,129,315,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,176,133,315,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,176,129,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,3,133,96,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,66,387,66,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,115,387,115,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,163,387,163,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,234,275,276,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,288,275,309,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,298,275,298,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,341,283,350,283, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,321,275,341,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,375,275,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,307,250,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,376,245,376,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,245,340,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,293,250,307,250, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,271,179,238,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,226,179,195,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,176,129,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,182,179,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,174,169,176,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,162,169,90,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,96,169,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,175,227,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,90,190,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,179,3,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,228,3,228, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,276,3,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,110,191,110,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,155,189,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,350,283,350,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor2','wall'])
-end
-
-# floor2_fg3 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the third
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor2_fg3(w,color)
- i = TkcPolygon.new(w,89,228,89,180,70,180,70,228,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '316'
- $floorItems2['316'] = i
- w.create(TkcText,79.5,204, 'text'=>'316', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '309'
- $floorItems2['309'] = i
- w.create(TkcText,138.5,345.5, 'text'=>'309', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '308'
- $floorItems2['308'] = i
- w.create(TkcText,187.5,345.5, 'text'=>'308', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '307'
- $floorItems2['307'] = i
- w.create(TkcText,234,345.5, 'text'=>'307', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '305'
- $floorItems2['305'] = i
- w.create(TkcText,270.5,301.5, 'text'=>'305', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '324B'
- $floorItems2['324B'] = i
- w.create(TkcText,247.5,211, 'text'=>'324B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '324A'
- $floorItems2['324A'] = i
- w.create(TkcText,247.5,240.5, 'text'=>'324A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '320'
- $floorItems2['320'] = i
- w.create(TkcText,200,157, 'text'=>'320', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '310'
- $floorItems2['310'] = i
- w.create(TkcText,90.5,345.5, 'text'=>'310', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '312'
- $floorItems2['312'] = i
- w.create(TkcText,45.5,299, 'text'=>'312', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '313'
- $floorItems2['313'] = i
- w.create(TkcText,45.5,252, 'text'=>'313', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '314'
- $floorItems2['314'] = i
- w.create(TkcText,40.5,203.5, 'text'=>'314', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '315'
- $floorItems2['315'] = i
- w.create(TkcText,59,157, 'text'=>'315', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '316B'
- $floorItems2['316B'] = i
- w.create(TkcText,95,215, 'text'=>'316B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '316A'
- $floorItems2['316A'] = i
- w.create(TkcText,95,191, 'text'=>'316A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198,
- 174,198,174,226,101,226,101,179,97,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '319'
- $floorItems2['319'] = i
- w.create(TkcText,141.5,209, 'text'=>'319', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '311'
- $floorItems2['311'] = i
- w.create(TkcText,29.5,361, 'text'=>'311', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '318'
- $floorItems2['318'] = i
- w.create(TkcText,132.5,180, 'text'=>'318', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '317'
- $floorItems2['317'] = i
- w.create(TkcText,136,149.5, 'text'=>'317', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '323'
- $floorItems2['323'] = i
- w.create(TkcText,290,207.5, 'text'=>'323', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '325'
- $floorItems2['325'] = i
- w.create(TkcText,290,235.5, 'text'=>'325', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '321'
- $floorItems2['321'] = i
- w.create(TkcText,243.5,157, 'text'=>'321', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '322'
- $floorItems2['322'] = i
- w.create(TkcText,293.5,163.5, 'text'=>'322', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = 'Pub Lift3'
- $floorItems2['Pub Lift3'] = i
- w.create(TkcText,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = 'Priv Lift3'
- $floorItems2['Priv Lift3'] = i
- w.create(TkcText,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '303'
- $floorItems2['303'] = i
- w.create(TkcText,373.5,292.5, 'text'=>'303', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,272,203,272,249,252,249,252,230,
- 244,230,244,221,252,221,252,203,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '324'
- $floorItems2['324'] = i
- w.create(TkcText,262,226, 'text'=>'324', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '304'
- $floorItems2['304'] = i
- w.create(TkcText,324,301.5, 'text'=>'304', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '301'
- $floorItems2['301'] = i
- w.create(TkcText,358,209, 'text'=>'301', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '327'
- $floorItems2['327'] = i
- w.create(TkcText,387,215.5, 'text'=>'327', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '326'
- $floorItems2['326'] = i
- w.create(TkcText,365.5,150, 'text'=>'326', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282,
- 375,274,397,274,397,248,339,248,339,242,308,242,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '302'
- $floorItems2['302'] = i
- w.create(TkcText,319.5,261, 'text'=>'302', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203,
- 272,193,263,180,242,180,175,180,175,169,156,169,
- 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
- 107,248,160,248,160,301,107,301,107,275,70,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '306'
- $floorItems2['306'] = i
- w.create(TkcText,200.5,284.5, 'text'=>'306', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,399,129,399,311, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,258,202,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,350,283,350,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,251,231,243,231, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,243,220,251,220, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,243,250,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,155,197,155,190, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,110,192,110,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,155,192,110,192, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,176,197,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,69,280,69,274, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,276,69,276, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,69,262,69,226, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,228,69,228, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,179,75,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,69,179,69,214, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,220,90,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,204,90,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,203,100,203, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,187,90,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,227,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,100,179,100,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,100,179,87,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,96,179,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,162,169,96,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,173,169,176,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,182,179,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,176,129,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,195,179,226,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,224,133,224,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,264,179,264,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,238,179,264,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,207,273,193, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,235,273,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,224,273,219, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,193,307,193, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,222,307,222, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,384,247,376,247, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,247,340,224, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,376,247,376,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,307,250,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,376,283,366,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,376,283,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,399,275,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,341,275,320,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,341,283,350,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,298,275,298,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,308,275,298,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,243,322,243,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,243,275,284,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,258,322,226,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,212,370,212,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,214,322,177,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,163,370,163,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,165,322,129,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,84,322,117,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,71,322,64,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,115,322,115,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,66,322,66,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,52,322,21,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,331,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,331,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,96,133,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,176,129,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,315,133,176,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,315,129,399,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,399,311,350,311, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,350,329,258,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,258,322,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,60,370,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,60,370,60,391, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,0,391,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,307,250,307,242, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,258,250,243,250, 'fill'=>color, 'tags'=>['floor3','wall'])
-end
-
-# Below is the "main program" that creates the floorplan demonstration.
-
-# toplevel widget
-if defined?($floor2_demo) && $floor2_demo
- $floor2_demo.destroy
- $floor2_demo = nil
-end
-
-# demo toplevel widget
-$floor2_demo = TkToplevel.new {|w|
- title("Floorplan Canvas Demonstration 2")
- iconname("Floorplan2")
- positionWindow(w)
- geometry('+20+20')
- minsize(100,100)
-}
-
-base_frame = TkFrame.new($floor2_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
- 'text'=>"This window contains a canvas widget showing the floorplan of Digital Equipment Corporation's Western Research Laboratory. It has three levels. At any given time one of the levels is active, meaning that you can see its room structure. To activate a level, click the left mouse button anywhere on it. As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the \"Room:\" entry. You can also type a room number in the entry and the room will light up."){
- pack('side'=>'top')
-}
-
-# frame
-$floor2_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $floor2_demo
- $floor2_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'floor2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$floor2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-#
-$floorLabels2 = {}
-$floorItems2 = {}
-
-# canvas
-if $tk_version =~ /^4\.[01]/
- $floor2_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken',
- 'highlightthickness'=>2)
- $floor2_canvas = TkCanvas.new($floor2_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
- 'highlightthickness'=>0) {|c|
- TkScrollbar.new(base_frame, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}){|hs|
- c.xscrollcommand(proc{|first,last| hs.set first,last})
- pack('side'=>'bottom', 'fill'=>'x')
- }
- TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}){|vs|
- c.yscrollcommand(proc{|first,last| vs.set first,last})
- pack('side'=>'right', 'fill'=>'y')
- }
- }
- $floor2_canvas_frame.pack('side'=>'top','fill'=>'both', 'expand'=>'yes')
- $floor2_canvas.pack('expand'=>'yes', 'fill'=>'both')
-
-else
- TkFrame.new(base_frame) {|f|
- pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes')
-
- h = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'horizontal')
- v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical')
-
- TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
- $floor2_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
- 'highlightthickness'=>0) {
- xscrollcommand(proc{|first,last| h.set first,last})
- yscrollcommand(proc{|first,last| v.set first,last})
- pack('expand'=>'yes', 'fill'=>'both')
- }
- grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- }
-
- v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
-
- TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
-
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
-
- v.command(proc{|*args| $floor2_canvas.yview(*args)})
- h.command(proc{|*args| $floor2_canvas.xview(*args)})
- }
-end
-
-
-# Create an entry for displaying and typing in current room.
-
-$currentRoom2 = TkVariable.new
-$floor2_entry = TkEntry.new($floor2_canvas, 'width'=>10, 'relief'=>'sunken',
- 'bd'=>2, 'textvariable'=>$currentRoom2)
-
-# Choose colors, then fill in the floorplan.
-
-$floor2_colors = {}
-if TkWinfo.depth($floor2_canvas) > 1
- $floor2_colors['bg1'] = '#a9c1da'
- $floor2_colors['outline1'] = '#77889a'
- $floor2_colors['bg2'] = '#9ab0c6'
- $floor2_colors['outline2'] = '#687786'
- $floor2_colors['bg3'] = '#8ba0b3'
- $floor2_colors['outline3'] = '#596673'
- $floor2_colors['offices'] = 'Black'
- $floor2_colors['active'] = '#c4d1df'
-else
- $floor2_colors['bg1'] = 'white'
- $floor2_colors['outline1'] = 'black'
- $floor2_colors['bg2'] = 'white'
- $floor2_colors['outline2'] = 'black'
- $floor2_colors['bg3'] = 'white'
- $floor2_colors['outline3'] = 'black'
- $floor2_colors['offices'] = 'Black'
- $floor2_colors['active'] = 'black'
-end
-
-$activeFloor2 = ''
-floorDisplay2 $floor2_canvas,3
-
-# Set up event bindings for canvas:
-
-$floor2_canvas.itembind('floor1', '1', proc{floorDisplay2 $floor2_canvas,1})
-$floor2_canvas.itembind('floor2', '1', proc{floorDisplay2 $floor2_canvas,2})
-$floor2_canvas.itembind('floor3', '1', proc{floorDisplay2 $floor2_canvas,3})
-$floor2_canvas.itembind('room', 'Enter', proc{newRoom2 $floor2_canvas})
-$floor2_canvas.itembind('room', 'Leave', proc{$currentRoom2.value = ''})
-$floor2_canvas.bind('2', proc{|x,y| $floor2_canvas.scan_mark x,y}, '%x %y')
-$floor2_canvas.bind('B2-Motion',
- proc{|x,y| $floor2_canvas.scan_dragto x,y}, '%x %y')
-$floor2_canvas.bind('Destroy', proc{$currentRoom2.unset})
-$currentRoom2.value = ''
-$currentRoom2.trace('w',proc{roomChanged2 $floor2_canvas})
diff --git a/ext/tk/sample/demos-en/form.rb b/ext/tk/sample/demos-en/form.rb
deleted file mode 100644
index b6c6655083..0000000000
--- a/ext/tk/sample/demos-en/form.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# frozen_string_literal: false
-#
-# form widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($form_demo) && $form_demo
- $form_demo.destroy
- $form_demo = nil
-end
-
-# demo toplevel widget
-$form_demo = TkToplevel.new {|w|
- title("Form Demonstration")
- iconname("form")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($form_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "This window contains a simple form where you can type in the various entries and use tabs to move circularly between the entries."
-}
-msg.pack('side'=>'top', 'fill'=>'x')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $form_demo
- $form_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'form'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# entry
-form_data = []
-(1..5).each{|i|
- f = TkFrame.new(base_frame, 'bd'=>2)
- e = TkEntry.new(f, 'relief'=>'sunken', 'width'=>40)
- l = TkLabel.new(f)
- e.pack('side'=>'right')
- l.pack('side'=>'left')
- form_data[i] = {'frame'=>f, 'entry'=>e, 'label'=>l}
-}
-
-#
-form_data[1]['label'].text('Name:')
-form_data[2]['label'].text('Address:')
-form_data[5]['label'].text('Phone:')
-
-# pack
-(1..5).each{|i| form_data[i]['frame'].pack('side'=>'top', 'fill'=>'x')}
-
diff --git a/ext/tk/sample/demos-en/goldberg.rb b/ext/tk/sample/demos-en/goldberg.rb
deleted file mode 100644
index 729cdf0e94..0000000000
--- a/ext/tk/sample/demos-en/goldberg.rb
+++ /dev/null
@@ -1,2007 +0,0 @@
-# frozen_string_literal: false
-#
-# Ruby/Tk Goldverg demo (called by 'widget')
-#
-# Based on Tcl/Tk8.5a2 widget demos.
-# The following is the original comment of TkGoldberg.tcl.
-#
-#>>##+#################################################################
-#>>#
-#>># TkGoldberg.tcl
-#>># by Keith Vetter, March 13, 2003
-#>>#
-#>># "Man will always find a difficult means to perform a simple task"
-#>># Rube Goldberg
-#>>#
-#>># Reproduced here with permission.
-#>>#
-#>>##+#################################################################
-#>>#
-#>># Keith Vetter 2003-03-21: this started out as a simple little program
-#>># but was so much fun that it grew and grew. So I apologize about the
-#>># size but I just couldn't resist sharing it.
-#>>#
-#>># This is a whizzlet that does a Rube Goldberg type animation, the
-#>># design of which comes from an New Years e-card from IncrediMail.
-#>># That version had nice sound effects which I eschewed. On the other
-#>># hand, that version was in black and white (actually dark blue and
-#>># light blue) and this one is fully colorized.
-#>>#
-#>># One thing I learned from this project is that drawing filled complex
-#>># objects on a canvas is really hard. More often than not I had to
-#>># draw each item twice--once with the desired fill color but no
-#>># outline, and once with no fill but with the outline. Another trick
-#>># is erasing by drawing with the background color. Having a flood fill
-#>># command would have been extremely helpful.
-#>>#
-#>># Two wiki pages were extremely helpful: Drawing rounded rectangles
-#>># which I generalized into Drawing rounded polygons, and regular
-#>># polygons which allowed me to convert ovals and arcs into polygons
-#>># which could then be rotated (see Canvas Rotation). I also wrote
-#>># Named Colors to aid in the color selection.
-#>>#
-#>># I could comment on the code, but it's just 26 state machines with
-#>># lots of canvas create and move calls.
-
-if defined?($goldberg_demo) && $goldberg_demo
- $goldberg_demo.destroy
- $goldberg_demo = nil
-end
-
-# demo toplevel widget
-$goldberg_demo = TkToplevel.new {|w|
- title("Tk Goldberg (demonstration)")
- iconname("goldberg")
-# positionWindow(w)
-}
-
-base_frame = TkFrame.new($goldberg_demo).pack(:fill=>:both, :expand=>true)
-
-=begin
-# label
-msg = TkLabel.new($goldberg_demo) {
- font 'Arial 10'
- wraplength '4i'
- justify 'left'
- text "This is a demonstration of just how complex you can make your animations become. Click the ball to start things moving!\n\n\"Man will always find a difficult means to perform a simple task\"\n - Rube Goldberg"
-}
-msg.pack('side'=>'top')
-=end
-
-=begin
-# frame
-TkFrame.new($goldberg_demo) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $goldberg_demo
- $goldberg_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'See Code'
- command proc{showCode 'goldberg'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-=end
-
-#########################################
-
-class TkGoldberg_Demo
- def initialize(parent)
- @parent = parent
-
- @S = {}
- @S['title'] = 'Tk Goldberg'
- @S['speed'] = TkVariable.new(5)
- @S['cnt'] = TkVariable.new(0)
- @S['message'] = TkVariable.new("\\nWelcome\\nto\\nRuby/Tk")
- @S['pause'] = TkVariable.new
- @S['details'] = TkVariable.new(true)
-
- @S['mode'] = TkVariable.new(:MSTART, :symbol)
- # :MSTART, :MGO, :MPAUSE, :MSSTEP, :MBSTEP, :MDONE, :MDEBUG
-
- # 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- @speed = [1, 10, 20, 50, 80, 100, 150, 200, 300, 400, 500]
-
- # colors
- @C = {}
- @C['fg'] = 'black'
- # @C['bg'] = 'gray75'
- @C['bg'] = 'cornflowerblue'
-
- @C['0'] = 'white'; @C['1a'] = 'darkgreen'; @C['1b'] = 'yellow'
- @C['2'] = 'red'; @C['3a'] = 'green'; @C['3b'] = 'darkblue'
- @C['4'] = @C['fg']; @C['5a'] = 'brown'; @C['5b'] = 'white'
- @C['6'] = 'magenta'; @C['7'] = 'green'; @C['8'] = @C['fg']
- @C['9'] = 'blue4'; @C['10a'] = 'white'; @C['10b'] = 'cyan'
- @C['11a'] = 'yellow'; @C['11b'] = 'mediumblue'; @C['12'] = 'tan2'
- @C['13a'] = 'yellow'; @C['13b'] = 'red'; @C['14'] = 'white'
- @C['15a'] = 'green'; @C['15b'] = 'yellow'; @C['16'] = 'gray65'
- @C['17'] = '#A65353'; @C['18'] = @C['fg']; @C['19'] = 'gray50'
- @C['20'] = 'cyan'; @C['21'] = 'gray65'; @C['22'] = @C['20']
- @C['23a'] = 'blue'; @C['23b'] = 'red'; @C['23c'] = 'yellow'
- @C['24a'] = 'red'; @C['24b'] = 'white';
-
- @STEP = TkVariable.new_hash
- @STEP.default_value_type = :numeric
-
- @XY = {}
-
- @XY6 = {
- '-1'=>[366, 207], '-2'=>[349, 204], '-3'=>[359, 193], '-4'=>[375, 192],
- '-5'=>[340, 190], '-6'=>[349, 177], '-7'=>[366, 177], '-8'=>[380, 176],
- '-9'=>[332, 172], '-10'=>[342, 161], '-11'=>[357, 164],
- '-12'=>[372, 163], '-13'=>[381, 149], '-14'=>[364, 151],
- '-15'=>[349, 146], '-16'=>[333, 148], '0'=>[357, 219],
- '1'=>[359, 261], '2'=>[359, 291], '3'=>[359, 318], '4'=>[361, 324],
- '5'=>[365, 329], '6'=>[367, 334], '7'=>[367, 340], '8'=>[366, 346],
- '9'=>[364, 350], '10'=>[361, 355], '11'=>[359, 370], '12'=>[359, 391],
- '13,0'=>[360, 456], '13,1'=>[376, 456], '13,2'=>[346, 456],
- '13,3'=>[330, 456], '13,4'=>[353, 444], '13,5'=>[368, 443],
- '13,6'=>[339, 442], '13,7'=>[359, 431], '13,8'=>[380, 437],
- '13,9'=>[345, 428], '13,10'=>[328, 434], '13,11'=>[373, 424],
- '13,12'=>[331, 420], '13,13'=>[360, 417], '13,14'=>[345, 412],
- '13,15'=>[376, 410], '13,16'=>[360, 403]
- }
-
- @timer = TkTimer.new(@speed[@S['speed'].numeric]){|timer|
- timer.set_interval(go)
- }
-
- do_display
- reset
-
- # Start everything going
- @timer.start
- end
-
- def do_display()
- @ctrl = TkFrame.new(@parent, :relief=>:ridge, :bd=>2, :padx=>5, :pady=>5)
- @screen = TkFrame.new(@parent, :bd=>2,
- :relief=>:raised).pack(:side=>:left, :fill=>:both,
- :expand=>true)
-
- @canvas = TkCanvas.new(@parent, :width=>850, :height=>700,
- :bg=>@C['bg'], :highlightthickness=>0){
- scrollregion([0, 0, 1000, 1000]) # Kludge to move everything up
- yview_moveto(0.05)
- }.pack(:in=>@screen, :side=>:top, :fill=>:both, :expand=>true)
-
- @canvas.bind('3'){ @pause.invoke }
- @canvas.bind('Destroy'){ @timer.stop }
-
- do_ctrl_frame
- do_detail_frame
-
- # msg = TkLabel.new(@parent, :bg=>@C['bg'], :fg=>'white') {
- msg = Tk::Label.new(@parent, :bg=>@C['bg'], :fg=>'white') {
- font 'Arial 10'
- wraplength 600
- justify 'left'
- text "This is a demonstration of just how complex you can make your animations become. Click the ball to start things moving!\n\"Man will always find a difficult means to perform a simple task\" - Rube Goldberg"
- }
- msg.place(:in=>@canvas, :relx=>0, :rely=>0, :anchor=>:nw)
-
- frame = TkFrame.new(@parent, :bg=>@C['bg'])
-
- # TkButton.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) {
- Tk::Button.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) {
- text 'Dismiss'
- command proc{
- tmppath = $goldberg_demo
- $goldberg_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left')
-
- # TkButton.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) {
- Tk::Button.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) {
- text 'See Code'
- command proc{showCode 'goldberg'}
- }.pack('side'=>'left', 'padx'=>5)
-
- # @show = TkButton.new(frame, :text=>'>>', :command=>proc{show_ctrl},
- @show = Tk::Button.new(frame, :text=>'>>', :command=>proc{show_ctrl},
- :bg=>@C['bg'], :activebackground=>@C['bg'])
- @show.pack('side'=>'left')
- frame.place(:in=>@canvas, :relx=>1, :rely=>0, :anchor=>:ne)
-
- Tk.update
- end
-
- def do_ctrl_frame
- @start = Tk::Button.new(@parent, :text=>'Start', :bd=>6,
- :command=>proc{do_button(0)})
- if font = @start['font']
- @start.font(font.weight('bold'))
- end
-
- @pause = TkCheckbutton.new(@parent, :text=>'Pause', :font=>font,
- :command=>proc{do_button(1)}, :relief=>:raised,
- :variable=>@S['pause'])
-
- @step = TkButton.new(@parent, :text=>'Single Step', :font=>font,
- :command=>proc{do_button(2)})
- @bstep = TkButton.new(@parent, :text=>'Big Step', :font=>font,
- :command=>proc{do_button(4)})
- @reset = TkButton.new(@parent, :text=>'Reset', :font=>font,
- :command=>proc{do_button(3)})
-
- @details = TkFrame.new(@parent, :bd=>2, :relief=>:ridge)
- @detail = TkCheckbutton.new(@parent, :text=>'Details', :font=>font,
- :relief=>:raised, :variable=>@S['details'])
-
- @msg_entry = TkEntry.new(@parent, :textvariable=>@S['message'],
- :justify=>:center)
- @speed_scale = TkScale.new(@parent, :orient=>:horizontal,
- :from=>1, :to=>10, :font=>font,
- :variable=>@S['speed'], :bd=>2,
- :relief=>:ridge, :showvalue=>false)
- @about = TkButton.new(@parent, :text=>'About',
- :command=>proc{about}, :font=>font)
-
- Tk.grid(@start, :in=>@ctrl, :row=>0, :sticky=>:ew)
- @ctrl.grid_rowconfigure(1, :minsize=>10)
- Tk.grid(@pause, :in=>@ctrl, :row=>2, :sticky=>:ew)
- Tk.grid(@step, :in=>@ctrl, :sticky=>:ew)
- Tk.grid(@bstep, :in=>@ctrl, :sticky=>:ew)
- Tk.grid(@reset, :in=>@ctrl, :sticky=>:ew)
- @ctrl.grid_rowconfigure(10, :minsize=>20)
- Tk.grid(@details, :in=>@ctrl, :row=>11, :sticky=>:ew)
- Tk.grid(@detail, :in=>@details, :row=>0, :sticky=>:ew)
- @ctrl.grid_rowconfigure(50, :weight=>1)
-
- @S['mode'].trace('w', proc{|*args| active_GUI(*args)})
- @S['details'].trace('w', proc{|*args| active_GUI(*args)})
- @S['speed'].trace('w', proc{|*args| active_GUI(*args)})
-
- Tk.grid(@msg_entry, :in=>@ctrl, :row=>98, :sticky=>:ew, :pady=>5)
- Tk.grid(@speed_scale, :in=>@ctrl, :row=>99, :sticky=>:ew)
- Tk.grid(@about, :in=>@ctrl, :row=>100, :sticky=>:ew)
-
- @reset.bind('3'){@S['mode'].value = -1} # Debugging
- end
-
- def do_detail_frame
- @f_details = TkFrame.new(@details)
-
- @label = TkLabel.new(@f_details, :textvariable=>@S['cnt'],
- :bd=>1, :relief=>:solid, :bg=>'white')
- Tk.grid(@label, '-', '-', '-', :sticky=>:ew, :row=>0)
-
- idx = 1
- loop {
- break unless respond_to?("move#{idx}")
- l = TkLabel.new(@f_details, :text=>idx, :anchor=>:e,
- :width=>2, :bd=>1, :relief=>:solid, :bg=>'white')
- @STEP[idx] = 0
- ll = TkLabel.new(@f_details, :textvariable=>@STEP.ref(idx),
- :width=>5, :bd=>1, :relief=>:solid, :bg=>'white')
- row = (idx + 1)/2
- col = ((idx + 1) & 1) * 2
- Tk.grid(l, :sticky=>:ew, :row=>row, :column=>col)
- Tk.grid(ll, :sticky=>:ew, :row=>row, :column=>(col + 1))
- idx += 1
- }
- @f_details.grid_columnconfigure(1, :weight=>1)
- end
-
- def show_ctrl
- if @ctrl.winfo_mapped?
- @ctrl.pack_forget
- @show.text('>>')
- else
- @ctrl.pack(:side=>:right, :fill=>:both, :ipady=>5)
- @show.text('<<')
- end
- end
-
- def draw_all
- reset_step
- @canvas.delete(:all)
- idx = 0
- loop{
- m = "draw#{idx}"
- break unless respond_to?(m)
- send(m)
- idx += 1
- }
- end
-
- def active_GUI(var1, var2, op)
- st = {false=>:disabled, true=>:normal}
-
- m = @S['mode'].to_sym
- @S['pause'].value = (m == :MPAUSE)
- @start.state(st[m != :MGO])
- @pause.state(st[m != :MSTART && m != :MDONE])
- @step.state(st[m != :MGO && m != :MDONE])
- @bstep.state(st[m != :MGO && m != :MDONE])
- @reset.state(st[m != :MSTART])
-
- if @S['details'].bool
- Tk.grid(@f_details, :in=>@details, :row=>2, :sticky=>:ew)
- else
- Tk.grid_forget(@f_details)
- end
- @speed_scale.label("Speed: #{@S['speed'].value}")
- end
-
- def start
- @S['mode'].value = :MGO
- end
-
- def do_button(what)
- case what
- when 0 # Start
- reset if @S['mode'].to_sym == :MDONE
- @S['mode'].value = :MGO
-
- when 1 # Pause
- @S['mode'].value = ((@S['pause'].bool)? :MPAUSE: :MGO)
-
- when 2 # Step
- @S['mode'].value = :MSSTEP
-
- when 3 # Reset
- reset
-
- when 4 # Big step
- @S['mode'].value = :MBSTEP
- end
- end
-
- def go(who = nil)
- now = Tk::Clock.clicks(:milliseconds)
- if who # Start here for debugging
- @S['active'] = [who]
- @S['mode'].value = :MGO
- end
- return if @S['mode'].to_sym == :MDEBUG # Debugging
- # If not paused, do the next move
- n = next_step if @S['mode'].to_sym != :MPAUSE
- @S['mode'].value = :MPAUSE if @S['mode'].to_sym == :MSSTEP # Single step
- @S['mode'].value = :MSSTEP if @S['mode'].to_sym == :MBSTEP && n # big step
- elapsed = Tk::Clock.clicks(:milliseconds) - now
- delay = @speed[@S['speed'].to_i] - elapsed
- delay = 1 if delay <= 0
- return delay
- end
-
- def next_step
- retval = false # Return value
-
- if @S['mode'].to_sym != :MSTART && @S['mode'].to_sym != :MDONE
- @S['cnt'].numeric += 1
- end
- alive = []
- @S['active'].each{|who|
- who = who.to_i
- n = send("move#{who}")
- if (n & 1).nonzero? # This guy still alive
- alive << who
- end
- if (n & 2).nonzero? # Next guy is active
- alive << (who + 1)
- retval = true
- end
- if (n & 4).nonzero? # End of puzzle flag
- @S['mode'].value = :MDONE # Done mode
- @S['active'] = [] # No more animation
- return true
- end
- }
- @S['active'] = alive
- return retval
- end
-
- def about
- msg = "Ruby/Tk Version ::\nby Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)\n\n"
- msg += "Original Version ::\n"
- msg += "#{@S['title']}\nby Keith Vetter, March 2003\n(Reproduced by kind permission of the author)\n\n"
- msg += "Man will always find a difficult means to perform a simple task"
- msg += "\nRube Goldberg"
- Tk.messageBox(:message=>msg, :title=>'About')
- end
-
- ################################################################
- #
- # All the drawing and moving routines
- #
-
- # START HERE! banner
- def draw0
- color = @C['0']
- TkcText.new(@canvas, [579, 119], :text=>'START HERE!',
- :fill=>color, :anchor=>:w,
- :tag=>'I0', :font=>['Times Roman', 12, :italic, :bold])
- TkcLine.new(@canvas, [719, 119, 763, 119], :tag=>'I0', :fill=>color,
- :width=>5, :arrow=>:last, :arrowshape=>[18, 18, 5])
- @canvas.itembind('I0', '1'){ start }
- end
-
- def move0(step = nil)
- step = get_step(0, step)
-
- if @S['mode'].to_sym != :MSTART # Start the ball rolling
- move_abs('I0', [-100, -100]) # Hide the banner
- return 2
- end
-
- pos = [
- [673, 119], [678, 119], [683, 119], [688, 119],
- [693, 119], [688, 119], [683, 119], [678, 119]
- ]
- step = step % pos.length
- move_abs('I0', pos[step])
- return 1
- end
-
- # Dropping ball
- def draw1
- color = @C['1a']
- color2 = @C['1b']
- TkcPolygon.new(@canvas,
- [ 844, 133, 800, 133, 800, 346, 820, 346,
- 820, 168, 844, 168, 844, 133 ],
- :width=>3, :fill=>color, :outline=>'')
- TkcPolygon.new(@canvas,
- [ 771, 133, 685, 133, 685, 168, 751, 168,
- 751, 346, 771, 346, 771, 133 ],
- :width=>3, :fill=>color, :outline=>'')
- TkcOval.new(@canvas, box(812, 122, 9),
- :tag=>'I1', :fill=>color2, :outline=>'')
-
- @canvas.itembind('I1', '1'){ start }
- end
-
- def move1(step = nil)
- step = get_step(1, step)
- pos = [
- [807, 122], [802, 122], [797, 123], [793, 124], [789, 129], [785, 153],
- [785, 203], [785, 278, :x], [785, 367], [810, 392], [816, 438],
- [821, 503], [824, 585, :y], [838, 587], [848, 593], [857, 601],
- [-100, -100]
- ]
- return 0 if step >= pos.length
- where = pos[step]
- move_abs('I1', where)
- move15a if where[2] == :y
- return 3 if where[2] == :x
- return 1
- end
-
- # Lighting the match
- def draw2
- color = @C['2']
-
- # Fulcrum
- TkcPolygon.new(@canvas, [750, 369, 740, 392, 760, 392],
- :fill=>@C['fg'], :outline=>@C['fg'])
-
- # Strike box
- TkcRectangle.new(@canvas, [628, 335, 660, 383],
- :fill=>'', :outline=>@C['fg'])
- (0..2).each{|y|
- yy = 335 + y*16
- TkcBitmap.new(@canvas, [628, yy], :bitmap=>'gray25',
- :anchor=>:nw, :foreground=>@C['fg'])
- TkcBitmap.new(@canvas, [644, yy], :bitmap=>'gray25',
- :anchor=>:nw, :foreground=>@C['fg'])
- }
-
- # Lever
- TkcLine.new(@canvas, [702, 366, 798, 366],
- :fill=>@C['fg'], :width=>6, :tag=>'I2_0')
-
- # R strap
- TkcLine.new(@canvas, [712, 363, 712, 355],
- :fill=>@C['fg'], :width=>3, :tag=>'I2_1')
-
- # L strap
- TkcLine.new(@canvas, [705, 363, 705, 355],
- :fill=>@C['fg'], :width=>3, :tag=>'I2_2')
-
- # Match stick
- TkcLine.new(@canvas, [679, 356, 679, 360, 717, 360, 717, 356, 679, 356],
- :fill=>@C['fg'], :width=>3, :tag=>'I2_3')
-
- # Match head
- TkcPolygon.new(@canvas,
- [ 671, 352, 677.4, 353.9, 680, 358.5, 677.4, 363.1,
- 671, 365, 664.6, 363.1, 662, 358.5, 664.6, 353.9 ],
- :fill=>color, :outline=>color, :tag=>'I2_4')
- end
-
- def move2(step = nil)
- step = get_step(2, step)
-
- stages = [0, 0, 1, 2, 0, 2, 1, 0, 1, 2, 0, 2, 1]
- xy = []
- xy[0] = [
- 686, 333, 692, 323, 682, 316, 674, 309, 671, 295, 668, 307,
- 662, 318, 662, 328, 671, 336
- ]
- xy[1] = [
- 687, 331, 698, 322, 703, 295, 680, 320, 668, 297, 663, 311,
- 661, 327, 671, 335
- ]
- xy[2] = [
- 686, 331, 704, 322, 688, 300, 678, 283, 678, 283, 674, 298,
- 666, 309, 660, 324, 672, 336
- ]
-
- if step >= stages.length
- @canvas.delete('I2')
- return 0
- end
-
- if step == 0 # Rotate the match
- beta = 20
-
- ox, oy = anchor('I2_0', :s) # Where to pivot
-
- i = 0
- until @canvas.find_withtag("I2_#{i}").empty?
- rotate_item("I2_#{i}", ox, oy, beta)
- i += 1
- end
-
- # For the flame
- TkcPolygon.new(@canvas, [], :tag=>'I2', :smooth=>true, :fill=>@C['2'])
-
- return 1
- end
- @canvas.coords('I2', xy[stages[step]])
- return ((step == 7)? 3: 1)
- end
-
- # Weight and pulleys
- def draw3
- color = @C['3a']
- color2 = @C['3b']
-
- xy = [ [602, 296], [577, 174], [518, 174] ]
- xy.each{|x, y| # 3 Pulleys
- TkcOval.new(@canvas, box(x, y, 13),
- :fill=>color, :outline=>@C['fg'], :width=>3)
- TkcOval.new(@canvas, box(x, y, 2), :fill=>@C['fg'], :outline=>@C['fg'])
- }
-
- # Wall to flame
- TkcLine.new(@canvas, [750, 309, 670, 309], :tag=>'I3_s',
- :width=>3, :fill=>@C['fg'], :smooth=>true)
-
- # Flame to pulley 1
- TkcLine.new(@canvas, [670, 309, 650, 309], :tag=>'I3_0',
- :width=>3, :fill=>@C['fg'], :smooth=>true)
- TkcLine.new(@canvas, [650, 309, 600, 309], :tag=>'I3_1',
- :width=>3, :fill=>@C['fg'], :smooth=>true)
-
- # Pulley 1 half way to 2
- TkcLine.new(@canvas, [589, 296, 589, 235], :tag=>'I3_2',
- :width=>3, :fill=>@C['fg'])
-
- # Pulley 1 other half to 2
- TkcLine.new(@canvas, [589, 235, 589, 174], :width=>3, :fill=>@C['fg'])
-
- # Across the top
- TkcLine.new(@canvas, [577, 161, 518, 161], :width=>3, :fill=>@C['fg'])
-
- # Down to weight
- TkcLine.new(@canvas, [505, 174, 505, 205], :tag=>'I3_w',
- :width=>3, :fill=>@C['fg'])
-
- # Draw the weight as 2 circles, two rectangles and 1 rounded rectangle
- x1, y1, x2, y2 = [515, 207, 495, 207]
- TkcOval.new(@canvas, box(x1, y1, 6),
- :tag=>'I3_', :fill=>color2, :outline=>color2)
- TkcOval.new(@canvas, box(x2, y2, 6),
- :tag=>'I3_', :fill=>color2, :outline=>color2)
- TkcRectangle.new(@canvas, x1, y1 - 6, x2, y2 + 6,
- :tag=>'I3_', :fill=>color2, :outline=>color2)
-
- TkcPolygon.new(@canvas, round_rect([492, 220, 518, 263], 15),
- :smooth=>true, :tag=>'I3_', :fill=>color2, :outline=>color2)
-
- TkcLine.new(@canvas, [500, 217, 511, 217],
- :tag=>'I3_', :fill=>color2, :width=>10)
-
- # Bottom weight target
- TkcLine.new(@canvas, [502, 393, 522, 393, 522, 465],
- :tag=>'I3__', :fill=>@C['fg'], :joinstyle=>:miter, :width=>10)
- end
-
- def move3(step = nil)
- step = get_step(3, step)
-
- pos = [ [505, 247], [505, 297], [505, 386.5], [505, 386.5] ]
- rope = []
- rope[0] = [750, 309, 729, 301, 711, 324, 690, 300]
- rope[1] = [750, 309, 737, 292, 736, 335, 717, 315, 712, 320]
- rope[2] = [750, 309, 737, 309, 740, 343, 736, 351, 725, 340]
- rope[3] = [750, 309, 738, 321, 746, 345, 742, 356]
-
- return 0 if step >= pos.length
-
- @canvas.delete("I3_#{step}") # Delete part of the rope
- move_abs('I3_', pos[step]) # Move weight down
- @canvas.coords('I3_s', rope[step]) # Flapping rope end
- @canvas.coords('I3_w', [505, 174].concat(pos[step]))
- if step == 2
- @canvas.move('I3__', 0, 30)
- return 2
- end
- return 1
- end
-
- # Cage and door
- def draw4
- color = @C['4']
- x0, y0, x1, y1 = [527, 356, 611, 464]
-
- # Horizontal bars
- y0.step(y1, 12){|y|
- TkcLine.new(@canvas, [x0, y, x1, y], :fill=>color, :width=>1)
- }
-
- # Vertical bars
- x0.step(x1, 12){|x|
- TkcLine.new(@canvas, [x, y0, x, y1], :fill=>color, :width=>1)
- }
-
- # Swing gate
- TkcLine.new(@canvas, [518, 464, 518, 428],
- :tag=>'I4', :fill=>color, :width=>1)
- end
-
- def move4(step = nil)
- step = get_step(4, step)
-
- angles = [-10, -20, -30, -30]
- return 0 if step >= angles.length
-
- rotate_item('I4', 518, 464, angles[step])
- @canvas.raise('I4')
-
- return((step == 3)? 3: 1)
- end
-
- # Mouse
- def draw5
- color = @C['5a']
- color2 = @C['5b']
-
- xy = [377, 248, 410, 248, 410, 465, 518, 465] # Mouse course
- xy.concat [518, 428, 451, 428, 451, 212, 377, 212]
-
- TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'], :width=>3)
-
- xy = [
- 534.5, 445.5, 541, 440, 552, 436, 560, 436, 569, 440, 574, 446,
- 575, 452, 574, 454, 566, 456, 554, 456, 545, 456, 537, 454, 530, 452
- ]
- TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_0'], :fill=>color)
-
- TkcLine.new(@canvas, [573, 452, 592, 458, 601, 460, 613, 456], # Tail
- :tag=>['I5', 'I5_1'], :fill=>color, :smooth=>true, :width=>3)
-
- xy = box(540, 446, 2) # Eye
- xy = [540, 444, 541, 445, 541, 447, 540, 448, 538, 447, 538, 445]
- TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_2'], :fill=>@C['bg'],
- :outline=>'', :smooth=>true)
-
- xy = [538, 454, 535, 461] # Front leg
- TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_3'], :fill=>color, :width=>2)
-
- xy = [566, 455, 569, 462] # Back leg
- TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_4'], :fill=>color, :width=>2)
-
- xy = [544, 455, 545, 460] # 2nd front leg
- TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_5'], :fill=>color, :width=>2)
-
- xy = [560, 455, 558, 460] # 2nd back leg
- TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_6'], :fill=>color, :width=>2)
- end
-
- def move5(step = nil)
- step = get_step(5, step)
-
- pos = [
- [553, 452], [533, 452], [513, 452], [493, 452], [473, 452],
- [463, 442, 30], [445.5, 441.5, 30], [425.5, 434.5, 30], [422, 414],
- [422, 394], [422, 374], [422, 354], [422, 334], [422, 314], [422, 294],
- [422, 274, -30], [422, 260.5, -30, :x], [422.5, 248.5, -28], [425, 237]
- ]
-
- return 0 if step >= pos.length
-
- x, y, beta, nxt = pos[step]
- move_abs('I5', [x, y])
- if beta
- ox, oy = centroid('I5_0')
- (0..6).each{|id| rotate_item("I5_#{id}", ox, oy, beta) }
- end
- return 3 if nxt == :x
- return 1
- end
-
- # Dropping gumballs
- def draw6
- color = @C['6']
- xy = [324, 130, 391, 204] # Ball holder
- xy = round_rect(xy, 10)
- TkcPolygon.new(@canvas, xy, :smooth=>true,
- :outline=>@C['fg'], :width=>3, :fill=>color)
- xy = [339, 204, 376, 253] # Below the ball holder
- TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
- :fill=>color, :tag=>'I6c')
- xy = box(346, 339, 28)
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') # Roter
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
- :start=>80, :extent=>205)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
- :start=>-41, :extent=>85)
-
- xy = box(346, 339, 15) # Center of rotor
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['fg'], :tag=>'I6m')
- xy = [352, 312, 352, 254, 368, 254, 368, 322] # Top drop to rotor
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'')
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2)
-
- xy = [353, 240, 367, 300] # Poke bottom hole
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'')
- xy = [341, 190, 375, 210] # Poke another hole
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'')
-
- xy = [
- 368, 356, 368, 403, 389, 403, 389, 464, 320, 464, 320, 403,
- 352, 403, 352, 366
- ]
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'',
- :width=>2) # Below rotor
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2)
- xy = box(275, 342, 7) # On/off rotor
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['fg'])
- xy = [276, 334, 342, 325] # Fan belt top
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = [276, 349, 342, 353] # Fan belt bottom
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
-
- xy = [337, 212, 337, 247] # What the mouse pushes
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I6_')
- xy = [392, 212, 392, 247]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I6_')
- xy = [337, 230, 392, 230]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>7, :tag=>'I6_')
-
- who = -1 # All the balls
- colors = %w(red cyan orange green blue darkblue)
- colors *= 3
-
- (0..16).each{|i|
- loc = -i
- color = colors[i]
- x, y = @XY6["#{loc}"]
- TkcOval.new(@canvas, box(x, y, 5),
- :fill=>color, :outline=>color, :tag=>"I6_b#{i}")
- }
- draw6a(12) # The wheel
- end
-
- def draw6a(beta)
- @canvas.delete('I6_0')
- ox, oy = [346, 339]
- (0..3).each{|i|
- b = beta + i * 45
- x, y = rotate_c(28, 0, 0, 0, b)
- xy = [ox + x, oy + y, ox - x, oy - y]
- TkcLine.new(@canvas, xy, :tag=>'I6_0', :fill=>@C['fg'], :width=>2)
- }
- end
-
- def move6(step = nil)
- step = get_step(6, step)
-
- return 0 if step > 62
-
- if step < 2 # Open gate for balls to drop
- @canvas.move('I6_', -7, 0)
- if step == 1 # Poke a hole
- xy = [348, 226, 365, 240]
- TkcRectangle.new(@canvas, xy, :fill=>@canvas.itemcget('I6c', :fill),
- :outline=>'')
- end
- return 1
- end
-
- s = step - 1 # Do the gumball drop dance
- (0..(((s - 1)/3).to_i)).each{|i|
- tag = "I6_b#{i}"
- break if @canvas.find_withtag(tag).empty?
- loc = s - 3*i
-
- if @XY6["#{loc},#{i}"]
- move_abs(tag, @XY6["#{loc},#{i}"])
- elsif @XY6["#{loc}"]
- move_abs(tag, @XY6["#{loc}"])
- end
- }
- if s % 3 == 1
- first = (s + 2)/3
- i = first
- loop {
- tag = "I6_b#{i}"
- break if @canvas.find_withtag(tag).empty?
- loc = first - i
- move_abs(tag, @XY6["#{loc}"])
- i += 1
- }
- end
- if s >= 3 # Rotate the motor
- idx = s % 3
- draw6a(12 + s * 15)
- end
- return((s == 3)? 3 : 1)
- end
-
- # On/off switch
- def draw7
- color = @C['7']
- xy = [198, 306, 277, 374] # Box
- TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>2,
- :fill=>color, :tag=>'I7z')
- @canvas.lower('I7z')
- xy = [275, 343, 230, 349]
- TkcLine.new(@canvas, xy, :tag=>'I7', :fill=>@C['fg'], :arrow=>:last,
- :arrowshape=>[23, 23, 8], :width=>6)
- xy = [225, 324] # On button
- x, y = xy
- TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg'])
- xy = [218, 323] # On text
- font = ['Times Roman', 8]
- TkcText.new(@canvas, xy, :text=>'on', :anchor=>:e,
- :fill=>@C['fg'], :font=>font)
- xy = [225, 350] # Off button
- x, y = xy
- TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg'])
- xy = [218, 349] # Off text
- TkcText.new(@canvas, xy, :text=>'off', :anchor=>:e,
- :fill=>@C['fg'], :font=>font)
- end
-
- def move7(step = nil)
- step = get_step(7, step)
-
- numsteps = 30
- return 0 if step > numsteps
- beta = 30.0 / numsteps
- rotate_item('I7', 275, 343, beta)
-
- return((step == numsteps)? 3: 1)
- end
-
- # Electricity to the fan
- def draw8
- sine([271, 248, 271, 306], 5, 8, :tag=>'I8_s', :fill=>@C['8'], :width=>3)
- end
-
- def move8(step = nil)
- step = get_step(8, step)
-
- return 0 if step > 3
- if step == 0
- sparkle(anchor('I8_s', :s), 'I8')
- return 1
- elsif step == 1
- move_abs('I8', anchor('I8_s', :c))
- elsif step == 2
- move_abs('I8', anchor('I8_s', :n))
- else
- @canvas.delete('I8')
- end
- return((step == 2)? 3: 1)
- end
-
- # Fan
- def draw9
- color = @C['9']
- xy = [266, 194, 310, 220]
- TkcOval.new(@canvas, xy, :outline=>color, :fill=>color)
- xy = [280, 209, 296, 248]
- TkcOval.new(@canvas, xy, :outline=>color, :fill=>color)
- xy = [
- 288, 249, 252, 249, 260, 240, 280, 234,
- 296, 234, 316, 240, 324, 249, 288, 249
- ]
- TkcPolygon.new(@canvas, xy, :fill=>color, :smooth=>true)
-
- xy = [248, 205, 265, 214, 264, 205, 265, 196] # Spinner
- TkcPolygon.new(@canvas, xy, :fill=>color)
-
- xy = [255, 206, 265, 234] # Fan blades
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
- :width=>3, :tag=>'I9_0')
- xy = [255, 176, 265, 204]
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
- :width=>3, :tag=>'I9_0')
- xy = [255, 206, 265, 220]
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
- :width=>1, :tag=>'I9_1')
- xy = [255, 190, 265, 204]
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
- :width=>1, :tag=>'I9_1')
- end
-
- def move9(step = nil)
- step = get_step(9, step)
-
- if (step & 1).nonzero?
- @canvas.itemconfigure('I9_0', :width=>4)
- @canvas.itemconfigure('I9_1', :width=>1)
- @canvas.lower('I9_1', 'I9_0')
- else
- @canvas.itemconfigure('I9_0', :width=>1)
- @canvas.itemconfigure('I9_1', :width=>4)
- @canvas.lower('I9_0', 'I9_1')
- end
- return 3 if step == 0
- return 1
- end
-
- # Boat
- def draw10
- color = @C['10a']
- color2 = @C['10b']
- xy = [191, 230, 233, 230, 233, 178, 191, 178] # Sail
- TkcPolygon.new(@canvas, xy, :fill=>color, :width=>3, :outline=>@C['fg'],
- :tag=>'I10')
- xy = box(209, 204, 31) # Front
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :style=>:pie,
- :start=>120, :extent=>120, :tag=>'I10')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>120, :extent=>120, :tag=>'I10')
- xy = box(249, 204, 31) # Back
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>3,
- :style=>:pie, :start=>120, :extent=>120, :tag=>'I10')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>120, :extent=>120, :tag=>'I10')
-
- xy = [200, 171, 200, 249] # Mast
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I10')
- xy = [159, 234, 182, 234] # Bow sprit
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I10')
- xy = [180, 234, 180, 251, 220, 251] # Hull
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>6, :tag=>'I10')
-
- xy = [92, 255, 221, 255] # Waves
- sine(xy, 2, 25, :fill=>color2, :width=>1, :tag=>'I10w')
-
- xy = @canvas.coords('I10w')[4..-5] # Water
- xy.concat([222, 266, 222, 277, 99, 277])
- TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>color2)
- xy = [222, 266, 222, 277, 97, 277, 97, 266] # Water bottom
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
-
- xy = box(239, 262, 17)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>95, :extent=>103)
- xy = box(76, 266, 21)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :extent=>190)
- end
-
- def move10(step = nil)
- step = get_step(10, step)
-
- pos = [
- [195, 212], [193, 212], [190, 212], [186, 212], [181, 212], [176, 212],
- [171, 212], [166, 212], [161, 212], [156, 212], [151, 212], [147, 212],
- [142, 212], [137, 212], [132, 212, :x], [127, 212], [121, 212],
- [116, 212], [111, 212]
- ]
-
- return 0 if step >= pos.length
-
- where = pos[step]
- move_abs('I10', where)
-
- return 3 if where[2] == :x
- return 1
- end
-
- # 2nd ball drop
- def draw11
- color = @C['11a']
- color2 = @C['11b']
- xy = [23, 264, 55, 591] # Color the down tube
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'')
- xy = box(71, 460, 48) # Color the outer loop
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'')
-
- xy = [55, 264, 55, 458] # Top right side
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = [55, 504, 55, 591] # Bottom right side
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = box(71, 460, 48) # Outer loop
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>110, :extent=>-290, :tag=>'I11i')
- xy = box(71, 460, 16) # Inner loop
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>'',
- :width=>3, :tag=>'I11i')
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['bg'], :width=>3)
-
- xy = [23, 264, 23, 591] # Left side
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = box(1, 266, 23) # Top left curve
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
- :style=>:arc, :extent=>90)
-
- xy = box(75, 235, 9) # The ball
- TkcOval.new(@canvas, xy, :fill=>color2, :outline=>'',
- :width=>3, :tag=>'I11')
- end
-
- def move11(step = nil)
- step = get_step(11, step)
-
- pos = [
- [75, 235], [70, 235], [65, 237], [56, 240], [46, 247], [38, 266],
- [38, 296], [38, 333], [38, 399], [38, 475], [74, 496], [105, 472],
- [100, 437], [65, 423], [-100, -100], [38, 505], [38, 527, :x], [38, 591]
- ]
-
- return 0 if step >= pos.length
- where = pos[step]
- move_abs('I11', where)
- return 3 if where[2] == :x
- return 1
- end
-
- # Hand
- def draw12
- xy = [
- 20, 637, 20, 617, 20, 610, 20, 590, 40, 590, 40, 590,
- 60, 590, 60, 610, 60, 610
- ]
- xy.concat([60, 610, 65, 620, 60, 631]) # Thumb
- xy.concat([60, 631, 60, 637, 60, 662, 60, 669, 52, 669,
- 56, 669, 50, 669, 50, 662, 50, 637])
-
- y0 = 637 # Bumps for fingers
- y1 = 645
- 50.step(21, -10){|x|
- x1 = x - 5
- x2 = x - 10
- xy << x << y0 << x1 << y1 << x2 << y0
- }
- TkcPolygon.new(@canvas, xy, :fill=>@C['12'], :outline=>@C['fg'],
- :smooth=>true, :tag=>'I12', :width=>3)
- end
-
- def move12(step = nil)
- step = get_step(12, step)
-
- pos = [[42.5, 641, :x]]
- return 0 if step >= pos.length
- where = pos[step]
- move_abs('I12', where)
- return 3 if where[2] == :x
- return 1
- end
-
- # Fax
- def draw13
- color = @C['13a']
- xy = [86, 663, 149, 663, 149, 704, 50, 704, 50, 681, 64, 681, 86, 671]
- xy2 = [
- 784, 663, 721, 663, 721, 704, 820, 704, 820, 681, 806, 681, 784, 671
- ]
- radii = [2, 9, 9, 8, 5, 5, 2]
-
- round_poly(@canvas, xy, radii, :width=>3,
- :outline=>@C['fg'], :fill=>color)
- round_poly(@canvas, xy2, radii, :width=>3,
- :outline=>@C['fg'], :fill=>color)
-
- xy = [56, 677]
- x, y = xy
- TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
- :width=>3, :tag=>'I13')
- xy = [809, 677]
- x, y = xy
- TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
- :width=>3, :tag=>'I13R')
-
- xy = [112, 687] # Label
- TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
- :font=>['Times Roman', 12, :bold])
- xy = [762, 687]
- TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
- :font=>['Times Roman', 12, :bold])
-
- xy = [138, 663, 148, 636, 178, 636] # Paper guide
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>@C['fg'], :width=>3)
- xy = [732, 663, 722, 636, 692, 636]
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>@C['fg'], :width=>3)
-
- sine([149, 688, 720, 688], 5, 15,
- :tag=>'I13_s', :fill=>@C['fg'], :width=>3)
- end
-
- def move13(step = nil)
- step = get_step(13, step)
-
- numsteps = 7
-
- if step == numsteps + 2
- move_abs('I13_star', [-100, -100])
- @canvas.itemconfigure('I13R', :fill=>@C['13b'], :width=>2)
- return 2
- end
- if step == 0 # Button down
- @canvas.delete('I13')
- sparkle([-100, -100], 'I13_star') # Create off screen
- return 1
- end
- x0, y0 = anchor('I13_s', :w)
- x1, y1 = anchor('I13_s', :e)
- x = x0 + (x1 - x0) * (step - 1) / numsteps.to_f
- move_abs('I13_star', [x, y0])
- return 1
- end
-
- # Paper in fax
- def draw14
- color = @C['14']
- xy = [102, 661, 113, 632, 130, 618] # Left paper edge
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
- :width=>3, :tag=>'I14L_0')
- xy = [148, 629, 125, 640, 124, 662] # Right paper edge
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
- :width=>3, :tag=>'I14L_1')
- draw14a('L')
-
- xy = [
- 768.0, 662.5, 767.991316225, 662.433786215, 767.926187912, 662.396880171
- ]
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
- :width=>3, :tag=>'I14R_0')
- @canvas.lower('I14R_0')
- # NB. these numbers are VERY sensitive, you must start with final size
- # and shrink down to get the values
- xy = [
- 745.947897349, 662.428358855, 745.997829056, 662.452239237, 746.0, 662.5
- ]
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
- :width=>3, :tag=>'I14R_1')
- @canvas.lower('I14R_1')
- end
-
- def draw14a(side)
- color = @C['14']
- xy = @canvas.coords("I14#{side}_0")
- xy2 = @canvas.coords("I14#{side}_1")
- x0, y0, x1, y1, x2, y2 = xy
- x3, y3, x4, y4, x5, y5 = xy2
-
- zz = [
- x0, y0, x0, y0, xy, x2, y2, x2, y2,
- x3, y3, x3, y3, xy2, x5, y5, x5, y5
- ].flatten
- @canvas.delete("I14#{side}")
- TkcPolygon.new(@canvas, zz, :tag=>"I14#{side}", :smooth=>true,
- :fill=>color, :outline=>color, :width=>3)
- @canvas.lower("I14#{side}")
- end
-
- def move14(step = nil)
- step = get_step(14, step)
-
- # Paper going down
- sc = 0.9 - 0.05*step
- if sc < 0.3
- @canvas.delete('I14L')
- return 0
- end
-
- ox, oy = @canvas.coords('I14L_0')
- @canvas.scale('I14L_0', ox, oy, sc, sc)
- ox, oy = @canvas.coords('I14L_1')[-2..-1]
- @canvas.scale('I14L_1', ox, oy, sc, sc)
- draw14a('L')
-
- # Paper going up
- sc = 0.35 + 0.05*step
- sc = 1/sc
-
- ox, oy = @canvas.coords('I14R_0')
- @canvas.scale('I14R_0', ox, oy, sc, sc)
- ox, oy = @canvas.coords('I14R_1')[-2..-1]
- @canvas.scale('I14R_1', ox, oy, sc, sc)
- draw14a('R')
-
- return((step == 10)? 3: 1)
- end
-
- # Light beam
- def draw15
- color = @C['15a']
- xy = [824, 599, 824, 585, 820, 585, 829, 585]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I15a')
- xy = [789, 599, 836, 643]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3)
- xy = [778, 610, 788, 632]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3)
- xy = [766, 617, 776, 625]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3)
-
- xy = [633, 600, 681, 640]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3)
- xy = [635, 567, 657, 599]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2)
- xy = [765, 557, 784, 583]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2)
-
- sine([658, 580, 765, 580], 3, 15,
- :tag=>'I15_s', :fill=>@C['fg'], :width=>3)
- end
-
- def move15a
- color = @C['15b']
- @canvas.scale('I15a', 824, 599, 1, 0.3) # Button down
- xy = [765, 621, 681, 621]
- TkcLine.new(@canvas, xy, :dash=>'-', :width=>3, :fill=>color, :tag=>'I15')
- end
-
- def move15(step = nil)
- step = get_step(15, step)
-
- numsteps = 6
-
- if step == numsteps + 2
- move_abs('I15_star', [-100, -100])
- return 2
- end
- if step == 0 # Break the light beam
- sparkle([-100, -100], 'I15_star')
- xy = [765, 621, 745, 621]
- @canvas.coords('I15', xy)
- return 1
- end
- x0, y0 = anchor('I15_s', :w)
- x1, y1 = anchor('I15_s', :e)
- x = x0 + (x1 - x0) * (step - 1) / numsteps.to_f
- move_abs('I15_star', [x, y0])
- return 1
- end
-
- # Bell
- def draw16
- color = @C['16']
- xy = [722, 485, 791, 556]
- TkcRectangle.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>3)
- xy = box(752, 515, 25) # Bell
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'black',
- :tag=>'I16b', :width=>2)
- xy = box(752, 515, 5) # Bell button
- TkcOval.new(@canvas, xy, :fill=>'black', :outline=>'black', :tag=>'I16b')
-
- xy = [784, 523, 764, 549] # Clapper
- TkcLine.new(@canvas, xy, :width=>3, :tag=>'I16c', :fill=>@C['fg'])
- xy = box(784, 523, 4)
- TkcOval.new(@canvas, xy, :fill=>@C['fg'], :outline=>@C['fg'], :tag=>'I16d')
- end
-
- def move16(step = nil)
- step = get_step(16, step)
-
- # Note: we never stop
- ox, oy = [760, 553]
- if (step & 1).nonzero?
- beta = 12
- @canvas.move('I16b', 3, 0)
- else
- beta = -12
- @canvas.move('I16b', -3, 0)
- end
- rotate_item('I16c', ox, oy, beta)
- rotate_item('I16d', ox, oy, beta)
-
- return ((step == 1)? 3: 1)
- end
-
- # Cat
- def draw17
- color = @C['17']
-
- xy = [584, 556, 722, 556]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = [584, 485, 722, 485]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
-
- xy = [664, 523, 717, 549] # Body
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, :width=>3,
- :style=>:chord, :start=>128, :extent=>260, :tag=>'I17')
-
- xy = [709, 554, 690, 543] # Paw
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
- :width=>3, :tag=>'I17')
- xy = [657, 544, 676, 555]
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
- :width=>3, :tag=>'I17')
-
- xy = box(660, 535, 15) # Lower face
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>150, :extent=>240, :tag=>'I17_')
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
- :style=>:chord, :start=>150, :extent=>240, :tag=>'I17_')
- xy = [674, 529, 670, 513, 662, 521, 658, 521, 650, 513, 647, 529] # Ears
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', :width=>1,
- :tag=>['I17_', 'I17_c'])
- xy = [652, 542, 628, 539] # Whiskers
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [652, 543, 632, 545]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [652, 546, 632, 552]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
-
- xy = [668, 543, 687, 538]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :tag=>['I17_', 'I17_w'])
- xy = [668, 544, 688, 546]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :tag=>['I17_', 'I17_w'])
- xy = [668, 547, 688, 553]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :tag=>['I17_', 'I17_w'])
-
- xy = [649, 530, 654, 538, 659, 530] # Left eye
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
- :smooth=>true, :tag=>'I17')
- xy = [671, 530, 666, 538, 661, 530] # Right eye
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
- :smooth=>true, :tag=>'I17')
- xy = [655, 543, 660, 551, 665, 543] # Mouth
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
- :smooth=>true, :tag=>'I17')
- end
-
- def move17(step = nil)
- step = get_step(17, step)
-
- if step == 0
- @canvas.delete('I17') # Delete most of the cat
- xy = [655, 543, 660, 535, 665, 543] # Mouth
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :smooth=>true, :tag=>'I17_')
- xy = box(654, 530, 4) # Left eye
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'',
- :tag=>'I17_')
- xy = box(666, 530, 4) # Right eye
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'',
- :tag=>'I17_')
-
- @canvas.move('I17_', 0, -20) # Move face up
- xy = [652, 528, 652, 554] # Front leg
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [670, 528, 670, 554] # 2nd front leg
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
-
- xy = [ # Body
- 675, 506, 694, 489, 715, 513, 715, 513, 715, 513, 716, 525,
- 716, 525, 716, 525, 706, 530, 695, 530, 679, 535, 668, 527,
- 668, 527, 668, 527, 675, 522, 676, 517, 677, 512
- ]
- TkcPolygon.new(@canvas, xy, :fill=>@canvas.itemcget('I17_c', :fill),
- :outline=>@C['fg'], :width=>3, :smooth=>true,
- :tag=>'I17_')
- xy = [716, 514, 716, 554] # Back leg
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [694, 532, 694, 554] # 2nd back leg
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [715, 514, 718, 506, 719, 495, 716, 488] # Tail
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :smooth=>true, :tag=>'I17_')
-
- @canvas.raise('I17w') # Make whiskers visible
- @canvas.move('I17_', -5, 0) # Move away from the wall a bit
- return 2
- end
- return 0
- end
-
- # Sling shot
- def draw18
- color = @C['18']
- xy = [721, 506, 627, 506] # Sling hold
- TkcLine.new(@canvas, xy, :width=>4, :fill=>@C['fg'], :tag=>'I18')
-
- xy = [607, 500, 628, 513] # Sling rock
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :tag=>'I18a')
-
- xy = [526, 513, 606, 507, 494, 502] # Sling band
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>4, :tag=>'I18b')
- xy = [485, 490, 510, 540, 510, 575, 510, 540, 535, 491] # Sling
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>6)
- end
-
- def move18(step = nil)
- step = get_step(18, step)
-
- pos = [
- [587, 506], [537, 506], [466, 506], [376, 506], [266, 506, :x],
- [136, 506], [16, 506], [-100, -100]
- ]
-
- b = []
- b[0] = [490, 502, 719, 507, 524, 512] # Band collapsing
- b[1] = [
- 491, 503, 524, 557, 563, 505, 559, 496, 546, 506, 551, 525,
- 553, 536, 538, 534, 532, 519, 529, 499
- ]
- b[2] = [
- 491, 503, 508, 563, 542, 533, 551, 526, 561, 539, 549, 550, 530, 500
- ]
- b[3] = [
- 491, 503, 508, 563, 530, 554, 541, 562, 525, 568, 519, 544, 530, 501
- ]
-
- return 0 if step >= pos.length
-
- if step == 0
- @canvas.delete('I18')
- @canvas.itemconfigure('I18b', :smooth=>true)
- end
- if b[step]
- @canvas.coords('I18b', b[step])
- end
-
- where = pos[step]
- move_abs('I18a', where)
- return 3 if where[2] == :x
- return 1
- end
-
- # Water pipe
- def draw19
- color = @C['19']
- xx = [[249, 181], [155, 118], [86, 55], [22, 0]]
- xx.each{|x1, x2|
- TkcRectangle.new(@canvas, x1, 453, x2, 467,
- :fill=>color, :outline=>'', :tag=>'I19')
- TkcLine.new(@canvas, x1, 453, x2, 453,
- :fill=>@C['fg'], :width=>1) # Pipe top
- TkcLine.new(@canvas, x1, 467, x2, 467,
- :fill=>@C['fg'], :width=>1) # Pipe bottom
- }
- @canvas.raise('I11i')
-
- xy = box(168, 460, 16) # Bulge by the joint
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
- :start=>21, :extent=>136)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
- :start=>-21, :extent=>-130)
-
- xy = [249, 447, 255, 473] # First joint 26x6
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
-
- xy = box(257, 433, 34) # Bend up
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
- :style=>:pie, :start=>0, :extent=>-91)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>0, :extent=>-90)
- xy = box(257, 433, 20)
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
- :style=>:pie, :start=>0, :extent=>-92)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>0, :extent=>-90)
- xy = box(257, 421, 34) # Bend left
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
- :style=>:pie, :start=>0, :extent=>91)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>0, :extent=>90)
- xy = box(257, 421, 20)
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
- :style=>:pie, :start=>0, :extent=>90)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>0, :extent=>90)
- xy = box(243, 421, 34) # Bend down
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
- :style=>:pie, :start=>90, :extent=>90)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>90, :extent=>90)
- xy = box(243, 421, 20)
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
- :style=>:pie, :start=>90, :extent=>90)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>90, :extent=>90)
-
- xy = [270, 427, 296, 433] # 2nd joint bottom
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
- xy = [270, 421, 296, 427] # 2nd joint top
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
- xy = [249, 382, 255, 408] # Third joint right
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
- xy = [243, 382, 249, 408] # Third joint left
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
- xy = [203, 420, 229, 426] # Last joint
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
-
- xy = box(168, 460, 6) # Handle joint
- TkcOval.new(@canvas, xy, :fill=>@C['fg'], :outline=>'', :tag=>'I19a')
- xy = [168, 460, 168, 512] # Handle bar
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>5, :tag=>'I19b')
- end
-
- def move19(step = nil)
- step = get_step(19, step)
-
- angles = [30, 30, 30]
- return 2 if step == angles.length
- ox, oy = centroid('I19a')
- rotate_item('I19b', ox, oy, angles[step])
-
- return 1
- end
-
- # Water pouring
- def draw20
- # do nothing
- end
-
- def move20(step = nil)
- step = get_step(20, step)
-
- pos = [451, 462, 473, 484, 496, 504, 513, 523, 532]
- freq = [20, 40, 40, 40, 40, 40, 40, 40, 40]
- pos = [
- [451, 20], [462, 40], [473, 40], [484, 40], [496, 40],
- [504, 40], [513, 40], [523, 40], [532, 40, :x]
- ]
- return 0 if step >= pos.length
-
- @canvas.delete('I20')
- where = pos[step]
- y, f = where
- h20(y, f)
- return 3 if where[2] == :x
- return 1
- end
-
- def h20(y, f)
- color = @C['20']
- @canvas.delete('I20')
-
- sine([208, 428, 208, y], 4, f, :tag=>['I20', 'I20s'],
- :width=>3, :fill=>color, :smooth=>true)
- TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
- :fill=>color, :smooth=>1, :tag=>['I20', 'I20a'])
- TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
- :fill=>color, :smooth=>1, :tag=>['I20', 'I20b'])
- @canvas.move('I20a', 8, 0)
- @canvas.move('I20b', 16, 0)
- end
-
- # Bucket
- def draw21
- color = @C['21']
- xy = [217, 451, 244, 490] # Right handle
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21_a')
- xy = [201, 467, 182, 490] # Left handle
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21_a')
-
- xy = [245, 490, 237, 535] # Right side
- xy2 = [189, 535, 181, 490] # Left side
- TkcPolygon.new(@canvas, xy + xy2, :fill=>color, :outline=>'',
- :tag=>['I21', 'I21f'])
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21')
- TkcLine.new(@canvas, xy2, :fill=>@C['fg'], :width=>2, :tag=>'I21')
-
- xy = [182, 486, 244, 498] # Top
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :width=>2,
- :tag=>['I21', 'I21f'])
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>2,
- :tag=>['I21', 'I21t'])
- xy = [189, 532, 237, 540] # Bottom
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2,
- :tag=>['I21', 'I21b'])
- end
-
- def move21(step = nil)
- step = get_step(21, step)
-
- numsteps = 30
- return 0 if step >= numsteps
-
- x1, y1, x2, y2 = @canvas.coords('I21b')
- # lx1, ly1, lx2, ly2 = @canvas.coords('I21t')
- lx1, ly1, lx2, ly2 = [183, 492, 243, 504]
-
- f = step / numsteps.to_f
- y2 = y2 - 3
- xx1 = x1 + (lx1 - x1) * f
- yy1 = y1 + (ly1 - y1) * f
- xx2 = x2 + (lx2 - x2) * f
- yy2 = y2 + (ly2 - y2) * f
-
- @canvas.itemconfigure('I21b', :fill=>@C['20'])
- @canvas.delete('I21w')
- TkcPolygon.new(@canvas, x2, y2, x1, y1, xx1, yy1, xx2, yy1,
- :tag=>['I21', 'I21w'], :outline=>'', :fill=>@C['20'])
- @canvas.lower('I21w', 'I21')
- @canvas.raise('I21b')
- @canvas.lower('I21f')
-
- return((step == numsteps - 1)? 3: 1)
- end
-
- # Bucket drop
- def draw22
- # do nothing
- end
-
- def move22(step = nil)
- step = get_step(22, step)
- pos = [[213, 513], [213, 523], [213, 543, :x], [213, 583], [213, 593]]
-
- @canvas.itemconfigure('I21f', :fill=>@C['22']) if step == 0
- return 0 if step >= pos.length
- where = pos[step]
- move_abs('I21', where)
- h20(where[1], 40)
- @canvas.delete('I21_a') # Delete handles
-
- return 3 if where[2] == :x
- return 1
- end
-
- # Blow dart
- def draw23
- color = @C['23a']
- color2 = @C['23b']
- color3 = @C['23c']
-
- xy = [185, 623, 253, 650] # Block
- TkcRectangle.new(@canvas, xy, :fill=>'black', :outline=>@C['fg'],
- :width=>2, :tag=>'I23a')
- xy = [187, 592, 241, 623] # Balloon
- TkcOval.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :tag=>'I23b',
- :style=>:arc, :start=>12, :extent=>336)
- xy = [239, 604, 258, 589, 258, 625, 239, 610] # Balloon nozzle
- TkcPolygon.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b')
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23b')
-
- xy = [285, 611, 250, 603] # Dart body
- TkcOval.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'],
- :width=>3, :tag=>'I23d')
- xy = [249, 596, 249, 618, 264, 607, 249, 596] # Dart tail
- TkcPolygon.new(@canvas, xy, :fill=>color3, :outline=>@C['fg'],
- :width=>3, :tag=>'I23d')
- xy = [249, 607, 268, 607] # Dart detail
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d')
- xy = [285, 607, 305, 607] # Dart needle
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d')
- end
-
- def move23(step = nil)
- step = get_step(23, step)
-
- pos = [
- [277, 607], [287, 607], [307, 607, :x], [347, 607], [407, 607],
- [487, 607], [587, 607], [687, 607], [787, 607], [-100, -100]
- ]
-
- return 0 if step >= pos.length
- if step <= 1
- ox, oy = anchor('I23a', :n)
- @canvas.scale('I23b', ox, oy, 0.9, 0.5)
- end
- where = pos[step]
- move_abs('I23d', where)
-
- return 3 if where[2] == :x
- return 1
- end
-
- # Balloon
- def draw24
- color = @C['24a']
- xy = [366, 518, 462, 665] # Balloon
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'],
- :width=>3, :tag=>'I24')
- xy = [414, 666, 414, 729] # String
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I24')
- xy = [410, 666, 404, 673, 422, 673, 418, 666] # Nozzle
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>@C['fg'],
- :width=>3, :tag=>'I24')
-
- xy = [387, 567, 390, 549, 404, 542] # Reflections
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
- :width=>2, :tag=>'I24')
- xy = [395, 568, 399, 554, 413, 547]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
- :width=>2, :tag=>'I24')
- xy = [403, 570, 396, 555, 381, 553]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
- :width=>2, :tag=>'I24')
- xy = [408, 564, 402, 547, 386, 545]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
- :width=>2, :tag=>'I24')
- end
-
- def move24(step = nil)
- step = get_step(24, step)
-
- return 0 if step > 4
- return 2 if step == 4
-
- if step == 0
- @canvas.delete('I24') # Exploding balloon
- xy = [
- 347, 465, 361, 557, 271, 503, 272, 503, 342, 574, 259, 594,
- 259, 593, 362, 626, 320, 737, 320, 740, 398, 691, 436, 738,
- 436, 739, 476, 679, 528, 701, 527, 702, 494, 627, 548, 613,
- 548, 613, 480, 574, 577, 473, 577, 473, 474, 538, 445, 508,
- 431, 441, 431, 440, 400, 502, 347, 465, 347, 465
- ]
- TkcPolygon.new(@canvas, xy, :tag=>'I24', :fill=>@C['24b'],
- :outline=>@C['24a'], :width=>10, :smooth=>true)
- msg = Tk.subst(@S['message'].value)
- TkcText.new(@canvas, centroid('I24'), :text=>msg, :tag=>['I24', 'I24t'],
- :justify=>:center, :font=>['Times Roman', 18, :bold])
- return 1
- end
-
- @canvas.itemconfigure('I24t', :font=>['Times Roman', 18 + 6*step, :bold])
- @canvas.move('I24', 0, -60)
- ox, oy = centroid('I24')
- @canvas.scale('I24', ox, oy, 1.25, 1.25)
- return 1
- end
-
- # Displaying the message
- def move25(step = nil)
- step = get_step(25, step)
-
- if step == 0
- @XY['25'] = Tk::Clock.clicks(:milliseconds)
- return 1
- end
- elapsed = Tk::Clock.clicks(:milliseconds) - @XY['25']
- return 1 if elapsed < 5000
- return 2
- end
-
- # Collapsing balloon
- def move26(step = nil)
- step = get_step(26, step)
-
- if step >= 3
- @canvas.delete('I24', 'I26')
- TkcText.new(@canvas, 430, 740, :anchor=>:s, :tag=>'I26',
- :text=>'click to continue',
- :font=>['Times Roman', 24, :bold])
- @canvas.bind('1', proc{reset})
- return 4
- end
-
- ox, oy = centroid('I24')
- @canvas.scale('I24', ox, oy, 0.8, 0.8)
- @canvas.move('I24', 0, 60)
- @canvas.itemconfigure('I24t', :font=>['Times Roman', 30 - 6*step, :bold])
- return 1
- end
-
- ################################################################
- #
- # Helper functions
- #
- def box(x, y, r)
- [x - r, y - r, x + r, y + r]
- end
-
- def move_abs(item, xy)
- x, y = xy
- ox, oy = centroid(item)
- dx = x - ox
- dy = y - oy
- @canvas.move(item, dx, dy)
- end
-
- def rotate_item(item, ox, oy, beta)
- xy = @canvas.coords(item)
- xy2 = []
- 0.step(xy.length - 1, 2){|idx|
- x, y = xy[idx, 2]
- xy2.concat(rotate_c(x, y, ox, oy, beta))
- }
- @canvas.coords(item, xy2)
- end
-
- def rotate_c(x, y, ox, oy, beta)
- # rotates vector (ox,oy)->(x,y) by beta degrees clockwise
-
- x -= ox # Shift to origin
- y -= oy
-
- beta = beta * Math.atan(1) * 4 / 180.0 # Radians
- xx = x * Math.cos(beta) - y * Math.sin(beta) # Rotate
- yy = x * Math.sin(beta) + y * Math.cos(beta)
-
- xx += ox # Shift back
- yy += oy
-
- [xx, yy]
- end
-
- def reset
- draw_all
- @canvas.bind_remove('1')
- @S['mode'].value = :MSTART
- @S['active'] = [0]
- end
-
- # Each Move## keeps its state info in STEP, this retrieves and increments it
- def get_step(who, step)
- if step
- @STEP[who] = step
- else
- if !@STEP.exist?(who) || @STEP[who] == ""
- @STEP[who] = 0
- else
- @STEP[who] += 1
- end
- end
- @STEP[who]
- end
-
- def reset_step
- @S['cnt'].value = 0
- @STEP.keys.each{|k| @STEP[k] = ''}
- end
-
- def sine(xy0, amp, freq, opts = {})
- x0, y0, x1, y1 = xy0
- step = 2
- xy = []
- if y0 == y1 # Horizontal
- x0.step(x1, step){|x|
- beta = (x - x0) * 2 * Math::PI / freq
- y = y0 + amp * Math.sin(beta)
- xy << x << y
- }
- else
- y0.step(y1, step){|y|
- beta = (y - y0) * 2 * Math::PI / freq
- x = x0 + amp * Math.sin(beta)
- xy << x << y
- }
- end
- TkcLine.new(@canvas, xy, opts)
- end
-
- def round_rect(xy, radius, opts={})
- x0, y0, x3, y3 = xy
- r = @canvas.winfo_pixels(radius)
- d = 2 * r
-
- # Make sure that the radius of the curve is less than 3/8 size of the box!
- maxr = 0.75
- if d > maxr * (x3 - x0)
- d = maxr * (x3 - x0)
- end
- if d > maxr * (y3 - y0)
- d = maxr * (y3 - y0)
- end
-
- x1 = x0 + d
- x2 = x3 - d
- y1 = y0 + d
- y2 = y3 - d
-
- xy = [x0, y0, x1, y0, x2, y0, x3, y0, x3, y1, x3, y2]
- xy.concat([x3, y3, x2, y3, x1, y3, x0, y3, x0, y2, x0, y1])
- return xy
- end
-
- def round_poly(canv, xy, radii, opts)
- lenXY = xy.length
- lenR = radii.length
- if lenXY != 2*lenR
- raise "wrong number of vertices and radii"
- end
-
- knots = []
- x0 = xy[-2]; y0 = xy[-1]
- x1 = xy[0]; y1 = xy[1]
- xy << xy[0] << xy[1]
-
- 0.step(lenXY - 1, 2){|i|
- radius = radii[i/2]
- r = canv.winfo_pixels(radius)
-
- x2 = xy[i+2]; y2 = xy[i+3]
- z = _round_poly2(x0, y0, x1, y1, x2, y2, r)
- knots.concat(z)
-
- x0 = x1; y0 = y1
- x1 = x2; y1 = y2
- }
- TkcPolygon.new(canv, knots, {:smooth=>true}.update(opts))
- end
-
- def _round_poly2(x0, y0, x1, y1, x2, y2, radius)
- d = 2 * radius
- maxr = 0.75
-
- v1x = x0 - x1
- v1y = y0 - y1
- v2x = x2 - x1
- v2y = y2 - y1
-
- vlen1 = Math.sqrt(v1x*v1x + v1y*v1y)
- vlen2 = Math.sqrt(v2x*v2x + v2y*v2y)
-
- if d > maxr * vlen1
- d = maxr * vlen1
- end
- if d > maxr * vlen2
- d = maxr * vlen2
- end
-
- xy = []
- xy << (x1 + d * v1x / vlen1) << (y1 + d * v1y / vlen1)
- xy << x1 << y1
- xy << (x1 + d * v2x / vlen2) << (y1 + d * v2y / vlen2)
-
- return xy
- end
-
- def sparkle(oxy, tag)
- xy = [
- [299, 283], [298, 302], [295, 314], [271, 331],
- [239, 310], [242, 292], [256, 274], [281, 273]
- ]
- xy.each{|x, y|
- TkcLine.new(@canvas, 271, 304, x, y,
- :fill=>'white', :width=>3, :tag=>tag)
- }
- move_abs(tag, oxy)
- end
-
- def centroid(item)
- anchor(item, :c)
- end
-
- def anchor(item, where)
- x1, y1, x2, y2 = @canvas.bbox(item)
- case(where)
- when :n
- y = y1
- when :s
- y = y2
- else
- y = (y1 + y2) / 2.0
- end
- case(where)
- when :w
- x = x1
- when :e
- x = x2
- else
- x = (x1 + x2) / 2.0
- end
- return [x, y]
- end
-end
-
-TkGoldberg_Demo.new(base_frame)
diff --git a/ext/tk/sample/demos-en/hello b/ext/tk/sample/demos-en/hello
deleted file mode 100644
index 5e86ad7e3e..0000000000
--- a/ext/tk/sample/demos-en/hello
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-require 'tk'
-
-#unless /^8\.[1-9]/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK
-# require 'tkencoding'
-#end
-
-TkButton.new(nil,
- 'text'=>"Hello Ruby world!",
- 'font'=>TkFont.new('k14'),
- 'command'=>proc{print "Hello Ruby world!\n"; exit}
-).pack
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/hscale.rb b/ext/tk/sample/demos-en/hscale.rb
deleted file mode 100644
index 05a8f39362..0000000000
--- a/ext/tk/sample/demos-en/hscale.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen_string_literal: false
-require "tkcanvas"
-
-if defined?($hscale_demo) && $hscale_demo
- $hscale_demo.destroy
- $hscale_demo = nil
-end
-
-$hscale_demo = TkToplevel.new {|w|
- title("Horizontal Scale Demonstration")
- iconname("hscale")
-}
-positionWindow($hscale_demo)
-
-base_frame = TkFrame.new($hscale_demo).pack(:fill=>:both, :expand=>true)
-
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '3.5i'
- justify 'left'
- text "An arrow and a horizontal scale are displayed below. If you click or drag mouse button 1 in the scale, you can change the length of the arrow."
-}
-msg.pack('side'=>'top')
-
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc {
- tmppath = $hscale_demo
- $hscale_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc { showCode 'hscale' }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-
-def setWidth(w, width)
- width = width + 21
- x2 = width - 30
- if x2 < 21
- x2 = 21
- end
- w.coords 'poly',20,15,20,35,x2,35,x2,45,width,25,x2,5,x2,15,20,15
- w.coords 'line',20,15,20,35,x2,35,x2,45,width,25,x2,5,x2,15,20,15
-end
-
-TkFrame.new(base_frame) {|frame|
- canvas = TkCanvas.new(frame) {|c|
- width 50
- height 50
- bd 0
- highlightthickness 0
- TkcPolygon.new(c, '0', '0', '1', '1', '2', '2') {
- fill 'DeepSkyBlue'
- tags 'poly'
- }
- TkcLine.new(c, '0', '0', '1', '1', '2', '2', '0', '0') {
- fill 'black'
- tags 'line'
- }
- }.pack('side'=>'top', 'expand'=>'yes', 'anchor'=>'s', 'fill'=>'x', 'padx'=>'15')
- scale = TkScale.new(frame) {
- orient 'horizontal'
- length 284
- from 0
- to 250
- command proc{|value| setWidth(canvas, value)}
- tickinterval 50
- }.pack('side'=>'bottom', 'expand'=>'yes', 'anchor'=>'n')
- scale.set 75
-}.pack('side'=>'top', 'fill'=>'x')
diff --git a/ext/tk/sample/demos-en/icon.rb b/ext/tk/sample/demos-en/icon.rb
deleted file mode 100644
index e0cb88ad80..0000000000
--- a/ext/tk/sample/demos-en/icon.rb
+++ /dev/null
@@ -1,106 +0,0 @@
-# frozen_string_literal: false
-# icon.rb
-#
-# This demonstration script creates a toplevel window containing
-# buttons that display bitmaps instead of text.
-#
-# iconic button widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($icon_demo) && $icon_demo
- $icon_demo.destroy
- $icon_demo = nil
-end
-
-# demo toplevel widget
-$icon_demo = TkToplevel.new {|w|
- title("Iconic Button Demonstration")
- iconname("icon")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($icon_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "This window shows three ways of using bitmaps or images in radiobuttons and checkbuttons. On the left are two radiobuttons, each of which displays a bitmap and an indicator. In the middle is a checkbutton that displays a different image depending on whether it is selected or not. On the right is a checkbutton that displays a single bitmap but changes its background color to indicate whether or not it is selected. (This change is visible when the mouse pointer is not directly over the button.)"
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $icon_demo
- $icon_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'icon'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# image
-flagup = \
-TkBitmapImage.new('file'=>[$demo_dir,'..',
- 'images','flagup.xbm'].join(File::Separator),
- 'maskfile'=>\
- [$demo_dir,'..','images','flagup.xbm'].join(File::Separator))
-flagdown = \
-TkBitmapImage.new('file'=>[$demo_dir,'..',
- 'images','flagdown.xbm'].join(File::Separator),
- 'maskfile'=>\
- [$demo_dir,'..',
- 'images','flagdown.xbm'].join(File::Separator))
-
-# create variable
-letters = TkVariable.new
-
-# frame
-TkFrame.new(base_frame, 'borderwidth'=>10){|w|
- TkFrame.new(w) {|f|
- # TkRadioButton.new(f){
- Tk::RadioButton.new(f){
- bitmap '@' + [$demo_dir,'..',
- 'images','letters.xbm'].join(File::Separator)
- variable letters
- value 'full'
- }.pack('side'=>'top', 'expand'=>'yes')
-
- # TkRadioButton.new(f){
- Tk::RadioButton.new(f){
- bitmap '@' + [$demo_dir,'..',
- 'images','noletter.xbm'].join(File::Separator)
- variable letters
- value 'empty'
- }.pack('side'=>'top', 'expand'=>'yes')
-
- }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m')
-
- # TkCheckButton.new(w) {
- Tk::CheckButton.new(w) {
- image flagdown
- selectimage flagup
- indicatoron 0
- selectcolor self['background']
- }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m')
-
- # TkCheckButton.new(w) {
- Tk::CheckButton.new(w) {
- bitmap '@' + [$demo_dir,'..',
- 'images','letters.xbm'].join(File::Separator)
- indicatoron 0
- selectcolor 'SeaGreen1'
- }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m')
-
-}.pack('side'=>'top')
-
diff --git a/ext/tk/sample/demos-en/image1.rb b/ext/tk/sample/demos-en/image1.rb
deleted file mode 100644
index c7c0989df8..0000000000
--- a/ext/tk/sample/demos-en/image1.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# frozen_string_literal: false
-## image1.rb
-#
-# This demonstration script displays two image widgets.
-#
-# two image widgets demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($image1_demo) && $image1_demo
- $image1_demo.destroy
- $image1_demo = nil
-end
-
-# demo toplevel widget
-$image1_demo = TkToplevel.new {|w|
- title('Image Demonstration #1')
- iconname("Image1")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($image1_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "This demonstration displays two images, each in a separate label widget."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $image1_demo
- $image1_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'image1'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# image
-image1a = \
-TkPhotoImage.new('file'=>[$demo_dir,'..',
- 'images','earth.gif'].join(File::Separator))
-image1b = \
-TkPhotoImage.new('file'=>[$demo_dir,'..',
- 'images','earthris.gif'].join(File::Separator))
-
-# label
-#[ TkLabel.new(base_frame, 'image'=>image1a, 'bd'=>1, 'relief'=>'sunken'),
-# TkLabel.new(base_frame, 'image'=>image1b, 'bd'=>1, 'relief'=>'sunken')
-#].each{|w| w.pack('side'=>'top', 'padx'=>'.5m', 'pady'=>'.5m')}
-[ Tk::Label.new(base_frame, 'image'=>image1a, 'bd'=>1, 'relief'=>'sunken'),
- Tk::Label.new(base_frame, 'image'=>image1b, 'bd'=>1, 'relief'=>'sunken')
-].each{|w| w.pack('side'=>'top', 'padx'=>'.5m', 'pady'=>'.5m')}
-
diff --git a/ext/tk/sample/demos-en/image2.rb b/ext/tk/sample/demos-en/image2.rb
deleted file mode 100644
index dfb993e434..0000000000
--- a/ext/tk/sample/demos-en/image2.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-# frozen_string_literal: false
-# image2.rb
-#
-# This demonstration script creates a simple collection of widgets
-# that allow you to select and view images in a Tk label.
-#
-# widget demo 'load image' (called by 'widget')
-#
-
-# toplevel widget
-if defined?($image2_demo) && $image2_demo
- $image2_demo.destroy
- $image2_demo = nil
-end
-
-# demo toplevel widget
-$image2_demo = TkToplevel.new {|w|
- title('Image Demonstration #2')
- iconname("Image2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($image2_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "This demonstration allows you to view images using a Tk \"photo\" image. First type a directory name in the listbox, then press Enter to load the directory into the listbox. Then double-click on a file name in the listbox to see that image."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $image2_demo
- $image2_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'image2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# create variable
-$dirName = TkVariable.new([$demo_dir,'..','images'].join(File::Separator))
-
-# image
-$image2a = TkPhotoImage.new
-
-#
-TkLabel.new(base_frame, 'text'=>'Directory:')\
-.pack('side'=>'top', 'anchor'=>'w')
-
-image2_e = TkEntry.new(base_frame) {
- width 30
- textvariable $dirName
-}.pack('side'=>'top', 'anchor'=>'w')
-
-TkFrame.new(base_frame, 'height'=>'3m', 'width'=>20)\
-.pack('side'=>'top', 'anchor'=>'w')
-
-TkLabel.new(base_frame, 'text'=>'File:')\
-.pack('side'=>'top', 'anchor'=>'w')
-
-TkFrame.new(base_frame){|w|
- s = TkScrollbar.new(w)
- l = TkListbox.new(w) {
- width 20
- height 10
- yscrollcommand proc{|first,last| s.set first,last}
- }
- s.command(proc{|*args| l.yview(*args)})
- l.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y')
- s.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y')
- #l.insert(0,'earth.gif', 'earthris.gif', 'mickey.gif', 'teapot.ppm')
- l.insert(0,'earth.gif', 'earthris.gif', 'teapot.ppm')
- l.bind('Double-1', proc{|x,y| loadImage $image2a,l,x,y}, '%x %y')
-
- image2_e.bind 'Return', proc{loadDir l}
-
-}.pack('side'=>'top', 'anchor'=>'w')
-
-# image
-[ TkFrame.new(base_frame, 'height'=>'3m', 'width'=>20),
- TkLabel.new(base_frame, 'text'=>'Image:'),
- TkLabel.new(base_frame, 'image'=>$image2a)
-].each{|w| w.pack('side'=>'top', 'anchor'=>'w')}
-
-#
-def loadDir(w)
- w.delete(0,'end')
- Dir.glob([$dirName,'*'].join(File::Separator)).sort.each{|f|
- w.insert('end',File.basename(f))
- }
-end
-
-def loadImage(img,w,x,y)
- img.file([$dirName, w.get("@#{x},#{y}")].join(File::Separator))
-end
-
diff --git a/ext/tk/sample/demos-en/image3.rb b/ext/tk/sample/demos-en/image3.rb
deleted file mode 100644
index 9b2be20073..0000000000
--- a/ext/tk/sample/demos-en/image3.rb
+++ /dev/null
@@ -1,126 +0,0 @@
-# frozen_string_literal: false
-# image3.rb
-#
-# This demonstration script creates a simple collection of widgets
-# that allow you to select and view images in a Tk label.
-#
-# widget demo 'load image' (called by 'widget')
-#
-
-# toplevel widget
-if defined?($image3_demo) && $image3_demo
- $image3_demo.destroy
- $image3_demo = nil
-end
-
-# demo toplevel widget
-$image3_demo = TkToplevel.new {|w|
- title('Image Demonstration #3')
- iconname("Image3")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($image3_demo).pack(:fill=>:both, :expand=>true)
-
-#
-def loadDir3(w)
- w.delete(0,'end')
- Dir.glob([$dirName,'*'].join(File::Separator)).sort.each{|f|
- w.insert('end',File.basename(f))
- }
-end
-
-# selectAndLoadDir3 --
-# This procedure pops up a dialog to ask for a directory to load into
-# the listbox and (if the user presses OK) reloads the directory
-# listbox from the directory named in the demo's entry.
-#
-# Arguments:
-# w - Name of the toplevel window of the demo.
-def selectAndLoadDir3(w, lbox)
- dir = Tk.chooseDirectory(:initialdir=>$dirName.value,
- :parent=>w, :mustexist=>true)
- if dir.length > 0
- $dirName.value = dir
- loadDir3(lbox)
- end
-end
-
-def loadImage(w,x,y)
- $image3a.file([$dirName, w.get("@#{x},#{y}")].join(File::Separator))
-end
-
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "This demonstration allows you to view images using a Tk \"photo\" image. First type a directory name in the listbox, then type Return to load the directory into the listbox. Then double-click on a file name in the listbox to see that image."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $image3_demo
- $image3_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'image3'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# variable
-$dirName = TkVariable.new([$demo_dir,'..','images'].join(File::Separator))
-
-# image
-begin
- $image3a.delete
-rescue
-end
-$image3a = TkPhotoImage.new
-
-#
-image3_f = TkFrame.new(base_frame).pack(:fill=>:both, :expand=>true)
-
-image3_df = TkLabelFrame.new(base_frame, :text=>'Directory:')
-
-image3_ff = TkLabelFrame.new(base_frame, :text=>'File:',
- :padx=>'2m', :pady=>'2m')
-image3_lbx = TkListbox.new(image3_ff, :width=>20, :height=>10) {
- pack(:side=>:left, :fill=>:y, :expand=>true)
- yscrollbar(TkScrollbar.new(image3_ff).pack(:side=>:left, :fill=>:y,
- :expand=>true))
- insert(0, *(%w(earth.gif earthris.gif teapot.ppm)))
- bind('Double-1', proc{|x,y| loadImage(self, x, y)}, '%x %y')
-}
-
-image3_ent = TkEntry.new(image3_df, :width=>30, :textvariable=>$dirName){
- pack(:side=>:left, :fill=>:both, :padx=>'2m', :pady=>'2m', :expand=>true)
- bind('Return', proc{loadDir3(image3_lbx)})
-}
-
-TkButton.new(image3_df, :pady=>0, :padx=>'2m', :text=>"Select Dir.",
- :command=>proc{selectAndLoadDir3(image3_ent, image3_lbx)}) {
- pack(:side=>:left, :fill=>:y, :padx=>[0, '2m'], :pady=>'2m')
-}
-
-image3_if = TkLabelFrame.new(base_frame, :text=>'Image:') {|f|
- # TkLabel.new(f, :image=>$image3a).pack(:padx=>'2m', :pady=>'2m')
- Tk::Label.new(f, :image=>$image3a).pack(:padx=>'2m', :pady=>'2m')
-}
-
-Tk.grid(image3_df, '-',
- :sticky=>:ew, :padx=>'1m', :pady=>'1m', :in=>image3_f)
-Tk.grid(image3_ff, image3_if,
- :sticky=>:nw, :padx=>'1m', :pady=>'1m', :in=>image3_f)
-TkGrid.columnconfigure(image3_f, 1, :weight=>1)
-
diff --git a/ext/tk/sample/demos-en/items.rb b/ext/tk/sample/demos-en/items.rb
deleted file mode 100644
index d6de1e557e..0000000000
--- a/ext/tk/sample/demos-en/items.rb
+++ /dev/null
@@ -1,382 +0,0 @@
-# frozen_string_literal: false
-# items.rb
-#
-# This demonstration script creates a canvas that displays the
-# canvas item types.
-#
-# canvas item types widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($items_demo) && $items_demo
- $items_demo.destroy
- $items_demo = nil
-end
-
-# demo toplevel widget
-$items_demo = TkToplevel.new {|w|
- title("Canvas Item Demonstration")
- iconname("Items")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($items_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "This window contains a canvas widget with examples of the various kinds of items supported by canvases. The following operations are supported:\n Button-1 drag:\tmoves item under pointer.\n Button-2 drag:\trepositions view.\n Button-3 drag:\tstrokes out area.\n Ctrl+f:\t\tprints items under area."
-}.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $items_demo
- $items_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'items'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-cvs = nil
-TkFrame.new(base_frame) {|cf|
- # canvas
- cvs = TkCanvas.new(cf) {|c|
- focus
- scrollregion '0c 0c 30c 24c'
- width '15c'
- height '10c'
- relief 'sunken'
- borderwidth 2
-
- hs = TkScrollbar.new(cf) {|s|
- orient 'horizontal'
- command proc{|*args| c.xview(*args)}
- c.xscrollcommand proc{|first,last| s.set first,last}
- }
-
- vs = TkScrollbar.new(cf) {|s|
- command proc{|*args| c.yview(*args)}
- c.yscrollcommand proc{|first,last| s.set first,last}
- }
-
- if $tk_version =~ /^4\.[01]/
- hs.pack('side'=>'bottom', 'fill'=>'x')
- vs.pack('side'=>'right', 'fill'=>'y')
- c.pack('in'=>cf, 'expand'=>'yes', 'fill'=>'both')
-
- else
- c.grid('in'=>cf, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- vs.grid('row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- hs.grid('row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- TkGrid.rowconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
-
- end
-
- }
-}.pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes')
-
-# Display a 3x3 rectangular grid
-TkcRectangle.new(cvs, '0c', '0c', '30c', '24c', 'width'=>2)
-TkcLine.new(cvs, '0c', '8c', '30c', '8c', 'width'=>2)
-TkcLine.new(cvs, '0c', '16c', '30c', '16c', 'width'=>2)
-TkcLine.new(cvs, '10c', '0c', '10c', '24c', 'width'=>2)
-TkcLine.new(cvs, '20c', '0c', '20c', '24c', 'width'=>2)
-
-if $tk_version =~ /^4.*/
- font1 = '-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*'
- font2 = '-Adobe-Helvetica-Bold-R-Normal--*-240-*-*-*-*-*-*'
-else
- font1 = 'Helvetica 12'
- font2 = 'Helvetica 24 bold'
-end
-if TkWinfo.depth($root).to_i > 1
- blue = 'DeepSkyBlue3'
- red = 'red'
- bisque = 'bisque3'
- green = 'SeaGreen3'
-else
- blue = 'black'
- red = 'black'
- bisque = 'black'
- green = 'black'
-end
-
-# tag
-$tag_item = TkcGroup.new(cvs)
-
-# Set up demos within each of the areas of the grid.
-TkcText.new(cvs, '5c', '.2c', 'text'=>'Lines', 'anchor'=>'n')
-TkcLine.new(cvs, '1c', '1c', '3c', '1c', '1c', '4c', '3c', '4c',
- 'width'=>2, 'fill'=>blue, 'capstyle'=>'butt',
- 'join'=>'miter', 'tags'=>$tag_item )
-TkcLine.new(cvs, '4.67c','1c','4.67c','4c', 'arrow'=>'last', 'tags'=>$tag_item)
-TkcLine.new(cvs, '6.33c','1c','6.33c','4c', 'arrow'=>'both', 'tags'=>$tag_item)
-TkcLine.new(cvs, '5c','6c','9c','6c','9c','1c','8c','1c','8c','4.8c','8.8c',
- '4.8c','8.8c','1.2c','8.2c','1.2c','8.2c','4.6c','8.6c','4.6c',
- '8.6c','1.4c','8.4c','1.4c','8.4c','4.4c',
- 'width'=>3, 'fill'=>red, 'tags'=>$tag_item )
-TkcLine.new(cvs, '1c','5c','7c','5c','7c','7c','9c','7c', 'width'=>'.5c',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'arrow'=>'both', 'arrowshape'=>'15 15 7', 'tags'=>$tag_item )
-TkcLine.new(cvs, '1c','7c','1.75c','5.8c','2.5c','7c','3.25c','5.8c','4c','7c',
- 'width'=>'.5c', 'capstyle'=>'round', 'join'=>'round',
- 'tags'=>$tag_item )
-
-TkcText.new(cvs, '15c', '.2c',
- 'text'=>'Curves (smoothed lines)', 'anchor'=>'n')
-TkcLine.new(cvs, '11c','4c','11.5c','1c','13.5c','1c','14c','4c',
- 'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item )
-TkcLine.new(cvs, '15.5c','1c','19.5c','1.5c','15.5c','4.5c','19.5c','4c',
- 'smooth'=>'on', 'arrow'=>'both', 'width'=>3, 'tags'=>$tag_item )
-TkcLine.new(cvs, '12c','6c','13.5c','4.5c','16.5c','7.5c','18c','6c',
- '16.5c','4.5c','13.5c','7.5c','12c','6c',
- 'smooth'=>'on', 'width'=>'3m', 'capstyle'=>'round',
- 'stipple'=>'@'+[$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator),
- 'fill'=>red, 'tags'=>$tag_item )
-
-TkcText.new(cvs, '25c', '.2c', 'text'=>'Polygons', 'anchor'=>'n')
-TkcPolygon.new(cvs, '21c','1.0c','22.5c','1.75c','24c','1.0c','23.25c','2.5c',
- '24c','4.0c','22.5c','3.25c','21c','4.0c','21.75c','2.5c',
- 'fill'=>'green', 'outline'=>'black', 'width'=>4,
- 'tags'=>$tag_item )
-TkcPolygon.new(cvs, '25c','4c','25c','4c','25c','1c','26c','1c','27c','4c',
- '28c','1c','29c','1c','29c','4c','29c','4c',
- 'fill'=>red, 'smooth'=>'on', 'tags'=> $tag_item)
-TkcPolygon.new(cvs, '22c','4.5c','25c','4.5c','25c','6.75c','28c','6.75c',
- '28c','5.25c','24c','5.25c','24c','6.0c','26c','6c','26c',
- '7.5c','22c','7.5c',
- 'stipple'=>'@' + [$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator),
- 'outline'=>'black', 'tags'=>$tag_item )
-
-TkcText.new(cvs, '5c', '8.2c', 'text'=>'Rectangles', 'anchor'=>'n')
-TkcRectangle.new(cvs, '1c','9.5c','4c','12.5c',
- 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
-TkcRectangle.new(cvs, '0.5c','13.5c','4.5c','15.5c',
- 'fill'=>green, 'tags'=>$tag_item )
-TkcRectangle.new(cvs, '6c','10c','9c','15c', 'outline'=>'',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'fill'=>blue, 'tags'=>$tag_item )
-
-TkcText.new(cvs, '15c', '8.2c', 'text'=>'Ovals', 'anchor'=>'n')
-TkcOval.new(cvs, '11c','9.5c','14c','12.5c',
- 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
-TkcOval.new(cvs, '10.5c','13.5c','14.5c','15.5c',
- 'fill'=>green, 'tags'=>$tag_item )
-TkcOval.new(cvs, '16c','10c','19c','15c', 'outline'=>'',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'fill'=>blue, 'tags'=>$tag_item )
-
-TkcText.new(cvs, '25c', '8.2c', 'text'=>'Text', 'anchor'=>'n')
-TkcRectangle.new(cvs, '22.4c','8.9c','22.6c','9.1c')
-TkcText.new(cvs, '22.5c', '9c', 'anchor'=>'n', 'font'=>font1, 'width'=>'4c',
- 'text'=>'A short string of text, word-wrapped, justified left, and anchored north (at the top). The rectangles show the anchor points for each piece of text.', 'tags'=>$tag_item )
-TkcRectangle.new(cvs, '25.4c','10.9c','25.6c','11.1c')
-TkcText.new(cvs, '25.5c', '11c', 'anchor'=>'w', 'font'=>font1, 'fill'=>blue,
- 'text'=>"Several lines,\n each centered\nindividually,\nand all anchored\nat the left edge.", 'justify'=>'center', 'tags'=>$tag_item )
-TkcRectangle.new(cvs, '24.9c','13.9c','25.1c','14.1c')
-if $tk_version =~ /^4\.[01]/
- TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
- 'stipple'=>'@' + [$demo_dir, '..',
- 'images', 'grey.5'].join(File::Separator),
- 'text'=>'Stippled characters', 'tags'=>$tag_item )
-else
- TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
- 'stipple'=>'gray50', 'text'=>'Stippled characters',
- 'tags'=>$tag_item )
-end
-
-TkcText.new(cvs, '5c', '16.2c', 'text'=>'Arcs', 'anchor'=>'n')
-TkcArc.new(cvs, '0.5c','17c','7c','20c', 'fill'=>green, 'outline'=>'black',
- 'start'=>45, 'extent'=>270, 'style'=>'pieslice', 'tags'=>$tag_item)
-#TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
-# 'outline'=>blue, 'start'=>135, 'extent'=>270,
-# 'outlinestipple'=>'@' + ['images', 'grey.25'].join(File::Separator),
-# 'tags'=>$tag_item)
-TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
- 'outline'=>blue, 'start'=>135, 'extent'=>270,
- 'outlinestipple'=>'@'+[$demo_dir, '..',
- 'images','gray25.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
-TkcArc.new(cvs, '0.5c','20c','9.5c','24c', 'width'=>'4m', 'style'=>'pieslice',
- 'fill'=>'', 'outline'=>red, 'start'=>225, 'extent'=>90,
- 'tags'=>$tag_item)
-TkcArc.new(cvs, '5.5c','20.5c','9.5c','23.5c', 'width'=>'4m', 'style'=>'chord',
- 'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270,
- 'tags'=>$tag_item)
-
-TkcText.new(cvs, '15c', '16.2c', 'text'=>'Bitmaps', 'anchor'=>'n')
-#TkcBitmap.new(cvs, '13c','20c',
-# 'bitmap'=>'@' + ['images', 'face'].join(File::Separator),
-# 'tags'=>$tag_item)
-TkcBitmap.new(cvs, '13c','20c',
- 'bitmap'=>'@' + [$demo_dir, '..',
- 'images', 'face.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
-#TkcBitmap.new(cvs, '17c','18.5c',
-# 'bitmap'=>'@' + ['images', 'noletters'].join(File::Separator),
-# 'tags'=>$tag_item)
-TkcBitmap.new(cvs, '17c','18.5c',
- 'bitmap'=>'@' + [$demo_dir, '..',
- 'images', 'noletter.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
-#TkcBitmap.new(cvs, '17c','21.5c',
-# 'bitmap'=>'@' + ['images', 'letters'].join(File::Separator),
-# 'tags'=>$tag_item)
-#
-TkcBitmap.new(cvs, '17c','21.5c') {
- bitmap '@' + [$demo_dir, '..', 'images', 'letters.xbm'].join(File::Separator)
- tags $tag_item
-}
-#TkcBitmap.new(cvs, '17c','21.5c') {
-# bitmap '@' + ['images', 'letters'].join(File::Separator)
-# tags $tag_item
-#}
-
-TkcText.new(cvs, '25c', '16.2c', 'text'=>'Windows', 'anchor'=>'n')
-TkButton.new(cvs) {|b|
- text 'Press Me'
- command proc{butPress cvs, red}
- TkcWindow.new(cvs, '21c','18c',
- 'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item)
-}
-TkEntry.new(cvs, 'width'=>20, 'relief'=>'sunken') {|e|
- insert 'end', 'Edit this text'
- TkcWindow.new(cvs, '21c','21c',
- 'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item)
-}
-TkScale.new(cvs, 'from'=>0, 'to'=>100, 'length'=>'6c', 'sliderlength'=>'.4c',
- 'width'=>'.5c', 'tickinterval'=>0 ) {|scl|
- TkcWindow.new(cvs, '28.5c','17.5c',
- 'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item)
-}
-TkcText.new(cvs, '21c', '17.9c', 'text'=>'Button:', 'anchor'=>'sw')
-TkcText.new(cvs, '21c', '20.9c', 'text'=>'Entry:', 'anchor'=>'sw')
-TkcText.new(cvs, '28.5c', '17.4c', 'text'=>'Scale:', 'anchor'=>'s')
-
-# Set up event bindings for canvas:
-cvs.itembind($tag_item, 'Any-Enter', proc{itemEnter cvs})
-cvs.itembind($tag_item, 'Any-Leave', proc{itemLeave cvs})
-cvs.bind('2', proc{|x,y| cvs.scan_mark x,y}, '%x %y')
-cvs.bind('B2-Motion', proc{|x,y| cvs.scan_dragto x,y}, '%x %y')
-cvs.bind('3', proc{|x,y| itemMark cvs,x,y}, '%x %y')
-cvs.bind('B3-Motion', proc{|x,y| itemStroke cvs,x,y}, '%x %y')
-cvs.bind('Control-f', proc{itemsUnderArea cvs})
-cvs.bind('1', proc{|x,y| itemStartDrag cvs,x,y}, '%x %y')
-cvs.bind('B1-Motion', proc{|x,y| itemDrag cvs,x,y}, '%x %y')
-# Utility methods for highlighting the item under the pointer
-
-$restoreCmd = nil
-def itemEnter (c)
- if TkWinfo.depth(c).to_i == 1
- $restoreCmd = nil
- return
- end
- type = c.itemtype('current')
- if type == TkcWindow
- $restoreCmd = nil
- return
- end
- if type == TkcBitmap
- bg = (c.itemconfiginfo('current', 'background'))[4]
- $restoreCmd = proc{c.itemconfigure 'current', 'background', bg}
- c.itemconfigure 'current', 'background', 'SteelBlue2'
- return
- end
- fill = (c.itemconfiginfo('current', 'fill'))[4]
- if (type == TkcRectangle || type == TkcOval || type == TkcArc) && fill == []
- outline = (c.itemconfiginfo('current', 'outline'))[4]
- $restoreCmd = proc{c.itemconfigure 'current', 'outline', outline}
- c.itemconfigure 'current', 'outline', 'SteelBlue2'
- else
- $restoreCmd = proc{c.itemconfigure 'current', 'fill', fill}
- c.itemconfigure 'current', 'fill', 'SteelBlue2'
- end
-end
-
-def itemLeave(c)
- $restoreCmd.call if $restoreCmd
-end
-
-# Utility methods for stroking out a rectangle and printing what's
-# underneath the rectangle's area.
-
-def itemMark(c,x,y)
- $areaX1 = c.canvasx(x)
- $areaY1 = c.canvasy(y)
- c.delete 'area'
-end
-
-def itemStroke(c,x,y)
- x = c.canvasx(x)
- y = c.canvasy(y)
- if $areaX1 != x && $areaY1 != y
- c.delete 'area'
- c.addtag_withtag 'area', TkcRectangle.new(c, $areaX1, $areaY1, x, y,
- '-outline', 'black')
- $areaX2 = x
- $areaY2 = y
- end
-end
-
-def itemsUnderArea(c)
- area = c.find_withtag('area')
- items = []
- c.find_enclosed($areaX1,$areaY1,$areaX2,$areaY2).each{|i|
- items.push(i) if i.gettags.include?($tag_item)
- }
- print "Items enclosed by area: #{items.inspect}\n"; STDOUT.flush
- items.clear
- c.find_overlapping($areaX1,$areaY1,$areaX2,$areaY2).each{|i|
- items.push(i) if i.gettags.include?($tag_item)
- }
- print "Items overlapping area: #{items.inspect}\n"; STDOUT.flush
-end
-
-$areaX1 = 0
-$areaY1 = 0
-$areaX2 = 0
-$areaY2 = 0
-
-# Utility methods to support dragging of items.
-
-def itemStartDrag(c,x,y)
- $lastX = c.canvasx(x)
- $lastY = c.canvasy(y)
-end
-
-def itemDrag(c,x,y)
- x = c.canvasx(x)
- y = c.canvasy(y)
- c.move 'current', x - $lastX, y - $lastY
- $lastX = x
- $lastY = y
-end
-
-# Method that's invoked when the button embedded in the canvas
-# is invoked.
-
-def butPress(w,color)
- i = TkcText.new(w, '25c', '18.1c',
- 'text'=>'Ouch!!', 'fill'=>color, 'anchor'=>'n')
- Tk.after(500, proc{w.delete i})
-end
diff --git a/ext/tk/sample/demos-en/ixset b/ext/tk/sample/demos-en/ixset
deleted file mode 100644
index 40a77f487c..0000000000
--- a/ext/tk/sample/demos-en/ixset
+++ /dev/null
@@ -1,333 +0,0 @@
-#!/usr/bin/env ruby
-
-# ixset --
-# A nice interface to "xset" to change X server settings
-#
-
-require 'tk'
-
-class Xsettings
- #
- # Button actions
- #
- def quit
- @root.destroy
- end
-
- def ok
- writesettings
- quit
- end
-
- def cancel
- readsettings
- dispsettings
- end
-
- # apply is just "writesettings"
-
-
- #
- # Read current settings
- #
- def readsettings
- xfd = open("|xset q", 'r')
- xfd.readlines.each{|line|
- fields = line.chomp.strip.split(/\s+/)
- case fields[0]
- when "auto"
- if fields[1] == 'repeat:'
- @kbdrep = fields[2]
- @w_kbdrep.set(@kbdrep)
- @kbdcli = fields[6]
- end
-
- when "bell"
- @bellvol = fields[2]
- @bellpit = fields[5]
- @belldur = fields[8]
-
- when "acceleration:"
- @mouseacc = fields[1]
- @mousethr = fields[3]
-
- when "prefer"
- if fields[2] == 'yes'
- @screenbla = 'blank'
- else
- @screenbla = 'noblank'
- end
- @w_screenbla.set(@screenbla)
-
- when "timeout:"
- @screentim = fields[1]
- @screencyc = fields[3]
-
- end
- }
-
- xfd.close
- end
-
- #
- # Write settings into the X server
- #
- def writesettings
- @bellvol = @w_bellvol.get
- @bellpit = @w_bellpit.get
- @belldur = @w_belldur.get
-
- @kbdrep = @w_kbdrep.get
- if @kbdrep == 'on'
- @kbdcli = @w_kbdcli.get
- else
- @kbdcli = 'off'
- end
-
- @mouseacc = @w_mouseacc.get
- @mousethr = @w_mousethr.get
-
- @screentim = @w_screentim.get
- @screencyc = @w_screencyc.get
- @screenbla = @w_screenbla.get
-
- system("xset \
- b #{@bellvol} #{@bellpit} #{@belldur} \
- c #{@kbdcli} \
- r #{@kbdrep} \
- m #{@mouseacc} #{@mousethr} \
- s #{@screentim} #{@screencyc} \
- s #{@screenbla}")
- end
-
- #
- # Sends all settings to the window
- #
- def dispsettings
- @w_bellvol.set(@bellvol)
- @w_bellpit.set(@bellpit)
- @w_belldur.set(@belldur)
-
- @w_kbdonoff.set(@w_kbdrep.get)
- @w_kbdcli.set(@kbdcli)
-
- @w_mouseacc.set(@mouseacc)
- @w_mousethr.set(@mousethr)
-
- @w_screenblank.set(@w_screenbla.get)
- @w_screenpat.set(@w_screenbla.get)
-
- @w_screentim.set(@screentim)
- @w_screencyc.set(@screencyc)
- end
-
- #
- # Create all windows, and pack them
- #
- class LabelEntry
- def initialize(parent, text, length)
- @frame = TkFrame.new(parent)
- TkLabel.new(@frame, 'text'=>text).pack('side'=>'left','expand'=>'y')
- @entry = TkEntry.new(@frame, 'width'=>length, 'relief'=>'sunken') {
- pack('side'=>'left','expand'=>'y')
- }
- end
- def pack(keys)
- @frame.pack(keys)
- end
- def get
- @entry.value
- end
- def set(value)
- @entry.delete(0,'end')
- @entry.insert(0, value)
- end
- end
-
- def createwindows
- win = self
-
- #
- # Buttons
- #
- buttons = TkFrame.new(@root) {|f|
- [ TkButton.new(f, 'command'=>proc{win.ok}, 'text'=>'Ok'),
- TkButton.new(f, 'command'=>proc{win.writesettings}, 'text'=>'Apply'),
- TkButton.new(f, 'command'=>proc{win.cancel}, 'text'=>'Cancel'),
- TkButton.new(f, 'command'=>proc{win.quit}, 'text'=>'Quit') ].each{|b|
- b.pack('side'=>'left', 'expand'=>'yes', 'pady'=>5)
- }
- }
-
- #
- # Bell settings
- #
- bell = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2)
- l = TkLabel.new(bell, 'text'=>'Bell Settings')
- @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200,
- 'tickinterval'=>20, 'orient'=>'horizontal',
- 'label'=>"Volume (%)")
-
- f = TkFrame.new(bell)
- @w_bellpit = LabelEntry.new(f, "Pitch (Hz)", 6)
- @w_bellpit.pack('side'=>'left', 'padx'=>5)
- @w_belldur = LabelEntry.new(f, "Duration (ms)", 6)
- @w_belldur.pack('side'=>'right', 'padx'=>5)
-
- l.pack('side'=>'top', 'expand'=>'yes')
- @w_bellvol.pack('side'=>'top', 'expand'=>'yes')
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Keyboard settings
- #
- kbdonoff = nil
- kbdcli = nil
- kbd = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2)
- l = TkLabel.new(kbd, 'text'=>'Keyboard Repeat Settings')
- f = TkFrame.new(kbd)
- @w_kbdonoff = TkCheckButton.new(f, 'text'=>'On', 'relief'=>'flat',
- 'onvalue'=>'on', 'offvalue'=>'off',
- 'variable'=>@w_kbdrep ) {
- def self.set(value)
- if value == 'on'
- self.select
- else
- self.deselect
- end
- end
- pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both')
- }
- @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200,
- 'tickinterval'=>20, 'orient'=>'horizontal',
- 'label'=>'Click Volume (%)')
- @w_kbdcli.pack('side'=>'left', 'expand'=>'yes')
- l.pack('side'=>'top', 'expand'=>'yes')
- f.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'fill'=>'x')
-
- #
- # Mouse settings
- #
- mouse = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2)
- l = TkLabel.new(mouse, 'text'=>'Mouse Settings')
- f = TkFrame.new(mouse)
- @w_mouseacc = LabelEntry.new(f, 'Acceleration', 3)
- @w_mouseacc.pack('side'=>'left')
- @w_mousethr = LabelEntry.new(f, 'Threshold (pixels)', 3)
- @w_mousethr.pack('side'=>'right')
- l.pack('side'=>'top')
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Screen Saver settings
- #
- screen = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2)
- l = TkLabel.new(screen, 'text'=>'Screen-saver Settings')
- f = TkFrame.new(screen)
- ff1 = TkFrame.new(f)
- [ @w_screenblank = TkRadioButton.new(ff1, 'text'=>'Blank',
- 'relief'=>'flat',
- 'variable'=>@w_screenbla,
- 'value'=>'blank') {
- def self.set(value)
- if value == 'blank'
- self.select
- else
- self.deselect
- end
- end
- },
- @w_screenpat = TkRadioButton.new(ff1, 'text'=>'Pattern',
- 'relief'=>'flat',
- 'variable'=>@w_screenbla,
- 'value'=>'noblank') {
- def self.set(value)
- if value != 'blank'
- self.select
- else
- self.deselect
- end
- end
- }
- ].each {|w| w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') }
-
- ff2 = TkFrame.new(f)
- [ @w_screentim = LabelEntry.new(ff2, 'Timeout (s)', 5),
- @w_screencyc = LabelEntry.new(ff2, 'Cycle (s)', 5) ].each{|w|
- w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'e')
- }
-
- ff1.pack('side'=>'left')
- ff2.pack('side'=>'left')
-
- l.pack('side'=>'top')
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Main window
- #
- buttons.pack('side'=>'top', 'fill'=>'both')
- bell.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes')
- kbd.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes')
- mouse.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes')
- screen.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes')
-
- #
- # Let the user resize our window
- #
- @root.minsize(10,10)
- end
-
- def initialize
- @root = TkRoot.new
-
- @kbdrep = 'on'
- @w_kbdrep = TkVariable.new(@kbdrep)
- def @w_kbdrep.get
- self.value
- end
- def @w_kbdrep.set(val)
- self.value=val
- end
-
- @kbdcli = 0
-
- @bellvol = 100
- @bellpit = 440
- @belldur = 100
-
- @mouseacc = "3/1"
- @mousethr = 4
-
- @screenbla = "blank"
- @w_screenbla = TkVariable.new(@screenbla)
- def @w_screenbla.get
- self.value
- end
- def @w_screenbla.set(val)
- self.value=val
- end
-
- @screentim = 600
- @screencyc = 600
-
- #
- # Listen what "xset" tells us...
- #
- readsettings
-
- #
- # Create all windows
- #
- createwindows
-
- #
- # Write xset parameters
- #
- dispsettings
- end
-end
-
-Xsettings.new
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/ixset2 b/ext/tk/sample/demos-en/ixset2
deleted file mode 100644
index cb99c60793..0000000000
--- a/ext/tk/sample/demos-en/ixset2
+++ /dev/null
@@ -1,367 +0,0 @@
-#!/usr/bin/env ruby
-#
-# ixset --
-# A nice interface to "xset" to change X server settings
-#
-
-require 'tk'
-
-class Xsettings
- #
- # Button actions
- #
- def quit
- @root.destroy
- end
-
- def ok
- writesettings
- quit
- end
-
- def cancel
- readsettings
- dispsettings
- @btn_APPLY.state(:disabled)
- @btn_CANCEL.state(:disabled)
- end
-
- # apply is just "writesettings"
- def apply
- writesettings
- @btn_APPLY.state(:disabled)
- @btn_CANCEL.state(:disabled)
- end
-
- #
- # Read current settings
- #
- def readsettings
- xfd = open("|xset q", 'r')
- xfd.readlines.each{|line|
- fields = line.chomp.strip.split(/\s+/)
- case fields[0]
- when "auto"
- if fields[1] == 'repeat:'
- @kbdrep = fields[2]
- @w_kbdrep.set(@kbdrep)
- @kbdcli = fields[6]
- end
-
- when "bell"
- @bellvol = fields[2]
- @bellpit = fields[5]
- @belldur = fields[8]
-
- when "acceleration:"
- @mouseacc = fields[1]
- @mousethr = fields[3]
-
- when "prefer"
- if fields[2] == 'yes'
- @screenbla = 'blank'
- else
- @screenbla = 'noblank'
- end
- @w_screenbla.set(@screenbla)
-
- when "timeout:"
- @screentim = fields[1]
- @screencyc = fields[3]
-
- end
- }
-
- xfd.close
- end
-
- #
- # Write settings into the X server
- #
- def writesettings
- @bellvol = @w_bellvol.get
- @bellpit = @w_bellpit.get
- @belldur = @w_belldur.get
-
- @kbdrep = @w_kbdrep.get
- if @kbdrep == 'on'
- @kbdcli = @w_kbdcli.get
- else
- @kbdcli = 'off'
- end
-
- @mouseacc = @w_mouseacc.get
- @mousethr = @w_mousethr.get
-
- @screentim = @w_screentim.get
- @screencyc = @w_screencyc.get
- @screenbla = @w_screenbla.get
-
- system("xset \
- b #{@bellvol} #{@bellpit} #{@belldur} \
- c #{@kbdcli} \
- r #{@kbdrep} \
- m #{@mouseacc} #{@mousethr} \
- s #{@screentim} #{@screencyc} \
- s #{@screenbla}")
- end
-
- #
- # Sends all settings to the window
- #
- def dispsettings
- @w_bellvol.set(@bellvol)
- @w_bellpit.set(@bellpit)
- @w_belldur.set(@belldur)
-
- @w_kbdonoff.set(@w_kbdrep.get)
- @w_kbdcli.set(@kbdcli)
-
- @w_mouseacc.set(@mouseacc)
- @w_mousethr.set(@mousethr)
-
- @w_screenblank.set(@w_screenbla.get)
- @w_screenpat.set(@w_screenbla.get)
-
- @w_screentim.set(@screentim)
- @w_screencyc.set(@screencyc)
- end
-
- #
- # Create all windows, and pack them
- #
- class LabelEntry
- def initialize(parent, text, length, range=[])
- @frame = TkFrame.new(parent)
- TkLabel.new(@frame, 'text'=>text).pack('side'=>'left')
- if range.size > 0
- @entry = TkSpinbox.new(@frame, 'width'=>length, 'relief'=>'sunken',
- 'from'=>range[0], 'to'=>range[1])
- else
- @entry = TkEntry.new(@frame, 'width'=>length, 'relief'=>'sunken')
- end
- @entry.pack('side'=>'right','expand'=>'y', 'fill'=>'x')
- end
- def epath
- @frame
- end
- def pack(keys)
- @frame.pack(keys)
- end
- def get
- @entry.value
- end
- def set(value)
- @entry.delete(0,'end')
- @entry.insert(0, value)
- end
- end
-
- def createwindows
- win = self
-
- #
- # Buttons
- #
- btn_frame = TkFrame.new(@root)
- buttons = [
- @btn_OK = TkButton.new(btn_frame, 'command'=>proc{win.ok},
- 'default'=>'active', 'text'=>'Ok'),
- @btn_APPLY = TkButton.new(btn_frame, 'command'=>proc{win.writesettings},
- 'default'=>'normal', 'text'=>'Apply',
- 'state'=>'disabled'),
- @btn_CANCEL = TkButton.new(btn_frame, 'command'=>proc{win.cancel},
- 'default'=>'normal', 'text'=>'Cancel',
- 'state'=>'disabled'),
- @btn_QUIT = TkButton.new(btn_frame, 'command'=>proc{win.quit},
- 'default'=>'normal', 'text'=>'Quit')
- ]
- buttons.each{|b| b.pack('side'=>'left', 'expand'=>'yes', 'pady'=>5) }
-
- @root.bind('Return', proc{@btn_OK.flash; @btn_OK.invoke})
- @root.bind('Escape', proc{@btn_QUIT.flash; @btn_QUIT.invoke})
- @root.bind('1', proc{|w|
- unless buttons.index(w)
- @btn_APPLY.state(:normal)
- @btn_CANCEL.state(:normal)
- end
- }, '%W')
- @root.bind('Key', proc{|w, k|
- unless buttons.index(w)
- case k
- when 'Return', 'Escape', 'Tab', /.*Shift.*/
- # do nothing
- else
- @btn_APPLY.state(:normal)
- @btn_CANCEL.state(:normal)
- end
- end
- }, '%W %K')
-
- #
- # Bell settings
- #
- bell = TkLabelframe.new(@root, 'text'=>'Bell Settings',
- 'padx'=>'1.5m', 'pady'=>'1.5m')
- @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200,
- 'tickinterval'=>20, 'orient'=>'horizontal',
- 'label'=>"Volume (%)")
-
- f = TkFrame.new(bell)
- @w_bellpit = LabelEntry.new(f, "Pitch (Hz)", 6, [25, 20000])
- @w_bellpit.pack('side'=>'left', 'padx'=>5)
- @w_belldur = LabelEntry.new(f, "Duration (ms)", 6, [1, 10000])
- @w_belldur.pack('side'=>'right', 'padx'=>5)
-
- @w_bellvol.pack('side'=>'top', 'expand'=>'yes')
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Keyboard settings
- #
- kbdonoff = nil
- kbdcli = nil
- kbd = TkLabelframe.new(@root, 'text'=>'Keyboard Repeat Settings',
- 'padx'=>'1.5m', 'pady'=>'1.5m')
- f = TkFrame.new(kbd)
- @w_kbdonoff = TkCheckButton.new(f, 'text'=>'On', 'relief'=>'flat',
- 'onvalue'=>'on', 'offvalue'=>'off',
- 'variable'=>@w_kbdrep ) {
- def self.set(value)
- if value == 'on'
- self.select
- else
- self.deselect
- end
- end
- pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x', 'padx'=>[0, '1m'])
- }
- @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200,
- 'tickinterval'=>20, 'orient'=>'horizontal',
- 'label'=>'Click Volume (%)')
- @w_kbdcli.pack('side'=>'left', 'expand'=>'yes',
- 'fill'=>'x', 'padx'=>['1m', 0])
- f.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'fill'=>'x')
-
- #
- # Mouse settings
- #
- mouse = TkLabelframe.new(@root, 'text'=>'Mouse Settings',
- 'padx'=>'1.5m', 'pady'=>'1.5m')
- f = TkFrame.new(mouse)
- @w_mouseacc = LabelEntry.new(f, 'Acceleration', 5)
- @w_mouseacc.pack('side'=>'left', 'padx'=>[0, '1m'])
- @w_mousethr = LabelEntry.new(f, 'Threshold (pixels)', 3, [1, 2000])
- @w_mousethr.pack('side'=>'right', 'padx'=>['1m', 0])
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Screen Saver settings
- #
- screen = TkLabelframe.new(@root, 'text'=>'Screen-saver Settings',
- 'padx'=>'1.5m', 'pady'=>'1.5m')
- @w_screenblank = TkRadioButton.new(screen, 'text'=>'Blank',
- 'relief'=>'flat', 'anchor'=>'w',
- 'variable'=>@w_screenbla,
- 'value'=>'blank') {
- def self.set(value)
- if value == 'blank'
- self.select
- else
- self.deselect
- end
- end
- }
-
- @w_screenpat = TkRadioButton.new(screen, 'text'=>'Pattern',
- 'relief'=>'flat', 'anchor'=>'w',
- 'variable'=>@w_screenbla,
- 'value'=>'noblank') {
- def self.set(value)
- if value != 'blank'
- self.select
- else
- self.deselect
- end
- end
- }
-
- @w_screentim = LabelEntry.new(screen, 'Timeout (s)', 5, [1, 100000])
- @w_screencyc = LabelEntry.new(screen, 'Cycle (s)', 5, [1, 100000])
-
- Tk.grid(@w_screenblank, @w_screentim, 'sticky'=>'e')
- Tk.grid(@w_screenpat, @w_screencyc, 'sticky'=>'e')
- TkGrid.configure(@w_screenblank, @w_screenpat, 'sticky'=>'ew')
-
- #
- # Main window
- #
- param = {
- 'side'=>'top', 'fill'=>'both', 'expand'=>'yes',
- 'padx'=>'1m', 'pady'=>'1m'
- }
- btn_frame.pack('side'=>'top', 'fill'=>'both')
- bell.pack(param)
- kbd.pack(param)
- mouse.pack(param)
- screen.pack(param)
-
- #
- # Let the user resize our window
- #
- @root.minsize(10,10)
- end
-
- def initialize(title)
- @root = TkRoot.new('title'=>title)
-
- @kbdrep = 'on'
- @w_kbdrep = TkVariable.new(@kbdrep)
- def @w_kbdrep.get
- self.value
- end
- def @w_kbdrep.set(val)
- self.value=val
- end
-
- @kbdcli = 0
-
- @bellvol = 100
- @bellpit = 440
- @belldur = 100
-
- @mouseacc = "3/1"
- @mousethr = 4
-
- @screenbla = "blank"
- @w_screenbla = TkVariable.new(@screenbla)
- def @w_screenbla.get
- self.value
- end
- def @w_screenbla.set(val)
- self.value=val
- end
-
- @screentim = 600
- @screencyc = 600
-
- #
- # Listen what "xset" tells us...
- #
- readsettings
-
- #
- # Create all windows
- #
- createwindows
-
- #
- # Write xset parameters
- #
- dispsettings
- end
-end
-
-Xsettings.new(File.basename($0,'.rb'))
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/knightstour.rb b/ext/tk/sample/demos-en/knightstour.rb
deleted file mode 100644
index 1ad82fcc9d..0000000000
--- a/ext/tk/sample/demos-en/knightstour.rb
+++ /dev/null
@@ -1,272 +0,0 @@
-# frozen_string_literal: false
-# Based on the widget demo of Tcl/Tk8.5.2
-# The following is the original copyright text.
-#----------------------------------------------------------------------------
-# Copyright (C) 2008 Pat Thoyts <patthoyts@users.sourceforge.net>
-#
-# Calculate a Knight's tour of a chessboard.
-#
-# This uses Warnsdorff's rule to calculate the next square each
-# time. This specifies that the next square should be the one that
-# has the least number of available moves.
-#
-# Using this rule it is possible to get to a position where
-# there are no squares available to move into. In this implementation
-# this occurs when the starting square is d6.
-#
-# To solve this fault an enhancement to the rule is that if we
-# have a choice of squares with an equal score, we should choose
-# the one nearest the edge of the board.
-#
-# If the call to the Edgemost function is commented out you can see
-# this occur.
-#
-# You can drag the knight to a specific square to start if you wish.
-# If you let it repeat then it will choose random start positions
-# for each new tour.
-#----------------------------------------------------------------------------
-require 'tk'
-
-class Knights_Tour
- # Return a list of accessible squares from a given square
- def valid_moves(square)
- moves = []
- [
- [-1,-2], [-2,-1], [-2,1], [-1,2], [1,2], [2,1], [2,-1], [1,-2]
- ].each{|col_delta, row_delta|
- col = (square % 8) + col_delta
- row = (square.div(8)) + row_delta
- moves << (row * 8 + col) if row > -1 && row < 8 && col > -1 && col < 8
- }
- moves
- end
-
- # Return the number of available moves for this square
- def check_square(square)
- valid_moves(square).find_all{|pos| ! @visited.include?(pos)}.length
- end
-
- # Select the next square to move to. Returns -1 if there are no available
- # squares remaining that we can move to.
- def next_square(square)
- minimum = 9
- nxt = -1
- valid_moves(square).each{|pos|
- unless @visited.include?(pos)
- cnt = check_square(pos)
- if cnt < minimum
- minimum = cnt
- nxt = pos
- elsif cnt == minimum
- nxt = edgemost(nxt, pos)
- end
- end
- }
- nxt
- end
-
- # Select the square nearest the edge of the board
- def edgemost(nxt, pos)
- col_A = 3 - ((3.5 - nxt % 8).abs.to_i)
- col_B = 3 - ((3.5 - pos % 8).abs.to_i)
- row_A = 3 - ((3.5 - nxt.div(8)).abs.to_i)
- row_B = 3 - ((3.5 - pos.div(8)).abs.to_i)
- (col_A * row_A < col_B * row_B)? nxt : pos
- end
-
- # Display a square number as a standard chess square notation.
- def _N(square)
- '%c%d' % [(97 + square % 8), (square.div(8) + 1)]
- end
-
- # Perform a Knight's move and schedule the next move.
- def move_piece(last, square)
- @log.insert(:end, "#{@visited.length}. #{_N last} -> #{_N square}\n", '')
- @log.see(:end)
- @board.itemconfigure(1+last, :state=>:normal, :outline=>'black')
- @board.itemconfigure(1+square, :state=>:normal, :outline=>'red')
- @knight.coords(@board.coords(1+square)[0..1])
- @visited << square
- if (nxt = next_square(square)) != -1
- @after_id = Tk.after(@delay.numeric){move_piece(square, nxt) rescue nil}
- else
- @start_btn.state :normal
- if @visited.length == 64
- if @initial == square
- @log.insert :end, 'Closed tour!'
- else
- @log.insert :end, "Success\n", {}
- Tk.after(@delay.numeric * 2){tour(rand(64))} if @continuous.bool
- end
- else
- @log.insert :end, "FAILED!\n", {}
- end
- end
- end
-
- # Begin a new tour of the board given a random start position
- def tour(square = nil)
- @visited.clear
- @log.clear
- @start_btn.state :disabled
- 1.upto(64){|n|
- @board.itemconfigure(n, :state=>:disabled, :outline=>'black')
- }
- unless square
- square = @board.find_closest(*(@knight.coords << 0 << 65))[0].to_i - 1
- end
- @initial = square
- Tk.after_idle{ move_piece(@initial, @initial) rescue nil }
- end
-
- def _stop
- Tk.after_cancel(@after_id) rescue nil
- end
-
- def _exit
- _stop
- $knightstour.destroy
- end
-
- def set_delay(new)
- @delay.numeric = new.to_i
- end
-
- def drag_start(w, x, y)
- w.dtag('selected')
- w.addtag('selected', :withtag, 'current')
- @dragging = [x, y]
- end
-
- def drag_motion(w, x, y)
- return unless @dragging
- w.move('selected', x - @dragging[0], y - @dragging[1])
- @dragging = [x, y]
- end
-
- def drag_end(w, x, y)
- square = w.find_closest(x, y, 0, 65)
- w.coords('selected', w.coords(square)[0..1])
- w.dtag('selected')
- @dragging = nil
- end
-
- def make_SeeDismiss
- ## See Code / Dismiss
- frame = Ttk::Frame.new($knightstour)
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'knightstour'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $knightstour.destroy
- $knightstour = nil
- }),
- :padx=>4, :pady=>4)
- frame.grid_columnconfigure(0, :weight=>1)
- frame
- end
-
- def create_gui(parent = nil)
- $knightstour.destroy rescue nil
- $knightstour = Tk::Toplevel.new(parent, :title=>"Knight's tour")
- $knightstour.withdraw
- base_f = Ttk::Frame.new($knightstour)
- @board = Tk::Canvas.new(base_f, :width=>240, :height=>240)
- @log = Tk::Text.new(base_f, :width=>12, :height=>1,
- :font=>'Arial 8', :background=>'white')
- scr = @log.yscrollbar(Ttk::Scrollbar.new(base_f))
-
- @visited = []
- @delay = TkVariable.new(600)
- @continuous = TkVariable.new(false)
-
- tool_f = Ttk::Frame.new($knightstour)
- label = Ttk::Label.new(tool_f, :text=>'Speed')
- scale = Ttk::Scale.new(tool_f, :from=>8, :to=>2000, :variable=>@delay,
- :command=>proc{|n| set_delay(n)})
- check = Ttk::Checkbutton.new(tool_f, :text=>'Repeat',
- :variable=>@continuous)
- @start_btn = Ttk::Button.new(tool_f, :text=>'Start',
- :command=>proc{tour()})
- @exit_btn = Ttk::Button.new(tool_f, :text=>'Exit',
- :command=>proc{_exit()})
-
- 7.downto(0){|row|
- 0.upto(7){|col|
- if ((col & 1) ^ (row & 1)).zero?
- fill = 'bisque'
- dfill = 'bisque3'
- else
- fill = 'tan3'
- dfill = 'tan4'
- end
- coords = [col * 30 + 4, row * 30 + 4, col * 30 + 30, row * 30 + 30]
- @board.create(TkcRectangle, coords,
- :fill=>fill, :disabledfill=>dfill,
- :width=>2, :state=>:disabled)
- }
- }
-
- @knight_font = TkFont.new(:size=>-24)
- @knight = TkcText.new(@board, 0, 0, :font=>@knight_font,
- :text=>Tk::UTF8_String.new('\u265e'),
- :anchor=>'nw', # :tags=>'knight',
- :fill=>'black', :activefill=>'#600000')
- @knight.coords(@board.coords(rand(64)+1)[0..1])
- @knight.bind('ButtonPress-1', '%W %x %y'){|w,x,y| drag_start(w,x,y)}
- @knight.bind('Motion', '%W %x %y'){|w,x,y| drag_motion(w,x,y)}
- @knight.bind('ButtonRelease-1', '%W %x %y'){|w,x,y| drag_end(w,x,y)}
-
- Tk.grid(@board, @log, scr, :sticky=>'news')
- base_f.grid_rowconfigure(0, :weight=>1)
- base_f.grid_columnconfigure(0, :weight=>1)
-
- Tk.grid(base_f, '-', '-', '-', '-', '-', :sticky=>'news')
- widgets = [label, scale, check, @start_btn]
- sg = nil
- unless $RubyTk_WidgetDemo
- widgets << @exit_btn
- if Tk.windowingsystem != 'aqua'
- #widgets.unshift(Ttk::SizeGrip.new(tool_f))
- Ttk::SizeGrip.new(tool_f).pack(:side=>:right, :anchor=>'se')
- end
- end
- Tk.pack(widgets, :side=>:right)
- if Tk.windowingsystem == 'aqua'
- TkPack.configure(widgets, :padx=>[4, 4], :pady=>[12, 12])
- TkPack.configure(widgets[0], :padx=>[4, 24])
- TkPack.configure(widgets[-1], :padx=>[16, 4])
- end
-
- Tk.grid(tool_f, '-', '-', '-', '-', '-', :sticky=>'ew')
-
- if $RubyTk_WidgetDemo
- Tk.grid(make_SeeDismiss(), '-', '-', '-', '-', '-', :sticky=>'ew')
- end
-
- $knightstour.grid_rowconfigure(0, :weight=>1)
- $knightstour.grid_columnconfigure(0, :weight=>1)
-
- $knightstour.bind('Control-F2'){TkConsole.show}
- $knightstour.bind('Return'){@start_btn.invoke}
- $knightstour.bind('Escape'){@exit_btn.invoke}
- $knightstour.bind('Destroy'){ _stop }
- $knightstour.protocol('WM_DELETE_WINDOW'){ _exit }
-
- $knightstour.deiconify
- $knightstour.tkwait_destroy
- end
-
- def initialize(parent = nil)
- create_gui(parent)
- end
-end
-
-Tk.root.withdraw unless $RubyTk_WidgetDemo
-Thread.new{Tk.mainloop} if __FILE__ == $0
-Knights_Tour.new
diff --git a/ext/tk/sample/demos-en/label.rb b/ext/tk/sample/demos-en/label.rb
deleted file mode 100644
index d9cfd92364..0000000000
--- a/ext/tk/sample/demos-en/label.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# frozen_string_literal: false
-# label.rb
-#
-# This demonstration script creates a toplevel window containing
-# several label widgets.
-#
-# label widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($label_demo) && $label_demo
- $label_demo.destroy
- $label_demo = nil
-end
-
-# demo toplevel widget
-$label_demo = TkToplevel.new {|w|
- title("Label Demonstration")
- iconname("label")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($label_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "Five labels are displayed below: three textual ones on the left, and a bitmap label and a text label on the right. Labels are pretty boring because you can't do anything with them."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $label_demo
- $label_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'See Code'
- command proc{showCode 'label'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# label demo
-f_left = TkFrame.new(base_frame)
-f_right = TkFrame.new(base_frame)
-[f_left, f_right].each{|w| w.pack('side'=>'left', 'expand'=>'yes',
- 'padx'=>10, 'pady'=>10, 'fill'=>'both')}
-
-# label
-[ TkLabel.new(f_left, 'text'=>'First label'),
- TkLabel.new(f_left, 'text'=>'Second label, raised',
- 'relief'=>'raised'),
- TkLabel.new(f_left, 'text'=>'Third label, sunken', 'relief'=>'sunken')
-].each{|w| w.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'anchor'=>'w')}
-
-# TkLabel.new(f_right) {
-Tk::Label.new(f_right) {
- bitmap('@' + [$demo_dir,'..','images','face.xbm'].join(File::Separator))
- borderwidth 2
- relief 'sunken'
-}.pack('side'=>'top')
-
-TkLabel.new(f_right) { text 'Tcl/Tk Proprietor' }.pack('side'=>'top')
-
diff --git a/ext/tk/sample/demos-en/labelframe.rb b/ext/tk/sample/demos-en/labelframe.rb
deleted file mode 100644
index bd2d8f335e..0000000000
--- a/ext/tk/sample/demos-en/labelframe.rb
+++ /dev/null
@@ -1,96 +0,0 @@
-# frozen_string_literal: false
-# labelframe.rb
-#
-# This demonstration script creates a toplevel window containing
-# several labelframe widgets.
-#
-# based on "Id: labelframe.tcl,v 1.2 2001/10/30 11:21:50 dkf Exp"
-
-
-if defined?($labelframe_demo) && $labelframe_demo
- $labelframe_demo.destroy
- $labelframe_demo = nil
-end
-
-$labelframe_demo = TkToplevel.new {|w|
- title("Labelframe Demonstration")
- iconname("labelframe")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($labelframe_demo).pack(:fill=>:both, :expand=>true)
-
-# Some information
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-Labelframes are used to group related widgets together. \
-The label may be either plain text or another widget. \
-If your Tk library linked to Ruby doesn't include a 'labelframe' widget, \
-this demo doesn't work. Please use later version of Tk \
-which supports a 'labelframe' widget.
-EOL
-
-# The bottom buttons
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $labelframe_demo.destroy
- $labelframe_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'labelframe'
- }).pack(:side=>:left, :expand=>true)
-}
-
-# Demo area
-w = TkFrame.new(base_frame).pack(:side=>:bottom, :fill=>:both,
- :expand=>true)
-
-# A group of radiobuttons in a labelframe
-TkLabelFrame.new(w, :text=>'Value',
- :padx=>2, :pady=>2) {|f|
- grid(:row=>0, :column=>0, :pady=>'2m', :padx=>'2m')
-
- v = TkVariable.new
- (1..4).each{|i|
- TkRadiobutton.new(f, :text=>"This is value #{i}",
- :variable=>v, :value=>i) {
- pack(:side=>:top, :fill=>:x, :pady=>2)
- }
- }
-}
-
-
-# Using a label window to control a group of options.
-$lfdummy = TkVariable.new(0)
-
-def lfEnableButtons(w)
- TkWinfo.children(w).each{|child|
- next if child.path =~ /\.cb$/
- if $lfdummy == 1
- child.state(:normal)
- else
- child.state(:disabled)
- end
- }
-end
-
-TkLabelFrame.new(w, :pady=>2, :padx=>2){|f|
- TkCheckButton.new(f, :widgetname=>'cb', :variable=>$lfdummy,
- :text=>"Use this option.", :padx=>0) {|cb|
- command proc{lfEnableButtons(f)}
- f.labelwidget(cb)
- }
- grid(:row=>0, :column=>1, :pady=>'2m', :padx=>'2m')
-
- %w(Option1 Option2 Option3).each{|str|
- TkCheckbutton.new(f, :text=>str).pack(:side=>:top, :fill=>:x, :pady=>2)
- }
-
- lfEnableButtons(f)
-}
-
-TkGrid.columnconfigure(w, [0,1], :weight=>1)
diff --git a/ext/tk/sample/demos-en/mclist.rb b/ext/tk/sample/demos-en/mclist.rb
deleted file mode 100644
index 61ebff1805..0000000000
--- a/ext/tk/sample/demos-en/mclist.rb
+++ /dev/null
@@ -1,118 +0,0 @@
-# frozen_string_literal: false
-# mclist.rb --
-#
-# This demonstration script creates a toplevel window containing a Ttk
-# tree widget configured as a multi-column listbox.
-#
-# based on "Id: mclist.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($mclist_demo) && $mclist_demo
- $mclist_demo.destroy
- $mclist_demo = nil
-end
-
-$mclist_demo = TkToplevel.new {|w|
- title("Multi-Column List")
- iconname("mclist")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($mclist_demo).pack(:fill=>:both, :expand=>true)
-
-## Explanatory text
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i',
- :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6],
- :text=><<EOL).pack(:fill=>:x)
-Ttk is the new Tk themed widget set. \
-One of the widgets it includes is a tree widget, \
-which can be configured to display multiple columns of informational data \
-without displaying the tree itself. \
-This is a simple way to build a listbox that has multiple columns. \
-Clicking on the heading for a column will sort the data by that column. \
-You can also change the width of the columns \
-by dragging the boundary between them.
-EOL
-
-## See Code / Dismiss
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'mclist'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $mclist_demo.destroy
- $mclist_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-container = Ttk::Frame.new(base_frame)
-tree = Ttk::Treeview.new(base_frame, :columns=>%w(country capital currency),
- :show=>:headings)
-if Tk.windowingsystem != 'aqua'
- vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame))
- hsb = tree.xscrollbar(Ttk::Scrollbar.new(base_frame))
-else
- vsb = tree.yscrollbar(Tk::Scrollbar.new(base_frame))
- hsb = tree.xscrollbar(Tk::Scrollbar.new(base_frame))
-end
-
-container.pack(:fill=>:both, :expand=>true)
-Tk.grid(tree, vsb, :in=>container, :sticky=>'nsew')
-Tk.grid(hsb, :in=>container, :sticky=>'nsew')
-container.grid_columnconfigure(0, :weight=>1)
-container.grid_rowconfigure(0, :weight=>1)
-
-## The data we're going to insert
-data = [
- ['Argentina', 'Buenos Aires', 'ARS'],
- ['Australia', 'Canberra', 'AUD'],
- ['Brazil', 'Brazilia', 'BRL'],
- ['Canada', 'Ottawa', 'CAD'],
- ['China', 'Beijing', 'CNY'],
- ['France', 'Paris', 'EUR'],
- ['Germany', 'Berlin', 'EUR'],
- ['India', 'New Delhi', 'INR'],
- ['Italy', 'Rome', 'EUR'],
- ['Japan', 'Tokyo', 'JPY'],
- ['Mexico', 'Mexico City', 'MXN'],
- ['Russia', 'Moscow', 'RUB'],
- ['South Africa', 'Pretoria', 'ZAR'],
- ['United Kingdom', 'London', 'GBP'],
- ['United States', 'Washington, D.C.', 'USD'],
-]
-
-## Code to insert the data nicely
-font = Ttk::Style.lookup(tree[:style], :font)
-cols = %w(country capital currency)
-cols.zip(%w(Country Capital Currency)).each{|col, name|
- tree.heading_configure(col, :text=>name,
- :command=>proc{sort_by(tree, col, false)})
- tree.column_configure(col, :width=>TkFont.measure(font, name))
-}
-
-data.each{|country, capital, currency|
- #tree.insert('', :end, :values=>[country, capital, currency])
- tree.insert(nil, :end, :values=>[country, capital, currency])
- cols.zip([country, capital, currency]).each{|col, val|
- len = TkFont.measure(font, "#{val} ")
- if tree.column_cget(col, :width) < len
- tree.column_configure(col, :width=>len)
- end
- }
-}
-
-## Code to do the sorting of the tree contents when clicked on
-def sort_by(tree, col, direction)
- tree.children(nil).map!{|row| [tree.get(row, col), row.id]} .
- sort(&((direction)? proc{|x, y| y <=> x}: proc{|x, y| x <=> y})) .
- each_with_index{|info, idx| tree.move(info[1], nil, idx)}
-
- tree.heading_configure(col, :command=>proc{sort_by(tree, col, ! direction)})
-end
diff --git a/ext/tk/sample/demos-en/menu.rb b/ext/tk/sample/demos-en/menu.rb
deleted file mode 100644
index db0541c608..0000000000
--- a/ext/tk/sample/demos-en/menu.rb
+++ /dev/null
@@ -1,197 +0,0 @@
-# frozen_string_literal: false
-#
-# menus widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($menu_demo) && $menu_demo
- $menu_demo.destroy
- $menu_demo = nil
-end
-
-# demo toplevel widget
-$menu_demo = TkToplevel.new {|w|
- title("File Selection Dialogs")
- iconname("menu")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($menu_demo).pack(:fill=>:both, :expand=>true)
-
-# menu frame
-$menu_frame = TkFrame.new(base_frame, 'relief'=>'raised', 'bd'=>2)
-$menu_frame.pack('side'=>'top', 'fill'=>'x')
-
-begin
- windowingsystem = Tk.windowingsystem()
-rescue
- windowingsystem = ""
-end
-
-# label
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
- if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem == "classic" || windowingsystem == "aqua"
- text("This window contains a menubar with cascaded menus. You can invoke entries with an accelerator by typing Command+x, where \"x\" is the character next to the command key symbol. The rightmost menu can be torn off into a palette by dragging outside of its bounds and releasing the mouse.")
- else
- text("This window contains a menubar with cascaded menus. You can post a menu from the keyboard by typing Alt+x, where \"x\" is the character underlined on the menu. You can then traverse among the menus using the arrow keys. When a menu is posted, you can invoke the current entry by typing space, or you can invoke any entry by typing its underlined character. If a menu entry has an accelerator, you can invoke the entry without posting the menu just by typing the accelerator. The rightmost menu can be torn off into a palette by selecting the first item in the menu.")
- end
-}.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $menu_demo
- $menu_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'menu'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# menu
-TkMenubutton.new($menu_frame, 'text'=>'File', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|file_menu|
- m.configure('menu'=>file_menu)
- add('command', 'label'=>'Open...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Open..." entry'})
- add('command', 'label'=>'New', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "New" entry'})
- add('command', 'label'=>'Save', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Save" entry'})
- add('command', 'label'=>'Save As...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Save As..." entry'})
- add('separator')
- add('command', 'label'=>'Print Setup...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Print Setup..." entry'})
- add('command', 'label'=>'Print...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Print..." entry'})
- add('separator')
- add('command', 'label'=>'Dismiss Menus Demo', 'command'=>proc{$menu_demo.destroy})
- }
-}
-
-if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem == "classic" || windowingsystem == "aqua"
- modifier = 'Command'
-elsif $tk_platform['platform'] == 'windows'
- modifier = 'Control'
-else
- modifier = 'Meta'
-end
-
-TkMenubutton.new($menu_frame, 'text'=>'Basic', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|basic_menu|
- m.configure('menu'=>basic_menu)
- add('command', 'label'=>'Long entry that does nothing')
- ['A','B','C','D','E','F','G'].each{|c|
- add('command', 'label'=>"Print letter \"#{c}\"",
- 'underline'=>14,
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
- $menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
- }
- }
-}
-
-TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|cascade_menu|
- m.configure('menu'=>cascade_menu)
- add('command', 'label'=>'Print hello',
- 'command'=>proc{print "Hello\n"},
- 'accelerator'=>"#{modifier}+H", 'underline'=>6)
- $menu_demo.bind("#{modifier}-h", proc{print "Hello\n"})
- add('command', 'label'=>'Print goodbye',
- 'command'=>proc{print "Goodbye\n"},
- 'accelerator'=>"#{modifier}+G", 'underline'=>6)
- $menu_demo.bind("#{modifier}-g", proc{print "Goodbye\n"})
-
- TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_check|
- cascade_menu.add('cascade', 'label'=>'Check buttons',
- 'menu'=>cascade_check, 'underline'=>0)
- oil = TkVariable.new(0)
- add('check', 'label'=>'Oil checked', 'variable'=>oil)
- trans = TkVariable.new(0)
- add('check', 'label'=>'Transmission checked', 'variable'=>trans)
- brakes = TkVariable.new(0)
- add('check', 'label'=>'Brakes checked', 'variable'=>brakes)
- lights = TkVariable.new(0)
- add('check', 'label'=>'Lights checked', 'variable'=>lights)
- add('separator')
- add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu_demo,
- ['oil', oil],
- ['trans', trans],
- ['brakes', brakes],
- ['lights', lights])} )
- invoke 1
- invoke 3
- }
-
- TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_radio|
- cascade_menu.add('cascade', 'label'=>'Radio buttons',
- 'menu'=>cascade_radio, 'underline'=>0)
- pointSize = TkVariable.new
- add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10)
- add('radio', 'label'=>'14 point', 'variable'=>pointSize, 'value'=>14)
- add('radio', 'label'=>'18 point', 'variable'=>pointSize, 'value'=>18)
- add('radio', 'label'=>'24 point', 'variable'=>pointSize, 'value'=>24)
- add('radio', 'label'=>'32 point', 'variable'=>pointSize, 'value'=>32)
- add('separator')
- style = TkVariable.new
- add('radio', 'label'=>'Roman', 'variable'=>style, 'value'=>'roman')
- add('radio', 'label'=>'Bold', 'variable'=>style, 'value'=>'bold')
- add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic')
- add('separator')
- add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu_demo,
- ['pointSize', pointSize],
- ['style', style])} )
- invoke 1
- invoke 7
- }
- }
-}
-
-TkMenubutton.new($menu_frame, 'text'=>'Icons', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|icon_menu|
- m.configure('menu'=>icon_menu)
- add('command',
- 'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'Dismiss')} )
- ['info', 'questhead', 'error'].each{|icon|
- add('command', 'bitmap'=>icon,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
- }
- }
-}
-
-TkMenubutton.new($menu_frame, 'text'=>'More', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|more_menu|
- m.configure('menu'=>more_menu)
- [ 'An entry','Another entry','Does nothing','Does almost nothing',
- 'Make life meaningful' ].each{|i|
- add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
- }
- }
-}
-
-TkMenubutton.new($menu_frame, 'text'=>'Colors', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m) {|colors_menu|
- m.configure('menu'=>colors_menu)
- ['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
- add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
- }
- }
-}
diff --git a/ext/tk/sample/demos-en/menu84.rb b/ext/tk/sample/demos-en/menu84.rb
deleted file mode 100644
index 714fb3c553..0000000000
--- a/ext/tk/sample/demos-en/menu84.rb
+++ /dev/null
@@ -1,216 +0,0 @@
-# frozen_string_literal: false
-#
-# menus widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($menu84_demo) && $menu84_demo
- $menu84_demo.destroy
- $menu84_demo = nil
-end
-
-# demo toplevel widget
-$menu84_demo = TkToplevel.new {|w|
- title("File Selection Dialogs")
- iconname("menu84")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($menu84_demo).pack(:fill=>:both, :expand=>true)
-
-begin
- windowingsystem = Tk.windowingsystem()
-rescue
- windowingsystem = ""
-end
-
-# label
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
- if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem == "classic" || windowingsystem == "aqua"
- text("This window contains a menubar with cascaded menus. You can invoke entries with an accelerator by typing Command+x, where \"x\" is the character next to the command key symbol. The rightmost menu can be torn off into a palette by dragging outside of its bounds and releasing the mouse.")
- else
- text("This window contains a menubar with cascaded menus. You can post a menu from the keyboard by typing Alt+x, where \"x\" is the character underlined on the menu. You can then traverse among the menus using the arrow keys. When a menu is posted, you can invoke the current entry by typing space, or you can invoke any entry by typing its underlined character. If a menu entry has an accelerator, you can invoke the entry without posting the menu just by typing the accelerator. The rightmost menu can be torn off into a palette by selecting the first item in the menu.")
- end
-}.pack('side'=>'top')
-
-
-menustatus = TkVariable.new(" ")
-TkFrame.new(base_frame) {|frame|
- TkLabel.new(frame, 'textvariable'=>menustatus, 'relief'=>'sunken',
- 'bd'=>1, 'font'=>['Helvetica', '10'],
- 'anchor'=>'w').pack('side'=>'left', 'padx'=>2,
- 'expand'=>true, 'fill'=>'both')
- pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
-}
-
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $menu84_demo
- $menu84_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'menu84'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-
-# create menu frame
-$menu84_frame = TkMenu.new($menu84_demo, 'tearoff'=>false)
-
-# menu
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'File', 'menu'=>m, 'underline'=>0)
- add('command', 'label'=>'Open...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Open..." entry'})
- add('command', 'label'=>'New', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "New" entry'})
- add('command', 'label'=>'Save', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Save" entry'})
- add('command', 'label'=>'Save As...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Save As..." entry'})
- add('separator')
- add('command', 'label'=>'Print Setup...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Print Setup..." entry'})
- add('command', 'label'=>'Print...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Print..." entry'})
- add('separator')
- add('command', 'label'=>'Dismiss Menus Demo', 'command'=>proc{$menu84_demo.destroy})
-}
-
-if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem = "classic" || windowingsystem = "aqua"
- modifier = 'Command'
-elsif $tk_platform['platform'] == 'windows'
- modifier = 'Control'
-else
- modifier = 'Meta'
-end
-
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'Basic', 'menu'=>m, 'underline'=>0)
- add('command', 'label'=>'Long entry that does nothing')
- ['A','B','C','D','E','F','G'].each{|c|
- add('command', 'label'=>"Print letter \"#{c}\"",
- 'underline'=>14,
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
- $menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
- }
-}
-
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'Cascades', 'menu'=>m, 'underline'=>0)
- add('command', 'label'=>'Print hello',
- 'command'=>proc{print "Hello\n"},
- 'accelerator'=>"#{modifier}+H", 'underline'=>6)
- $menu84_demo.bind("#{modifier}-h", proc{print "Hello\n"})
- add('command', 'label'=>'Print goodbye',
- 'command'=>proc{print "Goodbye\n"},
- 'accelerator'=>"#{modifier}+G", 'underline'=>6)
- $menu84_demo.bind("#{modifier}-g", proc{print "Goodbye\n"})
-
- TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
- m.add('cascade', 'label'=>'Check buttons',
- 'menu'=>cascade_check, 'underline'=>0)
- oil = TkVariable.new(0)
- add('check', 'label'=>'Oil checked', 'variable'=>oil)
- trans = TkVariable.new(0)
- add('check', 'label'=>'Transmission checked', 'variable'=>trans)
- brakes = TkVariable.new(0)
- add('check', 'label'=>'Brakes checked', 'variable'=>brakes)
- lights = TkVariable.new(0)
- add('check', 'label'=>'Lights checked', 'variable'=>lights)
- add('separator')
- add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu84_demo,
- ['oil', oil],
- ['trans', trans],
- ['brakes', brakes],
- ['lights', lights])} )
- invoke 1
- invoke 3
- }
-
- TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
- m.add('cascade', 'label'=>'Radio buttons',
- 'menu'=>cascade_radio, 'underline'=>0)
- pointSize = TkVariable.new
- add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10)
- add('radio', 'label'=>'14 point', 'variable'=>pointSize, 'value'=>14)
- add('radio', 'label'=>'18 point', 'variable'=>pointSize, 'value'=>18)
- add('radio', 'label'=>'24 point', 'variable'=>pointSize, 'value'=>24)
- add('radio', 'label'=>'32 point', 'variable'=>pointSize, 'value'=>32)
- add('separator')
- style = TkVariable.new
- add('radio', 'label'=>'Roman', 'variable'=>style, 'value'=>'roman')
- add('radio', 'label'=>'Bold', 'variable'=>style, 'value'=>'bold')
- add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic')
- add('separator')
- add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu84_demo,
- ['pointSize', pointSize],
- ['style', style])} )
- invoke 1
- invoke 7
- }
-}
-
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'Icons', 'menu'=>m, 'underline'=>0)
- add('command', 'hidemargin'=>1,
- 'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'Dismiss')} )
- ['info', 'questhead', 'error'].each{|icon|
- add('command', 'bitmap'=>icon, 'hidemargin'=>1,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
- }
-
- entryconfigure(2, :columnbreak=>true)
-}
-
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'More', 'menu'=>m, 'underline'=>0)
- [ 'An entry','Another entry','Does nothing','Does almost nothing',
- 'Make life meaningful' ].each{|i|
- add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
- }
-
- m.entryconfigure('Does almost nothing',
- 'bitmap'=>'questhead', 'compound'=>'left',
- 'command'=>proc{
- TkDialog.new('title'=>'Compound Menu Entry',
- 'message'=>'The menu entry you invoked'+
- 'displays both a bitmap and '+
- 'a text string. Other than '+
- 'this, it is just like any '+
- 'other menu entry.',
- 'buttons'=>['OK'], 'bitmap'=>'')
- })
-}
-
-TkMenu.new($menu84_frame) {|m|
- $menu84_frame.add('cascade', 'label'=>'Colors', 'menu'=>m, 'underline'=>0)
- ['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
- add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
- }
-}
-
-$menu84_demo.menu($menu84_frame)
-
-TkMenu.bind('<MenuSelect>', proc{|w|
- begin
- label = w.entrycget('active', 'label')
- rescue
- label = " "
- end
- menustatus.value = label
- Tk.update(true)
- }, '%W')
diff --git a/ext/tk/sample/demos-en/menubu.rb b/ext/tk/sample/demos-en/menubu.rb
deleted file mode 100644
index 9ff683d09c..0000000000
--- a/ext/tk/sample/demos-en/menubu.rb
+++ /dev/null
@@ -1,238 +0,0 @@
-# frozen_string_literal: false
-# menubutton.rb
-#
-# This demonstration script creates a window with a bunch of menus
-# and cascaded menus using menubuttons.
-
-require "tkcanvas"
-
-def optionMenu(menubutton, varName, firstValue, *rest)
- varName.value = firstValue
- configoptions = {'textvariable'=>varName,'indicatoron'=>'on',
- 'relief'=>'raised','borderwidth'=>2,'highlightthickness'=>2,
- 'anchor'=>'c','direction'=>'flush'}
- configoptions.each {|key, value|
- menubutton.configure(key, value)
- }
- menu = TkMenu.new(menubutton) {
- tearoff 'off'
- add 'radio', 'label'=>firstValue, 'variable'=>varName
- }
- menubutton.menu(menu)
- for i in rest
- menu.add 'radio', 'label'=>i, 'variable'=>varName
- end
-
- return menu
-end
-
-if defined?($menubu_demo) && $menubu_demo
- $menubu_demo.destroy
- $menubu_demo = nil
-end
-
-$menubu_demo = TkToplevel.new {|w|
- title("Menu Button Demonstration")
- iconname("menubutton")
-}
-
-positionWindow($menubu_demo)
-
-base_frame = TkFrame.new($menubu_demo).pack(:fill=>:both, :expand=>true)
-
-# version check
-if $tk_version.to_f < 8.0
-
-# label
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
- text("This is a demonstration of menubuttons. The \"Below\" menubutton pops its menu below the button; the \"Right\" button pops to the right, etc. There are two option menus directly below this text; one is just a standard menu and the other is a 16-color palette.")
-}.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $menubu_demo
- $menubu_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'menubu'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-else ; # Tk8.x
-
-body = TkFrame.new(base_frame)
-body.pack('expand'=>'yes', 'fill'=>'both')
-
-below = TkMenubutton.new(body) {
- text "Below"
- underline 0
- direction 'below'
- relief 'raised'
-}
-belowMenu = TkMenu.new(below) {
- tearoff 0
- add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""}
- add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""}
-}
-below.menu(belowMenu)
-below.grid('row'=>0, 'column'=>1, 'sticky'=>'n')
-
-below = TkMenubutton.new(body) {
- text "Below"
- underline 0
- direction 'below'
- relief 'raised'
-}
-belowMenu = TkMenu.new(below) {
- tearoff 0
- add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""}
- add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""}
-}
-below.menu(belowMenu)
-below.grid('row'=>0, 'column'=>1, 'sticky'=>'n')
-
-below = TkMenubutton.new(body) {
- text "Below"
- underline 0
- direction 'below'
- relief 'raised'
-}
-belowMenu = TkMenu.new(below) {
- tearoff 0
- add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""}
- add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""}
-}
-below.menu(belowMenu)
-below.grid('row'=>0, 'column'=>1, 'sticky'=>'n')
-
-right = TkMenubutton.new(body) {
- text "Right"
- underline 0
- direction 'right'
- relief 'raised'
-}
-rightMenu = TkMenu.new(right) {
- tearoff 0
- add 'command', 'label'=>"Right menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Left menu.\""}
- add 'command', 'label'=>"Right menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Right menu.\""}
-}
-right.menu(rightMenu)
-right.grid('row'=>1, 'column'=>0, 'sticky'=>'w')
-
-left = TkMenubutton.new(body) {
- text "Left"
- underline 0
- direction 'left'
- relief 'raised'
-}
-leftMenu = TkMenu.new(left) {
- tearoff 0
- add 'command', 'label'=>"Left menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Left menu.\""}
- add 'command', 'label'=>"Left menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Left menu.\""}
-}
-left.menu(leftMenu)
-left.grid('row'=>1, 'column'=>2, 'sticky'=>'e')
-
-center = TkFrame.new(body) {
- grid('row'=>1, 'column'=>1, 'sticky'=>'news')
-}
-
-above = TkMenubutton.new(body) {
- text "Above"
- underline 0
- direction 'above'
- relief 'raised'
-}
-aboveMenu = TkMenu.new(above) {
- tearoff 0
- add 'command', 'label'=>"Above menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Above menu.\""}
- add 'command', 'label'=>"Above menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Above menu.\""}
-}
-above.menu(aboveMenu)
-above.grid('row'=>2, 'column'=>1, 'sticky'=>'s')
-
-center = TkFrame.new(body) {
- grid('row'=>1, 'column'=>1, 'sticky'=>'news')
-}
-
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc {
- tmppath = $menubu_demo
- $menubu_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc { showCode 'menubu' }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'expand'=>'yes', 'fill'=>'x', 'pady'=>'2m')
-
-msg = TkLabel.new(center) {
-# font $font
- wraplength '4i'
- justify 'left'
- text "This is a demonstration of menubuttons. The \"Below\" menubutton pops its menu below the button; the \"Right\" button pops to the right, etc. There are two option menus directly below this text; one is just a standard menu and the other is a 16-color palette."
-}
-msg.pack('side'=>'top', 'padx'=>25, 'pady'=>25)
-
-TkFrame.new(center) {|f|
- menubuttonoptions = TkVariable.new
- mbutton = TkMenubutton.new(f)
- options = optionMenu(mbutton, menubuttonoptions,
- 'one', 'two', 'three')
- mbutton.pack('side'=>'left', 'padx'=>25, 'pady'=>25)
- paletteColor = TkVariable.new
- colors = ['Black','red4','DarkGreen','NavyBlue', 'gray75',
- 'Red','Green','Blue','gray50','Yellow','Cyan','Magenta',
- 'White','Brown','DarkSeaGreen','DarkViolet']
- colorMenuButton = TkMenubutton.new(f)
- m = optionMenu(colorMenuButton, paletteColor, *colors)
- begin
- windowingsystem = Tk.windowingsystem()
- rescue
- windowingsystem = ""
- end
- if windowingsystem == "classic" || windowingsystem == "aqua"
- topBorderColor = 'Black'
- bottomBorderColor = 'Black'
- else
- topBorderColor = 'gray50'
- bottomBorderColor = 'gray75'
- end
- for i in 0..15
- image = TkPhotoImage.new('height'=>16, 'width'=>16)
- image.put(topBorderColor, 0, 0, 16, 1)
- image.put(topBorderColor, 0, 1, 1, 16)
- image.put(bottomBorderColor, 0, 15, 16, 16)
- image.put(bottomBorderColor, 15, 1, 16, 16)
- image.put(colors[i], 1, 1, 15, 15)
-
- selectimage = TkPhotoImage.new('height'=>16, 'width'=>16)
- selectimage.put('Black', 0, 0, 16, 2)
- selectimage.put('Black', 0, 2, 2, 16)
- selectimage.put('Black', 2, 14, 16, 16)
- selectimage.put('Black', 14, 2, 16, 14)
- selectimage.put(colors[i], 2, 2, 14, 14)
-
- m.entryconfigure(i, 'image'=>image, 'selectimage'=>selectimage, 'hidemargin'=>'on')
- end
- m.configure('tearoff', 'on')
- for c in ['Black', 'gray75', 'gray50', 'White']
- m.entryconfigure(c, 'columnbreak'=>1)
- end
- colorMenuButton.pack('side'=>'left', 'padx'=>25, 'pady'=>25)
- pack 'padx'=>25, 'pady'=>25
-}
-
-end ; # Tk8.x
diff --git a/ext/tk/sample/demos-en/msgbox.rb b/ext/tk/sample/demos-en/msgbox.rb
deleted file mode 100644
index 9a5ff51b4b..0000000000
--- a/ext/tk/sample/demos-en/msgbox.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-# frozen_string_literal: false
-# msgbox.rb
-#
-# This demonstration script creates message boxes of various type
-#
-# message boxes widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($msgbox_demo) && $msgbox_demo
- $msgbox_demo.destroy
- $msgbox_demo = nil
-end
-
-# demo toplevel widget
-$msgbox_demo = TkToplevel.new {|w|
- title("Message Box Demonstration")
- iconname("messagebox")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($msgbox_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"Choose the icon and type option of the message box. Then press the \"Message Box\" button to see the message box.").pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $msgbox_demo
- $msgbox_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'msgbox'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Message Box'
- command proc{showMessageBox $msgbox_demo}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-$msgbox_leftframe = TkFrame.new(base_frame)
-$msgbox_rightframe = TkFrame.new(base_frame)
-$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
-$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
-
-TkLabel.new($msgbox_leftframe, 'text'=>'Icon').pack('side'=>'top')
-TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
-.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
-
-$msgboxIcon = TkVariable.new('info')
-['error', 'info', 'question', 'warning'].each {|icon|
- TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon,
- 'relief'=>'flat', 'value'=>icon, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
-}
-
-TkLabel.new($msgbox_rightframe, 'text'=>'Type').pack('side'=>'top')
-TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
-.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
-
-$msgboxType = TkVariable.new('ok')
-['abortretryignore', 'ok', 'okcancel',
- 'retrycancel', 'yesno', 'yesnocancel'].each {|type|
- TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType,
- 'relief'=>'flat', 'value'=>type, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
-}
-
-def showMessageBox(w)
- button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
- 'title'=>'Message', 'parent'=>w,
- 'message'=>"This is a \"#{$msgboxType.value}\" type messagebox with the \"#{$msgboxIcon.value}\" icon")
-
- Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
- 'message'=>"You have selected \"#{button}\"")
-end
-
diff --git a/ext/tk/sample/demos-en/msgbox2.rb b/ext/tk/sample/demos-en/msgbox2.rb
deleted file mode 100644
index 0eb35c486d..0000000000
--- a/ext/tk/sample/demos-en/msgbox2.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-# frozen_string_literal: false
-# msgbox2.rb
-#
-# This demonstration script creates message boxes of various type
-#
-# message boxes widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($msgbox2_demo) && $msgbox2_demo
- $msgbox2_demo.destroy
- $msgbox2_demo = nil
-end
-
-# demo toplevel widget
-$msgbox2_demo = TkToplevel.new {|w|
- title("Message Box Demonstration")
- iconname("messagebox")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($msgbox2_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"Choose the icon and type option of the message box. Then press the \"Message Box\" button to see the message box with both of a message and a detail.").pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $msgbox2_demo
- $msgbox2_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'msgbox2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Message Box'
- command proc{showMessageBox2 $msgbox2_demo}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-$msgbox_leftframe = TkFrame.new(base_frame)
-$msgbox_rightframe = TkFrame.new(base_frame)
-$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
-$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
-
-TkLabel.new($msgbox_leftframe, 'text'=>'Icon').pack('side'=>'top')
-TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
-.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
-
-$msgboxIcon = TkVariable.new('info')
-['error', 'info', 'question', 'warning'].each {|icon|
- TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon,
- 'relief'=>'flat', 'value'=>icon, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
-}
-
-TkLabel.new($msgbox_rightframe, 'text'=>'Type').pack('side'=>'top')
-TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
-.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
-
-$msgboxType = TkVariable.new('ok')
-['abortretryignore', 'ok', 'okcancel',
- 'retrycancel', 'yesno', 'yesnocancel'].each {|type|
- TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType,
- 'relief'=>'flat', 'value'=>type, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
-}
-
-def showMessageBox2(w)
- button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
- 'title'=>'Message', 'parent'=>w,
- 'message'=>"\"#{$msgboxType.value}\" Type MessageBox",
- 'detail'=>"This is a \"#{$msgboxType.value}\" type messagebox with the \"#{$msgboxIcon.value}\" icon. Please click one of the following button.")
-
- Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
- 'message'=>"You have selected \"#{button}\"")
-end
-
diff --git a/ext/tk/sample/demos-en/paned1.rb b/ext/tk/sample/demos-en/paned1.rb
deleted file mode 100644
index c14562a962..0000000000
--- a/ext/tk/sample/demos-en/paned1.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: false
-# paned1.rb
-#
-# This demonstration script creates a toplevel window containing
-# a paned window that separates two windows horizontally.
-#
-# based on "Id: paned1.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp"
-
-if defined?($paned1_demo) && $paned1_demo
- $paned1_demo.destroy
- $paned1_demo = nil
-end
-
-$paned1_demo = TkToplevel.new {|w|
- title("Horizontal Paned Window Demonstration")
- iconname("paned1")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($paned1_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-The sash between the two coloured windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.)
-If your Tk library linked to Ruby doesn't include a 'panedwindow', this demo doesn't work. Please use later version of Tk which supports a 'panedwindow'.
-EOL
-
-# The bottom buttons
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $paned1_demo.destroy
- $paned1_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'paned1'
- }).pack(:side=>:left, :expand=>true)
-}
-
-TkPanedwindow.new(base_frame, :orient=>:horizontal){|f|
- add(Tk::Label.new(f, :text=>"This is the\nleft side", :bg=>'yellow'),
- Tk::Label.new(f, :text=>"This is the\nright side", :bg=>'cyan'))
-
- pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m')
-}
diff --git a/ext/tk/sample/demos-en/paned2.rb b/ext/tk/sample/demos-en/paned2.rb
deleted file mode 100644
index 0c62235112..0000000000
--- a/ext/tk/sample/demos-en/paned2.rb
+++ /dev/null
@@ -1,95 +0,0 @@
-# frozen_string_literal: false
-# paned2.rb --
-#
-# This demonstration script creates a toplevel window containing
-# a paned window that separates two windows vertically.
-#
-# based on "Id: paned2.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp"
-
-if defined?($paned2_demo) && $paned2_demo
- $paned2_demo.destroy
- $paned2_demo = nil
-end
-
-$paned2_demo = TkToplevel.new {|w|
- title("Vertical Paned Window Demonstration")
- iconname("paned2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($paned2_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-The sash between the two scrolled windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.)
-If your Tk library linked to Ruby doesn't include a 'panedwindow', this demo doesn't work. Please use later version of Tk which supports a 'panedwindow'.
-EOL
-
-# The bottom buttons
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $paned2_demo.destroy
- $paned2_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'paned2'
- }).pack(:side=>:left, :expand=>true)
-}
-
-paneList = TkVariable.new # define as normal variable (not array)
-paneList.value = [ # ruby's array --> tcl's list
- 'List of Ruby/Tk Widgets',
- 'TkButton',
- 'TkCanvas',
- 'TkCheckbutton',
- 'TkEntry',
- 'TkFrame',
- 'TkLabel',
- 'TkLabelframe',
- 'TkListbox',
- 'TkMenu',
- 'TkMenubutton',
- 'TkMessage',
- 'TkPanedwindow',
- 'TkRadiobutton',
- 'TkScale',
- 'TkScrollbar',
- 'TkSpinbox',
- 'TkText',
- 'TkToplevel'
-]
-
-# Create the pane itself
-TkPanedwindow.new(base_frame, :orient=>:vertical){|f|
- pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m')
-
- add(TkFrame.new(f){|paned2_top|
- TkListbox.new(paned2_top, :listvariable=>paneList) {
- # Invert the first item to highlight it
- itemconfigure(0, :background=>self.cget(:foreground),
- :foreground=>self.cget(:background) )
- yscrollbar(TkScrollbar.new(paned2_top).pack(:side=>:right,
- :fill=>:y))
- pack(:fill=>:both, :expand=>true)
- }
- },
-
- TkFrame.new(f, :height=>120) {|paned2_bottom|
- # The bottom window is a text widget with scrollbar
- paned2_xscr = TkScrollbar.new(paned2_bottom)
- paned2_yscr = TkScrollbar.new(paned2_bottom)
- paned2_text = TkText.new(paned2_bottom, :width=>30, :wrap=>:non) {
- insert('1.0', "This is just a normal text widget")
- xscrollbar(paned2_xscr)
- yscrollbar(paned2_yscr)
- }
- Tk.grid(paned2_text, paned2_yscr, :sticky=>'nsew')
- Tk.grid(paned2_xscr, :sticky=>'nsew')
- TkGrid.columnconfigure(paned2_bottom, 0, :weight=>1)
- TkGrid.rowconfigure(paned2_bottom, 0, :weight=>1)
- } )
-}
diff --git a/ext/tk/sample/demos-en/pendulum.rb b/ext/tk/sample/demos-en/pendulum.rb
deleted file mode 100644
index 833a31084f..0000000000
--- a/ext/tk/sample/demos-en/pendulum.rb
+++ /dev/null
@@ -1,241 +0,0 @@
-# frozen_string_literal: false
-#
-# This demonstration illustrates how Tcl/Tk can be used to construct
-# simulations of physical systems.
-# (called by 'widget')
-#
-# based on Tcl/Tk8.5a2 widget demos
-
-# destroy toplevel widget for this demo script
-if defined?($pendulum_demo) && $pendulum_demo
- $pendulum_demo.destroy
- $pendulum_demo = nil
-end
-
-# create toplevel widget
-$pendulum_demo = TkToplevel.new {|w|
- title("Pendulum Animation Demonstration")
- iconname("pendulum")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($pendulum_demo).pack(:fill=>:both, :expand=>true)
-
-# create label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text 'This demonstration shows how Ruby/Tk can be used to carry out animations that are linked to simulations of physical systems. In the left canvas is a graphical representation of the physical system itself, a simple pendulum, and in the right canvas is a graph of the phase space of the system, which is a plot of the angle (relative to the vertical) against the angular velocity. The pendulum bob may be repositioned by clicking and dragging anywhere on the left canvas.'
-}
-msg.pack('side'=>'top')
-
-# create frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $pendulum_demo
- $pendulum_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'See Code'
- command proc{showCode 'pendulum'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# animated wave
-class PendulumAnimationDemo
- def initialize(frame)
- # Create some structural widgets
- @pane = TkPanedWindow.new(frame, :orient=>:horizontal).pack(:fill=>:both, :expand=>true)
-# @pane.add(@lf1 = TkLabelFrame.new(@pane, :text=>'Pendulum Simulation'))
-# @pane.add(@lf2 = TkLabelFrame.new(@pane, :text=>'Phase Space'))
- @lf1 = TkLabelFrame.new(@pane, :text=>'Pendulum Simulation')
- @lf2 = TkLabelFrame.new(@pane, :text=>'Phase Space')
-
- # Create the canvas containing the graphical representation of the
- # simulated system.
- @c = TkCanvas.new(@lf1, :width=>320, :height=>200, :background=>'white',
- :borderwidth=>2, :relief=>:sunken)
- TkcText.new(@c, 5, 5, :anchor=>:nw,
- :text=>'Click to Adjust Bob Start Position')
- # Coordinates of these items don't matter; they will be set properly below
- @plate = TkcLine.new(@c, 0, 25, 320, 25, :width=>2, :fill=>'grey50')
- @rod = TkcLine.new(@c, 1, 1, 1, 1, :width=>3, :fill=>'black')
- @bob = TkcOval.new(@c, 1, 1, 2, 2,
- :width=>3, :fill=>'yellow', :outline=>'black')
- TkcOval.new(@c, 155, 20, 165, 30, :fill=>'grey50', :outline=>'')
-
- # pack
- @c.pack(:fill=>:both, :expand=>true)
-
- # Create the canvas containing the phase space graph; this consists of
- # a line that gets gradually paler as it ages, which is an extremely
- # effective visual trick.
- @k = TkCanvas.new(@lf2, :width=>320, :height=>200, :background=>'white',
- :borderwidth=>2, :relief=>:sunken)
- @y_axis = TkcLine.new(@k, 160, 200, 160, 0, :fill=>'grey75', :arrow=>:last)
- @x_axis = TkcLine.new(@k, 0, 100, 320, 100, :fill=>'grey75', :arrow=>:last)
-
- @graph = {}
- 90.step(0, -10){|i|
- # Coordinates of these items don't matter;
- # they will be set properly below
- @graph[i] = TkcLine.new(@k, 0, 0, 1, 1, :smooth=>true, :fill=>"grey#{i}")
- }
-
- # labels
- @label_theta = TkcText.new(@k, 0, 0, :anchor=>:ne,
- :text=>'q', :font=>'Symbol 8')
- @label_dtheta = TkcText.new(@k, 0, 0, :anchor=>:ne,
- :text=>'dq', :font=>'Symbol 8')
-
- # pack
- @k.pack(:fill=>:both, :expand=>true)
-
- # Initialize some variables
- @points = []
- @theta = 45.0
- @dTheta = 0.0
- @length = 150
-
- # animation loop
- @timer = TkTimer.new(15){ repeat }
-
- # binding
- @c.bindtags_unshift(btag = TkBindTag.new)
- btag.bind('Destroy'){ @timer.stop }
- btag.bind('1', proc{|x, y| @timer.stop; showPendulum(x.to_i, y.to_i)},
- '%x %y')
- btag.bind('B1-Motion', proc{|x, y| showPendulum(x.to_i, y.to_i)}, '%x %y')
- btag.bind('ButtonRelease-1',
- proc{|x, y| showPendulum(x.to_i, y.to_i); @timer.start },
- '%x %y')
-
- btag.bind('Configure', proc{|w| @plate.coords(0, 25, w.to_i, 25)}, '%w')
-
- @k.bind('Configure', proc{|h, w|
- h = h.to_i
- w = w.to_i
- @psh = h/2;
- @psw = w/2
- @x_axis.coords(2, @psh, w-2, @psh)
- @y_axis.coords(@psw, h-2, @psw, 2)
- @label_theta.coords(@psw-4, 6)
- @label_dtheta.coords(w-6, @psh+4)
- }, '%h %w')
-
- # add
- Tk.update
- @pane.add(@lf1)
- @pane.add(@lf2)
-
- # init display
- showPendulum
-
- # animation start
- @timer.start(500)
- end
-
- # This procedure makes the pendulum appear at the correct place on the
- # canvas. If the additional arguments x, y are passed instead of computing
- # the position of the pendulum from the length of the pendulum rod and its
- # angle, the length and angle are computed in reverse from the given
- # location (which is taken to be the centre of the pendulum bob.)
- def showPendulum(x=nil, y=nil)
- if x && y && (x != 160 || y != 25)
- @dTheta = 0.0
- x2 = x - 160
- y2 = y - 25
- @length = Math.hypot(x2, y2)
- @theta = Math.atan2(x2,y2)*180/Math::PI
- else
- angle = @theta*Math::PI/180
- x = 160 + @length*Math.sin(angle)
- y = 25 + @length*Math.cos(angle)
- end
-
- @rod.coords(160, 25, x, y)
- @bob.coords(x-15, y-15, x+15, y+15)
- end
-
- # Update the phase-space graph according to the current angle and the
- # rate at which the angle is changing (the first derivative with
- # respect to time.)
- def showPhase
- unless @psw && @psh
- @psw = @k.width/2
- @psh = @k.height/2
- end
- @points << @theta + @psw << -20*@dTheta + @psh
- if @points.length > 100
- @points = @points[-100..-1]
- end
- (0...100).step(10){|i|
- first = - i
- last = 11 - i
- last = -1 if last >= 0
- next if first > last
- lst = @points[first..last]
- @graph[i].coords(lst) if lst && lst.length >= 4
- }
- end
-
- # This procedure is the "business" part of the simulation that does
- # simple numerical integration of the formula for a simple rotational
- # pendulum.
- def recomputeAngle
- scaling = 3000.0/@length/@length
-
- # To estimate the integration accurately, we really need to
- # compute the end-point of our time-step. But to do *that*, we
- # need to estimate the integration accurately! So we try this
- # technique, which is inaccurate, but better than doing it in a
- # single step. What we really want is bound up in the
- # differential equation:
- # .. - sin theta
- # theta + theta = -----------
- # length
- # But my math skills are not good enough to solve this!
-
- # first estimate
- firstDDTheta = -Math.sin(@theta * Math::PI/180) * scaling
- midDTheta = @dTheta + firstDDTheta
- midTheta = @theta + (@dTheta + midDTheta)/2
- # second estimate
- midDDTheta = -Math.sin(midTheta * Math::PI/180) * scaling
- midDTheta = @dTheta + (firstDDTheta + midDDTheta)/2
- midTheta = @theta + (@dTheta + midDTheta)/2
- # Now we do a double-estimate approach for getting the final value
- # first estimate
- midDDTheta = -Math.sin(midTheta * Math::PI/180) * scaling
- lastDTheta = midDTheta + midDDTheta
- lastTheta = midTheta + (midDTheta+ lastDTheta)/2
- # second estimate
- lastDDTheta = -Math.sin(lastTheta * Math::PI/180) * scaling
- lastDTheta = midDTheta + (midDDTheta + lastDDTheta)/2
- lastTheta = midTheta + (midDTheta + lastDTheta)/2
- # Now put the values back in our globals
- @dTheta = lastDTheta
- @theta = lastTheta
- end
-
- # This method ties together the simulation engine and the graphical
- # display code that visualizes it.
- def repeat
- # Simulate
- recomputeAngle
-
- # Update the display
- showPendulum
- showPhase
- end
-end
-
-# Start the animation processing
-PendulumAnimationDemo.new(base_frame)
diff --git a/ext/tk/sample/demos-en/plot.rb b/ext/tk/sample/demos-en/plot.rb
deleted file mode 100644
index 786695a85c..0000000000
--- a/ext/tk/sample/demos-en/plot.rb
+++ /dev/null
@@ -1,125 +0,0 @@
-# frozen_string_literal: false
-# plot.rb
-#
-# This demonstration script creates a canvas widget showing a 2-D
-# plot with data points that can be dragged with the mouse.
-#
-# 2-D plot widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($plot_demo) && $plot_demo
- $plot_demo.destroy
- $plot_demo = nil
-end
-
-# demo toplevel widget
-$plot_demo = TkToplevel.new {|w|
- title("Plot Demonstration")
- iconname("Plot")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($plot_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"This window displays a canvas widget containing a simple 2-dimensional plot. You can doctor the data by dragging any of the points with mouse button 1."){
- pack('side'=>'top')
-}
-
-# frame
-$plot_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $plot_demo
- $plot_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'plot'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$plot_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# font
-plotFont = '-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*'
-
-# canvas
-$plot_canvas = TkCanvas.new(base_frame,'relief'=>'raised','width'=>450,'height'=>300)
-$plot_canvas.pack('side'=>'top', 'fill'=>'x')
-
-# plot
-TkcLine.new($plot_canvas, 100, 250, 400, 250, 'width'=>2)
-TkcLine.new($plot_canvas, 100, 250, 100, 50, 'width'=>2)
-TkcText.new($plot_canvas, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>plotFont, 'fill'=>'brown')
-
-(0..10).each {|i|
- x = 100 + (i * 30)
- TkcLine.new($plot_canvas, x, 250, x, 245, 'width'=>2)
- TkcText.new($plot_canvas, x, 254,
- 'text'=>10*i, 'font'=>plotFont, 'anchor'=>'n')
-}
-(0..5).each {|i|
- y = 250 - (i * 40)
- TkcLine.new($plot_canvas, 100, y, 105, y, 'width'=>2)
- TkcText.new($plot_canvas, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>plotFont, 'anchor'=>'e')
-}
-
-for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
- x = 100 + (3*xx)
- y = 250 - (4*yy)/5
- item = TkcOval.new($plot_canvas, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
- item.addtag 'point'
-end
-
-$plot_canvas.itembind('point', 'Any-Enter',
- proc{$plot_canvas.itemconfigure 'current','fill','red'})
-$plot_canvas.itembind('point', 'Any-Leave',
- proc{$plot_canvas.itemconfigure 'current','fill','SkyBlue2'})
-$plot_canvas.itembind('point', '1',
- proc{|x,y| plotDown $plot_canvas,x,y}, "%x %y")
-$plot_canvas.itembind('point', 'ButtonRelease-1',
- proc{$plot_canvas.dtag 'selected'})
-$plot_canvas.bind('B1-Motion',
- proc{|x,y| plotMove $plot_canvas,x,y}, "%x %y")
-
-$plot = {'lastX'=>0, 'lastY'=>0}
-
-# plotDown --
-# This method is invoked when the mouse is pressed over one of the
-# data points. It sets up state to allow the point to be dragged.
-#
-# Arguments:
-# w - The canvas window.
-# x, y - The coordinates of the mouse press.
-
-def plotDown (w, x, y)
- w.dtag 'selected'
- w.addtag_withtag 'selected', 'current'
- w.raise 'current'
- $plot['lastX'] = x
- $plot['lastY'] = y
-end
-
-# plotMove --
-# This method is invoked during mouse motion events. It drags the
-# current item.
-#
-# Arguments:
-# w - The canvas window.
-# x, y - The coordinates of the mouse.
-
-def plotMove (w, x, y)
- w.move 'selected', x - $plot['lastX'], y - $plot['lastY']
- $plot['lastX'] = x
- $plot['lastY'] = y
-end
-
diff --git a/ext/tk/sample/demos-en/puzzle.rb b/ext/tk/sample/demos-en/puzzle.rb
deleted file mode 100644
index edefa66d73..0000000000
--- a/ext/tk/sample/demos-en/puzzle.rb
+++ /dev/null
@@ -1,135 +0,0 @@
-# frozen_string_literal: false
-# puzzle.rb
-#
-# This demonstration script creates a 15-puzzle game using a collection
-# of buttons.
-#
-# widget demo 'puzzle' (called by 'widget')
-#
-
-# toplevel widget
-if defined?($puzzle_demo) && $puzzle_demo
- $puzzle_demo.destroy
- $puzzle_demo = nil
-end
-
-# demo toplevel widget
-$puzzle_demo = TkToplevel.new {|w|
- title("15-Puzzle Demonstration")
- iconname("15-Puzzle")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($puzzle_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "A 15-puzzle appears below as a collection of buttons. Click on any of the pieces next to the space, and that piece will slide over the space. Continue this until the pieces are arranged in numerical order from upper-left to lower-right."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $puzzle_demo
- $puzzle_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'puzzle'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-
-# Special trick: select a darker color for the space by creating a
-# scrollbar widget and using its trough color.
-begin
- if Tk.windowingsystem() == 'aqua'
- frameWidth = 168
- frameHeight = 168
- elsif Tk.default_widget_set == :Ttk
- frameWidth = 148
- frameHeight = 124
- else
- frameWidth = 120
- frameHeight = 120
- end
-rescue
- frameWidth = 120
- frameHeight = 120
-end
-
-# depend_on_button_width = true
-depend_on_button_width = false
-
-s = TkScrollbar.new(base_frame)
-base = TkFrame.new(base_frame) {
- width frameWidth
- height frameHeight
- borderwidth 2
- relief 'sunken'
- bg s['troughcolor']
-}
-s.destroy
-base.pack('side'=>'top', 'padx'=>'1c', 'pady'=>'1c')
-
-def def_puzzleswitch_proc(w, num)
- proc{puzzleSwitch w, num}
-end
-
-$xpos = {}
-$ypos = {}
-order = [3,1,6,2,5,7,15,13,4,11,8,9,14,10,12]
-(0..14).each{|i|
- num = order[i]
- $xpos[num] = (i % 4) * 0.25
- $ypos[num] = (i / 4) * 0.25
- TkButton.new(base) {|w|
- relief 'raised'
- text num
- highlightthickness 0
- command def_puzzleswitch_proc(w, num)
- if depend_on_button_width && (w.winfo_reqwidth * 4 > base.width)
- base.width = w.winfo_reqwidth * 4
- end
- }.place('relx'=>$xpos[num], 'rely'=>$ypos[num],
- 'relwidth'=>0.25, 'relheight'=>0.25)
-}
-$xpos['space'] = 0.75
-$ypos['space'] = 0.75
-
-
-# puzzleSwitch --
-# This procedure is invoked when the user clicks on a particular button;
-# if the button is next to the empty space, it moves the button into the
-# empty space.
-
-def puzzleSwitch(w, num)
- if ( ($ypos[num] >= ($ypos['space'] - 0.01)) \
- && ($ypos[num] <= ($ypos['space'] + 0.01)) \
- && ($xpos[num] >= ($xpos['space'] - 0.26)) \
- && ($xpos[num] <= ($xpos['space'] + 0.26))) \
- || (($xpos[num] >= ($xpos['space'] - 0.01)) \
- && ($xpos[num] <= ($xpos['space'] + 0.01)) \
- && ($ypos[num] >= ($ypos['space'] - 0.26)) \
- && ($ypos[num] <= ($ypos['space'] + 0.26)))
- tmp = $xpos['space']
- $xpos['space'] = $xpos[num]
- $xpos[num] = tmp
- tmp = $ypos['space']
- $ypos['space'] = $ypos[num]
- $ypos[num] = tmp
- w.place('relx'=>$xpos[num], 'rely'=>$ypos[num])
- end
-end
-
diff --git a/ext/tk/sample/demos-en/radio.rb b/ext/tk/sample/demos-en/radio.rb
deleted file mode 100644
index d6b3ffbcbe..0000000000
--- a/ext/tk/sample/demos-en/radio.rb
+++ /dev/null
@@ -1,87 +0,0 @@
-# frozen_string_literal: false
-# radio.rb
-#
-# This demonstration script creates a toplevel window containing
-# several radiobutton widgets.
-#
-# radiobutton widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($radio_demo) && $radio_demo
- $radio_demo.destroy
- $radio_demo = nil
-end
-
-# demo toplevel widget
-$radio_demo = TkToplevel.new {|w|
- title("Radiobutton Demonstration")
- iconname("radio")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($radio_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "Two groups of radiobuttons are displayed below. If you click on a button then the button will become selected exclusively among all the buttons in its group. A Tcl variable is associated with each group to indicate which of the group's buttons is selected. Click the \"See Variables\" button to see the current values of the variables."
-}
-msg.pack('side'=>'top')
-
-#
-size = TkVariable.new
-color = TkVariable.new
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $radio_demo
- $radio_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'radio'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'See Variables'
- command proc{
- showVars(base_frame, ['size', size], ['color', color])
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-f_left = TkFrame.new(base_frame)
-f_right = TkFrame.new(base_frame)
-f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-
-# radiobutton
-[10, 12, 18, 24].each {|sz|
- TkRadioButton.new(f_left) {
- text "Point Size #{sz}"
- variable size
- relief 'flat'
- value sz
- }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')
-}
-
-['Red', 'Green', 'Blue', 'Yellow', 'Orange', 'Purple'].each {|col|
- TkRadioButton.new(f_right) {
- text col
- variable color
- relief 'flat'
- value col.downcase
- }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')
-}
-
diff --git a/ext/tk/sample/demos-en/radio2.rb b/ext/tk/sample/demos-en/radio2.rb
deleted file mode 100644
index ece7cfdf08..0000000000
--- a/ext/tk/sample/demos-en/radio2.rb
+++ /dev/null
@@ -1,110 +0,0 @@
-# frozen_string_literal: false
-# radio2.rb
-#
-# This demonstration script creates a toplevel window containing
-# several radiobutton widgets.
-#
-# radiobutton widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($radio2_demo) && $radio2_demo
- $radio2_demo.destroy
- $radio2_demo = nil
-end
-
-# demo toplevel widget
-$radio2_demo = TkToplevel.new {|w|
- title("Radiobutton Demonstration 2")
- iconname("radio2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($radio2_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "Three groups of radiobuttons are displayed below. If you click on a button then the button will become selected exclusively among all the buttons in its group. A Tcl variable is associated with each group to indicate which of the group's buttons is selected. Click the \"See Variables\" button to see the current values of the variables."
-}
-msg.pack('side'=>'top')
-
-#
-size = TkVariable.new
-color = TkVariable.new
-align = TkVariable.new
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $radio2_demo
- $radio2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'radio2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'See Variables'
- command proc{
- showVars(base_frame,
- ['size', size], ['color', color], ['compound', align])
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-f_left = TkLabelFrame.new(base_frame, 'text'=>'Point Size',
- 'pady'=>2, 'padx'=>2)
-f_mid = TkLabelFrame.new(base_frame, 'text'=>'Color',
- 'pady'=>2, 'padx'=>2)
-f_right = TkLabelFrame.new(base_frame, 'text'=>'Alignment',
- 'pady'=>2, 'padx'=>2)
-f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-f_mid.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-
-# radiobutton
-[10, 12, 18, 24].each {|sz|
- TkRadioButton.new(f_left) {
- text "Point Size #{sz}"
- variable size
- relief 'flat'
- value sz
- }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w', 'fill'=>'x')
-}
-
-['Red', 'Green', 'Blue', 'Yellow', 'Orange', 'Purple'].each {|col|
- TkRadioButton.new(f_mid) {
- text col
- variable color
- relief 'flat'
- value col.downcase
- anchor 'w'
- }.pack('side'=>'top', 'pady'=>2, 'fill'=>'x')
-}
-
-# label = TkLabel.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead',
-label = Tk::Label.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead',
- 'compound'=>'left')
-label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top')
-label.height(TkWinfo.reqheight(label))
-abtn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a|
- lower = a.downcase
- TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
- 'value'=>lower, 'indicatoron'=>0, 'width'=>7,
- 'command'=>proc{label.compound(align.value)})
-}
-
-Tk.grid('x', abtn[0])
-Tk.grid(abtn[1], label, abtn[2])
-Tk.grid('x', abtn[3])
diff --git a/ext/tk/sample/demos-en/radio3.rb b/ext/tk/sample/demos-en/radio3.rb
deleted file mode 100644
index d1629c884e..0000000000
--- a/ext/tk/sample/demos-en/radio3.rb
+++ /dev/null
@@ -1,118 +0,0 @@
-# frozen_string_literal: false
-# radio3.rb
-#
-# This demonstration script creates a toplevel window containing
-# several radiobutton widgets.
-#
-# radiobutton widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($radio3_demo) && $radio3_demo
- $radio3_demo.destroy
- $radio3_demo = nil
-end
-
-# demo toplevel widget
-$radio3_demo = TkToplevel.new {|w|
- title("Radiobutton Demonstration 3")
- iconname("radio3")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($radio3_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "Three groups of radiobuttons are displayed below. If you click on a button then the button will become selected exclusively among all the buttons in its group. A Tcl variable is associated with each group to indicate which of the group's buttons is selected. When the 'Tristate' button is pressed, the radio buttons will display the tri-state mode. Selecting any radio button will return the buttons to their respective on/off state. Click the \"See Variables\" button to see the current values of the variables."
-}
-msg.grid(:row=>0, :column=>0, :columnspan=>3, :sticky=>'nsew')
-
-# variable
-size = TkVariable.new
-color = TkVariable.new
-align = TkVariable.new
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- TkButton.new(frame, :text=>'See Variables',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars(base_frame, ['size', size],
- ['color', color], ['compound', align])
- }),
- TkButton.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'radio3'}),
- TkButton.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $radio3_demo
- $radio3_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
- frame.grid_columnconfigure(0, :weight=>1)
- TkGrid(frame, :row=>3, :column=>0, :columnspan=>3, :sticky=>'nsew')
-}
-
-# frame
-f_left = TkLabelFrame.new(base_frame, 'text'=>'Point Size',
- 'pady'=>2, 'padx'=>2)
-f_mid = TkLabelFrame.new(base_frame, 'text'=>'Color',
- 'pady'=>2, 'padx'=>2)
-f_right = TkLabelFrame.new(base_frame, 'text'=>'Alignment',
- 'pady'=>2, 'padx'=>2)
-f_left .grid('column'=>0, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2)
-f_mid .grid('column'=>1, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2)
-f_right.grid('column'=>2, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c')
-
-TkButton.new(base_frame, 'text'=>'Tristate',
- 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){
- grid('column'=>2, 'row'=>2, 'pady'=>'.5c', 'padx'=>'.5c')
-}
-
-# radiobutton
-[10, 12, 14, 18, 24].each {|sz|
- TkRadioButton.new(f_left) {
- text "Point Size #{sz}"
- variable size
- relief 'flat'
- value sz
- tristatevalue 'multi'
- }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w', 'fill'=>'x')
-}
-
-['Red', 'Green', 'Blue', 'Yellow', 'Orange', 'Purple'].each {|col|
- TkRadioButton.new(f_mid) {
- text col
- variable color
- relief 'flat'
- value col.downcase
- anchor 'w'
- tristatevalue 'multi'
- command proc{f_mid.fg(color.value)}
- }.pack('side'=>'top', 'pady'=>2, 'fill'=>'x')
-}
-
-# label = TkLabel.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead',
-label = Tk::Label.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead',
- 'compound'=>'left')
-label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top')
-label.height(TkWinfo.reqheight(label))
-a_btn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a|
- TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
- 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7,
- 'command'=>proc{label.compound(align.value)})
-}
-
-Tk.grid('x', a_btn[0])
-Tk.grid(a_btn[1], label, a_btn[2])
-Tk.grid('x', a_btn[3])
diff --git a/ext/tk/sample/demos-en/rmt b/ext/tk/sample/demos-en/rmt
deleted file mode 100644
index dcfb328fc8..0000000000
--- a/ext/tk/sample/demos-en/rmt
+++ /dev/null
@@ -1,268 +0,0 @@
-#!/usr/bin/env ruby
-
-# rmt --
-# This script implements a simple remote-control mechanism for
-# Tk applications. It allows you to select an application and
-# then type commands to that application.
-
-require 'tk'
-
-class Rmt
- def initialize(parent=nil)
- win = self
-
- unless parent
- parent = TkRoot.new
- end
- root = TkWinfo.toplevel(parent)
- root.minsize(1,1)
-
- # The instance variable below keeps track of the remote application
- # that we're sending to. If it's an empty string then we execute
- # the commands locally.
- @app = 'local'
- @mode = 'Ruby'
-
- # The instance variable below keeps track of whether we're in the
- # middle of executing a command entered via the text.
- @executing = 0
-
- # The instance variable below keeps track of the last command executed,
- # so it can be re-executed in response to !! commands.
- @lastCommand = ""
-
- # Create menu bar. Arrange to recreate all the information in the
- # applications sub-menu whenever it is cascaded to.
-
- TkFrame.new(root, 'relief'=>'raised', 'bd'=>2) {|f|
- pack('side'=>'top', 'fill'=>'x')
- TkMenubutton.new(f, 'text'=>'File', 'underline'=>0) {|mb|
- TkMenu.new(mb) {|mf|
- mb.menu(mf)
- TkMenu.new(mf) {|ma|
- postcommand proc{win.fillAppsMenu ma}
- mf.add('cascade', 'label'=>'Select Application',
- 'menu'=>ma, 'underline'=>0)
- }
- add('command', 'label'=>'Quit',
- 'command'=>proc{root.destroy}, 'underline'=>0)
- }
- pack('side'=>'left')
- }
- }
-
- # Create text window and scrollbar.
-
- @txt = TkText.new(root, 'relief'=>'sunken', 'bd'=>2, 'setgrid'=>true) {
- yscrollbar(TkScrollbar.new(root){pack('side'=>'right', 'fill'=>'y')})
- pack('side'=>'left')
- }
-
- @promptEnd = TkTextMark.new(@txt, 'insert')
-
- # Create a binding to forward commands to the target application,
- # plus modify many of the built-in bindings so that only information
- # in the current command can be deleted (can still set the cursor
- # earlier in the text and select and insert; just can't delete).
-
- @txt.bindtags([@txt, TkText, root, 'all'])
- @txt.bind('Return', proc{
- @txt.set_insert('end - 1c')
- @txt.insert('insert', "\n")
- win.invoke
- Tk.callback_break
- })
- @txt.bind('Delete', proc{
- begin
- @txt.tag_remove('sel', 'sel.first', @promptEnd)
- rescue
- end
- if @txt.tag_nextrange('sel', '1.0', 'end') == []
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- end
- })
- @txt.bind('BackSpace', proc{
- begin
- @txt.tag_remove('sel', 'sel.first', @promptEnd)
- rescue
- end
- if @txt.tag_nextrange('sel', '1.0', 'end') == []
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- end
- })
- @txt.bind('Control-d', proc{
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- })
- @txt.bind('Control-k', proc{
- if @txt.compare('insert', '<', @promptEnd)
- @txt.set_insert(@promptEnd)
- end
- })
- @txt.bind('Control-t', proc{
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- })
- @txt.bind('Meta-d', proc{
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- })
- @txt.bind('Meta-BackSpace', proc{
- if @txt.compare('insert', '<=', @promptEnd)
- Tk.callback_break
- end
- })
- @txt.bind('Control-h', proc{
- if @txt.compare('insert', '<=', @promptEnd)
- Tk.callback_break
- end
- })
-
- @txt.tag_configure('bold', 'font'=>['Courier', 12, 'bold'])
-
- @app = Tk.appname('rmt')
- if (@app =~ /^rmt(.*)$/)
- root.title("Tk Remote Controller#{$1}")
- root.iconname("Tk Remote#{$1}")
- end
- prompt
- @txt.focus
- #@app = TkWinfo.appname(TkRoot.new)
- end
-
- def tkTextInsert(w,s)
- return if s == ""
- begin
- if w.compare('sel.first','<=','insert') \
- && w.compare('sel.last','>=','insert')
- w.tag_remove('sel', 'sel.first', @promptEnd)
- w.delete('sel.first', 'sel.last')
- end
- rescue
- end
- w.insert('insert', s)
- w.see('insert')
- end
-
- # The method below is used to print out a prompt at the
- # insertion point (which should be at the beginning of a line
- # right now).
-
- def prompt
- @txt.insert('insert', "#{@app}: ")
- @promptEnd.set('insert')
- @promptEnd.gravity = 'left'
- @txt.tag_add('bold', "#{@promptEnd.path} linestart", @promptEnd)
- end
-
- # The method below executes a command (it takes everything on the
- # current line after the prompt and either sends it to the remote
- # application or executes it locally, depending on "app".
-
- def invoke
- cmd = @txt.get(@promptEnd, 'insert')
- @executing += 1
- case (@mode)
- when 'Tcl'
- if Tk.info('complete', cmd)
- if (cmd == "!!\n")
- cmd = @lastCommand
- else
- @lastCommand = cmd
- end
- begin
- msg = Tk.appsend(@app, false, cmd)
- rescue
- msg = "Error: #{$!}"
- end
- @txt.insert('insert', msg + "\n") if msg != ""
- prompt
- @promptEnd.set('insert')
- end
-
- when 'Ruby'
- if (cmd == "!!\n")
- cmd = @lastCommand
- end
- complete = true
- begin
- eval("proc{#{cmd}}")
- rescue
- complete = false
- end
- if complete
- @lastCommand = cmd
- begin
-# msg = Tk.appsend(@app, false,
-# 'ruby',
-# '"(' + cmd.gsub(/[][$"]/, '\\\\\&') + ').to_s"')
- msg = Tk.rb_appsend(@app, false, cmd)
- rescue
- msg = "Error: #{$!}"
- end
- @txt.insert('insert', msg + "\n") if msg != ""
- prompt
- @promptEnd.set('insert')
- end
- end
-
- @executing -= 1
- @txt.yview_pickplace('insert')
- end
-
- # The following method is invoked to change the application that
- # we're talking to. It also updates the prompt for the current
- # command, unless we're in the middle of executing a command from
- # the text item (in which case a new prompt is about to be output
- # so there's no need to change the old one).
-
- def newApp(appName, mode)
- @app = appName
- @mode = mode
- if @executing == 0
- @promptEnd.gravity = 'right'
- @txt.delete("#{@promptEnd.path} linestart", @promptEnd)
- @txt.insert(@promptEnd, "#{appName}: ")
- @txt.tag_add('bold', "#{@promptEnd.path} linestart", @promptEnd)
- @promptEnd.gravity = 'left'
- end
- end
-
- # The method below will fill in the applications sub-menu with a list
- # of all the applications that currently exist.
-
- def fillAppsMenu(menu)
- win = self
- begin
- menu.delete(0,'last')
- rescue
- end
- TkWinfo.interps.sort.each{|ip|
- begin
- if Tk.appsend(ip, false, 'info commands ruby') == ""
- mode = 'Tcl'
- else
- mode = 'Ruby'
- end
- menu.add('command', 'label'=>format("%s (#{mode}/Tk)", ip),
- 'command'=>proc{win.newApp ip, mode})
- rescue
- menu.add('command', 'label'=>format("%s (unknown Tk)", ip),
- 'command'=>proc{win.newApp ip, mode}, 'state'=>'disabled')
- end
- }
- menu.add('command', 'label'=>format("local (Ruby/Tk)"),
- 'command'=>proc{win.newApp 'local', 'Ruby'})
- end
-end
-
-Rmt.new
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/rolodex b/ext/tk/sample/demos-en/rolodex
deleted file mode 100644
index b4c42b6199..0000000000
--- a/ext/tk/sample/demos-en/rolodex
+++ /dev/null
@@ -1,320 +0,0 @@
-#!/usr/bin/env ruby
-#
-# rolodex --
-# This script is a part of Tom LaStrange's rolodex
-#
-# Copyright (C) 1998 by Takaaki Tateishi <ttate@jaist.ac.jp>
-# Time-stamp: "03/08/02 06:23:06 nagai"
-#
-
-require "tk"
-
-
-def show_help(topic,x=0,y=0)
- if( topic.is_a?(TkWindow) )
- w = TkWinfo.containing(x,y)
- if( TkWinfo.exist?(w) )
- topic = w
- end
- end
-
- if( $helpTopics.include?(topic) )
- msg = $helpTopics[topic]
- else
- msg = "Sorry, but no help is available for this topic"
- end
- TkDialog.new("title"=>"Rolodex Help",
- "message"=>"Information on #{topic}:\n\n#{msg}",
- "default_button"=>0,
- "buttons"=>["OK"])
-end
-
-def fillCard
- clearAction
- $root.frame.entry[1].insert(0,"Takaaki Tateishi")
- $root.frame.entry[2].insert(0,"Japan Advanced Institute of Science and Techonology")
- $root.frame.entry[3].insert(0,"1-1 Asahidai, Tatsunokuchi")
- $root.frame.entry[4].insert(0,"Ishikawa 923-1292, Japan")
- $root.frame.entry[5].insert(0,"private")
- $root.frame.entry[6].insert(0,"***-***-****")
- $root.frame.entry[7].insert(0,"***-***-****")
-end
-
-def addAction
- for i in 1..7
- STDERR.print format("%-12s %s\n",
- RolodexFrame::LABEL[i],
- $root.frame.entry[i].value)
- end
-end
-
-def clearAction
- for i in 1..7
- $root.frame.entry[i].delete(0,"end")
- end
-end
-
-def fileAction
- TkDialog.new("title"=>"File Selection",
- "message"=>"This is a dummy file selection dialog box.\n",
- "default_button"=>0,
- "buttons"=>["OK"])
- STDERR.print "dummy file name\n"
-end
-
-def deleteAction
- result = TkDialog.new("title"=>"Confirm Action",
- "message"=>"Are you sure?",
- "default_button"=>0,
- "buttons"=>["Cancel"])
- if( result.value == 0 )
- clearAction
- end
-end
-
-
-class RolodexFrame < TkFrame
- attr_reader :entry, :label
-
- LABEL = ["","Name:","Address:","","","Home Phone:","Work Phone:","Fax:"]
-
- def initialize(parent=nil,keys=nil)
- super(parent,keys)
- self["relief"] = "flat"
-
- @i = []
- @label = []
- @entry = []
- for i in 1..7
- @i[i] = TkFrame.new(self)
- @i[i].pack("side"=>"top",
- "pady"=>2,
- "anchor"=>"e")
- @label[i] = TkLabel.new(@i[i],
- "text"=>LABEL[i],
- "anchor"=>"e")
- @entry[i] = TkEntry.new(@i[i],
- "width"=>30,
- "relief"=>"sunken")
- @entry[i].pack("side"=>"right")
- @label[i].pack("side"=>"right")
- end
- end
-end
-
-class RolodexButtons < TkFrame
- attr_reader :clear, :add, :search, :delete
-
- def initialize(parent,keys=nil)
- super(parent,keys)
- @clear = TkButton.new(self,
- "text" => "Clear")
- @add = TkButton.new(self,
- "text" => "Add")
- @search = TkButton.new(self,
- "text" => "Search")
- @delete = TkButton.new(self,
- "text" => "Delete")
- for w in [@clear,@add,@search,@delete]
- w.pack("side"=>"left", "padx"=>2)
- end
- end
-end
-
-class RolodexMenuFrame < TkFrame
- attr_reader :file_menu, :help_menu, :file, :help
-
- def initialize(parent,keys=nil)
- super(parent,keys)
- configure("relief"=>"raised",
- "borderwidth"=>1)
-
- @file = TkMenubutton.new(self,
- "text"=>"File",
- "underline"=>0)
- @file_menu = TkMenu.new(@file)
- @file_menu.add("command",
- "label" => "Load ...",
- "command" => proc{fileAction},
- "underline" => 0)
- @file_menu.add("command",
- "label" => "Exit",
- "command" => proc{$root.destroy},
- "underline" => 0)
- @file.menu(@file_menu)
- @file.pack("side"=>"left")
-
- @help = TkMenubutton.new(self,
- "text"=>"Help",
- "underline"=>0)
- @help_menu = TkMenu.new(@help)
- @help_menu.add("command",
- "label"=>"On Context...",
- "command"=>proc{show_help("context")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=>"On Help...",
- "command"=>proc{show_help("help")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=>"On Window...",
- "command"=>proc{show_help("window")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=>"On Keys...",
- "command"=>proc{show_help("keys")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=>"On version...",
- "command"=>proc{show_help("version")},
- "underline"=>3)
- @help.menu(@help_menu)
- @help.pack("side"=>"right")
- end
-end
-
-class Rolodex < TkRoot
- attr_reader :frame, :buttons, :menu
-
- def initialize(*args)
- super(*args)
- @frame = RolodexFrame.new(self)
- @frame.pack("side"=>"top",
- "fill"=>"y",
- "anchor"=>"center")
- @buttons = RolodexButtons.new(self)
- @buttons.pack("side"=>"bottom",
- "pady"=>2,
- "anchor"=>"center")
- @menu = RolodexMenuFrame.new(self)
- @menu.pack("before"=>@frame,
- "side"=>"top",
- "fill"=>"x")
- end
-end
-
-$root = Rolodex.new
-
-$root.buttons.delete.configure("command"=>proc{deleteAction})
-$root.buttons.add.configure("command"=>proc{addAction})
-$root.buttons.clear.configure("command"=>proc{clearAction})
-$root.buttons.search.configure("command"=>proc{addAction; fillCard})
-
-$root.buttons.clear.configure("text"=>"Clear Ctrl+C")
-$root.bind("Control-c",proc{clearAction})
-
-$root.buttons.add.configure("text"=>"Add Ctrl+A")
-$root.bind("Control-a",proc{addAction})
-
-$root.buttons.search.configure("text"=>"Search Ctrl+S")
-$root.bind("Control-s",proc{addAction; fillCard})
-
-$root.buttons.delete.configure("text"=>"Delete... Ctrl+D")
-$root.bind("Control-d",proc{deleteAction})
-
-$root.menu.file_menu.entryconfigure(1, "accel"=>"Ctrl+F")
-$root.bind("Control-f",proc{fileAction})
-
-$root.menu.file_menu.entryconfigure(2, "accel"=>"Ctrl+Q")
-$root.bind("Control-q",proc{$root.destroy})
-
-$root.frame.entry[1].focus
-
-$root.bind("Any-F1",
- proc{|event| show_help(event.widget, event.x_root, event.y_root)})
-$root.bind("Any-Help",
- proc{|event| show_help(event.widget, event.x_root, event.y_root)})
-
-
-$helpTopics = {}
-
-$helpTopics[$root.menu.file] = <<EOF
-This is the "file" menu. It can be used to invoke\
-some overall operations on the rolodex applications,\
-such as loading a file or exiting.
-EOF
-
-$helpTopics[$root.menu.file_menu.index(0)] = <<EOF
-The "Load" entry in the "File" menu posts a dialog box\
-that you can use to select a rolodex file
-EOF
-
-$helpTopics[$root.menu.file_menu.index(1)] = <<EOF
-The "Exit" entry in the "File" menu causes the rolodex\
-application to terminate
-EOF
-
-$helpTopics[$root.frame.entry[1]] = <<EOF
-In this field of the rolodex entry you should\
-type the person's name
-EOF
-
-$helpTopics[$root.frame.entry[2]] = <<EOF
-In this field of the rolodex entry you should\
-type the first line of the person's address
-EOF
-
-$helpTopics[$root.frame.entry[3]] = <<EOF
-In this field of the rolodex entry you should\
-type the second line of the person's address
-EOF
-
-$helpTopics[$root.frame.entry[4]] = <<EOF
-In this field of the rolodex entry you should\
-type the third line of the person's address
-EOF
-
-$helpTopics[$root.frame.entry[5]] = <<EOF
-In this field of the rolodex entry you should\
-type the person's home phone number, or "private"\
-if the person doesn't want his or he number publicized
-EOF
-
-$helpTopics[$root.frame.entry[6]] = <<EOF
-In this field of the rolodex entry you should\
-type the person's work phone number
-EOF
-
-$helpTopics[$root.frame.entry[7]] = <<EOF
-In this field of the rolodex entry you should\
-type the phone number for the person's FAX machine
-EOF
-
-$helpTopics["context"] = <<EOF
-Unfortunately, this application doesn't support context-sensitive\
-help in the usual way, because when this demo was written Ruby/Tk\
-didn't have a grab mechanism and this is needed for context-sensitive\
-help. Instead, you can achieve much the same effect by simply moving\
-the mouse over the window you're curious about and pressing the\
-Help or F1 keys. You can do this anytime.
-EOF
-
-$helpTopics["help"] = <<EOF
-This application provides only very crude help. Besides the\
-entries in this menu, you can get help on individual windows\
-by moving the mouse cursor over the window and pressing the\
-Help or F1 keys.
-EOF
-
-$helpTopics["window"] = <<EOF
-This window is a dummy rolodex application created as part of\
-Tom LaStrange's toolkit benchmark. It doesn't really do anything\
-useful except to demonstrate a few features of the Ruby/Tk.
-EOF
-
-$helpTopics["keys"] = <<EOF
-The following accelerator keys are defined for this application\
-(in addition to those already available for the entry windows):
-Ctrl+A: Add
-Ctrl+C: Clear
-Ctrl+D: Delete
-Ctrl+F: Enter file name
-Ctrl+Q: Exit application (quit)
-Ctrl+S: Search (dummy operation)
-EOF
-
-$helpTopics["version"] = <<EOF
-This is version 1.0.1.
-EOF
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/ruler.rb b/ext/tk/sample/demos-en/ruler.rb
deleted file mode 100644
index d9a2c037b8..0000000000
--- a/ext/tk/sample/demos-en/ruler.rb
+++ /dev/null
@@ -1,206 +0,0 @@
-# frozen_string_literal: false
-# ruler.rb
-#
-# This demonstration script creates a canvas widget that displays a ruler
-# with tab stops that can be set, moved, and deleted.
-#
-# ruler widget demo (called by 'widget')
-#
-
-# rulerMkTab --
-# This method creates a new triangular polygon in a canvas to
-# represent a tab stop.
-#
-# Arguments:
-# c - The canvas window.
-# x, y - Coordinates at which to create the tab stop.
-
-def rulerMkTab(c,x,y)
- v = $demo_rulerInfo
- TkcPolygon.new(c, x, y, x+v.size, y+v.size, x-v.size, y+v.size)
-end
-
-# toplevel widget
-if defined?($ruler_demo) && $ruler_demo
- $ruler_demo.destroy
- $ruler_demo = nil
-end
-
-# demo toplevel widget
-$ruler_demo = TkToplevel.new {|w|
- title("Ruler Demonstration")
- iconname("ruler")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ruler_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"This canvas widget shows a mock-up of a ruler. You can create tab stops by dragging them out of the well to the right of the ruler. You can also drag existing tab stops. If you drag a tab stop far enough up or down so that it turns dim, it will be deleted when you release the mouse button."){
- pack('side'=>'top')
-}
-
-# frame
-$ruler_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $ruler_demo
- $ruler_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'ruler'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$ruler_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# canvas
-$ruler_canvas = TkCanvas.new(base_frame, 'width'=>'14.8c', 'height'=>'2.5c')
-$ruler_canvas.pack('side'=>'top', 'fill'=>'x')
-
-#
-unless Struct.const_defined?("RulerInfo")
- $demo_rulerInfo = Struct.new("RulerInfo", :grid, :left, :right, :x, :y,
- :top, :bottom, :size, :normalStyle,
- :activeStyle, :deleteStyle).new
-end
-$demo_rulerInfo.grid = '.25c'
-$demo_rulerInfo.left = TkWinfo.fpixels($ruler_canvas, '1c')
-$demo_rulerInfo.right = TkWinfo.fpixels($ruler_canvas, '13c')
-$demo_rulerInfo.top = TkWinfo.fpixels($ruler_canvas, '1c')
-$demo_rulerInfo.bottom = TkWinfo.fpixels($ruler_canvas, '1.5c')
-$demo_rulerInfo.size = TkWinfo.fpixels($ruler_canvas, '.2c')
-$demo_rulerInfo.normalStyle = {'fill'=>'black'}
-if TkWinfo.depth($ruler_canvas) > 1
- $demo_rulerInfo.activeStyle = {'fill'=>'red', 'stipple'=>''}
- $demo_rulerInfo.deleteStyle = {'fill'=>'red',
- 'stipple'=>'@'+[$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator)}
-else
- $demo_rulerInfo.activeStyle = {'fill'=>'black', 'stipple'=>''}
- $demo_rulerInfo.deleteStyle = {'fill'=>'black',
- 'stipple'=>'@'+[$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator)}
-end
-
-TkcLine.new($ruler_canvas,
- '1c', '0.5c', '1c', '1c', '13c', '1c', '13c', '0.5c', 'width'=>1)
-(0..11).each{|i|
- x = i+1
- TkcLine.new($ruler_canvas, "#{x}c", '1c', "#{x}c", '0.6c', 'width'=>1)
- TkcLine.new($ruler_canvas, "#{x}.25c", '1c', "#{x}.25c", '0.8c', 'width'=>1)
- TkcLine.new($ruler_canvas, "#{x}.5c", '1c', "#{x}.5c", '0.7c', 'width'=>1)
- TkcLine.new($ruler_canvas, "#{x}.75c", '1c', "#{x}.75c", '0.8c', 'width'=>1)
- TkcText.new($ruler_canvas, "#{x}.15c", '0.75c', 'text'=>i, 'anchor'=>'sw')
-}
-
-$rulerTag_well = TkcTag.new($ruler_canvas)
-$ruler_canvas\
-.addtag_withtag($rulerTag_well,
- TkcRectangle.new($ruler_canvas,
- '13.2c', '1c', '13.8c', '0.5c',
- 'outline'=>'black',
- 'fill'=>($ruler_canvas\
- .configinfo('background'))[4]) )
-$ruler_canvas\
-.addtag_withtag($rulerTag_well,
- rulerMkTab($ruler_canvas,
- TkWinfo.pixels($ruler_canvas, '13.5c'),
- TkWinfo.pixels($ruler_canvas, '.65c') ) )
-
-$rulerTag_well.bind('1', proc{|x,y| rulerNewTab($ruler_canvas,x,y)}, '%x %y')
-$ruler_canvas.itembind('tab', '1',
- proc{|x,y| rulerSelectTab($ruler_canvas,x,y)}, '%x %y')
-$ruler_canvas.bind('B1-Motion',
- proc{|x,y| rulerMoveTab($ruler_canvas,x,y)}, '%x %y')
-$ruler_canvas.bind('Any-ButtonRelease-1', proc{rulerReleaseTab($ruler_canvas)})
-
-# rulerNewTab --
-# Does all the work of creating a tab stop, including creating the
-# triangle object and adding tags to it to give it tab behavior.
-#
-# Arguments:
-# c - The canvas window.
-# x, y - The coordinates of the tab stop.
-
-def rulerNewTab(c,x,y)
- v = $demo_rulerInfo
- c.addtag_withtag('active', rulerMkTab(c,x,y))
- c.addtag_withtag('tab', 'active')
- v.x = x
- v.y = y
- rulerMoveTab(c,x,y)
-end
-
-# rulerSelectTab --
-# This method is invoked when mouse button 1 is pressed over
-# a tab. It remembers information about the tab so that it can
-# be dragged interactively.
-#
-# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse (identifies the point by
-# which the tab was picked up for dragging).
-
-def rulerSelectTab(c,x,y)
- v = $demo_rulerInfo
- v.x = c.canvasx(x, v.grid)
- v.y = v.top+2
- c.addtag_withtag('active', 'current')
- c.itemconfigure('active', v.activeStyle)
- c.raise('active')
-end
-
-# rulerMoveTab --
-# This method is invoked during mouse motion events to drag a tab.
-# It adjusts the position of the tab, and changes its appearance if
-# it is about to be dragged out of the ruler.
-#
-# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse.
-
-def rulerMoveTab(c,x,y)
- v = $demo_rulerInfo
- return if c.find_withtag('active') == []
- cx = c.canvasx(x,v.grid)
- cy = c.canvasy(y)
- cx = v.left if cx < v.left
- cx = v.right if cx > v.right
- if (cy >= v.top && cy <= v.bottom)
- cy = v.top+2
- c.itemconfigure('active', v.activeStyle)
- else
- cy = cy-v.size-2
- c.itemconfigure('active', v.deleteStyle)
- end
- c.move('active', cx-v.x, cy-v.y)
- v.x = cx
- v.y = cy
-end
-
-# rulerReleaseTab --
-# This method is invoked during button release events that end
-# a tab drag operation. It deselects the tab and deletes the tab if
-# it was dragged out of the ruler.
-#
-# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse.
-
-def rulerReleaseTab(c)
- v = $demo_rulerInfo
- return if c.find_withtag('active') == []
- if v.y != v.top+2
- c.delete('active')
- else
- c.itemconfigure('active', v.normalStyle)
- c.dtag('active')
- end
-end
-
diff --git a/ext/tk/sample/demos-en/sayings.rb b/ext/tk/sample/demos-en/sayings.rb
deleted file mode 100644
index e7ddfe5b5d..0000000000
--- a/ext/tk/sample/demos-en/sayings.rb
+++ /dev/null
@@ -1,107 +0,0 @@
-# frozen_string_literal: false
-# sayings.rb
-#
-# This demonstration script creates a listbox that can be scrolled
-# both horizontally and vertically. It displays a collection of
-# well-known sayings.
-#
-# listbox widget demo 'sayings' (called by 'widget')
-#
-
-# toplevel widget
-if defined?($sayings_demo) && $sayings_demo
- $sayings_demo.destroy
- $sayings_demo = nil
-end
-
-# demo toplevel widget
-$sayings_demo = TkToplevel.new {|w|
- title("Listbox Demonstration (well-known sayings)")
- iconname("sayings")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($sayings_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "The listbox below contains a collection of well-known sayings. You can scan the list using either of the scrollbars or by dragging in the listbox window with button 2 pressed."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $sayings_demo
- $sayings_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'sayings'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-sayings_lbox = nil
-TkFrame.new(base_frame, 'borderwidth'=>10) {|w|
- sv = TkScrollbar.new(w)
- sh = TkScrollbar.new(w, 'orient'=>'horizontal')
- sayings_lbox = TkListbox.new(w) {
- setgrid 1
- width 20
- height 10
- yscrollcommand proc{|first,last| sv.set first,last}
- xscrollcommand proc{|first,last| sh.set first,last}
- }
- sv.command(proc{|*args| sayings_lbox.yview(*args)})
- sh.command(proc{|*args| sayings_lbox.xview(*args)})
-
- if $tk_version =~ /^4\.[01]/
- sv.pack('side'=>'right', 'fill'=>'y')
- sh.pack('side'=>'bottom', 'fill'=>'x')
- sayings_lbox.pack('expand'=>'yes', 'fill'=>'y')
-
- else
- sayings_lbox.grid('row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- sv.grid('row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- sh.grid('row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- TkGrid.rowconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
- end
-
-}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y')
-
-sayings_lbox.insert(0,
-"Waste not, want not",
-"Early to bed and early to rise makes a man healthy, wealthy, and wise",
-"Ask not what your country can do for you, ask what you can do for your country",
-"I shall return",
-"NOT",
-"A picture is worth a thousand words",
-"User interfaces are hard to build",
-"Thou shalt not steal",
-"A penny for your thoughts",
-"Fool me once, shame on you; fool me twice, shame on me",
-"Every cloud has a silver lining",
-"Where there's smoke there's fire",
-"It takes one to know one",
-"Curiosity killed the cat; but satisfaction brought it back",
-"Take this job and shove it",
-"Up a creek without a paddle",
-"I'm mad as hell and I'm not going to take it any more",
-"An apple a day keeps the doctor away",
-"Don't look a gift horse in the mouth"
-)
-
diff --git a/ext/tk/sample/demos-en/search.rb b/ext/tk/sample/demos-en/search.rb
deleted file mode 100644
index 82c0d169a9..0000000000
--- a/ext/tk/sample/demos-en/search.rb
+++ /dev/null
@@ -1,188 +0,0 @@
-# frozen_string_literal: false
-# search.rb
-#
-# This demonstration script creates a collection of widgets that
-# allow you to load a file into a text widget, then perform searches
-# on that file.
-#
-# Text Search widget demo (called by 'widget')
-#
-
-# textLoadFile --
-# This method below loads a file into a text widget, discarding
-# the previous contents of the widget. Tags for the old widget are
-# not affected, however.
-#
-# Arguments:
-# w - The window into which to load the file. Must be a
-# text widget.
-# file - The name of the file to load. Must be readable.
-
-def textLoadFile(w,file)
- w.delete('1.0', 'end')
- f = open(file, 'r')
- while(!f.eof?)
- w.insert('end', f.read(1000))
- end
- f.close
-end
-
-# textSearch --
-# Search for all instances of a given string in a text widget and
-# apply a given tag to each instance found.
-#
-# Arguments:
-# w - The window in which to search. Must be a text widget.
-# string - The string to search for. The search is done using
-# exact matching only; no special characters.
-# tag - Tag to apply to each instance of a matching string.
-
-def textSearch(w, string, tag)
- tag.remove('0.0', 'end')
- return if string == ""
- cur = '1.0'
- loop {
- cur, len = w.search_with_length(string, cur, 'end')
- break if cur == ""
- tag.add(cur, "#{cur} + #{len} char")
- cur = w.index("#{cur} + #{len} char")
- }
-end
-
-# textToggle --
-# This method is invoked repeatedly to invoke two commands at
-# periodic intervals. It normally reschedules itself after each
-# execution but if an error occurs (e.g. because the window was
-# deleted) then it doesn't reschedule itself.
-#
-# Arguments:
-# cmd1 - Command to execute when method is called.
-# sleep1 - Ms to sleep after executing cmd1 before executing cmd2.
-# cmd2 - Command to execute in the *next* invocation of this method.
-# sleep2 - Ms to sleep after executing cmd2 before executing cmd1 again.
-
-def textToggle(cmd1,sleep1,cmd2,sleep2)
- sleep_list = [sleep2, sleep1]
- TkAfter.new(proc{sleep = sleep_list.shift; sleep_list.push(sleep); sleep},
- -1, cmd1, cmd2).start(sleep1)
-end
-
-# toplevel widget
-if defined?($search_demo) && $search_demo
- $search_demo.destroy
- $search_demo = nil
-end
-
-# demo toplevel widget
-$search_demo = TkToplevel.new {|w|
- title("Text Demonstration - Search and Highlight")
- iconname("search")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($search_demo).pack(:fill=>:both, :expand=>true)
-
-# frame
-$search_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $search_demo
- $search_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'search'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$search_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-TkFrame.new(base_frame) {|f|
- TkLabel.new(f, 'text'=>'File name:',
- 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
- $search_fileName = TkVariable.new
- TkEntry.new(f, 'width'=>40,
- 'textvariable'=>$search_fileName) {
- pack('side'=>'left')
- bind('Return', proc{textLoadFile($search_text, $search_fileName.value)
- $search_string_entry.focus})
- focus
- }
- TkButton.new(f, 'text'=>'Load File',
- 'command'=>proc{textLoadFile($search_text,
- $search_fileName.value)})\
- .pack('side'=>'left', 'pady'=>5, 'padx'=>10)
-}.pack('side'=>'top', 'fill'=>'x')
-
-TkFrame.new(base_frame) {|f|
- TkLabel.new(f, 'text'=>'Search string:',
- 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
- $search_searchString = TkVariable.new
- $search_string_entry = TkEntry.new(f, 'width'=>40,
- 'textvariable'=>$search_searchString) {
- pack('side'=>'left')
- bind('Return', proc{textSearch($search_text, $search_searchString.value,
- $search_Tag)})
- }
- TkButton.new(f, 'text'=>'Highlight',
- 'command'=>proc{textSearch($search_text,
- $search_searchString.value,
- $search_Tag)}) {
- pack('side'=>'left', 'pady'=>5, 'padx'=>10)
- }
-}.pack('side'=>'top', 'fill'=>'x')
-
-$search_text = TkText.new(base_frame, 'setgrid'=>true, 'wrap'=>'word') {|t|
- $search_Tag = TkTextTag.new(t)
- TkScrollbar.new(base_frame, 'command'=>proc{|*args| t.yview(*args)}) {|sc|
- t.yscrollcommand(proc{|first,last| sc.set first,last})
- pack('side'=>'right', 'fill'=>'y')
- }
- pack('expand'=>'yes', 'fill'=>'both')
-}
-
-# Set up display styles for text highlighting.
-
-if TkWinfo.depth($search_demo) > 1
- textToggle(proc{
- $search_Tag.configure('background'=>'#ce5555',
- 'foreground'=>'white')
- },
- 800,
- proc{
- $search_Tag.configure('background'=>'', 'foreground'=>'')
- },
- 200 )
-else
- textToggle(proc{
- $search_Tag.configure('background'=>'black',
- 'foreground'=>'white')
- },
- 800,
- proc{
- $search_Tag.configure('background'=>'', 'foreground'=>'')
- },
- 200 )
-end
-$search_text.insert('1.0', "\
-This window demonstrates how to use the tagging facilities in text \
-widgets to implement a searching mechanism. First, type a file name \
-in the top entry, then type <Return> or click on \"Load File\". Then \
-type a string in the lower entry and type <Return> or click on \
-\"Load File\". This will cause all of the instances of the string to \
-be tagged with the tag \"search\", and it will arrange for the tag\'s \
-display attributes to change to make all of the strings blink.")
-$search_text.insert('end', "\
-The current directory to load a file is \"#{Dir.pwd}\".\
-")
-$search_text.set_insert '0.0'
-
-$search_fileName.value = ''
-$search_searchString.value = ''
-
-$search_text.width = 60
-$search_text.height = 20
diff --git a/ext/tk/sample/demos-en/spin.rb b/ext/tk/sample/demos-en/spin.rb
deleted file mode 100644
index d3558d56d6..0000000000
--- a/ext/tk/sample/demos-en/spin.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# frozen_string_literal: false
-# spin.rb --
-#
-# This demonstration script creates several spinbox widgets.
-#
-# based on Tcl/Tk8.4.4 widget demos
-
-if defined?($spin_demo) && $spin_demo
- $spin_demo.destroy
- $spin_demo = nil
-end
-
-$spin_demo = TkToplevel.new {|w|
- title("Spinbox Demonstration")
- iconname("spin")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($spin_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-Three different spin-boxes are displayed below. \
-You can add characters by pointing, clicking and typing. \
-The normal Motif editing characters are supported, along with \
-many Emacs bindings. For example, Backspace and Control-h \
-delete the character to the left of the insertion cursor and \
-Delete and Control-d delete the chararacter to the right of the \
-insertion cursor. For values that are too large to fit in the \
-window all at once, you can scan through the value by dragging \
-with mouse button2 pressed. Note that the first spin-box will \
-only permit you to type in integers, and the third selects from \
-a list of Australian cities.
-If your Tk library linked to Ruby doesn't include a 'spinbox' widget, \
-this demo doesn't work. Please use later version of Tk \
-which supports a 'spinbox' widget.
-EOL
-
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $spin_demo.destroy
- $spin_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'spin'
- }).pack(:side=>:left, :expand=>true)
-}
-
-australianCities = [
- 'Canberra', 'Sydney', 'Melbourne', 'Perth', 'Adelaide',
- 'Brisbane', 'Hobart', 'Darwin', 'Alice Springs'
-]
-
-[
- TkSpinbox.new(base_frame, :from=>1, :to=>10, :width=>10, :validate=>:key,
- :validatecommand=>[
- proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
- ]),
- TkSpinbox.new(base_frame, :from=>0, :to=>3, :increment=>0.5,
- :format=>'%05.2f', :width=>10),
- TkSpinbox.new(base_frame, :values=>australianCities, :width=>10)
-].each{|sbox| sbox.pack(:side=>:top, :pady=>5, :padx=>10)}
diff --git a/ext/tk/sample/demos-en/square b/ext/tk/sample/demos-en/square
deleted file mode 100644
index bb66282154..0000000000
--- a/ext/tk/sample/demos-en/square
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env ruby
-
-# square --
-# This script generates a demo application containing only
-# a "square" widget. It's only usable if Tk has been compiled
-# with tkSquare.c and with the -DSQUARE_DEMO compiler switch.
-# This demo arranges the following bindings for the widget:
-#
-# Button-1 press/drag: moves square to mouse
-# "a": toggle size animation on/off
-#
-
-require 'tk'
-require 'tkafter'
-
-class TkSquare<TkWindow
- def create_self
- begin
- tk_call 'square', path
- rescue
- STDERR.print "\nSorry. Your Tk interpreter does not contain " +
- 'a "square" demonstration widget.' +
- "\n ( See documents included the Tcl/Tk source archive. )\n\n"
- exit
- end
- end
- def size(amount=nil)
- if amount
- tk_send 'size', amount
- else
- number(tk_send('size'))
- end
- end
- def position(x,y)
- tk_send 'position', x, y
- end
-end
-
-$s = TkSquare.new{
- pack('expand'=>'yes', 'fill'=>'both')
- bind('1', proc{|x,y| center(x,y)}, '%s %y')
- bind('B1-Motion', proc{|x,y| center(x,y)}, '%s %y')
- bind('a', proc{animate})
- focus
-}
-TkRoot.new.minsize(1,1)
-
-# The procedure below centers the square on a given position.
-
-def center(x,y)
- a = $s.size
- $s.position(x-(a/2), y-(a/2))
-end
-
-# The procedures below provide a simple form of animation where
-# the box changes size in a pulsing pattern: larger, smaller, larger,
-# and so on.
-
-$inc = 0
-
-def timer_proc
- a = $s.size
- return if $inc == 0
- $inc = -3 if a >= 40
- $inc = 3 if a <= 10
- $s.size(a+$inc)
-end
-
-$timer = TkAfter.new(30, -1, proc{timer_proc})
-
-def animate
- if $inc == 0
- $inc = 3
- $timer.start
- else
- $inc = 0
- $timer.stop
- end
-end
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/states.rb b/ext/tk/sample/demos-en/states.rb
deleted file mode 100644
index 4eac7424e7..0000000000
--- a/ext/tk/sample/demos-en/states.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-# frozen_string_literal: false
-# states.rb
-#
-# This demonstration script creates a listbox widget that displays
-# the names of the 50 states in the United States of America.
-#
-# listbox widget demo 'states' (called by 'widget')
-#
-
-# toplevel widget
-if defined?($states_demo) && $states_demo
- $states_demo.destroy
- $states_demo = nil
-end
-
-# demo toplevel widget
-$states_demo = TkToplevel.new {|w|
- title("Listbox Demonstration (states)")
- iconname("states")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($states_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "A listbox containing the 50 states is displayed below, along with a scrollbar. You can scan the list either using the scrollbar or by scanning. To scan, press button 2 in the widget and drag up or down."
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $states_demo
- $states_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'states'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-states_lbox = nil
-TkFrame.new(base_frame, 'borderwidth'=>'.5c') {|w|
- s = TkScrollbar.new(w)
- states_lbox = TkListbox.new(w) {
- setgrid 1
- height 12
- yscrollcommand proc{|first,last| s.set first,last}
- }
- s.command(proc{|*args| states_lbox.yview(*args)})
- s.pack('side'=>'right', 'fill'=>'y')
- states_lbox.pack('side'=>'left', 'expand'=>1, 'fill'=>'both')
-}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y')
-
-ins_data = [
- 'Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California',
- 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia',
- 'Hawaii', 'Idaho', 'Illinois',
- 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland',
- 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri',
- 'Montana', 'Nebraska', 'Nevada', 'New_Hampshire', 'New_Jersey', 'New_Mexico',
- 'New_York', 'North_Carolina', 'North_Dakota',
- 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode_Island',
- 'South_Carolina', 'South_Dakota',
- 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington',
- 'West_Virginia', 'Wisconsin', 'Wyoming'
-]
-
-states_lbox.insert(0, *ins_data)
-
diff --git a/ext/tk/sample/demos-en/style.rb b/ext/tk/sample/demos-en/style.rb
deleted file mode 100644
index 60185ed874..0000000000
--- a/ext/tk/sample/demos-en/style.rb
+++ /dev/null
@@ -1,232 +0,0 @@
-# frozen_string_literal: false
-# style.rb
-#
-# This demonstration script creates a text widget that illustrates the
-# various display styles that may be set for tags.
-#
-# text (display styles) widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($style_demo) && $style_demo
- $style_demo.destroy
- $style_demo = nil
-end
-
-# demo toplevel widget
-$style_demo = TkToplevel.new {|w|
- title("Text Demonstration - Display Styles")
- iconname("style")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($style_demo).pack(:fill=>:both, :expand=>true)
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $style_demo
- $style_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'style'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# text
-txt = TkText.new(base_frame){|t|
- #
- setgrid 'true'
- #width 70
- #height 32
- wrap 'word'
- font $font
- TkScrollbar.new(base_frame) {|s|
- pack('side'=>'right', 'fill'=>'y')
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }
- pack('expand'=>'yes', 'fill'=>'both')
-
- #
- family = 'Courier'
-
- if $tk_version =~ /^4.*/
- style_tag_bold = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-O-Normal--*-120-*-*-*-*-*-*')
- style_tag_big = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*', 'kanjifont'=>$msg_kanji_font)
- style_tag_verybig = TkTextTag.new(t, 'font'=>'-*-Helvetica-Bold-R-Normal--*-240-*-*-*-*-*-*')
- # style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*', 'kanjifont'=>$kanji_font)
- style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*')
- else
- style_tag_bold = TkTextTag.new(t, 'font'=>[family, 12, :bold, :italic])
- style_tag_big = TkTextTag.new(t, 'font'=>[family, 14, :bold])
- style_tag_verybig = TkTextTag.new(t, 'font'=>['Helvetica', 24, :bold])
- style_tag_small = TkTextTag.new(t, 'font'=>'Times 8 bold')
- end
-###
-# case($tk_version)
-# when /^4.*/
-# style_tag_big = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*', 'kanjifont'=>$msg_kanji_font)
-# style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*', 'kanjifont'=>$kanji_font)
-# when /^8.*/
-# unless $style_demo_do_first
-# $style_demo_do_first = true
-# Tk.tk_call('font', 'create', '@bigascii',
-# '-copy', '-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*')
-# Tk.tk_call('font', 'create', '@smallascii',
-# '-copy', '-Adobe-Helvetica-Bold-R-Normal-*-100-*')
-# Tk.tk_call('font', 'create', '@cBigFont',
-# '-compound', '@bigascii @msg_knj')
-# Tk.tk_call('font', 'create', '@cSmallFont',
-# '-compound', '@smallascii @kanji')
-# end
-# style_tag_big = TkTextTag.new(t, 'font'=>'@cBigFont')
-# style_tag_small = TkTextTag.new(t, 'font'=>'@cSmallFont')
-# end
-
- #
- if TkWinfo.depth($root).to_i > 1
- style_tag_color1 = TkTextTag.new(t, 'background'=>'#a0b7ce')
- style_tag_color2 = TkTextTag.new(t, 'foreground'=>'red')
- style_tag_raised = TkTextTag.new(t, 'relief'=>'raised', 'borderwidth'=>1)
- style_tag_sunken = TkTextTag.new(t, 'relief'=>'sunken', 'borderwidth'=>1)
- else
- style_tag_color1 = TkTextTag.new(t, 'background'=>'black',
- 'foreground'=>'white')
- style_tag_color2 = TkTextTag.new(t, 'background'=>'black',
- 'foreground'=>'white')
- style_tag_raised = TkTextTag.new(t, 'background'=>'white',
- 'relief'=>'raised', 'borderwidth'=>1)
- style_tag_sunken = TkTextTag.new(t, 'background'=>'white',
- 'relief'=>'sunken', 'borderwidth'=>1)
- end
-
- #
- if $tk_version =~ /^4\.[01]/
- style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
- 'bgstipple'=>'gray25')
- else
- style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
- 'bgstipple'=>'gray12')
- end
- style_tag_fgstipple = TkTextTag.new(t, 'fgstipple'=>'gray50')
- style_tag_underline = TkTextTag.new(t, 'underline'=>'on')
- style_tag_overstrike = TkTextTag.new(t, 'overstrike'=>'on')
- style_tag_right = TkTextTag.new(t, 'justify'=>'right')
- style_tag_center = TkTextTag.new(t, 'justify'=>'center')
- if $tk_version =~ /^4.*/
- style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*')
- style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*')
- else
- style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>[family, 10])
- style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>[family, 10])
- end
- style_tag_margins = TkTextTag.new(t, 'lmargin1'=>'12m', 'lmargin2'=>'6m',
- 'rmargin'=>'10m')
- style_tag_spacing = TkTextTag.new(t, 'spacing1'=>'10p', 'spacing2'=>'2p',
- 'lmargin1'=>'12m', 'lmargin2'=>'6m',
- 'rmargin'=>'10m')
-
- #
- insert('end', 'Text widgets like this one allow you to display information in a
-variety of styles. Display styles are controlled using a mechanism
-called ')
- insert('end', 'tags', style_tag_big)
- insert('end', '. Tags are just textual names that you can apply to one
-or more ranges of characters within a text widget. You can configure
-tags with various display styles. If you do this, then the tagged
-characters will be displayed with the styles you chose. The
-available display styles are:
-')
- insert('end', "\n1. Font.", style_tag_big)
- insert('end', " You can choose any X font, ")
- insert('end', "large", style_tag_verybig)
- insert('end', " or ")
- insert('end', "small", style_tag_small)
- insert('end', ".\n")
- insert('end', "\n2. Color.", style_tag_big)
- insert('end', " You can change either the ")
- insert('end', "background", style_tag_color1)
- insert('end', " or ")
- insert('end', "foreground", style_tag_color2)
- insert('end', "\ncolor, or ")
- insert('end', "both", style_tag_color1, style_tag_color2)
- insert('end', ".\n")
- insert('end', "\n3. Stippling.", style_tag_big)
- insert('end', " You can cause either the ")
- insert('end', "background", style_tag_bgstipple)
- insert('end', " or ")
- insert('end', "foreground", style_tag_fgstipple)
- insert('end', "\ninformation to be drawn with a stipple fill instead of a solid fill.\n")
- insert('end', "\n4. Underlining.", style_tag_big)
- insert('end', " You can ")
- insert('end', "underline", style_tag_underline)
- insert('end', " ranges of text.\n")
- insert('end', "\n5. Overstrikes.", style_tag_big)
- insert('end', " You can ")
- insert('end', "draw lines through", style_tag_overstrike)
- insert('end', " ranges of text.\n")
- insert('end', "\n6. 3-D effects.", style_tag_big)
- insert('end', " You can arrange for the background to be drawn\nwith a border that makes characters appear either\n")
- insert('end', "raised", style_tag_raised)
- insert('end', " or ")
- insert('end', "sunken", style_tag_sunken)
- insert('end', ".\n")
- insert('end', "\n7. Justification.", style_tag_big)
- insert('end', " You can arrange for lines to be displayed\n")
- insert('end', "left-justified,\n")
- insert('end', "right-justified, or\n", style_tag_right)
- insert('end', "centered.\n", style_tag_center)
- insert('end', "\n8. Superscripts and subscripts.", style_tag_big)
- insert('end', " You can control the vertical\n")
- insert('end', "position of text to generate superscript effects like 10")
- insert('end', "n", style_tag_super)
- insert('end', " or\nsubscript effects like X")
- insert('end', "i", style_tag_sub)
- insert('end', ".\n")
- insert('end', "\n9. Margins.", style_tag_big)
- insert('end', " You can control the amount of extra space left")
- insert('end', " on\neach side of the text:\n")
- insert('end', "This paragraph is an example of the use of ", style_tag_margins)
- insert('end', "margins. It consists of a single line of text ", style_tag_margins)
- insert('end', "that wraps around on the screen. There are two ", style_tag_margins)
- insert('end', "separate left margin values, one for the first ", style_tag_margins)
- insert('end', "display line associated with the text line, ", style_tag_margins)
- insert('end', "and one for the subsequent display lines, which ", style_tag_margins)
- insert('end', "occur because of wrapping. There is also a ", style_tag_margins)
- insert('end', "separate specification for the right margin, ", style_tag_margins)
- insert('end', "which is used to choose wrap points for lines.\n", style_tag_margins)
- insert('end', "\n10. Spacing.", style_tag_big)
- insert('end', " You can control the spacing of lines with three\n")
- insert('end', "separate parameters. \"Spacing1\" tells how much ")
- insert('end', "extra space to leave\nabove a line, \"spacing3\" ")
- insert('end', "tells how much space to leave below a line,\nand ")
- insert('end', "if a text line wraps, \"spacing2\" tells how much ")
- insert('end', "space to leave\nbetween the display lines that ")
- insert('end', "make up the text line.\n")
- insert('end', "These indented paragraphs illustrate how spacing ", style_tag_spacing)
- insert('end', "can be used. Each paragraph is actually a ", style_tag_spacing)
- insert('end', "single line in the text widget, which is ", style_tag_spacing)
- insert('end', "word-wrapped by the widget.\n", style_tag_spacing)
- insert('end', "Spacing1 is set to 10 points for this text, ", style_tag_spacing)
- insert('end', "which results in relatively large gaps between ", style_tag_spacing)
- insert('end', "the paragraphs. Spacing2 is set to 2 points, ", style_tag_spacing)
- insert('end', "which results in just a bit of extra space ", style_tag_spacing)
- insert('end', "within a paragraph. Spacing3 isn't used ", style_tag_spacing)
- insert('end', "in this example.\n", style_tag_spacing)
- insert('end', "To see where the space is, select ranges of ", style_tag_spacing)
- insert('end', "text within these paragraphs. The selection ", style_tag_spacing)
- insert('end', "highlight will cover the extra space.", style_tag_spacing)
-
-}
-
-txt.width 70
-txt.height 32
diff --git a/ext/tk/sample/demos-en/tcolor b/ext/tk/sample/demos-en/tcolor
deleted file mode 100644
index 48cda6d1da..0000000000
--- a/ext/tk/sample/demos-en/tcolor
+++ /dev/null
@@ -1,526 +0,0 @@
-#!/usr/bin/env ruby
-#
-# tcolor --
-# simple color editor which supports RGB, HSB and CYM color space
-#
-# Copyright (C) 1998 Takaaki Tateishi(ttate@jaist.ac.jp)
-# last update: Thu Jun 18 06:32:35 JST 1998
-#
-
-require "tk"
-
-
-# use TkVariable instance for the variable which is changed by Tk interpreter
-
-$colorSpace = TkVariable.new(:rgb)
-$master = nil
-$red = 65535
-$green = 0
-$blue = 0
-$color = "#ffff00000000"
-$updating = TkVariable.new(0)
-$autoUpdate = TkVariable.new(1)
-$name = TkVariable.new($color)
-$command = TkVariable.new("print(%%,\"\n\")")
-# $command = TkVariable.new("")
-$label1 = TkVariable.new("label1")
-$label2 = TkVariable.new("label2")
-$label3 = TkVariable.new("label3")
-
-
-# setup the entry of the resourc database
-if (TkVarAccess.new('tcl_platform')['platform'] == 'unix')
- TkOptionDB.add('*Entry.background', 'white')
-end
-
-
-# methods for events
-
-def rgbToHsv(red,green,blue)
-
- if ( red > green )
- max = red
- min = green
- else
- max = green
- min = red
- end
-
- if ( blue > max )
- max = blue
- else
- if ( blue < min )
- min = blue
- end
- end
-
- range = max - min
-
- if ( max == 0 )
- sat = 0.0
- else
- sat = (max-min)/max
- end
-
- if ( sat == 0 )
- hue = 0.0
- else
- rc = (max-red)/range
- gc = (max-green)/range
- bc = (max-blue)/range
- if ( red == max )
- hue = 0.166667 * (bc - gc)
- else
- if ( green == max )
- hue = 0.166667 * (2.0 + rc - bc)
- else
- hue = 0.166667 * (4.0 + gc - rc)
- end
- end
- if ( hue < 0.0 )
- hue = hue + 1.0
- end
- end
-
- [hue,sat,max/65535]
-end
-
-
-def hsbToRgb(hue,sat,value)
- v = 65535.0 * value
- if( sat == 0 )
- ans = [v,v,v]
- else
- hue = hue*6.0
- if ( hue >= 6 )
- hue = 0.0
- end
- i = hue.to_i
- f = hue - i
- p = 65535.0 * value * (1.0 - sat)
- q = 65535.0 * value * (1.0 - (sat * f))
- t = 65535.0 * value * (1.0 - (sat * (1.0 - f)))
- case i
- when 0
- ans = [v,t,p]
- when 1
- ans = [q,v,p]
- when 2
- ans = [p,v,t]
- when 3
- ans = [p,q,v]
- when 4
- ans = [t,p,v]
- when 5
- ans = [v,p,q]
- else
- raise(eException,"i value #{i} is out of range")
- end
- end
- return ans
-end
-
-
-def _null_binding
- Module.new.instance_eval{binding}
-end
-private :_null_binding
-
-def doUpdate
- newCmd = $command.to_s.gsub("%%","\"#{$color}\"")
- eval(newCmd, _null_binding)
-end
-
-
-def tc_scaleChanged
- if( $updating.to_i == 1 )
- return
- end
-
- $master = :scale if $master == nil
-
- scale1 = $root.middle.middle.scale1
- scale2 = $root.middle.middle.scale2
- scale3 = $root.middle.middle.scale3
-
- case $colorSpace.value.intern
- when :rgb
- $red = (scale1.get * 65.535).to_i
- $green = (scale2.get * 65.535).to_i
- $blue = (scale3.get * 65.535).to_i
- when :cmy
- $red = (65535 - scale1.get * 65.535).to_i
- $green = (65535 - scale2.get * 65.535).to_i
- $blue = (65535 - scale3.get * 65.535).to_i
- when :hsb
- list = hsbToRgb(scale1.get / 1000.0,
- scale2.get / 1000.0,
- scale3.get / 1000.0)
- $red = list[0]
- $green = list[1]
- $blue = list[2]
- else
- raise(Exception,"unknown colorSpace")
- end
- $color = format("#%04x%04x%04x",$red.to_i,$green.to_i,$blue.to_i)
- $name.value = $color if $master == :scale
- $root.middle.right.set_color($color)
- if( $autoUpdate.to_i == 1 )
- doUpdate
- end
- Tk.update(true)
- $master = nil if $master == :scale
-end
-
-
-def tc_setScales
- $updating.value = 1
-
- scale1 = $root.middle.middle.scale1
- scale2 = $root.middle.middle.scale2
- scale3 = $root.middle.middle.scale3
-
- case $colorSpace.value.intern
- when :rgb
- scale1.set($red / 65.535)
- scale2.set($green / 65.535)
- scale3.set($blue / 65.535)
- when :cmy
- scale1.set((65535 - $red) / 65.535)
- scale2.set((65535 - $green) / 65.535)
- scale3.set((65535 - $blue) / 65.535)
- when :hsb
- list = rgbToHsv($red,$green,$blue)
- scale1.set( list[0] * 1000.0 )
- scale2.set( list[1] * 1000.0 )
- scale3.set( list[2] * 1000.0 )
- else
- raise(Exception,"unknown colorSpace")
- end
-
- $updating.value = 0
-end
-
-
-def tc_loadNamedColor(name)
- $name.value = name
- $master = :name if $master == nil
- if name[0,1] != "#"
- list = TkWinfo.rgb($root.middle.right.swatch,name)
- $red = list[0]
- $green = list[1]
- $blue = list[2]
- else
- case name.length
- when 4
- fmt = /#(.{1})(.{1})(.{1})/
- shift = 12
- when 7
- fmt = /#(.{2})(.{2})(.{2})/
- shift = 8
- when 10
- fmt = /#(.{3})(.{3})(.{3})/
- shift = 4
- when 13
- fmt = /#(.{4})(.{4})(.{4})/
- shift = 0
- else
- raise(eException,"syntax error in color name \"#{name}\"")
- end
- name.scan(fmt){|strlist|
- if strlist.length != 3
- raise(eException,"syntax error in color name \"#{name}\"")
- end
- $red = strlist[0].hex
- $green = strlist[1].hex
- $blue = strlist[2].hex
- }
- $red = $red << shift
- $green = $green << shift
- $blue = $blue << shift
- end
-
- tc_setScales
- $color = format("#%04x%04x%04x",$red,$green,$blue)
- $root.middle.right.set_color($color)
- if $autoUpdate.to_i == 1
- doUpdate
- end
- Tk.update(true)
- $master = nil if $master == :name
-end
-
-
-def changeColorSpace(space)
- case space
- when :rgb
- $label1.value = "Red"
- $label2.value = "Green"
- $label3.value = "Blue"
- when :cmy
- $label1.value = "Cyan"
- $label2.value = "Magenta"
- $label3.value = "Yellow"
- when :hsb
- $label1.value = "Hue"
- $label2.value = "Saturation"
- $label3.value = "Brightness"
- end
- tc_setScales
-end
-
-
-# menu
-
-class TkColorMenuFrame<TkFrame
- def initialize(parent)
- super(parent,
- "relief"=>"raised",
- "borderwidth"=>"2")
-
- # File menubutton
- @file = TkMenubutton.new(self){|button|
-
- # File menu
- @file_menu = TkMenu.new(button){
- add "radio",
- "label" => "RGB color space",
- "variable" => $colorSpace,
- "value" => :rgb,
- "underline" => "0",
- "command" => proc{changeColorSpace(:rgb)}
- add "radio",
- "label" => "CMY color space",
- "variable" => $colorSpace,
- "value" => :cmy,
- "underline" => "0",
- "command" => proc{changeColorSpace(:cmy)}
- add "radio",
- "label" => "HSB color space",
- "variable" => $colorSpace,
- "value" => :hsb,
- "underline" => "0",
- "command" => proc{changeColorSpace(:hsb)}
- add "separator"
- add "radio",
- "label" => "Automatic updates",
- "variable" => $autoUpdate,
- "value" => "1",
- "underline" => "0"
- add "radio",
- "label" => "Manual updates",
- "variable" => $autoUpdate,
- "value" => "0",
- "underline" => "0"
- add "separator"
- add "command",
- "label" => "Exit program",
- "underline" => "0",
- "command" => proc{exit}
- }
-
- # assign File menu to File button
- menu @file_menu
-
- text "File"
- underline "0"
- }.pack("side"=>"left")
-
- self
- end
-end
-
-
-# bottom frame
-class TkColorBotFrame<TkFrame
- def initialize(parent)
- super(parent,
- "relief"=> "raised",
- "borderwidth"=> 2)
-
- @commandLabel = TkLabel.new(self,
- "text"=> "Command:")
- @command = TkEntry.new(self,
- "relief"=> "sunken",
- "borderwidth"=> "2",
- "textvariable"=> $command,
- "font"=> "-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*")
- @update = TkButton.new(self,
- "text"=> "Update",
- "command"=> proc{doUpdate})
- @commandLabel.pack("side"=>"left")
- @update.pack("side"=>"right","pady"=>".1c","padx"=>".25c")
- @command.pack("expand"=>"yes","fill"=>"x","ipadx"=>".25c")
-
- self
- end
-end
-
-
-# left side frame of middle level
-class TkColorMiddleLeftFrame<TkFrame
- def initialize(parent)
- super(parent)
-
- for i in ["/usr/local/lib/X11rgb.txt","/usr/lib/X11/rgb.txt",
- "/X11/R5/lib/X11/rgb.txt","/X11/R4/lib/rgb/rgb.txt",
- "/usr/openwin/lib/X11/rgb.txt"]
- if !File.readable?(i)
- next
- end
- f = File.open(i)
- @scroll = TkScrollbar.new(self,
- "orient"=>"vertical",
- "relief"=>"sunken",
- "borderwidth"=>"2")
- @scroll.pack("side"=>"right","fill"=>"y")
- @names = TkListbox.new(self,
- "width"=>"20",
- "height"=>"12",
- "yscrollcommand"=> proc{|first,last| @scroll.set first,last},
- "relief"=>"sunken",
- "borderwidth"=>"2",
- "exportselection"=>"false")
- @scroll.command(proc{|*args| @names.yview(*args)})
- @names.bind("Double-1",proc{
- tc_loadNamedColor(@names.get(@names.curselection))})
- @names.pack("side"=>"left")
- while (line = f.gets)
- line.chop!
- linelist = line.split(/[ \t]+/)
- if linelist.length == 4
- @names.insert("end",linelist[3])
- end
- end
- f.close
- break
- end
-
- self
- end
-end
-
-
-# middle frame of middle level
-class TkColorMiddleMiddleFrame<TkFrame
- attr_reader :scale1, :scale2, :scale3
-
- def initialize(parent)
- super(parent)
-
- @f1 = TkFrame.new(self)
- @f2 = TkFrame.new(self)
- @f3 = TkFrame.new(self)
- @f4 = TkFrame.new(self)
-
- for f in [@f1,@f2,@f3]
- f.pack("side"=>"top","expand"=>"yes")
- end
- @f4.pack("side"=>"top","expand"=>"yes","fill"=>"x")
-
- @label1 = TkLabel.new(self,"textvariable"=>$label1)
- @scale1 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c",
- "orient"=>"horizontal",
- "command"=>proc{tc_scaleChanged})
- @scale1.pack("side"=>"top","anchor"=>"w")
- @label1.pack("side"=>"top","anchor"=>"w")
-
- @label2 = TkLabel.new(self,"textvariable"=>$label2)
- @scale2 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c",
- "orient"=>"horizontal",
- "command"=>proc{tc_scaleChanged})
- @scale2.pack("side"=>"top","anchor"=>"w")
- @label2.pack("side"=>"top","anchor"=>"w")
-
- @label3 = TkLabel.new(self,"textvariable"=>$label3)
- @scale3 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c",
- "orient"=>"horizontal",
- "command"=>proc{tc_scaleChanged})
- @scale3.pack("side"=>"top","anchor"=>"w")
- @label3.pack("side"=>"top","anchor"=>"w")
-
- @nameLabel = TkLabel.new(self,"text"=>"Name:")
- @name = TkEntry.new(self,"relief"=>"sunken","borderwidth"=>"2",
- "textvariable"=>$name,"width"=>"10",
- "font"=>"-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*")
- @nameLabel.pack("side"=>"left")
- @name.pack("side"=>"right", "expand"=>"1", "fill"=>"x")
- @name.bind("Return",proc{tc_loadNamedColor $name.to_s})
-
- self
- end
-end
-
-
-class TkColorMiddleRightFrame<TkFrame
- attr_reader :swatch
-
- def initialize(parent)
- super(parent)
- @swatch = TkFrame.new(self, "width"=>"2c", "height"=>"5c",
- "background"=>$color)
- @value = TkLabel.new(self,
- "text"=>$color,
- "width"=>"13",
- "font"=>"-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*")
- @swatch.pack("side"=>"top","expand"=>"yes","fill"=>"both")
- @value.pack("side"=>"bottom","pady"=>".25c")
-
- self
- end
-
- def set_color(color)
- @swatch["background"] = color
- @value["text"] = color
- end
-end
-
-
-
-# middle level frame
-class TkColorMiddleFrame<TkFrame
- attr_reader :left, :middle, :right
-
- def initialize(parent)
- super(parent,
- "relief"=> "raised",
- "borderwidth"=> "2")
-
- @left = TkColorMiddleLeftFrame.new(self)
- @left.pack("side"=>"left","padx"=>".25c","pady"=>".25c")
-
- @middle = TkColorMiddleMiddleFrame.new(self)
- @middle.pack("side"=>"left","expand"=>"yes","fill"=>"y")
-
- @right = TkColorMiddleRightFrame.new(self)
- @right.pack("side"=>"left","padx"=>".25c","pady"=>".25c","anchor"=>"s")
-
- self
- end
-end
-
-
-class TkColor<TkRoot
- attr_reader :menu, :bottom, :middle
-
- def initialize(*args)
- super(*args)
- @menu = TkColorMenuFrame.new(self)
- @menu.pack("side"=>"top", "fill"=>"x")
-
- @bottom = TkColorBotFrame.new(self)
- @bottom.pack("side"=>"bottom","fill"=>"x")
-
- @middle = TkColorMiddleFrame.new(self)
- @middle.pack("side"=>"top","fill"=>"both")
-
- self
- end
-end
-
-
-$root = TkColor.new
-changeColorSpace :rgb
-
-# start eventloop
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/text.rb b/ext/tk/sample/demos-en/text.rb
deleted file mode 100644
index c44be395b6..0000000000
--- a/ext/tk/sample/demos-en/text.rb
+++ /dev/null
@@ -1,129 +0,0 @@
-# frozen_string_literal: false
-# text.rb
-#
-# This demonstration script creates a text widget that describes
-# the basic editing functions.
-#
-# text (basic facilities) widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($text_demo) && $text_demo
- $text_demo.destroy
- $text_demo = nil
-end
-
-# demo toplevel widget
-$text_demo = TkToplevel.new {|w|
- title("Text Demonstration - Basic Facilities")
- iconname("text")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($text_demo).pack(:fill=>:both, :expand=>true)
-
-# version check
-if ((Tk::TK_VERSION.split('.').collect{|n| n.to_i} <=> [8,4]) < 0)
- undo_support = false
-else
- undo_support = true
-end
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $text_demo
- $text_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'text'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# text
-TkText.new(base_frame){|t|
- relief 'sunken'
- bd 2
- setgrid 1
- height 30
- if undo_support
- undo true
- autoseparators true
- end
- TkScrollbar.new(base_frame) {|s|
- pack('side'=>'right', 'fill'=>'y')
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }
- pack('expand'=>'yes', 'fill'=>'both')
-
- #
- insert('0.0', <<EOT)
-This window is a text widget. It displays one or more lines of text
-and allows you to edit the text. Here is a summary of the things you
-can do to a text widget:
-
-1. Scrolling. Use the scrollbar to adjust the view in the text window.
-
-2. Scanning. Press mouse button 2 in the text window and drag up or down.
-This will drag the text at high speed to allow you to scan its contents.
-
-3. Insert text. Press mouse button 1 to set the insertion cursor, then
-type text. What you type will be added to the widget.
-
-4. Select. Press mouse button 1 and drag to select a range of characters.
-Once you've released the button, you can adjust the selection by pressing
-button 1 with the shift key down. This will reset the end of the
-selection nearest the mouse cursor and you can drag that end of the
-selection by dragging the mouse before releasing the mouse button.
-You can double-click to select whole words or triple-click to select
-whole lines.
-
-5. Delete and replace. To delete text, select the characters you'd like
-to delete and type Backspace or Delete. Alternatively, you can type new
-text, in which case it will replace the selected text.
-
-6. Copy the selection. To copy the selection into this window, select
-what you want to copy (either here or in another application), then
-click button 2 to copy the selection to the point of the mouse cursor.
-
-7. Edit. Text widgets support the standard Motif editing characters
-plus many Emacs editing characters. Backspace and Control-h erase the
-character to the left of the insertion cursor. Delete and Control-d
-erase the character to the right of the insertion cursor. Meta-backspace
-deletes the word to the left of the insertion cursor, and Meta-d deletes
-the word to the right of the insertion cursor. Control-k deletes from
-the insertion cursor to the end of the line, or it deletes the newline
-character if that is the only thing left on the line. Control-o opens
-a new line by inserting a newline character to the right of the insertion
-cursor. Control-t transposes the two characters on either side of the
-insertion cursor. #{
- if undo_support
- undo_text = "Control-z undoes the last editing action performed,\nand "
- case $tk_platform['platform']
- when "unix", "macintosh"
- undo_text << "Control-Shift-z"
- else # 'windows'
- undo_text << "Control-y"
- end
- undo_text << "redoes undone edits."
- else
- ""
- end
-}
-
-8. Resize the window. This widget has been configured with the "setGrid"
-option on, so that if you resize the window it will always resize to an
-even number of characters high and wide. Also, if you make the window
-narrow you can see that long lines automatically wrap around onto
-additional lines so that all the information is always visible.
-EOT
-
- set_insert('0.0')
-}
diff --git a/ext/tk/sample/demos-en/textpeer.rb b/ext/tk/sample/demos-en/textpeer.rb
deleted file mode 100644
index 26f8f9f9b9..0000000000
--- a/ext/tk/sample/demos-en/textpeer.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-# frozen_string_literal: false
-#
-# text widget peering demo (called by 'widget')
-#
-# based on Tcl/Tk8.5.0 widget demos
-
-if defined?($textpeer_demo) && $textpeer_demo
- $textpeer_demo.destroy
- $textpeer_demo = nil
-end
-
-# demo toplevel widget
-$textpeer_demo = TkToplevel.new {|w|
- title("Text Widget Peering Demonstration")
- iconname("textpeer")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($textpeer_demo).pack(:fill=>:both, :expand=>true)
-
-count = [0]
-
-## Define a widget that we peer from; it won't ever actually be shown though
-first = TkText.new(base_frame, :widgetname=>"text#{count[0] += 1}")
-first.insert :end,"This is a coupled pair of text widgets; they are peers to "
-first.insert :end,"each other. They have the same underlying data model, but "
-first.insert :end,"can show different locations, have different current edit "
-first.insert :end,"locations, and have different selections. You can also "
-first.insert :end,"create additional peers of any of these text widgets using "
-first.insert :end,"the Make Peer button beside the text widget to clone, and "
-first.insert :end,"delete a particular peer widget using the Delete Peer "
-first.insert :end,"button."
-
-Tk.update_idletasks ## for 'first' widget
-
-## Procedures to make and kill clones; most of this is just so that the demo
-## looks nice...
-def makeClone(count, win, txt)
- cnt = (count[0] += 1)
- peer = TkText::Peer.new(txt, win, :widgetname=>"text#{cnt}")
- sbar = TkScrollbar.new(win, :widgetname=>"sb#{cnt}")
- peer.yscrollbar sbar
- b1 = TkButton.new(win, :widgetname=>"clone#{cnt}", :text=>'Make Peer',
- :command=>proc{makeClone(count, win, peer)})
- b2 = TkButton.new(win, :widgetname=>"kill#{cnt}", :text=>'Delete Peer',
- :command=>proc{killClone(win, cnt)})
- row = cnt * 2
- TkGrid.configure(peer, sbar, b1, :sticky=>'nsew', :row=>row)
- TkGrid.configure('^', '^', b2, :sticky=>'nsew', :row=>(row+=1))
- TkGrid.configure(b1, b2, :sticky=>'new')
- TkGrid.rowconfigure(win, b2, :weight=>1)
-end
-
-def killClone(win, cnt)
- Tk.destroy("#{win.path}.text#{cnt}", "#{win.path}.sb#{cnt}",
- "#{win.path}.clone#{cnt}", "#{win.path}.kill#{cnt}")
-end
-
-## Now set up the GUI
-makeClone(count, base_frame, first)
-makeClone(count, base_frame, first)
-first.destroy
-
-## See Code / Dismiss buttons
-TkFrame.new(base_frame){|f|
- TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $textpeer_demo.destroy
- $textpeer_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'textpeer'
- }).pack(:side=>:left, :expand=>true)
-
- TkGrid.configure(f, '-', '-', :sticky=>'ew', :row=>5000)
-}
-TkGrid.columnconfigure(base_frame, 0, :weight=>1)
diff --git a/ext/tk/sample/demos-en/timer b/ext/tk/sample/demos-en/timer
deleted file mode 100644
index 6cb7c87e09..0000000000
--- a/ext/tk/sample/demos-en/timer
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/env ruby
-#
-# timer --
-# This script generates a counter with start,stop and reset buttons.
-#
-# Copyright (C) 1998 Takaaki Tateishi (ttate@jaist.ac.jp)
-# last update: Sat Jun 27 12:24:14 JST 1998
-#
-
-require "tk"
-require "thread"
-require "tkafter"
-
-$time = "0.00"
-$m = Mutex.new
-$loop = false
-
-def timer_stop
- $loop = false
- $m.lock
-end
-
-def timer_start
- $loop = true
- $m.unlock
-end
-
-def timer_reset
- $time = "0.00"
- $root.countframe.counter['text'] = $time
-end
-
-def timer_loop
- if $loop
- $time = $time.succ
- $root.countframe.counter['text'] = $time
- end
- Tk.after(10,proc{timer_loop})
-end
-
-
-#
-# thread version
-#
-def timer_loop2
- while true
- $m.lock
- $time = $time.succ
- $root.countframe.counter['text'] = $time
- sleep(0.01)
- $m.unlock
- end
-end
-
-#
-# TkAfter
-#
-def timer_loop3
- if $loop
- $time = $time.succ
- $root.countframe.counter['text'] = $time
- end
-end
-
-
-class CountFrame < TkFrame
- attr_reader :counter
-
- def initialize(parent=nil,keys=nil)
- super(parent,keys)
- @counter = TkLabel.new(self,
- 'text'=>$time,
- 'relief'=>'raised')
- @counter.pack('fill'=>'both')
- self
- end
-end
-
-
-class ButtonFrame < TkFrame
- def initialize(parent=nil,keys=nil)
- super(parent,keys)
-=begin
- @stop = TkButton.new(self,
- 'text'=>'Stop',
- 'command'=>proc{timer_stop})
- @start = TkButton.new(self,
- 'text'=>'Start',
- 'command'=>proc{timer_start})
-=end
- @stop = TkButton.new(self, :text=>'Stop', :state=>:disabled)
- @start = TkButton.new(self, :text=>'Start', :state=>:normal)
-
- @stop.command proc{
- timer_stop
- @start.state(:normal)
- @stop.state(:disabled)
- }
- @start.command proc{
- timer_start
- @stop.state(:normal)
- @start.state(:disabled)
- }
-
- @reset = TkButton.new(self,
- 'text'=>'Reset',
- 'command'=>proc{timer_reset})
- for b in [@stop,@start,@reset]
- b.pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes')
- end
- end
-end
-
-
-class Timer < TkRoot
- attr_reader :countframe
-
- def initialize(*args)
- super(*args)
- @countframe = CountFrame.new(self)
- @buttonframe = ButtonFrame.new(self)
- for f in [@buttonframe,@countframe]
- f.pack('side'=>'top', 'fill'=>'both')
- end
- self
- end
-end
-
-
-$root = Timer.new
-
-#$thread = Thread.start{timer_loop2}
-#timer_loop
-TkAfter.new(10,-1,proc{timer_loop3}).start
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-en/tkencoding.rb b/ext/tk/sample/demos-en/tkencoding.rb
deleted file mode 100644
index 01a11ad7ed..0000000000
--- a/ext/tk/sample/demos-en/tkencoding.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: false
-# -*- ruby -*-
-#
-# tkencoding.rb
-# written by ttate@jaist.ac.jp
-
-class TclTkIp
- alias __eval _eval
- alias __invoke _invoke
- private :__eval
- private :__invoke
-
- attr_accessor :encoding
-
- def _eval(cmd)
- if( @encoding )
- _fromUTF8(__eval(_toUTF8(cmd,@encoding)),@encoding)
- else
- __eval(cmd)
- end
- end
-
- def _invoke(*cmds)
- if( @encoding )
- cmds = cmds.collect{|cmd| _toUTF8(cmd,@encoding)}
- _fromUTF8(__invoke(*cmds),@encoding)
- else
- __invoke(*cmds)
- end
- end
-end
-
-module Tk
- INTERP = TkCore::INTERP
-
- def encoding=(name)
- INTERP.encoding = name
- end
-
- def encoding
- INTERP.encoding
- end
-end
diff --git a/ext/tk/sample/demos-en/toolbar.rb b/ext/tk/sample/demos-en/toolbar.rb
deleted file mode 100644
index 074bb94c1c..0000000000
--- a/ext/tk/sample/demos-en/toolbar.rb
+++ /dev/null
@@ -1,131 +0,0 @@
-# frozen_string_literal: false
-# toolbar.rb --
-#
-# This demonstration script creates a toolbar that can be torn off.
-#
-# based on "Id: toolbar.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($toolbar_demo) && $toolbar_demo
- $toolbar_demo.destroy
- $toolbar_demo = nil
-end
-
-$toolbar_demo = TkToplevel.new {|w|
- title("Ttk Menu Buttons")
- iconname("toolbar")
- positionWindow(w)
-}
-
-base_frame = Ttk::Frame.new($toolbar_demo).pack(:fill=>:both, :expand=>true)
-
-if Tk.windowingsystem != 'aqua'
- msg = Ttk::Label.new(base_frame, :wraplength=>'4i',
- :text=>Tk::UTF8_String.new(<<EOL))
-This is a demonstration of how to do \
-a toolbar that is styled correctly \
-and which can be torn off (this feature requires Tcl/Tk8.5). \
-The buttons are configured to be \\u201Ctoolbar style\\u201D buttons by \
-telling them that they are to use the Toolbutton style. At the left \
-end of the toolbar is a simple marker that the cursor changes to a \
-movement icon over; drag that away from the toolbar to tear off the \
-whole toolbar into a separate toplevel widget. When the dragged-off \
-toolbar is no longer needed, just close it like any normal toplevel \
-and it will reattach to the window it was torn off from.
-EOL
-else
- msg = Ttk::Label.new(base_frame, :wraplength=>'4i',
- :text=>Tk::UTF8_String.new(<<EOL))
-This is a demonstration of how to do \
-a toolbar that is styled correctly. The buttons are configured to \
-be \\u201Ctoolbar style\\u201D buttons by telling them that they are \
-to use the Toolbutton style.
-EOL
-end
-
-## Set up the toolbar hull
-tbar_base = Tk::Frame.new(base_frame, # Must be a standard Tk frame!
- :widgetname=>'toolbar') # for window title
-sep = Ttk::Separator.new(base_frame)
-to_base = Ttk::Frame.new(tbar_base, :cursor=>'fleur')
-if Tk.windowingsystem != 'aqua'
- to = Ttk::Separator.new(to_base, :orient=>:vertical)
- to2 = Ttk::Separator.new(to_base, :orient=>:vertical)
- to.pack(:fill=>:y, :expand=>true, :padx=>2, :side=>:left)
- to2.pack(:fill=>:y, :expand=>true, :side=>:left)
-end
-
-contents = Ttk::Frame.new(tbar_base)
-Tk.grid(to_base, contents, :sticky=>'nsew')
-tbar_base.grid_columnconfigure(contents, :weight=>1)
-contents.grid_columnconfigure(1000, :weight=>1)
-
-if Tk.windowingsystem != 'aqua'
- ## Bindings so that the toolbar can be torn off and reattached
- to_base.bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)}
- to. bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)}
- to2. bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)}
- def tbar_base.tearoff(w, x, y)
- on_win = TkWinfo.containing(x, y)
- return unless (on_win && on_win.path =~ /^#{@path}(\.|$)/)
- self.grid_remove
- w.grid_remove
- self.wm_manage
- # self.wm_title('Toolbar') # if you don't want to use its widget name as a window title.
- self.wm_protocol('WM_DELETE_WINDOW'){ self.untearoff(w) }
- end
- def tbar_base.untearoff(w)
- self.wm_forget
- w.grid
- self.grid
- end
-end
-
-## Some content for the rest of the toplevel
-text = TkText.new(base_frame, :width=>40, :height=>10)
-
-## Toolbar contents
-tb_btn = Ttk::Button.new(tbar_base, :text=>'Button', :style=>'Toolbutton',
- :command=>proc{text.insert(:end, "Button Pressed\n")})
-tb_chk = Ttk::Checkbutton.new(tbar_base, :text=>'Check', :style=>'Toolbutton',
- :variable=>(check = TkVariable.new),
- :command=>proc{
- text.insert(:end, "Check is #{check.value}\n")
- })
-tb_mbtn = Ttk::Menubutton.new(tbar_base, :text=>'Menu')
-tb_combo = Ttk::Combobox.new(tbar_base, :value=>TkFont.families,
- :state=>:readonly)
-tb_mbtn.menu(menu = Tk::Menu.new(tb_mbtn))
-menu.add(:command, :label=>'Just', :command=>proc{text.insert(:end, "Just\n")})
-menu.add(:command, :label=>'An', :command=>proc{text.insert(:end, "An\n")})
-menu.add(:command, :label=>'Example',
- :command=>proc{text.insert(:end, "Example\n")})
-tb_combo.bind('<ComboboxSelected>'){ text.font.family = tb_combo.get }
-
-## Arrange contents
-Tk.grid(tb_btn, tb_chk, tb_mbtn, tb_combo,
- :in=>contents, :padx=>2, :sticky=>'ns')
-Tk.grid(tbar_base, :sticky=>'ew')
-Tk.grid(sep, :sticky=>'ew')
-Tk.grid(msg, :sticky=>'ew')
-Tk.grid(text, :sticky=>'nsew')
-base_frame.grid_rowconfigure(text, :weight=>1)
-base_frame.grid_columnconfigure(text, :weight=>1)
-
-## See Code / Dismiss buttons
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'toolbar'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $toolbar_demo.destroy
- $toolbar_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- Tk.grid(frame, :sticky=>'ew')
-}
diff --git a/ext/tk/sample/demos-en/tree.rb b/ext/tk/sample/demos-en/tree.rb
deleted file mode 100644
index e3e5527f79..0000000000
--- a/ext/tk/sample/demos-en/tree.rb
+++ /dev/null
@@ -1,120 +0,0 @@
-# frozen_string_literal: false
-# tree.rb --
-#
-# This demonstration script creates a toplevel window containing a Ttk
-# tree widget.
-#
-# based on "Id: tree.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($tree_demo) && $tree_demo
- $tree_demo.destroy
- $tree_demo = nil
-end
-
-$tree_demo = TkToplevel.new {|w|
- title("Directory Browser")
- iconname("tree")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($tree_demo).pack(:fill=>:both, :expand=>true)
-
-## Explanatory text
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i',
- :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6],
- :text=><<EOL).pack(:fill=>:x)
-Ttk is the new Tk themed widget set. \
-One of the widgets it includes is a tree widget, \
-which allows the user to browse a hierarchical data-set such as a filesystem. \
-The tree widget not only allows for the tree part itself, \
-but it also supports an arbitrary number of additional columns \
-which can show additional data (in this case, the size of the files \
-found in your filesystem). \
-You can also change the width of the columns \
-by dragging the boundary between them.
-EOL
-
-## See Code / Dismiss
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'tree'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $tree_demo.destroy
- $tree_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-## Code to populate the roots of the tree (can be more than one on Windows)
-def populate_roots(tree)
- TkComm.simplelist(Tk.tk_call('file', 'volumes')).sort.each{|dir|
- populate_tree(tree, tree.insert(nil, :end, :text=>dir,
- :values=>[dir, 'directory']))
- }
-end
-
-## Code to populate a node of the tree
-def populate_tree(tree, node)
- return if tree.get(node, :type) != 'directory'
-
- path = tree.get(node, :fullpath)
- tree.delete(tree.children(node))
- Dir.glob("#{path}/*").sort.each{|f|
- type = File.ftype(f) rescue nil
- id = tree.insert(node, :end,
- :text=>File.basename(f), :values=>[f, type]).id
- if type == 'directory'
- ## Make it so that this node is openable
- tree.insert(id, 0, :text=>'dummy')
- tree.itemconfigure(id, :text=>File.basename(f))
- elsif type == 'file'
- size = File.size(f)
- if size >= 1024*1024*1024
- size = '%.1f GB' % (size.to_f/1024/1024/1024)
- elsif size >= 1024*1024
- size = '%.1f MB' % (size.to_f/1024/1024)
- elsif size >= 1024
- size = '%.1f KB' % (size.to_f/1024)
- else
- size = '%.1f bytes' % (size.to_f/1024)
- end
- tree.set(id, :size, size)
- end
- }
-
- # Stop this code from rerunning on the current node
- tree.set(node, :type, 'processed_directory')
-end
-
-## Create the tree and set it up
-tree = Ttk::Treeview.new(base_frame, :columns=>%w(fullpath type size),
- :displaycolumns=>['size'])
-if Tk.windowingsystem != 'aqua'
- vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame))
- hsb = tree.xscrollbar(Ttk::Scrollbar.new(base_frame))
-else
- vsb = tree.yscrollbar(Tk::Scrollbar.new(base_frame))
- hsb = tree.xscrollbar(Tk::Scrollbar.new(base_frame))
-end
-
-tree.heading_configure('#0', :text=>'Directory Structure')
-tree.heading_configure('size', :text=>'File Size')
-tree.column_configure('size', :stretch=>0, :width=>70)
-populate_roots(tree)
-tree.bind('<TreeviewOpen>', '%W'){|w| populate_tree(w, w.focus_item)}
-
-## Arrange the tree and its scrollbars in the toplevel
-container = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-container.lower
-Tk.grid(tree, vsb, :in=>container, :sticky=>'nsew')
-Tk.grid(hsb, :in=>container, :sticky=>'nsew')
-container.grid_columnconfigure(0, :weight=>1)
-container.grid_rowconfigure(0, :weight=>1)
diff --git a/ext/tk/sample/demos-en/ttkbut.rb b/ext/tk/sample/demos-en/ttkbut.rb
deleted file mode 100644
index e308cdd23f..0000000000
--- a/ext/tk/sample/demos-en/ttkbut.rb
+++ /dev/null
@@ -1,140 +0,0 @@
-# frozen_string_literal: false
-# ttkbut.rb
-#
-# This demonstration script creates a toplevel window containing several
-# simple Ttk widgets, such as labels, labelframes, buttons, checkbuttons and
-# radiobuttons.
-#
-# based on "Id: ttkbut.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttkbut_demo) && $ttkbut_demo
- $ttkbut_demo.destroy
- $ttkbut_demo = nil
-end
-
-$ttkbut_demo = TkToplevel.new {|w|
- title("Simple Ttk Widgets")
- iconname("ttkbut")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ttkbut_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top, :fill=>:x)
-Ttk is the new Tk themed widget set. This is a Ttk themed label, \
-and below are three groups of Ttk widgets in Ttk labelframes. \
-The first group are all buttons that set the current application theme \
-when pressed. The second group contains three sets of checkbuttons, \
-with a separator widget between the sets. Note that the "Enabled" \
-button controls whether all the other themed widgets in this toplevel are \
-in the disabled state. The third group has a collection of linked \
-radiobuttons.
-EOL
-
-## Add buttons for setting the theme
-buttons = Ttk::Labelframe.new(base_frame, :text=>'Buttons')
-# Ttk::Style.theme_names.each{|theme|
-# Ttk::Button.new(buttons, :text=>theme,
-# :command=>proc{Ttk::Style.theme_use theme}).pack(:pady=>2)
-# }
-Ttk.themes.each{|theme|
- Ttk::Button.new(buttons, :text=>theme,
- :command=>proc{Ttk.set_theme theme}).pack(:pady=>2)
-}
-
-## Helper procedure for the top checkbutton
-def setState(root, value, *excepts)
- return if excepts.member?(root)
-
- ## Non-Ttk widgets (e.g. the toplevel) will fail, so make it silent
- begin
- root.state = value
- rescue
- end
-
- ## Recursively invoke on all children of this root that are in the same
- ## toplevel widget
- root.winfo_children.each{|w|
- setState(w, value, *excepts) if w.winfo_toplevel == root.winfo_toplevel
- }
-end
-
-## Set up the checkbutton group
-checks = Ttk::Labelframe.new(base_frame, :text=>'Checkbuttons')
-enabled = TkVariable.new(true)
-e = Ttk::Checkbutton.new(checks, :text=>'Enabled', :variable=>enabled,
- :command=>proc{
- setState($ttkbut_demo,
- ((enabled.bool)? "!disabled" : "disabled"),
- e)
- })
-
-## See ttk_widget(n) for other possible state flags
-sep1 = Ttk::Separator.new(checks)
-sep2 = Ttk::Separator.new(checks)
-
-cheese = TkVariable.new
-tomato = TkVariable.new
-basil = TkVariable.new
-oregano = TkVariable.new
-
-c1 = Ttk::Checkbutton.new(checks, :text=>'Cheese', :variable=>cheese)
-c2 = Ttk::Checkbutton.new(checks, :text=>'Tomato', :variable=>tomato)
-c3 = Ttk::Checkbutton.new(checks, :text=>'Basil', :variable=>basil)
-c4 = Ttk::Checkbutton.new(checks, :text=>'Oregano', :variable=>oregano)
-
-Tk.pack(e, sep1, c1, c2, sep2, c3, c4, :fill=>:x, :pady=>2)
-
-## Set up the radiobutton group
-radios = Ttk::Labelframe.new(base_frame, :text=>'Radiobuttons')
-
-happiness = TkVariable.new
-
-r1 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Great', :value=>'great')
-r2 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Good', :value=>'good')
-r3 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Ok', :value=>'ok')
-r4 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Poor', :value=>'poor')
-r5 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Awful', :value=>'awful')
-
-Tk.pack(r1, r2, r3, r4, r5, :fill=>:x, :padx=>3, :pady=>2)
-
-## See Code / Dismiss
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Variables',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars(base_frame, ['enabled', enabled],
- ['cheese', cheese], ['tomato', tomato],
- ['basil', basil], ['oregano', oregano],
- ['happiness', happiness])
- }),
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkbut'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $ttkbut_demo
- $ttkbut_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x, :expand=>true)
-}
-
-## Arrange things neatly
-f = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-f.lower
-Tk.grid(buttons, checks, radios, :in=>f, :sticky=>'nwe', :pady=>2, :padx=>3)
-f.grid_columnconfigure([0, 1, 2], :weight=>1, :uniform=>:yes)
diff --git a/ext/tk/sample/demos-en/ttkmenu.rb b/ext/tk/sample/demos-en/ttkmenu.rb
deleted file mode 100644
index f84c9138d5..0000000000
--- a/ext/tk/sample/demos-en/ttkmenu.rb
+++ /dev/null
@@ -1,86 +0,0 @@
-# frozen_string_literal: false
-# ttkmenu.rb --
-#
-# This demonstration script creates a toplevel window containing several Ttk
-# menubutton widgets.
-#
-# based on "Id: ttkmenu.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttkmenu_demo) && $ttkmenu_demo
- $ttkmenu_demo.destroy
- $ttkmenu_demo = nil
-end
-
-$ttkmenu_demo = TkToplevel.new {|w|
- title("Ttk Menu Buttons")
- iconname("ttkmenu")
- positionWindow(w)
-}
-
-base_frame = Ttk::Frame.new($ttkmenu_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top, :fill=>:x)
-Ttk is the new Tk themed widget set, \
-and one widget that is available in themed form is the menubutton. \
-Below are some themed menu buttons \
-that allow you to pick the current theme in use. \
-Notice how picking a theme changes the way \
-that the menu buttons themselves look, \
-and that the central menu button is styled differently \
-(in a way that is normally suitable for toolbars). \
-However, there are no themed menus; the standard Tk menus were judged \
-to have a sufficiently good look-and-feel on all platforms, \
-especially as they are implemented as native controls in many places.
-EOL
-
-Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x)
-
-## See Code / Dismiss
-Ttk::Frame.new($ttkmenu_demo) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkmenu'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $ttkmenu_demo.destroy
- $ttkmenu_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-b1 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:above)
-b2 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:left)
-b3 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:right)
-b4 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:flush,
- :style=>Ttk::Menubutton.style('Toolbutton'))
-b5 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:below)
-
-b1.menu(m1 = Tk::Menu.new(b1, :tearoff=>false))
-b2.menu(m2 = Tk::Menu.new(b2, :tearoff=>false))
-b3.menu(m3 = Tk::Menu.new(b3, :tearoff=>false))
-b4.menu(m4 = Tk::Menu.new(b4, :tearoff=>false))
-b5.menu(m5 = Tk::Menu.new(b5, :tearoff=>false))
-
-Ttk.themes.each{|theme|
- m1.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
- m2.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
- m3.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
- m4.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
- m5.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
-}
-
-f = Ttk::Frame.new(base_frame).pack(:fill=>:x)
-f1 = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-f.lower
-
-f.grid_anchor(:center)
-TkGrid('x', b1, 'x', :in=>f, :padx=>3, :pady=>2)
-TkGrid(b2, b4, b3, :in=>f, :padx=>3, :pady=>2)
-TkGrid('x', b5, 'x', :in=>f, :padx=>3, :pady=>2)
diff --git a/ext/tk/sample/demos-en/ttknote.rb b/ext/tk/sample/demos-en/ttknote.rb
deleted file mode 100644
index 7540fde3ce..0000000000
--- a/ext/tk/sample/demos-en/ttknote.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-# frozen_string_literal: false
-# ttknote.rb --
-#
-# This demonstration script creates a toplevel window containing a Ttk
-# notebook widget.
-#
-# based on "Id: ttknote.tcl,v 1.5 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttknote_demo) && $ttknote_demo
- $ttknote_demo.destroy
- $ttknote_demo = nil
-end
-
-$ttknote_demo = TkToplevel.new {|w|
- title("Ttk Notebook Widget")
- iconname("ttknote")
- positionWindow(w)
-}
-
-## See Code / Dismiss
-Ttk::Frame.new($ttknote_demo) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttknote'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $ttknote_demo.destroy
- $ttknote_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-base_frame = Ttk::Frame.new($ttknote_demo).pack(:fill=>:both, :expand=>true)
-
-## Make the notebook and set up Ctrl+Tab traversal
-notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true,
- :padx=>2, :pady=>3)
-notebook.enable_traversal
-
-## Populate the first pane
-f_msg = Ttk::Frame.new(notebook)
-msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'4i',
- :justify=>:left, :anchor=>'n', :text=><<EOL)
-Ttk is the new Tk themed widget set. \
-One of the widgets it includes is the notebook widget, \
-which provides a set of tabs that allow the selection of a group of panels, \
-each with distinct content. \
-They are a feature of many modern user interfaces. \
-Not only can the tabs be selected with the mouse, \
-but they can also be switched between using Ctrl+Tab \
-when the notebook page heading itself is selected. \
-Note that the second tab is disabled, and cannot be selected.
-EOL
-neat = TkVariable.new
-after_id = nil
-msg_b = Ttk::Button.new(f_msg, :text=>'Neat!', :underline=>0,
- :command=>proc{
- neat.value = 'Yeah, I know...'
- Tk.after_cancel(after_id) if after_id
- after_id = Tk.after(500){neat.value = ''}
- })
-msg_b.winfo_toplevel.bind('Alt-n'){ msg_b.focus; msg_b.invoke }
-msg_l = Ttk::Label.new(f_msg, :textvariable=>neat)
-notebook.add(f_msg, :text=>'Description', :underline=>0, :padding=>2)
-Tk.grid(msg_m, '-', :sticky=>'new', :pady=>2)
-Tk.grid(msg_b, msg_l, :pady=>[2, 4])
-f_msg.grid_rowconfigure(1, :weight=>1)
-f_msg.grid_columnconfigure([0, 1], :weight=>1, :uniform=>1)
-
-## Populate the second pane. Note that the content doesn't really matter
-f_disabled = Ttk::Frame.new(notebook)
-notebook.add(f_disabled, :text=>'Disabled', :state=>:disabled)
-
-## Populate the third pane
-f_editor = Ttk::Frame.new(notebook)
-notebook.add(f_editor, :text=>'Text Editor', :underline=>0)
-editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char)
-if Tk.windowingsystem != 'aqua'
- editor_s = editor_t.yscrollbar(Ttk::Scrollbar.new(f_editor))
-else
- editor_s = editor_t.yscrollbar(Tk::Scrollbar.new(f_editor))
-end
-editor_s.pack(:side=>:right, :fill=>:y, :padx=>[0,2], :pady=>2)
-editor_t.pack(:fill=>:both, :expand=>true, :padx=>[2,0], :pady=>2)
diff --git a/ext/tk/sample/demos-en/ttkpane.rb b/ext/tk/sample/demos-en/ttkpane.rb
deleted file mode 100644
index 7eb4c29731..0000000000
--- a/ext/tk/sample/demos-en/ttkpane.rb
+++ /dev/null
@@ -1,214 +0,0 @@
-# frozen_string_literal: false
-# ttkpane.rb --
-#
-# This demonstration script creates a Ttk pane with some content.
-#
-# based on "Id: ttkpane.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttkpane_demo) && $ttkpane_demo
- $ttkpane_demo.destroy
- $ttkpane_demo = nil
-end
-
-$ttkpane_demo = TkToplevel.new {|w|
- title("Themed Nested Panes")
- iconname("ttkpane")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ttkpane_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top, :fill=>:x)
-This demonstration shows off a nested set of themed paned windows. \
-Their sizes can be changed by grabbing the area \
-between each contained pane and dragging the divider.
-EOL
-
-Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x)
-
-## See Code / Dismiss
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkpane'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $ttkpane_demo.destroy
- $ttkpane_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-
-outer = Ttk::Panedwindow.new(frame, :orient=>:horizontal)
-outer.add(in_left = Ttk::Panedwindow.new(outer, :orient=>:vertical))
-outer.add(in_right = Ttk::Panedwindow.new(outer, :orient=>:vertical))
-in_left.add(left_top = Ttk::Labelframe.new(in_left, :text=>'Button'))
-in_left.add(left_bot = Ttk::Labelframe.new(in_left, :text=>'Clocks'))
-in_right.add(right_top = Ttk::Labelframe.new(in_right, :text=>'Progress'))
-in_right.add(right_bot = Ttk::Labelframe.new(in_right, :text=>'Text'))
-if Tk.windowingsystem == 'aqua'
- [left_top, left_bot, right_top, right_bot].each{|w| w.padding(3) }
-end
-
-# Fill the button pane
-Ttk::Button.new(left_top, :text=>'Press Me',
- :command=>proc{
- Tk.messageBox(:type=>'ok', :icon=>'info', :message=>'Ouch!',
- :detail=>'That hurt...', :parent=>base_frame,
- :title=>'Button Pressed')
- }).pack(:padx=>2, :pady=>5)
-
-
-zones_list = [
- [':Europe/Berlin'],
- [':America/Argentina/Buenos_Aires', ':America/Buenos_Aires'],
- [':Africa/Johannesburg'],
- [':Europe/London'],
- [':America/Los_Angeles'],
- [':Europe/Moscow'],
- [':America/New_York'],
- [':Asia/Singapore'],
- [':Australia/Sydney'],
- [':Asia/Tokyo'],
-]
-
-zones = []
-
-# Check tzinfo support
-if $tk_major_ver > 8 || ($tk_major_ver == 8 && $tk_minor_ver >= 5)
- tzinfo = :tcl
-
- # Force a pre-load of all the timezones needed; otherwise can end up
- # poor-looking synch problems!
- zones_list.each{|list|
- list.each{|zone|
- begin
- Tk.tk_call('clock', 'format', '0', '-timezone', zone)
- rescue RuntimeError
- # ignore
- else
- zones << [zone, zone[%r<[^/:]+$>].tr('_', ' ')]
- break
- end
- }
- }
-
-else
- begin
- require 'tzinfo'
- tzinfo = :tzinfo
- rescue Exception
- begin
- require 'tzfile'
- tzinfo = :tzfile
- rescue Exception
- tzinfo = nil
- end
- end
-
- case tzinfo
- when :tzinfo
- zones_list.each{|list|
- list.each{|zone|
- begin
- tz = TZInfo::Timezone.get(zone[%r<[^:]+$>])
- rescue Exception
- # ignore
- else
- zones << [tz, zone[%r<[^/:]+$>].tr('_', ' ')]
- break
- end
- }
- }
-
- when :tzfile
- zones_list.each{|list|
- list.each{|zone|
- begin
- tz = TZFile.create(zone[%r<[^:]+$>])
- rescue Exception
- # ignore
- else
- zones << [tz, zone[%r<[^/:]+$>].tr('_', ' ')]
- break
- end
- }
- }
-
- else
- [ -7, -4, -2, -1, 0, +1, +3, +8, +9, +10 ].each{|zone|
- zones << [zone, 'UTC%+03d00' % zone]
- }
- end
-end
-
-time = TkVariable.new_hash
-
-case tzinfo
-when :tcl
- update_proc = proc{|now, tz, label|
- time[label] = Tk.tk_call('clock', 'format', now.tv_sec,
- '-timezone', tz, '-format', '%T')
- }
-when :tzinfo
- update_proc = proc{|now, tz, label|
- time[label] = tz.utc_to_local(now).strftime('%H:%M:%S')
- }
-when :tzfile
- update_proc = proc{|now, tz, label|
- time[label] = tz.at(now.tv_sec).strftime('%H:%M:%S')
- }
-else
- update_proc = proc{|now, tz, label|
- time[label] = (now + (tz * 3600)).strftime('%H:%M:%S')
- }
-end
-
-# Fill the clocks pane
-zones.each_with_index{|(zone, label), idx|
- Ttk::Separator.new(left_bot).pack(:fill=>:x) if idx > 0
- Ttk::Label.new(left_bot, :text=>label, :anchor=>'w').pack(:fill=>:x)
- Ttk::Label.new(left_bot, :textvariable=>time.ref(label),
- :anchor=>'w').pack(:fill=>:x)
-}
-
-# Timer start
-every = proc{
- now = Time.now.utc
- zones.each{|zone, label| update_proc.call(now, zone, label) }
-}
-TkRTTimer.new(1000, -1, every).start(0, every)
-
-# Fill the progress pane
-Ttk::Progressbar.new(right_top, :mode=>:indeterminate).pack(:fill=>:both, :expand=>true).start
-
-# Fill the text pane
-if Tk.windowingsystem != 'aqua'
- # The trick with the ttk::frame makes the text widget look like it fits with
- # the current Ttk theme despite not being a themed widget itself. It is done
- # by styling the frame like an entry, turning off the border in the text
- # widget, and putting the text widget in the frame with enough space to allow
- # the surrounding border to show through (2 pixels seems to be enough).
- f = Ttk::Frame.new(right_bot, :style=>Ttk::Entry)
- txt = TkText.new(frame, :wrap=>:word, :width=>30, :borderwidth=>0)
- txt.pack(:fill=>:both, :expand=>true, :in=>f, :pady=>2, :padx=>2)
- scr = txt.yscrollbar(Ttk::Scrollbar.new(frame))
- scr.pack(:side=>:right, :fill=>:y, :in=>right_bot)
- f.pack(:fill=>:both, :expand=>true)
- outer.pack(:fill=>:both, :expand=>true)
-else
- txt = TkText.new(frame, :wrap=>:word, :width=>30, :borderwidth=>0)
- scr = txt.yscrollbar(TkScrollbar.new(frame))
- scr.pack(:side=>:right, :fill=>:y, :in=>right_bot)
- txt.pack(:fill=>:both, :expand=>true, :in=>right_bot)
- outer.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>[6, 10])
-end
diff --git a/ext/tk/sample/demos-en/ttkprogress.rb b/ext/tk/sample/demos-en/ttkprogress.rb
deleted file mode 100644
index 09bf398e17..0000000000
--- a/ext/tk/sample/demos-en/ttkprogress.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-# frozen_string_literal: false
-# ttkprogress.rb --
-#
-# This demonstration script creates several progress bar widgets.
-#
-# based on "Id: ttkprogress.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttkprogress_demo) && $ttkprogress_demo
- $ttkprogress_demo.destroy
- $ttkprogress_demo = nil
-end
-
-$ttkprogress_demo = TkToplevel.new {|w|
- title("Progress Bar Demonstration")
- iconname("ttkprogress")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ttkprogress_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=>Tk::UTF8_String.new(<<EOL)).pack(:side=>:top, :fill=>:x)
-Below are two progress bars. \
-The top one is a \\u201Cdeterminate\\u201D progress bar, \
-which is used for showing how far through a defined task the program has got. \
-The bottom one is an \\u201Cindeterminate\\u201D progress bar, \
-which is used to show that the program is busy \
-but does not know how long for. Both are run here in self-animated mode, \
-which can be turned on and off using the buttons underneath.
-EOL
-
-## See Code / Dismiss buttons
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkprogress'}),
- Ttk::Button.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $ttkprogress_demo.destroy
- $ttkprogress_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-
-p1 = Ttk::Progressbar.new(frame, :mode=>:determinate)
-p2 = Ttk::Progressbar.new(frame, :mode=>:indeterminate)
-
-start = Ttk::Button.new(frame, :text=>'Start Progress',
- :command=>proc{ p1.start; p2.start })
-stop = Ttk::Button.new(frame, :text=>'Stop Progress',
- :command=>proc{ p1.stop; p2.stop })
-
-Tk.grid(p1, '-', :pady=>5, :padx=>10)
-Tk.grid(p2, '-', :pady=>5, :padx=>10)
-Tk.grid(start, stop, :padx=>10, :pady=>5)
-start.grid_configure(:sticky=>'e')
-stop.grid_configure(:sticky=>'w')
-frame.grid_columnconfigure(:all, :weight=>1)
-
diff --git a/ext/tk/sample/demos-en/twind.rb b/ext/tk/sample/demos-en/twind.rb
deleted file mode 100644
index a709f0d188..0000000000
--- a/ext/tk/sample/demos-en/twind.rb
+++ /dev/null
@@ -1,292 +0,0 @@
-# frozen_string_literal: false
-# twind.rb
-#
-# This demonstration script creates a text widget with a bunch of
-# embedded windows.
-#
-# text (embedded windows) widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($twind_demo) && $twind_demo
- $twind_demo.destroy
- $twind_demo = nil
-end
-
-# demo toplevel widget
-$twind_demo = TkToplevel.new {|w|
- title("Text Demonstration - Embedded Windows")
- iconname("Embedded Windows")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($twind_demo).pack(:fill=>:both, :expand=>true)
-
-# frame
-$twind_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc{
- tmppath = $twind_demo
- $twind_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc{showCode 'twind'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$twind_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-$twind_text = nil
-TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
- 'relief'=>'sunken') {|f|
- $twind_text = TkText.new(f, 'setgrid'=>'true', 'font'=>$font,
- 'width'=>'70', 'height'=>35, 'wrap'=>'word',
- 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
- TkScrollbar.new(f) {|s|
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }.pack('side'=>'right', 'fill'=>'y')
- }.pack('expand'=>'yes', 'fill'=>'both')
-}.pack('expand'=>'yes', 'fill'=>'both')
-
-#
-$tag_center = TkTextTag.new($twind_text,
- 'justify' =>'center',
- 'spacing1'=>'5m',
- 'spacing3'=>'5m' )
-$tag_buttons = TkTextTag.new($twind_text,
- 'lmargin1'=>'1c',
- 'lmargin2'=>'1c',
- 'rmargin' =>'1c',
- 'spacing1'=>'3m',
- 'spacing2'=>0,
- 'spacing3'=>0 )
-
-$twind_text.insert('end', "A text widget can contain other widgets embedded ")
-$twind_text.insert('end', "it. These are called \"embedded windows\", ")
-$twind_text.insert('end', "and they can consist of arbitrary widgets. ")
-$twind_text.insert('end', "For example, here are two embedded button ")
-$twind_text.insert('end', "widgets. You can click on the first button to ")
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- #text 'ON'
- text 'Turn On'
- command proc{textWindOn $twind_text,$twind_buttons}
- cursor 'top_left_arrow'
- })
-$twind_text.insert('end', " horizontal scrolling, which also turns off ")
-$twind_text.insert('end', "word wrapping. Or, you can click on the second ")
-$twind_text.insert('end', "button to\n")
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- #text 'OFF'
- text 'Turn Off'
- command proc{textWindOff $twind_text}
- cursor 'top_left_arrow'
- })
-
-$twind_text.insert('end', " horizontal scrolling and turn back on word wrapping.\n\n")
-$twind_text.insert('end', "Or, here is another example. If you ")
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text 'Click Here'
- command proc{textWindPlot $twind_text}
- cursor 'top_left_arrow'
- })
-$twind_text.insert('end', " a canvas displaying an x-y plot will appear right here.")
-$mark_plot = TkTextMark.new($twind_text, 'insert')
-$mark_plot.gravity='left'
-$twind_text.insert('end', " You can drag the data points around with the mouse, ")
-$twind_text.insert('end', "or you can click here to ")
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text 'Delete'
- command proc{textWindDel $twind_text}
- cursor 'top_left_arrow'
- })
-
-$twind_text.insert('end', " the plot again.\n\n")
-$twind_text.insert('end', "You may also find it useful to put embedded windows in ")
-$twind_text.insert('end', "a text without any actual text. In this case the ")
-$twind_text.insert('end', "text widget acts like a geometry manager. For ")
-$twind_text.insert('end', "example, here is a collection of buttons laid out ")
-$twind_text.insert('end', "neatly into rows by the text widget. These buttons ")
-$twind_text.insert('end', "can be used to change the background color of the ")
-$twind_text.insert('end', "text widget (\"Default\" restores the color to ")
-$twind_text.insert('end', "its default). If you click on the button labeled ")
-$twind_text.insert('end', "\"Short\", it changes to a longer string so that ")
-$twind_text.insert('end', "you can see how the text widget automatically ")
-$twind_text.insert('end', "changes the layout. Click on the button again ")
-$twind_text.insert('end', "to restore the short string.\n")
-
-
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {|b|
- text 'Default'
- command proc{embDefBg $twind_text}
- cursor 'top_left_arrow'
- $tag_buttons.add('end')
- },
- 'padx'=>3 )
-embToggle = TkVariable.new('Short')
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkCheckButton.new($twind_text) {
- textvariable embToggle
- indicatoron 0
- variable embToggle
- onvalue 'A much longer string'
- offvalue 'Short'
- cursor 'top_left_arrow'
- pady 5
- padx 2
- },
- 'padx'=>3,
- 'pady'=>2 )
-
-[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
- 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
- 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1',
- 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
-].each{|twind_color|
- TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text twind_color
- cursor 'top_left_arrow'
- command proc{$twind_text.bg twind_color}
- },
- 'padx'=>3,
- 'pady'=>2 )
-}
-
-#
-def textWindOn (w,f)
- if defined? $twind_scroll
- begin
- $twind_scroll.destroy
- rescue
- end
- $twind_scroll = nil
- end
-
- base = TkWinfo.parent( TkWinfo.parent(w) )
- $twind_scroll = TkScrollbar.new(base) {|s|
- orient 'horizontal'
- command proc{|*args| w.xview(*args)}
- w.xscrollcommand proc{|first,last| s.set first,last}
- w.wrap 'none'
- pack('after'=>f, 'side'=>'bottom', 'fill'=>'x')
- }
-
- return nil
-end
-
-def textWindOff (w)
- if defined? $twind_scroll
- begin
- $twind_scroll.destroy
- rescue
- end
- $twind_scroll = nil
- end
- w.xscrollcommand ''
- w.wrap 'word'
-end
-
-def textWindPlot (t)
- if (defined? $twind_plot) && TkWinfo.exist?($twind_plot)
- return
- end
-
- $twind_plot = TkCanvas.new(t) {
- relief 'sunken'
- width 450
- height 300
- cursor 'top_left_arrow'
- }
-
- if $tk_version =~ /^4.*/
- font = '-Adobe-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*'
- else
- font = 'Helvetica 18'
- end
-
- TkcLine.new($twind_plot, 100, 250, 400, 250, 'width'=>2)
- TkcLine.new($twind_plot, 100, 250, 100, 50, 'width'=>2)
- TkcText.new($twind_plot, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
-
- (0..10).each {|i|
- x = 100 + (i * 30)
- TkcLine.new($twind_plot, x, 250, x, 245, 'width'=>2)
- TkcText.new($twind_plot, x, 254,
- 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
- }
- (0..5).each {|i|
- y = 250 - (i * 40)
- TkcLine.new($twind_plot, 100, y, 105, y, 'width'=>2)
- TkcText.new($twind_plot, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
- }
-
- for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
- x = 100 + (3*xx)
- y = 250 - (4*yy)/5
- item = TkcOval.new($twind_plot, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
- item.addtag 'point'
- end
-
- $twind_plot.itembind('point', 'Any-Enter',
- proc{$twind_plot.itemconfigure 'current', 'fill', 'red'})
- $twind_plot.itembind('point', 'Any-Leave',
- proc{$twind_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
- $twind_plot.itembind('point', '1',
- proc{|x,y| embPlotDown $twind_plot,x,y}, "%x %y")
- $twind_plot.itembind('point', 'ButtonRelease-1',
- proc{$twind_plot.dtag 'selected'})
- $twind_plot.bind('B1-Motion',
- proc{|x,y| embPlotMove $twind_plot,x,y}, "%x %y")
- while ($twind_text.get($mark_plot) =~ /[ \t\n]/)
- $twind_text.delete $mark_plot
- end
- $twind_text.insert $mark_plot,"\n"
- TkTextWindow.new($twind_text, $mark_plot, 'window'=>$twind_plot)
- $tag_center.add $mark_plot
- $twind_text.insert $mark_plot,"\n"
-end
-
-$embPlot = {'lastX'=>0, 'lastY'=>0}
-
-def embPlotDown (w, x, y)
- w.dtag 'selected'
- w.addtag_withtag 'selected', 'current'
- w.raise 'current'
- $embPlot['lastX'] = x
- $embPlot['lastY'] = y
-end
-
-def embPlotMove (w, x, y)
- w.move 'selected', x - $embPlot['lastX'], y - $embPlot['lastY']
- $embPlot['lastX'] = x
- $embPlot['lastY'] = y
-end
-
-def textWindDel (w)
- if (defined? $twind_text) && TkWinfo.exist?($twind_plot)
- $twind_text.delete $twind_plot
- $twind_plot = nil
- while ($twind_text.get($mark_plot) =~ /[ \t\n]/)
- $twind_text.delete $mark_plot
- end
- $twind_text.insert $mark_plot," "
- end
-end
-
-def embDefBg (w)
- w['background'] = w.configinfo('background')[3]
-end
diff --git a/ext/tk/sample/demos-en/twind2.rb b/ext/tk/sample/demos-en/twind2.rb
deleted file mode 100644
index 4a59a2e613..0000000000
--- a/ext/tk/sample/demos-en/twind2.rb
+++ /dev/null
@@ -1,385 +0,0 @@
-# frozen_string_literal: false
-#
-# text (embedded windows) widget demo 2 (called by 'widget')
-#
-
-# delete toplevel widget
-if defined?($twind2_demo) && $twind2_demo
- $twind2_demo.destroy
- $twind2_demo = nil
-end
-
-# demo toplevel widget
-$twind2_demo = TkToplevel.new {|w|
- title("Text Demonstration - Embedded Windows 2")
- iconname("Embedded Windows")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($twind2_demo).pack(:fill=>:both, :expand=>true)
-
-# frame
-$twind2_buttons = TkFrame.new(base_frame) {|frame|
- TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- TkButton.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'twind2'}),
- TkButton.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $twind2_demo
- $twind2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
- frame.grid_columnconfigure(0, :weight=>1)
-}
-$twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-$twind2_text = nil
-TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
- 'relief'=>'sunken') {|f|
- $twind2_text = TkText.new(f, 'setgrid'=>true, 'font'=>$font,
- # 'width'=>'70', 'height'=>35, 'wrap'=>'word',
- 'width'=>'70', 'height'=>35, 'wrap'=>'char',
- 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
- TkScrollbar.new(f) {|s|
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }.pack('side'=>'right', 'fill'=>'y')
- }.pack('expand'=>'yes', 'fill'=>'both')
-}.pack('expand'=>'yes', 'fill'=>'both')
-
-# text tags
-$tag2_center = TkTextTag.new($twind2_text,
- 'justify' =>'center',
- 'spacing1'=>'5m',
- 'spacing3'=>'5m' )
-$tag2_buttons = TkTextTag.new($twind2_text,
- 'lmargin1'=>'1c',
- 'lmargin2'=>'1c',
- 'rmargin' =>'1c',
- 'spacing1'=>'3m',
- 'spacing2'=>0,
- 'spacing3'=>0 )
-
-# insert text
-$twind2_text.insert('end',
- 'A text widget can contain many different kinds of items, ')
-$twind2_text.insert('end',
- "both active and passive. It can lay these out in various ")
-$twind2_text.insert('end',
- "ways, with wrapping, tabs, centering, etc. In addition, ")
-$twind2_text.insert('end',
- "when the contents are too big for the window, smooth ")
-$twind2_text.insert('end', "scrolling in all directions is provided.\n\n")
-
-$twind2_text.insert('end', "A text widget can contain other widgets embedded ")
-$twind2_text.insert('end', "it. These are called \"embedded windows\", ")
-$twind2_text.insert('end', "and they can consist of arbitrary widgets. ")
-$twind2_text.insert('end', "For example, here are two embedded button ")
-$twind2_text.insert('end', "widgets. You can click on the first button to ")
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text 'ON'
- command proc{textWindOn2 $twind2_text,$twind2_buttons}
- cursor 'top_left_arrow'
- })
-$twind2_text.insert('end', " horizontal scrolling, which also turns off ")
-$twind2_text.insert('end', "word wrapping. Or, you can click on the second ")
-$twind2_text.insert('end', "button to\n")
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text 'OFF'
- command proc{textWindOff2 $twind2_text}
- cursor 'top_left_arrow'
- })
-$twind2_text.insert('end',
- " horizontal scrolling and turn back on word wrapping.\n\n")
-
-$twind2_text.insert('end', "Or, here is another example. If you ")
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text 'Click Here'
- command proc{textWindPlot2 $twind2_text}
- cursor 'top_left_arrow'
- })
-$twind2_text.insert('end',
- " a canvas displaying an x-y plot will appear right here.")
-$mark2_plot = TkTextMark.new($twind2_text, 'insert')
-$mark2_plot.gravity='left'
-$twind2_text.insert('end',
- " You can drag the data points around with the mouse, ")
-$twind2_text.insert('end', "or you can click here to ")
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text 'Delete'
- command proc{textWindDel2 $twind2_text}
- cursor 'top_left_arrow'
- })
-$twind2_text.insert('end', " the plot again.\n\n")
-
-$twind2_text.insert('end',
- "You may also find it useful to put embedded windows in ")
-$twind2_text.insert('end',
- "a text without any actual text. In this case the ")
-$twind2_text.insert('end', "text widget acts like a geometry manager. For ")
-$twind2_text.insert('end',
- "example, here is a collection of buttons laid out ")
-$twind2_text.insert('end',
- "neatly into rows by the text widget. These buttons ")
-$twind2_text.insert('end',
- "can be used to change the background color of the ")
-$twind2_text.insert('end', "text widget (\"Default\" restores the color to ")
-$twind2_text.insert('end',
- "its default). If you click on the button labeled ")
-$twind2_text.insert('end', "\"Short\", it changes to a longer string so that ")
-$twind2_text.insert('end', "you can see how the text widget automatically ")
-$twind2_text.insert('end', "changes the layout. Click on the button again ")
-$twind2_text.insert('end', "to restore the short string.\n")
-
-btn_default = TkButton.new($twind2_text) {|b|
- text 'Default'
- command proc{embDefBg2 $twind2_text}
- cursor 'top_left_arrow'
-}
-TkTextWindow.new($twind2_text, 'end', 'window'=>btn_default, 'padx'=>3)
-embToggle = TkVariable.new('Short')
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkCheckButton.new($twind2_text) {
- textvariable embToggle
- indicatoron 0
- variable embToggle
- onvalue 'A much longer string'
- offvalue 'Short'
- cursor 'top_left_arrow'
- pady 5
- padx 2
- },
- 'padx'=>3,
- 'pady'=>2 )
-
-[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
- 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
- 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1',
- 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
-].each{|twind_color|
- TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text twind_color
- cursor 'top_left_arrow'
- command proc{$twind2_text.bg twind_color}
- },
- 'padx'=>3,
- 'pady'=>2 )
-}
-
-$tag2_buttons.add(btn_default, 'end')
-
-$text_normal2 = {}
-$text_normal2['border'] = $twind2_text.cget('borderwidth')
-$text_normal2['highlight'] = $twind2_text.cget('highlightthickness')
-$text_normal2['pad'] = $twind2_text.cget('padx')
-
-$twind2_text.insert('end', "\nYou can also change the usual border width and ")
-$twind2_text.insert('end', "highlightthickness and padding.\n")
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big borders",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigB2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small borders",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallB2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big highlight",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigH2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small highlight",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallH2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big pad",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigP2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small pad",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallP2 $twind2_text
- }))
-
-$twind2_text.insert('end',
- "\n\nFinally, images fit comfortably in text widgets too:")
-
-TkTextImage.new($twind2_text, 'end',
- 'image'=>TkBitmapImage.new(:file=>[
- $demo_dir, '..',
- 'images', 'face.xbm'
- ].join(File::Separator)))
-
-# methods
-def textWinBigB2(w)
- w.borderwidth 15
-end
-def textWinSmallB2(w)
- w.borderwidth $text_normal2['border']
-end
-def textWinBigH2(w)
- w.highlightthickness 15
-end
-def textWinSmallH2(w)
- w.highlightthickness $text_normal2['highlight']
-end
-def textWinBigP2(w)
- w.configure(:padx=>15, :pady=>15)
-end
-def textWinSmallP2(w)
- w.configure(:padx=>$text_normal2['pad'], :pady=>$text_normal2['pad'])
-end
-
-def textWindOn2 (w,f)
- if defined? $twind2_scroll
- begin
- $twind2_scroll.destroy
- rescue
- end
- $twind2_scroll = nil
- end
-
- base = TkWinfo.parent( TkWinfo.parent(w) )
- $twind2_scroll = TkScrollbar.new(base) {|s|
- orient 'horizontal'
- command proc{|*args| w.xview(*args)}
- w.xscrollcommand proc{|first,last| s.set first,last}
- w.wrap 'none'
- pack('after'=>f, 'side'=>'bottom', 'fill'=>'x')
- }
-
- return nil
-end
-
-def textWindOff2 (w)
- if defined? $twind2_scroll
- begin
- $twind2_scroll.destroy
- rescue
- end
- $twind2_scroll = nil
- end
- w.xscrollcommand ''
- #w.wrap 'word'
- w.wrap 'char'
-end
-
-def textWindPlot2 (t)
- if (defined? $twind2_plot) && (TkWinfo.exist?($twind2_plot))
- return
- end
-
- $twind2_plot = TkCanvas.new(t) {
- relief 'sunken'
- width 450
- height 300
- cursor 'top_left_arrow'
- }
-
- #font = '-Adobe-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*'
- font = 'Helvetica 18'
-
- TkcLine.new($twind2_plot, 100, 250, 400, 250, 'width'=>2)
- TkcLine.new($twind2_plot, 100, 250, 100, 50, 'width'=>2)
- TkcText.new($twind2_plot, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
-
- (0..10).each {|i|
- x = 100 + (i * 30)
- TkcLine.new($twind2_plot, x, 250, x, 245, 'width'=>2)
- TkcText.new($twind2_plot, x, 254,
- 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
- }
- (0..5).each {|i|
- y = 250 - (i * 40)
- TkcLine.new($twind2_plot, 100, y, 105, y, 'width'=>2)
- TkcText.new($twind2_plot, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
- }
-
- for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
- x = 100 + (3*xx)
- y = 250 - (4*yy)/5
- item = TkcOval.new($twind2_plot, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
- item.addtag 'point'
- end
-
- $twind2_plot.itembind('point', 'Any-Enter',
- proc{$twind2_plot.itemconfigure 'current', 'fill', 'red'})
- $twind2_plot.itembind('point', 'Any-Leave',
- proc{$twind2_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
- $twind2_plot.itembind('point', '1',
- proc{|x,y| embPlotDown2 $twind2_plot,x,y}, "%x %y")
- $twind2_plot.itembind('point', 'ButtonRelease-1',
- proc{$twind2_plot.dtag 'selected'})
- $twind2_plot.bind('B1-Motion',
- proc{|x,y| embPlotMove2 $twind2_plot,x,y}, "%x %y")
- while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/)
- $twind2_text.delete $mark2_plot
- end
- $twind2_text.insert $mark2_plot,"\n"
- TkTextWindow.new($twind2_text, $mark2_plot, 'window'=>$twind2_plot)
- $tag2_center.add $mark2_plot
- $twind2_text.insert $mark2_plot,"\n"
-end
-
-$embPlot2 = {'lastX'=>0, 'lastY'=>0}
-
-def embPlotDown2 (w, x, y)
- w.dtag 'selected'
- w.addtag_withtag 'selected', 'current'
- w.raise 'current'
- $embPlot2['lastX'] = x
- $embPlot2['lastY'] = y
-end
-
-def embPlotMove2 (w, x, y)
- w.move 'selected', x - $embPlot2['lastX'], y - $embPlot2['lastY']
- $embPlot2['lastX'] = x
- $embPlot2['lastY'] = y
-end
-
-def textWindDel2 (w)
- if (defined? $twind2_text) && TkWinfo.exist?($twind2_plot)
- $twind2_text.delete $twind2_plot
- $twind2_plot = nil
- while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/)
- $twind2_text.delete $mark2_plot
- end
- $twind2_text.insert $mark2_plot," "
- end
-end
-
-def embDefBg2 (w)
- w['background'] = w.configinfo('background')[3]
-end
diff --git a/ext/tk/sample/demos-en/unicodeout.rb b/ext/tk/sample/demos-en/unicodeout.rb
deleted file mode 100644
index 910dff38b7..0000000000
--- a/ext/tk/sample/demos-en/unicodeout.rb
+++ /dev/null
@@ -1,115 +0,0 @@
-# frozen_string_literal: false
-# unicodeout.rb --
-#
-# This demonstration script shows how you can produce output (in label
-# widgets) using many different alphabets.
-#
-# based on Tcl/Tk8.4.4 widget demos
-
-if defined?($unicodeout_demo) && $unicodeout_demo
- $unicodeout_demo.destroy
- $unicodeout_demo = nil
-end
-
-$unicodeout_demo = TkToplevel.new {|w|
- title("Unicode Label Demonstration")
- iconname("unicodeout")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($unicodeout_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'5.4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-This is a sample of Tk's support for languages that use non-Western \
-character sets. However, what you will actually see below depends \
-largely on what character sets you have installed, and what you see \
-for characters that are not present varies greatly between platforms as well. \
-Please try to click the 'See Code' button, \
-and click the 'Rerun Demo' button after editing \
-(the source file is not changed) \
-the definition of @@font on the Unicodeout_SampleFrame class.
-The strings are written in Tcl using UNICODE characters \
-using the \\uXXXX escape so as to do so in a portable fashion.
-
-ATTENTION:
-The strings are converted to the encoded string objects \
-(completed to rewrite Tcl's escapes) by Tk::UTF8_String method. \
-And the Tk::UTF8_String objects are passed to the label widgets.
-EOL
-
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $unicodeout_demo.destroy
- $unicodeout_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'unicodeout'
- }).pack(:side=>:left, :expand=>true)
-}
-
-wait_msg = TkLabel.new(base_frame,
- :text=>"Please wait while loading fonts...",
- :font=>"Helvetica 12 italic").pack
-
-class Unicodeout_SampleFrame < TkFrame
- @@font = $font
- # @@font = 'Helvetica 14'
- # @@font = 'Courier 12'
- # @@font = 'clearlyu 16'
- # @@font = 'fixed 12'
- # @@font = 'Times 12'
- # @@font = 'Newspaper 12'
- # @@font = '{New century schoolbook} 12'
-
- def initialize(base)
- super(base)
- grid_columnconfig(1, :weight=>1)
- end
-
- def add_sample(lang, *args)
- sample_txt = Tk::UTF8_String(args.join(''))
- l = TkLabel.new(self, :font=>@@font, :text=>lang+':',
- :anchor=>:nw, :pady=>0)
- #s = TkLabel.new(self, :font=>@@font, :text=>sample_txt,
- s = TkLabel.new(self, :font=>TkFont.new(@@font), :text=>sample_txt,
- :anchor=>:nw, :width=>30, :pady=>0)
- Tk.grid(l, s, :sticky=>:ew, :pady=>0)
- l.grid_config(:padx, '1m')
- end
-end
-f = Unicodeout_SampleFrame.new(base_frame)
-f.pack(:expand=>true, :fill=>:both, :padx=>'2m', :pady=>'1m')
-
-# Processing when some characters are missing might take a while, so make
-# sure we're displaying something in the meantime...
-
-oldCursor = $unicodeout_demo.cursor
-$unicodeout_demo.cursor('watch')
-Tk.update
-
-f.add_sample('Arabic',
- '\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94',
- '\uFEE4\uFEE0\uFEDC\uFEDF\uFE8D')
-f.add_sample('Trad. Chinese', '\u4E2D\u570B\u7684\u6F22\u5B57')
-f.add_sample('Simpl. Chinese', '\u6C49\u8BED')
-f.add_sample('Greek',
- '\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ',
- '\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1')
-f.add_sample('Hebrew',
- '\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ',
- '\u05DC\u05D9\u05D0\u05E8\u05E9\u05D9')
-f.add_sample('Japanese',
- '\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ',
- '\u6F22\u5B57\u3068\u30AB\u30BF\u30AB\u30CA')
-f.add_sample('Korean', '\uB300\uD55C\uBBFC\uAD6D\uC758 \uD55C\uAE00')
-f.add_sample('Russian',
- '\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ',
- '\u044F\u0437\u044B\u043A')
-
-wait_msg.destroy
-$unicodeout_demo.cursor(oldCursor)
diff --git a/ext/tk/sample/demos-en/vscale.rb b/ext/tk/sample/demos-en/vscale.rb
deleted file mode 100644
index 2ce522f7be..0000000000
--- a/ext/tk/sample/demos-en/vscale.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-# frozen_string_literal: false
-# vscale.rb
-#
-# This demonstration script shows an example with a vertical scale.
-
-require "tkcanvas"
-
-if defined?($vscale_demo) && $vscale_demo
- $vscale_demo.destroy
- $vscale_demo = nil
-end
-
-$vscale_demo = TkToplevel.new {|w|
- title("Vertical Scale Demonstration")
- iconname("vscale")
-}
-positionWindow($vscale_demo)
-
-base_frame = TkFrame.new($vscale_demo).pack(:fill=>:both, :expand=>true)
-
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '3.5i'
- justify 'left'
- text "An arrow and a vertical scale are displayed below. If you click or drag mouse button 1 in the scale, you can change the size of the arrow."
-}
-msg.pack('side'=>'top', 'padx'=>'.5c')
-
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- text 'Dismiss'
- command proc {
- tmppath = $vscale_demo
- $vscale_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'Show Code'
- command proc { showCode 'vscale' }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-def setHeight(w, height)
- height = height + 21
- y2 = height - 30
- if y2 < 21
- y2 = 21
- end
- w.coords 'poly',15,20,35,20,35,y2,45,y2,25,height,5,y2,15,y2,15,20
- w.coords 'line',15,20,35,20,35,y2,45,y2,25,height,5,y2,15,y2,15,20
-end
-
-TkFrame.new(base_frame) {|frame|
- borderwidth 10
- canvas = TkCanvas.new(frame) {|c|
- width 50
- height 50
- bd 0
- highlightthickness 0
- TkcPolygon.new(c, 0, 0, 1, 1, 2, 2) {
- fill 'SeaGreen3'
- tags 'poly'
- }
- TkcLine.new(c, 0, 0, 1, 1, 2, 2, 0, 0) {
- fill 'black'
- tags 'line'
- }
- }.pack('side'=>'left', 'anchor'=>'nw', 'fill'=>'y')
- scale = TkScale.new(frame) {
- orient 'vertical'
- length 284
- from 0
- to 250
- command proc{|value| setHeight(canvas, value)}
- tickinterval 50
- }.pack('side'=>'left', 'anchor'=>'ne')
- scale.set 75
-}.pack
diff --git a/ext/tk/sample/demos-en/widget b/ext/tk/sample/demos-en/widget
deleted file mode 100644
index fb49a746b9..0000000000
--- a/ext/tk/sample/demos-en/widget
+++ /dev/null
@@ -1,1087 +0,0 @@
-#!/usr/bin/env ruby
-
-# widget --
-# This script demonstrates the various widgets provided by Tk,
-# along with many of the features of the Tk toolkit. This file
-# only contains code to generate the main window for the
-# application, which invokes individual demonstrations. The
-# code for the actual demonstrations is contained in separate
-# ".rb" files is this directory, which are sourced by this script
-# as needed.
-
-require 'tk'
-# require 'tkafter'
-
-### $DEBUG=1 ##########
-
-$RubyTk_WidgetDemo = true
-
-#----------------------------------------------------------------
-# The code below create the main window, consisting of a menu bar
-# and a text widget that explains how to use the program, plus lists
-# all of the demos as hypertext items.
-#----------------------------------------------------------------
-
-# widget demo directory
-# $demo_dir = File.dirname($0)
-$demo_dir = File.dirname(__FILE__)
-
-# root
-$root = TkRoot.new{title "Ruby/Tk Widget Demonstration"}
-
-# tk
-$tk_version = Tk::TK_VERSION
-$tk_major_ver, $tk_minor_ver = $tk_version.split('.').map{|n| n.to_i}
-$tk_patchlevel = Tk::TK_PATCHLEVEL
-
-# tcl_platform
-$tk_platform = TkVarAccess.new('tcl_platform')
-
-#
-case($tk_version)
-when /^4.*/
- $font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*', nil)
-else
- $font = TkFont.new('Helvetica -12')
-end
-
-# images
-$image = {}
-
-if $tk_major_ver >= 8
-$image['refresh'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><<EOD)
- R0lGODlhEAAQAPMAAMz/zCpnKdb/1z9mPypbKBtLGy9NMPL/9Or+6+P+4j1Y
- PwQKBP7//xMLFAYBCAEBASH5BAEAAAAALAAAAAAQABAAAwR0EAD3Gn0Vyw0e
- ++CncU7IIAezMA/nhUqSLJizvSdCEEjy2ZIV46AwDAoDHwPYGSoEiUJAAGJ6
- EDHBNCFINW5OqABKSFk/B9lUa94IDwIFgewFMwQDQwCZQCztTgM9Sl8SOEMG
- KSAthiaOjBMPDhQONBiXABEAOw==
-EOD
-end
-
-if $tk_major_ver >= 8
-$image['view'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><<EOD)
- R0lGODlhEAAQAPMAAMz/zP///8DAwICAgH9/fwAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAwRIcMhJB7h3hM33
- KFjWdQQYap1QrCaGBmrRrS4nj5b53jOgbwXBKGACoYLDIuAoHCmZyYvR1rT5
- RMAq8LqcIYGsrjPsW1XOmFUEADs=
-EOD
-end
-
-if $tk_major_ver >= 8
-$image['delete'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><<EOD)
- R0lGODlhEAAOAKEAAIQAAO/n3v///////yH5BAEKAAIALAAAAAAQAA4AAAIm
- lI9pA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAACH5BAEAAEEALAAAAAAaABMAQAj/AIMIHBhkg0GC
- CBMGIQEiQgseQT4oeCBBAokgRYYQ0JBixg8hRIiUUEBBYYmTByBwiCBCRYwH
- CxY8cKFw4AogRXLqLAJkQ80gCBBg3BkxZswTNGh4MGqgQQUMJRHCwMkTSE+D
- Pn8eCKBhxIMhO3ei2OHDBw6sWSlMMMoWgwwfMDZI8GBjx44NARZwEGGi5MkS
- PcIWKRGz5YgLbAco+KkQBQoJIRgjdGEVq+SaJajqtNrzMgsPCmoIzqmDgmWE
- KOBuUKAAwYabYTfs4OHjY0giGyhk4MAWRI4eKyRQqPgggYUXPH4A+XBAgwoK
- DiIsCFxjA9sFEVQQCRJCAYAFDJxiKhAxvMTonEFimrhhYinTBgWiCvxLNX3M
- DkkpsKV5OYhjBxCMYAICAigUEAA7
-EOD
-end
-
-#
-if $tk_major_ver >= 8
- $root.add_menubar([[['File', 0],
- ['About ... ', proc{aboutBox}, 0, '<F1>'],
- '---',
- ['Quit', proc{exit}, 0, 'Ctrl-Q']
- ]])
-else
- TkMenubar.new($root,
- [[['File', 0],
- ['About ... ', proc{aboutBox}, 0, '<F1>'],
- '---',
- ['Quit', proc{exit}, 0, 'Ctrl-Q']
- ]]).pack('side'=>'top', 'fill'=>'x')
-end
-$root.bind('F1', proc{aboutBox})
-$root.bind('Control-q', proc{exit})
-
-=begin
-TkFrame.new($root){|frame|
- TkMenubutton.new(frame){|button|
- m = TkMenu.new(button) {
- add 'command', 'label'=>'Quit', 'command'=>proc{exit}, 'underline'=>0
- }
- menu m
- text 'File'
- underline 0
- }.pack('side'=>'left')
-}.pack('side'=>'top', 'fill'=>'x')
-=end
-
-#
-if $tk_version =~ /^4\.[01]/
- scr = TkScrollbar.new($root, 'orient'=>'vertical')
- txt = TkText.new($root) {
- wrap 'word'
- width 70
- height 30
- font $font
- setgrid 'yes'
- yscrollcommand proc{|first,last| scr.set first,last}
- }
- scr.command(proc{|*args| txt.yview(*args)})
- scr.pack('side'=>'right', 'fill'=>'y')
- txt.pack('expand'=>'yes', 'fill'=>'both')
-else
- textFrame = TkFrame.new($root)
- scr = TkScrollbar.new($root, 'orient'=>'vertical',
- 'highlightthickness'=>0, 'takefocus'=>1) {
- pack('in'=>textFrame, 'side'=>'right', 'fill'=>'y', 'padx'=>1)
- }
- txt = TkText.new($root) {
- wrap 'word'
- width 70
- height 30
- font $font
- setgrid 'yes'
- highlightthickness 0
- padx 4
- pady 2
- takefocus 0
- bd 1
- yscrollcommand proc{|first,last| scr.set first,last}
- }
- scr.command(proc{|*args| txt.yview(*args)})
-# txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both', 'padx'=>1)
-# txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both')
-# textFrame.pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>2)
- textFrame.pack('expand'=>'yes', 'fill'=>'both')
- # $root.withdraw.deiconify
- Tk.update_idletasks
- txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both')
-
- statusBar = TkFrame.new($root) {|f|
- if $tk_version =~ /^4.*/
- statusfont = '-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*'
- else
- statusfont = 'Helvetica 10'
- end
- $statusBarLabel = \
- TkLabel.new(f, 'text'=>" ", 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w',
- 'font'=>statusfont) \
- .pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both')
- TkLabel.new(f, 'width'=>8, 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w',
- 'font'=>statusfont) \
- .pack('side'=>'left', 'padx'=>2)
- }.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
-end
-
-# Create a bunch of tags to use in the text widget, such as those for
-# section titles and demo descriptions. Also define the bindings for
-# tags.
-
-if $tk_version =~ /^4.*/
- tag_title = TkTextTag.new(txt, 'font'=>'-*-Helvetica-Bold-R-Normal--*-180-*-*-*-*-*-*')
-else
- tag_title = TkTextTag.new(txt, 'font'=>'Helvetica 18 bold')
-end
-
-# We put some "space" characters to the left and right of each demo description
-# so that the descriptions are highlighted only when the mouse cursor
-# is right over them (but not when the cursor is to their left or right)
-
-tag_demospace = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c')
-
-if TkWinfo.depth($root) == 1
- tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'underline'=>1)
- $tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'underline'=>1)
- tag_hot = TkTextTag.new(txt, 'background'=>'black', 'foreground'=>'white')
-else
- tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'foreground'=>'blue', 'underline'=>1)
- $tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'foreground'=>'#303080', 'underline'=>1)
-# tag_hot = TkTextTag.new(txt, 'relief'=>'raised', 'borderwidth'=>1,
-# 'background'=>'SeaGreen3')
- tag_hot = TkTextTag.new(txt, 'borderwidth'=>1, 'foreground'=>'red')
-end
-
-#tag_demo.bind('Button-1', proc{invoke txt, txt.index('current')})
-tag_demo.bind('ButtonRelease-1',
- proc{|x,y|invoke txt, txt.index("@#{x},#{y}")}, '%x %y')
-
-lastLine = TkVariable.new("")
-newLine = TkVariable.new("")
-tag_demo.bind('Enter', proc{|x,y|
- lastLine.value = txt.index("@#{x},#{y} linestart")
- tag_hot.add(lastLine.value, "#{lastLine.value} lineend")
- showStatus txt, txt.index("@#{x},#{y}")
- },
- '%x %y')
-tag_demo.bind('Leave',
- proc{
- tag_hot.remove('1.0','end')
- txt.configure('cursor','xterm')
- $statusBarLabel.configure('text'=>"")
- })
-tag_demo.bind('Motion', proc{|x, y|
- newLine.value = txt.index("@#{x},#{y} linestart")
- if newLine.value != lastLine.value
- tag_hot.remove('1.0','end')
- lastLine.value = newLine.value
- if ( txt.tag_names("@#{x},#{y}").find{|t|
- t.kind_of?(String) && t =~ /^demo-/
- } )
- tag_hot.add(lastLine.value,
- "#{lastLine.value} lineend -1 chars")
- end
- end
- showStatus txt, txt.index("@#{x},#{y}")
- },
- '%x %y')
-
-# Create the text for the text widget.
-
-txt.insert('end', "Ruby/Tk Widget Demonstrations\n\n", tag_title)
-txt.insert('end', <<EOT)
-This application provides a front end for several short scripts that \
-demonstrate what you can do with Tk widgets. Each of the numbered \
-lines below describes a demonstration; you can click on it to invoke \
-the demonstration. Once the demonstration window appears, you can \
-click the "See Code" button to see the Ruby/Tk code that created the \
-demonstration. If you wish, you can edit the code and click the \
-"Rerun Demo" button in the code window to reinvoke the demonstration \
-with the modified code. \
-Don't worry about breaking the source code. \
-Your modifications are not reflected on the original file. \
-Please try many kind of changes.
-
-Some demo scripts require the recent version of Tk library \
-(e.g. Tk8.4 or later) \
-If your Tk library linked to Ruby doesn't support the functions \
-required by the demo script, the demo doesn't work. \
-In such a case, please re-compile tcltklib with the later Tk library \
-which supports the required functions.
-
-If your Tk supports Ttk (Tile) extension (included or installed), \
-please try the demo of Ttk extension (sample/tkextlib/tile/demo.rb) too.
-( Probably, Ttk extension \
-#{
-begin
- require 'tkextlib/tile'
- "is already installed on your environment"
-rescue
- "is not installed on your environment yet"
-end
-}\
-. )
-Ttk extension is a standard feature of Tk8.5 or later.
-
-
-EOT
-
-txt.insert('end', "Labels, buttons, checkbuttons, and radiobuttons.\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. Labels (text and bitmaps).\n", tag_demo, "demo-label")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. Labels and UNICODE text. (if supported)\n", tag_demo, "demo-unicodeout")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. Buttons.\n", tag_demo, "demo-button")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. Checkbuttons (select any of a group).\n", tag_demo, "demo-check")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. Checkbuttons (if supported).\n", tag_demo, "demo-check2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "6. Radiobuttons (select one of a group).\n", tag_demo, "demo-radio")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "7. Radiobuttons (if supported 'compound' option).\n", tag_demo, "demo-radio2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "8. Radiobuttons (if supported).\n", tag_demo, "demo-radio3")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "9. A 15-puzzle game made out of buttons.\n", tag_demo, "demo-puzzle")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "10. Iconic buttons that use bitmaps.\n", tag_demo, "demo-icon")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "11. Two labels displaying images.\n", tag_demo, "demo-image1")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "12. A simple user interface for viewing images.\n", tag_demo, "demo-image2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "13. A simple user interface for viewing images. (if supported)\n", tag_demo, "demo-image3")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "14. Labelled frames (if supported)\n", tag_demo, "demo-labelframe")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "15. The simple Themed Tk widgets (require Tile/Ttk extension)\n", tag_demo, "demo-ttkbut")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "Listboxes\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. 50 states.\n", tag_demo, "demo-states")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. Colors: change the color scheme for the application.\n", "#{tag_demo.id} demo-colors")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. A collection of famous sayings.\n", tag_demo, "demo-sayings")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. A multi-column list of contries. (require Tile/Ttk extension)\n", tag_demo, "demo-mclist")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. A directory browser tree. (require Tile/Ttk extension)\n", tag_demo, "demo-tree")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "Entries and Spin-boxes\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. Without scrollbars.\n", tag_demo, "demo-entry1")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. With scrollbars.\n", tag_demo, "demo-entry2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end',
- "3. Validated entries and password fields. (if supported)\n",
- tag_demo, "demo-entry3")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. Spin-boxes. (if supported)\n", tag_demo, "demo-spin")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. Combo-boxes. (require Tile/Ttk extension)\n", tag_demo, "demo-combo")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "6. Simple Rolodex-like form.\n", tag_demo, "demo-form")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "Text\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. Basic editable text.\n", tag_demo, "demo-text")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. Text display styles.\n", tag_demo, "demo-style")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. Hypertext (tag bindings).\n", tag_demo, "demo-bind")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. A text widget with embedded windows.\n", tag_demo, "demo-twind")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. A text widget with embedded windows. (if supported)\n", tag_demo, "demo-twind2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "6. A search tool built with a text widget.\n", tag_demo, "demo-search")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "7. Peering text widgets. (if supported)\n", tag_demo, "demo-textpeer")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "Canvases\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. The canvas item types.\n", tag_demo, "demo-items")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. A simple 2-D plot.\n", tag_demo, "demo-plot")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. Text items in canvases.\n", tag_demo, "demo-ctext")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. An editor for arrowheads on canvas lines.\n", tag_demo, "demo-arrow")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. A ruler with adjustable tab stops.\n", tag_demo, "demo-ruler")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "6. A building floor plan.\n", tag_demo, "demo-floor")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "7. A building floor plan. (another way to create canvas items)\n", tag_demo, "demo-floor2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "8. A simple scrollable canvas.\n", tag_demo, "demo-cscroll")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "9. A Knight's tour of the chess board. (require Tile/Ttk extension)\n", tag_demo, "demo-knightstour")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "Scales and Progress Bars\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. Vertical scale.\n", tag_demo.id, "demo-vscale")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. Horizontal scale.\n", tag_demo.id, "demo-hscale")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. Progress bar. (require Tile/Ttk extension)\n", tag_demo.id, "demo-ttkprogress")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "Paned Windows and Notebooks\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. Horizontal paned window. (if supported)\n", tag_demo.id, "demo-paned1")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. Vertical paned window. (if supported)\n", tag_demo.id, "demo-paned2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. Themed nested panes. (require Tile/Ttk extension)\n", tag_demo.id, "demo-ttkpane")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. Notebook widget. (require Tile/Ttk extension)\n", tag_demo.id, "demo-ttknote")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "Menus and Toolbars\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. Menus and cascades.\n", tag_demo, "demo-menu")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. Menus and cascades. (if supported)\n", tag_demo, "demo-menu84")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. Menubuttons.\n", tag_demo, "demo-menubu")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. Themed menu buttons. (require Tile/Ttk extension)\n", tag_demo, "demo-ttkmenu")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. Themed toolbar. (require Tile/Ttk extension)\n", tag_demo, "demo-toolbar")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "Common Dialogs\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. Message boxes.\n", tag_demo, "demo-msgbox")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. Message boxes with detail text. (if supported)\n", tag_demo, "demo-msgbox2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. File selection dialog.\n", tag_demo, "demo-filebox")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. Color picker.\n", tag_demo, "demo-clrpick")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "Animation\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. Animated labels (if supported)\n", tag_demo, "demo-anilabel")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. Animated wave (if supported)\n", tag_demo, "demo-aniwave")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. Pendulum simulation (if supported)\n", tag_demo, "demo-pendulum")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. A celebration of Rube Goldberg (if supported)\n", tag_demo, "demo-goldberg")
-
-txt.insert('end', "\n")
-txt.insert('end', "Miscellaneous\n", tag_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. The built-in bitmaps.\n", tag_demo, "demo-bitmap")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. A dialog box with a local grab.\n", tag_demo, "demo-dialog1")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. A dialog box with a global grab.\n", tag_demo, "demo-dialog2")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.state('disabled')
-scr.focus
-
-# positionWindow --
-# This procedure is invoked by most of the demos to position a
-# new demo window.
-#
-# Arguments:
-# w - The name of the window to position.
-
-def positionWindow(w)
- w.geometry('+300+300')
-end
-
-# showVars --
-# Displays the values of one or more variables in a window, and
-# updates the display whenever any of the variables changes.
-#
-# Arguments:
-# w - Name of new window to create for display.
-# args - Any number of names of variables.
-
-$showVarsWin = {}
-def showVars1(parent, *args)
- if $showVarsWin[parent.path]
- begin
- $showVarsWin[parent.path].destroy
- rescue
- end
- end
- w = TkToplevel.new(parent) {|w|
- title "Variable values"
- base = TkFrame.new(w).pack(:fill=>:both, :expand=>true)
- TkLabel.new(base) {
- text "Variable values:"
- width 20
- anchor 'center'
- if $tk_version =~ /^4.*/
- font '-Adobe-helvetica-medium-r-normal--*-180-*-*-*-*-*-*'
- else
- font 'Helvetica 14'
- end
- }.pack('side'=>'top', 'fill'=>'x')
- len = 1
- args.each{|vnam,vbody|
- len = vnam.to_s.length if vnam.to_s.length > len
- }
- args.each{|vnam,vbody|
- TkFrame.new(w){|f|
- #TkLabel.new(f, 'text'=>"#{vnam}: ").pack('side'=>'left')
- TkLabel.new(f, 'text'=>"#{vnam}: ",'width'=>len+2).pack('side'=>'left')
- TkLabel.new(f, 'textvariable'=>vbody, 'anchor'=>'w')\
- .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
- }.pack('side'=>'top', 'anchor'=>'w', 'fill'=>'x')
- }
- TkButton.new(base) {
- text "OK"
- command proc{w.destroy}
- }.pack('side'=>'bottom', 'pady'=>2)
- }
- $showVarsWin[parent.path] = w
-end
-
-def showVars2(parent, *args)
- if $showVarsWin[parent.path]
- begin
- $showVarsWin[parent.path].destroy
- rescue
- end
- end
- $showVarsWin[parent.path] = TkToplevel.new(parent) {|top|
- title "Variable values"
-
- base = TkFrame.new(top).pack(:fill=>:both, :expand=>true)
-
- TkLabelFrame.new(base, :text=>"Variable values:",
- :font=>{:family=>'Helvetica', :size=>14}){|f|
- args.each{|vnam,vbody|
- TkGrid(TkLabel.new(f, :text=>"#{vnam}: ", :anchor=>'w'),
- TkLabel.new(f, :textvariable=>vbody, :anchor=>'w'),
- :padx=>2, :pady=>2, :sticky=>'w')
- }
-
- f.grid(:sticky=>'news', :padx=>4)
- f.grid_columnconfig(1, :weight=>1)
- f.grid_rowconfig(100, :weight=>1)
- }
- TkButton.new(base, :text=>"OK", :width=>8, :default=>:active,
- :command=>proc{top.destroy}){|b|
- top.bind('Return', proc{b.invoke})
- top.bind('Escape', proc{b.invoke})
-
- b.grid(:sticky=>'e', :padx=>4, :pady=>[6, 4])
- }
- base.grid_columnconfig(0, :weight=>1)
- base.grid_rowconfig(0, :weight=>1)
- }
-end
-
-if $tk_major_ver < 8
- alias showVars showVars1
-elsif $tk_major_ver == 8 && $tk_minor_ver < 4
- alias showVars showVars1
-else # ver >= 8.4
- alias showVars showVars2
-end
-
-# Pseudo-Toplevel support
-module PseudoToplevel_Evaluable
- def pseudo_toplevel_eval(body = Proc.new)
- Thread.current[:TOPLEVEL] = self
- begin
- body.call
- ensure
- Thread.current[:TOPLEVEL] = nil
- end
- end
-
- def pseudo_toplevel_evaluable?
- @pseudo_toplevel_evaluable
- end
- def pseudo_toplevel_evaluable=(mode)
- @pseudo_toplevel_evaluable = (mode)? true: false
- end
-
- def self.extended(mod)
- mod.__send__(:extend_object, mod)
- mod.instance_variable_set('@pseudo_toplevel_evaluable', true)
- end
-end
-
-class Object
- alias __method_missing__ method_missing
- private :__method_missing__
-
- def method_missing(id, *args)
- begin
- has_top = (top = Thread.current[:TOPLEVEL]) &&
- top.respond_to?(:pseudo_toplevel_evaluable?) &&
- top.pseudo_toplevel_evaluable? &&
- top.respond_to?(id)
- rescue Exception => e
- has_top = false
- end
-
- if has_top
- top.__send__(id, *args)
- else
- __method_missing__(id, *args)
- end
- end
-end
-
-class Proc
- def initialize(*args)
- super
- @__pseudo_toplevel__ = Thread.current[:TOPLEVEL]
- end
-
- alias __call__ call
- def call(*args, &b)
- if top = @__pseudo_toplevel__
- orig_top = Thread.current[:TOPLEVEL]
- Thread.current[:TOPLEVEL] = top
- begin
- __call__(*args, &b)
- ensure
- Thread.current[:TOPLEVEL] = orig_top
- end
- else
- __call__(*args, &b)
- end
- end
-end
-
-def proc(&b)
- Proc.new(&b)
-end
-def lambda(&b)
- Proc.new(&b)
-end
-
-def _null_binding
- Module.new.instance_eval{extend PseudoToplevel_Evaluable}
- # binding
- # Module.new.instance_eval{binding}
-end
-private :_null_binding
-
-def eval_samplecode(code, file=nil)
- #eval(code)
- #_null_binding.pseudo_toplevel_eval{ eval(code) }
- #Thread.new{ _null_binding.pseudo_toplevel_eval{ eval(code) } }
- Thread.new{
- _null_binding.pseudo_toplevel_eval{
- begin
- if file
- eval(code, binding, "(eval:#{file})")
- else
- eval(code)
- end
- rescue Exception=>e
- #p e
- TkBgError.show(e.class.inspect + ': ' + e.message + "\n" +
- "\n---< backtrace of Ruby side >-----\n" +
- e.backtrace.join("\n") +
- "\n---< backtrace of Tk side >-------")
- end
- }
- }
- Tk.update rescue nil
-end
-
-# invoke --
-# This procedure is called when the user clicks on a demo description.
-# It is responsible for invoking the demonstration.
-#
-# Arguments:
-# txt - Name of text widget
-# index - The index of the character that the user clicked on.
-def invoke(txt, idx)
- tag = txt.tag_names(idx).find{|t| t.kind_of?(String) && t =~ /^demo-/}
- return unless tag
-
- cursor = txt.cget('cursor')
- txt.cursor('watch')
- Tk.update rescue nil
- # eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding)
- # Tk.update
- eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb')
- txt.cursor(cursor)
-
- $tag_visited.add("#{idx} linestart +1 chars", "#{idx} lineend +1 chars")
-end
-=begin
-def invoke (txt, idx)
- tag = txt.tag_names(idx).find{|t| t.kind_of?(String) && t =~ /^demo-/}
- return unless tag
- current_cursor = txt.cget('cursor')
- txt.cursor('watch')
- Tk.update
-# eval `cat #{tag[5..-1]}.rb`
-# eval `cat #{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb`
- eval IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join
- Tk.update
-# txt.cursor('xterm')
- txt.cursor(current_cursor)
-
- $tag_visited.add("#{idx} linestart +1 chars", "#{idx} lineend +1 chars")
-end
-=end
-# showStatus --
-#
-# Show the name of the demo program in the status bar. This procedure
-# is called when the user moves the cursor over a demo description.
-#
-
-def showStatus (txt, index)
- tag = txt.tag_names(index).find{|t| t.kind_of?(String) && t =~ /^demo-/}
- cursor = txt.cget('cursor')
- unless tag
- $statusBarLabel.configure('text', " ")
- newcursor = 'xterm'
- else
- demoname = tag[5..-1]
- $statusBarLabel.configure('text',
- "Run the \"#{demoname}\" sample program")
- newcursor = 'hand2'
- end
- txt.configure('cursor'=>newcursor) if cursor != newcursor
-end
-
-# showCode --
-# This procedure creates a toplevel window that displays the code for
-# a demonstration and allows it to be edited and reinvoked.
-#
-# Arguments:
-# demo - The name of the demonstration's window, which can be
-# used to derive the name of the file containing its code.
-
-def showCode1(demo)
- file = "#{demo}.rb"
- $code_window = nil unless defined? $code_window
- if $code_window == nil || TkWinfo.exist?($code_window) == false
- $code_window = TkToplevel.new(nil)
- f = TkFrame.new($code_window)
-
- TkButton.new(f) {
- text "Dismiss"
- command proc{
- $code_window.destroy
- $code_window = nil
- }
- }.pack('side'=>'right', 'expand'=>'false', 'pady'=>2, 'padx'=>25)
- TkButton.new(f) {
- text "Rerun Demo"
- # command proc{eval($code_text.get('1.0','end'), _null_binding)}
- command proc{eval_samplecode($code_text.get('1.0','end'), '<viewer>')}
- }.pack('side'=>'right', 'expand'=>'false', 'pady'=>2)
-
- TkLabel.new(f,'text'=>'line:').pack('side'=>'left')
- linenum =TkLabel.new(f,'text'=>'').pack('side'=>'left')
- TkLabel.new(f,'text'=>' pos:').pack('side'=>'left')
- posnum =TkLabel.new(f,'text'=>'').pack('side'=>'left')
-
- $set_linenum = proc{|w|
- line, pos = w.index('insert').split('.')
- linenum.text = line
- posnum.text = pos
- }
-
- f.pack('side'=>'bottom', 'expand'=>'true', 'fill'=>'x')
-
- if $tk_version =~ /^4\.[01]/
- s = TkScrollbar.new($code_window, 'orient'=>'vertical')
- $code_text = TkText.new($code_window) {
- height 40
- setgrid 'yes'
- yscrollcommand proc{|first,last| s.set first,last}
- }
- s.command(proc{|*args| $code_text.yview(*args)})
- s.pack('side'=>'right', 'fill'=>'y')
- $code_text.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both')
- else
- TkFrame.new($code_window) {|f|
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
-
- hs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
- 'orient'=>'horizontal')
- vs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
- 'orient'=>'vertical')
- $code_text = TkText.new($code_window) {|t|
- height 40
- wrap 'word'
- xscrollcommand proc{|first,last| hs.set first,last}
- yscrollcommand proc{|first,last| vs.set first,last}
- setgrid 'yes'
- highlightthickness 0
- pady 2
- padx 3
- hs.command(proc{|*args| $code_text.xview(*args)})
- vs.command(proc{|*args| $code_text.yview(*args)})
- }
-
- $code_text.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- vs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
-# xs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
-# 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
-
-# JKC 2001-07-26: segfaults under 1.7.1 (2001-06-19) [i686-linux]
- TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- }
- end
-
- btag = TkBindTag.new
-
- btag.bind('Key', $set_linenum, '%W')
- btag.bind('Button', $set_linenum, '%W')
-
- btags = $code_text.bindtags
- btags.insert(btags.index($code_text.class) + 1, btag)
- $code_text.bindtags = btags
-
- else
- $code_window.deiconify
- $code_window.raise
- end
-
- $code_window.title("Demo code: #{file}")
- $code_window.iconname(file)
-# fid = open(file, 'r')
- fid = open([$demo_dir, file].join(File::Separator), 'r')
- $code_text.delete('1.0', 'end')
- #$code_text.insert('1.0', `cat #{file}`)
- $code_text.insert('1.0', fid.read)
- #$code_mark = TkTextMark.new($code_text, '1.0')
- #$code_text.set_insert('1.0')
- TkTextMarkInsert.new($code_text,'1.0')
-
- $set_linenum.call($code_text)
-
- fid.close
-end
-
-def showCode2(demo)
- file = "#{demo}.rb"
- $code_window = nil unless defined? $code_window
- if $code_window == nil || TkWinfo.exist?($code_window) == false
- $code_window = TkToplevel.new(nil)
- tf = TkFrame.new($code_window)
- $code_text = TkText.new(tf, :font=>'Courier 10', :height=>30,
- :wrap=>'word', :bd=>1, :setgrid=>true,
- :highlightthickness=>0, :pady=>2, :padx=>3)
- xscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)}
- yscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)}
- TkGrid($code_text, yscr, :sticky=>'news')
- #TkGrid(xscr)
- tf.grid_rowconfigure(0, :weight=>1)
- tf.grid_columnconfigure(0, :weight=>1)
-
- bf = TkFrame.new($code_window)
-
- lf = TkFrame.new(bf)
- TkLabel.new(lf, :text=>'line:').pack(:side=>:left)
- linenum =TkLabel.new(lf, :text=>'').pack(:side=>:left)
- TkLabel.new(lf, :text=>' pos:').pack(:side=>:left)
- posnum =TkLabel.new(lf, :text=>'').pack(:side=>:left)
-
- $set_linenum = proc{|w|
- line, pos = w.index('insert').split('.')
- linenum.text = line
- posnum.text = pos
- }
-
- b_dis = TkButton.new(bf, :text=>'Dismiss', :default=>:active,
- :command=>proc{
- $code_window.destroy
- $code_window = nil
- },
- :image=>$image['delete'], :compound=>:left)
- b_prn = TkButton.new(bf, :text=>'Print Code',
- :command=>proc{printCode($code_text, file)},
- :image=>$image['print'], :compound=>:left)
- b_run = TkButton.new(bf, :text=>'Rerun Demo',
- :command=>proc{
- # eval($code_text.get('1.0','end'), _null_binding)
- eval_samplecode($code_text.get('1.0','end'), '<viewer>')
- },
- :image=>$image['refresh'], :compound=>:left)
-
- TkGrid(lf, 'x', b_run, b_prn, b_dis, :padx=>4, :pady=>[6,4])
- bf.grid_columnconfigure(1, :weight=>1)
-
- TkGrid(tf, :sticky=>'news')
- TkGrid(bf, :sticky=>'ew')
- $code_window.grid_columnconfigure(0, :weight=>1)
- $code_window.grid_rowconfigure(0, :weight=>1)
-
- $code_window.bind('Return', proc{|win|
- b_dis.invoke unless win.kind_of?(TkText)
- }, '%W')
- $code_window.bindinfo('Return').each{|cmd, arg|
- $code_window.bind_append('Escape', cmd, arg)
- }
-
- btag = TkBindTag.new
-
- btag.bind('Key', $set_linenum, '%W')
- btag.bind('Button', $set_linenum, '%W')
- btag.bind('Configure', $set_linenum, '%W')
-
- btags = $code_text.bindtags
- btags.insert(btags.index($code_text.class) + 1, btag)
- $code_text.bindtags = btags
-
- else
- $code_window.deiconify
- $code_window.raise
- end
-
- $code_window.title("Demo code: #{file}")
- $code_window.iconname(file)
- fid = open([$demo_dir, file].join(File::Separator), 'r')
- $code_text.delete('1.0', 'end')
- $code_text.insert('1.0', fid.read)
- TkTextMarkInsert.new($code_text,'1.0')
-
- $set_linenum.call($code_text)
-
- fid.close
-end
-
-if $tk_major_ver < 8
- alias showCode showCode1
-elsif $tk_major_ver == 8 && $tk_minor_ver < 4
- alias showCode showCode1
-else # ver >= 8.4
- alias showCode showCode2
-end
-
-
-# printCode --
-# Prints the source code currently displayed in the See Code dialog.
-# Much thanks to Arjen Markus for this.
-#
-# Arguments:
-# txt - Name of text widget containing code to print
-# file - Name of the original file (implicitly for title)
-
-def printCode(txt, file)
- code = txt.get('1.0', 'end - 1c')
- dir = '.'
- dir = ENV['HOME'] if ENV['HOME']
- dir = ENV['TMP'] if ENV['TMP']
- dir = ENV['TEMP'] if ENV['TEMP']
-
- fname = [dir, 'tkdemo-' + file].join(File::Separator)
- open(fname, 'w'){|fid| fid.print(code)}
- begin
- case Tk::TCL_PLATFORM('platform')
- when 'unix'
- msg = `lp -c #{fname}`
- unless $?.exitstatus == 0
- Tk.messageBox(:title=>'Print spooling failure',
- :message=>'Print spooling probably failed: ' + msg)
- end
- when 'windows'
- begin
- printTextWin32(fname)
- rescue => e
- Tk.messageBox(:title=>'Print spooling failure',
- :message=>'Print spooling probably failed: ' +
- e.message)
- end
- when 'macintosh'
- Tk.messageBox(:title=>'Operation not Implemented',
- :message=>'Oops, sorry: not implemented yet!')
- else
- Tk.messageBox(:title=>'Operation not Implemented',
- :message=>'Wow! Unknown platform: ' +
- Tk::TCL_PLATFORM('platform'))
- end
- ensure
- File.delete(fname)
- end
-end
-
-# printTextWin32 --
-# Print a file under Windows
-#
-# Arguments:
-# filename - Name of the file
-#
-def printTextWin32(fname)
- require 'win32/registry'
- begin
- app = Win32::Registry::HKEY_CLASSES_ROOT['.txt']
- pcmd = nil
- Win32::Registry::HKEY_CLASSES_ROOT.open("#{app}\\shell\\print"){|reg|
- pcmd = reg['command']
- }
- rescue
- app = Tk.tk_call('auto_execok', 'notepad.exe')
- pcmd = "#{app} /p %1"
- end
-
- pcmd.gsub!('%1', fname)
- puts pcmd
- cmd = Tk.tk_call('auto_execok', 'start') + ' /min ' + pcmd
-
- msg = `#{cmd}`
- unless $?.exitstatus == 0
- fail RuntimeError, msg
- end
-end
-
-# aboutBox
-#
-# Pops up a message box with an "about" message
-#
-def aboutBox
- Tk.messageBox('icon'=>'info', 'type'=>'ok', 'title'=>'About Widget Demo',
- 'message'=>"Ruby/Tk widget demonstration Ver.1.7.1-en\n\n" +
- "based on demos of Tk8.1 -- 8.5 " +
- "( Copyright of Tcl/Tk demos:: " +
- "(c) 1996-1997 Sun Microsystems, Inc. / " +
- "(c) 1997-2000 Ajuba Solutions, Inc. / " +
- "(c) 2001-2007 Donal K. Fellows / " +
- "(c) 2002-2007 Daniel A. Steffen )\n\n" +
- "Your Ruby & Tk Version ::\n" +
- "Ruby#{RUBY_VERSION}(#{RUBY_RELEASE_DATE})[#{RUBY_PLATFORM}] / Tk#{$tk_patchlevel}#{(Tk::JAPANIZED_TK)? '-jp': ''}\n\n" +
- "Ruby/Tk release date :: tcltklib #{TclTkLib::RELEASE_DATE}; tk #{Tk::RELEASE_DATE}")
-end
-
-#########################################
-# start demos if given at command line
-no_launcher = false
-if ARGV[0] == '-n'
- ARGV.shift
- no_launcher = true if ARGV.size > 0
-else
- # show the root widget to make it lower then demo windows
- Tk.update rescue nil
-end
-ARGV.each{|cmd|
- if cmd =~ /(.*).rb/
- cmd = $1
- end
- #eval(IO.readlines("#{[$demo_dir, cmd].join(File::Separator)}.rb").join,
- # _null_binding)
- eval_samplecode(IO.readlines("#{[$demo_dir, cmd].join(File::Separator)}.rb").join, cmd + '.rb')
-}
-if no_launcher
- $root.withdraw # hide root window
- Thread.start{
- loop do
- count = 0
- $root.winfo_children.each{|w|
- count += 1 if w.kind_of?(TkToplevel)
- }
- $root.destroy if count == 0
- end
- }
-end
-
-#########################################
-# start eventloop
-Tk.mainloop
-
diff --git a/ext/tk/sample/demos-jp/README b/ext/tk/sample/demos-jp/README
deleted file mode 100644
index 4278124659..0000000000
--- a/ext/tk/sample/demos-jp/README
+++ /dev/null
@@ -1,54 +0,0 @@
-
- Ruby/Tk widget-demo
- version 1.2 ( 2000/04/08 )
- 永井@知能.ä¹å·¥å¤§ (nagai@ai.kyutech.ac.jp)
-
-標準é…布㮠Tcl/Tk 拡張パッケージをå–ã‚Šè¾¼ã‚“ã  Ruby (以下 Ruby/Tk ã¨å‘¼ã³ã¾ã™)
-ã§ã¯ï¼ŒTk widget を用ã„㟠GUI ã®ä½œæˆã‚’è¡Œã†ã“ã¨ãŒã§ãã¾ã™ï¼Žå®Ÿéš›ã« GUI を作æˆ
-ã—ã¦ã„ãå ´åˆã«ã¯æ§˜ã€…ãªå®Ÿä¾‹ãŒã‚µãƒ³ãƒ—ルã¨ã—ã¦å­˜åœ¨ã™ã‚‹ã¨ä¾¿åˆ©ãªã®ã§ã™ãŒï¼ŒRuby/Tk
-ã«ã¯ãã®ã‚ˆã†ãªé©å½“ãªã‚µãƒ³ãƒ—ルスクリプト集åˆã¯å­˜åœ¨ã—ã¾ã›ã‚“ã§ã—ãŸï¼Žãã‚Œã«å¯¾ã—,
-拡張パッケージã®å…ƒã§ã‚ã‚‹ Tcl/Tk ã«ã¯ï¼ŒTk widget を用ã„ã¦ã©ã®ã‚ˆã†ãªã“ã¨ãŒã§
-ãã‚‹ã‹ã‚’示ã™ã‚‚ã®ã¨ã—㦠widget-demo ãŒå­˜åœ¨ã—ãŠã‚Šï¼ŒTcl/Tk を用ã„㟠GUI ã®ä½œæˆ
-ã‚’ç¿’å¾—ã™ã‚‹éš›ã®ä»£è¡¨çš„サンプルã¨ãªã£ã¦ã„ã¾ã™ï¼Žæœ¬ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã¯ï¼ŒRuby/Tk ã®ç¿’å¾—ã®
-ãŸã‚ã®ä»£è¡¨çš„ãªã‚µãƒ³ãƒ—ルスクリプトã¨ã™ã¹ã,Tcl/Tk ã® widget-demo を移æ¤ã—ãŸã‚‚
-ã®ã§ã™ï¼Ž
-
-今回ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ ruby-1.4.x ã«å¯¾å¿œã¨ã—ã¦ãŠãã¾ã™ãŒï¼Œæ—§ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«æ¯”ã¹ã¦ï¼Œ
-ã»ã¨ã‚“ã©å¤‰æ›´ã¯ã‚ã‚Šã¾ã›ã‚“.ruby-1.1c2 以上ãªã‚‰å‹•ãã¨æ€ã„ã¾ã™ï¼Žruby-1.5.x ã«ã¤
-ã„ã¦ã¯ãƒ†ã‚¹ãƒˆã—ã¦ã„ã¾ã›ã‚“.ãã®ãŸã‚,éžäº’æ›ã®å½±éŸ¿ãŒå‡ºã‚‹ã“ã¨ãŒã‚ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›
-ã‚“ãŒï¼Œãã®å ´åˆã§ã‚‚å°‘ã—ã®ä¿®æ­£ã§å‹•ã‹ã›ã‚‹ã¨æ€ã„ã¾ã™ï¼Žçµ„ã¿è¾¼ã‚€ Tk ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ï¼Œ
-4.2 ã§ã‚‚ 8.0 ã§ã‚‚修正ãªãå‹•ã‹ã›ã‚‹ã¯ãšã§ã™ï¼ŽãŸã ã—,日本語版ã§ã®ç§»æ¤ã¨ãªã£ã¦
-ã„ã‚‹ãŸã‚,日本語化ã•ã‚ŒãŸ Tk ã‚’ã”利用ãã ã•ã„.スクリプトã®ãƒ†ã‚¹ãƒˆã¯ï¼Œæ—§ãƒãƒ¼ã‚¸ãƒ§
-ンã®éš›ã« Tk4.2jp 㨠Tk8.0jp ã®ä¸Šã§è¡Œã£ã¦ã„ã¾ã™ (完璧ã«ã§ã¯ãªã„ã§ã™ãŒ).今回
-ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ ruby-1.4.x + Tk8.0jp 上ã§ã®ç°¡å˜ãªãƒ†ã‚¹ãƒˆã—ã‹è¡Œã£ã¦ã„ã¾ã›ã‚“ãŒï¼Œ
-修正ã¨ã„ã†ã»ã©ã®ä¿®æ­£ã¯ã—ã¦ã„ã¾ã›ã‚“ã®ã§å•é¡Œã¯ãªã„ã¨è€ƒãˆã¦ã„ã¾ã™ï¼Ž
-
-本アーカイブã«å«ã¾ã‚Œã‚‹ã‚¹ã‚¯ãƒªãƒ—トã®å¤šãã¯ï¼Œå…ƒã¨ãªã£ã¦ã„ã‚‹ Tcl/Tk 版ã«æ¯”較的近
-ã„スクリプト記述ã¨ãªã‚‹ã‚ˆã†ã«ã—ã¦ã„ã¾ã™ï¼Žãã®ãŸã‚,Ruby/Tk ã®ã‚µãƒ³ãƒ—ルã¨è¨€ã†ã«
-ã¯ï¼Œã‚ã¾ã‚Š Ruby らã—ããªã„ã¨ã‚‚言ãˆã‚‹ã§ã—ょã†ï¼Žã«ã‚‚ã‹ã‹ã‚らãšï¼Œãã®ã‚ˆã†ãªè¨˜è¿°
-ã‚’å–ã£ã¦ã„ã‚‹ç†ç”±ã¯ï¼ŒRuby/Tk ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä¸è¶³ã«ã‚ã‚Šã¾ã™ï¼Ž
-
-Tcl/Tk ã«ã¯é©å½“ãªå‚考書ãŒä½•å†Šã‹å­˜åœ¨ã—ã¦ã„ã¾ã™ã‹ã‚‰ï¼ŒRuby/Tk スクリプトを作æˆ
-ã™ã‚‹éš›ã¯ï¼Œãã®ã‚ˆã†ãª Tcl/Tk ã®å‚考書ã§æƒ…報を補ã„ãªãŒã‚‰ä½œæˆã™ã‚‹ã“ã¨ã«ãªã‚‹ã¨æ€
-ã„ã¾ã™ï¼Žå„ widget ã®ä½¿ç”¨ä¾‹ã¨ã—ã¦ï¼ŒTcl/Tk ã® widget-demo ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã‚‚ã‚ã‚‹
-ã§ã—ょã†ï¼ŽRuby/Tk 版ã®è¨˜è¿°ã‚’ widget-demo ã‚’ Tcl/Tk 版ã®è¨˜è¿°ã«è¿‘ã„ã‚‚ã®ã«ã—ã¦
-ãŠã‘ã°ï¼Œãã®å¯¾æ¯”ã«ã‚ˆã£ã¦ï¼ŒRuby/Tk ã®ç†è§£ã‚’æ—©ã‚ã‚‹ã“ã¨ãŒã§ãã‚‹ã¨è€ƒãˆã‚‰ã‚Œã¾ã™ï¼Ž
-一旦 Ruby/Tk ã§ã® å„ widget ã®ä½¿ç”¨æ–¹æ³•ã‚’ç¿’å¾—ã—ã¦ã—ã¾ãˆã°ï¼ŒRuby らã—ã„スクリ
-プトを作æˆã™ã‚‹ã“ã¨ã¯é›£ã—ããªã„ã§ã—ょã†ï¼Žæœ¬ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã®ã‚¹ã‚¯ãƒªãƒ—トã¯ï¼ŒRuby/Tk
-を最åˆã«ç¿’å¾—ã™ã‚‹ã¾ã§ã®è¸å°ã¨ã—ã¦åˆ©ç”¨ã—ã¦ã„ãŸã ã‘ã‚Œã°å¹¸ã„ã§ã™ï¼Ž
-
-widget-demo ã®ç§»æ¤ã«ã‚ãŸã£ã¦ã¯ï¼Œæ¬¡ã®æ–¹ã«ã‚‚移æ¤ã—ãŸã‚¹ã‚¯ãƒªãƒ—トをæä¾›ã—ã¦ã„ãŸã 
-ãã¾ã—ãŸï¼Žã“ã“ã«æ„Ÿè¬ã®æ„を表ã—ã¾ã™ï¼Ž
-
- 立石@JAIST (ttate@jaist.ac.jp) ã•ã‚“
- å¹³æ¾ç¥¥å² (hiramatu@cdrom.co.jp) ã•ã‚“
-
-å¹³æ¾ã•ã‚“ã«ã‚ˆã‚‹ Ruby/Tk 入門㮠Web page (http://www.cdrom.co.jp/~hiramatu/)
-ã‚‚ Ruby/Tk ã®ç¿’å¾—ã«æœ‰ç”¨ã¨æ€ãˆã¾ã™ã®ã§ï¼Œãœã²ã”å‚ç…§ãã ã•ã„.
-
-ã¾ãŸï¼Œå‰æ©‹ (maebashi@iij.ad.jp) ã•ã‚“ã‚’ã¯ã˜ã‚ã¨ã—ã¦ï¼Œwidget-demo ã®ç§»æ¤ã«éš›ã—
-ã¦å¿…è¦ã¨ãªã£ãŸ Ruby ã® Tk 関連ライブラリ修正ã«ã¤ã„ã¦ï¼Œå•é¡Œç‚¹ï¼Œãƒã‚°ã®æŒ‡æ‘˜ã‚’ã—
-ã¦ã„ãŸã ã„ãŸæ–¹ã€…ã«ã‚‚æ„Ÿè¬è‡´ã—ã¾ã™ï¼Ž
-
-ãã—ã¦æœ€å¾Œã«æœ€å¤§ã®æ„Ÿè¬ã‚’ Ruby 設計者㮠ã¾ã¤ã‚‚㨠ゆãã²ã‚ (matz@netlab.co.jp)
-ã•ã‚“ã«æ§ã’ãŸã„ã¨æ€ã„ã¾ã™ï¼Ž
diff --git a/ext/tk/sample/demos-jp/README.1st b/ext/tk/sample/demos-jp/README.1st
deleted file mode 100644
index 68caf8b14d..0000000000
--- a/ext/tk/sample/demos-jp/README.1st
+++ /dev/null
@@ -1,20 +0,0 @@
-ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã¯ Ruby/Tk ã®ãƒ‡ãƒ¢ã‚¹ã‚¯ãƒªãƒ—トãŒåŽã‚られã¦ã„ã¾ã™ï¼Ž
-
-'.rb' ã¨ã„ã†æ‹¡å¼µå­ã‚’æŒã£ã¦ã„るファイルã¯ï¼Œãƒ©ãƒ³ãƒãƒ£â”€ã‚¹ã‚¯ãƒªãƒ—トã§
-ã‚ã‚‹ 'widget' ã‹ã‚‰å‘¼ã³å‡ºã•ã‚Œã‚‹ã‚µãƒ–スクリプトã§ã™ï¼Žãã‚Œãžã‚Œç‹¬ç«‹ã«
-ã¯å‹•ãã¾ã›ã‚“.'widget' スクリプトã‹ã‚‰å‘¼ã³å‡ºã—ã¦ãã ã•ã„.
-
-ã‚‚ã—ランãƒãƒ£â”€ã‚¹ã‚¯ãƒªãƒ—ト 'widget' ã®èµ·å‹•ã¨åŒæ™‚ã«ã„ãã¤ã‹ã®ã‚µãƒ–ス
-クリプトを起動ã—ãŸã‘ã‚Œã°ï¼Œãã®ã‚µãƒ–スクリプトã®åå‰ã‚’引数ã¨ã—ã¦ä¸Ž
-ãˆã¦ãã ã•ã„.
-( 例: /usr/local/bin/ruby widget button.rb entry1.rb text.rb )
-サブスクリプトã®æ‹¡å¼µå­ '.rb' ã¯çœç•¥ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ï¼Ž
-( 例: /usr/local/bin/ruby widget button entry1 text )
-
-ã‚‚ã—ランãƒãƒ£â”€ã‚¹ã‚¯ãƒªãƒ—トã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒå¿…è¦ãªã„å ´åˆã«ã¯ï¼Œ'-n' オ
-プションを与ãˆã¦ãã ã•ã„.
-( 例: /usr/local/bin/ruby widget -n button.rb entry1.rb text.rb )
-
-ä»–ã®ãƒ•ã‚¡ã‚¤ãƒ« (browse1 ã‚„ hello ãªã©) ã¯å˜ç‹¬ã§å‹•ã‹ã™ã“ã¨ãŒå¯èƒ½ã§ã™ï¼Ž
-
- 2004/04/14 Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
diff --git a/ext/tk/sample/demos-jp/anilabel.rb b/ext/tk/sample/demos-jp/anilabel.rb
deleted file mode 100644
index ccad73ffc6..0000000000
--- a/ext/tk/sample/demos-jp/anilabel.rb
+++ /dev/null
@@ -1,178 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# animated label widget demo (called by 'widget')
-#
-# based on Tcl/Tk8.5a2 widget demos
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($anilabel_demo) && $anilabel_demo
- $anilabel_demo.destroy
- $anilabel_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$anilabel_demo = TkToplevel.new {|w|
- title("Animated Label Demonstration")
- iconname("anilabel")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($anilabel_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "下ã«ã¯4ã¤ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãƒ©ãƒ™ãƒ«ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚å·¦å´ã«ã‚るラベルã¯ã€å†…部ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’スクロールã—ãŸã‚ˆã†ã«è¦‹ã›ã‚‹ã“ã¨ã§å‹•ãを付ã‘ã¦ã„ã¾ã™ã€‚å³å´ã®ãƒ©ãƒ™ãƒ«ã¯ã€è¡¨ç¤ºã™ã‚‹ã‚¤ãƒ¡ãƒ¼ã‚¸ã‚’変化ã•ã›ã‚‹ã“ã¨ã§å‹•ãを与ãˆã¦ã„ã¾ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $anilabel_demo
- $anilabel_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'anilabel'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# label demo 用フレーム生æˆ
-f_left = TkLabelFrame.new(base_frame, :text=>'Scrolling Texts')
-f_right = TkLabelFrame.new(base_frame, :text=>'GIF Image')
-Tk.pack(f_left, f_right, 'side'=>'left', 'expand'=>'yes', 'fill'=>'both',
- 'padx'=>10, 'pady'=>10)
-
-# animated label
-class AnimatedTextLabel < TkLabel
- def initialize(*args)
- super(*args)
- @timer = TkTimer.new{ _animation_callback }
- @timer.loop_exec = -1
- # bind('Destroy'){ @timer.stop }
- @btag = TkBindTag.new('Destroy'){ @timer.stop }
- self.bindtags_unshift(@btag)
- end
-
- def _animation_callback()
- txt = self.text
- self.text = (txt[1..-1] << txt[0])
- end
- private :_animation_callback
-
- def start(interval)
- @timer.set_interval(interval)
- @timer.start
- end
-
- def stop
- @timer.stop
- end
-end
-
-# animated image
-class AnimatedImageLabel < AnimatedTextLabel
- def initialize(*args)
- super(*args)
- @destroy_image = false
- @btag.bind_append('Destroy'){
- if @destroy_image
- begin
- self.image.delete
- rescue
- end
- end
- }
- end
- attr_accessor :destroy_image
-
- def _animation_callback()
- img = self.image
-
- fmt = img.format
- if fmt.kind_of?(Array)
- if fmt[1].kind_of?(Hash)
- # fmt == ['GIF', {'index'=>idx}]
- idx = fmt[1]['index']
- else
- # fmt == ['GIF', '-index', idx] :: Ruby1.8.2 returns this.
- idx = fmt[2]
- end
- elsif fmt.kind_of?(String) && fmt =~ /GIF -index (\d+)/
- idx = $1.to_i
- else
- idx = -1
- end
-
- begin
- img.format("GIF -index #{idx + 1}")
- rescue => e
- img.format("GIF -index 0")
- end
- end
- private :_animation_callback
-end
-
-# label 生æˆ
-l1 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:ridge,
- :font=>{:family=>'Courier', :size=>10})
-l2 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:groove,
- :font=>{:family=>'Courier', :size=>10})
-l3 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:flat,
- :font=>{:family=>'Courier', :size=>10}, :width=>18)
-Tk.pack(l1, l2, l3,
- :side=>:top, :expand=>true, :anchor=>:w, :padx=>10, :pady=>10)
-
-limg = AnimatedImageLabel.new(f_right, :borderwidth=>0)
-limg.pack(:side=>:top, :expand=>true, :padx=>10, :pady=>10)
-
-# base64-encoded animated GIF file
-tclPowerdData = <<EOD
- R0lGODlhKgBAAPQAAP//////zP//AP/MzP/Mmf/MAP+Zmf+ZZv+ZAMz//8zM
- zMyZmcyZZsxmZsxmAMwzAJnMzJmZzJmZmZlmmZlmZplmM5kzM2aZzGZmzGZm
- mWZmZmYzZmYzMzNmzDMzZgAzmSH+IE1hZGUgd2l0aCBHSU1QIGJ5IExARGVt
- YWlsbHkuY29tACH5BAVkAAEALAAAAAAqAEAAAAX+YCCOZEkyTKM2jOm66yPP
- dF03bx7YcuHIDkGBR7SZeIyhTID4FZ+4Es8nQyCe2EeUNJ0peY2s9mi7PhAM
- ngEAMGRbUpvzSxskLh1J+Hkg134OdDIDEB+GHxtYMEQMTjMGEYeGFoomezaC
- DZGSHFmLXTQKkh8eNQVpZ2afmDQGHaOYSoEyhhcklzVmMpuHnaZmDqiGJbg0
- qFqvh6UNAwB7VA+OwydEjgujkgrPNhbTI8dFvNgEYcHcHx0lB1kX2IYeA2G6
- NN0YfkXJ2BsAMuAzHB9cZMk3qoEbRzUACsRCUBK5JxsC3iMiKd8GN088SIyT
- 0RAFSROyeEg38caDiB/+JEgqxsODrZJ1BkT0oHKSmI0ceQxo94HDpg0qsuDk
- UmRAMgu8OgwQ+uIJgUMVeGXA+IQkzEeHGvD8cIGlDXsLiRjQ+EHroQhea7xY
- 8IQBSgYYDi1IS+OFBCgaDMGVS3fGi5BPJpBaENdQ0EomKGD56IHwO39EXiSC
- Ysgxor5+Xfgq0qByYUpiXmwuoredB2aYH4gWWda0B7SeNENpEJHC1ghi+pS4
- AJpIAwWvKPBi+8YEht5EriEqpFfMlhEdkBNpx0HUhwypx5T4IB1MBg/Ws2sn
- wV3MSQOkzI8fUd48Aw3dOZto71x85hHtHijYv18Gf/3GqCdDCXHNoICBobSo
- IqBqJLyCoH8JPrLgdh88CKCFD0CGmAiGYPgffwceZh6FC2ohIIklnkhehTNY
- 4CIHHGzgwYw01ujBBhvAqKOLLq5AAk9kuSPkkKO40NB+h1gnypJIIvkBf09a
- N5QIRz5p5ZJXJpmlIVhOGQA2TmIJZZhKKmmll2BqyWSXWUrZpQtpatlmk1c2
- KaWRHeTZEJF8SqLDn/hhsOeQgBbqAh6DGqronxeARUIIACH5BAUeAAAALAUA
- LgAFAAUAAAUM4CeKz/OV5YmqaRkCACH5BAUeAAEALAUALgAKAAUAAAUUICCK
- z/OdJVCaa7p+7aOWcDvTZwgAIfkEBR4AAQAsCwAuAAkABQAABRPgA4zP95zA
- eZqoWqqpyqLkZ38hACH5BAUKAAEALAcALgANAA4AAAU7ICA+jwiUJEqeKau+
- r+vGaTmac63v/GP9HM7GQyx+jsgkkoRUHJ3Qx0cK/VQVTKtWwbVKn9suNunc
- WkMAIfkEBQoAAAAsBwA3AAcABQAABRGgIHzk842j+Yjlt5KuO8JmCAAh+QQF
- CgAAACwLADcABwAFAAAFEeAnfN9TjqP5oOWziq05lmUIACH5BAUKAAAALA8A
- NwAHAAUAAAUPoPCJTymS3yiQj4qOcPmEACH5BAUKAAAALBMANwAHAAUAAAUR
- oCB+z/MJX2o+I2miKimiawgAIfkEBQoAAAAsFwA3AAcABQAABRGgIHzfY47j
- Q4qk+aHl+pZmCAAh+QQFCgAAACwbADcABwAFAAAFEaAgfs/zCV9qPiNJouo7
- ll8IACH5BAUKAAAALB8ANwADAAUAAAUIoCB8o0iWZggAOw==
-EOD
-
-l1.text('* Slow Animation *').start(300)
-l2.text('* Fast Animation *').start(80)
-l3.text('This is a longer scrolling text in a widget that will not show the whole message at once. ').start(150)
-
-limg.destroy_image = true
-limg.image(TkPhotoImage.new(:format=>'GIF', :data=>tclPowerdData)).start(100)
diff --git a/ext/tk/sample/demos-jp/aniwave.rb b/ext/tk/sample/demos-jp/aniwave.rb
deleted file mode 100644
index 6973de7f09..0000000000
--- a/ext/tk/sample/demos-jp/aniwave.rb
+++ /dev/null
@@ -1,121 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# animated wave demo (called by 'widget')
-#
-# based on Tcl/Tk8.5a2 widget demos
-
-# destroy toplevel widget for this demo script
-if defined?($aniwave_demo) && $aniwave_demo
- $aniwave_demo.destroy
- $aniwave_demo = nil
-end
-
-# create toplevel widget
-$aniwave_demo = TkToplevel.new {|w|
- title("Animated Wave Demonstration")
- iconname("aniwave")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($aniwave_demo).pack(:fill=>:both, :expand=>true)
-
-# create label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text 'ã“ã®ãƒ‡ãƒ¢ã§ã¯ã€ãƒ©ã‚¤ãƒ³ã‚¢ã‚¤ãƒ†ãƒ ãŒä¸€ã¤ã ã‘æã‹ã‚ŒãŸã‚­ãƒ£ãƒ³ãƒã‚¹ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚アニメーション処ç†ã¯ã€ãã®ãƒ©ã‚¤ãƒ³ã‚¢ã‚¤ãƒ†ãƒ ã®åº§æ¨™å€¤ã‚’変更ã™ã‚‹ã“ã¨ã§å®Ÿç¾ã—ã¦ã„ã¾ã™ã€‚'
-}
-msg.pack('side'=>'top')
-
-# create frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $aniwave_demo
- $aniwave_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'aniwave'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# animated wave
-class AnimatedWaveDemo
- def initialize(frame, dir=:left)
- @direction = dir
-
- # create canvas widget
- @c = TkCanvas.new(frame, :width=>300, :height=>200,
- :background=>'black')
- @c.pack(:padx=>10, :pady=>10, :expand=>true)
-
- # Creates a coordinates list of a wave.
- @waveCoords = []
- @backupCoords = []
- n = 0
- (-10..300).step(5){|n| @waveCoords << [n, 100]; @backupCoords << [n, 100] }
- n = 305
- @waveCoords << [n, 0]; @backupCoords << [n, 0]
- @waveCoords << [n+5, 200]; @backupCoords << [n+5, 200]
- @coordsLen = @waveCoords.length
-
- # Create a smoothed line and arrange for its coordinates to be the
- # contents of the variable waveCoords.
- @line = TkcLine.new(@c, @waveCoords,
- :width=>1, :fill=>'green', :smooth=>true)
-
- # Main animation "loop".
- # Theoretically 100 frames-per-second (==10ms between frames)
- @timer = TkTimer.new(10){ basicMotion; reverser }
-
- # Arrange for the animation loop to stop when the canvas is deleted
- @c.bindtags_unshift(TkBindTag.new('Destroy'){ @timer.stop })
- end
-
- # Basic motion handler. Given what direction the wave is travelling
- # in, it advances the y coordinates in the coordinate-list one step in
- # that direction.
- def basicMotion
- @backupCoords, @waveCoords = @waveCoords, @backupCoords
- (0...@coordsLen).each{|idx|
- if @direction == :left
- @waveCoords[idx][1] = @backupCoords[(idx+1 == @coordsLen)? 0: idx+1][1]
- else
- @waveCoords[idx][1] = @backupCoords[(idx == 0)? -1: idx-1][1]
- end
- }
- @line.coords(@waveCoords)
- end
-
- # Oscillation handler. This detects whether to reverse the direction
- # of the wave by checking to see if the peak of the wave has moved off
- # the screen (whose size we know already.)
- def reverser
- if @waveCoords[0][1] < 10
- @direction = :right
- elsif @waveCoords[-1][1] < 10
- @direction = :left
- end
- end
-
- # animation control
- def move
- @timer.start
- end
-
- def stop
- @timer.stop
- end
-end
-
-# Start the animation processing
-AnimatedWaveDemo.new(base_frame, :left).move
diff --git a/ext/tk/sample/demos-jp/arrow.rb b/ext/tk/sample/demos-jp/arrow.rb
deleted file mode 100644
index 12ab4af2b1..0000000000
--- a/ext/tk/sample/demos-jp/arrow.rb
+++ /dev/null
@@ -1,248 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# arrowhead widget demo (called by 'widget')
-#
-
-# arrowSetup --
-# This method regenerates all the text and graphics in the canvas
-# window. It's called when the canvas is initially created, and also
-# whenever any of the parameters of the arrow head are changed
-# interactively.
-#
-# Arguments:
-# c - Name of the canvas widget.
-
-def arrowSetup(c)
- v = $demo_arrowInfo
-
- # Remember the current box, if there is one.
- tags = c.gettags('current')
- if tags != []
- cur = tags.find{|t| t.kind_of?(String) && t =~ /^box[1-3]$/ }
- else
- cur = nil
- end
-
- # Create the arrow and outline.
- c.delete('all')
- TkcLine.new(c, v.x1, v.y, v.x2, v.y,
- { 'width'=>10 * v.width,
- 'arrowshape'=>[10*v.a, 10*v.b, 10*v.c],
- 'arrow'=>'last'
- }.update(v.bigLineStyle) )
- xtip = v.x2 - 10*v.b
- deltaY = 10*v.c + 5*v.width
- TkcLine.new(c, v.x2, v.y, xtip, v.y + deltaY,
- v.x2 - 10*v.a, v.y, xtip, v.y - deltaY, v.x2, v.y,
- 'width'=>2, 'capstyle'=>'round', 'joinstyle'=>'round')
-
- # Create the boxes for reshaping the line and arrowhead.
- TkcRectangle.new(c, v.x2-10*v.a-5, v.y-5, v.x2-10*v.a+5, v.y+5,
- {'tags'=>['box1', $arrowTag_box]}.update(v.boxStyle) )
- TkcRectangle.new(c, xtip-5, v.y-deltaY-5, xtip+5, v.y-deltaY+5,
- {'tags'=>['box2', $arrowTag_box]}.update(v.boxStyle) )
- TkcRectangle.new(c, v.x1-5, v.y-5*v.width-5, v.x1+5, v.y-5*v.width+5,
- {'tags'=>['box3', $arrowTag_box]}.update(v.boxStyle) )
- c.itemconfigure cur, v.activeStyle if cur
-
- # Create three arrows in actual size with the same parameters
- TkcLine.new(c, v.x2+50, 0, v.x2+50, 1000, 'width'=>2)
- tmp = v.x2+100
- TkcLine.new(c, tmp, v.y-125, tmp, v.y-75, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
- TkcLine.new(c, tmp-25, v.y, tmp+25, v.y, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
- TkcLine.new(c, tmp-25, v.y+75, tmp+25, v.y+125, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
-
- # Create a bunch of other arrows and text items showing the
- # current dimensions.
- tmp = v.x2+10
- TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y-deltaY,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
- TkcText.new(c, v.x2+15, v.y-deltaY+5*v.c, 'text'=>v.c, 'anchor'=>'w')
- tmp = v.x1-10
- TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y+5*v.width,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
- TkcText.new(c, v.x1-15, v.y, 'text'=>v.width, 'anchor'=>'e')
- tmp = v.y+5*v.width+10*v.c+10
- TkcLine.new(c, v.x2-10*v.a, tmp, v.x2, tmp,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
- TkcText.new(c, v.x2-5*v.a, tmp+5, 'text'=>v.a, 'anchor'=>'n')
- tmp = tmp+25
- TkcLine.new(c, v.x2-10*v.b, tmp, v.x2, tmp,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
- TkcText.new(c, v.x2-5*v.b, tmp+5, 'text'=>v.b, 'anchor'=>'n')
-
- if $tk_version =~ /^4.*/
- TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
- TkcText.new(c, v.x1, 330,
- 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]",'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
- else
- TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
- 'font'=>'Helvetica 18')
- TkcText.new(c, v.x1, 330,
- 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]",
- 'anchor'=>'w', 'font'=>'Helvetica 18')
- end
-
- v.count += 1
-end
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($arrow_demo) && $arrow_demo
- $arrow_demo.destroy
- $arrow_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$arrow_demo = TkToplevel.new {|w|
- title("Arrowhead Editor Demonstration")
- iconname("arrow")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($arrow_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"ã“ã® widget ã§ã€ã‚­ãƒ£ãƒ³ãƒã‚¹ã§ä½¿ã‚れるラインã«ã¤ã„ã¦æ§˜ã€…ãªå¹…や矢å°ã®é ­ã®å½¢ã‚’試ã—ã¦ã¿ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ç·šã®å¹…や矢å°ã®å½¢ã‚’変ãˆã‚‹ã«ã¯ã€æ‹¡å¤§ã•ã‚ŒãŸçŸ¢å°ã«ã¤ã„ã¦ã„ã‚‹ 3ã¤ã®å››è§’をドラッグã—ã¦ãã ã•ã„。å³å´ã®çŸ¢å°ã¯æ™®é€šã®å¤§ãã•ã§ã®ã‚µãƒ³ãƒ—ルを示ã—ã¦ã„ã¾ã™ã€‚下ã®ãƒ†ã‚­ã‚¹ãƒˆã¯ãƒ©ã‚¤ãƒ³ã‚¢ã‚¤ãƒ†ãƒ ã«å¯¾ã™ã‚‹è¨­å®šã‚ªãƒ—ションã§ã™ã€‚"){
- pack('side'=>'top')
-}
-
-# frame 生æˆ
-$arrow_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $arrow_demo
- $arrow_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'arrow'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$arrow_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# canvas 設定
-$arrow_canvas = TkCanvas.new(base_frame, 'width'=>500, 'height'=>350,
- 'relief'=>'sunken', 'borderwidth'=>2)
-$arrow_canvas.pack('expand'=>'yes', 'fill'=>'both')
-
-# 値設定
-unless Struct.const_defined?("ArrowInfo")
- $demo_arrowInfo = Struct.new("ArrowInfo", :a, :b, :c, :width, :motionProc,
- :x1, :x2, :y, :smallTips, :count,
- :bigLineStyle, :boxStyle, :activeStyle).new
-end
-$demo_arrowInfo.a = 8
-$demo_arrowInfo.b = 10
-$demo_arrowInfo.c = 3
-$demo_arrowInfo.width = 2
-$demo_arrowInfo.motionProc = proc{}
-$demo_arrowInfo.x1 = 40
-$demo_arrowInfo.x2 = 350
-$demo_arrowInfo.y = 150
-$demo_arrowInfo.smallTips = [5, 5, 2]
-$demo_arrowInfo.count = 0
-if TkWinfo.depth($arrow_canvas) > 1
- $demo_arrowInfo.bigLineStyle = {'fill'=>'SkyBlue1'}
- $demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1}
- $demo_arrowInfo.activeStyle = {'fill'=>'red', 'outline'=>'black', 'width'=>1}
-else
- $demo_arrowInfo.bigLineStyle = {'fill'=>'black',
- 'stipple'=>'@'+[$demo_dir,'..','images','grey.25'].join(File::Separator)}
- $demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1}
- $demo_arrowInfo.activeStyle = {'fill'=>'black','outline'=>'black','width'=>1}
-end
-$arrowTag_box = TkcTag.new($arrow_canvas)
-arrowSetup $arrow_canvas
-$arrowTag_box.bind('Enter', proc{$arrow_canvas.itemconfigure('current', $demo_arrowInfo.activeStyle)})
-$arrowTag_box.bind('Leave', proc{$arrow_canvas.itemconfigure('current', $demo_arrowInfo.boxStyle)})
-$arrowTag_box.bind('B1-Enter', proc{})
-$arrowTag_box.bind('B1-Leave', proc{})
-$arrow_canvas.itembind('box1', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove1 $arrow_canvas, x, y}})
-$arrow_canvas.itembind('box2', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove2 $arrow_canvas, x, y}})
-$arrow_canvas.itembind('box3', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove3 $arrow_canvas, x, y}})
-$arrowTag_box.bind('B1-Motion',
- proc{|x,y| $demo_arrowInfo.motionProc.call(x,y)}, "%x %y")
-$arrow_canvas.bind('Any-ButtonRelease-1', proc{arrowSetup $arrow_canvas})
-
-# arrowMove1 --
-# This method is called for each mouse motion event on box1 (the
-# one at the vertex of the arrow). It updates the controlling parameters
-# for the line and arrowhead.
-#
-# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
-
-def arrowMove1(c,x,y)
- v = $demo_arrowInfo
- newA = (v.x2+5-c.canvasx(x).round)/10
- newA = 0 if newA < 0
- newA = 25 if newA > 25
- if newA != v.a
- c.move('box1', 10*(v.a-newA), 0)
- v.a = newA
- end
-end
-
-# arrowMove2 --
-# This method is called for each mouse motion event on box2 (the
-# one at the trailing tip of the arrowhead). It updates the controlling
-# parameters for the line and arrowhead.
-#
-# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
-
-def arrowMove2(c,x,y)
- v = $demo_arrowInfo
- newB = (v.x2+5-c.canvasx(x).round)/10
- newB = 0 if newB < 0
- newB = 25 if newB > 25
- newC = (v.y+5-c.canvasy(y).round-5*v.width)/10
- newC = 0 if newC < 0
- newC = 20 if newC > 20
- if newB != v.b || newC != v.c
- c.move('box2', 10*(v.b-newB), 10*(v.c-newC))
- v.b = newB
- v.c = newC
- end
-end
-
-# arrowMove3 --
-# This method is called for each mouse motion event on box3 (the
-# one that controls the thickness of the line). It updates the
-# controlling parameters for the line and arrowhead.
-#
-# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
-
-def arrowMove3(c,x,y)
- v = $demo_arrowInfo
- newWidth = (v.y+2-c.canvasy(y).round)/5
- newWidth = 0 if newWidth < 0
- newWidth = 20 if newWidth > 20
- if newWidth != v.width
- c.move('box3', 0, 5*(v.width-newWidth))
- v.width = newWidth
- end
-end
-
diff --git a/ext/tk/sample/demos-jp/bind.rb b/ext/tk/sample/demos-jp/bind.rb
deleted file mode 100644
index 74ddf0217a..0000000000
--- a/ext/tk/sample/demos-jp/bind.rb
+++ /dev/null
@@ -1,126 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# text (tag bindings) widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($bind_demo) && $bind_demo
- $bind_demo.destroy
- $bind_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$bind_demo = TkToplevel.new {|w|
- title("Text Demonstration - Tag Bindings")
- iconname("bind")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($bind_demo).pack(:fill=>:both, :expand=>true)
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $bind_demo
- $bind_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'bind'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# bind 用メソッド
-def tag_binding_for_bind_demo(tag, enter_style, leave_style)
- tag.bind('Any-Enter', proc{tag.configure enter_style})
- tag.bind('Any-Leave', proc{tag.configure leave_style})
-end
-
-# text 生æˆ
-txt = TkText.new(base_frame){|t|
- # 生æˆ
- setgrid 'true'
- #width 60
- #height 24
- font $font
- wrap 'word'
- TkScrollbar.new(base_frame) {|s|
- pack('side'=>'right', 'fill'=>'y')
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }
- pack('expand'=>'yes', 'fill'=>'both')
-
- # スタイル設定
- if TkWinfo.depth($root).to_i > 1
- tagstyle_bold = {'background'=>'#43ce80', 'relief'=>'raised',
- 'borderwidth'=>1}
- tagstyle_normal = {'background'=>'', 'relief'=>'flat'}
- else
- tagstyle_bold = {'foreground'=>'white', 'background'=>'black'}
- tagstyle_normal = {'foreground'=>'', 'background'=>''}
- end
-
- # テキスト挿入
- insert 'insert', "テキストwidgetã®è¡¨ç¤ºã‚¹ã‚¿ã‚¤ãƒ«ã‚’制御ã™ã‚‹ã®ã¨åŒã˜ã‚¿ã‚°ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’使ã£ã¦ã€ãƒ†ã‚­ã‚¹ãƒˆã«Tclã®ã‚³ãƒžãƒ³ãƒ‰ã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã‚Œã«ã‚ˆã‚Šã€ãƒžã‚¦ã‚¹ã‚„キーボードã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã§ç‰¹å®šã®Tclã®ã‚³ãƒžãƒ³ãƒ‰ãŒå®Ÿè¡Œã•ã‚Œã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚例ãˆã°ã€ä¸‹ã®ã‚­ãƒ£ãƒ³ãƒã‚¹ã®ãƒ‡ãƒ¢ãƒ—ログラムã«ã¤ã„ã¦ã®èª¬æ˜Žæ–‡ã«ã¯ãã®ã‚ˆã†ãªã‚¿ã‚°ãŒã¤ã„ã¦ã„ã¾ã™ã€‚マウスを説明文ã®ä¸Šã«æŒã£ã¦ã„ãã¨èª¬æ˜Žæ–‡ãŒå…‰ã‚Šã€ãƒœã‚¿ãƒ³1を押ã™ã¨ãã®èª¬æ˜Žã®ãƒ‡ãƒ¢ãŒå§‹ã¾ã‚Šã¾ã™ã€‚
-
-"
- insert('end', '1. キャンãƒã‚¹ widget ã«ä½œã‚‹ã“ã¨ã®ã§ãるアイテムã®ç¨®é¡žå…¨ã¦ã«é–¢ã™ã‚‹ã‚µãƒ³ãƒ—ル。', (d1 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end', '2. ç°¡å˜ãª 2次元ã®ãƒ—ロット。データを表ã™ç‚¹ã‚’å‹•ã‹ã™ã“ã¨ãŒã§ãる。', (d2 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end', '3. テキストアイテムã®ã‚¢ãƒ³ã‚«ãƒ¼ã¨è¡Œæƒãˆã€‚',
- (d3 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end', '4. ラインアイテムã®ãŸã‚ã®çŸ¢å°ã®é ­ã®å½¢ã®ã‚¨ãƒ‡ã‚£ã‚¿ã€‚',
- (d4 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end', '5. タブストップを変更ã™ã‚‹ãŸã‚ã®æ©Ÿèƒ½ã¤ãã®ãƒ«ãƒ¼ãƒ©ãƒ¼ã€‚',
- (d5 = TkTextTag.new(t)) )
- insert('end', "\n\n")
- insert('end',
- '6. キャンãƒã‚¹ãŒã©ã†ã‚„ã£ã¦ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã™ã‚‹ã®ã‹ã‚’示ã™ã‚°ãƒªãƒƒãƒ‰ã€‚',
- (d6 = TkTextTag.new(t)) )
-
- # binding
- [d1, d2, d3, d4, d5, d6].each{|tag|
- tag_binding_for_bind_demo(tag, tagstyle_bold, tagstyle_normal)
- }
- d1.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'items.rb'].join(File::Separator)}`, 'items.rb')
- })
- d2.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`, 'plot.rb')
- })
- d3.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`, 'ctext.rb')
- })
- d4.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`, 'arrow.rb')
- })
- d5.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`, 'ruler.rb')
- })
- d6.bind('1',
- proc{
- eval_samplecode(`cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`, 'cscroll.rb')
- })
-
- TkTextMarkInsert.new(t, '0.0')
- configure('state','disabled')
-}
-
-txt.width 60
-txt.height 24
diff --git a/ext/tk/sample/demos-jp/bitmap.rb b/ext/tk/sample/demos-jp/bitmap.rb
deleted file mode 100644
index 2cc9c28fbd..0000000000
--- a/ext/tk/sample/demos-jp/bitmap.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# bitmap widget demo (called by 'widget')
-#
-
-# bitmapRow --
-# Create a row of bitmap items in a window.
-#
-# Arguments:
-# w - The parent window that is to contain the row.
-# args - The names of one or more bitmaps, which will be displayed
-# in a new row across the bottom of w along with their
-# names.
-
-def bitmapRow(w,*args)
- TkFrame.new(w){|row|
- pack('side'=>'top', 'fill'=>'both')
- for bitmap in args
- TkFrame.new(row){|base|
- pack('side'=>'left', 'fill'=>'both', 'pady'=>'.25c', 'padx'=>'.25c')
- TkLabel.new(base, 'text'=>bitmap, 'width'=>9).pack('side'=>'bottom')
- Tk::Label.new(base, 'bitmap'=>bitmap).pack('side'=>'bottom')
- }
- end
- }
-end
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($bitmap_demo) && $bitmap_demo
- $bitmap_demo.destroy
- $bitmap_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$bitmap_demo = TkToplevel.new {|w|
- title("Bitmap Demonstration")
- iconname("bitmap")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($bitmap_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ã€Tk ã«çµ„ã¿è¾¼ã¾ã‚ŒãŸã™ã¹ã¦ã®ãƒ“ットマップãŒã€ãれらã®åå‰ã¨å…±ã«è¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚Tcl ã®ã‚¹ã‚¯ãƒªãƒ—ト中ã§ã¯ã€ãã‚Œãžã‚Œã®åå‰ã‚’用ã„ã¦å‚ç…§ã—ã¾ã™ã€‚"){
- pack('side'=>'top')
-}
-
-# frame 生æˆ
-$bitmap_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $bitmap_demo
- $bitmap_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'bitmap'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$bitmap_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 設定
-TkFrame.new(base_frame){|f|
- bitmapRow(f,'error','gray25','gray50','hourglass')
- bitmapRow(f,'info','question','questhead','warning')
- pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both')
-}
-
diff --git a/ext/tk/sample/demos-jp/browse1 b/ext/tk/sample/demos-jp/browse1
deleted file mode 100644
index 568892e4a8..0000000000
--- a/ext/tk/sample/demos-jp/browse1
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env ruby
-
-# browse --
-# This script generates a directory browser, which lists the working
-# directory and allow you to open files or subdirectories by
-# double-clicking.
-
-require 'tk'
-
-# Create a scrollbar on the right side of the main window and a listbox
-# on the left side.
-
-listbox = TkListbox.new(nil, 'relief'=>'sunken',
- 'width'=>20, 'height'=>20, 'setgrid'=>'yes') {|l|
- TkScrollbar.new(nil, 'command'=>proc{|*args| l.yview *args}) {|s|
- pack('side'=>'right', 'fill'=>'y')
- l.yscrollcommand(proc{|first,last| s.set(first,last)})
- }
-
- pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes')
-}
-
-root = TkRoot.new
-root.minsize(1,1)
-
-# The procedure below is invoked to open a browser on a given file; if the
-# file is a directory then another instance of this program is invoked; if
-# the file is a regular file then the Mx editor is invoked to display
-# the file.
-
-def browse (dir, file)
- file = dir + File::Separator + file if dir != '.'
- type = File.ftype(file)
- if type == 'directory'
- system($0 + ' ' + file + ' &')
- else
- if type == 'file'
- if ENV['EDITOR']
- system(ENV['EDITOR'] + ' ' + file + ' &')
- else
- system('xedit ' + file + ' &')
- end
- else
- STDOUT.print "\"#{file}\" isn't a directory or regular file"
- end
- end
-end
-
-# Fill the listbox with a list of all the files in the directory (run
-# the "ls" command to get that information).
-
-dir = ARGV[0] ? ARGV[0] : '.'
-open("|ls -a #{dir}", 'r'){|fid| fid.readlines}.each{|fname|
- listbox.insert('end', fname.chomp)
-}
-
-# Set up bindings for the browser.
-
-Tk.bind_all('Control-c', proc{root.destroy})
-listbox.bind('Double-Button-1',
- proc{TkSelection.get.each{|f| browse dir, f}})
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/browse2 b/ext/tk/sample/demos-jp/browse2
deleted file mode 100644
index 1a511c8d29..0000000000
--- a/ext/tk/sample/demos-jp/browse2
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env ruby
-
-# browse --
-# This script generates a directory browser, which lists the working
-# directory and allow you to open files or subdirectories by
-# double-clicking.
-
-require 'tk'
-
-class Browse
- BROWSE_WIN_COUNTER = TkVariable.new(0)
-
- def initialize(dir)
- BROWSE_WIN_COUNTER.value = BROWSE_WIN_COUNTER.to_i + 1
-
- # create base frame
- base = TkToplevel.new {
- minsize(1,1)
- title('Browse : ' + dir)
- }
-
- # Create a scrollbar on the right side of the main window and a listbox
- # on the left side.
- list = TkListbox.new(base, 'relief'=>'sunken',
- 'width'=>20, 'height'=>20, 'setgrid'=>'yes') {|l|
- TkScrollbar.new(base, 'command'=>proc{|*args| l.yview *args}) {|s|
- pack('side'=>'right', 'fill'=>'y')
- l.yscrollcommand(proc{|first,last| s.set(first,last)})
- }
-
- pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes')
-
- # Fill the listbox with a list of all the files in the directory (run
- # the "ls" command to get that information).
- open("|ls -a #{dir}", 'r'){|fid| fid.readlines}.each{|fname|
- l.insert('end', fname.chomp)
- }
-
- }
-
- # Set up bindings for the browser.
- base.bind('Destroy', proc{
- Browse::BROWSE_WIN_COUNTER.value = \
- Browse::BROWSE_WIN_COUNTER.to_i - 1
- })
- base.bind('Control-c', proc{base.destroy})
- list.bind('Double-Button-1',
- proc{TkSelection.get.each{|f| self.browse dir, f}})
- end
-
- # The method below is invoked to open a browser on a given file; if the
- # file is a directory then another instance of this program is invoked; if
- # the file is a regular file then the Mx editor is invoked to display
- # the file.
- def browse (dir, file)
- file = dir + File::Separator + file if dir != '.'
- type = File.ftype(file)
- if type == 'directory'
- Browse.new(file)
- else
- if type == 'file'
- if ENV['EDITOR']
- system(ENV['EDITOR'] + ' ' + file + ' &')
- else
- system('xedit ' + file + ' &')
- end
- else
- STDOUT.print "\"#{file}\" isn't a directory or regular file"
- end
- end
- end
-
-end
-
-Browse.new(ARGV[0] ? ARGV[0] : '.')
-
-TkRoot.new {
- withdraw
- Browse::BROWSE_WIN_COUNTER.trace('w', proc{exit if Browse::BROWSE_WIN_COUNTER.to_i == 0})
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/button.rb b/ext/tk/sample/demos-jp/button.rb
deleted file mode 100644
index 204f5eab86..0000000000
--- a/ext/tk/sample/demos-jp/button.rb
+++ /dev/null
@@ -1,84 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# button widget demo (called by 'widget')
-#
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($button_demo) && $button_demo
- $button_demo.destroy
- $button_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$button_demo = TkToplevel.new {|w|
- title("Button Demonstration")
- iconname("button")
- positionWindow(w)
-}
-
-# label 生æˆ
-msg = TkLabel.new($button_demo) {
- font $kanji_font
- wraplength '4i'
- justify 'left'
- text "ボタンをクリックã™ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®èƒŒæ™¯è‰²ãŒãã®ãƒœã‚¿ãƒ³ã«æ›¸ã‹ã‚Œã¦ã„る色ã«ãªã‚Šã¾ã™ã€‚ボタンã‹ã‚‰ãƒœã‚¿ãƒ³ã¸ã®ç§»å‹•ã¯ã‚¿ãƒ–を押ã™ã“ã¨ã§ã‚‚å¯èƒ½ã§ã™ã€‚ã¾ãŸã‚¹ãƒšãƒ¼ã‚¹ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-$button_buttons = Tk::Frame.new($button_demo) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $button_demo
- $button_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'button'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# button 生æˆ
-TkButton.new($button_demo){
- text "Peach Puff"
- width 10
- command proc{
- $button_demo.configure('bg','PeachPuff1')
- $button_buttons.configure('bg','PeachPuff1')
- }
-}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2)
-
-TkButton.new($button_demo){
- text "Light Blue"
- width 10
- command proc{
- $button_demo.configure('bg','LightBlue1')
- $button_buttons.configure('bg','LightBlue1')
- }
-}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2)
-
-TkButton.new($button_demo){
- text "Sea Green"
- width 10
- command proc{
- $button_demo.configure('bg','SeaGreen2')
- $button_buttons.configure('bg','SeaGreen2')
- }
-}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2)
-
-TkButton.new($button_demo){
- text "Yellow"
- width 10
- command proc{
- $button_demo.configure('bg','Yellow1')
- $button_buttons.configure('bg','Yellow1')
- }
-}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2)
diff --git a/ext/tk/sample/demos-jp/check.rb b/ext/tk/sample/demos-jp/check.rb
deleted file mode 100644
index 04a47c8101..0000000000
--- a/ext/tk/sample/demos-jp/check.rb
+++ /dev/null
@@ -1,71 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# checkbutton widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($check_demo) && $check_demo
- $check_demo.destroy
- $check_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$check_demo = TkToplevel.new {|w|
- title("Checkbutton Demonstration")
- iconname("check")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($check_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "下ã«ã¯ 3 ã¤ã®ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚クリックã™ã‚‹ã¨ãƒœã‚¿ãƒ³ã®é¸æŠžçŠ¶æ…‹ãŒå¤‰ã‚ã‚Šã€Tcl 変数 ( TkVariable オブジェクトã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ ) ã«ãã®ãƒœã‚¿ãƒ³ã®çŠ¶æ…‹ã‚’示ã™å€¤ã‚’設定ã—ã¾ã™ã€‚ç¾åœ¨ã®å¤‰æ•°ã®å€¤ã‚’見るã«ã¯ã€Œå¤‰æ•°å‚ç…§ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。"
-}
-msg.pack('side'=>'top')
-
-# 変数生æˆ
-wipers = TkVariable.new(0)
-brakes = TkVariable.new(0)
-sober = TkVariable.new(0)
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $check_demo
- $check_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'check'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-
- TkButton.new(frame) {
- text '変数å‚ç…§'
- command proc{
- showVars(base_frame,
- ['wipers', wipers], ['brakes', brakes], ['sober', sober])
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-
-# checkbutton 生æˆ
-[ TkCheckButton.new(base_frame, 'text'=>'ワイパー OK', 'variable'=>wipers),
- TkCheckButton.new(base_frame, 'text'=>'ブレーキ OK', 'variable'=>brakes),
- TkCheckButton.new(base_frame, 'text'=>'é‹è»¢æ‰‹ ç´ é¢', 'variable'=>sober)
-].each{|w| w.relief('flat'); w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')}
-
diff --git a/ext/tk/sample/demos-jp/check2.rb b/ext/tk/sample/demos-jp/check2.rb
deleted file mode 100644
index 609f6830d8..0000000000
--- a/ext/tk/sample/demos-jp/check2.rb
+++ /dev/null
@@ -1,111 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# checkbutton widget demo2 (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($check2_demo) && $check2_demo
- $check2_demo.destroy
- $check2_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$check2_demo = TkToplevel.new {|w|
- title("Checkbutton Demonstration 2")
- iconname("check2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($check2_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "下ã«ã¯ï¼”ã¤ã®ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚クリックã™ã‚‹ã¨ãƒœã‚¿ãƒ³ã®é¸æŠžçŠ¶æ…‹ãŒå¤‰ã‚ã‚Šã€Tcl変数(TkVariableオブジェクトã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ï¼‰ã«ãã®ãƒœã‚¿ãƒ³ã®çŠ¶æ…‹ã‚’示ã™å€¤ã‚’設定ã—ã¾ã™ã€‚最åˆã®ãƒœã‚¿ãƒ³ã®çŠ¶æ…‹ã¯ä»–ã®ï¼“ã¤ã®ãƒœã‚¿ãƒ³ã®çŠ¶æ…‹ã«ã‚‚ä¾å­˜ã—ã¦å¤‰åŒ–ã—ã¾ã™ã€‚ã‚‚ã—3ã¤ã®ãƒœã‚¿ãƒ³ã®ä¸€éƒ¨ã ã‘ã«ãƒã‚§ãƒƒã‚¯ãŒä»˜ã‘られã¦ã„ã‚‹å ´åˆã€æœ€åˆã®ãƒœã‚¿ãƒ³ã¯ãƒˆãƒ©ã‚¤ã‚¹ãƒ†ãƒ¼ãƒˆï¼ˆï¼“状態)モードã§ã®è¡¨ç¤ºã‚’è¡Œã„ã¾ã™ã€‚ç¾åœ¨ã®å¤‰æ•°ã®å€¤ã‚’見るã«ã¯ã€Œå¤‰æ•°å‚ç…§ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。"
-}
-msg.pack('side'=>'top')
-
-# 変数生æˆ
-safety = TkVariable.new(0)
-wipers = TkVariable.new(0)
-brakes = TkVariable.new(0)
-sober = TkVariable.new(0)
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- TkButton.new(frame, :text=>'変数å‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars($check2_demo,
- ['safety', safety], ['wipers', wipers],
- ['brakes', brakes], ['sober', sober])
- }),
- TkButton.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'check2'}),
- TkButton.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $check2_demo
- $check2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
- frame.grid_columnconfigure(0, :weight=>1)
-}.pack('side'=>'bottom', 'fill'=>'x')
-
-
-# checkbutton 生æˆ
-TkCheckButton.new(base_frame, :text=>'安全性検査', :variable=>safety,
- :relief=>:flat, :onvalue=>'all', :offvalue=>'none',
- :tristatevalue=>'partial'){
- pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')
-}
-
-[ TkCheckButton.new(base_frame, 'text'=>'ワイパー OK', 'variable'=>wipers),
- TkCheckButton.new(base_frame, 'text'=>'ブレーキ OK', 'variable'=>brakes),
- TkCheckButton.new(base_frame, 'text'=>'é‹è»¢æ‰‹ ç´ é¢', 'variable'=>sober)
-].each{|w|
- w.relief('flat')
- w.pack('side'=>'top', 'padx'=>15, 'pady'=>2, 'anchor'=>'w')
-}
-
-# tristate check
-in_check = false
-tristate_check = proc{|n1,n2,op|
- unless in_check
- in_check = true
- begin
- if n1 == safety
- if safety == 'none'
- wipers.value = 0
- brakes.value = 0
- sober.value = 0
- elsif safety == 'all'
- wipers.value = 1
- brakes.value = 1
- sober.value = 1
- end
- else
- if wipers == 1 && brakes == 1 && sober == 1
- safety.value = 'all'
- elsif wipers == 1 || brakes == 1 || sober == 1
- safety.value = 'partial'
- else
- safety.value = 'none'
- end
- end
- ensure
- in_check = false
- end
- end
-}
-
-[wipers, brakes, sober, safety].each{|v| v.trace('w', tristate_check)}
diff --git a/ext/tk/sample/demos-jp/clrpick.rb b/ext/tk/sample/demos-jp/clrpick.rb
deleted file mode 100644
index 31a3f25b7c..0000000000
--- a/ext/tk/sample/demos-jp/clrpick.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# widget demo prompts the user to select a color (called by 'widget')
-#
-# Note: don't support ttk_wrapper. work with standard widgets only.
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($clrpick_demo) && $clrpick_demo
- $clrpick_demo.destroy
- $clrpick_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$clrpick_demo = TkToplevel.new {|w|
- title("Color Selection Dialogs")
- iconname("colors")
- positionWindow(w)
-}
-
-# label 生æˆ
-#TkLabel.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
-Tk::Label.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"以下ã®ãƒœã‚¿ãƒ³ã‚’押ã—ã¦ã€ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ä¸Šã«ã‚るウィジェットã®å‰æ™¯è‰²ã¨èƒŒæ™¯è‰²ã‚’é¸æŠžã—ã¦ä¸‹ã•ã„。").pack('side'=>'top')
-
-# frame 生æˆ
-# TkFrame.new($clrpick_demo) {|frame|
-Tk::Frame.new($clrpick_demo) {|frame|
- # TkButton.new(frame) {
- Tk::Button.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $clrpick_demo
- $clrpick_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- # TkButton.new(frame) {
- Tk::Button.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'clrpick'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# button 生æˆ
-# TkButton.new($clrpick_demo, 'text'=>'背景色を設定 ...') {|b|
-Tk::Button.new($clrpick_demo, 'text'=>'背景色を設定 ...') {|b|
- command(proc{setColor $clrpick_demo, b, 'background',
- ['background', 'highlightbackground']})
- pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m')
-}
-
-# TkButton.new($clrpick_demo, 'text'=>'å‰æ™¯è‰²ã‚’設定 ...') {|b|
-Tk::Button.new($clrpick_demo, 'text'=>'å‰æ™¯è‰²ã‚’設定 ...') {|b|
- command(proc{setColor $clrpick_demo, b, 'foreground', ['foreground']})
- pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m')
-}
-
-def setColor(w,button,name,options)
- w.grab
- initialColor = button[name]
- color = Tk.chooseColor('title'=>"Choose a #{name} color", 'parent'=>w,
- 'initialcolor'=>initialColor)
- if color != ""
- setColor_helper(w,options,color)
- end
-
- w.grab('release')
-end
-
-def setColor_helper(w, options, color)
- options.each{|opt|
- begin
- w[opt] = color
- rescue
- end
- }
- TkWinfo.children(w).each{|child|
- setColor_helper child, options, color
- }
-end
-
diff --git a/ext/tk/sample/demos-jp/colors.rb b/ext/tk/sample/demos-jp/colors.rb
deleted file mode 100644
index c0145daaf6..0000000000
--- a/ext/tk/sample/demos-jp/colors.rb
+++ /dev/null
@@ -1,156 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# listbox widget demo 'colors' (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($colors_demo) && $colors_demo
- $colors_demo.destroy
- $colors_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$colors_demo = TkToplevel.new {|w|
- title("Listbox Demonstration (colors)")
- iconname("colors")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($colors_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "下ã«ã¯è‰²ã®åå‰ãŒå…¥ã£ãŸã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ä»˜ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚リストをスクロールã•ã›ã‚‹ã®ã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ã§ã‚‚ã§ãã¾ã™ã—ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ä¸­ã§ãƒžã‚¦ã‚¹ã®ãƒœã‚¿ãƒ³2(中ボタン)を押ã—ãŸã¾ã¾ãƒ‰ãƒ©ãƒƒã‚°ã—ã¦ã‚‚ã§ãã¾ã™ã€‚ã‚る色をボタン1(左ボタン)ã§ãƒ€ãƒ–ルクリックã™ã‚‹ã¨ã‚¢ãƒ—リケーション全体ãŒãã®è‰²ã«ãªã‚Šã¾ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $colors_demo
- $colors_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'colors'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-colors_lbox = nil
-TkFrame.new(base_frame, 'borderwidth'=>10) {|w|
- s = TkScrollbar.new(w)
- colors_lbox = TkListbox.new(w) {
- setgrid 1
- width 10
- height 12
- yscrollcommand proc{|first,last| s.set first,last}
- }
- s.command(proc{|*args| colors_lbox.yview(*args)})
- s.pack('side'=>'right', 'fill'=>'y')
- colors_lbox.pack('side'=>'left', 'expand'=>1, 'fill'=>'both')
-}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y')
-
-#colors_lbox.bind('Double-1', proc{TkPalette.setPalette TkSelection.get})
-colors_lbox.bind('Double-1', proc{
- begin
- TkPalette.setPalette TkSelection.get
- rescue => e
- p e
- Tk.tk_call_without_enc('destroy', '.___tk_set_palette')
- end
- })
-
-ins_data = [
- 'gray60','gray70','gray80','gray85','gray90','gray95',
- 'snow1','snow2','snow3','snow4','seashell1','seashell2',
- 'seashell3','seashell4','AntiqueWhite1','AntiqueWhite2',
- 'AntiqueWhite3','AntiqueWhite4','bisque1','bisque2',
- 'bisque3','bisque4','PeachPuff1','PeachPuff2',
- 'PeachPuff3','PeachPuff4','NavajoWhite1','NavajoWhite2',
- 'NavajoWhite3','NavajoWhite4','LemonChiffon1',
- 'LemonChiffon2','LemonChiffon3','LemonChiffon4',
- 'cornsilk1','cornsilk2','cornsilk3','cornsilk4',
- 'ivory1','ivory2','ivory3','ivory4','honeydew1',
- 'honeydew2','honeydew3','honeydew4','LavenderBlush1',
- 'LavenderBlush2','LavenderBlush3','LavenderBlush4',
- 'MistyRose1','MistyRose2','MistyRose3','MistyRose4',
- 'azure1','azure2','azure3','azure4','SlateBlue1',
- 'SlateBlue2','SlateBlue3','SlateBlue4','RoyalBlue1',
- 'RoyalBlue2','RoyalBlue3','RoyalBlue4','blue1','blue2',
- 'blue3','blue4','DodgerBlue1','DodgerBlue2',
- 'DodgerBlue3','DodgerBlue4','SteelBlue1','SteelBlue2',
- 'SteelBlue3','SteelBlue4','DeepSkyBlue1','DeepSkyBlue2',
- 'DeepSkyBlue3','DeepSkyBlue4','SkyBlue1','SkyBlue2',
- 'SkyBlue3','SkyBlue4','LightSkyBlue1','LightSkyBlue2',
- 'LightSkyBlue3','LightSkyBlue4','SlateGray1',
- 'SlateGray2','SlateGray3','SlateGray4',
- 'LightSteelBlue1','LightSteelBlue2','LightSteelBlue3',
- 'LightSteelBlue4','LightBlue1','LightBlue2',
- 'LightBlue3','LightBlue4','LightCyan1','LightCyan2',
- 'LightCyan3','LightCyan4','PaleTurquoise1',
- 'PaleTurquoise2','PaleTurquoise3','PaleTurquoise4',
- 'CadetBlue1','CadetBlue2','CadetBlue3','CadetBlue4',
- 'turquoise1','turquoise2','turquoise3','turquoise4',
- 'cyan1','cyan2','cyan3','cyan4','DarkSlateGray1',
- 'DarkSlateGray2','DarkSlateGray3','DarkSlateGray4',
- 'aquamarine1','aquamarine2','aquamarine3','aquamarine4',
- 'DarkSeaGreen1','DarkSeaGreen2','DarkSeaGreen3',
- 'DarkSeaGreen4','SeaGreen1','SeaGreen2','SeaGreen3',
- 'SeaGreen4','PaleGreen1','PaleGreen2','PaleGreen3',
- 'PaleGreen4','SpringGreen1','SpringGreen2',
- 'SpringGreen3','SpringGreen4','green1','green2',
- 'green3','green4','chartreuse1','chartreuse2',
- 'chartreuse3','chartreuse4','OliveDrab1','OliveDrab2',
- 'OliveDrab3','OliveDrab4','DarkOliveGreen1',
- 'DarkOliveGreen2','DarkOliveGreen3','DarkOliveGreen4',
- 'khaki1','khaki2','khaki3','khaki4','LightGoldenrod1',
- 'LightGoldenrod2','LightGoldenrod3','LightGoldenrod4',
- 'LightYellow1','LightYellow2','LightYellow3',
- 'LightYellow4','yellow1','yellow2','yellow3','yellow4',
- 'gold1','gold2','gold3','gold4','goldenrod1',
- 'goldenrod2','goldenrod3','goldenrod4','DarkGoldenrod1',
- 'DarkGoldenrod2','DarkGoldenrod3','DarkGoldenrod4',
- 'RosyBrown1','RosyBrown2','RosyBrown3','RosyBrown4',
- 'IndianRed1','IndianRed2','IndianRed3','IndianRed4',
- 'sienna1','sienna2','sienna3','sienna4','burlywood1',
- 'burlywood2','burlywood3','burlywood4','wheat1',
- 'wheat2','wheat3','wheat4','tan1','tan2','tan3','tan4',
- 'chocolate1','chocolate2','chocolate3','chocolate4',
- 'firebrick1','firebrick2','firebrick3','firebrick4',
- 'brown1','brown2','brown3','brown4','salmon1','salmon2',
- 'salmon3','salmon4','LightSalmon1','LightSalmon2',
- 'LightSalmon3','LightSalmon4','orange1','orange2',
- 'orange3','orange4','DarkOrange1','DarkOrange2',
- 'DarkOrange3','DarkOrange4','coral1','coral2','coral3',
- 'coral4','tomato1','tomato2','tomato3','tomato4',
- 'OrangeRed1','OrangeRed2','OrangeRed3','OrangeRed4',
- 'red1','red2','red3','red4','DeepPink1','DeepPink2',
- 'DeepPink3','DeepPink4','HotPink1','HotPink2',
- 'HotPink3','HotPink4','pink1','pink2','pink3','pink4',
- 'LightPink1','LightPink2','LightPink3','LightPink4',
- 'PaleVioletRed1','PaleVioletRed2','PaleVioletRed3',
- 'PaleVioletRed4','maroon1','maroon2','maroon3',
- 'maroon4','VioletRed1','VioletRed2','VioletRed3',
- 'VioletRed4','magenta1','magenta2','magenta3',
- 'magenta4','orchid1','orchid2','orchid3','orchid4',
- 'plum1','plum2','plum3','plum4','MediumOrchid1',
- 'MediumOrchid2','MediumOrchid3','MediumOrchid4',
- 'DarkOrchid1','DarkOrchid2','DarkOrchid3',
- 'DarkOrchid4','purple1','purple2','purple3','purple4',
- 'MediumPurple1','MediumPurple2','MediumPurple3',
- 'MediumPurple4','thistle1','thistle2','thistle3', 'thistle4'
-]
-
-colors_lbox.insert(0, *ins_data)
diff --git a/ext/tk/sample/demos-jp/combo.rb b/ext/tk/sample/demos-jp/combo.rb
deleted file mode 100644
index 0f3e808606..0000000000
--- a/ext/tk/sample/demos-jp/combo.rb
+++ /dev/null
@@ -1,99 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# combo.rb --
-#
-# This demonstration script creates several combobox widgets.
-#
-# based on "Id: combo.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($combo_demo) && $combo_demo
- $combo_demo.destroy
- $combo_demo = nil
-end
-
-$combo_demo = TkToplevel.new {|w|
- title("Combobox Demonstration")
- iconname("combo")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($combo_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top, :fill=>:x)
-以下ã§ã¯3種類ã®ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼Ž\
-最åˆã®ã‚‚ã®ã¯ï¼Œã‚¨ãƒ³ãƒˆãƒªã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã¨åŒã˜æ§˜ã«ï¼Œ\
-ãƒã‚¤ãƒ³ãƒˆã—ãŸã‚Šï¼Œã‚¯ãƒªãƒƒã‚¯ã—ãŸã‚Šï¼Œã‚¿ã‚¤ãƒ—ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼Ž\
-ã¾ãŸï¼ŒReturnキーを入力ã™ã‚Œã°ç¾åœ¨ã®å€¤ãŒãƒªã‚¹ãƒˆã«è¿½åŠ ã•ã‚Œï¼Œ\
-ドロップダウンリストã‹ã‚‰é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ï¼Ž\
-↓(下å‘ã矢å°)キーを押ã—ã¦è¡¨ç¤ºã•ã‚ŒãŸãƒªã‚¹ãƒˆã‹ã‚‰\
-矢å°ã‚­ãƒ¼ã§ä»–ã®å€™è£œã‚’é¸ã‚“ã§Returnキーを押ã›ã°ï¼Œå€¤ã‚’é¸æŠžã§ãã¾ã™ï¼Ž\
-2番目ã®ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã¯ç‰¹å®šã®å€¤ã«å›ºå®šã•ã‚Œã¦ãŠã‚Šï¼Œä¸€åˆ‡å¤‰æ›´ã§ãã¾ã›ã‚“.\
-3番目ã®ã‚‚ã®ã¯ã‚ªãƒ¼ã‚¹ãƒˆãƒ©ãƒªã‚¢ã®éƒ½å¸‚ã®ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã‹ã‚‰\
-é¸æŠžã™ã‚‹ã“ã¨ã ã‘ãŒå¯èƒ½ã¨ãªã£ã¦ã„ã¾ã™ï¼Ž
-EOL
-
-## variables
-firstValue = TkVariable.new
-secondValue = TkVariable.new
-ozCity = TkVariable.new
-
-## See Code / Dismiss buttons
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'変数å‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars(base_frame,
- ['firstVariable', firstValue],
- ['secondVariable', secondValue],
- ['ozCity', ozCity])
- }),
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'combo'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $combo_demo.destroy
- $combo_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-
-australianCities = [
- 'キャンベラ', 'シドニー', 'メルボルン', 'パース', 'アデレード',
- 'ブリスベーン', 'ホãƒãƒ¼ãƒˆ', 'ダーウィン', 'アリス スプリングス'
-]
-
-
-secondValue.value = '変更ä¸å¯'
-ozCity.value = 'シドニー'
-
-Tk.pack(Ttk::Labelframe.new(frame, :text=>'Fully Editable'){|f|
- Ttk::Combobox.new(f, :textvariable=>firstValue){|b|
- b.bind('Return', '%W'){|w|
- w.values <<= w.value unless w.values.include?(w.value)
- }
- }.pack(:pady=>5, :padx=>10)
- },
-
- Ttk::LabelFrame.new(frame, :text=>'Disabled'){|f|
- Ttk::Combobox.new(f, :textvariable=>secondValue, :state=>:disabled) .
- pack(:pady=>5, :padx=>10)
- },
-
- Ttk::LabelFrame.new(frame, :text=>'Defined List Only'){|f|
- Ttk::Combobox.new(f, :textvariable=>ozCity, :state=>:readonly,
- :values=>australianCities) .
- pack(:pady=>5, :padx=>10)
- },
-
- :side=>:top, :pady=>5, :padx=>10)
diff --git a/ext/tk/sample/demos-jp/cscroll.rb b/ext/tk/sample/demos-jp/cscroll.rb
deleted file mode 100644
index 6cce3d4369..0000000000
--- a/ext/tk/sample/demos-jp/cscroll.rb
+++ /dev/null
@@ -1,135 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# simple scrollable canvas widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($cscroll_demo) && $cscroll_demo
- $cscroll_demo.destroy
- $cscroll_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$cscroll_demo = TkToplevel.new {|w|
- title("Scrollable Canvas Demonstration")
- iconname("cscroll")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($cscroll_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i',
- 'justify'=>'left', 'text'=>"ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ã‚„マウスã®ãƒœã‚¿ãƒ³2 ã§ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã§ãるキャンãƒã‚¹ widget ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚四角ã®ä¸Šã§ãƒœã‚¿ãƒ³1 をクリックã™ã‚‹ã¨ã€ãã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒæ¨™æº–出力ã«å‡ºåŠ›ã•ã‚Œã¾ã™ã€‚"){
- pack('side'=>'top')
-}
-
-# frame 生æˆ
-$cscroll_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $cscroll_demo
- $cscroll_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'cscroll'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$cscroll_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 設定
-unless $tk_version =~ /^4\.[01]/
- $cscroll_grid = TkFrame.new(base_frame) {
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
- }
- TkGrid.rowconfigure($cscroll_grid, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure($cscroll_grid, 0, 'weight'=>1, 'minsize'=>0)
-end
-
-# canvas 設定
-$cscroll_canvas = TkCanvas.new(base_frame,
- 'relief'=>'sunken', 'borderwidth'=>2,
- 'scrollregion'=>['-11c', '-11c', '50c', '20c']
- ) {|c|
- if $tk_version =~ /^4\.[01]/
- pack('expand'=>'yes', 'fill'=>'both')
- else
- grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- end
-
- TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}) {|vs|
- c.yscrollcommand(proc{|first,last| vs.set first,last})
- if $tk_version =~ /^4\.[01]/
- pack('side'=>'right', 'fill'=>'y')
- else
- grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- end
- }
-
- TkScrollbar.new(base_frame, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}) {|hs|
- c.xscrollcommand(proc{|first,last| hs.set first,last})
- if $tk_version =~ /^4\.[01]/
- pack('side'=>'bottom', 'fill'=>'x')
- else
- grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- end
- }
-}
-
-bg = $cscroll_canvas.configinfo('bg')[4]
-(0..19).each{|i|
- x = -10+3*i
- y = -10
- (0..9).each{|j|
- TkcRectangle.new($cscroll_canvas, "#{x}c", "#{y}c", "#{x+2}c", "#{y+2}c",
- 'outline'=>'black', 'fill'=>bg, 'tags'=>'rect')
- TkcText.new($cscroll_canvas, "#{x+1}c", "#{y+1}c",
- 'text'=>"#{i},#{j}", 'anchor'=>'center', 'tags'=>'text')
- y += 3
- }
-}
-
-$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas})
-$cscroll_canvas.itembind('all', 'Any-Leave', proc{scrollLeave $cscroll_canvas})
-$cscroll_canvas.itembind('all', '1', proc{scrollButton $cscroll_canvas})
-$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas})
-$cscroll_canvas.bind('2', proc{|x,y| $cscroll_canvas.scan_mark(x,y)}, '%x %y')
-$cscroll_canvas.bind('B2-Motion',
- proc{|x,y| $cscroll_canvas.scan_dragto(x,y)}, '%x %y')
-
-def scrollEnter(c)
- id = c.find_withtag('current')[0].id
- id -= 1 if c.gettags('current').include?('text')
- $oldFill = c.itemconfiginfo(id, 'fill')[4]
- if TkWinfo.depth(c) > 1
- c.itemconfigure(id, 'fill'=>'SeaGreen1')
- else
- c.itemconfigure(id, 'fill'=>'black')
- c.itemconfigure(id+1, 'fill'=>'white')
- end
-end
-
-def scrollLeave(c)
- id = c.find_withtag('current')[0].id
- id -= 1 if c.gettags('current').include?('text')
- c.itemconfigure(id, 'fill'=>$oldFill)
- c.itemconfigure(id+1, 'fill'=>'black')
-end
-
-def scrollButton(c)
- id = c.find_withtag('current')[0].id
- id += 1 unless c.gettags('current').include?('text')
- print "You buttoned at #{c.itemconfiginfo(id,'text')[4]}\n"
-end
-
diff --git a/ext/tk/sample/demos-jp/ctext.rb b/ext/tk/sample/demos-jp/ctext.rb
deleted file mode 100644
index 15ec84b421..0000000000
--- a/ext/tk/sample/demos-jp/ctext.rb
+++ /dev/null
@@ -1,205 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# Canvas Text widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($ctext_demo) && $ctext_demo
- $ctext_demo.destroy
- $ctext_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$ctext_demo = TkToplevel.new {|w|
- title("Canvas Text Demonstration")
- iconname("Text")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ctext_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ã‚­ãƒ£ãƒ³ãƒã‚¹widgetã®ãƒ†ã‚­ã‚¹ãƒˆæ©Ÿèƒ½ã‚’デモã™ã‚‹ãŸã‚ã®ãƒ†ã‚­ã‚¹ãƒˆæ–‡å­—列ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚マウスを四角ã®ä¸­ã«æŒã£ã¦ã„ãã€ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã¨ä½ç½®ãŽã‚用ã®ç‚¹ã‹ã‚‰ã®ç›¸å¯¾ä½ç½®ã‚’変ãˆãŸã‚Šã€è¡Œæƒãˆã‚’変ãˆãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸä»¥ä¸‹ã®ã‚ˆã†ãªç·¨é›†ã®ãŸã‚ã®ç°¡å˜ãªãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚
-
- 1. マウスをæŒã£ã¦ã„ãã€ã‚¯ãƒªãƒƒã‚¯ã—ã€å…¥åŠ›ã§ãã¾ã™ã€‚
- 2. ボタン1ã§é¸æŠžã§ãã¾ã™ã€‚
- 3. マウスã®ä½ç½®ã«ãƒœã‚¿ãƒ³2ã§é¸æŠžã—ãŸãƒ†ã‚­ã‚¹ãƒˆã‚’コピーã§ãã¾ã™ã€‚
- 4.ãƒãƒƒã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’コントロール-Hã§æŒ¿å…¥ã‚«ãƒ¼ã‚½ãƒ«ã®ç›´å‰ã®æ–‡å­—を削除ã—ã¾ã™ã€‚
- 5. Deleteキーã¯æŒ¿å…¥ã‚«ãƒ¼ã‚½ãƒ«ã®ç›´å¾Œã®æ–‡å­—を削除ã—ã¾ã™ã€‚"){
- pack('side'=>'top')
-}
-
-# frame 生æˆ
-$ctext_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $ctext_demo
- $ctext_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'ctext'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$ctext_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# canvas 生æˆ
-$ctext_canvas = TkCanvas.new(base_frame, 'relief'=>'flat',
- 'borderwidth'=>0, 'width'=>500, 'height'=>350)
-$ctext_canvas.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both')
-
-# font 設定
-if $tk_version =~ /^4.*/
- textFont = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*'
-else
- textFont = 'Helvetica 24'
-end
-
-# canvas 設定
-TkcRectangle.new($ctext_canvas, 245, 195, 255, 205,
- 'outline'=>'black', 'fill'=>'red')
-
-ctag_text_param = {
- 'text'=>"ã“ã‚Œã¯ã‚­ãƒ£ãƒ³ãƒã‚¹widgetã®ãƒ†ã‚­ã‚¹ãƒˆæ©Ÿèƒ½ã‚’デモã™ã‚‹ãŸã‚ã®æ–‡å­—列ã§ã™ã€‚\n上ã§è¿°ã¹ãŸã‚ˆã†ãªç·¨é›†ã‚’å¯èƒ½ã¨ã™ã‚‹ãŸã‚ã®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’æ–½ã—ã¦ã„ã¾ã™ã€‚",
- 'width'=>440, 'anchor'=>'n', 'justify'=>'left'
-}
-if $tk_version =~ /^4.*/
- ctag_text_param['font'] = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*'
- ctag_text_param['kanjifont'] = '-*-r-*--24-*-jisx0208.1983-0'
-else
- ctag_text_param['font'] = 'Helvetica 24'
-end
-$ctag_text = TkcTag.new($ctext_canvas)
-$ctag_text.withtag(TkcText.new($ctext_canvas, 250, 200, ctag_text_param))
-
-$ctag_text.bind('1', proc{|x,y| textB1Press $ctext_canvas,x,y}, "%x %y")
-$ctag_text.bind('B1-Motion', proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
-$ctag_text.bind('Shift-1',
- proc{|x,y| $ctext_canvas.select_adjust 'current', "@#{x},#{y}"},
- "%x %y")
-$ctag_text.bind('Shift-B1-Motion',
- proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
-$ctag_text.bind('KeyPress', proc{|a| textInsert $ctext_canvas,a}, "%A")
-$ctag_text.bind('Return', proc{textInsert $ctext_canvas,"\n"})
-$ctag_text.bind('Control-h', proc{textBs $ctext_canvas})
-$ctag_text.bind('BackSpace', proc{textBs $ctext_canvas})
-$ctag_text.bind('Delete', proc{textDel $ctext_canvas})
-$ctag_text.bind('2', proc{|x,y| textPaste $ctext_canvas, "@#{x},#{y}"},
- "%x %y")
-
-# Next, create some items that allow the text's anchor position
-# to be edited.
-
-def mkTextConfig(w,x,y,option,value,color)
- item = TkcRectangle.new(w, x, y, x+30, y+30,
- 'outline'=>'black', 'fill'=>color, 'width'=>1)
- item.bind('1', proc{$ctag_text.configure option, value})
- w.addtag_withtag('config', item)
-end
-
-x = 50
-y = 50
-color = 'LightSkyBlue1'
-mkTextConfig $ctext_canvas, x, y, 'anchor', 'se', color
-mkTextConfig $ctext_canvas, x+30, y, 'anchor', 's', color
-mkTextConfig $ctext_canvas, x+60, y, 'anchor', 'sw', color
-mkTextConfig $ctext_canvas, x, y+30, 'anchor', 'e', color
-mkTextConfig $ctext_canvas, x+30, y+30, 'anchor', 'center', color
-mkTextConfig $ctext_canvas, x+60, y+30, 'anchor', 'w', color
-mkTextConfig $ctext_canvas, x, y+60, 'anchor', 'ne', color
-mkTextConfig $ctext_canvas, x+30, y+60, 'anchor', 'n', color
-mkTextConfig $ctext_canvas, x+60, y+60, 'anchor', 'nw', color
-item = TkcRectangle.new($ctext_canvas, x+40, y+40, x+50, y+50,
- 'outline'=>'black', 'fill'=>'red')
-item.bind('1', proc{$ctag_text.configure 'anchor', 'center'})
-if $tk_version =~ /^4.*/
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
- 'anchor'=>'s', 'fill'=>'brown')
-else
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position',
- 'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown')
-end
-
-# Lastly, create some items that allow the text's justification to be
-# changed.
-
-x = 350
-y = 50
-color = 'SeaGreen2'
-mkTextConfig $ctext_canvas, x, y, 'justify', 'left', color
-mkTextConfig $ctext_canvas, x+30, y, 'justify', 'center', color
-mkTextConfig $ctext_canvas, x+60, y, 'justify', 'right', color
-if $tk_version =~ /^4.*/
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
- 'anchor'=>'s', 'fill'=>'brown')
-else
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification',
- 'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown')
-end
-
-$ctext_canvas.itembind('config', 'Enter', proc{textEnter $ctext_canvas})
-$ctext_canvas.itembind('config', 'Leave',
- proc{$ctext_canvas\
- .itemconfigure('current',
- 'fill'=>$textConfigFill)})
-
-$textConfigFill = ''
-
-def textEnter(w)
- $textConfigFill = (w.itemconfiginfo 'current', 'fill')[4]
- w.itemconfigure 'current', 'fill', 'black'
-end
-
-def textInsert(w, string)
- return if string == ""
- begin
- $ctag_text.dchars 'sel.first', 'sel.last'
- rescue
- end
- $ctag_text.insert 'insert', string
-end
-
-def textPaste(w, pos)
- begin
- $ctag_text.insert pos, TkSelection.get
- rescue
- end
-end
-
-def textB1Press(w,x,y)
- w.icursor 'current', "@#{x},#{y}"
- w.itemfocus 'current'
- w.focus
- w.select_from 'current', "@#{x},#{y}"
-end
-
-def textB1Move(w,x,y)
- w.select_to 'current', "@#{x},#{y}"
-end
-
-def textBs(w)
- begin
- $ctag_text.dchars 'sel.first', 'sel.last'
- rescue
- char = $ctag_text.index('insert').to_i - 1
- $ctag_text.dchars(char) if char >= 0
- end
-end
-
-def textDel(w)
- begin
- $ctag_text.dchars 'sel.first', 'sel.last'
- rescue
- $ctag_text.dchars 'insert'
- end
-end
-
diff --git a/ext/tk/sample/demos-jp/dialog1.rb b/ext/tk/sample/demos-jp/dialog1.rb
deleted file mode 100644
index 9d54f93b35..0000000000
--- a/ext/tk/sample/demos-jp/dialog1.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# a dialog box with a local grab (called by 'widget')
-#
-class TkDialog_Demo1 < TkDialog
- ###############
- private
- ###############
- def title
- "Dialog with local grab"
- end
-
- def message
- 'モーダルダイアログボックスã§ã™ã€‚Tk ã® "grab" コマンドを使用ã—ã¦ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã§ã€Œãƒ­ãƒ¼ã‚«ãƒ«ã‚°ãƒ©ãƒ–ã€ã—ã¦ã„ã¾ã™ã€‚下ã®ã„ãšã‚Œã‹ã®ãƒœã‚¿ãƒ³ã‚’実行ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ã“ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã«ç­”ãˆã‚‹ã¾ã§ã€ã“ã®ã‚°ãƒ©ãƒ–ã«ã‚ˆã£ã¦ã‚¢ãƒ—リケーションã®ä»–ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã¯ã€ãƒã‚¤ãƒ³ã‚¿é–¢ä¿‚ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ããªããªã£ã¦ã„ã¾ã™ã€‚'
- end
-
- def bitmap
- 'info'
- end
-
- def default_button
- 0
- end
-
- def buttons
-# "了解 キャンセル コードå‚ç…§"
- ["了解", "キャンセル", "コードå‚ç…§"]
- end
-end
-
-ret = TkDialog_Demo1.new('message_config'=>{'wraplength'=>'4i'}).value
-case ret
-when 0
- print "ã‚ãªãŸã¯ã€Œäº†è§£ã€ã‚’押ã—ã¾ã—ãŸã­ã€‚\n"
-when 1
- print "ã‚ãªãŸã¯ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€ã‚’押ã—ã¾ã—ãŸã­ã€‚\n"
-when 2
- showCode 'dialog1'
-end
diff --git a/ext/tk/sample/demos-jp/dialog2.rb b/ext/tk/sample/demos-jp/dialog2.rb
deleted file mode 100644
index c8506b6cf8..0000000000
--- a/ext/tk/sample/demos-jp/dialog2.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# a dialog box with a global grab (called by 'widget')
-#
-class TkDialog_Demo2 < TkDialog
- ###############
- private
- ###############
- def title
- "Dialog with global grab"
- end
-
- def message
- 'ã“ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚°ãƒ©ãƒ–を使用ã—ã¦ã„ã¾ã™ã€‚下ã®ãƒœã‚¿ãƒ³ã‚’実行ã™ã‚‹ã¾ã§ã€ãƒ‡ã‚£ã‚¹ãƒ—レイ上ã®ã„ã‹ãªã‚‹ã‚‚ã®ã¨ã‚‚対話ã§ãã¾ã›ã‚“。グローãƒãƒ«ã‚°ãƒ©ãƒ–を使用ã™ã‚‹ã“ã¨ã¯ã€ã¾ãšè‰¯ã„考ãˆã§ã¯ã‚ã‚Šã¾ã›ã‚“。ã©ã†ã—ã¦ã‚‚å¿…è¦ã«ãªã‚‹ã¾ã§ä½¿ãŠã†ã¨æ€ã‚ãªã„ã§ä¸‹ã•ã„。'
- end
-
- def bitmap
- 'info'
- end
-
- def default_button
- 0
- end
-
- def buttons
-# "了解 キャンセル コードå‚ç…§"
- ["了解", "キャンセル", "コードå‚ç…§"]
- end
-end
-
-ret = TkDialog_Demo2.new('message_config'=>{'wraplength'=>'4i'},
- 'prev_command'=>proc{|dialog|
- Tk.after 100, proc{dialog.grab('global')}
- }).value
-case ret
-when 0
- print "ã‚ãªãŸã¯ã€Œäº†è§£ã€ã‚’押ã—ã¾ã—ãŸã­ã€‚\n"
-when 1
- print "ã‚ãªãŸã¯ã€Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã€ã‚’押ã—ã¾ã—ãŸã­ã€‚\n"
-when 2
- showCode 'dialog2'
-end
-
diff --git a/ext/tk/sample/demos-jp/doc.org/README b/ext/tk/sample/demos-jp/doc.org/README
deleted file mode 100644
index 90677d3316..0000000000
--- a/ext/tk/sample/demos-jp/doc.org/README
+++ /dev/null
@@ -1,7 +0,0 @@
-This directory contains a collection of demonstration programs that
-are translated into Japanese. You need to use a Japanized "wish" to
-see these Japanese-translated demonstration programs. You also need
-to put this directory ("demos.jp") at the next to "demos" since some
-of the programs refer to the image files at "demos".
-
-Please refer to the README file at "demos" for more detail.
diff --git a/ext/tk/sample/demos-jp/doc.org/README.JP b/ext/tk/sample/demos-jp/doc.org/README.JP
deleted file mode 100644
index 42b4929378..0000000000
--- a/ext/tk/sample/demos-jp/doc.org/README.JP
+++ /dev/null
@@ -1,14 +0,0 @@
-This directory contains "widget" demo for the Japanized Tcl7.6/Tk4.2.
-Most of the messages in the original are translated to Japanese.
-But other tools in this directory are not translated.
-
-Following 2 kanji fonts are defined at the beginning of the file "widget."
-
- -*--24-*-jisx0208.1983-0
- -*--16-*-jisx0208.1983-0
-
-These fonts are all part of the core distribution of X11R5, so
-if you are running X11R5, you don't have to modify the file.
-
-But if you don't have these fonts, replace them with appropriate ones.
-"-*--14-*-jisx0208.1983-0" will be a good choice.
diff --git a/ext/tk/sample/demos-jp/doc.org/README.tk80 b/ext/tk/sample/demos-jp/doc.org/README.tk80
deleted file mode 100644
index c71f977d74..0000000000
--- a/ext/tk/sample/demos-jp/doc.org/README.tk80
+++ /dev/null
@@ -1,46 +0,0 @@
-This directory contains a collection of programs to demonstrate
-the features of the Tk toolkit. The programs are all scripts for
-"wish", a windowing shell. If wish has been installed in /usr/local
-then you can invoke any of the programs in this directory just
-by typing its file name to your command shell. Otherwise invoke
-wish with the file as its first argument, e.g., "wish hello".
-The rest of this file contains a brief description of each program.
-Files with names ending in ".tcl" are procedure packages used by one
-or more of the demo programs; they can't be used as programs by
-themselves so they aren't described below.
-
-hello - Creates a single button; if you click on it, a message
- is typed and the application terminates.
-
-widget - Contains a collection of demonstrations of the widgets
- currently available in the Tk library. Most of the .tcl
- files are scripts for individual demos available through
- the "widget" program.
-
-ixset - A simple Tk-based wrapper for the "xset" program, which
- allows you to interactively query and set various X options
- such as mouse acceleration and bell volume. Thanks to
- Pierre David for contributing this example.
-
-rolodex - A mock-up of a simple rolodex application. It has much of
- the user interface for such an application but no back-end
- database. This program was written in response to Tom
- LaStrange's toolkit benchmark challenge.
-
-tcolor - A color editor. Allows you to edit colors in several
- different ways, and will also perform automatic updates
- using "send".
-
-rmt - Allows you to "hook-up" remotely to any Tk application
- on the display. Select an application with the menu,
- then just type commands: they'll go to that application.
-
-timer - Displays a seconds timer with start and stop buttons.
- Control-c and control-q cause it to exit.
-
-browse - A simple directory browser. Invoke it with and argument
- giving the name of the directory you'd like to browse.
- Double-click on files or subdirectories to browse them.
- Control-c and control-q cause the program to exit.
-
-sccs id = SCCS: @(#) README 1.3 96/02/16 10:49:14
diff --git a/ext/tk/sample/demos-jp/doc.org/license.terms b/ext/tk/sample/demos-jp/doc.org/license.terms
deleted file mode 100644
index c0a44d3fc2..0000000000
--- a/ext/tk/sample/demos-jp/doc.org/license.terms
+++ /dev/null
@@ -1,39 +0,0 @@
-This software is copyrighted by the Regents of the University of
-California, Sun Microsystems, Inc., and other parties. 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.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-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.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
-are acquiring the software on behalf of the Department of Defense, the
-software shall be classified as "Commercial Computer Software" and the
-Government shall have only "Restricted Rights" as defined in Clause
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
-authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license.
diff --git a/ext/tk/sample/demos-jp/doc.org/license.terms.tk80 b/ext/tk/sample/demos-jp/doc.org/license.terms.tk80
deleted file mode 100644
index c0a44d3fc2..0000000000
--- a/ext/tk/sample/demos-jp/doc.org/license.terms.tk80
+++ /dev/null
@@ -1,39 +0,0 @@
-This software is copyrighted by the Regents of the University of
-California, Sun Microsystems, Inc., and other parties. 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.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-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.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
-are acquiring the software on behalf of the Department of Defense, the
-software shall be classified as "Commercial Computer Software" and the
-Government shall have only "Restricted Rights" as defined in Clause
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
-authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license.
diff --git a/ext/tk/sample/demos-jp/entry1.rb b/ext/tk/sample/demos-jp/entry1.rb
deleted file mode 100644
index 0fbbeb8259..0000000000
--- a/ext/tk/sample/demos-jp/entry1.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# entry (no scrollbars) widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($entry1_demo) && $entry1_demo
- $entry1_demo.destroy
- $entry1_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$entry1_demo = TkToplevel.new {|w|
- title("Entry Demonstration (no scrollbars)")
- iconname("entry1")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($entry1_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "3種類ã®ç•°ãªã‚‹ã‚¨ãƒ³ãƒˆãƒªãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚文字を入力ã™ã‚‹ã«ã¯ãƒã‚¤ãƒ³ã‚¿ã‚’æŒã£ã¦è¡Œãã€ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã‹ã‚‰ã‚¿ã‚¤ãƒ—ã—ã¦ãã ã•ã„。標準的ãªMotifã®ç·¨é›†æ©Ÿèƒ½ãŒã€Emacsã®ã‚­ãƒ¼ãƒã‚¤ãƒ³ãƒ‰ã¨ã¨ã‚‚ã«ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚例ãˆã°ã€ãƒãƒƒã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã¨ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«-Hã¯ã‚«ãƒ¼ã‚½ãƒ«ã®å·¦ã®æ–‡å­—を削除ã—ã€ãƒ‡ãƒªãƒ¼ãƒˆã‚­ãƒ¼ã¨ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«-Dã¯ã‚«ãƒ¼ã‚½ãƒ«ã®å³å´ã®æ–‡å­—を削除ã—ã¾ã™ã€‚é•·éŽãŽã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«å…¥ã‚Šåˆ‡ã‚‰ãªã„ã‚‚ã®ã¯ã€ãƒžã‚¦ã‚¹ã®ãƒœã‚¿ãƒ³2を押ã—ãŸã¾ã¾ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã“ã¨ã§ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚日本語を入力ã™ã‚‹ã®ã¯ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«-ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã§ã™ã€‚kinput2ãŒå‹•ã„ã¦ã„ã‚Œã°å…¥åŠ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $entry1_demo
- $entry1_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'entry1'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# entry 生æˆ
-e1 = TkEntry.new(base_frame, 'relief'=>'sunken')
-e2 = TkEntry.new(base_frame, 'relief'=>'sunken')
-e3 = TkEntry.new(base_frame, 'relief'=>'sunken')
-[e1,e2,e3].each{|w| w.pack('side'=>'top', 'padx'=>10, 'pady'=>5, 'fill'=>'x')}
-
-# åˆæœŸå€¤æŒ¿å…¥
-e1.insert(0, 'åˆæœŸå€¤')
-e2.insert('end', "ã“ã®ã‚¨ãƒ³ãƒˆãƒªã«ã¯é•·ã„文字列ãŒå…¥ã£ã¦ã„ã¦ã€")
-e2.insert('end', "é•·ã™ãŽã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯å…¥ã‚Šåˆ‡ã‚‰ãªã„ã®ã§ã€")
-e2.insert('end', "実際ã®æ‰€çµ‚ã‚Šã¾ã§è¦‹ã‚‹ã«ã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã•ã›ãªã‘ã‚Œã°")
-e2.insert('end', "ãªã‚‰ãªã„ã§ã—ょã†ã€‚")
-
diff --git a/ext/tk/sample/demos-jp/entry2.rb b/ext/tk/sample/demos-jp/entry2.rb
deleted file mode 100644
index 294c82490f..0000000000
--- a/ext/tk/sample/demos-jp/entry2.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# entry (with scrollbars) widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($entry2_demo) && $entry2_demo
- $entry2_demo.destroy
- $entry2_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$entry2_demo = TkToplevel.new {|w|
- title("Entry Demonstration (with scrollbars)")
- iconname("entry2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($entry2_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "3種類ã®ç•°ãªã‚‹ã‚¨ãƒ³ãƒˆãƒªãŒå„々スクロールãƒãƒ¼ä»˜ã§è¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚文字を入力ã™ã‚‹ã«ã¯ãƒã‚¤ãƒ³ã‚¿ã‚’æŒã£ã¦è¡Œãã€ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã‹ã‚‰ã‚¿ã‚¤ãƒ—ã—ã¦ãã ã•ã„。標準的ãªMotifã®ç·¨é›†æ©Ÿèƒ½ãŒã€Emacsã®ã‚­ãƒ¼ãƒã‚¤ãƒ³ãƒ‰ã¨ã¨ã‚‚ã«ã€ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚例ãˆã°ã€ãƒãƒƒã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã¨ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«-Hã¯ã‚«ãƒ¼ã‚½ãƒ«ã®å·¦ã®æ–‡å­—を削除ã—ã€ãƒ‡ãƒªãƒ¼ãƒˆã‚­ãƒ¼ã¨ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«-Dã¯ã‚«ãƒ¼ã‚½ãƒ«ã®å³å´ã®æ–‡å­—を削除ã—ã¾ã™ã€‚é•·éŽãŽã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«å…¥ã‚Šåˆ‡ã‚‰ãªã„ã‚‚ã®ã¯ã€ãƒžã‚¦ã‚¹ã®ãƒœã‚¿ãƒ³2を押ã—ãŸã¾ã¾ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã“ã¨ã§ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚日本語を入力ã™ã‚‹ã®ã¯ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«-ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã§ã™ã€‚kinput2ãŒå‹•ã„ã¦ã„ã‚Œã°å…¥åŠ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $entry2_demo
- $entry2_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'entry2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-TkFrame.new(base_frame, 'borderwidth'=>10) {|w|
- # entry 1
- s1 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz')
- e1 = TkEntry.new(w, 'relief'=>'sunken') {
- xscrollcommand proc{|first,last| s1.set first,last}
- }
- s1.command(proc{|*args| e1.xview(*args)})
- e1.pack('side'=>'top', 'fill'=>'x')
- s1.pack('side'=>'top', 'fill'=>'x')
-
- # spacer
- TkFrame.new(w, 'width'=>20, 'height'=>10).pack('side'=>'top', 'fill'=>'x')
-
- # entry 2
- s2 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz')
- e2 = TkEntry.new(w, 'relief'=>'sunken') {
- xscrollcommand proc{|first,last| s2.set first,last}
- }
- s2.command(proc{|*args| e2.xview(*args)})
- e2.pack('side'=>'top', 'fill'=>'x')
- s2.pack('side'=>'top', 'fill'=>'x')
-
- # spacer
- TkFrame.new(w, 'width'=>20, 'height'=>10).pack('side'=>'top', 'fill'=>'x')
-
- # entry 3
- s3 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz')
- e3 = TkEntry.new(w, 'relief'=>'sunken') {
- xscrollcommand proc{|first,last| s3.set first,last}
- }
- s3.command(proc{|*args| e3.xview(*args)})
- e3.pack('side'=>'top', 'fill'=>'x')
- s3.pack('side'=>'top', 'fill'=>'x')
-
- # åˆæœŸå€¤æŒ¿å…¥
- e1.insert(0, 'åˆæœŸå€¤')
- e2.insert('end', "ã“ã®ã‚¨ãƒ³ãƒˆãƒªã«ã¯é•·ã„文字列ãŒå…¥ã£ã¦ã„ã¦ã€")
- e2.insert('end', "é•·ã™ãŽã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯å…¥ã‚Šåˆ‡ã‚‰ãªã„ã®ã§ã€")
- e2.insert('end', "実際ã®æ‰€çµ‚ã‚Šã¾ã§è¦‹ã‚‹ã«ã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã•ã›ãªã‘ã‚Œã°")
- e2.insert('end', "ãªã‚‰ãªã„ã§ã—ょã†ã€‚")
-
-}.pack('side'=>'top', 'fill'=>'x', 'expand'=>'yes')
-
diff --git a/ext/tk/sample/demos-jp/entry3.rb b/ext/tk/sample/demos-jp/entry3.rb
deleted file mode 100644
index 6f8ba943e9..0000000000
--- a/ext/tk/sample/demos-jp/entry3.rb
+++ /dev/null
@@ -1,226 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-# entry3.rb --
-#
-# This demonstration script creates several entry widgets whose
-# permitted input is constrained in some way. It also shows off a
-# password entry.
-#
-# based on Tcl/Tk8.4.4 widget demos
-
-if defined?($entry3_demo) && $entry3_demo
- $entry3_demo.destroy
- $entry3_demo = nil
-end
-
-$entry3_demo = TkToplevel.new {|w|
- title("Constrained Entry Demonstration")
- iconname("entry3")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($entry3_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-以下ã«ã¯ï¼”種類ã®ã‚¨ãƒ³ãƒˆãƒªãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼Žå„エントリボックスã¯ï¼Œ\
-マウスクリックã§é¸æŠžã—文字を打ã¡è¾¼ã‚€ã“ã¨ãŒå¯èƒ½ã§ã™ãŒï¼Œãã‚Œãžã‚ŒãŒã©ã®ã‚ˆã†ãª\
-入力をå—ã‘付ã‘ã‚‹ã“ã¨ãŒã§ãã‚‹ã‹ã«ã¯åˆ¶ç´„ãŒè¨­ã‘られã¦ã„ã¾ã™ï¼Ž\
-一ã¤ã‚ã®ã‚¨ãƒ³ãƒˆãƒªãƒœãƒƒã‚¯ã‚¹ã¯æ•´æ•°ã¨è¦‹ãªã•ã‚Œã‚‹æ–‡å­—列ã‹å…¥åŠ›æ–‡å­—ãŒãªã„空ã®çŠ¶æ…‹ã‹\
-ã®å ´åˆã ã‘ã‚’å—ã‘付ã‘,å•é¡ŒãŒã‚ã‚‹å ´åˆã¯ã‚¨ãƒ³ãƒˆãƒªãƒœãƒƒã‚¯ã‚¹ãŒç‚¹æ»…ã—ã¾ã™\
-(フォーカスãŒåŽ»ã‚‹æ™‚ã«ãƒã‚§ãƒƒã‚¯ã•ã‚Œã¾ã™ï¼‰ï¼Ž\
-二ã¤ã‚ã®ã‚¨ãƒ³ãƒˆãƒªãƒœãƒƒã‚¯ã‚¹ã¯ï¼Œå…¥åŠ›ã•ã‚ŒãŸæ–‡å­—列ã®é•·ã•ãŒ\
-1ï¼æ–‡å­—未満ã®å ´åˆã ã‘ã‚’å—ã‘付ã‘,制é™ã‚’越ãˆã¦æ›¸ã込もã†ã¨ã—ãŸã¨ãã«ã¯\
-ベルを鳴らã—ã¦çŸ¥ã‚‰ã›ã¾ã™ï¼Ž\
-三ã¤ã‚ã¯ç±³å›½ã®é›»è©±ç•ªå·ã‚’å—ã‘付ã‘るエントリボックスã§ã™ï¼Ž\
-アルファベットã¯ï¼Œé›»è©±æ©Ÿã®ãƒ€ã‚¤ãƒ¤ãƒ«ä¸Šã§å¯¾å¿œã¥ã‘られã¦ã„ã‚‹æ•°å­—ã«å¤‰æ›ã•ã‚Œã¾ã™ï¼Ž\
-ä¸é©åˆ‡ãªæ–‡å­—ãŒå…¥åŠ›ã•ã‚ŒãŸã‚Šæ•°å­—以外ã®æ–‡å­—ã®ä½ç½®ã«æ•°å­—を入力ã—よã†ã¨ã—ãŸã‚Š\
-ã—ãŸå ´åˆã«ã¯è­¦å‘Šã®ãƒ™ãƒ«ãŒé³´ã‚Šã¾ã™ï¼Ž\
-å››ã¤ã‚ã®ã‚¨ãƒ³ãƒˆãƒªãƒœãƒƒã‚¯ã‚¹ã¯ï¼Œï¼˜æ–‡å­—ã¾ã§ã®å…¥åŠ›ã‚’å—ã‘付ã‘ã‚‹\
-パスワードフィールドã§ã™ï¼ˆï¼˜æ–‡å­—以上ã¯ç‰¹ã«è­¦å‘Šã‚’出ã™ã“ã¨ãªã無視ã•ã‚Œã¾ã™ï¼‰ï¼Ž\
-入力ã•ã‚ŒãŸæ–‡å­—ã¯ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯è¨˜å·ã«ç½®ãæ›ãˆã¦è¡¨ç¤ºã•ã‚Œã¾ã™ï¼Ž
-EOL
-
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'é–‰ã˜ã‚‹', :width=>15, :command=>proc{
- $entry3_demo.destroy
- $entry3_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'コードå‚ç…§', :width=>15, :command=>proc{
- showCode 'entry3'
- }).pack(:side=>:left, :expand=>true)
-}
-
-# focusAndFlash --
-# Error handler for entry widgets that forces the focus onto the
-# widget and makes the widget flash by exchanging the foreground and
-# background colours at intervals of 200ms (i.e. at approximately
-# 2.5Hz).
-#
-# Arguments:
-# widget - entry widget to flash
-# fg - Initial foreground colour
-# bg - Initial background colour
-# count - Counter to control the number of times flashed
-def focusAndFlash(widget, fg, bg, count=5)
- return if count <= 0
- if fg && !fg.empty? && bg && !bg.empty?
- TkTimer.new(200, count,
- proc{widget.configure(:foreground=>bg, :background=>fg)},
- proc{widget.configure(:foreground=>fg, :background=>bg)}
- ).start
- else
- # TkTimer.new(150, 3){Tk.bell}.start
- Tk.bell
- TkTimer.new(200, count,
- proc{widget.configure(:foreground=>'white',
- :background=>'black')},
- proc{widget.configure(:foreground=>'black',
- :background=>'white')}
- ).at_end{begin
- widget.configure(:foreground=>fg,
- :background=>bg)
- rescue
- # ignore
- end}.start
- end
- widget.focus(true)
-end
-
-l1 = TkLabelFrame.new(base_frame, :text=>"整数エントリ")
-TkEntry.new(l1, :validate=>:focus,
- :vcmd=>[
- proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
- ]) {|e|
- fg = e.foreground
- bg = e.background
- invalidcommand [proc{|w| focusAndFlash(w, fg, bg)}, '%W']
- pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
-}
-
-l2 = TkLabelFrame.new(base_frame, :text=>"é•·ã•åˆ¶ç´„付ãエントリ")
-TkEntry.new(l2, :validate=>:key, :invcmd=>proc{Tk.bell},
- :vcmd=>[proc{|s| s.length < 10}, '%P']
- ).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
-
-### PHONE NUMBER ENTRY ###
-# Note that the source to this is quite a bit longer as the behaviour
-# demonstrated is a lot more ambitious than with the others.
-
-# Initial content for the third entry widget
-entry3content = TkVariable.new("1-(000)-000-0000")
-
-# Mapping from alphabetic characters to numbers.
-$phoneNumberMap = {}
-Hash[*(%w(abc 2 def 3 ghi 4 jkl 5 mno 6 pqrs 7 tuv 8 wxyz 9))].each{|chars, n|
- chars.split('').each{|c|
- $phoneNumberMap[c] = n
- $phoneNumberMap[c.upcase] = n
- }
-}
-
-# phoneSkipLeft --
-# Skip over fixed characters in a phone-number string when moving left.
-#
-# Arguments:
-# widget - The entry widget containing the phone-number.
-def phoneSkipLeft(widget)
- idx = widget.index('insert')
- if idx == 8
- # Skip back two extra characters
- widget.cursor = idx - 2
- elsif idx == 7 || idx == 12
- # Skip back one extra character
- widget.cursor = idx - 1
- elsif idx <= 3
- # Can't move any further
- Tk.bell
- Tk.callback_break
- end
-end
-
-# phoneSkipRight --
-# Skip over fixed characters in a phone-number string when moving right.
-#
-# Arguments:
-# widget - The entry widget containing the phone-number.
-# add - Offset to add to index before calculation (used by validation.)
-def phoneSkipRight(widget, add = 0)
- idx = widget.index('insert')
- if (idx + add == 5)
- # Skip forward two extra characters
- widget.cursor = idx + 2
- elsif (idx + add == 6 || idx + add == 10)
- # Skip forward one extra character
- widget.cursor = idx + 1
- elsif (idx + add == 15 && add == 0)
- # Can't move any further
- Tk.bell
- Tk.callback_break
- end
-end
-
-# validatePhoneChange --
-# Checks that the replacement (mapped to a digit) of the given
-# character in an entry widget at the given position will leave a
-# valid phone number in the widget.
-#
-# widget - entry widget to validate
-# vmode - The widget's validation mode
-# idx - The index where replacement is to occur
-# char - The character (or string, though that will always be
-# refused) to be overwritten at that point.
-
-def validatePhoneChange(widget, vmode, idx, char)
- return true if idx == nil
- Tk.after_idle(proc{widget.configure(:validate=>vmode,
- :invcmd=>proc{Tk.bell})})
- if !(idx<3 || idx==6 || idx==7 || idx==11 || idx>15) && char =~ /[0-9A-Za-z]/
- widget.delete(idx)
- widget.insert(idx, $phoneNumberMap[char] || char)
- Tk.after_idle(proc{phoneSkipRight(widget, -1)})
- # Tk.update(true) # <- Don't work 'update' inter validation callback.
- # It depends on Tcl/Tk side (tested on Tcl/Tk8.5a1).
- return true
- end
- return false
-end
-
-
-l3 = TkLabelFrame.new(base_frame, :text=>"米国電話番å·ã‚¨ãƒ³ãƒˆãƒª")
-TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell},
- :textvariable=>entry3content,
- :vcmd=>[
- proc{|w,v,i,s| validatePhoneChange(w,v,i,s)},
- "%W %v %i %S"
- ]){|e|
- # Click to focus goes to the first editable character...
- bind('FocusIn', proc{|d,w|
- if d != "NotifyAncestor"
- w.cursor = 3
- Tk.after_idle(proc{w.selection_clear})
- end
- }, '%d %W')
- bind('Left', proc{|w| phoneSkipLeft(w)}, '%W')
- bind('Right', proc{|w| phoneSkipRight(w)}, '%W')
- pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
-}
-
-l4 = TkLabelFrame.new(base_frame, :text=>"パスワードエントリ")
-TkEntry.new(l4, :validate=>:key, :show=>'*',
- :vcmd=>[
- proc{|s| s.length <= 8},
- '%P'
- ]).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
-
-TkFrame.new(base_frame){|f|
- lower
- TkGrid.configure(l1, l2, :in=>f, :padx=>'3m', :pady=>'1m', :sticky=>:ew)
- TkGrid.configure(l3, l4, :in=>f, :padx=>'3m', :pady=>'1m', :sticky=>:ew)
- TkGrid.columnconfigure(f, [0,1], :uniform=>1)
- pack(:fill=>:both, :expand=>true)
-}
diff --git a/ext/tk/sample/demos-jp/filebox.rb b/ext/tk/sample/demos-jp/filebox.rb
deleted file mode 100644
index 800dd5ddbf..0000000000
--- a/ext/tk/sample/demos-jp/filebox.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# widget demo prompts the user to select a file (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($filebox_demo) && $entry2_demo
- $filebox_demo.destroy
- $filebox_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$filebox_demo = TkToplevel.new {|w|
- title("File Selection Dialogs")
- iconname("filebox")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($filebox_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"エントリã«ãƒ•ã‚¡ã‚¤ãƒ«åを直接入力ã™ã‚‹ã‹ã€\"Browse\" ボタンを押ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‹ã‚‰ãƒ•ã‚¡ã‚¤ãƒ«åã‚’é¸ã‚“ã§ä¸‹ã•ã„。").pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $filebox_demo
- $filebox_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'filebox'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-['é–‹ã', 'ä¿å­˜'].each{|type|
- TkFrame.new(base_frame) {|f|
- TkLabel.new(f, 'text'=>"ファイルを#{type}: ", 'anchor'=>'e')\
- .pack('side'=>'left')
-
- TkEntry.new(f, 'width'=>20) {|e|
- pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
-
- TkButton.new(f, 'text'=>'Browse ...',
- 'command'=>proc{fileDialog base_frame,e,type})\
- .pack('side'=>'left')
- }
-
- pack('fill'=>'x', 'padx'=>'1c', 'pady'=>3)
- }
-}
-
-$tk_strictMotif = TkVarAccess.new('tk_strictMotif')
-if ($tk_platform['platform'] == 'unix')
- TkCheckButton.new(base_frame,
- 'text'=>'Motifスタイルã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’用ã„ã‚‹',
- 'variable'=>$tk_strictMotif,
- 'onvalue'=>1, 'offvalue'=>0 ).pack('anchor'=>'c')
-end
-
-def fileDialog(w,ent,operation)
- # Type names Extension(s) Mac File Type(s)
- #
- #--------------------------------------------------------
- types = [
- ['Text files', ['.txt','.doc'] ],
- ['Text files', [], 'TEXT' ],
- ['Ruby Scripts', ['.rb'], 'TEXT' ],
- ['Tcl Scripts', ['.tcl'], 'TEXT' ],
- ['C Source Files', ['.c','.h'] ],
- ['All Source Files', ['.rb','.tcl','.c','.h'] ],
- ['Image Files', ['.gif'] ],
- ['Image Files', ['.jpeg','.jpg'] ],
- ['Image Files', [], ['GIFF','JPEG']],
- ['All files', '*' ]
- ]
-
- if operation == 'é–‹ã'
- file = Tk.getOpenFile('filetypes'=>types, 'parent'=>w)
- else
- file = Tk.getSaveFile('filetypes'=>types, 'parent'=>w,
- 'initialfile'=>'Untitled',
- 'defaultextension'=>'.txt')
- end
- if file != ""
- ent.delete 0, 'end'
- ent.insert 0, file
- # ent.xview 'end'
- Tk.update_idletasks # need this for Tk::Tile::Entry
- # (to find right position of 'xview').
- ent.xview(ent.index('end'))
- end
-end
-
diff --git a/ext/tk/sample/demos-jp/floor.rb b/ext/tk/sample/demos-jp/floor.rb
deleted file mode 100644
index 8a079035c9..0000000000
--- a/ext/tk/sample/demos-jp/floor.rb
+++ /dev/null
@@ -1,1722 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# floorDisplay widget demo (called by 'widget')
-#
-
-# floorDisplay --
-# Recreate the floorplan display in the canvas given by "w". The
-# floor given by "active" is displayed on top with its office structure
-# visible.
-#
-# Arguments:
-# w - Name of the canvas window.
-# active - Number of active floor (1, 2, or 3).
-
-def floorDisplay(w,active)
- return if $activeFloor == active
-
- w.delete('all')
- $activeFloor = active
-
- # First go through the three floors, displaying the backgrounds for
- # each floor.
-
- floor_bg1(w,$floor_colors['bg1'],$floor_colors['outline1'])
- floor_bg2(w,$floor_colors['bg2'],$floor_colors['outline2'])
- floor_bg3(w,$floor_colors['bg3'],$floor_colors['outline3'])
-
- # Raise the background for the active floor so that it's on top.
-
- w.raise("floor#{active}")
-
- # Create a dummy item just to mark this point in the display list,
- # so we can insert highlights here.
-
- TkcRectangle.new(w,0,100,1,101, 'fill'=>'', 'outline'=>'', 'tags'=>'marker')
-
- # Add the walls and labels for the active floor, along with
- # transparent polygons that define the rooms on the floor.
- # Make sure that the room polygons are on top.
-
- $floorLabels.clear
- $floorItems.clear
- send("floor_fg#{active}", w, $floor_colors['offices'])
- w.raise('room')
-
- # Offset the floors diagonally from each other.
-
- w.move('floor1', '2c', '2c')
- w.move('floor2', '1c', '1c')
-
- # Create items for the room entry and its label.
- TkcWindow.new(w, 600, 100, 'anchor'=>'w', 'window'=>$floor_entry)
- TkcText.new(w, 600, 100, 'anchor'=>'e', 'text'=>"部屋番å·: ")
- w['scrollregion'] = w.bbox('all')
-end
-
-# newRoom --
-# This method is invoked whenever the mouse enters a room
-# in the floorplan. It changes tags so that the current room is
-# highlighted.
-#
-# Arguments:
-# w - The name of the canvas window.
-
-def newRoom(w)
- id = w.find_withtag('current')[0]
- $currentRoom.value = $floorLabels[id.id] if id != ""
- Tk.update(true)
-end
-
-# roomChanged --
-# This method is invoked whenever the currentRoom variable changes.
-# It highlights the current room and unhighlights any previous room.
-#
-# Arguments:
-# w - The canvas window displaying the floorplan.
-# args - Not used.
-
-def roomChanged(w,*args)
- w.delete('highlight')
- item = $floorItems[$currentRoom.value]
- return if item == nil
- new = TkcPolygon.new(w, *(w.coords(item)))
- new.configure('fill'=>$floor_colors['active'], 'tags'=>'highlight')
- w.raise(new, 'marker')
-end
-
-# floor_bg1 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor_bg1(w,fill,outline)
- TkcPolygon.new(w,347,80,349,82,351,84,353,85,363,92,375,99,386,104,
- 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
- 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
- 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
- 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
- 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
- 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
- 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
- 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
- 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
- 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
- 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
- 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
- TkcLine.new(w,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,0,337,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,3,114,3,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,162,398,162, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,398,162,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,278,484,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,559,327,508,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,644,391,559,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,644,389,644,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,725,133,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,725,129,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,802,389,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,3,337,0,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,559,391,559,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,802,389,644,389, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,8,25,8,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,8,114,3,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,30,25,8,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,484,278,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,30,25,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,93,5,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,98,5,93,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,104,7,98,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,110,10,104,7, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,116,16,110,10, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,119,20,116,16, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,122,28,119,20, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,123,32,122,28, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,123,68,123,32, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,220,68,123,68, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,386,129,386,104, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,386,104,375,99, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,375,99,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,353,85,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,220,68,220,34, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,337,70,352,56, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,352,56,358,48, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,358,48,363,39, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,363,39,365,29, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,365,29,348,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,348,25,335,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,335,22,321,14, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,321,14,300,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,300,5,283,1, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,283,1,260,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,260,0,246,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,246,0,242,2, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,242,2,236,4, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,236,4,231,8, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,231,8,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,223,17,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,221,22,223,17, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,220,34,221,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,340,360,335,363, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,335,363,331,365, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,331,365,326,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,326,366,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,304,355,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,395,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,404,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,409,290,404,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,413,292,409,290, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,418,297,413,292, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,421,302,418,297, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,422,309,421,302, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,421,318,422,309, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,421,318,417,325, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,417,325,411,330, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,411,330,405,332, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,405,332,397,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,397,333,344,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,344,333,340,334, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,340,334,336,336, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,336,336,335,338, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,335,338,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,331,347,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,332,351,331,347, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,334,354,332,351, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,336,357,334,354, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,341,359,336,357, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,341,359,340,360, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,395,288,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,304,355,258,355, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,347,80,344,76, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,344,76,337,70, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,349,82,347,80, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,351,84,349,82, 'fill'=>outline, 'tags'=>['floor1','bg'])
- TkcLine.new(w,353,85,351,84, 'fill'=>outline, 'tags'=>['floor1','bg'])
-end
-
-# floor_bg2 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor_bg2(w,fill,outline)
- TkcPolygon.new(w,559,129,484,129,484,162,398,162,398,129,315,129,
- 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
- 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
- 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
- 367,802,367,802,129,725,129,725,133,559,133,559,129,
- 'tags'=>['floor2','bg'], 'fill'=>fill)
- TkcLine.new(w,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,802,129,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,559,133,725,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,802,367,644,367, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,644,367,644,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,644,391,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,558,327,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,558,327,508,327, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,484,280,484,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,398,162,484,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,484,280,395,280, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,395,280,395,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,3,133,3,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,3,339,0,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,0,339,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,258,329,258,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,395,311,350,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,398,129,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,176,133,315,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,3,133,96,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,176,133,176,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
-end
-
-# floor_bg3 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor_bg3(w,fill,outline)
- TkcPolygon.new(w,159,300,107,300,107,248,159,248,159,129,96,129,96,
- 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
- TkcPolygon.new(w,258,370,258,329,350,329,350,311,399,311,399,129,
- 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
- TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,315,133,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,399,129,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,399,311,399,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,399,311,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,350,329,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,258,370,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,60,370,258,370, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,60,370,60,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,0,391,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- TkcLine.new(w,107,300,159,300,159,248,107,248,107,300,
- 'fill'=>outline, 'tags'=>['floor3','bg'])
-end
-
-# floor_fg1 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the first
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor_fg1(w,color)
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '101'
- $floorItems['101'] = i
- TkcText.new(w,358,209, 'text'=>'101', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Pub Lift1'
- $floorItems['Pub Lift1'] = i
- TkcText.new(w,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Priv Lift1'
- $floorItems['Priv Lift1'] = i
- TkcText.new(w,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '110'
- $floorItems['110'] = i
- TkcText.new(w,21.5,363, 'text'=>'110', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '109'
- $floorItems['109'] = i
- TkcText.new(w,67,363, 'text'=>'109', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '111'
- $floorItems['111'] = i
- TkcText.new(w,28.5,276.5, 'text'=>'111', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '117B'
- $floorItems['117B'] = i
- TkcText.new(w,88.5,278.5, 'text'=>'117B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '112'
- $floorItems['112'] = i
- TkcText.new(w,28.5,227.5, 'text'=>'112', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '113'
- $floorItems['113'] = i
- TkcText.new(w,28.5,179.5, 'text'=>'113', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '117A'
- $floorItems['117A'] = i
- TkcText.new(w,82,180.5, 'text'=>'117A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '117'
- $floorItems['117'] = i
- TkcText.new(w,65,235, 'text'=>'117', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '114'
- $floorItems['114'] = i
- TkcText.new(w,28.5,135, 'text'=>'114', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '115'
- $floorItems['115'] = i
- TkcText.new(w,74,141.5, 'text'=>'115', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '116'
- $floorItems['116'] = i
- TkcText.new(w,48.5,70, 'text'=>'116', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '118'
- $floorItems['118'] = i
- TkcText.new(w,108.5,102, 'text'=>'118', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,178,128,178,132,216,132,216,91,
- 163,91,163,112,149,112,149,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '120'
- $floorItems['120'] = i
- TkcText.new(w,189.5,111.5, 'text'=>'120', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192,
- 156,192,156,169,175,169,175,246,79,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '122'
- $floorItems['122'] = i
- TkcText.new(w,131,207.5, 'text'=>'122', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '121'
- $floorItems['121'] = i
- TkcText.new(w,146,180, 'text'=>'121', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '106A'
- $floorItems['106A'] = i
- TkcText.new(w,112.5,304.5, 'text'=>'106A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '105'
- $floorItems['105'] = i
- TkcText.new(w,124.5,278.5, 'text'=>'105', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '106B'
- $floorItems['106B'] = i
- TkcText.new(w,163,304.5, 'text'=>'106B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '104'
- $floorItems['104'] = i
- TkcText.new(w,184,278.5, 'text'=>'104', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '108'
- $floorItems['108'] = i
- TkcText.new(w,114.5,361, 'text'=>'108', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '107'
- $floorItems['107'] = i
- TkcText.new(w,198,361, 'text'=>'107', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Smoking'
- $floorItems['Smoking'] = i
- TkcText.new(w,280,341, 'text'=>'Smoking', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '123'
- $floorItems['123'] = i
- TkcText.new(w,245.5,190.5, 'text'=>'123', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '103'
- $floorItems['103'] = i
- TkcText.new(w,259,287, 'text'=>'103', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '124'
- $floorItems['124'] = i
- TkcText.new(w,356,150, 'text'=>'124', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '125'
- $floorItems['125'] = i
- TkcText.new(w,392,217.5, 'text'=>'125', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '126'
- $floorItems['126'] = i
- TkcText.new(w,436.5,185.5, 'text'=>'126', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,409,209,409,229,399,229,399,253,
- 486,253,486,239,474,239,474,209,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '127'
- $floorItems['127'] = i
- TkcText.new(w,436.5,'231', 'text'=>'127', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,501,164,501,174,495,174,495,188,
- 490,188,490,204,476,204,476,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'MShower'
- $floorItems['MShower'] = i
- TkcText.new(w,488.5,'184', 'text'=>'MShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Closet'
- $floorItems['Closet'] = i
- TkcText.new(w,502.5,190, 'text'=>'Closet', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'WShower'
- $floorItems['WShower'] = i
- TkcText.new(w,494.5,230, 'text'=>'WShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166,
- 697,166,697,275,553,275,531,254,515,254,
- 515,174,503,174,503,161,486,161,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '130'
- $floorItems['130'] = i
- TkcText.new(w,638.5,205, 'text'=>'130', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,308,242,339,242,339,248,342,248,
- 342,246,397,246,397,276,393,276,
- 393,309,300,309,300,248,308,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '102'
- $floorItems['102'] = i
- TkcText.new(w,367.5,278.5, 'text'=>'102', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '128'
- $floorItems['128'] = i
- TkcText.new(w,441.5,265.5, 'text'=>'128', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,510,309,486,309,486,255,530,255,
- 552,277,561,277,561,325,510,325,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '129'
- $floorItems['129'] = i
- TkcText.new(w,535.5,293, 'text'=>'129', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,696,281,740,281,740,387,642,387,
- 642,389,561,389,561,277,696,277,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '133'
- $floorItems['133'] = i
- TkcText.new(w,628.5,335, 'text'=>'133', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '132'
- $floorItems['132'] = i
- TkcText.new(w,771,334, 'text'=>'132', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '134'
- $floorItems['134'] = i
- TkcText.new(w,749.5,224, 'text'=>'134', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '135'
- $floorItems['135'] = i
- TkcText.new(w,763,148.5, 'text'=>'135', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366,
- 304,312,396,312,396,288,400,288,404,288,
- 409,290,413,292,418,297,421,302,422,309,
- 421,318,417,325,411,330,405,332,397,333,
- 344,333,340,334,336,336,335,338,332,342,
- 331,347,332,351,334,354,336,357,341,359,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Ramona Stair'
- $floorItems['Ramona Stair'] = i
- TkcText.new(w,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20,
- 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'University Stair'
- $floorItems['University Stair'] = i
- TkcText.new(w,155,77.5, 'text'=>'University Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56,
- 358,48,363,39,365,29,348,25,335,22,321,14,
- 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
- 227,13,223,17,221,22,220,34,260,34,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Plaza Stair'
- $floorItems['Plaza Stair'] = i
- TkcText.new(w,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49,
- 323,56,337,70,350,83,365,94,377,100,
- 386,104,386,128,220,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = 'Plaza Deck'
- $floorItems['Plaza Deck'] = i
- TkcText.new(w,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '106'
- $floorItems['106'] = i
- TkcText.new(w,131.5,318.5, 'text'=>'106', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115,
- 95,128,114,128,114,151,157,151,157,153,112,153,
- 112,130,97,130,97,168,175,168,175,131,146,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels[i.id] = '119'
- $floorItems['119'] = i
- TkcText.new(w,143.5,133, 'text'=>'119', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- TkcLine.new(w,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,169,176,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,176,247,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,376,246,376,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,307,247,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,147,129,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,202,133,176,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,352,258,387, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,0,337,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,3,114,3,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,237,52,273, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,189,52,225, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,140,52,177, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,395,306,395,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,531,254,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,475,178,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,502,162,398,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,398,129,398,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,408,208,475,208, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,484,278,484,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,559,327,508,327, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,644,391,559,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,644,389,644,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,514,205,475,205, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,496,189,496,187, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,725,149,725,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,725,129,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,802,389,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,739,167,802,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,0,337,9,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,58,337,21,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,43,391,43,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,105,337,75,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,91,387,91,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,154,337,117,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,139,387,139,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,227,337,166,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,337,251,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,328,302,328, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,302,355,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,395,311,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,484,278,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,395,294,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,473,278,473,275, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,473,256,473,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,533,257,531,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,553,276,551,274, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,698,276,553,276, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,559,391,559,327, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,802,389,644,389, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,741,314,741,389, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,698,280,698,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,707,280,698,280, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,802,280,731,280, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,741,280,741,302, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,698,167,727,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,725,137,725,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,514,254,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,496,175,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,502,175,502,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,475,166,475,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,496,176,496,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,491,189,496,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,491,205,491,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,487,238,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,487,240,487,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,487,252,487,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,315,133,304,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,256,133,280,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,247,270,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,307,247,294,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,214,133,232,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,217,247,217,266, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,217,309,217,291, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,217,309,172,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,154,309,148,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,175,300,175,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,151,300,175,300, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,151,247,151,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,237,78,265, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,286,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,106,309,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,130,309,125,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,99,309,99,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,127,299,99,299, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,127,309,127,299, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,155,191,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,137,169,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,171,78,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,78,190,78,218, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,86,192,86,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,86,192,78,192, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,301,3,301, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,286,52,301, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,252,3,252, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,203,3,203, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,3,156,52,156, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,8,25,8,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,63,114,3,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,75,114,97,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,108,114,129,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,129,114,129,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,52,114,52,128, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,132,89,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,88,25,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,88,114,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,218,89,144,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,147,111,147,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,162,111,147,111, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,162,109,162,111, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,162,96,162,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,218,89,218,94, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,218,89,218,119, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,8,25,88,25, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,258,337,258,328, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,113,129,96,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,302,355,258,355, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,386,104,386,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,377,100,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,365,94,377,100, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,350,83,365,94, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,337,70,350,83, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,337,70,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,312,49,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,295,40,312,49, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,282,37,295,40, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,260,34,282,37, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,253,34,260,34, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,386,128,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
- TkcLine.new(w,113,152,113,129, 'fill'=>color, 'tags'=>['floor1','wall'])
-end
-
-# floor_fg2 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the second
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor_fg2(w,color)
- i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222,
- 800,222,800,168,748,168,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '238'
- $floorItems['238'] = i
- TkcText.new(w,774,195, 'text'=>'238', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '237'
- $floorItems['237'] = i
- TkcText.new(w,763,148.5, 'text'=>'237', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324,
- 643,324,643,291,641,291,641,205,696,205,
- 696,291,694,291,694,314,715,314,715,291,
- 715,205,755,205,755,190,724,190,724,187,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '246'
- $floorItems['246'] = i
- TkcText.new(w,600,264, 'text'=>'246', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '247'
- $floorItems['247'] = i
- TkcText.new(w,668.5,296.5, 'text'=>'247', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246,
- 397,246,397,255,476,255,476,250,482,250,559,250,
- 559,274,482,274,482,278,396,278,396,274,232,274,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '202'
- $floorItems['202'] = i
- TkcText.new(w,285.5,260, 'text'=>'202', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196,
- 306,196,306,180,175,180,175,169,156,169,
- 156,196,176,196,176,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '206'
- $floorItems['206'] = i
- TkcText.new(w,143,267, 'text'=>'206', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '212'
- $floorItems['212'] = i
- TkcText.new(w,28.5,307.5, 'text'=>'212', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '245'
- $floorItems['245'] = i
- TkcText.new(w,521.5,300.5, 'text'=>'245', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '244'
- $floorItems['244'] = i
- TkcText.new(w,579.5,357.5, 'text'=>'244', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '243'
- $floorItems['243'] = i
- TkcText.new(w,622,357.5, 'text'=>'243', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '242'
- $floorItems['242'] = i
- TkcText.new(w,666.5,340.5, 'text'=>'242', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = 'Barbecue Deck'
- $floorItems['Barbecue Deck'] = i
- TkcText.new(w,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '240'
- $floorItems['240'] = i
- TkcText.new(w,736,288, 'text'=>'240', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '241'
- $floorItems['241'] = i
- TkcText.new(w,722,340.5, 'text'=>'241', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '239'
- $floorItems['239'] = i
- TkcText.new(w,736,233.5, 'text'=>'239', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '248'
- $floorItems['248'] = i
- TkcText.new(w,669,241.5, 'text'=>'248', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '236'
- $floorItems['236'] = i
- TkcText.new(w,700,160, 'text'=>'236', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '235'
- $floorItems['235'] = i
- TkcText.new(w,651.5,160, 'text'=>'235', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,626,143,633,143,633,135,572,135,
- 572,143,579,143,579,185,626,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '234'
- $floorItems['234'] = i
- TkcText.new(w,606,160, 'text'=>'234', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,135,571,135,571,145,578,145,
- 578,185,527,185,527,131,557,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '233'
- $floorItems['233'] = i
- TkcText.new(w,552.5,158, 'text'=>'233', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '230'
- $floorItems['230'] = i
- TkcText.new(w,516.5,227, 'text'=>'230', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '232'
- $floorItems['232'] = i
- TkcText.new(w,500.5,158, 'text'=>'232', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '229'
- $floorItems['229'] = i
- TkcText.new(w,485.5,195, 'text'=>'229', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '227'
- $floorItems['227'] = i
- TkcText.new(w,436.5,185.5, 'text'=>'227', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '228'
- $floorItems['228'] = i
- TkcText.new(w,436.5,231, 'text'=>'228', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '226'
- $floorItems['226'] = i
- TkcText.new(w,392,217.5, 'text'=>'226', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '225'
- $floorItems['225'] = i
- TkcText.new(w,356.5,150, 'text'=>'225', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '224'
- $floorItems['224'] = i
- TkcText.new(w,270,223.5, 'text'=>'224', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '223'
- $floorItems['223'] = i
- TkcText.new(w,292,157, 'text'=>'223', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '222'
- $floorItems['222'] = i
- TkcText.new(w,244.5,157, 'text'=>'222', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '221'
- $floorItems['221'] = i
- TkcText.new(w,198,157, 'text'=>'221', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '204'
- $floorItems['204'] = i
- TkcText.new(w,324,301.5, 'text'=>'204', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '205'
- $floorItems['205'] = i
- TkcText.new(w,265.5,307, 'text'=>'205', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '207'
- $floorItems['207'] = i
- TkcText.new(w,234,362.5, 'text'=>'207', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '208'
- $floorItems['208'] = i
- TkcText.new(w,187,362.5, 'text'=>'208', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '209'
- $floorItems['209'] = i
- TkcText.new(w,138.5,362.5, 'text'=>'209', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '217'
- $floorItems['217'] = i
- TkcText.new(w,71,192, 'text'=>'217', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '217A'
- $floorItems['217A'] = i
- TkcText.new(w,93,179.5, 'text'=>'217A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '216'
- $floorItems['216'] = i
- TkcText.new(w,71,145.5, 'text'=>'216', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '215'
- $floorItems['215'] = i
- TkcText.new(w,28.5,157, 'text'=>'215', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '214'
- $floorItems['214'] = i
- TkcText.new(w,28.5,203.5, 'text'=>'214', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '213'
- $floorItems['213'] = i
- TkcText.new(w,28.5,252, 'text'=>'213', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '210'
- $floorItems['210'] = i
- TkcText.new(w,90.5,362.5, 'text'=>'210', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '211'
- $floorItems['211'] = i
- TkcText.new(w,33,364.5, 'text'=>'211', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '203'
- $floorItems['203'] = i
- TkcText.new(w,367.5,292.5, 'text'=>'203', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198,
- 154,198,154,192,109,192,109,169,99,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '220'
- $floorItems['220'] = i
- TkcText.new(w,132.5,208.5, 'text'=>'220', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = 'Priv Lift2'
- $floorItems['Priv Lift2'] = i
- TkcText.new(w,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = 'Pub Lift 2'
- $floorItems['Pub Lift 2'] = i
- TkcText.new(w,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '218'
- $floorItems['218'] = i
- TkcText.new(w,136,149.5, 'text'=>'218', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '219'
- $floorItems['219'] = i
- TkcText.new(w,132.5,180, 'text'=>'219', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels[i.id] = '201'
- $floorItems['201'] = i
- TkcText.new(w,358,209, 'text'=>'201', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- TkcLine.new(w,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,634,144,627,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,572,133,572,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,572,144,579,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,129,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,174,197,175,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,175,197,175,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,206,757,221, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,727,189,725,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,747,167,802,167, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,747,167,747,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,755,189,739,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,769,224,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,802,224,802,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,802,129,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,725,189,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,725,186,690,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,676,133,676,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,627,144,627,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,629,186,593,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,579,144,579,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,526,129,526,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,540,186,581,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,528,186,523,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,511,186,475,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,496,190,496,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,496,205,496,202, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,475,205,527,205, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,205,539,205, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,205,558,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,249,475,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,662,206,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,695,206,675,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,695,278,642,278, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,642,291,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,695,291,695,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,716,208,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,206,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,221,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,793,224,802,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,262,716,262, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,716,220,716,264, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,716,315,716,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,315,703,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,325,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,757,367,644,367, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,689,367,689,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,647,315,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,659,315,691,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,600,325,600,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,627,325,644,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,644,391,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,615,325,575,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,644,391,558,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,563,325,558,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,391,558,314, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,327,508,327, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,275,484,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,558,302,558,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,484,275,484,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,475,208,408,208, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,188,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,162,484,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,475,162,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,254,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,484,280,395,280, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,395,311,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,307,197,293,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,278,197,233,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,233,197,233,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,307,179,284,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,233,249,278,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,269,179,269,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,220,179,220,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,155,191,110,191, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,90,190,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,98,169,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,133,52,165, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,214,52,177, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,226,52,262, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,274,52,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,234,275,234,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,226,339,258,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,211,387,211,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,214,339,177,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,3,133,3,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,165,339,129,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,117,339,80,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,68,339,59,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,0,339,46,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,0,339,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,258,329,258,387, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,395,311,350,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,176,133,315,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,3,133,96,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,66,387,66,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,115,387,115,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,163,387,163,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,234,275,276,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,288,275,309,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,321,275,341,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,375,275,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,376,245,376,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,245,340,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,293,250,307,250, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,271,179,238,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,226,179,195,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,174,169,176,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,162,169,90,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,96,169,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,175,227,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,90,190,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,179,3,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,228,3,228, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,52,276,3,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,110,191,110,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,155,189,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor2','wall'])
-end
-
-# floor_fg3 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the third
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor_fg3(w,color)
- i = TkcPolygon.new(w,89,228,89,180,70,180,70,228,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '316'
- $floorItems['316'] = i
- TkcText.new(w,79.5,204, 'text'=>'316', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '309'
- $floorItems['309'] = i
- TkcText.new(w,138.5,345.5, 'text'=>'309', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '308'
- $floorItems['308'] = i
- TkcText.new(w,187.5,345.5, 'text'=>'308', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '307'
- $floorItems['307'] = i
- TkcText.new(w,234,345.5, 'text'=>'307', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '305'
- $floorItems['305'] = i
- TkcText.new(w,270.5,301.5, 'text'=>'305', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '324B'
- $floorItems['324B'] = i
- TkcText.new(w,247.5,211, 'text'=>'324B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '324A'
- $floorItems['324A'] = i
- TkcText.new(w,247.5,240.5, 'text'=>'324A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '320'
- $floorItems['320'] = i
- TkcText.new(w,200,157, 'text'=>'320', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '310'
- $floorItems['310'] = i
- TkcText.new(w,90.5,345.5, 'text'=>'310', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '312'
- $floorItems['312'] = i
- TkcText.new(w,45.5,299, 'text'=>'312', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '313'
- $floorItems['313'] = i
- TkcText.new(w,45.5,252, 'text'=>'313', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '314'
- $floorItems['314'] = i
- TkcText.new(w,40.5,203.5, 'text'=>'314', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '315'
- $floorItems['315'] = i
- TkcText.new(w,59,157, 'text'=>'315', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '316B'
- $floorItems['316B'] = i
- TkcText.new(w,95,215, 'text'=>'316B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '316A'
- $floorItems['316A'] = i
- TkcText.new(w,95,191, 'text'=>'316A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198,
- 174,198,174,226,101,226,101,179,97,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '319'
- $floorItems['319'] = i
- TkcText.new(w,141.5,209, 'text'=>'319', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '311'
- $floorItems['311'] = i
- TkcText.new(w,29.5,361, 'text'=>'311', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '318'
- $floorItems['318'] = i
- TkcText.new(w,132.5,180, 'text'=>'318', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '317'
- $floorItems['317'] = i
- TkcText.new(w,136,149.5, 'text'=>'317', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '323'
- $floorItems['323'] = i
- TkcText.new(w,290,207.5, 'text'=>'323', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '325'
- $floorItems['325'] = i
- TkcText.new(w,290,235.5, 'text'=>'325', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '321'
- $floorItems['321'] = i
- TkcText.new(w,243.5,157, 'text'=>'321', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '322'
- $floorItems['322'] = i
- TkcText.new(w,293.5,163.5, 'text'=>'322', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = 'Pub Lift3'
- $floorItems['Pub Lift3'] = i
- TkcText.new(w,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = 'Priv Lift3'
- $floorItems['Priv Lift3'] = i
- TkcText.new(w,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '303'
- $floorItems['303'] = i
- TkcText.new(w,373.5,292.5, 'text'=>'303', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,272,203,272,249,252,249,252,230,
- 244,230,244,221,252,221,252,203,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '324'
- $floorItems['324'] = i
- TkcText.new(w,262,226, 'text'=>'324', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '304'
- $floorItems['304'] = i
- TkcText.new(w,324,301.5, 'text'=>'304', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '301'
- $floorItems['301'] = i
- TkcText.new(w,358,209, 'text'=>'301', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '327'
- $floorItems['327'] = i
- TkcText.new(w,387,215.5, 'text'=>'327', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '326'
- $floorItems['326'] = i
- TkcText.new(w,365.5,150, 'text'=>'326', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282,
- 375,274,397,274,397,248,339,248,339,242,308,242,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '302'
- $floorItems['302'] = i
- TkcText.new(w,319.5,261, 'text'=>'302', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203,
- 272,193,263,180,242,180,175,180,175,169,156,169,
- 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
- 107,248,160,248,160,301,107,301,107,275,70,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels[i.id] = '306'
- $floorItems['306'] = i
- TkcText.new(w,200.5,284.5, 'text'=>'306', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,399,129,399,311, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,258,202,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,251,231,243,231, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,243,220,251,220, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,243,250,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,155,197,155,190, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,110,192,110,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,155,192,110,192, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,176,197,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,69,280,69,274, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,276,69,276, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,69,262,69,226, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,228,69,228, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,179,75,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,69,179,69,214, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,220,90,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,204,90,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,203,100,203, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,187,90,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,90,227,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,100,179,100,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,100,179,87,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,96,179,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,162,169,96,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,173,169,176,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,195,179,226,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,224,133,224,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,264,179,264,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,238,179,264,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,207,273,193, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,235,273,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,224,273,219, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,193,307,193, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,222,307,222, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,384,247,376,247, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,376,247,376,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,376,283,366,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,376,283,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,399,275,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,341,275,320,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,308,275,298,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,243,322,243,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,243,275,284,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,258,322,226,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,212,370,212,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,214,322,177,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,163,370,163,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,165,322,129,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,84,322,117,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,71,322,64,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,115,322,115,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,66,322,66,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,52,322,21,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,331,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,21,331,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,96,133,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,315,133,176,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,315,129,399,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,399,311,350,311, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,258,322,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,60,370,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,60,370,60,391, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,0,391,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,307,250,307,242, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- TkcLine.new(w,258,250,243,250, 'fill'=>color, 'tags'=>['floor3','wall'])
-end
-
-# Below is the "main program" that creates the floorplan demonstration.
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($floor_demo) && $floor_demo
- $floor_demo.destroy
- $floor_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$floor_demo = TkToplevel.new {|w|
- title("Floorplan Canvas Demonstration")
- iconname("Floorplan")
- positionWindow(w)
- geometry('+20+20')
- minsize(100,100)
-}
-
-base_frame = TkFrame.new($floor_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
- 'text'=>"ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ãƒ‡ã‚£ã‚¸ã‚¿ãƒ«ã‚¨ã‚¯ã‚¤ãƒƒãƒ—メント社ã®ã‚¦ã‚§ã‚¹ã‚¿ãƒ³ãƒªã‚µãƒ¼ãƒãƒ©ãƒœãƒ©ãƒˆãƒª (DECWRL) ã®é–“å–ã‚ŠãŒæ›¸ã‹ã‚ŒãŸã‚­ãƒ£ãƒ³ãƒã‚¹ widget ãŒå…¥ã£ã¦ã„ã¾ã™ã€‚ã“れ㯠3階建ã¦ã§ã€å¸¸ã«ãã®ã†ã¡ã®1階分ãŒé¸æŠžã€ã¤ã¾ã‚Šãã®é–“å–ã‚ŠãŒè¡¨ç¤ºã•ã‚Œã‚‹ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™ã€‚ã‚る階をé¸æŠžã™ã‚‹ã«ã¯ã€ãã®ä¸Šã§ãƒžã‚¦ã‚¹ã®å·¦ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。マウスãŒé¸æŠžã•ã‚Œã¦ã„る階ã®ä¸Šã‚’å‹•ãã¨ã€ãã®ä¸‹ã«ã‚る部屋ã®è‰²ãŒå¤‰ã‚ã‚Šã€éƒ¨å±‹ç•ªå·ãŒã€Œéƒ¨å±‹ç•ªå·:ã€ã‚¨ãƒ³ãƒˆãƒªã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã¾ãŸã€ã‚¨ãƒ³ãƒˆãƒªã«éƒ¨å±‹ç•ªå·ã‚’書ãã¨ãã®éƒ¨å±‹ã®è‰²ãŒå¤‰ã‚ã‚Šã¾ã™ã€‚"){
- pack('side'=>'top')
-}
-
-# frame 生æˆ
-$floor_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $floor_demo
- $floor_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'floor'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$floor_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# 変数設定
-$floorLabels = {}
-$floorItems = {}
-
-# canvas 設定
-if $tk_version =~ /^4\.[01]/
- $floor_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken',
- 'highlightthickness'=>2)
- $floor_canvas = TkCanvas.new($floor_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
- 'highlightthickness'=>0) {|c|
- TkScrollbar.new(base_frame, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}){|hs|
- c.xscrollcommand(proc{|first,last| hs.set first,last})
- pack('side'=>'bottom', 'fill'=>'x')
- }
- TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}){|vs|
- c.yscrollcommand(proc{|first,last| vs.set first,last})
- pack('side'=>'right', 'fill'=>'y')
- }
- }
- $floor_canvas_frame.pack('side'=>'top','fill'=>'both', 'expand'=>'yes')
- $floor_canvas.pack('expand'=>'yes', 'fill'=>'both')
-
-else
- TkFrame.new(base_frame) {|f|
- pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes')
-
- h = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'horizontal')
- v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical')
-
- TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
- $floor_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
- 'highlightthickness'=>0) {
- xscrollcommand(proc{|first,last| h.set first,last})
- yscrollcommand(proc{|first,last| v.set first,last})
- pack('expand'=>'yes', 'fill'=>'both')
- }
- grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- }
-
- v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
-
- TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
-
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
-
- v.command(proc{|*args| $floor_canvas.yview(*args)})
- h.command(proc{|*args| $floor_canvas.xview(*args)})
- }
-end
-
-
-# Create an entry for displaying and typing in current room.
-
-$currentRoom = TkVariable.new
-$floor_entry = TkEntry.new($floor_canvas, 'width'=>10, 'relief'=>'sunken',
- 'bd'=>2, 'textvariable'=>$currentRoom)
-
-# Choose colors, then fill in the floorplan.
-
-$floor_colors = {}
-if TkWinfo.depth($floor_canvas) > 1
- $floor_colors['bg1'] = '#a9c1da'
- $floor_colors['outline1'] = '#77889a'
- $floor_colors['bg2'] = '#9ab0c6'
- $floor_colors['outline2'] = '#687786'
- $floor_colors['bg3'] = '#8ba0b3'
- $floor_colors['outline3'] = '#596673'
- $floor_colors['offices'] = 'Black'
- $floor_colors['active'] = '#c4d1df'
-else
- $floor_colors['bg1'] = 'white'
- $floor_colors['outline1'] = 'black'
- $floor_colors['bg2'] = 'white'
- $floor_colors['outline2'] = 'black'
- $floor_colors['bg3'] = 'white'
- $floor_colors['outline3'] = 'black'
- $floor_colors['offices'] = 'Black'
- $floor_colors['active'] = 'black'
-end
-
-$activeFloor = ''
-floorDisplay $floor_canvas,3
-
-# Set up event bindings for canvas:
-
-$floor_canvas.itembind('floor1', '1', proc{floorDisplay $floor_canvas,1})
-$floor_canvas.itembind('floor2', '1', proc{floorDisplay $floor_canvas,2})
-$floor_canvas.itembind('floor3', '1', proc{floorDisplay $floor_canvas,3})
-$floor_canvas.itembind('room', 'Enter', proc{newRoom $floor_canvas})
-$floor_canvas.itembind('room', 'Leave', proc{$currentRoom.value = ''})
-$floor_canvas.bind('2', proc{|x,y| $floor_canvas.scan_mark x,y}, '%x %y')
-$floor_canvas.bind('B2-Motion',
- proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y')
-$floor_canvas.bind('Destroy', proc{$currentRoom.unset})
-$currentRoom.value = ''
-$currentRoom.trace('w',proc{roomChanged $floor_canvas})
-
diff --git a/ext/tk/sample/demos-jp/floor2.rb b/ext/tk/sample/demos-jp/floor2.rb
deleted file mode 100644
index 7f294ce82e..0000000000
--- a/ext/tk/sample/demos-jp/floor2.rb
+++ /dev/null
@@ -1,1720 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# floorDisplay widget demo 2 (called by 'widget')
-#
-
-# floorDisplay2 --
-# Recreate the floorplan display in the canvas given by "w". The
-# floor given by "active" is displayed on top with its office structure
-# visible.
-#
-# Arguments:
-# w - Name of the canvas window.
-# active - Number of active floor (1, 2, or 3).
-
-def floorDisplay2(w,active)
- return if $activeFloor2 == active
-
- w.delete('all')
- $activeFloor2 = active
-
- # First go through the three floors, displaying the backgrounds for
- # each floor.
-
- floor2_bg1(w,$floor2_colors['bg1'],$floor2_colors['outline1'])
- floor2_bg2(w,$floor2_colors['bg2'],$floor2_colors['outline2'])
- floor2_bg3(w,$floor2_colors['bg3'],$floor2_colors['outline3'])
-
- # Raise the background for the active floor so that it's on top.
-
- w.raise("floor#{active}")
-
- # Create a dummy item just to mark this point in the display list,
- # so we can insert highlights here.
-
- w.create(TkcRectangle,0,100,1,101,'fill'=>'','outline'=>'','tags'=>'marker')
-
- # Add the walls and labels for the active floor, along with
- # transparent polygons that define the rooms on the floor.
- # Make sure that the room polygons are on top.
-
- $floorLabels2.clear
- $floorItems2.clear
- send("floor2_fg#{active}", w, $floor2_colors['offices'])
- w.raise('room')
-
- # Offset the floors diagonally from each other.
-
- w.move('floor1', '2c', '2c')
- w.move('floor2', '1c', '1c')
-
- # Create items for the room entry and its label.
- w.create(TkcWindow, 600, 100, 'anchor'=>'w', 'window'=>$floor2_entry)
- w.create(TkcText, 600, 100, 'anchor'=>'e', 'text'=>"部屋番å·: ")
- w['scrollregion'] = w.bbox('all')
-end
-
-# newRoom2 --
-# This method is invoked whenever the mouse enters a room
-# in the floorplan. It changes tags so that the current room is
-# highlighted.
-#
-# Arguments:
-# w - The name of the canvas window.
-
-def newRoom2(w)
- id = w.find_withtag('current')[0]
- $currentRoom2.value = $floorLabels2[id.id] if id != ""
- Tk.update(true)
-end
-
-# roomChanged2 --
-# This method is invoked whenever the currentRoom variable changes.
-# It highlights the current room and unhighlights any previous room.
-#
-# Arguments:
-# w - The canvas window displaying the floorplan.
-# args - Not used.
-
-def roomChanged2(w,*args)
- w.delete('highlight')
- item = $floorItems2[$currentRoom2.value]
- return if item == nil
- new = TkcPolygon.new(w, *(w.coords(item)))
- new.configure('fill'=>$floor2_colors['active'], 'tags'=>'highlight')
- w.raise(new, 'marker')
-end
-
-# floor2_bg1 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor2_bg1(w,fill,outline)
- w.create(TkcPolygon,347,80,349,82,351,84,353,85,363,92,375,99,386,104,
- 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
- 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
- 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
- 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
- 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
- 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
- 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
- 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
- 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
- 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
- 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
- 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
- w.create(TkcLine,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,0,337,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,3,114,3,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,258,387,60,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,162,398,162, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,398,162,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,278,484,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,311,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,508,327,508,311, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,559,327,508,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,644,391,559,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,644,389,644,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,559,129,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,162,484,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,725,133,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,559,129,559,133, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,725,129,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,802,389,802,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,3,337,0,337, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,559,391,559,327, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,802,389,644,389, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,725,133,725,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,8,25,8,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,8,114,3,114, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,30,25,8,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,484,278,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,30,25,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,93,5,30,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,98,5,93,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,104,7,98,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,110,10,104,7, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,116,16,110,10, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,119,20,116,16, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,122,28,119,20, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,123,32,122,28, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,123,68,123,32, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,220,68,123,68, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,386,129,386,104, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,386,104,375,99, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,375,99,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,353,85,363,92, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,220,68,220,34, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,337,70,352,56, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,352,56,358,48, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,358,48,363,39, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,363,39,365,29, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,365,29,348,25, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,348,25,335,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,335,22,321,14, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,321,14,300,5, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,300,5,283,1, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,283,1,260,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,260,0,246,0, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,246,0,242,2, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,242,2,236,4, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,236,4,231,8, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,231,8,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,223,17,227,13, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,221,22,223,17, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,220,34,221,22, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,340,360,335,363, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,335,363,331,365, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,331,365,326,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,326,366,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,304,355,304,366, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,395,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,404,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,409,290,404,288, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,413,292,409,290, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,418,297,413,292, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,421,302,418,297, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,422,309,421,302, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,421,318,422,309, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,421,318,417,325, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,417,325,411,330, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,411,330,405,332, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,405,332,397,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,397,333,344,333, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,344,333,340,334, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,340,334,336,336, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,336,336,335,338, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,335,338,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,331,347,332,342, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,332,351,331,347, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,334,354,332,351, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,336,357,334,354, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,341,359,336,357, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,341,359,340,360, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,395,288,395,278, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,304,355,258,355, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,347,80,344,76, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,344,76,337,70, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,349,82,347,80, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,351,84,349,82, 'fill'=>outline, 'tags'=>['floor1','bg'])
- w.create(TkcLine,353,85,351,84, 'fill'=>outline, 'tags'=>['floor1','bg'])
-end
-
-# floor2_bg2 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor2_bg2(w,fill,outline)
- w.create(TkcPolygon,559,129,484,129,484,162,398,162,398,129,315,129,
- 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
- 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
- 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
- 367,802,367,802,129,725,129,725,133,559,133,559,129,
- 'tags'=>['floor2','bg'], 'fill'=>fill)
- w.create(TkcLine,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,802,129,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,725,133,725,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,559,129,559,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,559,133,725,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,484,162,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,559,129,484,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,802,367,644,367, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,644,367,644,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,644,391,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,558,327,558,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,558,327,508,327, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,508,327,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,484,311,508,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,484,280,484,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,398,162,484,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,484,280,395,280, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,395,280,395,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,258,387,60,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,3,133,3,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,3,339,0,339, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,0,339,0,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,258,329,258,387, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,350,329,258,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,395,311,350,311, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,398,129,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,176,133,315,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,3,133,96,133, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,315,133,315,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,176,133,176,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
- w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
-end
-
-# floor2_bg3 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the background information for the first
-# floor.
-#
-# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
-
-def floor2_bg3(w,fill,outline)
- w.create(TkcPolygon,159,300,107,300,107,248,159,248,159,129,96,129,96,
- 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
- w.create(TkcPolygon,258,370,258,329,350,329,350,311,399,311,399,129,
- 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
- w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,315,133,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,315,133,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,399,129,315,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,399,311,399,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,399,311,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,350,329,350,311, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,350,329,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,258,370,258,329, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,60,370,258,370, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,60,370,60,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,0,391,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
- w.create(TkcLine,107,300,159,300,159,248,107,248,107,300,
- 'fill'=>outline, 'tags'=>['floor3','bg'])
-end
-
-# floor2_fg1 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the first
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor2_fg1(w,color)
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '101'
- $floorItems2['101'] = i
- w.create(TkcText,358,209, 'text'=>'101', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Pub Lift1'
- $floorItems2['Pub Lift1'] = i
- w.create(TkcText,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Priv Lift1'
- $floorItems2['Priv Lift1'] = i
- w.create(TkcText,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '110'
- $floorItems2['110'] = i
- w.create(TkcText,21.5,363, 'text'=>'110', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '109'
- $floorItems2['109'] = i
- w.create(TkcText,67,363, 'text'=>'109', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '111'
- $floorItems2['111'] = i
- w.create(TkcText,28.5,276.5, 'text'=>'111', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '117B'
- $floorItems2['117B'] = i
- w.create(TkcText,88.5,278.5, 'text'=>'117B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '112'
- $floorItems2['112'] = i
- w.create(TkcText,28.5,227.5, 'text'=>'112', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '113'
- $floorItems2['113'] = i
- w.create(TkcText,28.5,179.5, 'text'=>'113', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '117A'
- $floorItems2['117A'] = i
- w.create(TkcText,82,180.5, 'text'=>'117A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '117'
- $floorItems2['117'] = i
- w.create(TkcText,65,235, 'text'=>'117', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '114'
- $floorItems2['114'] = i
- w.create(TkcText,28.5,135, 'text'=>'114', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '115'
- $floorItems2['115'] = i
- w.create(TkcText,74,141.5, 'text'=>'115', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '116'
- $floorItems2['116'] = i
- w.create(TkcText,48.5,70, 'text'=>'116', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '118'
- $floorItems2['118'] = i
- w.create(TkcText,108.5,102, 'text'=>'118', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,178,128,178,132,216,132,216,91,
- 163,91,163,112,149,112,149,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '120'
- $floorItems2['120'] = i
- w.create(TkcText,189.5,111.5, 'text'=>'120', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192,
- 156,192,156,169,175,169,175,246,79,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '122'
- $floorItems2['122'] = i
- w.create(TkcText,131,207.5, 'text'=>'122', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '121'
- $floorItems2['121'] = i
- w.create(TkcText,146,180, 'text'=>'121', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '106A'
- $floorItems2['106A'] = i
- w.create(TkcText,112.5,304.5, 'text'=>'106A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '105'
- $floorItems2['105'] = i
- w.create(TkcText,124.5,278.5, 'text'=>'105', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '106B'
- $floorItems2['106B'] = i
- w.create(TkcText,163,304.5, 'text'=>'106B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '104'
- $floorItems2['104'] = i
- w.create(TkcText,184,278.5, 'text'=>'104', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '108'
- $floorItems2['108'] = i
- w.create(TkcText,114.5,361, 'text'=>'108', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '107'
- $floorItems2['107'] = i
- w.create(TkcText,198,361, 'text'=>'107', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Smoking'
- $floorItems2['Smoking'] = i
- w.create(TkcText,280,341, 'text'=>'Smoking', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '123'
- $floorItems2['123'] = i
- w.create(TkcText,245.5,190.5, 'text'=>'123', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '103'
- $floorItems2['103'] = i
- w.create(TkcText,259,287, 'text'=>'103', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '124'
- $floorItems2['124'] = i
- w.create(TkcText,356,150, 'text'=>'124', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '125'
- $floorItems2['125'] = i
- w.create(TkcText,392,217.5, 'text'=>'125', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '126'
- $floorItems2['126'] = i
- w.create(TkcText,436.5,185.5, 'text'=>'126', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,409,209,409,229,399,229,399,253,
- 486,253,486,239,474,239,474,209,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '127'
- $floorItems2['127'] = i
- w.create(TkcText,436.5,'231', 'text'=>'127', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,501,164,501,174,495,174,495,188,
- 490,188,490,204,476,204,476,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'MShower'
- $floorItems2['MShower'] = i
- w.create(TkcText,488.5,'184', 'text'=>'MShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Closet'
- $floorItems2['Closet'] = i
- w.create(TkcText,502.5,190, 'text'=>'Closet', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'WShower'
- $floorItems2['WShower'] = i
- w.create(TkcText,494.5,230, 'text'=>'WShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166,
- 697,166,697,275,553,275,531,254,515,254,
- 515,174,503,174,503,161,486,161,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '130'
- $floorItems2['130'] = i
- w.create(TkcText,638.5,205, 'text'=>'130', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,308,242,339,242,339,248,342,248,
- 342,246,397,246,397,276,393,276,
- 393,309,300,309,300,248,308,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '102'
- $floorItems2['102'] = i
- w.create(TkcText,367.5,278.5, 'text'=>'102', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '128'
- $floorItems2['128'] = i
- w.create(TkcText,441.5,265.5, 'text'=>'128', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,510,309,486,309,486,255,530,255,
- 552,277,561,277,561,325,510,325,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '129'
- $floorItems2['129'] = i
- w.create(TkcText,535.5,293, 'text'=>'129', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,696,281,740,281,740,387,642,387,
- 642,389,561,389,561,277,696,277,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '133'
- $floorItems2['133'] = i
- w.create(TkcText,628.5,335, 'text'=>'133', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '132'
- $floorItems2['132'] = i
- w.create(TkcText,771,334, 'text'=>'132', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '134'
- $floorItems2['134'] = i
- w.create(TkcText,749.5,224, 'text'=>'134', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '135'
- $floorItems2['135'] = i
- w.create(TkcText,763,148.5, 'text'=>'135', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366,
- 304,312,396,312,396,288,400,288,404,288,
- 409,290,413,292,418,297,421,302,422,309,
- 421,318,417,325,411,330,405,332,397,333,
- 344,333,340,334,336,336,335,338,332,342,
- 331,347,332,351,334,354,336,357,341,359,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Ramona Stair'
- $floorItems2['Ramona Stair'] = i
- w.create(TkcText,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20,
- 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'University Stair'
- $floorItems2['University Stair'] = i
- w.create(TkcText,155,77.5, 'text'=>'University Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56,
- 358,48,363,39,365,29,348,25,335,22,321,14,
- 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
- 227,13,223,17,221,22,220,34,260,34,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Plaza Stair'
- $floorItems2['Plaza Stair'] = i
- w.create(TkcText,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49,
- 323,56,337,70,350,83,365,94,377,100,
- 386,104,386,128,220,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = 'Plaza Deck'
- $floorItems2['Plaza Deck'] = i
- w.create(TkcText,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '106'
- $floorItems2['106'] = i
- w.create(TkcText,131.5,318.5, 'text'=>'106', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115,
- 95,128,114,128,114,151,157,151,157,153,112,153,
- 112,130,97,130,97,168,175,168,175,131,146,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
- $floorLabels2[i.id] = '119'
- $floorItems2['119'] = i
- w.create(TkcText,143.5,133, 'text'=>'119', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
- w.create(TkcLine,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,169,176,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,176,247,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,247,340,224, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,376,246,376,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,307,247,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,147,129,176,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,202,133,176,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,398,129,315,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,352,258,387, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,60,387,60,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,0,337,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,3,114,3,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,387,60,387, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,237,52,273, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,189,52,225, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,140,52,177, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,395,306,395,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,531,254,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,475,178,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,502,162,398,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,398,129,398,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,383,188,376,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,188,408,194, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,398,227,398,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,227,398,227, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,222,408,227, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,206,408,210, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,408,208,475,208, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,484,278,484,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,484,311,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,508,327,508,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,559,327,508,327, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,644,391,559,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,644,389,644,391, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,514,205,475,205, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,496,189,496,187, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,559,129,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,484,162,484,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,725,133,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,559,129,559,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,725,149,725,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,725,129,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,802,389,802,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,739,167,802,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,396,188,408,188, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,0,337,9,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,58,337,21,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,43,391,43,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,105,337,75,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,91,387,91,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,154,337,117,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,139,387,139,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,227,337,166,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,337,251,337, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,328,302,328, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,302,355,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,395,311,302,311, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,484,278,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,395,294,395,278, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,473,278,473,275, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,473,256,473,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,533,257,531,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,553,276,551,274, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,698,276,553,276, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,559,391,559,327, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,802,389,644,389, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,741,314,741,389, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,698,280,698,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,707,280,698,280, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,802,280,731,280, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,741,280,741,302, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,698,167,727,167, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,725,137,725,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,514,254,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,496,175,514,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,502,175,502,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,475,166,475,162, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,496,176,496,175, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,491,189,496,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,491,205,491,189, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,487,238,475,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,487,240,487,238, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,487,252,487,254, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,315,133,304,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,256,133,280,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,247,270,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,307,247,294,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,214,133,232,133, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,217,247,217,266, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,217,309,217,291, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,217,309,172,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,154,309,148,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,175,300,175,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,151,300,175,300, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,151,247,151,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,237,78,265, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,286,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,106,309,78,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,130,309,125,309, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,99,309,99,247, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,127,299,99,299, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,127,309,127,299, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,155,191,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,137,169,137,191, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,171,78,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,78,190,78,218, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,86,192,86,169, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,86,192,78,192, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,301,3,301, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,286,52,301, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,252,3,252, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,203,3,203, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,3,156,52,156, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,8,25,8,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,63,114,3,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,75,114,97,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,108,114,129,114, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,129,114,129,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,52,114,52,128, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,132,89,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,88,25,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,88,114,88,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,218,89,144,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,147,111,147,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,162,111,147,111, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,162,109,162,111, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,162,96,162,89, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,218,89,218,94, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,218,89,218,119, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,8,25,88,25, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,258,337,258,328, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,113,129,96,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,302,355,258,355, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,386,104,386,129, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,377,100,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,365,94,377,100, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,350,83,365,94, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,337,70,350,83, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,337,70,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,312,49,323,56, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,295,40,312,49, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,282,37,295,40, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,260,34,282,37, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,253,34,260,34, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,386,128,386,104, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall'])
- w.create(TkcLine,113,152,113,129, 'fill'=>color, 'tags'=>['floor1','wall'])
-end
-
-# floor2_fg2 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the second
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor2_fg2(w,color)
- i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222,
- 800,222,800,168,748,168,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '238'
- $floorItems2['238'] = i
- w.create(TkcText,774,195, 'text'=>'238', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '237'
- $floorItems2['237'] = i
- w.create(TkcText,763,148.5, 'text'=>'237', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324,
- 643,324,643,291,641,291,641,205,696,205,
- 696,291,694,291,694,314,715,314,715,291,
- 715,205,755,205,755,190,724,190,724,187,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '246'
- $floorItems2['246'] = i
- w.create(TkcText,600,264, 'text'=>'246', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '247'
- $floorItems2['247'] = i
- w.create(TkcText,668.5,296.5, 'text'=>'247', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246,
- 397,246,397,255,476,255,476,250,482,250,559,250,
- 559,274,482,274,482,278,396,278,396,274,232,274,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '202'
- $floorItems2['202'] = i
- w.create(TkcText,285.5,260, 'text'=>'202', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196,
- 306,196,306,180,175,180,175,169,156,169,
- 156,196,176,196,176,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '206'
- $floorItems2['206'] = i
- w.create(TkcText,143,267, 'text'=>'206', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '212'
- $floorItems2['212'] = i
- w.create(TkcText,28.5,307.5, 'text'=>'212', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '245'
- $floorItems2['245'] = i
- w.create(TkcText,521.5,300.5, 'text'=>'245', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '244'
- $floorItems2['244'] = i
- w.create(TkcText,579.5,357.5, 'text'=>'244', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '243'
- $floorItems2['243'] = i
- w.create(TkcText,622,357.5, 'text'=>'243', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '242'
- $floorItems2['242'] = i
- w.create(TkcText,666.5,340.5, 'text'=>'242', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = 'Barbecue Deck'
- $floorItems2['Barbecue Deck'] = i
- w.create(TkcText,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '240'
- $floorItems2['240'] = i
- w.create(TkcText,736,288, 'text'=>'240', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '241'
- $floorItems2['241'] = i
- w.create(TkcText,722,340.5, 'text'=>'241', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '239'
- $floorItems2['239'] = i
- w.create(TkcText,736,233.5, 'text'=>'239', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '248'
- $floorItems2['248'] = i
- w.create(TkcText,669,241.5, 'text'=>'248', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '236'
- $floorItems2['236'] = i
- w.create(TkcText,700,160, 'text'=>'236', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '235'
- $floorItems2['235'] = i
- w.create(TkcText,651.5,160, 'text'=>'235', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,626,143,633,143,633,135,572,135,
- 572,143,579,143,579,185,626,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '234'
- $floorItems2['234'] = i
- w.create(TkcText,606,160, 'text'=>'234', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,135,571,135,571,145,578,145,
- 578,185,527,185,527,131,557,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '233'
- $floorItems2['233'] = i
- w.create(TkcText,552.5,158, 'text'=>'233', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '230'
- $floorItems2['230'] = i
- w.create(TkcText,516.5,227, 'text'=>'230', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '232'
- $floorItems2['232'] = i
- w.create(TkcText,500.5,158, 'text'=>'232', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '229'
- $floorItems2['229'] = i
- w.create(TkcText,485.5,195, 'text'=>'229', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '227'
- $floorItems2['227'] = i
- w.create(TkcText,436.5,185.5, 'text'=>'227', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '228'
- $floorItems2['228'] = i
- w.create(TkcText,436.5,231, 'text'=>'228', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '226'
- $floorItems2['226'] = i
- w.create(TkcText,392,217.5, 'text'=>'226', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '225'
- $floorItems2['225'] = i
- w.create(TkcText,356.5,150, 'text'=>'225', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '224'
- $floorItems2['224'] = i
- w.create(TkcText,270,223.5, 'text'=>'224', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '223'
- $floorItems2['223'] = i
- w.create(TkcText,292,157, 'text'=>'223', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '222'
- $floorItems2['222'] = i
- w.create(TkcText,244.5,157, 'text'=>'222', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '221'
- $floorItems2['221'] = i
- w.create(TkcText,198,157, 'text'=>'221', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '204'
- $floorItems2['204'] = i
- w.create(TkcText,324,301.5, 'text'=>'204', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '205'
- $floorItems2['205'] = i
- w.create(TkcText,265.5,307, 'text'=>'205', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '207'
- $floorItems2['207'] = i
- w.create(TkcText,234,362.5, 'text'=>'207', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '208'
- $floorItems2['208'] = i
- w.create(TkcText,187,362.5, 'text'=>'208', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '209'
- $floorItems2['209'] = i
- w.create(TkcText,138.5,362.5, 'text'=>'209', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '217'
- $floorItems2['217'] = i
- w.create(TkcText,71,192, 'text'=>'217', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '217A'
- $floorItems2['217A'] = i
- w.create(TkcText,93,179.5, 'text'=>'217A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '216'
- $floorItems2['216'] = i
- w.create(TkcText,71,145.5, 'text'=>'216', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '215'
- $floorItems2['215'] = i
- w.create(TkcText,28.5,157, 'text'=>'215', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '214'
- $floorItems2['214'] = i
- w.create(TkcText,28.5,203.5, 'text'=>'214', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '213'
- $floorItems2['213'] = i
- w.create(TkcText,28.5,252, 'text'=>'213', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '210'
- $floorItems2['210'] = i
- w.create(TkcText,90.5,362.5, 'text'=>'210', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '211'
- $floorItems2['211'] = i
- w.create(TkcText,33,364.5, 'text'=>'211', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '203'
- $floorItems2['203'] = i
- w.create(TkcText,367.5,292.5, 'text'=>'203', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198,
- 154,198,154,192,109,192,109,169,99,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '220'
- $floorItems2['220'] = i
- w.create(TkcText,132.5,208.5, 'text'=>'220', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = 'Priv Lift2'
- $floorItems2['Priv Lift2'] = i
- w.create(TkcText,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = 'Pub Lift 2'
- $floorItems2['Pub Lift 2'] = i
- w.create(TkcText,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '218'
- $floorItems2['218'] = i
- w.create(TkcText,136,149.5, 'text'=>'218', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '219'
- $floorItems2['219'] = i
- w.create(TkcText,132.5,180, 'text'=>'219', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
- $floorLabels2[i.id] = '201'
- $floorItems2['201'] = i
- w.create(TkcText,358,209, 'text'=>'201', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
- w.create(TkcLine,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,634,144,627,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,572,133,572,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,572,144,579,144, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,129,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,174,197,175,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,175,197,175,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,206,757,221, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,396,188,408,188, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,727,189,725,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,747,167,802,167, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,747,167,747,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,755,189,739,189, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,769,224,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,802,224,802,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,802,129,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,725,189,725,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,725,186,690,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,676,133,676,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,627,144,627,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,629,186,593,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,579,144,579,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,559,129,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,725,133,559,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,484,162,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,559,129,484,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,526,129,526,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,540,186,581,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,528,186,523,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,511,186,475,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,496,190,496,186, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,496,205,496,202, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,475,205,527,205, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,205,539,205, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,205,558,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,249,475,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,662,206,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,695,206,675,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,695,278,642,278, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,642,291,642,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,695,291,695,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,716,208,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,206,716,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,221,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,793,224,802,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,262,716,262, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,716,220,716,264, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,716,315,716,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,315,703,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,325,757,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,757,367,644,367, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,689,367,689,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,647,315,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,659,315,691,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,600,325,600,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,627,325,644,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,644,391,644,315, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,615,325,575,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,644,391,558,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,563,325,558,325, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,391,558,314, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,327,508,327, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,275,484,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,558,302,558,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,508,327,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,484,311,508,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,484,275,484,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,475,208,408,208, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,408,206,408,210, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,408,222,408,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,408,227,398,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,227,398,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,408,188,408,194, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,383,188,376,188, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,188,398,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,162,484,162, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,475,162,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,254,475,254, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,484,280,395,280, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,395,311,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,307,197,293,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,278,197,233,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,233,197,233,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,307,179,284,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,233,249,278,249, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,269,179,269,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,220,179,220,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,155,191,110,191, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,90,190,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,98,169,98,190, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,133,52,165, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,214,52,177, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,226,52,262, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,274,52,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,234,275,234,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,226,339,258,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,211,387,211,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,214,339,177,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,258,387,60,387, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,3,133,3,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,165,339,129,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,117,339,80,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,68,339,59,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,0,339,46,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,0,339,0,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,60,387,60,391, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,258,329,258,387, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,350,329,258,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,395,311,350,311, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,398,129,315,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,176,133,315,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,176,129,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,3,133,96,133, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,66,387,66,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,115,387,115,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,163,387,163,339, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,234,275,276,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,288,275,309,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,298,275,298,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,341,283,350,283, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,321,275,341,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,375,275,395,275, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,307,250,307,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,376,245,376,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,245,340,224, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,293,250,307,250, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,271,179,238,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,226,179,195,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,176,129,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,182,179,176,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,174,169,176,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,162,169,90,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,96,169,96,129, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,175,227,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,90,190,90,227, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,179,3,179, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,228,3,228, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,52,276,3,276, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,110,191,110,169, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,155,189,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,350,283,350,329, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor2','wall'])
- w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor2','wall'])
-end
-
-# floor2_fg3 --
-# This method represents part of the floorplan database. When
-# invoked, it instantiates the foreground information for the third
-# floor (office outlines and numbers).
-#
-# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
-
-def floor2_fg3(w,color)
- i = TkcPolygon.new(w,89,228,89,180,70,180,70,228,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '316'
- $floorItems2['316'] = i
- w.create(TkcText,79.5,204, 'text'=>'316', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '309'
- $floorItems2['309'] = i
- w.create(TkcText,138.5,345.5, 'text'=>'309', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '308'
- $floorItems2['308'] = i
- w.create(TkcText,187.5,345.5, 'text'=>'308', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '307'
- $floorItems2['307'] = i
- w.create(TkcText,234,345.5, 'text'=>'307', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '305'
- $floorItems2['305'] = i
- w.create(TkcText,270.5,301.5, 'text'=>'305', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '324B'
- $floorItems2['324B'] = i
- w.create(TkcText,247.5,211, 'text'=>'324B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '324A'
- $floorItems2['324A'] = i
- w.create(TkcText,247.5,240.5, 'text'=>'324A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '320'
- $floorItems2['320'] = i
- w.create(TkcText,200,157, 'text'=>'320', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '310'
- $floorItems2['310'] = i
- w.create(TkcText,90.5,345.5, 'text'=>'310', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '312'
- $floorItems2['312'] = i
- w.create(TkcText,45.5,299, 'text'=>'312', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '313'
- $floorItems2['313'] = i
- w.create(TkcText,45.5,252, 'text'=>'313', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '314'
- $floorItems2['314'] = i
- w.create(TkcText,40.5,203.5, 'text'=>'314', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '315'
- $floorItems2['315'] = i
- w.create(TkcText,59,157, 'text'=>'315', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '316B'
- $floorItems2['316B'] = i
- w.create(TkcText,95,215, 'text'=>'316B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '316A'
- $floorItems2['316A'] = i
- w.create(TkcText,95,191, 'text'=>'316A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198,
- 174,198,174,226,101,226,101,179,97,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '319'
- $floorItems2['319'] = i
- w.create(TkcText,141.5,209, 'text'=>'319', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '311'
- $floorItems2['311'] = i
- w.create(TkcText,29.5,361, 'text'=>'311', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '318'
- $floorItems2['318'] = i
- w.create(TkcText,132.5,180, 'text'=>'318', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '317'
- $floorItems2['317'] = i
- w.create(TkcText,136,149.5, 'text'=>'317', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '323'
- $floorItems2['323'] = i
- w.create(TkcText,290,207.5, 'text'=>'323', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '325'
- $floorItems2['325'] = i
- w.create(TkcText,290,235.5, 'text'=>'325', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '321'
- $floorItems2['321'] = i
- w.create(TkcText,243.5,157, 'text'=>'321', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '322'
- $floorItems2['322'] = i
- w.create(TkcText,293.5,163.5, 'text'=>'322', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = 'Pub Lift3'
- $floorItems2['Pub Lift3'] = i
- w.create(TkcText,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = 'Priv Lift3'
- $floorItems2['Priv Lift3'] = i
- w.create(TkcText,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '303'
- $floorItems2['303'] = i
- w.create(TkcText,373.5,292.5, 'text'=>'303', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,272,203,272,249,252,249,252,230,
- 244,230,244,221,252,221,252,203,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '324'
- $floorItems2['324'] = i
- w.create(TkcText,262,226, 'text'=>'324', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '304'
- $floorItems2['304'] = i
- w.create(TkcText,324,301.5, 'text'=>'304', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '301'
- $floorItems2['301'] = i
- w.create(TkcText,358,209, 'text'=>'301', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '327'
- $floorItems2['327'] = i
- w.create(TkcText,387,215.5, 'text'=>'327', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '326'
- $floorItems2['326'] = i
- w.create(TkcText,365.5,150, 'text'=>'326', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282,
- 375,274,397,274,397,248,339,248,339,242,308,242,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '302'
- $floorItems2['302'] = i
- w.create(TkcText,319.5,261, 'text'=>'302', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203,
- 272,193,263,180,242,180,175,180,175,169,156,169,
- 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
- 107,248,160,248,160,301,107,301,107,275,70,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
- $floorLabels2[i.id] = '306'
- $floorItems2['306'] = i
- w.create(TkcText,200.5,284.5, 'text'=>'306', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
- w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,399,129,399,311, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,258,202,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,350,283,350,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,251,231,243,231, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,243,220,251,220, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,243,250,243,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,155,197,155,190, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,110,192,110,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,155,192,110,192, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,176,197,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,69,280,69,274, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,276,69,276, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,69,262,69,226, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,228,69,228, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,179,75,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,69,179,69,214, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,220,90,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,204,90,202, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,203,100,203, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,187,90,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,90,227,176,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,100,179,100,227, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,100,179,87,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,96,179,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,162,169,96,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,173,169,176,169, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,182,179,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,176,129,176,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,195,179,226,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,224,133,224,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,264,179,264,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,238,179,264,179, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,207,273,193, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,235,273,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,224,273,219, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,193,307,193, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,222,307,222, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,384,247,376,247, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,247,340,224, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,376,247,376,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,307,250,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,376,283,366,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,376,283,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,399,275,376,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,341,275,320,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,341,283,350,283, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,298,275,298,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,308,275,298,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,243,322,243,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,243,275,284,275, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,258,322,226,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,212,370,212,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,214,322,177,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,163,370,163,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,165,322,129,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,84,322,117,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,71,322,64,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,115,322,115,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,66,322,66,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,52,322,21,322, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,331,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,21,331,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,96,133,21,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,176,129,96,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,315,133,176,133, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,315,129,399,129, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,399,311,350,311, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,350,329,258,329, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,258,322,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,60,370,258,370, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,60,370,60,391, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,0,391,0,331, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,307,250,307,242, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall'])
- w.create(TkcLine,258,250,243,250, 'fill'=>color, 'tags'=>['floor3','wall'])
-end
-
-# Below is the "main program" that creates the floorplan demonstration.
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($floor2_demo) && $floor2_demo
- $floor2_demo.destroy
- $floor2_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$floor2_demo = TkToplevel.new {|w|
- title("Floorplan Canvas Demonstration 2")
- iconname("Floorplan2")
- positionWindow(w)
- geometry('+20+20')
- minsize(100,100)
-}
-
-base_frame = TkFrame.new($floor2_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
- 'text'=>"ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ãƒ‡ã‚£ã‚¸ã‚¿ãƒ«ã‚¨ã‚¯ã‚¤ãƒƒãƒ—メント社ã®ã‚¦ã‚§ã‚¹ã‚¿ãƒ³ãƒªã‚µãƒ¼ãƒãƒ©ãƒœãƒ©ãƒˆãƒª (DECWRL) ã®é–“å–ã‚ŠãŒæ›¸ã‹ã‚ŒãŸã‚­ãƒ£ãƒ³ãƒã‚¹ widget ãŒå…¥ã£ã¦ã„ã¾ã™ã€‚ã“れ㯠3階建ã¦ã§ã€å¸¸ã«ãã®ã†ã¡ã®1階分ãŒé¸æŠžã€ã¤ã¾ã‚Šãã®é–“å–ã‚ŠãŒè¡¨ç¤ºã•ã‚Œã‚‹ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™ã€‚ã‚る階をé¸æŠžã™ã‚‹ã«ã¯ã€ãã®ä¸Šã§ãƒžã‚¦ã‚¹ã®å·¦ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。マウスãŒé¸æŠžã•ã‚Œã¦ã„る階ã®ä¸Šã‚’å‹•ãã¨ã€ãã®ä¸‹ã«ã‚る部屋ã®è‰²ãŒå¤‰ã‚ã‚Šã€éƒ¨å±‹ç•ªå·ãŒã€Œéƒ¨å±‹ç•ªå·:ã€ã‚¨ãƒ³ãƒˆãƒªã«è¡¨ç¤ºã•ã‚Œã¾ã™ã€‚ã¾ãŸã€ã‚¨ãƒ³ãƒˆãƒªã«éƒ¨å±‹ç•ªå·ã‚’書ãã¨ãã®éƒ¨å±‹ã®è‰²ãŒå¤‰ã‚ã‚Šã¾ã™ã€‚"){
- pack('side'=>'top')
-}
-
-# frame 生æˆ
-$floor2_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $floor2_demo
- $floor2_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'floor2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$floor2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# 変数設定
-$floorLabels2 = {}
-$floorItems2 = {}
-
-# canvas 設定
-if $tk_version =~ /^4\.[01]/
- $floor2_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken',
- 'highlightthickness'=>2)
- $floor2_canvas = TkCanvas.new($floor2_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
- 'highlightthickness'=>0) {|c|
- TkScrollbar.new(base_frame, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}){|hs|
- c.xscrollcommand(proc{|first,last| hs.set first,last})
- pack('side'=>'bottom', 'fill'=>'x')
- }
- TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}){|vs|
- c.yscrollcommand(proc{|first,last| vs.set first,last})
- pack('side'=>'right', 'fill'=>'y')
- }
- }
- $floor2_canvas_frame.pack('side'=>'top','fill'=>'both', 'expand'=>'yes')
- $floor2_canvas.pack('expand'=>'yes', 'fill'=>'both')
-
-else
- TkFrame.new(base_frame) {|f|
- pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes')
-
- h = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'horizontal')
- v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical')
-
- TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
- $floor2_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
- 'highlightthickness'=>0) {
- xscrollcommand(proc{|first,last| h.set first,last})
- yscrollcommand(proc{|first,last| v.set first,last})
- pack('expand'=>'yes', 'fill'=>'both')
- }
- grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- }
-
- v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
-
- TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
-
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
-
- v.command(proc{|*args| $floor2_canvas.yview(*args)})
- h.command(proc{|*args| $floor2_canvas.xview(*args)})
- }
-end
-
-# Create an entry for displaying and typing in current room.
-
-$currentRoom2 = TkVariable.new
-$floor2_entry = TkEntry.new($floor2_canvas, 'width'=>10, 'relief'=>'sunken',
- 'bd'=>2, 'textvariable'=>$currentRoom2)
-
-# Choose colors, then fill in the floorplan.
-
-$floor2_colors = {}
-if TkWinfo.depth($floor2_canvas) > 1
- $floor2_colors['bg1'] = '#a9c1da'
- $floor2_colors['outline1'] = '#77889a'
- $floor2_colors['bg2'] = '#9ab0c6'
- $floor2_colors['outline2'] = '#687786'
- $floor2_colors['bg3'] = '#8ba0b3'
- $floor2_colors['outline3'] = '#596673'
- $floor2_colors['offices'] = 'Black'
- $floor2_colors['active'] = '#c4d1df'
-else
- $floor2_colors['bg1'] = 'white'
- $floor2_colors['outline1'] = 'black'
- $floor2_colors['bg2'] = 'white'
- $floor2_colors['outline2'] = 'black'
- $floor2_colors['bg3'] = 'white'
- $floor2_colors['outline3'] = 'black'
- $floor2_colors['offices'] = 'Black'
- $floor2_colors['active'] = 'black'
-end
-
-$activeFloor2 = ''
-floorDisplay2 $floor2_canvas,3
-
-# Set up event bindings for canvas:
-
-$floor2_canvas.itembind('floor1', '1', proc{floorDisplay2 $floor2_canvas,1})
-$floor2_canvas.itembind('floor2', '1', proc{floorDisplay2 $floor2_canvas,2})
-$floor2_canvas.itembind('floor3', '1', proc{floorDisplay2 $floor2_canvas,3})
-$floor2_canvas.itembind('room', 'Enter', proc{newRoom2 $floor2_canvas})
-$floor2_canvas.itembind('room', 'Leave', proc{$currentRoom2.value = ''})
-$floor2_canvas.bind('2', proc{|x,y| $floor2_canvas.scan_mark x,y}, '%x %y')
-$floor2_canvas.bind('B2-Motion',
- proc{|x,y| $floor2_canvas.scan_dragto x,y}, '%x %y')
-$floor2_canvas.bind('Destroy', proc{$currentRoom2.unset})
-$currentRoom2.value = ''
-$currentRoom2.trace('w',proc{roomChanged2 $floor2_canvas})
diff --git a/ext/tk/sample/demos-jp/form.rb b/ext/tk/sample/demos-jp/form.rb
deleted file mode 100644
index 751852cbf7..0000000000
--- a/ext/tk/sample/demos-jp/form.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# form widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($form_demo) && $form_demo
- $form_demo.destroy
- $form_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$form_demo = TkToplevel.new {|w|
- title("Form Demonstration")
- iconname("form")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($form_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ç°¡å˜ãªãƒ•ã‚©ãƒ¼ãƒ å…¥åŠ›ç”¨ã«ãªã£ã¦ã„ã¦ã€ã•ã¾ã–ã¾ãªã‚¨ãƒ³ãƒˆãƒªã«å…¥åŠ›ãŒã§ãã¾ã™ã€‚タブã§ã‚¨ãƒ³ãƒˆãƒªã®åˆ‡æ›¿ãˆãŒã§ãã¾ã™ã€‚"
-}
-msg.pack('side'=>'top', 'fill'=>'x')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $form_demo
- $form_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'form'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# entry 生æˆ
-form_data = []
-(1..5).each{|i|
- f = TkFrame.new(base_frame, 'bd'=>2)
- e = TkEntry.new(f, 'relief'=>'sunken', 'width'=>40)
- l = TkLabel.new(f)
- e.pack('side'=>'right')
- l.pack('side'=>'left')
- form_data[i] = {'frame'=>f, 'entry'=>e, 'label'=>l}
-}
-
-# 文字列設定
-form_data[1]['label'].text('åå‰:')
-form_data[2]['label'].text('ä½æ‰€:')
-form_data[5]['label'].text('電話:')
-
-# pack
-(1..5).each{|i| form_data[i]['frame'].pack('side'=>'top', 'fill'=>'x')}
-
diff --git a/ext/tk/sample/demos-jp/goldberg.rb b/ext/tk/sample/demos-jp/goldberg.rb
deleted file mode 100644
index a5718dae6b..0000000000
--- a/ext/tk/sample/demos-jp/goldberg.rb
+++ /dev/null
@@ -1,2012 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# Ruby/Tk Goldverg demo (called by 'widget')
-#
-# Based on Tcl/Tk8.5a2 widget demos.
-# The following is the original comment of TkGoldberg.tcl.
-#
-#>>##+#################################################################
-#>>#
-#>># TkGoldberg.tcl
-#>># by Keith Vetter, March 13, 2003
-#>>#
-#>># "Man will always find a difficult means to perform a simple task"
-#>># Rube Goldberg
-#>>#
-#>># Reproduced here with permission.
-#>>#
-#>>##+#################################################################
-#>>#
-#>># Keith Vetter 2003-03-21: this started out as a simple little program
-#>># but was so much fun that it grew and grew. So I apologize about the
-#>># size but I just couldn't resist sharing it.
-#>>#
-#>># This is a whizzlet that does a Rube Goldberg type animation, the
-#>># design of which comes from an New Years e-card from IncrediMail.
-#>># That version had nice sound effects which I eschewed. On the other
-#>># hand, that version was in black and white (actually dark blue and
-#>># light blue) and this one is fully colorized.
-#>>#
-#>># One thing I learned from this project is that drawing filled complex
-#>># objects on a canvas is really hard. More often than not I had to
-#>># draw each item twice--once with the desired fill color but no
-#>># outline, and once with no fill but with the outline. Another trick
-#>># is erasing by drawing with the background color. Having a flood fill
-#>># command would have been extremely helpful.
-#>>#
-#>># Two wiki pages were extremely helpful: Drawing rounded rectangles
-#>># which I generalized into Drawing rounded polygons, and regular
-#>># polygons which allowed me to convert ovals and arcs into polygons
-#>># which could then be rotated (see Canvas Rotation). I also wrote
-#>># Named Colors to aid in the color selection.
-#>>#
-#>># I could comment on the code, but it's just 26 state machines with
-#>># lots of canvas create and move calls.
-
-if defined?($goldberg_demo) && $goldberg_demo
- $goldberg_demo.destroy
- $goldberg_demo = nil
-end
-
-# demo toplevel widget
-$goldberg_demo = TkToplevel.new {|w|
- title("Tk Goldberg (demonstration)")
- iconname("goldberg")
-# positionWindow(w)
-}
-
-base_frame = TkFrame.new($goldberg_demo).pack(:fill=>:both, :expand=>true)
-
-=begin
-# label
-msg = TkLabel.new($goldberg_demo) {
- font 'Arial 10'
- wraplength '4i'
- justify 'left'
- text "ã“ã‚Œã¯ã€ã‚ãªãŸãŒè‡ªåˆ†ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ã„ã‹ã«å…¥ã‚Šçµ„ã‚“ã ã‚‚ã®ã«ã§ãã‚‹ã‹ã‚’示ã™ã¨ã„ã†ã ã‘ã®ãŸã‚ã®ãƒ‡ãƒ¢ã§ã™ã€‚ボールをクリックã™ã‚Œã°ç‰©ãŒå‹•ã始ã‚ã¾ã™ï¼\n\n\"Man will always find a difficult means to perform a simple task\"\n - Rube Goldberg"
-}
-msg.pack('side'=>'top')
-=end
-
-=begin
-# frame
-TkFrame.new($goldberg_demo) {|frame|
- TkButton.new(frame) {
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $goldberg_demo
- $goldberg_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'goldberg'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-=end
-
-#########################################
-
-class TkGoldberg_Demo
- def initialize(parent)
- @parent = parent
-
- @S = {}
- @S['title'] = 'Tk Goldberg'
- @S['speed'] = TkVariable.new(5)
- @S['cnt'] = TkVariable.new(0)
- # @S['message'] = TkVariable.new("\\nWelcome\\nto\\nRuby/Tk")
- @S['message'] = TkVariable.new("\\n よã†ã“ãï¼\\nRuby/Tk\\nã®\\n世界ã¸")
- @S['pause'] = TkVariable.new
- @S['details'] = TkVariable.new(true)
-
- @S['mode'] = TkVariable.new(:MSTART, :symbol)
- # :MSTART, :MGO, :MPAUSE, :MSSTEP, :MBSTEP, :MDONE, :MDEBUG
-
- # 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- @speed = [1, 10, 20, 50, 80, 100, 150, 200, 300, 400, 500]
-
- # colors
- @C = {}
- @C['fg'] = 'black'
- # @C['bg'] = 'gray75'
- @C['bg'] = 'cornflowerblue'
-
- @C['0'] = 'white'; @C['1a'] = 'darkgreen'; @C['1b'] = 'yellow'
- @C['2'] = 'red'; @C['3a'] = 'green'; @C['3b'] = 'darkblue'
- @C['4'] = @C['fg']; @C['5a'] = 'brown'; @C['5b'] = 'white'
- @C['6'] = 'magenta'; @C['7'] = 'green'; @C['8'] = @C['fg']
- @C['9'] = 'blue4'; @C['10a'] = 'white'; @C['10b'] = 'cyan'
- @C['11a'] = 'yellow'; @C['11b'] = 'mediumblue'; @C['12'] = 'tan2'
- @C['13a'] = 'yellow'; @C['13b'] = 'red'; @C['14'] = 'white'
- @C['15a'] = 'green'; @C['15b'] = 'yellow'; @C['16'] = 'gray65'
- @C['17'] = '#A65353'; @C['18'] = @C['fg']; @C['19'] = 'gray50'
- @C['20'] = 'cyan'; @C['21'] = 'gray65'; @C['22'] = @C['20']
- @C['23a'] = 'blue'; @C['23b'] = 'red'; @C['23c'] = 'yellow'
- @C['24a'] = 'red'; @C['24b'] = 'white';
-
- @STEP = TkVariable.new_hash
- @STEP.default_value_type = :numeric
-
- @XY = {}
-
- @XY6 = {
- '-1'=>[366, 207], '-2'=>[349, 204], '-3'=>[359, 193], '-4'=>[375, 192],
- '-5'=>[340, 190], '-6'=>[349, 177], '-7'=>[366, 177], '-8'=>[380, 176],
- '-9'=>[332, 172], '-10'=>[342, 161], '-11'=>[357, 164],
- '-12'=>[372, 163], '-13'=>[381, 149], '-14'=>[364, 151],
- '-15'=>[349, 146], '-16'=>[333, 148], '0'=>[357, 219],
- '1'=>[359, 261], '2'=>[359, 291], '3'=>[359, 318], '4'=>[361, 324],
- '5'=>[365, 329], '6'=>[367, 334], '7'=>[367, 340], '8'=>[366, 346],
- '9'=>[364, 350], '10'=>[361, 355], '11'=>[359, 370], '12'=>[359, 391],
- '13,0'=>[360, 456], '13,1'=>[376, 456], '13,2'=>[346, 456],
- '13,3'=>[330, 456], '13,4'=>[353, 444], '13,5'=>[368, 443],
- '13,6'=>[339, 442], '13,7'=>[359, 431], '13,8'=>[380, 437],
- '13,9'=>[345, 428], '13,10'=>[328, 434], '13,11'=>[373, 424],
- '13,12'=>[331, 420], '13,13'=>[360, 417], '13,14'=>[345, 412],
- '13,15'=>[376, 410], '13,16'=>[360, 403]
- }
-
- @timer = TkTimer.new(@speed[@S['speed'].numeric]){|timer|
- timer.set_interval(go)
- }
-
- do_display
- reset
-
- # Start everything going
- @timer.start
- end
-
- def do_display()
- @ctrl = TkFrame.new(@parent, :relief=>:ridge, :bd=>2, :padx=>5, :pady=>5)
- @screen = TkFrame.new(@parent, :bd=>2,
- :relief=>:raised).pack(:side=>:left, :fill=>:both,
- :expand=>true)
-
- @canvas = TkCanvas.new(@parent, :width=>850, :height=>700,
- :bg=>@C['bg'], :highlightthickness=>0){
- scrollregion([0, 0, 1000, 1000]) # Kludge to move everything up
- yview_moveto(0.05)
- }.pack(:in=>@screen, :side=>:top, :fill=>:both, :expand=>true)
-
- @canvas.bind('3'){ @pause.invoke }
- @canvas.bind('Destroy'){ @timer.stop }
-
- do_ctrl_frame
- do_detail_frame
-
- # msg = TkLabel.new(@parent, :bg=>@C['bg'], :fg=>'white') {
- msg = Tk::Label.new(@parent, :bg=>@C['bg'], :fg=>'white') {
- font 'Arial 10'
- wraplength 600
- justify 'left'
- text "ã“ã‚Œã¯ã€ã‚ãªãŸãŒè‡ªåˆ†ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ã„ã‹ã«å…¥ã‚Šçµ„ã‚“ã ã‚‚ã®ã«ã§ãã‚‹ã‹ã‚’示ã™ã¨ã„ã†ã ã‘ã®ãŸã‚ã®ãƒ‡ãƒ¢ã§ã™ã€‚ボールをクリックã™ã‚Œã°ç‰©ãŒå‹•ã始ã‚ã¾ã™ï¼\n\"Man will always find a difficult means to perform a simple task\" - Rube Goldberg"
- }
- msg.place(:in=>@canvas, :relx=>0, :rely=>0, :anchor=>:nw)
-
- frame = TkFrame.new(@parent, :bg=>@C['bg'])
-
- # TkButton.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) {
- Tk::Button.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) {
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $goldberg_demo
- $goldberg_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left')
-
- # TkButton.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) {
- Tk::Button.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) {
- text 'コードå‚ç…§'
- command proc{showCode 'goldberg'}
- }.pack('side'=>'left', 'padx'=>5)
-
- # @show = TkButton.new(frame, :text=>'>>', :command=>proc{show_ctrl},
- @show = Tk::Button.new(frame, :text=>'>>', :command=>proc{show_ctrl},
- :bg=>@C['bg'], :activebackground=>@C['bg'])
- @show.pack('side'=>'left')
- frame.place(:in=>@canvas, :relx=>1, :rely=>0, :anchor=>:ne)
-
- Tk.update
- end
-
- def do_ctrl_frame
- @start = Tk::Button.new(@parent, :text=>'Start', :bd=>6,
- :command=>proc{do_button(0)})
- if font = @start['font']
- @start.font(font.weight('bold'))
- end
-
- @pause = TkCheckbutton.new(@parent, :text=>'Pause', :font=>font,
- :command=>proc{do_button(1)}, :relief=>:raised,
- :variable=>@S['pause'])
-
- @step = TkButton.new(@parent, :text=>'Single Step', :font=>font,
- :command=>proc{do_button(2)})
- @bstep = TkButton.new(@parent, :text=>'Big Step', :font=>font,
- :command=>proc{do_button(4)})
- @reset = TkButton.new(@parent, :text=>'Reset', :font=>font,
- :command=>proc{do_button(3)})
-
- @details = TkFrame.new(@parent, :bd=>2, :relief=>:ridge)
- @detail = TkCheckbutton.new(@parent, :text=>'Details', :font=>font,
- :relief=>:raised, :variable=>@S['details'])
-
- @msg_entry = TkEntry.new(@parent, :textvariable=>@S['message'],
- :justify=>:center)
- @speed_scale = TkScale.new(@parent, :orient=>:horizontal,
- :from=>1, :to=>10, :font=>font,
- :variable=>@S['speed'], :bd=>2,
- :relief=>:ridge, :showvalue=>false)
- @about = TkButton.new(@parent, :text=>'About',
- :command=>proc{about}, :font=>font)
-
- Tk.grid(@start, :in=>@ctrl, :row=>0, :sticky=>:ew)
- @ctrl.grid_rowconfigure(1, :minsize=>10)
- Tk.grid(@pause, :in=>@ctrl, :row=>2, :sticky=>:ew)
- Tk.grid(@step, :in=>@ctrl, :sticky=>:ew)
- Tk.grid(@bstep, :in=>@ctrl, :sticky=>:ew)
- Tk.grid(@reset, :in=>@ctrl, :sticky=>:ew)
- @ctrl.grid_rowconfigure(10, :minsize=>20)
- Tk.grid(@details, :in=>@ctrl, :row=>11, :sticky=>:ew)
- Tk.grid(@detail, :in=>@details, :row=>0, :sticky=>:ew)
- @ctrl.grid_rowconfigure(50, :weight=>1)
-
- @S['mode'].trace('w', proc{|*args| active_GUI(*args)})
- @S['details'].trace('w', proc{|*args| active_GUI(*args)})
- @S['speed'].trace('w', proc{|*args| active_GUI(*args)})
-
- Tk.grid(@msg_entry, :in=>@ctrl, :row=>98, :sticky=>:ew, :pady=>5)
- Tk.grid(@speed_scale, :in=>@ctrl, :row=>99, :sticky=>:ew)
- Tk.grid(@about, :in=>@ctrl, :row=>100, :sticky=>:ew)
-
- @reset.bind('3'){@S['mode'].value = -1} # Debugging
- end
-
- def do_detail_frame
- @f_details = TkFrame.new(@details)
-
- @label = TkLabel.new(@f_details, :textvariable=>@S['cnt'],
- :bd=>1, :relief=>:solid, :bg=>'white')
- Tk.grid(@label, '-', '-', '-', :sticky=>:ew, :row=>0)
-
- idx = 1
- loop {
- break unless respond_to?("move#{idx}")
- l = TkLabel.new(@f_details, :text=>idx, :anchor=>:e,
- :width=>2, :bd=>1, :relief=>:solid, :bg=>'white')
- @STEP[idx] = 0
- ll = TkLabel.new(@f_details, :textvariable=>@STEP.ref(idx),
- :width=>5, :bd=>1, :relief=>:solid, :bg=>'white')
- row = (idx + 1)/2
- col = ((idx + 1) & 1) * 2
- Tk.grid(l, :sticky=>:ew, :row=>row, :column=>col)
- Tk.grid(ll, :sticky=>:ew, :row=>row, :column=>(col + 1))
- idx += 1
- }
- @f_details.grid_columnconfigure(1, :weight=>1)
- end
-
- def show_ctrl
- if @ctrl.winfo_mapped?
- @ctrl.pack_forget
- @show.text('>>')
- else
- @ctrl.pack(:side=>:right, :fill=>:both, :ipady=>5)
- @show.text('<<')
- end
- end
-
- def draw_all
- reset_step
- @canvas.delete(:all)
- idx = 0
- loop{
- m = "draw#{idx}"
- break unless respond_to?(m)
- send(m)
- idx += 1
- }
- end
-
- def active_GUI(var1, var2, op)
- st = {false=>:disabled, true=>:normal}
-
- m = @S['mode'].to_sym
- @S['pause'].value = (m == :MPAUSE)
- @start.state(st[m != :MGO])
- @pause.state(st[m != :MSTART && m != :MDONE])
- @step.state(st[m != :MGO && m != :MDONE])
- @bstep.state(st[m != :MGO && m != :MDONE])
- @reset.state(st[m != :MSTART])
-
- if @S['details'].bool
- Tk.grid(@f_details, :in=>@details, :row=>2, :sticky=>:ew)
- else
- Tk.grid_forget(@f_details)
- end
- @speed_scale.label("Speed: #{@S['speed'].value}")
- end
-
- def start
- @S['mode'].value = :MGO
- end
-
- def do_button(what)
- case what
- when 0 # Start
- reset if @S['mode'].to_sym == :MDONE
- @S['mode'].value = :MGO
-
- when 1 # Pause
- @S['mode'].value = ((@S['pause'].bool)? :MPAUSE: :MGO)
-
- when 2 # Step
- @S['mode'].value = :MSSTEP
-
- when 3 # Reset
- reset
-
- when 4 # Big step
- @S['mode'].value = :MBSTEP
- end
- end
-
- def go(who = nil)
- now = Tk::Clock.clicks(:milliseconds)
- if who # Start here for debugging
- @S['active'] = [who]
- @S['mode'].value = :MGO
- end
- return if @S['mode'].to_sym == :MDEBUG # Debugging
- # If not paused, do the next move
- n = next_step if @S['mode'].to_sym != :MPAUSE
- @S['mode'].value = :MPAUSE if @S['mode'].to_sym == :MSSTEP # Single step
- @S['mode'].value = :MSSTEP if @S['mode'].to_sym == :MBSTEP && n # big step
- elapsed = Tk::Clock.clicks(:milliseconds) - now
- delay = @speed[@S['speed'].to_i] - elapsed
- delay = 1 if delay <= 0
- return delay
- end
-
- def next_step
- retval = false # Return value
-
- if @S['mode'].to_sym != :MSTART && @S['mode'].to_sym != :MDONE
- @S['cnt'].numeric += 1
- end
- alive = []
- @S['active'].each{|who|
- who = who.to_i
- n = send("move#{who}")
- if (n & 1).nonzero? # This guy still alive
- alive << who
- end
- if (n & 2).nonzero? # Next guy is active
- alive << (who + 1)
- retval = true
- end
- if (n & 4).nonzero? # End of puzzle flag
- @S['mode'].value = :MDONE # Done mode
- @S['active'] = [] # No more animation
- return true
- end
- }
- @S['active'] = alive
- return retval
- end
-
- def about
- msg = "Ruby/Tk Version ::\nby Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)\n\n"
- msg += "Original Version ::\n"
- msg += "#{@S['title']}\nby Keith Vetter, March 2003\n(Reproduced by kind permission of the author)\n\n"
- msg += "Man will always find a difficult means to perform a simple task"
- msg += "\nRube Goldberg"
- Tk.messageBox(:message=>msg, :title=>'About')
- end
-
- ################################################################
- #
- # All the drawing and moving routines
- #
-
- # START HERE! banner
- def draw0
- color = @C['0']
- TkcText.new(@canvas,
- # [579, 119], :text=>'START HERE!',
- [558, 119], :text=>'ã“ã“ã‹ã‚‰ã‚¹ã‚¿ãƒ¼ãƒˆï¼',
- :fill=>color, :anchor=>:w,
- :tag=>'I0', :font=>['Times Roman', 12, :italic, :bold])
- TkcLine.new(@canvas, [719, 119, 763, 119], :tag=>'I0', :fill=>color,
- :width=>5, :arrow=>:last, :arrowshape=>[18, 18, 5])
- @canvas.itembind('I0', '1'){ start }
- end
-
- def move0(step = nil)
- step = get_step(0, step)
-
- if @S['mode'].to_sym != :MSTART # Start the ball rolling
- move_abs('I0', [-100, -100]) # Hide the banner
- return 2
- end
-
- pos = [
- [673, 119], [678, 119], [683, 119], [688, 119],
- [693, 119], [688, 119], [683, 119], [678, 119]
- ]
- step = step % pos.length
- move_abs('I0', pos[step])
- return 1
- end
-
- # Dropping ball
- def draw1
- color = @C['1a']
- color2 = @C['1b']
- TkcPolygon.new(@canvas,
- [ 844, 133, 800, 133, 800, 346, 820, 346,
- 820, 168, 844, 168, 844, 133 ],
- :width=>3, :fill=>color, :outline=>'')
- TkcPolygon.new(@canvas,
- [ 771, 133, 685, 133, 685, 168, 751, 168,
- 751, 346, 771, 346, 771, 133 ],
- :width=>3, :fill=>color, :outline=>'')
- TkcOval.new(@canvas, box(812, 122, 9),
- :tag=>'I1', :fill=>color2, :outline=>'')
-
- @canvas.itembind('I1', '1'){ start }
- end
-
- def move1(step = nil)
- step = get_step(1, step)
- pos = [
- [807, 122], [802, 122], [797, 123], [793, 124], [789, 129], [785, 153],
- [785, 203], [785, 278, :x], [785, 367], [810, 392], [816, 438],
- [821, 503], [824, 585, :y], [838, 587], [848, 593], [857, 601],
- [-100, -100]
- ]
- return 0 if step >= pos.length
- where = pos[step]
- move_abs('I1', where)
- move15a if where[2] == :y
- return 3 if where[2] == :x
- return 1
- end
-
- # Lighting the match
- def draw2
- color = @C['2']
-
- # Fulcrum
- TkcPolygon.new(@canvas, [750, 369, 740, 392, 760, 392],
- :fill=>@C['fg'], :outline=>@C['fg'])
-
- # Strike box
- TkcRectangle.new(@canvas, [628, 335, 660, 383],
- :fill=>'', :outline=>@C['fg'])
- (0..2).each{|y|
- yy = 335 + y*16
- TkcBitmap.new(@canvas, [628, yy], :bitmap=>'gray25',
- :anchor=>:nw, :foreground=>@C['fg'])
- TkcBitmap.new(@canvas, [644, yy], :bitmap=>'gray25',
- :anchor=>:nw, :foreground=>@C['fg'])
- }
-
- # Lever
- TkcLine.new(@canvas, [702, 366, 798, 366],
- :fill=>@C['fg'], :width=>6, :tag=>'I2_0')
-
- # R strap
- TkcLine.new(@canvas, [712, 363, 712, 355],
- :fill=>@C['fg'], :width=>3, :tag=>'I2_1')
-
- # L strap
- TkcLine.new(@canvas, [705, 363, 705, 355],
- :fill=>@C['fg'], :width=>3, :tag=>'I2_2')
-
- # Match stick
- TkcLine.new(@canvas, [679, 356, 679, 360, 717, 360, 717, 356, 679, 356],
- :fill=>@C['fg'], :width=>3, :tag=>'I2_3')
-
- # Match head
- TkcPolygon.new(@canvas,
- [ 671, 352, 677.4, 353.9, 680, 358.5, 677.4, 363.1,
- 671, 365, 664.6, 363.1, 662, 358.5, 664.6, 353.9 ],
- :fill=>color, :outline=>color, :tag=>'I2_4')
- end
-
- def move2(step = nil)
- step = get_step(2, step)
-
- stages = [0, 0, 1, 2, 0, 2, 1, 0, 1, 2, 0, 2, 1]
- xy = []
- xy[0] = [
- 686, 333, 692, 323, 682, 316, 674, 309, 671, 295, 668, 307,
- 662, 318, 662, 328, 671, 336
- ]
- xy[1] = [
- 687, 331, 698, 322, 703, 295, 680, 320, 668, 297, 663, 311,
- 661, 327, 671, 335
- ]
- xy[2] = [
- 686, 331, 704, 322, 688, 300, 678, 283, 678, 283, 674, 298,
- 666, 309, 660, 324, 672, 336
- ]
-
- if step >= stages.length
- @canvas.delete('I2')
- return 0
- end
-
- if step == 0 # Rotate the match
- beta = 20
-
- ox, oy = anchor('I2_0', :s) # Where to pivot
-
- i = 0
- until @canvas.find_withtag("I2_#{i}").empty?
- rotate_item("I2_#{i}", ox, oy, beta)
- i += 1
- end
-
- # For the flame
- TkcPolygon.new(@canvas, [], :tag=>'I2', :smooth=>true, :fill=>@C['2'])
-
- return 1
- end
- @canvas.coords('I2', xy[stages[step]])
- return ((step == 7)? 3: 1)
- end
-
- # Weight and pulleys
- def draw3
- color = @C['3a']
- color2 = @C['3b']
-
- xy = [ [602, 296], [577, 174], [518, 174] ]
- xy.each{|x, y| # 3 Pulleys
- TkcOval.new(@canvas, box(x, y, 13),
- :fill=>color, :outline=>@C['fg'], :width=>3)
- TkcOval.new(@canvas, box(x, y, 2), :fill=>@C['fg'], :outline=>@C['fg'])
- }
-
- # Wall to flame
- TkcLine.new(@canvas, [750, 309, 670, 309], :tag=>'I3_s',
- :width=>3, :fill=>@C['fg'], :smooth=>true)
-
- # Flame to pulley 1
- TkcLine.new(@canvas, [670, 309, 650, 309], :tag=>'I3_0',
- :width=>3, :fill=>@C['fg'], :smooth=>true)
- TkcLine.new(@canvas, [650, 309, 600, 309], :tag=>'I3_1',
- :width=>3, :fill=>@C['fg'], :smooth=>true)
-
- # Pulley 1 half way to 2
- TkcLine.new(@canvas, [589, 296, 589, 235], :tag=>'I3_2',
- :width=>3, :fill=>@C['fg'])
-
- # Pulley 1 other half to 2
- TkcLine.new(@canvas, [589, 235, 589, 174], :width=>3, :fill=>@C['fg'])
-
- # Across the top
- TkcLine.new(@canvas, [577, 161, 518, 161], :width=>3, :fill=>@C['fg'])
-
- # Down to weight
- TkcLine.new(@canvas, [505, 174, 505, 205], :tag=>'I3_w',
- :width=>3, :fill=>@C['fg'])
-
- # Draw the weight as 2 circles, two rectangles and 1 rounded rectangle
- x1, y1, x2, y2 = [515, 207, 495, 207]
- TkcOval.new(@canvas, box(x1, y1, 6),
- :tag=>'I3_', :fill=>color2, :outline=>color2)
- TkcOval.new(@canvas, box(x2, y2, 6),
- :tag=>'I3_', :fill=>color2, :outline=>color2)
- TkcRectangle.new(@canvas, x1, y1 - 6, x2, y2 + 6,
- :tag=>'I3_', :fill=>color2, :outline=>color2)
-
- TkcPolygon.new(@canvas, round_rect([492, 220, 518, 263], 15),
- :smooth=>true, :tag=>'I3_', :fill=>color2, :outline=>color2)
-
- TkcLine.new(@canvas, [500, 217, 511, 217],
- :tag=>'I3_', :fill=>color2, :width=>10)
-
- # Bottom weight target
- TkcLine.new(@canvas, [502, 393, 522, 393, 522, 465],
- :tag=>'I3__', :fill=>@C['fg'], :joinstyle=>:miter, :width=>10)
- end
-
- def move3(step = nil)
- step = get_step(3, step)
-
- pos = [ [505, 247], [505, 297], [505, 386.5], [505, 386.5] ]
- rope = []
- rope[0] = [750, 309, 729, 301, 711, 324, 690, 300]
- rope[1] = [750, 309, 737, 292, 736, 335, 717, 315, 712, 320]
- rope[2] = [750, 309, 737, 309, 740, 343, 736, 351, 725, 340]
- rope[3] = [750, 309, 738, 321, 746, 345, 742, 356]
-
- return 0 if step >= pos.length
-
- @canvas.delete("I3_#{step}") # Delete part of the rope
- move_abs('I3_', pos[step]) # Move weight down
- @canvas.coords('I3_s', rope[step]) # Flapping rope end
- @canvas.coords('I3_w', [505, 174].concat(pos[step]))
- if step == 2
- @canvas.move('I3__', 0, 30)
- return 2
- end
- return 1
- end
-
- # Cage and door
- def draw4
- color = @C['4']
- x0, y0, x1, y1 = [527, 356, 611, 464]
-
- # Horizontal bars
- y0.step(y1, 12){|y|
- TkcLine.new(@canvas, [x0, y, x1, y], :fill=>color, :width=>1)
- }
-
- # Vertical bars
- x0.step(x1, 12){|x|
- TkcLine.new(@canvas, [x, y0, x, y1], :fill=>color, :width=>1)
- }
-
- # Swing gate
- TkcLine.new(@canvas, [518, 464, 518, 428],
- :tag=>'I4', :fill=>color, :width=>1)
- end
-
- def move4(step = nil)
- step = get_step(4, step)
-
- angles = [-10, -20, -30, -30]
- return 0 if step >= angles.length
-
- rotate_item('I4', 518, 464, angles[step])
- @canvas.raise('I4')
-
- return((step == 3)? 3: 1)
- end
-
- # Mouse
- def draw5
- color = @C['5a']
- color2 = @C['5b']
-
- xy = [377, 248, 410, 248, 410, 465, 518, 465] # Mouse course
- xy.concat [518, 428, 451, 428, 451, 212, 377, 212]
-
- TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'], :width=>3)
-
- xy = [
- 534.5, 445.5, 541, 440, 552, 436, 560, 436, 569, 440, 574, 446,
- 575, 452, 574, 454, 566, 456, 554, 456, 545, 456, 537, 454, 530, 452
- ]
- TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_0'], :fill=>color)
-
- TkcLine.new(@canvas, [573, 452, 592, 458, 601, 460, 613, 456], # Tail
- :tag=>['I5', 'I5_1'], :fill=>color, :smooth=>true, :width=>3)
-
- xy = box(540, 446, 2) # Eye
- xy = [540, 444, 541, 445, 541, 447, 540, 448, 538, 447, 538, 445]
- TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_2'], :fill=>@C['bg'],
- :outline=>'', :smooth=>true)
-
- xy = [538, 454, 535, 461] # Front leg
- TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_3'], :fill=>color, :width=>2)
-
- xy = [566, 455, 569, 462] # Back leg
- TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_4'], :fill=>color, :width=>2)
-
- xy = [544, 455, 545, 460] # 2nd front leg
- TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_5'], :fill=>color, :width=>2)
-
- xy = [560, 455, 558, 460] # 2nd back leg
- TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_6'], :fill=>color, :width=>2)
- end
-
- def move5(step = nil)
- step = get_step(5, step)
-
- pos = [
- [553, 452], [533, 452], [513, 452], [493, 452], [473, 452],
- [463, 442, 30], [445.5, 441.5, 30], [425.5, 434.5, 30], [422, 414],
- [422, 394], [422, 374], [422, 354], [422, 334], [422, 314], [422, 294],
- [422, 274, -30], [422, 260.5, -30, :x], [422.5, 248.5, -28], [425, 237]
- ]
-
- return 0 if step >= pos.length
-
- x, y, beta, nxt = pos[step]
- move_abs('I5', [x, y])
- if beta
- ox, oy = centroid('I5_0')
- (0..6).each{|id| rotate_item("I5_#{id}", ox, oy, beta) }
- end
- return 3 if nxt == :x
- return 1
- end
-
- # Dropping gumballs
- def draw6
- color = @C['6']
- xy = [324, 130, 391, 204] # Ball holder
- xy = round_rect(xy, 10)
- TkcPolygon.new(@canvas, xy, :smooth=>true,
- :outline=>@C['fg'], :width=>3, :fill=>color)
- xy = [339, 204, 376, 253] # Below the ball holder
- TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
- :fill=>color, :tag=>'I6c')
- xy = box(346, 339, 28)
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') # Roter
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
- :start=>80, :extent=>205)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
- :start=>-41, :extent=>85)
-
- xy = box(346, 339, 15) # Center of rotor
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['fg'], :tag=>'I6m')
- xy = [352, 312, 352, 254, 368, 254, 368, 322] # Top drop to rotor
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'')
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2)
-
- xy = [353, 240, 367, 300] # Poke bottom hole
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'')
- xy = [341, 190, 375, 210] # Poke another hole
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'')
-
- xy = [
- 368, 356, 368, 403, 389, 403, 389, 464, 320, 464, 320, 403,
- 352, 403, 352, 366
- ]
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'',
- :width=>2) # Below rotor
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2)
- xy = box(275, 342, 7) # On/off rotor
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['fg'])
- xy = [276, 334, 342, 325] # Fan belt top
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = [276, 349, 342, 353] # Fan belt bottom
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
-
- xy = [337, 212, 337, 247] # What the mouse pushes
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I6_')
- xy = [392, 212, 392, 247]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I6_')
- xy = [337, 230, 392, 230]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>7, :tag=>'I6_')
-
- who = -1 # All the balls
- colors = %w(red cyan orange green blue darkblue)
- colors *= 3
-
- (0..16).each{|i|
- loc = -i
- color = colors[i]
- x, y = @XY6["#{loc}"]
- TkcOval.new(@canvas, box(x, y, 5),
- :fill=>color, :outline=>color, :tag=>"I6_b#{i}")
- }
- draw6a(12) # The wheel
- end
-
- def draw6a(beta)
- @canvas.delete('I6_0')
- ox, oy = [346, 339]
- (0..3).each{|i|
- b = beta + i * 45
- x, y = rotate_c(28, 0, 0, 0, b)
- xy = [ox + x, oy + y, ox - x, oy - y]
- TkcLine.new(@canvas, xy, :tag=>'I6_0', :fill=>@C['fg'], :width=>2)
- }
- end
-
- def move6(step = nil)
- step = get_step(6, step)
-
- return 0 if step > 62
-
- if step < 2 # Open gate for balls to drop
- @canvas.move('I6_', -7, 0)
- if step == 1 # Poke a hole
- xy = [348, 226, 365, 240]
- TkcRectangle.new(@canvas, xy, :fill=>@canvas.itemcget('I6c', :fill),
- :outline=>'')
- end
- return 1
- end
-
- s = step - 1 # Do the gumball drop dance
- (0..(((s - 1)/3).to_i)).each{|i|
- tag = "I6_b#{i}"
- break if @canvas.find_withtag(tag).empty?
- loc = s - 3*i
-
- if @XY6["#{loc},#{i}"]
- move_abs(tag, @XY6["#{loc},#{i}"])
- elsif @XY6["#{loc}"]
- move_abs(tag, @XY6["#{loc}"])
- end
- }
- if s % 3 == 1
- first = (s + 2)/3
- i = first
- loop {
- tag = "I6_b#{i}"
- break if @canvas.find_withtag(tag).empty?
- loc = first - i
- move_abs(tag, @XY6["#{loc}"])
- i += 1
- }
- end
- if s >= 3 # Rotate the motor
- idx = s % 3
- draw6a(12 + s * 15)
- end
- return((s == 3)? 3 : 1)
- end
-
- # On/off switch
- def draw7
- color = @C['7']
- xy = [198, 306, 277, 374] # Box
- TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>2,
- :fill=>color, :tag=>'I7z')
- @canvas.lower('I7z')
- xy = [275, 343, 230, 349]
- TkcLine.new(@canvas, xy, :tag=>'I7', :fill=>@C['fg'], :arrow=>:last,
- :arrowshape=>[23, 23, 8], :width=>6)
- xy = [225, 324] # On button
- x, y = xy
- TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg'])
- xy = [218, 323] # On text
- font = ['Times Roman', 8]
- TkcText.new(@canvas, xy, :text=>'on', :anchor=>:e,
- :fill=>@C['fg'], :font=>font)
- xy = [225, 350] # Off button
- x, y = xy
- TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg'])
- xy = [218, 349] # Off text
- TkcText.new(@canvas, xy, :text=>'off', :anchor=>:e,
- :fill=>@C['fg'], :font=>font)
- end
-
- def move7(step = nil)
- step = get_step(7, step)
-
- numsteps = 30
- return 0 if step > numsteps
- beta = 30.0 / numsteps
- rotate_item('I7', 275, 343, beta)
-
- return((step == numsteps)? 3: 1)
- end
-
- # Electricity to the fan
- def draw8
- sine([271, 248, 271, 306], 5, 8, :tag=>'I8_s', :fill=>@C['8'], :width=>3)
- end
-
- def move8(step = nil)
- step = get_step(8, step)
-
- return 0 if step > 3
- if step == 0
- sparkle(anchor('I8_s', :s), 'I8')
- return 1
- elsif step == 1
- move_abs('I8', anchor('I8_s', :c))
- elsif step == 2
- move_abs('I8', anchor('I8_s', :n))
- else
- @canvas.delete('I8')
- end
- return((step == 2)? 3: 1)
- end
-
- # Fan
- def draw9
- color = @C['9']
- xy = [266, 194, 310, 220]
- TkcOval.new(@canvas, xy, :outline=>color, :fill=>color)
- xy = [280, 209, 296, 248]
- TkcOval.new(@canvas, xy, :outline=>color, :fill=>color)
- xy = [
- 288, 249, 252, 249, 260, 240, 280, 234,
- 296, 234, 316, 240, 324, 249, 288, 249
- ]
- TkcPolygon.new(@canvas, xy, :fill=>color, :smooth=>true)
-
- xy = [248, 205, 265, 214, 264, 205, 265, 196] # Spinner
- TkcPolygon.new(@canvas, xy, :fill=>color)
-
- xy = [255, 206, 265, 234] # Fan blades
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
- :width=>3, :tag=>'I9_0')
- xy = [255, 176, 265, 204]
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
- :width=>3, :tag=>'I9_0')
- xy = [255, 206, 265, 220]
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
- :width=>1, :tag=>'I9_1')
- xy = [255, 190, 265, 204]
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
- :width=>1, :tag=>'I9_1')
- end
-
- def move9(step = nil)
- step = get_step(9, step)
-
- if (step & 1).nonzero?
- @canvas.itemconfigure('I9_0', :width=>4)
- @canvas.itemconfigure('I9_1', :width=>1)
- @canvas.lower('I9_1', 'I9_0')
- else
- @canvas.itemconfigure('I9_0', :width=>1)
- @canvas.itemconfigure('I9_1', :width=>4)
- @canvas.lower('I9_0', 'I9_1')
- end
- return 3 if step == 0
- return 1
- end
-
- # Boat
- def draw10
- color = @C['10a']
- color2 = @C['10b']
- xy = [191, 230, 233, 230, 233, 178, 191, 178] # Sail
- TkcPolygon.new(@canvas, xy, :fill=>color, :width=>3, :outline=>@C['fg'],
- :tag=>'I10')
- xy = box(209, 204, 31) # Front
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :style=>:pie,
- :start=>120, :extent=>120, :tag=>'I10')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>120, :extent=>120, :tag=>'I10')
- xy = box(249, 204, 31) # Back
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>3,
- :style=>:pie, :start=>120, :extent=>120, :tag=>'I10')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>120, :extent=>120, :tag=>'I10')
-
- xy = [200, 171, 200, 249] # Mast
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I10')
- xy = [159, 234, 182, 234] # Bow sprit
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I10')
- xy = [180, 234, 180, 251, 220, 251] # Hull
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>6, :tag=>'I10')
-
- xy = [92, 255, 221, 255] # Waves
- sine(xy, 2, 25, :fill=>color2, :width=>1, :tag=>'I10w')
-
- xy = @canvas.coords('I10w')[4..-5] # Water
- xy.concat([222, 266, 222, 277, 99, 277])
- TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>color2)
- xy = [222, 266, 222, 277, 97, 277, 97, 266] # Water bottom
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
-
- xy = box(239, 262, 17)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>95, :extent=>103)
- xy = box(76, 266, 21)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :extent=>190)
- end
-
- def move10(step = nil)
- step = get_step(10, step)
-
- pos = [
- [195, 212], [193, 212], [190, 212], [186, 212], [181, 212], [176, 212],
- [171, 212], [166, 212], [161, 212], [156, 212], [151, 212], [147, 212],
- [142, 212], [137, 212], [132, 212, :x], [127, 212], [121, 212],
- [116, 212], [111, 212]
- ]
-
- return 0 if step >= pos.length
-
- where = pos[step]
- move_abs('I10', where)
-
- return 3 if where[2] == :x
- return 1
- end
-
- # 2nd ball drop
- def draw11
- color = @C['11a']
- color2 = @C['11b']
- xy = [23, 264, 55, 591] # Color the down tube
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'')
- xy = box(71, 460, 48) # Color the outer loop
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'')
-
- xy = [55, 264, 55, 458] # Top right side
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = [55, 504, 55, 591] # Bottom right side
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = box(71, 460, 48) # Outer loop
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>110, :extent=>-290, :tag=>'I11i')
- xy = box(71, 460, 16) # Inner loop
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>'',
- :width=>3, :tag=>'I11i')
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['bg'], :width=>3)
-
- xy = [23, 264, 23, 591] # Left side
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = box(1, 266, 23) # Top left curve
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
- :style=>:arc, :extent=>90)
-
- xy = box(75, 235, 9) # The ball
- TkcOval.new(@canvas, xy, :fill=>color2, :outline=>'',
- :width=>3, :tag=>'I11')
- end
-
- def move11(step = nil)
- step = get_step(11, step)
-
- pos = [
- [75, 235], [70, 235], [65, 237], [56, 240], [46, 247], [38, 266],
- [38, 296], [38, 333], [38, 399], [38, 475], [74, 496], [105, 472],
- [100, 437], [65, 423], [-100, -100], [38, 505], [38, 527, :x], [38, 591]
- ]
-
- return 0 if step >= pos.length
- where = pos[step]
- move_abs('I11', where)
- return 3 if where[2] == :x
- return 1
- end
-
- # Hand
- def draw12
- xy = [
- 20, 637, 20, 617, 20, 610, 20, 590, 40, 590, 40, 590,
- 60, 590, 60, 610, 60, 610
- ]
- xy.concat([60, 610, 65, 620, 60, 631]) # Thumb
- xy.concat([60, 631, 60, 637, 60, 662, 60, 669, 52, 669,
- 56, 669, 50, 669, 50, 662, 50, 637])
-
- y0 = 637 # Bumps for fingers
- y1 = 645
- 50.step(21, -10){|x|
- x1 = x - 5
- x2 = x - 10
- xy << x << y0 << x1 << y1 << x2 << y0
- }
- TkcPolygon.new(@canvas, xy, :fill=>@C['12'], :outline=>@C['fg'],
- :smooth=>true, :tag=>'I12', :width=>3)
- end
-
- def move12(step = nil)
- step = get_step(12, step)
-
- pos = [[42.5, 641, :x]]
- return 0 if step >= pos.length
- where = pos[step]
- move_abs('I12', where)
- return 3 if where[2] == :x
- return 1
- end
-
- # Fax
- def draw13
- color = @C['13a']
- xy = [86, 663, 149, 663, 149, 704, 50, 704, 50, 681, 64, 681, 86, 671]
- xy2 = [
- 784, 663, 721, 663, 721, 704, 820, 704, 820, 681, 806, 681, 784, 671
- ]
- radii = [2, 9, 9, 8, 5, 5, 2]
-
- round_poly(@canvas, xy, radii, :width=>3,
- :outline=>@C['fg'], :fill=>color)
- round_poly(@canvas, xy2, radii, :width=>3,
- :outline=>@C['fg'], :fill=>color)
-
- xy = [56, 677]
- x, y = xy
- TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
- :width=>3, :tag=>'I13')
- xy = [809, 677]
- x, y = xy
- TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
- :width=>3, :tag=>'I13R')
-
- xy = [112, 687] # Label
- TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
- :font=>['Times Roman', 12, :bold])
- xy = [762, 687]
- TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
- :font=>['Times Roman', 12, :bold])
-
- xy = [138, 663, 148, 636, 178, 636] # Paper guide
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>@C['fg'], :width=>3)
- xy = [732, 663, 722, 636, 692, 636]
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>@C['fg'], :width=>3)
-
- sine([149, 688, 720, 688], 5, 15,
- :tag=>'I13_s', :fill=>@C['fg'], :width=>3)
- end
-
- def move13(step = nil)
- step = get_step(13, step)
-
- numsteps = 7
-
- if step == numsteps + 2
- move_abs('I13_star', [-100, -100])
- @canvas.itemconfigure('I13R', :fill=>@C['13b'], :width=>2)
- return 2
- end
- if step == 0 # Button down
- @canvas.delete('I13')
- sparkle([-100, -100], 'I13_star') # Create off screen
- return 1
- end
- x0, y0 = anchor('I13_s', :w)
- x1, y1 = anchor('I13_s', :e)
- x = x0 + (x1 - x0) * (step - 1) / numsteps.to_f
- move_abs('I13_star', [x, y0])
- return 1
- end
-
- # Paper in fax
- def draw14
- color = @C['14']
- xy = [102, 661, 113, 632, 130, 618] # Left paper edge
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
- :width=>3, :tag=>'I14L_0')
- xy = [148, 629, 125, 640, 124, 662] # Right paper edge
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
- :width=>3, :tag=>'I14L_1')
- draw14a('L')
-
- xy = [
- 768.0, 662.5, 767.991316225, 662.433786215, 767.926187912, 662.396880171
- ]
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
- :width=>3, :tag=>'I14R_0')
- @canvas.lower('I14R_0')
- # NB. these numbers are VERY sensitive, you must start with final size
- # and shrink down to get the values
- xy = [
- 745.947897349, 662.428358855, 745.997829056, 662.452239237, 746.0, 662.5
- ]
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
- :width=>3, :tag=>'I14R_1')
- @canvas.lower('I14R_1')
- end
-
- def draw14a(side)
- color = @C['14']
- xy = @canvas.coords("I14#{side}_0")
- xy2 = @canvas.coords("I14#{side}_1")
- x0, y0, x1, y1, x2, y2 = xy
- x3, y3, x4, y4, x5, y5 = xy2
-
- zz = [
- x0, y0, x0, y0, xy, x2, y2, x2, y2,
- x3, y3, x3, y3, xy2, x5, y5, x5, y5
- ].flatten
- @canvas.delete("I14#{side}")
- TkcPolygon.new(@canvas, zz, :tag=>"I14#{side}", :smooth=>true,
- :fill=>color, :outline=>color, :width=>3)
- @canvas.lower("I14#{side}")
- end
-
- def move14(step = nil)
- step = get_step(14, step)
-
- # Paper going down
- sc = 0.9 - 0.05*step
- if sc < 0.3
- @canvas.delete('I14L')
- return 0
- end
-
- ox, oy = @canvas.coords('I14L_0')
- @canvas.scale('I14L_0', ox, oy, sc, sc)
- ox, oy = @canvas.coords('I14L_1')[-2..-1]
- @canvas.scale('I14L_1', ox, oy, sc, sc)
- draw14a('L')
-
- # Paper going up
- sc = 0.35 + 0.05*step
- sc = 1/sc
-
- ox, oy = @canvas.coords('I14R_0')
- @canvas.scale('I14R_0', ox, oy, sc, sc)
- ox, oy = @canvas.coords('I14R_1')[-2..-1]
- @canvas.scale('I14R_1', ox, oy, sc, sc)
- draw14a('R')
-
- return((step == 10)? 3: 1)
- end
-
- # Light beam
- def draw15
- color = @C['15a']
- xy = [824, 599, 824, 585, 820, 585, 829, 585]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I15a')
- xy = [789, 599, 836, 643]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3)
- xy = [778, 610, 788, 632]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3)
- xy = [766, 617, 776, 625]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3)
-
- xy = [633, 600, 681, 640]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3)
- xy = [635, 567, 657, 599]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2)
- xy = [765, 557, 784, 583]
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2)
-
- sine([658, 580, 765, 580], 3, 15,
- :tag=>'I15_s', :fill=>@C['fg'], :width=>3)
- end
-
- def move15a
- color = @C['15b']
- @canvas.scale('I15a', 824, 599, 1, 0.3) # Button down
- xy = [765, 621, 681, 621]
- TkcLine.new(@canvas, xy, :dash=>'-', :width=>3, :fill=>color, :tag=>'I15')
- end
-
- def move15(step = nil)
- step = get_step(15, step)
-
- numsteps = 6
-
- if step == numsteps + 2
- move_abs('I15_star', [-100, -100])
- return 2
- end
- if step == 0 # Break the light beam
- sparkle([-100, -100], 'I15_star')
- xy = [765, 621, 745, 621]
- @canvas.coords('I15', xy)
- return 1
- end
- x0, y0 = anchor('I15_s', :w)
- x1, y1 = anchor('I15_s', :e)
- x = x0 + (x1 - x0) * (step - 1) / numsteps.to_f
- move_abs('I15_star', [x, y0])
- return 1
- end
-
- # Bell
- def draw16
- color = @C['16']
- xy = [722, 485, 791, 556]
- TkcRectangle.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>3)
- xy = box(752, 515, 25) # Bell
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'black',
- :tag=>'I16b', :width=>2)
- xy = box(752, 515, 5) # Bell button
- TkcOval.new(@canvas, xy, :fill=>'black', :outline=>'black', :tag=>'I16b')
-
- xy = [784, 523, 764, 549] # Clapper
- TkcLine.new(@canvas, xy, :width=>3, :tag=>'I16c', :fill=>@C['fg'])
- xy = box(784, 523, 4)
- TkcOval.new(@canvas, xy, :fill=>@C['fg'], :outline=>@C['fg'], :tag=>'I16d')
- end
-
- def move16(step = nil)
- step = get_step(16, step)
-
- # Note: we never stop
- ox, oy = [760, 553]
- if (step & 1).nonzero?
- beta = 12
- @canvas.move('I16b', 3, 0)
- else
- beta = -12
- @canvas.move('I16b', -3, 0)
- end
- rotate_item('I16c', ox, oy, beta)
- rotate_item('I16d', ox, oy, beta)
-
- return ((step == 1)? 3: 1)
- end
-
- # Cat
- def draw17
- color = @C['17']
-
- xy = [584, 556, 722, 556]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
- xy = [584, 485, 722, 485]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
-
- xy = [664, 523, 717, 549] # Body
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, :width=>3,
- :style=>:chord, :start=>128, :extent=>260, :tag=>'I17')
-
- xy = [709, 554, 690, 543] # Paw
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
- :width=>3, :tag=>'I17')
- xy = [657, 544, 676, 555]
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
- :width=>3, :tag=>'I17')
-
- xy = box(660, 535, 15) # Lower face
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
- :start=>150, :extent=>240, :tag=>'I17_')
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
- :style=>:chord, :start=>150, :extent=>240, :tag=>'I17_')
- xy = [674, 529, 670, 513, 662, 521, 658, 521, 650, 513, 647, 529] # Ears
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', :width=>1,
- :tag=>['I17_', 'I17_c'])
- xy = [652, 542, 628, 539] # Whiskers
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [652, 543, 632, 545]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [652, 546, 632, 552]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
-
- xy = [668, 543, 687, 538]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :tag=>['I17_', 'I17_w'])
- xy = [668, 544, 688, 546]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :tag=>['I17_', 'I17_w'])
- xy = [668, 547, 688, 553]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :tag=>['I17_', 'I17_w'])
-
- xy = [649, 530, 654, 538, 659, 530] # Left eye
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
- :smooth=>true, :tag=>'I17')
- xy = [671, 530, 666, 538, 661, 530] # Right eye
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
- :smooth=>true, :tag=>'I17')
- xy = [655, 543, 660, 551, 665, 543] # Mouth
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
- :smooth=>true, :tag=>'I17')
- end
-
- def move17(step = nil)
- step = get_step(17, step)
-
- if step == 0
- @canvas.delete('I17') # Delete most of the cat
- xy = [655, 543, 660, 535, 665, 543] # Mouth
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :smooth=>true, :tag=>'I17_')
- xy = box(654, 530, 4) # Left eye
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'',
- :tag=>'I17_')
- xy = box(666, 530, 4) # Right eye
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'',
- :tag=>'I17_')
-
- @canvas.move('I17_', 0, -20) # Move face up
- xy = [652, 528, 652, 554] # Front leg
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [670, 528, 670, 554] # 2nd front leg
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
-
- xy = [ # Body
- 675, 506, 694, 489, 715, 513, 715, 513, 715, 513, 716, 525,
- 716, 525, 716, 525, 706, 530, 695, 530, 679, 535, 668, 527,
- 668, 527, 668, 527, 675, 522, 676, 517, 677, 512
- ]
- TkcPolygon.new(@canvas, xy, :fill=>@canvas.itemcget('I17_c', :fill),
- :outline=>@C['fg'], :width=>3, :smooth=>true,
- :tag=>'I17_')
- xy = [716, 514, 716, 554] # Back leg
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [694, 532, 694, 554] # 2nd back leg
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- xy = [715, 514, 718, 506, 719, 495, 716, 488] # Tail
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
- :smooth=>true, :tag=>'I17_')
-
- @canvas.raise('I17w') # Make whiskers visible
- @canvas.move('I17_', -5, 0) # Move away from the wall a bit
- return 2
- end
- return 0
- end
-
- # Sling shot
- def draw18
- color = @C['18']
- xy = [721, 506, 627, 506] # Sling hold
- TkcLine.new(@canvas, xy, :width=>4, :fill=>@C['fg'], :tag=>'I18')
-
- xy = [607, 500, 628, 513] # Sling rock
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :tag=>'I18a')
-
- xy = [526, 513, 606, 507, 494, 502] # Sling band
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>4, :tag=>'I18b')
- xy = [485, 490, 510, 540, 510, 575, 510, 540, 535, 491] # Sling
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>6)
- end
-
- def move18(step = nil)
- step = get_step(18, step)
-
- pos = [
- [587, 506], [537, 506], [466, 506], [376, 506], [266, 506, :x],
- [136, 506], [16, 506], [-100, -100]
- ]
-
- b = []
- b[0] = [490, 502, 719, 507, 524, 512] # Band collapsing
- b[1] = [
- 491, 503, 524, 557, 563, 505, 559, 496, 546, 506, 551, 525,
- 553, 536, 538, 534, 532, 519, 529, 499
- ]
- b[2] = [
- 491, 503, 508, 563, 542, 533, 551, 526, 561, 539, 549, 550, 530, 500
- ]
- b[3] = [
- 491, 503, 508, 563, 530, 554, 541, 562, 525, 568, 519, 544, 530, 501
- ]
-
- return 0 if step >= pos.length
-
- if step == 0
- @canvas.delete('I18')
- @canvas.itemconfigure('I18b', :smooth=>true)
- end
- if b[step]
- @canvas.coords('I18b', b[step])
- end
-
- where = pos[step]
- move_abs('I18a', where)
- return 3 if where[2] == :x
- return 1
- end
-
- # Water pipe
- def draw19
- color = @C['19']
- xx = [[249, 181], [155, 118], [86, 55], [22, 0]]
- xx.each{|x1, x2|
- TkcRectangle.new(@canvas, x1, 453, x2, 467,
- :fill=>color, :outline=>'', :tag=>'I19')
- TkcLine.new(@canvas, x1, 453, x2, 453,
- :fill=>@C['fg'], :width=>1) # Pipe top
- TkcLine.new(@canvas, x1, 467, x2, 467,
- :fill=>@C['fg'], :width=>1) # Pipe bottom
- }
- @canvas.raise('I11i')
-
- xy = box(168, 460, 16) # Bulge by the joint
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
- :start=>21, :extent=>136)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
- :start=>-21, :extent=>-130)
-
- xy = [249, 447, 255, 473] # First joint 26x6
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
-
- xy = box(257, 433, 34) # Bend up
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
- :style=>:pie, :start=>0, :extent=>-91)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>0, :extent=>-90)
- xy = box(257, 433, 20)
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
- :style=>:pie, :start=>0, :extent=>-92)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>0, :extent=>-90)
- xy = box(257, 421, 34) # Bend left
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
- :style=>:pie, :start=>0, :extent=>91)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>0, :extent=>90)
- xy = box(257, 421, 20)
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
- :style=>:pie, :start=>0, :extent=>90)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>0, :extent=>90)
- xy = box(243, 421, 34) # Bend down
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
- :style=>:pie, :start=>90, :extent=>90)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>90, :extent=>90)
- xy = box(243, 421, 20)
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
- :style=>:pie, :start=>90, :extent=>90)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
- :style=>:arc, :start=>90, :extent=>90)
-
- xy = [270, 427, 296, 433] # 2nd joint bottom
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
- xy = [270, 421, 296, 427] # 2nd joint top
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
- xy = [249, 382, 255, 408] # Third joint right
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
- xy = [243, 382, 249, 408] # Third joint left
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
- xy = [203, 420, 229, 426] # Last joint
- TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
-
- xy = box(168, 460, 6) # Handle joint
- TkcOval.new(@canvas, xy, :fill=>@C['fg'], :outline=>'', :tag=>'I19a')
- xy = [168, 460, 168, 512] # Handle bar
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>5, :tag=>'I19b')
- end
-
- def move19(step = nil)
- step = get_step(19, step)
-
- angles = [30, 30, 30]
- return 2 if step == angles.length
- ox, oy = centroid('I19a')
- rotate_item('I19b', ox, oy, angles[step])
-
- return 1
- end
-
- # Water pouring
- def draw20
- # do nothing
- end
-
- def move20(step = nil)
- step = get_step(20, step)
-
- pos = [451, 462, 473, 484, 496, 504, 513, 523, 532]
- freq = [20, 40, 40, 40, 40, 40, 40, 40, 40]
- pos = [
- [451, 20], [462, 40], [473, 40], [484, 40], [496, 40],
- [504, 40], [513, 40], [523, 40], [532, 40, :x]
- ]
- return 0 if step >= pos.length
-
- @canvas.delete('I20')
- where = pos[step]
- y, f = where
- h20(y, f)
- return 3 if where[2] == :x
- return 1
- end
-
- def h20(y, f)
- color = @C['20']
- @canvas.delete('I20')
-
- sine([208, 428, 208, y], 4, f, :tag=>['I20', 'I20s'],
- :width=>3, :fill=>color, :smooth=>true)
- TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
- :fill=>color, :smooth=>1, :tag=>['I20', 'I20a'])
- TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
- :fill=>color, :smooth=>1, :tag=>['I20', 'I20b'])
- @canvas.move('I20a', 8, 0)
- @canvas.move('I20b', 16, 0)
- end
-
- # Bucket
- def draw21
- color = @C['21']
- xy = [217, 451, 244, 490] # Right handle
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21_a')
- xy = [201, 467, 182, 490] # Left handle
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21_a')
-
- xy = [245, 490, 237, 535] # Right side
- xy2 = [189, 535, 181, 490] # Left side
- TkcPolygon.new(@canvas, xy + xy2, :fill=>color, :outline=>'',
- :tag=>['I21', 'I21f'])
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21')
- TkcLine.new(@canvas, xy2, :fill=>@C['fg'], :width=>2, :tag=>'I21')
-
- xy = [182, 486, 244, 498] # Top
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :width=>2,
- :tag=>['I21', 'I21f'])
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>2,
- :tag=>['I21', 'I21t'])
- xy = [189, 532, 237, 540] # Bottom
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2,
- :tag=>['I21', 'I21b'])
- end
-
- def move21(step = nil)
- step = get_step(21, step)
-
- numsteps = 30
- return 0 if step >= numsteps
-
- x1, y1, x2, y2 = @canvas.coords('I21b')
- # lx1, ly1, lx2, ly2 = @canvas.coords('I21t')
- lx1, ly1, lx2, ly2 = [183, 492, 243, 504]
-
- f = step / numsteps.to_f
- y2 = y2 - 3
- xx1 = x1 + (lx1 - x1) * f
- yy1 = y1 + (ly1 - y1) * f
- xx2 = x2 + (lx2 - x2) * f
- yy2 = y2 + (ly2 - y2) * f
-
- @canvas.itemconfigure('I21b', :fill=>@C['20'])
- @canvas.delete('I21w')
- TkcPolygon.new(@canvas, x2, y2, x1, y1, xx1, yy1, xx2, yy1,
- :tag=>['I21', 'I21w'], :outline=>'', :fill=>@C['20'])
- @canvas.lower('I21w', 'I21')
- @canvas.raise('I21b')
- @canvas.lower('I21f')
-
- return((step == numsteps - 1)? 3: 1)
- end
-
- # Bucket drop
- def draw22
- # do nothing
- end
-
- def move22(step = nil)
- step = get_step(22, step)
- pos = [[213, 513], [213, 523], [213, 543, :x], [213, 583], [213, 593]]
-
- @canvas.itemconfigure('I21f', :fill=>@C['22']) if step == 0
- return 0 if step >= pos.length
- where = pos[step]
- move_abs('I21', where)
- h20(where[1], 40)
- @canvas.delete('I21_a') # Delete handles
-
- return 3 if where[2] == :x
- return 1
- end
-
- # Blow dart
- def draw23
- color = @C['23a']
- color2 = @C['23b']
- color3 = @C['23c']
-
- xy = [185, 623, 253, 650] # Block
- TkcRectangle.new(@canvas, xy, :fill=>'black', :outline=>@C['fg'],
- :width=>2, :tag=>'I23a')
- xy = [187, 592, 241, 623] # Balloon
- TkcOval.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :tag=>'I23b',
- :style=>:arc, :start=>12, :extent=>336)
- xy = [239, 604, 258, 589, 258, 625, 239, 610] # Balloon nozzle
- TkcPolygon.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b')
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23b')
-
- xy = [285, 611, 250, 603] # Dart body
- TkcOval.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'],
- :width=>3, :tag=>'I23d')
- xy = [249, 596, 249, 618, 264, 607, 249, 596] # Dart tail
- TkcPolygon.new(@canvas, xy, :fill=>color3, :outline=>@C['fg'],
- :width=>3, :tag=>'I23d')
- xy = [249, 607, 268, 607] # Dart detail
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d')
- xy = [285, 607, 305, 607] # Dart needle
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d')
- end
-
- def move23(step = nil)
- step = get_step(23, step)
-
- pos = [
- [277, 607], [287, 607], [307, 607, :x], [347, 607], [407, 607],
- [487, 607], [587, 607], [687, 607], [787, 607], [-100, -100]
- ]
-
- return 0 if step >= pos.length
- if step <= 1
- ox, oy = anchor('I23a', :n)
- @canvas.scale('I23b', ox, oy, 0.9, 0.5)
- end
- where = pos[step]
- move_abs('I23d', where)
-
- return 3 if where[2] == :x
- return 1
- end
-
- # Balloon
- def draw24
- color = @C['24a']
- xy = [366, 518, 462, 665] # Balloon
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'],
- :width=>3, :tag=>'I24')
- xy = [414, 666, 414, 729] # String
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I24')
- xy = [410, 666, 404, 673, 422, 673, 418, 666] # Nozzle
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>@C['fg'],
- :width=>3, :tag=>'I24')
-
- xy = [387, 567, 390, 549, 404, 542] # Reflections
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
- :width=>2, :tag=>'I24')
- xy = [395, 568, 399, 554, 413, 547]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
- :width=>2, :tag=>'I24')
- xy = [403, 570, 396, 555, 381, 553]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
- :width=>2, :tag=>'I24')
- xy = [408, 564, 402, 547, 386, 545]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
- :width=>2, :tag=>'I24')
- end
-
- def move24(step = nil)
- step = get_step(24, step)
-
- return 0 if step > 4
- return 2 if step == 4
-
- if step == 0
- @canvas.delete('I24') # Exploding balloon
- xy = [
- 347, 465, 361, 557, 271, 503, 272, 503, 342, 574, 259, 594,
- 259, 593, 362, 626, 320, 737, 320, 740, 398, 691, 436, 738,
- 436, 739, 476, 679, 528, 701, 527, 702, 494, 627, 548, 613,
- 548, 613, 480, 574, 577, 473, 577, 473, 474, 538, 445, 508,
- 431, 441, 431, 440, 400, 502, 347, 465, 347, 465
- ]
- TkcPolygon.new(@canvas, xy, :tag=>'I24', :fill=>@C['24b'],
- :outline=>@C['24a'], :width=>10, :smooth=>true)
- msg = Tk.subst(@S['message'].value)
- TkcText.new(@canvas, centroid('I24'), :text=>msg, :tag=>['I24', 'I24t'],
- :justify=>:center, :font=>['Times Roman', 18, :bold])
- return 1
- end
-
- @canvas.itemconfigure('I24t', :font=>['Times Roman', 18 + 6*step, :bold])
- @canvas.move('I24', 0, -60)
- ox, oy = centroid('I24')
- @canvas.scale('I24', ox, oy, 1.25, 1.25)
- return 1
- end
-
- # Displaying the message
- def move25(step = nil)
- step = get_step(25, step)
-
- if step == 0
- @XY['25'] = Tk::Clock.clicks(:milliseconds)
- return 1
- end
- elapsed = Tk::Clock.clicks(:milliseconds) - @XY['25']
- return 1 if elapsed < 5000
- return 2
- end
-
- # Collapsing balloon
- def move26(step = nil)
- step = get_step(26, step)
-
- if step >= 3
- @canvas.delete('I24', 'I26')
- TkcText.new(@canvas, 430, 735, :anchor=>:s, :tag=>'I26',
- #:text=>'click to continue',
- :text=>'クリックã§ãƒªã‚»ãƒƒãƒˆã—ã¾ã™',
- :font=>['Times Roman', 20, :bold])
- @canvas.bind('1', proc{reset})
- return 4
- end
-
- ox, oy = centroid('I24')
- @canvas.scale('I24', ox, oy, 0.8, 0.8)
- @canvas.move('I24', 0, 60)
- @canvas.itemconfigure('I24t', :font=>['Times Roman', 30 - 6*step, :bold])
- return 1
- end
-
- ################################################################
- #
- # Helper functions
- #
- def box(x, y, r)
- [x - r, y - r, x + r, y + r]
- end
-
- def move_abs(item, xy)
- x, y = xy
- ox, oy = centroid(item)
- dx = x - ox
- dy = y - oy
- @canvas.move(item, dx, dy)
- end
-
- def rotate_item(item, ox, oy, beta)
- xy = @canvas.coords(item)
- xy2 = []
- 0.step(xy.length - 1, 2){|idx|
- x, y = xy[idx, 2]
- xy2.concat(rotate_c(x, y, ox, oy, beta))
- }
- @canvas.coords(item, xy2)
- end
-
- def rotate_c(x, y, ox, oy, beta)
- # rotates vector (ox,oy)->(x,y) by beta degrees clockwise
-
- x -= ox # Shift to origin
- y -= oy
-
- beta = beta * Math.atan(1) * 4 / 180.0 # Radians
- xx = x * Math.cos(beta) - y * Math.sin(beta) # Rotate
- yy = x * Math.sin(beta) + y * Math.cos(beta)
-
- xx += ox # Shift back
- yy += oy
-
- [xx, yy]
- end
-
- def reset
- draw_all
- @canvas.bind_remove('1')
- @S['mode'].value = :MSTART
- @S['active'] = [0]
- end
-
- # Each Move## keeps its state info in STEP, this retrieves and increments it
- def get_step(who, step)
- if step
- @STEP[who] = step
- else
- if !@STEP.exist?(who) || @STEP[who] == ""
- @STEP[who] = 0
- else
- @STEP[who] += 1
- end
- end
- @STEP[who]
- end
-
- def reset_step
- @S['cnt'].value = 0
- @STEP.keys.each{|k| @STEP[k] = ''}
- end
-
- def sine(xy0, amp, freq, opts = {})
- x0, y0, x1, y1 = xy0
- step = 2
- xy = []
- if y0 == y1 # Horizontal
- x0.step(x1, step){|x|
- beta = (x - x0) * 2 * Math::PI / freq
- y = y0 + amp * Math.sin(beta)
- xy << x << y
- }
- else
- y0.step(y1, step){|y|
- beta = (y - y0) * 2 * Math::PI / freq
- x = x0 + amp * Math.sin(beta)
- xy << x << y
- }
- end
- TkcLine.new(@canvas, xy, opts)
- end
-
- def round_rect(xy, radius, opts={})
- x0, y0, x3, y3 = xy
- r = @canvas.winfo_pixels(radius)
- d = 2 * r
-
- # Make sure that the radius of the curve is less than 3/8 size of the box!
- maxr = 0.75
- if d > maxr * (x3 - x0)
- d = maxr * (x3 - x0)
- end
- if d > maxr * (y3 - y0)
- d = maxr * (y3 - y0)
- end
-
- x1 = x0 + d
- x2 = x3 - d
- y1 = y0 + d
- y2 = y3 - d
-
- xy = [x0, y0, x1, y0, x2, y0, x3, y0, x3, y1, x3, y2]
- xy.concat([x3, y3, x2, y3, x1, y3, x0, y3, x0, y2, x0, y1])
- return xy
- end
-
- def round_poly(canv, xy, radii, opts)
- lenXY = xy.length
- lenR = radii.length
- if lenXY != 2*lenR
- raise "wrong number of vertices and radii"
- end
-
- knots = []
- x0 = xy[-2]; y0 = xy[-1]
- x1 = xy[0]; y1 = xy[1]
- xy << xy[0] << xy[1]
-
- 0.step(lenXY - 1, 2){|i|
- radius = radii[i/2]
- r = canv.winfo_pixels(radius)
-
- x2 = xy[i+2]; y2 = xy[i+3]
- z = _round_poly2(x0, y0, x1, y1, x2, y2, r)
- knots.concat(z)
-
- x0 = x1; y0 = y1
- x1 = x2; y1 = y2
- }
- TkcPolygon.new(canv, knots, {:smooth=>true}.update(opts))
- end
-
- def _round_poly2(x0, y0, x1, y1, x2, y2, radius)
- d = 2 * radius
- maxr = 0.75
-
- v1x = x0 - x1
- v1y = y0 - y1
- v2x = x2 - x1
- v2y = y2 - y1
-
- vlen1 = Math.sqrt(v1x*v1x + v1y*v1y)
- vlen2 = Math.sqrt(v2x*v2x + v2y*v2y)
-
- if d > maxr * vlen1
- d = maxr * vlen1
- end
- if d > maxr * vlen2
- d = maxr * vlen2
- end
-
- xy = []
- xy << (x1 + d * v1x / vlen1) << (y1 + d * v1y / vlen1)
- xy << x1 << y1
- xy << (x1 + d * v2x / vlen2) << (y1 + d * v2y / vlen2)
-
- return xy
- end
-
- def sparkle(oxy, tag)
- xy = [
- [299, 283], [298, 302], [295, 314], [271, 331],
- [239, 310], [242, 292], [256, 274], [281, 273]
- ]
- xy.each{|x, y|
- TkcLine.new(@canvas, 271, 304, x, y,
- :fill=>'white', :width=>3, :tag=>tag)
- }
- move_abs(tag, oxy)
- end
-
- def centroid(item)
- anchor(item, :c)
- end
-
- def anchor(item, where)
- x1, y1, x2, y2 = @canvas.bbox(item)
- case(where)
- when :n
- y = y1
- when :s
- y = y2
- else
- y = (y1 + y2) / 2.0
- end
- case(where)
- when :w
- x = x1
- when :e
- x = x2
- else
- x = (x1 + x2) / 2.0
- end
- return [x, y]
- end
-end
-
-TkGoldberg_Demo.new(base_frame)
diff --git a/ext/tk/sample/demos-jp/hello b/ext/tk/sample/demos-jp/hello
deleted file mode 100644
index e942f3d851..0000000000
--- a/ext/tk/sample/demos-jp/hello
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: utf-8 -*-
-require 'tk'
-
-TkButton.new(nil,
- 'text'=>"ã“ã‚“ã«ã¡ã¯ã€ä¸–ç•Œ",
- 'command'=>proc{print "ã“ã‚“ã«ã¡ã¯ã€ä¸–ç•Œ\n"; exit}
-).pack
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/hscale.rb b/ext/tk/sample/demos-jp/hscale.rb
deleted file mode 100644
index 2d2e11336f..0000000000
--- a/ext/tk/sample/demos-jp/hscale.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-require "tkcanvas"
-
-if defined?($hscale_demo) && $hscale_demo
- $hscale_demo.destroy
- $hscale_demo = nil
-end
-
-$hscale_demo = TkToplevel.new {|w|
- title("Horizontal Scale Demonstration")
- iconname("hscale")
-}
-positionWindow($hscale_demo)
-
-base_frame = TkFrame.new($hscale_demo).pack(:fill=>:both, :expand=>true)
-
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '3.5i'
- justify 'left'
- text "下ã«ã¯çŸ¢å°ãŒ1ã¤ã¨æ°´å¹³ãªã‚¹ã‚±ãƒ¼ãƒ«ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚\
-スケール上ã§ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³1をクリックã€ã¾ãŸã¯ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã¨\
-矢å°ã®é•·ã•ã‚’変ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc {
- tmppath = $hscale_demo
- $hscale_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc { showCode 'hscale' }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-def setWidth(w, width)
- width = width + 21
- x2 = width - 30
- if x2 < 21
- x2 = 21
- end
- w.coords 'poly',20,15,20,35,x2,35,x2,45,width,25,x2,5,x2,15,20,15
- w.coords 'line',20,15,20,35,x2,35,x2,45,width,25,x2,5,x2,15,20,15
-end
-
-TkFrame.new(base_frame) {|frame|
- canvas = TkCanvas.new(frame) {|c|
- width 50
- height 50
- bd 0
- highlightthickness 0
- TkcPolygon.new(c, '0', '0', '1', '1', '2', '2') {
- fill 'DeepSkyBlue'
- tags 'poly'
- }
- TkcLine.new(c, '0', '0', '1', '1', '2', '2', '0', '0') {
- fill 'black'
- tags 'line'
- }
- }.pack('side'=>'top', 'expand'=>'yes', 'anchor'=>'s', 'fill'=>'x', 'padx'=>'15')
- scale = TkScale.new(frame) {
- orient 'horizontal'
- length 284
- from 0
- to 250
- command proc{|value| setWidth(canvas, value)}
- tickinterval 50
- }.pack('side'=>'bottom', 'expand'=>'yes', 'anchor'=>'n')
- scale.set 75
-}.pack('side'=>'top', 'fill'=>'x')
diff --git a/ext/tk/sample/demos-jp/icon.rb b/ext/tk/sample/demos-jp/icon.rb
deleted file mode 100644
index 7bf6d9731b..0000000000
--- a/ext/tk/sample/demos-jp/icon.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# iconic button widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($icon_demo) && $icon_demo
- $icon_demo.destroy
- $icon_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$icon_demo = TkToplevel.new {|w|
- title("Iconic Button Demonstration")
- iconname("icon")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($icon_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã¨ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³ä¸Šã«ãƒ“ットマップや画åƒã‚’表示ã™ã‚‹ 3 ã¤ã®æ–¹æ³•ã‚’示ã—ã¦ã„ã¾ã™ã€‚å·¦ã«ã‚ã‚‹ã®ã¯2ã¤ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã§ã€ãã‚Œãžã‚ŒãŒã€ãƒ“ットマップã¨é¸æŠžã‚’示ã™ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ã§ã§ãã¦ã„ã¾ã™ã€‚中央ã«ã‚ã‚‹ã®ã¯ã€é¸æŠžæ¸ˆã¿ã‹ã©ã†ã‹ã«ã‚ˆã£ã¦ç•°ãªã‚‹ç”»åƒã‚’表示ã™ã‚‹ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³ã§ã™ã€‚å³å´ã«ã‚ã‚‹ã®ã¯é¸æŠžæ¸ˆã¿ã‹ã©ã†ã‹ã«ã‚ˆã£ã¦èƒŒæ™¯è‰²ãŒå¤‰ã‚るビットマップを表示ã™ã‚‹ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³ã§ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $icon_demo
- $icon_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'icon'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# image 生æˆ
-flagup = \
-TkBitmapImage.new('file'=>[$demo_dir,'..',
- 'images','flagup.xbm'].join(File::Separator),
- 'maskfile'=>\
- [$demo_dir,'..','images','flagup.xbm'].join(File::Separator))
-flagdown = \
-TkBitmapImage.new('file'=>[$demo_dir,'..',
- 'images','flagdown.xbm'].join(File::Separator),
- 'maskfile'=>\
- [$demo_dir,'..',
- 'images','flagdown.xbm'].join(File::Separator))
-
-# 変数生æˆ
-letters = TkVariable.new
-
-# frame 生æˆ
-TkFrame.new(base_frame, 'borderwidth'=>10){|w|
- TkFrame.new(w) {|f|
- # TkRadioButton.new(f){
- Tk::RadioButton.new(f){
- bitmap '@' + [$demo_dir,'..',
- 'images','letters.xbm'].join(File::Separator)
- variable letters
- value 'full'
- }.pack('side'=>'top', 'expand'=>'yes')
-
- # TkRadioButton.new(f){
- Tk::RadioButton.new(f){
- bitmap '@' + [$demo_dir,'..',
- 'images','noletter.xbm'].join(File::Separator)
- variable letters
- value 'empty'
- }.pack('side'=>'top', 'expand'=>'yes')
-
- }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m')
-
- # TkCheckButton.new(w) {
- Tk::CheckButton.new(w) {
- image flagdown
- selectimage flagup
- indicatoron 0
- selectcolor self['background']
- }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m')
-
- # TkCheckButton.new(w) {
- Tk::CheckButton.new(w) {
- bitmap '@' + [$demo_dir,'..',
- 'images','letters.xbm'].join(File::Separator)
- indicatoron 0
- selectcolor 'SeaGreen1'
- }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m')
-
-}.pack('side'=>'top')
-
diff --git a/ext/tk/sample/demos-jp/image1.rb b/ext/tk/sample/demos-jp/image1.rb
deleted file mode 100644
index e07f1d3afc..0000000000
--- a/ext/tk/sample/demos-jp/image1.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# two image widgets demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($image1_demo) && $image1_demo
- $image1_demo.destroy
- $image1_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$image1_demo = TkToplevel.new {|w|
- title('Image Demonstration #1')
- iconname("Image1")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($image1_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "ã“ã®ãƒ‡ãƒ¢ã§ã¯2ã¤ã®ãƒ©ãƒ™ãƒ«ä¸Šã«ç”»åƒã‚’ãã‚Œãžã‚Œè¡¨ç¤ºã—ã¦ã„ã¾ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $image1_demo
- $image1_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'image1'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# image 生æˆ
-image1a = \
-TkPhotoImage.new('file'=>[$demo_dir,'..',
- 'images','earth.gif'].join(File::Separator))
-image1b = \
-TkPhotoImage.new('file'=>[$demo_dir,'..',
- 'images','earthris.gif'].join(File::Separator))
-
-# label 生æˆ
-#[ TkLabel.new(base_frame, 'image'=>image1a, 'bd'=>1, 'relief'=>'sunken'),
-# TkLabel.new(base_frame, 'image'=>image1b, 'bd'=>1, 'relief'=>'sunken')
-#].each{|w| w.pack('side'=>'top', 'padx'=>'.5m', 'pady'=>'.5m')}
-[ Tk::Label.new(base_frame, 'image'=>image1a, 'bd'=>1, 'relief'=>'sunken'),
- Tk::Label.new(base_frame, 'image'=>image1b, 'bd'=>1, 'relief'=>'sunken')
-].each{|w| w.pack('side'=>'top', 'padx'=>'.5m', 'pady'=>'.5m')}
-
diff --git a/ext/tk/sample/demos-jp/image2.rb b/ext/tk/sample/demos-jp/image2.rb
deleted file mode 100644
index 312ec41f2a..0000000000
--- a/ext/tk/sample/demos-jp/image2.rb
+++ /dev/null
@@ -1,107 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# widget demo 'load image' (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($image2_demo) && $image2_demo
- $image2_demo.destroy
- $image2_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$image2_demo = TkToplevel.new {|w|
- title('Image Demonstration #2')
- iconname("Image2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($image2_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "ã“ã®ãƒ‡ãƒ¢ã§ã¯Tkã® photo image を使用ã—ã¦ç”»åƒã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚最åˆã«ã‚¨ãƒ³ãƒˆãƒªå†…ã«ã«ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåを入れã¦ä¸‹ã•ã„。次ã«ä¸‹ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’ロードã™ã‚‹ãŸã‚ã€ãƒªã‚¿ãƒ¼ãƒ³ã‚’押ã—ã¦ãã ã•ã„。ãã®å¾Œã€ç”»åƒã‚’é¸æŠžã™ã‚‹ãŸã‚ã«ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ä¸­ã®ãƒ•ã‚¡ã‚¤ãƒ«åをダブルクリックã—ã¦ä¸‹ã•ã„。"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $image2_demo
- $image2_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'image2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# 変数生æˆ
-$dirName = TkVariable.new([$demo_dir,'..','images'].join(File::Separator))
-
-# image 生æˆ
-$image2a = TkPhotoImage.new
-
-# ファイルå入力部
-TkLabel.new(base_frame, 'text'=>'ディレクトリ:')\
-.pack('side'=>'top', 'anchor'=>'w')
-
-image2_e = TkEntry.new(base_frame) {
- width 30
- textvariable $dirName
-}.pack('side'=>'top', 'anchor'=>'w')
-
-TkFrame.new(base_frame, 'height'=>'3m', 'width'=>20)\
-.pack('side'=>'top', 'anchor'=>'w')
-
-TkLabel.new(base_frame, 'text'=>'ファイル:')\
-.pack('side'=>'top', 'anchor'=>'w')
-
-TkFrame.new(base_frame){|w|
- s = TkScrollbar.new(w)
- l = TkListbox.new(w) {
- width 20
- height 10
- yscrollcommand proc{|first,last| s.set first,last}
- }
- s.command(proc{|*args| l.yview(*args)})
- l.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y')
- s.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y')
- #l.insert(0,'earth.gif', 'earthris.gif', 'mickey.gif', 'teapot.ppm')
- l.insert(0,'earth.gif', 'earthris.gif', 'teapot.ppm')
- l.bind('Double-1', proc{|x,y| loadImage $image2a,l,x,y}, '%x %y')
-
- image2_e.bind 'Return', proc{loadDir l}
-
-}.pack('side'=>'top', 'anchor'=>'w')
-
-# image é…ç½®
-[ TkFrame.new(base_frame, 'height'=>'3m', 'width'=>20),
- TkLabel.new(base_frame, 'text'=>'ç”»åƒ:'),
- # TkLabel.new(base_frame, 'image'=>$image2a)
- Tk::Label.new(base_frame, 'image'=>$image2a)
-].each{|w| w.pack('side'=>'top', 'anchor'=>'w')}
-
-# メソッド定義
-def loadDir(w)
- w.delete(0,'end')
- Dir.glob([$dirName,'*'].join(File::Separator)).sort.each{|f|
- w.insert('end',File.basename(f))
- }
-end
-
-def loadImage(img,w,x,y)
- img.file([$dirName, w.get("@#{x},#{y}")].join(File::Separator))
-end
-
diff --git a/ext/tk/sample/demos-jp/image3.rb b/ext/tk/sample/demos-jp/image3.rb
deleted file mode 100644
index e5bb1846c9..0000000000
--- a/ext/tk/sample/demos-jp/image3.rb
+++ /dev/null
@@ -1,128 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-# image3.rb
-#
-# This demonstration script creates a simple collection of widgets
-# that allow you to select and view images in a Tk label.
-#
-# widget demo 'load image' (called by 'widget')
-#
-
-# toplevel widget
-if defined?($image3_demo) && $image3_demo
- $image3_demo.destroy
- $image3_demo = nil
-end
-
-# demo toplevel widget
-$image3_demo = TkToplevel.new {|w|
- title('Image Demonstration #3')
- iconname("Image3")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($image3_demo).pack(:fill=>:both, :expand=>true)
-
-#
-def loadDir3(w)
- w.delete(0,'end')
- Dir.glob([$dirName,'*'].join(File::Separator)).sort.each{|f|
- w.insert('end',File.basename(f))
- }
-end
-
-# selectAndLoadDir3 --
-# This procedure pops up a dialog to ask for a directory to load into
-# the listbox and (if the user presses OK) reloads the directory
-# listbox from the directory named in the demo's entry.
-#
-# Arguments:
-# w - Name of the toplevel window of the demo.
-def selectAndLoadDir3(w, lbox)
- dir = Tk.chooseDirectory(:initialdir=>$dirName.value,
- :parent=>w, :mustexist=>true)
- if dir.length > 0
- $dirName.value = dir
- loadDir3(lbox)
- end
-end
-
-def loadImage3(w,x,y)
- $image3a.file([$dirName, w.get("@#{x},#{y}")].join(File::Separator))
-end
-
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "ã“ã®ãƒ‡ãƒ¢ã§ã¯Tkã® photo image を使用ã—ã¦ç”»åƒã‚’ 見るã“ã¨ãŒã§ãã¾ã™ã€‚最åˆã«ã‚¨ãƒ³ãƒˆãƒªå†…ã«ã«ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåを入れã¦ä¸‹ã•ã„。次ã«ä¸‹ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’ロードã™ã‚‹ãŸã‚ã€ãƒªã‚¿ãƒ¼ãƒ³ã‚’押ã—ã¦ãã ã•ã„。ãã®å¾Œã€ç”»åƒã‚’é¸æŠžã™ã‚‹ãŸã‚ã«ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ä¸­ã®ãƒ•ã‚¡ã‚¤ãƒ«åをダブルクリックã—ã¦ä¸‹ã•ã„。"
-}
-msg.pack('side'=>'top')
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $image3_demo
- $image3_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'image3'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# variable
-$dirName = TkVariable.new([$demo_dir,'..','images'].join(File::Separator))
-
-# image
-begin
- $image3a.delete
-rescue
-end
-$image3a = TkPhotoImage.new
-
-#
-image3_f = TkFrame.new(base_frame).pack(:fill=>:both, :expand=>true)
-
-image3_df = TkLabelFrame.new(base_frame, :text=>'ディレクトリ:')
-
-image3_ff = TkLabelFrame.new(base_frame, :text=>'ファイル:',
- :padx=>'2m', :pady=>'2m')
-image3_lbx = TkListbox.new(image3_ff, :width=>20, :height=>10) {
- pack(:side=>:left, :fill=>:y, :expand=>true)
- yscrollbar(TkScrollbar.new(image3_ff).pack(:side=>:left, :fill=>:y,
- :expand=>true))
- insert(0, *(%w(earth.gif earthris.gif teapot.ppm)))
- bind('Double-1', proc{|x,y| loadImage3(self, x, y)}, '%x %y')
-}
-
-image3_ent = TkEntry.new(image3_df, :width=>30, :textvariable=>$dirName){
- pack(:side=>:left, :fill=>:both, :padx=>'2m', :pady=>'2m', :expand=>true)
- bind('Return', proc{loadDir3(image3_lbx)})
-}
-
-TkButton.new(image3_df, :pady=>0, :padx=>'2m', :text=>"ディレクトリé¸æŠž",
- :command=>proc{selectAndLoadDir3(image3_ent, image3_lbx)}) {
- pack(:side=>:left, :fill=>:y, :padx=>[0, '2m'], :pady=>'2m')
-}
-
-image3_if = TkLabelFrame.new(base_frame, :text=>'イメージ:') {|f|
- # TkLabel.new(f, :image=>$image3a).pack(:padx=>'2m', :pady=>'2m')
- Tk::Label.new(f, :image=>$image3a).pack(:padx=>'2m', :pady=>'2m')
-}
-
-Tk.grid(image3_df, '-',
- :sticky=>:ew, :padx=>'1m', :pady=>'1m', :in=>image3_f)
-Tk.grid(image3_ff, image3_if,
- :sticky=>:nw, :padx=>'1m', :pady=>'1m', :in=>image3_f)
-TkGrid.columnconfigure(image3_f, 1, :weight=>1)
-
diff --git a/ext/tk/sample/demos-jp/items.rb b/ext/tk/sample/demos-jp/items.rb
deleted file mode 100644
index 9fef0bedda..0000000000
--- a/ext/tk/sample/demos-jp/items.rb
+++ /dev/null
@@ -1,380 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# canvas item types widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($items_demo) && $items_demo
- $items_demo.destroy
- $items_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$items_demo = TkToplevel.new {|w|
- title("Canvas Item Demonstration")
- iconname("Items")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($items_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ã‚­ãƒ£ãƒ³ãƒã‚¹ widget ãŒå…¥ã£ã¦ãŠã‚Šã€ãã®ä¸­ã«ã¯ã‚­ãƒ£ãƒ³ãƒã‚¹ widget ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹æ§˜ã€…ãªã‚¿ã‚¤ãƒ—ã®ã‚¢ã‚¤ãƒ†ãƒ ã®ä¾‹ãŒå…¥ã£ã¦ã„ã¾ã™ã€‚次ã®ã‚ˆã†ãªæ“作ãŒã§ãã¾ã™ã€‚\n ボタン-1 ドラッグ:\tアイテムを動ã‹ã™ã€‚\n ボタン-2 ドラッグ:\t見ãˆã¦ã„る部分をãšã‚‰ã™ã€‚\n ボタン-3 ドラッグ:\t領域を囲ã†ã€‚\n コントロール-F:\t領域ã®ä¸‹ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’表示ã™ã‚‹ã€‚"
-}.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $items_demo
- $items_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'items'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-cvs = nil
-TkFrame.new(base_frame) {|cf|
- # canvas 生æˆ
- cvs = TkCanvas.new(cf) {|c|
- focus
- scrollregion '0c 0c 30c 24c'
- width '15c'
- height '10c'
- relief 'sunken'
- borderwidth 2
-
- hs = TkScrollbar.new(cf) {|s|
- orient 'horizontal'
- command proc{|*args| c.xview(*args)}
- c.xscrollcommand proc{|first,last| s.set first,last}
- }
-
- vs = TkScrollbar.new(cf) {|s|
- command proc{|*args| c.yview(*args)}
- c.yscrollcommand proc{|first,last| s.set first,last}
- }
-
- if $tk_version =~ /^4\.[01]/
- hs.pack('side'=>'bottom', 'fill'=>'x')
- vs.pack('side'=>'right', 'fill'=>'y')
- c.pack('in'=>cf, 'expand'=>'yes', 'fill'=>'both')
-
- else
- c.grid('in'=>cf, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- vs.grid('row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- hs.grid('row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- TkGrid.rowconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
-
- end
-
- }
-}.pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes')
-
-# Display a 3x3 rectangular grid
-TkcRectangle.new(cvs, '0c', '0c', '30c', '24c', 'width'=>2)
-TkcLine.new(cvs, '0c', '8c', '30c', '8c', 'width'=>2)
-TkcLine.new(cvs, '0c', '16c', '30c', '16c', 'width'=>2)
-TkcLine.new(cvs, '10c', '0c', '10c', '24c', 'width'=>2)
-TkcLine.new(cvs, '20c', '0c', '20c', '24c', 'width'=>2)
-
-if $tk_version =~ /^4.*/
- font1 = '-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*'
- font2 = '-Adobe-Helvetica-Bold-R-Normal--*-240-*-*-*-*-*-*'
-else
- font1 = 'Helvetica 12'
- font2 = 'Helvetica 24 bold'
-end
-if TkWinfo.depth($root).to_i > 1
- blue = 'DeepSkyBlue3'
- red = 'red'
- bisque = 'bisque3'
- green = 'SeaGreen3'
-else
- blue = 'black'
- red = 'black'
- bisque = 'black'
- green = 'black'
-end
-
-# tag オブジェクトを生æˆ
-$tag_item = TkcGroup.new(cvs)
-
-# Set up demos within each of the areas of the grid.
-TkcText.new(cvs, '5c', '.2c', 'text'=>'ライン', 'anchor'=>'n')
-TkcLine.new(cvs, '1c', '1c', '3c', '1c', '1c', '4c', '3c', '4c',
- 'width'=>2, 'fill'=>blue, 'capstyle'=>'butt',
- 'join'=>'miter', 'tags'=>$tag_item )
-TkcLine.new(cvs, '4.67c','1c','4.67c','4c', 'arrow'=>'last', 'tags'=>$tag_item)
-TkcLine.new(cvs, '6.33c','1c','6.33c','4c', 'arrow'=>'both', 'tags'=>$tag_item)
-TkcLine.new(cvs, '5c','6c','9c','6c','9c','1c','8c','1c','8c','4.8c','8.8c',
- '4.8c','8.8c','1.2c','8.2c','1.2c','8.2c','4.6c','8.6c','4.6c',
- '8.6c','1.4c','8.4c','1.4c','8.4c','4.4c',
- 'width'=>3, 'fill'=>red, 'tags'=>$tag_item )
-TkcLine.new(cvs, '1c','5c','7c','5c','7c','7c','9c','7c', 'width'=>'.5c',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'arrow'=>'both', 'arrowshape'=>'15 15 7', 'tags'=>$tag_item )
-TkcLine.new(cvs, '1c','7c','1.75c','5.8c','2.5c','7c','3.25c','5.8c','4c','7c',
- 'width'=>'.5c', 'capstyle'=>'round', 'join'=>'round',
- 'tags'=>$tag_item )
-
-TkcText.new(cvs, '15c', '.2c',
- 'text'=>'曲線 (滑らã‹ã«ã¤ãªã„ã ç›´ç·š)', 'anchor'=>'n')
-TkcLine.new(cvs, '11c','4c','11.5c','1c','13.5c','1c','14c','4c',
- 'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item )
-TkcLine.new(cvs, '15.5c','1c','19.5c','1.5c','15.5c','4.5c','19.5c','4c',
- 'smooth'=>'on', 'arrow'=>'both', 'width'=>3, 'tags'=>$tag_item )
-TkcLine.new(cvs, '12c','6c','13.5c','4.5c','16.5c','7.5c','18c','6c',
- '16.5c','4.5c','13.5c','7.5c','12c','6c',
- 'smooth'=>'on', 'width'=>'3m', 'capstyle'=>'round',
- 'stipple'=>'@'+[$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator),
- 'fill'=>red, 'tags'=>$tag_item )
-
-TkcText.new(cvs, '25c', '.2c', 'text'=>'多角形', 'anchor'=>'n')
-TkcPolygon.new(cvs, '21c','1.0c','22.5c','1.75c','24c','1.0c','23.25c','2.5c',
- '24c','4.0c','22.5c','3.25c','21c','4.0c','21.75c','2.5c',
- 'fill'=>'green', 'outline'=>'black', 'width'=>4,
- 'tags'=>$tag_item )
-TkcPolygon.new(cvs, '25c','4c','25c','4c','25c','1c','26c','1c','27c','4c',
- '28c','1c','29c','1c','29c','4c','29c','4c',
- 'fill'=>red, 'smooth'=>'on', 'tags'=> $tag_item)
-TkcPolygon.new(cvs, '22c','4.5c','25c','4.5c','25c','6.75c','28c','6.75c',
- '28c','5.25c','24c','5.25c','24c','6.0c','26c','6c','26c',
- '7.5c','22c','7.5c',
- 'stipple'=>'@' + [$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator),
- 'outline'=>'black', 'tags'=>$tag_item )
-
-TkcText.new(cvs, '5c', '8.2c', 'text'=>'矩形', 'anchor'=>'n')
-TkcRectangle.new(cvs, '1c','9.5c','4c','12.5c',
- 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
-TkcRectangle.new(cvs, '0.5c','13.5c','4.5c','15.5c',
- 'fill'=>green, 'tags'=>$tag_item )
-TkcRectangle.new(cvs, '6c','10c','9c','15c', 'outline'=>'',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'fill'=>blue, 'tags'=>$tag_item )
-
-TkcText.new(cvs, '15c', '8.2c', 'text'=>'楕円', 'anchor'=>'n')
-TkcOval.new(cvs, '11c','9.5c','14c','12.5c',
- 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
-TkcOval.new(cvs, '10.5c','13.5c','14.5c','15.5c',
- 'fill'=>green, 'tags'=>$tag_item )
-TkcOval.new(cvs, '16c','10c','19c','15c', 'outline'=>'',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'fill'=>blue, 'tags'=>$tag_item )
-
-TkcText.new(cvs, '25c', '8.2c', 'text'=>'テキスト', 'anchor'=>'n')
-TkcRectangle.new(cvs, '22.4c','8.9c','22.6c','9.1c')
-TkcText.new(cvs, '22.5c', '9c', 'anchor'=>'n', 'font'=>font1, 'width'=>'4c',
- 'text'=>'短ã„テキスト。ワードラップã€å·¦æƒãˆã€ã‚¢ãƒ³ã‚«ãƒ¼ã¯åŒ—(上)。□ã¯å„テキストã®ã‚¢ãƒ³ã‚«ãƒ¼ãƒã‚¤ãƒ³ãƒˆã‚’示ã™ã€‚', 'tags'=>$tag_item )
-TkcRectangle.new(cvs, '25.4c','10.9c','25.6c','11.1c')
-TkcText.new(cvs, '25.5c', '11c', 'anchor'=>'w', 'font'=>font1, 'fill'=>blue,
- 'text'=>"ã„ãã¤ã‹ã®è¡Œã€‚\nãã‚Œãžã‚Œç‹¬ç«‹ã«\nè¡Œæƒãˆã€‚\nå…¨ã¦å·¦ç«¯ãŒã‚¢ãƒ³ã‚«ãƒ¼ã•ã‚Œã¦ã„る。", 'justify'=>'center', 'tags'=>$tag_item )
-TkcRectangle.new(cvs, '24.9c','13.9c','25.1c','14.1c')
-if $tk_version =~ /^4\.[01]/
- TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
- 'stipple'=>'@' + [$demo_dir, '..',
- 'images', 'grey.5'].join(File::Separator),
- 'text'=>'Stippled characters', 'tags'=>$tag_item )
-else
- TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
- 'stipple'=>'gray50', 'text'=>'Stippled characters',
- 'tags'=>$tag_item )
-end
-
-TkcText.new(cvs, '5c', '16.2c', 'text'=>'弧', 'anchor'=>'n')
-TkcArc.new(cvs, '0.5c','17c','7c','20c', 'fill'=>green, 'outline'=>'black',
- 'start'=>45, 'extent'=>270, 'style'=>'pieslice', 'tags'=>$tag_item)
-#TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
-# 'outline'=>blue, 'start'=>135, 'extent'=>270,
-# 'outlinestipple'=>'@' + ['images', 'grey.25'].join(File::Separator),
-# 'tags'=>$tag_item)
-TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
- 'outline'=>blue, 'start'=>135, 'extent'=>270,
- 'outlinestipple'=>'@'+[$demo_dir, '..',
- 'images','gray25.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
-TkcArc.new(cvs, '0.5c','20c','9.5c','24c', 'width'=>'4m', 'style'=>'pieslice',
- 'fill'=>'', 'outline'=>red, 'start'=>225, 'extent'=>90,
- 'tags'=>$tag_item)
-TkcArc.new(cvs, '5.5c','20.5c','9.5c','23.5c', 'width'=>'4m', 'style'=>'chord',
- 'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270,
- 'tags'=>$tag_item)
-
-TkcText.new(cvs, '15c', '16.2c', 'text'=>'ビットマップ', 'anchor'=>'n')
-#TkcBitmap.new(cvs, '13c','20c',
-# 'bitmap'=>'@' + ['images', 'face'].join(File::Separator),
-# 'tags'=>$tag_item)
-TkcBitmap.new(cvs, '13c','20c',
- 'bitmap'=>'@' + [$demo_dir, '..',
- 'images', 'face.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
-#TkcBitmap.new(cvs, '17c','18.5c',
-# 'bitmap'=>'@' + ['images', 'noletters'].join(File::Separator),
-# 'tags'=>$tag_item)
-TkcBitmap.new(cvs, '17c','18.5c',
- 'bitmap'=>'@' + [$demo_dir, '..',
- 'images', 'noletter.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
-#TkcBitmap.new(cvs, '17c','21.5c',
-# 'bitmap'=>'@' + ['images', 'letters'].join(File::Separator),
-# 'tags'=>$tag_item)
-# ↓ã®å½¢å¼ã§ã‚‚å¯èƒ½
-TkcBitmap.new(cvs, '17c','21.5c') {
- bitmap '@' + [$demo_dir, '..', 'images', 'letters.xbm'].join(File::Separator)
- tags $tag_item
-}
-#TkcBitmap.new(cvs, '17c','21.5c') {
-# bitmap '@' + ['images', 'letters'].join(File::Separator)
-# tags $tag_item
-#}
-
-TkcText.new(cvs, '25c', '16.2c', 'text'=>'ウィンドウ', 'anchor'=>'n')
-TkButton.new(cvs) {|b|
- text '押ã—ã¦ã­'
- command proc{butPress cvs, red}
- TkcWindow.new(cvs, '21c','18c',
- 'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item)
-}
-TkEntry.new(cvs, 'width'=>20, 'relief'=>'sunken') {|e|
- insert 'end', '編集ã—ã¦ã­'
- TkcWindow.new(cvs, '21c','21c',
- 'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item)
-}
-TkScale.new(cvs, 'from'=>0, 'to'=>100, 'length'=>'6c', 'sliderlength'=>'.4c',
- 'width'=>'.5c', 'tickinterval'=>0 ) {|scl|
- TkcWindow.new(cvs, '28.5c','17.5c',
- 'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item)
-}
-TkcText.new(cvs, '21c', '17.9c', 'text'=>'ボタン:', 'anchor'=>'sw')
-TkcText.new(cvs, '21c', '20.9c', 'text'=>'エントリ:', 'anchor'=>'sw')
-TkcText.new(cvs, '28.5c', '17.4c', 'text'=>'スケール:', 'anchor'=>'s')
-
-# Set up event bindings for canvas:
-cvs.itembind($tag_item, 'Any-Enter', proc{itemEnter cvs})
-cvs.itembind($tag_item, 'Any-Leave', proc{itemLeave cvs})
-cvs.bind('2', proc{|x,y| cvs.scan_mark x,y}, '%x %y')
-cvs.bind('B2-Motion', proc{|x,y| cvs.scan_dragto x,y}, '%x %y')
-cvs.bind('3', proc{|x,y| itemMark cvs,x,y}, '%x %y')
-cvs.bind('B3-Motion', proc{|x,y| itemStroke cvs,x,y}, '%x %y')
-cvs.bind('Control-f', proc{itemsUnderArea cvs})
-cvs.bind('1', proc{|x,y| itemStartDrag cvs,x,y}, '%x %y')
-cvs.bind('B1-Motion', proc{|x,y| itemDrag cvs,x,y}, '%x %y')
-# Utility methods for highlighting the item under the pointer
-
-$restoreCmd = nil
-def itemEnter (c)
- if TkWinfo.depth(c).to_i == 1
- $restoreCmd = nil
- return
- end
- type = c.itemtype('current')
- if type == TkcWindow
- $restoreCmd = nil
- return
- end
- if type == TkcBitmap
- bg = (c.itemconfiginfo('current', 'background'))[4]
- $restoreCmd = proc{c.itemconfigure 'current', 'background', bg}
- c.itemconfigure 'current', 'background', 'SteelBlue2'
- return
- end
- fill = (c.itemconfiginfo('current', 'fill'))[4]
- if (type == TkcRectangle || type == TkcOval || type == TkcArc) && fill == []
- outline = (c.itemconfiginfo('current', 'outline'))[4]
- $restoreCmd = proc{c.itemconfigure 'current', 'outline', outline}
- c.itemconfigure 'current', 'outline', 'SteelBlue2'
- else
- $restoreCmd = proc{c.itemconfigure 'current', 'fill', fill}
- c.itemconfigure 'current', 'fill', 'SteelBlue2'
- end
-end
-
-def itemLeave(c)
- $restoreCmd.call if $restoreCmd
-end
-
-# Utility methods for stroking out a rectangle and printing what's
-# underneath the rectangle's area.
-
-def itemMark(c,x,y)
- $areaX1 = c.canvasx(x)
- $areaY1 = c.canvasy(y)
- c.delete 'area'
-end
-
-def itemStroke(c,x,y)
- x = c.canvasx(x)
- y = c.canvasy(y)
- if $areaX1 != x && $areaY1 != y
- c.delete 'area'
- c.addtag_withtag 'area', TkcRectangle.new(c, $areaX1, $areaY1, x, y,
- '-outline', 'black')
- $areaX2 = x
- $areaY2 = y
- end
-end
-
-def itemsUnderArea(c)
- area = c.find_withtag('area')
- items = []
- c.find_enclosed($areaX1,$areaY1,$areaX2,$areaY2).each{|i|
- items.push(i) if i.gettags.include?($tag_item)
- }
- print "Items enclosed by area: #{items.inspect}\n"; STDOUT.flush
- items.clear
- c.find_overlapping($areaX1,$areaY1,$areaX2,$areaY2).each{|i|
- items.push(i) if i.gettags.include?($tag_item)
- }
- print "Items overlapping area: #{items.inspect}\n"; STDOUT.flush
-end
-
-$areaX1 = 0
-$areaY1 = 0
-$areaX2 = 0
-$areaY2 = 0
-
-# Utility methods to support dragging of items.
-
-def itemStartDrag(c,x,y)
- $lastX = c.canvasx(x)
- $lastY = c.canvasy(y)
-end
-
-def itemDrag(c,x,y)
- x = c.canvasx(x)
- y = c.canvasy(y)
- c.move('current', x - $lastX, y - $lastY)
- $lastX = x
- $lastY = y
-end
-
-# Method that's invoked when the button embedded in the canvas
-# is invoked.
-
-def butPress(w,color)
- i = TkcText.new(w, '25c', '18.1c',
- 'text'=>'ã„ã¦ã¦!!', 'fill'=>color, 'anchor'=>'n')
- Tk.after(500, proc{w.delete i})
-end
diff --git a/ext/tk/sample/demos-jp/ixset b/ext/tk/sample/demos-jp/ixset
deleted file mode 100644
index 40a77f487c..0000000000
--- a/ext/tk/sample/demos-jp/ixset
+++ /dev/null
@@ -1,333 +0,0 @@
-#!/usr/bin/env ruby
-
-# ixset --
-# A nice interface to "xset" to change X server settings
-#
-
-require 'tk'
-
-class Xsettings
- #
- # Button actions
- #
- def quit
- @root.destroy
- end
-
- def ok
- writesettings
- quit
- end
-
- def cancel
- readsettings
- dispsettings
- end
-
- # apply is just "writesettings"
-
-
- #
- # Read current settings
- #
- def readsettings
- xfd = open("|xset q", 'r')
- xfd.readlines.each{|line|
- fields = line.chomp.strip.split(/\s+/)
- case fields[0]
- when "auto"
- if fields[1] == 'repeat:'
- @kbdrep = fields[2]
- @w_kbdrep.set(@kbdrep)
- @kbdcli = fields[6]
- end
-
- when "bell"
- @bellvol = fields[2]
- @bellpit = fields[5]
- @belldur = fields[8]
-
- when "acceleration:"
- @mouseacc = fields[1]
- @mousethr = fields[3]
-
- when "prefer"
- if fields[2] == 'yes'
- @screenbla = 'blank'
- else
- @screenbla = 'noblank'
- end
- @w_screenbla.set(@screenbla)
-
- when "timeout:"
- @screentim = fields[1]
- @screencyc = fields[3]
-
- end
- }
-
- xfd.close
- end
-
- #
- # Write settings into the X server
- #
- def writesettings
- @bellvol = @w_bellvol.get
- @bellpit = @w_bellpit.get
- @belldur = @w_belldur.get
-
- @kbdrep = @w_kbdrep.get
- if @kbdrep == 'on'
- @kbdcli = @w_kbdcli.get
- else
- @kbdcli = 'off'
- end
-
- @mouseacc = @w_mouseacc.get
- @mousethr = @w_mousethr.get
-
- @screentim = @w_screentim.get
- @screencyc = @w_screencyc.get
- @screenbla = @w_screenbla.get
-
- system("xset \
- b #{@bellvol} #{@bellpit} #{@belldur} \
- c #{@kbdcli} \
- r #{@kbdrep} \
- m #{@mouseacc} #{@mousethr} \
- s #{@screentim} #{@screencyc} \
- s #{@screenbla}")
- end
-
- #
- # Sends all settings to the window
- #
- def dispsettings
- @w_bellvol.set(@bellvol)
- @w_bellpit.set(@bellpit)
- @w_belldur.set(@belldur)
-
- @w_kbdonoff.set(@w_kbdrep.get)
- @w_kbdcli.set(@kbdcli)
-
- @w_mouseacc.set(@mouseacc)
- @w_mousethr.set(@mousethr)
-
- @w_screenblank.set(@w_screenbla.get)
- @w_screenpat.set(@w_screenbla.get)
-
- @w_screentim.set(@screentim)
- @w_screencyc.set(@screencyc)
- end
-
- #
- # Create all windows, and pack them
- #
- class LabelEntry
- def initialize(parent, text, length)
- @frame = TkFrame.new(parent)
- TkLabel.new(@frame, 'text'=>text).pack('side'=>'left','expand'=>'y')
- @entry = TkEntry.new(@frame, 'width'=>length, 'relief'=>'sunken') {
- pack('side'=>'left','expand'=>'y')
- }
- end
- def pack(keys)
- @frame.pack(keys)
- end
- def get
- @entry.value
- end
- def set(value)
- @entry.delete(0,'end')
- @entry.insert(0, value)
- end
- end
-
- def createwindows
- win = self
-
- #
- # Buttons
- #
- buttons = TkFrame.new(@root) {|f|
- [ TkButton.new(f, 'command'=>proc{win.ok}, 'text'=>'Ok'),
- TkButton.new(f, 'command'=>proc{win.writesettings}, 'text'=>'Apply'),
- TkButton.new(f, 'command'=>proc{win.cancel}, 'text'=>'Cancel'),
- TkButton.new(f, 'command'=>proc{win.quit}, 'text'=>'Quit') ].each{|b|
- b.pack('side'=>'left', 'expand'=>'yes', 'pady'=>5)
- }
- }
-
- #
- # Bell settings
- #
- bell = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2)
- l = TkLabel.new(bell, 'text'=>'Bell Settings')
- @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200,
- 'tickinterval'=>20, 'orient'=>'horizontal',
- 'label'=>"Volume (%)")
-
- f = TkFrame.new(bell)
- @w_bellpit = LabelEntry.new(f, "Pitch (Hz)", 6)
- @w_bellpit.pack('side'=>'left', 'padx'=>5)
- @w_belldur = LabelEntry.new(f, "Duration (ms)", 6)
- @w_belldur.pack('side'=>'right', 'padx'=>5)
-
- l.pack('side'=>'top', 'expand'=>'yes')
- @w_bellvol.pack('side'=>'top', 'expand'=>'yes')
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Keyboard settings
- #
- kbdonoff = nil
- kbdcli = nil
- kbd = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2)
- l = TkLabel.new(kbd, 'text'=>'Keyboard Repeat Settings')
- f = TkFrame.new(kbd)
- @w_kbdonoff = TkCheckButton.new(f, 'text'=>'On', 'relief'=>'flat',
- 'onvalue'=>'on', 'offvalue'=>'off',
- 'variable'=>@w_kbdrep ) {
- def self.set(value)
- if value == 'on'
- self.select
- else
- self.deselect
- end
- end
- pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both')
- }
- @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200,
- 'tickinterval'=>20, 'orient'=>'horizontal',
- 'label'=>'Click Volume (%)')
- @w_kbdcli.pack('side'=>'left', 'expand'=>'yes')
- l.pack('side'=>'top', 'expand'=>'yes')
- f.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'fill'=>'x')
-
- #
- # Mouse settings
- #
- mouse = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2)
- l = TkLabel.new(mouse, 'text'=>'Mouse Settings')
- f = TkFrame.new(mouse)
- @w_mouseacc = LabelEntry.new(f, 'Acceleration', 3)
- @w_mouseacc.pack('side'=>'left')
- @w_mousethr = LabelEntry.new(f, 'Threshold (pixels)', 3)
- @w_mousethr.pack('side'=>'right')
- l.pack('side'=>'top')
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Screen Saver settings
- #
- screen = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2)
- l = TkLabel.new(screen, 'text'=>'Screen-saver Settings')
- f = TkFrame.new(screen)
- ff1 = TkFrame.new(f)
- [ @w_screenblank = TkRadioButton.new(ff1, 'text'=>'Blank',
- 'relief'=>'flat',
- 'variable'=>@w_screenbla,
- 'value'=>'blank') {
- def self.set(value)
- if value == 'blank'
- self.select
- else
- self.deselect
- end
- end
- },
- @w_screenpat = TkRadioButton.new(ff1, 'text'=>'Pattern',
- 'relief'=>'flat',
- 'variable'=>@w_screenbla,
- 'value'=>'noblank') {
- def self.set(value)
- if value != 'blank'
- self.select
- else
- self.deselect
- end
- end
- }
- ].each {|w| w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') }
-
- ff2 = TkFrame.new(f)
- [ @w_screentim = LabelEntry.new(ff2, 'Timeout (s)', 5),
- @w_screencyc = LabelEntry.new(ff2, 'Cycle (s)', 5) ].each{|w|
- w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'e')
- }
-
- ff1.pack('side'=>'left')
- ff2.pack('side'=>'left')
-
- l.pack('side'=>'top')
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Main window
- #
- buttons.pack('side'=>'top', 'fill'=>'both')
- bell.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes')
- kbd.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes')
- mouse.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes')
- screen.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes')
-
- #
- # Let the user resize our window
- #
- @root.minsize(10,10)
- end
-
- def initialize
- @root = TkRoot.new
-
- @kbdrep = 'on'
- @w_kbdrep = TkVariable.new(@kbdrep)
- def @w_kbdrep.get
- self.value
- end
- def @w_kbdrep.set(val)
- self.value=val
- end
-
- @kbdcli = 0
-
- @bellvol = 100
- @bellpit = 440
- @belldur = 100
-
- @mouseacc = "3/1"
- @mousethr = 4
-
- @screenbla = "blank"
- @w_screenbla = TkVariable.new(@screenbla)
- def @w_screenbla.get
- self.value
- end
- def @w_screenbla.set(val)
- self.value=val
- end
-
- @screentim = 600
- @screencyc = 600
-
- #
- # Listen what "xset" tells us...
- #
- readsettings
-
- #
- # Create all windows
- #
- createwindows
-
- #
- # Write xset parameters
- #
- dispsettings
- end
-end
-
-Xsettings.new
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/ixset2 b/ext/tk/sample/demos-jp/ixset2
deleted file mode 100644
index e11ce2ac8f..0000000000
--- a/ext/tk/sample/demos-jp/ixset2
+++ /dev/null
@@ -1,369 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: utf-8 -*-
-#
-# ixset --
-# A nice interface to "xset" to change X server settings
-#
-
-require 'tk'
-
-class Xsettings
- #
- # Button actions
- #
- def quit
- @root.destroy
- end
-
- def ok
- writesettings
- quit
- end
-
- def cancel
- readsettings
- dispsettings
- @btn_APPLY.state(:disabled)
- @btn_CANCEL.state(:disabled)
- end
-
- # apply is just "writesettings"
- def apply
- writesettings
- @btn_APPLY.state(:disabled)
- @btn_CANCEL.state(:disabled)
- end
-
- #
- # Read current settings
- #
- def readsettings
- xfd = open("|xset q", 'r')
- xfd.readlines.each{|line|
- fields = line.chomp.strip.split(/\s+/)
- case fields[0]
- when "auto"
- if fields[1] == 'repeat:'
- @kbdrep = fields[2]
- @w_kbdrep.set(@kbdrep)
- @kbdcli = fields[6]
- end
-
- when "bell"
- @bellvol = fields[2]
- @bellpit = fields[5]
- @belldur = fields[8]
-
- when "acceleration:"
- @mouseacc = fields[1]
- @mousethr = fields[3]
-
- when "prefer"
- if fields[2] == 'yes'
- @screenbla = 'blank'
- else
- @screenbla = 'noblank'
- end
- @w_screenbla.set(@screenbla)
-
- when "timeout:"
- @screentim = fields[1]
- @screencyc = fields[3]
-
- end
- }
-
- xfd.close
- end
-
- #
- # Write settings into the X server
- #
- def writesettings
- @bellvol = @w_bellvol.get
- @bellpit = @w_bellpit.get
- @belldur = @w_belldur.get
-
- @kbdrep = @w_kbdrep.get
- if @kbdrep == 'on'
- @kbdcli = @w_kbdcli.get
- else
- @kbdcli = 'off'
- end
-
- @mouseacc = @w_mouseacc.get
- @mousethr = @w_mousethr.get
-
- @screentim = @w_screentim.get
- @screencyc = @w_screencyc.get
- @screenbla = @w_screenbla.get
-
- system("xset \
- b #{@bellvol} #{@bellpit} #{@belldur} \
- c #{@kbdcli} \
- r #{@kbdrep} \
- m #{@mouseacc} #{@mousethr} \
- s #{@screentim} #{@screencyc} \
- s #{@screenbla}")
- end
-
- #
- # Sends all settings to the window
- #
- def dispsettings
- @w_bellvol.set(@bellvol)
- @w_bellpit.set(@bellpit)
- @w_belldur.set(@belldur)
-
- @w_kbdonoff.set(@w_kbdrep.get)
- @w_kbdcli.set(@kbdcli)
-
- @w_mouseacc.set(@mouseacc)
- @w_mousethr.set(@mousethr)
-
- @w_screenblank.set(@w_screenbla.get)
- @w_screenpat.set(@w_screenbla.get)
-
- @w_screentim.set(@screentim)
- @w_screencyc.set(@screencyc)
- end
-
- #
- # Create all windows, and pack them
- #
- class LabelEntry
- def initialize(parent, text, length, range=[])
- @frame = TkFrame.new(parent)
- TkLabel.new(@frame, 'text'=>text).pack('side'=>'left')
- if range.size > 0
- @entry = TkSpinbox.new(@frame, 'width'=>length, 'relief'=>'sunken',
- 'from'=>range[0], 'to'=>range[1])
- else
- @entry = TkEntry.new(@frame, 'width'=>length, 'relief'=>'sunken')
- end
- @entry.pack('side'=>'right','expand'=>'y', 'fill'=>'x')
- end
- def epath
- @frame
- end
- def pack(keys)
- @frame.pack(keys)
- end
- def get
- @entry.value
- end
- def set(value)
- @entry.delete(0,'end')
- @entry.insert(0, value)
- end
- end
-
- def createwindows
- win = self
-
- #
- # Buttons
- #
- btn_frame = TkFrame.new(@root)
- buttons = [
- @btn_OK = TkButton.new(btn_frame, 'command'=>proc{win.ok},
- 'default'=>'active', 'text'=>'了解'),
- @btn_APPLY = TkButton.new(btn_frame, 'command'=>proc{win.writesettings},
- 'default'=>'normal', 'text'=>'é©ç”¨',
- 'state'=>'disabled'),
- @btn_CANCEL = TkButton.new(btn_frame, 'command'=>proc{win.cancel},
- 'default'=>'normal', 'text'=>'å–消',
- 'state'=>'disabled'),
- @btn_QUIT = TkButton.new(btn_frame, 'command'=>proc{win.quit},
- 'default'=>'normal', 'text'=>'中止')
- ]
- buttons.each{|b| b.pack('side'=>'left', 'expand'=>'yes', 'pady'=>5) }
-
- @root.bind('Return', proc{@btn_OK.flash; @btn_OK.invoke})
- @root.bind('Escape', proc{@btn_QUIT.flash; @btn_QUIT.invoke})
- @root.bind('1', proc{|w|
- unless buttons.index(w)
- @btn_APPLY.state(:normal)
- @btn_CANCEL.state(:normal)
- end
- }, '%W')
- @root.bind('Key', proc{|w, k|
- unless buttons.index(w)
- case k
- when 'Return', 'Escape', 'Tab', /.*Shift.*/
- # do nothing
- else
- @btn_APPLY.state(:normal)
- @btn_CANCEL.state(:normal)
- end
- end
- }, '%W %K')
-
- #
- # Bell settings
- #
- bell = TkLabelframe.new(@root, 'text'=>'ベル設定',
- 'padx'=>'1.5m', 'pady'=>'1.5m')
- @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200,
- 'tickinterval'=>20, 'orient'=>'horizontal',
- 'label'=>"éŸ³é‡ (%)")
-
- f = TkFrame.new(bell)
- @w_bellpit = LabelEntry.new(f, "音程 (Hz)", 6, [25, 20000])
- @w_bellpit.pack('side'=>'left', 'padx'=>5)
- @w_belldur = LabelEntry.new(f, "æŒç¶šæ™‚é–“ (ms)", 6, [1, 10000])
- @w_belldur.pack('side'=>'right', 'padx'=>5)
-
- @w_bellvol.pack('side'=>'top', 'expand'=>'yes')
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Keyboard settings
- #
- kbdonoff = nil
- kbdcli = nil
- kbd = TkLabelframe.new(@root, 'text'=>'キーボードリピート設定',
- 'padx'=>'1.5m', 'pady'=>'1.5m')
- f = TkFrame.new(kbd)
- @w_kbdonoff = TkCheckButton.new(f, 'text'=>'クリック音ã‚ã‚Š',
- 'relief'=>'flat',
- 'onvalue'=>'on', 'offvalue'=>'off',
- 'variable'=>@w_kbdrep ) {
- def self.set(value)
- if value == 'on'
- self.select
- else
- self.deselect
- end
- end
- pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x', 'padx'=>[0, '1m'])
- }
- @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200,
- 'tickinterval'=>20, 'orient'=>'horizontal',
- 'label'=>'ã‚¯ãƒªãƒƒã‚¯éŸ³é‡ (%)')
- @w_kbdcli.pack('side'=>'left', 'expand'=>'yes',
- 'fill'=>'x', 'padx'=>['1m', 0])
- f.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'fill'=>'x')
-
- #
- # Mouse settings
- #
- mouse = TkLabelframe.new(@root, 'text'=>'マウス設定',
- 'padx'=>'1.5m', 'pady'=>'1.5m')
- f = TkFrame.new(mouse)
- @w_mouseacc = LabelEntry.new(f, '加速é‡', 5)
- @w_mouseacc.pack('side'=>'left', 'padx'=>[0, '1m'])
- @w_mousethr = LabelEntry.new(f, '閾値 (pixels)', 3, [1, 2000])
- @w_mousethr.pack('side'=>'right', 'padx'=>['1m', 0])
- f.pack('side'=>'top', 'expand'=>'yes')
-
- #
- # Screen Saver settings
- #
- screen = TkLabelframe.new(@root, 'text'=>'スクリーンセーãƒè¨­å®š',
- 'padx'=>'1.5m', 'pady'=>'1.5m')
- @w_screenblank = TkRadioButton.new(screen, 'text'=>'ブランク表示',
- 'relief'=>'flat', 'anchor'=>'w',
- 'variable'=>@w_screenbla,
- 'value'=>'blank') {
- def self.set(value)
- if value == 'blank'
- self.select
- else
- self.deselect
- end
- end
- }
-
- @w_screenpat = TkRadioButton.new(screen, 'text'=>'パターン表示',
- 'relief'=>'flat', 'anchor'=>'w',
- 'variable'=>@w_screenbla,
- 'value'=>'noblank') {
- def self.set(value)
- if value != 'blank'
- self.select
- else
- self.deselect
- end
- end
- }
-
- @w_screentim = LabelEntry.new(screen, 'タイムアウト (s)', 5, [1, 100000])
- @w_screencyc = LabelEntry.new(screen, '周期 (s)', 5, [1, 100000])
-
- Tk.grid(@w_screenblank, @w_screentim, 'sticky'=>'e')
- Tk.grid(@w_screenpat, @w_screencyc, 'sticky'=>'e')
- TkGrid.configure(@w_screenblank, @w_screenpat, 'sticky'=>'ew')
-
- #
- # Main window
- #
- param = {
- 'side'=>'top', 'fill'=>'both', 'expand'=>'yes',
- 'padx'=>'1m', 'pady'=>'1m'
- }
- btn_frame.pack('side'=>'top', 'fill'=>'both')
- bell.pack(param)
- kbd.pack(param)
- mouse.pack(param)
- screen.pack(param)
-
- #
- # Let the user resize our window
- #
- @root.minsize(10,10)
- end
-
- def initialize(title)
- @root = TkRoot.new('title'=>title)
-
- @kbdrep = 'on'
- @w_kbdrep = TkVariable.new(@kbdrep)
- def @w_kbdrep.get
- self.value
- end
- def @w_kbdrep.set(val)
- self.value=val
- end
-
- @kbdcli = 0
-
- @bellvol = 100
- @bellpit = 440
- @belldur = 100
-
- @mouseacc = "3/1"
- @mousethr = 4
-
- @screenbla = "blank"
- @w_screenbla = TkVariable.new(@screenbla)
- def @w_screenbla.get
- self.value
- end
- def @w_screenbla.set(val)
- self.value=val
- end
-
- @screentim = 600
- @screencyc = 600
-
- #
- # Listen what "xset" tells us...
- #
- readsettings
-
- #
- # Create all windows
- #
- createwindows
-
- #
- # Write xset parameters
- #
- dispsettings
- end
-end
-
-Xsettings.new(File.basename($0,'.rb'))
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/knightstour.rb b/ext/tk/sample/demos-jp/knightstour.rb
deleted file mode 100644
index f4de10b3b3..0000000000
--- a/ext/tk/sample/demos-jp/knightstour.rb
+++ /dev/null
@@ -1,274 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# Based on the widget demo of Tcl/Tk8.5.2
-# The following is the original copyright text.
-#----------------------------------------------------------------------------
-# Copyright (C) 2008 Pat Thoyts <patthoyts@users.sourceforge.net>
-#
-# Calculate a Knight's tour of a chessboard.
-#
-# This uses Warnsdorff's rule to calculate the next square each
-# time. This specifies that the next square should be the one that
-# has the least number of available moves.
-#
-# Using this rule it is possible to get to a position where
-# there are no squares available to move into. In this implementation
-# this occurs when the starting square is d6.
-#
-# To solve this fault an enhancement to the rule is that if we
-# have a choice of squares with an equal score, we should choose
-# the one nearest the edge of the board.
-#
-# If the call to the Edgemost function is commented out you can see
-# this occur.
-#
-# You can drag the knight to a specific square to start if you wish.
-# If you let it repeat then it will choose random start positions
-# for each new tour.
-#----------------------------------------------------------------------------
-require 'tk'
-
-class Knights_Tour
- # Return a list of accessible squares from a given square
- def valid_moves(square)
- moves = []
- [
- [-1,-2], [-2,-1], [-2,1], [-1,2], [1,2], [2,1], [2,-1], [1,-2]
- ].each{|col_delta, row_delta|
- col = (square % 8) + col_delta
- row = (square.div(8)) + row_delta
- moves << (row * 8 + col) if row > -1 && row < 8 && col > -1 && col < 8
- }
- moves
- end
-
- # Return the number of available moves for this square
- def check_square(square)
- valid_moves(square).find_all{|pos| ! @visited.include?(pos)}.length
- end
-
- # Select the next square to move to. Returns -1 if there are no available
- # squares remaining that we can move to.
- def next_square(square)
- minimum = 9
- nxt = -1
- valid_moves(square).each{|pos|
- unless @visited.include?(pos)
- cnt = check_square(pos)
- if cnt < minimum
- minimum = cnt
- nxt = pos
- elsif cnt == minimum
- nxt = edgemost(nxt, pos)
- end
- end
- }
- nxt
- end
-
- # Select the square nearest the edge of the board
- def edgemost(nxt, pos)
- col_A = 3 - ((3.5 - nxt % 8).abs.to_i)
- col_B = 3 - ((3.5 - pos % 8).abs.to_i)
- row_A = 3 - ((3.5 - nxt.div(8)).abs.to_i)
- row_B = 3 - ((3.5 - pos.div(8)).abs.to_i)
- (col_A * row_A < col_B * row_B)? nxt : pos
- end
-
- # Display a square number as a standard chess square notation.
- def _N(square)
- '%c%d' % [(97 + square % 8), (square.div(8) + 1)]
- end
-
- # Perform a Knight's move and schedule the next move.
- def move_piece(last, square)
- @log.insert(:end, "#{@visited.length}. #{_N last} -> #{_N square}\n", '')
- @log.see(:end)
- @board.itemconfigure(1+last, :state=>:normal, :outline=>'black')
- @board.itemconfigure(1+square, :state=>:normal, :outline=>'red')
- @knight.coords(@board.coords(1+square)[0..1])
- @visited << square
- if (nxt = next_square(square)) != -1
- @after_id = Tk.after(@delay.numeric){move_piece(square, nxt) rescue nil}
- else
- @start_btn.state :normal
- if @visited.length == 64
- if @initial == square
- @log.insert :end, '周éŠ(closed tour)æˆåŠŸï¼'
- else
- @log.insert :end, "æˆåŠŸ\n", {}
- Tk.after(@delay.numeric * 2){tour(rand(64))} if @continuous.bool
- end
- else
- @log.insert :end, "失敗ï¼\n", {}
- end
- end
- end
-
- # Begin a new tour of the board given a random start position
- def tour(square = nil)
- @visited.clear
- @log.clear
- @start_btn.state :disabled
- 1.upto(64){|n|
- @board.itemconfigure(n, :state=>:disabled, :outline=>'black')
- }
- unless square
- square = @board.find_closest(*(@knight.coords << 0 << 65))[0].to_i - 1
- end
- @initial = square
- Tk.after_idle{ move_piece(@initial, @initial) rescue nil }
- end
-
- def _stop
- Tk.after_cancel(@after_id) rescue nil
- end
-
- def _exit
- _stop
- $knightstour.destroy
- end
-
- def set_delay(new)
- @delay.numeric = new.to_i
- end
-
- def drag_start(w, x, y)
- w.dtag('selected')
- w.addtag('selected', :withtag, 'current')
- @dragging = [x, y]
- end
-
- def drag_motion(w, x, y)
- return unless @dragging
- w.move('selected', x - @dragging[0], y - @dragging[1])
- @dragging = [x, y]
- end
-
- def drag_end(w, x, y)
- square = w.find_closest(x, y, 0, 65)
- w.coords('selected', w.coords(square)[0..1])
- w.dtag('selected')
- @dragging = nil
- end
-
- def make_SeeDismiss
- ## See Code / Dismiss
- frame = Ttk::Frame.new($knightstour)
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'knightstour'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $knightstour.destroy
- $knightstour = nil
- }),
- :padx=>4, :pady=>4)
- frame.grid_columnconfigure(0, :weight=>1)
- frame
- end
-
- def create_gui(parent = nil)
- $knightstour.destroy rescue nil
- $knightstour = Tk::Toplevel.new(parent, :title=>"Knight's tour")
- $knightstour.withdraw
- base_f = Ttk::Frame.new($knightstour)
- @board = Tk::Canvas.new(base_f, :width=>240, :height=>240)
- @log = Tk::Text.new(base_f, :width=>12, :height=>1,
- :font=>'Arial 8', :background=>'white')
- scr = @log.yscrollbar(Ttk::Scrollbar.new(base_f))
-
- @visited = []
- @delay = TkVariable.new(600)
- @continuous = TkVariable.new(false)
-
- tool_f = Ttk::Frame.new($knightstour)
- label = Ttk::Label.new(tool_f, :text=>'実行速度')
- scale = Ttk::Scale.new(tool_f, :from=>8, :to=>2000, :variable=>@delay,
- :command=>proc{|n| set_delay(n)})
- check = Ttk::Checkbutton.new(tool_f, :text=>'å復',
- :variable=>@continuous)
- @start_btn = Ttk::Button.new(tool_f, :text=>'開始',
- :command=>proc{tour()})
- @exit_btn = Ttk::Button.new(tool_f, :text=>'終了',
- :command=>proc{_exit()})
-
- 7.downto(0){|row|
- 0.upto(7){|col|
- if ((col & 1) ^ (row & 1)).zero?
- fill = 'bisque'
- dfill = 'bisque3'
- else
- fill = 'tan3'
- dfill = 'tan4'
- end
- coords = [col * 30 + 4, row * 30 + 4, col * 30 + 30, row * 30 + 30]
- @board.create(TkcRectangle, coords,
- :fill=>fill, :disabledfill=>dfill,
- :width=>2, :state=>:disabled)
- }
- }
-
- @knight_font = TkFont.new(:size=>-24)
- @knight = TkcText.new(@board, 0, 0, :font=>@knight_font,
- :text=>Tk::UTF8_String.new('\u265e'),
- :anchor=>'nw', # :tags=>'knight',
- :fill=>'black', :activefill=>'#600000')
- @knight.coords(@board.coords(rand(64)+1)[0..1])
- @knight.bind('ButtonPress-1', '%W %x %y'){|w,x,y| drag_start(w,x,y)}
- @knight.bind('Motion', '%W %x %y'){|w,x,y| drag_motion(w,x,y)}
- @knight.bind('ButtonRelease-1', '%W %x %y'){|w,x,y| drag_end(w,x,y)}
-
- Tk.grid(@board, @log, scr, :sticky=>'news')
- base_f.grid_rowconfigure(0, :weight=>1)
- base_f.grid_columnconfigure(0, :weight=>1)
-
- Tk.grid(base_f, '-', '-', '-', '-', '-', :sticky=>'news')
- widgets = [label, scale, check, @start_btn]
- sg = nil
- unless $RubyTk_WidgetDemo
- widgets << @exit_btn
- if Tk.windowingsystem != 'aqua'
- #widgets.unshift(Ttk::SizeGrip.new(tool_f))
- Ttk::SizeGrip.new(tool_f).pack(:side=>:right, :anchor=>'se')
- end
- end
- Tk.pack(widgets, :side=>:right)
- if Tk.windowingsystem == 'aqua'
- TkPack.configure(widgets, :padx=>[4, 4], :pady=>[12, 12])
- TkPack.configure(widgets[0], :padx=>[4, 24])
- TkPack.configure(widgets[-1], :padx=>[16, 4])
- end
-
- Tk.grid(tool_f, '-', '-', '-', '-', '-', :sticky=>'ew')
-
- if $RubyTk_WidgetDemo
- Tk.grid(make_SeeDismiss(), '-', '-', '-', '-', '-', :sticky=>'ew')
- end
-
- $knightstour.grid_rowconfigure(0, :weight=>1)
- $knightstour.grid_columnconfigure(0, :weight=>1)
-
- $knightstour.bind('Control-F2'){TkConsole.show}
- $knightstour.bind('Return'){@start_btn.invoke}
- $knightstour.bind('Escape'){@exit_btn.invoke}
- $knightstour.bind('Destroy'){ _stop }
- $knightstour.protocol('WM_DELETE_WINDOW'){ _exit }
-
- $knightstour.deiconify
- $knightstour.tkwait_destroy
- end
-
- def initialize(parent = nil)
- create_gui(parent)
- end
-end
-
-Tk.root.withdraw unless $RubyTk_WidgetDemo
-Thread.new{Tk.mainloop} if __FILE__ == $0
-Knights_Tour.new
diff --git a/ext/tk/sample/demos-jp/label.rb b/ext/tk/sample/demos-jp/label.rb
deleted file mode 100644
index 6164ac1ebc..0000000000
--- a/ext/tk/sample/demos-jp/label.rb
+++ /dev/null
@@ -1,70 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# label widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($label_demo) && $label_demo
- $label_demo.destroy
- $label_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$label_demo = TkToplevel.new {|w|
- title("Label Demonstration")
- iconname("label")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($label_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "下ã«ã¯5ã¤ã®ãƒ©ãƒ™ãƒ«ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚å·¦å´ã«ã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ©ãƒ™ãƒ«ãŒ3ã¤ã‚ã‚Šã€å³å´ã«ã¯ãƒ“ットマップラベルã¨ãƒ†ã‚­ã‚¹ãƒˆãƒ©ãƒ™ãƒ«ãŒã‚ã‚Šã¾ã™ã€‚ラベルã¨ã„ã†ã®ã¯ã‚ã¾ã‚Šé¢ç™½ã„ã‚‚ã®ã§ã¯ã‚ã‚Šã¾ã›ã‚“。ãªãœãªã‚‰çœºã‚る以外何もã§ããªã„ã‹ã‚‰ã§ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $label_demo
- $label_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'label'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# label demo 用フレーム生æˆ
-f_left = TkFrame.new(base_frame)
-f_right = TkFrame.new(base_frame)
-[f_left, f_right].each{|w| w.pack('side'=>'left', 'expand'=>'yes',
- 'padx'=>10, 'pady'=>10, 'fill'=>'both')}
-
-# label 生æˆ
-[ TkLabel.new(f_left, 'text'=>'最åˆã®ãƒ©ãƒ™ãƒ«'),
- TkLabel.new(f_left, 'text'=>'2 番目。ã¡ã‚‡ã£ã¨æµ®ã上ãŒã‚‰ã›ã¦ã¿ã¾ã—ãŸ',
- 'relief'=>'raised'),
- TkLabel.new(f_left, 'text'=>'3 番目。沈んã§ã„ã¾ã™ ', 'relief'=>'sunken')
-].each{|w| w.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'anchor'=>'w')}
-
-# TkLabel.new(f_right) {
-Tk::Label.new(f_right) {
- bitmap('@' + [$demo_dir,'..','images','face.xbm'].join(File::Separator))
- borderwidth 2
- relief 'sunken'
-}.pack('side'=>'top')
-
-TkLabel.new(f_right) { text 'Tcl/Tk 所有者' }.pack('side'=>'top')
diff --git a/ext/tk/sample/demos-jp/labelframe.rb b/ext/tk/sample/demos-jp/labelframe.rb
deleted file mode 100644
index 3dcd1dc3f1..0000000000
--- a/ext/tk/sample/demos-jp/labelframe.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# labelframe.rb
-#
-# This demonstration script creates a toplevel window containing
-# several labelframe widgets.
-#
-# based on "Id: labelframe.tcl,v 1.2 2001/10/30 11:21:50 dkf Exp"
-
-
-if defined?($labelframe_demo) && $labelframe_demo
- $labelframe_demo.destroy
- $labelframe_demo = nil
-end
-
-$labelframe_demo = TkToplevel.new {|w|
- title("Labelframe Demonstration")
- iconname("labelframe")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($labelframe_demo).pack(:fill=>:both, :expand=>true)
-
-# Some information
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-TkLabelFrame ウィジェットã¯é–¢é€£ã™ã‚‹ widget
-群をã¾ã¨ã‚ã¦å–り扱ã†ãŸã‚ã«ç”¨ã„られã¾ã™ã€‚ラ
-ベルã¯é€šå¸¸ã®æ–‡å­—列ã§ã‚‚何らã‹ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆ
-ã§ã‚‚ã‹ã¾ã„ã¾ã›ã‚“。もã—ã‚ãªãŸãŒä½¿ã£ã¦ã„ã‚‹
-Ruby ã«ãƒªãƒ³ã‚¯ã•ã‚Œã¦ã„ã‚‹ Tk ライブラリãŒ
-labelframe ウィジェットを実装ã—ã¦ã„ãªã„
-å ´åˆã€ã“ã®ãƒ‡ãƒ¢ã¯ã†ã¾ãå‹•ã‹ãªã„ã¯ãšã§ã™ã€‚
-ãã®å ´åˆã«ã¯ labelframe ウィジェットãŒå®Ÿè£…
-ã•ã‚Œã¦ã„るよã†ãªã‚ˆã‚Šæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® Tk
-を組ã¿åˆã‚ã›ã¦è©¦ã™ã‚ˆã†ã«ã—ã¦ãã ã•ã„。
-EOL
-
-# The bottom buttons
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'é–‰ã˜ã‚‹', :width=>15, :command=>proc{
- $labelframe_demo.destroy
- $labelframe_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'コードå‚ç…§', :width=>15, :command=>proc{
- showCode 'labelframe'
- }).pack(:side=>:left, :expand=>true)
-}
-
-# Demo area
-w = TkFrame.new(base_frame).pack(:side=>:bottom, :fill=>:both,
- :expand=>true)
-
-# A group of radiobuttons in a labelframe
-TkLabelFrame.new(w, :text=>'é¸æŠžå€¤',
- :padx=>2, :pady=>2) {|f|
- grid(:row=>0, :column=>0, :pady=>'2m', :padx=>'2m')
-
- v = TkVariable.new
- (1..4).each{|i|
- TkRadiobutton.new(f, :text=>"This is value #{i}",
- :variable=>v, :value=>i) {
- pack(:side=>:top, :fill=>:x, :pady=>2)
- }
- }
-}
-
-
-# Using a label window to control a group of options.
-$lfdummy = TkVariable.new(0)
-
-def lfEnableButtons(w)
- TkWinfo.children(w).each{|child|
- next if child.path =~ /\.cb$/
- if $lfdummy == 1
- child.state(:normal)
- else
- child.state(:disabled)
- end
- }
-end
-
-TkLabelFrame.new(w, :pady=>2, :padx=>2){|f|
- TkCheckButton.new(f, :widgetname=>'cb', :variable=>$lfdummy,
- :text=>"オプションを使用", :padx=>0) {|cb|
- command proc{lfEnableButtons(f)}
- f.labelwidget(cb)
- }
- grid(:row=>0, :column=>1, :pady=>'2m', :padx=>'2m')
-
- %w(オプション1 オプション2 オプション3).each{|str|
- TkCheckbutton.new(f, :text=>str).pack(:side=>:top, :fill=>:x, :pady=>2)
- }
-
- lfEnableButtons(f)
-}
-
-TkGrid.columnconfigure(w, [0,1], :weight=>1)
diff --git a/ext/tk/sample/demos-jp/mclist.rb b/ext/tk/sample/demos-jp/mclist.rb
deleted file mode 100644
index a222ed3f81..0000000000
--- a/ext/tk/sample/demos-jp/mclist.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# mclist.rb --
-#
-# This demonstration script creates a toplevel window containing a Ttk
-# tree widget configured as a multi-column listbox.
-#
-# based on "Id: mclist.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($mclist_demo) && $mclist_demo
- $mclist_demo.destroy
- $mclist_demo = nil
-end
-
-$mclist_demo = TkToplevel.new {|w|
- title("Multi-Column List")
- iconname("mclist")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($mclist_demo).pack(:fill=>:both, :expand=>true)
-
-## Explanatory text
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i',
- :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6],
- :text=><<EOL).pack(:fill=>:x)
-Ttkã¨ã¯ï¼Œãƒ†ãƒ¼ãƒžæŒ‡å®šå¯èƒ½ãªæ–°ã—ã„ウィジェット集åˆã§ã™ï¼Ž\
-Ttk::Treeviewウィジェットã¯\
-Ttkウィジェットセットã«å«ã¾ã‚Œã‚‹ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®ä¸€ã¤ã§ï¼Œ\
-ãã‚ŒãŒä¿æŒã™ã‚‹æœ¨æ§‹é€ ã®ãƒ‡ãƒ¼ã‚¿ãã®ã‚‚ã®ã¾ã§ã¯è¡¨ç¤ºã™ã‚‹ã“ã¨ãªã,\
-示ã—ãŸã„情報をマルãƒã‚«ãƒ©ãƒ ã§è¡¨ç¤ºã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼Ž
-ã“ã®ã‚µãƒ³ãƒ—ルã¯ï¼Œè¤‡æ•°ã®ã‚«ãƒ©ãƒ ã‚’æŒã£ãŸãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚’作æˆã™ã‚‹ç°¡å˜ãªä¾‹ã§ã™ï¼Ž
-å„カラムã®ã‚¿ã‚¤ãƒˆãƒ«(heading)をクリックã™ã‚Œã°ï¼Œ\
-ãã®ã‚«ãƒ©ãƒ ã®æƒ…å ±ã«åŸºã¥ã„ã¦ãƒªã‚¹ãƒˆã®ä¸¦ã¹æ›¿ãˆãŒãªã•ã‚Œã‚‹ã¯ãšã§ã™ï¼Ž\
-ã¾ãŸï¼Œã‚«ãƒ©ãƒ ã®ã‚¿ã‚¤ãƒˆãƒ«é–“ã®åŒºåˆ‡ã‚Šéƒ¨åˆ†ã‚’ドラッグã™ã‚‹ã“ã¨ã§ï¼Œ\
-カラムã®å¹…を変更ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼Ž
-EOL
-
-## See Code / Dismiss
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'mclist'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $mclist_demo.destroy
- $mclist_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-container = Ttk::Frame.new(base_frame)
-tree = Ttk::Treeview.new(base_frame, :columns=>%w(country capital currency),
- :show=>:headings)
-if Tk.windowingsystem != 'aqua'
- vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame))
- hsb = tree.xscrollbar(Ttk::Scrollbar.new(base_frame))
-else
- vsb = tree.yscrollbar(Tk::Scrollbar.new(base_frame))
- hsb = tree.xscrollbar(Tk::Scrollbar.new(base_frame))
-end
-
-container.pack(:fill=>:both, :expand=>true)
-Tk.grid(tree, vsb, :in=>container, :sticky=>'nsew')
-Tk.grid(hsb, :in=>container, :sticky=>'nsew')
-container.grid_columnconfigure(0, :weight=>1)
-container.grid_rowconfigure(0, :weight=>1)
-
-## The data we're going to insert
-data = [
- ['アルゼンãƒãƒ³', 'ブエノスアイレス', 'ARS'],
- ['オーストラリア', 'キャンベラ', 'AUD'],
- ['ブラジル', 'ブラジリア', 'BRL'],
- ['カナダ', 'オタワ', 'CAD'],
- ['中国', '北京', 'CNY'],
- ['フランス', 'パリ', 'EUR'],
- ['ドイツ', 'ベルリン', 'EUR'],
- ['インド', 'ニューデリー', 'INR'],
- ['イタリア', 'ローマ', 'EUR'],
- ['日本', 'æ±äº¬', 'JPY'],
- ['メキシコ', 'メキシコシティ', 'MXN'],
- ['ロシア', 'モスクワ', 'RUB'],
- ['å—アフリカ', 'プレトリア', 'ZAR'],
- ['英国', 'ロンドン', 'GBP'],
- ['アメリカ', 'ワシントン D.C.', 'USD'],
-]
-
-## Code to insert the data nicely
-font = Ttk::Style.lookup(tree[:style], :font)
-cols = %w(country capital currency)
-cols.zip(%w(国å 首都 通貨)).each{|col, name|
- tree.heading_configure(col, :text=>name,
- :command=>proc{sort_by(tree, col, false)})
- tree.column_configure(col, :width=>TkFont.measure(font, name))
-}
-
-data.each{|country, capital, currency|
- #tree.insert('', :end, :values=>[country, capital, currency])
- tree.insert(nil, :end, :values=>[country, capital, currency])
- cols.zip([country, capital, currency]).each{|col, val|
- len = TkFont.measure(font, "#{val} ")
- if tree.column_cget(col, :width) < len
- tree.column_configure(col, :width=>len)
- end
- }
-}
-
-## Code to do the sorting of the tree contents when clicked on
-def sort_by(tree, col, direction)
- tree.children(nil).map!{|row| [tree.get(row, col), row.id]} .
- sort(&((direction)? proc{|x, y| y <=> x}: proc{|x, y| x <=> y})) .
- each_with_index{|info, idx| tree.move(info[1], nil, idx)}
-
- tree.heading_configure(col, :command=>proc{sort_by(tree, col, ! direction)})
-end
diff --git a/ext/tk/sample/demos-jp/menu.rb b/ext/tk/sample/demos-jp/menu.rb
deleted file mode 100644
index 012e2458d2..0000000000
--- a/ext/tk/sample/demos-jp/menu.rb
+++ /dev/null
@@ -1,202 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# menus widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($menu_demo) && $menu_demo
- $menu_demo.destroy
- $menu_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$menu_demo = TkToplevel.new {|w|
- title("File Selection Dialogs")
- iconname("menu")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($menu_demo).pack(:fill=>:both, :expand=>true)
-
-# menu frame 生æˆ
-$menu_frame = TkFrame.new(base_frame, 'relief'=>'raised', 'bd'=>2)
-$menu_frame.pack('side'=>'top', 'fill'=>'x')
-
-begin
- windowingsystem = Tk.windowingsystem()
-rescue
- windowingsystem = ""
-end
-
-# label 生æˆ
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
- if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem == "classic" || windowingsystem == "aqua"
- text("ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯æ§˜ã€…ãªãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¨ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚Command-X を入力ã™ã‚‹ã¨ã€XãŒã‚³ãƒžãƒ³ãƒ‰ã‚­ãƒ¼è¨˜å·ã«ç¶šã„ã¦è¡¨ç¤ºã•ã‚Œã¦ã„る文字ãªã‚‰ã°ã€ã‚¢ã‚¯ã‚»ãƒ©ãƒ¬ãƒ¼ã‚¿ã‚’使ã£ãŸé …目起動を行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚メニューè¦ç´ ä¸­ã€æœ€å¾Œã®ã‚‚ã®ã¯ã€ãã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®æœ€åˆã®é …目をé¸æŠžã™ã‚‹ã“ã¨ã§ç‹¬ç«‹ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚")
- else
- text("ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯æ§˜ã€…ãªãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¨ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚Alt-X を入力ã™ã‚‹ã¨ã€XãŒãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ©ã‚¤ãƒ³ä»˜ãã§è¡¨ç¤ºã•ã‚Œã¦ã„る文字ãªã‚‰ã°ã€ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‹ã‚‰ã®æŒ‡å®šãŒã§ãã¾ã™ã€‚矢å°ã‚­ãƒ¼ã§ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®ãƒˆãƒ©ãƒãƒ¼ã‚¹ã‚‚å¯èƒ½ã§ã™ã€‚メニューãŒæŒ‡å®šã•ã‚ŒãŸéš›ã«ã¯ã€ã‚¹ãƒšãƒ¼ã‚¹ã‚­ãƒ¼ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã‚ã‚‹ã„ã¯ã€ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ©ã‚¤ãƒ³ä»˜ãã®æ–‡å­—を入力ã™ã‚‹ã“ã¨ã§ã‚‚実行ã§ãã¾ã™ã€‚メニューã®ã‚¨ãƒ³ãƒˆãƒªãŒã‚¢ã‚¯ã‚»ãƒ©ãƒ¬ãƒ¼ã‚¿ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã¯ã€ãã®ã‚¢ã‚¯ã‚»ãƒ©ãƒ¬ãƒ¼ã‚¿ã‚’入力ã™ã‚‹ã“ã¨ã§ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ãªã—ã«å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚メニューè¦ç´ ä¸­ã€æœ€å¾Œã®ã‚‚ã®ã¯ã€ãã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®æœ€åˆã®é …目をé¸æŠžã™ã‚‹ã“ã¨ã§ç‹¬ç«‹ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚")
- end
-}.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $menu_demo
- $menu_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'menu'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# menu 生æˆ
-TkMenubutton.new($menu_frame, 'text'=>'File', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|file_menu|
- m.configure('menu'=>file_menu)
- add('command', 'label'=>'é–‹ã ...', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"é–‹ã ..."ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'æ–°è¦', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"æ–°è¦"ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'ä¿å­˜', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"ä¿å­˜"ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'ä¿å­˜(指定) ...', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"ä¿å­˜(指定) ..."ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('separator')
- add('command', 'label'=>'プリント設定 ...', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"プリント設定 ..."ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'プリント ...', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"プリント ..."ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('separator')
- add('command', 'label'=>'終了', 'command'=>proc{$menu_demo.destroy})
- }
-}
-
-if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem == "classic" || windowingsystem == "aqua"
- modifier = 'Command'
-elsif $tk_platform['platform'] == 'windows'
- modifier = 'Control'
-else
- modifier = 'Meta'
-end
-
-TkMenubutton.new($menu_frame, 'text'=>'Basic', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|basic_menu|
- m.configure('menu'=>basic_menu)
- add('command', 'label'=>'何もã—ãªã„é•·ã„エントリ')
- ['A','B','C','D','E','F','G'].each{|c|
- # add('command', 'label'=>"文字 \"#{c}\" ã‚’å°å­—", 'underline'=>4,
- add('command', 'label'=>"Print letter \"#{c}\" (文字 \"#{c}\" ã‚’å°å­—)",
- 'underline'=>14,
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
- $menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
- }
- }
-}
-
-TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|cascade_menu|
- m.configure('menu'=>cascade_menu)
- add('command', 'label'=>'Print hello(ã“ã‚“ã«ã¡ã¯)',
- 'command'=>proc{print "Hello(ã“ã‚“ã«ã¡ã¯)\n"},
- 'accelerator'=>"#{modifier}+H", 'underline'=>6)
- $menu_demo.bind("#{modifier}-h", proc{print "Hello(ã“ã‚“ã«ã¡ã¯)\n"})
- add('command', 'label'=>'Print goodbye(ã•ã‚ˆã†ãªã‚‰)',
- 'command'=>proc{print "Goodbye(ã•ã‚ˆã†ãªã‚‰)\n"},
- 'accelerator'=>"#{modifier}+G", 'underline'=>6)
- $menu_demo.bind("#{modifier}-g", proc{print "Goodbye(ã•ã‚ˆã†ãªã‚‰)\n"})
-
- # TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
- TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_check|
- cascade_menu.add('cascade', 'label'=>'Check buttons(ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³)',
- 'menu'=>cascade_check, 'underline'=>0)
- oil = TkVariable.new(0)
- add('check', 'label'=>'オイル点検', 'variable'=>oil)
- trans = TkVariable.new(0)
- add('check', 'label'=>'トランスミッション点検', 'variable'=>trans)
- brakes = TkVariable.new(0)
- add('check', 'label'=>'ブレーキ点検', 'variable'=>brakes)
- lights = TkVariable.new(0)
- add('check', 'label'=>'ライト点検', 'variable'=>lights)
- add('separator')
- add('command', 'label'=>'ç¾åœ¨ã®å€¤ã‚’表示',
- 'command'=>proc{showVars($menu_demo,
- ['オイル点検', oil],
- ['トランスミッション点検', trans],
- ['ブレーキ点検', brakes],
- ['ライト点検', lights])} )
- invoke 1
- invoke 3
- }
-
- #TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
- TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_radio|
- cascade_menu.add('cascade', 'label'=>'Radio buttons(ラジオボタン)',
- 'menu'=>cascade_radio, 'underline'=>0)
- pointSize = TkVariable.new
- add('radio', 'label'=>'10 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>10)
- add('radio', 'label'=>'14 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>14)
- add('radio', 'label'=>'18 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>18)
- add('radio', 'label'=>'24 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>24)
- add('radio', 'label'=>'32 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>32)
- add('separator')
- style = TkVariable.new
- add('radio', 'label'=>'ローマン', 'variable'=>style, 'value'=>'roman')
- add('radio', 'label'=>'ボールド', 'variable'=>style, 'value'=>'bold')
- add('radio', 'label'=>'イタリック', 'variable'=>style, 'value'=>'italic')
- add('separator')
- add('command', 'label'=>'ç¾åœ¨ã®å€¤ã‚’表示',
- 'command'=>proc{showVars($menu_demo,
- ['ãƒã‚¤ãƒ³ãƒˆã‚µã‚¤ã‚º', pointSize],
- ['スタイル', style])} )
- invoke 1
- invoke 7
- }
- }
-}
-
-TkMenubutton.new($menu_frame, 'text'=>'Icons', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|icon_menu|
- m.configure('menu'=>icon_menu)
- add('command',
- 'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'今ã‚ãªãŸãŒé¸æŠžã—ãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®é …ç›®ã¯ãƒ†ã‚­ã‚¹ãƒˆã§ã¯ãªãビットマップを表示ã—ã¦ã„ã¾ã—ãŸã€‚ãれ以外ã®ç‚¹ã§ã¯ä»–ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã¨å¤‰ã‚ã‚Šã¾ã›ã‚“。',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'了解')} )
- ['info', 'questhead', 'error'].each{|icon|
- add('command', 'bitmap'=>icon,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
- }
- }
-}
-
-TkMenubutton.new($menu_frame, 'text'=>'More', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m, 'tearoff'=>false) {|more_menu|
- m.configure('menu'=>more_menu)
- [ 'エントリ','別ã®ã‚¨ãƒ³ãƒˆãƒª','何もã—ãªã„','ã»ã¨ã‚“ã©ä½•ã‚‚ã—ãªã„',
- '人生をæ„義ã‚ã‚‹ã‚‚ã®ã«' ].each{|i|
- add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
- }
- }
-}
-
-TkMenubutton.new($menu_frame, 'text'=>'Colors', 'underline'=>0) {|m|
- pack('side'=>'left')
- TkMenu.new(m) {|colors_menu|
- m.configure('menu'=>colors_menu)
- ['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
- add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
- }
- }
-}
diff --git a/ext/tk/sample/demos-jp/menu84.rb b/ext/tk/sample/demos-jp/menu84.rb
deleted file mode 100644
index ab6d1b85b4..0000000000
--- a/ext/tk/sample/demos-jp/menu84.rb
+++ /dev/null
@@ -1,214 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# menus widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($menu84_demo) && $menu84_demo
- $menu84_demo.destroy
- $menu84_demo = nil
-end
-
-# demo toplevel widget
-$menu84_demo = TkToplevel.new {|w|
- title("File Selection Dialogs")
- iconname("menu84")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($menu84_demo).pack(:fill=>:both, :expand=>true)
-
-begin
- windowingsystem = Tk.windowingsystem()
-rescue
- windowingsystem = ""
-end
-
-# label
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
- if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem == "classic" || windowingsystem == "aqua"
- text("ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’æŒã¤ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ãŒä»˜ã‘られã¦ã„ã¾ã™ã€‚Command+x ('x'ã¯ã‚³ãƒžãƒ³ãƒ‰ã‚­ãƒ¼ã‚·ãƒ³ãƒœãƒ«ã«ç¶šã‘ã¦è¡¨ç¤ºã•ã‚Œã¦ã„る文字ã§ã™) ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã‚‚é …ç›®ã®æ©Ÿèƒ½ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚最後ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¯ã€ãƒžã‚¦ã‚¹ã§ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®å¤–ã«ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ç‹¬ç«‹ã—ãŸãƒ‘レットã¨ãªã‚‹ã‚ˆã†ã«åˆ‡ã‚Šæ”¾ã™ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚")
- else
- text("ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’æŒã¤ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ãŒä»˜ã‘られã¦ã„ã¾ã™ã€‚Alt+x ('x'ã¯ãƒ¡ãƒ‹ãƒ¥ãƒ¼ä¸Šã§ä¸‹ç·šãŒå¼•ã‹ã‚ŒãŸæ–‡å­—ã§ã™) ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã‚‚メニューを呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚矢å°ã‚­ãƒ¼ã‚’使ã£ã¦ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼é–“を移動ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚メニューãŒè¡¨ç¤ºã•ã‚Œã¦ã„る時ã«ã¯ã€ç¾åœ¨ä½ç½®ã®é …目をスペースキーã§é¸æŠžã—ãŸã‚Šã€ä¸‹ç·šãŒå¼•ã‹ã‚ŒãŸæ–‡å­—を入力ã™ã‚‹ã“ã¨ã§ãã®é …目をé¸æŠžã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã‚‚ã—é …ç›®ã«ã‚¢ã‚¯ã‚»ãƒ©ãƒ¬ãƒ¼ã‚¿ã®æŒ‡å®šãŒãªã•ã‚Œã¦ã„ãŸãªã‚‰ã°ã€ãã®æŒ‡å®šã•ã‚ŒãŸã‚­ãƒ¼å…¥åŠ›ã‚’è¡Œã†ã“ã¨ã§ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’表示ã•ã›ã‚‹ã“ã¨ãªã直接ãã®é …ç›®ã®æ©Ÿèƒ½ã‚’呼ã³å‡ºã›ã¾ã™ã€‚最後ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¯ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®æœ€åˆã®é …目をé¸æŠžã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ç‹¬ç«‹ã—ãŸãƒ‘レットã¨ãªã‚‹ã‚ˆã†ã«åˆ‡ã‚Šæ”¾ã™ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚")
- end
-}.pack('side'=>'top')
-
-
-menustatus = TkVariable.new(" ")
-TkFrame.new(base_frame) {|frame|
- TkLabel.new(frame, 'textvariable'=>menustatus, 'relief'=>'sunken',
- 'bd'=>1, 'font'=>['Helvetica', '10'],
- 'anchor'=>'w').pack('side'=>'left', 'padx'=>2,
- 'expand'=>true, 'fill'=>'both')
- pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
-}
-
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $menu84_demo
- $menu84_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'menu84'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-
-# create menu frame
-$menu84_frame = TkMenu.new($menu84_demo, 'tearoff'=>false)
-
-# menu
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'File', 'menu'=>m, 'underline'=>0)
- add('command', 'label'=>'Open...', 'command'=>proc{fail 'ã“ã‚Œã¯å˜ãªã‚‹ãƒ‡ãƒ¢ã§ã™ã‹ã‚‰ã€"Open..." é …ç›®ã®æ©Ÿèƒ½ã¯ç‰¹ã«å®šç¾©ã•ã‚Œã¦ã¯ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'New', 'command'=>proc{fail 'ã“ã‚Œã¯å˜ãªã‚‹ãƒ‡ãƒ¢ã§ã™ã‹ã‚‰ã€"New" é …ç›®ã®æ©Ÿèƒ½ã¯ç‰¹ã«å®šç¾©ã•ã‚Œã¦ã¯ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'Save', 'command'=>proc{fail 'ã“ã‚Œã¯å˜ãªã‚‹ãƒ‡ãƒ¢ã§ã™ã‹ã‚‰ã€"Save" é …ç›®ã®æ©Ÿèƒ½ã¯ç‰¹ã«å®šç¾©ã•ã‚Œã¦ã¯ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'Save As...', 'command'=>proc{fail 'ã“ã‚Œã¯å˜ãªã‚‹ãƒ‡ãƒ¢ã§ã™ã‹ã‚‰ã€"Save As..." é …ç›®ã®æ©Ÿèƒ½ã¯ç‰¹ã«å®šç¾©ã•ã‚Œã¦ã¯ã„ã¾ã›ã‚“。'})
- add('separator')
- add('command', 'label'=>'Print Setup...', 'command'=>proc{fail 'ã“ã‚Œã¯å˜ãªã‚‹ãƒ‡ãƒ¢ã§ã™ã‹ã‚‰ã€"Print Setup..." é …ç›®ã®æ©Ÿèƒ½ã¯ç‰¹ã«å®šç¾©ã•ã‚Œã¦ã¯ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'Print...', 'command'=>proc{fail 'ã“ã‚Œã¯å˜ãªã‚‹ãƒ‡ãƒ¢ã§ã™ã‹ã‚‰ã€"Print..." é …ç›®ã®æ©Ÿèƒ½ã¯ç‰¹ã«å®šç¾©ã•ã‚Œã¦ã¯ã„ã¾ã›ã‚“。'})
- add('separator')
- add('command', 'label'=>'Dismiss Menus Demo', 'command'=>proc{$menu84_demo.destroy})
-}
-
-if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem = "classic" || windowingsystem = "aqua"
- modifier = 'Command'
-elsif $tk_platform['platform'] == 'windows'
- modifier = 'Control'
-else
- modifier = 'Meta'
-end
-
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'Basic', 'menu'=>m, 'underline'=>0)
- add('command', 'label'=>'Long entry that does nothing')
- ['A','B','C','D','E','F','G'].each{|c|
- add('command', 'label'=>"Print letter \"#{c}\"",
- 'underline'=>14,
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
- $menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
- }
-}
-
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'Cascades', 'menu'=>m, 'underline'=>0)
- add('command', 'label'=>'Print hello',
- 'command'=>proc{print "Hello\n"},
- 'accelerator'=>"#{modifier}+H", 'underline'=>6)
- $menu84_demo.bind("#{modifier}-h", proc{print "Hello\n"})
- add('command', 'label'=>'Print goodbye',
- 'command'=>proc{print "Goodbye\n"},
- 'accelerator'=>"#{modifier}+G", 'underline'=>6)
- $menu84_demo.bind("#{modifier}-g", proc{print "Goodbye\n"})
-
- TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
- m.add('cascade', 'label'=>'Check button',
- 'menu'=>cascade_check, 'underline'=>0)
- oil = TkVariable.new(0)
- add('check', 'label'=>'オイル検査', 'variable'=>oil)
- trans = TkVariable.new(0)
- add('check', 'label'=>'トランスミッション検査', 'variable'=>trans)
- brakes = TkVariable.new(0)
- add('check', 'label'=>'ブレーキ検査', 'variable'=>brakes)
- lights = TkVariable.new(0)
- add('check', 'label'=>'ライト検査', 'variable'=>lights)
- add('separator')
- add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu84_demo,
- ['オイル', oil],
- ['トランスミッション', trans],
- ['ブレーキ', brakes],
- ['ライト', lights])} )
- invoke 1
- invoke 3
- }
-
- TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
- m.add('cascade', 'label'=>'Radio buttons',
- 'menu'=>cascade_radio, 'underline'=>0)
- pointSize = TkVariable.new
- add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10)
- add('radio', 'label'=>'14 point', 'variable'=>pointSize, 'value'=>14)
- add('radio', 'label'=>'18 point', 'variable'=>pointSize, 'value'=>18)
- add('radio', 'label'=>'24 point', 'variable'=>pointSize, 'value'=>24)
- add('radio', 'label'=>'32 point', 'variable'=>pointSize, 'value'=>32)
- add('separator')
- style = TkVariable.new
- add('radio', 'label'=>'Roman', 'variable'=>style, 'value'=>'roman')
- add('radio', 'label'=>'Bold', 'variable'=>style, 'value'=>'bold')
- add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic')
- add('separator')
- add('command', 'label'=>'ç¾åœ¨å€¤ã®è¡¨ç¤º',
- 'command'=>proc{showVars($menu84_demo,
- ['pointSize', pointSize],
- ['style', style])} )
- invoke 1
- invoke 7
- }
-}
-
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'Icons', 'menu'=>m, 'underline'=>0)
- add('command', 'hidemargin'=>1,
- 'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'ã‚ãªãŸãŒé¸æŠžã—ãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã¯ã€æ–‡å­—列ã®ä»£ã‚ã‚Šã«ãƒ“ットマップイメージã§é …目を表示ã—ãŸã‚‚ã®ã§ã™ã€‚ãれ以外ã®ç‚¹ã§ã¯ã€ã»ã‹ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã¨ã®é–“ã§ç‰¹ã«é•ã„ãŒã‚ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'é–‰ã˜ã‚‹')} )
- ['info', 'questhead', 'error'].each{|icon|
- add('command', 'bitmap'=>icon, 'hidemargin'=>1,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
- }
-
- entryconfigure(2, :columnbreak=>true)
-}
-
-TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
- $menu84_frame.add('cascade', 'label'=>'More', 'menu'=>m, 'underline'=>0)
- [ 'An entry','Another entry','Does nothing','Does almost nothing',
- 'Make life meaningful' ].each{|i|
- add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
- }
-
- m.entryconfigure('Does almost nothing',
- 'bitmap'=>'questhead', 'compound'=>'left',
- 'command'=>proc{
- TkDialog.new('title'=>'Compound Menu Entry',
- 'message'=>'ã‚ãªãŸãŒé¸æŠžã—ãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã¯ã€ãƒ“ットマップイメージã¨æ–‡å­—列ã¨ã‚’åŒæ™‚ã«ä¸€ã¤ã®é …ç›®ã«è¡¨ç¤ºã™ã‚‹ã‚ˆã†ã«ã—ãŸã‚‚ã®ã§ã™ã€‚ãれ以外ã®ç‚¹ã§ã¯ã€ã»ã‹ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã¨ã®é–“ã§ç‰¹ã«é•ã„ãŒã‚ã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“。',
- 'buttons'=>['了解'], 'bitmap'=>'')
- })
-}
-
-TkMenu.new($menu84_frame) {|m|
- $menu84_frame.add('cascade', 'label'=>'Colors', 'menu'=>m, 'underline'=>0)
- ['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
- add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
- }
-}
-
-$menu84_demo.menu($menu84_frame)
-
-TkMenu.bind('<MenuSelect>', proc{|w|
- begin
- label = w.entrycget('active', 'label')
- rescue
- label = " "
- end
- menustatus.value = label
- Tk.update(true)
- }, '%W')
diff --git a/ext/tk/sample/demos-jp/menu8x.rb b/ext/tk/sample/demos-jp/menu8x.rb
deleted file mode 100644
index c61753dd19..0000000000
--- a/ext/tk/sample/demos-jp/menu8x.rb
+++ /dev/null
@@ -1,234 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# menus widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($menu8x_demo) && $menu8x_demo
- $menu8x_demo.destroy
- $menu8x_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$menu8x_demo = TkToplevel.new {|w|
- title("Menu Demonstration (Tk8.x)")
- iconname("menu")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($menu8x_demo).pack(:fill=>:both, :expand=>true)
-
-# version check
-if $tk_version.to_f < 8.0
-
-# label 生æˆ
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
- text("実行ã—よã†ã¨ã—ãŸã‚¹ã‚¯ãƒªãƒ—ト㯠Tk8.0 以上ã§åˆ©ç”¨ã§ãる機能を利用ã—ã¦ã„ã‚‹ãŸã‚ã€ã‚ãªãŸã® Ruby#{VERSION}/Tk#{$tk_version}#{(Tk::JAPANIZED_TK)? 'jp': ''} ã§ã¯æ­£å¸¸ã«å®Ÿè¡Œã§ãã¾ã›ã‚“。よã£ã¦ãƒ‡ãƒ¢ã®å®Ÿè¡Œã‚’中止ã—ã¾ã—ãŸã€‚ãŸã ã—ã€ä¸‹ã®ã‚³ãƒ¼ãƒ‰å‚照ボタンを押ã™ã“ã¨ã§ã€å®Ÿè¡ŒãŒä¸­æ­¢ã•ã‚ŒãŸã‚¹ã‚¯ãƒªãƒ—トã®ã‚½ãƒ¼ã‚¹ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚")
-}.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $menu8x_demo
- $menu8x_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'menu8x'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-else ; # Tk8.x
-
-begin
- windowingsystem = Tk.windowingsystem()
-rescue
- windowingsystem = ""
-end
-
-# label 生æˆ
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
- if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem == "classic" || windowingsystem == "aqua"
- text("ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯æ§˜ã€…ãªãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¨ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚Command-X を入力ã™ã‚‹ã¨ã€XãŒã‚³ãƒžãƒ³ãƒ‰ã‚­ãƒ¼è¨˜å·ã«ç¶šã„ã¦è¡¨ç¤ºã•ã‚Œã¦ã„る文字ãªã‚‰ã°ã€ã‚¢ã‚¯ã‚»ãƒ©ãƒ¬ãƒ¼ã‚¿ã‚’使ã£ãŸé …目起動を行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚メニューè¦ç´ ä¸­ã€æœ€å¾Œã®ã‚‚ã®ã¯ã€ãã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®æœ€åˆã®é …目をé¸æŠžã™ã‚‹ã“ã¨ã§ç‹¬ç«‹ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚")
- else
- text("ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯æ§˜ã€…ãªãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¨ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰æ§‹æˆã•ã‚Œã¦ã„ã¾ã™ã€‚Alt-X を入力ã™ã‚‹ã¨ã€XãŒãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ©ã‚¤ãƒ³ä»˜ãã§è¡¨ç¤ºã•ã‚Œã¦ã„る文字ãªã‚‰ã°ã€ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‹ã‚‰ã®æŒ‡å®šãŒã§ãã¾ã™ã€‚矢å°ã‚­ãƒ¼ã§ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®ãƒˆãƒ©ãƒãƒ¼ã‚¹ã‚‚å¯èƒ½ã§ã™ã€‚メニューãŒæŒ‡å®šã•ã‚ŒãŸéš›ã«ã¯ã€ã‚¹ãƒšãƒ¼ã‚¹ã‚­ãƒ¼ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã‚ã‚‹ã„ã¯ã€ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ©ã‚¤ãƒ³ä»˜ãã®æ–‡å­—を入力ã™ã‚‹ã“ã¨ã§ã‚‚実行ã§ãã¾ã™ã€‚メニューã®ã‚¨ãƒ³ãƒˆãƒªãŒã‚¢ã‚¯ã‚»ãƒ©ãƒ¬ãƒ¼ã‚¿ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã¯ã€ãã®ã‚¢ã‚¯ã‚»ãƒ©ãƒ¬ãƒ¼ã‚¿ã‚’入力ã™ã‚‹ã“ã¨ã§ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ãªã—ã«å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚メニューè¦ç´ ä¸­ã€æœ€å¾Œã®ã‚‚ã®ã¯ã€ãã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®æœ€åˆã®é …目をé¸æŠžã™ã‚‹ã“ã¨ã§ç‹¬ç«‹ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚")
- end
-}.pack('side'=>'top')
-
-# 状態表示ã®ç”Ÿæˆ
-$menu8xstatus = TkVariable.new(" ")
-TkFrame.new(base_frame) {|frame|
- TkLabel.new(frame, 'textvariable'=>$menu8xstatus, 'relief'=>'sunken',
- 'bd'=>1, 'font'=>['Helvetica', '10'], 'anchor'=>'w')\
- .pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $menu8x_demo
- $menu8x_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'menu8x'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# menu 生æˆ
-TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
- TkMenu.new(m, 'tearoff'=>false) {|file_menu|
- m.add('cascade', 'label'=>'File', 'menu'=>file_menu, 'underline'=>0)
- add('command', 'label'=>'é–‹ã ...', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"é–‹ã ..."ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'æ–°è¦', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"æ–°è¦"ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'ä¿å­˜', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"ä¿å­˜"ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'ä¿å­˜(指定) ...', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"ä¿å­˜(指定) ..."ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('separator')
- add('command', 'label'=>'プリント設定 ...', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"プリント設定 ..."ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('command', 'label'=>'プリント ...', 'command'=>proc{fail 'ã“ã‚Œã¯ã€ãƒ‡ãƒ¢ã§ã™ã®ã§"プリント ..."ã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“。'})
- add('separator')
- add('command', 'label'=>'終了', 'command'=>proc{$menu8x_demo.destroy})
- }
-
- if $tk_platform['platform'] == 'macintosh' ||
- windowingsystem == "classic" || windowingsystem == "aqua"
- modifier = 'Command'
- elsif $tk_platform['platform'] == 'windows'
- modifier = 'Control'
- else
- modifier = 'Meta'
- end
-
- TkMenu.new(m, 'tearoff'=>false) {|basic_menu|
- m.add('cascade', 'label'=>'Basic', 'menu'=>basic_menu, 'underline'=>0)
- add('command', 'label'=>'何もã—ãªã„é•·ã„エントリ')
- ['A','B','C','D','E','F','G'].each{|c|
- # add('command', 'label'=>"文字 \"#{c}\" ã‚’å°å­—", 'underline'=>4,
- add('command', 'label'=>"Print letter \"#{c}\" (文字 \"#{c}\" ã‚’å°å­—)",
- 'underline'=>14,
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
- $menu8x_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
- }
- }
-
- TkMenu.new(m, 'tearoff'=>false) {|cascade_menu|
- m.add('cascade', 'label'=>'Cascades', 'menu'=>cascade_menu, 'underline'=>0)
- add('command', 'label'=>'Print hello(ã“ã‚“ã«ã¡ã¯)',
- 'command'=>proc{print "Hello(ã“ã‚“ã«ã¡ã¯)\n"},
- 'accelerator'=>"#{modifier}+H", 'underline'=>6)
- $menu8x_demo.bind("#{modifier}-h", proc{print "Hello(ã“ã‚“ã«ã¡ã¯)\n"})
- add('command', 'label'=>'Print goodbye(ã•ã‚ˆã†ãªã‚‰)',
- 'command'=>proc{print "Goodbye(ã•ã‚ˆã†ãªã‚‰)\n"},
- 'accelerator'=>"#{modifier}+G", 'underline'=>6)
- $menu8x_demo.bind("#{modifier}-g", proc{print "Goodbye(ã•ã‚ˆã†ãªã‚‰)\n"})
-
- TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
- cascade_menu.add('cascade', 'label'=>'Check buttons(ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³)',
- 'menu'=>cascade_check, 'underline'=>0)
- oil = TkVariable.new(0)
- add('check', 'label'=>'オイル点検', 'variable'=>oil)
- trans = TkVariable.new(0)
- add('check', 'label'=>'トランスミッション点検', 'variable'=>trans)
- brakes = TkVariable.new(0)
- add('check', 'label'=>'ブレーキ点検', 'variable'=>brakes)
- lights = TkVariable.new(0)
- add('check', 'label'=>'ライト点検', 'variable'=>lights)
- add('separator')
- add('command', 'label'=>'ç¾åœ¨ã®å€¤ã‚’表示',
- 'command'=>proc{showVars($menu8x_demo,
- ['オイル点検', oil],
- ['トランスミッション点検', trans],
- ['ブレーキ点検', brakes],
- ['ライト点検', lights])} )
- invoke 1
- invoke 3
- }
-
- TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
- cascade_menu.add('cascade', 'label'=>'Radio buttons(ラジオボタン)',
- 'menu'=>cascade_radio, 'underline'=>0)
- pointSize = TkVariable.new
- add('radio', 'label'=>'10 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>10)
- add('radio', 'label'=>'14 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>14)
- add('radio', 'label'=>'18 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>18)
- add('radio', 'label'=>'24 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>24)
- add('radio', 'label'=>'32 ãƒã‚¤ãƒ³ãƒˆ', 'variable'=>pointSize, 'value'=>32)
- add('separator')
- style = TkVariable.new
- add('radio', 'label'=>'ローマン', 'variable'=>style, 'value'=>'roman')
- add('radio', 'label'=>'ボールド', 'variable'=>style, 'value'=>'bold')
- add('radio', 'label'=>'イタリック', 'variable'=>style, 'value'=>'italic')
- add('separator')
- add('command', 'label'=>'ç¾åœ¨ã®å€¤ã‚’表示',
- 'command'=>proc{showVars($menu8x_demo,
- ['ãƒã‚¤ãƒ³ãƒˆã‚µã‚¤ã‚º', pointSize],
- ['スタイル', style])} )
- invoke 1
- invoke 7
- }
- }
-
- TkMenu.new(m, 'tearoff'=>false) {|icon_menu|
- m.add('cascade', 'label'=>'Icons', 'menu'=>icon_menu, 'underline'=>0)
- add('command',
- 'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
- 'hidemargin'=>1,
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'今ã‚ãªãŸãŒé¸æŠžã—ãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®é …ç›®ã¯ãƒ†ã‚­ã‚¹ãƒˆã§ã¯ãªãビットマップを表示ã—ã¦ã„ã¾ã—ãŸã€‚ãれ以外ã®ç‚¹ã§ã¯ä»–ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã¨å¤‰ã‚ã‚Šã¾ã›ã‚“。',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'了解')} )
- ['info', 'questhead', 'error'].each{|icon|
- add('command', 'bitmap'=>icon, 'hidemargin'=>1,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
- }
-
- entryconfigure(2, 'columnbreak'=>1)
- }
-
- TkMenu.new(m, 'tearoff'=>false) {|more_menu|
- m.add('cascade', 'label'=>'More', 'menu'=>more_menu, 'underline'=>0)
- [ 'エントリ','別ã®ã‚¨ãƒ³ãƒˆãƒª','何もã—ãªã„','ã»ã¨ã‚“ã©ä½•ã‚‚ã—ãªã„',
- '人生をæ„義ã‚ã‚‹ã‚‚ã®ã«' ].each{|i|
- add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
- }
- }
-
- TkMenu.new(m) {|colors_menu|
- m.add('cascade', 'label'=>'Colors', 'menu'=>colors_menu, 'underline'=>1)
- ['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
- add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
- }
- }
-
- $menu8x_demo.configure('menu'=>m)
-}
-
-TkMenu.bind('<MenuSelect>',
- proc{|w|
- begin
- label = w.entrycget('active', 'label')
- rescue
- label = ' '
- end
- $menu8xstatus.value = label
- Tk.update('idletasks')
- }, '%W')
-
-end ; # Tk 8.x
diff --git a/ext/tk/sample/demos-jp/menubu.rb b/ext/tk/sample/demos-jp/menubu.rb
deleted file mode 100644
index 57b1d41420..0000000000
--- a/ext/tk/sample/demos-jp/menubu.rb
+++ /dev/null
@@ -1,239 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-require "tkcanvas"
-
-def optionMenu(menubutton, varName, firstValue, *rest)
- varName.value = firstValue
- configoptions = {'textvariable'=>varName,'indicatoron'=>'on',
- 'relief'=>'raised','borderwidth'=>2,'highlightthickness'=>2,
- 'anchor'=>'c','direction'=>'flush'}
- configoptions.each {|key, value|
- menubutton.configure(key, value)
- }
- menu = TkMenu.new(menubutton) {
- tearoff 'off'
- add 'radio', 'label'=>firstValue, 'variable'=>varName
- }
- menubutton.menu(menu)
- for i in rest
- menu.add 'radio', 'label'=>i, 'variable'=>varName
- end
-
- return menu
-end
-
-if defined?($menubu_demo) && $menubu_demo
- $menubu_demo.destroy
- $menubu_demo = nil
-end
-
-$menubu_demo = TkToplevel.new {|w|
- title("Menu Button Demonstration")
- iconname("menubutton")
-}
-
-positionWindow($menubu_demo)
-
-base_frame = TkFrame.new($menubu_demo).pack(:fill=>:both, :expand=>true)
-
-# version check
-if $tk_version.to_f < 8.0
-
-# label 生æˆ
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
- text("実行ã—よã†ã¨ã—ãŸã‚¹ã‚¯ãƒªãƒ—ト㯠Tk8.0 以上ã§åˆ©ç”¨ã§ãる機能を利用ã—ã¦ã„ã‚‹ãŸã‚ã€ã‚ãªãŸã® Ruby#{VERSION}/Tk#{$tk_version}#{(Tk::JAPANIZED_TK)? 'jp': ''} ã§ã¯æ­£å¸¸ã«å®Ÿè¡Œã§ãã¾ã›ã‚“。よã£ã¦ãƒ‡ãƒ¢ã®å®Ÿè¡Œã‚’中止ã—ã¾ã—ãŸã€‚ãŸã ã—ã€ä¸‹ã®ã‚³ãƒ¼ãƒ‰å‚照ボタンを押ã™ã“ã¨ã§ã€å®Ÿè¡ŒãŒä¸­æ­¢ã•ã‚ŒãŸã‚¹ã‚¯ãƒªãƒ—トã®ã‚½ãƒ¼ã‚¹ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚")
-}.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $menubu_demo
- $menubu_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'menubu'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-else ; # Tk8.x
-
-body = TkFrame.new(base_frame)
-body.pack('expand'=>'yes', 'fill'=>'both')
-
-below = TkMenubutton.new(body) {
- text "Below"
- underline 0
- direction 'below'
- relief 'raised'
-}
-belowMenu = TkMenu.new(below) {
- tearoff 0
- add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""}
- add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""}
-}
-below.menu(belowMenu)
-below.grid('row'=>0, 'column'=>1, 'sticky'=>'n')
-
-below = TkMenubutton.new(body) {
- text "Below"
- underline 0
- direction 'below'
- relief 'raised'
-}
-belowMenu = TkMenu.new(below) {
- tearoff 0
- add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""}
- add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""}
-}
-below.menu(belowMenu)
-below.grid('row'=>0, 'column'=>1, 'sticky'=>'n')
-
-below = TkMenubutton.new(body) {
- text "Below"
- underline 0
- direction 'below'
- relief 'raised'
-}
-belowMenu = TkMenu.new(below) {
- tearoff 0
- add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""}
- add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""}
-}
-below.menu(belowMenu)
-below.grid('row'=>0, 'column'=>1, 'sticky'=>'n')
-
-right = TkMenubutton.new(body) {
- text "Right"
- underline 0
- direction 'right'
- relief 'raised'
-}
-rightMenu = TkMenu.new(right) {
- tearoff 0
- add 'command', 'label'=>"Right menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Left menu.\""}
- add 'command', 'label'=>"Right menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Right menu.\""}
-}
-right.menu(rightMenu)
-right.grid('row'=>1, 'column'=>0, 'sticky'=>'w')
-
-left = TkMenubutton.new(body) {
- text "Left"
- underline 0
- direction 'left'
- relief 'raised'
-}
-leftMenu = TkMenu.new(left) {
- tearoff 0
- add 'command', 'label'=>"Left menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Left menu.\""}
- add 'command', 'label'=>"Left menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Left menu.\""}
-}
-left.menu(leftMenu)
-left.grid('row'=>1, 'column'=>2, 'sticky'=>'e')
-
-center = TkFrame.new(body) {
- grid('row'=>1, 'column'=>1, 'sticky'=>'news')
-}
-
-above = TkMenubutton.new(body) {
- text "Above"
- underline 0
- direction 'above'
- relief 'raised'
-}
-aboveMenu = TkMenu.new(above) {
- tearoff 0
- add 'command', 'label'=>"Above menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Above menu.\""}
- add 'command', 'label'=>"Above menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Above menu.\""}
-}
-above.menu(aboveMenu)
-above.grid('row'=>2, 'column'=>1, 'sticky'=>'s')
-
-center = TkFrame.new(body) {
- grid('row'=>1, 'column'=>1, 'sticky'=>'news')
-}
-
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc {
- tmppath = $menubu_demo
- $menubu_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc { showCode 'menubu' }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'expand'=>'yes', 'fill'=>'x', 'pady'=>'2m')
-
-msg = TkLabel.new(center) {
-# font $font
- wraplength '4i'
- justify 'left'
- text "ã“ã‚Œã¯ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒœã‚¿ãƒ³ã®ãƒ‡ãƒ¢ã§ã™ã€‚\"Below\"ã®ãƒœã‚¿ãƒ³ã¯\
-下ã«ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’出ã—ã€\"Right\"ã®ãƒœã‚¿ãƒ³ã¯å³ã«ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’出ã—ã¦ã€\
-……ã¨ãªã‚Šã¾ã™ã€‚ã“ã®æ–‡ç« ã®ä¸‹ã«ã¯2ã¤ã®ã‚ªãƒ—ションメニューãŒã‚ã‚Šã¾ã™ã€‚\
-1ã¤ã¯æ™®é€šã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§ã€ã‚‚ã†1ã¤ã¯16色ã®ãƒ‘レットã§ã™ã€‚"
-}
-msg.pack('side'=>'top', 'padx'=>25, 'pady'=>25)
-
-TkFrame.new(center) {|f|
- menubuttonoptions = TkVariable.new
- mbutton = TkMenubutton.new(f)
- options = optionMenu(mbutton, menubuttonoptions,
- 'one', 'two', 'three')
- mbutton.pack('side'=>'left', 'padx'=>25, 'pady'=>25)
- paletteColor = TkVariable.new
- colors = ['Black','red4','DarkGreen','NavyBlue', 'gray75',
- 'Red','Green','Blue','gray50','Yellow','Cyan','Magenta',
- 'White','Brown','DarkSeaGreen','DarkViolet']
- colorMenuButton = TkMenubutton.new(f)
- m = optionMenu(colorMenuButton, paletteColor, *colors)
- begin
- windowingsystem = Tk.windowingsystem()
- rescue
- windowingsystem = ""
- end
- if windowingsystem == "classic" || windowingsystem == "aqua"
- topBorderColor = 'Black'
- bottomBorderColor = 'Black'
- else
- topBorderColor = 'gray50'
- bottomBorderColor = 'gray75'
- end
- for i in 0..15
- image = TkPhotoImage.new('height'=>16, 'width'=>16)
- image.put(topBorderColor, 0, 0, 16, 1)
- image.put(topBorderColor, 0, 1, 1, 16)
- image.put(bottomBorderColor, 0, 15, 16, 16)
- image.put(bottomBorderColor, 15, 1, 16, 16)
- image.put(colors[i], 1, 1, 15, 15)
-
- selectimage = TkPhotoImage.new('height'=>16, 'width'=>16)
- selectimage.put('Black', 0, 0, 16, 2)
- selectimage.put('Black', 0, 2, 2, 16)
- selectimage.put('Black', 2, 14, 16, 16)
- selectimage.put('Black', 14, 2, 16, 14)
- selectimage.put(colors[i], 2, 2, 14, 14)
-
- m.entryconfigure(i, 'image'=>image, 'selectimage'=>selectimage, 'hidemargin'=>'on')
- end
- m.configure('tearoff', 'on')
- for c in ['Black', 'gray75', 'gray50', 'White']
- m.entryconfigure(c, 'columnbreak'=>1)
- end
- colorMenuButton.pack('side'=>'left', 'padx'=>25, 'pady'=>25)
- pack 'padx'=>25, 'pady'=>25
-}
-
-end ; # Tk8.x
diff --git a/ext/tk/sample/demos-jp/msgbox.rb b/ext/tk/sample/demos-jp/msgbox.rb
deleted file mode 100644
index 45d8b8e9f9..0000000000
--- a/ext/tk/sample/demos-jp/msgbox.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# message boxes widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($msgbox_demo) && $msgbox_demo
- $msgbox_demo.destroy
- $msgbox_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$msgbox_demo = TkToplevel.new {|w|
- title("Message Box Demonstration")
- iconname("messagebox")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($msgbox_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"ã¾ãšè¡¨ç¤ºã™ã‚‹ã‚¢ã‚¤ã‚³ãƒ³ã¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒœãƒƒã‚¯ã‚¹ã®ç¨®é¡žã‚’é¸ã‚“ã§ä¸‹ã•ã„。ãã®å¾Œã«\"メッセージボックス\"ボタンを押ã™ã¨ã€æŒ‡å®šã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚").pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $msgbox_demo
- $msgbox_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'msgbox'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'メッセージボックス'
- command proc{showMessageBox $msgbox_demo}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-$msgbox_leftframe = TkFrame.new(base_frame)
-$msgbox_rightframe = TkFrame.new(base_frame)
-$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
-$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
-
-TkLabel.new($msgbox_leftframe, 'text'=>'アイコン').pack('side'=>'top')
-TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
-.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
-
-$msgboxIcon = TkVariable.new('info')
-['error', 'info', 'question', 'warning'].each {|icon|
- TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon,
- 'relief'=>'flat', 'value'=>icon, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
-}
-
-TkLabel.new($msgbox_rightframe, 'text'=>'種類').pack('side'=>'top')
-TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
-.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
-
-$msgboxType = TkVariable.new('ok')
-['abortretryignore', 'ok', 'okcancel',
- 'retrycancel', 'yesno', 'yesnocancel'].each {|type|
- TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType,
- 'relief'=>'flat', 'value'=>type, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
-}
-
-def showMessageBox(w)
- button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
- 'title'=>'Message', 'parent'=>w,
- 'message'=>"ã“ã‚Œã¯\"#{$msgboxType.value}\"ã¨ã„ã†ç¨®é¡žã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒœãƒƒã‚¯ã‚¹ã§ã€\"#{$msgboxIcon.value}\"ã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚")
-
- Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
- 'message'=>"ã‚ãªãŸã¯ \"#{button}\" を押ã—ã¾ã—ãŸã­ã€‚")
-end
-
diff --git a/ext/tk/sample/demos-jp/msgbox2.rb b/ext/tk/sample/demos-jp/msgbox2.rb
deleted file mode 100644
index 51a0ca9dcc..0000000000
--- a/ext/tk/sample/demos-jp/msgbox2.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# message boxes widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($msgbox2_demo) && $msgbox2_demo
- $msgbox2_demo.destroy
- $msgbox2_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$msgbox2_demo = TkToplevel.new {|w|
- title("Message Box Demonstration")
- iconname("messagebox")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($msgbox2_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"ã¾ãšè¡¨ç¤ºã™ã‚‹ã‚¢ã‚¤ã‚³ãƒ³ã¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒœãƒƒã‚¯ã‚¹ã®ç¨®é¡žã‚’é¸ã‚“ã§ä¸‹ã•ã„。ãã®å¾Œã«\"メッセージボックス\"ボタンを押ã™ã¨ã€æŒ‡å®šã•ã‚ŒãŸå½¢å¼ã§ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨è©³ç´°ãƒ†ã‚­ã‚¹ãƒˆã¨ã‚’æŒã£ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•ã‚Œã¾ã™ã€‚").pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $msgbox2_demo
- $msgbox2_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'msgbox2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'メッセージボックス'
- command proc{showMessageBox2 $msgbox2_demo}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-$msgbox_leftframe = TkFrame.new(base_frame)
-$msgbox_rightframe = TkFrame.new(base_frame)
-$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
-$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
-
-TkLabel.new($msgbox_leftframe, 'text'=>'アイコン').pack('side'=>'top')
-TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
-.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
-
-$msgboxIcon = TkVariable.new('info')
-['error', 'info', 'question', 'warning'].each {|icon|
- TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon,
- 'relief'=>'flat', 'value'=>icon, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
-}
-
-TkLabel.new($msgbox_rightframe, 'text'=>'種類').pack('side'=>'top')
-TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
-.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
-
-$msgboxType = TkVariable.new('ok')
-['abortretryignore', 'ok', 'okcancel',
- 'retrycancel', 'yesno', 'yesnocancel'].each {|type|
- TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType,
- 'relief'=>'flat', 'value'=>type, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
-}
-
-def showMessageBox2(w)
- button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
- 'title'=>'Message', 'parent'=>w,
- 'message'=>"\"#{$msgboxType.value}\"タイプã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒœãƒƒã‚¯ã‚¹",
- 'detail'=>"ã“ã‚Œã¯\"#{$msgboxType.value}\"ã¨ã„ã†ç¨®é¡žã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒœãƒƒã‚¯ã‚¹ã§ã€\"#{$msgboxIcon.value}\"ã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚下ã®ãƒœã‚¿ãƒ³ã®ã„ãšã‚Œã‹ã‚’é¸æŠžã—ã¦ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãã ã•ã„。")
-
- Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
- 'message'=>"ã‚ãªãŸã¯ \"#{button}\" を押ã—ã¾ã—ãŸã­ã€‚")
-end
-
diff --git a/ext/tk/sample/demos-jp/paned1.rb b/ext/tk/sample/demos-jp/paned1.rb
deleted file mode 100644
index 96e419bec0..0000000000
--- a/ext/tk/sample/demos-jp/paned1.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# paned1.rb
-#
-# This demonstration script creates a toplevel window containing
-# a paned window that separates two windows horizontally.
-#
-# based on "Id: paned1.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp"
-
-if defined?($paned1_demo) && $paned1_demo
- $paned1_demo.destroy
- $paned1_demo = nil
-end
-
-$paned1_demo = TkToplevel.new {|w|
- title("Horizontal Paned Window Demonstration")
- iconname("paned1")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($paned1_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-下ã®è‰²ä»˜ã‘ã•ã‚ŒãŸäºŒã¤ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®é–“ã®ä»•åˆ‡ã‚Šæž ã¯ã€ä¸€ã¤ã®é ˜åŸŸã‚’ãã‚Œãžã‚Œã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ãŸã‚ã«åˆ†å‰²ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚左ボタンã§ä»•åˆ‡ã‚Šã‚’æ“作ã™ã‚‹ã¨ã€åˆ†å‰²ã‚µã‚¤ã‚ºå¤‰æ›´ã®æ“作途中ã§ã¯å†è¡¨ç¤ºã¯ãªã•ã‚Œãšã€ç¢ºå®šã•ã›ãŸã¨ãã«è¡¨ç¤ºãŒæ›´æ–°ã•ã‚Œã¾ã™ã€‚マウスã«ã‚ˆã‚‹ä»•åˆ‡ã‚Šã®æ“作ã«è¿½éšã—ã¦ã‚µã‚¤ã‚ºã‚’変更ã—ãŸè¡¨ç¤ºãŒãªã‚れるよã†ã«ã—ãŸã„å ´åˆã¯ã€ãƒžã‚¦ã‚¹ã®ä¸­å¤®ãƒœã‚¿ãƒ³ã‚’使ã£ã¦ãã ã•ã„。
-ã‚‚ã—ã‚ãªãŸãŒä½¿ã£ã¦ã„ã‚‹ Ruby ã«ãƒªãƒ³ã‚¯ã•ã‚Œã¦ã„ã‚‹ Tk ライブラリ㌠panedwindow を実装ã—ã¦ã„ãªã„
-å ´åˆã€ã“ã®ãƒ‡ãƒ¢ã¯ã†ã¾ãå‹•ã‹ãªã„ã¯ãšã§ã™ã€‚ãã®å ´åˆã«ã¯ panedwindow ãŒå®Ÿè£…ã•ã‚Œã¦ã„るよã†ãª
-より新ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® Tk を組ã¿åˆã‚ã›ã¦è©¦ã™
-よã†ã«ã—ã¦ãã ã•ã„。
-EOL
-
-# The bottom buttons
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'é–‰ã˜ã‚‹', :width=>15, :command=>proc{
- $paned1_demo.destroy
- $paned1_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'コードå‚ç…§', :width=>15, :command=>proc{
- showCode 'paned1'
- }).pack(:side=>:left, :expand=>true)
-}
-
-TkPanedwindow.new(base_frame, :orient=>:horizontal){|f|
- add(Tk::Label.new(f, :text=>"This is the\nleft side", :bg=>'yellow'),
- Tk::Label.new(f, :text=>"This is the\nright side", :bg=>'cyan'))
-
- pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m')
-}
diff --git a/ext/tk/sample/demos-jp/paned2.rb b/ext/tk/sample/demos-jp/paned2.rb
deleted file mode 100644
index 11a02abe73..0000000000
--- a/ext/tk/sample/demos-jp/paned2.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# paned2.rb --
-#
-# This demonstration script creates a toplevel window containing
-# a paned window that separates two windows vertically.
-#
-# based on "Id: paned2.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp"
-
-if defined?($paned2_demo) && $paned2_demo
- $paned2_demo.destroy
- $paned2_demo = nil
-end
-
-$paned2_demo = TkToplevel.new {|w|
- title("Vertical Paned Window Demonstration")
- iconname("paned2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($paned2_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-下ã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ä»˜ãã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆãŒç½®ã‹ã‚ŒãŸäºŒã¤ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®é–“ã®ä»•åˆ‡ã‚Šæž ã¯ã€ä¸€ã¤ã®é ˜åŸŸã‚’ãã‚Œãžã‚Œã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ãŸã‚ã«åˆ†å‰²ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚左ボタンã§ä»•åˆ‡ã‚Šã‚’æ“作ã™ã‚‹ã¨ã€åˆ†å‰²ã‚µã‚¤ã‚ºå¤‰æ›´ã®æ“作途中ã§ã¯å†è¡¨ç¤ºã¯ãªã•ã‚Œãšã€ç¢ºå®šã•ã›ãŸã¨ãã«è¡¨ç¤ºãŒæ›´æ–°ã•ã‚Œã¾ã™ã€‚マウスã«ã‚ˆã‚‹ä»•åˆ‡ã‚Šã®æ“作ã«è¿½éšã—ã¦ã‚µã‚¤ã‚ºã‚’変更ã—ãŸè¡¨ç¤ºãŒãªã‚れるよã†ã«ã—ãŸã„å ´åˆã¯ã€ãƒžã‚¦ã‚¹ã®ä¸­å¤®ãƒœã‚¿ãƒ³ã‚’使ã£ã¦ãã ã•ã„。
-ã‚‚ã—ã‚ãªãŸãŒä½¿ã£ã¦ã„ã‚‹ Ruby ã«ãƒªãƒ³ã‚¯ã•ã‚Œã¦ã„ã‚‹ Tk ライブラリ㌠panedwindow を実装ã—ã¦ã„ãªã„
-å ´åˆã€ã“ã®ãƒ‡ãƒ¢ã¯ã†ã¾ãå‹•ã‹ãªã„ã¯ãšã§ã™ã€‚ãã®å ´åˆã«ã¯ panedwindow ãŒå®Ÿè£…ã•ã‚Œã¦ã„るよã†ãª
-より新ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® Tk を組ã¿åˆã‚ã›ã¦è©¦ã™
-よã†ã«ã—ã¦ãã ã•ã„。
-EOL
-
-# The bottom buttons
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'é–‰ã˜ã‚‹', :width=>15, :command=>proc{
- $paned2_demo.destroy
- $paned2_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'コードå‚ç…§', :width=>15, :command=>proc{
- showCode 'paned2'
- }).pack(:side=>:left, :expand=>true)
-}
-
-paneList = TkVariable.new # define as normal variable (not array)
-paneList.value = [ # ruby's array --> tcl's list
- 'Ruby/Tk ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆä¸€è¦§',
- 'TkButton',
- 'TkCanvas',
- 'TkCheckbutton',
- 'TkEntry',
- 'TkFrame',
- 'TkLabel',
- 'TkLabelframe',
- 'TkListbox',
- 'TkMenu',
- 'TkMenubutton',
- 'TkMessage',
- 'TkPanedwindow',
- 'TkRadiobutton',
- 'TkScale',
- 'TkScrollbar',
- 'TkSpinbox',
- 'TkText',
- 'TkToplevel'
-]
-
-# Create the pane itself
-TkPanedwindow.new(base_frame, :orient=>:vertical){|f|
- pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m')
-
- add(TkFrame.new(f){|paned2_top|
- TkListbox.new(paned2_top, :listvariable=>paneList) {
- # Invert the first item to highlight it
- itemconfigure(0, :background=>self.cget(:foreground),
- :foreground=>self.cget(:background) )
- yscrollbar(TkScrollbar.new(paned2_top).pack(:side=>:right,
- :fill=>:y))
- pack(:fill=>:both, :expand=>true)
- }
- },
-
- TkFrame.new(f, :height=>120) {|paned2_bottom|
- # The bottom window is a text widget with scrollbar
- paned2_xscr = TkScrollbar.new(paned2_bottom)
- paned2_yscr = TkScrollbar.new(paned2_bottom)
- paned2_text = TkText.new(paned2_bottom, :width=>30, :wrap=>:non) {
- insert('1.0', 'ã“ã“ã«é…ç½®ã•ã‚Œã¦ã„ã‚‹ã®ã¯ã€' +
- 'ã”ã普通ã®ãƒ†ã‚­ã‚¹ãƒˆã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã§ã™ã€‚')
- xscrollbar(paned2_xscr)
- yscrollbar(paned2_yscr)
- }
- Tk.grid(paned2_text, paned2_yscr, :sticky=>'nsew')
- Tk.grid(paned2_xscr, :sticky=>'nsew')
- TkGrid.columnconfigure(paned2_bottom, 0, :weight=>1)
- TkGrid.rowconfigure(paned2_bottom, 0, :weight=>1)
- } )
-}
diff --git a/ext/tk/sample/demos-jp/pendulum.rb b/ext/tk/sample/demos-jp/pendulum.rb
deleted file mode 100644
index 06e6933548..0000000000
--- a/ext/tk/sample/demos-jp/pendulum.rb
+++ /dev/null
@@ -1,243 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# This demonstration illustrates how Tcl/Tk can be used to construct
-# simulations of physical systems.
-# (called by 'widget')
-#
-# based on Tcl/Tk8.5a2 widget demos
-
-# destroy toplevel widget for this demo script
-if defined?($pendulum_demo) && $pendulum_demo
- $pendulum_demo.destroy
- $pendulum_demo = nil
-end
-
-# create toplevel widget
-$pendulum_demo = TkToplevel.new {|w|
- title("Pendulum Animation Demonstration")
- iconname("pendulum")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($pendulum_demo).pack(:fill=>:both, :expand=>true)
-
-# create label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text 'ã“ã®ãƒ‡ãƒ¢ã¯ã€ç‰©ç†ç³»ã®ã‚·ãƒŸãƒ¥ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã«é–¢ã‚るよã†ãªã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³å®Ÿè¡Œã™ã‚‹ãŸã‚ã« Ruby/Tk ã‚’ã©ã®ã‚ˆã†ã«ç”¨ã„ã‚‹ã“ã¨ãŒã§ãã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚å·¦å´ã®ã‚­ãƒ£ãƒ³ãƒã‚¹ã¯å˜ç´”ãªæŒ¯ã‚Šå­ã§ã‚る物ç†ç³»è‡ªä½“ã®ã‚°ãƒ©ãƒ•ã‚£ã‚«ãƒ«è¡¨ç¾ã§ã‚ã‚‹ã®ã«å¯¾ã—ã€å³å´ã®ã‚­ãƒ£ãƒ³ãƒã‚¹ã¯ç³»ã®ä½ç›¸ç©ºé–“ã®ã‚°ãƒ©ãƒ•ï¼ˆè§’速度ã¨è§’度ã¨ã‚’プロットã—ãŸã‚‚ã®ï¼‰ã«ãªã£ã¦ã„ã¾ã™ã€‚å·¦å´ã®ã‚­ãƒ£ãƒ³ãƒã‚¹ä¸Šã§ã‚¯ãƒªãƒƒã‚¯ãŠã‚ˆã³ãƒ‰ãƒ©ãƒƒã‚°ã‚’è¡Œã£ã¦æŒ¯ã‚Šå­ã®é‡ã‚Šã®ä½ç½®ã‚’変ãˆã¦ã¿ã¦ãã ã•ã„。'
-}
-msg.pack('side'=>'top')
-
-# create frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $pendulum_demo
- $pendulum_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'pendulum'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# animated wave
-class PendulumAnimationDemo
- def initialize(frame)
- # Create some structural widgets
- @pane = TkPanedWindow.new(frame, :orient=>:horizontal).pack(:fill=>:both, :expand=>true)
-# @pane.add(@lf1 = TkLabelFrame.new(@pane, :text=>'Pendulum Simulation'))
-# @pane.add(@lf2 = TkLabelFrame.new(@pane, :text=>'Phase Space'))
- @lf1 = TkLabelFrame.new(@pane, :text=>'Pendulum Simulation')
- @lf2 = TkLabelFrame.new(@pane, :text=>'Phase Space')
-
- # Create the canvas containing the graphical representation of the
- # simulated system.
- @c = TkCanvas.new(@lf1, :width=>320, :height=>200, :background=>'white',
- :borderwidth=>2, :relief=>:sunken)
- TkcText.new(@c, 5, 5, :anchor=>:nw,
- :text=>'Click to Adjust Bob Start Position')
- # Coordinates of these items don't matter; they will be set properly below
- @plate = TkcLine.new(@c, 0, 25, 320, 25, :width=>2, :fill=>'grey50')
- @rod = TkcLine.new(@c, 1, 1, 1, 1, :width=>3, :fill=>'black')
- @bob = TkcOval.new(@c, 1, 1, 2, 2,
- :width=>3, :fill=>'yellow', :outline=>'black')
- TkcOval.new(@c, 155, 20, 165, 30, :fill=>'grey50', :outline=>'')
-
- # pack
- @c.pack(:fill=>:both, :expand=>true)
-
- # Create the canvas containing the phase space graph; this consists of
- # a line that gets gradually paler as it ages, which is an extremely
- # effective visual trick.
- @k = TkCanvas.new(@lf2, :width=>320, :height=>200, :background=>'white',
- :borderwidth=>2, :relief=>:sunken)
- @y_axis = TkcLine.new(@k, 160, 200, 160, 0, :fill=>'grey75', :arrow=>:last)
- @x_axis = TkcLine.new(@k, 0, 100, 320, 100, :fill=>'grey75', :arrow=>:last)
-
- @graph = {}
- 90.step(0, -10){|i|
- # Coordinates of these items don't matter;
- # they will be set properly below
- @graph[i] = TkcLine.new(@k, 0, 0, 1, 1, :smooth=>true, :fill=>"grey#{i}")
- }
-
- # labels
- @label_theta = TkcText.new(@k, 0, 0, :anchor=>:ne,
- :text=>'q', :font=>'Symbol 8')
- @label_dtheta = TkcText.new(@k, 0, 0, :anchor=>:ne,
- :text=>'dq', :font=>'Symbol 8')
-
- # pack
- @k.pack(:fill=>:both, :expand=>true)
-
- # Initialize some variables
- @points = []
- @theta = 45.0
- @dTheta = 0.0
- @length = 150
-
- # animation loop
- @timer = TkTimer.new(15){ repeat }
-
- # binding
- @c.bindtags_unshift(btag = TkBindTag.new)
- btag.bind('Destroy'){ @timer.stop }
- btag.bind('1', proc{|x, y| @timer.stop; showPendulum(x.to_i, y.to_i)},
- '%x %y')
- btag.bind('B1-Motion', proc{|x, y| showPendulum(x.to_i, y.to_i)}, '%x %y')
- btag.bind('ButtonRelease-1',
- proc{|x, y| showPendulum(x.to_i, y.to_i); @timer.start },
- '%x %y')
-
- btag.bind('Configure', proc{|w| @plate.coords(0, 25, w.to_i, 25)}, '%w')
-
- @k.bind('Configure', proc{|h, w|
- h = h.to_i
- w = w.to_i
- @psh = h/2;
- @psw = w/2
- @x_axis.coords(2, @psh, w-2, @psh)
- @y_axis.coords(@psw, h-2, @psw, 2)
- @label_theta.coords(@psw-4, 6)
- @label_dtheta.coords(w-6, @psh+4)
- }, '%h %w')
-
- # add
- Tk.update
- @pane.add(@lf1)
- @pane.add(@lf2)
-
- # init display
- showPendulum
-
- # animation start
- @timer.start(500)
- end
-
- # This procedure makes the pendulum appear at the correct place on the
- # canvas. If the additional arguments x, y are passed instead of computing
- # the position of the pendulum from the length of the pendulum rod and its
- # angle, the length and angle are computed in reverse from the given
- # location (which is taken to be the centre of the pendulum bob.)
- def showPendulum(x=nil, y=nil)
- if x && y && (x != 160 || y != 25)
- @dTheta = 0.0
- x2 = x - 160
- y2 = y - 25
- @length = Math.hypot(x2, y2)
- @theta = Math.atan2(x2,y2)*180/Math::PI
- else
- angle = @theta*Math::PI/180
- x = 160 + @length*Math.sin(angle)
- y = 25 + @length*Math.cos(angle)
- end
-
- @rod.coords(160, 25, x, y)
- @bob.coords(x-15, y-15, x+15, y+15)
- end
-
- # Update the phase-space graph according to the current angle and the
- # rate at which the angle is changing (the first derivative with
- # respect to time.)
- def showPhase
- unless @psw && @psh
- @psw = @k.width/2
- @psh = @k.height/2
- end
- @points << @theta + @psw << -20*@dTheta + @psh
- if @points.length > 100
- @points = @points[-100..-1]
- end
- (0...100).step(10){|i|
- first = - i
- last = 11 - i
- last = -1 if last >= 0
- next if first > last
- lst = @points[first..last]
- @graph[i].coords(lst) if lst && lst.length >= 4
- }
- end
-
- # This procedure is the "business" part of the simulation that does
- # simple numerical integration of the formula for a simple rotational
- # pendulum.
- def recomputeAngle
- scaling = 3000.0/@length/@length
-
- # To estimate the integration accurately, we really need to
- # compute the end-point of our time-step. But to do *that*, we
- # need to estimate the integration accurately! So we try this
- # technique, which is inaccurate, but better than doing it in a
- # single step. What we really want is bound up in the
- # differential equation:
- # .. - sin theta
- # theta + theta = -----------
- # length
- # But my math skills are not good enough to solve this!
-
- # first estimate
- firstDDTheta = -Math.sin(@theta * Math::PI/180) * scaling
- midDTheta = @dTheta + firstDDTheta
- midTheta = @theta + (@dTheta + midDTheta)/2
- # second estimate
- midDDTheta = -Math.sin(midTheta * Math::PI/180) * scaling
- midDTheta = @dTheta + (firstDDTheta + midDDTheta)/2
- midTheta = @theta + (@dTheta + midDTheta)/2
- # Now we do a double-estimate approach for getting the final value
- # first estimate
- midDDTheta = -Math.sin(midTheta * Math::PI/180) * scaling
- lastDTheta = midDTheta + midDDTheta
- lastTheta = midTheta + (midDTheta+ lastDTheta)/2
- # second estimate
- lastDDTheta = -Math.sin(lastTheta * Math::PI/180) * scaling
- lastDTheta = midDTheta + (midDDTheta + lastDDTheta)/2
- lastTheta = midTheta + (midDTheta + lastDTheta)/2
- # Now put the values back in our globals
- @dTheta = lastDTheta
- @theta = lastTheta
- end
-
- # This method ties together the simulation engine and the graphical
- # display code that visualizes it.
- def repeat
- # Simulate
- recomputeAngle
-
- # Update the display
- showPendulum
- showPhase
- end
-end
-
-# Start the animation processing
-PendulumAnimationDemo.new(base_frame)
diff --git a/ext/tk/sample/demos-jp/plot.rb b/ext/tk/sample/demos-jp/plot.rb
deleted file mode 100644
index 85970bb5b3..0000000000
--- a/ext/tk/sample/demos-jp/plot.rb
+++ /dev/null
@@ -1,127 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# 2-D plot widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($plot_demo) && $plot_demo
- $plot_demo.destroy
- $plot_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$plot_demo = TkToplevel.new {|w|
- title("Plot Demonstration")
- iconname("Plot")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($plot_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ç°¡å˜ãª2次元ã®ãƒ—ロットをå«ã‚“ã ã‚­ãƒ£ãƒ³ãƒã‚¹ widgetã§ã™ã€‚表示ã•ã‚ŒãŸç‚¹ã‚’マウスボタン1ã§ãƒ‰ãƒ©ãƒƒã‚°ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’ã„ã˜ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"){
- pack('side'=>'top')
-}
-
-# frame 生æˆ
-$plot_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $plot_demo
- $plot_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'plot'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$plot_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# font 設定
- if $tk_version =~ /^4.*/
- plotFont = '-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*'
- else
- font = 'Helvetica 18'
- end
-
-# canvas 設定
-$plot_canvas = TkCanvas.new(base_frame,'relief'=>'raised','width'=>450,'height'=>300)
-$plot_canvas.pack('side'=>'top', 'fill'=>'x')
-
-# plot 生æˆ
-TkcLine.new($plot_canvas, 100, 250, 400, 250, 'width'=>2)
-TkcLine.new($plot_canvas, 100, 250, 100, 50, 'width'=>2)
-TkcText.new($plot_canvas, 225, 20,
- 'text'=>"ç°¡å˜ãªãƒ—ロット", 'font'=>plotFont, 'fill'=>'brown')
-
-(0..10).each {|i|
- x = 100 + (i * 30)
- TkcLine.new($plot_canvas, x, 250, x, 245, 'width'=>2)
- TkcText.new($plot_canvas, x, 254,
- 'text'=>10*i, 'font'=>plotFont, 'anchor'=>'n')
-}
-(0..5).each {|i|
- y = 250 - (i * 40)
- TkcLine.new($plot_canvas, 100, y, 105, y, 'width'=>2)
- TkcText.new($plot_canvas, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>plotFont, 'anchor'=>'e')
-}
-
-for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
- x = 100 + (3*xx)
- y = 250 - (4*yy)/5
- item = TkcOval.new($plot_canvas, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
- item.addtag 'point'
-end
-
-$plot_canvas.itembind('point', 'Any-Enter',
- proc{$plot_canvas.itemconfigure 'current','fill','red'})
-$plot_canvas.itembind('point', 'Any-Leave',
- proc{$plot_canvas.itemconfigure 'current','fill','SkyBlue2'})
-$plot_canvas.itembind('point', '1',
- proc{|x,y| plotDown $plot_canvas,x,y}, "%x %y")
-$plot_canvas.itembind('point', 'ButtonRelease-1',
- proc{$plot_canvas.dtag 'selected'})
-$plot_canvas.bind('B1-Motion',
- proc{|x,y| plotMove $plot_canvas,x,y}, "%x %y")
-
-$plot = {'lastX'=>0, 'lastY'=>0}
-
-# plotDown --
-# This method is invoked when the mouse is pressed over one of the
-# data points. It sets up state to allow the point to be dragged.
-#
-# Arguments:
-# w - The canvas window.
-# x, y - The coordinates of the mouse press.
-
-def plotDown (w, x, y)
- w.dtag 'selected'
- w.addtag_withtag 'selected', 'current'
- w.raise 'current'
- $plot['lastX'] = x
- $plot['lastY'] = y
-end
-
-# plotMove --
-# This method is invoked during mouse motion events. It drags the
-# current item.
-#
-# Arguments:
-# w - The canvas window.
-# x, y - The coordinates of the mouse.
-
-def plotMove (w, x, y)
- w.move 'selected', x - $plot['lastX'], y - $plot['lastY']
- $plot['lastX'] = x
- $plot['lastY'] = y
-end
-
diff --git a/ext/tk/sample/demos-jp/puzzle.rb b/ext/tk/sample/demos-jp/puzzle.rb
deleted file mode 100644
index 8a0803ad3d..0000000000
--- a/ext/tk/sample/demos-jp/puzzle.rb
+++ /dev/null
@@ -1,132 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# widget demo 'puzzle' (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($puzzle_demo) && $puzzle_demo
- $puzzle_demo.destroy
- $puzzle_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$puzzle_demo = TkToplevel.new {|w|
- title("15-Puzzle Demonstration")
- iconname("15-Puzzle")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($puzzle_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "下ã®15-パズルã¯ãƒœã‚¿ãƒ³ã‚’集ã‚ã¦ã§ãã¦ã„ã¾ã™ã€‚空ã„ã¦ã„る所ã®éš£ã®ãƒ”ースをクリックã™ã‚‹ã¨ã€ãã®ãƒ”ースãŒãã®ç©ºã„ã¦ã„る場所ã«ã‚¹ãƒ©ã‚¤ãƒ‰ã—ã¾ã™ã€‚ã“ã®æ“作を続ã‘ã€ãƒ”ースãŒãã®æ•°ã®é †ã«ä¸Šã‹ã‚‰ä¸‹ã€å·¦ã‹ã‚‰å³ã«ä¸¦ã¶ã‚ˆã†ã«ã—ã¦ãã ã•ã„。"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $puzzle_demo
- $puzzle_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'puzzle'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-#
-# Special trick: scrollbar widget を生æˆã—ã¦ãã® trough color を用ã„ã‚‹ã“ã¨ã§
-# 空白部分ã®ãŸã‚ã®æš—色をé¸æŠžã—,設定ã™ã‚‹
-#
-begin
- if Tk.windowingsystem() == 'aqua'
- frameWidth = 168
- frameHeight = 168
- elsif Tk.default_widget_set == :Ttk
- frameWidth = 148
- frameHeight = 124
- else
- frameWidth = 120
- frameHeight = 120
- end
-rescue
- frameWidth = 120
- frameHeight = 120
-end
-
-# depend_on_button_width = true
-depend_on_button_width = false
-
-s = TkScrollbar.new(base_frame)
-base = TkFrame.new(base_frame) {
- width frameWidth
- height frameHeight
- borderwidth 2
- relief 'sunken'
- bg s['troughcolor']
-}
-s.destroy
-base.pack('side'=>'top', 'padx'=>'1c', 'pady'=>'1c')
-
-# proc ã®ã‚¹ã‚³ãƒ¼ãƒ—ã‚’é–‰ã˜ã‚‹ãŸã‚,proc 生æˆãƒ¡ã‚½ãƒƒãƒ‰ã‚’用æ„
-# ã“ã†ã—ã¦ãŠã‹ã­ã°ï¼Œãƒ«ãƒ¼ãƒ—中ã§å€¤ãŒå¤‰åŒ–ã™ã‚‹ num ã®å½±éŸ¿ã‚’å—ã‘ã¦
-# puzzleSwitch ã®ç¬¬ 2 引数ãŒå¤‰åŒ–ã—ã¦ã—ã¾ã„,期待通りã«ã¯ãªã‚‰ãªã„.
-def def_puzzleswitch_proc(w, num)
- proc{puzzleSwitch w, num}
-end
-
-$xpos = {}
-$ypos = {}
-order = [3,1,6,2,5,7,15,13,4,11,8,9,14,10,12]
-(0..14).each{|i|
- num = order[i]
- $xpos[num] = (i % 4) * 0.25
- $ypos[num] = (i / 4) * 0.25
- TkButton.new(base) {|w|
- relief 'raised'
- text num
- highlightthickness 0
- command def_puzzleswitch_proc(w, num)
- if depend_on_button_width && (w.winfo_reqwidth * 4 > base.width)
- base.width = w.winfo_reqwidth * 4
- end
- }.place('relx'=>$xpos[num], 'rely'=>$ypos[num],
- 'relwidth'=>0.25, 'relheight'=>0.25)
-}
-$xpos['space'] = 0.75
-$ypos['space'] = 0.75
-
-############
-def puzzleSwitch(w, num)
- if ( ($ypos[num] >= ($ypos['space'] - 0.01)) \
- && ($ypos[num] <= ($ypos['space'] + 0.01)) \
- && ($xpos[num] >= ($xpos['space'] - 0.26)) \
- && ($xpos[num] <= ($xpos['space'] + 0.26))) \
- || (($xpos[num] >= ($xpos['space'] - 0.01)) \
- && ($xpos[num] <= ($xpos['space'] + 0.01)) \
- && ($ypos[num] >= ($ypos['space'] - 0.26)) \
- && ($ypos[num] <= ($ypos['space'] + 0.26)))
- tmp = $xpos['space']
- $xpos['space'] = $xpos[num]
- $xpos[num] = tmp
- tmp = $ypos['space']
- $ypos['space'] = $ypos[num]
- $ypos[num] = tmp
- w.place('relx'=>$xpos[num], 'rely'=>$ypos[num])
- end
-end
-
diff --git a/ext/tk/sample/demos-jp/radio.rb b/ext/tk/sample/demos-jp/radio.rb
deleted file mode 100644
index 4d84441687..0000000000
--- a/ext/tk/sample/demos-jp/radio.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# radiobutton widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($radio_demo) && $radio_demo
- $radio_demo.destroy
- $radio_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$radio_demo = TkToplevel.new {|w|
- title("Radiobutton Demonstration")
- iconname("radio")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($radio_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "下ã«ã¯2ã¤ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã‚°ãƒ«ãƒ¼ãƒ—ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ボタンをクリックã™ã‚‹ã¨ã€ãã®ãƒœã‚¿ãƒ³ã ã‘ãŒãã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ä¸­ã§é¸æŠžã•ã‚Œã¾ã™ã€‚å„グループã«å¯¾ã—ã¦ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ä¸­ã®ã©ã®ãƒœã‚¿ãƒ³ãŒé¸æŠžã•ã‚Œã¦ã„ã‚‹ã‹ã‚’示ã™å¤‰æ•°ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ç¾åœ¨ã®å¤‰æ•°ã®å€¤ã‚’見るã«ã¯ã€Œå¤‰æ•°å‚ç…§ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。"
-}
-msg.pack('side'=>'top')
-
-# 変数生æˆ
-size = TkVariable.new
-color = TkVariable.new
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $radio_demo
- $radio_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'radio'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text '変数å‚ç…§'
- command proc{
- showVars(base_frame, ['size', size], ['color', color])
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-f_left = TkFrame.new(base_frame)
-f_right = TkFrame.new(base_frame)
-f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-
-# radiobutton 生æˆ
-[10, 12, 18, 24].each {|sz|
- TkRadioButton.new(f_left) {
- text "ãƒã‚¤ãƒ³ãƒˆã‚µã‚¤ã‚º #{sz}"
- variable size
- relief 'flat'
- value sz
- }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')
-}
-
-['赤', 'ç·‘', 'é’', '黄', 'æ©™', 'ç´«'].each {|col|
- TkRadioButton.new(f_right) {
- text col
- variable color
- relief 'flat'
- value col.downcase
- }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')
-}
-
diff --git a/ext/tk/sample/demos-jp/radio2.rb b/ext/tk/sample/demos-jp/radio2.rb
deleted file mode 100644
index 4416122876..0000000000
--- a/ext/tk/sample/demos-jp/radio2.rb
+++ /dev/null
@@ -1,113 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# radio2.rb
-#
-# This demonstration script creates a toplevel window containing
-# several radiobutton widgets.
-#
-# radiobutton widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($radio2_demo) && $radio2_demo
- $radio2_demo.destroy
- $radio2_demo = nil
-end
-
-# demo toplevel widget
-$radio2_demo = TkToplevel.new {|w|
- title("Radiobutton Demonstration 2")
- iconname("radio2")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($radio2_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text "下ã«ã¯3ã¤ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã‚°ãƒ«ãƒ¼ãƒ—ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ボタンをクリックã™ã‚‹ã¨ã€ãã®ãƒœã‚¿ãƒ³ã ã‘ãŒãã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ä¸­ã§é¸æŠžã•ã‚Œã¾ã™ã€‚å„グループã«å¯¾ã—ã¦ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ä¸­ã®ã©ã®ãƒœã‚¿ãƒ³ãŒé¸æŠžã•ã‚Œã¦ã„ã‚‹ã‹ã‚’示ã™å¤‰æ•°ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ç¾åœ¨ã®å¤‰æ•°ã®å€¤ã‚’見るã«ã¯ã€Œå¤‰æ•°å‚ç…§ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。"
-}
-msg.pack('side'=>'top')
-
-#
-size = TkVariable.new
-color = TkVariable.new
-align = TkVariable.new
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $radio2_demo
- $radio2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'radio2'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text '変数å‚ç…§'
- command proc{
- showVars(base_frame,
- ['size', size], ['color', color], ['compound', align])
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame
-f_left = TkLabelFrame.new(base_frame, 'text'=>'文字サイズ',
- 'pady'=>2, 'padx'=>2)
-f_mid = TkLabelFrame.new(base_frame, 'text'=>'色',
- 'pady'=>2, 'padx'=>2)
-f_right = TkLabelFrame.new(base_frame, 'text'=>'ビットマップé…ç½®',
- 'pady'=>2, 'padx'=>2)
-f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-f_mid.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-
-# radiobutton
-[10, 12, 18, 24].each {|sz|
- TkRadioButton.new(f_left) {
- text "ãƒã‚¤ãƒ³ãƒˆã‚µã‚¤ã‚º #{sz}"
- variable size
- relief 'flat'
- value sz
- }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w', 'fill'=>'x')
-}
-
-['赤', 'ç·‘', 'é’', '黄', 'æ©™', 'ç´«'].each {|col|
- TkRadioButton.new(f_mid) {
- text col
- variable color
- relief 'flat'
- value col.downcase
- anchor 'w'
- }.pack('side'=>'top', 'pady'=>2, 'fill'=>'x')
-}
-
-# label = TkLabel.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
-label = Tk::Label.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
- 'compound'=>'left')
-label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top')
-label.height(TkWinfo.reqheight(label))
-abtn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a|
- lower = a.downcase
- TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
- 'value'=>lower, 'indicatoron'=>0, 'width'=>7,
- 'command'=>proc{label.compound(align.value)})
-}
-
-Tk.grid('x', abtn[0])
-Tk.grid(abtn[1], label, abtn[2])
-Tk.grid('x', abtn[3])
diff --git a/ext/tk/sample/demos-jp/radio3.rb b/ext/tk/sample/demos-jp/radio3.rb
deleted file mode 100644
index 3f26ffb847..0000000000
--- a/ext/tk/sample/demos-jp/radio3.rb
+++ /dev/null
@@ -1,120 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# radio3.rb
-#
-# This demonstration script creates a toplevel window containing
-# several radiobutton widgets.
-#
-# radiobutton widget demo (called by 'widget')
-#
-
-# toplevel widget
-if defined?($radio3_demo) && $radio3_demo
- $radio3_demo.destroy
- $radio3_demo = nil
-end
-
-# demo toplevel widget
-$radio3_demo = TkToplevel.new {|w|
- title("Radiobutton Demonstration 3")
- iconname("radio3")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($radio3_demo).pack(:fill=>:both, :expand=>true)
-
-# label
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '5i'
- justify 'left'
- text '下ã«ã¯3ã¤ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã‚°ãƒ«ãƒ¼ãƒ—ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚ボタンをクリックã™ã‚‹ã¨ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å±žã™ã‚‹ã™ã¹ã¦ã®ãƒœã‚¿ãƒ³ã®ä¸­ã§ã‚¯ãƒªãƒƒã‚¯ã—ãŸãƒœã‚¿ãƒ³ã ã‘ãŒé¸æŠžã•ã‚ŒãŸçŠ¶æ…‹ã«ãªã‚Šã¾ã™ã€‚å„グループã«ã¯ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ä¸­ã®ã©ã®ãƒœã‚¿ãƒ³ãŒé¸æŠžã•ã‚Œã¦ã„ã‚‹ã‹ã‚’示ã™å¤‰æ•°ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚「トライステートã€ãƒœã‚¿ãƒ³ãŒæŠ¼ã•ã‚ŒãŸã¨ãã«ã¯ã€ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã®è¡¨ç¤ºãŒãƒˆãƒ©ã‚¤ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰ã«ãªã‚Šã¾ã™ã€‚ã„ãšã‚Œã‹ã®ãƒœã‚¿ãƒ³ã‚’é¸æŠžã™ã‚Œã°ã€ãƒœã‚¿ãƒ³ã®çŠ¶æ…‹ã¯å…ƒã®ã‚ˆã†ã«å€‹ã€…ã®ãƒœã‚¿ãƒ³ã®on/off状態を示ã™ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ç¾åœ¨ã®å¤‰æ•°ã®å€¤ã‚’見るã«ã¯ã€Œå¤‰æ•°å‚ç…§ã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãã ã•ã„。'
-}
-msg.grid(:row=>0, :column=>0, :columnspan=>3, :sticky=>'nsew')
-
-# variable
-size = TkVariable.new
-color = TkVariable.new
-align = TkVariable.new
-
-# frame
-TkFrame.new(base_frame) {|frame|
- TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- TkButton.new(frame, :text=>'変数å‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars(base_frame, ['size', size],
- ['color', color], ['compound', align])
- }),
- TkButton.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'radio3'}),
- TkButton.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $radio3_demo
- $radio3_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
- frame.grid_columnconfigure(0, :weight=>1)
- TkGrid(frame, :row=>3, :column=>0, :columnspan=>3, :sticky=>'nsew')
-}
-
-# frame
-f_left = TkLabelFrame.new(base_frame, 'text'=>'文字サイズ',
- 'pady'=>2, 'padx'=>2)
-f_mid = TkLabelFrame.new(base_frame, 'text'=>'色',
- 'pady'=>2, 'padx'=>2)
-f_right = TkLabelFrame.new(base_frame, 'text'=>'ビットマップé…ç½®',
- 'pady'=>2, 'padx'=>2)
-f_left .grid('column'=>0, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2)
-f_mid .grid('column'=>1, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2)
-f_right.grid('column'=>2, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c')
-
-TkButton.new(base_frame, 'text'=>'トライステート',
- 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){
- grid('column'=>2, 'row'=>2, 'pady'=>'.5c', 'padx'=>'.5c')
-}
-
-# radiobutton
-[10, 12, 14, 18, 24].each {|sz|
- TkRadioButton.new(f_left) {
- text "ãƒã‚¤ãƒ³ãƒˆã‚µã‚¤ã‚º #{sz}"
- variable size
- relief 'flat'
- value sz
- tristatevalue 'multi'
- }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w', 'fill'=>'x')
-}
-
-['Red', 'Green', 'Blue', 'Yellow', 'Orange', 'Purple'].each {|col|
- TkRadioButton.new(f_mid) {
- text col
- variable color
- relief 'flat'
- value col.downcase
- anchor 'w'
- tristatevalue 'multi'
- command proc{f_mid.fg(color.value)}
- }.pack('side'=>'top', 'pady'=>2, 'fill'=>'x')
-}
-
-# label = TkLabel.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
-label = Tk::Label.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
- 'compound'=>'left')
-label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top')
-label.height(TkWinfo.reqheight(label))
-a_btn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a|
- TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
- 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7,
- 'command'=>proc{label.compound(align.value)})
-}
-
-Tk.grid('x', a_btn[0])
-Tk.grid(a_btn[1], label, a_btn[2])
-Tk.grid('x', a_btn[3])
diff --git a/ext/tk/sample/demos-jp/rmt b/ext/tk/sample/demos-jp/rmt
deleted file mode 100644
index dcfb328fc8..0000000000
--- a/ext/tk/sample/demos-jp/rmt
+++ /dev/null
@@ -1,268 +0,0 @@
-#!/usr/bin/env ruby
-
-# rmt --
-# This script implements a simple remote-control mechanism for
-# Tk applications. It allows you to select an application and
-# then type commands to that application.
-
-require 'tk'
-
-class Rmt
- def initialize(parent=nil)
- win = self
-
- unless parent
- parent = TkRoot.new
- end
- root = TkWinfo.toplevel(parent)
- root.minsize(1,1)
-
- # The instance variable below keeps track of the remote application
- # that we're sending to. If it's an empty string then we execute
- # the commands locally.
- @app = 'local'
- @mode = 'Ruby'
-
- # The instance variable below keeps track of whether we're in the
- # middle of executing a command entered via the text.
- @executing = 0
-
- # The instance variable below keeps track of the last command executed,
- # so it can be re-executed in response to !! commands.
- @lastCommand = ""
-
- # Create menu bar. Arrange to recreate all the information in the
- # applications sub-menu whenever it is cascaded to.
-
- TkFrame.new(root, 'relief'=>'raised', 'bd'=>2) {|f|
- pack('side'=>'top', 'fill'=>'x')
- TkMenubutton.new(f, 'text'=>'File', 'underline'=>0) {|mb|
- TkMenu.new(mb) {|mf|
- mb.menu(mf)
- TkMenu.new(mf) {|ma|
- postcommand proc{win.fillAppsMenu ma}
- mf.add('cascade', 'label'=>'Select Application',
- 'menu'=>ma, 'underline'=>0)
- }
- add('command', 'label'=>'Quit',
- 'command'=>proc{root.destroy}, 'underline'=>0)
- }
- pack('side'=>'left')
- }
- }
-
- # Create text window and scrollbar.
-
- @txt = TkText.new(root, 'relief'=>'sunken', 'bd'=>2, 'setgrid'=>true) {
- yscrollbar(TkScrollbar.new(root){pack('side'=>'right', 'fill'=>'y')})
- pack('side'=>'left')
- }
-
- @promptEnd = TkTextMark.new(@txt, 'insert')
-
- # Create a binding to forward commands to the target application,
- # plus modify many of the built-in bindings so that only information
- # in the current command can be deleted (can still set the cursor
- # earlier in the text and select and insert; just can't delete).
-
- @txt.bindtags([@txt, TkText, root, 'all'])
- @txt.bind('Return', proc{
- @txt.set_insert('end - 1c')
- @txt.insert('insert', "\n")
- win.invoke
- Tk.callback_break
- })
- @txt.bind('Delete', proc{
- begin
- @txt.tag_remove('sel', 'sel.first', @promptEnd)
- rescue
- end
- if @txt.tag_nextrange('sel', '1.0', 'end') == []
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- end
- })
- @txt.bind('BackSpace', proc{
- begin
- @txt.tag_remove('sel', 'sel.first', @promptEnd)
- rescue
- end
- if @txt.tag_nextrange('sel', '1.0', 'end') == []
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- end
- })
- @txt.bind('Control-d', proc{
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- })
- @txt.bind('Control-k', proc{
- if @txt.compare('insert', '<', @promptEnd)
- @txt.set_insert(@promptEnd)
- end
- })
- @txt.bind('Control-t', proc{
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- })
- @txt.bind('Meta-d', proc{
- if @txt.compare('insert', '<', @promptEnd)
- Tk.callback_break
- end
- })
- @txt.bind('Meta-BackSpace', proc{
- if @txt.compare('insert', '<=', @promptEnd)
- Tk.callback_break
- end
- })
- @txt.bind('Control-h', proc{
- if @txt.compare('insert', '<=', @promptEnd)
- Tk.callback_break
- end
- })
-
- @txt.tag_configure('bold', 'font'=>['Courier', 12, 'bold'])
-
- @app = Tk.appname('rmt')
- if (@app =~ /^rmt(.*)$/)
- root.title("Tk Remote Controller#{$1}")
- root.iconname("Tk Remote#{$1}")
- end
- prompt
- @txt.focus
- #@app = TkWinfo.appname(TkRoot.new)
- end
-
- def tkTextInsert(w,s)
- return if s == ""
- begin
- if w.compare('sel.first','<=','insert') \
- && w.compare('sel.last','>=','insert')
- w.tag_remove('sel', 'sel.first', @promptEnd)
- w.delete('sel.first', 'sel.last')
- end
- rescue
- end
- w.insert('insert', s)
- w.see('insert')
- end
-
- # The method below is used to print out a prompt at the
- # insertion point (which should be at the beginning of a line
- # right now).
-
- def prompt
- @txt.insert('insert', "#{@app}: ")
- @promptEnd.set('insert')
- @promptEnd.gravity = 'left'
- @txt.tag_add('bold', "#{@promptEnd.path} linestart", @promptEnd)
- end
-
- # The method below executes a command (it takes everything on the
- # current line after the prompt and either sends it to the remote
- # application or executes it locally, depending on "app".
-
- def invoke
- cmd = @txt.get(@promptEnd, 'insert')
- @executing += 1
- case (@mode)
- when 'Tcl'
- if Tk.info('complete', cmd)
- if (cmd == "!!\n")
- cmd = @lastCommand
- else
- @lastCommand = cmd
- end
- begin
- msg = Tk.appsend(@app, false, cmd)
- rescue
- msg = "Error: #{$!}"
- end
- @txt.insert('insert', msg + "\n") if msg != ""
- prompt
- @promptEnd.set('insert')
- end
-
- when 'Ruby'
- if (cmd == "!!\n")
- cmd = @lastCommand
- end
- complete = true
- begin
- eval("proc{#{cmd}}")
- rescue
- complete = false
- end
- if complete
- @lastCommand = cmd
- begin
-# msg = Tk.appsend(@app, false,
-# 'ruby',
-# '"(' + cmd.gsub(/[][$"]/, '\\\\\&') + ').to_s"')
- msg = Tk.rb_appsend(@app, false, cmd)
- rescue
- msg = "Error: #{$!}"
- end
- @txt.insert('insert', msg + "\n") if msg != ""
- prompt
- @promptEnd.set('insert')
- end
- end
-
- @executing -= 1
- @txt.yview_pickplace('insert')
- end
-
- # The following method is invoked to change the application that
- # we're talking to. It also updates the prompt for the current
- # command, unless we're in the middle of executing a command from
- # the text item (in which case a new prompt is about to be output
- # so there's no need to change the old one).
-
- def newApp(appName, mode)
- @app = appName
- @mode = mode
- if @executing == 0
- @promptEnd.gravity = 'right'
- @txt.delete("#{@promptEnd.path} linestart", @promptEnd)
- @txt.insert(@promptEnd, "#{appName}: ")
- @txt.tag_add('bold', "#{@promptEnd.path} linestart", @promptEnd)
- @promptEnd.gravity = 'left'
- end
- end
-
- # The method below will fill in the applications sub-menu with a list
- # of all the applications that currently exist.
-
- def fillAppsMenu(menu)
- win = self
- begin
- menu.delete(0,'last')
- rescue
- end
- TkWinfo.interps.sort.each{|ip|
- begin
- if Tk.appsend(ip, false, 'info commands ruby') == ""
- mode = 'Tcl'
- else
- mode = 'Ruby'
- end
- menu.add('command', 'label'=>format("%s (#{mode}/Tk)", ip),
- 'command'=>proc{win.newApp ip, mode})
- rescue
- menu.add('command', 'label'=>format("%s (unknown Tk)", ip),
- 'command'=>proc{win.newApp ip, mode}, 'state'=>'disabled')
- end
- }
- menu.add('command', 'label'=>format("local (Ruby/Tk)"),
- 'command'=>proc{win.newApp 'local', 'Ruby'})
- end
-end
-
-Rmt.new
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/rolodex b/ext/tk/sample/demos-jp/rolodex
deleted file mode 100644
index 95c0e3b869..0000000000
--- a/ext/tk/sample/demos-jp/rolodex
+++ /dev/null
@@ -1,320 +0,0 @@
-#!/usr/bin/env ruby
-#
-# rolodex --
-# This script is a part of Tom LaStrange's rolodex
-#
-# Copyright (C) 1998 by Takaaki Tateishi <ttate@jaist.ac.jp>
-# Time-stamp: "03/08/02 12:45:21 nagai"
-#
-
-require "tk"
-
-
-def show_help(topic,x=0,y=0)
- if( topic.is_a?(TkWindow) )
- w = TkWinfo.containing(x,y)
- if( TkWinfo.exist?(w) )
- topic = w
- end
- end
-
- if( $helpTopics.include?(topic) )
- msg = $helpTopics[topic]
- else
- msg = "Sorry, but no help is available for this topic"
- end
- TkDialog.new("title"=>"Rolodex Help",
- "message"=>"Information on #{topic}:\n\n#{msg}",
- "default_button"=>0,
- "buttons"=>["OK"])
-end
-
-def fillCard
- clearAction
- $root.frame.entry[1].insert(0,"Takaaki Tateishi")
- $root.frame.entry[2].insert(0,"Japan Advanced Institute of Science and Techonology")
- $root.frame.entry[3].insert(0,"1-1 Asahidai, Tatsunokuchi")
- $root.frame.entry[4].insert(0,"Ishikawa 923-1292, Japan")
- $root.frame.entry[5].insert(0,"private")
- $root.frame.entry[6].insert(0,"***-***-****")
- $root.frame.entry[7].insert(0,"***-***-****")
-end
-
-def addAction
- for i in 1..7
- STDERR.print format("%-12s %s\n",
- RolodexFrame::LABEL[i],
- $root.frame.entry[i].value)
- end
-end
-
-def clearAction
- for i in 1..7
- $root.frame.entry[i].delete(0,"end")
- end
-end
-
-def fileAction
- TkDialog.new("title"=>"File Selection",
- "message"=>"This is a dummy file selection dialog box.\n",
- "default_button"=>0,
- "buttons"=>["OK"])
- STDERR.print "dummy file name\n"
-end
-
-def deleteAction
- result = TkDialog.new("title"=>"Confirm Action",
- "message"=>"Are you sure?",
- "default_button"=>0,
- "buttons"=>["Cancel"])
- if( result.value == 0 )
- clearAction
- end
-end
-
-
-class RolodexFrame < TkFrame
- attr_reader :entry, :label
-
- LABEL = ["","Name:","Address:","","","Home Phone:","Work Phone:","Fax:"]
-
- def initialize(parent=nil,keys=nil)
- super(parent,keys)
- self["relief"] = "flat"
-
- @i = []
- @label = []
- @entry = []
- for i in 1..7
- @i[i] = TkFrame.new(self)
- @i[i].pack("side"=>"top",
- "pady"=>2,
- "anchor"=>"e")
- @label[i] = TkLabel.new(@i[i],
- "text"=>LABEL[i],
- "anchor"=>"e")
- @entry[i] = TkEntry.new(@i[i],
- "width"=>30,
- "relief"=>"sunken")
- @entry[i].pack("side"=>"right")
- @label[i].pack("side"=>"right")
- end
- end
-end
-
-class RolodexButtons < TkFrame
- attr_reader :clear, :add, :search, :delete
-
- def initialize(parent,keys=nil)
- super(parent,keys)
- @clear = TkButton.new(self,
- "text" => "Clear")
- @add = TkButton.new(self,
- "text" => "Add")
- @search = TkButton.new(self,
- "text" => "Search")
- @delete = TkButton.new(self,
- "text" => "Delete")
- for w in [@clear,@add,@search,@delete]
- w.pack("side"=>"left", "padx"=>2)
- end
- end
-end
-
-class RolodexMenuFrame < TkFrame
- attr_reader :file_menu, :help_menu, :file, :help
-
- def initialize(parent,keys=nil)
- super(parent,keys)
- configure("relief"=>"raised",
- "borderwidth"=>1)
-
- @file = TkMenubutton.new(self,
- "text"=>"File",
- "underline"=>0)
- @file_menu = TkMenu.new(@file)
- @file_menu.add("command",
- "label" => "Load ...",
- "command" => proc{fileAction},
- "underline" => 0)
- @file_menu.add("command",
- "label" => "Exit",
- "command" => proc{$root.destroy},
- "underline" => 0)
- @file.menu(@file_menu)
- @file.pack("side"=>"left")
-
- @help = TkMenubutton.new(self,
- "text"=>"Help",
- "underline"=>0)
- @help_menu = TkMenu.new(@help)
- @help_menu.add("command",
- "label"=>"On Context...",
- "command"=>proc{show_help("context")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=>"On Help...",
- "command"=>proc{show_help("help")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=>"On Window...",
- "command"=>proc{show_help("window")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=>"On Keys...",
- "command"=>proc{show_help("keys")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=>"On version...",
- "command"=>proc{show_help("version")},
- "underline"=>3)
- @help.menu(@help_menu)
- @help.pack("side"=>"right")
- end
-end
-
-class Rolodex < TkRoot
- attr_reader :frame, :buttons, :menu
-
- def initialize(*args)
- super(*args)
- @frame = RolodexFrame.new(self)
- @frame.pack("side"=>"top",
- "fill"=>"y",
- "anchor"=>"center")
- @buttons = RolodexButtons.new(self)
- @buttons.pack("side"=>"bottom",
- "pady"=>2,
- "anchor"=>"center")
- @menu = RolodexMenuFrame.new(self)
- @menu.pack("before"=>@frame,
- "side"=>"top",
- "fill"=>"x")
- end
-end
-
-$root = Rolodex.new
-
-$root.buttons.delete.configure("command"=>proc{deleteAction})
-$root.buttons.add.configure("command"=>proc{addAction})
-$root.buttons.clear.configure("command"=>proc{clearAction})
-$root.buttons.search.configure("command"=>proc{addAction; fillCard})
-
-$root.buttons.clear.configure("text"=>"Clear Ctrl+C")
-$root.bind("Control-c",proc{clearAction})
-
-$root.buttons.add.configure("text"=>"Add Ctrl+A")
-$root.bind("Control-a",proc{addAction})
-
-$root.buttons.search.configure("text"=>"Search Ctrl+S")
-$root.bind("Control-s",proc{addAction; fillCard})
-
-$root.buttons.delete.configure("text"=>"Delete... Ctrl+D")
-$root.bind("Control-d",proc{deleteAction})
-
-$root.menu.file_menu.entryconfigure(1, "accel"=>"Ctrl+F")
-$root.bind("Control-f",proc{fileAction})
-
-$root.menu.file_menu.entryconfigure(2, "accel"=>"Ctrl+Q")
-$root.bind("Control-q",proc{$root.destroy})
-
-$root.frame.entry[1].focus
-
-$root.bind("Any-F1",
- proc{|event| show_help(event.widget, event.x_root, event.y_root)})
-$root.bind("Any-Help",
- proc{|event| show_help(event.widget, event.x_root, event.y_root)})
-
-
-$helpTopics = {}
-
-$helpTopics[$root.menu.file] = <<EOF
-This is the "file" menu. It can be used to invoke\
-some overall operations on the rolodex applications,\
-such as loading a file or exiting.
-EOF
-
-$helpTopics[$root.menu.file_menu.index(0)] = <<EOF
-The "Load" entry in the "File" menu posts a dialog box\
-that you can use to select a rolodex file
-EOF
-
-$helpTopics[$root.menu.file_menu.index(1)] = <<EOF
-The "Exit" entry in the "File" menu causes the rolodex\
-application to terminate
-EOF
-
-$helpTopics[$root.frame.entry[1]] = <<EOF
-In this field of the rolodex entry you should\
-type the person's name
-EOF
-
-$helpTopics[$root.frame.entry[2]] = <<EOF
-In this field of the rolodex entry you should\
-type the first line of the person's address
-EOF
-
-$helpTopics[$root.frame.entry[3]] = <<EOF
-In this field of the rolodex entry you should\
-type the second line of the person's address
-EOF
-
-$helpTopics[$root.frame.entry[4]] = <<EOF
-In this field of the rolodex entry you should\
-type the third line of the person's address
-EOF
-
-$helpTopics[$root.frame.entry[5]] = <<EOF
-In this field of the rolodex entry you should\
-type the person's home phone number, or "private"\
-if the person doesn't want his or he number publicized
-EOF
-
-$helpTopics[$root.frame.entry[6]] = <<EOF
-In this field of the rolodex entry you should\
-type the person's work phone number
-EOF
-
-$helpTopics[$root.frame.entry[7]] = <<EOF
-In this field of the rolodex entry you should\
-type the phone number for the person's FAX machine
-EOF
-
-$helpTopics["context"] = <<EOF
-Unfortunately, this application doesn't support context-sensitive\
-help in the usual way, because when this demo was written Ruby/Tk\
-didn't have a grab mechanism and this is needed for context-sensitive\
-help. Instead, you can achieve much the same effect by simply moving\
-the mouse over the window you're curious about and pressing the\
-Help or F1 keys. You can do this anytime.
-EOF
-
-$helpTopics["help"] = <<EOF
-This application provides only very crude help. Besides the\
-entries in this menu, you can get help on individual windows\
-by moving the mouse cursor over the window and pressing the\
-Help or F1 keys.
-EOF
-
-$helpTopics["window"] = <<EOF
-This window is a dummy rolodex application created as part of\
-Tom LaStrange's toolkit benchmark. It doesn't really do anything\
-useful except to demonstrate a few features of the Ruby/Tk.
-EOF
-
-$helpTopics["keys"] = <<EOF
-The following accelerator keys are defined for this application\
-(in addition to those already available for the entry windows):
-Ctrl+A: Add
-Ctrl+C: Clear
-Ctrl+D: Delete
-Ctrl+F: Enter file name
-Ctrl+Q: Exit application (quit)
-Ctrl+S: Search (dummy operation)
-EOF
-
-$helpTopics["version"] = <<EOF
-This is version 1.0.1.
-EOF
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/rolodex-j b/ext/tk/sample/demos-jp/rolodex-j
deleted file mode 100644
index f6e3afdacd..0000000000
--- a/ext/tk/sample/demos-jp/rolodex-j
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: utf-8 -*-
-#
-# rolodex --
-# ã“ã®ã‚¹ã‚¯ãƒªãƒ—ト㯠Tom LaStrange ã® rolodex ã®ä¸€éƒ¨ã§ã™ã€‚
-#
-# Copyright (C) 1998 by Takaaki Tateishi <ttate@jaist.ac.jp>
-# Time-stamp: "04/04/09 00:32:12 nagai"
-#
-
-require "tk"
-Tk.encoding = "utf-8"
-
-def show_help(topic,x=0,y=0)
- if( topic.is_a?(TkWindow) )
- w = TkWinfo.containing(x,y)
- if( w.is_a?(TkWindow) )
- if( TkWinfo.exist?(w) )
- topic = w
- end
- end
- end
-
- if( $helpTopics.include?(topic) )
- msg = $helpTopics[topic]
- else
- msg = "ã“ã®ãƒˆãƒ”ックã«ã¤ã„ã¦ã®ãƒ˜ãƒ«ãƒ—ã¯ã¾ã ä½¿ç”¨ã§ãã¾ã›ã‚“"
- end
- TkDialog.new("title"=>"Rolodex Help",
- "message"=>"「#{topic}ã€\n\n#{msg}",
- "default_button"=>0,
- "buttons"=>["OK"])
-end
-
-def fillCard
- clearAction
- $root.frame.entry[1].insert(0, "立石 å­å½°")
- $root.frame.entry[2].insert(0, "923-1292 石å·çœŒ")
- $root.frame.entry[3].insert(0, "è¾°å£ç”º æ—­å° 1-1")
- $root.frame.entry[4].insert(0, "北陸先端科学技術大学院大学")
- $root.frame.entry[5].insert(0,"private")
- $root.frame.entry[6].insert(0,"***-***-****")
- $root.frame.entry[7].insert(0,"***-***-****")
-end
-
-def addAction
- for i in 1..7
- STDERR.print format("%-12s %s\n",
- RolodexFrame::LABEL[i],
- $root.frame.entry[i].value)
- end
-end
-
-def clearAction
- for i in 1..7
- $root.frame.entry[i].delete(0,"end")
- end
-end
-
-def fileAction
- TkDialog.new("title"=>"File Selection",
- "message"=>"ã“ã‚Œã¯ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠžãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã®ãƒ€ãƒŸãƒ¼ã§ã™ã€‚\n",
- "default_button"=>0,
- "buttons"=>["OK"])
- STDERR.print "dummy file name\n"
-end
-
-def deleteAction
- result = TkDialog.new("title"=>"Confirm Action",
- "message"=>"よã‚ã—ã„ã§ã™ã‹ï¼Ÿ",
- "default_button"=>0,
- "buttons"=>["キャンセル"])
- if( result.value == 0 )
- clearAction
- end
-end
-
-
-class RolodexFrame < TkFrame
- attr_reader :entry, :label
-
- LABEL = ["","åå‰:","ä½æ‰€","","","電話(自宅):","電話(会社):","Fax:"]
-
- def initialize(parent=nil,keys=nil)
- super(parent,keys)
- self["relief"] = "flat"
- @i = []
- @label = []
- @entry = []
- for i in 1..7
- @i[i] = TkFrame.new(self)
- @i[i].pack("side"=>"top",
- "pady"=>2,
- "anchor"=>"e")
- @label[i] = TkLabel.new(@i[i],
- "text"=>LABEL[i],
- "anchor"=>"e")
- @entry[i] = TkEntry.new(@i[i],
- "width"=>30,
- "relief"=>"sunken")
- @entry[i].pack("side"=>"right")
- @label[i].pack("side"=>"right")
- end
- end
-end
-
-class RolodexButtons < TkFrame
- attr_reader :clear, :add, :search, :delete
-
- def initialize(parent,keys=nil)
- super(parent,keys)
- @clear = TkButton.new(self,"text" => "クリアー")
- @add = TkButton.new(self, "text" => "追加")
- @search = TkButton.new(self, "text" => "検索")
- @delete = TkButton.new(self, "text" => "消去")
- for w in [@clear,@add,@search,@delete]
- w.pack("side"=>"left", "padx"=>2)
- end
- end
-end
-
-class RolodexMenuFrame < TkFrame
- attr_reader :file_menu, :help_menu, :file, :help
-
- def initialize(parent,keys=nil)
- super(parent,keys)
- configure("relief"=>"raised",
- "borderwidth"=>1)
-
- @file = TkMenubutton.new(self,
- "text"=> "ファイル",
- "underline"=>0)
- @file_menu = TkMenu.new(@file)
- @file_menu.add("command",
- "label" => "読ã¿è¾¼ã¿ ...",
- "command" => proc{fileAction},
- "underline" => 0)
- @file_menu.add("command",
- "label" => "終了",
- "command" => proc{$root.destroy},
- "underline" => 0)
- @file.menu(@file_menu)
- @file.pack("side"=>"left")
-
- @help = TkMenubutton.new(self,
- "text"=> "ヘルプ",
- "underline"=>0)
- @help_menu = TkMenu.new(@help)
- @help_menu.add("command",
- "label"=> "コンテキストã«ã¤ã„ã¦",
- "command"=>proc{show_help("コンテキスト")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=> "ヘルプã«ã¤ã„ã¦",
- "command"=>proc{show_help("ヘルプ")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=> "ウィンドウã«ã¤ã„ã¦",
- "command"=>proc{show_help("ウィンドウ")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=> "キーæ“作ã«ã¤ã„ã¦",
- "command"=>proc{show_help("キーæ“作")},
- "underline"=>3)
- @help_menu.add("command",
- "label"=> "ãƒãƒ¼ã‚¸ãƒ§ãƒ³æƒ…å ±",
- "command"=>proc{show_help("ãƒãƒ¼ã‚¸ãƒ§ãƒ³æƒ…å ±")},
- "underline"=>3)
- @help.menu(@help_menu)
- @help.pack("side"=>"right")
- end
-end
-
-class Rolodex < TkRoot
- attr_reader :frame, :buttons, :menu
-
- def initialize(*args)
- super(*args)
- @frame = RolodexFrame.new(self)
- @frame.pack("side"=>"top",
- "fill"=>"y",
- "anchor"=>"center")
- @buttons = RolodexButtons.new(self)
- @buttons.pack("side"=>"bottom",
- "pady"=>2,
- "anchor"=>"center")
- @menu = RolodexMenuFrame.new(self)
- @menu.pack("before"=>@frame,
- "side"=>"top",
- "fill"=>"x")
- end
-end
-
-$root = Rolodex.new
-
-$root.buttons.delete.configure("command"=>proc{deleteAction})
-$root.buttons.add.configure("command"=>proc{addAction})
-$root.buttons.clear.configure("command"=>proc{clearAction})
-$root.buttons.search.configure("command"=>proc{addAction; fillCard})
-
-$root.buttons.clear.configure("text"=> "クリアー Ctrl+C")
-$root.bind("Control-c",proc{clearAction})
-
-$root.buttons.add.configure("text"=> "追加 Ctrl+A")
-$root.bind("Control-a",proc{addAction})
-
-$root.buttons.search.configure("text"=> "検索 Ctrl+S")
-$root.bind("Control-s",proc{addAction; fillCard})
-
-$root.buttons.delete.configure("text"=> "消去 Ctrl+D")
-$root.bind("Control-d",proc{deleteAction})
-
-$root.menu.file_menu.entryconfigure(1, "accel"=>"Ctrl+F")
-$root.bind("Control-f",proc{fileAction})
-
-$root.menu.file_menu.entryconfigure(2, "accel"=>"Ctrl+Q")
-$root.bind("Control-q",proc{$root.destroy})
-
-$root.frame.entry[1].focus
-
-$root.bind("Any-F1",
- proc{|event| show_help(event.widget, event.x_root, event.y_root)})
-$root.bind("Any-Help",
- proc{|event| show_help(event.widget, event.x_root, event.y_root)})
-
-
-$helpTopics = {}
-
-$helpTopics[$root.menu.file] = <<EOF
-ã“ã‚Œã¯ã€Œãƒ•ã‚¡ã‚¤ãƒ«ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§ã™ã€‚「読ã¿è¾¼ã¿ã€ã‚„「終了ã€ãªã©ã‚’
-è¡Œãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚
-EOF
-
-$helpTopics[$root.menu.file_menu.index(0)] = <<EOF
-ファイルã®èª­ã¿è¾¼ã¿ã‚’è¡Œãªã†ã¨ãã«ä½¿ã„ã¾ã™ã€‚
-EOF
-
-$helpTopics[$root.menu.file_menu.index(1)] = <<EOF
-アプリケーションを終了ã™ã‚‹ã¨ãã«ä½¿ã„ã¾ã™ã€‚
-EOF
-
-$helpTopics[$root.frame.entry[1]] = <<EOF
-åå‰ã‚’記入ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªã§ã™ã€‚
-EOF
-
-$helpTopics[$root.frame.entry[2]] = <<EOF
-ä½æ‰€ã‚’記入ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªã§ã™ã€‚
-EOF
-
-$helpTopics[$root.frame.entry[3]] = <<EOF
-ä½æ‰€ã‚’記入ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªã§ã™ã€‚
-EOF
-
-$helpTopics[$root.frame.entry[4]] = <<EOF
-ä½æ‰€ã‚’記入ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªã§ã™ã€‚
-EOF
-
-$helpTopics[$root.frame.entry[5]] = <<EOF
-自宅ã®é›»è©±ç•ªå·ã‚’記入ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªã§ã™ã€‚公開\
-ã—ãŸããªã„ã¨ã㯠private ã¨è¨˜å…¥ã—ã¾ã™ã€‚
-EOF
-
-$helpTopics[$root.frame.entry[6]] = <<EOF
-会社ã®é›»è©±ç•ªå·ã‚’記入ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªã§ã™ã€‚
-EOF
-
-$helpTopics[$root.frame.entry[7]] = <<EOF
-FAX番å·ã‚’記入ã™ã‚‹ã‚¨ãƒ³ãƒˆãƒªã§ã™ã€‚
-EOF
-
-$helpTopics["コンテキスト"] = <<EOF
-Ruby/Tkã§ã¯grabã®æ©Ÿæ§‹ãŒãªã„ãŸã‚ã“ã®ã‚¢ãƒ—リケーションã§ã¯\
-コンテキストヘルプã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。
-ã—ã‹ã—åŒã˜ã‚ˆã†ãªåŠ¹æžœã‚’bindã¨ãƒžã‚¦ã‚¹ã®ä½ç½®ã®Wedgetを知る\
-ã“ã¨ã§å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
-EOF
-
-$helpTopics["ヘルプ"] = <<EOF
-マウスをウィンドウã«ã‚ã‚ã›ã¦F1キーを押ã™ã“ã¨ã«ã‚ˆã£ã¦\
-ãã®ãƒ˜ãƒ«ãƒ—を見るã“ã¨ãŒã§ãã¾ã™ã€‚
-EOF
-
-$helpTopics["ウィンドウ"] = <<EOF
-ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ãƒ€ãƒŸãƒ¼ã§ã™ã€‚
-EOF
-
-$helpTopics["キーæ“作"] = <<EOF
-Ctrl+A: 追加
-Ctrl+C: クリアー
-Ctrl+D: 消去
-Ctrl+F: ファイルé¸æŠž
-Ctrl+Q: 終了
-Ctrl+S: 検索
-EOF
-
-$helpTopics["ãƒãƒ¼ã‚¸ãƒ§ãƒ³æƒ…å ±"] = <<EOF
-ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ 1.0.1j ã§ã™ã€‚
-EOF
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/ruler.rb b/ext/tk/sample/demos-jp/ruler.rb
deleted file mode 100644
index 734f47f142..0000000000
--- a/ext/tk/sample/demos-jp/ruler.rb
+++ /dev/null
@@ -1,204 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# ruler widget demo (called by 'widget')
-#
-
-# rulerMkTab --
-# This method creates a new triangular polygon in a canvas to
-# represent a tab stop.
-#
-# Arguments:
-# c - The canvas window.
-# x, y - Coordinates at which to create the tab stop.
-
-def rulerMkTab(c,x,y)
- v = $demo_rulerInfo
- TkcPolygon.new(c, x, y, x+v.size, y+v.size, x-v.size, y+v.size)
-end
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($ruler_demo) && $ruler_demo
- $ruler_demo.destroy
- $ruler_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$ruler_demo = TkToplevel.new {|w|
- title("Ruler Demonstration")
- iconname("ruler")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ruler_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"ã“ã®ã‚­ãƒ£ãƒ³ãƒã‚¹widgetã¯ãƒ«ãƒ¼ãƒ©ãƒ¼ã®æ¨¡åž‹ã§ã™ã€‚ルーラーã®å³ã«ã‚ã‚‹ã®ã¯ã‚¿ãƒ–ストップã®äº•æˆ¸ã§ã€ã“ã“ã‹ã‚‰å¼•ã£å¼µã£ã¦ãã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã‚¿ãƒ–ストップを作るã“ã¨ãŒã§ãã¾ã™ã€‚ã¾ãŸã€ã™ã§ã«ã‚るタブストップを動ã‹ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚タブストップを上方ã¾ãŸã¯ä¸‹æ–¹ã«ã‹ã™ã‚Œã¦è¡¨ç¤ºã•ã‚Œã‚‹ã¾ã§ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã¨ã€ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ã‚’離ã—ãŸæ™‚ã«ãã®ã‚¿ãƒ–ストップã¯æ¶ˆãˆã¾ã™ã€‚"){
- pack('side'=>'top')
-}
-
-# frame 生æˆ
-$ruler_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $ruler_demo
- $ruler_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'ruler'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$ruler_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# canvas 設定
-$ruler_canvas = TkCanvas.new(base_frame, 'width'=>'14.8c', 'height'=>'2.5c')
-$ruler_canvas.pack('side'=>'top', 'fill'=>'x')
-
-# 値設定
-unless Struct.const_defined?("RulerInfo")
- $demo_rulerInfo = Struct.new("RulerInfo", :grid, :left, :right, :x, :y,
- :top, :bottom, :size, :normalStyle,
- :activeStyle, :deleteStyle).new
-end
-$demo_rulerInfo.grid = '.25c'
-$demo_rulerInfo.left = TkWinfo.fpixels($ruler_canvas, '1c')
-$demo_rulerInfo.right = TkWinfo.fpixels($ruler_canvas, '13c')
-$demo_rulerInfo.top = TkWinfo.fpixels($ruler_canvas, '1c')
-$demo_rulerInfo.bottom = TkWinfo.fpixels($ruler_canvas, '1.5c')
-$demo_rulerInfo.size = TkWinfo.fpixels($ruler_canvas, '.2c')
-$demo_rulerInfo.normalStyle = {'fill'=>'black'}
-if TkWinfo.depth($ruler_canvas) > 1
- $demo_rulerInfo.activeStyle = {'fill'=>'red', 'stipple'=>''}
- $demo_rulerInfo.deleteStyle = {'fill'=>'red',
- 'stipple'=>'@'+[$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator)}
-else
- $demo_rulerInfo.activeStyle = {'fill'=>'black', 'stipple'=>''}
- $demo_rulerInfo.deleteStyle = {'fill'=>'black',
- 'stipple'=>'@'+[$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator)}
-end
-
-TkcLine.new($ruler_canvas,
- '1c', '0.5c', '1c', '1c', '13c', '1c', '13c', '0.5c', 'width'=>1)
-(0..11).each{|i|
- x = i+1
- TkcLine.new($ruler_canvas, "#{x}c", '1c', "#{x}c", '0.6c', 'width'=>1)
- TkcLine.new($ruler_canvas, "#{x}.25c", '1c', "#{x}.25c", '0.8c', 'width'=>1)
- TkcLine.new($ruler_canvas, "#{x}.5c", '1c', "#{x}.5c", '0.7c', 'width'=>1)
- TkcLine.new($ruler_canvas, "#{x}.75c", '1c', "#{x}.75c", '0.8c', 'width'=>1)
- TkcText.new($ruler_canvas, "#{x}.15c", '0.75c', 'text'=>i, 'anchor'=>'sw')
-}
-
-$rulerTag_well = TkcTag.new($ruler_canvas)
-$ruler_canvas\
-.addtag_withtag($rulerTag_well,
- TkcRectangle.new($ruler_canvas,
- '13.2c', '1c', '13.8c', '0.5c',
- 'outline'=>'black',
- 'fill'=>($ruler_canvas\
- .configinfo('background'))[4]) )
-$ruler_canvas\
-.addtag_withtag($rulerTag_well,
- rulerMkTab($ruler_canvas,
- TkWinfo.pixels($ruler_canvas, '13.5c'),
- TkWinfo.pixels($ruler_canvas, '.65c') ) )
-
-$rulerTag_well.bind('1', proc{|x,y| rulerNewTab($ruler_canvas,x,y)}, '%x %y')
-$ruler_canvas.itembind('tab', '1',
- proc{|x,y| rulerSelectTab($ruler_canvas,x,y)}, '%x %y')
-$ruler_canvas.bind('B1-Motion',
- proc{|x,y| rulerMoveTab($ruler_canvas,x,y)}, '%x %y')
-$ruler_canvas.bind('Any-ButtonRelease-1', proc{rulerReleaseTab($ruler_canvas)})
-
-# rulerNewTab --
-# Does all the work of creating a tab stop, including creating the
-# triangle object and adding tags to it to give it tab behavior.
-#
-# Arguments:
-# c - The canvas window.
-# x, y - The coordinates of the tab stop.
-
-def rulerNewTab(c,x,y)
- v = $demo_rulerInfo
- c.addtag_withtag('active', rulerMkTab(c,x,y))
- c.addtag_withtag('tab', 'active')
- v.x = x
- v.y = y
- rulerMoveTab(c,x,y)
-end
-
-# rulerSelectTab --
-# This method is invoked when mouse button 1 is pressed over
-# a tab. It remembers information about the tab so that it can
-# be dragged interactively.
-#
-# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse (identifies the point by
-# which the tab was picked up for dragging).
-
-def rulerSelectTab(c,x,y)
- v = $demo_rulerInfo
- v.x = c.canvasx(x, v.grid)
- v.y = v.top+2
- c.addtag_withtag('active', 'current')
- c.itemconfigure('active', v.activeStyle)
- c.raise('active')
-end
-
-# rulerMoveTab --
-# This method is invoked during mouse motion events to drag a tab.
-# It adjusts the position of the tab, and changes its appearance if
-# it is about to be dragged out of the ruler.
-#
-# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse.
-
-def rulerMoveTab(c,x,y)
- v = $demo_rulerInfo
- return if c.find_withtag('active') == []
- cx = c.canvasx(x,v.grid)
- cy = c.canvasy(y)
- cx = v.left if cx < v.left
- cx = v.right if cx > v.right
- if (cy >= v.top && cy <= v.bottom)
- cy = v.top+2
- c.itemconfigure('active', v.activeStyle)
- else
- cy = cy-v.size-2
- c.itemconfigure('active', v.deleteStyle)
- end
- c.move('active', cx-v.x, cy-v.y)
- v.x = cx
- v.y = cy
-end
-
-# rulerReleaseTab --
-# This method is invoked during button release events that end
-# a tab drag operation. It deselects the tab and deletes the tab if
-# it was dragged out of the ruler.
-#
-# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse.
-
-def rulerReleaseTab(c)
- v = $demo_rulerInfo
- return if c.find_withtag('active') == []
- if v.y != v.top+2
- c.delete('active')
- else
- c.itemconfigure('active', v.normalStyle)
- c.dtag('active')
- end
-end
-
diff --git a/ext/tk/sample/demos-jp/sayings.rb b/ext/tk/sample/demos-jp/sayings.rb
deleted file mode 100644
index a60b0bf2e5..0000000000
--- a/ext/tk/sample/demos-jp/sayings.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# listbox widget demo 'sayings' (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($sayings_demo) && $sayings_demo
- $sayings_demo.destroy
- $sayings_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$sayings_demo = TkToplevel.new {|w|
- title("Listbox Demonstration (well-known sayings)")
- iconname("sayings")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($sayings_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "下ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ã¯ã„ã‚ã„ã‚ãªæ ¼è¨€ãŒå…¥ã£ã¦ã„ã¾ã™ã€‚リストをスクロールã•ã›ã‚‹ã®ã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ã§ã‚‚ã§ãã¾ã™ã—ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ä¸­ã§ãƒžã‚¦ã‚¹ã®ãƒœã‚¿ãƒ³2(中ボタン)を押ã—ãŸã¾ã¾ãƒ‰ãƒ©ãƒƒã‚°ã—ã¦ã‚‚ã§ãã¾ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $sayings_demo
- $sayings_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'sayings'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-sayings_lbox = nil
-TkFrame.new(base_frame, 'borderwidth'=>10) {|w|
- sv = TkScrollbar.new(w)
- sh = TkScrollbar.new(w, 'orient'=>'horizontal')
- sayings_lbox = TkListbox.new(w) {
- setgrid 1
- width 20
- height 10
- yscrollcommand proc{|first,last| sv.set first,last}
- xscrollcommand proc{|first,last| sh.set first,last}
- }
- sv.command(proc{|*args| sayings_lbox.yview(*args)})
- sh.command(proc{|*args| sayings_lbox.xview(*args)})
-
- if $tk_version =~ /^4\.[01]/
- sv.pack('side'=>'right', 'fill'=>'y')
- sh.pack('side'=>'bottom', 'fill'=>'x')
- sayings_lbox.pack('expand'=>'yes', 'fill'=>'y')
-
- else
- sayings_lbox.grid('row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- sv.grid('row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- sh.grid('row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- TkGrid.rowconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
- end
-
-}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y')
-
-sayings_lbox.insert(0,
-"Waste not, want not",
-"Early to bed and early to rise makes a man healthy, wealthy, and wise",
-"Ask not what your country can do for you, ask what you can do for your country",
-"I shall return",
-"NOT",
-"A picture is worth a thousand words",
-"User interfaces are hard to build",
-"Thou shalt not steal",
-"A penny for your thoughts",
-"Fool me once, shame on you; fool me twice, shame on me",
-"Every cloud has a silver lining",
-"Where there's smoke there's fire",
-"It takes one to know one",
-"Curiosity killed the cat",
-"Take this job and shove it",
-"Up a creek without a paddle",
-"I'm mad as hell and I'm not going to take it any more",
-"An apple a day keeps the doctor away",
-"Don't look a gift horse in the mouth"
-)
-
diff --git a/ext/tk/sample/demos-jp/search.rb b/ext/tk/sample/demos-jp/search.rb
deleted file mode 100644
index dffccf1a48..0000000000
--- a/ext/tk/sample/demos-jp/search.rb
+++ /dev/null
@@ -1,185 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# Text Search widget demo (called by 'widget')
-#
-
-# textLoadFile --
-# This method below loads a file into a text widget, discarding
-# the previous contents of the widget. Tags for the old widget are
-# not affected, however.
-#
-# Arguments:
-# w - The window into which to load the file. Must be a
-# text widget.
-# file - The name of the file to load. Must be readable.
-
-def textLoadFile(w,file)
- w.delete('1.0', 'end')
- f = open(file, 'r')
- while(!f.eof?)
- w.insert('end', f.read(1000))
- end
- f.close
-end
-
-# textSearch --
-# Search for all instances of a given string in a text widget and
-# apply a given tag to each instance found.
-#
-# Arguments:
-# w - The window in which to search. Must be a text widget.
-# string - The string to search for. The search is done using
-# exact matching only; no special characters.
-# tag - Tag to apply to each instance of a matching string.
-
-def textSearch(w, string, tag)
- tag.remove('0.0', 'end')
- return if string == ""
- cur = '1.0'
- loop {
- cur, len = w.search_with_length(string, cur, 'end')
- break if cur == ""
- tag.add(cur, "#{cur} + #{len} char")
- cur = w.index("#{cur} + #{len} char")
- }
-end
-
-# textToggle --
-# This method is invoked repeatedly to invoke two commands at
-# periodic intervals. It normally reschedules itself after each
-# execution but if an error occurs (e.g. because the window was
-# deleted) then it doesn't reschedule itself.
-#
-# Arguments:
-# cmd1 - Command to execute when method is called.
-# sleep1 - Ms to sleep after executing cmd1 before executing cmd2.
-# cmd2 - Command to execute in the *next* invocation of this method.
-# sleep2 - Ms to sleep after executing cmd2 before executing cmd1 again.
-
-def textToggle(cmd1,sleep1,cmd2,sleep2)
- sleep_list = [sleep2, sleep1]
- TkAfter.new(proc{sleep = sleep_list.shift; sleep_list.push(sleep); sleep},
- -1, cmd1, cmd2).start(sleep1)
-end
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($search_demo) && $search_demo
- $search_demo.destroy
- $search_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$search_demo = TkToplevel.new {|w|
- title("Text Demonstration - Search and Highlight")
- iconname("search")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($search_demo).pack(:fill=>:both, :expand=>true)
-
-# frame 生æˆ
-$search_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $search_demo
- $search_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'search'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$search_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|f|
- TkLabel.new(f, 'text'=>'ファイルå:',
- 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
- $search_fileName = TkVariable.new
- TkEntry.new(f, 'width'=>40,
- 'textvariable'=>$search_fileName) {
- pack('side'=>'left')
- bind('Return', proc{textLoadFile($search_text, $search_fileName.value)
- $search_string_entry.focus})
- focus
- }
- TkButton.new(f, 'text'=>'読ã¿è¾¼ã¿',
- 'command'=>proc{textLoadFile($search_text,
- $search_fileName.value)})\
- .pack('side'=>'left', 'pady'=>5, 'padx'=>10)
-}.pack('side'=>'top', 'fill'=>'x')
-
-TkFrame.new(base_frame) {|f|
- TkLabel.new(f, 'text'=>'検索文字列:',
- 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
- $search_searchString = TkVariable.new
- $search_string_entry = TkEntry.new(f, 'width'=>40,
- 'textvariable'=>$search_searchString) {
- pack('side'=>'left')
- bind('Return', proc{textSearch($search_text, $search_searchString.value,
- $search_Tag)})
- }
- TkButton.new(f, 'text'=>'å転',
- 'command'=>proc{textSearch($search_text,
- $search_searchString.value,
- $search_Tag)}) {
- pack('side'=>'left', 'pady'=>5, 'padx'=>10)
- }
-}.pack('side'=>'top', 'fill'=>'x')
-
-$search_text = TkText.new(base_frame, 'setgrid'=>true) {|t|
- $search_Tag = TkTextTag.new(t)
- TkScrollbar.new(base_frame, 'command'=>proc{|*args| t.yview(*args)}) {|sc|
- t.yscrollcommand(proc{|first,last| sc.set first,last})
- pack('side'=>'right', 'fill'=>'y')
- }
- pack('expand'=>'yes', 'fill'=>'both')
-}
-
-# Set up display styles for text highlighting.
-
-if TkWinfo.depth($search_demo) > 1
- textToggle(proc{
- $search_Tag.configure('background'=>'#ce5555',
- 'foreground'=>'white')
- },
- 800,
- proc{
- $search_Tag.configure('background'=>'', 'foreground'=>'')
- },
- 200 )
-else
- textToggle(proc{
- $search_Tag.configure('background'=>'black',
- 'foreground'=>'white')
- },
- 800,
- proc{
- $search_Tag.configure('background'=>'', 'foreground'=>'')
- },
- 200 )
-end
-$search_text.insert('1.0', "\
-ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯æ¤œç´¢æ©Ÿæ§‹ã‚’実ç¾ã™ã‚‹ã®ã«ãƒ†ã‚­ã‚¹ãƒˆ widget ã®ã‚¿ã‚°æ©Ÿèƒ½ãŒã©ã® \
-よã†ã«ä½¿ã‚れるã®ã‹ã‚’デモã™ã‚‹ã‚‚ã®ã§ã™ã€‚ã¾ãšä¸Šã®ã‚¨ãƒ³ãƒˆãƒªã«ãƒ•ã‚¡ã‚¤ãƒ«åã‚’å…¥ \
-ã‚Œã€<リターン> を押ã™ã‹ã€Œãƒ­ãƒ¼ãƒ‰ã€ãƒœã‚¿ãƒ³ã‚’押ã—ã¦ãã ã•ã„。次ã«ãã®ä¸‹ã® \
-エントリã«æ–‡å­—列を入力ã—ã€<リターン> を押ã™ã‹ã€Œå転ã€ãƒœã‚¿ãƒ³ã‚’押ã—ã¦ã \
-ã ã•ã„。ã™ã‚‹ã¨ãƒ•ã‚¡ã‚¤ãƒ«ä¸­ã®ã€æ¤œç´¢æ–‡å­—列ã¨ä¸€è‡´ã™ã‚‹éƒ¨åˆ†ã«å…¨ã¦ \"search_Tag\" \
-ã¨ã„ã†ã‚¿ã‚°ãŒã¤ã‘られã€ã‚¿ã‚°ã®è¡¨ç¤ºå±žæ€§ã¨ã—ã¦ãã®æ–‡å­—列ãŒç‚¹æ»…ã™ã‚‹ã‚ˆã†ã« \
-設定ã•ã‚Œã¾ã™ã€‚\n")
-$search_text.insert('end', "\
-ファイル読ã¿è¾¼ã¿ã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯ \"#{Dir.pwd}\" ã§ã™ã€‚\
-")
-$search_text.set_insert '0.0'
-
-$search_fileName.value = ''
-$search_searchString.value = ''
-
-$search_text.width = 60
-$search_text.height = 20
diff --git a/ext/tk/sample/demos-jp/spin.rb b/ext/tk/sample/demos-jp/spin.rb
deleted file mode 100644
index 616a14e9d6..0000000000
--- a/ext/tk/sample/demos-jp/spin.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# spin.rb --
-#
-# This demonstration script creates several spinbox widgets.
-#
-# based on Tcl/Tk8.4.4 widget demos
-
-if defined?($spin_demo) && $spin_demo
- $spin_demo.destroy
- $spin_demo = nil
-end
-
-$spin_demo = TkToplevel.new {|w|
- title("Spinbox Demonstration")
- iconname("spin")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($spin_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-下ã«ã¯ï¼“種類ã®ã‚¹ãƒ”ンボックスãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚
-ãã‚Œãžã‚Œã€ãƒžã‚¦ã‚¹ã§é¸æŠžã—ã¦æ–‡å­—を入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
-編集æ“作ã¨ã—ã¦ã¯ã€Emacs å½¢å¼ã®å¤šãã«åŠ ãˆã¦ã€ä¸€èˆ¬çš„ãª
-Motif å½¢å¼ã®ã‚­ãƒ¼æ“作ãŒã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ã€‚ãŸã¨ãˆã°ã€
-Backspace 㨠Control-h ã¨ã¯å…¥åŠ›ã‚«ãƒ¼ã‚½ãƒ«ã®å·¦å´ã®æ–‡å­—ã‚’
-削除ã—ã€Delete 㨠Control-d ã¨ã¯å³å´ã®æ–‡å­—を削除ã—ã¾ã™ã€‚
-入力枠ã®é•·ã•ã‚’越ãˆã‚‹ã‚ˆã†ãªé•·ã„文字列を入力ã—ãŸå ´åˆã«ã¯ã€
-マウスã®ãƒœã‚¿ãƒ³ï¼’を押ã—ã¦ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã“ã¨ã§ã€å…¥åŠ›æ–‡å­—列
-をスキャンã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚
-ãªãŠã€æœ€åˆã®ã‚¹ãƒ”ンボックスã¯ã€æ•´æ•°å€¤ã¨ã¿ãªã•ã‚Œã‚‹ã‚ˆã†ãª
-文字列ã—ã‹å…¥åŠ›ãŒè¨±ã•ã‚Œãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã¾ãŸã€
-3番目ã®ã‚¹ãƒ”ンボックスã§é¸æŠžå€™è£œã«ç¾ã‚Œã‚‹ã®ã¯ã‚ªãƒ¼ã‚¹ãƒˆãƒ©
-リアã®éƒ½å¸‚åã®ãƒªã‚¹ãƒˆã¨ãªã£ã¦ã„ã¾ã™ã€‚
-ã‚‚ã—ã‚ãªãŸãŒä½¿ã£ã¦ã„ã‚‹ Ruby ã«ãƒªãƒ³ã‚¯ã•ã‚Œã¦ã„ã‚‹ Tk ライ
-ブラリ㌠spinbox ウィジェットを実装ã—ã¦ã„ãªã„å ´åˆã€ã“ã®
-デモã¯ã†ã¾ãå‹•ã‹ãªã„ã¯ãšã§ã™ã€‚ãã®å ´åˆã«ã¯ spinbox ウィ
-ジェットãŒå®Ÿè£…ã•ã‚Œã¦ã„るよã†ãªã‚ˆã‚Šæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® Tk
-を組ã¿åˆã‚ã›ã¦è©¦ã™ã‚ˆã†ã«ã—ã¦ãã ã•ã„。
-EOL
-
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'é–‰ã˜ã‚‹', :width=>15, :command=>proc{
- $spin_demo.destroy
- $spin_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'コードå‚ç…§', :width=>15, :command=>proc{
- showCode 'spin'
- }).pack(:side=>:left, :expand=>true)
-}
-
-australianCities = [
- 'Canberra', 'Sydney', 'Melbourne', 'Perth', 'Adelaide',
- 'Brisbane', 'Hobart', 'Darwin', 'Alice Springs'
-]
-
-[
- TkSpinbox.new(base_frame, :from=>1, :to=>10, :width=>10, :validate=>:key,
- :validatecommand=>[
- proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
- ]),
- TkSpinbox.new(base_frame, :from=>0, :to=>3, :increment=>0.5,
- :format=>'%05.2f', :width=>10),
- TkSpinbox.new(base_frame, :values=>australianCities, :width=>10)
-].each{|sbox| sbox.pack(:side=>:top, :pady=>5, :padx=>10)}
diff --git a/ext/tk/sample/demos-jp/square b/ext/tk/sample/demos-jp/square
deleted file mode 100644
index bb66282154..0000000000
--- a/ext/tk/sample/demos-jp/square
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env ruby
-
-# square --
-# This script generates a demo application containing only
-# a "square" widget. It's only usable if Tk has been compiled
-# with tkSquare.c and with the -DSQUARE_DEMO compiler switch.
-# This demo arranges the following bindings for the widget:
-#
-# Button-1 press/drag: moves square to mouse
-# "a": toggle size animation on/off
-#
-
-require 'tk'
-require 'tkafter'
-
-class TkSquare<TkWindow
- def create_self
- begin
- tk_call 'square', path
- rescue
- STDERR.print "\nSorry. Your Tk interpreter does not contain " +
- 'a "square" demonstration widget.' +
- "\n ( See documents included the Tcl/Tk source archive. )\n\n"
- exit
- end
- end
- def size(amount=nil)
- if amount
- tk_send 'size', amount
- else
- number(tk_send('size'))
- end
- end
- def position(x,y)
- tk_send 'position', x, y
- end
-end
-
-$s = TkSquare.new{
- pack('expand'=>'yes', 'fill'=>'both')
- bind('1', proc{|x,y| center(x,y)}, '%s %y')
- bind('B1-Motion', proc{|x,y| center(x,y)}, '%s %y')
- bind('a', proc{animate})
- focus
-}
-TkRoot.new.minsize(1,1)
-
-# The procedure below centers the square on a given position.
-
-def center(x,y)
- a = $s.size
- $s.position(x-(a/2), y-(a/2))
-end
-
-# The procedures below provide a simple form of animation where
-# the box changes size in a pulsing pattern: larger, smaller, larger,
-# and so on.
-
-$inc = 0
-
-def timer_proc
- a = $s.size
- return if $inc == 0
- $inc = -3 if a >= 40
- $inc = 3 if a <= 10
- $s.size(a+$inc)
-end
-
-$timer = TkAfter.new(30, -1, proc{timer_proc})
-
-def animate
- if $inc == 0
- $inc = 3
- $timer.start
- else
- $inc = 0
- $timer.stop
- end
-end
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/states.rb b/ext/tk/sample/demos-jp/states.rb
deleted file mode 100644
index 9f8fb0ef03..0000000000
--- a/ext/tk/sample/demos-jp/states.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# listbox widget demo 'states' (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($states_demo) && $states_demo
- $states_demo.destroy
- $states_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$states_demo = TkToplevel.new {|w|
- title("Listbox Demonstration (states)")
- iconname("states")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($states_demo).pack(:fill=>:both, :expand=>true)
-
-# label 生æˆ
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '4i'
- justify 'left'
- text "下ã«ã‚ã‚‹ã®ã¯éƒ½é“府県åãŒå…¥ã£ãŸã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ä»˜ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã™ã€‚リストをスクロールã•ã›ã‚‹ã®ã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ã§ã‚‚ã§ãã¾ã™ã—ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ä¸­ã§ãƒžã‚¦ã‚¹ã®ãƒœã‚¿ãƒ³2(中ボタン)を押ã—ãŸã¾ã¾ãƒ‰ãƒ©ãƒƒã‚°ã—ã¦ã‚‚ã§ãã¾ã™ã€‚"
-}
-msg.pack('side'=>'top')
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $states_demo
- $states_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'states'}
- }.pack('side'=>'left', 'expand'=>'yes')
-
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-states_lbox = nil
-TkFrame.new(base_frame, 'borderwidth'=>'.5c') {|w|
- s = TkScrollbar.new(w)
- states_lbox = TkListbox.new(w) {
- setgrid 1
- height 12
- yscrollcommand proc{|first,last| s.set first,last}
- }
- s.command(proc{|*args| states_lbox.yview(*args)})
- s.pack('side'=>'right', 'fill'=>'y')
- states_lbox.pack('side'=>'left', 'expand'=>1, 'fill'=>'both')
-}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y')
-
-ins_data = [
- '愛知','é’森','秋田','石å·','茨城','岩手','愛媛',
- '大分','大阪','岡山','沖縄','香å·','鹿å…島','神奈å·',
- 'å²é˜œ','京都','熊本','群馬','高知','埼玉','ä½è³€',
- '滋賀','é™å²¡','島根','åƒè‘‰','æ±äº¬','徳島','栃木',
- 'é³¥å–','富山','é•·å´Ž','長野','奈良','新潟','兵庫',
- '広島','ç¦äº•','ç¦å²¡','ç¦å³¶','北海é“','三é‡','宮城',
- '宮崎','山形','å±±å£','山梨','和歌山'
-]
-
-states_lbox.insert(0, *ins_data)
-
diff --git a/ext/tk/sample/demos-jp/style.rb b/ext/tk/sample/demos-jp/style.rb
deleted file mode 100644
index 737c9f8994..0000000000
--- a/ext/tk/sample/demos-jp/style.rb
+++ /dev/null
@@ -1,271 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# text (display styles) widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($style_demo) && $style_demo
- $style_demo.destroy
- $style_demo = nil
-end
-
-
-# demo 用㮠toplevel widget を生æˆ
-$style_demo = TkToplevel.new {|w|
- title("Text Demonstration - Display Styles")
- iconname("style")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($style_demo).pack(:fill=>:both, :expand=>true)
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $style_demo
- $style_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'style'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-
-# text 生æˆ
-txt = TkText.new(base_frame){|t|
- # 生æˆ
- setgrid 'true'
- #width 70
- #height 32
- wrap 'word'
- font $font
- TkScrollbar.new(base_frame) {|s|
- pack('side'=>'right', 'fill'=>'y')
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }
- pack('expand'=>'yes', 'fill'=>'both')
-
- # テキストタグ設定 (フォント関連)
- family = 'Courier'
-
- if $tk_version =~ /^4.*/
- style_tag_bold = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-O-Normal--*-120-*-*-*-*-*-*')
- style_tag_big = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*', 'kanjifont'=>$msg_kanji_font)
- style_tag_verybig = TkTextTag.new(t, 'font'=>'-*-Helvetica-Bold-R-Normal--*-240-*-*-*-*-*-*')
- # style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*', 'kanjifont'=>$kanji_font)
- style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*')
- else
- style_tag_bold = TkTextTag.new(t, 'font'=>[family, 12, :bold, :italic])
- style_tag_big = TkTextTag.new(t, 'font'=>[family, 14, :bold])
- style_tag_verybig = TkTextTag.new(t, 'font'=>['Helvetica', 24, :bold])
- style_tag_small = TkTextTag.new(t, 'font'=>'Times 8 bold')
- end
-###
-# case($tk_version)
-# when /^4.*/
-# style_tag_big = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*', 'kanjifont'=>$msg_kanji_font)
-# style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*', 'kanjifont'=>$kanji_font)
-# when /^8.*/
-# unless $style_demo_do_first
-# $style_demo_do_first = true
-# Tk.tk_call('font', 'create', '@bigascii',
-# '-copy', '-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*')
-# Tk.tk_call('font', 'create', '@smallascii',
-# '-copy', '-Adobe-Helvetica-Bold-R-Normal-*-100-*')
-# Tk.tk_call('font', 'create', '@cBigFont',
-# '-compound', '@bigascii @msg_knj')
-# Tk.tk_call('font', 'create', '@cSmallFont',
-# '-compound', '@smallascii @kanji')
-# end
-# style_tag_big = TkTextTag.new(t, 'font'=>'@cBigFont')
-# style_tag_small = TkTextTag.new(t, 'font'=>'@cSmallFont')
-# end
-
- # テキストタグ設定 (色,レリーフ関連)
- if TkWinfo.depth($root).to_i > 1
- style_tag_color1 = TkTextTag.new(t, 'background'=>'#a0b7ce')
- style_tag_color2 = TkTextTag.new(t, 'foreground'=>'red')
- style_tag_raised = TkTextTag.new(t, 'relief'=>'raised', 'borderwidth'=>1)
- style_tag_sunken = TkTextTag.new(t, 'relief'=>'sunken', 'borderwidth'=>1)
- else
- style_tag_color1 = TkTextTag.new(t, 'background'=>'black',
- 'foreground'=>'white')
- style_tag_color2 = TkTextTag.new(t, 'background'=>'black',
- 'foreground'=>'white')
- style_tag_raised = TkTextTag.new(t, 'background'=>'white',
- 'relief'=>'raised', 'borderwidth'=>1)
- style_tag_sunken = TkTextTag.new(t, 'background'=>'white',
- 'relief'=>'sunken', 'borderwidth'=>1)
- end
-
- # テキストタグ設定 (ãã®ä»–)
- if $tk_version =~ /^4\.[01]/
- style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
- 'bgstipple'=>'gray25')
- else
- style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
- 'bgstipple'=>'gray12')
- end
- style_tag_fgstipple = TkTextTag.new(t, 'fgstipple'=>'gray50')
- style_tag_underline = TkTextTag.new(t, 'underline'=>'on')
- style_tag_overstrike = TkTextTag.new(t, 'overstrike'=>'on')
- style_tag_right = TkTextTag.new(t, 'justify'=>'right')
- style_tag_center = TkTextTag.new(t, 'justify'=>'center')
- if $tk_version =~ /^4.*/
- style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*')
- style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*')
- else
- style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>[family, 10])
- style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>[family, 10])
- end
- style_tag_margins = TkTextTag.new(t, 'lmargin1'=>'12m', 'lmargin2'=>'6m',
- 'rmargin'=>'10m')
- style_tag_spacing = TkTextTag.new(t, 'spacing1'=>'10p', 'spacing2'=>'2p',
- 'lmargin1'=>'12m', 'lmargin2'=>'6m',
- 'rmargin'=>'10m')
-
- # テキスト挿入
- insert('end', 'ã“ã®ã‚ˆã†ã«ãƒ†ã‚­ã‚¹ãƒˆ widget ã¯æƒ…報を様々ãªã‚¹ã‚¿ã‚¤ãƒ«ã§è¡¨ç¤ºã™ã‚‹ã“ã¨
-ãŒã§ãã¾ã™ã€‚')
- insert('end', 'ã‚¿ã‚°', style_tag_big)
- insert('end', 'ã¨ã„ã†ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã§ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã•ã‚Œã¾ã™ã€‚
-ã‚¿ã‚°ã¨ã¯ãƒ†ã‚­ã‚¹ãƒˆ widget 内ã®ã‚る文字 (ã®ç¯„囲)ã«å¯¾ã—ã¦é©ç”¨ã§ãã‚‹
-å˜ãªã‚‹åå‰ã®ã“ã¨ã§ã™ã€‚ã‚¿ã‚°ã¯æ§˜ã€…ãªè¡¨ç¤ºã‚¹ã‚¿ã‚¤ãƒ«ã«è¨­å®šã§ãã¾ã™ã€‚
-設定ã™ã‚‹ã¨ã€ãã®ã‚¿ã‚°ã®ã¤ã„ãŸæ–‡å­—ã¯æŒ‡å®šã—ãŸã‚¹ã‚¿ã‚¤ãƒ«ã§è¡¨ç¤ºã•ã‚Œã‚‹
-よã†ã«ãªã‚Šã¾ã™ã€‚使用ã§ãる表示スタイルã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚
-')
- insert('end', '
-1. フォント', style_tag_big)
- insert('end', ' ã©ã‚“㪠X ã®ãƒ•ã‚©ãƒ³ãƒˆã§ã‚‚使ãˆã¾ã™ã€‚')
- insert('end', 'large', style_tag_verybig)
- insert('end', '
-ã¨ã‹')
-# insert('end', 'å°ã•ã„', style_tag_small)
- insert('end', 'small', style_tag_small)
- insert('end', 'ã¨ã‹ã€‚
-')
- insert('end', '
-2. 色', style_tag_big)
- insert('end', ' ')
- insert('end', '背景色', style_tag_color1)
- insert('end', 'ã‚‚')
- insert('end', 'å‰æ™¯è‰²', style_tag_color2)
- insert('end', 'ã‚‚')
- insert('end', '両方', style_tag_color1, style_tag_color2)
- insert('end', 'ã¨ã‚‚変ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
-')
- insert('end', '
-3. 網ã‹ã‘', style_tag_big)
- insert('end', ' ã“ã®ã‚ˆã†ã«æç”»ã®éš›ã«')
- insert('end', '背景も', style_tag_bgstipple)
- insert('end', '文字も', style_tag_fgstipple)
- insert('end', 'å˜ãªã‚‹å¡—ã‚Šã¤ã¶ã—
-ã§ãªãã€ç¶²ã‹ã‘を使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚
-')
- insert('end', '
-4. 下線', style_tag_big)
- insert('end', ' ã“ã®ã‚ˆã†ã«')
- insert('end', '文字ã«ä¸‹ç·šã‚’引ã', style_tag_underline)
- insert('end', 'ã“ã¨ãŒã§ãã¾ã™ã€‚
-')
- insert('end', '
-5. 打ã¡æ¶ˆã—ç·š', style_tag_big)
- insert('end', ' ã“ã®ã‚ˆã†ã«')
- insert('end', '文字ã«é‡ã­ã¦ç·šã‚’引ã', style_tag_overstrike)
- insert('end', 'ã“ã¨ãŒã§ãã¾ã™ã€‚
-')
- insert('end', '
-6. 3D 効果', style_tag_big)
- insert('end', ' 背景ã«æž ã‚’ã¤ã‘ã¦ã€æ–‡å­—ã‚’')
- insert('end', '飛ã³å‡ºã™', style_tag_raised)
- insert('end', 'よã†ã«ã—ãŸã‚Š')
- insert('end', '沈む', style_tag_sunken)
- insert('end', '
-よã†ã«ã§ãã¾ã™ã€‚
-')
- insert('end', '
-7. è¡Œæƒãˆ', style_tag_big)
- insert('end', ' ã“ã®ã‚ˆã†ã«è¡Œã‚’
-')
- insert('end', 'å·¦ã«æƒãˆãŸã‚Š
-')
- insert('end', 'å³ã«æƒãˆãŸã‚Š
-', style_tag_right)
- insert('end', '真中ã«æƒãˆãŸã‚Šã§ãã¾ã™ã€‚
-', style_tag_center)
- insert('end', '
-8. 肩付ã文字ã¨æ·»å­—', style_tag_big)
- insert('end', ' 10')
- insert('end', 'n', style_tag_super)
- insert('end', ' ã®ã‚ˆã†ã«è‚©ä»˜ã文字ã®åŠ¹æžœã‚„ã€')
- insert('end', '
-X')
- insert('end', 'i', style_tag_sub)
- insert('end', 'ã®ã‚ˆã†ã«æ·»å­—ã®åŠ¹æžœã‚’出ã™ã“ã¨ãŒã§ãã¾ã™ã€‚
-')
- insert('end', '
-9. マージン', style_tag_big)
- insert('end', 'テキストã®å·¦å´ã«ä½™åˆ†ãªç©ºç™½ã‚’ç½®ãã“ã¨ãŒã§ãã¾ã™:
-')
- insert('end', 'ã“ã®æ®µè½ã¯ãƒžãƒ¼ã‚¸ãƒ³ã®ä½¿ç”¨ä¾‹ã§ã™ã€‚スクリーン',
- style_tag_margins)
- insert('end', '上ã§æŠ˜ã‚Šè¿”ã•ã‚Œã¦è¡¨ç¤ºã•ã‚Œã¦ã„ã‚‹1è¡Œã®ãƒ†ã‚­ã‚¹ãƒˆã§ã™ã€‚',
- style_tag_margins)
- insert('end', 'å·¦å´ã«ã¯2種類ã®ãƒžãƒ¼ã‚¸ãƒ³ã‚’æŒã¡ã¾ã™ã€‚', style_tag_margins)
- insert('end', '1行目ã«å¯¾ã™ã‚‹ã‚‚ã®ã¨ã€', style_tag_margins)
- insert('end', '2行目以é™ã®é€£ç¶šã—ãŸãƒžãƒ¼ã‚¸ãƒ³', style_tag_margins)
- insert('end', 'ã§ã™ã€‚ã¾ãŸå³å´ã«ã‚‚マージンãŒã‚ã‚Šã¾ã™ã€‚', style_tag_margins)
- insert('end', 'è¡Œã®æŠ˜ã‚Šè¿”ã—ä½ç½®ã‚’決ã‚ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
-', style_tag_margins)
- insert('end', '
-10. スペーシング', style_tag_big)
- insert('end', '3ã¤ã®ãƒ‘ラメータã§è¡Œã®ã‚¹ãƒšãƒ¼ã‚·ãƒ³ã‚°ã‚’')
- insert('end', '制御ã™
-ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚Spacing1ã§ã€è¡Œã®')
- insert('end', '上ã«ã©ã®ãらã„ã®ç©ºé–“ã‚’ç½®ãã‹ã€
-spacing3')
- insert('end', 'ã§è¡Œã®ä¸‹ã«ã©ã®ãらã„ã®ç©ºé–“ã‚’ç½®ãã‹ã€')
- insert('end', 'è¡ŒãŒæŠ˜ã‚Šè¿”ã•ã‚Œã¦ã„ã‚‹ãªã‚‰
-ã°ã€spacing2ã§ã€')
- insert('end', 'テキスト行を生æˆã—ã¦ã„ã‚‹è¡Œã®é–“ã«ã©ã®ãらã„')
- insert('end', 'ã®ç©ºé–“ã‚’ç½®
-ãã‹ã‚’示ã—ã¾ã™ã€‚
-')
- insert('end', 'ã“れらã®ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã•ã‚ŒãŸæ®µè½ã¯ã©ã®ã‚ˆã†ã«',
- style_tag_spacing)
- insert('end', 'スペーシングãŒãŒè¡Œã‚れるã®ã‹ã‚’示ã—ã¾ã™ã€‚',
- style_tag_spacing)
- insert('end', 'å„段è½ã¯å®Ÿéš›ã¯ãƒ†ã‚­ã‚¹ãƒˆwidget', style_tag_spacing)
- insert('end', 'ã®1è¡Œã§ã€widgetã«ã‚ˆã£ã¦æŠ˜ã‚Šç•³ã¾ã‚Œã¦ã„ã¾ã™ã€‚
-', style_tag_spacing)
- insert('end', 'Spacing1ã¯ã“ã®ãƒ†ã‚­ã‚¹ãƒˆã§ã¯10pointã«', style_tag_spacing)
- insert('end', '設定ã•ã‚Œã¦ã„ã¾ã™ã€‚', style_tag_spacing)
- insert('end', 'ã“ã‚Œã«ã‚ˆã‚Šã€æ®µè½ã®é–“ã«å¤§ããªé–“éš”ãŒ', style_tag_spacing)
- insert('end', '存在ã—ã¦ã„ã¾ã™ã€‚', style_tag_spacing)
- insert('end', 'Spacing2ã¯2pointã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™ã€‚', style_tag_spacing)
- insert('end', 'ã“ã‚Œã§æ®µè½ã®ä¸­ã«ã»ã‚“ã®å°‘ã—é–“éš”ãŒå­˜åœ¨ã—ã¦ã„ã¾ã™ã€‚',
- style_tag_spacing)
- insert('end', 'Spacing3ã¯ã“ã®ä¾‹ã§ã¯ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã›ã‚“。
-', style_tag_spacing)
- insert('end', 'é–“éš”ãŒã©ã“ã«ã‚ã‚‹ã‹ã‚’見ãŸã‘ã‚Œã°ã€ã“れらã®æ®µè½ã®',
- style_tag_spacing)
- insert('end', 'ãªã‹ã§ãƒ†ã‚­ã‚¹ãƒˆã‚’é¸æŠžã—ã¦ãã ã•ã„。é¸æŠžã®', style_tag_spacing)
- insert('end', 'å転ã—ãŸéƒ¨åˆ†ã«ã¯ä½™åˆ†ã«ã¨ã‚‰ã‚ŒãŸé–“éš”ãŒ', style_tag_spacing)
- insert('end', 'å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚
-', style_tag_spacing)
-
-}
-
-txt.width 70
-txt.height 32
diff --git a/ext/tk/sample/demos-jp/tcolor b/ext/tk/sample/demos-jp/tcolor
deleted file mode 100644
index f2d5458db4..0000000000
--- a/ext/tk/sample/demos-jp/tcolor
+++ /dev/null
@@ -1,534 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: utf-8 -*-
-#
-# tcolor --
-# ã“ã®ã‚¹ã‚¯ãƒªãƒ—トã¯RGB,HSB,CYMå½¢å¼ã‚’サãƒãƒ¼ãƒˆã™ã‚‹
-# 簡易カラーエディタã§ã™ã€‚
-#
-# Copyright (C) 1998 Takaaki Tateishi(ttate@jaist.ac.jp)
-# last update: Thu Jun 18 06:32:35 JST 1998
-#
-
-# ã¾ãšã¯tk.rbを読ã¿è¾¼ã‚€ã€‚
-
-require "tk"
-
-
-# Tkã«ã‚ˆã£ã¦å¤‰æ›´ã•ã‚Œã‚‹å¤‰æ•°ã¯TkVariableã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’使ã†ã€‚
-
-$colorSpace = TkVariable.new(:rgb)
-$master = nil
-$red = 65535
-$green = 0
-$blue = 0
-$color = "#ffff00000000"
-$updating = TkVariable.new(0)
-$autoUpdate = TkVariable.new(1)
-$name = TkVariable.new($color)
-$command = TkVariable.new("print(%%,\"\n\")")
-# $command = TkVariable.new("")
-$label1 = TkVariable.new("label1")
-$label2 = TkVariable.new("label2")
-$label3 = TkVariable.new("label3")
-
-
-# リソースデータベースã®è¨­å®š
-if (TkVarAccess.new('tcl_platform')['platform'] == 'unix')
- TkOptionDB.add('*Entry.background', 'white')
-end
-
-
-# å„イベント用ã®ãƒ¡ã‚½ãƒƒãƒ‰
-
-def rgbToHsv(red,green,blue)
-
- if ( red > green )
- max = red
- min = green
- else
- max = green
- min = red
- end
-
- if ( blue > max )
- max = blue
- else
- if ( blue < min )
- min = blue
- end
- end
-
- range = max - min
-
- if ( max == 0 )
- sat = 0.0
- else
- sat = (max-min)/max
- end
-
- if ( sat == 0 )
- hue = 0.0
- else
- rc = (max-red)/range
- gc = (max-green)/range
- bc = (max-blue)/range
- if ( red == max )
- hue = 0.166667 * (bc - gc)
- else
- if ( green == max )
- hue = 0.166667 * (2.0 + rc - bc)
- else
- hue = 0.166667 * (4.0 + gc - rc)
- end
- end
- if ( hue < 0.0 )
- hue = hue + 1.0
- end
- end
-
- [hue,sat,max/65535]
-end
-
-
-def hsbToRgb(hue,sat,value)
- v = 65535.0 * value
- if( sat == 0 )
- ans = [v,v,v]
- else
- hue = hue*6.0
- if ( hue >= 6 )
- hue = 0.0
- end
- i = hue.to_i
- f = hue - i
- p = 65535.0 * value * (1.0 - sat)
- q = 65535.0 * value * (1.0 - (sat * f))
- t = 65535.0 * value * (1.0 - (sat * (1.0 - f)))
- case i
- when 0
- ans = [v,t,p]
- when 1
- ans = [q,v,p]
- when 2
- ans = [p,v,t]
- when 3
- ans = [p,q,v]
- when 4
- ans = [t,p,v]
- when 5
- ans = [v,p,q]
- else
- raise(eException,"i value #{i} is out of range")
- end
- end
- return ans
-end
-
-
-def _null_binding
- Module.new.instance_eval{binding}
-end
-private :_null_binding
-
-def doUpdate
- newCmd = $command.to_s.gsub("%%","\"#{$color}\"")
- eval(newCmd, _null_binding)
-end
-
-
-def tc_scaleChanged
- if( $updating.to_i == 1 )
- return
- end
-
- $master = :scale if $master == nil
-
- scale1 = $root.middle.middle.scale1
- scale2 = $root.middle.middle.scale2
- scale3 = $root.middle.middle.scale3
-
- case $colorSpace.value.intern
- when :rgb
- $red = (scale1.get * 65.535).to_i
- $green = (scale2.get * 65.535).to_i
- $blue = (scale3.get * 65.535).to_i
- when :cmy
- $red = (65535 - scale1.get * 65.535).to_i
- $green = (65535 - scale2.get * 65.535).to_i
- $blue = (65535 - scale3.get * 65.535).to_i
- when :hsb
- list = hsbToRgb(scale1.get / 1000.0,
- scale2.get / 1000.0,
- scale3.get / 1000.0)
- $red = list[0]
- $green = list[1]
- $blue = list[2]
- else
- raise(Exception,"unknown colorSpace")
- end
- $color = format("#%04x%04x%04x",$red.to_i,$green.to_i,$blue.to_i)
- $name.value = $color if $master == :scale
- $root.middle.right.set_color($color)
- if( $autoUpdate.to_i == 1 )
- doUpdate
- end
- Tk.update(true)
- $master = nil if $master == :scale
-end
-
-
-def tc_setScales
- $updating.value = 1
-
- scale1 = $root.middle.middle.scale1
- scale2 = $root.middle.middle.scale2
- scale3 = $root.middle.middle.scale3
-
- case $colorSpace.value.intern
- when :rgb
- scale1.set($red / 65.535)
- scale2.set($green / 65.535)
- scale3.set($blue / 65.535)
- when :cmy
- scale1.set((65535 - $red) / 65.535)
- scale2.set((65535 - $green) / 65.535)
- scale3.set((65535 - $blue) / 65.535)
- when :hsb
- list = rgbToHsv($red,$green,$blue)
- scale1.set( list[0] * 1000.0 )
- scale2.set( list[1] * 1000.0 )
- scale3.set( list[2] * 1000.0 )
- else
- raise(Exception,"unknown colorSpace")
- end
-
- $updating.value = 0
-end
-
-
-def tc_loadNamedColor(name)
- $name.value = name
- $master = :name if $master == nil
- if name[0,1] != "#"
- list = TkWinfo.rgb($root.middle.right.swatch,name)
- $red = list[0]
- $green = list[1]
- $blue = list[2]
- else
- case name.length
- when 4
- fmt = /#(.{1})(.{1})(.{1})/
- shift = 12
- when 7
- fmt = /#(.{2})(.{2})(.{2})/
- shift = 8
- when 10
- fmt = /#(.{3})(.{3})(.{3})/
- shift = 4
- when 13
- fmt = /#(.{4})(.{4})(.{4})/
- shift = 0
- else
- raise(eException,"syntax error in color name \"#{name}\"")
- end
- name.scan(fmt){|strlist|
- if strlist.length != 3
- raise(eException,"syntax error in color name \"#{name}\"")
- end
- $red = strlist[0].hex
- $green = strlist[1].hex
- $blue = strlist[2].hex
- }
- $red = $red << shift
- $green = $green << shift
- $blue = $blue << shift
- end
-
- tc_setScales
- $color = format("#%04x%04x%04x",$red,$green,$blue)
- $root.middle.right.set_color($color)
- if $autoUpdate.to_i == 1
- doUpdate
- end
- Tk.update(true)
- $master = nil if $master == :name
-end
-
-
-def changeColorSpace(space)
- case space
- when :rgb
- $label1.value = "Red"
- $label2.value = "Green"
- $label3.value = "Blue"
- when :cmy
- $label1.value = "Cyan"
- $label2.value = "Magenta"
- $label3.value = "Yellow"
- when :hsb
- $label1.value = "Hue"
- $label2.value = "Saturation"
- $label3.value = "Brightness"
- end
- tc_setScales
-end
-
-
-
-
-
-# tcolor用ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼
-
-class TkColorMenuFrame<TkFrame
- def initialize(parent)
- super(parent,
- "relief"=>"raised",
- "borderwidth"=>"2")
-
- # Fileメニューボタンã®ç”Ÿæˆ
- @file = TkMenubutton.new(self){|button|
-
- # Fileメニューã®ä½œæˆ
- @file_menu = TkMenu.new(button){
- add "radio",
- "label" => "RGB color space",
- "variable" => $colorSpace,
- "value" => :rgb,
- "underline" => "0",
- "command" => proc{changeColorSpace(:rgb)}
- add "radio",
- "label" => "CMY color space",
- "variable" => $colorSpace,
- "value" => :cmy,
- "underline" => "0",
- "command" => proc{changeColorSpace(:cmy)}
- add "radio",
- "label" => "HSB color space",
- "variable" => $colorSpace,
- "value" => :hsb,
- "underline" => "0",
- "command" => proc{changeColorSpace(:hsb)}
- add "separator"
- add "radio",
- "label" => "Automatic updates",
- "variable" => $autoUpdate,
- "value" => "1",
- "underline" => "0"
- add "radio",
- "label" => "Manual updates",
- "variable" => $autoUpdate,
- "value" => "0",
- "underline" => "0"
- add "separator"
- add "command",
- "label" => "Exit program",
- "underline" => "0",
- "command" => proc{exit}
- }
-
- # Fileメニューã¨Fileボタンを関連付ã‘ã‚‹
- menu @file_menu
-
- text "File"
- underline "0"
- }.pack("side"=>"left")
-
- self
- end
-end
-
-
-# 下部ã®ãƒ•ãƒ¬ãƒ¼ãƒ ã®ãŸã‚ã®ã‚¯ãƒ©ã‚¹
-class TkColorBotFrame<TkFrame
- def initialize(parent)
- super(parent,
- "relief"=> "raised",
- "borderwidth"=> 2)
-
- @commandLabel = TkLabel.new(self,
- "text"=> "Command:")
- @command = TkEntry.new(self,
- "relief"=> "sunken",
- "borderwidth"=> "2",
- "textvariable"=> $command,
- "font"=> "-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*")
- @update = TkButton.new(self,
- "text"=> "Update",
- "command"=> proc{doUpdate})
- @commandLabel.pack("side"=>"left")
- @update.pack("side"=>"right","pady"=>".1c","padx"=>".25c")
- @command.pack("expand"=>"yes","fill"=>"x","ipadx"=>".25c")
-
- self
- end
-end
-
-
-# 中段左ã®ãƒ•ãƒ¬ãƒ¼ãƒ 
-class TkColorMiddleLeftFrame<TkFrame
- def initialize(parent)
- super(parent)
-
- for i in ["/usr/local/lib/X11rgb.txt","/usr/lib/X11/rgb.txt",
- "/X11/R5/lib/X11/rgb.txt","/X11/R4/lib/rgb/rgb.txt",
- "/usr/openwin/lib/X11/rgb.txt"]
- if !File.readable?(i)
- next
- end
- f = File.open(i)
- @scroll = TkScrollbar.new(self,
- "orient"=>"vertical",
- "relief"=>"sunken",
- "borderwidth"=>"2")
- @scroll.pack("side"=>"right","fill"=>"y")
- @names = TkListbox.new(self,
- "width"=>"20",
- "height"=>"12",
- "yscrollcommand"=> proc{|first,last| @scroll.set first,last},
- "relief"=>"sunken",
- "borderwidth"=>"2",
- "exportselection"=>"false")
- @scroll.command(proc{|*args| @names.yview(*args)})
- @names.bind("Double-1",proc{
- tc_loadNamedColor(@names.get(@names.curselection))})
- @names.pack("side"=>"left")
- while (line = f.gets)
- line.chop!
- linelist = line.split(/[ \t]+/)
- if linelist.length == 4
- @names.insert("end",linelist[3])
- end
- end
- f.close
- break
- end
-
- self
- end
-end
-
-
-# 中段中央ã®ãƒ•ãƒ¬ãƒ¼ãƒ 
-class TkColorMiddleMiddleFrame<TkFrame
- # @scale1,@scale2,@scale3を外部ã‹ã‚‰å‚ç…§ã®ã¿è¨±å¯ã™ã‚‹ã€‚(変更ä¸å¯)
- attr_reader :scale1, :scale2, :scale3
-
- def initialize(parent)
- super(parent)
-
- @f1 = TkFrame.new(self)
- @f2 = TkFrame.new(self)
- @f3 = TkFrame.new(self)
- @f4 = TkFrame.new(self)
-
- for f in [@f1,@f2,@f3]
- f.pack("side"=>"top","expand"=>"yes")
- end
- @f4.pack("side"=>"top","expand"=>"yes","fill"=>"x")
-
- @label1 = TkLabel.new(self,"textvariable"=>$label1)
- @scale1 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c",
- "orient"=>"horizontal",
- "command"=>proc{tc_scaleChanged})
- @scale1.pack("side"=>"top","anchor"=>"w")
- @label1.pack("side"=>"top","anchor"=>"w")
-
- @label2 = TkLabel.new(self,"textvariable"=>$label2)
- @scale2 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c",
- "orient"=>"horizontal",
- "command"=>proc{tc_scaleChanged})
- @scale2.pack("side"=>"top","anchor"=>"w")
- @label2.pack("side"=>"top","anchor"=>"w")
-
- @label3 = TkLabel.new(self,"textvariable"=>$label3)
- @scale3 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c",
- "orient"=>"horizontal",
- "command"=>proc{tc_scaleChanged})
- @scale3.pack("side"=>"top","anchor"=>"w")
- @label3.pack("side"=>"top","anchor"=>"w")
-
- @nameLabel = TkLabel.new(self,"text"=>"Name:")
- @name = TkEntry.new(self,"relief"=>"sunken","borderwidth"=>"2",
- "textvariable"=>$name,"width"=>"10",
- "font"=>"-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*")
- @nameLabel.pack("side"=>"left")
- @name.pack("side"=>"right", "expand"=>"1", "fill"=>"x")
- @name.bind("Return",proc{tc_loadNamedColor $name.to_s})
-
- self
- end
-end
-
-
-class TkColorMiddleRightFrame<TkFrame
- attr_reader :swatch
-
- def initialize(parent)
- super(parent)
- @swatch = TkFrame.new(self, "width"=>"2c", "height"=>"5c",
- "background"=>$color)
- @value = TkLabel.new(self,
- "text"=>$color,
- "width"=>"13",
- "font"=>"-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*")
- @swatch.pack("side"=>"top","expand"=>"yes","fill"=>"both")
- @value.pack("side"=>"bottom","pady"=>".25c")
-
- self
- end
-
- def set_color(color)
- @swatch["background"] = color
- @value["text"] = color
- end
-end
-
-
-
-# 中段ã®ãƒ•ãƒ¬ãƒ¼ãƒ 
-class TkColorMiddleFrame<TkFrame
- attr_reader :left, :middle, :right
-
- def initialize(parent)
- super(parent,
- "relief"=> "raised",
- "borderwidth"=> "2")
-
- @left = TkColorMiddleLeftFrame.new(self)
- @left.pack("side"=>"left","padx"=>".25c","pady"=>".25c")
-
- @middle = TkColorMiddleMiddleFrame.new(self)
- @middle.pack("side"=>"left","expand"=>"yes","fill"=>"y")
-
- @right = TkColorMiddleRightFrame.new(self)
- @right.pack("side"=>"left","padx"=>".25c","pady"=>".25c","anchor"=>"s")
-
- self
- end
-end
-
-
-class TkColor<TkRoot
- attr_reader :menu, :bottom, :middle
-
- def initialize(*args)
- super(*args)
- @menu = TkColorMenuFrame.new(self)
- @menu.pack("side"=>"top", "fill"=>"x")
-
- @bottom = TkColorBotFrame.new(self)
- @bottom.pack("side"=>"bottom","fill"=>"x")
-
- @middle = TkColorMiddleFrame.new(self)
- @middle.pack("side"=>"top","fill"=>"both")
-
- self
- end
-end
-
-
-$root = TkColor.new
-
-# イベントを待ã¤ç‚ºã«ãƒ«ãƒ¼ãƒ—ã«å…¥ã‚‹ã€‚
-changeColorSpace :rgb
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/text.rb b/ext/tk/sample/demos-jp/text.rb
deleted file mode 100644
index 117f9f105a..0000000000
--- a/ext/tk/sample/demos-jp/text.rb
+++ /dev/null
@@ -1,121 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# text (basic facilities) widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($text_demo) && $text_demo
- $text_demo.destroy
- $text_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$text_demo = TkToplevel.new {|w|
- title("Text Demonstration - Basic Facilities")
- iconname("text")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($text_demo).pack(:fill=>:both, :expand=>true)
-
-# version check
-if ((Tk::TK_VERSION.split('.').collect{|n| n.to_i} <=> [8,4]) < 0)
- undo_support = false
-else
- undo_support = true
-end
-
-# frame 生æˆ
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $text_demo
- $text_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'text'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# text 生æˆ
-TkText.new(base_frame){|t|
- # 生æˆ
- relief 'sunken'
- bd 2
- setgrid 1
- height 30
- TkScrollbar.new(base_frame) {|s|
- pack('side'=>'right', 'fill'=>'y')
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }
- pack('expand'=>'yes', 'fill'=>'both')
-
- # テキスト挿入
- insert('0.0', <<EOT)
-ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ãƒ†ã‚­ã‚¹ãƒˆ widget ã§ã™ã€‚1è¡Œã¾ãŸã¯ãれ以上ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’表
-示・編集ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚以下ã¯ãƒ†ã‚­ã‚¹ãƒˆ widget ã§ã§ãã‚‹æ“作ã«ã¤ã„ã¦
-ã¾ã¨ã‚ãŸã‚‚ã®ã§ã™ã€‚
-
-1. スクロール。スクロールãƒãƒ¼ã§ãƒ†ã‚­ã‚¹ãƒˆã®è¡¨ç¤ºéƒ¨åˆ†ã‚’å‹•ã‹ã™ã“ã¨ãŒã§ãã¾ã™ã€‚
-
-2. スキャニング。テキストã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³2 (中ボタンを) を押
-ã—ã¦ä¸Šä¸‹ã«ãƒ‰ãƒ©ãƒƒã‚°ã—ã¦ãã ã•ã„。ãã†ã™ã‚‹ã¨ãƒ†ã‚­ã‚¹ãƒˆãŒé«˜é€Ÿã§ãƒ‰ãƒ©ãƒƒã‚°ã•ã‚Œã€
-内容をã–ã£ã¨çœºã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
-
-3. テキストã®æŒ¿å…¥ã€‚マウスボタン1 (左ボタン) を押ã—ã€æŒ¿å…¥ã‚«ãƒ¼ã‚½ãƒ«ã‚’セッ
-トã—ã¦ã‹ã‚‰ãƒ†ã‚­ã‚¹ãƒˆã‚’入力ã—ã¦ãã ã•ã„。入力ã—ãŸã‚‚ã®ãŒ widget ã«å…¥ã‚Šã¾ã™ã€‚
-
-4. é¸æŠžã€‚ã‚る範囲ã®æ–‡å­—ã‚’é¸æŠžã™ã‚‹ã«ã¯ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³1 を押ã—ã€ãƒ‰ãƒ©ãƒƒã‚°ã—
-ã¦ãã ã•ã„。一度ボタンを離ã—ãŸã‚‰ã€ã‚·ãƒ•ãƒˆã‚­ãƒ¼ã‚’押ã—ãªãŒã‚‰ãƒœã‚¿ãƒ³1 を押ã™
-ã“ã¨ã§é¸æŠžç¯„囲ã®èª¿æ•´ãŒã§ãã¾ã™ã€‚ã“ã‚Œã¯é¸æŠžç¯„囲ã®æœ€å¾Œã‚’マウスカーソルã«
-最も近ã„ä½ç½®ã«ãƒªã‚»ãƒƒãƒˆã—ã€ãƒœã‚¿ãƒ³ã‚’離ã™å‰ã«ãƒžã‚¦ã‚¹ã‚’ドラッグã™ã‚‹ã“ã¨ã§ã•
-らã«é¸æŠžç¯„囲を調整ã§ãã¾ã™ã€‚ダブルクリックã§ãƒ¯ãƒ¼ãƒ‰ã‚’ã€ã¾ãŸãƒˆãƒªãƒ—ルクリッ
-クã§è¡Œå…¨ä½“ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
-
-5. 消去ã¨ç½®æ›ã€‚テキストを消去ã™ã‚‹ã«ã¯ã€æ¶ˆåŽ»ã—ãŸã„文字をé¸æŠžã—ã¦ãƒãƒƒã‚¯
-スペースã‹ãƒ‡ãƒªãƒ¼ãƒˆã‚­ãƒ¼ã‚’入力ã—ã¦ãã ã•ã„。ã‚ã‚‹ã„ã¯ã€æ–°ã—ã„テキストを
-入力ã™ã‚‹ã¨é¸æŠžã•ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆã¨ç½®æ›ã•ã‚Œã¾ã™ã€‚
-
-6. é¸æŠžéƒ¨åˆ†ã®ã‚³ãƒ”ー。é¸æŠžéƒ¨åˆ†ã‚’ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ä¸­ã®ã©ã“ã‹ã«ã‚³ãƒ”ーã™ã‚‹
-ã«ã¯ã€ã¾ãšã‚³ãƒ”ーã—ãŸã„所をé¸æŠž(ã“ã“ã§ã€ã‚ã‚‹ã„ã¯åˆ¥ã®ã‚¢ãƒ—リケーションã§)
-ã—ã€ãƒœã‚¿ãƒ³ 2 をクリックã—ã¦ã€æŒ¿å…¥ã‚«ãƒ¼ã‚½ãƒ«ã®ä½ç½®ã«ã‚³ãƒ”ーã—ã¦ãã ã•ã„。
-
-7. 編集。テキスト widget 㯠Emacs ã®ã‚­ãƒ¼ãƒã‚¤ãƒ³ãƒ‰ã«åŠ ãˆã¦æ¨™æº–çš„ãªã® Motif
-ã®ç·¨é›†æ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ãƒãƒƒã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã¨ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«-H ã¯æŒ¿å…¥
-カーソルã®å·¦å´ã®æ–‡å­—を削除ã—ã¾ã™ã€‚デリートキーã¨ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«-D ã¯æŒ¿å…¥
-カーソルã®å³å´ã®æ–‡å­—を削除ã—ã¾ã™ã€‚Meta-ãƒãƒƒã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã¯æŒ¿å…¥ã‚«ãƒ¼ã‚½ãƒ«ã®
-å³å´ã®å˜èªžã‚’削除ã—ã€Meta-D ã¯æŒ¿å…¥ã‚«ãƒ¼ã‚½ãƒ«ã®å·¦å´ã®å˜èªžã‚’削除ã—ã¾ã™ã€‚
-コントロール-K ã¯æŒ¿å…¥ã‚«ãƒ¼ã‚½ãƒ«ã‹ã‚‰è¡Œæœ«ã¾ã§ã‚’削除ã—ã€ãã®ä½ç½®ã«æ”¹è¡Œ
-ã—ã‹ãªã‹ã£ãŸå ´åˆã¯ã€æ”¹è¡Œã‚’削除ã—ã¾ã™ã€‚#{
- if undo_support
- undo_text = "Control-z ã¯æœ€å¾Œã«è¡Œã£ãŸå¤‰æ›´ã®å–り消ã—(undo)ã‚’è¡Œã„ã€"
- case $tk_platform['platform']
- when "unix", "macintosh"
- undo_text << "Control-Shift-z"
- else # 'windows'
- undo_text << "Control-y"
- end
- undo_text << "ã¯undoã—ãŸå¤‰æ›´ã®å†é©ç”¨(redo)ã‚’è¡Œã„ã¾ã™ã€‚"
- else
- ""
- end
-}
-
-
-8. ウィンドウã®ãƒªã‚µã‚¤ã‚ºã€‚ã“ã® widget 㯠"setGrid" オプションをオンã«ã—
-ã¦ã‚ã‚Šã¾ã™ã®ã§ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’リサイズã™ã‚‹æ™‚ã«ã¯é«˜ã•ã¨å¹…ã¯å¸¸ã«æ–‡å­—高ã¨æ–‡
-å­—å¹…ã®æ•´æ•°å€ã«ãªã‚Šã¾ã™ã€‚ã¾ãŸã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’ç‹­ãã—ãŸå ´åˆã«ã¯é•·ã„è¡ŒãŒè‡ªå‹•
-çš„ã«æŠ˜ã‚Šè¿”ã•ã‚Œã€å¸¸ã«å…¨ã¦ã®å†…容ãŒè¦‹ãˆã‚‹ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™ã€‚
-EOT
-
- set_insert('0.0')
-}
-
diff --git a/ext/tk/sample/demos-jp/textpeer.rb b/ext/tk/sample/demos-jp/textpeer.rb
deleted file mode 100644
index 341e6218b9..0000000000
--- a/ext/tk/sample/demos-jp/textpeer.rb
+++ /dev/null
@@ -1,83 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# text widget peering demo (called by 'widget')
-#
-# based on Tcl/Tk8.5.0 widget demos
-
-if defined?($textpeer_demo) && $textpeer_demo
- $textpeer_demo.destroy
- $textpeer_demo = nil
-end
-
-# demo toplevel widget
-$textpeer_demo = TkToplevel.new {|w|
- title("Text Widget Peering Demonstration")
- iconname("textpeer")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($textpeer_demo).pack(:fill=>:both, :expand=>true)
-
-count = [0]
-
-## Define a widget that we peer from; it won't ever actually be shown though
-first = TkText.new(base_frame, :widgetname=>"text#{count[0] += 1}")
-first.insert :end,"ã“ã®ãƒ‡ãƒ¢ã¯ä¸€ã¤ã®çµ„ã‚’æˆã—ãŸãƒ†ã‚­ã‚¹ãƒˆã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã‚’示ã—ã¾ã™ã€‚"
-first.insert :end,"ãれらã®ãƒ†ã‚­ã‚¹ãƒˆã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã¯å¯¾ç­‰(ピア;peer)ã®é–¢ä¿‚ã«"
-first.insert :end,"ãªã£ã¦ã„ã¾ã™ã€‚"
-first.insert :end,"ãれらã¯ã€åŸºç›¤ã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã¯å…±é€šã®ã‚‚ã®ã‚’æŒã¡ã¾ã™ãŒã€"
-first.insert :end,"ç”»é¢è¡¨ç¤ºä½ç½®ã€ç·¨é›†ä½ç½®ã€é¸æŠžç¯„囲(selection)ã«ã¤ã„ã¦ã¯"
-first.insert :end,"独立ã«æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚"
-first.insert :end,"å„テキストウィジェットã®è„‡ã«ã‚ã‚‹"
-first.insert :end,"「ピア(peer)ã®ä½œæˆã€ãƒœã‚¿ãƒ³ã‚’使ãˆã°ã€"
-first.insert :end,"æ–°ãŸãªãƒ”アを追加ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚"
-first.insert :end,"ã¾ãŸã€Œãƒ”ã‚¢(peer)ã®æ¶ˆåŽ»ã€ãƒœã‚¿ãƒ³ã‚’使ãˆã°ã€"
-first.insert :end,"特定ã®ãƒ”アウィジェットを消去ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚"
-
-Tk.update_idletasks ## for 'first' widget
-
-## Procedures to make and kill clones; most of this is just so that the demo
-## looks nice...
-def makeClone(count, win, txt)
- cnt = (count[0] += 1)
- peer = TkText::Peer.new(txt, win, :widgetname=>"text#{cnt}")
- sbar = TkScrollbar.new(win, :widgetname=>"sb#{cnt}")
- peer.yscrollbar sbar
- b1 = TkButton.new(win, :widgetname=>"clone#{cnt}",
- :text=>'ピア(peer)ã®ä½œæˆ',
- :command=>proc{makeClone(count, win, peer)})
- b2 = TkButton.new(win, :widgetname=>"kill#{cnt}",
- :text=>'ピア(peer)ã®æ¶ˆåŽ»',
- :command=>proc{killClone(win, cnt)})
- row = cnt * 2
- TkGrid.configure(peer, sbar, b1, :sticky=>'nsew', :row=>row)
- TkGrid.configure('^', '^', b2, :sticky=>'nsew', :row=>(row+=1))
- TkGrid.configure(b1, b2, :sticky=>'new')
- TkGrid.rowconfigure(win, b2, :weight=>1)
-end
-
-def killClone(win, cnt)
- Tk.destroy("#{win.path}.text#{cnt}", "#{win.path}.sb#{cnt}",
- "#{win.path}.clone#{cnt}", "#{win.path}.kill#{cnt}")
-end
-
-## Now set up the GUI
-makeClone(count, base_frame, first)
-makeClone(count, base_frame, first)
-first.destroy
-
-## See Code / Dismiss buttons
-TkFrame.new(base_frame){|f|
- TkButton.new(f, :text=>'é–‰ã˜ã‚‹', :width=>15, :command=>proc{
- $textpeer_demo.destroy
- $textpeer_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'コードå‚ç…§', :width=>15, :command=>proc{
- showCode 'textpeer'
- }).pack(:side=>:left, :expand=>true)
-
- TkGrid.configure(f, '-', '-', :sticky=>'ew', :row=>5000)
-}
-TkGrid.columnconfigure(base_frame, 0, :weight=>1)
diff --git a/ext/tk/sample/demos-jp/timer b/ext/tk/sample/demos-jp/timer
deleted file mode 100644
index 6cb7c87e09..0000000000
--- a/ext/tk/sample/demos-jp/timer
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/env ruby
-#
-# timer --
-# This script generates a counter with start,stop and reset buttons.
-#
-# Copyright (C) 1998 Takaaki Tateishi (ttate@jaist.ac.jp)
-# last update: Sat Jun 27 12:24:14 JST 1998
-#
-
-require "tk"
-require "thread"
-require "tkafter"
-
-$time = "0.00"
-$m = Mutex.new
-$loop = false
-
-def timer_stop
- $loop = false
- $m.lock
-end
-
-def timer_start
- $loop = true
- $m.unlock
-end
-
-def timer_reset
- $time = "0.00"
- $root.countframe.counter['text'] = $time
-end
-
-def timer_loop
- if $loop
- $time = $time.succ
- $root.countframe.counter['text'] = $time
- end
- Tk.after(10,proc{timer_loop})
-end
-
-
-#
-# thread version
-#
-def timer_loop2
- while true
- $m.lock
- $time = $time.succ
- $root.countframe.counter['text'] = $time
- sleep(0.01)
- $m.unlock
- end
-end
-
-#
-# TkAfter
-#
-def timer_loop3
- if $loop
- $time = $time.succ
- $root.countframe.counter['text'] = $time
- end
-end
-
-
-class CountFrame < TkFrame
- attr_reader :counter
-
- def initialize(parent=nil,keys=nil)
- super(parent,keys)
- @counter = TkLabel.new(self,
- 'text'=>$time,
- 'relief'=>'raised')
- @counter.pack('fill'=>'both')
- self
- end
-end
-
-
-class ButtonFrame < TkFrame
- def initialize(parent=nil,keys=nil)
- super(parent,keys)
-=begin
- @stop = TkButton.new(self,
- 'text'=>'Stop',
- 'command'=>proc{timer_stop})
- @start = TkButton.new(self,
- 'text'=>'Start',
- 'command'=>proc{timer_start})
-=end
- @stop = TkButton.new(self, :text=>'Stop', :state=>:disabled)
- @start = TkButton.new(self, :text=>'Start', :state=>:normal)
-
- @stop.command proc{
- timer_stop
- @start.state(:normal)
- @stop.state(:disabled)
- }
- @start.command proc{
- timer_start
- @stop.state(:normal)
- @start.state(:disabled)
- }
-
- @reset = TkButton.new(self,
- 'text'=>'Reset',
- 'command'=>proc{timer_reset})
- for b in [@stop,@start,@reset]
- b.pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes')
- end
- end
-end
-
-
-class Timer < TkRoot
- attr_reader :countframe
-
- def initialize(*args)
- super(*args)
- @countframe = CountFrame.new(self)
- @buttonframe = ButtonFrame.new(self)
- for f in [@buttonframe,@countframe]
- f.pack('side'=>'top', 'fill'=>'both')
- end
- self
- end
-end
-
-
-$root = Timer.new
-
-#$thread = Thread.start{timer_loop2}
-#timer_loop
-TkAfter.new(10,-1,proc{timer_loop3}).start
-
-Tk.mainloop
diff --git a/ext/tk/sample/demos-jp/toolbar.rb b/ext/tk/sample/demos-jp/toolbar.rb
deleted file mode 100644
index f355e8fef8..0000000000
--- a/ext/tk/sample/demos-jp/toolbar.rb
+++ /dev/null
@@ -1,137 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# toolbar.rb --
-#
-# This demonstration script creates a toolbar that can be torn off.
-#
-# based on "Id: toolbar.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($toolbar_demo) && $toolbar_demo
- $toolbar_demo.destroy
- $toolbar_demo = nil
-end
-
-$toolbar_demo = TkToplevel.new {|w|
- title("Ttk Menu Buttons")
- iconname("toolbar")
- positionWindow(w)
-}
-
-base_frame = Ttk::Frame.new($toolbar_demo).pack(:fill=>:both, :expand=>true)
-
-if Tk.windowingsystem != 'aqua'
- msg = Ttk::Label.new(base_frame, :wraplength=>'4i', :text=><<EOL)
-ã“ã®ãƒ‡ãƒ¢ã§ã¯ï¼Œãƒ„ールãƒãƒ¼ã‚’ã©ã®ã‚ˆã†ã«ã—ã¦é©åˆ‡ã«ãƒ†ãƒ¼ãƒžå¯¾å¿œã•ã›ã‚‹ã‹ï¼Œ\
-ã¾ãŸï¼Œã©ã®ã‚ˆã†ã«ã—ã¦åˆ‡ã‚Šé›¢ã—å¯èƒ½ã«ã™ã‚‹ã‹ã‚’示ã—ã¦ã„ã¾ã™\
-(ãŸã ã—,ツールãƒãƒ¼ã®åˆ‡ã‚Šé›¢ã—ã«ã¯Tcl/Tk8.5以上ã®æ©Ÿèƒ½ãŒå¿…è¦ã§ã™ï¼‰ï¼Ž\
-ツールãƒãƒ¼ã®ãƒœã‚¿ãƒ³ã¯ï¼Œ'Toolbutton'スタイルを使用ã™ã‚‹ã‚ˆã†ã«æ˜Žç¤ºã™ã‚‹ã“ã¨ã§ï¼Œ\
-"toolbar style"ボタンã¨ãªã‚‹ã‚ˆã†ã«å±žæ€§è¨­å®šã•ã‚Œã¦ã„ã¾ã™ï¼Ž\
-ツールãƒãƒ¼ã®å·¦ç«¯ã«ã¯ç°¡å˜ãªãƒžãƒ¼ã‚«ãƒ¼ãŒç½®ã‹ã‚Œã¦ã„ã¾ã™ï¼Ž\
-マーカー上ã«ãƒžã‚¦ã‚¹ã‚«ãƒ¼ã‚½ãƒ«ãŒæ¥ã‚‹ã¨ç§»å‹•ã‚¢ã‚¤ã‚³ãƒ³ã«ã‚«ãƒ¼ã‚½ãƒ«ãŒå¤‰åŒ–ã—ã¾ã™ï¼Ž\
-ãã“ã§ãƒ„ールãƒãƒ¼ã‚’å‹•ã‹ã™ã‚ˆã†ã«ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã¨ï¼Œ\
-ツールãƒãƒ¼å…¨ä½“を切り離ã—ã¦ç‹¬ç«‹ã—ãŸãƒˆãƒƒãƒ—レベルウィジェットã«\
-ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼Ž\
-切り離ã—ãŸãƒ„ールãƒãƒ¼ãŒä¸è¦ã¨ãªã£ãŸæ™‚ã«ã¯ï¼Œ\
-一般的ãªãƒˆãƒƒãƒ—レベルウィジェットã¨åŒæ§˜ã«å˜ç´”ã«é–‰ã˜ã‚‹ã“ã¨ã§ï¼Œ
-å†ã³å…ƒã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«å¼µã‚Šä»˜ã‘られるã§ã—ょã†ï¼Ž
-EOL
-else
- msg = Ttk::Label.new(base_frame, :wraplength=>'4i', :text=><<EOL)
-ã“ã®ãƒ‡ãƒ¢ã§ã¯ï¼Œãƒ„ールãƒãƒ¼ã‚’ã©ã®ã‚ˆã†ã«ã—ã¦é©åˆ‡ã«ãƒ†ãƒ¼ãƒžå¯¾å¿œã•ã›ã‚‹ã‹ã‚’\
-示ã—ã¦ã„ã¾ã™ï¼Ž\
-ツールãƒãƒ¼ã®ãƒœã‚¿ãƒ³ã¯ï¼Œ'Toolbutton'スタイルを使用ã™ã‚‹ã‚ˆã†ã«æ˜Žç¤ºã™ã‚‹ã“ã¨ã§ï¼Œ\
-"toolbar style"ボタンã¨ãªã‚‹ã‚ˆã†ã«å±žæ€§è¨­å®šã•ã‚Œã¦ã„ã¾ã™ï¼Ž
-EOL
-end
-
-## Set up the toolbar hull
-tbar_base = Tk::Frame.new(base_frame, # Tk 標準㮠frame ã§ãªã‘ã‚Œã°ãªã‚Šã¾ã›ã‚“.
- :widgetname=>'toolbar') # ウィンドウタイトル文字列ã¨ã™ã‚‹ãŸã‚ã«ï¼Œã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆåを明示ã—ã¦ã„ã¾ã™ï¼Ž
-sep = Ttk::Separator.new(base_frame)
-to_base = Ttk::Frame.new(tbar_base, :cursor=>'fleur')
-if Tk.windowingsystem != 'aqua'
- to = Ttk::Separator.new(to_base, :orient=>:vertical)
- to2 = Ttk::Separator.new(to_base, :orient=>:vertical)
- to.pack(:fill=>:y, :expand=>true, :padx=>2, :side=>:left)
- to2.pack(:fill=>:y, :expand=>true, :side=>:left)
-end
-
-contents = Ttk::Frame.new(tbar_base)
-Tk.grid(to_base, contents, :sticky=>'nsew')
-tbar_base.grid_columnconfigure(contents, :weight=>1)
-contents.grid_columnconfigure(1000, :weight=>1)
-
-if Tk.windowingsystem != 'aqua'
- ## Bindings so that the toolbar can be torn off and reattached
- to_base.bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)}
- to. bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)}
- to2. bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)}
- def tbar_base.tearoff(w, x, y)
- on_win = TkWinfo.containing(x, y)
- return unless (on_win && on_win.path =~ /^#{@path}(\.|$)/)
- self.grid_remove
- w.grid_remove
- self.wm_manage
- # self.wm_title('Toolbar') # ã‚‚ã—ウィジェットåをウィンドウタイトルã«ã—ãŸããªã„ãªã‚‰ï¼Œã“ã“ã§è¨­å®šã—ã¦ãã ã•ã„
- self.wm_protocol('WM_DELETE_WINDOW'){ self.untearoff(w) }
- end
- def tbar_base.untearoff(w)
- self.wm_forget
- w.grid
- self.grid
- end
-end
-
-## Some content for the rest of the toplevel
-text = TkText.new(base_frame, :width=>40, :height=>10)
-
-## Toolbar contents
-tb_btn = Ttk::Button.new(tbar_base, :text=>'ボタン', :style=>'Toolbutton',
- :command=>proc{
- text.insert(:end, "ボタンãŒæŠ¼ã•ã‚Œã¾ã—ãŸï¼Ž\n")
- })
-tb_chk = Ttk::Checkbutton.new(tbar_base, :text=>'ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³',
- :style=>'Toolbutton',
- :variable=>(check = TkVariable.new),
- :command=>proc{
- text.insert(:end, "ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³ã®å€¤ã¯#{check.value}ã§ã™ï¼Ž\n")
- })
-tb_mbtn = Ttk::Menubutton.new(tbar_base, :text=>'メニュー')
-tb_combo = Ttk::Combobox.new(tbar_base, :value=>TkFont.families,
- :state=>:readonly)
-tb_mbtn.menu(menu = Tk::Menu.new(tb_mbtn))
-menu.add(:command, :label=>'Just', :command=>proc{text.insert(:end, "Just\n")})
-menu.add(:command, :label=>'An', :command=>proc{text.insert(:end, "An\n")})
-menu.add(:command, :label=>'Example',
- :command=>proc{text.insert(:end, "Example\n")})
-tb_combo.bind('<ComboboxSelected>'){ text.font.family = tb_combo.get }
-
-## Arrange contents
-Tk.grid(tb_btn, tb_chk, tb_mbtn, tb_combo,
- :in=>contents, :padx=>2, :sticky=>'ns')
-Tk.grid(tbar_base, :sticky=>'ew')
-Tk.grid(sep, :sticky=>'ew')
-Tk.grid(msg, :sticky=>'ew')
-Tk.grid(text, :sticky=>'nsew')
-base_frame.grid_rowconfigure(text, :weight=>1)
-base_frame.grid_columnconfigure(text, :weight=>1)
-
-## See Code / Dismiss buttons
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'toolbar'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $toolbar_demo.destroy
- $toolbar_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- Tk.grid(frame, :sticky=>'ew')
-}
diff --git a/ext/tk/sample/demos-jp/tree.rb b/ext/tk/sample/demos-jp/tree.rb
deleted file mode 100644
index 48d5e5407e..0000000000
--- a/ext/tk/sample/demos-jp/tree.rb
+++ /dev/null
@@ -1,121 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# tree.rb --
-#
-# This demonstration script creates a toplevel window containing a Ttk
-# tree widget.
-#
-# based on "Id: tree.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($tree_demo) && $tree_demo
- $tree_demo.destroy
- $tree_demo = nil
-end
-
-$tree_demo = TkToplevel.new {|w|
- title("Directory Browser")
- iconname("tree")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($tree_demo).pack(:fill=>:both, :expand=>true)
-
-## Explanatory text
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i',
- :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6],
- :text=><<EOL).pack(:fill=>:x)
-Ttkã¨ã¯ï¼Œãƒ†ãƒ¼ãƒžæŒ‡å®šå¯èƒ½ãªæ–°ã—ã„ウィジェット集åˆã§ã™ï¼Ž\
-ã“ã®ã‚µãƒ³ãƒ—ルã¯ï¼Œãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã®ã‚ˆã†ãªéšŽå±¤çš„ãªãƒ‡ãƒ¼ã‚¿é›†åˆã‚’\
-å‚ç…§ã§ãるよã†ã«ã—ãŸTtk::Treeviewウィジェットをå«ã‚“ã§ã„ã¾ã™ï¼Ž\
-Ttk::Treeviewウィジェットã¯ï¼Œæœ¨æ§‹é€ è‡ªä½“ã®è¡¨ç¤ºã‚’å¯èƒ½ã«ã™ã‚‹ã ã‘ã§ãªã,\
-追加情報(ã“ã®ã‚µãƒ³ãƒ—ルã®å ´åˆã¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚µã‚¤ã‚º)を表示ã™ã‚‹ãŸã‚ã«\
-ä»»æ„ã®å€‹æ•°ã®è¿½åŠ ã‚«ãƒ©ãƒ ã‚‚扱ã†ã“ã¨ã‚‚ã§ãã¾ã™ï¼Ž\
-ã¾ãŸï¼Œã‚«ãƒ©ãƒ ã®ã‚¿ã‚¤ãƒˆãƒ«é–“ã®åŒºåˆ‡ã‚Šéƒ¨åˆ†ã‚’ドラッグã™ã‚‹ã“ã¨ã§ï¼Œ\
-カラムã®å¹…を変更ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ï¼Ž
-EOL
-
-## See Code / Dismiss
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'tree'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $tree_demo.destroy
- $tree_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-## Code to populate the roots of the tree (can be more than one on Windows)
-def populate_roots(tree)
- TkComm.simplelist(Tk.tk_call('file', 'volumes')).sort.each{|dir|
- populate_tree(tree, tree.insert(nil, :end, :text=>dir,
- :values=>[dir, 'directory']))
- }
-end
-
-## Code to populate a node of the tree
-def populate_tree(tree, node)
- return if tree.get(node, :type) != 'directory'
-
- path = tree.get(node, :fullpath)
- tree.delete(tree.children(node))
- Dir.glob("#{path}/*").sort.each{|f|
- type = File.ftype(f) rescue nil
- id = tree.insert(node, :end,
- :text=>File.basename(f), :values=>[f, type]).id
- if type == 'directory'
- ## Make it so that this node is openable
- tree.insert(id, 0, :text=>'dummy')
- tree.itemconfigure(id, :text=>File.basename(f))
- elsif type == 'file'
- size = File.size(f)
- if size >= 1024*1024*1024
- size = '%.1f GB' % (size.to_f/1024/1024/1024)
- elsif size >= 1024*1024
- size = '%.1f MB' % (size.to_f/1024/1024)
- elsif size >= 1024
- size = '%.1f KB' % (size.to_f/1024)
- else
- size = '%.1f bytes' % (size.to_f/1024)
- end
- tree.set(id, :size, size)
- end
- }
-
- # Stop this code from rerunning on the current node
- tree.set(node, :type, 'processed_directory')
-end
-
-## Create the tree and set it up
-tree = Ttk::Treeview.new(base_frame, :columns=>%w(fullpath type size),
- :displaycolumns=>['size'])
-if Tk.windowingsystem != 'aqua'
- vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame))
- hsb = tree.xscrollbar(Ttk::Scrollbar.new(base_frame))
-else
- vsb = tree.yscrollbar(Tk::Scrollbar.new(base_frame))
- hsb = tree.xscrollbar(Tk::Scrollbar.new(base_frame))
-end
-
-tree.heading_configure('#0', :text=>'Directory Structure')
-tree.heading_configure('size', :text=>'File Size')
-tree.column_configure('size', :stretch=>0, :width=>70)
-populate_roots(tree)
-tree.bind('<TreeviewOpen>', '%W'){|w| populate_tree(w, w.focus_item)}
-
-## Arrange the tree and its scrollbars in the toplevel
-container = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-container.lower
-Tk.grid(tree, vsb, :in=>container, :sticky=>'nsew')
-Tk.grid(hsb, :in=>container, :sticky=>'nsew')
-container.grid_columnconfigure(0, :weight=>1)
-container.grid_rowconfigure(0, :weight=>1)
diff --git a/ext/tk/sample/demos-jp/ttkbut.rb b/ext/tk/sample/demos-jp/ttkbut.rb
deleted file mode 100644
index 3a72eac377..0000000000
--- a/ext/tk/sample/demos-jp/ttkbut.rb
+++ /dev/null
@@ -1,146 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# ttkbut.rb
-#
-# This demonstration script creates a toplevel window containing several
-# simple Ttk widgets, such as labels, labelframes, buttons, checkbuttons and
-# radiobuttons.
-#
-# based on "Id: ttkbut.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttkbut_demo) && $ttkbut_demo
- $ttkbut_demo.destroy
- $ttkbut_demo = nil
-end
-
-$ttkbut_demo = TkToplevel.new {|w|
- title("Simple Ttk Widgets")
- iconname("ttkbut")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ttkbut_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top, :fill=>:x)
-Ttkã¨ã¯ï¼Œãƒ†ãƒ¼ãƒžæŒ‡å®šå¯èƒ½ãªæ–°ã—ã„ウィジェット集åˆã§ã™ï¼Ž\
-今,ã‚ãªãŸãŒç›®ã«ã—ã¦ã„ã‚‹ã®ã¯Ttkã®ãƒ†ãƒ¼ãƒžåŒ–ラベルã§ï¼Œ\
-下ã«ã¯Ttkã®ãƒ©ãƒ™ãƒ«ãƒ•ãƒ¬ãƒ¼ãƒ ã®ä¸­ã«ä¸‰ã¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ã®TtkウィジェットãŒ\
-表示ã•ã‚Œã¦ã„ã¾ã™ï¼Ž
-最åˆã®ã‚°ãƒ«ãƒ¼ãƒ—ã¯å…¨ã¦ãƒœã‚¿ãƒ³ã§ã‚り,\
-ãã‚Œãžã‚Œã‚¯ãƒªãƒƒã‚¯ã™ã‚Œã°ç¾åœ¨ã®ã‚¢ãƒ—リケーションã®ãƒ†ãƒ¼ãƒžãŒè¨­å®šã•ã‚Œã¾ã™ï¼Ž
-2番目ã®ã‚°ãƒ«ãƒ¼ãƒ—ã¯ä¸‰ã¤ã®ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³é›†åˆã§ã™ï¼Ž\
-å„集åˆã®é–“ã«ã¯ï¼Œã‚»ãƒ‘レータウィジェットãŒç½®ã‹ã‚Œã¦ã„ã¾ã™ï¼Ž\
-ãªãŠã€Œæœ‰åŠ¹åŒ–ã€ãƒœã‚¿ãƒ³ã¯ï¼Œã“ã®ãƒˆãƒƒãƒ—レベルウィジェット内ã®\
-ä»–ã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒžåŒ–ウィジェットã®çŠ¶æ…‹(state)ãŒ"disabled"ã‹ã©ã†ã‹ã‚’\
-コントロールã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„.
-3番目ã®ã‚°ãƒ«ãƒ¼ãƒ—ã¯é–¢é€£ä»˜ã‘られãŸãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³é›†åˆã¨ãªã£ã¦ã„ã¾ã™ï¼Ž
-EOL
-
-## Add buttons for setting the theme
-buttons = Ttk::Labelframe.new(base_frame, :text=>'ボタン')
-# Ttk::Style.theme_names.each{|theme|
-# Ttk::Button.new(buttons, :text=>theme,
-# :command=>proc{Ttk::Style.theme_use theme}).pack(:pady=>2)
-# }
-Ttk.themes.each{|theme|
- Ttk::Button.new(buttons, :text=>theme,
- :command=>proc{Ttk.set_theme theme}).pack(:pady=>2)
-}
-
-## Helper procedure for the top checkbutton
-def setState(root, value, *excepts)
- return if excepts.member?(root)
-
- ## Non-Ttk widgets (e.g. the toplevel) will fail, so make it silent
- begin
- root.state = value
- rescue
- end
-
- ## Recursively invoke on all children of this root that are in the same
- ## toplevel widget
- root.winfo_children.each{|w|
- setState(w, value, *excepts) if w.winfo_toplevel == root.winfo_toplevel
- }
-end
-
-## Set up the checkbutton group
-checks = Ttk::Labelframe.new(base_frame, :text=>'ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³')
-enabled = TkVariable.new(true)
-e = Ttk::Checkbutton.new(checks, :text=>'有効化', :variable=>enabled,
- :command=>proc{
- setState($ttkbut_demo,
- ((enabled.bool)? "!disabled" : "disabled"),
- e)
- })
-
-## See ttk_widget(n) for other possible state flags
-sep1 = Ttk::Separator.new(checks)
-sep2 = Ttk::Separator.new(checks)
-
-cheese = TkVariable.new
-tomato = TkVariable.new
-basil = TkVariable.new
-oregano = TkVariable.new
-
-c1 = Ttk::Checkbutton.new(checks, :text=>'ãƒãƒ¼ã‚º', :variable=>cheese)
-c2 = Ttk::Checkbutton.new(checks, :text=>'トマト', :variable=>tomato)
-c3 = Ttk::Checkbutton.new(checks, :text=>'ãƒã‚¸ãƒ«', :variable=>basil)
-c4 = Ttk::Checkbutton.new(checks, :text=>'オレガノ', :variable=>oregano)
-
-Tk.pack(e, sep1, c1, c2, sep2, c3, c4, :fill=>:x, :pady=>2)
-
-## Set up the radiobutton group
-radios = Ttk::Labelframe.new(base_frame, :text=>'ラジオボタン')
-
-happiness = TkVariable.new
-
-r1 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Great', :value=>'great')
-r2 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Good', :value=>'good')
-r3 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Ok', :value=>'ok')
-r4 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Poor', :value=>'poor')
-r5 = Ttk::Radiobutton.new(radios, :variable=>happiness,
- :text=>'Awful', :value=>'awful')
-
-Tk.pack(r1, r2, r3, r4, r5, :fill=>:x, :padx=>3, :pady=>2)
-
-## See Code / Dismiss
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'変数å‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars(base_frame, ['有効化', enabled],
- ['ãƒãƒ¼ã‚º', cheese], ['トマト', tomato],
- ['ãƒã‚¸ãƒ«', basil], ['オレガノ', oregano],
- ['幸ç¦åº¦', happiness])
- }),
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkbut'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $ttkbut_demo
- $ttkbut_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x, :expand=>true)
-}
-
-## Arrange things neatly
-f = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-f.lower
-Tk.grid(buttons, checks, radios, :in=>f, :sticky=>'nwe', :pady=>2, :padx=>3)
-f.grid_columnconfigure([0, 1, 2], :weight=>1, :uniform=>:yes)
diff --git a/ext/tk/sample/demos-jp/ttkmenu.rb b/ext/tk/sample/demos-jp/ttkmenu.rb
deleted file mode 100644
index b521a3f101..0000000000
--- a/ext/tk/sample/demos-jp/ttkmenu.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# ttkmenu.rb --
-#
-# This demonstration script creates a toplevel window containing several Ttk
-# menubutton widgets.
-#
-# based on "Id: ttkmenu.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttkmenu_demo) && $ttkmenu_demo
- $ttkmenu_demo.destroy
- $ttkmenu_demo = nil
-end
-
-$ttkmenu_demo = TkToplevel.new {|w|
- title("Ttk Menu Buttons")
- iconname("ttkmenu")
- positionWindow(w)
-}
-
-base_frame = Ttk::Frame.new($ttkmenu_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top, :fill=>:x)
-Ttkã¨ã¯ï¼Œãƒ†ãƒ¼ãƒžæŒ‡å®šå¯èƒ½ãªæ–°ã—ã„ウィジェット集åˆã§ã™ï¼Ž\
-ã“ã‚Œã«ã‚ˆã‚Šãƒ†ãƒ¼ãƒžã«å¯¾å¿œã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã£ãŸã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®ã²ã¨ã¤ã«\
-メニューボタンãŒã‚ã‚Šã¾ã™ï¼Ž\
-以下ã§ã¯ï¼Œãƒ†ãƒ¼ãƒžã«å¯¾å¿œã—ãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒœã‚¿ãƒ³ãŒã„ãã¤ã‹è¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ï¼Ž\
-ãれらを使ã£ã¦ï¼Œç¾åœ¨ä½¿ç”¨ä¸­ã®ãƒ†ãƒ¼ãƒžã‚’変更ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ï¼Ž\
-テーマã®é¸æŠžãŒãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒœã‚¿ãƒ³è‡ªèº«ã®è¦‹æŽ›ã‘を変化ã•ã›ã‚‹æ§˜å­ã‚„,\
-中央ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒœã‚¿ãƒ³ã ã‘ãŒç•°ãªã‚‹ã‚¹ã‚¿ã‚¤ãƒ«\
-(ツールãƒãƒ¼ã§ã®ä¸€èˆ¬çš„ãªè¡¨ç¤ºã«é©ã—ãŸã‚‚ã®)ã§è¡¨ç¤ºã•ã‚Œã¦ã„る様å­ã«\
-注目ã—ã¦ãã ã•ã„.\
-ãªãŠï¼Œãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒœã‚¿ãƒ³ã«ã¤ã„ã¦ã¯ãƒ†ãƒ¼ãƒžã«å¯¾å¿œã—ãŸã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆãŒã‚ã‚Šã¾ã™ãŒï¼Œ\
-メニューã«ã¤ã„ã¦ã¯ãƒ†ãƒ¼ãƒžã«å¯¾å¿œã—ãŸã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“.\
-ãã®ç†ç”±ã¯ï¼Œæ¨™æº–ã®Tkã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆãŒ\
-ã™ã¹ã¦ã®ãƒ—ラットホームã§å分ã«è‰¯å¥½ãªè¦‹æŽ›ã‘ã¨æ“作性をæŒã£ã¦ã„る,\
-特ã«ï¼Œå¤šãã®ç’°å¢ƒã§ãã®ç’°å¢ƒæœ¬æ¥ã®æ“作体系ã¨ãªã‚‹ã‚ˆã†ã«å®Ÿè£…ã•ã‚Œã¦ã„ã‚‹ã¨\
-判断ã•ã‚ŒãŸã“ã¨ã«ã‚ˆã‚Šã¾ã™ï¼Ž
-EOL
-
-Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x)
-
-## See Code / Dismiss
-Ttk::Frame.new($ttkmenu_demo) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkmenu'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $ttkmenu_demo.destroy
- $ttkmenu_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-b1 = Ttk::Menubutton.new(base_frame,:text=>'テーマをé¸æŠž',:direction=>:above)
-b2 = Ttk::Menubutton.new(base_frame,:text=>'テーマをé¸æŠž',:direction=>:left)
-b3 = Ttk::Menubutton.new(base_frame,:text=>'テーマをé¸æŠž',:direction=>:right)
-b4 = Ttk::Menubutton.new(base_frame,:text=>'テーマをé¸æŠž',:direction=>:flush,
- :style=>Ttk::Menubutton.style('Toolbutton'))
-b5 = Ttk::Menubutton.new(base_frame,:text=>'テーマをé¸æŠž',:direction=>:below)
-
-b1.menu(m1 = Tk::Menu.new(b1, :tearoff=>false))
-b2.menu(m2 = Tk::Menu.new(b2, :tearoff=>false))
-b3.menu(m3 = Tk::Menu.new(b3, :tearoff=>false))
-b4.menu(m4 = Tk::Menu.new(b4, :tearoff=>false))
-b5.menu(m5 = Tk::Menu.new(b5, :tearoff=>false))
-
-Ttk.themes.each{|theme|
- m1.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
- m2.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
- m3.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
- m4.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
- m5.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme})
-}
-
-f = Ttk::Frame.new(base_frame).pack(:fill=>:x)
-f1 = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-f.lower
-
-f.grid_anchor(:center)
-TkGrid('x', b1, 'x', :in=>f, :padx=>3, :pady=>2)
-TkGrid(b2, b4, b3, :in=>f, :padx=>3, :pady=>2)
-TkGrid('x', b5, 'x', :in=>f, :padx=>3, :pady=>2)
diff --git a/ext/tk/sample/demos-jp/ttknote.rb b/ext/tk/sample/demos-jp/ttknote.rb
deleted file mode 100644
index 332b1017ab..0000000000
--- a/ext/tk/sample/demos-jp/ttknote.rb
+++ /dev/null
@@ -1,98 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# ttknote.rb --
-#
-# This demonstration script creates a toplevel window containing a Ttk
-# notebook widget.
-#
-# based on "Id: ttknote.tcl,v 1.5 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttknote_demo) && $ttknote_demo
- $ttknote_demo.destroy
- $ttknote_demo = nil
-end
-
-$ttknote_demo = TkToplevel.new {|w|
- title("Ttk Notebook Widget")
- iconname("ttknote")
- positionWindow(w)
-}
-
-## See Code / Dismiss
-Ttk::Frame.new($ttknote_demo) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttknote'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $ttknote_demo.destroy
- $ttknote_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-base_frame = Ttk::Frame.new($ttknote_demo).pack(:fill=>:both, :expand=>true)
-
-## Make the notebook and set up Ctrl+Tab traversal
-notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true,
- :padx=>2, :pady=>3)
-notebook.enable_traversal
-
-## Populate the first pane
-f_msg = Ttk::Frame.new(notebook)
-msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'5i',
- :justify=>:left, :anchor=>'n', :text=><<EOL)
-Ttkã¨ã¯ï¼Œãƒ†ãƒ¼ãƒžæŒ‡å®šå¯èƒ½ãªæ–°ã—ã„ウィジェット集åˆã§ã™ï¼Ž\
-ãã®ä¸­ã«å«ã¾ã‚Œã‚‹ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®ã²ã¨ã¤ã«ãƒŽãƒ¼ãƒˆãƒ–ックウィジェットãŒã‚ã‚Šã¾ã™ï¼Ž\
-ノートブックウィジェットã¯ï¼Œ\
-個別ã®å†…容をæŒã£ãŸãƒ‘ãƒãƒ«ã‹ã‚‰ã®é¸æŠžã‚’å¯èƒ½ã«ã™ã‚‹ã‚ˆã†ãª\
-タブã®é›†åˆï¼ˆã‚¿ãƒ–セット)を定ã‚ã¾ã™ï¼Ž\
-タブセットã¯æœ€è¿‘ã®å¤šãã®ãƒ¦ãƒ¼ã‚¶ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã§è¦‹ã‚‰ã‚Œã‚‹æ©Ÿèƒ½ã§ã™ï¼Ž\
-タブã®é¸æŠžã¯ï¼Œãƒžã‚¦ã‚¹ã«ã‚ˆã‚‹ã ã‘ã§ãªã,\
-ノートブックウィジェットã®ãƒšãƒ¼ã‚¸ã®è¦‹å‡ºã—ãŒé¸æŠžã•ã‚Œã¦ã„る時ã§ã‚ã‚Œã°\
-Ctrl+Tabキーã®å…¥åŠ›ã«ã‚ˆã£ã¦ã‚‚è¡Œã†ã“ã¨ãŒã§ãã¾ã™ï¼Ž\
-ã“ã®ãƒ‡ãƒ¢ã§ã¯ï¼Œè¦‹å‡ºã—ã§ä¸‹ç·šä»˜ãã®æ–‡å­—ã®ã‚­ãƒ¼ã¨Altキーã¨ã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ã§\
-ページをé¸æŠžã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ã‚‚設定ã—ã¦ã„ã¾ã™ï¼Ž\
-ãŸã ã—,2番目ã®ã‚¿ãƒ–ã¯ç„¡åŠ¹åŒ–ã•ã‚Œã¦é¸æŠžã§ããªã„よã†ã«ãªã£ã¦ã„ã‚‹ã“ã¨ã«ã¯\
-注æ„ã—ã¦ãã ã•ã„.
-EOL
-neat = TkVariable.new
-after_id = nil
-msg_b = Ttk::Button.new(f_msg, :text=>'ã™ã¦ãã ï¼(Neat!)', :underline=>6,
- :command=>proc{
- neat.value = 'ã‚ã,ãã®ã¨ãŠã‚Šã•ï¼Žï¼Žï¼Ž'
- Tk.after_cancel(after_id) if after_id
- after_id = Tk.after(500){neat.value = ''}
- })
-msg_b.winfo_toplevel.bind('Alt-n'){ msg_b.focus; msg_b.invoke }
-msg_l = Ttk::Label.new(f_msg, :textvariable=>neat)
-notebook.add(f_msg, :text=>'説明(Description)', :underline=>3, :padding=>2)
-Tk.grid(msg_m, '-', :sticky=>'new', :pady=>2)
-Tk.grid(msg_b, msg_l, :pady=>[2, 4], :padx=>20)
-msg_b.grid_configure(:sticky=>'e')
-msg_l.grid_configure(:sticky=>'w')
-f_msg.grid_rowconfigure(1, :weight=>1)
-f_msg.grid_columnconfigure([0, 1], :weight=>1, :uniform=>1)
-
-## Populate the second pane. Note that the content doesn't really matter
-f_disabled = Ttk::Frame.new(notebook)
-notebook.add(f_disabled, :text=>'無効化ã•ã‚ŒãŸã‚¿ãƒ–', :state=>:disabled)
-
-## Populate the third pane
-f_editor = Ttk::Frame.new(notebook)
-notebook.add(f_editor, :text=>'テキストエディタ(Text Editor)', :underline=>9)
-editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char)
-if Tk.windowingsystem != 'aqua'
- editor_s = editor_t.yscrollbar(Ttk::Scrollbar.new(f_editor))
-else
- editor_s = editor_t.yscrollbar(Tk::Scrollbar.new(f_editor))
-end
-editor_s.pack(:side=>:right, :fill=>:y, :padx=>[0,2], :pady=>2)
-editor_t.pack(:fill=>:both, :expand=>true, :padx=>[2,0], :pady=>2)
diff --git a/ext/tk/sample/demos-jp/ttkpane.rb b/ext/tk/sample/demos-jp/ttkpane.rb
deleted file mode 100644
index af7622272c..0000000000
--- a/ext/tk/sample/demos-jp/ttkpane.rb
+++ /dev/null
@@ -1,217 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# ttkpane.rb --
-#
-# This demonstration script creates a Ttk pane with some content.
-#
-# based on "Id: ttkpane.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttkpane_demo) && $ttkpane_demo
- $ttkpane_demo.destroy
- $ttkpane_demo = nil
-end
-
-$ttkpane_demo = TkToplevel.new {|w|
- title("Themed Nested Panes")
- iconname("ttkpane")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ttkpane_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top, :fill=>:x)
-ã“ã®ãƒ‡ãƒ¢ã¯ï¼ŒåŸ‹ã‚è¾¼ã¿é–¢ä¿‚ã«ã‚るテーマ付ãペインドウィンドウを示ã—ã¦ã„ã¾ã™ï¼Ž\
-ãã‚Œãžã‚Œã®å¤§ãã•ã¯ï¼Œå«ã¾ã‚Œã¦ã„るペインã®é–“ã«ã‚るエリアをã¤ã‹ã‚“ã§\
-境界をドラッグã™ã‚‹ã“ã¨ã§å¤‰æ›´ã§ãã¾ã™ï¼Ž
-EOL
-
-Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x)
-
-## See Code / Dismiss
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkpane'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $ttkpane_demo.destroy
- $ttkpane_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-
-outer = Ttk::Panedwindow.new(frame, :orient=>:horizontal)
-outer.add(in_left = Ttk::Panedwindow.new(outer, :orient=>:vertical))
-outer.add(in_right = Ttk::Panedwindow.new(outer, :orient=>:vertical))
-in_left.add(left_top = Ttk::Labelframe.new(in_left, :text=>'ボタン'))
-in_left.add(left_bot = Ttk::Labelframe.new(in_left, :text=>'時計'))
-in_right.add(right_top = Ttk::Labelframe.new(in_right, :text=>'プログレス'))
-in_right.add(right_bot = Ttk::Labelframe.new(in_right, :text=>'テキスト'))
-if Tk.windowingsystem == 'aqua'
- [left_top, left_bot, right_top, right_bot].each{|w| w.padding(3) }
-end
-
-# Fill the button pane
-Ttk::Button.new(left_top, :text=>'押ã—ã¦ã­',
- :command=>proc{
- Tk.messageBox(:type=>'ok', :icon=>'info',
- :message=>'ã„ã¦ã¦ï¼',
- :detail=>'That hurt...', :parent=>base_frame,
- :title=>'Button Pressed')
- }).pack(:padx=>2, :pady=>5)
-
-
-zones_list = [
- [':Europe/Berlin'],
- [':America/Argentina/Buenos_Aires', ':America/Buenos_Aires'],
- [':Africa/Johannesburg'],
- [':Europe/London'],
- [':America/Los_Angeles'],
- [':Europe/Moscow'],
- [':America/New_York'],
- [':Asia/Singapore'],
- [':Australia/Sydney'],
- [':Asia/Tokyo'],
-]
-
-zones = []
-
-# Check tzinfo support
-if $tk_major_ver > 8 || ($tk_major_ver == 8 && $tk_minor_ver >= 5)
- tzinfo = :tcl
-
- zones_list.each{|list|
- list.each{|zone|
- begin
- # Force a pre-load of all the timezones needed; otherwise can end up
- # poor-looking synch problems!
- Tk.tk_call('clock', 'format', '0', '-timezone', zone)
- rescue RuntimeError
- # ignore
- else
- zones << [zone, zone[%r<[^/:]+$>].tr('_', ' ')]
- break
- end
- }
- }
-
-else
- begin
- require 'tzinfo'
- tzinfo = :tzinfo
- rescue Exception
- begin
- require 'tzfile'
- tzinfo = :tzfile
- rescue Exception
- tzinfo = nil
- end
- end
-
- case tzinfo
- when :tzinfo
- zones_list.each{|list|
- list.each{|zone|
- begin
- tz = TZInfo::Timezone.get(zone[%r<[^:]+$>])
- rescue Exception
- # ignore
- else
- zones << [tz, zone[%r<[^/:]+$>].tr('_', ' ')]
- break
- end
- }
- }
-
- when :tzfile
- zones_list.each{|list|
- list.each{|zone|
- begin
- tz = TZFile.create(zone[%r<[^:]+$>])
- rescue Exception
- # ignore
- else
- zones << [tz, zone[%r<[^/:]+$>].tr('_', ' ')]
- break
- end
- }
- }
-
- else
- [ -7, -4, -2, -1, 0, +1, +3, +8, +9, +10 ].each{|zone|
- zones << [zone, 'UTC%+03d00' % zone]
- }
- end
-end
-
-time = TkVariable.new_hash
-
-case tzinfo
-when :tcl
- update_proc = proc{|now, tz, label|
- time[label] = Tk.tk_call('clock', 'format', now.tv_sec,
- '-timezone', tz, '-format', '%T')
- }
-when :tzinfo
- update_proc = proc{|now, tz, label|
- time[label] = tz.utc_to_local(now).strftime('%H:%M:%S')
- }
-when :tzfile
- update_proc = proc{|now, tz, label|
- time[label] = tz.at(now.tv_sec).strftime('%H:%M:%S')
- }
-else
- update_proc = proc{|now, tz, label|
- time[label] = (now + (tz * 3600)).strftime('%H:%M:%S')
- }
-end
-
-# Fill the clocks pane
-zones.each_with_index{|(zone, label), idx|
- Ttk::Separator.new(left_bot).pack(:fill=>:x) if idx > 0
- Ttk::Label.new(left_bot, :text=>label, :anchor=>'w').pack(:fill=>:x)
- Ttk::Label.new(left_bot, :textvariable=>time.ref(label),
- :anchor=>'w').pack(:fill=>:x)
-}
-
-# Timer start
-every = proc{
- now = Time.now.utc
- zones.each{|zone, label| update_proc.call(now, zone, label) }
-}
-TkRTTimer.new(1000, -1, every).start(0, every)
-
-# Fill the progress pane
-Ttk::Progressbar.new(right_top, :mode=>:indeterminate).pack(:fill=>:both, :expand=>true).start
-
-# Fill the text pane
-if Tk.windowingsystem != 'aqua'
- # The trick with the ttk::frame makes the text widget look like it fits with
- # the current Ttk theme despite not being a themed widget itself. It is done
- # by styling the frame like an entry, turning off the border in the text
- # widget, and putting the text widget in the frame with enough space to allow
- # the surrounding border to show through (2 pixels seems to be enough).
- f = Ttk::Frame.new(right_bot, :style=>Ttk::Entry)
- txt = TkText.new(frame, :wrap=>:word, :width=>30, :borderwidth=>0)
- txt.pack(:fill=>:both, :expand=>true, :in=>f, :pady=>2, :padx=>2)
- scr = txt.yscrollbar(Ttk::Scrollbar.new(frame))
- scr.pack(:side=>:right, :fill=>:y, :in=>right_bot)
- f.pack(:fill=>:both, :expand=>true)
- outer.pack(:fill=>:both, :expand=>true)
-else
- txt = TkText.new(frame, :wrap=>:word, :width=>30, :borderwidth=>0)
- scr = txt.yscrollbar(TkScrollbar.new(frame))
- scr.pack(:side=>:right, :fill=>:y, :in=>right_bot)
- txt.pack(:fill=>:both, :expand=>true, :in=>right_bot)
- outer.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>[6, 10])
-end
diff --git a/ext/tk/sample/demos-jp/ttkprogress.rb b/ext/tk/sample/demos-jp/ttkprogress.rb
deleted file mode 100644
index 6f0ea4c2df..0000000000
--- a/ext/tk/sample/demos-jp/ttkprogress.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# ttkprogress.rb --
-#
-# This demonstration script creates several progress bar widgets.
-#
-# based on "Id: ttkprogress.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
-
-if defined?($ttkprogress_demo) && $ttkprogress_demo
- $ttkprogress_demo.destroy
- $ttkprogress_demo = nil
-end
-
-$ttkprogress_demo = TkToplevel.new {|w|
- title("Progress Bar Demonstration")
- iconname("ttkprogress")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($ttkprogress_demo).pack(:fill=>:both, :expand=>true)
-
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top, :fill=>:x)
-下ã«ã‚ã‚‹ã®ã¯äºŒã¤ã®ãƒ—ログレスãƒãƒ¼ã§ã™ï¼Ž\
-上ã®ã‚‚ã®ã¯"determinate"タイプã®ãƒ—ログレスãƒãƒ¼ã§ï¼Œ\
-例ãˆã°ãƒ—ログラムãŒä¸Žãˆã‚‰ã‚ŒãŸã‚¿ã‚¹ã‚¯ã‚’終了ã™ã‚‹ã¾ã§ã«ã©ã®ãらã„ã‹ã‹ã‚‹ã‹ã‚’\
-示ã™ã¨ããªã©ã«ç”¨ã„られã¾ã™ï¼Ž\
-下ã®ã‚‚ã®ã¯"indeterminate"タイプã®ãƒ—ログレスãƒãƒ¼ã§ï¼Œ\
-例ãˆã°ãƒ—ログラムãŒå®Ÿè¡Œä¸­(busy)ã§ã‚ã‚‹ã‚‚ã®ã®\
-終了ã¾ã§ã«ã©ã‚Œãらã„ã‹ã‹ã‚‹ã‹ã¯åˆ†ã‹ã‚‰ãªã„ã¨ã„ã†çŠ¶æ…‹ã‚’\
-示ã™ã¨ããªã©ã«ç”¨ã„られã¾ã™ï¼Ž\
-ã„ãšã‚Œã®ãƒ—ログレスãƒãƒ¼ã‚‚,ã™ã下ã«ã‚るボタンを使ã†ã“ã¨ã§\
-自動アニメーションモードã®ON/OFFを切替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼Ž
-EOL
-
-## See Code / Dismiss buttons
-Ttk::Frame.new(base_frame) {|frame|
- sep = Ttk::Separator.new(frame)
- Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkprogress'}),
- Ttk::Button.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- $ttkprogress_demo.destroy
- $ttkprogress_demo = nil
- }),
- :padx=>4, :pady=>4)
- grid_columnconfigure(0, :weight=>1)
- pack(:side=>:bottom, :fill=>:x)
-}
-
-frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
-
-p1 = Ttk::Progressbar.new(frame, :mode=>:determinate)
-p2 = Ttk::Progressbar.new(frame, :mode=>:indeterminate)
-
-start = Ttk::Button.new(frame, :text=>'Start Progress',
- :command=>proc{ p1.start; p2.start })
-stop = Ttk::Button.new(frame, :text=>'Stop Progress',
- :command=>proc{ p1.stop; p2.stop })
-
-Tk.grid(p1, '-', :pady=>5, :padx=>10)
-Tk.grid(p2, '-', :pady=>5, :padx=>10)
-Tk.grid(start, stop, :padx=>10, :pady=>5)
-start.grid_configure(:sticky=>'e')
-stop.grid_configure(:sticky=>'w')
-frame.grid_columnconfigure(:all, :weight=>1)
-
diff --git a/ext/tk/sample/demos-jp/twind.rb b/ext/tk/sample/demos-jp/twind.rb
deleted file mode 100644
index 7db7576c6e..0000000000
--- a/ext/tk/sample/demos-jp/twind.rb
+++ /dev/null
@@ -1,293 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# text (embedded windows) widget demo (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($twind_demo) && $twind_demo
- $twind_demo.destroy
- $twind_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$twind_demo = TkToplevel.new {|w|
- title("Text Demonstration - Embedded Windows")
- iconname("Embedded Windows")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($twind_demo).pack(:fill=>:both, :expand=>true)
-
-# frame 生æˆ
-$twind_buttons = TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc{
- tmppath = $twind_demo
- $twind_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc{showCode 'twind'}
- }.pack('side'=>'left', 'expand'=>'yes')
-}
-$twind_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-$twind_text = nil
-TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
- 'relief'=>'sunken') {|f|
- $twind_text = TkText.new(f, 'setgrid'=>'true', 'font'=>$font,
- 'width'=>'70', 'height'=>35, 'wrap'=>'word',
- 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
- TkScrollbar.new(f) {|s|
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }.pack('side'=>'right', 'fill'=>'y')
- }.pack('expand'=>'yes', 'fill'=>'both')
-}.pack('expand'=>'yes', 'fill'=>'both')
-
-# タグ生æˆ
-$tag_center = TkTextTag.new($twind_text,
- 'justify' =>'center',
- 'spacing1'=>'5m',
- 'spacing3'=>'5m' )
-$tag_buttons = TkTextTag.new($twind_text,
- 'lmargin1'=>'1c',
- 'lmargin2'=>'1c',
- 'rmargin' =>'1c',
- 'spacing1'=>'3m',
- 'spacing2'=>0,
- 'spacing3'=>0 )
-
-# テキストã®ç”Ÿæˆ
-$twind_text.insert('end',
- 'テキストwidget上ã«ä»–ã®widgetを組ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚')
-$twind_text.insert('end',
- '組ã¿è¾¼ã¿ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¨å‘¼ã°ã‚Œã€ä»»æ„ã®widgetãŒå¯èƒ½ã§ã™ã€‚')
-$twind_text.insert('end',
- '例ãˆã°ã€ã“ã“ã«2ã¤ã®ãƒœã‚¿ãƒ³widgetãŒçµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚')
-$twind_text.insert('end', '最åˆã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã¨æ°´å¹³æ–¹å‘ã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã‚’')
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- #text 'ON'
- text 'オン'
- command proc{textWindOn $twind_text,$twind_buttons}
- cursor 'top_left_arrow'
- })
-$twind_text.insert('end', "ã«ã—ã¾ã™ã€‚ã¾ãŸ2ã¤ã‚ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨\n")
-$twind_text.insert('end', '水平方å‘ã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã‚’')
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- #text 'OFF'
- text 'オフ'
- command proc{textWindOff $twind_text}
- cursor 'top_left_arrow'
- })
-$twind_text.insert('end', 'ã«ã—ã¾ã™ã€‚')
-
-$twind_text.insert('end', 'ã‚‚ã†ã²ã¨ã¤ã®ä¾‹ã§ã™ã€‚')
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text 'ã“ã“をクリック'
- command proc{textWindPlot $twind_text}
- cursor 'top_left_arrow'
- })
-$twind_text.insert('end', 'ã™ã‚‹ã¨ã€x-yプロットãŒã“ã“ã«ç¾ã‚Œã¾ã™ã€‚')
-$mark_plot = TkTextMark.new($twind_text, 'insert')
-$mark_plot.gravity='left'
-$twind_text.insert('end', 'マウスã§ãƒ‡ãƒ¼ã‚¿ã‚’æç”»ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚')
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text '消去'
- command proc{textWindDel $twind_text}
- cursor 'top_left_arrow'
- })
-$twind_text.insert('end', 'をクリックã™ã‚‹ã¨å…ƒã«æˆ»ã‚Šã¾ã™ã€‚
-
-')
-
-$twind_text.insert('end', '組ã¿è¾¼ã¿ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã ã‘をテキストwidget上ã«ã€å®Ÿéš›ã®')
-$twind_text.insert('end', 'テキストã¯ãªã—ã§çµ„ã¿è¾¼ã‚€ã“ã¨ã¯ä¾¿åˆ©ã§ã™ã€‚')
-$twind_text.insert('end', 'ã“ã®å ´åˆã¯ã€ãƒ†ã‚­ã‚¹ãƒˆwidgetã¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒžãƒãƒ¼ã‚¸ãƒ£ã®')
-$twind_text.insert('end', 'よã†ã«å‹•ä½œã—ã¾ã™ã€‚例ãˆã°ã€ã“ã“ã«ã¯ãƒ†ã‚­ã‚¹ãƒˆwidgetã«')
-$twind_text.insert('end', 'よã£ã¦ãƒœã‚¿ãƒ³ãŒãã‚Œã„ã«ä¸¦ã¹ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚')
-$twind_text.insert('end', 'ã“れらã®ãƒœã‚¿ãƒ³ã§èƒŒæ™¯è‰²ã‚’変ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™')
-$twind_text.insert('end', '("Default"ã§å…ƒã®è‰²ã«æˆ»ã™ã“ã¨ãŒã§ãã¾ã™)。')
-$twind_text.insert('end', '"Short"ã¨ã„ã†ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨æ–‡å­—列ã®é•·ã•ãŒ')
-$twind_text.insert('end', '変ã‚ã‚Šã¾ã™ã€‚ã™ã‚‹ã¨è‡ªå‹•çš„ã«ãƒ†ã‚­ã‚¹ãƒˆwidgetãŒ')
-$twind_text.insert('end', 'レイアウトを整ãˆã¦ãã‚Œã¾ã™ã€‚')
-$twind_text.insert('end', 'ã‚‚ã†ä¸€åº¦åŒã˜ãƒœã‚¿ãƒ³ã‚’押ã™ã¨å…ƒã«æˆ»ã‚Šã¾ã™ã€‚
-
-')
-
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {|b|
- text 'デフォルト'
- command proc{embDefBg $twind_text}
- cursor 'top_left_arrow'
- $tag_buttons.add('end')
- },
- 'padx'=>3 )
-embToggle = TkVariable.new('Short')
-TkTextWindow.new($twind_text, 'end',
- 'window'=>TkCheckButton.new($twind_text) {
- textvariable embToggle
- indicatoron 0
- variable embToggle
- onvalue 'A much longer string'
- offvalue 'Short'
- cursor 'top_left_arrow'
- pady 5
- padx 2
- },
- 'padx'=>3,
- 'pady'=>2 )
-
-[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
- 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
- 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1',
- 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
-].each{|twind_color|
- TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text twind_color
- cursor 'top_left_arrow'
- command proc{$twind_text.bg twind_color}
- },
- 'padx'=>3,
- 'pady'=>2 )
-}
-
-# メソッド定義
-def textWindOn (w,f)
- if defined? $twind_scroll
- begin
- $twind_scroll.destroy
- rescue
- end
- $twind_scroll = nil
- end
-
- base = TkWinfo.parent( TkWinfo.parent(w) )
- $twind_scroll = TkScrollbar.new(base) {|s|
- orient 'horizontal'
- command proc{|*args| w.xview(*args)}
- w.xscrollcommand proc{|first,last| s.set first,last}
- w.wrap 'none'
- pack('after'=>f, 'side'=>'bottom', 'fill'=>'x')
- }
-
- return nil
-end
-
-def textWindOff (w)
- if defined? $twind_scroll
- begin
- $twind_scroll.destroy
- rescue
- end
- $twind_scroll = nil
- end
- w.xscrollcommand ''
- w.wrap 'word'
-end
-
-def textWindPlot (t)
- if (defined? $twind_plot) && (TkWinfo.exist?($twind_plot))
- return
- end
-
- $twind_plot = TkCanvas.new(t) {
- relief 'sunken'
- width 450
- height 300
- cursor 'top_left_arrow'
- }
-
- if $tk_version =~ /^4.*/
- font = '-Adobe-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*'
- else
- font = 'Helvetica 18'
- end
-
- TkcLine.new($twind_plot, 100, 250, 400, 250, 'width'=>2)
- TkcLine.new($twind_plot, 100, 250, 100, 50, 'width'=>2)
- TkcText.new($twind_plot, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
-
- (0..10).each {|i|
- x = 100 + (i * 30)
- TkcLine.new($twind_plot, x, 250, x, 245, 'width'=>2)
- TkcText.new($twind_plot, x, 254,
- 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
- }
- (0..5).each {|i|
- y = 250 - (i * 40)
- TkcLine.new($twind_plot, 100, y, 105, y, 'width'=>2)
- TkcText.new($twind_plot, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
- }
-
- for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
- x = 100 + (3*xx)
- y = 250 - (4*yy)/5
- item = TkcOval.new($twind_plot, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
- item.addtag 'point'
- end
-
- $twind_plot.itembind('point', 'Any-Enter',
- proc{$twind_plot.itemconfigure 'current', 'fill', 'red'})
- $twind_plot.itembind('point', 'Any-Leave',
- proc{$twind_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
- $twind_plot.itembind('point', '1',
- proc{|x,y| embPlotDown $twind_plot,x,y}, "%x %y")
- $twind_plot.itembind('point', 'ButtonRelease-1',
- proc{$twind_plot.dtag 'selected'})
- $twind_plot.bind('B1-Motion',
- proc{|x,y| embPlotMove $twind_plot,x,y}, "%x %y")
- while ($twind_text.get($mark_plot) =~ /[ \t\n]/)
- $twind_text.delete $mark_plot
- end
- $twind_text.insert $mark_plot,"\n"
- TkTextWindow.new($twind_text, $mark_plot, 'window'=>$twind_plot)
- $tag_center.add $mark_plot
- $twind_text.insert $mark_plot,"\n"
-end
-
-$embPlot = {'lastX'=>0, 'lastY'=>0}
-
-def embPlotDown (w, x, y)
- w.dtag 'selected'
- w.addtag_withtag 'selected', 'current'
- w.raise 'current'
- $embPlot['lastX'] = x
- $embPlot['lastY'] = y
-end
-
-def embPlotMove (w, x, y)
- w.move 'selected', x - $embPlot['lastX'], y - $embPlot['lastY']
- $embPlot['lastX'] = x
- $embPlot['lastY'] = y
-end
-
-def textWindDel (w)
- if (defined? $twind_text) && TkWinfo.exist?($twind_plot)
- $twind_text.delete $twind_plot
- $twind_plot = nil
- while ($twind_text.get($mark_plot) =~ /[ \t\n]/)
- $twind_text.delete $mark_plot
- end
- $twind_text.insert $mark_plot," "
- end
-end
-
-def embDefBg (w)
- w['background'] = w.configinfo('background')[3]
-end
diff --git a/ext/tk/sample/demos-jp/twind2.rb b/ext/tk/sample/demos-jp/twind2.rb
deleted file mode 100644
index c5bef5bce0..0000000000
--- a/ext/tk/sample/demos-jp/twind2.rb
+++ /dev/null
@@ -1,385 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# text (embedded windows) widget demo 2 (called by 'widget')
-#
-
-# toplevel widget ãŒå­˜åœ¨ã™ã‚Œã°å‰Šé™¤ã™ã‚‹
-if defined?($twind2_demo) && $twind2_demo
- $twind2_demo.destroy
- $twind2_demo = nil
-end
-
-# demo 用㮠toplevel widget を生æˆ
-$twind2_demo = TkToplevel.new {|w|
- title("Text Demonstration - Embedded Windows 2")
- iconname("Embedded Windows")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($twind2_demo).pack(:fill=>:both, :expand=>true)
-
-# frame 生æˆ
-$twind2_buttons = TkFrame.new(base_frame) {|frame|
- TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- TkButton.new(frame, :text=>'コードå‚ç…§',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'twind2'}),
- TkButton.new(frame, :text=>'é–‰ã˜ã‚‹',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $twind2_demo
- $twind2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
- frame.grid_columnconfigure(0, :weight=>1)
-}
-$twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-# frame 生æˆ
-$twind2_text = nil
-TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
- 'relief'=>'sunken') {|f|
- $twind2_text = TkText.new(f, 'setgrid'=>true, 'font'=>$font,
- # 'width'=>'70', 'height'=>35, 'wrap'=>'word',
- 'width'=>'70', 'height'=>35, 'wrap'=>'char',
- 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
- TkScrollbar.new(f) {|s|
- command proc{|*args| t.yview(*args)}
- t.yscrollcommand proc{|first,last| s.set first,last}
- }.pack('side'=>'right', 'fill'=>'y')
- }.pack('expand'=>'yes', 'fill'=>'both')
-}.pack('expand'=>'yes', 'fill'=>'both')
-
-# タグ生æˆ
-$tag2_center = TkTextTag.new($twind2_text,
- 'justify' =>'center',
- 'spacing1'=>'5m',
- 'spacing3'=>'5m' )
-$tag2_buttons = TkTextTag.new($twind2_text,
- 'lmargin1'=>'1c',
- 'lmargin2'=>'1c',
- 'rmargin' =>'1c',
- 'spacing1'=>'3m',
- 'spacing2'=>0,
- 'spacing3'=>0 )
-
-# テキストã®ç”Ÿæˆ
-$twind2_text.insert('end', 'テキストウィジェットã«ã¯è‰²ã€…ãªç¨®é¡žã®ã‚¢ã‚¤ãƒ†ãƒ ')
-$twind2_text.insert('end', '(動的ãªã‚‚ã®ã‚„é™çš„ãªã‚‚ã®ã®ä¸¡æ–¹ãŒã‚ã‚Šã¾ã™ï¼‰ã‚’')
-$twind2_text.insert('end', '数多ãå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã†ã—ãŸã‚¢ã‚¤ãƒ†ãƒ ã¯')
-$twind2_text.insert('end', '行替ãˆã€ã‚¿ãƒ–ã€ä¸­å¤®æƒãˆãªã©ã®æ§˜ã€…ãªæ–¹æ³•ã§')
-$twind2_text.insert('end', 'é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚')
-$twind2_text.insert('end', '加ãˆã¦ã€ãƒ†ã‚­ã‚¹ãƒˆã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®å†…容物ãŒ')
-$twind2_text.insert('end', 'ウィンドウサイズã«æ¯”ã¹ã¦å¤§ãã™ãŽã‚‹å ´åˆã§ã‚‚')
-$twind2_text.insert('end', 'ã™ã¹ã¦ã®æ–¹å‘ã«ã‚¹ãƒ ãƒ¼ã‚ºã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã•ã›ã¦')
-$twind2_text.insert('end', '確èªã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚')
-$twind2_text.insert('end', "\n\n")
-$twind2_text.insert('end', 'テキストウィジェット上ã«ã¯ä»–ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã‚’')
-$twind2_text.insert('end', 'å«ã‚ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã†ã—ãŸã‚‚ã®ã¯')
-$twind2_text.insert('end', '「埋ã‚è¾¼ã¿ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã€ã¨å‘¼ã°ã‚Œã€ãã®ä¸­ã«')
-$twind2_text.insert('end', 'ã„ã‹ãªã‚‹ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã§ã‚‚è©°ã‚込むã“ã¨ãŒã§ãã¾ã™ã€‚')
-$twind2_text.insert('end', '例ãˆã°ï¼Œã“ã“ã«ã¯ï¼’ã¤ã®')
-$twind2_text.insert('end', 'ボタンウィジェットãŒåŸ‹ã‚è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚')
-$twind2_text.insert('end', '最åˆã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€')
-$twind2_text.insert('end', '水平方å‘ã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã‚’ ')
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- #text 'ON'
- text 'オン'
- command proc{textWindOn2 $twind2_text,$twind2_buttons}
- cursor 'top_left_arrow'
- })
-$twind2_text.insert('end', "ã«ã—ã¾ã™ã€‚ã¾ãŸã€ï¼’ã¤ã‚ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨\n")
-$twind2_text.insert('end', '水平方å‘ã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã‚’')
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- #text 'OFF'
- text 'オフ'
- command proc{textWindOff2 $twind2_text}
- cursor 'top_left_arrow'
- })
-$twind2_text.insert('end', "ã«ã—ã¾ã™ã€‚\n\n")
-
-$twind2_text.insert('end', '次ã¯ã‚‚ã†ã²ã¨ã¤ã®ä¾‹ã§ã™ã€‚')
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text 'ã“ã“をクリック'
- command proc{textWindPlot2 $twind2_text}
- cursor 'top_left_arrow'
- })
-$twind2_text.insert('end', 'ã™ã‚‹ã¨ã€x-yプロットãŒã“ã“ã«ç¾ã‚Œã¾ã™ã€‚')
-$mark2_plot = TkTextMark.new($twind2_text, 'insert')
-$mark2_plot.gravity='left'
-$twind2_text.insert('end', 'マウスã§ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã“ã¨ã§ã€')
-$twind2_text.insert('end', 'プロット上ã®ãƒ‡ãƒ¼ã‚¿ç‚¹ã‚’移動ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚')
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text '消去'
- command proc{textWindDel2 $twind2_text}
- cursor 'top_left_arrow'
- })
-$twind2_text.insert('end', 'をクリックã™ã‚‹ã¨å…ƒã«æˆ»ã‚Šã¾ã™ã€‚')
-$twind2_text.insert('end', "\n\n")
-
-$twind2_text.insert('end', '表示ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆãªã—ã«åŸ‹ã‚è¾¼ã¿ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã ã‘ã‚’')
-$twind2_text.insert('end', 'テキストウィジェットã«å«ã‚ã‚‹ã“ã¨ã‚‚有用ã§ã—ょã†ã€‚')
-$twind2_text.insert('end', 'ã“ã®å ´åˆã€ãƒ†ã‚­ã‚¹ãƒˆã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã¯')
-$twind2_text.insert('end', 'ジオメトリマãƒãƒ¼ã‚¸ãƒ£ã®ã‚ˆã†ã«åƒãã¾ã™ã€‚')
-$twind2_text.insert('end', '例ãˆã°ã€ã“ã“ã«ã¯ãƒ†ã‚­ã‚¹ãƒˆã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã«')
-$twind2_text.insert('end', 'よã£ã¦ãƒœã‚¿ãƒ³ãŒãã‚Œã„ã«æ•´åˆ—ã—ã¦é…ç½®ã•ã‚Œã¦ã„ã¾ã™ã€‚')
-$twind2_text.insert('end', 'ã“れらã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã“ã¨ã§ã€')
-$twind2_text.insert('end', 'ã“ã®ãƒ†ã‚­ã‚¹ãƒˆã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®èƒŒæ™¯è‰²ã‚’')
-$twind2_text.insert('end', '変ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™("デフォルト"ボタンã§')
-$twind2_text.insert('end', 'å…ƒã®è‰²ã«æˆ»ã™ã“ã¨ãŒã§ãã¾ã™)。')
-$twind2_text.insert('end', '"Short"ã¨ã„ã†ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨æ–‡å­—列ã®é•·ã•ãŒ')
-$twind2_text.insert('end', '変ã‚ã‚Šã€ãƒ†ã‚­ã‚¹ãƒˆã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆãŒè‡ªå‹•çš„ã«')
-$twind2_text.insert('end', 'レイアウトを整ãˆã‚‹æ§˜å­ã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚')
-$twind2_text.insert('end', 'ã‚‚ã†ä¸€åº¦åŒã˜ãƒœã‚¿ãƒ³ã‚’押ã™ã¨å…ƒã«æˆ»ã‚Šã¾ã™ã€‚')
-$twind2_text.insert('end', "\n")
-
-btn_default = TkButton.new($twind2_text) {|b|
- text 'デフォルト'
- command proc{embDefBg2 $twind2_text}
- cursor 'top_left_arrow'
-}
-TkTextWindow.new($twind2_text, 'end', 'window'=>btn_default, 'padx'=>3)
-embToggle = TkVariable.new('Short')
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkCheckButton.new($twind2_text) {
- textvariable embToggle
- indicatoron 0
- variable embToggle
- onvalue 'A much longer string'
- offvalue 'Short'
- cursor 'top_left_arrow'
- pady 5
- padx 2
- },
- 'padx'=>3,
- 'pady'=>2 )
-
-[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
- 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
- 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1',
- 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
-].each{|twind_color|
- TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text twind_color
- cursor 'top_left_arrow'
- command proc{$twind2_text.bg twind_color}
- },
- 'padx'=>3,
- 'pady'=>2 )
-}
-
-$tag2_buttons.add(btn_default, 'end')
-
-$text_normal2 = {}
-$text_normal2['border'] = $twind2_text.cget('borderwidth')
-$text_normal2['highlight'] = $twind2_text.cget('highlightthickness')
-$text_normal2['pad'] = $twind2_text.cget('padx')
-
-$twind2_text.insert('end', "\nborder width ã‚„ highlightthickness, ")
-$twind2_text.insert('end', "padding を通常ã®å€¤ã‹ã‚‰å¤‰æ›´ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚\n")
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big borders",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigB2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small borders",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallB2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big highlight",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigH2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small highlight",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallH2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big pad",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigP2 $twind2_text
- }))
-
-TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small pad",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallP2 $twind2_text
- }))
-
-$twind2_text.insert('end', "\n\næ›´ã«ã‚¤ãƒ¡ãƒ¼ã‚¸ã‚‚テキストウィジェットã«")
-$twind2_text.insert('end', "ã†ã¾ãé…ç½®ã§ãã¾ã™ï¼š")
-
-TkTextImage.new($twind2_text, 'end',
- 'image'=>TkBitmapImage.new(:file=>[
- $demo_dir, '..',
- 'images', 'face.xbm'
- ].join(File::Separator)))
-
-# メソッド定義
-def textWinBigB2(w)
- w.borderwidth 15
-end
-def textWinSmallB2(w)
- w.borderwidth $text_normal2['border']
-end
-def textWinBigH2(w)
- w.highlightthickness 15
-end
-def textWinSmallH2(w)
- w.highlightthickness $text_normal2['highlight']
-end
-def textWinBigP2(w)
- w.configure(:padx=>15, :pady=>15)
-end
-def textWinSmallP2(w)
- w.configure(:padx=>$text_normal2['pad'], :pady=>$text_normal2['pad'])
-end
-
-def textWindOn2 (w,f)
- if defined? $twind2_scroll
- begin
- $twind2_scroll.destroy
- rescue
- end
- $twind2_scroll = nil
- end
-
- base = TkWinfo.parent( TkWinfo.parent(w) )
- $twind2_scroll = TkScrollbar.new(base) {|s|
- orient 'horizontal'
- command proc{|*args| w.xview(*args)}
- w.xscrollcommand proc{|first,last| s.set first,last}
- w.wrap 'none'
- pack('after'=>f, 'side'=>'bottom', 'fill'=>'x')
- }
-
- return nil
-end
-
-def textWindOff2 (w)
- if defined? $twind2_scroll
- begin
- $twind2_scroll.destroy
- rescue
- end
- $twind2_scroll = nil
- end
- w.xscrollcommand ''
- #w.wrap 'word'
- w.wrap 'char'
-end
-
-def textWindPlot2 (t)
- if (defined? $twind2_plot) && (TkWinfo.exist?($twind2_plot))
- return
- end
-
- $twind2_plot = TkCanvas.new(t) {
- relief 'sunken'
- width 450
- height 300
- cursor 'top_left_arrow'
- }
-
- #font = '-Adobe-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*'
- font = 'Helvetica 18'
-
- TkcLine.new($twind2_plot, 100, 250, 400, 250, 'width'=>2)
- TkcLine.new($twind2_plot, 100, 250, 100, 50, 'width'=>2)
- TkcText.new($twind2_plot, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
-
- (0..10).each {|i|
- x = 100 + (i * 30)
- TkcLine.new($twind2_plot, x, 250, x, 245, 'width'=>2)
- TkcText.new($twind2_plot, x, 254,
- 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
- }
- (0..5).each {|i|
- y = 250 - (i * 40)
- TkcLine.new($twind2_plot, 100, y, 105, y, 'width'=>2)
- TkcText.new($twind2_plot, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
- }
-
- for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
- x = 100 + (3*xx)
- y = 250 - (4*yy)/5
- item = TkcOval.new($twind2_plot, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
- item.addtag 'point'
- end
-
- $twind2_plot.itembind('point', 'Any-Enter',
- proc{$twind2_plot.itemconfigure 'current', 'fill', 'red'})
- $twind2_plot.itembind('point', 'Any-Leave',
- proc{$twind2_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
- $twind2_plot.itembind('point', '1',
- proc{|x,y| embPlotDown2 $twind2_plot,x,y}, "%x %y")
- $twind2_plot.itembind('point', 'ButtonRelease-1',
- proc{$twind2_plot.dtag 'selected'})
- $twind2_plot.bind('B1-Motion',
- proc{|x,y| embPlotMove2 $twind2_plot,x,y}, "%x %y")
- while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/)
- $twind2_text.delete $mark2_plot
- end
- $twind2_text.insert $mark2_plot,"\n"
- TkTextWindow.new($twind2_text, $mark2_plot, 'window'=>$twind2_plot)
- $tag2_center.add $mark2_plot
- $twind2_text.insert $mark2_plot,"\n"
-end
-
-$embPlot2 = {'lastX'=>0, 'lastY'=>0}
-
-def embPlotDown2 (w, x, y)
- w.dtag 'selected'
- w.addtag_withtag 'selected', 'current'
- w.raise 'current'
- $embPlot2['lastX'] = x
- $embPlot2['lastY'] = y
-end
-
-def embPlotMove2 (w, x, y)
- w.move 'selected', x - $embPlot2['lastX'], y - $embPlot2['lastY']
- $embPlot2['lastX'] = x
- $embPlot2['lastY'] = y
-end
-
-def textWindDel2 (w)
- if (defined? $twind2_text) && TkWinfo.exist?($twind2_plot)
- $twind2_text.delete $twind2_plot
- $twind2_plot = nil
- while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/)
- $twind2_text.delete $mark2_plot
- end
- $twind2_text.insert $mark2_plot," "
- end
-end
-
-def embDefBg2 (w)
- w['background'] = w.configinfo('background')[3]
-end
diff --git a/ext/tk/sample/demos-jp/unicodeout.rb b/ext/tk/sample/demos-jp/unicodeout.rb
deleted file mode 100644
index 966f85f331..0000000000
--- a/ext/tk/sample/demos-jp/unicodeout.rb
+++ /dev/null
@@ -1,120 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-#
-# unicodeout.rb --
-#
-# This demonstration script shows how you can produce output (in label
-# widgets) using many different alphabets.
-#
-# based on Tcl/Tk8.4.4 widget demos
-
-if defined?($unicodeout_demo) && $unicodeout_demo
- $unicodeout_demo.destroy
- $unicodeout_demo = nil
-end
-
-$unicodeout_demo = TkToplevel.new {|w|
- title("Unicode Label Demonstration")
- iconname("unicodeout")
- positionWindow(w)
-}
-
-base_frame = TkFrame.new($unicodeout_demo).pack(:fill=>:both, :expand=>true)
-
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'5.4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
-ã“ã‚Œã¯ï¼ŒTkã«ãŠã‘ã‚‹éžæ¬§ç±³æ–‡å­—集åˆã‚’用ã„る言語ã«å¯¾ã™ã‚‹ã‚µãƒãƒ¼ãƒˆã«ã¤ã„ã¦ã®\
-サンプルã§ã™ï¼ŽãŸã ã—,下ã®è¡¨ç¤ºã«ãŠã„ã¦ã‚ãªãŸãŒå®Ÿéš›ã«ã©ã®ã‚ˆã†ãªè¡¨ç¤ºã‚’\
-ç›®ã«ã™ã‚‹ã‹ã¯ï¼Œã‚ãªãŸã®ç’°å¢ƒã«ã©ã®ã‚ˆã†ãªæ–‡å­—集åˆãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã‚‹ã‹ã«\
-大ããä¾å­˜ã—ã¾ã™ï¼Žã¾ãŸï¼Œå¯¾è±¡ã¨ãªã‚‹æ–‡å­—集åˆãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãªã„å ´åˆã«\
-ã©ã®ã‚ˆã†ãªè¡¨ç¤ºãŒãªã•ã‚Œã‚‹ã‹ã‚‚ã‚ãªãŸã®ç’°å¢ƒæ¬¡ç¬¬ã§ã™ï¼Ž\
-「コードå‚ç…§ã€ãƒœã‚¿ãƒ³ã‚’押ã—ã¦ã‚½ãƒ¼ã‚¹ã‚’表示ã—,\
-Unicodeout_SampleFrameクラスã®@@fontã®å®šç¾©ã‚’書ãæ›ãˆã¦\
-(ファイルã®å†…容ã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“)\
-「å†å®Ÿè¡Œã€ãƒœã‚¿ãƒ³ã®ã‚¯ãƒªãƒƒã‚¯ã‚’試ã—ã¦ã¿ã¦ãã ã•ã„.
-スクリプトãŒå¯æ¬æ€§ã‚’æŒã¤ã‚ˆã†ã«ï¼Œæ–‡å­—列ã¯\\uXXXXã¨ã„ã†\
-Tclã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—表ç¾ã‚’用ã„ãŸUNICODE文字列ã§æ›¸ã‹ã‚Œã¦ã„ã¾ã™ï¼Ž\
-文字列ã¯ï¼ŒTk::UTF8_Stringメソッドã«ã‚ˆã£ã¦ï¼Œ\
-「UTF8å½¢å¼ã®æ–‡å­—列ã§ã‚ã‚‹ã€ã¨ã„ã†\
-エンコード情報付ãã®æ–‡å­—列オブジェクト\
-(Tclã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—表ç¾ã®å¤‰æ›æ¸ˆã¿)ã«å¤‰æ›ã—ã¦\
-ラベルウィジェットã«æ¸¡ã—ã¦ã„る点ã«æ³¨æ„ã—ã¦ãã ã•ã„.
-EOL
-#'
-
-TkFrame.new(base_frame){|f|
- pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
-
- TkButton.new(f, :text=>'é–‰ã˜ã‚‹', :width=>15, :command=>proc{
- $unicodeout_demo.destroy
- $unicodeout_demo = nil
- }).pack(:side=>:left, :expand=>true)
-
- TkButton.new(f, :text=>'コードå‚ç…§', :width=>15, :command=>proc{
- showCode 'unicodeout'
- }).pack(:side=>:left, :expand=>true)
-}
-
-wait_msg = TkLabel.new(base_frame,
- :text=>"フォント読ã¿è¾¼ã¿ã®å®Œäº†ã¾ã§" +
- "ã—ã°ã‚‰ããŠå¾…ã¡ä¸‹ã•ã„...",
- :font=>"Helvetica 12 italic").pack
-
-class Unicodeout_SampleFrame < TkFrame
- @@font = $font
- # @@font = 'Helvetica 14'
- # @@font = 'Courier 12'
- # @@font = 'clearlyu 16'
- # @@font = 'fixed 12'
- # @@font = 'Times 12'
- # @@font = 'Newspaper 12'
- # @@font = '{New century schoolbook} 12'
-
- def initialize(base)
- super(base)
- grid_columnconfig(1, :weight=>1)
- end
-
- def add_sample(lang, *args)
- sample_txt = Tk::UTF8_String(args.join(''))
- l = TkLabel.new(self, :font=>@@font, :text=>lang+':',
- :anchor=>:nw, :pady=>0)
- #s = TkLabel.new(self, :font=>@@font, :text=>sample_txt,
- s = TkLabel.new(self, :font=>TkFont.new(@@font), :text=>sample_txt,
- :anchor=>:nw, :width=>30, :pady=>0)
- Tk.grid(l, s, :sticky=>:ew, :pady=>0)
- l.grid_config(:padx, '1m')
- end
-end
-f = Unicodeout_SampleFrame.new(base_frame)
-f.pack(:expand=>true, :fill=>:both, :padx=>'2m', :pady=>'1m')
-
-# Processing when some characters are missing might take a while, so make
-# sure we're displaying something in the meantime...
-
-oldCursor = $unicodeout_demo.cursor
-$unicodeout_demo.cursor('watch')
-Tk.update
-
-f.add_sample('Arabic',
- '\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94',
- '\uFEE4\uFEE0\uFEDC\uFEDF\uFE8D')
-f.add_sample('Trad. Chinese', '\u4E2D\u570B\u7684\u6F22\u5B57')
-f.add_sample('Simpl. Chinese', '\u6C49\u8BED')
-f.add_sample('Greek',
- '\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ',
- '\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1')
-f.add_sample('Hebrew',
- '\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ',
- '\u05DC\u05D9\u05D0\u05E8\u05E9\u05D9')
-f.add_sample('Japanese',
- '\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ',
- '\u6F22\u5B57\u3068\u30AB\u30BF\u30AB\u30CA')
-f.add_sample('Korean', '\uB300\uD55C\uBBFC\uAD6D\uC758 \uD55C\uAE00')
-f.add_sample('Russian',
- '\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ',
- '\u044F\u0437\u044B\u043A')
-
-wait_msg.destroy
-$unicodeout_demo.cursor(oldCursor)
diff --git a/ext/tk/sample/demos-jp/vscale.rb b/ext/tk/sample/demos-jp/vscale.rb
deleted file mode 100644
index a502634138..0000000000
--- a/ext/tk/sample/demos-jp/vscale.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-# -*- coding: utf-8 -*-
-# frozen_string_literal: false
-require "tkcanvas"
-
-if defined?($vscale_demo) && $vscale_demo
- $vscale_demo.destroy
- $vscale_demo = nil
-end
-
-$vscale_demo = TkToplevel.new {|w|
- title("Vertical Scale Demonstration")
- iconname("vscale")
-}
-positionWindow($vscale_demo)
-
-base_frame = TkFrame.new($vscale_demo).pack(:fill=>:both, :expand=>true)
-
-msg = TkLabel.new(base_frame) {
- font $font
- wraplength '3.5i'
- justify 'left'
-# text "下ã«ã¯çŸ¢å°ãŒ1ã¤ã¨ä¹—ç›´ãªã‚¹ã‚±ãƒ¼ãƒ«ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚\
-#スケール上ã§ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³1をクリックã€ã¾ãŸã¯ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã¨\
-#矢å°ã®é•·ã•ã‚’変ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
- text "ã«ã¯ãƒãƒ¼ã¨ç¸¦åž‹ã®ã‚¹ã‚±ãƒ¼ãƒ«ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã¾ã™ã€‚スケールã§ãƒžã‚¦ã‚¹ã®ãƒœã‚¿ãƒ³1 をクリックã™ã‚‹ã‹ãƒ‰ãƒ©ãƒƒã‚°ã—ã¦ãƒãƒ¼ã®é«˜ã•ã‚’変ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚終ã£ãŸã‚‰ã€Œäº†è§£ã€ãƒœã‚¿ãƒ³ã‚’押ã—ã¦ãã ã•ã„。"
-}
-msg.pack('side'=>'top', 'padx'=>'.5c')
-
-TkFrame.new(base_frame) {|frame|
- TkButton.new(frame) {
- #text '了解'
- text 'é–‰ã˜ã‚‹'
- command proc {
- tmppath = $vscale_demo
- $vscale_demo = nil
- tmppath.destroy
- }
- }.pack('side'=>'left', 'expand'=>'yes')
-
- TkButton.new(frame) {
- text 'コードå‚ç…§'
- command proc { showCode 'vscale' }
- }.pack('side'=>'left', 'expand'=>'yes')
-}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-
-def setHeight(w, height)
- height = height + 21
- y2 = height - 30
- if y2 < 21
- y2 = 21
- end
- w.coords 'poly',15,20,35,20,35,y2,45,y2,25,height,5,y2,15,y2,15,20
- w.coords 'line',15,20,35,20,35,y2,45,y2,25,height,5,y2,15,y2,15,20
-end
-
-TkFrame.new(base_frame) {|frame|
- borderwidth 10
- canvas = TkCanvas.new(frame) {|c|
- width 50
- height 50
- bd 0
- highlightthickness 0
- TkcPolygon.new(c, 0, 0, 1, 1, 2, 2) {
- fill 'SeaGreen3'
- tags 'poly'
- }
- TkcLine.new(c, 0, 0, 1, 1, 2, 2, 0, 0) {
- fill 'black'
- tags 'line'
- }
- }.pack('side'=>'left', 'anchor'=>'nw', 'fill'=>'y')
- scale = TkScale.new(frame) {
- orient 'vertical'
- length 284
- from 0
- to 250
- command proc{|value| setHeight(canvas, value)}
- tickinterval 50
- }.pack('side'=>'left', 'anchor'=>'ne')
- scale.set 75
-}.pack
diff --git a/ext/tk/sample/demos-jp/widget b/ext/tk/sample/demos-jp/widget
deleted file mode 100644
index 5f5dfb9d70..0000000000
--- a/ext/tk/sample/demos-jp/widget
+++ /dev/null
@@ -1,1122 +0,0 @@
-#!/usr/bin/env ruby
-# -*- coding: utf-8 -*-
-
-# 漢字コード設定 ( tk.rb ã®ãƒ­ãƒ¼ãƒ‰æ™‚ã® encoding 推定/設定ã«ä½¿ã‚れる )
-#if RUBY_VERSION < '1.9.0' ### !!!!!!!!!!!!!!
-unless defined?(::Encoding.default_external)
- $KCODE = 'euc'
-else
- DEFAULT_TK_ENCODING = 'EUC-JP'
-end
-
-# tk 関係ライブラリã®èª­ã¿è¾¼ã¿
-require 'tk'
-# require 'tkafter'
-
-$RubyTk_WidgetDemo = true
-
-# widget demo directory ä½ç½®ã®ç²å¾—
-# $demo_dir = File.dirname($0)
-$demo_dir = File.dirname(__FILE__)
-
-# root ã®ç”Ÿæˆ
-$root = TkRoot.new{title "Ruby/Tk Widget Demonstration"}
-
-# tk ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®å–å¾—
-$tk_version = Tk::TK_VERSION
-$tk_major_ver, $tk_minor_ver = $tk_version.split('.').map{|n| n.to_i}
-$tk_patchlevel = Tk::TK_PATCHLEVEL
-
-# tcl_platform 情報ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚ªãƒ–ジェクト
-$tk_platform = TkVarAccess.new('tcl_platform')
-
-# フォント設定
-#######
-case($tk_version)
-when /^4.*/
- $font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*', nil)
- knjfont = '-*--16-*-jisx0208.1983-0'
- $kanji_font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*',
- knjfont)
- TkOption.add('*kanjiFont', knjfont, 'startupFile')
- $msg_kanji_font=TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*',
- '-*--24-*-jisx0208.1983-0')
-
-#when '8.0'
-# $font = TkFont.new('Helvetica -12')
-# $kanji_font = TkFont.new('Helvetica -12', 'Mincho -12')
-# TkOption.add('*kanjiFont', knjfont, 'startupFile')
-# $msg_kanji_font=TkFont.new('Helvetica 16', 'Gothic 16 bold')
-
-when /^8.*/
- $font = TkFont.new('Helvetica -12')
- $kanji_font = TkFont.new('Helvetica -12', 'Mincho -12')
- TkOption.add('*kanjiFont', knjfont, 'startupFile')
- $msg_kanji_font=TkFont.new('Helvetica 14 bold', 'Gothic 14 bold')
-
-else
- $font = TkFont.new('Helvetica 14', nil)
- knjfont = '-*--16-*-jisx0208.1983-0'
- $kanji_font = TkFont.new('Helvetic 14', knjfont)
- TkOption.add('*kanjiFont', knjfont, 'startupFile')
- $msg_kanji_font=TkFont.new('Helvetica 14',
- '-*--24-*-jisx0208.1983-0')
-end
-#######
-
-# イメージ設定
-$image = {}
-
-if $tk_major_ver >= 8
-$image['refresh'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><<EOD)
- R0lGODlhEAAQAPMAAMz/zCpnKdb/1z9mPypbKBtLGy9NMPL/9Or+6+P+4j1Y
- PwQKBP7//xMLFAYBCAEBASH5BAEAAAAALAAAAAAQABAAAwR0EAD3Gn0Vyw0e
- ++CncU7IIAezMA/nhUqSLJizvSdCEEjy2ZIV46AwDAoDHwPYGSoEiUJAAGJ6
- EDHBNCFINW5OqABKSFk/B9lUa94IDwIFgewFMwQDQwCZQCztTgM9Sl8SOEMG
- KSAthiaOjBMPDhQONBiXABEAOw==
-EOD
-end
-
-if $tk_major_ver >= 8
-$image['view'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><<EOD)
- R0lGODlhEAAQAPMAAMz/zP///8DAwICAgH9/fwAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAwRIcMhJB7h3hM33
- KFjWdQQYap1QrCaGBmrRrS4nj5b53jOgbwXBKGACoYLDIuAoHCmZyYvR1rT5
- RMAq8LqcIYGsrjPsW1XOmFUEADs=
-EOD
-end
-
-if $tk_major_ver >= 8
-$image['delete'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><<EOD)
- R0lGODlhEAAOAKEAAIQAAO/n3v///////yH5BAEKAAIALAAAAAAQAA4AAAIm
- lI9pAKHbIHNoVhYhTdjlJ2AWKG2g+CldmB6rxo2uybYhbS80eRQAOw==
-EOD
-end
-
-if $tk_major_ver >= 8
-$image['print'] = TkPhotoImage.new(:height=>19, :format=>'GIF', :data=><<EOD)
- R0lGODlhGgATAPcAACEQOTEpQjEpUkIpc0IxY0I5c0oxjEo5SlJCY1JCe1JK
- UlpChFpCjFpGkFpSc1paa2NKc2NKnGNja2tapWtjc29KnHNanHNjc3NjrXNr
- jHNrnHNzc3tjpXtrtXtzhICAgIRzvYSEjIZzqox7tYyEnIyMjJSEtZSEvZSM
- lJyMtZyMvZyUlJyUrZyUvZycnKWctaWlpa2czq2lzrWtvbWtzrW1tb21xr21
- 1sa9zs693s7OztbO3tbO597W1t7W7+fe7+fn5////+/n7+/v7+/v9////wAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAA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5OYhjBxCMYAICAigUEAA7
-EOD
-end
-
-# メニュー設定
-if $tk_major_ver >= 8
- $root.add_menubar([[['File', 0],
- ['About ... ', proc{aboutBox}, 0, '<F1>'],
- '---',
- ['Quit', proc{exit}, 0, 'Ctrl-Q']
- ]])
-else
- TkMenubar.new($root,
- [[['File', 0],
- ['About ... ', proc{aboutBox}, 0, '<F1>'],
- '---',
- ['Quit', proc{exit}, 0, 'Ctrl-Q']
- ]]).pack('side'=>'top', 'fill'=>'x')
-end
-$root.bind('F1', proc{aboutBox})
-$root.bind('Control-q', proc{exit})
-
-=begin
-TkFrame.new($root){|frame|
- TkMenubutton.new(frame){|button|
- m = TkMenu.new(button) {
- add 'command', 'label'=>'Quit', 'command'=>proc{exit}, 'underline'=>0
- }
- menu m
- text 'File'
- underline 0
- }.pack('side'=>'left')
-}.pack('side'=>'top', 'fill'=>'x')
-=end
-
-# テキストボックスã®ç”Ÿæˆ
-if $tk_version =~ /^4\.[01]/
- scr = TkScrollbar.new($root, 'orient'=>'vertical')
- txt = TkText.new($root) {
- #wrap 'word'
- wrap 'char'
- width 70
- height 30
- font $font
- setgrid 'yes'
- yscrollcommand proc{|first,last| scr.set first,last}
- }
- scr.command(proc{|*args| txt.yview(*args)})
- scr.pack('side'=>'right', 'fill'=>'y')
- txt.pack('expand'=>'yes', 'fill'=>'both')
-else
- textFrame = TkFrame.new($root)
- scr = TkScrollbar.new($root, 'orient'=>'vertical',
- 'highlightthickness'=>0, 'takefocus'=>1) {
- pack('in'=>textFrame, 'side'=>'right', 'fill'=>'y', 'padx'=>1)
- }
- txt = TkText.new($root) {
- #wrap 'word'
- wrap 'char'
- width 70
- height 30
- font $font
- setgrid 'yes'
- highlightthickness 0
- padx 4
- pady 2
- takefocus 0
- bd 1
- yscrollcommand proc{|first,last| scr.set first,last}
- }
- scr.command(proc{|*args| txt.yview(*args)})
-
-# txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both', 'padx'=>1)
-# txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both')
-# textFrame.pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>2)
- textFrame.pack('expand'=>'yes', 'fill'=>'both')
- # $root.withdraw.deiconify
- Tk.update_idletasks
- txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both')
-
- statusBar = TkFrame.new($root) {|f|
- if $tk_version =~ /^4.*/
- statusfont = '-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*'
- else
- statusfont = 'Helvetica 10'
- end
- $statusBarLabel = \
- TkLabel.new(f, 'text'=>" ", 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w',
- 'font'=>statusfont) \
- .pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both')
- TkLabel.new(f, 'width'=>8, 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w',
- 'font'=>statusfont) \
- .pack('side'=>'left', 'padx'=>2)
- }.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
-end
-
-# テキストタグ設定
-if $tk_version =~ /^4.*/
- tag_title = TkTextTag.new(txt, 'font'=>'-*-Helvetica-Bold-R-Normal--*-180-*-*-*-*-*-*')
-else
- tag_title = TkTextTag.new(txt, 'font'=>'Helvetica 18 bold')
-end
-#tag_kanji_title = TkTextTag.new(txt, 'kanjifont'=>$msg_kanji_font)
-#tag_middle = TkTextTag.new(txt, 'kanjifont'=>$kanji_font)
-tag_kanji_title = TkTextTag.new(txt, 'font'=>$msg_kanji_font)
-tag_middle = TkTextTag.new(txt, 'font'=>$kanji_font)
-tag_demospace = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c')
-
-if TkWinfo.depth($root) == 1
- tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'underline'=>1)
- $tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'underline'=>1)
- tag_hot = TkTextTag.new(txt, 'background'=>'black', 'foreground'=>'white')
-else
- tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'foreground'=>'blue', 'underline'=>1)
- $tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'foreground'=>'#303080', 'underline'=>1)
-# tag_hot = TkTextTag.new(txt, 'relief'=>'raised', 'borderwidth'=>1,
-# 'background'=>'SeaGreen3')
- tag_hot = TkTextTag.new(txt, 'borderwidth'=>1, 'foreground'=>'red')
-end
-
-#tag_demo.bind('Button-1', proc{invoke txt, txt.index('current')})
-tag_demo.bind('ButtonRelease-1',
- proc{|x,y|invoke txt, txt.index("@#{x},#{y}")}, '%x %y')
-
-lastLine = TkVariable.new("")
-newLine = TkVariable.new("")
-tag_demo.bind('Enter', proc{|x,y|
- lastLine.value = txt.index("@#{x},#{y} linestart")
- tag_hot.add(lastLine.value, "#{lastLine.value} lineend")
- showStatus txt, txt.index("@#{x},#{y}")
- },
- '%x %y')
-tag_demo.bind('Leave',
- proc{
- tag_hot.remove('1.0','end')
- txt.configure('cursor','xterm')
- $statusBarLabel.configure('text'=>"")
- })
-tag_demo.bind('Motion', proc{|x, y|
- newLine.value = txt.index("@#{x},#{y} linestart")
- if newLine.value != lastLine.value
- tag_hot.remove('1.0','end')
- lastLine.value = newLine.value
- if ( txt.tag_names("@#{x},#{y}").find{|t|
- t.kind_of?(String) && t =~ /^demo-/
- } )
- tag_hot.add(lastLine.value,
- "#{lastLine.value} lineend -1 chars")
- end
- end
- showStatus txt, txt.index("@#{x},#{y}")
- },
- '%x %y')
-
-# テキスト生æˆ
-txt.insert('end', 'Ruby/Tk : Widget', tag_title)
-#txt.insert('end', " デモンストレーション\n", tag_middle)
-txt.insert('end', " デモンストレーション\n", tag_kanji_title)
-txt.insert('end', <<"EOT")
-
-ã“ã®ã‚¢ãƒ—リケーションã¯ã€Tk Widget を用ã„ã¦ã©ã®ã‚ˆã†ãªã“ã¨ãŒã§ãã‚‹ã‹\
-を示ã™ãŸã‚ã®ã€ã„ãã¤ã‹ã®å°ã•ãªã‚¹ã‚¯ãƒªãƒ—トã«å¯¾ã™ã‚‹ãƒ•ãƒ­ãƒ³ãƒˆã‚¨ãƒ³ãƒ‰ã‚’æ\
-ä¾›ã—ã¦ã„ã¾ã™ã€‚以下ã«é †ç•ªã«æŒ™ã’られã¦ã„るデモンストレーションを実行\
-ã™ã‚‹ã«ã¯ãƒžã‚¦ã‚¹ã§ã‚¯ãƒªãƒƒã‚¯ã—ã¦ãã ã•ã„。デモンストレーションã®ã‚¦ã‚£ãƒ³\
-ドウãŒç¾ã‚Œã‚‹ã¨ã€ãƒ‡ãƒ¢ãƒ³ã‚¹ãƒˆãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’生æˆã—㟠Ruby/Tk ã®ã‚³ãƒ¼ãƒ‰ã‚’見\
-ã‚‹ãŸã‚ã«ã€"コードå‚ç…§"ボタンをクリックã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã‚ãªãŸãŒ\
-望むãªã‚‰ã€ãã®ã‚³ãƒ¼ãƒ‰ã‚’修正ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚修正ã—ãŸã‚³ãƒ¼ãƒ‰ã§ãƒ‡ãƒ¢\
-ンストレーションをå†å®Ÿè¡Œã™ã‚‹ãŸã‚ã«ã¯ã€ã‚³ãƒ¼ãƒ‰ãŒæ›¸ã‹ã‚ŒãŸã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«\
-ã‚ã‚‹"デモå†å®Ÿè¡Œ" ボタンをクリックã—ã¦ãã ã•ã„。\
-コードを修正ã—ã¦ã‚‚オリジナルã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›¸ãæ›ãˆã‚‰ã‚Œã‚‹ã“ã¨ã¯\
-ã‚ã‚Šã¾ã›ã‚“ã‹ã‚‰ã€å¿ƒé…ã›ãšã«è‰²ã€…ãªå¤‰æ›´ã‚’試ã—ã¦ã¿ã¦ãã ã•ã„。
-
-一部ã®ãƒ‡ãƒ¢ã§ã¯ã€æ¯”較的最近ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® Tk ã§ãªã‘ã‚Œã°ã‚µãƒãƒ¼ãƒˆã—ã¦\
-ã„ãªã„機能を使ã£ã¦å®Ÿè£…ã—ã¦ã„ã¾ã™(例ãˆã° Tk8.4 以上ãªã©)。ãã®ãŸã‚ã€\
-ãã†ã—ãŸæ©Ÿèƒ½ã‚’æŒãŸãªã„ Tk ライブラリを使ã£ã¦ã„ã‚‹å ´åˆã«ã¯ã€ãã†ã—ãŸ\
-デモã¯æ­£ã—ãå‹•ãã¾ã›ã‚“。ãã®ã‚ˆã†ãªæ©Ÿèƒ½ãŒå¿…è¦ã§ã‚ã‚Œã°ã€ãれをサãƒãƒ¼ãƒˆ\
-ã—ã¦ã„ã‚‹ Tk ライブラリを使ã†ã‚ˆã†ã« tcltklib をコンパイルã—ãªãŠã—ã¦\
-ãã ã•ã„。
-
-ã‚‚ã—ã‚ãªãŸã® Tk ㌠(最åˆã‹ã‚‰å«ã‚€ã‹ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸã‹ã«ã‚ˆã‚Š) \
-Ttk (Tile) 拡張を利用ã§ãる状態ã§ã‚ã‚‹ãªã‚‰ã€\
-Ttk æ‹¡å¼µã®ãƒ‡ãƒ¢ (sample/tkextlib/tile/demo.rb) ã‚‚ãœã²è©¦ã—ã¦ã¿ã¦ãã ã•ã„。
-( 多分,ç¾åœ¨ã®ã‚ãªãŸã®ç’°å¢ƒã«ã¯ Ttk æ‹¡å¼µã¯\
-#{
-begin
- require 'tkextlib/tile'
- "ã™ã§ã«å°Žå…¥ã•ã‚Œã¦ã„ã¾ã™"
-rescue
- "ã¾ã ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ã¾ã›ã‚“"
-end
-}\
-。)
-Ttk æ‹¡å¼µã¯ã€Tk8.5 以上ã§ã¯æ¨™æº–ã®æ©Ÿèƒ½ã¨ã—ã¦çµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚
-
-
-EOT
-
-#txt.insert('end',"ラベル, ボタン, ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³, ラジオボタン\n",tag_middle)
-txt.insert('end', "ラベル, ボタン, ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³, ラジオボタン\n",
- tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. ラベル (テキスト, ビットマップ)\n",
- tag_demo, "demo-label")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. ラベルã¨UNICODEテキスト (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n", tag_demo, "demo-unicodeout")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. ボタン \n", tag_demo, "demo-button")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³ (複数をé¸æŠžå¯èƒ½)\n",
- tag_demo, "demo-check")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. 3状態ãƒã‚§ãƒƒã‚¯ãƒœã‚¿ãƒ³ (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo, "demo-check2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "6. ラジオボタン (ä»»æ„ã®ä¸€ã¤ã‚’é¸æŠžå¯èƒ½)\n",
- tag_demo, "demo-radio")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "7. ラジオボタン (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo, "demo-radio2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "8. 3状態ラジオボタン (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo, "demo-radio3")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "9. ボタンã§ä½œã‚‰ã‚ŒãŸ15-パズルゲーム\n",
- tag_demo, "demo-puzzle")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "10. ビットマップを使用ã—ãŸã‚¢ã‚¤ã‚³ãƒ³ãƒœã‚¿ãƒ³\n",
- tag_demo, "demo-icon")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "11. ç”»åƒã‚’表示ã™ã‚‹äºŒã¤ã®ãƒ©ãƒ™ãƒ«\n",
- tag_demo, "demo-image1")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "12. ç”»åƒã‚’見るãŸã‚ã®ç°¡å˜ãªãƒ¦ãƒ¼ã‚¶ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹\n",
- tag_demo, "demo-image2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "13. ç”»åƒã‚’見るãŸã‚ã®ç°¡å˜ãªãƒ¦ãƒ¼ã‚¶ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo, "demo-image3")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "14. ラベル付ãフレーム (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo, "demo-labelframe")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "15. テーマã«å¯¾å¿œã—ãŸã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®ç°¡å˜ãªä¾‹ (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n",
- tag_demo, "demo-ttkbut")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-#txt.insert('end', "リストボックス\n", tag_middle)
-txt.insert('end', "リストボックス\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. 都é“府県.\n", tag_demo, "demo-states")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. 色: アプリケーションã®ãŸã‚ã®é…色を変ãˆã‚‹\n",
- "#{tag_demo.id} demo-colors")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. 格言集\n", tag_demo, "demo-sayings")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. 国ã«ã¤ã„ã¦ã®ãƒžãƒ«ãƒã‚«ãƒ©ãƒ ãƒªã‚¹ãƒˆ (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n",
- tag_demo, "demo-mclist")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. ディレクトリブラウザ (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n",
- tag_demo, "demo-tree")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-#txt.insert('end', "エントリã¨ã‚¹ãƒ”ンボックス\n", tag_middle)
-txt.insert('end', "エントリ\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. スクロールãƒãƒ¼ãªã—\n", tag_demo, "demo-entry1")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. スクロールãƒãƒ¼ã‚ã‚Š\n", tag_demo, "demo-entry2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. èªè¨¼å‡¦ç†ä»˜ãã®ã‚¨ãƒ³ãƒˆãƒªãƒœãƒƒã‚¯ã‚¹ã¨ãƒ‘スワードフィールド (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo, "demo-entry3")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. スピンボックス (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo, "demo-spin")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. コンボボックス (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n",
- tag_demo, "demo-combo")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "6. ç°¡å˜ãªãƒ•ã‚©ãƒ¼ãƒ \n", tag_demo, "demo-form")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-#txt.insert('end', "テキスト\n", tag_middle)
-txt.insert('end', "テキスト\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. 基本的ãªãƒ†ã‚­ã‚¹ãƒˆ\n", tag_demo, "demo-text")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. 表示スタイル.\n", tag_demo, "demo-style")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. ãƒã‚¤ãƒ‘ーテキスト(ã‚¿ã‚°ãƒã‚¤ãƒ³ãƒ‰).\n",
- tag_demo, "demo-bind")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. ウィンドウを埋ã‚込んã ãƒ†ã‚­ã‚¹ãƒˆ\n",
- tag_demo, "demo-twind")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. ウィンドウを埋ã‚込んã ãƒ†ã‚­ã‚¹ãƒˆ (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo, "demo-twind2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "6. 検索\n", tag_demo, "demo-search")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "7. テキストウィジェットã®å¯¾ç­‰åŒ–(peering) (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n", tag_demo, "demo-textpeer")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-#txt.insert('end', "キャンãƒã‚¹\n", tag_middle)
-txt.insert('end', "キャンãƒã‚¹\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. アイテムã®åž‹\n", tag_demo, "demo-items")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. 2 次元ã®ãƒ—ロット\n", tag_demo, "demo-plot")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. テキスト\n", tag_demo, "demo-ctext")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. 矢å°ã®å½¢\n", tag_demo, "demo-arrow")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. ルーラー\n", tag_demo, "demo-ruler")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "6. フロアプラン\n", tag_demo, "demo-floor")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "7. フロアプラン (ç•°ãªã‚‹ã‚­ãƒ£ãƒ³ãƒã‚¹ã‚¢ã‚¤ãƒ†ãƒ ä½œæˆæ–¹æ³•ã‚’使用)\n", tag_demo, "demo-floor2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "8. スクロールå¯èƒ½ãªã‚­ãƒ£ãƒ³ãƒã‚¹\n",
- tag_demo, "demo-cscroll")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "9. ãƒã‚§ã‚¹ãƒœãƒ¼ãƒ‰ä¸Šã®é¨Žå£«ã®å·¡å›ž (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n",
- tag_demo, "demo-knightstour")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-#txt.insert('end', "スケールã¨ãƒ—ログレスãƒãƒ¼\n", tag_middle)
-txt.insert('end', "スケールã¨ãƒ—ログレスãƒãƒ¼\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. 垂直スケール\n", tag_demo.id, "demo-vscale")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. 水平スケール\n", tag_demo.id, "demo-hscale")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. プログレスãƒãƒ¼ (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n", tag_demo.id, "demo-ttkprogress")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-txt.insert('end', "ペインドウィンドウã¨ãƒŽãƒ¼ãƒˆãƒ–ック\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. æ°´å¹³æ–¹å‘ (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo.id, "demo-paned1")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. åž‚ç›´æ–¹å‘ (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo.id, "demo-paned2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. テーマã«å¯¾å¿œã—ãŸåŸ‹ã‚è¾¼ã¿ãƒšã‚¤ãƒ³ (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n",
- tag_demo.id, "demo-ttkpane")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. ノートブックウィジェット (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n",
- tag_demo.id, "demo-ttknote")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-#txt.insert('end', "メニューã¨ãƒ„ールãƒãƒ¼\n", tag_middle)
-txt.insert('end', "メニューã¨ãƒ„ールãƒãƒ¼\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. メニューã¨ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã‚’å«ã‚“ã ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦\n",
- tag_demo, "demo-menu")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. メニューã¨ã‚«ã‚¹ã‚±ãƒ¼ãƒ‰ã‚’å«ã‚“ã ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ (Tk8.x 専用)\n",
- tag_demo, "demo-menu8x")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. 〃 (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n",
- tag_demo, "demo-menu84")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. メニューボタン (Tk8.x 専用)\n",
- tag_demo, "demo-menubu")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "5. テーマã«å¯¾å¿œã—ãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒœã‚¿ãƒ³ (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n",
- tag_demo.id, "demo-ttkmenu")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "6. テーマã«å¯¾å¿œã—ãŸãƒ„ールãƒãƒ¼ (Tile/Ttkæ‹¡å¼µã¸ã®å¯¾å¿œãŒå¿…è¦)\n",
- tag_demo.id, "demo-toolbar")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-#txt.insert('end', "ダイアログウィンドウ\n", tag_middle)
-txt.insert('end', "ダイアログウィンドウ\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. メッセージボックス\n", tag_demo, "demo-msgbox")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. 詳細テキスト付ãã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒœãƒƒã‚¯ã‚¹ (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n", tag_demo, "demo-msgbox2")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. ファイルé¸æŠžãƒ€ã‚¤ã‚¢ãƒ­ã‚°\n", tag_demo, "demo-filebox")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. 色é¸æŠžãƒ€ã‚¤ã‚¢ãƒ­ã‚°\n", tag_demo, "demo-clrpick")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.insert('end', "\n")
-#txt.insert('end', "アニメーション\n", tag_middle)
-txt.insert('end', "アニメーション\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. アニメーションラベル (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n", tag_demo, "demo-anilabel")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. 波形ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n", tag_demo, "demo-aniwave")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. 振りå­ã®ã‚·ãƒŸãƒ¥ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n", tag_demo, "demo-pendulum")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "4. A celebration of Rube Goldberg (機能ã«å¯¾å¿œã—ãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®TkãŒå¿…è¦)\n", tag_demo, "demo-goldberg")
-
-txt.insert('end', "\n")
-#txt.insert('end', "ãã®ä»–\n", tag_middle)
-txt.insert('end', "ãã®ä»–\n", tag_kanji_title)
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "1. 組ã¿è¾¼ã¿ã®ãƒ“ットマップ\n", tag_demo, "demo-bitmap")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "2. モーダルダイアログ(ローカルグラブ)\n",
- tag_demo, "demo-dialog1")
-txt.insert('end', " \n ", tag_demospace)
-txt.insert('end', "3. モーダルダイアログ(グローãƒãƒ«ã‚°ãƒ©ãƒ–)\n",
- tag_demo, "demo-dialog2")
-txt.insert('end', " \n ", tag_demospace)
-
-txt.state('disabled')
-scr.focus
-
-################################
-# method 定義
-################################
-def positionWindow(w)
- w.geometry('+300+300')
-end
-
-# 親ウィジェットã¨ï¼Œå¤‰æ•°å㨠TkVariable ã¨ã®çµ„(é…列)ã®ä¸¦ã³ã‚’渡ã™
-$showVarsWin = {}
-def showVars1(parent, *args)
- if $showVarsWin[parent.path]
- begin
- $showVarsWin[parent.path].destroy
- rescue
- end
- end
- top = TkToplevel.new(parent) {|w|
- title "Variable values"
- base = TkFrame.new(w).pack(:fill=>:both, :expand=>true)
- TkLabel.new(base) {
- text "変数値:"
- width 20
- anchor 'center'
- if $tk_version =~ /^4.*/
- font '-Adobe-helvetica-medium-r-normal--*-180-*-*-*-*-*-*'
- else
- font 'Helvetica 14'
- end
- }.pack('side'=>'top', 'fill'=>'x')
- len = 1
- args.each{|vnam,vbody|
- len = vnam.to_s.length if vnam.to_s.length > len
- }
- args.each{|vnam,vbody|
- TkFrame.new(base){|f|
- #TkLabel.new(f, 'text'=>"#{vnam}: ").pack('side'=>'left')
- TkLabel.new(f, 'text'=>"#{vnam}: ",'width'=>len+2).pack('side'=>'left')
- TkLabel.new(f, 'textvariable'=>vbody, 'anchor'=>'w')\
- .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
- }.pack('side'=>'top', 'anchor'=>'w', 'fill'=>'x')
- }
- TkButton.new(base) {
- text "了解"
- command proc{w.destroy}
- }.pack('side'=>'bottom', 'pady'=>2)
- }
- $showVarsWin[parent.path] = top
-end
-
-def showVars2(parent, *args)
- if $showVarsWin[parent.path]
- begin
- $showVarsWin[parent.path].destroy
- rescue
- end
- end
- $showVarsWin[parent.path] = TkToplevel.new(parent) {|top|
- title "Variable values"
-
- base = TkFrame.new(top).pack(:fill=>:both, :expand=>true)
-
- TkLabelFrame.new(base, :text=>"変数値:",
- :font=>{:family=>'Helvetica', :size=>14}){|f|
- args.each{|vnam,vbody|
- TkGrid(TkLabel.new(f, :text=>"#{vnam}: ", :anchor=>'w'),
- TkLabel.new(f, :textvariable=>vbody, :anchor=>'w'),
- :padx=>2, :pady=>2, :sticky=>'w')
- }
-
- f.grid(:sticky=>'news', :padx=>4)
- f.grid_columnconfig(1, :weight=>1)
- f.grid_rowconfig(100, :weight=>1)
- }
- TkButton.new(base, :text=>"了解", :width=>8, :default=>:active,
- :command=>proc{top.destroy}){|b|
- top.bind('Return', proc{b.invoke})
- top.bind('Escape', proc{b.invoke})
-
- b.grid(:sticky=>'e', :padx=>4, :pady=>[6, 4])
- }
- base.grid_columnconfig(0, :weight=>1)
- base.grid_rowconfig(0, :weight=>1)
- }
-end
-
-if $tk_major_ver < 8
- alias showVars showVars1
-elsif $tk_major_ver == 8 && $tk_minor_ver < 4
- alias showVars showVars1
-else # ver >= 8.4
- alias showVars showVars2
-end
-
-# 疑似トップレベルサãƒãƒ¼ãƒˆ
-module PseudoToplevel_Evaluable
- def pseudo_toplevel_eval(body = Proc.new)
- Thread.current[:TOPLEVEL] = self
- begin
- body.call
- ensure
- Thread.current[:TOPLEVEL] = nil
- end
- end
-
- def pseudo_toplevel_evaluable?
- @pseudo_toplevel_evaluable
- end
- def pseudo_toplevel_evaluable=(mode)
- @pseudo_toplevel_evaluable = (mode)? true: false
- end
-
- def self.extended(mod)
- mod.__send__(:extend_object, mod)
- mod.instance_variable_set('@pseudo_toplevel_evaluable', true)
- end
-end
-
-class Object
- alias __method_missing__ method_missing
- private :__method_missing__
-
- def method_missing(id, *args)
- begin
- has_top = (top = Thread.current[:TOPLEVEL]) &&
- top.respond_to?(:pseudo_toplevel_evaluable?) &&
- top.pseudo_toplevel_evaluable? &&
- top.respond_to?(id)
- rescue Exception => e
- has_top = false
- end
-
- if has_top
- top.__send__(id, *args)
- else
- __method_missing__(id, *args)
- end
- end
-end
-
-class Proc
- def initialize(*args, &b)
- super
- @__pseudo_toplevel__ = Thread.current[:TOPLEVEL]
- end
-
- alias __call__ call
- def call(*args, &b)
- if top = @__pseudo_toplevel__
- orig_top = Thread.current[:TOPLEVEL]
- Thread.current[:TOPLEVEL] = top
- begin
- __call__(*args, &b)
- ensure
- Thread.current[:TOPLEVEL] = orig_top
- end
- else
- __call__(*args, &b)
- end
- end
-end
-
-def proc(&b)
- Proc.new(&b)
-end
-def lambda(&b)
- Proc.new(&b)
-end
-
-def _null_binding
- Module.new.instance_eval{extend PseudoToplevel_Evaluable}
- # binding
- # Module.new.instance_eval{binding}
-end
-private :_null_binding
-
-def eval_samplecode(code, file=nil)
- #eval(code)
- #_null_binding.pseudo_toplevel_eval{ eval(code) }
- #Thread.new{ _null_binding.pseudo_toplevel_eval{ eval(code) } }
- Thread.new{
- _null_binding.pseudo_toplevel_eval{
- begin
- if file
- eval(code, binding, "(eval:#{file})")
- else
- eval(code)
- end
- rescue Exception=>e
- #p e
- TkBgError.show(e.message + "\n" +
- "\n---< backtrace of Ruby side >-----\n" +
- e.backtrace.join("\n") +
- "\n---< backtrace of Tk side >-------")
- end
- }
- }
- Tk.update rescue nil
-end
-
-# テキスト上ã§ã® click ã«å¯¾ã™ã‚‹å‹•ä½œ
-def invoke(txt, idx)
- tag = txt.tag_names(idx).find{|t| t.kind_of?(String) && t =~ /^demo-/}
- return unless tag
-
- cursor = txt.cget('cursor')
- txt.cursor('watch')
- Tk.update rescue nil
- # eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding)
- # Tk.update
- eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb')
- txt.cursor(cursor)
-
- $tag_visited.add("#{idx} linestart +1 chars", "#{idx} lineend +1 chars")
-end
-=begin
-def invoke (txt, idx)
- tag = txt.tag_names(idx).find{|t| t.kind_of?(String) && t =~ /^demo-/}
- return unless tag
- current_cursor = txt.cget('cursor')
- txt.cursor('watch')
- Tk.update
-# eval `cat #{tag[5..-1]}.rb`
-# eval `cat #{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb`
- eval IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join
- Tk.update
-# txt.cursor('xterm')
- txt.cursor(current_cursor)
-
- $tag_visited.add("#{idx} linestart +1 chars", "#{idx} lineend +1 chars")
-end
-=end
-
-# 状態表示
-def showStatus (txt, index)
- tag = txt.tag_names(index).find{|t| t.kind_of?(String) && t =~ /^demo-/}
- cursor = txt.cget('cursor')
- unless tag
- $statusBarLabel.configure('text', " ")
- newcursor = 'xterm'
- else
- demoname = tag[5..-1]
- $statusBarLabel.configure('text',
- "サンプルプログラム \"#{demoname}\" ã®å®Ÿè¡Œ ")
- newcursor = 'hand2'
- end
- txt.configure('cursor'=>newcursor) if cursor != newcursor
-end
-
-# ソースコードã®è¡¨ç¤º
-def showCode1(demo)
- file = "#{demo}.rb"
- $code_window = nil unless defined? $code_window
- if $code_window == nil || TkWinfo.exist?($code_window) == false
- $code_window = TkToplevel.new(nil)
- f = TkFrame.new($code_window)
-
- TkButton.new(f) {
- #text "了解"
- text "é–‰ã˜ã‚‹"
- command proc{
- $code_window.destroy
- $code_window = nil
- }
- }.pack('side'=>'right', 'expand'=>'false', 'pady'=>2)
- TkButton.new(f) {
- text "å†å®Ÿè¡Œ"
- # command proc{eval($code_text.get('1.0','end'), _null_binding)}
- command proc{eval_samplecode($code_text.get('1.0','end'), '<viewer>')}
- }.pack('side'=>'right', 'expand'=>'false', 'pady'=>2)
-
- TkLabel.new(f,'text'=>'line:').pack('side'=>'left')
- linenum =TkLabel.new(f,'text'=>'').pack('side'=>'left')
- TkLabel.new(f,'text'=>' pos:').pack('side'=>'left')
- posnum =TkLabel.new(f,'text'=>'').pack('side'=>'left')
-
- $set_linenum = proc{|w|
- line, pos = w.index('insert').split('.')
- linenum.text = line
- posnum.text = pos
- }
-
- f.pack('side'=>'bottom', 'expand'=>'true', 'fill'=>'x')
-
- if $tk_version =~ /^4\.[01]/
- s = TkScrollbar.new($code_window, 'orient'=>'vertical')
- $code_text = TkText.new($code_window) {
- height 40
- setgrid 'yes'
- yscrollcommand proc{|first,last| s.set first,last}
- }
- s.command(proc{|*args| $code_text.yview(*args)})
- s.pack('side'=>'right', 'fill'=>'y')
- $code_text.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both')
- else
- TkFrame.new($code_window) {|f|
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
-
- hs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
- 'orient'=>'horizontal')
- vs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
- 'orient'=>'vertical')
- $code_text = TkText.new($code_window) {|t|
- height 40
- #wrap 'word'
- wrap 'char'
- xscrollcommand proc{|first,last| hs.set first,last}
- yscrollcommand proc{|first,last| vs.set first,last}
- setgrid 'yes'
- highlightthickness 0
- pady 2
- padx 3
- hs.command(proc{|*args| $code_text.xview(*args)})
- vs.command(proc{|*args| $code_text.yview(*args)})
- }
-
- $code_text.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- vs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
-# xs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
-# 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- }
- end
-
- btag = TkBindTag.new
-
- btag.bind('Key', $set_linenum, '%W')
- btag.bind('Button', $set_linenum, '%W')
-
- btags = $code_text.bindtags
- btags.insert(btags.index($code_text.class) + 1, btag)
- $code_text.bindtags = btags
-
- else
- $code_window.deiconify
- $code_window.raise
- end
-
- $code_window.title("Demo code: #{file}")
- $code_window.iconname(file)
- code = open([$demo_dir, file].join(File::Separator), 'r'){|fid| fid.read }
- $code_text.delete('1.0', 'end')
- code.force_encoding('EUC-JP') if defined?(::Encoding.default_external)
- $code_text.insert('1.0', code)
- TkTextMarkInsert.new($code_text,'1.0')
- $set_linenum.call($code_text)
-end
-
-def showCode2(demo)
- file = "#{demo}.rb"
- $code_window = nil unless defined? $code_window
- if $code_window == nil || TkWinfo.exist?($code_window) == false
- $code_window = TkToplevel.new(nil)
- tf = TkFrame.new($code_window)
- $code_text = TkText.new(tf, :font=>'Courier 10', :height=>30,
- :wrap=>'word', :bd=>1, :setgrid=>true,
- :highlightthickness=>0, :pady=>2, :padx=>3)
- xscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)}
- yscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)}
- TkGrid($code_text, yscr, :sticky=>'news')
- #TkGrid(xscr)
- tf.grid_rowconfigure(0, :weight=>1)
- tf.grid_columnconfigure(0, :weight=>1)
-
- bf = TkFrame.new($code_window)
-
- lf = TkFrame.new(bf)
- TkLabel.new(lf, :text=>'line:').pack(:side=>:left)
- linenum =TkLabel.new(lf, :text=>'').pack(:side=>:left)
- TkLabel.new(lf, :text=>' pos:').pack(:side=>:left)
- posnum =TkLabel.new(lf, :text=>'').pack(:side=>:left)
-
- $set_linenum = proc{|w|
- line, pos = w.index('insert').split('.')
- linenum.text = line
- posnum.text = pos
- }
-
- #b_dis = TkButton.new(bf, :text=>'了解', :default=>:active,
- b_dis = TkButton.new(bf, :text=>'é–‰ã˜ã‚‹', :default=>:active,
- :command=>proc{
- $code_window.destroy
- $code_window = nil
- },
- :image=>$image['delete'], :compound=>:left)
- b_prn = TkButton.new(bf, :text=>'å°åˆ·',
- :command=>proc{printCode($code_text, file)},
- :image=>$image['print'], :compound=>:left)
- b_run = TkButton.new(bf, :text=>'å†å®Ÿè¡Œ',
- :command=>proc{
- # eval($code_text.get('1.0','end'), _null_binding)
- eval_samplecode($code_text.get('1.0','end'), '<viewer>')
- },
- :image=>$image['refresh'], :compound=>:left)
-
- TkGrid(lf, 'x', b_run, b_prn, b_dis, :padx=>4, :pady=>[6,4])
- bf.grid_columnconfigure(1, :weight=>1)
-
- TkGrid(tf, :sticky=>'news')
- TkGrid(bf, :sticky=>'ew')
- $code_window.grid_columnconfigure(0, :weight=>1)
- $code_window.grid_rowconfigure(0, :weight=>1)
-
- $code_window.bind('Return', proc{|win|
- b_dis.invoke unless win.kind_of?(TkText)
- }, '%W')
- $code_window.bindinfo('Return').each{|cmd, arg|
- $code_window.bind_append('Escape', cmd, arg)
- }
-
- btag = TkBindTag.new
-
- btag.bind('Key', $set_linenum, '%W')
- btag.bind('Button', $set_linenum, '%W')
-
- btags = $code_text.bindtags
- btags.insert(btags.index($code_text.class) + 1, btag)
- $code_text.bindtags = btags
-
- else
- $code_window.deiconify
- $code_window.raise
- end
-
- $code_window.title("Demo code: #{file}")
- $code_window.iconname(file)
- code = open([$demo_dir, file].join(File::Separator), 'r'){|fid| fid.read }
- $code_text.delete('1.0', 'end')
- code.force_encoding('EUC-JP') if defined?(::Encoding.default_external)
- $code_text.insert('1.0', code)
- TkTextMarkInsert.new($code_text,'1.0')
- $set_linenum.call($code_text)
-end
-
-if $tk_major_ver < 8
- alias showCode showCode1
-elsif $tk_major_ver == 8 && $tk_minor_ver < 4
- alias showCode showCode1
-else # ver >= 8.4
- alias showCode showCode2
-end
-
-
-# printCode --
-# Prints the source code currently displayed in the See Code dialog.
-# Much thanks to Arjen Markus for this.
-#
-# Arguments:
-# txt - Name of text widget containing code to print
-# file - Name of the original file (implicitly for title)
-
-def printCode(txt, file)
- code = txt.get('1.0', 'end - 1c')
- dir = '.'
- dir = ENV['HOME'] if ENV['HOME']
- dir = ENV['TMP'] if ENV['TMP']
- dir = ENV['TEMP'] if ENV['TEMP']
-
- fname = [dir, 'tkdemo-' + file].join(File::Separator)
- open(fname, 'w'){|fid| fid.print(code)}
- begin
- case Tk::TCL_PLATFORM('platform')
- when 'unix'
- msg = `lp -c #{fname}`
- unless $?.exitstatus == 0
- Tk.messageBox(:title=>'Print spooling failure',
- :message=>'エラーãŒç™ºç”Ÿã—ã¾ã—ãŸï¼Ž' +
- 'å°åˆ·ã«å¤±æ•—ã—ãŸã‚‚ã®ã¨æ€ã‚ã‚Œã¾ã™ : ' + msg)
- end
- when 'windows'
- begin
- printTextWin32(fname)
- rescue => e
- Tk.messageBox(:title=>'Print spooling failure',
- :message=>'エラーãŒç™ºç”Ÿã—ã¾ã—ãŸï¼Ž' +
- 'å°åˆ·ã«å¤±æ•—ã—ãŸã‚‚ã®ã¨æ€ã‚ã‚Œã¾ã™ : ' +
- e.message)
- end
- when 'macintosh'
- Tk.messageBox(:title=>'Operation not Implemented',
- :message=>'å°åˆ·æ©Ÿèƒ½ã¯ã¾ã å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã›ã‚“')
- else
- Tk.messageBox(:title=>'Operation not Implemented',
- :message=>'検出ã•ã‚ŒãŸç’°å¢ƒ ' +
- Tk::TCL_PLATFORM('platform') +
- ' ã¯æœªçŸ¥ã®ç’°å¢ƒã§ã‚ã‚‹ãŸã‚,' +
- 'å°åˆ·æ©Ÿèƒ½ã¯å®Ÿè£…ã•ã‚Œã¦ã„ã¾ã›ã‚“: ')
- end
- ensure
- File.delete(fname)
- end
-end
-
-# printTextWin32 --
-# Print a file under Windows
-#
-# Arguments:
-# filename - Name of the file
-#
-def printTextWin32(fname)
- require 'win32/registry'
- begin
- app = Win32::Registry::HKEY_CLASSES_ROOT['.txt']
- pcmd = nil
- Win32::Registry::HKEY_CLASSES_ROOT.open("#{app}\\shell\\print"){|reg|
- pcmd = reg['command']
- }
- rescue
- app = Tk.tk_call('auto_execok', 'notepad.exe')
- pcmd = "#{app} /p %1"
- end
-
- pcmd.gsub!('%1', fname)
- puts pcmd
- cmd = Tk.tk_call('auto_execok', 'start') + ' /min ' + pcmd
-
- msg = `#{cmd}`
- unless $?.exitstatus == 0
- fail RuntimeError, msg
- end
-end
-
-# aboutBox
-#
-# Pops up a message box with an "about" message
-#
-def aboutBox
- Tk.messageBox('icon'=>'info', 'type'=>'ok', 'title'=>'About Widget Demo',
- 'message'=>"Ruby/Tk ウィジェットデモ Ver.1.7.1-jp\n\n" +
- "based on demos of Tk8.1 -- 8.5 " +
- "( Copyright of Tcl/Tk demos:: " +
- "(c) 1996-1997 Sun Microsystems, Inc. / " +
- "(c) 1997-2000 Ajuba Solutions, Inc. / " +
- "(c) 2001-2007 Donal K. Fellows / " +
- "(c) 2002-2007 Daniel A. Steffen )\n\n" +
- "Your Ruby & Tk Version ::\n" +
- "Ruby#{RUBY_VERSION}(#{RUBY_RELEASE_DATE})[#{RUBY_PLATFORM}] / Tk#{$tk_patchlevel}#{(Tk::JAPANIZED_TK)? '-jp': ''}\n\n" +
- "Ruby/Tk release date :: tcltklib #{TclTkLib::RELEASE_DATE}; tk #{Tk::RELEASE_DATE}")
-end
-
-####################################
-# 引数ã§æŒ‡å®šã•ã‚ŒãŸãƒ‡ãƒ¢ã‚’èµ·å‹•ã™ã‚‹
-no_launcher = false
-if ARGV[0] == '-n'
- ARGV.shift
- no_launcher = true if ARGV.size > 0
-else
- # show the root widget to make it lower then demo windows
- Tk.update rescue nil
-end
-ARGV.each{|cmd|
- if cmd =~ /(.*).rb/
- cmd = $1
- end
- #eval(IO.readlines("#{[$demo_dir, cmd].join(File::Separator)}.rb").join,
- # _null_binding)
- eval_samplecode(IO.readlines("#{[$demo_dir, cmd].join(File::Separator)}.rb").join, cmd + '.rb')
-}
-if no_launcher
- $root.withdraw # hide root window
- Thread.start{
- loop do
- count = 0
- $root.winfo_children.each{|w|
- count += 1 if w.kind_of?(TkToplevel)
- }
- $root.destroy if count == 0
- end
- }
-end
-
-################################
-# イベント待ã¡ã«å…¥ã‚‹
-Tk.mainloop
diff --git a/ext/tk/sample/editable_listbox.rb b/ext/tk/sample/editable_listbox.rb
deleted file mode 100644
index 5cbd20e0a5..0000000000
--- a/ext/tk/sample/editable_listbox.rb
+++ /dev/null
@@ -1,149 +0,0 @@
-# frozen_string_literal: false
-#
-# Tk::RbWidget::Editable_Listbox class
-#
-# When "DoubleClick-1" on a listbox item, the entry box is opened on the
-# item. And when hit "Return" key on the entry box after modifying the
-# text, the entry box is closed and the item is changed. Or when hit
-# "Escape" key, the entry box is closed without modification.
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-module Tk
- module RbWidget
- class Editable_Listbox < TkListbox
- end
- end
-end
-
-
-class Tk::RbWidget::Editable_Listbox < TkListbox
- #------------------------------------
- BindTag = TkBindTag.new_by_name(self.to_s.gsub(/::/, '#'))
-
- BindTag.bind('FocusIn', :widget){|w|
- w.instance_eval{
- if idx = @ebox.pos
- see(idx) if bbox(idx).empty?
- @ebox.focus(true)
- end
- }
- }
-
- BindTag.bind('Double-1', :widget, :y){|w, y|
- w.instance_eval{ _ebox_placer(nearest(y)) }
- }
-
- BindTag.bind('Return', :widget){|w|
- w.instance_eval{
- if idx = index(:active)
- _ebox_placer(idx)
- end
- }
- }
- #------------------------------------
-
- def configure(*args)
- ret = super
-
- case cget(:state)
- when 'normal'
- # do nothing
- when 'disabled'
- _ebox_erase
- else # unknown
- # do nothing
-
- end
-
- ret
- end
-
- def _ebox_move(idx)
- return nil if cget(:state) == 'disabled'
- x, y, w, h = bbox(idx)
- return nil unless y && h
- @ebox.place(:x => 0, :relwidth => 1.0,
- :y => y - selectborderwidth,
- :height => h + 2 * selectborderwidth)
- @ebox.pos = idx
- @ebox.focus
- end
-
- def _ebox_placer(idx)
- return nil unless _ebox_move(idx)
- @ebox.value = listvariable.list[idx]
- @ebox.xview_moveto(self.xview[0])
- end
-
- def _ebox_erase
- @ebox.place_forget
- @ebox.pos = nil
- end
- private :_ebox_move, :_ebox_placer, :_ebox_erase
-
- def _setup_ebox_bindings
- # bindings for entry
- @ebox.bind('Return'){
- list = listvariable.list
- list[@ebox.pos] = @ebox.value if @ebox.pos
- listvariable.value = list
- _ebox_erase
- focus
- }
-
- @ebox.bind('Escape'){ _ebox_erase }
- end
- def _setup_listbox_bindings
- # bindings for listbox
- tags = bindtags
- bindtags(tags.insert(tags.index(self) + 1, self.class::BindTag))
- end
- private :_setup_ebox_bindings, :_setup_listbox_bindings
-
- def yview(*args)
- if !@ebox.pos || bbox(@ebox.pos).empty?
- @ebox.place_forget
- else
- _ebox_move(@ebox.pos)
- end
- super
- end
-
- def create_self(keys)
- super(keys)
-
- unless self.listvariable
- self.listvariable = TkVariable.new(self.get(0, :end))
- end
-
- @ebox = TkEntry.new(self){
- @pos = nil
- def self.pos; @pos; end
- def self.pos=(idx); @pos = idx; end
- }
-
- _setup_ebox_bindings
- _setup_listbox_bindings
- end
-end
-
-if $0 == __FILE__
- #lbox0 = TkListbox.new.pack(:side=>:left)
- #lbox0.insert(:end, 0,1,2,3,4,5,6,7,8,9,0,1,2,3)
-
- scr = TkScrollbar.new.pack(:side=>:right, :fill=>:y)
-
- lbox1 = Tk::RbWidget::Editable_Listbox.new.pack(:side=>:left)
- lbox2 = Tk::RbWidget::Editable_Listbox.new.pack(:side=>:left)
-
- scr.assign(lbox1, lbox2)
-
- lbox1.insert(:end, *%w(a b c d e f g h i j k l m n))
- lbox2.insert(:end, 0,1,2,3,4,5,6,7,8,9,0,1,2,3)
-
-
- Tk.mainloop
-end
diff --git a/ext/tk/sample/encstr_usage.rb b/ext/tk/sample/encstr_usage.rb
deleted file mode 100644
index 49a29ec19a..0000000000
--- a/ext/tk/sample/encstr_usage.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: false
-require 'tk'
-
-TkMessage.new(:width=>400, :text=><<EOM).pack
-This sample shows how to use Tk::EncodedString class. \
-This reads 'iso2022-kr' text (from discription of \
-Korean language environment of GNU Emacs 20.7.2) \
-and inserts the text into the text widget.
-EOM
-
-t1 = TkText.new(:height=>5).pack
-t2 = TkText.new(:height=>5).pack
-t3 = TkText.new(:height=>5).pack
-
-src_str = IO.readlines(File.join(File.dirname(__FILE__),'iso2022-kr.txt')).join
-
-t1.insert('end',
- "use neither Tk::EncodedString class nor Tk.encoding= method\n\n")
-t1.insert('end', src_str)
-
-enc_str = Tk::EncodedString(src_str, 'iso2022-kr')
-t2.insert('end',
- "use Tk::EncodedString class (Tk.encoding => '#{Tk.encoding}')\n\n")
-t2.insert('end', enc_str)
-
-Tk.encoding = 'iso2022-kr'
-t3.insert('end', "use Tk.encoding = 'iso2022-kr' (Tk.force_default_encoding? == #{Tk.force_default_encoding?})\n\n")
-
-t3.insert('end', src_str)
-
-Tk.mainloop
diff --git a/ext/tk/sample/figmemo_sample.rb b/ext/tk/sample/figmemo_sample.rb
deleted file mode 100644
index d947030606..0000000000
--- a/ext/tk/sample/figmemo_sample.rb
+++ /dev/null
@@ -1,457 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-
-begin
- # try to use Img extension
- require 'tkextlib/tkimg'
-rescue Exception
- # cannot use Img extension --> ignore
-end
-
-
-############################
-# scrolled_canvas
-class TkScrolledCanvas < TkCanvas
- include TkComposite
-
- def initialize_composite(keys={})
- @h_scr = TkScrollbar.new(@frame)
- @v_scr = TkScrollbar.new(@frame)
-
- @canvas = TkCanvas.new(@frame)
- @path = @canvas.path
-
- @canvas.xscrollbar(@h_scr)
- @canvas.yscrollbar(@v_scr)
-
- TkGrid.rowconfigure(@frame, 0, :weight=>1, :minsize=>0)
- TkGrid.columnconfigure(@frame, 0, :weight=>1, :minsize=>0)
-
- @canvas.grid(:row=>0, :column=>0, :sticky=>'news')
- @h_scr.grid(:row=>1, :column=>0, :sticky=>'ew')
- @v_scr.grid(:row=>0, :column=>1, :sticky=>'ns')
-
- delegate('DEFAULT', @canvas)
- delegate('background', @canvas, @h_scr, @v_scr)
- delegate('activebackground', @h_scr, @v_scr)
- delegate('troughcolor', @h_scr, @v_scr)
- delegate('repeatdelay', @h_scr, @v_scr)
- delegate('repeatinterval', @h_scr, @v_scr)
- delegate('borderwidth', @frame)
- delegate('relief', @frame)
-
- delegate_alias('canvasborderwidth', 'borderwidth', @canvas)
- delegate_alias('canvasrelief', 'relief', @canvas)
-
- delegate_alias('scrollbarborderwidth', 'borderwidth', @h_scr, @v_scr)
- delegate_alias('scrollbarrelief', 'relief', @h_scr, @v_scr)
-
- configure(keys) unless keys.empty?
- end
-end
-
-############################
-class PhotoCanvas < TkScrolledCanvas
-
-USAGE = <<EOT
---- WHAT IS ---
-You can write comments on the loaded image, and save it as a Postscipt
-file (original image file is not modified). Each comment is drawn as a
-set of an indicator circle, an arrow, and a memo text. See the following
-how to write comments.
-This can save the list of memo texts to another file. It may useful to
-search the saved Postscript file by the comments on them.
-This may not support multibyte characters (multibyte texts are broken on
-a Postscript file). It depends on features of canvas widgets of Tcl/Tk
-libraries linked your Ruby/Tk. If you use Tcl/Tk8.0-jp (Japanized Tcl/Tk),
-you can (possibly) get a Japanese Postscript file.
-
---- BINDINGS ---
-* Button-1 : draw comments by following steps
- 1st - Set center of a indicator circle.
- 2nd - Set head position of an arrow.
- 3rd - Set tail position of an arrow, and show an entry box.
- Input a memo text and hit 'Enter' key to entry the comment.
-
-* Button-2-drag : scroll the canvas
-
-* Button-3 : when drawing, cancel current drawing
-
-* Double-Button-3 : delete the clicked comment (text, arrow, and circle)
-EOT
-
- def initialize(*args)
- super(*args)
-
- self.highlightthickness = 0
- self.selectborderwidth = 0
-
- @photo = TkPhotoImage.new
- @img = TkcImage.new(self, 0, 0, :image=>@photo)
-
- width = self.width
- height = self.height
- @scr_region = [-width, -height, width, height]
- self.scrollregion(@scr_region)
- self.xview_moveto(0.25)
- self.yview_moveto(0.25)
-
- @col = 'red'
- @font = 'Helvetica -12'
-
- @memo_id_num = -1
- @memo_id_head = 'memo_'
- @memo_id_tag = nil
- @overlap_d = 2
-
- @state = TkVariable.new
- @border = 2
- @selectborder = 1
- @delta = @border + @selectborder
- @entry = TkEntry.new(self, :relief=>:ridge, :borderwidth=>@border,
- :selectborderwidth=>@selectborder,
- :highlightthickness=>0)
- @entry.bind('Return'){@state.value = 0}
-
- @mode = old_mode = 0
-
- _state0()
-
- bind('2', :x, :y){|x,y| scan_mark(x,y)}
- bind('B2-Motion', :x, :y){|x,y| scan_dragto(x,y)}
-
- bind('3'){
- next if (old_mode = @mode) == 0
- @items.each{|item| item.delete }
- _state0()
- }
-
- bind('Double-3', :widget, :x, :y){|w, x, y|
- next if old_mode != 0
- x = w.canvasx(x)
- y = w.canvasy(y)
- tag = nil
- w.find_overlapping(x - @overlap_d, y - @overlap_d,
- x + @overlap_d, y + @overlap_d).find{|item|
- ! (item.tags.find{|name|
- if name =~ /^(#{@memo_id_head}\d+)$/
- tag = $1
- end
- }.empty?)
- }
- w.delete(tag) if tag
- }
- end
-
- #-----------------------------------
- private
- def _state0() # init
- @mode = 0
-
- @memo_id_num += 1
- @memo_id_tag = @memo_id_head + @memo_id_num.to_s
-
- @target = nil
- @items = []
- @mark = [0, 0]
- bind_remove('Motion')
- bind('ButtonRelease-1', proc{|x,y| _state1(x,y)}, '%x', '%y')
- end
-
- def _state1(x,y) # set center
- @mode = 1
-
- @target = TkcOval.new(self,
- [canvasx(x), canvasy(y)], [canvasx(x), canvasy(y)],
- :outline=>@col, :width=>3, :tags=>[@memo_id_tag])
- @items << @target
- @mark = [x,y]
-
- bind('Motion', proc{|x,y| _state2(x,y)}, '%x', '%y')
- bind('ButtonRelease-1', proc{|x,y| _state3(x,y)}, '%x', '%y')
- end
-
- def _state2(x,y) # create circle
- @mode = 2
-
- r = Integer(Math.sqrt((x-@mark[0])**2 + (y-@mark[1])**2))
- @target.coords([canvasx(@mark[0] - r), canvasy(@mark[1] - r)],
- [canvasx(@mark[0] + r), canvasy(@mark[1] + r)])
- end
-
- def _state3(x,y) # set line start
- @mode = 3
-
- @target = TkcLine.new(self,
- [canvasx(x), canvasy(y)], [canvasx(x), canvasy(y)],
- :arrow=>:first, :arrowshape=>[10, 14, 5],
- :fill=>@col, :tags=>[@memo_id_tag])
- @items << @target
- @mark = [x, y]
-
- bind('Motion', proc{|x,y| _state4(x,y)}, '%x', '%y')
- bind('ButtonRelease-1', proc{|x,y| _state5(x,y)}, '%x', '%y')
- end
-
- def _state4(x,y) # create line
- @mode = 4
-
- @target.coords([canvasx(@mark[0]), canvasy(@mark[1])],
- [canvasx(x), canvasy(y)])
- end
-
- def _state5(x,y) # set text
- @mode = 5
-
- if x - @mark[0] >= 0
- justify = 'left'
- dx = - @delta
-
- if y - @mark[1] >= 0
- anchor = 'nw'
- dy = - @delta
- else
- anchor = 'sw'
- dy = @delta
- end
- else
- justify = 'right'
- dx = @delta
-
- if y - @mark[1] >= 0
- anchor = 'ne'
- dy = - @delta
- else
- anchor = 'se'
- dy = @delta
- end
- end
-
- bind_remove('Motion')
-
- @entry.value = ''
- @entry.configure(:justify=>justify, :font=>@font, :foreground=>@col)
-
- ewin = TkcWindow.new(self, [canvasx(x)+dx, canvasy(y)+dy],
- :window=>@entry, :state=>:normal, :anchor=>anchor,
- :tags=>[@memo_id_tag])
-
- @entry.focus
- @entry.grab
- @state.wait
- @entry.grab_release
-
- ewin.delete
-
- @target = TkcText.new(self, [canvasx(x), canvasy(y)],
- :anchor=>anchor, :justify=>justify,
- :fill=>@col, :font=>@font, :text=>@entry.value,
- :tags=>[@memo_id_tag])
-
- _state0()
- end
-
- #-----------------------------------
- public
- def load_photo(filename)
- @photo.configure(:file=>filename)
- end
-
- def modified?
- ! ((find_withtag('all') - [@img]).empty?)
- end
-
- def fig_erase
- (find_withtag('all') - [@img]).each{|item| item.delete}
- end
-
- def reset_region
- width = @photo.width
- height = @photo.height
-
- if width > @scr_region[2]
- @scr_region[0] = -width
- @scr_region[2] = width
- end
-
- if height > @scr_region[3]
- @scr_region[1] = -height
- @scr_region[3] = height
- end
-
- self.scrollregion(@scr_region)
- self.xview_moveto(0.25)
- self.yview_moveto(0.25)
- end
-
- def get_texts
- ret = []
- find_withtag('all').each{|item|
- if item.kind_of?(TkcText)
- ret << item[:text]
- end
- }
- ret
- end
-end
-############################
-
-# define methods for menu
-def open_file(canvas, fname)
- if canvas.modified?
- ret = Tk.messageBox(:icon=>'warning',:type=>'okcancel',:default=>'cancel',
- :message=>'Canvas may be modified. Really erase? ')
- return if ret == 'cancel'
- end
-
- filetypes = [
- ['GIF Files', '.gif'],
- ['GIF Files', [], 'GIFF'],
- ['PPM Files', '.ppm'],
- ['PGM Files', '.pgm']
- ]
-
- begin
- if Tk::Img::package_version != ''
- filetypes << ['JPEG Files', ['.jpg', '.jpeg']]
- filetypes << ['PNG Files', '.png']
- filetypes << ['PostScript Files', '.ps']
- filetypes << ['PDF Files', '.pdf']
- filetypes << ['Windows Bitmap Files', '.bmp']
- filetypes << ['Windows Icon Files', '.ico']
- filetypes << ['PCX Files', '.pcx']
- filetypes << ['Pixmap Files', '.pixmap']
- filetypes << ['SGI Files', '.sgi']
- filetypes << ['Sun Raster Files', '.sun']
- filetypes << ['TGA Files', '.tga']
- filetypes << ['TIFF Files', '.tiff']
- filetypes << ['XBM Files', '.xbm']
- filetypes << ['XPM Files', '.xpm']
- end
- rescue
- end
-
- filetypes << ['ALL Files', '*']
-
- fpath = Tk.getOpenFile(:filetypes=>filetypes)
- return if fpath.empty?
-
- begin
- canvas.load_photo(fpath)
- rescue => e
- Tk.messageBox(:icon=>'error', :type=>'ok',
- :message=>"Fail to read '#{fpath}'.\n#{e.message}")
- end
-
- canvas.fig_erase
- canvas.reset_region
-
- fname.value = fpath
-end
-
-# --------------------------------
-def save_memo(canvas, fname)
- initname = fname.value
- if initname != '-'
- initname = File.basename(initname, File.extname(initname))
- fpath = Tk.getSaveFile(:filetypes=>[ ['Text Files', '.txt'],
- ['ALL Files', '*'] ],
- :initialfile=>initname)
- else
- fpath = Tk.getSaveFile(:filetypes=>[ ['Text Files', '.txt'],
- ['ALL Files', '*'] ])
- end
- return if fpath.empty?
-
- begin
- fid = open(fpath, 'w')
- rescue => e
- Tk.messageBox(:icon=>'error', :type=>'ok',
- :message=>"Fail to open '#{fname.value}'.\n#{e.message}")
- end
-
- begin
- canvas.get_texts.each{|txt|
- fid.print(txt, "\n")
- }
- ensure
- fid.close
- end
-end
-
-# --------------------------------
-def ps_print(canvas, fname)
- initname = fname.value
- if initname != '-'
- initname = File.basename(initname, File.extname(initname))
- fpath = Tk.getSaveFile(:filetypes=>[ ['Postscript Files', '.ps'],
- ['ALL Files', '*'] ],
- :initialfile=>initname)
- else
- fpath = Tk.getSaveFile(:filetypes=>[ ['Postscript Files', '.ps'],
- ['ALL Files', '*'] ])
- end
- return if fpath.empty?
-
- bbox = canvas.bbox('all')
- canvas.postscript(:file=>fpath, :x=>bbox[0], :y=>bbox[1],
- :width=>bbox[2] - bbox[0], :height=>bbox[3] - bbox[1])
-end
-
-# --------------------------------
-def quit(canvas)
- ret = Tk.messageBox(:icon=>'warning', :type=>'okcancel',
- :default=>'cancel',
- :message=>'Really quit? ')
- exit if ret == 'ok'
-end
-
-# --------------------------------
-# setup root
-root = TkRoot.new(:title=>'Fig Memo')
-
-# create canvas frame
-canvas = PhotoCanvas.new(root).pack(:fill=>:both, :expand=>true)
-usage_frame = TkFrame.new(root, :relief=>:ridge, :borderwidth=>2)
-hide_btn = TkButton.new(usage_frame, :text=>'hide usage',
- :font=>{:size=>8}, :pady=>1,
- :command=>proc{usage_frame.unpack})
-hide_btn.pack(:anchor=>'e', :padx=>5)
-usage = TkLabel.new(usage_frame, :text=>PhotoCanvas::USAGE,
- :font=>'Helvetica 8', :justify=>:left).pack
-
-show_usage = proc{
- usage_frame.pack(:before=>canvas, :fill=>:x, :expand=>true)
-}
-
-fname = TkVariable.new('-')
-f = TkFrame.new(root, :relief=>:sunken, :borderwidth=>1).pack(:fill=>:x)
-label = TkLabel.new(f, :textvariable=>fname,
- :font=>{:size=>-12, :weight=>:bold},
- :anchor=>'w').pack(:side=>:left, :fill=>:x, :padx=>10)
-
-# create menu
-mspec = [
- [ ['File', 0],
- ['Show Usage', proc{show_usage.call}, 5],
- '---',
- ['Open Image File', proc{open_file(canvas, fname)}, 0],
- ['Save Memo Texts', proc{save_memo(canvas, fname)}, 0],
- '---',
- ['Save Postscript', proc{ps_print(canvas, fname)}, 5],
- '---',
- ['Quit', proc{quit(canvas)}, 0]
- ]
-]
-root.add_menubar(mspec)
-
-# manage wm_protocol
-root.protocol(:WM_DELETE_WINDOW){quit(canvas)}
-
-# show usage
-show_usage.call
-
-# --------------------------------
-# start eventloop
-Tk.mainloop
diff --git a/ext/tk/sample/images/earth.gif b/ext/tk/sample/images/earth.gif
deleted file mode 100644
index 2c229eb110..0000000000
--- a/ext/tk/sample/images/earth.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/images/earthris.gif b/ext/tk/sample/images/earthris.gif
deleted file mode 100644
index c4ee473727..0000000000
--- a/ext/tk/sample/images/earthris.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/images/face.xbm b/ext/tk/sample/images/face.xbm
deleted file mode 100644
index 03d829f4d1..0000000000
--- a/ext/tk/sample/images/face.xbm
+++ /dev/null
@@ -1,173 +0,0 @@
-#define face_width 108
-#define face_height 144
-#define face_x_hot 48
-#define face_y_hot 80
-static char face_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x09,
- 0x20, 0x80, 0x24, 0x05, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x88,
- 0x24, 0x20, 0x80, 0x24, 0x00, 0x00, 0x00, 0x10, 0x80, 0x04, 0x00, 0x01,
- 0x00, 0x01, 0x40, 0x0a, 0x09, 0x00, 0x92, 0x04, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x10, 0x40, 0x12, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x84,
- 0x24, 0x40, 0x22, 0xa8, 0x02, 0x14, 0x84, 0x92, 0x40, 0x42, 0x12, 0x04,
- 0x10, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x52, 0x11, 0x00, 0x12, 0x00,
- 0x40, 0x02, 0x00, 0x20, 0x00, 0x08, 0x00, 0xaa, 0x02, 0x54, 0x85, 0x24,
- 0x00, 0x10, 0x12, 0x00, 0x00, 0x81, 0x44, 0x00, 0x90, 0x5a, 0x00, 0xea,
- 0x1b, 0x00, 0x80, 0x40, 0x40, 0x02, 0x00, 0x08, 0x00, 0x20, 0xa2, 0x05,
- 0x8a, 0xb4, 0x6e, 0x45, 0x12, 0x04, 0x08, 0x00, 0x00, 0x00, 0x10, 0x02,
- 0xa8, 0x92, 0x00, 0xda, 0x5f, 0x10, 0x00, 0x10, 0xa1, 0x04, 0x20, 0x41,
- 0x02, 0x00, 0x5a, 0x25, 0xa0, 0xff, 0xfb, 0x05, 0x41, 0x02, 0x04, 0x00,
- 0x00, 0x08, 0x40, 0x80, 0xec, 0x9b, 0xec, 0xfe, 0x7f, 0x01, 0x04, 0x20,
- 0x90, 0x02, 0x04, 0x00, 0x08, 0x20, 0xfb, 0x2e, 0xf5, 0xff, 0xff, 0x57,
- 0x00, 0x04, 0x02, 0x00, 0x00, 0x20, 0x01, 0xc1, 0x6e, 0xab, 0xfa, 0xff,
- 0xff, 0x05, 0x90, 0x20, 0x48, 0x02, 0x00, 0x04, 0x20, 0xa8, 0xdf, 0xb5,
- 0xfe, 0xff, 0xff, 0x0b, 0x01, 0x00, 0x01, 0x00, 0x80, 0x80, 0x04, 0xe0,
- 0xbb, 0xef, 0xff, 0xff, 0x7f, 0x01, 0x00, 0x04, 0x48, 0x02, 0x00, 0x20,
- 0x80, 0xf4, 0x6f, 0xfb, 0xff, 0xff, 0xff, 0x20, 0x90, 0x40, 0x02, 0x00,
- 0x00, 0x04, 0x08, 0xb8, 0xf6, 0xff, 0xff, 0xdf, 0xbe, 0x12, 0x45, 0x10,
- 0x90, 0x04, 0x90, 0x00, 0x22, 0xfa, 0xff, 0xff, 0xff, 0xbb, 0xd7, 0xe9,
- 0x3a, 0x02, 0x02, 0x00, 0x04, 0x90, 0x80, 0xfe, 0xdf, 0xf6, 0xb7, 0xef,
- 0xbe, 0x56, 0x57, 0x40, 0x48, 0x09, 0x00, 0x04, 0x00, 0xfa, 0xf5, 0xdf,
- 0xed, 0x5a, 0xd5, 0xea, 0xbd, 0x09, 0x00, 0x00, 0x40, 0x00, 0x92, 0xfe,
- 0xbf, 0x7d, 0xb7, 0x6a, 0x55, 0xbf, 0xf7, 0x02, 0x11, 0x01, 0x00, 0x91,
- 0x00, 0xff, 0xff, 0xaf, 0x55, 0x55, 0x5b, 0xeb, 0xef, 0x22, 0x04, 0x04,
- 0x04, 0x00, 0xa4, 0xff, 0xf7, 0xad, 0xaa, 0xaa, 0xaa, 0xbe, 0xfe, 0x03,
- 0x20, 0x00, 0x10, 0x44, 0x80, 0xff, 0x7f, 0x55, 0x12, 0x91, 0x2a, 0xeb,
- 0xbf, 0x0b, 0x82, 0x02, 0x00, 0x00, 0xd1, 0x7f, 0xdf, 0xa2, 0xa4, 0x54,
- 0x55, 0xfd, 0xfd, 0x47, 0x08, 0x08, 0x00, 0x21, 0xe4, 0xff, 0x37, 0x11,
- 0x09, 0xa5, 0xaa, 0xb6, 0xff, 0x0d, 0x80, 0x00, 0x00, 0x04, 0xd0, 0xff,
- 0x4f, 0x44, 0x20, 0x48, 0x55, 0xfb, 0xff, 0x27, 0x11, 0x02, 0x40, 0x40,
- 0xe2, 0xfb, 0x15, 0x11, 0x4a, 0x55, 0x4a, 0x7d, 0xf7, 0x0f, 0x00, 0x00,
- 0x04, 0x08, 0xf8, 0xdf, 0x52, 0x44, 0x01, 0x52, 0xb5, 0xfa, 0xff, 0x0f,
- 0x49, 0x02, 0x00, 0x02, 0xe9, 0xf6, 0x0a, 0x11, 0xa4, 0x88, 0x4a, 0x6d,
- 0xff, 0x5f, 0x00, 0x00, 0x10, 0x20, 0xf0, 0x2f, 0x21, 0x44, 0x10, 0x52,
- 0xb5, 0xfa, 0xff, 0x0f, 0x44, 0x04, 0x80, 0x08, 0xf8, 0xab, 0x8a, 0x00,
- 0x81, 0xa4, 0xd4, 0xd6, 0xfe, 0x2f, 0x00, 0x00, 0x04, 0x40, 0xb5, 0x2d,
- 0x21, 0x08, 0x04, 0x90, 0xaa, 0xfa, 0xff, 0x1f, 0x11, 0x01, 0x00, 0x04,
- 0xf0, 0x57, 0x0a, 0x22, 0x40, 0x4a, 0xda, 0x5e, 0xfb, 0x1f, 0x40, 0x00,
- 0x40, 0x20, 0xba, 0x95, 0x90, 0x00, 0x01, 0xa0, 0xaa, 0xea, 0xff, 0x5f,
- 0x02, 0x02, 0x00, 0x01, 0xe8, 0x57, 0x05, 0x00, 0x00, 0x12, 0xd5, 0xfe,
- 0xfd, 0x1f, 0x48, 0x00, 0x04, 0x48, 0x7a, 0x95, 0x08, 0x02, 0x10, 0x40,
- 0xaa, 0x55, 0xf7, 0x1f, 0x00, 0x09, 0x20, 0x00, 0xf8, 0x57, 0x22, 0x10,
- 0x00, 0x28, 0xa9, 0xfa, 0xff, 0x5f, 0x02, 0x00, 0x00, 0x49, 0xdd, 0x29,
- 0x01, 0x00, 0x80, 0x80, 0xaa, 0xd7, 0xff, 0x0f, 0x10, 0x00, 0x08, 0x00,
- 0xf8, 0x96, 0x08, 0x00, 0x00, 0x20, 0x54, 0xfa, 0xee, 0x3f, 0x81, 0x04,
- 0x40, 0x24, 0xfe, 0x55, 0x82, 0x00, 0x00, 0x82, 0xd2, 0xad, 0xff, 0x0f,
- 0x08, 0x00, 0x04, 0x80, 0x6c, 0x97, 0x00, 0x00, 0x02, 0x20, 0xa9, 0xf6,
- 0xdf, 0x5f, 0x00, 0x02, 0x20, 0x09, 0xfa, 0x49, 0x12, 0x00, 0x20, 0x84,
- 0x54, 0xdb, 0xfe, 0x1f, 0x91, 0x00, 0x00, 0x00, 0xf8, 0x2b, 0x00, 0x20,
- 0x00, 0x40, 0xa4, 0xf6, 0xbb, 0x1f, 0x04, 0x00, 0x44, 0x92, 0x7e, 0x95,
- 0x02, 0x00, 0x00, 0x89, 0xaa, 0xdd, 0xff, 0x1f, 0x20, 0x09, 0x10, 0x00,
- 0xf4, 0x57, 0x20, 0x01, 0x08, 0x20, 0xa9, 0x76, 0xff, 0x5f, 0x02, 0x00,
- 0x00, 0x21, 0xfc, 0x4a, 0x05, 0x00, 0x01, 0x80, 0x54, 0xdb, 0xff, 0x1e,
- 0x08, 0x02, 0x04, 0x08, 0xf9, 0x2b, 0x00, 0x00, 0x40, 0x28, 0xd2, 0xf6,
- 0xff, 0xbf, 0x80, 0x00, 0x90, 0x00, 0xbc, 0x92, 0x08, 0x10, 0x00, 0x82,
- 0x54, 0xdb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x44, 0xf9, 0x55, 0x02, 0x01,
- 0x00, 0x20, 0xaa, 0xbd, 0xfd, 0x3f, 0x08, 0x04, 0x04, 0x10, 0xf4, 0x2a,
- 0x01, 0x00, 0x22, 0x80, 0xd4, 0xf6, 0xff, 0x5f, 0x82, 0x00, 0x40, 0x02,
- 0xf8, 0x55, 0x20, 0x00, 0x00, 0x50, 0x6a, 0xdf, 0xfe, 0x3f, 0x00, 0x00,
- 0x00, 0x48, 0xe9, 0x4a, 0x05, 0x08, 0x00, 0xa5, 0xd5, 0xf5, 0xff, 0x3f,
- 0x10, 0x01, 0x10, 0x01, 0xb0, 0xab, 0x92, 0x02, 0x40, 0xf8, 0xbf, 0xde,
- 0xfe, 0x5f, 0x02, 0x04, 0x04, 0x48, 0xfa, 0xd4, 0x6f, 0x20, 0x84, 0xef,
- 0xff, 0xfb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x00, 0xe0, 0xed, 0xbf, 0x0b,
- 0xa1, 0x7e, 0xff, 0xbf, 0xfd, 0x5f, 0x04, 0x01, 0x20, 0x49, 0xd2, 0xfb,
- 0xfe, 0x55, 0xd4, 0xff, 0xff, 0xf6, 0xff, 0x07, 0x00, 0x04, 0x00, 0x00,
- 0xc0, 0xaa, 0xfb, 0x2b, 0xa2, 0xfe, 0xff, 0xdf, 0xee, 0x1f, 0x91, 0x00,
- 0x82, 0xa4, 0xa4, 0xf5, 0xff, 0x57, 0xd5, 0xff, 0xbf, 0xfd, 0xff, 0x4d,
- 0x00, 0x00, 0x20, 0x00, 0x88, 0x5b, 0xff, 0x2f, 0x69, 0xff, 0xff, 0xdb,
- 0xfe, 0x1f, 0x24, 0x02, 0x00, 0x49, 0xa2, 0xd6, 0xff, 0x5f, 0xea, 0xff,
- 0x7f, 0x7f, 0x7f, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x40, 0xab, 0xf7, 0xbb,
- 0xf0, 0xdf, 0xff, 0xd5, 0xff, 0xbf, 0x82, 0x04, 0x42, 0x24, 0x91, 0xd5,
- 0xaa, 0xae, 0xd4, 0xaa, 0x52, 0x7b, 0xff, 0x15, 0x08, 0x00, 0x00, 0x01,
- 0x04, 0x55, 0xd5, 0x55, 0x70, 0x5b, 0x75, 0xdd, 0xdf, 0x1f, 0x40, 0x00,
- 0x08, 0x48, 0xa0, 0x4a, 0xa9, 0x56, 0xea, 0x56, 0xad, 0x6a, 0x7d, 0x9b,
- 0x04, 0x01, 0x00, 0x02, 0x42, 0x2a, 0xd5, 0xaa, 0xa8, 0xaa, 0xaa, 0xfa,
- 0xdf, 0x2f, 0x10, 0x04, 0x22, 0x48, 0x08, 0x45, 0x2a, 0x15, 0x68, 0x55,
- 0x55, 0xd7, 0x76, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x40, 0x2a, 0x80, 0xa0,
- 0xb2, 0x09, 0x48, 0xb9, 0xdf, 0x17, 0x22, 0x01, 0x00, 0x24, 0x45, 0x8a,
- 0x24, 0x4a, 0x54, 0x51, 0x91, 0xf6, 0x6e, 0x4b, 0x00, 0x04, 0x90, 0x00,
- 0x80, 0x52, 0x00, 0x20, 0x69, 0x05, 0xa4, 0xaa, 0xff, 0x1e, 0x48, 0x00,
- 0x02, 0x92, 0x08, 0x05, 0x81, 0x94, 0xd4, 0x92, 0x40, 0xfd, 0xb6, 0x8b,
- 0x00, 0x01, 0x40, 0x00, 0x82, 0x54, 0x00, 0x48, 0x68, 0x05, 0x90, 0xa4,
- 0xef, 0x06, 0x24, 0x00, 0x08, 0x12, 0x10, 0x05, 0x00, 0x10, 0xb5, 0x01,
- 0x42, 0xfb, 0xbf, 0x43, 0x00, 0x09, 0x00, 0x40, 0x81, 0xa8, 0x08, 0x4a,
- 0xaa, 0x96, 0x90, 0xac, 0x6d, 0x15, 0x22, 0x00, 0x20, 0x09, 0x04, 0x15,
- 0x80, 0x28, 0xdc, 0x01, 0x24, 0xfb, 0xbf, 0x01, 0x80, 0x04, 0x09, 0x00,
- 0x40, 0x48, 0x02, 0x45, 0xb2, 0x2e, 0x41, 0x6d, 0xef, 0x05, 0x11, 0x00,
- 0x40, 0x52, 0x02, 0x15, 0x29, 0x2a, 0xac, 0x42, 0x54, 0xfb, 0x3b, 0x51,
- 0x84, 0x00, 0x08, 0x00, 0x20, 0x54, 0x80, 0x05, 0xb5, 0x3d, 0xa2, 0xb6,
- 0xdf, 0x00, 0x20, 0x04, 0x20, 0x49, 0x89, 0xa8, 0x6a, 0x29, 0xac, 0xd6,
- 0x54, 0xff, 0x3f, 0x84, 0x00, 0x01, 0x04, 0x10, 0x00, 0x94, 0xa8, 0x56,
- 0xda, 0x5f, 0xab, 0xd5, 0x1e, 0x10, 0x48, 0x00, 0x90, 0x82, 0x48, 0xa8,
- 0xb2, 0xac, 0xfd, 0x55, 0xd5, 0xfe, 0x9f, 0x80, 0x00, 0x0a, 0x02, 0x08,
- 0x02, 0x55, 0x5a, 0x75, 0xff, 0xaf, 0xb6, 0xf7, 0x2d, 0x12, 0x92, 0x00,
- 0x10, 0x20, 0x10, 0xa8, 0x54, 0xd5, 0xbf, 0x5d, 0xad, 0xdd, 0x0f, 0x00,
- 0x00, 0x04, 0x40, 0x09, 0x84, 0xa8, 0xaa, 0x5a, 0xed, 0xeb, 0x6a, 0xff,
- 0x9f, 0xa4, 0x24, 0x01, 0x02, 0xa0, 0x20, 0x50, 0x55, 0xd5, 0xbe, 0xae,
- 0xad, 0xfd, 0x16, 0x00, 0x10, 0x04, 0x20, 0x0a, 0x08, 0xb4, 0xaa, 0x95,
- 0xaa, 0x7b, 0xb7, 0xdb, 0x5f, 0x92, 0x04, 0x01, 0x84, 0x20, 0x21, 0x51,
- 0xd5, 0x2a, 0xa9, 0xee, 0xd5, 0xfe, 0x0d, 0x00, 0x20, 0x04, 0x10, 0x00,
- 0x08, 0x50, 0xe9, 0xd7, 0xd4, 0xfb, 0xb5, 0xff, 0x9f, 0x24, 0x09, 0x01,
- 0x42, 0x4a, 0xa2, 0x64, 0xd5, 0x55, 0x7b, 0x7f, 0xda, 0x7d, 0x4f, 0x00,
- 0x20, 0x04, 0x00, 0x80, 0x00, 0xa0, 0x2a, 0x13, 0x84, 0x6a, 0x55, 0xff,
- 0x1d, 0x48, 0x8a, 0x00, 0x94, 0x24, 0x8a, 0xc8, 0xaa, 0x42, 0x20, 0x5d,
- 0xf5, 0xff, 0x5f, 0x01, 0x00, 0x02, 0x01, 0x00, 0x20, 0xa2, 0x4a, 0x1a,
- 0x82, 0x56, 0xda, 0xbd, 0x3f, 0x92, 0x92, 0x00, 0x90, 0x92, 0x00, 0x40,
- 0x95, 0x6a, 0xf4, 0x55, 0x6d, 0xff, 0xd6, 0x00, 0x00, 0x0a, 0x04, 0x20,
- 0x14, 0x49, 0x4b, 0xaa, 0xaa, 0x56, 0xf5, 0xff, 0xbf, 0xab, 0xa4, 0x00,
- 0x20, 0x89, 0x40, 0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0xde, 0xbf, 0xeb, 0x03,
- 0x00, 0x02, 0x04, 0x02, 0x0a, 0x10, 0x2b, 0x2a, 0x55, 0x5b, 0xf5, 0xff,
- 0xd7, 0x2f, 0x92, 0x00, 0x10, 0x28, 0x21, 0x01, 0x56, 0x95, 0xa0, 0x56,
- 0xdf, 0xef, 0xea, 0x87, 0x40, 0x0a, 0x42, 0x41, 0x00, 0x90, 0xaa, 0x52,
- 0xb6, 0xad, 0xfa, 0xff, 0xd5, 0x2f, 0x14, 0x00, 0x00, 0x04, 0x95, 0x04,
- 0xaa, 0xac, 0x55, 0x6b, 0xff, 0xb7, 0xea, 0x9f, 0x40, 0x02, 0x28, 0x51,
- 0x00, 0x40, 0x58, 0xd5, 0xda, 0xd6, 0x6e, 0x7f, 0xf9, 0x3f, 0x12, 0x04,
- 0x02, 0x04, 0x49, 0x25, 0x55, 0xaa, 0x77, 0xab, 0xff, 0x2b, 0xfd, 0x3f,
- 0x48, 0x01, 0x20, 0x41, 0x00, 0x00, 0x58, 0xa9, 0xda, 0xea, 0xfd, 0xaf,
- 0xfa, 0xff, 0x02, 0x04, 0x08, 0x14, 0x29, 0x49, 0x52, 0x55, 0x55, 0x55,
- 0xff, 0x8d, 0xfe, 0x3f, 0xa8, 0x00, 0x02, 0x41, 0x00, 0x02, 0xa0, 0xa2,
- 0xaa, 0xea, 0xff, 0x53, 0xfd, 0xff, 0x02, 0x04, 0x50, 0x04, 0x25, 0xa8,
- 0x54, 0x49, 0x52, 0xb5, 0xbf, 0x8a, 0xfe, 0xff, 0xa9, 0x08, 0x04, 0x50,
- 0x80, 0x02, 0xa1, 0x2a, 0x95, 0xea, 0xff, 0xa1, 0xff, 0xff, 0x03, 0x02,
- 0x90, 0x02, 0x09, 0x08, 0x44, 0x49, 0x52, 0xbd, 0x7f, 0xca, 0xff, 0xff,
- 0x2b, 0x09, 0x04, 0x48, 0x40, 0x82, 0x90, 0x56, 0xa9, 0xf6, 0xbf, 0xd0,
- 0xff, 0xff, 0x47, 0x00, 0x50, 0x02, 0x15, 0x11, 0x40, 0x95, 0xaa, 0xfd,
- 0x2f, 0xe9, 0xff, 0xff, 0x8f, 0x0a, 0x84, 0x50, 0x40, 0x84, 0x14, 0xaa,
- 0x6a, 0xff, 0x5f, 0xf2, 0xff, 0xff, 0x7f, 0x00, 0x10, 0x02, 0x09, 0x10,
- 0x40, 0x7d, 0xf7, 0xff, 0x0b, 0xfc, 0xff, 0xff, 0xaf, 0x02, 0x84, 0x50,
- 0x42, 0x85, 0x12, 0xd0, 0xdd, 0xff, 0xa7, 0xf2, 0xff, 0xff, 0xff, 0x04,
- 0x00, 0x0a, 0x08, 0x10, 0x48, 0xf8, 0xff, 0xff, 0x0a, 0xfe, 0xff, 0xff,
- 0x7f, 0x03, 0xa4, 0x80, 0xa2, 0x8a, 0x02, 0x68, 0xff, 0xff, 0x52, 0xfd,
- 0xff, 0xff, 0xff, 0x07, 0x00, 0x2a, 0x08, 0x20, 0x28, 0xdc, 0xff, 0x5f,
- 0x05, 0xff, 0xff, 0xff, 0xff, 0x0d, 0x92, 0x40, 0x22, 0x09, 0x02, 0xea,
- 0xfb, 0xaf, 0x48, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x12, 0x81, 0xa0,
- 0x48, 0x9c, 0x6e, 0x93, 0xa2, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa8, 0x40,
- 0x28, 0x0a, 0x02, 0x74, 0xb5, 0x45, 0x81, 0xff, 0xff, 0xff, 0xff, 0x0f,
- 0x02, 0x0a, 0x81, 0x20, 0x08, 0xae, 0xaa, 0x90, 0xe8, 0xff, 0xff, 0xff,
- 0xff, 0x0f, 0x90, 0x40, 0x28, 0x88, 0x12, 0x58, 0x15, 0x50, 0xd0, 0xff,
- 0xff, 0xff, 0xff, 0x0f, 0x44, 0x0a, 0x41, 0x21, 0x08, 0xae, 0x04, 0x14,
- 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40, 0x14, 0x88, 0x04, 0xba,
- 0x02, 0x28, 0xe8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x42, 0x15, 0x41, 0x21,
- 0x05, 0xad, 0x00, 0x05, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40,
- 0x24, 0x8a, 0x0e, 0x36, 0x00, 0x0a, 0xf4, 0xff, 0xff, 0xff, 0xff, 0x0f,
- 0x42, 0x25, 0x90, 0xd0, 0x8b, 0xc2, 0x41, 0x05, 0xfc, 0xff, 0xff, 0xff,
- 0xff, 0x0f, 0x10, 0x08, 0x05, 0xe8, 0x8e, 0x58, 0x80, 0x02, 0xfa, 0xff,
- 0xff, 0xff, 0xff, 0x0f, 0x4a, 0x20, 0xa8, 0xba, 0x0b, 0x2b, 0x51, 0x01,
- 0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x8a, 0x02, 0xe8, 0xaf, 0x84,
- 0x90, 0x04, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x52, 0x21, 0x54, 0xbf,
- 0x1f, 0x15, 0xa5, 0x02, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x08,
- 0x01, 0xfa, 0xb6, 0xa4, 0x52, 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
- 0x4a, 0xa2, 0x54, 0xef, 0x5f, 0x4b, 0xa4, 0x80, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x0f, 0x80, 0x10, 0x82, 0xfe, 0xbf, 0x92, 0x52, 0x42, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x0f, 0x12, 0x42, 0xa8, 0xbf, 0x1f, 0x24, 0x80, 0xa0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28, 0x8a, 0xf7, 0x37, 0x80,
- 0x52, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x82, 0xe0, 0xff,
- 0x1f, 0x00, 0x20, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28,
- 0xca, 0xff, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
- 0x10, 0x42, 0xf0, 0xfd, 0x1b, 0x00, 0x50, 0xf0, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x0f, 0xa4, 0x10, 0xc5, 0xff, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x0f, 0x00, 0x22, 0xf8, 0xff, 0x0e, 0x00, 0x00, 0xf0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xaa, 0x88, 0xe2, 0xff, 0x0f, 0x10,
- 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x25, 0xfa, 0xff,
- 0x0f, 0x01, 0x11, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xfb,
- 0xfb, 0xff, 0x7f, 0x5d, 0xd5, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f};
diff --git a/ext/tk/sample/images/flagdown.xbm b/ext/tk/sample/images/flagdown.xbm
deleted file mode 100644
index 55abc51825..0000000000
--- a/ext/tk/sample/images/flagdown.xbm
+++ /dev/null
@@ -1,27 +0,0 @@
-#define flagdown_width 48
-#define flagdown_height 48
-static char flagdown_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe1, 0x00, 0x00,
- 0x00, 0x00, 0x70, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0x00,
- 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04,
- 0x00, 0x00, 0x03, 0x00, 0x06, 0x06, 0x00, 0x80, 0x01, 0x00, 0x06, 0x07,
- 0x00, 0xc0, 0x1f, 0x00, 0x87, 0x07, 0x00, 0xe0, 0x7f, 0x80, 0xc7, 0x07,
- 0x00, 0x70, 0xe0, 0xc0, 0xe5, 0x07, 0x00, 0x38, 0x80, 0xe1, 0x74, 0x07,
- 0x00, 0x18, 0x80, 0x71, 0x3c, 0x07, 0x00, 0x0c, 0x00, 0x3b, 0x1e, 0x03,
- 0x00, 0x0c, 0x00, 0x1f, 0x0f, 0x00, 0x00, 0x86, 0x1f, 0x8e, 0x07, 0x00,
- 0x00, 0x06, 0x06, 0xc6, 0x05, 0x00, 0x00, 0x06, 0x00, 0xc6, 0x05, 0x00,
- 0x00, 0x06, 0x00, 0xc6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00,
- 0x7f, 0x06, 0x00, 0x06, 0xe4, 0xff, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00,
- 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x06, 0x00,
- 0x00, 0x06, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00,
- 0x00, 0x06, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x06, 0x00, 0x66, 0x00, 0x00,
- 0x00, 0x06, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x3e, 0x00, 0x00,
- 0x00, 0xfe, 0xff, 0x2f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x27, 0x00, 0x00,
- 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00,
- 0xf7, 0xbf, 0x8e, 0xfc, 0xdf, 0xf8, 0x9d, 0xeb, 0x9b, 0x76, 0xd2, 0x7a,
- 0x46, 0x30, 0xe2, 0x0f, 0xe1, 0x47, 0x55, 0x84, 0x48, 0x11, 0x84, 0x19};
diff --git a/ext/tk/sample/images/flagup.xbm b/ext/tk/sample/images/flagup.xbm
deleted file mode 100644
index 6eb0d846a3..0000000000
--- a/ext/tk/sample/images/flagup.xbm
+++ /dev/null
@@ -1,27 +0,0 @@
-#define flagup_width 48
-#define flagup_height 48
-static char flagup_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00,
- 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xef, 0x6a, 0x00,
- 0x00, 0x00, 0xc0, 0x7b, 0x75, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x6a, 0x00,
- 0x00, 0x00, 0x30, 0x60, 0x75, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x7f, 0x00,
- 0x00, 0x00, 0x0c, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x06, 0xe0, 0x04, 0x00,
- 0x00, 0x00, 0x03, 0xe0, 0x04, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x06, 0x00,
- 0x00, 0xc0, 0x1f, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x7f, 0xe0, 0x07, 0x00,
- 0x00, 0x70, 0xe0, 0xe0, 0x05, 0x00, 0x00, 0x38, 0x80, 0xe1, 0x04, 0x00,
- 0x00, 0x18, 0x80, 0xf1, 0x04, 0x00, 0x00, 0x0c, 0x00, 0xfb, 0x04, 0x00,
- 0x00, 0x0c, 0x00, 0xff, 0x04, 0x00, 0x00, 0x86, 0x1f, 0xee, 0x04, 0x00,
- 0x00, 0x06, 0x06, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00,
- 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x66, 0x04, 0x00,
- 0x7f, 0x56, 0x52, 0x06, 0xe4, 0xff, 0x00, 0x76, 0x55, 0x06, 0x04, 0x00,
- 0x00, 0x56, 0x57, 0x06, 0x04, 0x00, 0x00, 0x56, 0x55, 0x06, 0x06, 0x00,
- 0x00, 0x56, 0xd5, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00,
- 0x54, 0x06, 0x00, 0xc6, 0x54, 0x55, 0xaa, 0x06, 0x00, 0x66, 0xaa, 0x2a,
- 0x54, 0x06, 0x00, 0x36, 0x55, 0x55, 0xaa, 0x06, 0x00, 0xbe, 0xaa, 0x2a,
- 0x54, 0xfe, 0xff, 0x6f, 0x55, 0x55, 0xaa, 0xfc, 0xff, 0xa7, 0xaa, 0x2a,
- 0x54, 0x01, 0x88, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
- 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
- 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
- 0x54, 0x55, 0x8d, 0x50, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa8, 0xaa, 0x2a,
- 0x54, 0x55, 0x95, 0x54, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a,
- 0x54, 0x55, 0x55, 0x55, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/ext/tk/sample/images/gray25.xbm b/ext/tk/sample/images/gray25.xbm
deleted file mode 100644
index b234b3cb0b..0000000000
--- a/ext/tk/sample/images/gray25.xbm
+++ /dev/null
@@ -1,6 +0,0 @@
-#define grey_width 16
-#define grey_height 16
-static char grey_bits[] = {
- 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44,
- 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44,
- 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44};
diff --git a/ext/tk/sample/images/grey.25 b/ext/tk/sample/images/grey.25
deleted file mode 100644
index b234b3cb0b..0000000000
--- a/ext/tk/sample/images/grey.25
+++ /dev/null
@@ -1,6 +0,0 @@
-#define grey_width 16
-#define grey_height 16
-static char grey_bits[] = {
- 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44,
- 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44,
- 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44};
diff --git a/ext/tk/sample/images/grey.5 b/ext/tk/sample/images/grey.5
deleted file mode 100644
index 37688893f0..0000000000
--- a/ext/tk/sample/images/grey.5
+++ /dev/null
@@ -1,6 +0,0 @@
-#define grey_width 16
-#define grey_height 16
-static char grey_bits[] = {
- 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
- 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
- 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa};
diff --git a/ext/tk/sample/images/letters.xbm b/ext/tk/sample/images/letters.xbm
deleted file mode 100644
index 0f12568d1a..0000000000
--- a/ext/tk/sample/images/letters.xbm
+++ /dev/null
@@ -1,27 +0,0 @@
-#define letters_width 48
-#define letters_height 48
-static char letters_bits[] = {
- 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, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0xfa, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a,
- 0x00, 0x3a, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2e,
- 0xe0, 0xff, 0xff, 0xff, 0xff, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21,
- 0xa0, 0x03, 0x00, 0x00, 0x70, 0x21, 0x20, 0x00, 0x00, 0x00, 0x50, 0x21,
- 0xa0, 0x1f, 0x00, 0x00, 0x50, 0x21, 0x20, 0x00, 0x00, 0x00, 0x70, 0x21,
- 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x21,
- 0xfa, 0x01, 0x00, 0x80, 0x0b, 0x21, 0x02, 0x00, 0x00, 0x80, 0x0a, 0x21,
- 0xba, 0x01, 0x00, 0x80, 0x0a, 0x21, 0x02, 0x00, 0x00, 0x80, 0x0b, 0x21,
- 0x3a, 0x00, 0x00, 0x00, 0x08, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x21,
- 0x02, 0xc0, 0xfb, 0x03, 0x08, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3f,
- 0x02, 0xc0, 0xbd, 0x0f, 0x08, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01,
- 0x02, 0xc0, 0x7f, 0x7b, 0x08, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01,
- 0x02, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00,
- 0xfe, 0xff, 0xff, 0xff, 0x0f, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/ext/tk/sample/images/noletter.xbm b/ext/tk/sample/images/noletter.xbm
deleted file mode 100644
index 5774124efe..0000000000
--- a/ext/tk/sample/images/noletter.xbm
+++ /dev/null
@@ -1,27 +0,0 @@
-#define noletters_width 48
-#define noletters_height 48
-static char noletters_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00,
- 0x00, 0xf0, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00,
- 0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xf0, 0x01,
- 0x80, 0x07, 0x00, 0x00, 0xc0, 0x03, 0xc0, 0x03, 0x00, 0x00, 0xe0, 0x07,
- 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x78, 0x0e,
- 0xf0, 0x00, 0x00, 0x00, 0x3c, 0x1e, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x1c,
- 0x38, 0x00, 0x00, 0x00, 0x0f, 0x38, 0x38, 0x00, 0x00, 0x80, 0x07, 0x38,
- 0x3c, 0xfc, 0xff, 0xff, 0x7f, 0x78, 0x1c, 0x04, 0x00, 0xe0, 0x41, 0x70,
- 0x1c, 0x04, 0x00, 0xf0, 0x40, 0x70, 0x1c, 0x74, 0x00, 0x78, 0x4e, 0x70,
- 0x0e, 0x04, 0x00, 0x3c, 0x4a, 0xe0, 0x0e, 0x74, 0x03, 0x1e, 0x4a, 0xe0,
- 0x0e, 0x04, 0x00, 0x0f, 0x4e, 0xe0, 0x0e, 0x04, 0x80, 0x07, 0x40, 0xe0,
- 0x0e, 0x04, 0xf8, 0x0f, 0x40, 0xe0, 0x0e, 0x04, 0xe0, 0x01, 0x40, 0xe0,
- 0x0e, 0x04, 0xf8, 0x00, 0x40, 0xe0, 0x0e, 0x04, 0x78, 0x00, 0x40, 0xe0,
- 0x0e, 0x04, 0xfc, 0xf3, 0x40, 0xe0, 0x1c, 0x04, 0x1e, 0x00, 0x40, 0x70,
- 0x1c, 0x04, 0x0f, 0x00, 0x40, 0x70, 0x1c, 0x84, 0x07, 0x00, 0x40, 0x70,
- 0x3c, 0xfc, 0xff, 0xff, 0x7f, 0x78, 0x38, 0xe0, 0x01, 0x00, 0x00, 0x38,
- 0x38, 0xf0, 0x00, 0x00, 0x00, 0x38, 0x70, 0x78, 0x00, 0x00, 0x00, 0x1c,
- 0xf0, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0xe0, 0x1e, 0x00, 0x00, 0x00, 0x0e,
- 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07,
- 0x80, 0x07, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x1f, 0x00, 0x00, 0xf0, 0x01,
- 0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00,
- 0x00, 0xf0, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00};
diff --git a/ext/tk/sample/images/pattern.xbm b/ext/tk/sample/images/pattern.xbm
deleted file mode 100644
index df31baf789..0000000000
--- a/ext/tk/sample/images/pattern.xbm
+++ /dev/null
@@ -1,6 +0,0 @@
-#define foo_width 16
-#define foo_height 16
-static char foo_bits[] = {
- 0x60, 0x06, 0x90, 0x09, 0x90, 0x09, 0xb0, 0x0d, 0x4e, 0x72, 0x49, 0x92,
- 0x71, 0x8e, 0x8e, 0x71, 0x8e, 0x71, 0x71, 0x8e, 0x49, 0x92, 0x4e, 0x72,
- 0xb0, 0x0d, 0x90, 0x09, 0x90, 0x09, 0x60, 0x06};
diff --git a/ext/tk/sample/images/tcllogo.gif b/ext/tk/sample/images/tcllogo.gif
deleted file mode 100644
index 4603d4ff41..0000000000
--- a/ext/tk/sample/images/tcllogo.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/images/teapot.ppm b/ext/tk/sample/images/teapot.ppm
deleted file mode 100644
index b8ab85f3a5..0000000000
--- a/ext/tk/sample/images/teapot.ppm
+++ /dev/null
@@ -1,31 +0,0 @@
-P6
-256 256
-255
-\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À[7 eOLjQLmSMoTMnSMlRMhPL_9 \À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀnSMtVMzYN~[N~[N\N\O€\O€]O€]O€]O€]O€\O€\O}[NyYNtVM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀG-wXN}[N€]O„^O†_O†`O‡`Oˆ`Oˆ`OˆaO‰aO‰aO‰aO‰aO‰aO‰aOˆaOˆ`O†_Oƒ^O\N \À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀaMLyYN…_O‰aP‹bPcPŽcPŽdPŽdPdPdPdPdPdPdPdPeP‘eP’eP’eP‘ePdPcP…_OpUM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀwXN…_OdP“fP•gQ–hQ˜hQ˜iQ™iQ™iQšiQšiQšjQ›jQ›jQœjQœjQœjQœjQœjQ›jQœjQ™iQ“fP‡`O\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJiQL‹bP—hQkQ¡mR¤nR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¦pR¨pS©qSªqS«rS¬rS«rS©qS¤oRœjQ€]O\KK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀfOLrUMcPŸlR©qS¯tS²uTµwT·xT¸xT¹yTºyT»zT»zU¼zU¼zU¼zU»zUºyT¸xT¶wT¯tS¡mR‰aOhPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\Àa0 cNLqUM€\O”fQ¦pS²wVºzV¿|VÂ}VÄVÆVÇ€VÉ‚WÌ…[Õeæ w÷³‹êª…Ĉg§qT“fQ{ZNYIK9\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀO1{G#‘JkRMqUMtVN–iS¨v\·€d¹bµzZ±vU°uT®sSªqS¤nRœjQ’eP„^OrUMHh>!T4\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀG-V5wE"~I#†M%U+¥e7²l:°g2®b*­a(­`(©^(¥])¡^-›]1ŠS,qC$`9 R3G-\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@)J/i>!pA"tD"wF$yH&xH&tE$wE#yG%}M+ƒT4S5mE*Z7!K/B*;'\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‰aO¦oR½{UÇ€VÏ…X<(F-a: e<!h>!j@#k@$h>"d<!c=$hD-fF2[<)K0@);'5$Ë‚VÇ€V¿|U_LKYIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À…_O·xTÉ‚Wó«€ûµ‹Ö’k¼|X×>µf-¨^(¡Z'šW&–T&œN>)F-J/b; g>#nD(jB&c<!b=%jH2_A/I0!<(8&5$”J¥Y’S%8&;'?)E,<:HA=HE?IJAISFJYIKXIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À£nRÁ}UܘqÊŠe±vU²e,™V&¥V†C €@ |> y< u: r9 o7 l6
-j5
-h4
-g3
-5$D,K/b; h>"wM1tK.e="a<#cA,U8&E-<(9&.!a0 b1 c1    
-
-+3#@)46G<:HMCIXHK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀU*´vT¿~X¸{YÃk+›W&‰N$|> u: p8 k5
-f3
-a0 _/ ]. [- I¡\*ª_(‘LkRMmSMmSMnSMnSMD,R3W5mA"|O0|P1j?"c<!a=%Y7"N1F,;'NCJNCJNDJODJODJODJh>!a: X/K%
-g3
-a0 Z- \/ T*Q(ŠHµm8kRMmSMnTMoTMpTMpUM15G15G05G04G04GpUMpTM5^9 d<!yF#O+€N,rC#qB"pB#k?"a: Z7 6ODJPDJPEJQEJQEJREJREJREJRFJSFJSFJSFJSFJe<!X/
-^/ V+Q(L&I$r9  TlRMnSM46G47G47G46G46G46G46G46G36G36G25G25G15G04G/4F.3F
-
-X&pUMuWMwXNxXN<:H<:H<:H<:H<;H<;H<;H<;H=;H=;H=;H=;H>;H>;H?<H@<HA=HC>HG@ILBIREJ[JKcNLjQL§pR±uTºzUÃ~VÈWË‚XÖŽcäsÒŽe¼{V²vT¨pSžkR•gQŒbP†_O‚^O]O€\O€\O€\O€\O€]O]O]O]O]O]O]O]O]O]O]O€\O€\O~\N}[N|ZNxXN•T%H$
-›W&rVMvWNyYNzYN|ZN}[N}[N><H?<H?<H?<H?<H?<H@<H@<H@<HA=HA=HB=HC>HE?IG@IIAIKBIODJSFJWHK—hQŸlR§pR°b(¾i*Én+Ù|7Û|6Ïr,Íq+Êp-Ãl+»g)±b(®sS§pS lRšiQ•gQePcPŠaPˆaO‡`O‡`O†_O†_O…_O…_O…_O…_O…_O…_O…_O„_O„^O„^Oƒ^Oƒ^O‚]O]O€\O~[N{ZN•T%
-
- 
-@%<-$G?@…pfdNLuWM\NdNL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀTFJvWN‰aP./01„E}[N]O…_Oˆ`O‰aP‹bPŒbPcPcPŽcPdPdPdPeP‘eP’eP’eP“fP“fQ”fQ•gQ•gQ–gQ–hQ—hQ˜hQ™iQšiQ›jQœjQkQkRžlRŸlRžY&¤\'¨^'µ^½bÀcÃeÇi ÄgÀc½b¼a¹`µ^´]¯X¢[' Z'žY&¢mR¡mR¡mR lRŸlRŸlRžkRkQœkQœjQ›jQšjQšiQ™iQ™iQ˜iQ˜hQ—hQ—hQ—hQ–gQ–gQ•gQ•gQ•gQ”fQ”fQ“fQ“fP’eP‘ePdPcP‰aP—O
- B\À\À\À\À\À\À\À\À\À\À%7!!C*F#P) {dYœze»p€\OgPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ`LKvWNŠaPm6
- 
-$5 ¬`(¶e)£nRœjQƒ^OJAI\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀXIK^KKdNLhPLuWM‚]OŒbP”fQeP m6
-†`OŽcP“fQ—hQ˜hQ™iQšiQšjQ›jQ›jQ›jQœjQœjQœjQœkQkQkQkRžkRžkRžkRžlRŸlRŸlRŸlR lR lR lR¡mR¡mR¡mR¡mRºg)³c(²c(±b(­V¿cÂeÅi!Åi!Àd¼bº`¹`·_·_¶^¢Q§]'ª_(­`(¹f)£nR£nR£nR£nR£nR£nR£nR¢nR¢nR¢nR¢nR¢nR¢nR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢nR¢mR¢mR£nR¢mR¢mR¡mR mRkR—hQˆGa0 ŠbP mRœjQ“fQ‰aP}[NrUMmSM…L$\À\À\À\À\À\À\À\À B B #C, 8&H.Z7 §pR›jQ{ZN\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀQEJ[JK`LKdNLhQLqUM{ZN…_OŽcP–gQ—hQ
-‹bP‘eP–hQšiQ›jQœjQkQkQkRžkRžkRžlRžlRŸlRŸlRŸlRŸlRŸlR lR lR lR mR¡mR¡mR¡mR¡mR¡mR¢mR¢mR¢mR¢nR£nRÀj*ºg)·e)¶d)Âd°XÅgÅhÂe¿c½b½b¾bªU­`(®a(¯a(³c(¾i*¤oR¤oR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤oR¤oR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¥oR¥oR¤nR¡mR›jQŽQ%Z- œjQ£nRŸlR—hQŽdP…_OuWMpTMnSMkRLa: \À\À\À\À\À\À\À B B&D2 @*S6#G@IPDJ˜hQmSM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ]KKbMLeOLiQLlRMvWN\OˆaO‘eP—hQœjQ•gQ
-!C+E'0F.4F7%8%U/lG.SFJZIK]KKZIKB=H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀREJZJK`LKdNLgPLjQLlRMnSMpTMqUMtWMxXN{ZN~[N]O„^O†`O‰aO‹bPdP•gQ™iQœkQ lR¤nR§pSªrS­sS¯tT²uT´vT¶wT·xT¹yT¹yTºyTºyT¹yT¶xT´vT¬rS¢nR—hQ¿|U¿|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ}UÀ}UÁ}UÁ}UÁ}UÁ}UÂ}UÂ~UÃ~UÃ~VÃ~VÄVÅ€WÆX®a(ŸlRªrS´vT¸yT¼zU¾|UÁ~VÃXÆ‚[Ɇ_΋dÓ‘jÔ“mÔ“nБlÊŒhĆd½_¶{[°vWªsU¦pS¢nRžkRšiQ˜hQ•gQ“fQ‘ePdPŒbP‰aO†_Oƒ^O€\O|ZNxXNsVMpTMnTMmSMjQL€C B)D&/F-3F47G6%>" Y7 kA$YIK]KK^KKSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ\KKbMLeOLhPLkRLmSMnTMpTMrUMuWNyYN|ZN\N‚]O„_O‡`OŠaPŒbPŽcPeP“fP—hQ›jQžlR¢nR¥oS©qT¬sT¯uU²vU´wV¶xV¸yV¹yUºzU»zU¼{U½{U¾{U¾|U¿|U¿|U¿|U¿|U¾{U½{U¼{U¼zU»zTºyT¹yT¸xTµwT³vT´vT´vT´vT´wT´wTµwT·xT¹yTºzT¼zU½{U¾{U¿|UÀ|UÂ}UÄVÅ€WÇ‚YÉ„\͈_ÑŒdÙ”láuç£|쩂ſt명æ¦ÞŸ{Õ—sËŽl†d¹^³yZ­uW¨qU¤oSŸlRžkRœjQšiQ˜hQ–gQ”fQ‘ePdPcPŠaP‡`O„^O]O}[NyYNuWMpTMoTMmSMkRLgPL&D#.E,3F46G;'<(D"iB(VGJ]KK`LK[JKB>H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK^LKcNLfOLiQLkRMmSMoTMqUMsVMvXNzYN}[N€\O‚^O…_Oˆ`OŠaPŒcPdP‘eP“fQ•gQ—hQ™iQkR mS¤oT¨rU¬tW°wY´zZ¸}\»]¾€^À^Á‚^‚^Â\Á€ZÁYÁXÁ~WÁ~WÂ~VÂ~VÂ~VÃ~VÃ~UÃ~UÄ~UÄ~UÄUÄUÅVÅVÅVÅVÆVÆ€VÆ€VÇ€WÇWÈ‚XɃZË…[͇^ЊaÓdØ’iÜ—nâtè£zî©ó¯‡ø´û¸‘üº“û¹“÷¶ñ±Œé©…à¡~Ö˜vËmÇf»€`´z[®vX©rU¥pT£oS¢nS lRžkRœkRšjQ˜iQ–hQ”fQ’ePdPcP‹bPˆ`O…_O‚]O~[NzYNvWNpTMoTMnSMkRMhQLo7 ,2F36G99HC+@ ]8 nA"\JK`ML_LKSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JK`LKdNLgPLjQLlRMnSMpTMqUMtVMwXNzZN}[N€]Oƒ^O†_OˆaO‹bPcPdP‘eP“fQ•gQ—hQ™iQ›jRžlR mS£oU§rW¬vZ²{]¹€a¿…fÅŠjËnГqÓ•sÕ–sÕ–rÕ–qÕ”oÓ’mÑjÏgÍŠcˈaɆ^È„\Ç‚[ÆYÅ€XÅ€WÅWÅWÅVÅVÅWÅ€WÆ€WÇXÈ‚YɃ[Ê…\͇_ÏŠaÒeÕ‘hÙ•mÝ™qávä¡zç¤}꧀멃몄騃奀ߠ|Ù›wÓ•rÌmƉh¿„c¸~^²yZ®vX¬tWªsV¨qU¦pT¤oS¢nS mRžlRœkR›jQ™iQ—hQ•gQ“fPePŽcP‹bPˆaO…_O‚^O\N{ZNwXNsVMoTMnSMlRMiQL~I#26G99G?<HA*E$ i@$ZIKaMLbML[JK;:H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀWHJ]KKbMLeOLhPLjRLlSMnTMpTMrUMuWMxXN{ZN~\N]O„^O†`O‰aO‹bPŽcPdP’eP”fQ–gQ˜hQšiQœkRžlS mT£oU¦rWªuZ¯y]´~aºƒfŠlË’sÔšzÜ¡€ã§†è«‰ë®‹í¯Œí®‹ë¬ˆè¨„ã£~ßžyÚ™tÖ•oÒjÎŒfˈbÈ…_ƃ\ÅZÄ€YÃXÂWÂ~WÂ~WÂ~WÃXÀXÄ€YÅZƃ\Ç…^Ɇ`ˈbÌŠdÍ‹fÎgÎŽiÎŽjÎŽjÍŽjËŒiljgÆd¿ƒaº^¸}]¶|\´{[²yZ°xY®vX¬tWªsV¨qU¦pT¤oS¢nS mRžlRkR›jQ™iQ—hQ•gQ“fP‘ePŽdPŒbP‰aO†_Oƒ^O€\O|ZNxXNtVMpTMnSMmSMjQLgPL99G?<HG-E&b;!YIK`MLdOM`LKNCJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀŸlRºyTÄ~UÊ‚XʃYÄXº{W­tUšW'¢[(—hQ lRcP€\OhQL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK^LKcNLfOLiQLkRLmSMoTMqUMrVMvWNyYN|ZN\N‚]O„_O‡`O‰aPŒbPŽcPdP’fP”gQ–hQ˜iQšjRœkRžlS¡nT¤pU§sW«vZ°z]µb»„gŠlÉ‘sИyØžÞ¤…ã©Šè­ì±ï³‘ﳑ뭊穅⣀ݞzؘtÒ“nÎiɉdÆ…`Â]Á€[¿~Y¾}X½|W½|V¼{V¼{V¼{V¼{V¼{V¼|W¼|W½}X½}Y½~Z½~Z¼~Z»}[º}[º}[º~\º~\º~]º~]¹~]¸~]·}]¶|\´z[²yZ°wY®vX¬tWªsV¨rU¦pT¤oS¢nS mRŸlRkR›jQšiQ˜hQ–gQ“fQ‘ePdPŒcPŠaP‡`O„^O]O}[NyYNuWNpTMnTMmSMkRLhPL|H$D>IQ2P+XHK_LLfQOcNLXIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À©qSºyTÃ~VΈ`遲ޜv¾€]ªqS–LŽG|> g3
-S)?*%.—hQ—hQ‘eP‡`OuWM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JK`LKdNLgPLjQLlRMnSMoTMqUMsVMwXNzYN}[N€\O‚^O…_O‡`OŠaPŒbPŽdP‘eP“fP•gQ—hQ˜iQšjRœkRŸlS¡nT¤pV§sX«vZ°z^¶b¼…gËmÊ’sјzØŸ€Þ¤…ã©Šè­ê¯ë°ê¯Žè¬‹å¨‡à¤‚Ûž|Ö™wÑ“qÌŽlljgÃ…bÀ‚_½\»}Zº{X¹zW¸yV·yU·xU·xU·xT·xT·xU·xU·xU·yV·yV·yW¸zW¸{X¹{Y¹|Zº}[º}[º}\º~\¹~]¹~]¸}]·|\µ{\´z[²yZ°wY®vX¬tWªsV¨rU¦pT¤oS¢nS¡mRŸlRkRœjQšiQ˜hQ–gQ”fQ’ePdPcPŠbP‡`O…_O‚]O~[NzZNvWNrUMoTMmSMlRMiQLeOLJAIJ(h>!]KKfQOgQN_LKD>I\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À™iQ°tS¸yT¼{UÂYÎŒeï­ˆô´Õ—u¶|\ Z'™LˆD |>
-
- &3#.$-% .% .& /&!,#,#@70A71XNHXNHWNHWNHZRLYQLYQLXQLWQLWPLUOLSNLQMKOLJMJJ0//.-.,,-&(+"(!'
- %' %$#" ! !$ 
diff --git a/ext/tk/sample/irbtk.rb b/ext/tk/sample/irbtk.rb
deleted file mode 100644
index 8665b20539..0000000000
--- a/ext/tk/sample/irbtk.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/local/bin/ruby
-# frozen_string_literal: false
-#
-# irbtk.rb - irb with Ruby/Tk
-#
-# If you want to use 'multi-tk.rb', give option '--multi-tk'.
-# And if you want to use 'remote-tk.rb', give option '--remote-tk'.
-# If you want both, you don't need to give both options, because
-# 'remote-tk.rb' includes 'multi-tk.rb'.
-# ( There is no trouble even if you give both options. )
-#
-require 'remote-tk' if ARGV.delete('--remote-tk')
-require 'multi-tk' if ARGV.delete('--multi-tk')
-
-require "tk"
-module Tk
- MAINLOOP = Thread.new{ mainloop }
-end
-
-require "irb"
-
-if __FILE__ == $0
- IRB.start(__FILE__)
-else
- # check -e option
- if /^-e$/ =~ $0
- IRB.start(__FILE__)
- else
- IRB.setup(__FILE__)
- end
-end
diff --git a/ext/tk/sample/irbtkw.rbw b/ext/tk/sample/irbtkw.rbw
deleted file mode 100644
index b75ebca48d..0000000000
--- a/ext/tk/sample/irbtkw.rbw
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/usr/bin/env ruby
-#
-# irbtkw.rb : IRB console with Ruby/Tk
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-release = '2008/03/08'
-
-require 'tk'
-begin
- require 'tktextio'
-rescue LoadError
- require File.join(File.dirname(File.expand_path(__FILE__)), 'tktextio.rb')
-end
-
-require 'irb'
-
-if TkCore::WITH_ENCODING
-else
- # $KCODE setup
- case Tk.encoding
- when 'shiftjis', 'cp932'
- $KCODE='SJIS'
- when 'euc-jp'
- $KCODE='EUC'
- when 'utf-8', 'unicode'
- $KCODE='UTF8'
- else
- # unknown
- end
-end
-
-# console setup
-top = TkToplevel.new(:title=>'IRB console')
-top.protocol(:WM_DELETE_WINDOW){ Tk.exit }
-
-case (Tk.windowingsystem)
-when 'win32'
- fnt = ['MS Gothic', '-12']
-else
- fnt = ['courier', '-12']
-end
-
-console = TkTextIO.new(top, :mode=>:console,
- :width=>80).pack(:side=>:left,
- :expand=>true, :fill=>:both)
-console.yscrollbar(TkScrollbar.new(top, :width=>10).pack(:before=>console,
- :side=>:right,
- :expand=>false,
- :fill=>:y))
-
-# save original I/O
-out = $stdout
-err = $stderr
-
-irb_thread = nil
-ev_loop = Thread.new{
- begin
- Tk.mainloop
- ensure
- $stdout = out
- $stderr = err
- irb_thread.kill if irb_thread
- end
-}
-
-# window position control
-root = Tk.root
-
-r_x = root.winfo_rootx
-r_y = root.winfo_rooty
-r_w = root.winfo_width
-
-t_x = top.winfo_rootx
-t_y = top.winfo_rooty
-t_w = top.winfo_width
-
-delta = 10
-
-ratio = 0.8
-s_w = (ratio * root.winfo_screenwidth).to_i
-
-if r_x < t_x
- r_x, t_x = t_x, r_x
-end
-if t_x + t_w + r_w + delta < s_w
- r_x = t_x + t_w + delta
-elsif t_w + r_w + delta < s_w
- r_x = s_w - r_w
- t_x = r_x - t_w
-else
- r_x = s_w - r_w
- t_x = 0
-end
-
-root.geometry("+#{r_x}+#{r_y}")
-top.geometry("+#{t_x}+#{t_y}")
-
-root.raise
-console.focus
-
-# I/O setup
-$stdin = console
-$stdout = console
-$stderr = console
-
-# dummy for rubyw.exe on Windows
-def STDIN.tty?
- true
-end
-
-# IRB setup
-IRB.init_config(nil)
-IRB.conf[:USE_READLINE] = false
-IRB.init_error
-irb = IRB::Irb.new
-IRB.conf[:MAIN_CONTEXT] = irb.context
-
-class IRB::StdioInputMethod
- def gets
- prompt = "\n" << @prompt
- $stdin.instance_eval{
- flush
- @prompt = prompt
- _set_console_line
- @prompt = nil
- _see_pos
- }
-
- @line[@line_no += 1] = $stdin.gets
- end
-end
-
-# IRB start
-$stdout.print("*** IRB console on Ruby/Tk (#{release}) ")
-irb_thread = Thread.new{
- catch(:IRB_EXIT){
- loop {
- begin
- irb.eval_input
- rescue Exception
- end
- }
- }
-}
-
-console.bind('Control-c'){
- console.insert('end', "^C\n")
- irb_thread.raise RubyLex::TerminateLineInput
-}
-
-irb_thread.join
-
-# exit
-ev_loop.kill
-Tk.exit
diff --git a/ext/tk/sample/iso2022-kr.txt b/ext/tk/sample/iso2022-kr.txt
deleted file mode 100644
index 2e3fe6ea2a..0000000000
--- a/ext/tk/sample/iso2022-kr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Sample text:
-$)C Hangul (GQ1[) >H3gGO<<?d, >H3gGO=J4O1n
diff --git a/ext/tk/sample/menubar1.rb b/ext/tk/sample/menubar1.rb
deleted file mode 100644
index a468fb6ea4..0000000000
--- a/ext/tk/sample/menubar1.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-# frozen_string_literal: false
-#
-# menubar sample 1 : use frame and menubuttons
-#
-
-require 'tk'
-
-radio_var = TkVariable.new('y')
-
-menu_spec = [
- [['File', 0],
- {:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0},
- '---',
- ['Check_A', TkVariable.new(true), 6],
- {:type=>'checkbutton', :label=>'Check_B',
- :variable=>TkVariable.new, :underline=>6},
- '---',
- ['Radio_X', [radio_var, 'x'], 6, '', {:foreground=>'black'}],
- ['Radio_Y', [radio_var, 'y'], 6],
- ['Radio_Z', [radio_var, 'z'], 6],
- '---',
- ['cascade', [
- ['sss', proc{p 'sss'}, 0],
- ['ttt', proc{p 'ttt'}, 0],
- ['uuu', proc{p 'uuu'}, 0],
- ['vvv', proc{p 'vvv'}, 0],
- ],
- 0, '',
- {:font=>'Courier 16 italic',
- :menu_config=>{:font=>'Times -18 bold', :foreground=>'black'}}],
- '---',
- ['Quit', proc{exit}, 0]],
-
- [['Edit', 0],
- ['Cut', proc{puts('Cut clicked')}, 2],
- ['Copy', proc{puts('Copy clicked')}, 0],
- ['Paste', proc{puts('Paste clicked')}, 0]],
-
- [['Help', 0, {:menu_name=>'help'}],
- ['About This', proc{puts('Ruby/Tk menubar sample 1')}, 6]]
-]
-
-menubar = TkMenubar.new(nil, menu_spec,
- 'tearoff'=>false,
- 'foreground'=>'grey40',
- 'activeforeground'=>'red',
- 'font'=>'Helvetica 12 bold')
-menubar.pack('side'=>'top', 'fill'=>'x')
-
-TkText.new(:wrap=>'word').pack.insert('1.0', 'Please read the sample source, and check how to override default configure options of menu entries on a menu_spec. Maybe, on windows, this menubar does not work properly about keyboard shortcuts. Then, please use "menu" option of root/toplevel widget (see sample/menubar2.rb).')
-
-Tk.mainloop
diff --git a/ext/tk/sample/menubar2.rb b/ext/tk/sample/menubar2.rb
deleted file mode 100644
index e10a282f93..0000000000
--- a/ext/tk/sample/menubar2.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: false
-#
-# menubar sample 2 : use 'menu' option of root/toplevel widget
-#
-
-require 'tk'
-
-radio_var = TkVariable.new('y')
-
-menu_spec = [
- [['File', 0],
- {:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0},
- '---',
- ['Check_A', TkVariable.new(true), 6],
- {:type=>'checkbutton', :label=>'Check_B',
- :variable=>TkVariable.new, :underline=>6},
- '---',
- ['Radio_X', [radio_var, 'x'], 6, '', {:foreground=>'black'}],
- ['Radio_Y', [radio_var, 'y'], 6],
- ['Radio_Z', [radio_var, 'z'], 6],
- '---',
- ['cascade', [
- ['sss', proc{p 'sss'}, 0],
- ['ttt', proc{p 'ttt'}, 0],
- ['uuu', proc{p 'uuu'}, 0],
- ['vvv', proc{p 'vvv'}, 0],
- ],
- 0, '',
- {:font=>'Courier 16 italic',
- :menu_config=>{:font=>'Times -18 bold', :foreground=>'black'}}],
- '---',
- ['Quit', proc{exit}, 0]],
-
- [['Edit', 0],
- ['Cut', proc{puts('Cut clicked')}, 2],
- ['Copy', proc{puts('Copy clicked')}, 0],
- ['Paste', proc{puts('Paste clicked')}, 0]],
-
- [['Help', 0, {:menu_name=>'help'}],
- ['About This', proc{puts('Ruby/Tk menubar sample 2')}, 6]]
-]
-
-mbar = Tk.root.add_menubar(menu_spec,
- # followings are default configure options
- 'tearoff'=>'false',
- 'foreground'=>'grey40',
- 'activeforeground'=>'red',
- 'font'=>'Helvetica 12 bold')
-# This (default configure options) is NOT same the following.
-#
-# mbar = Tk.root.add_menubar(menu_spec)
-# mbar.configure('foreground'=>'grey40', 'activeforeground'=>'red',
-# 'font'=>'Helvetica 12 bold')
-
-TkText.new(:wrap=>'word').pack.insert('1.0', 'Please read the sample source, and check how to override default configure options of menu entries on a menu_spec.')
-
-Tk.mainloop
diff --git a/ext/tk/sample/menubar3.rb b/ext/tk/sample/menubar3.rb
deleted file mode 100644
index 740f9d3b5e..0000000000
--- a/ext/tk/sample/menubar3.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# frozen_string_literal: false
-#
-# menubar sample 3 : vertical layout menubar; use frame and menubuttons
-#
-
-require 'tk'
-
-radio_var = TkVariable.new('y')
-
-menu_spec = [
- [['&File', true], # when underline option is true, '&' index is the position
- {:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0},
- '---',
- ['Check_A', TkVariable.new(true), 6],
- {:type=>'checkbutton', :label=>'Check_B',
- :variable=>TkVariable.new, :underline=>6},
- '---',
- ['Radio_X', [radio_var, 'x'], /[XYZ]/, '', {:foreground=>'black'}],
- ['Radio_Y', [radio_var, 'y'], /[XYZ]/],
- ['Radio_Z', [radio_var, 'z'], /[XYZ]/], # use Regexp for underline position
- '---',
- ['cascade', [
- ['sss', proc{p 'sss'}, 0],
- ['ttt', proc{p 'ttt'}, 0],
- ['uuu', proc{p 'uuu'}, 0],
- ['vvv', proc{p 'vvv'}, 0],
- ],
- 0, '',
- {:font=>'Courier 16 italic',
- :menu_config=>{:font=>'Times -18 bold', :foreground=>'black'}}],
- '---',
- ['Quit', proc{exit}, 0]],
-
- [['Edit', 0],
- ['Cut', proc{puts('Cut clicked')}, 2],
- ['Copy', proc{puts('Copy clicked')}, 0],
- ['Paste', proc{puts('Paste clicked')}, 0]],
-
- [['Help', 0, {:menu_name=>'help'}],
- ['About This', proc{puts('Ruby/Tk menubar sample 3')}, "This"]]
- # use string index for underline position
-]
-
-layout_proc = 'vertical'
-# The following procedure is same to 'layout_proc'=>'vertical'
-=begin
-layout_proc = proc{|parent, mbtn|
- mbtn.direction :right
- mbtn.pack(:side=>:top, :fill=>:x)
-
- menu = mbtn.menu
- cmd = proc{|m, dir|
- Tk::Menu::TkInternalFunction.next_menu(m, dir) rescue nil
- # ignore error when the internal function doesn't exist
- }
- menu.bind('Tab', cmd, :widget, 'forward')
- menu.bind('Alt-Tab', cmd, :widget, 'backward')
-}
-=end
-
-menubar = TkMenubar.new(nil, menu_spec,
- 'layout_proc'=>layout_proc,
- 'tearoff'=>false,
- 'foreground'=>'grey40',
- 'activeforeground'=>'red',
- 'font'=>'Helvetica 12 bold')
-menubar.pack('side'=>'left', 'fill'=>'y')
-
-TkText.new(:wrap=>'word').pack.insert('1.0', 'This sample script generates "Menu Sidebar".
-If "::tk::MenuNextMenuon" function is available your Tcl/Tk library, you will be able to move to the next menu by Tab key on the posted menu, or the previous menu by Alt + Tab key.
-Please read the sample source, and check how to override default configure options of menu entries on a menu_spec. Maybe, on windows, this menubar does not work properly about keyboard shortcuts. Then, please use "menu" option of root/toplevel widget (see sample/menubar3.rb).')
-
-Tk.mainloop
diff --git a/ext/tk/sample/msgs_rb/README b/ext/tk/sample/msgs_rb/README
deleted file mode 100644
index 781dda93ef..0000000000
--- a/ext/tk/sample/msgs_rb/README
+++ /dev/null
@@ -1,3 +0,0 @@
-Message catalogs in this directory depend on Tcl/Tk's message catalogs.
-Texts of each locale are copied from Tcl/Tk8.5a1 widget demos.
-Please refer to '../msgs_tk/README'.
diff --git a/ext/tk/sample/msgs_rb/cs.msg b/ext/tk/sample/msgs_rb/cs.msg
deleted file mode 100644
index 199f2a73bd..0000000000
--- a/ext/tk/sample/msgs_rb/cs.msg
+++ /dev/null
@@ -1,84 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- cs "Application Error", "Chyba programu"
- cs "Blue", "Modr\341"
- cs "Color", "Barva"
- cs "Delete", "Smazat"
- cs "Error", "Chyba"
- cs "Exit", "Konec"
- cs "Green", "Zelen\341"
- cs "Red", "\\u010cerven\341"
- cs "blue", "modr\341"
- cs "green", "zelen\341"
- cs "red", "\\u010derven\341"
-}
-
-TkMsgCatalog.new('::tk') {
- cs "&Abort", "&P\\u0159eru\\u0161it"
- cs "About...", "O programu..."
- cs "All Files", "V\\u0161echny soubory"
- cs "Application Error", "Chyba programu"
- cs "&Blue", "&Modr\341"
- cs "&Cancel", "&Zru\\u0161it"
- cs "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Nemohu zm\\u011bnit atku\341ln\355 adres\341\\u0159 na \"%1\$s\".\nP\\u0159\355stup odm\355tnut."
- cs "Choose Directory", "V\375b\\u011br adres\341\\u0159e"
- cs "Clear", "Smazat"
- cs "Color", "Barva"
- cs "Console", "Konzole"
- cs "Copy", "Kop\355rovat"
- cs "Cut", "Vy\\u0159\355znout"
- cs "Delete", "Smazat"
- cs "Details >>", "Detaily >>"
- cs "Directory \"%1\$s\" does not exist.", "Adres\341\\u0159 \"%1\$s\" neexistuje."
- cs "&Directory:", "&Adres\341\\u0159:"
- cs "Error: %1\$s", "Chyba: %1\$s"
- cs "Exit", "Konec"
- cs "File \"%1\$s\" already exists.\n\n", "Soubor \"%1\$s\" ji\\u017e existuje.\n\n"
- cs "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Soubor \"%1\$s\" ji\\u017e existuje.\nChcete jej p\\u0159epsat?"
- cs "File \"%1\$s\" does not exist.", "Soubor \"%1\$s\" neexistuje."
- cs "File &name:", "&Jm\351no souboru:"
- cs "File &names:", "&Jm\351na soubor\\u016f:"
- cs "Files of &type:", "&Typy soubor\\u016f:"
- cs "Fi&les:", "Sou&bory:"
- cs "&Filter", "&Filtr"
- cs "Fil&ter:", "Fil&tr:"
- cs "&Green", "Ze&len\341"
- cs "Hi"
- cs "Hide Console", "Skr\375t konsolu"
- cs "&Ignore", "&Ignorovat"
- cs "Invalid file name \"%1\$s\".", "\\u0160patn\351 jm\351no souboru \"%1\$s\"."
- cs "Log Files", "Log soubory"
- cs "&No", "&Ne"
- cs "&OK"
- cs "Ok"
- cs "Open", "Otev\\u0159\355t"
- cs "&Open", "&Otev\\u0159\355t"
- cs "Open Multiple Files", "Otev\\u0159\355t v\355ce soubor\\u016f"
- cs "Paste", "Vlo\\u017eit"
- cs "Quit", "Skon\\u010dit"
- cs "&Red", " \\u010ce&rven\341"
- cs "Replace existing file?", "Nahradit st\341vaj\355c\355 soubor?"
- cs "&Retry", "Z&novu"
- cs "&Save", "&Ulo\\u017eit"
- cs "Save As", "Ulo\\u017eit jako"
- cs "Save To Log", "Ulo\\u017eit do logu"
- cs "Select Log File", "Vybrat log soubor"
- cs "Select a file to source", "Vybrat soubor k nahr\341n\355"
- cs "&Selection:", "&V\375b\\u011br:"
- cs "Skip Messages", "P\\u0159esko\\u010dit zpr\341vy"
- cs "Source...", "Nahr\341t..."
- cs "Tcl Scripts", "Tcl skripty"
- cs "Tcl for Windows", "Tcl pro Windows"
- cs "Text Files", "Textov\351 soubory"
- cs "&Yes", "&Ano"
- cs "abort", "p\\u0159eru\\u0161it"
- cs "blue", "modr\341"
- cs "cancel", "zru\\u0161it"
- cs "extension", "p\\u0159\355pona"
- cs "extensions", "p\\u0159\355pony"
- cs "green", "zelen\341"
- cs "ignore", "ignorovat"
- cs "ok"
- cs "red", "\\u010derven\341"
- cs "retry", "znovu"
- cs "yes", "ano"
-}
diff --git a/ext/tk/sample/msgs_rb/de.msg b/ext/tk/sample/msgs_rb/de.msg
deleted file mode 100644
index 283874df42..0000000000
--- a/ext/tk/sample/msgs_rb/de.msg
+++ /dev/null
@@ -1,88 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- de "Application Error", "Applikationsfehler"
- de "Blue", "Blau"
- de "Color", "Farbe"
- de "Delete", "L\\u00f6schen"
- de "Error", "Fehler"
- de "Exit", "Ende"
- de "Green", "Gr\\u00fcn"
- de "Red", "Rot"
- de "blue", "blau"
- de "green", "gr\\u00fcn"
- de "red", "rot"
-}
-
-TkMsgCatalog.new('::tk') {
- de "&Abort", "&Abbruch"
- de "&About...", "&\\u00dcber..."
- de "All Files", "Alle Dateien"
- de "Application Error", "Applikationsfehler"
- de "&Blue", "&Blau"
- de "&Cancel", "&Abbruch"
- de "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Kann nicht in das Verzeichnis \"%1\$s\" wechseln.\nKeine Rechte vorhanden."
- de "Choose Directory", "W\\u00e4hle Verzeichnis"
- de "&Clear", "&R\\u00fccksetzen"
- de "&Clear Console", "&Konsole l\\u00f6schen"
- de "Color", "Farbe"
- de "Console", "Konsole"
- de "&Copy", "&Kopieren"
- de "Cu&t", "Aus&schneiden"
- de "&Delete", "&L\\u00f6schen"
- de "Details >>"
- de "Directory \"%1\$s\" does not exist.", "Das Verzeichnis \"%1\$s\" existiert nicht."
- de "&Directory:", "&Verzeichnis:"
- de "&Edit", "&Bearbieten"
- de "Error: %1\$s", "Fehler: %1\$s"
- de "E&xit", "&Ende"
- de "&File", "&Datei"
- de "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Die Datei \"%1\$s\" ist bereits vorhanden.\nWollen sie diese Datei \\u00fcberschreiben ?"
- de "File \"%1\$s\" already exists.\n\n", "Die Datei \"%1\$s\" ist bereits vorhanden.\n\n"
- de "File \"%1\$s\" does not exist.", "Die Datei \"%1\$s\" existiert nicht."
- de "File &name:", "Datei&name:"
- de "File &names:", "Datei&namen:"
- de "Files of &type:", "Dateien des &Typs:"
- de "Fi&les:", "Dat&eien:"
- de "&Filter"
- de "Fil&ter:"
- de "&Green", "&Gr\\u00fcn"
- de "&Help", "&Hilfe"
- de "Hi", "Hallo"
- de "&Hide Console", "&Konsole unsichtbar machen"
- de "&Ignore", "&Ignorieren"
- de "Invalid file name \"%1\$s\".", "Ung\\u00fcltiger Dateiname \"%1\$s\"."
- de "Log Files", "Protokolldatei"
- de "&No", "&Nein"
- de "OK"
- de "Ok"
- de "Open", "\\u00d6ffnen"
- de "&Open", "\\u00d6&ffnen"
- de "Open Multiple Files"
- de "P&aste", "E&inf\\u00fcgen"
- de "&Quit", "&Beenden"
- de "&Red", "&Rot"
- de "Replace existing file?", "Existierende Datei ersetzen?"
- de "&Retry", "&Wiederholen"
- de "&Save", "&Speichern"
- de "Save As", "Speichern unter"
- de "Save To Log", "In Protokoll speichern"
- de "Select Log File", "Protokolldatei ausw\\u00e4hlen"
- de "Select a file to source", "Auszuf\\u00fchrende Datei ausw\\u00e4hlen"
- de "&Selection:", "Auswah&l:"
- de "Skip Messages", "Weitere Nachrichten \\u00fcberspringen"
- de "&Source...", "&Ausf\\u00fchren..."
- de "Tcl Scripts", "Tcl-Skripte"
- de "Tcl for Windows", "Tcl f\\u00fcr Windows"
- de "Text Files", "Textdateien"
- de "&Yes", "&Ja"
- de "abort", "abbrechen"
- de "blue", "blau"
- de "cancel", "abbrechen"
- de "extension", "Erweiterung"
- de "extensions", "Erweiterungen"
- de "green", "gr\\u00fcn"
- de "ignore", "ignorieren"
- de "ok"
- de "red", "rot"
- de "retry", "wiederholen"
- de "yes", "ja"
-}
diff --git a/ext/tk/sample/msgs_rb/el.msg b/ext/tk/sample/msgs_rb/el.msg
deleted file mode 100644
index f314ae03eb..0000000000
--- a/ext/tk/sample/msgs_rb/el.msg
+++ /dev/null
@@ -1,98 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- el 'Application Error', '\u039b\u03ac\u03b8\u03bf\u03c2 \u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2'
- el 'Blue', '\u039c\u03c0\u03bb\u03b5'
- el 'Color', '\u03a7\u03c1\u03ce\u03bc\u03b1'
- el 'Delete', '\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae'
- el 'Error', '\u039b\u03ac\u03b8\u03bf\u03c2'
- el 'Exit', '\u0388\u03be\u03bf\u03b4\u03bf\u03c2'
- el 'Green', '\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf'
- el 'Red', '\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf'
- el 'blue', '\u03bc\u03c0\u03bb\u03b5'
- el 'green', '\u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf'
- el 'red', '\u03ba\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf'
-}
-
-TkMsgCatalog.new('::tk') {
- el '&Abort', '\u03a4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2'
- el 'About...', '\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac...'
- el 'All Files', '\u038c\u03bb\u03b1 \u03c4\u03b1 \u0391\u03c1\u03c7\u03b5\u03af\u03b1'
- el 'Application Error', '\u039b\u03ac\u03b8\u03bf\u03c2 \u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2'
- el '&Blue', '\u039c\u03c0\u03bb\u03b5'
- el '&Cancel', '\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7'
- el 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.', \
- '\u0394\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03c5\u03bd\u03b1\u03c4\u03ae \u03b7 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03ba\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5 \u03c3\u03b5 "%1\$s".' \
- "\n" \
- '\u0397 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7 \u03b4\u03b5\u03bd \u03b5\u03c0\u03b9\u03c4\u03c1\u03ad\u03c0\u03b5\u03c4\u03b1\u03b9.'
- el 'Choose Directory', '\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u039a\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5'
- el 'Clear', '\u039a\u03b1\u03b8\u03b1\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2'
- el 'Color', '\u03a7\u03c1\u03ce\u03bc\u03b1'
- el 'Console', '\u039a\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1'
- el 'Copy', '\u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae'
- el 'Cut', '\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae'
- el 'Delete', '\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae'
- el 'Details >>', '\u039b\u03b5\u03c0\u03c4\u03bf\u03bc\u03ad\u03c1\u03b5\u03b9\u03b5\u03c2 >>'
- el 'Directory "%1\$s", does not exist.', \
- '\u039f \u03ba\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2 \'%1\$s\' \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.'
- el '&Directory:', '&\u039a\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2:'
- el 'Error: %1\$s', '\u039b\u03ac\u03b8\u03bf\u03c2: %1\$s'
- el 'Exit', '\u0388\u03be\u03bf\u03b4\u03bf\u03c2'
- el 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?', \
- '\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf "%1\$s" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.' \
- "\n" \
- '\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03b5\u03c0\u03b9\u03ba\u03b1\u03bb\u03c5\u03c6\u03b8\u03b5\u03af;'
- el 'File "%1\$s" already exists.' "\n\n", \
- '\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf "%1\$s" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.' "\n\n"
- el 'File "%1\$s" does not exist.', \
- '\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf "%1\$s" \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.'
- el 'File &name:', '\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5:'
- el 'File &names:', '\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd:'
- el 'Files of &type:', '\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u03c4\u03bf\u03c5 &\u03c4\u03cd\u03c0\u03bf\u03c5:'
- el 'Fi&les:', '\u0391\u03c1\u03c7\u03b5\u03af\u03b1:'
- el '&Filter', '\u03a6\u03af\u03bb\u03c4\u03c1\u03bf'
- el 'Fil&ter:', '\u03a6\u03af\u03bb\u03c4\u03c1\u03bf:'
- el '&Green', '\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf'
- el 'Hi', '\u0393\u03b5\u03b9\u03b1'
- el 'Hide Console', '\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03ba\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1\u03c2'
- el '&Ignore', '\u0391\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7'
- el 'Invalid file name "%1\$s".', \
- '\u0386\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 "%1\$s".'
- el 'Log Files', '\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2'
- el '&No', '\u038c\u03c7\u03b9'
- el '&OK', '\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9'
- el '&Ok', '\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9'
- el 'Open', '\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1'
- el '&Open', '\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1'
- el 'Open Multiple Files', \
- '\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c0\u03bf\u03bb\u03bb\u03b1\u03c0\u03bb\u03ce\u03bd \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd'
- el 'Paste', '\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7'
- el 'Quit', '\u0388\u03be\u03bf\u03b4\u03bf\u03c2'
- el '&Red', '\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf'
- el 'Replace existing file?', \
- '\u0395\u03c0\u03b9\u03ba\u03ac\u03bb\u03c5\u03c8\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03bf\u03bd\u03c4\u03bf\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5;'
- el '&Retry', '\u03a0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac'
- el '&Save', '\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7'
- el 'Save As', '\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03b1\u03bd'
- el 'Save To Log', '\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03c4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2'
- el 'Select Log File', '\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2'
- el 'Select a file to source', \
- '\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03b3\u03b9\u03b1 \u03b5\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7'
- el '&Selection:', '\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae:'
- el 'Skip Messages', '\u0391\u03c0\u03bf\u03c6\u03c5\u03b3\u03ae \u03bc\u03c5\u03bd\u03b7\u03bc\u03ac\u03c4\u03c9\u03bd'
- el 'Source...', '\u0395\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7...'
- el 'Tcl Scripts', 'Tcl Scripts'
- el 'Tcl for Windows', 'Tcl \u03b3\u03b9\u03b1 Windows'
- el 'Text Files', '\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5'
- el '&Yes', '\u039d\u03b1\u03b9'
- el 'abort', '\u03c4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2'
- el 'blue', '\u03bc\u03c0\u03bb\u03b5'
- el 'cancel', '\u03b1\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7'
- el 'extension', '\u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7'
- el 'extensions', '\u03b5\u03c0\u03b5\u03ba\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2'
- el 'green', '\u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf'
- el 'ignore', '\u03b1\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7'
- el 'ok', '\u03b5\u03bd\u03c4\u03ac\u03be\u03b5\u03b9'
- el 'red', '\u03ba\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf'
- el 'retry', '\u03c0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac'
- el 'yes', '\u03bd\u03b1\u03b9'
-}
-
diff --git a/ext/tk/sample/msgs_rb/en.msg b/ext/tk/sample/msgs_rb/en.msg
deleted file mode 100644
index 9b70239511..0000000000
--- a/ext/tk/sample/msgs_rb/en.msg
+++ /dev/null
@@ -1,83 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- en "Application Error"
- en "Blue"
- en "Color"
- en "Delete"
- en "Error"
- en "Green"
- en "Red"
- en "blue"
- en "green"
- en "red"
-}
-
-TkMsgCatalog.new('::tk') {
- en "&Abort"
- en "About..."
- en "All Files"
- en "Application Error"
- en "&Blue"
- en "&Cancel"
- en "Cannot change to the directory \"%1\$s\".\nPermission denied."
- en "Choose Directory"
- en "Clear"
- en "Color"
- en "Console"
- en "Copy"
- en "Cut"
- en "Delete"
- en "Details >>"
- en "Directory \"%1\$s\" does not exist."
- en "&Directory:"
- en "Error: %1\$s"
- en "Exit"
- en "File \"%1\$s\" already exists.\nDo you want to overwrite it?"
- en "File \"%1\$s\" already exists.\n\n"
- en "File \"%1\$s\" does not exist."
- en "File &name:"
- en "File &names:"
- en "Files of &type:"
- en "Fi&les:"
- en "&Filter"
- en "Fil&ter:"
- en "&Green"
- en "Hi"
- en "Hide Console"
- en "&Ignore"
- en "Invalid file name \"%1\$s\"."
- en "Log Files"
- en "&No"
- en "&OK"
- en "Ok"
- en "Open"
- en "&Open"
- en "Open Multiple Files"
- en "Paste"
- en "Quit"
- en "&Red"
- en "Replace existing file?"
- en "&Retry"
- en "&Save"
- en "Save As"
- en "Save To Log"
- en "Select Log File"
- en "Select a file to source"
- en "&Selection:"
- en "Skip Messages"
- en "Source..."
- en "Tcl Scripts"
- en "Tcl for Windows"
- en "Text Files"
- en "&Yes"
- en "abort"
- en "blue"
- en "cancel"
- en "extension"
- en "extensions"
- en "green"
- en "ignore"
- en "ok"
- en "red"
- en "retry"
- en "yes"
-}
diff --git a/ext/tk/sample/msgs_rb/en_gb.msg b/ext/tk/sample/msgs_rb/en_gb.msg
deleted file mode 100644
index 97c58959b1..0000000000
--- a/ext/tk/sample/msgs_rb/en_gb.msg
+++ /dev/null
@@ -1,7 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- en_gb 'Color', 'Colour'
-}
-
-TkMsgCatalog.new('::tk') {
- en_gb 'Color', 'Colour'
-}
diff --git a/ext/tk/sample/msgs_rb/eo.msg b/ext/tk/sample/msgs_rb/eo.msg
deleted file mode 100644
index 1630df5e83..0000000000
--- a/ext/tk/sample/msgs_rb/eo.msg
+++ /dev/null
@@ -1,87 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- eo 'Application Error', 'Aplikoerraro'
- eo 'Blue', 'Blua'
- eo 'Color', 'Farbo'
- eo 'Delete', 'Forprenu'
- eo 'Error', 'Eraro'
- eo 'Exit', 'Eliru'
- eo 'Green', 'Verda'
- eo 'Red', 'Rosa'
- eo 'blue', 'blua'
- eo 'green', 'verda'
- eo 'red', 'ru\u011da'
-}
-
-TkMsgCatalog.new('::tk') {
- eo '&Abort', '&\u0108esigo'
- eo '&About...', 'Pri...'
- eo 'All Files', '\u0108ioj dosieroj'
- eo 'Application Error', 'Aplikoerraro'
- eo '&Blue', '&Blua'
- eo '&Cancel', '&Rezignu'
- eo 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.', 'Neeble \u0109angi al dosierulon "%1\$s".' "\n" 'Vi ne rajtas tion.'
- eo 'Choose Directory', 'Elektu Dosierujo'
- eo '&Clear', '&Klaru'
- eo '&Clear Console', '&Klaru konzolon'
- eo 'Color', 'Farbo'
- eo 'Console', 'Konzolo'
- eo '&Copy', '&Kopiu'
- eo 'Cu&t', '&Enpo\u015digu'
- eo '&Delete', '&Forprenu'
- eo 'Details >>', 'Detaloj >>'
- eo 'Directory "%1\$s" does not exist.', 'La dosierujo "%1\$s" ne ekzistas.'
- eo '&Directory:', '&Dosierujo:'
- eo '&Edit', '&Redaktu'
- eo 'Error: %1\$s', 'Eraro: %1\$s'
- eo 'E&xit', '&Eliru'
- eo '&File', '&Dosiero'
- eo 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?', 'La dosiero "%1\$s" jam ekzistas.' "\n" '\u0108u vi volas anstata\u00fbigi la dosieron?'
- eo 'File "%1\$s" already exists.' "\n\n", 'La dosiero "%1\$s" jam egzistas.' "\n\n"
- eo 'File "%1\$s" does not exist.', 'La dosierp "%1\$s" ne estas.'
- eo 'File &name:', 'Dosiero&nomo:'
- eo 'File &names:', 'Dosiero&nomoj:'
- eo 'Files of &type:', 'Dosieroj de &Typo:'
- eo 'Fi&les:', 'Do&sieroj:'
- eo '&Filter', '&Filtrilo'
- eo 'Fil&ter:', '&Filtrilo:'
- eo '&Green', '&Verda'
- eo '&Help', '&Helpu'
- eo 'Hi', 'Saluton'
- eo '&Hide Console', '&Ka\u015du konzolon'
- eo '&Ignore', '&Ignoru'
- eo 'Invalid file name "%1\$s".', 'Malvalida dosieronomo "%1\$s".'
- eo 'Log Files', 'Protokolo'
- eo '&No', '&Ne'
- eo 'OK'
- eo 'Ok'
- eo 'Open', 'Malfermu'
- eo '&Open', '&Malfermu'
- eo 'Open Multiple Files', 'Melfermu multan dosierojn'
- eo 'P&aste', '&Elpo\u015digi'
- eo '&Quit', '&Finigu'
- eo '&Red', '&Rosa'
- eo 'Replace existing file?', '\u0108u anstata\u00fbu ekzistantan dosieron?'
- eo '&Retry', '&Ripetu'
- eo '&Save', '&Savu'
- eo 'Save As', 'Savu kiel'
- eo 'Save To Log', 'Savu en protokolon'
- eo 'Select Log File', 'Elektu prokolodosieron'
- eo 'Select a file to source', 'Elektu dosieron por interpreti'
- eo '&Selection:', '&Elekto:'
- eo 'Skip Messages', 'transsaltu pluajn mesa\u011dojn'
- eo '&Source...', '&Fontoprogramo...'
- eo 'Tcl Scripts', 'Tcl-skriptoj'
- eo 'Tcl for Windows', 'Tcl por vindoso'
- eo 'Text Files', 'Tekstodosierojn'
- eo '&Yes', '&Jes'
- eo 'abort', '\u0109esigo'
- eo 'blue', 'blua'
- eo 'cancel', 'rezignu'
- eo 'extension', 'ekspansio'
- eo 'extensions', 'ekspansioj'
- eo 'green', 'verda'
- eo 'ignore', 'ignorieren'
- eo 'red', 'ru\u011da'
- eo 'retry', 'ripetu'
- eo 'yes', 'jes'
-}
diff --git a/ext/tk/sample/msgs_rb/es.msg b/ext/tk/sample/msgs_rb/es.msg
deleted file mode 100644
index 38ca28fb8f..0000000000
--- a/ext/tk/sample/msgs_rb/es.msg
+++ /dev/null
@@ -1,84 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- es "Application Error", "Error de la aplicaci\\u00f3n"
- es "Blue", "Azul"
- es "Color", "Color"
- es "Delete", "Borrar"
- es "Error", "Error"
- es "Exit", "Salir"
- es "Green", "Verde"
- es "Red", "Rojo"
- es "blue", "azul"
- es "green", "verde"
- es "red", "rojo"
-}
-
-TkMsgCatalog.new('::tk') {
- es "&Abort", "&Abortar"
- es "About...", "Acerca de ..."
- es "All Files", "Todos los archivos"
- es "Application Error", "Error de la aplicaci\\u00f3n"
- es "&Blue", "&Azul"
- es "&Cancel", "&Cancelar"
- es "Cannot change to the directory \"%1\$s\".\nPermission denied.", "No es posible acceder al directorio \"%1\$s\".\nPermiso denegado."
- es "Choose Directory", "Elegir directorio"
- es "Clear", "Borrar"
- es "Color", "Color"
- es "Console", "Consola"
- es "Copy", "Copiar"
- es "Cut", "Cortar"
- es "Delete", "Borrar"
- es "Details >>", "Detalles >>"
- es "Directory \"%1\$s\" does not exist.", "El directorio \"%1\$s\" no existe."
- es "&Directory:", "&Directorio:"
- es "Error: %1\$s", "Error: %1\$s"
- es "Exit", "Salir"
- es "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "El archivo \"%1\$s\" ya existe.\nDesea sobreescribirlo?"
- es "File \"%1\$s\" already exists.\n\n", "El archivo \"%1\$s\" ya existe.\n\n"
- es "File \"%1\$s\" does not exist.", "El archivo \"%1\$s\" no existe."
- es "File &name:", "&Nombre de archivo:"
- es "File &names:", "&Nombres de archivo:"
- es "Files of &type:", "Archivos de &tipo:"
- es "Fi&les:", "&Archivos:"
- es "&Filter", "&Filtro"
- es "Fil&ter:", "Fil&tro:"
- es "&Green", "&Verde"
- es "Hi", "Hola"
- es "Hide Console", "Esconder la consola"
- es "&Ignore", "&Ignorar"
- es "Invalid file name \"%1\$s\".", "Nombre de archivo inv\\u00e1lido \"%1\$s\"."
- es "Log Files", "Ficheros de traza"
- es "&No", "&No"
- es "&OK", "&OK"
- es "Ok", "Ok"
- es "Open", "Abrir"
- es "&Open", "&Abrir"
- es "Open Multiple Files", "Abrir m\\u00faltiples archivos"
- es "Paste", "Pegar"
- es "Quit", "Abandonar"
- es "&Red", "&Rojo"
- es "Replace existing file?", "Reemplazar el archivo existente?"
- es "&Retry", "&Reintentar"
- es "&Save", "&Salvar"
- es "Save As", "Salvar como"
- es "Save To Log", "Salvar al archivo de traza"
- es "Select Log File", "Elegir un archivo de traza"
- es "Select a file to source", "Seleccionar un archivo a evaluar"
- es "&Selection:", "&Selecci\\u00f3n:"
- es "Skip Messages", "Omitir los mensajes"
- es "Source...", "Evaluar..."
- es "Tcl Scripts", "Scripts Tcl"
- es "Tcl for Windows", "Tcl para Windows"
- es "Text Files", "Archivos de texto"
- es "&Yes", "&S\\u00ed"
- es "abort", "abortar"
- es "blue", "azul"
- es "cancel", "cancelar"
- es "extension", "extensi\\u00f3n"
- es "extensions", "extensiones"
- es "green", "verde"
- es "ignore", "ignorar"
- es "ok", "ok"
- es "red", "rojo"
- es "retry", "reintentar"
- es "yes", "s\\u00ed"
-}
diff --git a/ext/tk/sample/msgs_rb/fr.msg b/ext/tk/sample/msgs_rb/fr.msg
deleted file mode 100644
index ea85cf1a39..0000000000
--- a/ext/tk/sample/msgs_rb/fr.msg
+++ /dev/null
@@ -1,84 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- fr 'Application Error', "Erreur d'application"
- fr 'Blue', 'Bleu'
- fr 'Color', 'Couleur'
- fr 'Delete', 'Effacer'
- fr 'Error', 'Erreur'
- fr 'Exit', 'Quitter'
- fr 'Green', 'Vert'
- fr 'Red', 'Rouge'
- fr 'blue', 'bleu'
- fr 'green', 'vert'
- fr 'red', 'rouge'
-}
-
-TkMsgCatalog.new('::tk') {
- fr '&Abort', '&Annuler'
- fr 'About...', '\u00c0 propos...'
- fr 'All Files', 'Tous les fichiers'
- fr 'Application Error', "Erreur d'application"
- fr '&Blue', '&Bleu'
- fr '&Cancel', '&Annuler'
- fr 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.', 'Impossible d\'acc\u00e9der au r\u00e9pertoire "%1\$s".' "\n" 'Permission refus\u00e9e.'
- fr 'Choose Directory', 'Choisir r\u00e9pertoire'
- fr 'Clear', 'Effacer'
- fr 'Color', 'Couleur'
- fr 'Console'
- fr 'Copy', 'Copier'
- fr 'Cut', 'Couper'
- fr 'Delete', 'Effacer'
- fr 'Details >>', 'D\u00e9tails >>'
- fr 'Directory "%1\$s" does not exist.', 'Le r\u00e9pertoire "%1\$s" n\'existe pas.'
- fr '&Directory:', '&R\u00e9pertoire:'
- fr 'Error: %1\$s', 'Erreur: %1\$s'
- fr 'Exit', 'Quitter'
- fr 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?', 'Le fichier "%1\$s" existe d\u00e9j\u00e0.' "\n" 'Voulez-vous l\'\u00e9craser?'
- fr 'File "%1\$s" already exists.' "\n\n", 'Le fichier "%1\$s" existe d\u00e9j\u00e0.' "\n\n"
- fr 'File "%1\$s" does not exist.', 'Le fichier "%1\$s" n\'existe pas.'
- fr 'File &name:', '&Nom de fichier:'
- fr 'File &names:', '&Noms de fichiers:'
- fr 'Files of &type:', '&Type de fichiers:'
- fr 'Fi&les:', 'Fich&iers:'
- fr '&Filter', '&Filtre'
- fr 'Fil&ter:', 'Fil&tre:'
- fr '&Green', '&Vert'
- fr 'Hi', 'Salut'
- fr 'Hide Console', 'Cacher la Console'
- fr '&Ignore', '&Ignorer'
- fr 'Invalid file name "%1\$s".', 'Nom de fichier invalide "%1\$s".'
- fr 'Log Files', 'Fichiers de trace'
- fr '&No', '&Non'
- fr '&OK'
- fr 'Ok'
- fr 'Open', 'Ouvrir'
- fr '&Open', '&Ouvrir'
- fr 'Open Multiple Files', 'Ouvrir plusieurs fichiers'
- fr 'Paste', 'Coller'
- fr 'Quit', 'Quitter'
- fr '&Red', '&Rouge'
- fr 'Replace existing file?', 'Remplacer le fichier existant?'
- fr '&Retry', '&R\u00e9-essayer'
- fr '&Save', '&Sauvegarder'
- fr 'Save As', 'Sauvegarder sous'
- fr 'Save To Log', 'Sauvegarde au fichier de trace'
- fr 'Select Log File', 'Choisir un fichier de trace'
- fr 'Select a file to source', 'Choisir un fichier \u00e0 \u00e9valuer'
- fr '&Selection:', '&S\u00e9lection:'
- fr 'Skip Messages', 'Omettre les messages'
- fr 'Source...', '\u00c9valuer...'
- fr 'Tcl Scripts', 'Scripts Tcl'
- fr 'Tcl for Windows', 'Tcl pour Windows'
- fr 'Text Files', 'Fichiers texte'
- fr '&Yes', '&Oui'
- fr 'abort', 'abandonner'
- fr 'blue', 'bleu'
- fr 'cancel', 'annuler'
- fr 'extension'
- fr 'extensions'
- fr 'green', 'vert'
- fr 'ignore', 'ignorer'
- fr 'ok'
- fr 'red', 'rouge'
- fr 'retry', 'r\u00e9essayer'
- fr 'yes', 'oui'
-}
diff --git a/ext/tk/sample/msgs_rb/it.msg b/ext/tk/sample/msgs_rb/it.msg
deleted file mode 100644
index a180bdbd99..0000000000
--- a/ext/tk/sample/msgs_rb/it.msg
+++ /dev/null
@@ -1,84 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- it "Application Error", "Errore dell' applicazione"
- it "Blue", "Blu"
- it "Color", "Colore"
- it "Delete", "Incolla"
- it "Error", "Errore"
- it "Exit", "Esci"
- it "Green", "Verde"
- it "Red", "Rosso"
- it "blue", "blu"
- it "green", "verde"
- it "red", "rosso"
-}
-
-TkMsgCatalog.new('::tk') {
- it "&Abort", "&Interrompi"
- it "About...", "Informazioni ..."
- it "All Files", "Tutti i file"
- it "Application Error", "Errore dell' applicazione"
- it "&Blue", "&Blu"
- it "&Cancel", "&Annulla"
- it "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Impossibile accedere alla directory \"%1\$s\".\nPermesso negato."
- it "Choose Directory", "Scegli directory"
- it "Clear", "Azzera"
- it "Color", "Colore"
- it "Console"
- it "Copy", "Copia"
- it "Cut", "Taglia"
- it "Delete", "Incolla"
- it "Details >>", "Dettagli >>"
- it "Directory \"%1\$s\" does not exist.", "La directory \"%1\$s\" non esiste."
- it "&Directory:"
- it "Error: %1\$s", "Errore: %1\$s"
- it "Exit", "Esci"
- it "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Il file \"%1\$s\" esiste gi\\u00e0.\nVuoi sovrascriverlo?"
- it "File \"%1\$s\" already exists.\n\n", "Il file \"%1\$s\" esiste gi\\u00e0.\n\n"
- it "File \"%1\$s\" does not exist.", "Il file \"%1\$s\" non esiste."
- it "File &name:", "&Nome del file:"
- it "File &names:", "&Nomi dei file:"
- it "Files of &type:", "File di &tipo:"
- it "Fi&les:", "Fi&le:"
- it "&Filter", "&Filtro"
- it "Fil&ter:", "Fil&tro:"
- it "&Green", "&Verde"
- it "Hi", "Salve"
- it "Hide Console", "Nascondi la console"
- it "&Ignore", "&Ignora"
- it "Invalid file name \"%1\$s\".", "Nome di file non valido \"%1\$s\"."
- it "Log Files", "File di log"
- it "&No"
- it "&OK"
- it "Ok"
- it "&Open", "A&pri"
- it "Open", "Apri"
- it "Open Multiple Files", "Apri file multipli"
- it "Paste", "Incolla"
- it "Quit", "Esci"
- it "&Red", "&Rosso"
- it "Replace existing file?", "Sostituisci il file esistente?"
- it "&Retry", "&Riprova"
- it "&Save", "&Salva"
- it "Save As", "Salva come"
- it "Save To Log", "Salva il log"
- it "Select Log File", "Scegli un file di log"
- it "Select a file to source", "Scegli un file da eseguire"
- it "&Selection:", "&Selezione:"
- it "Skip Messages", "Salta i messaggi"
- it "Source...", "Esegui..."
- it "Tcl Scripts", "Scripts Tcl"
- it "Tcl for Windows", "Tcl per Windows"
- it "Text Files", "File di testo"
- it "&Yes", "&Si"
- it "abort", "interrompi"
- it "blue", "blu"
- it "cancel", "annulla"
- it "extension", "estensione"
- it "extensions", "estensioni"
- it "green", "verde"
- it "ignore", "ignora"
- it "ok"
- it "red", "rosso"
- it "retry", "riprova"
- it "yes", "si"
-}
diff --git a/ext/tk/sample/msgs_rb/ja.msg b/ext/tk/sample/msgs_rb/ja.msg
deleted file mode 100644
index 40587c1f1d..0000000000
--- a/ext/tk/sample/msgs_rb/ja.msg
+++ /dev/null
@@ -1,13 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- ja 'Application Error', '\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30A8\u30E9\u30FC'
- ja 'Blue', '\u9752'
- ja 'Color', '\u80CC\u666F\u8272'
- ja 'Delete', '\u6D88\u53BB'
- ja 'Error', '\u30A8\u30E9\u30FC'
- ja 'Exit', '\u7D42\u4E86'
- ja 'Green', '\u7DD1'
- ja 'Red', '\u8D64'
- ja 'blue', '\u9752'
- ja 'green', '\u7DD1'
- ja 'red', '\u8D64'
-}
diff --git a/ext/tk/sample/msgs_rb/nl.msg b/ext/tk/sample/msgs_rb/nl.msg
deleted file mode 100644
index 24e41dae86..0000000000
--- a/ext/tk/sample/msgs_rb/nl.msg
+++ /dev/null
@@ -1,123 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- nl "Application Error", "Toepassingsfout"
- nl "Blue", "Blauw"
- nl "Color", "Kleur"
- nl "Delete", "Wissen"
- nl "Error", "Fout"
- nl "Exit", "Be\\u00ebindigen"
- nl "Green", "Groen"
- nl "Red", "Rood"
- nl "blue", "blauw"
- nl "green", "groen"
- nl "red", "rood"
-}
-
-TkMsgCatalog.new('::tk') {
- nl "\"%1\$s\" must be an absolute pathname", "\"%1\$s\" moet een absolute pad-naam zijn"
- nl "%1\$s is not a toplevel window", "%1\$s is geen toplevel window"
- nl ", or", ", of"
- nl "-default, -icon, -message, -parent, -title, or -type", "-default, -icon, -message, -parent, -title, of -type"
- nl "-initialdir, -mustexist, -parent, or -title", "-initialdir, -mustexist, -parent, of -title"
- nl "&Abort", "&Afbreken"
- nl "About...", "Over..."
- nl "All Files", "Alle Bestanden"
- nl "Application Error", "Toepassingsfout"
- nl "&Blue", "&Blauw"
- nl "&Cancel", "&Annuleren"
- nl "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Kan niet naar map \"%1\$s\" gaan.\nU heeft hiervoor geen toestemming."
- nl "Choose Directory", "Kies map"
- nl "Clear", "Wissen"
- nl "Clear entry, Press OK; Enter %1\$s, press OK", "Wis veld, Druk op OK; typ %1\$s in, druk op OK"
- nl "&Clear Console", "&Wis Console"
- nl "Color", "Kleur"
- nl "Console"
- nl "Copy", "Kopi\\u00ebren"
- nl "Cut", "Knippen"
- nl "Delete", "Wissen"
- nl "Details"
- nl "Details >>"
- nl "Directory \"%1\$s\" does not exist.", "Map \"%1\$s\" bestaat niet."
- nl "&Directory:", "&Map:"
- nl "Edit", "Bewerken"
- nl "Enter \"%1\$s\", press OK", "Typ \"%1\$s\", druk op OK"
- nl "Enter \"%1\$s\", press OK, enter \"%2\$s\", press OK", "Typ \"%1\$s\", druk op OK, typ \"%2\$s\", druk op OK"
- nl "Error: %1\$s", "Fout: %1\$s"
- nl "Exit", "Be\\u00ebindigen"
- nl "File", "Bestand"
- nl "File \"%1\$s\" already exists.\n\n", "Bestand \"%1\$s\" bestaat al.\n\n"
- nl "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Bestand \"%1\$s\" bestaat al.\nWilt u het overschrijven?"
- nl "File \"%1\$s\" does not exist.", "Bestand \"%1\$s\" bestaat niet."
- nl "File &name:", "Bestands&naam:"
- nl "File &names:", "Bestands&namen:"
- nl "Files of &type:", "Bestanden van het &type:"
- nl "Fi&les:", "&Bestanden:"
- nl "&Filter"
- nl "Fil&ter:"
- nl "&Green", "&Groen"
- nl "Hi", "H\\u00e9"
- nl "Hide Console", "Verberg Console"
- nl "&Ignore", "&Negeren"
- nl "Invalid file name \"%1\$s\".", "Ongeldige bestandsnaam \"%1\$s\"."
- nl "Log Files", "Log Bestanden"
- nl "&No", "&Nee"
- nl "&OK"
- nl "Ok"
- nl "&Open", "&Openen"
- nl "Open", "Openen"
- nl "Open Multiple Files", "Open meerdere bestanden"
- nl "Paste", "Plakken"
- nl "Please press %1\$s", "Druk op %1\$s, A.U.B."
- nl "Please press ok", "Druk op ok, A.U.B."
- nl "Press Cancel", "Druk op Annuleren"
- nl "Press Ok", "Druk op Ok"
- nl "Quit", "Stoppen"
- nl "&Red", "&Rood"
- nl "Replace existing file?", "Vervang bestaand bestand?"
- nl "&Retry", "&Herhalen"
- nl "&Save", "Op&slaan"
- nl "Save As", "Opslaan als"
- nl "Save To Log", "Opslaan naar Log"
- nl "Select Log File", "Selecteer Log bestand"
- nl "Select a file to source", "Selecteer bronbestand"
- nl "&Selection:", "&Selectie:"
- nl "Skip Messages", "Berichten overslaan"
- nl "Source...", "Bron..."
- nl "Tcl Scripts"
- nl "Tcl for Windows", "Tcl voor Windows"
- nl "Text Files", "Tekstbestanden"
- nl "&Yes", "&Ja"
- nl "abort", "afbreken"
- nl "abort, retry, ignore, ok, cancel, no, or yes", "afbreken, opnieuw, negeren, ok, annuleren, nee, of ja"
- nl "abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel", "abortretryignore, ok, okcancel, retrycancel, yesno, of yesnocancel"
- nl "bad %1\$s value \"%2\$s\": must be %3\$s", "verkeerde %1\$s waarde \"%2\$s\": moet zijn %3\$s"
- nl "bad file type \"%1\$s\", should be", "verkeerd bestandstype \"%1\$s\", moet zijn"
- nl "bad option \"%1\$s\": should be %2\$s", "verkeerde optie \"%1\$s\": moet zijn %2\$s"
- nl "bad window path name \"%1\$s\"", "verkeerde window-padnaam \"%1\$s\""
- nl "blue", "blauw"
- nl "can't post %1\$s: it isn't a descendant of %2\$s (this is a new requirement in Tk versions 3.0 and later)", "kan %1\$s niet verzenden: het is geen afstammeling van %2\$s (dit is een nieuwe eis in Tk versies 3.0 en later)"
- nl "cancel", "annuleren"
- nl "default button index greater than number of buttons specified for tk_dialog", "default knop index is groter dan het aantal knoppen beschikbaar voor tk_dialog"
- nl "display name to use (current one otherwise)", "te gebruiken schermnaam (anders huidige scherm)"
- nl "error, info, question, or warning", "error, info, question, of warning"
- nl "extension"
- nl "extensions"
- nl "focus group \"%1\$s\" doesn't exist", "focusgroep \"%1\$s\" bestaat niet"
- nl "green", "groen"
- nl "history event %1\$s"
- nl "ignore", "negeren"
- nl "invalid default button \"%1\$s\"", "ongeldige default knop \"%1\$s\""
- nl "macType"
- nl "macTypes"
- nl "must specify a background color", "een achtergrondkleur is verplicht"
- nl "name of the slave interpreter", "naam van de slaaf-interpreter"
- nl "no winfo screen . nor env(DISPLAY)", "geen winfo scherm . noch env(DISPLAY)"
- nl "ok"
- nl "red", "rood"
- nl "retry", "opnieuw"
- nl "should contain 5 or 4 elements", "moet 4 of 5 elementen bevatten"
- nl "spec"
- nl "tk_chooseDirectory command", "tk_chooseDirectory opdracht"
- nl "tk_chooseDirectory command, cancel gives null", "tk_chooseDirectory opdracht, annuleren geeft lege waarde"
- nl "tk_chooseDirectory command, initialdir", "tk_chooseDirectory opdracht, initi\\u00eble map"
- nl "yes", "ja"
-}
diff --git a/ext/tk/sample/msgs_rb/pl.msg b/ext/tk/sample/msgs_rb/pl.msg
deleted file mode 100644
index 0b3b4445c2..0000000000
--- a/ext/tk/sample/msgs_rb/pl.msg
+++ /dev/null
@@ -1,87 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- pl 'Application Error', 'Bl\u0105d w Programie'
- pl 'Blue', 'Niebieski'
- pl 'Color', 'Kolor'
- pl 'Delete', 'Usu\u0144'
- pl 'Error', 'B\u0142\u0105d'
- pl 'Exit', 'Zako\u0144cz'
- pl 'Green', 'Zielony'
- pl 'Red', 'Czerwonz'
- pl 'blue', 'niebieski'
- pl 'green', 'zielony'
- pl 'red', 'czerwony'
-}
-
-TkMsgCatalog.new('::tk') {
- pl '&Abort', '&Anuluj'
- pl '&About...', 'O Programie...'
- pl 'All Files', 'Wszystkie pliki'
- pl 'Application Error', 'Bl\u0105d w Programie'
- pl '&Blue', '&Niebieski'
- pl '&Cancel', '&Anuluj'
- pl 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.', 'Katalog "%1\$s" nie mo\u017ce zosta\u0107 odczytany lub nie istnieje.'
- pl 'Choose Directory', 'Wybierz katalog'
- pl '&Clear', '&Wyczy\u015b\u0107'
- pl '&Clear Console', '&Wyczy\u015b\u0107 konsol\u0119'
- pl 'Color', 'Kolor'
- pl 'Console', 'Konsola'
- pl '&Copy', '&Kopiuj'
- pl 'Cu&t', '&Wytnij'
- pl '&Delete', '&Usu\u0144'
- pl 'Details >>', 'Detale >>'
- pl 'Directory "%1\$s" does not exist.', 'Katalog "%1\$s" nie istniej.'
- pl '&Directory:', '&Katalog:'
- pl '&Edit', '&Edytuj'
- pl 'Error: %1\$s', 'B\u0142\u0105d: %1\$s'
- pl 'E&xit', '&Zako\u0144cz'
- pl '&File', '&Plik'
- pl 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?', 'Plik "%1\$s" ju\u017c istnieje.' "\n" 'Czy chcesz go zast\u0105pi\u0107?'
- pl 'File "%1\$s" already exists.' "\n\n", 'Plik "%1\$s" ju\u017c istnieje. ' "\n\n"
- pl 'File "%1\$s" does not exist.', 'Plik "%1\$s" nie istnieje.'
- pl 'File &name:', 'Nazwa &pliku:'
- pl 'File &names:', 'Nazwy &plik\u00f3w:'
- pl 'Files of &type:', 'Pliki &typu:'
- pl 'Fi&les:', 'Pli&ki:'
- pl '&Filter', '&Filter'
- pl 'Fil&ter:', '&Filter:'
- pl '&Green', '&Zielony'
- pl '&Help', '&Pomoc'
- pl 'Hi', 'Witaj'
- pl '&Hide Console', '&Schowaj konsol\u0119'
- pl '&Ignore', '&Ignoruj'
- pl 'Invalid file name "%1\$s".', 'Niew\u0142a\u015bciwa nazwa pliku "%1\$s".'
- pl 'Log Files', 'Protoko\u0142uj'
- pl '&No', '&Nie'
- pl 'OK'
- pl 'Ok'
- pl 'Open', 'Wczytaj'
- pl '&Open', '&Wczytaj'
- pl 'Open Multiple Files', 'Wczytuj wiele plik\u00f3w'
- pl 'P&aste', '&Wklej'
- pl '&Quit', '&Zako\u0144cz'
- pl '&Red', '&Czerwonz'
- pl 'Replace existing file?', 'Czy zost\u0105pi\u0107 instniej\u0105cy plik?'
- pl '&Retry', '&Powt\u00f3rz'
- pl '&Save', '&Zapisz'
- pl 'Save As', 'Zapisz jako'
- pl 'Save To Log', 'Wpisz do protoko\u0142u'
- pl 'Select Log File', 'Wybierz plik proko\u0142u'
- pl 'Select a file to source', 'Wybierz plik do wykonania'
- pl '&Selection:', '&Wyb\u00f3r:'
- pl 'Skip Messages', 'Omi\u0144 pozosta\u0142e komunikaty'
- pl '&Source...', '&Kod \u017ar\u00f3d\u0142owy...'
- pl 'Tcl Scripts', 'Tcl-skrypty'
- pl 'Tcl for Windows', 'Tcl dla Okienek (Windows)'
- pl 'Text Files', 'Pliki Tekstowe'
- pl '&Yes', '&Tak'
- pl 'abort', 'zako\u0144cz'
- pl 'blue', 'niebieski'
- pl 'cancel', 'anuluj'
- pl 'extension', 'rozszerzenie'
- pl 'extensions', 'rozszerzenia'
- pl 'green', 'zielony'
- pl 'ignore', 'ignoruj'
- pl 'red', 'czerwony'
- pl 'retry', 'potw\u00f3rz'
- pl 'yes', 'tak'
-}
diff --git a/ext/tk/sample/msgs_rb/ru.msg b/ext/tk/sample/msgs_rb/ru.msg
deleted file mode 100644
index 752cd42619..0000000000
--- a/ext/tk/sample/msgs_rb/ru.msg
+++ /dev/null
@@ -1,87 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- ru 'Application Error', '\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435'
- ru 'Blue', ' \u0413\u043e\u043b\u0443\u0431\u043e\u0439'
- ru 'Color', '\u0426\u0432\u0435\u0442'
- ru 'Delete', '\u0423\u0434\u0430\u043b\u0438\u0442\u044c'
- ru 'Error', '\u041e\u0448\u0438\u0431\u043a\u0430'
- ru 'Exit', '\u0412\u044b\u0445\u043e\u0434'
- ru 'Green', '\u0417\u0435\u043b\u0435\u043d\u044b\u0439'
- ru 'Red', '\u041a\u0440\u0430\u0441\u043d\u044b\u0439'
- ru 'blue', ' \u0433\u043e\u043b\u0443\u0431\u043e\u0439'
- ru 'green', ' \u0437\u0435\u043b\u0435\u043d\u044b\u0439'
- ru 'red', ' \u043a\u0440\u0430\u0441\u043d\u044b\u0439'
-}
-
-TkMsgCatalog.new('::tk') {
- ru '&Abort', '&\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c'
- ru 'About...', '\u041f\u0440\u043e...'
- ru 'All Files', '\u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b'
- ru 'Application Error', '\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435'
- ru '&Blue', ' &\u0413\u043e\u043b\u0443\u0431\u043e\u0439'
- ru '&Cancel', '\u041e\u0442&\u043c\u0435\u043d\u0430'
- ru 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.' \
- '\u041d\u0435 \u043c\u043e\u0433\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 "%1\$s".' "\n" '\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430'
- ru 'Choose Directory', '\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433'
- ru 'Clear', '\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c'
- ru 'Color', '\u0426\u0432\u0435\u0442'
- ru 'Console', '\u041a\u043e\u043d\u0441\u043e\u043b\u044c'
- ru 'Copy', '\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c'
- ru 'Cut', '\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c'
- ru 'Delete', '\u0423\u0434\u0430\u043b\u0438\u0442\u044c'
- ru 'Details >>', '\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 >>'
- ru 'Directory "%1\$s" does not exist.', '\u041a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 "%1\$s" \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.'
- ru '&Directory:', '&\u041a\u0430\u0442\u0430\u043b\u043e\u0433:'
- ru 'Error: %1\$s', '\u041e\u0448\u0438\u0431\u043a\u0430: %1\$s'
- ru 'Exit', '\u0412\u044b\u0445\u043e\u0434'
- ru 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?' \
- '\u0424\u0430\u0439\u043b "%1\$s" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.' "\n" '\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e?'
- ru 'File "%1\$s" already exists.' "\n\n", '\u0424\u0430\u0439\u043b "%1\$s" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.' "\n\n"
- ru 'File "%1\$s" does not exist.', '\u0424\u0430\u0439\u043b "%1\$s" \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.'
- ru 'File &name:', '&\u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430:'
- ru 'File &names:', '&\u0418\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432:'
- ru 'Files of &type:', '&\u0422\u0438\u043f \u0444\u0430\u0439\u043b\u043e\u0432:'
- ru 'Fi&les:', '\u0424\u0430\u0439&\u043b\u044b:'
- ru '&Filter', '&\u0424\u0438\u043b\u044c\u0442\u0440'
- ru 'Fil&ter:', '\u0424\u0438\u043b\u044c&\u0442\u0440:'
- ru '&Green', ' &\u0417\u0435\u043b\u0435\u043d\u044b\u0439'
- ru 'Hi', '\u041f\u0440\u0438\u0432\u0435\u0442'
- ru 'Hide Console', '\u0421\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c'
- ru '&Ignore', '&\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c'
- ru 'Invalid file name "%1\$s".', '\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 "%1\$s".'
- ru 'Log Files', '\u0424\u0430\u0439\u043b\u044b \u0436\u0443\u0440\u043d\u0430\u043b\u0430'
- ru '&No', '&\u041d\u0435\u0442'
- ru '&OK', '&\u041e\u041a'
- ru 'Ok', '\u0414\u0430'
- ru 'Open', '\u041e\u0442\u043a\u0440\u044b\u0442\u044c'
- ru '&Open', '&\u041e\u0442\u043a\u0440\u044b\u0442\u044c'
- ru 'Open Multiple Files', '\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432'
- ru 'Paste', '\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c'
- ru 'Quit', '\u0412\u044b\u0445\u043e\u0434'
- ru '&Red', ' &\u041a\u0440\u0430\u0441\u043d\u044b\u0439'
- ru 'Replace existing file?', '\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b?'
- ru '&Retry', '&\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c'
- ru '&Save', '&\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c'
- ru 'Save As', '\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u043a'
- ru 'Save To Log', '\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b'
- ru 'Select Log File', '\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b'
- ru 'Select a file to source', '\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438'
- ru '&Selection:', '&Selection:'
- ru 'Skip Messages', '\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f'
- ru 'Source...', '\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b...'
- ru 'Tcl Scripts', '\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 TCL'
- ru 'Tcl for Windows', 'TCL \u0434\u043b\u044f Windows'
- ru 'Text Files', '\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b'
- ru '&Yes', '&\u0414\u0430'
- ru 'abort', '\u043e\u0442\u043c\u0435\u043d\u0430'
- ru 'blue', ' \u0433\u043e\u043b\u0443\u0431\u043e\u0439'
- ru 'cancel', '\u043e\u0442\u043c\u0435\u043d\u0430'
- ru 'extension', '\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435'
- ru 'extensions', '\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f'
- ru 'green', ' \u0437\u0435\u043b\u0435\u043d\u044b\u0439'
- ru 'ignore', '\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c'
- ru 'ok', '\u043e\u043a'
- ru 'red', ' \u043a\u0440\u0430\u0441\u043d\u044b\u0439'
- ru 'retry', '\u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c'
- ru 'yes', '\u0434\u0430'
-}
-
diff --git a/ext/tk/sample/msgs_rb2/README b/ext/tk/sample/msgs_rb2/README
deleted file mode 100644
index f6a904b3b6..0000000000
--- a/ext/tk/sample/msgs_rb2/README
+++ /dev/null
@@ -1,5 +0,0 @@
-Message catalogs in this directory are written in encodings except
-UTF-8. As if you have a trouble to edit UTF-8 text, you can write
-message catalogs in your familier encoding.
-
-Please see '../msgs_rb/README' too.
diff --git a/ext/tk/sample/msgs_rb2/de.msg b/ext/tk/sample/msgs_rb2/de.msg
deleted file mode 100644
index 0d6c82d9e5..0000000000
--- a/ext/tk/sample/msgs_rb2/de.msg
+++ /dev/null
@@ -1,88 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- de 'Application Error', 'Applikationsfehler'
- de 'Blue', 'Blau'
- de 'Color', 'Farbe'
- de 'Delete', 'Löschen', 'iso8859-1'
- de 'Error', 'Fehler'
- de 'Exit', 'Ende'
- de 'Green', 'Grün', 'iso8859-1'
- de 'Red', 'Rot'
- de 'blue', 'blau'
- de 'green', 'grün', 'iso8859-1'
- de 'red', 'rot'
-}
-
-TkMsgCatalog.new('::tk') {
- de "&Abort", "&Abbruch"
- de "&About...", "&Über...", 'iso8859-1'
- de "All Files", "Alle Dateien"
- de "Application Error", "Applikationsfehler"
- de "&Blue", "&Blau"
- de "&Cancel", "&Abbruch"
- de "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Kann nicht in das Verzeichnis \"%1\$s\" wechseln.\nKeine Rechte vorhanden."
- de "Choose Directory", "Wähle Verzeichnis", 'iso8859-1'
- de "&Clear", "&Rücksetzen", 'iso8859-1'
- de "&Clear Console", "&Konsole löschen", 'iso8859-1'
- de "Color", "Farbe"
- de "Console", "Konsole"
- de "&Copy", "&Kopieren"
- de "Cu&t", "Aus&schneiden"
- de '&Delete', '&Löschen', 'iso8859-1'
- de "Details >>"
- de "Directory \"%1\$s\" does not exist.", "Das Verzeichnis \"%1\$s\" existiert nicht."
- de "&Directory:", "&Verzeichnis:"
- de "&Edit", "&Bearbieten"
- de "Error: %1\$s", "Fehler: %1\$s"
- de "E&xit", "&Ende"
- de "&File", "&Datei"
- de "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Die Datei \"%1\$s\" ist bereits vorhanden.\nWollen sie diese Datei überschreiben ?", 'iso8859-1'
- de "File \"%1\$s\" already exists.\n\n", "Die Datei \"%1\$s\" ist bereits vorhanden.\n\n"
- de "File \"%1\$s\" does not exist.", "Die Datei \"%1\$s\" existiert nicht."
- de "File &name:", "Datei&name:"
- de "File &names:", "Datei&namen:"
- de "Files of &type:", "Dateien des &Typs:"
- de "Fi&les:", "Dat&eien:"
- de "&Filter"
- de "Fil&ter:"
- de '&Green', '&Grün', 'iso8859-1'
- de "&Help", "&Hilfe"
- de "Hi", "Hallo"
- de "&Hide Console", "&Konsole unsichtbar machen"
- de "&Ignore", "&Ignorieren"
- de "Invalid file name \"%1\$s\".", "Ungültiger Dateiname \"%1\$s\".", 'iso8859-1'
- de "Log Files", "Protokolldatei"
- de "&No", "&Nein"
- de "OK"
- de "Ok"
- de "Open", "Öffnen", 'iso8859-1'
- de "&Open", "Ö&ffnen", 'iso8859-1'
- de "Open Multiple Files"
- de "P&aste", "E&infügen", 'iso8859-1'
- de "&Quit", "&Beenden"
- de "&Red", "&Rot"
- de "Replace existing file?", "Existierende Datei ersetzen?"
- de "&Retry", "&Wiederholen"
- de "&Save", "&Speichern"
- de "Save As", "Speichern unter"
- de "Save To Log", "In Protokoll speichern"
- de "Select Log File", "Protokolldatei auswählen", 'iso8859-1'
- de "Select a file to source", "Auszuführende Datei auswählen", 'iso8859-1'
- de "&Selection:", "Auswah&l:"
- de "Skip Messages", "Weitere Nachrichten überspringen", 'iso8859-1'
- de "&Source...", "&Ausführen...", 'iso8859-1'
- de "Tcl Scripts", "Tcl-Skripte"
- de "Tcl for Windows", "Tcl für Windows", 'iso8859-1'
- de "Text Files", "Textdateien"
- de "&Yes", "&Ja"
- de "abort", "abbrechen"
- de "blue", "blau"
- de "cancel", "abbrechen"
- de "extension", "Erweiterung"
- de "extensions", "Erweiterungen"
- de 'green', 'grün', 'iso8859-1'
- de "ignore", "ignorieren"
- de "ok"
- de "red", "rot"
- de "retry", "wiederholen"
- de "yes", "ja"
-}
diff --git a/ext/tk/sample/msgs_rb2/ja.msg b/ext/tk/sample/msgs_rb2/ja.msg
deleted file mode 100644
index 54a105b61f..0000000000
--- a/ext/tk/sample/msgs_rb2/ja.msg
+++ /dev/null
@@ -1,85 +0,0 @@
-TkMsgCatalog.new('::tkmsgcat_demo') {
- ja 'Application Error', 'アプリケーションエラー', 'utf-8'
- ja 'Blue', 'é’', 'utf-8'
- ja 'Color', '色é¸æŠž', 'utf-8'
- ja 'Delete', '消去', 'utf-8'
- ja 'Error', 'エラー', 'utf-8'
- ja 'Exit', '終了', 'utf-8'
- ja 'Green', 'ç·‘', 'utf-8'
- ja 'Red', '赤', 'utf-8'
- ja 'blue', 'é’', 'utf-8'
- ja 'green', 'ç·‘', 'utf-8'
- ja 'red', '赤', 'utf-8'
-}
-
-TkMsgCatalog.new('::tk') {
- ja "&Abort", '中止', 'utf-8'
- ja "About..."
- ja "All Files", 'ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«', 'utf-8'
- ja "Application Error", 'アプリケーションエラー', 'utf-8'
- ja "&Blue", 'é’', 'utf-8'
- ja "&Cancel", 'å–り消ã—', 'utf-8'
- ja "Cannot change to the directory \"%1\$s\".\nPermission denied.", "ディレクトリ \"%1\$s\" ã«å¤‰æ›´ã§ãã¾ã›ã‚“.\n許å¯ãŒã‚ã‚Šã¾ã›ã‚“.", 'utf-8'
- ja "Choose Directory", 'ディレクトリをé¸æŠž', 'utf-8'
- ja "Clear", '消去', 'utf-8'
- ja "Color", '色', 'utf-8'
- ja "Console", 'コンソール', 'utf-8'
- ja "Copy", 'コピー', 'utf-8'
- ja "Cut", '切りå–ã‚Š', 'utf-8'
- ja "Delete", '消去', 'utf-8'
- ja "Details >>", '詳細 >>', 'utf-8'
- ja "Directory \"%1\$s\" does not exist.", '"%1$s" ã¨ã„ã†ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯å­˜åœ¨ã—ã¾ã›ã‚“.', 'utf-8'
- ja "&Directory:", 'ディレクトリ', 'utf-8'
- ja "Error: %1\$s"
- ja "Exit", '終了', 'utf-8'
- ja "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "\"%1\$s\" ã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ—¢ã«å­˜åœ¨ã—ã¦ã„ã¾ã™ï¼Ž\n書ãæ›ãˆã¾ã™ã‹ï¼Ÿ", 'utf-8'
- ja "File \"%1\$s\" already exists.\n\n", "\"%1\$s\" ã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ—¢ã«å­˜åœ¨ã—ã¦ã„ã¾ã™ï¼Ž\n\n", 'utf-8'
- ja "File \"%1\$s\" does not exist.", '"%1$s" ã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«ã¯å­˜åœ¨ã—ã¾ã›ã‚“.', 'utf-8'
- ja "File &name:", 'ファイルå', 'utf-8'
- ja "File &names:", 'ファイルå', 'utf-8'
- ja "Files of &type:", 'ファイル形å¼', 'utf-8'
- ja "Fi&les:", 'ファイル', 'utf-8'
- ja "&Filter", 'フィルター', 'utf-8'
- ja "Fil&ter:", 'フィルター', 'utf-8'
- ja "&Green", 'ç·‘', 'utf-8'
- ja "Hi", 'ã“ã‚“ã«ã¡ã¯', 'utf-8'
- ja "Hide Console", 'コンソールを隠ã™', 'utf-8'
- ja "&Ignore", '無視', 'utf-8'
- ja "Invalid file name \"%1\$s\".", '"%1$s" ã¯ä¸æ­£ãªãƒ•ã‚¡ã‚¤ãƒ«åã§ã™ï¼Ž', 'utf-8'
- ja "Log Files", 'ログファイル', 'utf-8'
- ja "&No", 'ã„ã„ãˆ', 'utf-8'
- ja "&OK", '了解', 'utf-8'
- ja "OK", '了解', 'utf-8'
- ja "Ok", '了解', 'utf-8'
- ja "Open", 'é–‹ã', 'utf-8'
- ja "&Open", 'é–‹ã', 'utf-8'
- ja "Open Multiple Files", '複数ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é–‹ã', 'utf-8'
- ja "Paste", '貼り付ã‘', 'utf-8'
- ja "Quit", '終了', 'utf-8'
- ja "&Red", '赤', 'utf-8'
- ja "Replace existing file?", '既存ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ç½®ãæ›ãˆã¾ã™ã‹ï¼Ÿ', 'utf-8'
- ja "&Retry", 'å†å®Ÿè¡Œ', 'utf-8'
- ja "&Save", 'ä¿å­˜', 'utf-8'
- ja "Save As", 'åå‰ã‚’付ã‘ã¦ä¿å­˜', 'utf-8'
- ja "Save To Log", 'ログをä¿å­˜', 'utf-8'
- ja "Select Log File", 'ログファイルをé¸æŠž', 'utf-8'
- ja "Select a file to source", 'ソースファイルをé¸æŠž', 'utf-8'
- ja "&Selection:", 'é¸æŠž', 'utf-8'
- ja "Skip Messages", 'メッセージをã¨ã°ã™', 'utf-8'
- ja "Source...", 'ソース...', 'utf-8'
- ja "Tcl Scripts", 'Tcl スクリプト', 'utf-8'
- ja "Tcl for Windows"
- ja "Text Files", 'テキストファイル', 'utf-8'
- ja "&Yes", 'ã¯ã„', 'utf-8'
- ja "abort", '中止', 'utf-8'
- ja "blue", 'é’', 'utf-8'
- ja "cancel", 'å–り消ã—', 'utf-8'
- ja "extension", 'æ‹¡å¼µå­', 'utf-8'
- ja "extensions", 'æ‹¡å¼µå­', 'utf-8'
- ja "green", 'ç·‘', 'utf-8'
- ja "ignore", '無視', 'utf-8'
- ja "ok", '了解', 'utf-8'
- ja "red", '赤', 'utf-8'
- ja "retry", 'å†å®Ÿè¡Œ', 'utf-8'
- ja "yes", 'ã¯ã„', 'utf-8'
-}
diff --git a/ext/tk/sample/msgs_tk/README b/ext/tk/sample/msgs_tk/README
deleted file mode 100644
index 949ee7a896..0000000000
--- a/ext/tk/sample/msgs_tk/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Almost all of Message-Catalog files in this directory are quoted
-from Tcl/Tk8.5a1 source archive (only a little are modified for
-'tkmsgcat-load_tk.rb'). Please read the file 'license.terms' in
-this directory (That was included in demo directory of Tcl/Tk8.5a1).
diff --git a/ext/tk/sample/msgs_tk/cs.msg b/ext/tk/sample/msgs_tk/cs.msg
deleted file mode 100644
index 697070985e..0000000000
--- a/ext/tk/sample/msgs_tk/cs.msg
+++ /dev/null
@@ -1,84 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset cs "Application Error" "Chyba programu"
- ::msgcat::mcset cs "Blue" "Modr\341"
- ::msgcat::mcset cs "Color" "Barva"
- ::msgcat::mcset cs "Delete" "Smazat"
- ::msgcat::mcset cs "Error" "Chyba"
- ::msgcat::mcset cs "Exit" "Konec"
- ::msgcat::mcset cs "Green" "Zelen\341"
- ::msgcat::mcset cs "Red" "\u010cerven\341"
- ::msgcat::mcset cs "blue" "modr\341"
- ::msgcat::mcset cs "green" "zelen\341"
- ::msgcat::mcset cs "red" "\u010derven\341"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset cs "&Abort" "&P\u0159eru\u0161it"
- ::msgcat::mcset cs "About..." "O programu..."
- ::msgcat::mcset cs "All Files" "V\u0161echny soubory"
- ::msgcat::mcset cs "Application Error" "Chyba programu"
- ::msgcat::mcset cs "&Blue" "&Modr\341"
- ::msgcat::mcset cs "&Cancel" "&Zru\u0161it"
- ::msgcat::mcset cs "Cannot change to the directory \"%1\$s\".\nPermission denied." "Nemohu zm\u011bnit atku\341ln\355 adres\341\u0159 na \"%1\$s\".\nP\u0159\355stup odm\355tnut."
- ::msgcat::mcset cs "Choose Directory" "V\375b\u011br adres\341\u0159e"
- ::msgcat::mcset cs "Clear" "Smazat"
- ::msgcat::mcset cs "Color" "Barva"
- ::msgcat::mcset cs "Console" "Konzole"
- ::msgcat::mcset cs "Copy" "Kop\355rovat"
- ::msgcat::mcset cs "Cut" "Vy\u0159\355znout"
- ::msgcat::mcset cs "Delete" "Smazat"
- ::msgcat::mcset cs "Details >>" "Detaily >>"
- ::msgcat::mcset cs "Directory \"%1\$s\" does not exist." "Adres\341\u0159 \"%1\$s\" neexistuje."
- ::msgcat::mcset cs "&Directory:" "&Adres\341\u0159:"
- ::msgcat::mcset cs "Error: %1\$s" "Chyba: %1\$s"
- ::msgcat::mcset cs "Exit" "Konec"
- ::msgcat::mcset cs "File \"%1\$s\" already exists.\n\n" "Soubor \"%1\$s\" ji\u017e existuje.\n\n"
- ::msgcat::mcset cs "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Soubor \"%1\$s\" ji\u017e existuje.\nChcete jej p\u0159epsat?"
- ::msgcat::mcset cs "File \"%1\$s\" does not exist." "Soubor \"%1\$s\" neexistuje."
- ::msgcat::mcset cs "File &name:" "&Jm\351no souboru:"
- ::msgcat::mcset cs "File &names:" "&Jm\351na soubor\u016f:"
- ::msgcat::mcset cs "Files of &type:" "&Typy soubor\u016f:"
- ::msgcat::mcset cs "Fi&les:" "Sou&bory:"
- ::msgcat::mcset cs "&Filter" "&Filtr"
- ::msgcat::mcset cs "Fil&ter:" "Fil&tr:"
- ::msgcat::mcset cs "&Green" "Ze&len\341"
- ::msgcat::mcset cs "Hi"
- ::msgcat::mcset cs "Hide Console" "Skr\375t konsolu"
- ::msgcat::mcset cs "&Ignore" "&Ignorovat"
- ::msgcat::mcset cs "Invalid file name \"%1\$s\"." "\u0160patn\351 jm\351no souboru \"%1\$s\"."
- ::msgcat::mcset cs "Log Files" "Log soubory"
- ::msgcat::mcset cs "&No" "&Ne"
- ::msgcat::mcset cs "&OK"
- ::msgcat::mcset cs "Ok"
- ::msgcat::mcset cs "Open" "Otev\u0159\355t"
- ::msgcat::mcset cs "&Open" "&Otev\u0159\355t"
- ::msgcat::mcset cs "Open Multiple Files" "Otev\u0159\355t v\355ce soubor\u016f"
- ::msgcat::mcset cs "Paste" "Vlo\u017eit"
- ::msgcat::mcset cs "Quit" "Skon\u010dit"
- ::msgcat::mcset cs "&Red" " \u010ce&rven\341"
- ::msgcat::mcset cs "Replace existing file?" "Nahradit st\341vaj\355c\355 soubor?"
- ::msgcat::mcset cs "&Retry" "Z&novu"
- ::msgcat::mcset cs "&Save" "&Ulo\u017eit"
- ::msgcat::mcset cs "Save As" "Ulo\u017eit jako"
- ::msgcat::mcset cs "Save To Log" "Ulo\u017eit do logu"
- ::msgcat::mcset cs "Select Log File" "Vybrat log soubor"
- ::msgcat::mcset cs "Select a file to source" "Vybrat soubor k nahr\341n\355"
- ::msgcat::mcset cs "&Selection:" "&V\375b\u011br:"
- ::msgcat::mcset cs "Skip Messages" "P\u0159esko\u010dit zpr\341vy"
- ::msgcat::mcset cs "Source..." "Nahr\341t..."
- ::msgcat::mcset cs "Tcl Scripts" "Tcl skripty"
- ::msgcat::mcset cs "Tcl for Windows" "Tcl pro Windows"
- ::msgcat::mcset cs "Text Files" "Textov\351 soubory"
- ::msgcat::mcset cs "&Yes" "&Ano"
- ::msgcat::mcset cs "abort" "p\u0159eru\u0161it"
- ::msgcat::mcset cs "blue" "modr\341"
- ::msgcat::mcset cs "cancel" "zru\u0161it"
- ::msgcat::mcset cs "extension" "p\u0159\355pona"
- ::msgcat::mcset cs "extensions" "p\u0159\355pony"
- ::msgcat::mcset cs "green" "zelen\341"
- ::msgcat::mcset cs "ignore" "ignorovat"
- ::msgcat::mcset cs "ok"
- ::msgcat::mcset cs "red" "\u010derven\341"
- ::msgcat::mcset cs "retry" "znovu"
- ::msgcat::mcset cs "yes" "ano"
-}
diff --git a/ext/tk/sample/msgs_tk/de.msg b/ext/tk/sample/msgs_tk/de.msg
deleted file mode 100644
index 437f2ed9e7..0000000000
--- a/ext/tk/sample/msgs_tk/de.msg
+++ /dev/null
@@ -1,88 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset de "Application Error" "Applikationsfehler"
- ::msgcat::mcset de "Blue" "Blau"
- ::msgcat::mcset de "Color" "Farbe"
- ::msgcat::mcset de "Delete" "L\u00f6schen"
- ::msgcat::mcset de "Error" "Fehler"
- ::msgcat::mcset de "Exit" "Ende"
- ::msgcat::mcset de "Green" "Gr\u00fcn"
- ::msgcat::mcset de "Red" "Rot"
- ::msgcat::mcset de "blue" "blau"
- ::msgcat::mcset de "green" "gr\u00fcn"
- ::msgcat::mcset de "red" "rot"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset de "&Abort" "&Abbruch"
- ::msgcat::mcset de "&About..." "&\u00dcber..."
- ::msgcat::mcset de "All Files" "Alle Dateien"
- ::msgcat::mcset de "Application Error" "Applikationsfehler"
- ::msgcat::mcset de "&Blue" "&Blau"
- ::msgcat::mcset de "&Cancel" "&Abbruch"
- ::msgcat::mcset de "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kann nicht in das Verzeichnis \"%1\$s\" wechseln.\nKeine Rechte vorhanden."
- ::msgcat::mcset de "Choose Directory" "W\u00e4hle Verzeichnis"
- ::msgcat::mcset de "&Clear" "&R\u00fccksetzen"
- ::msgcat::mcset de "&Clear Console" "&Konsole l\u00f6schen"
- ::msgcat::mcset de "Color" "Farbe"
- ::msgcat::mcset de "Console" "Konsole"
- ::msgcat::mcset de "&Copy" "&Kopieren"
- ::msgcat::mcset de "Cu&t" "Aus&schneiden"
- ::msgcat::mcset de "&Delete" "&L\u00f6schen"
- ::msgcat::mcset de "Details >>"
- ::msgcat::mcset de "Directory \"%1\$s\" does not exist." "Das Verzeichnis \"%1\$s\" existiert nicht."
- ::msgcat::mcset de "&Directory:" "&Verzeichnis:"
- ::msgcat::mcset de "&Edit" "&Bearbieten"
- ::msgcat::mcset de "Error: %1\$s" "Fehler: %1\$s"
- ::msgcat::mcset de "E&xit" "&Ende"
- ::msgcat::mcset de "&File" "&Datei"
- ::msgcat::mcset de "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Die Datei \"%1\$s\" ist bereits vorhanden.\nWollen sie diese Datei \u00fcberschreiben ?"
- ::msgcat::mcset de "File \"%1\$s\" already exists.\n\n" "Die Datei \"%1\$s\" ist bereits vorhanden.\n\n"
- ::msgcat::mcset de "File \"%1\$s\" does not exist." "Die Datei \"%1\$s\" existiert nicht."
- ::msgcat::mcset de "File &name:" "Datei&name:"
- ::msgcat::mcset de "File &names:" "Datei&namen:"
- ::msgcat::mcset de "Files of &type:" "Dateien des &Typs:"
- ::msgcat::mcset de "Fi&les:" "Dat&eien:"
- ::msgcat::mcset de "&Filter"
- ::msgcat::mcset de "Fil&ter:"
- ::msgcat::mcset de "&Green" "&Gr\u00fcn"
- ::msgcat::mcset de "&Help" "&Hilfe"
- ::msgcat::mcset de "Hi" "Hallo"
- ::msgcat::mcset de "&Hide Console" "&Konsole unsichtbar machen"
- ::msgcat::mcset de "&Ignore" "&Ignorieren"
- ::msgcat::mcset de "Invalid file name \"%1\$s\"." "Ung\u00fcltiger Dateiname \"%1\$s\"."
- ::msgcat::mcset de "Log Files" "Protokolldatei"
- ::msgcat::mcset de "&No" "&Nein"
- ::msgcat::mcset de "OK"
- ::msgcat::mcset de "Ok"
- ::msgcat::mcset de "Open" "\u00d6ffnen"
- ::msgcat::mcset de "&Open" "\u00d6&ffnen"
- ::msgcat::mcset de "Open Multiple Files"
- ::msgcat::mcset de "P&aste" "E&inf\u00fcgen"
- ::msgcat::mcset de "&Quit" "&Beenden"
- ::msgcat::mcset de "&Red" "&Rot"
- ::msgcat::mcset de "Replace existing file?" "Existierende Datei ersetzen?"
- ::msgcat::mcset de "&Retry" "&Wiederholen"
- ::msgcat::mcset de "&Save" "&Speichern"
- ::msgcat::mcset de "Save As" "Speichern unter"
- ::msgcat::mcset de "Save To Log" "In Protokoll speichern"
- ::msgcat::mcset de "Select Log File" "Protokolldatei ausw\u00e4hlen"
- ::msgcat::mcset de "Select a file to source" "Auszuf\u00fchrende Datei ausw\u00e4hlen"
- ::msgcat::mcset de "&Selection:" "Auswah&l:"
- ::msgcat::mcset de "Skip Messages" "Weitere Nachrichten \u00fcberspringen"
- ::msgcat::mcset de "&Source..." "&Ausf\u00fchren..."
- ::msgcat::mcset de "Tcl Scripts" "Tcl-Skripte"
- ::msgcat::mcset de "Tcl for Windows" "Tcl f\u00fcr Windows"
- ::msgcat::mcset de "Text Files" "Textdateien"
- ::msgcat::mcset de "&Yes" "&Ja"
- ::msgcat::mcset de "abort" "abbrechen"
- ::msgcat::mcset de "blue" "blau"
- ::msgcat::mcset de "cancel" "abbrechen"
- ::msgcat::mcset de "extension" "Erweiterung"
- ::msgcat::mcset de "extensions" "Erweiterungen"
- ::msgcat::mcset de "green" "gr\u00fcn"
- ::msgcat::mcset de "ignore" "ignorieren"
- ::msgcat::mcset de "ok"
- ::msgcat::mcset de "red" "rot"
- ::msgcat::mcset de "retry" "wiederholen"
- ::msgcat::mcset de "yes" "ja"
-}
diff --git a/ext/tk/sample/msgs_tk/el.msg b/ext/tk/sample/msgs_tk/el.msg
deleted file mode 100644
index ee75af3ced..0000000000
--- a/ext/tk/sample/msgs_tk/el.msg
+++ /dev/null
@@ -1,103 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset el "Application Error" "\u039b\u03ac\u03b8\u03bf\u03c2 \u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2"
- ::msgcat::mcset el "Blue" "\u039c\u03c0\u03bb\u03b5"
- ::msgcat::mcset el "Color" "\u03a7\u03c1\u03ce\u03bc\u03b1"
- ::msgcat::mcset el "Delete" "\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae"
- ::msgcat::mcset el "Error" "\u039b\u03ac\u03b8\u03bf\u03c2"
- ::msgcat::mcset el "Exit" "\u0388\u03be\u03bf\u03b4\u03bf\u03c2"
- ::msgcat::mcset el "Green" "\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "Red" "\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "blue" "\u03bc\u03c0\u03bb\u03b5"
- ::msgcat::mcset el "green" "\u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "red" "\u03ba\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf"
-}
-
-
-# followings are same to original file included into Tk8.5a1's widget demos.
-
-## Messages for the Greek (Hellenic - "el") language.
-## Please report any changes/suggestions to:
-## petasis@iit.demokritos.gr
-
-namespace eval ::tk {
- ::msgcat::mcset el "&Abort" "\u03a4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2"
- ::msgcat::mcset el "About..." "\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac..."
- ::msgcat::mcset el "All Files" "\u038c\u03bb\u03b1 \u03c4\u03b1 \u0391\u03c1\u03c7\u03b5\u03af\u03b1"
- ::msgcat::mcset el "Application Error" "\u039b\u03ac\u03b8\u03bf\u03c2 \u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2"
- ::msgcat::mcset el "&Blue" "\u039c\u03c0\u03bb\u03b5"
- ::msgcat::mcset el "&Cancel" "\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7"
- ::msgcat::mcset el \
-"Cannot change to the directory \"%1\$s\".\nPermission denied." \
-"\u0394\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03c5\u03bd\u03b1\u03c4\u03ae \u03b7 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03ba\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5 \u03c3\u03b5 \"%1\$s\".\n\u0397 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7 \u03b4\u03b5\u03bd \u03b5\u03c0\u03b9\u03c4\u03c1\u03ad\u03c0\u03b5\u03c4\u03b1\u03b9."
- ::msgcat::mcset el "Choose Directory" "\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u039a\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5"
- ::msgcat::mcset el "Clear" "\u039a\u03b1\u03b8\u03b1\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2"
- ::msgcat::mcset el "Color" "\u03a7\u03c1\u03ce\u03bc\u03b1"
- ::msgcat::mcset el "Console" "\u039a\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1"
- ::msgcat::mcset el "Copy" "\u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae"
- ::msgcat::mcset el "Cut" "\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae"
- ::msgcat::mcset el "Delete" "\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae"
- ::msgcat::mcset el "Details >>" "\u039b\u03b5\u03c0\u03c4\u03bf\u03bc\u03ad\u03c1\u03b5\u03b9\u03b5\u03c2 >>"
- ::msgcat::mcset el "Directory \"%1\$s\" does not exist." \
- "\u039f \u03ba\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2 \"%1\$s\" \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9."
- ::msgcat::mcset el "&Directory:" "&\u039a\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2:"
- ::msgcat::mcset el "Error: %1\$s" "\u039b\u03ac\u03b8\u03bf\u03c2: %1\$s"
- ::msgcat::mcset el "Exit" "\u0388\u03be\u03bf\u03b4\u03bf\u03c2"
- ::msgcat::mcset el \
- "File \"%1\$s\" already exists.\nDo you want to overwrite it?" \
- "\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \"%1\$s\" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.\n\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03b5\u03c0\u03b9\u03ba\u03b1\u03bb\u03c5\u03c6\u03b8\u03b5\u03af;"
- ::msgcat::mcset el "File \"%1\$s\" already exists.\n\n" \
- "\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \"%1\$s\" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.\n\n"
- ::msgcat::mcset el "File \"%1\$s\" does not exist." \
- "\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \"%1\$s\" \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9."
- ::msgcat::mcset el "File &name:" "\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5:"
- ::msgcat::mcset el "File &names:" "\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd:"
- ::msgcat::mcset el "Files of &type:" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u03c4\u03bf\u03c5 &\u03c4\u03cd\u03c0\u03bf\u03c5:"
- ::msgcat::mcset el "Fi&les:" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1:"
- ::msgcat::mcset el "&Filter" "\u03a6\u03af\u03bb\u03c4\u03c1\u03bf"
- ::msgcat::mcset el "Fil&ter:" "\u03a6\u03af\u03bb\u03c4\u03c1\u03bf:"
- ::msgcat::mcset el "&Green" "\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "Hi" "\u0393\u03b5\u03b9\u03b1"
- ::msgcat::mcset el "Hide Console" "\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03ba\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1\u03c2"
- ::msgcat::mcset el "&Ignore" "\u0391\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7"
- ::msgcat::mcset el "Invalid file name \"%1\$s\"." \
- "\u0386\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \"%1\$s\"."
- ::msgcat::mcset el "Log Files" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2"
- ::msgcat::mcset el "&No" "\u038c\u03c7\u03b9"
- ::msgcat::mcset el "&OK" "\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9"
- ::msgcat::mcset el "&Ok" "\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9"
- ::msgcat::mcset el "Open" "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1"
- ::msgcat::mcset el "&Open" "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1"
- ::msgcat::mcset el "Open Multiple Files" \
- "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c0\u03bf\u03bb\u03bb\u03b1\u03c0\u03bb\u03ce\u03bd \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd"
- ::msgcat::mcset el "Paste" "\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7"
- ::msgcat::mcset el "Quit" "\u0388\u03be\u03bf\u03b4\u03bf\u03c2"
- ::msgcat::mcset el "&Red" "\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "Replace existing file?" \
- "\u0395\u03c0\u03b9\u03ba\u03ac\u03bb\u03c5\u03c8\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03bf\u03bd\u03c4\u03bf\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5;"
- ::msgcat::mcset el "&Retry" "\u03a0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac"
- ::msgcat::mcset el "&Save" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7"
- ::msgcat::mcset el "Save As" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03b1\u03bd"
- ::msgcat::mcset el "Save To Log" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03c4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2"
- ::msgcat::mcset el "Select Log File" "\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2"
- ::msgcat::mcset el "Select a file to source" \
- "\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03b3\u03b9\u03b1 \u03b5\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7"
- ::msgcat::mcset el "&Selection:" "\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae:"
- ::msgcat::mcset el "Skip Messages" "\u0391\u03c0\u03bf\u03c6\u03c5\u03b3\u03ae \u03bc\u03c5\u03bd\u03b7\u03bc\u03ac\u03c4\u03c9\u03bd"
- ::msgcat::mcset el "Source..." "\u0395\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7..."
- ::msgcat::mcset el "Tcl Scripts" "Tcl Scripts"
- ::msgcat::mcset el "Tcl for Windows" "Tcl \u03b3\u03b9\u03b1 Windows"
- ::msgcat::mcset el "Text Files" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5"
- ::msgcat::mcset el "&Yes" "\u039d\u03b1\u03b9"
- ::msgcat::mcset el "abort" "\u03c4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2"
- ::msgcat::mcset el "blue" "\u03bc\u03c0\u03bb\u03b5"
- ::msgcat::mcset el "cancel" "\u03b1\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7"
- ::msgcat::mcset el "extension" "\u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7"
- ::msgcat::mcset el "extensions" "\u03b5\u03c0\u03b5\u03ba\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2"
- ::msgcat::mcset el "green" "\u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "ignore" "\u03b1\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7"
- ::msgcat::mcset el "ok" "\u03b5\u03bd\u03c4\u03ac\u03be\u03b5\u03b9"
- ::msgcat::mcset el "red" "\u03ba\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "retry" "\u03c0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac"
- ::msgcat::mcset el "yes" "\u03bd\u03b1\u03b9"
-}
-
diff --git a/ext/tk/sample/msgs_tk/en.msg b/ext/tk/sample/msgs_tk/en.msg
deleted file mode 100644
index de586d195e..0000000000
--- a/ext/tk/sample/msgs_tk/en.msg
+++ /dev/null
@@ -1,83 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset en "Application Error"
- ::msgcat::mcset en "Blue"
- ::msgcat::mcset en "Color"
- ::msgcat::mcset en "Delete"
- ::msgcat::mcset en "Error"
- ::msgcat::mcset en "Green"
- ::msgcat::mcset en "Red"
- ::msgcat::mcset en "blue"
- ::msgcat::mcset en "green"
- ::msgcat::mcset en "red"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset en "&Abort"
- ::msgcat::mcset en "About..."
- ::msgcat::mcset en "All Files"
- ::msgcat::mcset en "Application Error"
- ::msgcat::mcset en "&Blue"
- ::msgcat::mcset en "&Cancel"
- ::msgcat::mcset en "Cannot change to the directory \"%1\$s\".\nPermission denied."
- ::msgcat::mcset en "Choose Directory"
- ::msgcat::mcset en "Clear"
- ::msgcat::mcset en "Color"
- ::msgcat::mcset en "Console"
- ::msgcat::mcset en "Copy"
- ::msgcat::mcset en "Cut"
- ::msgcat::mcset en "Delete"
- ::msgcat::mcset en "Details >>"
- ::msgcat::mcset en "Directory \"%1\$s\" does not exist."
- ::msgcat::mcset en "&Directory:"
- ::msgcat::mcset en "Error: %1\$s"
- ::msgcat::mcset en "Exit"
- ::msgcat::mcset en "File \"%1\$s\" already exists.\nDo you want to overwrite it?"
- ::msgcat::mcset en "File \"%1\$s\" already exists.\n\n"
- ::msgcat::mcset en "File \"%1\$s\" does not exist."
- ::msgcat::mcset en "File &name:"
- ::msgcat::mcset en "File &names:"
- ::msgcat::mcset en "Files of &type:"
- ::msgcat::mcset en "Fi&les:"
- ::msgcat::mcset en "&Filter"
- ::msgcat::mcset en "Fil&ter:"
- ::msgcat::mcset en "&Green"
- ::msgcat::mcset en "Hi"
- ::msgcat::mcset en "Hide Console"
- ::msgcat::mcset en "&Ignore"
- ::msgcat::mcset en "Invalid file name \"%1\$s\"."
- ::msgcat::mcset en "Log Files"
- ::msgcat::mcset en "&No"
- ::msgcat::mcset en "&OK"
- ::msgcat::mcset en "Ok"
- ::msgcat::mcset en "Open"
- ::msgcat::mcset en "&Open"
- ::msgcat::mcset en "Open Multiple Files"
- ::msgcat::mcset en "Paste"
- ::msgcat::mcset en "Quit"
- ::msgcat::mcset en "&Red"
- ::msgcat::mcset en "Replace existing file?"
- ::msgcat::mcset en "&Retry"
- ::msgcat::mcset en "&Save"
- ::msgcat::mcset en "Save As"
- ::msgcat::mcset en "Save To Log"
- ::msgcat::mcset en "Select Log File"
- ::msgcat::mcset en "Select a file to source"
- ::msgcat::mcset en "&Selection:"
- ::msgcat::mcset en "Skip Messages"
- ::msgcat::mcset en "Source..."
- ::msgcat::mcset en "Tcl Scripts"
- ::msgcat::mcset en "Tcl for Windows"
- ::msgcat::mcset en "Text Files"
- ::msgcat::mcset en "&Yes"
- ::msgcat::mcset en "abort"
- ::msgcat::mcset en "blue"
- ::msgcat::mcset en "cancel"
- ::msgcat::mcset en "extension"
- ::msgcat::mcset en "extensions"
- ::msgcat::mcset en "green"
- ::msgcat::mcset en "ignore"
- ::msgcat::mcset en "ok"
- ::msgcat::mcset en "red"
- ::msgcat::mcset en "retry"
- ::msgcat::mcset en "yes"
-}
diff --git a/ext/tk/sample/msgs_tk/en_gb.msg b/ext/tk/sample/msgs_tk/en_gb.msg
deleted file mode 100644
index 1aa5b49380..0000000000
--- a/ext/tk/sample/msgs_tk/en_gb.msg
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset en_gb Color Colour
-}
-
-namespace eval ::tk {
- ::msgcat::mcset en_gb Color Colour
-}
diff --git a/ext/tk/sample/msgs_tk/eo.msg b/ext/tk/sample/msgs_tk/eo.msg
deleted file mode 100644
index e683cef297..0000000000
--- a/ext/tk/sample/msgs_tk/eo.msg
+++ /dev/null
@@ -1,87 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset eo "Application Error" "Aplikoerraro"
- ::msgcat::mcset eo "Blue" "Blua"
- ::msgcat::mcset eo "Color" "Farbo"
- ::msgcat::mcset eo "Delete" "Forprenu"
- ::msgcat::mcset eo "Error" "Eraro"
- ::msgcat::mcset eo "Exit" "Eliru"
- ::msgcat::mcset eo "Green" "Verda"
- ::msgcat::mcset eo "Red" "Rosa"
- ::msgcat::mcset eo "blue" "blua"
- ::msgcat::mcset eo "green" "verda"
- ::msgcat::mcset eo "red" "ru\u011da"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset eo "&Abort" "&\u0108esigo"
- ::msgcat::mcset eo "&About..." "Pri..."
- ::msgcat::mcset eo "All Files" "\u0108ioj dosieroj"
- ::msgcat::mcset eo "Application Error" "Aplikoerraro"
- ::msgcat::mcset eo "&Blue" "&Blua"
- ::msgcat::mcset eo "&Cancel" "&Rezignu"
- ::msgcat::mcset eo "Cannot change to the directory \"%1\$s\".\nPermission denied." "Neeble \u0109angi al dosierulon \"%1\$s\".\nVi ne rajtas tion."
- ::msgcat::mcset eo "Choose Directory" "Elektu Dosierujo"
- ::msgcat::mcset eo "&Clear" "&Klaru"
- ::msgcat::mcset eo "&Clear Console" "&Klaru konzolon"
- ::msgcat::mcset eo "Color" "Farbo"
- ::msgcat::mcset eo "Console" "Konzolo"
- ::msgcat::mcset eo "&Copy" "&Kopiu"
- ::msgcat::mcset eo "Cu&t" "&Enpo\u015digu"
- ::msgcat::mcset eo "&Delete" "&Forprenu"
- ::msgcat::mcset eo "Details >>" "Detaloj >>"
- ::msgcat::mcset eo "Directory \"%1\$s\" does not exist." "La dosierujo \"%1\$s\" ne ekzistas."
- ::msgcat::mcset eo "&Directory:" "&Dosierujo:"
- ::msgcat::mcset eo "&Edit" "&Redaktu"
- ::msgcat::mcset eo "Error: %1\$s" "Eraro: %1\$s"
- ::msgcat::mcset eo "E&xit" "&Eliru"
- ::msgcat::mcset eo "&File" "&Dosiero"
- ::msgcat::mcset eo "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "La dosiero \"%1\$s\" jam ekzistas.\n\u0108u vi volas anstata\u00fbigi la dosieron?"
- ::msgcat::mcset eo "File \"%1\$s\" already exists.\n\n" "La dosiero \"%1\$s\" jam egzistas. \n\n"
- ::msgcat::mcset eo "File \"%1\$s\" does not exist." "La dosierp \"%1\$s\" ne estas."
- ::msgcat::mcset eo "File &name:" "Dosiero&nomo:"
- ::msgcat::mcset eo "File &names:" "Dosiero&nomoj:"
- ::msgcat::mcset eo "Files of &type:" "Dosieroj de &Typo:"
- ::msgcat::mcset eo "Fi&les:" "Do&sieroj:"
- ::msgcat::mcset eo "&Filter" "&Filtrilo"
- ::msgcat::mcset eo "Fil&ter:" "&Filtrilo:"
- ::msgcat::mcset eo "&Green" "&Verda"
- ::msgcat::mcset eo "&Help" "&Helpu"
- ::msgcat::mcset eo "Hi" "Saluton"
- ::msgcat::mcset eo "&Hide Console" "&Ka\u015du konzolon"
- ::msgcat::mcset eo "&Ignore" "&Ignoru"
- ::msgcat::mcset eo "Invalid file name \"%1\$s\"." "Malvalida dosieronomo \"%1\$s\"."
- ::msgcat::mcset eo "Log Files" "Protokolo"
- ::msgcat::mcset eo "&No" "&Ne"
- ::msgcat::mcset eo "OK"
- ::msgcat::mcset eo "Ok"
- ::msgcat::mcset eo "Open" "Malfermu"
- ::msgcat::mcset eo "&Open" "&Malfermu"
- ::msgcat::mcset eo "Open Multiple Files" "Melfermu multan dosierojn"
- ::msgcat::mcset eo "P&aste" "&Elpo\u015digi"
- ::msgcat::mcset eo "&Quit" "&Finigu"
- ::msgcat::mcset eo "&Red" "&Rosa"
- ::msgcat::mcset eo "Replace existing file?" "\u0108u anstata\u00fbu ekzistantan dosieron?"
- ::msgcat::mcset eo "&Retry" "&Ripetu"
- ::msgcat::mcset eo "&Save" "&Savu"
- ::msgcat::mcset eo "Save As" "Savu kiel"
- ::msgcat::mcset eo "Save To Log" "Savu en protokolon"
- ::msgcat::mcset eo "Select Log File" "Elektu prokolodosieron"
- ::msgcat::mcset eo "Select a file to source" "Elektu dosieron por interpreti"
- ::msgcat::mcset eo "&Selection:" "&Elekto:"
- ::msgcat::mcset eo "Skip Messages" "transsaltu pluajn mesa\u011dojn"
- ::msgcat::mcset eo "&Source..." "&Fontoprogramo..."
- ::msgcat::mcset eo "Tcl Scripts" "Tcl-skriptoj"
- ::msgcat::mcset eo "Tcl for Windows" "Tcl por vindoso"
- ::msgcat::mcset eo "Text Files" "Tekstodosierojn"
- ::msgcat::mcset eo "&Yes" "&Jes"
- ::msgcat::mcset eo "abort" "\u0109esigo"
- ::msgcat::mcset eo "blue" "blua"
- ::msgcat::mcset eo "cancel" "rezignu"
- ::msgcat::mcset eo "extension" "ekspansio"
- ::msgcat::mcset eo "extensions" "ekspansioj"
- ::msgcat::mcset eo "green" "verda"
- ::msgcat::mcset eo "ignore" "ignorieren"
- ::msgcat::mcset eo "red" "ru\u011da"
- ::msgcat::mcset eo "retry" "ripetu"
- ::msgcat::mcset eo "yes" "jes"
-}
diff --git a/ext/tk/sample/msgs_tk/es.msg b/ext/tk/sample/msgs_tk/es.msg
deleted file mode 100644
index 62ce33d5cc..0000000000
--- a/ext/tk/sample/msgs_tk/es.msg
+++ /dev/null
@@ -1,84 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset es "Application Error" "Error de la aplicaci\u00f3n"
- ::msgcat::mcset es "Blue" "Azul"
- ::msgcat::mcset es "Color" "Color"
- ::msgcat::mcset es "Delete" "Borrar"
- ::msgcat::mcset es "Error" "Error"
- ::msgcat::mcset es "Exit" "Salir"
- ::msgcat::mcset es "Green" "Verde"
- ::msgcat::mcset es "Red" "Rojo"
- ::msgcat::mcset es "blue" "azul"
- ::msgcat::mcset es "green" "verde"
- ::msgcat::mcset es "red" "rojo"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset es "&Abort" "&Abortar"
- ::msgcat::mcset es "About..." "Acerca de ..."
- ::msgcat::mcset es "All Files" "Todos los archivos"
- ::msgcat::mcset es "Application Error" "Error de la aplicaci\u00f3n"
- ::msgcat::mcset es "&Blue" "&Azul"
- ::msgcat::mcset es "&Cancel" "&Cancelar"
- ::msgcat::mcset es "Cannot change to the directory \"%1\$s\".\nPermission denied." "No es posible acceder al directorio \"%1\$s\".\nPermiso denegado."
- ::msgcat::mcset es "Choose Directory" "Elegir directorio"
- ::msgcat::mcset es "Clear" "Borrar"
- ::msgcat::mcset es "Color" "Color"
- ::msgcat::mcset es "Console" "Consola"
- ::msgcat::mcset es "Copy" "Copiar"
- ::msgcat::mcset es "Cut" "Cortar"
- ::msgcat::mcset es "Delete" "Borrar"
- ::msgcat::mcset es "Details >>" "Detalles >>"
- ::msgcat::mcset es "Directory \"%1\$s\" does not exist." "El directorio \"%1\$s\" no existe."
- ::msgcat::mcset es "&Directory:" "&Directorio:"
- ::msgcat::mcset es "Error: %1\$s" "Error: %1\$s"
- ::msgcat::mcset es "Exit" "Salir"
- ::msgcat::mcset es "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "El archivo \"%1\$s\" ya existe.\nDesea sobreescribirlo?"
- ::msgcat::mcset es "File \"%1\$s\" already exists.\n\n" "El archivo \"%1\$s\" ya existe.\n\n"
- ::msgcat::mcset es "File \"%1\$s\" does not exist." "El archivo \"%1\$s\" no existe."
- ::msgcat::mcset es "File &name:" "&Nombre de archivo:"
- ::msgcat::mcset es "File &names:" "&Nombres de archivo:"
- ::msgcat::mcset es "Files of &type:" "Archivos de &tipo:"
- ::msgcat::mcset es "Fi&les:" "&Archivos:"
- ::msgcat::mcset es "&Filter" "&Filtro"
- ::msgcat::mcset es "Fil&ter:" "Fil&tro:"
- ::msgcat::mcset es "&Green" "&Verde"
- ::msgcat::mcset es "Hi" "Hola"
- ::msgcat::mcset es "Hide Console" "Esconder la consola"
- ::msgcat::mcset es "&Ignore" "&Ignorar"
- ::msgcat::mcset es "Invalid file name \"%1\$s\"." "Nombre de archivo inv\u00e1lido \"%1\$s\"."
- ::msgcat::mcset es "Log Files" "Ficheros de traza"
- ::msgcat::mcset es "&No" "&No"
- ::msgcat::mcset es "&OK" "&OK"
- ::msgcat::mcset es "Ok" "Ok"
- ::msgcat::mcset es "Open" "Abrir"
- ::msgcat::mcset es "&Open" "&Abrir"
- ::msgcat::mcset es "Open Multiple Files" "Abrir m\u00faltiples archivos"
- ::msgcat::mcset es "Paste" "Pegar"
- ::msgcat::mcset es "Quit" "Abandonar"
- ::msgcat::mcset es "&Red" "&Rojo"
- ::msgcat::mcset es "Replace existing file?" "Reemplazar el archivo existente?"
- ::msgcat::mcset es "&Retry" "&Reintentar"
- ::msgcat::mcset es "&Save" "&Salvar"
- ::msgcat::mcset es "Save As" "Salvar como"
- ::msgcat::mcset es "Save To Log" "Salvar al archivo de traza"
- ::msgcat::mcset es "Select Log File" "Elegir un archivo de traza"
- ::msgcat::mcset es "Select a file to source" "Seleccionar un archivo a evaluar"
- ::msgcat::mcset es "&Selection:" "&Selecci\u00f3n:"
- ::msgcat::mcset es "Skip Messages" "Omitir los mensajes"
- ::msgcat::mcset es "Source..." "Evaluar..."
- ::msgcat::mcset es "Tcl Scripts" "Scripts Tcl"
- ::msgcat::mcset es "Tcl for Windows" "Tcl para Windows"
- ::msgcat::mcset es "Text Files" "Archivos de texto"
- ::msgcat::mcset es "&Yes" "&S\u00ed"
- ::msgcat::mcset es "abort" "abortar"
- ::msgcat::mcset es "blue" "azul"
- ::msgcat::mcset es "cancel" "cancelar"
- ::msgcat::mcset es "extension" "extensi\u00f3n"
- ::msgcat::mcset es "extensions" "extensiones"
- ::msgcat::mcset es "green" "verde"
- ::msgcat::mcset es "ignore" "ignorar"
- ::msgcat::mcset es "ok" "ok"
- ::msgcat::mcset es "red" "rojo"
- ::msgcat::mcset es "retry" "reintentar"
- ::msgcat::mcset es "yes" "s\u00ed"
-}
diff --git a/ext/tk/sample/msgs_tk/fr.msg b/ext/tk/sample/msgs_tk/fr.msg
deleted file mode 100644
index ebbba48ca1..0000000000
--- a/ext/tk/sample/msgs_tk/fr.msg
+++ /dev/null
@@ -1,84 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset fr "Application Error" "Erreur d'application"
- ::msgcat::mcset fr "Blue" "Bleu"
- ::msgcat::mcset fr "Color" "Couleur"
- ::msgcat::mcset fr "Delete" "Effacer"
- ::msgcat::mcset fr "Error" "Erreur"
- ::msgcat::mcset fr "Exit" "Quitter"
- ::msgcat::mcset fr "Green" "Vert"
- ::msgcat::mcset fr "Red" "Rouge"
- ::msgcat::mcset fr "blue" "bleu"
- ::msgcat::mcset fr "green" "vert"
- ::msgcat::mcset fr "red" "rouge"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset fr "&Abort" "&Annuler"
- ::msgcat::mcset fr "About..." "\u00c0 propos..."
- ::msgcat::mcset fr "All Files" "Tous les fichiers"
- ::msgcat::mcset fr "Application Error" "Erreur d'application"
- ::msgcat::mcset fr "&Blue" "&Bleu"
- ::msgcat::mcset fr "&Cancel" "&Annuler"
- ::msgcat::mcset fr "Cannot change to the directory \"%1\$s\".\nPermission denied." "Impossible d'acc\u00e9der au r\u00e9pertoire \"%1\$s\".\nPermission refus\u00e9e."
- ::msgcat::mcset fr "Choose Directory" "Choisir r\u00e9pertoire"
- ::msgcat::mcset fr "Clear" "Effacer"
- ::msgcat::mcset fr "Color" "Couleur"
- ::msgcat::mcset fr "Console"
- ::msgcat::mcset fr "Copy" "Copier"
- ::msgcat::mcset fr "Cut" "Couper"
- ::msgcat::mcset fr "Delete" "Effacer"
- ::msgcat::mcset fr "Details >>" "D\u00e9tails >>"
- ::msgcat::mcset fr "Directory \"%1\$s\" does not exist." "Le r\u00e9pertoire \"%1\$s\" n'existe pas."
- ::msgcat::mcset fr "&Directory:" "&R\u00e9pertoire:"
- ::msgcat::mcset fr "Error: %1\$s" "Erreur: %1\$s"
- ::msgcat::mcset fr "Exit" "Quitter"
- ::msgcat::mcset fr "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\nVoulez-vous l'\u00e9craser?"
- ::msgcat::mcset fr "File \"%1\$s\" already exists.\n\n" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\n\n"
- ::msgcat::mcset fr "File \"%1\$s\" does not exist." "Le fichier \"%1\$s\" n'existe pas."
- ::msgcat::mcset fr "File &name:" "&Nom de fichier:"
- ::msgcat::mcset fr "File &names:" "&Noms de fichiers:"
- ::msgcat::mcset fr "Files of &type:" "&Type de fichiers:"
- ::msgcat::mcset fr "Fi&les:" "Fich&iers:"
- ::msgcat::mcset fr "&Filter" "&Filtre"
- ::msgcat::mcset fr "Fil&ter:" "Fil&tre:"
- ::msgcat::mcset fr "&Green" "&Vert"
- ::msgcat::mcset fr "Hi" "Salut"
- ::msgcat::mcset fr "Hide Console" "Cacher la Console"
- ::msgcat::mcset fr "&Ignore" "&Ignorer"
- ::msgcat::mcset fr "Invalid file name \"%1\$s\"." "Nom de fichier invalide \"%1\$s\"."
- ::msgcat::mcset fr "Log Files" "Fichiers de trace"
- ::msgcat::mcset fr "&No" "&Non"
- ::msgcat::mcset fr "&OK"
- ::msgcat::mcset fr "Ok"
- ::msgcat::mcset fr "Open" "Ouvrir"
- ::msgcat::mcset fr "&Open" "&Ouvrir"
- ::msgcat::mcset fr "Open Multiple Files" "Ouvrir plusieurs fichiers"
- ::msgcat::mcset fr "Paste" "Coller"
- ::msgcat::mcset fr "Quit" "Quitter"
- ::msgcat::mcset fr "&Red" "&Rouge"
- ::msgcat::mcset fr "Replace existing file?" "Remplacer le fichier existant?"
- ::msgcat::mcset fr "&Retry" "&R\u00e9-essayer"
- ::msgcat::mcset fr "&Save" "&Sauvegarder"
- ::msgcat::mcset fr "Save As" "Sauvegarder sous"
- ::msgcat::mcset fr "Save To Log" "Sauvegarde au fichier de trace"
- ::msgcat::mcset fr "Select Log File" "Choisir un fichier de trace"
- ::msgcat::mcset fr "Select a file to source" "Choisir un fichier \u00e0 \u00e9valuer"
- ::msgcat::mcset fr "&Selection:" "&S\u00e9lection:"
- ::msgcat::mcset fr "Skip Messages" "Omettre les messages"
- ::msgcat::mcset fr "Source..." "\u00c9valuer..."
- ::msgcat::mcset fr "Tcl Scripts" "Scripts Tcl"
- ::msgcat::mcset fr "Tcl for Windows" "Tcl pour Windows"
- ::msgcat::mcset fr "Text Files" "Fichiers texte"
- ::msgcat::mcset fr "&Yes" "&Oui"
- ::msgcat::mcset fr "abort" "abandonner"
- ::msgcat::mcset fr "blue" "bleu"
- ::msgcat::mcset fr "cancel" "annuler"
- ::msgcat::mcset fr "extension"
- ::msgcat::mcset fr "extensions"
- ::msgcat::mcset fr "green" "vert"
- ::msgcat::mcset fr "ignore" "ignorer"
- ::msgcat::mcset fr "ok"
- ::msgcat::mcset fr "red" "rouge"
- ::msgcat::mcset fr "retry" "r\u00e9essayer"
- ::msgcat::mcset fr "yes" "oui"
-}
diff --git a/ext/tk/sample/msgs_tk/it.msg b/ext/tk/sample/msgs_tk/it.msg
deleted file mode 100644
index b144fcc073..0000000000
--- a/ext/tk/sample/msgs_tk/it.msg
+++ /dev/null
@@ -1,84 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset it "Application Error" "Errore dell' applicazione"
- ::msgcat::mcset it "Blue" "Blu"
- ::msgcat::mcset it "Color" "Colore"
- ::msgcat::mcset it "Delete" "Incolla"
- ::msgcat::mcset it "Error" "Errore"
- ::msgcat::mcset it "Exit" "Esci"
- ::msgcat::mcset it "Green" "Verde"
- ::msgcat::mcset it "Red" "Rosso"
- ::msgcat::mcset it "blue" "blu"
- ::msgcat::mcset it "green" "verde"
- ::msgcat::mcset it "red" "rosso"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset it "&Abort" "&Interrompi"
- ::msgcat::mcset it "About..." "Informazioni ..."
- ::msgcat::mcset it "All Files" "Tutti i file"
- ::msgcat::mcset it "Application Error" "Errore dell' applicazione"
- ::msgcat::mcset it "&Blue" "&Blu"
- ::msgcat::mcset it "&Cancel" "&Annulla"
- ::msgcat::mcset it "Cannot change to the directory \"%1\$s\".\nPermission denied." "Impossibile accedere alla directory \"%1\$s\".\nPermesso negato."
- ::msgcat::mcset it "Choose Directory" "Scegli directory"
- ::msgcat::mcset it "Clear" "Azzera"
- ::msgcat::mcset it "Color" "Colore"
- ::msgcat::mcset it "Console"
- ::msgcat::mcset it "Copy" "Copia"
- ::msgcat::mcset it "Cut" "Taglia"
- ::msgcat::mcset it "Delete" "Incolla"
- ::msgcat::mcset it "Details >>" "Dettagli >>"
- ::msgcat::mcset it "Directory \"%1\$s\" does not exist." "La directory \"%1\$s\" non esiste."
- ::msgcat::mcset it "&Directory:"
- ::msgcat::mcset it "Error: %1\$s" "Errore: %1\$s"
- ::msgcat::mcset it "Exit" "Esci"
- ::msgcat::mcset it "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Il file \"%1\$s\" esiste gi\u00e0.\nVuoi sovrascriverlo?"
- ::msgcat::mcset it "File \"%1\$s\" already exists.\n\n" "Il file \"%1\$s\" esiste gi\u00e0.\n\n"
- ::msgcat::mcset it "File \"%1\$s\" does not exist." "Il file \"%1\$s\" non esiste."
- ::msgcat::mcset it "File &name:" "&Nome del file:"
- ::msgcat::mcset it "File &names:" "&Nomi dei file:"
- ::msgcat::mcset it "Files of &type:" "File di &tipo:"
- ::msgcat::mcset it "Fi&les:" "Fi&le:"
- ::msgcat::mcset it "&Filter" "&Filtro"
- ::msgcat::mcset it "Fil&ter:" "Fil&tro:"
- ::msgcat::mcset it "&Green" "&Verde"
- ::msgcat::mcset it "Hi" "Salve"
- ::msgcat::mcset it "Hide Console" "Nascondi la console"
- ::msgcat::mcset it "&Ignore" "&Ignora"
- ::msgcat::mcset it "Invalid file name \"%1\$s\"." "Nome di file non valido \"%1\$s\"."
- ::msgcat::mcset it "Log Files" "File di log"
- ::msgcat::mcset it "&No"
- ::msgcat::mcset it "&OK"
- ::msgcat::mcset it "Ok"
- ::msgcat::mcset it "&Open" "A&pri"
- ::msgcat::mcset it "Open" "Apri"
- ::msgcat::mcset it "Open Multiple Files" "Apri file multipli"
- ::msgcat::mcset it "Paste" "Incolla"
- ::msgcat::mcset it "Quit" "Esci"
- ::msgcat::mcset it "&Red" "&Rosso"
- ::msgcat::mcset it "Replace existing file?" "Sostituisci il file esistente?"
- ::msgcat::mcset it "&Retry" "&Riprova"
- ::msgcat::mcset it "&Save" "&Salva"
- ::msgcat::mcset it "Save As" "Salva come"
- ::msgcat::mcset it "Save To Log" "Salva il log"
- ::msgcat::mcset it "Select Log File" "Scegli un file di log"
- ::msgcat::mcset it "Select a file to source" "Scegli un file da eseguire"
- ::msgcat::mcset it "&Selection:" "&Selezione:"
- ::msgcat::mcset it "Skip Messages" "Salta i messaggi"
- ::msgcat::mcset it "Source..." "Esegui..."
- ::msgcat::mcset it "Tcl Scripts" "Scripts Tcl"
- ::msgcat::mcset it "Tcl for Windows" "Tcl per Windows"
- ::msgcat::mcset it "Text Files" "File di testo"
- ::msgcat::mcset it "&Yes" "&Si"
- ::msgcat::mcset it "abort" "interrompi"
- ::msgcat::mcset it "blue" "blu"
- ::msgcat::mcset it "cancel" "annulla"
- ::msgcat::mcset it "extension" "estensione"
- ::msgcat::mcset it "extensions" "estensioni"
- ::msgcat::mcset it "green" "verde"
- ::msgcat::mcset it "ignore" "ignora"
- ::msgcat::mcset it "ok"
- ::msgcat::mcset it "red" "rosso"
- ::msgcat::mcset it "retry" "riprova"
- ::msgcat::mcset it "yes" "si"
-}
diff --git a/ext/tk/sample/msgs_tk/ja.msg b/ext/tk/sample/msgs_tk/ja.msg
deleted file mode 100644
index 44a25839db..0000000000
--- a/ext/tk/sample/msgs_tk/ja.msg
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset ja "Application Error" "\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30A8\u30E9\u30FC"
- ::msgcat::mcset ja "Blue" "\u9752"
- ::msgcat::mcset ja "Color" "\u80CC\u666F\u8272"
- ::msgcat::mcset ja "Delete" "\u6D88\u53BB"
- ::msgcat::mcset ja "Error" "\u30A8\u30E9\u30FC"
- ::msgcat::mcset ja "Exit" "\u7D42\u4E86"
- ::msgcat::mcset ja "Green" "\u7DD1"
- ::msgcat::mcset ja "Red" "\u8D64"
- ::msgcat::mcset ja "blue" "\u9752"
- ::msgcat::mcset ja "green" "\u7DD1"
- ::msgcat::mcset ja "red" "\u8D64"
-}
diff --git a/ext/tk/sample/msgs_tk/license.terms b/ext/tk/sample/msgs_tk/license.terms
deleted file mode 100644
index c0a44d3fc2..0000000000
--- a/ext/tk/sample/msgs_tk/license.terms
+++ /dev/null
@@ -1,39 +0,0 @@
-This software is copyrighted by the Regents of the University of
-California, Sun Microsystems, Inc., and other parties. 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.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-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.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
-are acquiring the software on behalf of the Department of Defense, the
-software shall be classified as "Commercial Computer Software" and the
-Government shall have only "Restricted Rights" as defined in Clause
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
-authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license.
diff --git a/ext/tk/sample/msgs_tk/nl.msg b/ext/tk/sample/msgs_tk/nl.msg
deleted file mode 100644
index d9642e808c..0000000000
--- a/ext/tk/sample/msgs_tk/nl.msg
+++ /dev/null
@@ -1,123 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset nl "Application Error" "Toepassingsfout"
- ::msgcat::mcset nl "Blue" "Blauw"
- ::msgcat::mcset nl "Color" "Kleur"
- ::msgcat::mcset nl "Delete" "Wissen"
- ::msgcat::mcset nl "Error" "Fout"
- ::msgcat::mcset nl "Exit" "Be\u00ebindigen"
- ::msgcat::mcset nl "Green" "Groen"
- ::msgcat::mcset nl "Red" "Rood"
- ::msgcat::mcset nl "blue" "blauw"
- ::msgcat::mcset nl "green" "groen"
- ::msgcat::mcset nl "red" "rood"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset nl "\"%1\$s\" must be an absolute pathname" "\"%1\$s\" moet een absolute pad-naam zijn"
- ::msgcat::mcset nl "%1\$s is not a toplevel window" "%1\$s is geen toplevel window"
- ::msgcat::mcset nl ", or" ", of"
- ::msgcat::mcset nl "-default, -icon, -message, -parent, -title, or -type" "-default, -icon, -message, -parent, -title, of -type"
- ::msgcat::mcset nl "-initialdir, -mustexist, -parent, or -title" "-initialdir, -mustexist, -parent, of -title"
- ::msgcat::mcset nl "&Abort" "&Afbreken"
- ::msgcat::mcset nl "About..." "Over..."
- ::msgcat::mcset nl "All Files" "Alle Bestanden"
- ::msgcat::mcset nl "Application Error" "Toepassingsfout"
- ::msgcat::mcset nl "&Blue" "&Blauw"
- ::msgcat::mcset nl "&Cancel" "&Annuleren"
- ::msgcat::mcset nl "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kan niet naar map \"%1\$s\" gaan.\nU heeft hiervoor geen toestemming."
- ::msgcat::mcset nl "Choose Directory" "Kies map"
- ::msgcat::mcset nl "Clear" "Wissen"
- ::msgcat::mcset nl "Clear entry, Press OK; Enter %1\$s, press OK" "Wis veld, Druk op OK; typ %1\$s in, druk op OK"
- ::msgcat::mcset nl "&Clear Console" "&Wis Console"
- ::msgcat::mcset nl "Color" "Kleur"
- ::msgcat::mcset nl "Console"
- ::msgcat::mcset nl "Copy" "Kopi\u00ebren"
- ::msgcat::mcset nl "Cut" "Knippen"
- ::msgcat::mcset nl "Delete" "Wissen"
- ::msgcat::mcset nl "Details"
- ::msgcat::mcset nl "Details >>"
- ::msgcat::mcset nl "Directory \"%1\$s\" does not exist." "Map \"%1\$s\" bestaat niet."
- ::msgcat::mcset nl "&Directory:" "&Map:"
- ::msgcat::mcset nl "Edit" "Bewerken"
- ::msgcat::mcset nl "Enter \"%1\$s\", press OK" "Typ \"%1\$s\", druk op OK"
- ::msgcat::mcset nl "Enter \"%1\$s\", press OK, enter \"%2\$s\", press OK" "Typ \"%1\$s\", druk op OK, typ \"%2\$s\", druk op OK"
- ::msgcat::mcset nl "Error: %1\$s" "Fout: %1\$s"
- ::msgcat::mcset nl "Exit" "Be\u00ebindigen"
- ::msgcat::mcset nl "File" "Bestand"
- ::msgcat::mcset nl "File \"%1\$s\" already exists.\n\n" "Bestand \"%1\$s\" bestaat al.\n\n"
- ::msgcat::mcset nl "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Bestand \"%1\$s\" bestaat al.\nWilt u het overschrijven?"
- ::msgcat::mcset nl "File \"%1\$s\" does not exist." "Bestand \"%1\$s\" bestaat niet."
- ::msgcat::mcset nl "File &name:" "Bestands&naam:"
- ::msgcat::mcset nl "File &names:" "Bestands&namen:"
- ::msgcat::mcset nl "Files of &type:" "Bestanden van het &type:"
- ::msgcat::mcset nl "Fi&les:" "&Bestanden:"
- ::msgcat::mcset nl "&Filter"
- ::msgcat::mcset nl "Fil&ter:"
- ::msgcat::mcset nl "&Green" "&Groen"
- ::msgcat::mcset nl "Hi" "H\u00e9"
- ::msgcat::mcset nl "Hide Console" "Verberg Console"
- ::msgcat::mcset nl "&Ignore" "&Negeren"
- ::msgcat::mcset nl "Invalid file name \"%1\$s\"." "Ongeldige bestandsnaam \"%1\$s\"."
- ::msgcat::mcset nl "Log Files" "Log Bestanden"
- ::msgcat::mcset nl "&No" "&Nee"
- ::msgcat::mcset nl "&OK"
- ::msgcat::mcset nl "Ok"
- ::msgcat::mcset nl "&Open" "&Openen"
- ::msgcat::mcset nl "Open" "Openen"
- ::msgcat::mcset nl "Open Multiple Files" "Open meerdere bestanden"
- ::msgcat::mcset nl "Paste" "Plakken"
- ::msgcat::mcset nl "Please press %1\$s" "Druk op %1\$s, A.U.B."
- ::msgcat::mcset nl "Please press ok" "Druk op ok, A.U.B."
- ::msgcat::mcset nl "Press Cancel" "Druk op Annuleren"
- ::msgcat::mcset nl "Press Ok" "Druk op Ok"
- ::msgcat::mcset nl "Quit" "Stoppen"
- ::msgcat::mcset nl "&Red" "&Rood"
- ::msgcat::mcset nl "Replace existing file?" "Vervang bestaand bestand?"
- ::msgcat::mcset nl "&Retry" "&Herhalen"
- ::msgcat::mcset nl "&Save" "Op&slaan"
- ::msgcat::mcset nl "Save As" "Opslaan als"
- ::msgcat::mcset nl "Save To Log" "Opslaan naar Log"
- ::msgcat::mcset nl "Select Log File" "Selecteer Log bestand"
- ::msgcat::mcset nl "Select a file to source" "Selecteer bronbestand"
- ::msgcat::mcset nl "&Selection:" "&Selectie:"
- ::msgcat::mcset nl "Skip Messages" "Berichten overslaan"
- ::msgcat::mcset nl "Source..." "Bron..."
- ::msgcat::mcset nl "Tcl Scripts"
- ::msgcat::mcset nl "Tcl for Windows" "Tcl voor Windows"
- ::msgcat::mcset nl "Text Files" "Tekstbestanden"
- ::msgcat::mcset nl "&Yes" "&Ja"
- ::msgcat::mcset nl "abort" "afbreken"
- ::msgcat::mcset nl "abort, retry, ignore, ok, cancel, no, or yes" "afbreken, opnieuw, negeren, ok, annuleren, nee, of ja"
- ::msgcat::mcset nl "abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel" "abortretryignore, ok, okcancel, retrycancel, yesno, of yesnocancel"
- ::msgcat::mcset nl "bad %1\$s value \"%2\$s\": must be %3\$s" "verkeerde %1\$s waarde \"%2\$s\": moet zijn %3\$s"
- ::msgcat::mcset nl "bad file type \"%1\$s\", should be" "verkeerd bestandstype \"%1\$s\", moet zijn"
- ::msgcat::mcset nl "bad option \"%1\$s\": should be %2\$s" "verkeerde optie \"%1\$s\": moet zijn %2\$s"
- ::msgcat::mcset nl "bad window path name \"%1\$s\"" "verkeerde window-padnaam \"%1\$s\""
- ::msgcat::mcset nl "blue" "blauw"
- ::msgcat::mcset nl "can't post %1\$s: it isn't a descendant of %2\$s (this is a new requirement in Tk versions 3.0 and later)" "kan %1\$s niet verzenden: het is geen afstammeling van %2\$s (dit is een nieuwe eis in Tk versies 3.0 en later)"
- ::msgcat::mcset nl "cancel" "annuleren"
- ::msgcat::mcset nl "default button index greater than number of buttons specified for tk_dialog" "default knop index is groter dan het aantal knoppen beschikbaar voor tk_dialog"
- ::msgcat::mcset nl "display name to use (current one otherwise)" "te gebruiken schermnaam (anders huidige scherm)"
- ::msgcat::mcset nl "error, info, question, or warning" "error, info, question, of warning"
- ::msgcat::mcset nl "extension"
- ::msgcat::mcset nl "extensions"
- ::msgcat::mcset nl "focus group \"%1\$s\" doesn't exist" "focusgroep \"%1\$s\" bestaat niet"
- ::msgcat::mcset nl "green" "groen"
- ::msgcat::mcset nl "history event %1\$s"
- ::msgcat::mcset nl "ignore" "negeren"
- ::msgcat::mcset nl "invalid default button \"%1\$s\"" "ongeldige default knop \"%1\$s\""
- ::msgcat::mcset nl "macType"
- ::msgcat::mcset nl "macTypes"
- ::msgcat::mcset nl "must specify a background color" "een achtergrondkleur is verplicht"
- ::msgcat::mcset nl "name of the slave interpreter" "naam van de slaaf-interpreter"
- ::msgcat::mcset nl "no winfo screen . nor env(DISPLAY)" "geen winfo scherm . noch env(DISPLAY)"
- ::msgcat::mcset nl "ok"
- ::msgcat::mcset nl "red" "rood"
- ::msgcat::mcset nl "retry" "opnieuw"
- ::msgcat::mcset nl "should contain 5 or 4 elements" "moet 4 of 5 elementen bevatten"
- ::msgcat::mcset nl "spec"
- ::msgcat::mcset nl "tk_chooseDirectory command" "tk_chooseDirectory opdracht"
- ::msgcat::mcset nl "tk_chooseDirectory command, cancel gives null" "tk_chooseDirectory opdracht, annuleren geeft lege waarde"
- ::msgcat::mcset nl "tk_chooseDirectory command, initialdir" "tk_chooseDirectory opdracht, initi\u00eble map"
- ::msgcat::mcset nl "yes" "ja"
-}
diff --git a/ext/tk/sample/msgs_tk/pl.msg b/ext/tk/sample/msgs_tk/pl.msg
deleted file mode 100644
index 2699e42bdf..0000000000
--- a/ext/tk/sample/msgs_tk/pl.msg
+++ /dev/null
@@ -1,87 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset pl "Application Error" "Bl\u0105d w Programie"
- ::msgcat::mcset pl "Blue" "Niebieski"
- ::msgcat::mcset pl "Color" "Kolor"
- ::msgcat::mcset pl "Delete" "Usu\u0144"
- ::msgcat::mcset pl "Error" "B\u0142\u0105d"
- ::msgcat::mcset pl "Exit" "Zako\u0144cz"
- ::msgcat::mcset pl "Green" "Zielony"
- ::msgcat::mcset pl "Red" "Czerwonz"
- ::msgcat::mcset pl "blue" "niebieski"
- ::msgcat::mcset pl "green" "zielony"
- ::msgcat::mcset pl "red" "czerwony"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset pl "&Abort" "&Anuluj"
- ::msgcat::mcset pl "&About..." "O Programie..."
- ::msgcat::mcset pl "All Files" "Wszystkie pliki"
- ::msgcat::mcset pl "Application Error" "Bl\u0105d w Programie"
- ::msgcat::mcset pl "&Blue" "&Niebieski"
- ::msgcat::mcset pl "&Cancel" "&Anuluj"
- ::msgcat::mcset pl "Cannot change to the directory \"%1\$s\".\nPermission denied." "Katalog \"%1\$s\" nie mo\u017ce zosta\u0107 odczytany lub nie istnieje."
- ::msgcat::mcset pl "Choose Directory" "Wybierz katalog"
- ::msgcat::mcset pl "&Clear" "&Wyczy\u015b\u0107"
- ::msgcat::mcset pl "&Clear Console" "&Wyczy\u015b\u0107 konsol\u0119"
- ::msgcat::mcset pl "Color" "Kolor"
- ::msgcat::mcset pl "Console" "Konsola"
- ::msgcat::mcset pl "&Copy" "&Kopiuj"
- ::msgcat::mcset pl "Cu&t" "&Wytnij"
- ::msgcat::mcset pl "&Delete" "&Usu\u0144"
- ::msgcat::mcset pl "Details >>" "Detale >>"
- ::msgcat::mcset pl "Directory \"%1\$s\" does not exist." "Katalog \"%1\$s\" nie istniej."
- ::msgcat::mcset pl "&Directory:" "&Katalog:"
- ::msgcat::mcset pl "&Edit" "&Edytuj"
- ::msgcat::mcset pl "Error: %1\$s" "B\u0142\u0105d: %1\$s"
- ::msgcat::mcset pl "E&xit" "&Zako\u0144cz"
- ::msgcat::mcset pl "&File" "&Plik"
- ::msgcat::mcset pl "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Plik \"%1\$s\" ju\u017c istnieje.\nCzy chcesz go zast\u0105pi\u0107?"
- ::msgcat::mcset pl "File \"%1\$s\" already exists.\n\n" "Plik \"%1\$s\" ju\u017c istnieje. \n\n"
- ::msgcat::mcset pl "File \"%1\$s\" does not exist." "Plik \"%1\$s\" nie istnieje."
- ::msgcat::mcset pl "File &name:" "Nazwa &pliku:"
- ::msgcat::mcset pl "File &names:" "Nazwy &plik\u00f3w:"
- ::msgcat::mcset pl "Files of &type:" "Pliki &typu:"
- ::msgcat::mcset pl "Fi&les:" "Pli&ki:"
- ::msgcat::mcset pl "&Filter" "&Filter"
- ::msgcat::mcset pl "Fil&ter:" "&Filter:"
- ::msgcat::mcset pl "&Green" "&Zielony"
- ::msgcat::mcset pl "&Help" "&Pomoc"
- ::msgcat::mcset pl "Hi" "Witaj"
- ::msgcat::mcset pl "&Hide Console" "&Schowaj konsol\u0119"
- ::msgcat::mcset pl "&Ignore" "&Ignoruj"
- ::msgcat::mcset pl "Invalid file name \"%1\$s\"." "Niew\u0142a\u015bciwa nazwa pliku \"%1\$s\"."
- ::msgcat::mcset pl "Log Files" "Protoko\u0142uj"
- ::msgcat::mcset pl "&No" "&Nie"
- ::msgcat::mcset pl "OK"
- ::msgcat::mcset pl "Ok"
- ::msgcat::mcset pl "Open" "Wczytaj"
- ::msgcat::mcset pl "&Open" "&Wczytaj"
- ::msgcat::mcset pl "Open Multiple Files" "Wczytuj wiele plik\u00f3w"
- ::msgcat::mcset pl "P&aste" "&Wklej"
- ::msgcat::mcset pl "&Quit" "&Zako\u0144cz"
- ::msgcat::mcset pl "&Red" "&Czerwonz"
- ::msgcat::mcset pl "Replace existing file?" "Czy zost\u0105pi\u0107 instniej\u0105cy plik?"
- ::msgcat::mcset pl "&Retry" "&Powt\u00f3rz"
- ::msgcat::mcset pl "&Save" "&Zapisz"
- ::msgcat::mcset pl "Save As" "Zapisz jako"
- ::msgcat::mcset pl "Save To Log" "Wpisz do protoko\u0142u"
- ::msgcat::mcset pl "Select Log File" "Wybierz plik proko\u0142u"
- ::msgcat::mcset pl "Select a file to source" "Wybierz plik do wykonania"
- ::msgcat::mcset pl "&Selection:" "&Wyb\u00f3r:"
- ::msgcat::mcset pl "Skip Messages" "Omi\u0144 pozosta\u0142e komunikaty"
- ::msgcat::mcset pl "&Source..." "&Kod \u017ar\u00f3d\u0142owy..."
- ::msgcat::mcset pl "Tcl Scripts" "Tcl-skrypty"
- ::msgcat::mcset pl "Tcl for Windows" "Tcl dla Okienek (Windows)"
- ::msgcat::mcset pl "Text Files" "Pliki Tekstowe"
- ::msgcat::mcset pl "&Yes" "&Tak"
- ::msgcat::mcset pl "abort" "zako\u0144cz"
- ::msgcat::mcset pl "blue" "niebieski"
- ::msgcat::mcset pl "cancel" "anuluj"
- ::msgcat::mcset pl "extension" "rozszerzenie"
- ::msgcat::mcset pl "extensions" "rozszerzenia"
- ::msgcat::mcset pl "green" "zielony"
- ::msgcat::mcset pl "ignore" "ignoruj"
- ::msgcat::mcset pl "red" "czerwony"
- ::msgcat::mcset pl "retry" "potw\u00f3rz"
- ::msgcat::mcset pl "yes" "tak"
-}
diff --git a/ext/tk/sample/msgs_tk/ru.msg b/ext/tk/sample/msgs_tk/ru.msg
deleted file mode 100644
index db009a4a52..0000000000
--- a/ext/tk/sample/msgs_tk/ru.msg
+++ /dev/null
@@ -1,87 +0,0 @@
-namespace eval ::tkmsgcat_demo {
- ::msgcat::mcset ru "Application Error" "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435"
- ::msgcat::mcset ru "Blue" " \u0413\u043e\u043b\u0443\u0431\u043e\u0439"
- ::msgcat::mcset ru "Color" "\u0426\u0432\u0435\u0442"
- ::msgcat::mcset ru "Delete" "\u0423\u0434\u0430\u043b\u0438\u0442\u044c"
- ::msgcat::mcset ru "Error" "\u041e\u0448\u0438\u0431\u043a\u0430"
- ::msgcat::mcset ru "Exit" "\u0412\u044b\u0445\u043e\u0434"
- ::msgcat::mcset ru "Green" "\u0417\u0435\u043b\u0435\u043d\u044b\u0439"
- ::msgcat::mcset ru "Red" "\u041a\u0440\u0430\u0441\u043d\u044b\u0439"
- ::msgcat::mcset ru "blue" " \u0433\u043e\u043b\u0443\u0431\u043e\u0439"
- ::msgcat::mcset ru "green" " \u0437\u0435\u043b\u0435\u043d\u044b\u0439"
- ::msgcat::mcset ru "red" " \u043a\u0440\u0430\u0441\u043d\u044b\u0439"
-}
-
-namespace eval ::tk {
- ::msgcat::mcset ru "&Abort" "&\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c"
- ::msgcat::mcset ru "About..." "\u041f\u0440\u043e..."
- ::msgcat::mcset ru "All Files" "\u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b"
- ::msgcat::mcset ru "Application Error" "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435"
- ::msgcat::mcset ru "&Blue" " &\u0413\u043e\u043b\u0443\u0431\u043e\u0439"
- ::msgcat::mcset ru "&Cancel" "\u041e\u0442&\u043c\u0435\u043d\u0430"
- ::msgcat::mcset ru "Cannot change to the directory \"%1\$s\".\nPermission denied." \
- "\u041d\u0435 \u043c\u043e\u0433\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \"%1\$s\".\n\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430"
- ::msgcat::mcset ru "Choose Directory" "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433"
- ::msgcat::mcset ru "Clear" "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c"
- ::msgcat::mcset ru "Color" "\u0426\u0432\u0435\u0442"
- ::msgcat::mcset ru "Console" "\u041a\u043e\u043d\u0441\u043e\u043b\u044c"
- ::msgcat::mcset ru "Copy" "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c"
- ::msgcat::mcset ru "Cut" "\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c"
- ::msgcat::mcset ru "Delete" "\u0423\u0434\u0430\u043b\u0438\u0442\u044c"
- ::msgcat::mcset ru "Details >>" "\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 >>"
- ::msgcat::mcset ru "Directory \"%1\$s\" does not exist." "\u041a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \"%1\$s\" \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442."
- ::msgcat::mcset ru "&Directory:" "&\u041a\u0430\u0442\u0430\u043b\u043e\u0433:"
- ::msgcat::mcset ru "Error: %1\$s" "\u041e\u0448\u0438\u0431\u043a\u0430: %1\$s"
- ::msgcat::mcset ru "Exit" "\u0412\u044b\u0445\u043e\u0434"
- ::msgcat::mcset ru "File \"%1\$s\" already exists.\nDo you want to overwrite it?" \
- "\u0424\u0430\u0439\u043b \"%1\$s\" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.\n\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e?"
- ::msgcat::mcset ru "File \"%1\$s\" already exists.\n\n" "\u0424\u0430\u0439\u043b \"%1\$s\" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.\n\n"
- ::msgcat::mcset ru "File \"%1\$s\" does not exist." "\u0424\u0430\u0439\u043b \"%1\$s\" \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d."
- ::msgcat::mcset ru "File &name:" "&\u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430:"
- ::msgcat::mcset ru "File &names:" "&\u0418\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432:"
- ::msgcat::mcset ru "Files of &type:" "&\u0422\u0438\u043f \u0444\u0430\u0439\u043b\u043e\u0432:"
- ::msgcat::mcset ru "Fi&les:" "\u0424\u0430\u0439&\u043b\u044b:"
- ::msgcat::mcset ru "&Filter" "&\u0424\u0438\u043b\u044c\u0442\u0440"
- ::msgcat::mcset ru "Fil&ter:" "\u0424\u0438\u043b\u044c&\u0442\u0440:"
- ::msgcat::mcset ru "&Green" " &\u0417\u0435\u043b\u0435\u043d\u044b\u0439"
- ::msgcat::mcset ru "Hi" "\u041f\u0440\u0438\u0432\u0435\u0442"
- ::msgcat::mcset ru "Hide Console" "\u0421\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c"
- ::msgcat::mcset ru "&Ignore" "&\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c"
- ::msgcat::mcset ru "Invalid file name \"%1\$s\"." "\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \"%1\$s\"."
- ::msgcat::mcset ru "Log Files" "\u0424\u0430\u0439\u043b\u044b \u0436\u0443\u0440\u043d\u0430\u043b\u0430"
- ::msgcat::mcset ru "&No" "&\u041d\u0435\u0442"
- ::msgcat::mcset ru "&OK" "&\u041e\u041a"
- ::msgcat::mcset ru "Ok" "\u0414\u0430"
- ::msgcat::mcset ru "Open" "\u041e\u0442\u043a\u0440\u044b\u0442\u044c"
- ::msgcat::mcset ru "&Open" "&\u041e\u0442\u043a\u0440\u044b\u0442\u044c"
- ::msgcat::mcset ru "Open Multiple Files" "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432"
- ::msgcat::mcset ru "Paste" "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c"
- ::msgcat::mcset ru "Quit" "\u0412\u044b\u0445\u043e\u0434"
- ::msgcat::mcset ru "&Red" " &\u041a\u0440\u0430\u0441\u043d\u044b\u0439"
- ::msgcat::mcset ru "Replace existing file?" "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b?"
- ::msgcat::mcset ru "&Retry" "&\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c"
- ::msgcat::mcset ru "&Save" "&\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c"
- ::msgcat::mcset ru "Save As" "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u043a"
- ::msgcat::mcset ru "Save To Log" "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b"
- ::msgcat::mcset ru "Select Log File" "\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b"
- ::msgcat::mcset ru "Select a file to source" "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438"
- ::msgcat::mcset ru "&Selection:" "&Selection:"
- ::msgcat::mcset ru "Skip Messages" "\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f"
- ::msgcat::mcset ru "Source..." "\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b..."
- ::msgcat::mcset ru "Tcl Scripts" "\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 TCL"
- ::msgcat::mcset ru "Tcl for Windows" "TCL \u0434\u043b\u044f Windows"
- ::msgcat::mcset ru "Text Files" "\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b"
- ::msgcat::mcset ru "&Yes" "&\u0414\u0430"
- ::msgcat::mcset ru "abort" "\u043e\u0442\u043c\u0435\u043d\u0430"
- ::msgcat::mcset ru "blue" " \u0433\u043e\u043b\u0443\u0431\u043e\u0439"
- ::msgcat::mcset ru "cancel" "\u043e\u0442\u043c\u0435\u043d\u0430"
- ::msgcat::mcset ru "extension" "\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435"
- ::msgcat::mcset ru "extensions" "\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f"
- ::msgcat::mcset ru "green" " \u0437\u0435\u043b\u0435\u043d\u044b\u0439"
- ::msgcat::mcset ru "ignore" "\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c"
- ::msgcat::mcset ru "ok" "\u043e\u043a"
- ::msgcat::mcset ru "red" " \u043a\u0440\u0430\u0441\u043d\u044b\u0439"
- ::msgcat::mcset ru "retry" "\u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c"
- ::msgcat::mcset ru "yes" "\u0434\u0430"
-}
-
diff --git a/ext/tk/sample/multi-ip_sample.rb b/ext/tk/sample/multi-ip_sample.rb
deleted file mode 100644
index fb7a8afb5b..0000000000
--- a/ext/tk/sample/multi-ip_sample.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-# This script is a sample of MultiTkIp class
-
-require "multi-tk"
-
-# create slave interpreters
-trusted_slave = MultiTkIp.new_slave
-safe_slave1 = MultiTkIp.new_safeTk
-safe_slave2 = MultiTkIp.new_safeTk('fill'=>:none, 'expand'=>false)
-#safe_slave2 = MultiTkIp.new_safeTk('fill'=>:none)
-#safe_slave2 = MultiTkIp.new_safeTk('expand'=>false)
-
-cmd = Proc.new{|txt|
- #####################
- ## from TkTimer2.rb
-
- if TkCore::INTERP.safe?
- # safeTk doesn't have permission to call 'wm' command
- else
- root = TkRoot.new(:title=>'timer sample')
- end
- label = TkLabel.new(:parent=>root, :relief=>:raised, :width=>10) \
- .pack(:side=>:bottom, :fill=>:both)
-
- tick = proc{|aobj|
- cnt = aobj.return_value + 5
- label.text format("%d.%02d", *(cnt.divmod(100)))
- cnt
- }
-
- timer = TkTimer.new(50, -1, tick).start(0, proc{ label.text('0.00'); 0 })
-
-=begin
- TkButton.new(:text=>'Start') {
- command proc{ timer.continue unless timer.running? }
- pack(:side=>:left, :fill=>:both, :expand=>true)
- }
- TkButton.new(:text=>'Restart') {
- command proc{ timer.restart(0, proc{ label.text('0.00'); 0 }) }
- pack('side'=>'right','fill'=>'both','expand'=>'yes')
- }
- TkButton.new(:text=>'Stop') {
- command proc{ timer.stop if timer.running? }
- pack('side'=>'right','fill'=>'both','expand'=>'yes')
- }
-=end
- b_start = TkButton.new(:text=>'Start', :state=>:disabled) {
- pack(:side=>:left, :fill=>:both, :expand=>true)
- }
-
- b_stop = TkButton.new(:text=>'Stop', :state=>:normal) {
- pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes')
- }
-
- b_start.command {
- timer.continue
- b_stop.state(:normal)
- b_start.state(:disabled)
- }
-
- b_stop.command {
- timer.stop
- b_start.state(:normal)
- b_stop.state(:disabled)
- }
-
- TkButton.new(:text=>'Reset', :state=>:normal) {
- command { timer.reset }
- pack('side'=>'right', 'fill'=>'both', 'expand'=>'yes')
- }
-
- ev_quit = TkVirtualEvent.new('Control-c', 'Control-q')
- Tk.root.bind(ev_quit, proc{Tk.exit}).focus
-}
-
-# call on the default master interpreter
-trusted_slave.eval_proc(cmd, 'trusted') # label -> .w00012
-safe_slave1.eval_proc(cmd, 'safe1') # label -> .w00016
-safe_slave2.eval_proc(cmd, 'safe2') # label -> .w00020
-cmd.call('master') # label -> .w00024
-
-#second_master = MultiTkIp.new(&cmd)
-#second_master = MultiTkIp.new(:safe=>2){p [:second_master, $SAFE]}
-
-TkTimer.new(2000, -1, proc{p ['safe1', safe_slave1.deleted?]}).start
-TkTimer.new(2000, -1, proc{p ['safe2', safe_slave2.deleted?]}).start
-TkTimer.new(2000, -1, proc{p ['trusted', trusted_slave.deleted?]}).start
-
-TkTimer.new(5000, 1,
- proc{
- safe_slave1.eval_proc{Tk.root.destroy}
- safe_slave1.delete
- print "*** The safe_slave1 is deleted by the timer.\n"
- }).start
-
-TkTimer.new(10000, 1,
- proc{
- trusted_slave.eval_proc{Tk.root.destroy}
- trusted_slave.delete
- print "*** The trusted_slave is deleted by the timer.\n"
- }).start
-
-Tk.mainloop
diff --git a/ext/tk/sample/multi-ip_sample2.rb b/ext/tk/sample/multi-ip_sample2.rb
deleted file mode 100644
index ae2cb35e96..0000000000
--- a/ext/tk/sample/multi-ip_sample2.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: false
-require 'multi-tk.rb'
-
-th = Thread.new{Tk.mainloop}
-
-TkLabel.new(:text=>'this is a primary master').pack
-
-ip1 = MultiTkIp.new_slave(:safe=>1)
-ip2 = MultiTkIp.new_slave(:safe=>2)
-
-cmd = proc{|s|
- require 'tk'
-
- TkButton.new(:text=>'b1: p self', :command=>proc{p self}).pack(:fill=>:x)
- sleep s
- TkButton.new(:text=>'b2: p $SAFE', :command=>proc{p $SAFE}).pack(:fill=>:x)
- sleep s
- TkButton.new(:text=>'b3: p MultiTkIp.ip_name',
- :command=>proc{p MultiTkIp.ip_name}).pack(:fill=>:x)
- sleep s
- TkButton.new(:text=>'EXIT', :command=>proc{exit}).pack(:fill=>:x)
-
- Tk.mainloop
-}
-
-Thread.new{ip1.eval_proc(cmd, 1.1)}
-Thread.new{ip2.eval_proc(cmd, 0.3)}
-cmd.call(0.7)
-
-th.join
diff --git a/ext/tk/sample/optobj_sample.rb b/ext/tk/sample/optobj_sample.rb
deleted file mode 100644
index 5e4806f8fb..0000000000
--- a/ext/tk/sample/optobj_sample.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# sample script of Tk::OptionObj
-#
-require "tk"
-
-optobj = Tk::OptionObj.new('foreground'=>'red', 'background'=>'black')
-
-f = TkFrame.new.pack(:side=>:left, :anchor=>:n, :padx=>5, :pady=>30)
-
-b1 = TkButton.new(f, :text=>'AAA').pack(:fill=>:x)
-b2 = TkButton.new(f, :text=>'BBB').pack(:fill=>:x)
-b3 = TkButton.new(f, :text=>'CCC').pack(:fill=>:x)
-
-optobj.assign( b1,
- [ b2, 'configure',
- { 'foreground'=>'background',
- 'background'=>'foreground' } ],
- [ b3, nil,
- { 'foreground'=>'background',
- 'activeforeground'=>nil,
- 'background'=>['foreground', 'activeforeground'] } ] )
-
-optobj.update('activeforeground'=>'yellow')
-
-TkButton.new(f){
- configure( optobj.assign(self) + {:text=>'DDD'} )
- pack(:fill=>:x)
-}
-
-TkButton.new(f){
- configure( optobj.assign([self, nil,
- {'foreground'=>'activeforeground',
- 'background'=>'foreground',
- 'activeforeground'=>'background'}]) \
- + {:text=>'EEE', :relief=>:groove, :borderwidth=>5} )
- pack(:fill=>:x)
-}
-
-optobj.notify # To apply the convert_key ( 3rd element of widget info
- # (that is, {'foreground'=>'activeforeground', ,,, } )
- # of the 'EEE' button
-
-TkButton.new(f, :text=>'toggle',
- :command=>proc{
- fg = optobj['foreground']
- bg = optobj['background']
- optobj.configure('foreground'=>bg, 'background'=>fg)
- }).pack(:fill=>:x, :pady=>10)
-
-TkButton.new(f, :text=>'exit',
- :command=>proc{exit}).pack(:fill=>:x, :pady=>10)
-
-TkFrame.new{|f|
- pack(:side=>:right, :expand=>true, :fill=>:both)
- TkLabel.new(f, :text=>'source::').pack(:anchor=>:w)
- TkFrame.new(f){|ff|
- TkText.new(ff){
- yscrollbar(TkScrollbar.new(ff){pack(:fill=>:y, :side=>:right)})
- insert('end', File.read(__FILE__))
- pack(:side=>:left, :expand=>true, :fill=>:both)
- }
- pack(:expand=>true, :fill=>:both)
- }
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/propagate.rb b/ext/tk/sample/propagate.rb
deleted file mode 100644
index 10e0ed8236..0000000000
--- a/ext/tk/sample/propagate.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-
-TkLabel.new(:text=>"Please click the bottom frame").pack
-
-f = TkFrame.new(:width=>400, :height=>100, :background=>'yellow',
- :relief=>'ridge', :borderwidth=>5).pack
-
-# TkPack.propagate(f, false) # <== important!!
-f.pack_propagate(false) # <== important!!
-
-list = (1..3).collect{|n|
- TkButton.new(f, :text=>"button#{'-X'*n}"){
- command proc{
- puts "button#{'-X'*n}"
- self.unpack
- }
- }
-}
-
-list.unshift(nil)
-
-f.bind('1', proc{
- w = list.shift
- w.unpack if w
- list.push(w)
- list[0].pack(:expand=>true, :anchor=>:center) if list[0]
- })
-
-Tk.mainloop
diff --git a/ext/tk/sample/remote-ip_sample.rb b/ext/tk/sample/remote-ip_sample.rb
deleted file mode 100644
index 13aa3b84f9..0000000000
--- a/ext/tk/sample/remote-ip_sample.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'remote-tk'
-
-puts <<EOM
-This sample controls the other Tk interpreter (Ruby/Tk, Tcl/Tk, and so on)
-which running on the other process. For this purpose, Ruby/Tk uses Tcl/Tk's
-'send' command. Availability of the command depends on your GUI environment.
-If this script doesn't work, please check your environment (see Tcl/Tk FAQ).
-EOM
-#'
-
-unless (wish = TkWinfo.interps.find{|ip| ip =~ /^wish/})
- puts ''
- puts 'Please start "wish" (Tcl/Tk shell) before running this sample script.'
- exit 1
-end
-
-ip = RemoteTkIp.new(wish)
-ip.eval_proc{TkButton.new(:command=>proc{puts 'This procedure is on the controller-ip (Ruby/Tk)'}, :text=>'print on Ruby/Tk (controller-ip)').pack(:fill=>:x)}
-ip.eval_proc{TkButton.new(:command=>'puts {This procedure is on the remote-ip (wish)}', :text=>'print on wish (remote-ip)').pack(:fill=>:x)}
-
-# If your remote-ip is Ruby/Tk, you can control the remote Ruby by
-# 'ruby' or 'ruby_eval' or 'ruby_cmd' on the Tk interpreter.
-if ip.is_rubytk?
- ip.eval_proc{TkButton.new(:command=>'ruby {p 111; p Array.new(3,"ruby")}', :text=>'ruby cmd on the remote-ip').pack(:fill=>:x)}
-end
-
-ip.eval_proc{TkButton.new(:command=>'exit', :text=>'QUIT').pack(:fill=>:x)}
-
-TkButton.new(:command=>proc{exit}, :text=>'QUIT',
- :padx=>10, :pady=>7).pack(:padx=>10, :pady=>7)
-
-Tk.mainloop
diff --git a/ext/tk/sample/remote-ip_sample2.rb b/ext/tk/sample/remote-ip_sample2.rb
deleted file mode 100644
index 567e60411e..0000000000
--- a/ext/tk/sample/remote-ip_sample2.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'remote-tk'
-
-# start sub-process
-ip_name = 'remote_ip'
-ip_list = TkWinfo.interps
-fork{
- exec "/usr/bin/env ruby -r tk -e \"Tk.appname('#{ip_name}');Tk.mainloop\""
-}
-sleep 1 until (app = (TkWinfo.interps - ip_list)[0]) && app =~ /^#{ip_name}/
-p TkWinfo.interps
-
-# create RemoteTkIp object
-ip = RemoteTkIp.new(app)
-
-# setup remote-ip window
-btns = []
-ip.eval_proc{
- btns <<
- TkButton.new(:command=>proc{
- puts 'This procedure is on the controller-ip (Ruby-side)'
- },
- :text=>'print on controller-ip (Ruby-side)').pack(:fill=>:x)
-
- btns <<
- TkButton.new(:command=>
- 'puts {This procedure is on the remote-ip (Tk-side)}',
- :text=>'print on remote-ip (Tk-side)').pack(:fill=>:x)
-
- btns <<
- TkButton.new(:command=>
- 'ruby {
- puts "This procedure is on the remote-ip (Ruby-side)"
- p Array.new(3,"ruby")
- }',
- :text=>'ruby cmd on the remote-ip').pack(:fill=>:x)
-
- TkButton.new(:command=>'exit', :text=>'QUIT').pack(:fill=>:x)
-}
-
-# setup controller-ip window
-btns.each_with_index{|btn, idx|
- # The scope of the eval-block of 'eval_proc' method is different from
- # the enternal. If you want to pass local values to the eval-block,
- # use arguments of eval_proc method. They are passed to block-arguments.
- TkButton.new(:command=>proc{ip.eval_proc(btn){|b| b.flash}},
- :text=>"flash button-#{idx}",
- :padx=>10).pack(:padx=>10, :pady=>2)
-}
-
-TkButton.new(:command=>proc{exit}, :text=>'QUIT',
- :padx=>10, :pady=>7).pack(:padx=>10, :pady=>7)
-
-# start eventloop
-Tk.mainloop
diff --git a/ext/tk/sample/resource.en b/ext/tk/sample/resource.en
deleted file mode 100644
index 39b4013971..0000000000
--- a/ext/tk/sample/resource.en
+++ /dev/null
@@ -1,13 +0,0 @@
-!
-! see Tcl/Tk's "options" manual for "Database Name" and "Database Class"
-!
-*BtnFrame.borderWidth: 5
-*BtnFrame.relief: ridge
-*BtnFrame.Button.background: wheat
-*BtnFrame.Button.foreground: red
-*hello.text: HELLO
-*quit.text: QUIT
-*BTN_CMD.show_msg: {|arg| print "($SAFE=#{$SAFE}) ";\
- print "Hello!! This is a sample of #{arg}.";\
- print "(<<< $SAFE=#{$SAFE})\n"}
-*BTN_CMD.bye_msg: {print "($SAFE=#{$SAFE} >>>) Good-bye¡¥(<<< $SAFE=#{$SAFE})\n"}
diff --git a/ext/tk/sample/resource.ja b/ext/tk/sample/resource.ja
deleted file mode 100644
index 59d4ffaf40..0000000000
--- a/ext/tk/sample/resource.ja
+++ /dev/null
@@ -1,13 +0,0 @@
-!
-! see Tcl/Tk's "options" manual for "Database Name" and "Database Class"
-!
-*BtnFrame.borderWidth: 5
-*BtnFrame.relief: ridge
-*BtnFrame.Button.background: wheat
-*BtnFrame.Button.foreground: red
-*hello.text: ã“ã‚“ã«ã¡ã¯
-*quit.text: 終了
-*BTN_CMD.show_msg: {|arg| print "($SAFE=#{$SAFE} >>>) ";\
- print "ã“ã‚“ã«ã¡ã¯ï¼ï¼ #{arg} ã®ã‚µãƒ³ãƒ—ルã§ã™ï¼Ž";\
- print "(<<< $SAFE=#{$SAFE})\n"}
-*BTN_CMD.bye_msg: {print "($SAFE=#{$SAFE} >>>) ã•ã‚ˆã†ãªã‚‰ï¼Ž(<<< $SAFE=#{$SAFE})\n"}
diff --git a/ext/tk/sample/safe-tk.rb b/ext/tk/sample/safe-tk.rb
deleted file mode 100755
index a8a85d3288..0000000000
--- a/ext/tk/sample/safe-tk.rb
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-# This script is a sample of MultiTkIp class
-
-require "multi-tk"
-
-###############################
-
-TkLabel.new(:text=>'This is the Default Master Ipnterpreter').pack(:padx=>5, :pady=>3)
-TkButton.new(:text=>'QUIT', :command=>proc{exit}).pack(:pady=>3)
-TkFrame.new(:borderwidth=>2, :height=>3,
- :relief=>:sunken).pack(:fill=>:x, :expand=>true,
- :padx=>10, :pady=>7)
-
-safe0_p = proc{|*args| p args}
-
-###############################
-
-puts "---- create a safe slave IP with Ruby's safe-level == 1 ----------"
-ip = MultiTkIp.new_safe_slave(1){|*args| safe0_p["safe_slave safe_level == #{$SAFE}", args]}
-
-puts "\n---- create procs ----------"
-puts 'x = proc{p [\'proc x\', "$SAFE==#{$SAFE}"]; exit}'
-#x = proc{p ['proc x', "$SAFE==#{$SAFE}"]; exit}
-x = proc{p ['proc x', "$SAFE==#{$SAFE}"]; exit}
-TkLabel.new(:text=>'x = proc{p [\'proc x\', "$SAFE==#{$SAFE}"]; exit}',
- :anchor=>:w).pack(:fill=>:x)
-
-puts 'y = proc{|label| p [\'proc y\', "$SAFE==#{$SAFE}", label]; label.text($SAFE)}'
-y = proc{|label| p ['proc y', "$SAFE==#{$SAFE}", label]; label.text($SAFE)}
-TkLabel.new(:text=>'y = proc{|label| p [\'proc y\', "$SAFE==#{$SAFE}", label]; label.text($SAFE)}',
- :anchor=>:w).pack(:fill=>:x)
-
-puts 'z = proc{p [\'proc z\', "$SAFE==#{$SAFE}"]; exit}'
-z = proc{p ['proc z', "$SAFE==#{$SAFE}"]; exit}
-TkLabel.new(:text=>'z = proc{p [\'proc z\', "$SAFE==#{$SAFE}"]; exit}',
- :anchor=>:w).pack(:fill=>:x)
-
-puts "\n---- call 1st eval_proc ----------"
-print 'lbl = '
-p lbl = ip.eval_proc{
- TkLabel.new(:text=>"1st eval_proc : $SAFE == #{$SAFE}").pack
-
- f = TkFrame.new.pack
- TkLabel.new(f, :text=>"$SAFE == ").pack(:side=>:left)
- # TkLabel.new(f, :text=>" (<-- 'lbl' widget is here)").pack(:side=>:right)
- l = TkLabel.new(f).pack(:side=>:right)
-
- TkButton.new(:text=>':command=>proc{l.text($SAFE)}',
- :command=>proc{l.text($SAFE)}).pack(:fill=>:x, :padx=>5)
- TkButton.new(:text=>':command=>x', :command=>x).pack(:fill=>:x, :padx=>5)
- TkButton.new(:text=>':command=>proc{exit}',
- :command=>proc{
- safe0_p["'exit' is called at $SAFE=#{$SAFE}"];exit}
- ).pack(:fill=>:x, :padx=>5)
- TkFrame.new(:borderwidth=>2, :height=>3,
- :relief=>:sunken).pack(:fill=>:x, :expand=>true,
- :padx=>10, :pady=>7)
- l # return the label widget
-}
-
-puts "\n---- change the safe slave IP's safe-level ==> 3 ----------"
-ip.safe_level = 3
-
-puts "\n---- call 2nd eval_proc ----------"
-p ip.eval_proc(proc{
- TkLabel.new(:text=>"2nd eval_proc : $SAFE == #{$SAFE}").pack
- f = TkFrame.new.pack
- TkLabel.new(f, :text=>"$SAFE == ").pack(:side=>:left)
- l = TkLabel.new(f, :text=>$SAFE).pack(:side=>:right)
- TkButton.new(:text=>':command=>proc{l.text($SAFE)}',
- :command=>proc{l.text($SAFE)}).pack(:fill=>:x,
- :padx=>5)
- TkButton.new(:text=>':command=>proc{y.call(l)}',
- :command=>proc{y.call(l)}).pack(:fill=>:x,
- :padx=>5)
- TkButton.new(:text=>':command=>proc{Proc.new(&y).call(l)}',
- :command=>proc{
- Proc.new(&y).call(l)
- }).pack(:fill=>:x, :padx=>5)
- TkButton.new(:text=>':command=>proc{MultiTkIp._proc_on_current_safelevel(y).call(l)}',
- :command=>proc{
- MultiTkIp._proc_on_current_safelevel(y).call(l)
- }).pack(:fill=>:x, :padx=>5)
-if false && Object.const_defined?(:RubyVM) && ::RubyVM.class == Class
- TkButton.new(:text=>':command=>proc{Thread.new(l, &y).value}',
- :command=>proc{
- Thread.new(l, &y).value
- }).pack(:fill=>:x, :padx=>5)
-else
- # KNOWN BUG::
- # Current multi-tk.rb cannot support long term threads on callbacks.
- # Such a thread freezes the Ruby/Tk process.
-end
- TkButton.new(:text=>':command=>proc{z.call}',
- :command=>proc{z.call}).pack(:fill=>:x, :padx=>5)
- TkFrame.new(:borderwidth=>2, :height=>3,
- :relief=>:sunken).pack(:fill=>:x, :expand=>true,
- :padx=>10, :pady=>7)
- })
-
-puts "\n---- call 1st and 2nd eval_str ----------"
-p bind = ip.eval_str('
- TkLabel.new(:text=>"1st and 2nd eval_str : $SAFE == #{$SAFE}").pack
- f = TkFrame.new.pack
- TkLabel.new(f, :text=>"$SAFE == ").pack(:side=>:left)
- l = TkLabel.new(f, :text=>$SAFE).pack(:side=>:right)
- TkButton.new(:text=>":command=>proc{y.call(l)}",
- :command=>proc{y.call(l)}).pack(:fill=>:x, :padx=>5)
- binding
-', binding)
-
-p ip.eval_str("
- TkButton.new(:text=>':command=>proc{ l.text = $SAFE }',
- :command=>proc{ l.text = $SAFE }).pack(:fill=>:x, :padx=>5)
- TkFrame.new(:borderwidth=>2, :height=>3,
- :relief=>:sunken).pack(:fill=>:x, :expand=>true,
- :padx=>10, :pady=>7)
-", bind)
-
-puts "\n---- call 3rd and 4th eval_proc ----------"
-p ip.eval_proc{
- TkLabel.new(:text=>"3rd and 4th eval_proc : $SAFE == #{$SAFE}").pack
-}
-p ip.eval_proc{
- TkButton.new(:text=>':command=>proc{ lbl.text = $SAFE }',
- :command=>proc{ lbl.text = $SAFE }).pack(:fill=>:x, :padx=>5)
-}
-
-puts "\n---- start event-loop ( current $SAFE == #{$SAFE} ) ----------"
-
-Tk.mainloop
diff --git a/ext/tk/sample/scrollframe.rb b/ext/tk/sample/scrollframe.rb
deleted file mode 100644
index 346f88aadd..0000000000
--- a/ext/tk/sample/scrollframe.rb
+++ /dev/null
@@ -1,250 +0,0 @@
-# frozen_string_literal: false
-#
-# Tk::RbWidget::ScrollFrame class
-#
-# This widget class is a frame widget with scrollbars.
-# The ScrollFrame doesn't propagate the size of embedded widgets.
-# When it is configured, scrollregion of the container is changed.
-#
-# Scrollbars can be toggled by Tk::RbWidget::ScrollFrame#vscroll & hscroll.
-# If horizontal or vertical scrollbar is turned off, the horizontal
-# or vertical size of embedded widgets is propagated.
-#
-# Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-module Tk::RbWidget; end
-
-class Tk::RbWidget::ScrollFrame < TkFrame
- include TkComposite
-
- DEFAULT_WIDTH = 200
- DEFAULT_HEIGHT = 200
-
- def initialize_composite(keys={})
- @frame.configure(:width=>DEFAULT_WIDTH, :height=>DEFAULT_HEIGHT)
-
- # create scrollbars
- @h_scroll = TkScrollbar.new(@frame, 'orient'=>'horizontal')
- @v_scroll = TkScrollbar.new(@frame, 'orient'=>'vertical')
-
- # create a canvas widget
- @canvas = TkCanvas.new(@frame,
- :borderwidth=>0, :selectborderwidth=>0,
- :highlightthickness=>0)
-
- # alignment
- TkGrid.rowconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
- @canvas.grid('row'=>0, 'column'=>0, 'sticky'=>'news')
- @frame.grid_propagate(false)
-
- # assign scrollbars
- @canvas.xscrollbar(@h_scroll)
- @canvas.yscrollbar(@v_scroll)
-
- # convert hash keys
- keys = _symbolkey2str(keys)
-
- # check options for the frame
- framekeys = {}
- if keys.key?('classname')
- keys['class'] = keys.delete('classname')
- end
- if @classname = keys.delete('class')
- framekeys['class'] = @classname
- end
- if @colormap = keys.delete('colormap')
- framekeys['colormap'] = @colormap
- end
- if @container = keys.delete('container')
- framekeys['container'] = @container
- end
- if @visual = keys.delete('visual')
- framekeys['visual'] = @visual
- end
- if @classname.kind_of? TkBindTag
- @db_class = @classname
- @classname = @classname.id
- elsif @classname
- @db_class = TkDatabaseClass.new(@classname)
- else
- @db_class = self.class
- @classname = @db_class::WidgetClassName
- end
-
- # create base frame
- @base = TkFrame.new(@canvas, framekeys)
-
- # embed base frame
- @cwin = TkcWindow.new(@canvas, [0, 0], :window=>@base, :anchor=>'nw')
- @canvas.scrollregion(@cwin.bbox)
-
- # binding to reset scrollregion
- @base.bind('Configure'){ _reset_scrollregion(nil, nil) }
-
- # set default receiver of method calls
- @path = @base.path
-
- # scrollbars ON
- vscroll(keys.delete('vscroll'){true})
- hscroll(keys.delete('hscroll'){true})
-
- # please check the differences of the following definitions
- option_methods(
- :scrollbarwidth
- )
-
- # set receiver widgets for configure methods (with alias)
- delegate_alias('scrollbarrelief', 'relief', @h_scroll, @v_scroll)
-
- # set receiver widgets for configure methods
- delegate('DEFAULT', @base)
- delegate('background', @frame, @base, @canvas, @h_scroll, @v_scroll)
- delegate('width', @frame)
- delegate('height', @frame)
- delegate('activebackground', @h_scroll, @v_scroll)
- delegate('troughcolor', @h_scroll, @v_scroll)
- delegate('repeatdelay', @h_scroll, @v_scroll)
- delegate('repeatinterval', @h_scroll, @v_scroll)
- delegate('borderwidth', @frame)
- delegate('relief', @frame)
-
- # do configure
- configure keys unless keys.empty?
- end
-
- # callback for Configure event
- def _reset_scrollregion(h_mod=nil, v_mod=nil)
- cx1, cy1, cx2, cy2 = @canvas.scrollregion
- x1, y1, x2, y2 = @cwin.bbox
- @canvas.scrollregion([x1, y1, x2, y2])
-
- if h_mod.nil? && v_mod.nil?
- if x2 != cx2 && TkGrid.info(@h_scroll).size == 0
- @frame.grid_propagate(true)
- @canvas.width = x2
- Tk.update_idletasks
- @frame.grid_propagate(false)
- end
- if y2 != cy2 && TkGrid.info(@v_scroll).size == 0
- @frame.grid_propagate(true)
- @canvas.height = y2
- Tk.update_idletasks
- @frame.grid_propagate(false)
- end
- else
- @h_scroll.ungrid if h_mod == false
- @v_scroll.ungrid if v_mod == false
-
- h_flag = (TkGrid.info(@h_scroll).size == 0)
- v_flag = (TkGrid.info(@v_scroll).size == 0)
-
- @frame.grid_propagate(true)
-
- @canvas.width = (h_flag)? x2: @canvas.winfo_width
- @canvas.height = (v_flag)? y2: @canvas.winfo_height
-
- @h_scroll.grid('row'=>1, 'column'=>0, 'sticky'=>'ew') if h_mod
- @v_scroll.grid('row'=>0, 'column'=>1, 'sticky'=>'ns') if v_mod
-
- Tk.update_idletasks
-
- @frame.grid_propagate(false)
- end
- end
- private :_reset_scrollregion
-
- # forbid to change binding of @base frame
- def bind(*args)
- @frame.bind(*args)
- end
- def bind_append(*args)
- @frame.bind_append(*args)
- end
- def bind_remove(*args)
- @frame.bind_remove(*args)
- end
- def bindinfo(*args)
- @frame.bindinfo(*args)
- end
-
- # set width of scrollbar
- def scrollbarwidth(width = nil)
- if width
- @h_scroll.width(width)
- @v_scroll.width(width)
- else
- @h_scroll.width
- end
- end
-
- # vertical scrollbar : ON/OFF
- def vscroll(mode)
- Tk.update_idletasks
- st = TkGrid.info(@v_scroll)
- if mode && st.size == 0 then
- @v_scroll.grid('row'=>0, 'column'=>1, 'sticky'=>'ns')
- _reset_scrollregion(nil, true)
- elsif !mode && st.size != 0 then
- _reset_scrollregion(nil, false)
- else
- _reset_scrollregion(nil, nil)
- end
- self
- end
-
- # horizontal scrollbar : ON/OFF
- def hscroll(mode)
- Tk.update_idletasks
- st = TkGrid.info(@h_scroll)
- if mode && st.size == 0 then
- _reset_scrollregion(true, nil)
- elsif !mode && st.size != 0 then
- _reset_scrollregion(false, nil)
- else
- _reset_scrollregion(nil, nil)
- end
- self
- end
-end
-
-# test
-if __FILE__ == $0
- f = Tk::RbWidget::ScrollFrame.new(:scrollbarwidth=>10,
- :width=>300, :height=>200)
- f.pack(:expand=>true, :fill=>:both)
-
- TkButton.new(f, :text=>'foo button', :command=>proc{puts 'foo'}).pack
- TkButton.new(f, :text=>'baaar button', :command=>proc{puts 'baaar'}).pack
- TkButton.new(f, :text=>'baz button', :command=>proc{puts 'baz'}).pack
- TkButton.new(f, :text=>'hoge hoge button',
- :command=>proc{puts 'hoge hoge'}).pack(:side=>:bottom)
-
- # f.hscroll(false)
-
- # add a text widget
- Tk.after(3000){
- t = TkText.new(f).pack(:expand=>true, :fill=>:both)
- t.insert(:end, "An example of Tk::RbWidget::ScrollFrame widget.\n\n")
- t.insert(:end, "Here is a text widget.\n")
- t.insert(:end, "Please resize the application window, ")
- t.insert(:end, "and try the scrollbars ")
- t.insert(:end, "to move the view of packed widgets.\n")
- }
-
- # remove a vertical scrollbar, and then the scrollframe is not scrollable.
- Tk.after(6000){ f.vscroll(false) }
-
- # add a vertical scrollbar, and make the scrollframe scrollable.
- Tk.after(9000){ f.vscroll(true) }
-
- # remove a horizontal scrollbar, and then the scrollframe is not scrollable.
- Tk.after(12000){ f.hscroll(false) }
-
- # add a horizontal scrollbar, and make the scrollframe scrollable.
- Tk.after(15000){ f.hscroll(true) }
-
- Tk.mainloop
-end
diff --git a/ext/tk/sample/tcltklib/batsu.gif b/ext/tk/sample/tcltklib/batsu.gif
deleted file mode 100644
index 880cc73e09..0000000000
--- a/ext/tk/sample/tcltklib/batsu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tcltklib/lines0.tcl b/ext/tk/sample/tcltklib/lines0.tcl
deleted file mode 100644
index 8ed3c5e1c1..0000000000
--- a/ext/tk/sample/tcltklib/lines0.tcl
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /usr/local/bin/wish
-
-proc drawlines {} {
- puts [clock format [clock seconds]]
-
- for {set j 0} {$j < 100} {incr j} {
- puts -nonewline "*"
- flush stdout
- if {$j & 1} {
- set c "blue"
- } {
- set c "red"
- }
- for {set i 0} {$i < 100} {incr i} {
-# .a create line $i 0 0 [expr 500 - $i] -fill $c
- }
- }
-
- puts [clock format [clock seconds]]
-
- for {set j 0} {$j < 100} {incr j} {
- puts -nonewline "*"
- flush stdout
- if {$j & 1} {
- set c "blue"
- } {
- set c "red"
- }
- for {set i 0} {$i < 100} {incr i} {
- .a create line $i 0 0 [expr 500 - $i] -fill $c
- }
- }
-
- puts [clock format [clock seconds]]
-# destroy .
-}
-
-canvas .a -height 500 -width 500
-button .b -text draw -command drawlines
-pack .a .b -side left
-
-# eof
diff --git a/ext/tk/sample/tcltklib/lines1.rb b/ext/tk/sample/tcltklib/lines1.rb
deleted file mode 100644
index 57e3d33f6f..0000000000
--- a/ext/tk/sample/tcltklib/lines1.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /usr/local/bin/ruby
-# frozen_string_literal: false
-
-require "tcltk"
-
-def drawlines()
- print Time.now, "\n"
-
- for j in 0 .. 99
- print "*"
- $stdout.flush
- if (j & 1) != 0
- col = "blue"
- else
- col = "red"
- end
- for i in 0 .. 99
-# $a.e("create line", i, 0, 0, 500 - i, "-fill", col)
- end
- end
-
- print Time.now, "\n"
-
- for j in 0 .. 99
- print "*"
- $stdout.flush
- if (j & 1) != 0
- col = "blue"
- else
- col = "red"
- end
- for i in 0 .. 99
- $a.e("create line", i, 0, 0, 500 - i, "-fill", col)
- end
- end
-
- print Time.now, "\n"
-# $ip.commands()["destroy"].e($root)
-end
-
-$ip = TclTkInterpreter.new()
-$root = $ip.rootwidget()
-$a = TclTkWidget.new($ip, $root, "canvas", "-height 500 -width 500")
-$c = TclTkCallback.new($ip, proc{drawlines()})
-$b = TclTkWidget.new($ip, $root, "button", "-text draw -command", $c)
-
-$ip.commands()["pack"].e($a, $b, "-side left")
-
-TclTk.mainloop
-
-# eof
diff --git a/ext/tk/sample/tcltklib/lines2.rb b/ext/tk/sample/tcltklib/lines2.rb
deleted file mode 100644
index 7ae54d9ea9..0000000000
--- a/ext/tk/sample/tcltklib/lines2.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /usr/local/bin/ruby
-# frozen_string_literal: false
-
-require "tk"
-
-def drawlines()
- print Time.now, "\n"
-
- for j in 0 .. 99
- print "*"
- $stdout.flush
- if (j & 1) != 0
- col = "blue"
- else
- col = "red"
- end
- for i in 0 .. 99
-# TkcLine.new($a, i, 0, 0, 500 - i, "-fill", col)
- end
- end
-
- print Time.now, "\n"
-
- for j in 0 .. 99
- print "*"
- $stdout.flush
- if (j & 1) != 0
- col = "blue"
- else
- col = "red"
- end
- for i in 0 .. 99
- TkcLine.new($a, i, 0, 0, 500 - i, "-fill", col)
- end
- end
-
- print Time.now, "\n"
-# Tk.root.destroy
-end
-
-$a = TkCanvas.new{
- height(500)
- width(500)
-}
-
-$b = TkButton.new{
- text("draw")
- command(proc{drawlines()})
-}
-
-TkPack.configure($a, $b, {"side"=>"left"})
-
-Tk.mainloop
-
-# eof
diff --git a/ext/tk/sample/tcltklib/lines3.rb b/ext/tk/sample/tcltklib/lines3.rb
deleted file mode 100644
index d79bb12ef3..0000000000
--- a/ext/tk/sample/tcltklib/lines3.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /usr/local/bin/ruby
-# frozen_string_literal: false
-
-require "tk"
-
-def drawlines()
- print Time.now, "\n"
-
- for j in 0 .. 99
- print "*"
- $stdout.flush
- if (j & 1) != 0
- col = "blue"
- else
- col = "red"
- end
- for i in 0 .. 99
-# $a.create(TkcLine, i, 0, 0, 500 - i, "fill"=>col)
- end
- end
-
- print Time.now, "\n"
-
- for j in 0 .. 99
- print "*"
- $stdout.flush
- if (j & 1) != 0
- col = "blue"
- else
- col = "red"
- end
- for i in 0 .. 99
- $a.create(TkcLine, i, 0, 0, 500 - i, "fill"=>col)
- end
- end
-
- print Time.now, "\n"
-# Tk.root.destroy
-end
-
-$a = TkCanvas.new{
- height(500)
- width(500)
-}
-
-$b = TkButton.new{
- text("draw")
- command(proc{drawlines()})
-}
-
-TkPack.configure($a, $b, {"side"=>"left"})
-
-Tk.mainloop
-
-# eof
diff --git a/ext/tk/sample/tcltklib/lines4.rb b/ext/tk/sample/tcltklib/lines4.rb
deleted file mode 100644
index 37ffc0ee74..0000000000
--- a/ext/tk/sample/tcltklib/lines4.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /usr/local/bin/ruby
-# frozen_string_literal: false
-
-require "tk"
-
-def drawlines()
- print Time.now, "\n"
-
- for j in 0 .. 99
- print "*"
- $stdout.flush
- if (j & 1) != 0
- col = "blue"
- else
- col = "red"
- end
- for i in 0 .. 99
-# TkCore::INTERP.__invoke($a.path, "create", "line", i.to_s, '0', '0', (500 - i).to_s, "-fill", col)
- end
- end
-
- print Time.now, "\n"
-
- for j in 0 .. 99
- print "*"
- $stdout.flush
- if (j & 1) != 0
- col = "blue"
- else
- col = "red"
- end
- for i in 0 .. 99
- TkCore::INTERP.__invoke($a.path, "create", "line", i.to_s, '0', '0', (500 - i).to_s, "-fill", col)
- end
- end
-
- print Time.now, "\n"
-# Tk.root.destroy
-end
-
-$a = TkCanvas.new{
- height(500)
- width(500)
-}
-
-$b = TkButton.new{
- text("draw")
- command(proc{drawlines()})
-}
-
-TkPack.configure($a, $b, {"side"=>"left"})
-
-Tk.mainloop
-
-# eof
diff --git a/ext/tk/sample/tcltklib/maru.gif b/ext/tk/sample/tcltklib/maru.gif
deleted file mode 100644
index 2c0202892e..0000000000
--- a/ext/tk/sample/tcltklib/maru.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tcltklib/safeTk.rb b/ext/tk/sample/tcltklib/safeTk.rb
deleted file mode 100644
index 5fac9e2e23..0000000000
--- a/ext/tk/sample/tcltklib/safeTk.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tcltklib'
-
-master = TclTkIp.new
-slave_name = 'slave0'
-slave = master.create_slave(slave_name, true)
-master._eval("::safe::interpInit #{slave_name}")
-master._eval("::safe::loadTk #{slave_name}")
-
-master._invoke('label', '.l1', '-text', 'master')
-master._invoke('pack', '.l1', '-padx', '30', '-pady', '50')
-master._eval('label .l2 -text {root widget of master-ip}')
-master._eval('pack .l2 -padx 30 -pady 50')
-
-slave._invoke('label', '.l1', '-text', 'slave')
-slave._invoke('pack', '.l1', '-padx', '30', '-pady', '50')
-slave._eval('label .l2 -text {root widget of slave-ip}')
-slave._eval('pack .l2 -padx 30 -pady 20')
-slave._eval('label .l3 -text {( container frame widget of master-ip )}')
-slave._eval('pack .l3 -padx 30 -pady 20')
-
-TclTkLib.mainloop
diff --git a/ext/tk/sample/tcltklib/sample0.rb b/ext/tk/sample/tcltklib/sample0.rb
deleted file mode 100644
index 0cc2de4878..0000000000
--- a/ext/tk/sample/tcltklib/sample0.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /usr/local/bin/ruby -vd
-# frozen_string_literal: false
-
-# tcltklib ライブラリã®ãƒ†ã‚¹ãƒˆ
-
-require "tcltklib"
-
-def test
- # インタプリタを生æˆã™ã‚‹
- ip1 = TclTkIp.new()
-
- # 評価ã—ã¦ã¿ã‚‹
- print ip1._return_value().inspect, "\n"
- print ip1._eval("puts {abc}").inspect, "\n"
-
- # ボタンを作ã£ã¦ã¿ã‚‹
- print ip1._return_value().inspect, "\n"
- print ip1._eval("button .lab -text exit -command \"destroy .\"").inspect,
- "\n"
- print ip1._return_value().inspect, "\n"
- print ip1._eval("pack .lab").inspect, "\n"
- print ip1._return_value().inspect, "\n"
-
- # インタプリタã‹ã‚‰ ruby コマンドを評価ã—ã¦ã¿ã‚‹
-# print ip1._eval(%q/ruby {print "print by ruby\n"}/).inspect, "\n"
- print ip1._eval(%q+puts [ruby {print "print by ruby\n"; "puts by tcl/tk"}]+).inspect, "\n"
- print ip1._return_value().inspect, "\n"
-
- # ã‚‚ã†ä¸€ã¤ã‚¤ãƒ³ã‚¿ãƒ—リタを生æˆã—ã¦ã¿ã‚‹
- ip2 = TclTkIp.new()
- ip2._eval("button .lab -text test -command \"puts test ; destroy .\"")
- ip2._eval("pack .lab")
-
- TclTkLib.mainloop
-end
-
-test
-GC.start
-
-print "exit\n"
diff --git a/ext/tk/sample/tcltklib/sample1.rb b/ext/tk/sample/tcltklib/sample1.rb
deleted file mode 100644
index b4ad6436bd..0000000000
--- a/ext/tk/sample/tcltklib/sample1.rb
+++ /dev/null
@@ -1,635 +0,0 @@
-#! /usr/local/bin/ruby -d
-# -*- encoding: utf-8 -*-
-# frozen_string_literal: false
-# -d オプションを付ã‘ã‚‹ã¨, デãƒãƒƒã‚°æƒ…報を表示ã™ã‚‹.
-
-# tcltk ライブラリã®ã‚µãƒ³ãƒ—ル
-
-# ã¾ãš, ライブラリを require ã™ã‚‹.
-require "tcltk"
-
-# 以下ã¯, Test1 ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã® initialize() ã§,
-# tcl/tk ã«é–¢ã™ã‚‹å‡¦ç†ã‚’è¡Œã†ä¾‹ã§ã‚ã‚‹.
-# å¿…ãšã—ã‚‚ãã®ã‚ˆã†ã«ã™ã‚‹å¿…è¦ã¯ç„¡ã,
-# (ã‚‚ã—, ãã†ã—ãŸã‘ã‚Œã°) class ã®å¤–㧠tcl/tk ã«é–¢ã™ã‚‹å‡¦ç†ã‚’è¡Œã£ã¦ã‚‚良ã„.
-
-class Test1
- # åˆæœŸåŒ–(インタプリタを生æˆã—ã¦ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã‚’生æˆã™ã‚‹).
- def initialize()
-
- #### 使ã†å‰ã®ãŠã¾ã˜ãªã„
-
- # インタプリタã®ç”Ÿæˆ.
- ip = TclTkInterpreter.new()
- # コマンドã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトを c ã«è¨­å®šã—ã¦ãŠã.
- c = ip.commands()
- # 使用ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトã¯å¤‰æ•°ã«å…¥ã‚Œã¦ãŠã.
- append, bind, button, destroy, incr, info, label, place, set, wm =
- c.values_at(
- "append", "bind", "button", "destroy", "incr", "info", "label", "place",
- "set", "wm")
-
- #### tcl/tk ã®ã‚³ãƒžãƒ³ãƒ‰ã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクト(TclTkCommand)ã®æ“作
-
- # 実行ã™ã‚‹æ™‚ã¯, e() メソッドを使ã†.
- # (以下ã¯, tcl/tk ã«ãŠã‘ã‚‹ info command r* を実行.)
- print info.e("command", "r*"), "\n"
- # 引数ã¯, ã¾ã¨ã‚ãŸæ–‡å­—列ã«ã—ã¦ã‚‚åŒã˜.
- print info.e("command r*"), "\n"
- # 変数を用ã„ãªãã¨ã‚‚実行ã§ãã‚‹ãŒ, 見ãŸã‚ãŒæ‚ªã„.
- print c["info"].e("command", "r*"), "\n"
- # インタプリタã®ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦ã‚‚実行ã§ãã‚‹ãŒ, 効率ãŒæ‚ªã„.
- print ip.info("command", "r*"), "\n"
-
- ####
-
- # 以下, 生æˆã—ãŸã‚ªãƒ–ジェクトã¯å¤‰æ•°ã«ä»£å…¥ã—ã¦ãŠã‹ãªã„ã¨
- # GC ã®å¯¾è±¡ã«ãªã£ã¦ã—ã¾ã†.
-
- #### tcl/tk ã®å¤‰æ•°ã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクト(TclTkVariable)ã®æ“作
-
- # 生æˆã¨åŒæ™‚ã«å€¤ã‚’設定ã™ã‚‹.
- v1 = TclTkVariable.new(ip, "20")
- # 読ã¿å‡ºã—㯠get メソッドを使ã†.
- print v1.get(), "\n"
- # 設定㯠set メソッドを使ã†.
- v1.set(40)
- print v1.get(), "\n"
- # set コマンドを使ã£ã¦èª­ã¿å‡ºã—, 設定ã¯å¯èƒ½ã ãŒè¦‹ãŸã‚ãŒæ‚ªã„.
- # e() メソッド等ã®å¼•æ•°ã«ç›´æŽ¥ TclTkObject や数値を書ã„ã¦ã‚‚良ã„.
- set.e(v1, 30)
- print set.e(v1), "\n"
- # tcl/tk ã®ã‚³ãƒžãƒ³ãƒ‰ã§å¤‰æ•°ã‚’æ“作ã§ãã‚‹.
- incr.e(v1)
- print v1.get(), "\n"
- append.e(v1, 10)
- print v1.get(), "\n"
-
- #### tcl/tk ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクト(TclTkWidget)ã®æ“作
-
- # ルートウィジェットをå–り出ã™.
- root = ip.rootwidget()
- # ウィジェットã®æ“作.
- root.e("configure -height 300 -width 300")
- # タイトルを付ã‘ã‚‹ã¨ã㯠wm を使ã†.
- wm.e("title", root, $0)
- # 親ウィジェットã¨ã‚³ãƒžãƒ³ãƒ‰ã‚’指定ã—ã¦, ウィジェットを作る.
- l1 = TclTkWidget.new(ip, root, label, "-text {type `x' to print}")
- # place ã™ã‚‹ã¨è¡¨ç¤ºã•ã‚Œã‚‹.
- place.e(l1, "-x 0 -rely 0.0 -relwidth 1 -relheight 0.1")
- # コマンドåã¯æ–‡å­—列ã§æŒ‡å®šã—ã¦ã‚‚良ã„ãŒ, 見ãŸã‚ãŒæ‚ªã„.
- # (コマンドåã¯ç‹¬ç«‹ã—ãŸå¼•æ•°ã§ãªã‘ã‚Œã°ãªã‚‰ãªã„.)
- l2 = TclTkWidget.new(ip, root, "label")
- # ウィジェットã®æ“作.
- l2.e("configure -text {type `q' to exit}")
- place.e(l2, "-x 0 -rely 0.1 -relwidth 1 -relheight 0.1")
-
- #### tcl/tk ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクト(TclTkCallback)ã®æ“作
-
- # コールãƒãƒƒã‚¯ã‚’生æˆã™ã‚‹.
- c1 = TclTkCallback.new(ip, proc{sample(ip, root)})
- # コールãƒãƒƒã‚¯ã‚’æŒã¤ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã‚’生æˆã™ã‚‹.
- b1 = TclTkWidget.new(ip, root, button, "-text sample -command", c1)
- place.e(b1, "-x 0 -rely 0.2 -relwidth 1 -relheight 0.1")
- # イベントループを抜ã‘ã‚‹ã«ã¯ destroy.e(root) ã™ã‚‹.
- c2 = TclTkCallback.new(ip, proc{destroy.e(root)})
- b2 = TclTkWidget.new(ip, root, button, "-text exit -command", c2)
- place.e(b2, "-x 0 -rely 0.3 -relwidth 1 -relheight 0.1")
-
- #### イベントã®ãƒã‚¤ãƒ³ãƒ‰
- # script ã®è¿½åŠ  (bind tag sequence +script) ã¯ä»Šã®ã¨ã“ã‚ã§ããªã„.
- # (イテレータ変数ã®è¨­å®šãŒã†ã¾ãã„ã‹ãªã„.)
-
- # 基本的ã«ã¯ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã«å¯¾ã™ã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã¨åŒã˜.
- c3 = TclTkCallback.new(ip, proc{print("q pressed\n"); destroy.e(root)})
- bind.e(root, "q", c3)
- # bind コマンド㧠% ç½®æ›ã«ã‚ˆã‚Šãƒ‘ラメータをå—ã‘å–ã‚ŠãŸã„ã¨ãã¯,
- # proc{} ã®å¾Œã‚ã«æ–‡å­—列ã§æŒ‡å®šã™ã‚‹ã¨,
- # ç½®æ›çµæžœã‚’イテレータ変数を通ã—ã¦å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã‚‹.
- # ãŸã ã— proc{} ã®å¾Œã‚ã®æ–‡å­—列ã¯,
- # bind コマンドã«ä¸Žãˆã‚‹ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ä»¥å¤–ã§æŒ‡å®šã—ã¦ã¯ã„ã‘ãªã„.
- c4 = TclTkCallback.new(ip, proc{|i| print("#{i} pressed\n")}, "%A")
- bind.e(root, "x", c4)
- # TclTkCallback ã‚’ GC ã®å¯¾è±¡ã«ã—ãŸã‘ã‚Œã°,
- # dcb() (ã¾ãŸã¯ deletecallbackkeys()) ã™ã‚‹å¿…è¦ãŒã‚ã‚‹.
- cb = [c1, c2, c3, c4]
- c5 = TclTkCallback.new(ip, proc{|w| TclTk.dcb(cb, root, w)}, "%W")
- bind.e(root, "<Destroy>", c5)
- cb.push(c5)
-
- #### tcl/tk ã®ã‚¤ãƒ¡ãƒ¼ã‚¸ã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクト(TclTkImage)ã®æ“作
-
- # データを指定ã—ã¦ç”Ÿæˆã™ã‚‹.
- i1 = TclTkImage.new(ip, "photo", "-file maru.gif")
- # ラベルã«å¼µã‚Šä»˜ã‘ã¦ã¿ã‚‹.
- l3 = TclTkWidget.new(ip, root, label, "-relief raised -image", i1)
- place.e(l3, "-x 0 -rely 0.4 -relwidth 0.2 -relheight 0.2")
- # 空ã®ã‚¤ãƒ¡ãƒ¼ã‚¸ã‚’生æˆã—ã¦å¾Œã§æ“作ã™ã‚‹.
- i2 = TclTkImage.new(ip, "photo")
- # イメージをæ“作ã™ã‚‹.
- i2.e("copy", i1)
- i2.e("configure -gamma 0.5")
- l4 = TclTkWidget.new(ip, root, label, "-relief raised -image", i2)
- place.e(l4, "-relx 0.2 -rely 0.4 -relwidth 0.2 -relheight 0.2")
-
- ####
- end
-
- # サンプルã®ãŸã‚ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã‚’生æˆã™ã‚‹.
- def sample(ip, parent)
- bind, button, destroy, grid, toplevel, wm = ip.commands().values_at(
- "bind", "button", "destroy", "grid", "toplevel", "wm")
-
- ## toplevel
-
- # æ–°ã—ã„ウインドウを開ãã«ã¯, toplevel を使ã†.
- t1 = TclTkWidget.new(ip, parent, toplevel)
- # タイトルを付ã‘ã¦ãŠã
- wm.e("title", t1, "sample")
-
- # ウィジェットãŒç ´å£Šã•ã‚ŒãŸã¨ã, コールãƒãƒƒã‚¯ãŒ GC ã®å¯¾è±¡ã«ãªã‚‹ã‚ˆã†ã«ã™ã‚‹.
- cb = []
- cb.push(c = TclTkCallback.new(ip, proc{|w| TclTk.dcb(cb, t1, w)}, "%W"))
- bind.e(t1, "<Destroy>", c)
-
- # ボタンã®ç”Ÿæˆ.
- wid = []
- # toplevel ウィジェットを破壊ã™ã‚‹ã«ã¯ destroy ã™ã‚‹.
- cb.push(c = TclTkCallback.new(ip, proc{destroy.e(t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text close -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_label(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text label -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_button(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text button -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_checkbutton(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text checkbutton -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_radiobutton(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text radiobutton -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_scale(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text scale -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_entry(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text entry -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_text(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text text -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_raise(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text raise/lower -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_modal(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text message/modal -command",
- c))
- cb.push(c = TclTkCallback.new(ip, proc{test_menu(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text menu -command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_listbox(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text listbox/scrollbar",
- "-command", c))
- cb.push(c = TclTkCallback.new(ip, proc{test_canvas(ip, t1)}))
- wid.push(TclTkWidget.new(ip, t1, button, "-text canvas -command", c))
-
- # grid ã§è¡¨ç¤ºã™ã‚‹.
- ro = co = 0
- wid.each{|w|
- grid.e(w, "-row", ro, "-column", co, "-sticky news")
- ro += 1
- if ro == 7
- ro = 0
- co += 1
- end
- }
- end
-
- # inittoplevel(ip, parent, title)
- # 以下ã®å‡¦ç†ã‚’ã¾ã¨ã‚ã¦è¡Œã†.
- # 1. toplevel ウィジェットを作æˆã™ã‚‹.
- # 2. コールãƒãƒƒã‚¯ã‚’登録ã™ã‚‹é…列を用æ„ã—, toplevel ウィジェットã®
- # <Destroy> イベントã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’削除ã™ã‚‹æ‰‹ç¶šãを登録ã™ã‚‹.
- # 3. クローズボタンを作る.
- # 作æˆã—㟠toplevel ウィジェット, クローズボタン, コールãƒãƒƒã‚¯ç™»éŒ²ç”¨å¤‰æ•°
- # ã‚’è¿”ã™.
- # ip: インタプリタ
- # parent: 親ウィジェット
- # title: toplevel ウィジェットã®ã‚¦ã‚¤ãƒ³ãƒ‰ã‚¦ã®ã‚¿ã‚¤ãƒˆãƒ«
- def inittoplevel(ip, parent, title)
- bind, button, destroy, toplevel, wm = ip.commands().values_at(
- "bind", "button", "destroy", "toplevel", "wm")
-
- # æ–°ã—ã„ウインドウを開ãã«ã¯, toplevel を使ã†.
- t1 = TclTkWidget.new(ip, parent, toplevel)
- # タイトルを付ã‘ã¦ãŠã
- wm.e("title", t1, title)
-
- # ウィジェットãŒç ´å£Šã•ã‚ŒãŸã¨ã, コールãƒãƒƒã‚¯ãŒ GC ã®å¯¾è±¡ã«ãªã‚‹ã‚ˆã†ã«ã™ã‚‹.
- cb = []
- cb.push(c = TclTkCallback.new(ip, proc{|w| TclTk.dcb(cb, t1, w)}, "%W"))
- bind.e(t1, "<Destroy>", c)
- # close ボタンを作ã£ã¦ãŠã.
- # toplevel ウィジェットを破壊ã™ã‚‹ã«ã¯ destroy ã™ã‚‹.
- cb.push(c = TclTkCallback.new(ip, proc{destroy.e(t1)}))
- b1 = TclTkWidget.new(ip, t1, button, "-text close -command", c)
-
- return t1, b1, cb
- end
-
- # label ã®ã‚µãƒ³ãƒ—ル.
- def test_label(ip, parent)
- button, global, label, pack = ip.commands().values_at(
- "button", "global", "label", "pack")
- t1, b1, cb = inittoplevel(ip, parent, "label")
-
- ## label
-
- # ã„ã‚ã„ã‚ãªå½¢ã®ãƒ©ãƒ™ãƒ«.
- l1 = TclTkWidget.new(ip, t1, label, "-text {default(flat)}")
- l2 = TclTkWidget.new(ip, t1, label, "-text raised -relief raised")
- l3 = TclTkWidget.new(ip, t1, label, "-text sunken -relief sunken")
- l4 = TclTkWidget.new(ip, t1, label, "-text groove -relief groove")
- l5 = TclTkWidget.new(ip, t1, label, "-text ridge -relief ridge")
- l6 = TclTkWidget.new(ip, t1, label, "-bitmap error")
- l7 = TclTkWidget.new(ip, t1, label, "-bitmap questhead")
-
- # pack ã—ã¦ã‚‚表示ã•ã‚Œã‚‹.
- pack.e(b1, l1, l2, l3, l4, l5, l6, l7, "-pady 3")
-
- ## -textvariable
-
- # tcltk ライブラリã®å®Ÿè£…ã§ã¯, コールãƒãƒƒã‚¯ã¯ tcl/tk ã®``手続ã''を通ã—ã¦
- # 呼ã°ã‚Œã‚‹. ã—ãŸãŒã£ã¦, コールãƒãƒƒã‚¯ã®ä¸­ã§(大域)変数ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã¨ãã¯,
- # global ã™ã‚‹å¿…è¦ãŒã‚ã‚‹.
- # global ã™ã‚‹å‰ã«å¤‰æ•°ã«å€¤ã‚’設定ã—ã¦ã—ã¾ã†ã¨ã‚¨ãƒ©ãƒ¼ã«ãªã‚‹ã®ã§,
- # tcl/tk ã«ãŠã‘る表ç¾å½¢ã ã‘生æˆã—ã¦, 実際ã«å€¤ã‚’設定ã—ãªã„よã†ã«,
- # 2 番目ã®å¼•æ•°ã«ã¯ nil を与ãˆã‚‹.
- v1 = TclTkVariable.new(ip, nil)
- global.e(v1)
- v1.set(100)
- # -textvariable ã§å¤‰æ•°ã‚’設定ã™ã‚‹.
- l6 = TclTkWidget.new(ip, t1, label, "-textvariable", v1)
- # コールãƒãƒƒã‚¯ã®ä¸­ã‹ã‚‰å¤‰æ•°ã‚’æ“作ã™ã‚‹.
- cb.push(c = TclTkCallback.new(ip, proc{
- global.e(v1); v1.set(v1.get().to_i + 10)}))
- b2 = TclTkWidget.new(ip, t1, button, "-text +10 -command", c)
- cb.push(c = TclTkCallback.new(ip, proc{
- global.e(v1); v1.set(v1.get().to_i - 10)}))
- b3 = TclTkWidget.new(ip, t1, button, "-text -10 -command", c)
- pack.e(l6, b2, b3)
- end
-
- # button ã®ã‚µãƒ³ãƒ—ル.
- def test_button(ip, parent)
- button, pack = ip.commands().values_at("button", "pack")
- t1, b1, cb = inittoplevel(ip, parent, "button")
-
- ## button
-
- # コールãƒãƒƒã‚¯å†…ã§å‚ç…§ã™ã‚‹å¤‰æ•°ã¯å…ˆã«å®£è¨€ã—ã¦ãŠã‹ãªã‘ã‚Œã°ãªã‚‰ãªã„.
- b3 = b4 = nil
- cb.push(c = TclTkCallback.new(ip, proc{b3.e("flash"); b4.e("flash")}))
- b2 = TclTkWidget.new(ip, t1, button, "-text flash -command", c)
- cb.push(c = TclTkCallback.new(ip, proc{b2.e("configure -state normal")}))
- b3 = TclTkWidget.new(ip, t1, button, "-text normal -command", c)
- cb.push(c = TclTkCallback.new(ip, proc{b2.e("configure -state disabled")}))
- b4 = TclTkWidget.new(ip, t1, button, "-text disable -command", c)
- pack.e(b1, b2, b3, b4)
- end
-
- # checkbutton ã®ã‚µãƒ³ãƒ—ル.
- def test_checkbutton(ip, parent)
- checkbutton, global, pack = ip.commands().values_at(
- "checkbutton", "global", "pack")
- t1, b1, cb = inittoplevel(ip, parent, "checkbutton")
-
- ## checkbutton
-
- v1 = TclTkVariable.new(ip, nil)
- global.e(v1)
- # -variable ã§å¤‰æ•°ã‚’設定ã™ã‚‹.
- ch1 = TclTkWidget.new(ip, t1, checkbutton, "-onvalue on -offvalue off",
- "-textvariable", v1, "-variable", v1)
- pack.e(b1, ch1)
- end
-
- # radiobutton ã®ã‚µãƒ³ãƒ—ル.
- def test_radiobutton(ip, parent)
- global, label, pack, radiobutton = ip.commands().values_at(
- "global", "label", "pack", "radiobutton")
- t1, b1, cb = inittoplevel(ip, parent, "radiobutton")
-
- ## radiobutton
-
- v1 = TclTkVariable.new(ip, nil)
- global.e(v1)
- # ヌルストリング㯠"{}" ã§æŒ‡å®šã™ã‚‹.
- v1.set("{}")
- l1 = TclTkWidget.new(ip, t1, label, "-textvariable", v1)
- # -variable ã§åŒã˜å¤‰æ•°ã‚’指定ã™ã‚‹ã¨åŒã˜ã‚°ãƒ«ãƒ¼ãƒ—ã«ãªã‚‹.
- ra1 = TclTkWidget.new(ip, t1, radiobutton,
- "-text radio1 -value r1 -variable", v1)
- ra2 = TclTkWidget.new(ip, t1, radiobutton,
- "-text radio2 -value r2 -variable", v1)
- cb.push(c = TclTkCallback.new(ip, proc{global.e(v1); v1.set("{}")}))
- ra3 = TclTkWidget.new(ip, t1, radiobutton,
- "-text clear -value r3 -variable", v1, "-command", c)
- pack.e(b1, l1, ra1, ra2, ra3)
- end
-
- # scale ã®ã‚µãƒ³ãƒ—ル.
- def test_scale(ip, parent)
- global, pack, scale = ip.commands().values_at(
- "global", "pack", "scale")
- t1, b1, cb = inittoplevel(ip, parent, "scale")
-
- ## scale
-
- v1 = TclTkVariable.new(ip, nil)
- global.e(v1)
- v1.set(219)
- # コールãƒãƒƒã‚¯å†…ã§å‚ç…§ã™ã‚‹å¤‰æ•°ã¯å…ˆã«å®£è¨€ã—ã¦ãŠã‹ãªã‘ã‚Œã°ãªã‚‰ãªã„.
- sca1 = nil
- cb.push(c = TclTkCallback.new(ip, proc{global.e(v1); v = v1.get();
- sca1.e("configure -background", format("#%02x%02x%02x", v, v, v))}))
- sca1 = TclTkWidget.new(ip, t1, scale,
- "-label scale -orient h -from 0 -to 255 -variable", v1, "-command", c)
- pack.e(b1, sca1)
- end
-
- # entry ã®ã‚µãƒ³ãƒ—ル.
- def test_entry(ip, parent)
- button, entry, global, pack = ip.commands().values_at(
- "button", "entry", "global", "pack")
- t1, b1, cb = inittoplevel(ip, parent, "entry")
-
- ## entry
-
- v1 = TclTkVariable.new(ip, nil)
- global.e(v1)
- # ヌルストリング㯠"{}" ã§æŒ‡å®šã™ã‚‹.
- v1.set("{}")
- en1 = TclTkWidget.new(ip, t1, entry, "-textvariable", v1)
- cb.push(c = TclTkCallback.new(ip, proc{
- global.e(v1); print(v1.get(), "\n"); v1.set("{}")}))
- b2 = TclTkWidget.new(ip, t1, button, "-text print -command", c)
- pack.e(b1, en1, b2)
- end
-
- # text ã®ã‚µãƒ³ãƒ—ル.
- def test_text(ip, parent)
- button, pack, text = ip.commands().values_at(
- "button", "pack", "text")
- t1, b1, cb = inittoplevel(ip, parent, "text")
-
- ## text
-
- te1 = TclTkWidget.new(ip, t1, text)
- cb.push(c = TclTkCallback.new(ip, proc{
- # 1 行目㮠0 文字目ã‹ã‚‰æœ€å¾Œã¾ã§ã‚’表示ã—, 削除ã™ã‚‹.
- print(te1.e("get 1.0 end")); te1.e("delete 1.0 end")}))
- b2 = TclTkWidget.new(ip, t1, button, "-text print -command", c)
- pack.e(b1, te1, b2)
- end
-
- # raise/lower ã®ã‚µãƒ³ãƒ—ル.
- def test_raise(ip, parent)
- button, frame, lower, pack, raise = ip.commands().values_at(
- "button", "frame", "lower", "pack", "raise")
- t1, b1, cb = inittoplevel(ip, parent, "raise/lower")
-
- ## raise/lower
-
- # button ã‚’éš ã™ãƒ†ã‚¹ãƒˆã®ãŸã‚ã«, frame を使ã†.
- f1 = TclTkWidget.new(ip, t1, frame)
- # コールãƒãƒƒã‚¯å†…ã§å‚ç…§ã™ã‚‹å¤‰æ•°ã¯å…ˆã«å®£è¨€ã—ã¦ãŠã‹ãªã‘ã‚Œã°ãªã‚‰ãªã„.
- b2 = nil
- cb.push(c = TclTkCallback.new(ip, proc{raise.e(f1, b2)}))
- b2 = TclTkWidget.new(ip, t1, button, "-text raise -command", c)
- cb.push(c = TclTkCallback.new(ip, proc{lower.e(f1, b2)}))
- b3 = TclTkWidget.new(ip, t1, button, "-text lower -command", c)
- lower.e(f1, b3)
-
- pack.e(b2, b3, "-in", f1)
- pack.e(b1, f1)
- end
-
- # modal ãªã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®ã‚µãƒ³ãƒ—ル.
- def test_modal(ip, parent)
- button, frame, message, pack, tk_chooseColor, tk_getOpenFile,
- tk_messageBox = ip.commands().values_at(
- "button", "frame", "message", "pack", "tk_chooseColor",
- "tk_getOpenFile", "tk_messageBox")
- # 最åˆã« load ã•ã‚Œã¦ã„ãªã„ライブラリ㯠ip.commands() ã«å­˜åœ¨ã—ãªã„ã®ã§,
- # TclTkLibCommand を生æˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹.
- tk_dialog = TclTkLibCommand.new(ip, "tk_dialog")
- t1, b1, cb = inittoplevel(ip, parent, "message/modal")
-
- ## message
-
- mes = "ã“れ㯠message ウィジェットã®ãƒ†ã‚¹ãƒˆã§ã™."
- mes += "以下㯠modal ãªã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®ãƒ†ã‚¹ãƒˆã§ã™."
- me1 = TclTkWidget.new(ip, t1, message, "-text {#{mes}}")
-
- ## modal
-
- # tk_messageBox
- cb.push(c = TclTkCallback.new(ip, proc{
- print tk_messageBox.e("-type yesnocancel -message messageBox",
- "-icon error -default cancel -title messageBox"), "\n"}))
- b2 = TclTkWidget.new(ip, t1, button, "-text messageBox -command", c)
- # tk_dialog
- cb.push(c = TclTkCallback.new(ip, proc{
- # ウィジェットåを生æˆã™ã‚‹ãŸã‚ã«ãƒ€ãƒŸãƒ¼ã® frame を生æˆ.
- print tk_dialog.e(TclTkWidget.new(ip, t1, frame),
- "dialog dialog error 2 yes no cancel"), "\n"}))
- b3 = TclTkWidget.new(ip, t1, button, "-text dialog -command", c)
- # tk_chooseColor
- cb.push(c = TclTkCallback.new(ip, proc{
- print tk_chooseColor.e("-title chooseColor"), "\n"}))
- b4 = TclTkWidget.new(ip, t1, button, "-text chooseColor -command", c)
- # tk_getOpenFile
- cb.push(c = TclTkCallback.new(ip, proc{
- print tk_getOpenFile.e("-defaultextension .rb",
- "-filetypes {{{Ruby Script} {.rb}} {{All Files} {*}}}",
- "-title getOpenFile"), "\n"}))
- b5 = TclTkWidget.new(ip, t1, button, "-text getOpenFile -command", c)
-
- pack.e(b1, me1, b2, b3, b4, b5)
- end
-
- # menu ã®ã‚µãƒ³ãƒ—ル.
- def test_menu(ip, parent)
- global, menu, menubutton, pack = ip.commands().values_at(
- "global", "menu", "menubutton", "pack")
- tk_optionMenu = TclTkLibCommand.new(ip, "tk_optionMenu")
- t1, b1, cb = inittoplevel(ip, parent, "menu")
-
- ## menu
-
- # menubutton を生æˆã™ã‚‹.
- mb1 = TclTkWidget.new(ip, t1, menubutton, "-text menu")
- # menu を生æˆã™ã‚‹.
- me1 = TclTkWidget.new(ip, mb1, menu)
- # mb1 ã‹ã‚‰ me1 ãŒèµ·å‹•ã•ã‚Œã‚‹ã‚ˆã†ã«ã™ã‚‹.
- mb1.e("configure -menu", me1)
-
- # cascade ã§èµ·å‹•ã•ã‚Œã‚‹ menu を生æˆã™ã‚‹.
- me11 = TclTkWidget.new(ip, me1, menu)
- # radiobutton ã®ã‚µãƒ³ãƒ—ル.
- v1 = TclTkVariable.new(ip, nil); global.e(v1); v1.set("r1")
- me11.e("add radiobutton -label radio1 -value r1 -variable", v1)
- me11.e("add radiobutton -label radio2 -value r2 -variable", v1)
- me11.e("add radiobutton -label radio3 -value r3 -variable", v1)
- # cascade ã«ã‚ˆã‚Š mb11 ãŒèµ·å‹•ã•ã‚Œã‚‹ã‚ˆã†ã«ã™ã‚‹.
- me1.e("add cascade -label cascade -menu", me11)
-
- # checkbutton ã®ã‚µãƒ³ãƒ—ル.
- v2 = TclTkVariable.new(ip, nil); global.e(v2); v2.set("none")
- me1.e("add checkbutton -label check -variable", v2)
- # separator ã®ã‚µãƒ³ãƒ—ル.
- me1.e("add separator")
- # command ã®ã‚µãƒ³ãƒ—ル.
- v3 = nil
- cb.push(c = TclTkCallback.new(ip, proc{
- global.e(v1, v2, v3); print "v1: ", v1.get(), ", v2: ", v2.get(),
- ", v3: ", v3.get(), "\n"}))
- me1.e("add command -label print -command", c)
-
- ## tk_optionMenu
-
- v3 = TclTkVariable.new(ip, nil); global.e(v3); v3.set("opt2")
- om1 = TclTkWidget.new(ip, t1, tk_optionMenu, v3, "opt1 opt2 opt3 opt4")
-
- pack.e(b1, mb1, om1, "-side left")
- end
-
- # listbox ã®ã‚µãƒ³ãƒ—ル.
- def test_listbox(ip, parent)
- clipboard, frame, grid, listbox, lower, menu, menubutton, pack, scrollbar,
- selection = ip.commands().values_at(
- "clipboard", "frame", "grid", "listbox", "lower", "menu", "menubutton",
- "pack", "scrollbar", "selection")
- t1, b1, cb = inittoplevel(ip, parent, "listbox")
-
- ## listbox/scrollbar
-
- f1 = TclTkWidget.new(ip, t1, frame)
- # コールãƒãƒƒã‚¯å†…ã§å‚ç…§ã™ã‚‹å¤‰æ•°ã¯å…ˆã«å®£è¨€ã—ã¦ãŠã‹ãªã‘ã‚Œã°ãªã‚‰ãªã„.
- li1 = sc1 = sc2 = nil
- # 実行時ã«, 後ã‚ã«ãƒ‘ラメータãŒã¤ãコールãƒãƒƒã‚¯ã¯,
- # イテレータ変数ã§ãã®ãƒ‘ラメータをå—ã‘å–ã‚‹ã“ã¨ãŒã§ãã‚‹.
- # (複数ã®ãƒ‘ラメータã¯ã²ã¨ã¤ã®æ–‡å­—列ã«ã¾ã¨ã‚られる.)
- cb.push(c1 = TclTkCallback.new(ip, proc{|i| li1.e("xview", i)}))
- cb.push(c2 = TclTkCallback.new(ip, proc{|i| li1.e("yview", i)}))
- cb.push(c3 = TclTkCallback.new(ip, proc{|i| sc1.e("set", i)}))
- cb.push(c4 = TclTkCallback.new(ip, proc{|i| sc2.e("set", i)}))
- # listbox
- li1 = TclTkWidget.new(ip, f1, listbox,
- "-xscrollcommand", c3, "-yscrollcommand", c4,
- "-selectmode extended -exportselection true")
- for i in 1..20
- li1.e("insert end {line #{i} line #{i} line #{i} line #{i} line #{i}}")
- end
- # scrollbar
- sc1 = TclTkWidget.new(ip, f1, scrollbar, "-orient horizontal -command", c1)
- sc2 = TclTkWidget.new(ip, f1, scrollbar, "-orient vertical -command", c2)
-
- ## selection/clipboard
-
- mb1 = TclTkWidget.new(ip, t1, menubutton, "-text edit")
- me1 = TclTkWidget.new(ip, mb1, menu)
- mb1.e("configure -menu", me1)
- cb.push(c = TclTkCallback.new(ip, proc{
- # clipboard をクリア.
- clipboard.e("clear")
- # selection ã‹ã‚‰æ–‡å­—列を読ã¿è¾¼ã¿ clipboard ã«è¿½åŠ ã™ã‚‹.
- clipboard.e("append {#{selection.e('get')}}")}))
- me1.e("add command -label {selection -> clipboard} -command",c)
- cb.push(c = TclTkCallback.new(ip, proc{
- # li1 をクリア.
- li1.e("delete 0 end")
- # clipboard ã‹ã‚‰æ–‡å­—列をå–り出ã—, 1 è¡Œãšã¤
- selection.e("get -selection CLIPBOARD").split(/\n/).each{|line|
- # li1 ã«æŒ¿å…¥ã™ã‚‹.
- li1.e("insert end {#{line}}")}}))
- me1.e("add command -label {clipboard -> listbox} -command",c)
-
- grid.e(li1, "-row 0 -column 0 -sticky news")
- grid.e(sc1, "-row 1 -column 0 -sticky ew")
- grid.e(sc2, "-row 0 -column 1 -sticky ns")
- grid.e("rowconfigure", f1, "0 -weight 100")
- grid.e("columnconfigure", f1, "0 -weight 100")
- f2 = TclTkWidget.new(ip, t1, frame)
- lower.e(f2, b1)
- pack.e(b1, mb1, "-in", f2, "-side left")
- pack.e(f2, f1)
- end
-
- # canvas ã®ã‚µãƒ³ãƒ—ル.
- def test_canvas(ip, parent)
- canvas, lower, pack = ip.commands().values_at("canvas", "lower", "pack")
- t1, b1, cb = inittoplevel(ip, parent, "canvas")
-
- ## canvas
-
- ca1 = TclTkWidget.new(ip, t1, canvas, "-width 400 -height 300")
- lower.e(ca1, b1)
- # rectangle を作る.
- idr = ca1.e("create rectangle 10 10 20 20")
- # oval を作る.
- ca1.e("create oval 60 10 100 50")
- # polygon を作る.
- ca1.e("create polygon 110 10 110 30 140 10")
- # line を作る.
- ca1.e("create line 150 10 150 30 190 10")
- # arc を作る.
- ca1.e("create arc 200 10 250 50 -start 0 -extent 90 -style pieslice")
- # i1 ã¯æœ¬å½“ã¯, ã©ã“ã‹ã§ç ´å£Šã—ãªã‘ã‚Œã°ãªã‚‰ãªã„ãŒ, é¢å€’ãªã®ã§æ”¾ã£ã¦ã‚ã‚‹.
- i1 = TclTkImage.new(ip, "photo", "-file maru.gif")
- # image を作る.
- ca1.e("create image 100 100 -image", i1)
- # bitmap を作る.
- ca1.e("create bitmap 260 50 -bitmap questhead")
- # text を作る.
- ca1.e("create text 320 50 -text {drag rectangle}")
- # window を作る(クローズボタン).
- ca1.e("create window 200 200 -window", b1)
-
- # bind ã«ã‚ˆã‚Š rectangle ã‚’ drag ã§ãるよã†ã«ã™ã‚‹.
- cb.push(c = TclTkCallback.new(ip, proc{|i|
- # i ã« x 㨠y ã‚’å—ã‘å–ã‚‹ã®ã§, å–り出ã™.
- x, y = i.split(/ /); x = x.to_f; y = y.to_f
- # 座標を変更ã™ã‚‹.
- ca1.e("coords current #{x - 5} #{y - 5} #{x + 5} #{y + 5}")},
- # x, y 座標を空白ã§åŒºåˆ‡ã£ãŸã‚‚ã®ã‚’イテレータ変数ã¸æ¸¡ã™ã‚ˆã†ã«æŒ‡å®š.
- "%x %y"))
- # rectangle ã« bind ã™ã‚‹.
- ca1.e("bind", idr, "<B1-Motion>", c)
-
- pack.e(ca1)
- end
-end
-
-# test driver
-
-if ARGV.size == 0
- print "#{$0} n ã§, n 個ã®ã‚¤ãƒ³ã‚¿ãƒ—リタを起動ã—ã¾ã™.\n"
- n = 1
-else
- n = ARGV[0].to_i
-end
-
-print "start\n"
-ip = []
-
-# インタプリタ, ウィジェット等ã®ç”Ÿæˆ.
-for i in 1 .. n
- ip.push(Test1.new())
-end
-
-# 用æ„ãŒã§ããŸã‚‰ã‚¤ãƒ™ãƒ³ãƒˆãƒ«ãƒ¼ãƒ—ã«å…¥ã‚‹.
-TclTk.mainloop()
-print "exit from mainloop\n"
-
-# インタプリタ㌠GC ã•ã‚Œã‚‹ã‹ã®ãƒ†ã‚¹ãƒˆ.
-ip = []
-print "GC.start\n" if $DEBUG
-GC.start() if $DEBUG
-print "end\n"
-
-exit
-
-# end
diff --git a/ext/tk/sample/tcltklib/sample2.rb b/ext/tk/sample/tcltklib/sample2.rb
deleted file mode 100644
index 7b9e4c2cca..0000000000
--- a/ext/tk/sample/tcltklib/sample2.rb
+++ /dev/null
@@ -1,452 +0,0 @@
-#!/usr/local/bin/ruby
-# frozen_string_literal: false
-#----------------------> pretty simple othello game <-----------------------
-# othello.rb
-#
-# version 0.3
-# maeda shugo (shuto@po.aianet.ne.jp)
-#---------------------------------------------------------------------------
-
-# Sep. 17, 1997 modified by Y. Shigehiro for tcltk library
-# maeda shugo (shugo@po.aianet.ne.jp) æ°ã«ã‚ˆã‚‹
-# (ruby/tk ã§æ›¸ã‹ã‚Œã¦ã„ãŸ) ruby ã®ã‚µãƒ³ãƒ—ルプログラム
-# http://www.aianet.or.jp/~shugo/ruby/othello.rb.gz
-# ã‚’ tcltk ライブラリを使ã†ã‚ˆã†ã«, 機械的ã«å¤‰æ›´ã—ã¦ã¿ã¾ã—ãŸ.
-#
-# ãªã‚‹ã¹ãオリジナルã¨åŒã˜ã«ãªã‚‹ã‚ˆã†ã«ã—ã¦ã‚ã‚Šã¾ã™.
-
-require "observer"
-require "tcltk"
-$ip = TclTkInterpreter.new()
-$root = $ip.rootwidget()
-$button, $canvas, $checkbutton, $frame, $label, $pack, $update, $wm =
- $ip.commands().values_at(
- "button", "canvas", "checkbutton", "frame", "label", "pack", "update", "wm")
-
-class Othello
-
- EMPTY = 0
- BLACK = 1
- WHITE = - BLACK
-
- attr :in_com_turn
- attr :game_over
-
- class Board
-
- include Observable
-
- DIRECTIONS = [
- [-1, -1], [-1, 0], [-1, 1],
- [ 0, -1], [ 0, 1],
- [ 1, -1], [ 1, 0], [ 1, 1]
- ]
-
- attr_accessor :com_disk
-
- def initialize(othello)
- @othello = othello
- reset
- end
-
- def notify_observers(*arg)
- if @observer_peers != nil
- super(*arg)
- end
- end
-
- def reset
- @data = [
- [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY],
- [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY],
- [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY],
- [EMPTY, EMPTY, EMPTY, WHITE, BLACK, EMPTY, EMPTY, EMPTY],
- [EMPTY, EMPTY, EMPTY, BLACK, WHITE, EMPTY, EMPTY, EMPTY],
- [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY],
- [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY],
- [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY]
- ]
- changed
- notify_observers
- end
-
- def man_disk
- return - @com_disk
- end
-
- def other_disk(disk)
- return - disk
- end
-
- def get_disk(row, col)
- return @data[row][col]
- end
-
- def reverse_to(row, col, my_disk, dir_y, dir_x)
- y = row
- x = col
- begin
- y += dir_y
- x += dir_x
- if y < 0 || x < 0 || y > 7 || x > 7 ||
- @data[y][x] == EMPTY
- return
- end
- end until @data[y][x] == my_disk
- begin
- @data[y][x] = my_disk
- changed
- notify_observers(y, x)
- y -= dir_y
- x -= dir_x
- end until y == row && x == col
- end
-
- def put_disk(row, col, disk)
- @data[row][col] = disk
- changed
- notify_observers(row, col)
- DIRECTIONS.each do |dir|
- reverse_to(row, col, disk, *dir)
- end
- end
-
- def count_disk(disk)
- num = 0
- @data.each do |rows|
- rows.each do |d|
- if d == disk
- num += 1
- end
- end
- end
- return num
- end
-
- def count_point_to(row, col, my_disk, dir_y, dir_x)
- return 0 if @data[row][col] != EMPTY
- count = 0
- loop do
- row += dir_y
- col += dir_x
- break if row < 0 || col < 0 || row > 7 || col > 7
- case @data[row][col]
- when my_disk
- return count
- when other_disk(my_disk)
- count += 1
- when EMPTY
- break
- end
- end
- return 0
- end
-
- def count_point(row, col, my_disk)
- count = 0
- DIRECTIONS.each do |dir|
- count += count_point_to(row, col, my_disk, *dir)
- end
- return count
- end
-
- def corner?(row, col)
- return (row == 0 && col == 0) ||
- (row == 0 && col == 7) ||
- (row == 7 && col == 0) ||
- (row == 7 && col == 7)
- end
-
- def search(my_disk)
- max = 0
- max_row = nil
- max_col = nil
- for row in 0 .. 7
- for col in 0 .. 7
- buf = count_point(row, col, my_disk)
- if (corner?(row, col) && buf > 0) || max < buf
- max = buf
- max_row = row
- max_col = col
- end
- end
- end
- return max_row, max_col
- end
- end #--------------------------> class Board ends here
-
- class BoardView < TclTkWidget
-
- BACK_GROUND_COLOR = "DarkGreen"
- HILIT_BG_COLOR = "green"
- BORDER_COLOR = "black"
- BLACK_COLOR = "black"
- WHITE_COLOR = "white"
- STOP_COLOR = "red"
-
- attr :left
- attr :top
- attr :right
- attr :bottom
-
- class Square
-
- attr_accessor :oval
- attr :row
- attr :col
-
- def initialize(view, row, col)
- @view = view
- @id = @view.e("create rectangle",
- *(view.tk_rect(view.left + col,
- view.top + row,
- view.left + col + 1,
- view.top + row + 1) \
- << "-fill #{BACK_GROUND_COLOR}") )
- @row = row
- @col = col
- @view.e("itemconfigure", @id,
- "-width 0.5m -outline #{BORDER_COLOR}")
- @view.e("bind", @id, "<Any-Enter>", TclTkCallback.new($ip, proc{
- if @oval == nil
- view.e("itemconfigure", @id, "-fill #{HILIT_BG_COLOR}")
- end
- }))
- @view.e("bind", @id, "<Any-Leave>", TclTkCallback.new($ip, proc{
- view.e("itemconfigure", @id, "-fill #{BACK_GROUND_COLOR}")
- }))
- @view.e("bind", @id, "<ButtonRelease-1>", TclTkCallback.new($ip,
- proc{
- view.click_square(self)
- }))
- end
-
- def blink(color)
- @view.e("itemconfigure", @id, "-fill #{color}")
- $update.e()
- sleep(0.1)
- @view.e("itemconfigure", @id, "-fill #{BACK_GROUND_COLOR}")
- end
- end #-----------------------> class Square ends here
-
- def initialize(othello, board)
- super($ip, $root, $canvas)
- @othello = othello
- @board = board
- @board.add_observer(self)
-
- @squares = Array.new(8)
- for i in 0 .. 7
- @squares[i] = Array.new(8)
- end
- @left = 1
- @top = 0.5
- @right = @left + 8
- @bottom = @top + 8
-
- i = self.e("create rectangle", *tk_rect(@left, @top, @right, @bottom))
- self.e("itemconfigure", i,
- "-width 1m -outline #{BORDER_COLOR} -fill #{BACK_GROUND_COLOR}")
-
- for row in 0 .. 7
- for col in 0 .. 7
- @squares[row][col] = Square.new(self, row, col)
- end
- end
-
- update
- end
-
- def tk_rect(left, top, right, bottom)
- return left.to_s + "c", top.to_s + "c",
- right.to_s + "c", bottom.to_s + "c"
- end
-
- def clear
- each_square do |square|
- if square.oval != nil
- self.e("delete", square.oval)
- square.oval = nil
- end
- end
- end
-
- def draw_disk(row, col, disk)
- if disk == EMPTY
- if @squares[row][col].oval != nil
- self.e("delete", @squares[row][col].oval)
- @squares[row][col].oval = nil
- end
- return
- end
-
- $update.e()
- sleep(0.05)
- oval = @squares[row][col].oval
- if oval == nil
- oval = self.e("create oval", *tk_rect(@left + col + 0.2,
- @top + row + 0.2,
- @left + col + 0.8,
- @top + row + 0.8))
- @squares[row][col].oval = oval
- end
- case disk
- when BLACK
- color = BLACK_COLOR
- when WHITE
- color = WHITE_COLOR
- else
- fail format("Unknown disk type: %d", disk)
- end
- self.e("itemconfigure", oval, "-outline #{color} -fill #{color}")
- end
-
- def update(row = nil, col = nil)
- if row && col
- draw_disk(row, col, @board.get_disk(row, col))
- else
- each_square do |square|
- draw_disk(square.row, square.col,
- @board.get_disk(square.row, square.col))
- end
- end
- @othello.show_point
- end
-
- def each_square
- @squares.each do |rows|
- rows.each do |square|
- yield(square)
- end
- end
- end
-
- def click_square(square)
- if @othello.in_com_turn || @othello.game_over ||
- @board.count_point(square.row,
- square.col,
- @board.man_disk) == 0
- square.blink(STOP_COLOR)
- return
- end
- @board.put_disk(square.row, square.col, @board.man_disk)
- @othello.com_turn
- end
-
- private :draw_disk
- public :update
- end #----------------------> class BoardView ends here
-
- def initialize
- @msg_label = TclTkWidget.new($ip, $root, $label)
- $pack.e(@msg_label)
-
- @board = Board.new(self)
- @board_view = BoardView.new(self, @board)
- #### added by Y. Shigehiro
- ## board_view ã®å¤§ãã•ã‚’設定ã™ã‚‹.
- x1, y1, x2, y2 = @board_view.e("bbox all").split(/ /).collect{|i| i.to_f}
- @board_view.e("configure -width", x2 - x1)
- @board_view.e("configure -height", y2 - y1)
- ## scrollregion を設定ã™ã‚‹.
- @board_view.e("configure -scrollregion {", @board_view.e("bbox all"),
- "}")
- #### ã“ã“ã¾ã§
- $pack.e(@board_view, "-fill both -expand true")
-
- panel = TclTkWidget.new($ip, $root, $frame)
-
- @play_black = TclTkWidget.new($ip, panel, $checkbutton,
- "-text {com is black} -command", TclTkCallback.new($ip, proc{
- switch_side
- }))
- $pack.e(@play_black, "-side left")
-
- quit = TclTkWidget.new($ip, panel, $button, "-text Quit -command",
- TclTkCallback.new($ip, proc{
- exit
- }))
- $pack.e(quit, "-side right -fill x")
-
- reset = TclTkWidget.new($ip, panel, $button, "-text Reset -command",
- TclTkCallback.new($ip, proc{
- reset_game
- }))
- $pack.e(reset, "-side right -fill x")
-
- $pack.e(panel, "-side bottom -fill x")
-
-# root = Tk.root
- $wm.e("title", $root, "Othello")
- $wm.e("iconname", $root, "Othello")
-
- @board.com_disk = WHITE
- @game_over = false
-
- TclTk.mainloop
- end
-
- def switch_side
- if @in_com_turn
- @play_black.e("toggle")
- else
- @board.com_disk = @board.man_disk
- com_turn unless @game_over
- end
- end
-
- def reset_game
- if @board.com_disk == BLACK
- @board.com_disk = WHITE
- @play_black.e("toggle")
- end
- @board_view.clear
- @board.reset
- $wm.e("title", $root, "Othello")
- @game_over = false
- end
-
- def com_turn
- @in_com_turn = true
- $update.e()
- sleep(0.5)
- begin
- com_disk = @board.count_disk(@board.com_disk)
- man_disk = @board.count_disk(@board.man_disk)
- if @board.count_disk(EMPTY) == 0
- if man_disk == com_disk
- $wm.e("title", $root, "{Othello - Draw!}")
- elsif man_disk > com_disk
- $wm.e("title", $root, "{Othello - You Win!}")
- else
- $wm.e("title", $root, "{Othello - You Loose!}")
- end
- @game_over = true
- break
- elsif com_disk == 0
- $wm.e("title", $root, "{Othello - You Win!}")
- @game_over = true
- break
- elsif man_disk == 0
- $wm.e("title", $root, "{Othello - You Loose!}")
- @game_over = true
- break
- end
- row, col = @board.search(@board.com_disk)
- break if row == nil || col == nil
- @board.put_disk(row, col, @board.com_disk)
- end while @board.search(@board.man_disk) == [nil, nil]
- @in_com_turn = false
- end
-
- def show_point
- black = @board.count_disk(BLACK)
- white = @board.count_disk(WHITE)
- @msg_label.e("configure -text",
- %Q/{#{format("BLACK: %.2d WHITE: %.2d", black, white)}}/)
- end
-end #----------------------> class Othello ends here
-
-Othello.new
-
-#----------------------------------------------> othello.rb ends here
diff --git a/ext/tk/sample/tkalignbox.rb b/ext/tk/sample/tkalignbox.rb
deleted file mode 100644
index 89aae111b7..0000000000
--- a/ext/tk/sample/tkalignbox.rb
+++ /dev/null
@@ -1,236 +0,0 @@
-# frozen_string_literal: false
-#
-# tkalignbox.rb : align widgets with same width/height
-#
-# by Hidetoshi NAGAI
-#
-# The box size depends on 'reqheight' and 'reqwidth' of contained widgets.
-# If you want to give the box size when those requested sizes are 0,
-# please set box.propagate = false (See the test routine at the tail of
-# this file).
-
-require 'tk'
-
-module Tk
- module RbWidget
- class AlignBox < TkFrame
- end
- end
-end
-
-class Tk::RbWidget::AlignBox < TkFrame
- def initialize(*args)
- if self.class == Tk::RbWidget::AlignBox
- fail RuntimeError, "Tk::AlignBox is an abstract class"
- end
- @padx = 0
- @pady = 0
- if args[-1].kind_of? Hash
- keys = _symbolkey2str(args.pop)
- @padx = keys.delete('padx') || 0
- @pady = keys.delete('pady') || 0
- args.push(keys)
- end
- super(*args)
- @max_width = 0
- @max_height = 0
- @propagate = true
- @widgets = []
- end
-
- def _set_framesize
- fail RuntimeError, "Tk::AlignBox is an abstract class"
- end
- private :_set_framesize
-
- def _place_config(widget, idx, cnt)
- fail RuntimeError, "Tk::AlignBox is an abstract class"
- end
- private :_place_config
-
- def align
- widgets = []
- @widgets.each{|w| widgets << w if w.winfo_exist?}
- @widgets = widgets
- cnt = @widgets.size.to_f
- @widgets.each_with_index{|w, idx| _place_config(w, idx, cnt)}
- @widgets = widgets
- _set_framesize if @propagate
- self
- end
-
- def add(*widgets)
- widgets.each{|w|
- unless w.kind_of? TkWindow
- fail RuntimeError, "#{w.inspect} is not a widget instance."
- end
- @widgets.delete(w)
- @widgets << w
- sz = w.winfo_reqwidth
- @max_width = sz if @max_width < sz
- sz = w.winfo_reqheight
- @max_height = sz if @max_height < sz
- }
- align
- end
-
- def <<(widget)
- add(widget)
- end
-
- def insert(idx, widget)
- unless widget.kind_of? TkWindow
- fail RuntimeError, "#{widget.inspect} is not a widget instance."
- end
- @widgets.delete(widget)
- @widgets[idx,0] = widget
- sz = widget.winfo_reqwidth
- @max_width = sz if @max_width < sz
- sz = widget.winfo_reqheight
- @max_height = sz if @max_height < sz
- align
- end
-
- def delete(idx)
- ret = @widgets.delete_at(idx)
- @req_size = 0
- @widget.each{|w|
- sz = w.winfo_reqwidth
- @max_width = sz if @max_width < sz
- sz = w.winfo_reqheight
- @max_height = sz if @max_height < sz
- }
- align
- ret
- end
-
- def padx(size = nil)
- if size
- @padx = size
- align
- else
- @padx
- end
- end
-
- def pady(size = nil)
- if size
- @pady = size
- align
- else
- @pady
- end
- end
-
- attr_accessor :propagate
-end
-
-class Tk::RbWidget::HBox < Tk::RbWidget::AlignBox
- def _set_framesize
- bd = self.borderwidth
- self.width((@max_width + 2*@padx) * @widgets.size + 2*bd)
- self.height(@max_height + 2*@pady + 2*bd)
- end
- private :_set_framesize
-
- def _place_config(widget, idx, cnt)
- widget.place_in(self,
- 'relx'=>idx/cnt, 'x'=>@padx,
- 'rely'=>0, 'y'=>@pady,
- 'relwidth'=>1.0/cnt, 'width'=>-2*@padx,
- 'relheight'=>1.0, 'height'=>-2*@pady)
- end
- private :_place_config
-end
-Tk::RbWidget::HLBox = Tk::RbWidget::HBox
-
-class Tk::RbWidget::HRBox < Tk::RbWidget::HBox
- def _place_config(widget, idx, cnt)
- widget.place_in(self,
- 'relx'=>(cnt - idx - 1)/cnt, 'x'=>@padx,
- 'rely'=>0, 'y'=>@pady,
- 'relwidth'=>1.0/cnt, 'width'=>-2*@padx,
- 'relheight'=>1.0, 'height'=>-2*@pady)
- end
- private :_place_config
-end
-
-class Tk::RbWidget::VBox < Tk::RbWidget::AlignBox
- def _set_framesize
- bd = self.borderwidth
- self.width(@max_width + 2*@padx + 2*bd)
- self.height((@max_height + 2*@pady) * @widgets.size + 2*bd)
- end
- private :_set_framesize
-
- def _place_config(widget, idx, cnt)
- widget.place_in(self,
- 'relx'=>0, 'x'=>@padx,
- 'rely'=>idx/cnt, 'y'=>@pady,
- 'relwidth'=>1.0, 'width'=>-2*@padx,
- 'relheight'=>1.0/cnt, 'height'=>-2*@pady)
- end
- private :_place_config
-end
-Tk::RbWidget::VTBox = Tk::RbWidget::VBox
-
-class Tk::RbWidget::VBBox < Tk::RbWidget::VBox
- def _place_config(widget, idx, cnt)
- widget.place_in(self,
- 'relx'=>0, 'x'=>@padx,
- 'rely'=>(cnt - idx - 1)/cnt, 'y'=>@pady,
- 'relwidth'=>1.0, 'width'=>-2*@padx,
- 'relheight'=>1.0/cnt, 'height'=>-2*@pady)
- end
- private :_place_config
-end
-
-################################################
-# test
-################################################
-if __FILE__ == $0
- f = Tk::RbWidget::HBox.new(:borderwidth=>3, :relief=>'ridge').pack
- f.add(TkButton.new(f, :text=>'a'),
- TkButton.new(f, :text=>'aa', :font=>'Helvetica 16'),
- TkButton.new(f, :text=>'aaa'),
- TkButton.new(f, :text=>'aaaa'))
-
- f = Tk::RbWidget::HBox.new(:borderwidth=>3, :relief=>'ridge',
- :padx=>7, :pady=>3, :background=>'yellow').pack
- f.add(TkButton.new(f, :text=>'a'),
- TkButton.new(f, :text=>'aa', :font=>'Helvetica 16'),
- TkButton.new(f, :text=>'aaa'),
- TkButton.new(f, :text=>'aaaa'))
-
- f = Tk::RbWidget::VBox.new(:borderwidth=>5,
- :relief=>'groove').pack(:fill=>:y, :expand=>true)
- f.add(TkButton.new(f, :text=>'a'),
- TkButton.new(f, :text=>'aa', :font=>'Helvetica 30'),
- TkButton.new(f, :text=>'aaa'),
- TkButton.new(f, :text=>'aaaa'))
-
- f = Tk::RbWidget::HRBox.new(:borderwidth=>3,
- :relief=>'raised').pack(:fill=>:x)
- f.add(TkButton.new(f, :text=>'a'),
- TkButton.new(f, :text=>'aa'),
- TkButton.new(f, :text=>'aaa'))
-
- f = Tk::RbWidget::VBBox.new(:borderwidth=>3,
- :relief=>'ridge').pack(:fill=>:x)
- f.propagate = false
- f.height 100
- f.add(TkFrame.new(f){|ff|
- TkButton.new(ff, :text=>'a').pack(:pady=>4, :padx=>6,
- :fill=>:both, :expand=>true)
- },
- TkFrame.new(f){|ff|
- TkButton.new(ff, :text=>'aa').pack(:pady=>4, :padx=>6,
- :fill=>:both, :expand=>true)
- },
- TkFrame.new(f){|ff|
- TkButton.new(ff, :text=>'aaaa').pack(:pady=>4, :padx=>6,
- :fill=>:both, :expand=>true)
- })
-
- Tk.mainloop
-end
diff --git a/ext/tk/sample/tkballoonhelp.rb b/ext/tk/sample/tkballoonhelp.rb
deleted file mode 100644
index f6f2c8ab0c..0000000000
--- a/ext/tk/sample/tkballoonhelp.rb
+++ /dev/null
@@ -1,221 +0,0 @@
-# frozen_string_literal: false
-#
-# tkballoonhelp.rb : simple balloon help widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# Add a balloon help to a widget.
-# This widget has only poor features. If you need more useful features,
-# please try to use the Tix extension of Tcl/Tk under Ruby/Tk.
-#
-# The interval time to display a balloon help is defined 'interval' option
-# (default is 750ms).
-#
-require 'tk'
-
-module Tk
- module RbWidget
- class BalloonHelp<TkLabel
- end
- end
-end
-class Tk::RbWidget::BalloonHelp<TkLabel
- DEFAULT_FOREGROUND = 'black'
- DEFAULT_BACKGROUND = 'white'
- DEFAULT_INTERVAL = 750
-
- def _balloon_binding(interval)
- @timer = TkAfter.new(interval, 1, proc{show})
- def @timer.interval(val)
- @sleep_time = val
- end
- @bindtag = TkBindTag.new
- @bindtag.bind('Enter', proc{@timer.start})
- @bindtag.bind('Motion', proc{@timer.restart; erase})
- @bindtag.bind('Any-ButtonPress', proc{@timer.restart; erase})
- @bindtag.bind('Leave', proc{@timer.stop; erase})
- tags = @parent.bindtags
- idx = tags.index(@parent)
- unless idx
- ppath = TkComm.window(@parent.path)
- idx = tags.index(ppath) || 0
- end
- tags[idx,0] = @bindtag
- @parent.bindtags(tags)
- end
- private :_balloon_binding
-
- def initialize(parent=nil, keys={})
- @parent = parent || Tk.root
-
- @frame = TkToplevel.new(@parent)
- @frame.withdraw
- @frame.overrideredirect(true)
- @frame.transient(TkWinfo.toplevel(@parent))
- @epath = @frame.path
-
- if keys
- keys = _symbolkey2str(keys)
- else
- keys = {}
- end
-
- @command = keys.delete('command')
-
- @interval = keys.delete('interval'){DEFAULT_INTERVAL}
- _balloon_binding(@interval)
-
- # @label = TkLabel.new(@frame, 'background'=>'bisque').pack
- @label = TkLabel.new(@frame,
- 'foreground'=>DEFAULT_FOREGROUND,
- 'background'=>DEFAULT_BACKGROUND).pack
- @label.configure(_symbolkey2str(keys)) unless keys.empty?
- @path = @label
- end
-
- def epath
- @epath
- end
-
- def interval(val)
- if val
- @timer.interval(val)
- else
- @interval
- end
- end
-
- def command(cmd = Proc.new)
- @command = cmd
- self
- end
-
- def show
- x = TkWinfo.pointerx(@parent)
- y = TkWinfo.pointery(@parent)
- @frame.geometry("+#{x+1}+#{y+1}")
-
- if @command
- case @command.arity
- when 0
- @command.call
- when 2
- @command.call(x - TkWinfo.rootx(@parent), y - TkWinfo.rooty(@parent))
- when 3
- @command.call(x - TkWinfo.rootx(@parent), y - TkWinfo.rooty(@parent),
- self)
- else
- @command.call(x - TkWinfo.rootx(@parent), y - TkWinfo.rooty(@parent),
- self, @parent)
- end
- end
-
- @frame.deiconify
- @frame.raise
-
- begin
- @org_cursor = @parent.cget('cursor')
- rescue
- @org_cursor = @parent['cursor']
- end
- begin
- @parent.configure('cursor', 'crosshair')
- rescue
- @parent.cursor('crosshair')
- end
- end
-
- def erase
- begin
- @parent.configure('cursor', @org_cursor)
- rescue
- @parent.cursor(@org_cursor)
- end
- @frame.withdraw
- end
-
- def destroy
- @frame.destroy
- end
-end
-
-################################################
-# test
-################################################
-if __FILE__ == $0
- TkButton.new('text'=>'This button has a balloon help') {|b|
- pack('fill'=>'x')
- Tk::RbWidget::BalloonHelp.new(b, 'text'=>' Message ')
- }
- TkButton.new('text'=>'This button has another balloon help') {|b|
- pack('fill'=>'x')
- Tk::RbWidget::BalloonHelp.new(b,
- 'text'=>"CONFIGURED MESSAGE\nchange colors, and so on",
- 'interval'=>200, 'font'=>'courier',
- 'background'=>'gray', 'foreground'=>'red')
- }
-
- sb = TkScrollbox.new.pack(:fill=>:x)
- sb.insert(:end, *%w(aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm))
-=begin
- # CASE1 : command takes no argument
- bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
- :relief=>:ridge, :background=>'white',
- :command=>proc{
- y = TkWinfo.pointery(sb) - TkWinfo.rooty(sb)
- bh.text "current index == #{sb.nearest(y)}"
- })
-=end
-=begin
- # CASE2 : command takes 2 arguments
- bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
- :relief=>:ridge, :background=>'white',
- :command=>proc{|x, y|
- bh.text "current index == #{sb.nearest(y)}"
- })
-=end
-=begin
- # CASE3 : command takes 3 arguments
- Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
- :relief=>:ridge, :background=>'white',
- :command=>proc{|x, y, bhelp|
- bhelp.text "current index == #{sb.nearest(y)}"
- })
-=end
-=begin
- # CASE4a : command is a Proc object and takes 4 arguments
- cmd = proc{|x, y, bhelp, parent|
- bhelp.text "current index == #{parent.nearest(y)}"
- }
-
- Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
- :relief=>:ridge, :background=>'white',
- :command=>cmd)
-
- sb2 = TkScrollbox.new.pack(:fill=>:x)
- sb2.insert(:end, *%w(AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM))
- Tk::RbWidget::BalloonHelp.new(sb2, :interval=>500,
- :padx=>5, :relief=>:raised,
- :background=>'gray25', :foreground=>'white',
- :command=>cmd)
-=end
-#=begin
- # CASE4b : command is a Method object and takes 4 arguments
- def set_msg(x, y, bhelp, parent)
- bhelp.text "current index == #{parent.nearest(y)}"
- end
- cmd = self.method(:set_msg)
-
- Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
- :relief=>:ridge, :background=>'white',
- :command=>cmd)
-
- sb2 = TkScrollbox.new.pack(:fill=>:x)
- sb2.insert(:end, *%w(AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM))
- Tk::RbWidget::BalloonHelp.new(sb2, :interval=>500,
- :padx=>5, :relief=>:raised,
- :background=>'gray25', :foreground=>'white',
- :command=>cmd)
-#=end
-
- Tk.mainloop
-end
diff --git a/ext/tk/sample/tkbiff.rb b/ext/tk/sample/tkbiff.rb
deleted file mode 100644
index 8dc586a8ff..0000000000
--- a/ext/tk/sample/tkbiff.rb
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-if ARGV[0] != '-d'
- unless $DEBUG
- exit if fork
- end
-else
- ARGV.shift
-end
-
-if ARGV.length == 0
- if ENV['MAIL']
- $spool = ENV['MAIL']
- else
- $spool = '/var/spool/mail/' + ENV['USER']
- end
-else
- $spool = ARGV[0]
-end
-
-require "base64"
-
-class Mail
- def Mail.new(f)
- if !f.kind_of?(IO)
- f = open(f, "r")
- me = super
- f.close
- else
- me = super
- end
- return me
- end
-
- def initialize(f)
- @header = {}
- @body = []
- while line = f.gets()
- line.chop!
- next if /^From / =~ line # skip From-line
- break if /^$/ =~ line # end of header
- if /^(\S+):\s*(.*)/ =~ line
- @header[attr = $1.capitalize] = $2
- elsif attr
- sub(/^\s*/, '')
- @header[attr] += "\n" + $_
- end
- end
-
- return unless $_
-
- while line = f.gets()
- break if /^From / =~ line
- @body.push($_)
- end
- end
-
- def header
- return @header
- end
-
- def body
- return @body
- end
-
-end
-
-require "tkscrollbox"
-
-my_appname = Tk.appname('tkbiff')
-$top = TkRoot.new
-if ((TkWinfo.interps($top) - [my_appname]).find{|ip| ip =~ /^tkbiff/})
- STDERR.print("Probably other 'tkbiff's are running. Bye.\n")
- exit
-end
-
-$top.withdraw
-$list = TkScrollbox.new($top) {
- relief 'raised'
- width 80
- height 8
- setgrid 'yes'
- pack
-}
-TkButton.new($top) {
- text 'Dismiss'
- command proc {$top.withdraw}
- pack('fill'=>'both','expand'=>'yes')
-}
-$top.bind "Control-c", proc{exit}
-$top.bind "Control-q", proc{exit}
-$top.bind "space", proc{exit}
-
-$spool_size = 0
-$check_time = Time.now
-
-def check
- $check_time = Time.now
- size = File.size($spool)
- if size and size != $spool_size
- $spool_size = size
- pop_up if size > 0
- end
- Tk.after 5000, proc{check}
-end
-
-if defined? Thread
- Thread.start do
- loop do
- sleep 600
- if Time.now - $check_time > 200
- Tk.after 5000, proc{check}
- end
- end
- end
-end
-
-def pop_up
- outcount = 0;
- $list.delete 0, 'end'
- f = open($spool, "r")
- while !f.eof?
- mail = Mail.new(f)
- date, from, subj = mail.header['Date'], mail.header['From'], mail.header['Subject']
- next if !date
- y = m = d = 0
- if date
- date = Date.parse(date)
- y, m, d = date.year, date.month, date.mday
- end
- from = "sombody@somewhere" if ! from
- subj = "(nil)" if ! subj
- from = decode_b(from)
- subj = decode_b(subj)
- $list.insert 'end', format('%-02d/%02d/%02d [%-28.28s] %s',y,m,d,from,subj)
- outcount += 1
- end
- f.close
- if outcount == 0
- $list.insert 'end', "You have no mail."
- else
- $list.see 'end'
- end
- $top.deiconify
- Tk.after 2000, proc{$top.iconify}
-end
-
-$list.insert 'end', "You have no mail."
-check
-Tk.after 2000, proc{$top.iconify}
-begin
- Tk.mainloop
-rescue
- `echo #$! > /tmp/tkbiff`
-end
diff --git a/ext/tk/sample/tkbrowse.rb b/ext/tk/sample/tkbrowse.rb
deleted file mode 100644
index f083a8ac77..0000000000
--- a/ext/tk/sample/tkbrowse.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# This script generates a directory browser, which lists the working
-# directory and allows you to open files or subdirectories by
-# double-clicking.
-
-# Create a scrollbar on the right side of the main window and a listbox
-# on the left side.
-
-require "tkscrollbox"
-
-# The procedure below is invoked to open a browser on a given file; if the
-# file is a directory then another instance of this program is invoked; if
-# the file is a regular file then the Mx editor is invoked to display
-# the file.
-
-$dirlist = {}
-
-def browsedir (dir)
- if $dirlist.key? dir
- $dirlist[dir]
- else
- top = if $dirlist.size > 0 then TkToplevel.new else nil end
- list = TkScrollbox.new(top) {
- relief 'raised'
- width 20
- height 20
- setgrid 'yes'
- pack
- }
- list.insert 'end', *`ls #{dir}`.split
-
- # Set up bindings for the browser.
-
- list.focus
- list.bind "Control-q", proc{exit}
- list.bind "Control-c", proc{exit}
- list.bind "Control-p", proc{
- print "selection <", TkSelection.get, ">\n"
- }
-
- list.bind "Double-Button-1", proc{
- for i in TkSelection.get.split
- print "clicked ", i, "\n"
- browse dir, i
- end
- }
- $dirlist[dir] = list
- end
-end
-
-def browse (dir, file)
- file="#{dir}/#{file}"
- if File.directory? file
- browsedir(file)
- else
- if File.file? file
- if ENV['EDITOR']
- system format("%s %s&", ENV['EDITOR'], file)
- else
- system "xedit #{file}&"
- end
- else
- STDERR.print "\"#{file}\" isn't a directory or regular file"
- end
- end
-end
-
-# Fill the listbox with a list of all the files in the directory (run
-# the "ls" command to get that information).
-
-if ARGV.length>0
- dir = ARGV[0]
-else
- dir="."
-end
-
-browsedir(dir)
-Tk.mainloop
diff --git a/ext/tk/sample/tkcombobox.rb b/ext/tk/sample/tkcombobox.rb
deleted file mode 100644
index 17adbc9f9e..0000000000
--- a/ext/tk/sample/tkcombobox.rb
+++ /dev/null
@@ -1,498 +0,0 @@
-# frozen_string_literal: false
-#
-# tkcombobox.rb : auto scrollbox & combobox
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-module Tk
- module RbWidget
- class AutoScrollListbox < TkListbox
- end
- class Combobox < TkEntry
- end
- end
-end
-
-class Tk::RbWidget::AutoScrollListbox
- include TkComposite
-
- @@up_bmp = TkBitmapImage.new(:data=><<EOD)
-#define up_arrow_width 9
-#define up_arrow_height 9
-static unsigned char up_arrow_bits[] = {
- 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x38, 0x00, 0x38, 0x00, 0x7c, 0x00,
- 0x7c, 0x00, 0xfe, 0x00, 0x00, 0x00};
-EOD
-
- @@down_bmp = TkBitmapImage.new(:data=><<EOD)
-#define up_arrow_width 9
-#define up_arrow_height 9
-static unsigned char down_arrow_bits[] = {
- 0x00, 0x00, 0xfe, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x38, 0x00,
- 0x10, 0x00, 0x10, 0x00, 0x00, 0x00};
-EOD
-
- ############################
- private
- ############################
- def initialize_composite(keys={})
- keys = _symbolkey2str(keys)
-
- @initwait = keys.delete('startwait'){300}
- @interval = keys.delete('interval'){150}
- @initwait -= @interval
- @initwait = 0 if @initwait < 0
-
- @lbox = TkListbox.new(@frame, :borderwidth=>0)
- @path = @lbox.path
- TkPack.propagate(@lbox, false)
-
- @scr = TkScrollbar.new(@frame, :width=>10)
-
- @lbox.yscrollcommand(proc{|*args| @scr.set(*args); _config_proc})
- @scr.command(proc{|*args| @lbox.yview(*args); _config_proc})
-
- @up_arrow = TkLabel.new(@lbox, :image=>@@up_bmp,
- :relief=>:raised, :borderwidth=>1)
- @down_arrow = TkLabel.new(@lbox, :image=>@@down_bmp,
- :relief=>:raised, :borderwidth=>1)
-
- _init_binding
-
- @lbox.pack(:side=>:left, :fill=>:both, :expand=>:true)
-
- delegate('DEFAULT', @lbox)
- delegate('background', @frame, @scr)
- delegate('activebackground', @scr)
- delegate('troughcolor', @scr)
- delegate('repeatdelay', @scr)
- delegate('repeatinterval', @scr)
- delegate('relief', @frame)
- delegate('borderwidth', @frame)
-
- delegate_alias('arrowrelief', 'relief', @up_arrow, @down_arrow)
- delegate_alias('arrowborderwidth', 'borderwidth', @up_arrow, @down_arrow)
-
- scrollbar(keys.delete('scrollbar')){false}
-
- configure keys unless keys.empty?
- end
-
- def _show_up_arrow
- unless @up_arrow.winfo_mapped?
- @up_arrow.pack(:side=>:top, :fill=>:x)
- end
- end
-
- def _show_down_arrow
- unless @down_arrow.winfo_mapped?
- @down_arrow.pack(:side=>:bottom, :fill=>:x)
- end
- end
-
- def _set_sel(idx)
- @lbox.activate(idx)
- @lbox.selection_clear(0, 'end')
- @lbox.selection_set(idx)
- end
-
- def _check_sel(cidx, tidx = nil, bidx = nil)
- _set_sel(cidx)
- unless tidx
- tidx = @lbox.nearest(0)
- tidx += 1 if tidx > 0
- end
- unless bidx
- bidx = @lbox.nearest(10000)
- bidx -= 1 if bidx < @lbox.index('end') - 1
- end
- if cidx > bidx
- _set_sel(bidx)
- end
- if cidx < tidx
- _set_sel(tidx)
- end
- end
-
- def _up_proc
- cidx = @lbox.curselection[0]
- idx = @lbox.nearest(0)
- if idx >= 0
- @lbox.see(idx - 1)
- _set_sel(idx)
- @up_arrow.pack_forget if idx == 1
- @up_timer.stop if idx == 0
- _show_down_arrow if @lbox.bbox('end') == []
- end
- if cidx && cidx > 0 && (idx == 0 || cidx == @lbox.nearest(10000))
- _set_sel(cidx - 1)
- end
- end
-
- def _down_proc
- cidx = @lbox.curselection[0]
- eidx = @lbox.index('end') - 1
- idx = @lbox.nearest(10000)
- if idx <= eidx
- @lbox.see(idx + 1)
- _set_sel(cidx + 1) if cidx < eidx
- @down_arrow.pack_forget if idx + 1 == eidx
- @down_timer.stop if idx == eidx
- _show_up_arrow if @lbox.bbox(0) == []
- end
- if cidx && cidx < eidx && (eidx == idx || cidx == @lbox.nearest(0))
- _set_sel(cidx + 1)
- end
- end
-
- def _key_UP_proc
- cidx = @lbox.curselection[0]
- _set_sel(cidx = @lbox.index('activate')) unless cidx
- cidx -= 1
- if cidx == 0
- @up_arrow.pack_forget
- elsif cidx == @lbox.nearest(0)
- @lbox.see(cidx - 1)
- end
- end
-
- def _key_DOWN_proc
- cidx = @lbox.curselection[0]
- _set_sel(cidx = @lbox.index('activate')) unless cidx
- cidx += 1
- if cidx == @lbox.index('end') - 1
- @down_arrow.pack_forget
- elsif cidx == @lbox.nearest(10000)
- @lbox.see(cidx + 1)
- end
- end
-
- def _config_proc
- if @lbox.size == 0
- @up_arrow.pack_forget
- @down_arrow.pack_forget
- return
- end
- tidx = @lbox.nearest(0)
- bidx = @lbox.nearest(10000)
- if tidx > 0
- _show_up_arrow
- tidx += 1
- else
- @up_arrow.pack_forget unless @up_timer.running?
- end
- if bidx < @lbox.index('end') - 1
- _show_down_arrow
- bidx -= 1
- else
- @down_arrow.pack_forget unless @down_timer.running?
- end
- cidx = @lbox.curselection[0]
- _check_sel(cidx, tidx, bidx) if cidx
- end
-
- def _init_binding
- @up_timer = TkAfter.new(@interval, -1, proc{_up_proc})
- @down_timer = TkAfter.new(@interval, -1, proc{_down_proc})
-
- @up_timer.set_start_proc(@initwait, proc{})
- @down_timer.set_start_proc(@initwait, proc{})
-
- @up_arrow.bind('Enter', proc{@up_timer.start})
- @up_arrow.bind('Leave', proc{@up_timer.stop if @up_arrow.winfo_mapped?})
- @down_arrow.bind('Enter', proc{@down_timer.start})
- @down_arrow.bind('Leave', proc{@down_timer.stop if @down_arrow.winfo_mapped?})
-
- @lbox.bind('Configure', proc{_config_proc})
- @lbox.bind('Enter', proc{|y| _set_sel(@lbox.nearest(y))}, '%y')
- @lbox.bind('Motion', proc{|y|
- @up_timer.stop if @up_timer.running?
- @down_timer.stop if @down_timer.running?
- _check_sel(@lbox.nearest(y))
- }, '%y')
-
- @lbox.bind('Up', proc{_key_UP_proc})
- @lbox.bind('Down', proc{_key_DOWN_proc})
- end
-
- ############################
- public
- ############################
- def scrollbar(mode)
- if mode
- @scr.pack(:side=>:right, :fill=>:y)
- else
- @scr.pack_forget
- end
- end
-end
-
-################################################
-
-class Tk::RbWidget::Combobox < TkEntry
- include TkComposite
-
- @@down_btn_bmp = TkBitmapImage.new(:data=><<EOD)
-#define down_arrow_width 11
-#define down_arrow_height 11
-static unsigned char down_arrow_bits[] = {
- 0x00, 0x00, 0xfe, 0x03, 0xfc, 0x01, 0xfc, 0x01, 0xf8, 0x00, 0xf8, 0x00,
- 0x70, 0x00, 0x70, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00};
-EOD
-
- @@up_btn_bmp = TkBitmapImage.new(:data=><<EOD)
-#define up_arrow_width 11
-#define up_arrow_height 11
-static unsigned char up_arrow_bits[] = {
- 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x70, 0x00, 0x70, 0x00, 0xf8, 0x00,
- 0xf8, 0x00, 0xfc, 0x01, 0xfc, 0x01, 0xfe, 0x03, 0x00, 0x00};
-EOD
-
- def _button_proc(dir = true)
- return if @ent.state == 'disabled'
- @btn.relief(:sunken)
- x = @frame.winfo_rootx
- y = @frame.winfo_rooty
- if dir
- @top.geometry("+#{x}+#{y + @frame.winfo_height}")
- else
- @btn.image(@@up_btn_bmp)
- @top.geometry("+#{x}+#{y - @top.winfo_reqheight}")
- end
- @top.deiconify
- @lst.focus
-
- if (idx = values.index(@ent.value))
- @lst.see(idx - 1)
- @lst.activate(idx)
- @lst.selection_set(idx)
- elsif @lst.size > 0
- @lst.see(0)
- @lst.activate(0)
- @lst.selection_set(0)
- end
- @top.grab
-
- begin
- @wait_var.tkwait
- if (idx = @wait_var.to_i) >= 0
- # @ent.value = @lst.get(idx)
- _set_entry_value(@lst.get(idx))
- end
- @top.withdraw
- @btn.relief(:raised)
- @btn.image(@@down_btn_bmp)
- rescue
- ensure
- begin
- @top.grab(:release)
- @ent.focus
- rescue
- end
- end
- end
- private :_button_proc
-
- def _init_bindings
- @btn.bind('1', proc{_button_proc(true)})
- @btn.bind('3', proc{_button_proc(false)})
-
- @lst.bind('1', proc{|y| @wait_var.value = @lst.nearest(y)}, '%y')
- @lst.bind('Return', proc{@wait_var.value = @lst.curselection[0]})
-
- cancel = TkVirtualEvent.new('2', '3', 'Escape')
- @lst.bind(cancel, proc{@wait_var.value = -1})
- end
- private :_init_bindings
-
- def _set_entry_value(val)
- @ent.textvariable.value = val
- end
- private :_set_entry_value
-
- #----------------------------------------------------
-
- def _state_control(value = None)
- if value == None
- # get
- @ent.state
- else
- # set
- @ent.state(value.to_s)
- case value = @ent.state # regulate 'state' string
- when 'normal', 'readonly'
- @btn.state 'normal'
- when 'disabled'
- @btn.state 'disabled'
- else
- # unknown : do nothing
- end
- end
- end
- private :_state_control
-
- def __methodcall_optkeys # { key=>method, ... }
- {'state' => :_state_control}
- end
- private :__methodcall_optkeys
-
- #----------------------------------------------------
-
- def _textvariable_control(var = None)
- if var == None
- # get
- ((var = @ent.textvariable) === @default_var)? nil: var
- else
- # set
- @var = var
- tk_send('configure', '-textvariable', (@var)? var: @default_var)
- end
- end
- private :_textvariable_control
-
- #----------------------------------------------------
-
- def initialize_composite(keys={})
- keys = _symbolkey2str(keys)
-
- @btn = TkLabel.new(@frame, :relief=>:raised, :borderwidth=>2,
- :image=>@@down_btn_bmp).pack(:side=>:right,
- :ipadx=>2, :fill=>:y)
- @ent = TkEntry.new(@frame).pack(:side=>:left)
- @path = @ent.path
-
- @top = TkToplevel.new(@btn, :borderwidth=>1, :relief=>:raised) {
- withdraw
- transient
- overrideredirect(true)
- }
-
- startwait = keys.delete('startwait'){300}
- interval = keys.delete('interval'){150}
- @lst = Tk::RbWidget::AutoScrollListbox.new(@top, :scrollbar=>true,
- :startwait=>startwait,
- :interval=>interval)
- @lst.pack(:fill=>:both, :expand=>true)
- @ent_list = []
-
- @wait_var = TkVariable.new
- @var = @default_var = TkVariable.new
-
- @ent.textvariable @default_var
-
- _init_bindings
-
- option_methods('textvariable' => :_textvariable_control)
-
- delegate('DEFAULT', @ent)
- delegate('height', @lst)
- delegate('relief', @frame)
- delegate('borderwidth', @frame)
-
- delegate('arrowrelief', @lst)
- delegate('arrowborderwidth', @lst)
-
- delegate('state', false)
-
- if mode = keys.delete('scrollbar')
- scrollbar(mode)
- end
-
- configure keys unless keys.empty?
- end
- private :initialize_composite
-
- def scrollbar(mode)
- @lst.scrollbar(mode)
- end
-
- def _reset_width
- len = @ent.width
- @lst.get(0, 'end').each{|l| len = l.length if l.length > len}
- @lst.width(len + 1)
- end
- private :_reset_width
-
- def add(ent)
- ent = ent.to_s
- unless @ent_list.index(ent)
- @ent_list << ent
- @lst.insert('end', ent)
- end
- _reset_width
- self
- end
-
- def remove(ent)
- ent = ent.to_s
- @ent_list.delete(ent)
- if idx = @lst.get(0, 'end').index(ent)
- @lst.delete(idx)
- end
- _reset_width
- self
- end
-
- def values(ary = nil)
- if ary
- @lst.delete(0, 'end')
- @ent_list.clear
- ary.each{|ent| add(ent)}
- _reset_width
- self
- else
- @lst.get(0, 'end')
- end
- end
-
- def see(idx)
- @lst.see(@lst.index(idx) - 1)
- end
-
- def list_index(idx)
- @lst.index(idx)
- end
-end
-
-
-################################################
-# test
-################################################
-if __FILE__ == $0
-# e0 = Tk::RbWidget::Combobox.new.pack
-# e0.values(%w(aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu))
-
- v = TkVariable.new
- e = Tk::RbWidget::Combobox.new(:height=>7, :scrollbar=>true,
- :textvariable=>v,
- :arrowrelief=>:flat, :arrowborderwidth=>0,
- :startwait=>400, :interval=>200).pack
- e.values(%w(aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu))
- #e.see(e.list_index('end') - 2)
- e.value = 'cc'
- TkFrame.new{|f|
- fnt = TkFont.new('Helvetica 10')
- TkLabel.new(f, :font=>fnt, :text=>'TkCombobox value :').pack(:side=>:left)
- TkLabel.new(f, :font=>fnt, :textvariable=>v).pack(:side=>:left)
- }.pack
-
- TkFrame.new(:relief=>:raised, :borderwidth=>2,
- :height=>3).pack(:fill=>:x, :expand=>true, :padx=>5, :pady=>3)
-
- l = Tk::RbWidget::AutoScrollListbox.new(nil, :relief=>:groove,
- :borderwidth=>4,:height=>7,
- :width=>20).pack(:fill=>:both,
- :expand=>true)
- (0..20).each{|i| l.insert('end', "line #{i}")}
-
- TkFrame.new(:relief=>:ridge, :borderwidth=>3){
- TkButton.new(self, :text=>'ON',
- :command=>proc{l.scrollbar(true)}).pack(:side=>:left)
- TkButton.new(self, :text=>'OFF',
- :command=>proc{l.scrollbar(false)}).pack(:side=>:right)
- pack(:fill=>:x)
- }
- Tk.mainloop
-end
diff --git a/ext/tk/sample/tkdialog.rb b/ext/tk/sample/tkdialog.rb
deleted file mode 100644
index f0f7d2ccb5..0000000000
--- a/ext/tk/sample/tkdialog.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require "tk"
-
-root = TkFrame.new
-top = TkFrame.new(root) {
- relief 'raised'
- border 1
-}
-msg = TkMessage.new(top) {
- text "File main.c hasn't been saved to disk since \
-it was last modified. What should I do?"
- justify 'center'
- aspect 200
- font '-Adobe-helvetica-medium-r-normal--*-240*'
- pack('padx'=>5, 'pady'=>5, 'expand'=>'yes')
-}
-top.pack('fill'=>'both')
-root.pack
-
-bot = TkFrame.new(root) {
- relief 'raised'
- border 1
-}
-
-TkFrame.new(bot) { |left|
- relief 'sunken'
- border 1
- pack('side'=>'left', 'expand'=>'yes', 'padx'=>10, 'pady'=> 10)
- TkButton.new(left) {
- text "Save File"
- command "quit 'save'"
- pack('expand'=>'yes','padx'=>6,'pady'=> 6)
- top.bind "Enter", proc{state 'active'}
- msg.bind "Enter", proc{state 'active'}
- bot.bind "Enter", proc{state 'active'}
- top.bind "Leave", proc{state 'normal'}
- msg.bind "Leave", proc{state 'normal'}
- bot.bind "Leave", proc{state 'normal'}
- Tk.root.bind "ButtonRelease-1", proc{quit 'save'}
- Tk.root.bind "Return", proc{quit 'save'}
- }
-}
-TkButton.new(bot) {
- text "Quit Anyway"
- command "quit 'quit'"
- pack('side'=>'left', 'expand'=>'yes', 'padx'=>10)
-}
-TkButton.new(bot) {
- text "Return To Editor"
- command "quit 'return'"
- pack('side'=>'left', 'expand'=>'yes', 'padx'=>10)
-}
-bot.pack
-root.pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes')
-
-def quit(button)
- print "You pressed the \"#{button}\" button; bye-bye!\n"
- exit
-end
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt
deleted file mode 100644
index 71e359559a..0000000000
--- a/ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-
- #########################################################################
- ### The following text is the original file of the Tcl/Tk extension. ###
- ### Icon data files ( those are 'tkIcons', 'tkIcons-sample.kde', and ###
- ### 'tkIcons.kde' ) are quoted from the source archive of ICONS ###
- ### extension. As the following document describes, those icon images ###
- ### are not applied the license. ###
- #########################################################################
-
-
-IMPORTANT LICENSE INFORMATION
-=============================
-
-The following terms (based on the standard TCL/TK license) apply to all files
-contained in this package, <b>except</b> the icon images.
-
-The icon images can be freely distributed. If you require clarification of
-copyright/license details for the images, please contact the appropriate
-creator/maintainer.
-
-ICONS: LICENSE TERMS
-====================
-
-This software (ICONS) is Copyright 2002 by Adrian Davis (adrian@satisoft.com).
-The following terms apply to all files associated with the software except
-where noted above.
-
-The author hereby grants 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.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file
-where they apply.
-
-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.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
-are acquiring the software on behalf of the Department of Defense,
-the software shall be classified as "Commercial Computer Software"
-and the Government shall have only "Restricted Rights" as defined in
-Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing,
-the authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license.
diff --git a/ext/tk/sample/tkextlib/ICONS/tkIcons b/ext/tk/sample/tkextlib/ICONS/tkIcons
deleted file mode 100644
index 0d5b2c8695..0000000000
--- a/ext/tk/sample/tkextlib/ICONS/tkIcons
+++ /dev/null
@@ -1,195 +0,0 @@
-actattach16:act act16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBPz+/AQCBAAAACH5BAEAAAAALAAAAAAQABAAAAI2hAOCxg2h0nJHyEshi9HpxU1GOCLdZoKpQ15nibUoprKp9lh2oucUxsBRXsJh4Hjs/QTMpr8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-actbookmark16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy+vERGRFRWVDQ2NKSmpAQCBKyurMTGxISChJyanHR2dIyKjGxubHRydGRmZIyOjFxeXHx6fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVbICACwWieY1CibCCsrBkMb0zchSEcNYskCtqBBzshFkOGQFk0IRqOxqPBODRHCMhCQKteRc9FI/KQWGOIyFYgkDC+gPR4snCcfRGKOIKIgSMQE31+f4OEYCZ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-actbookmarknew16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy6vERGRFRWVDQyNKSipAQCBMTGxKyurISChJSSlJyanHR2dIyKjPz+xISGhPz+BGxubMTCBHx+fPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVfICACwWieY1CibCCsrBkMb0zchTEcNYsIiYHiwIOdEAvigdFQGE0Ix4NBbSAgsWjk+jBIAlcUYrJASChnSXZSoUDelKfoKpFALJA61ueGI2IAZmhogGFmCGGAgXsifiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-actcheck16:act act16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBMT+xATCBASCBARCBAQCBEQCBAAAACH5BAEAAAAALAAAAAAQABAAAAM2CLrc/itAF8RkdVyVye4FpzUgJwijORCGUhDDOZbLG6Nd2xjwibIQ2y80sRGIl4IBuWk6Af4EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-actcross16:act act16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/PwCBMQCBEQCBIQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMuCLrc/hCGFyYLQjQsquLDQ2ScEEJjZkYfyQKlJa2j7AQnMM7NfucLze1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xICCOQGCeJjkGwkC8RFEEavkax2G8dB0QuRyhhzoBg8MSYsncJXKJZIDZHCoWP1ogGIwGrtnSgUFmHLyNRHhrdpjRamnO/SYkromHdnxwnwkKVxByZW8DgQsQM2JcfwZXO0MBCZSVBgMuLzJaRZ0pfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-apppencil16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/IQCBMQCBPzCxAQCBPz+/MTCxISChDQyNKSipEQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARDEMhJZRBD1H2z3lMnjKCFjUJQimOgcmcbELCXzjXq0hV785WCQYcDFQjDXeloMByKG6YTAdwIDAlqSZJSVFeKLcUfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-appsheet16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAT+/Pz+/KSipPz+BAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANFCBDc7iqIKUW98WkWpx1DAIphR41ouWya+YVpoBAaCKtMoRfsyue8WGC3YxBii5+RtiEWmASFdDVs6GRTKfCa7UK6AH8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-apptool16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBISChGRmZMTCxKSipLS2tHx6fPz+/O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16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBAT+BAQC/AQCjPz+/MTCxPzCxKSipPwCBMQCBIQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARaEMhJaQhA6D1E/wDGeeRgDhOhFmurpi5LyMYhFXiuFwZiA6qZYbbqJX5BIw2RAPxwAAWCyWMCCsiXFGEEErKz6LQZfOqiTR1YJiGq1rFyyHmo2+/1EKbCl/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-connecting16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBISCBAQCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZbihUiz60FPnfaA0iBpBVGdHEYWxToEoSHBRHHM9AgSEQRcj+AYkYAJxIPKQFUJiOdTJQFIDU6dYzKKFhTCM+E5g4mXaDAyrlogEG+DGTecA7wsP8EcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-connectno16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBAQCBERCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARPEMhJq704axBEHoPUEdhQGMNYFuwxkKInDYjBniEnwMCQIIebSzXx/WwsFK+YMABZikWuYlrUCtZpEYv4WRPaHhb064YB41kCfJFSQBh/BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0Kq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RldmVsY29yLmNvbQA7
-devfloppymount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVrICCOQBCQKBkIw5mqLFG47zoQ+FwbN57TosDhgPD5dMEEIqE04kwlBWKBUEiNVYFpyqAyGEUCgqEtERiNNMLhQKzLQYJg7n7Y4aMAwbCUPvAQeWNgfzQQETAIhSMQEogwgBITQEGGEREmfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-devfloppyunmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVCH5BAEAAAAALAAAAAAQABAAAARcEMgJQqCYBjFu1hxReN82EOhYGieaklJwHIjrqnGCJLqNWhUFYoFQCG1FgWXIIDIYNQKCoawQGI0swuFAbKsxgmDsfZjBkwDBsNM90Jot9A3DbBD0Dwiur9QnfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-devnetwork16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBISChPz+/Nza3ARaZESanCyKlARudARGTLy+vNzq7ARmbMTCxARufAROVMzOzKSipARyfOzq7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAA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1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-nav1leftarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAP///wAAACH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxqdwoNGTmgvy9px/IEWBWRkKZ2oWrKu4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-nav1rightarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxCtwoNHTmpvy3rxnnwQh1mUI52o6rCu6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-nav1uparrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PWwhxzmetzFpxnnxfRJbmufgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-nav2downarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+pq+EPXYpxUckoO3AjbF3dJwahllXe6AFgC8d+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0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2ZWxjb3IuY29tADs=
-playend16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+py8Eb3ENRggrxjRnrVIWcIoYd91FaenysMU6wTNeLXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-playpause16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+py+1vgoxzyUCxrZd18ClfmIyVyJ1lqkHuC0N+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-playstart16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pyxudwlNyguqkqRZh3h0gl43hpoElqlHt9UKw7NG27BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-playstop16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+1vgpySUWpvXXqrHmSaeJEYhKYq6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textblock16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py40Bo5SOzRvrwlgrfnkJOIkPaaaJXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textbold16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIihI+py70BowPQ1HZpwNv212Vg9IGHmIjoWa4ey5DSRNd+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-textbottom16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIVhI+py+0Po5y0hYtzrkB7zH0fN/kFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-textcenter16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsnRkqtDnhu1zHfFSpjaY4PavgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-textitalic16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+0BgztwUmmjBXX3jE0auHHhM5Yq4xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textleft16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsgRoqr3Vnt102fFSJjUC6nlPoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-textmiddle16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIXhI+py+0PT5i01pisphjt3UmfFZYm5hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textmove16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsg2kfZvblXbwTg10WlA4rjyvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-textright16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+pm+EPIZstSrqsDhh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3LmRldmVsY29yLmNvbQA7
-texttop16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIWhI9pwe2uYnq0yQtqxbz7D4biSIZ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-textunder16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pu+FxXoOIKpds1oBH7hlYxYxRCaIZ01lhJbHy9tTv7BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-viewchoose16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMzCLrcGlAs6UAYgwLdLtEcI4ygQo7VVp2oupGpG4vmaUVTemX523qlFcw0a4RqNlkx5k8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-viewdetailed16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMmCLrc/i1IAVkYg1Z1iRYUKCqitp1oikqBWV3ZOnhkWNagqu+qnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2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IFArBIpJBCxmLQQuL6cAsLECrqeys7WxpqZdtK9Ct8C0fsHAZn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-viewmulticolumn16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCLrc/ixI0WSgKoyBl+beQFACpo1AqXbKCr1wLAMWS08hGG3dSZqin4sxnBmPD38CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-viewtext16:view view16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIchI+py40BTQSwuovp3DXkv1ia1IHmIXLiyWJ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-viewtree16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBDQyNPz+/PzerAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAMuCLHcri4yGISlj4kxcANgNRBQCIbL6U1Su7bB62rXvGydG25kqpwfIGxILBr9CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-actattach22:act act22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBMTCxPz+/DQyNKSipAQCBISChFxaXDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARrEMgJgqA4zzus/gLhFd5HCcZAXqsphYPUdhcYFNRcZnvdtpnDqPTbUWgAJKBYwzBlw+bRo3xmkNWoBgm0OrVLn3GC9RgCk8DhUw7c0rHPr4CDu5SYQNyEt7uSY3p/UAKFhYKDSQOLiwgFdhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-actbookmark22:act act22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBCQmJCwqLMTGxAQCBBwaHMTCxLSytERGRFRWVLy+vKyqrKSmpHR2dJSSlJyanISGhGxubIyOjKyurGxqbFxeXGRmZHx+fKSipLy6vGRiZLS2tFRSVHRydJSWlHx6fCH5BAEAAAAALAAAAAAWABYAAAWWICCOZGmewamaQrq+wUC8azHINGocOI38iIRAceDNaISFYklkGHOEhoNBfUAOhuOLEJE8HoPiRKFdESiQBqViuTDIUAsEcyAeGJmyiqC5RCwJGg0YcEh9D0V3Dxt6JwQVDRYVHBUdi40mjw0PTgwQHgeYJQQJfxUXFxAOoTkFpQ0fsRSimQkWEQ0VtI62HLt7vjl7JQYhACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-actbookmarknew22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCwqLCQiJCQmJMTGxAQCBLy+vLSytERGRFRWVKyurKyqrLS2tKSmpHR2dJSWlKSipIS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sAgKCAWEQjQ4KgSwyYDAcugZEQqFYYJECA6PhaLcfEEUkgJZAGJB8fkKpWOhHAxcOGBQZGBoaGQgbHIBGAhUOGR0SBxISBh4Xf0iCHxQSlRIIXhsgj0UCIaCXmJgHGyKpRJ+hmB5dHQqOaCENIx0epBIkBhdzngoPGCQlJifQJBvJRygRKRcKGxcXGypys1srEREc5SLnICLiR1koLFVUWfRO9vf4+UwyQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-textblock22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUWzvNzo33GfFl5jVlonlTrr1DbvFi9vjeeNUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textbold22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIxhI+py+0Powm0VnknjVkH2AEhE45LZ55Wqn6e65TsMc5eYosbksswubJIhsSiccgvAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-textcenter22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUbz3Sh7yIWfFHKjVl4nmFrr1Lpr7LwkjeeIUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textitalic22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py+0P4wqUSlQvttrkDnyaOHIdeaGRupplAIauVM3xjeeOUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textleft22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+pyw0Bo5zB2UXz3Sp7yG2fFJajVjonmIor2TJvfL0wjecIXQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textright22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUfz3SZ7yIXdF4kWqZkbCqoMO7kXLC+wVOe6YRQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text22:text text22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBBwaHAwKDBQSFLy+vLS2tJSWlBQWFKyqrFRSVCwqLDQyNNTS1GxqbFxaXJyanIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAVcICCOZGmKQSoMaZsShBsQBdAapHvgaIDUqUPJlRjSbAoT0fRDKgODRbF0PLUYjZO2F2Bst9evNix+dsvDlGKK5jraudQb7qbX6a2HEJ+ycyF+LRE8ZTI+fX5oGCEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textunder22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIvhI+py+0PowmUnhpeVVnb1DkbCI1I2JhX+Z0sOr2cTHpwK7a4rUr+hAnufsTirwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-viewchoose22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz69PTq5Pz+/OzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq70466Cl+AMxBVwnFIVRAmQHCIeBrC1L3tQgJ/SaEbeeC1PLBHE2ybFI9A1HzstHEIK6YCmhDTmBybQaHYJn7QC5zKeytIQe1+pKNE6P2yMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-viewdetailed22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFR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CTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-viewtext22:view view22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIkhI+py+0Po2ShBlOxzbP7n2yaJoLm+ZTcxqHuC6hXzML2HVEFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-viewtree22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz+/Pz69Pzu5PTq5OzaxBQOFOzKpFRWVFxWXOzexPTexCH5BAEAAAAALAAAAAAWABYAAARPEMhJq704g6A779kHCORAgNskFMYhakE8FkjyBcoWv+JwJItXaELYCTFHlCSpZKKcoB5jYHpOGgUadLKbIRw3jhEzQDyCSuI4zW673yhDBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
diff --git a/ext/tk/sample/tkextlib/ICONS/tkIcons-sample.kde b/ext/tk/sample/tkextlib/ICONS/tkIcons-sample.kde
deleted file mode 100644
index 51f76a0488..0000000000
--- a/ext/tk/sample/tkextlib/ICONS/tkIcons-sample.kde
+++ /dev/null
@@ -1,658 +0,0 @@
-1downarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PUZi0zmTtypflV0VdRJbm6fgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-1leftarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAP///wAAACH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxqdwoNGTmgvy9px/IEWBWRkKZ2oWrKu4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-1rightarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxCtwoNHTmpvy3rxnnwQh1mUI52o6rCu6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-1uparrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PWwhxzmetzFpxnnxfRJbmufgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-2downarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+pq+EPXYpxUckoO3AjbF3dJwahllXe6AFgC8d+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-2leftarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pyxf5VohmSlsxmpjTzAHeN5ak6UHpqKRi2GpwvH3Q3eT64RcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-2rightarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pq5HOAjQyVnqfhHue7oAaKH5kiW0AmnLqaHomkj02g+e6XwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-2uparrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIghI+pyxfR0HsRzNnuXVqn3mVQZWFRyIDjp65Ga5Ly4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-abs-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAQABAAAAIwhI95ocn2GlySTiME1iC+DIKdNWxANl4HaqWr055cy6Bs6dahmJsyXVFFJJ7gyF8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-airbrush-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBPzCxMQCBIQCBPz+/MTCxKSipFxaXDQyNISChAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARUEMhJZxCjanBH3hY2EFJgVt0YcEW7liLxBoVxzPHL2msqUzSeT2c5HBC5jQmROKgAhCgKEVBQo6YAqVQIHBQ93ZbmBWt+nDJRgiYMvmuoThWXT/wRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-attach-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBPz+/AQCBAAAACH5BAEAAAAALAAAAAAQABAAAAI2hAOCxg2h0nJHyEshi9HpxU1GOCLdZoKpQ15nibUoprKp9lh2oucUxsBRXsJh4Hjs/QTMpr8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-back-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRSdBRObCQ2TBxObISevAQCBNzu/BRGZPz6/FzC3Pz+/HTS5ByyzJze7Mzq9ITC3AQWLAyWvBSavFyuxAwaLAwSHBRafBSOrDzW5AyixCS61ETW3CzG1AQeLAweLAxefBSStEze7CSWtCyatBSCnBRWfAwmPBRWdByixAQSHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZiQIBwSCwah4HjUTBQFgkFg3MoKBykU0QhoUAIAuAksbpgNByPxQMSGVsVDYlkIqdUiJYLJqORbDgcHRseRR8gISIaEyMkGCVYRBEmeyAnlgaQkSgpmU4RAZ1OKqFOpFNGfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-blend-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBARCRAQCBASChATCxATCBASCBAAAACH5BAEAAAAALAAAAAAQABAAAANHCLrc/izISauYI5NduvlXMIjEQBSnUYCYxnmsSJrouhqh6J4wLo0mWuqWy5heN58seBrGdEdeMgQsNW0ggXbL7Qog4HDDnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-bookmark_add-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy6vERGRFRWVDQyNKSipAQCBMTGxKyurISChJSSlJyanHR2dIyKjPz+xISGhPz+BGxubMTCBHx+fPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVfICACwWieY1CibCCsrBkMb0zchTEcNYsIiYHiwIOdEAvigdFQGE0Ix4NBbSAgsWjk+jBIAlcUYrJASChnSXZSoUDelKfoKpFALJA61ueGI2IAZmhogGFmCGGAgXsifiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gd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FFQsF0xGo9lwhpSOwfORYC4gISJ3RAQdIyQYJSAlImNrh4uNJkl5CoKUUBQnjlB4KFAcoqOknkh+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-brace-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAQABAAAAI2hI9pEXq8mnsNzggsEMJwbHGimFXS4HUfpKUIq3QJ036vuakyWvbjCJLYbL2WgyW5WIw3g78AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-brackets-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAQABAAAAIzhI8JwXocllMxTlSREGY/2W2iJ1nAEAJklpCfeXAJG8sY6JGowY7jW0sBL0NiqTGBAPwFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-charset-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAInhI+pqxH8kFsvsgtm1vvEaoBZSH6j5FSaRY4me4pyq1ochuf6fvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-colorize-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAPz+BAQCBPz+/MTCxISC/AQChMTC/ERCBPyqXMRaBATCxASChPzerKSipMT+/MQCBATCBASCBARCRISChMT+xDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVnICAGgWieZyCQKGuqZPkGgwyv60gONRDvNlqt9Pv5BgRCYVj8IQ3L4qE4KFiZzRiP90MgEj+FYtGLIRiJQaMxUDjIxFoi8YBAIo3FQjIJ7iAUERNqDTI6PBGJfT0oFVpsMSgzkSh+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-colorpicker-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBARCBDQyNMT+xATCBASCBPz+/FxaXISChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ/EMhJZRCjahBIMdlmeV8gBl3xCabWGarBihwBz+eB2O0WHIFEp1f5BU1EilFI4wCZtGWy+JwWj00OynrNTvwRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-completion-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/Ly+vHx+fAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM/CLrcGjBKCYK4+NoMs+jWIBIdZ50QuWGgMASD+oGnO5beR+x7UE3AyGKV0wxnpeSxyDoGN74Hszl8QhxYhj8BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-configure-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBISChGRmZMTCxKSipLS2tHx6fPz+/OTm5FxaXOzu7DQyNMzOzAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAReEMhAq7wYBDECKVSGBcbRfcEYauSZXgFCrEEXgDCSeIEyzKSXZoBYVCoJVIqBGByKu0Cy8QHxmgNngWCkGgqsGWFseu6oMApoXHAWhWnKrv0UqeYDe0YO10/6fhJ+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-connect_creating-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBISCBAQCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZbihUiz60FPnfaA0iBpBVGdHEYWxToEoSHBRHHM9AgSEQRcj+AYkYAJxIPKQFUJiOdTJQFIDU6dYzKKFhTCM+E5g4mXaDAyrlogEG+DGTecA7wsP8EcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-connect_established-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/KSipDQyNMTCxMTGxISChFxaXMzGzAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZxCjgsAtDtUlCOA1gJQ4kl/IDatAoF7xxkS6GgEBr6jAobCyBX42SQBxMOx6A8MhiGASR8YDgrYsNEeJ0zaEGZY7uoH2oB6nOUwtbdLaVOeTUwo/8UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-connect_no-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBAQCBERCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARPEMhJq704axBEHoPUEdhQGMNYFuwxkKInDYjBniEnwMCQIIebSzXx/WwsFK+YMABZikWuYlrUCtZpEYv4WRPaHhb064YB41kCfJFSQBh/BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-contents2-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBDyKhDSChGSinFSWlEySjCx+fHSqrGSipESOjCR6dKTGxISytIy6vFSalBxydAQeHHyurAxubARmZCR+fBx2dDyKjPz+/MzKzLTS1IyOjAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVkICCOZGmKQXCWqTCoa0oUxnDAZIrsSaEMCxwgwGggHI3E47eA4AKRogQxcy0mFFhgEW3MCoOKBZsdUrhFxSUMyT7P3bAlhcnk4BoHvb4RBuABGHwpJn+BGX1CLAGJKzmKjpF+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-contents-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExCNGSenHRmVCwqJPTq1GxeTHRqXPz+/DwyJPTq3Ny+lOzexPzy5HRuVFSWlNzClPTexIR2ZOzevPz29AxqbPz6/IR+ZDyKjPTy5IyCZPz27ESOjJySfDSGhPTm1PTizJSKdDSChNzWxMS2nIR6ZKyijNzOrOzWtIx+bLSifNTGrMy6lIx+ZCRWRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaeQEAAQCwWBYJiYEAoGAFIw0E5QCScAIVikUgQqNargtFwdB9KSDhxiEjMiUlgHlB3E48IpdKdLCxzEAQJFxUTblwJGH9zGQgVGhUbbhxdG4wBHQQaCwaTb10emB8EBiAhInp8CSKYIw8kDRSfDiUmJ4xCIxMoKSoRJRMrJyy5uhMtLisTLCQkC8bHGBMj1daARgEjLyN03kPZc09FfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-contexthelp-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQChAQCBAAAACH5BAEAAAAALAAAAAAQABAAAAIzhH+hIeiwVmtOUcjENaxqjVjhByaBSZZVl24Y1V6iEVMzkD4bqD700bshgh1fzwd0IfwFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-crop-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMT+xATCBAS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m8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-editpaste-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQiFHRqNIx+LFxSBDw6PKSaRPz+/NTOjKyiZDw+POTe3AQCBIR2HPT23Ly2dIR2FMTCxLS2tCQmJKSipExGLHx+fHR2dJyenJyanJSSlERCRGRmZNTW1ERGRNze3GxubBweHMzOzJSWlIyOjHRydPz29MzKzIyKjPTq3Ly2rLy+vISGhPzy5LymhISChPTizOzWvKyurPTexOzSrDQyNHx6fCwuLGxqbOzKpMSabAQGBMS2nLyulMSidAAAACH5BAEAAAAALAAAAAAQABAAAAa7QIBQGBAMCMMkoMAsGA6IBKFZECoWDEbDgXgYIIRIRDJZMigUMKHCrlgul7KCgcloNJu8fsMpFzoZgRoeHx0fHwsgGyEACiIjIxokhAeVByUmG0snkpIbC5YHF4obBREkJCgon5YmKQsqDAUrqiwsrAcmLSkpLrISLC/CrCYOKTAxvgUywhYvGx+6xzM0vjUSNhdvn7zIMdUMNxw4IByKH8fINDk6DABZWTsbYzw9Li4+7UoAHvD+4X6CAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-editshred-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbGxubMzOzPz69DQyNIyKjERCRPz29PT29OTi3IyKhPz27PTu5PTy5Pz6/Pzy7PTq3OzexLyqlPTm1PTizOzavLyqjOzWvOzaxLyifOzizOTOpAQCBOzezAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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TIBshIiMkGyAlCCZTEpciJyQjGxcoKUQBEhcbIiorLB4XEltDrhcaLS4vtbcJra8bMDHAGrcyrTMXHjA0NSypEsO6EzY3IzU4OdoTzK0BCAkDMgkIOjJlAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-goto-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBEQCBAAAACH5BAEAAAAALAAAAAAQABAAAAIohI8RyKciVnMwTlrlDfkm5QFgaHBWMo0lp22dZ57wO8vpGrLk2iJ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-help-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQ6XAQCBCyCvARSjAQ+ZGSm1ARCbEyWzESOxIy63ARalAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ/EEgQqhUz00GEJx2WFUY3BZw5HYh4cu6mSkEy06B72LHkiYFST0NRLIaa4I0oQyZhTKInSq2eAlaaMAuYEv0RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-history-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBEQ2LEw6POTSrOzWtNS2lAQCBOzatPTm3PTq3MyyjEw+NOzm1Pz29Pz+/Pz6/Pz27FRGPFxKRPTu3Pzy7Pz69Pz67KSGbPzy3Pzu3PTizPz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vIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-locationbar_erase-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAIshI+py40Bo1SywgSFiDq+oG3hZHDhVpUmagFrl7pgN3oqPNuqpe+8Awwi/AUAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-lock-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaVAQCBKSipDQyNMTCxISChFxaLFxSJEQ+FExGHCQiDBwaDGxiLHxyNHRuPIR+TIyGZJSSfFxaRFxWJGRiLJyaXNzWpNTOnMzGnLy2hJSKTGReLKyqjPTu1NzarMS+jLSyfKyibJySXIyGVCQeDLSytPT29Ozu7OTi5NTS1KyurJSSjGxqVFxaXLS2tKSebOzuzLSufJSOXExGLGRiTExONAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaTQIBwGCgGhkhkQDBoEpLKQoBACAyOUID1qTVwoQGvMPxNFgVjAxp6QCQUicSCwVgkG44HJCKRRCYUCAxIFRYXhxgZGhYbHINEHR4fGCAhIiMkFSVKJicoKSoFKwMsLZtDLison6GjLA92qCueoAUvpC2xQhWqrLYDErmEMDEXlDIwMxAHukI0NS01EzY2NAmPAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-lsub-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBIQChAAAACH5BAEAAAAALAAAAAAQABAAAAImhI+pFu2+QpxKVppsxkh3fnhh9DyGcC6IwLbqir4HK58tLcfx6xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-lsup-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBAAAACH5BAEAAAAALAAAAAAQABAAAAIlhI95YawYonwp0uoukFO7rCXCSJKPcKYKuqqii7BvS892XJZ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-mail_forward-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRydHxubHxmZGxiXHRmZFxOTFxGPFxKTPwCBLymlMy+pOze3PTq3PTu5Pzy7LSmnOTaxOzm5LyqlNzOtPz69Pz27MzCtLyqrPT27IRubPzuzNTGvNTCxLSelPz25Bw+ZFxKPPzy1Pz65LyupBxKdCxWfPTm1Pz23LyinBxGbGzO5DRafBxWfBxajCymxHTS5BxSdBxKbFTK3EzG1CSGvCyKvCSSxCSavGTO5GRaVPzqzFzK5EzG3BSCtAwiPGxaVPTivPzy3NzKpBxObCRefBxqlPTmzJR2bKyahAwyRPzmvOTOpKyObNS+nPz21AQOFKyOfPzuxAQCBGRORLSadPzyzLymjMy2lOzetDwuJFRCPEw6NEQ6LEQyLEQ6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AANdCLobwbAFMciLwBFSihBEFHSG8QnmpQQEBX6loI5G5QTlcMgrZSmEmsGxKqRWNV3hMrFlBtDoA1eTEaKHJdMYhR6+gxkF++UMGbiDzvDVioyHAJSHcchuGLQq4k8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-move-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhA8RyKja2HtRrmrxNfDszm3JMpXmiULg6Hyto4kYO49Tfdc04xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-news_subscribe-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/ERCBDQyNAQCBPz+/FxaXIQCBMQCBKSipMTCxATCBMT+xISChASCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARsEEgZxLxYDlJsvsJGDN0nFQRhpKR3DSJxrGMphYQgpDI9WLhdTtjjAFApXZI30m2UQwICVigcEzzolKAYIAIFBAKbQjQX3YGGISZvFtzFQr1uDxT4PH0yYE8FCg0/Jn0MAwsNOiY3IQMBEn4RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-news_unsubscribe-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/ERCBDQyNAQCBPz+/FxaXIQCBMQCBMTCxPzCxKSipAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARiEEgZxLxYDlJsvsJGDN0nFQRhpKR3DSJxrGMphYQgpDI9WLhdTtjjAFApXZI30m2UwxjsiOApB4kNLFtQKKopxeCQxR4GAJIXPCInzmhN9zvCljNq8ZvswmzhZHEfOhpofhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-next-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFwyXAQCBOze9BwCHNx21LQCvPSi5NRi7AAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ3EMhJqwUhAMG7DQOxdVwFFuI1nYZIethwIK0aFwjtwrfh15cAYUjcvWyvkm1Z4TGfkyN0avFHAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-ok-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBMT+xATCBASCBARCBAQCBEQCBAAAACH5BAEAAAAALAAAAAAQABAAAAM2CLrc/itAF8RkdVyVye4FpzUgJwijORCGUhDDOZbLG6Nd2xjwibIQ2y80sRGIl4IBuWk6Af4EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-openterm-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXFRSVPz+/PT29OTm5OTi5DQyNDw+PERGRExKTHx+fISChIyK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UipM5tIzXjRCh8ZfAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-pencil-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/IQCBMQCBPzCxAQCBPz+/MTCxISChDQyNKSipEQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARDEMhJZRBD1H2z3lMnjKCFjUJQimOgcmcbELCXzjXq0hV785WCQYcDFQjDXeloMByKG6YTAdwIDAlqSZJSVFeKLcUfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-player_eject-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+py+0R3IFQUtruXVqn3kkWyIARR4rqKvoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-player_end-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+py8Eb3ENRggrxjRnrVIWcIoYd91FaenysMU6wTNeLXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-player_pause-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+py+1vgoxzyUCxrZd18ClfmIyVyJ1lqkHuC0N+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-player_start-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pyxudwlNyguqkqRZh3h0gl43hpoElqlHt9UKw7NG27BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-player_stop-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+1vgpySUWpvXXqrHmSaeJEYhKYq6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-previous-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBFwyXOzC7PTq9OTK7IQyhBwCHNRi7LQCzPSi5IQ6jLwKzORy7AAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ8EMhJKwg4W5o1EGAIbt8wEERhHJ0mIEmiLAH5IYxi1JcnvTOeTdDYcVo1gfHY+hxs0IkvSpV2qtgswB8BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-prod-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBIQChCH5BAEAAAAALAAAAAAQABAAAAIihI+py50Bo4SKHlsDwk9fn21gJzIcV37miKpuZ0nOTBt+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-queue-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBMTC/Pz+/CH5BAEAAAAALAAAAAAQABAAAAI5hI+pFrEahGgPtCinS2GMlknU0Xkflm2l6YEiw8aRGssTXLe3lZsznvuRViwholEcLZCfynGT8BcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-redo-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBxOHBxSHBRGHKzCtNzu3MTSzBQ2FLzSxIzCjCSKFCyeHDzCLAxGHAwuFDSCNBxKLES+NHSmfBQ6FBxWJAQaDAQWFAw+HDSyLJzOnISyjMTexAQOBAwmDAw+FMzizAQODDymNKzWrAQKDAwaDEy6TFTGTFSyXDyKTAQCBAwiFBQyHAwSFAwmHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ2QIBwSCwaj0hAICBICgcDQsEgaB4PiIRiW0AEiE3sdsFgcK2CBsCheEAcjgYjoigwJRM2pUK0XDAKGRobDRwKHUcegAsfExU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ZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-revert-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAAQCBPwCBPz+/PTizCQeHDQyNBweHAQGBAwKBDQ2NPzu5PTi3ERGRCQiJHR2dPTi1CwqLPz6/Mya/Mxm/GQCzFRWVGRmZAwODFxeXExOTExKTERCRBQWFMTCxKSipMzKzCH5BAEAAAEALAAAAAAQABAAAAV9ICCOQWkGIiqsQloCKCqy7UC8MC4URSsMhsDBNWOJEK4TYJfoGU8vmmJBGI5SyyYj0XDQjMvVQwBxRCQTilowFGwrjG5kTo+0x4OdpcLvV0YXIhcGGH0ZFRobOSccfB2PHR4FiyYAGQwdAI8eEAdQKBsZmR+RBpSVVyMHfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-rotate_ccw-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBFxaXIQChEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM0CLrcHjA6JcK4ET68MrNDoIgjOYbdJ4IXagIa3IqVFAMEOqpfn067ErBxG0qGsCJyyQT4EwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-rotate_cw-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBIQChFxaXEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMzCLrcHjA6FaG4YbS6At5BR31UKI4mADGhd31rpbmCuZ6qQLA8XvqT2+QhHLKKxqSy4U8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-rotate-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBFxaXIQChEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM0CLrcHjA6JcK4ET68MrNDoIgjOYbdJ4IXagIa3IqVFAMEOqpfn067ErBxG0qGsCJyyQT4EwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-rsub-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBIQChAAAACH5BAEAAAAALAAAAAAQABAAAAInhI8Jwd26YJBUTVvT1Rlt3x2f6DjQeQiGigLCC7crK7+yC9sty/oFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-rsup-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBAAAACH5BAEAAAAALAAAAAAQABAAAAImhI+pGtZ7gpwQyWofnnQ7I4SiuAjlqZgpmqgti7gxfMh1OY6LXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-run-16:actions actions16 16:photo:16 16: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xOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-sqrt-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBIQChAQCBAwODAQGBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMyCLrcDiHK6eIL9WmsmwWCAAyiwkGKGILihzLq8p1s9onE9a48Iy28ko/WgRCLyGTDnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-stamp-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+xMTCBISCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANCCLrR+zAIMQKMguh6GR2g1QEBCBLiGGjo+DSpS3IqXNqxNAnwzisSk3BowRltM8IAZVMqi84lLNoqUVfLrOhoVPgTACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-start-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRSdBRObCQ2TAQCBBxObISevNzu/BRGZPz6/FzC3Pz+/HTS5ByyzJze7Mzq9ITC3AQWLAyWvBSavFyuxAwaLAQSHBRWfBSOrDzW5AyixCS61ETW3CzG1AQeLAweLAxefBSStEze7CSWtCyatBSCnAwmPBRWdByixAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZrQIBwSCwah4HjUTBQEogFw/M4BQgMh2pxijA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BCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_block-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py40Bo5SOzRvrwlgrfnkJOIkPaaaJXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_bold-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIihI+py70BowPQ1HZpwNv212Vg9IGHmIjoWa4ey5DSRNd+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-text-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIlhI8Jwe2/AmpTynqPTXSqrnBM+I0kdmpmGmUp+K4nPMvhYx9+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-text_italic-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+0BgztwUmmjBXX3jE0auHHhM5Yq4xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_under-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pu+FxXoOIKpds1oBH7hlYxYxRCaIZ01lhJbHy9tTv7BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-toggle_log-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBATCxMTCBPz+xPz+/ERCBASChISCBARCRAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEIQJqpXBBjFI1oGncYU4EUXxSWQZlum6DXDQpeo0tR6KqqgdLXiLBWepHgyYIxF/TKHv9XvtDDfb0So5YHuTgThYCXgH4Q6hqvEGEIm4PLGSyHX4OkZv8UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-top-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBBRObAQSHBRSdISevBRWfAweLNzu/BSOrAQWLPz6/FzC3DzW5BxObHTS5ByyzAyixEze7BSStBRWdAyWvByixCQ2TBRGZJze7CS61BSavAxefMzq9ETW3CSWtAwmPPz+/CzG1ITC3FyuxBSCnAQeLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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zG1ITC3FyuxBSCnAQeLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZfQIBwSCwaj8hhQJAkDggFQxMQIBwQhUSyqlgwsFpjg6BwPCARySSstC4eFAqEURlYhoMLBpPRUDYcHXt7RgUeFB8gIU0BIoiKjAcUIwiLSQUkJRsmGIwJJwmEU6OkfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-view_choose-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMzCLrcGlAs6UAYgwLdLtEcI4ygQo7VVp2oupGpG4vmaUVTemX523qlFcw0a4RqNlkx5k8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-view_detailed-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMmCLrc/i1IAVkYg1Z1iRYUKCqitp1oikqBWV3ZOnhkWNagqu+qnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-view_icon-16:actions actions16 16:photo:16 16:R0lG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DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-view_multicolumn-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCLrc/ixI0WSgKoyBl+beQFACpo1AqXbKCr1wLAMWS08hGG3dSZqin4sxnBmPD38CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-view_text-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIchI+py40BTQSwuovp3DXkv1ia1IHmIXLiyWJ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-view_tree-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBDQyNPz+/PzerAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAMuCLHcri4yGISlj4kxcANgNRBQCIbL6U1Su7bB62rXvGydG25kqpwfIGxILBr9CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-window_fullscreen-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBNTW1MzOzMTGxLy6vKyurJyenHR2dOTm5Pz+/IQCBOT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ZlbGNvci5jb20AOw==
-window_nofullscreen-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBNTW1MzOzMTGxLy6vKyurJyenHR2dIQCBPz+/OTm5Pz+9OTm1Pz+7OTmzPz+5OTmxPz+3OTmvOTm3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVsICCOZAkEaKquqzAQRWEYR32gSK7vO5oowKAQmEAtfr9hgpFoGBWJpDDqcAaOUSHDEU08nkOG2AGBfK/aMYQMiRi7Ywe5674yE3I2JCqZoChLeGwSEgmFfgFNDQ8NjQ0TEROSRSyVKSaYI34hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-wizard-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+xPz+BMTCBPz+/MTCxISChDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAREEMhJg6BYWhAGv5k2EKMXToSgEqc1DEIhvGAWpOvJFSXZyoXOxxY0BDahQDGg4xgOxmbgiWDqpoeqlGrVcZuSbLfpjwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-abbrowser-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBKSipMTCxISChPyqXPzerPz+xPz+/FxaXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARhEMgJQqC4Xms1tkIgDEMYXpMYEEJRCIT6Ea5R2DHFtQZBG6dNoHQrs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mh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-applixware-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBKSipAAAACH5BAEAAAAALAAAAAAQABAAAAIyhI+pGbsBHYtHCGARbMhms1HVB0TieJhcl23liXkinAmhy7732UL9GnsZeixczChB+AsAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-ark-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/PwCBAQCBPyCBPzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANCCLoQwTBK6dy8WNQgptAbB33DQGzlx3xE65RpBwgtCw9sR7e1gO8EGYs3DMoUH5rPqFylSrzaygcjHqdQVUYL8ScAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-arts-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPz+/KSipPwCBISChAT+BARCBMTCxDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAMALAAAAAAQABAAAARTEIQ5xbgYAwJksFhhaFTVdeLpURYwAOL7cp6gpmcZHEQPGyIOLRAkiI4GTqmIDG5QwGihuRIBU8boasLzZbEd082QK7VkrvTwo2pvP5m4GxHP+CMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-background-16:apps apps16 16:photo:16 16:R0lGOD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yVMNyngf7Eg8FYHAIZMRoyCSNMSA0n85oszTxJwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-kcmpartitions-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMT+xAT+BASCBATCBMT+/AT+/ASChATCxPz+xPz+BISCBMTCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEEgZwrwYBCFqvhs3DNYXjChRlWBRjIRqGN4UuEUczMZxsDeXykdEsDQVVSLhQxhBCkVlmXA+KVHFYhFYOoHbMGN6pTQaW8YYiQmcG+q16a0+Zipw+4e9B/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-kcmpci-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAADQyNATCBASCBKSipFxaXAQCBMTC/ISChAQC/IQCBPyCBPz+xPwCBMTCxPz+/AAAACH5BAEAAAwALAAAAAAQABAAAARVEMhJqww4a33F+EL4jUI3EEXoEWzaFbAKzyUQeLihDqrpHQhBQkHyqY49iWCxbDKfJQbASYUCpJbslcHter+NQ3gsLo8bBYd6zWYf0u24GjWr22f+CAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-kcmprocessor-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBKSipMTCxISChFxaXDQyNAAAACH5BAEAAAAALAAAAAAQ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G9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-kdmconfig-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MTCxISChMT+/ATCxASChFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMg5gw00yyDGIAR1YUDggeFWFIZhnSBZrsZxdIOFEGTA2oeBAHeyuGwvzxBlYdUOLROMFzDQntJPrNoqAKUBaqnV+k57ZORruykHDj2LqIzUVKp1u0iuB/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-kdvi-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/MTCxCH5BAEAAAAALAAAAAAQABAAAAJCRI4ZwCYPo1gsiIHHxY86KXmWdiGkCA1Wp6Htc07NOsEv2oVyldLHbuBgEhORJhOxGEkkiLJybCZ3iqrD08hmF/4CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-keditbookmarks-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy+vERGRFRWVDQ2NKSmpAQCBKyurMTGxISChJyanHR2dIyKjGxubHRydGRmZIyOjFxeXHx6fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVbICACwWieY1CibCCsrBkMb0zchSEcNYskCtqBBzshFkOGQFk0IRqOxqPBODRHCMhCQKteRc9FI/KQWGOIyFYgkDC+gPR4snCcfRGKOIKIgSMQE31+f4OEYCZ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-kedit-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBASCBPz+xPyqXERCBARCBISChMTCxPz+/FxaXAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARXEMgpQ6B4WnGzDgJHWWMYdkAwEF1QFKe2oqDZztr7GpfKjrvAAeFDpQq8ISIRYBotSoTUkiC2ostqYps49BSKIVfaBbcC4MMWcTAbU+iw21NBk+gjuj8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-key_bindings-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChPz+/MTCxAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANMCAoRy2IEuYIQDsrBld0NN4XaJF5iCppWxBGtCscEAbkDfH2wh+ogiudD5AhvoZWoJEFtckBTE1dzKKfQjMtUjfQUzizjeBN7HgB/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-keyboard-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChPz+/MTCxAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANBC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qpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-kspreadcalc-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBATCxARCRASChAT+BMTCxFxaXEQCBPzCxPwCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARPEIBAq5U4iM17wJMwjORIfJkYFCs7nKA2rJQLp0Su66ikGcAg8OYTGA6BA/KAIIYsFudPGJQal8uAFVqxUg2JxBYbUGh7k5J6BppwKyB/BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-kspread-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAT+/Pz+/KSipPz+BAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANFCBDc7iqIKUW98WkWpx1DAIphR41ouWya+YVpoBAaCKtMoRfsyue8WGC3YxBii5+RtiEWmASFdDVs6GRTKfCa7UK6AH8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-ksysctrl-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBISChHx+fPz+/AQCBAQC/AT+/AQCxAQChAT+BLy+vAR+BAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARYEIAgqK1YzsG754QUDERpmkEpkkXrtoK6EcVgHIibhnNx564Yb0TDvQq7FQ34EiqPOhnREqhWSUPsyZSQAbbg7GcMEgwUiYVivTa1R+y4XEGoWO/4AMAfAQAh/mhDc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pZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-lyx-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBAQChARCRKSipASChFxaXISChPyCBATCxPyqXMT+/Pz+xPzerPz+/AAAACH5BAEAAAAALAAAAAAQABAAAARZEMg5Q6C4BnGzHsRgeVZRGIbYaekxuAFijUGRBOqMKPxlJQsLQxjoVWyWBsMxNEp+iRuj2VvVCklHLCZjiRrawGFmNQUajQ129RwYyCMSau2pcNh1AB7jjwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-mathematica-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBISChPwC/FxaXIQCBAQCxAQC/KSipAQChPyqXPyCBEQCBARCBASCBDQyNCH5BAEAAAAALAAAAAAQABAAAARlEMhJ6wxChiFFCBUhENtQGIcBUghWDsHxWck7wMpKfXz/ZYBAYeCpKRQLWwkjMCpQJQ3TE8gdUgxPUMDlflINhzfocJB6BNEDqLnKpgRLTJZjBuIUAf1TExR0EyRASWmAFocAfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-mouse-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBDQyNKSipPz+/MTCxISChPzCxATCBISC/MTC/AAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARSEIRJqw0Sg32rAANBFNwlhIQhGkNGAaSaouW0iYUBEIdYgzsUIqHAuWAoQlGEE9gMJKaU8IPupqLWy3qVk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QAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-package_games-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBPz+xISCBMTCBPwCBMTCxMQCBPz+/KSipISChAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEEgZwrQzVyFq6Bj1gQMxgsBYDSxhqunKtu5bpSQdFDfFkS9DgHD5cTwBIdFnFLiSw2IzGGX+AocDNHQ6GhCJQCJsGRqThm/CoMBUCNc1W9HWmD2Jdsh+CfkjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-package-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+xISCBMTCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANECKoR6ys2IVqokF08yMTA1gwkYX5WQK5ma4VceTYPxXnBWdtY6+0834/Bowgzm6APWRQcH4TiMhPK2WYRiZWW7XK7/gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-package_graphics-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAASC/MQmJPz+/LwuLLw2NLQiJNTKVNTOZOyydNRaXMxGRJQmJFQuXFRypFySdHS+VLTOfNzWhJQeHFwCBGyGtHyqlIzKdPTapAQCBGRCbKTSjOzqxLzG3MzmxJyanBQSFJSSlBwaHCQmJGxqb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kcCR1gCUIeHyCJfX2JIUIHIiANCQMGIwYkCSUgi0KPHSYdJyAnKCkdHQ1IrhgdGCC1s7UqSCsdKLi0wL2xHY/FxMcssS0JIS4vIy8uIQktHUkgKygsMNwwKCAxUOLjAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-panel-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/FxaXMTCxDQyNAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANECLrcEDDKGYQV4+qbie9eGIJEVxTe+QmjUFgnXLLr615oF8x2v0I8DWpF2GV6slkLKSMdYT4nS0WgSkXYAWUbcXgX/gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-panel_settings-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTCxPz+/PzerISChPyqXAAAACH5BAEAAAAALAAAAAAQABAAAANKCLobwRAG4SJw7w5BswoEkQXbRn0h5ggF14FhbIhb68SiOgnbLRsPEovjwwVLRIdhCfwMiR/VZ1A7WS4tntWyynquq+01+h1//AkAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-password-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/MTCBPz+BISCBPz+xAAAACH5BAEAAAAALAAAAAAQABAAAANECLrcGi6CIAKUKwx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sIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-scsi-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/MTCxKSipISChAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANCCLoQwZAFIV6UYgxi79Qa52WDE3bKV6YOpFpO3L5pJcckLBB8/wQEDezWAQpZqIWxFNAUkqkg6HmJOqGuArUqwfoTACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-style-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBOzqBLS2BPz+HPz+rPz+BPz+lPz+zPz+9Pz+1Pz+nPz+hNyuhPz+pIQCBMTCBIQyBPz+/MTCxFwmfCQiJIxOrHw6nJRWtJxmvJxuvJxyvAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVvICACwWieYiCUwVCiKVEEhjHA6YEcxooHBURCsXihaAYGglEzngKBhsMmMDhH0YcBAu16SY2IKiApm81RMXTCblPelDCrXJlI6hSL5SJOSewVdRMUGHtGZICChHsmZHeAgxkaG41/bWxnjV6bUH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-terminal-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTCxISChPz+/MT+/AAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM/CBDcHkoFQasVUIrBe8fRNDwMAWpjUThmtmxk0IYwOaPx/V6XG3hAjmsRa0Qkg6NSOVo6F0nG88g4TUNDpT8BACH+aENyZW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CTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-3floppy_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVCH5BAEAAAAALAAAAAAQABAAAARcEMgJQqCYBjFu1hxReN82EOhYGieaklJwHIjrqnGCJLqNWhUFYoFQCG1FgWXIIDIYNQKCoawQGI0swuFAbKsxgmDsfZjBkwDBsNM90Jot9A3DbBD0Dwiur9QnfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-5floppy_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBFxaXPz+/DQyNISChASCBARCBMT+xAT+BAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARMEMgJQqCYBiFu1sIwdJ+0hSKZnZw4ehPLoW88c0Q7X7JABLlbp+eT/UyzgpADqwgKxKYpeIMZQNWJ4YBhWRHcrgpgQCSkJu3hYPFHAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-5floppy_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBFxaXPz+/DQyNISChAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM+CLoQwZAFIV6UYox61cwaF32UtlkLSYFnulJEuT6qQATxW9W2enurgo6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A8SkMCAYDARI5ZJQMBwQiWgyoFgwGgiD46FdDiCFwoDQAEe0TMkEQSFULIcLBloUCDIaDRscHRsNHhhHHyAhISAiHyMkJSYQASdGAiAgASIQKA0pKguXmJl+AiQGFwgrpUgBH0yoqK9DsbO1J5hbsrq8SrgstlJFHy0gwMVFR1J+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-memory-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBISChAQCBMTCxCH5BAEAAAAALAAAAAAQABAAAAI6hA+Bu+HCmgiiRuNoHZBRXQlc84TmcHzm2WVryE1YvMaZIdbVd2zw7lj4bDKGbxK8hHgX3K2JUDD8BQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-mo_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBKSipDQyNPz+/MTC/PzC/ISChASCBARCBMT+xAT+BAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEMgJQqCYBjFu1hxBeN82iCIJDgWaYhtntC4ZCzItdhWOD7mdwHLrAAczoKViIh6Vto5lcDjglppp9UpCTALULRaASGS5E4TCnB2rFyqJO5Gw+CMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-mo_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCB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nkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-scanner-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MT+/ASChARCRATCxMTCxFxaXKSipDQyNAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEMgJgqWBVivEldkUdKSXhVjZfenommglDERh3Tc4E4ZRHAGgkEPr9X6H5AHBERSMRyWzkug8jQXFEhWoOo8dRYxqLXSmGjIJnVaz29Q3fAP3RwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-tablet-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTC/Pz+/MTCxFxaXKSipAAAACH5BAEAAAAALAAAAAAQABAAAANECLrc/iosCUEQlEYdRp6dZ4lgKBBEp1kmmpLRMBQu6qWLEdYBn+81F0wnC8oCK+LAQDgGDIaG0vOMPnRIaEUBtW6//gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-zip_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBFxaXMTCxPz+/ASChPwCBKSipASCBARCBMT+xAT+BAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEMgJQqCYBiFs1lwwdF8VEsR4YVuXoirYFcWbkmY31wPqma2ZwReqBEODQutwEY04oeWqMniGOEzW4HAVZAEImVSCSLDGYIX5/EMoFtNSOWHxRwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-zip_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIIAAPz+BAQCBFxaXMTCxPz+/ASChPwCBKSipCH5BAEAAAAALAAAAAAQABAAAANICLoQwZAFIVyUNIx6WybE9kBTFYIiVhXFGXJetbYDaHnlathZk2eDQunw0GwomeGoMThmKETS4PAURCMlZccHXXYct60Y4E8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-blockdevice-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMT+xAT+BASCBMT+/ATCBAT+/ARCRPz+xARCBPz+BATCxISCBDQyNMTCBCH5BAEAAAAALAAAAAAQABAAAARhEMgZwrwYBCFsvhs3eF8wDMJAVBVmnupazKRmGDFxzMVBBjcDQXfYHRA/QmKpKBYRSMoysVgwGEeoJ1ClLhpXhlbiqJobjcA1Sn48qug06+JwP+I1UMCNzmcqaR8lghN+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-chardevice-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBMTCxISChPz+/MQCBPwCBAAAACH5BAEAAAAALAAAAAAQABAAAANCCBDcHkoFQasVUIrBe8fRNDwMAWojMTZmtmzByp6v7LQhT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6Va7HPIQGB6KnpW0EEB4Oshp5ZlTFRBfFs3ZLDihtTAYwZ14nGbzoS3JfO4ffwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-file_important-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBExGTKQqLPz+/KQqNAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM7CLoQwZAFIV6Es15Jqd2ZtzXUMIhXZqJYaZ5aK7zwp6h0zc05i+c6Eg8oCnWOR0eHQGEKnEWHdDoF+BMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-file_locked-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXDQyNAQCBMTCxPz+/KSipPz+xISCBERCBAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEEgQahVijMmD/oRAbBw1FCgaFFrppeo5didsZTSMDoRBSi/dgfUz6Sq7XGp1CByKQZUUWjsgrtcENYXNUodWhAahVRa65G9hmGgnnpzMZ/7xRwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-folder_blue-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHMzKzOzq7ERCRExGTCwqLARqnAQ+ZHR2dKyqrNTOzHx2fCQiJMTi9NTu9Hz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RzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-folder_grey_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExOTBQWFNze3Ozq7ERGRCwqLPz+/PTy9Ozu7OTi5HRydIR+fISCfPT29Pz6/PTy7MTCxCwuLJSKfIx6XMzKzDQyNOzizJSOhIyCdOTm5Dw+PJSSlKSipLy+vOzi1OTSvNTCnIRyVNTW1GRiZFxaXAQ6XMyyjNTS1GRmZFxeXHRmTFRWVKSmpKyurMzOzGxqbMTGxLS2tJyenKyqrDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAauQIAQEBAMj0jAgFAwCA7JYwCRUCwWgoCBEUBOG47CAxJhSrqT5wERplQoC8ijYDEcJASJ4HKIYDAZFRoFGxwXHR4eH3lqICEiIyQcAAcMJSaIeHonKCMpkxMqAismKyuIixMsH5MBDw8eJS0mJpcdByYSkwAcEQUEBC4lo7UHL7sXwMAkKTAeogceu0QXMRIwFjISMxITNNNDARcmLx8zNTUH4F64NDUTNlHsk35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-folder_home-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBDw6PBQWFCQiJAQCBFxeXMTCxJyanDwyLDQqLFRSVLSytJSSlISChCQmJERGRFRWVGxubKSmpJyenGRmZLy+vOzq7OTi5Ly6vGRiZPTy9Pz6/OTm5ExOTPT29BwaHNza3NS6tKx6XGQqBNy6pIyKjDwGBOzOvJSWlDQyNIRaLNRiBGwmBNyidLxWBHxGFNySXCwqLKyqrNR6LKxGBNTS1NTW1Jw+BEweDDQ2NAAAAAAAAAAAAAAAAAAAAAAAACH5B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esystems16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBFxaXPz+/AQCBKSipAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMgCLrc/jDKSau9OL/AuwxCKAzfOIwlcZIRKLJQMMyz5CcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-network-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBISChPz+/Nza3ARaZESanCyKlARudARGTLy+vNzq7ARmbMTCxARufAROVMzOzKSipARyfOzq7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVmICAGZFmKQiACweCSBImq41AYB5IodLq2hwWO0ejRWDac48Gb/QKNqNRoqspmrVcAUuIJBANS8sBIFCORUgooPEh4J8B67NgdsVBp9C5XWfl9LRMTCyReX19hARNojWlWLH+AAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-pipe-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChMTCxPz+/ARCBFxaXASChCH5BAEAAAAALAAAAAAQABAAAAM2CLoazpAFIV6UYZB6Yd5BtwRbEYqkYIqAQRir6KpnN8cdCddXivcbAy+S2qEOAuPx8MtZRP4EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-shredder-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBERCBAQCBMTCBPz+xFxaXPz+/AQChISCBISC/DQyNPz+BARCRAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARcEMgZhBUzgzuIH4G2FYThnZUlCab5Ed0hC6nZ3Yh8JIKyLjCYboeZKIK6BDHTGwyViopEoWAkdwfqoKhIKLFUwXY79coUtLG4CFAcOOstWyNWyEXMO57p2/vxfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-socket-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+xMTCBFxaXKSipDQyNPz+/MTCxISChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARKEMgZpr1SjFqx1QHoTaA4AuV2EmmHEUUxsKoHB7FMGPbhI7gCgnchII6+AyJBtBhjx0KC2TsIp9QXcpm1HafNEQF8mhAOCdfEHwEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-trashcan_empty-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBKSipERCBARCRPz+/MTCxISChFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARREEgZapiYWjGIvVNQjEZ5BKUAApVgjEWJzCtAnIGgC8eZ5bre7ICosQQFVY9Y/CGVwiYmlwwsac7qVRp6WqNGKpQZ9m7DojH2t+lVMtMP3B8BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-trashcan_full-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/Pz+xATCxMTCxMTCBKSipPyqXISCBFxaXISChAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARbEIAQJJU4BzEoIdSFbcNQnIVhBJ02GAeFIGxZjUl8KoHRagfeYqgo3kaxQOEwXPAyk4Mgtgg6jxYp1foETgPEKzSgBXOx0W9VIfZu2d3R5t3WhA5BEdQSQgP8EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-www-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3LSyrJyanPz+/Ozq7GxqbDxinBw+ZERmdIySjHRydMzOzPT29CwuNDRurIR2RPTSdJyulEyGvBw+bLzCxIyKhGxubERCPLzKvPzivOTixNTChLSybGyCfCRSnBQqPLy6vOTi3Ly2rCRShPzy5OzerLyaVEx6nCxerGRyhOTezPTShNy6bEx6rER6zDRitBxCfPTu5PTq3LyqjBw2VISq3GySrPTWlHyanIyitFSO3LSqpPTm1DQyNCQ6XHSq3GyWvDxuvCRSpKyurOzizAQCBCxGZCRKZExGLDQuHAwaLBQWHKymnPTmxOzaxHx+fMTCvOzWvLymhHRmVExGPOTOpExOTERCRLyedBwaHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAAL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Wxjb3IuY29tADs=
-cal5days-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANMCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiIdMmcec7jy53q81qP9OO5VMAj8RXTFWzOZW95HDLdEEM4LA4nIE0zgp/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-cal7days-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANPCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiwcp0fucsj873qvGMv5Jw2FIACUsW4WakGW1O046I05qmGYBhTC6TM5CGWuFPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-calappointment-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/MTCxPz+BISCBISChKSipAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARbEMhJaQhA6D1E/wDGeeRgDhOhFoTBEi+REgdrIHScSEVvAD9Xr7cDqGSGpFEnQSqTv2NxCFQOiU1VEAiTZmstHFg1vQKuw+LxxfYaV/AuOQRI2O/4ewhT6Uv8EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-calbell-16:korganizer korganizer16 16:photo:16 16:R0lGODlhDwAOAIIAAPwCBISCBPz+BIQCBMTCxISChPz+/AQCBCH5BAEAAAAALAAAAAAPAA4AAAM+CLrR+zCIAWsgLVRGRBhOVQiG94WPVAbHaZHYAWqRYLbge88RsbInGuBCEhRYrZYm4xk4nYdoKzKIbiKHawIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-callist-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/KSipPzerMRaBEQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARDEMhJaQhA6D1E/wDGeeRgDhOhruyatjBRSIRxxOsMEAdC0BUZDcfSEYvDo3Bn++2Cxt7RqFxWhZiCdsvdhjCVsMQfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-calmonth-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANSCLrMEUDIOUS9AFLLhx8LIRZjKYbiRxLFIBpK0Q6z7MkwkJIe8b0KEeuWchFysuStVsjtfMbeMQitWpG25YfmNK1WU53XNIUYzug0OgNpuBX+BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-caltoday-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/MTCxKSipPyCBMRaBPyqXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARTEMhJaQhA6D1E/wDGeeRgDhOhFmurpi5LyIQhFfiBIAfuFzaAioBIJBCummRYPCaDPh3vhwsOZdihNfa8Ub/AJXemFZPPNBvGwG672yFMZS7xRwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-caltodo-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBAT+BAQC/AQCjPz+/MTCxPzCxKSipPwCBMQCBIQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARaEMhJaQhA6D1E/wDGeeRgDhOhFmurpi5LyMYhFXiuFwZiA6qZYbbqJX5BIw2RAPxwAAWCyWMCCsiXFGEEErKz6LQZfOqiTR1YJiGq1rFyyHmo2+/1EKbCl/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-adjustcol-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBGRiZAQCBPz+/CH5BAEAAAAALAAAAAAQABAAAAI7hI8JAWL+IgvwUSSY2Lz7VTXXkS2NdJ6TwiSaB3PNQNdCbc/4cO9OjwPmhDQiTxfcHY1MpE35g0IB/gIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-adjustrow-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBGRiZAQCBPz+/CH5BAEAAAAALAAAAAAQABAAAAI5hI8JEcItooxG1oEzBoJ7oWlHd4VbNZpbx3LqUFGuajTPhI8kSLfsO0rRUCXT5wPkyHhGhsOJs/gLACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-black_sum-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIdhI+py60BY2QwhVYdytpw/WFXF1LjcW6S1LVu6xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_all-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIjhI+pq+FuHjwyRInqfRkDTXkgQ5YLOH6it00pyqqcPJk26RcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_bottom-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAInRIynGe0PFTQz2kdxzHf72iSiRDpc2F1niaafBroYQNe2fdx6HfgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-border_fall-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIrRIyneRYP4wPUKWmr3E5b+DVh9GkYuFALiqnsJp6nObYZB5ow2a3Jvwv6CwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-border_horizontal-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAImRIynGe0PFTQz2kdxzHf7CoTiSB7kKUpa1Vlc86rtSjvxnOSL4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_inside-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIrRIygxxYPF4zzyenqxfVk2m0g9lnKiabqqoYl43YwGcqiFWv22zRnD/AXAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-border_left-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAInBHKJmxYPY3TyVCozsjMbrk3gM27KyZDlioVQS3qwO7Nl6KC6q/kFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-border_outline-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIrhI8ZybgQYoTy2YqtwVTunVVfN3HQsaTnc5Kp2Ibw5Zm0PHJ2w7O8I5P5CwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-border_remove-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIjRIynGe0PFTQz2kdxzHf72iSiRDpc2F1niaafBrraSMuQXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_right-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAInRIynaOEPH5hRRVrzbJBLn32g1TXJuWBdpYYiy47hBl+yRqH6HfoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-border_top-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAImhI8ZyRgPo3xgVnmnprbvnUEhx1XmgpLRmH7e+rowFssleuaBXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_up-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAItRIynwOEPH0vRuGkjnFKjpmgX2FVkuBwNhapZKZ3VyMKcGJPv5eJmAkz5RP4CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-border_vertical-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIrRIygxxYPF4zzyenqxfVk2m0g9llmsiCmVjJh65Jh59GtGMuzqqQNDQz4CwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-cell_edit-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/ISChCH5BAEAAAAALAAAAAAQABAAAAIshI+pm+EPnwmi2msDoLgLzQWDV4HlSJof6qki+W0nrMKlbN9bxGvMDwwG/QUAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-cell_layout-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/PzerMTCxPyqXHx+fAAAACH5BAEAAAAALAAAAAAQABAAAANCCLrc/i3ISacKIuutA8ACxWUeJg0DqBHhd6ZiRpQBag9F2n13FRis0q1QUAmCvFuKRTAYWhIi0bhz+SqQrHbL9ScAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-chart-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAQCxAQC/AT+/MTC/Pz+BAAAACH5BAEAAAAALAAAAAAQABAAAANMCLocHiyuIASU6lE7Xx7DdgEBQVwBKE4mqlZjeT4vl7VFkYZUjOuGkMFiuJ1yKUNAWTQGkEKDknUESpdXkkYjnWIWzOVX0SyPJwx/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-comment-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+BPz+/Hx+BAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM5CLrc/i3ISacKYuStuwhAMBATKRHkAGJeu60qagqmuHK4B6Pn3N0u147Ha8FyOVCowlRCntAo1J8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-deletecell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPz+/PwCBMQCBISChAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANICLrc/i3ISacKIuutA8BcKAwfNwwmQYDZoJ6tWrBZoRKuXIb2XRS7UG4wC25yOIGHFvu9PJ8KcRbQOVzAheoxbRCyDOKj4E8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-delete_table-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPz+/PwCBMQCBISChAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANPCLHcDDCIOSUVAaqLeY5O+G2XRQVDdA0DNxCEwrwEu9AFORVw3ee6Cu8HFKFgA2AQQ6uNTJNXYZgCNZKFBay4IhQuMBUFW/LKZlkHoOBPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-dissociatecell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAASC/AQCBPz+/PwCBCH5BAEAAAAALAAAAAAQABAAAAI0hI+pm+EPoQlC0GqxnfV2HUzR6HDWgA5Bqppr+qIhcMUqO5Oki+M87KN1ejCRTsJIKhP+AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-first_letter_upper-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIohI+py72RIJOHRmBt3QaGz2GVBGJfKW4aiXhX2sHxbKKneDv6zht+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-fontsizedown-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAInhI+pELHqmIkQNZrwfXYvzE1fBUrWoZniOjWdp0agjLL2i7rhDvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-fontsizeup-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pEeoNIFyIzXStw3q/T4VVhJHHlDGjgZ6n1bLyCrqPyuJe4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-funct-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+py60R3IkRVHQzo9BwD1qhqGneRU4gSqlVJ8Zy0mKPhOe6XwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-insertcell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBPz+/Pz+BATCBAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAM7CLoa/k7IKQCEdNobc+UOMCijCD5jGjAMOowrIc/Wm77ATIe2leuETcrEYpSOJ88HpNxwmqdi40Tl+BMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-inserttable-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAIuRI6JwCH/HBSBmUlxbarvO0nQJ0aa5XWodjZsiKbJGrbgaMuzW8M87jPoDgx/AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-lower-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIqhI+pELHqmIkQNZrwfXYvzE0QKGniQWmNhbYSeqXn6zJOBJLTuuuh4i8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-mergecell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/ATCBCH5BAEAAAAALAAAAAAQABAAAAIyhI+pm+EPoQlC0GqxnfV2HUzR6HDWgKZpCFyBCrMurMoPvZovPsgd39MBbaQI44hU+AsAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-money-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPz+BPwCBASCBATCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM+CLrcHMHJIEaUD16sqIUcQAne5pQaBglkZS6lxb6dRoIAQTzuphcFXWeW0xl/utIPGDQOSUdnA7IUhoocfwIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-oscilloscope-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBOTm5Hx+fLy+vAQCfAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANKCLrcGjDK+IS9494AgrbEJ3CeUBRWpp2daaHhhZKuq75jh8pxTRaEQbAgFAIHv1VvR/vsdrnSCmdpagYnjfXS27Q+N29nQuYA/AkAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-percent-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIkhI+py70RUHxxQmosu6BOdWkNR35PVm1etqEsaKXnwTn2DfgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-precminus-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAIthH8RiJvrmHogVoXNtFRDpjUf6JWkeUoXlpGBAMfC+cowbd+uwL54/rMFZf4CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-precplus-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAI2hG8Rp4y9IGgszqhyspLueYHih43hiX7Iui5XprGTQNeCPNNBje86L9vBdr2a7xY0AllHm78AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-removecell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAAQCBASC/Pz+/PwCBCH5BAEAAAEALAAAAAAQABAAAAI5hG+hq+IvAGPwydlqxAohvnjHMChkR6YDcKaougZqCMdyGYqSG+jXKQtoNkGTUHPBDJMTH+jJ8RcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-removecomment-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPz+BPz+/Hx+BPwCBMQCBISChCH5BAEAAAAALAAAAAAQABAAAANVCLrc/i3ISacKYuStuwhAMBATKRHkUIScUBSeahhigBbzK+HGgXmHmYHXC41MqKDwcGDFMryCz4gi3YQwkKiFY+ZAoYrUF5g1HV3G7DFuFBvSx8GfAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-resizecol-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBFxaXAQCBDQyNPz+/AAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMyCLrcG0A4CZ90saohuv+XEgxYxkDhQp2lyIBwKhB0bct2TuB6zfe7F5D26xV1x9zFnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-resizerow-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBFxaXAQCBPz+/CH5BAEAAAAALAAAAAAQABAAAAIyhI+pmxHinph0GnqH3hoIDwocd3zZ2F0lmoInWq5s/I60xw5hmF8WPnNAhJUK44hM+AsAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-series-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBGRiZAAAACH5BAEAAAAALAAAAAAQABAAAAIjhI+py+0fUGRhGrswVtr1FgiGsGlhZVWAuarr9byyB8f24hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-sort_decrease-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BPwCBAQCBAQC/FxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM5CBDM+uKp8KiMsmaAs82dtnGeCHnNp4TjNQ4jq8CbDNOroIe3ROyEx2A4vOgkOBzgFxQ6Xa0owJ8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-sort_incr-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BAQC/AQCBPwCBFxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM4CAqxLm61CGBs81FMrQxgpnhKJlaXFJHUGg0w7DrDUmvtPQo8qyuEHoHW6hEVv+DQFvuhWtCFPwEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-special_paste-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+xPz+BNTS1MzGLMRaBMzOzPz+rPyqXPz+/MzGNDQyNKSipAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARoEMgJQhBySGx7IEQwFKMWGKgRHNZRIAJSVAm6usIwCEo+BDWVJ/CKzYAplWJZItGSgSVPZBEgU9EFQyGyWoK25XJ4DTO2iob6CxVLe2ys4rw9e8HKd8ybVJ7ndgEVQz09e1YUEmQefhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-strike_out-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBGRiZAAAACH5BAEAAAAALAAAAAAQABAAAAIghI+py+0BgwOS1gXnuS/b6ClCpCUcclJMmKIGWcby5BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_bottom-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIVhI+py+0Po5y0hYtzrkB7zH0fN/kFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-text_center-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsnRkqtDnhu1zHfFSpjaY4PavgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-text_left-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsgRoqr3Vnt102fFSJjUC6nlPoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-text_middle-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIXhI+py+0PT5i01pisphjt3UmfFZYm5hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_multirow-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsg2kfZvblXbwTg10WlA4rjyvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-text_right-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+pm+EPIZstSrqsDhhv1ylfFE5jiYwX6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_top-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIWhI9pwe2uYnq0yQtqxbz7D4biSIZ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-upper-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pEeoNIFyIzXStw3q/dR2hhEVcJqamuq6Z9brlNtKMeHuKXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-vertical_text-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIihI+pFrHqQHynTRrvyxQ12YWQWJGMpC0f2E1psr4eaj5+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-applix-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFRSVFxaXFxeXNze3Ly2rJyanOTi3Pz+/Ozq7HRydFxaVISGhGxubMzOzDQuLExKTCwqLIyKjGxqbERCRCwuLJSSlOTi5BQSFPT29IyKhDQyNISChDw6PBweHMS6pPz69Pz29PTq3Ozm3MSynMTGxAwKDPTu5Ozi1LyulExOTCQiJPTm1OzezLyqlLSyrDw2NOTazOzizOzaxLyqjKSipBwaHOTStLymhLymfGRmXNzKtOTOpLyidMTCtMS+rCH5BAEAAAAALAAAAAAQABAAAAa9QIAQEBAMikfjcCkgOJ2FgCGwFAYOiCwioUAYFtUrgtFFNBzeB5OAgESyEsWEUjFYAJYJ4hLBoDMHBRobAAaGehwdHnoZCQcfEUKHCBQBAxsgISIjJIRCeSUmHAYmJSInKCmRkgYqGw4ZKxMiLC0unoUvFBQQMBQRMTIzNBVDFjUrGwO9Nh8zNzi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uNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-vcalendar-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXDQyNAQCBMTCxPz+/ISChAQChKSipAQC/Pz+xPzerPyqXMRaBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARyEEgQahVijMmD/oRAbBw1FCgaFFrpEbB6jt1g3OpFAscxwATUiIAgBRKJXiqIYJEMBQNSWSAYgptrMDo9FJqKrHArTR4WLGisSkbebE12gXFFGRBFyd3eaFSvbx1xCDBXC2E1e1EECo07ABkaBh4fGn4RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-vcard-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXDQyNAQCBMTCxPz+/ISChKSipISC/ERCBMTC/Pz+xPzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARvEEgQahVijMmD/oRAbBw1FCgaFFrppeo5drKhXqQUEIfREyweqWIoHo4GDYtkGxwQ0CjitEkUrCyfYjtdbJoFW/agmLJWWZSY3B0EbGJ4uAwcHlK2HpTg7YgHBgQjDH0THoGBCwULjDkAGR+RH34RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-video-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaTFxaXIxuHJyCLHx6ZLy6vJSSlNze3Ly2rMy2RNS+TKyqrMzKzPz+/Ozq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:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VCRGZAxCZGyavExmjHyatOTy9CxihISevPz+/KzO3BRylAw+XAQCBDRWbPz6/FzC3CSuzDyexJzO5Mzq9CxSdAQOFISmxNzu9HTS5BSmxAyexDSuzJTa7Mzu9Kzi7GS21CRmjAQOHHSWtLze7AyWvHzG3BRihAQKFCTO3BS+1AyixBSWvBSOtBSStAQWJBSixDzW5BTC3BSqzBS21CTC1ETW3AQSHEze7BRqlBRmjAQCDBR+pBRefBRSdCH5BAEAAAAALAAAAAAWABYAAAalQIBwSCwaj8ikMqBcMpvHgGAANQYIhWdVGDAcENQtIJBQLBgNx0MQaDuQXcghIplQDhBIxXKJYiAZGhscHR4VHyAhIiNWJBklGhIbJoQnFCcTKIxFKSgbKissJi0mJi4vLiYoMEcXKDEyMzQ1Nje2NisoOEg4KDU5K6g6OwwoKAN9SCOeMmgwz884PEq9PT4NYkPLP9jZQikN3d4AKVrjKePp3gZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-blend-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQmJAQyNAQ6PARGRARSVARmZARubARuXARmTARiPAReLARaHARKBAROBAQCBERydESChESOjESanESmpESytES+vETKzETKtETCpES+lES2fESybESqXESiRAQ+PARiZARybASGhASWlASmpAS6tASynASqhASiZASaTASSNASKHAR+BARiBARydAR+fAS2tARKTDRaXARaXASOjASKdASCZAR+TAR2PARuJARqFAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa3QIBwSCwaj8ikcslcBp6CAaFQMBwOiIRiwWg4HA9hAAKJSCaUiuVywWQ0G07H4wkDxp8CKCQakUolJicoKSorLC12eHouL34lMIKEhoiKEFMgLn0kMIGDhSyVYh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KSmpHR2dJSSlJyanISGhGxubIyOjKyurGxqbFxeXGRmZHx+fKSipLy6vGRiZLS2tFRSVHRydJSWlHx6fCH5BAEAAAAALAAAAAAWABYAAAWWICCOZGmewamaQrq+wUC8azHINGocOI38iIRAceDNaISFYklkGHOEhoNBfUAOhuOLEJE8HoPiRKFdESiQBqViuTDIUAsEcyAeGJmyiqC5RCwJGg0YcEh9D0V3Dxt6JwQVDRYVHBUdi40mjw0PTgwQHgeYJQQJfxUXFxAOoTkFpQ0fsRSimQkWEQ0VtI62HLt7vjl7JQYhACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-border_all-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI+hI+pyw0Bo5wR0TttUJDv0yWhRopfaYzguaKt6aasrGFYbVPxM/O7Snv9WEAfTIgMKpNGWU63emYc1GrVUAAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_bottom-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIyhI+pyw3xIpwyOgOv1dvl+2lhMzIlyZ1KQLUVm8Zch4ozbcq6l7L+D4QhgsTf7Xi0FwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_fall-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI/hI+pyw3xIpwypgBRdg/v9h2eyBnZCIKYxX2oEsJruVKjHS8vk3duKZnpHKjeRSTU0HYpTcxWgRqB1KrVYC8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-border_horizontal-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIyhI+pyw3xIpwyOgOv1dvl+2lhMzIlyZ1KwLbuyybw7KY216Einpv377FRhhUV78igFwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_inside-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI7hI+pyw3xIgxTRvcg1oku3njbBx4liV3dqYbsSsXyLBr0Pad1iCovsmOwgjbdz9TrGHWWSeWZikoXhgIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_left-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI6hI+pyw0Rnox0ygNXdG9z43Xal30gUiYhk5LoenJQRVtti5FwE+Kx4+O9RrIda6gwDmvMi+kJjTIMBQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-border_outline-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI8hI+pyw0Bo5ww0SttcKci/ymgMTZl+Yjbt3Jn26lautX0A+OizHJkjsrper7XbkZ0ATEYDZPii0qnU3sBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-border_remove-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIthI+pyw3xIpwyOgOv1dvl+2lhMzIlyZ1KQLUVm8Zch4ozbcq6F7s+fgsKb4YCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-border_right-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI7hI+pyw3xIpzyQRdVuIZj+3nHhogOiZng+I1qoqIdRVfbWy5y1u5M7MFphB1dsDULGXO15goJjUoRhgIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_top-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIyhI+pyw0Bo5ww0SvdCdrw7oGfNnZlczIpKorc+8RwZbZgXOc2uevOqpjJhrCb8QgwFAAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-border_up-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI/hI+pyw3xIpwyOgNRyPq+zTkcuIQKaV3T1pgHinmfm7AUedMa64Vw3bLJMr9TiZcSFUsnkw54q0Rl1KrVYSgAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-border_vertical-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI6hI+pyw3xIgxTRvcg1oku3njbBx4liV3dqYbsalFeJTp1iCovcjNsb9iZhMFcJwXUxTJLYuoJjR7sBQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-bottom-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VCRKZDRSbBxCXJTC1Mzi7Nzq9NTm9Bx2nAQCBNzu9JzG3Hy+1HzG3IzO5BRmjPz6/LTe7Dy61AyStCTC1FzC1AyGrETS3ETC1ETa5BRulAyuzBRylAw+XMTe7Gy+3CSqzAyexBTC3DR+nIS21KTW5Nzu/KzO3FzC3Pz+/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5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-centrejust-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIhhI+py+1vgpy0TogztlT7j3CiBJbZWJlqg4rry7jw/BoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-charset-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIIAAPwCBAQCBAQGBFxaXAwKDBQWFAAAAAAAACH5BAEAAAAALAAAAAAWABYAAANLCLrc/jDKuQK1zmKo3/YVJSpBSZYmKaTkAAwYoQwFELjvpisyaTM7H6AH+3lQMZQwExrOOiBh7/cJGokaXHGpQVaUo7B4TC6bw4AEACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-colorize-22:actions actions22 22:photo:22 22:R0lGODlhFwAWAIYAAPz+BAQCBBweHPTy7Ozq5ExKRPTu5NzStLy2lCQmJAQGBOTezNTKrLyylNTKpOzm3NzWvOzm1MTCpNzaxISuvBSGvLy+pKSehOTexISutKTa7IzS7GSarJTW9HTK7CyazBRypMzGpDw2LOTaxEyKpCSSxARGbERCROTizMS6nDx2jARajIR+bOzi1OTi1MzCnLy6lOSupNx6dGS2rJS6pMy+pOS2pNxGTKwaLDSmpHTOzES2tIyuhLSmjPyqrMw6RLSOhLzSrGyqbFSmXJSyhNTOtGTCvLzm5CyOjEQ+NPRqbOxOVKyKfMzizKzepFyuZJSqlBR6fCRmZJSKdDw6NLxqZLQiNIwy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ByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-connect_established-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBKyirPz+/KymrOTi5KSipMzCzNza3OTe5Ozi7MzGzPTq9OTm5ISChMS+xFxaXNze3GReZIyCjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWLICCOZGmeaBkAQpoGg7C6JizTQT7CxPwOwFWgYPChYIXkIHC4uQKGAiKRKCyNpxxUUVViVYNFLkqtLo+DAkMMLXQPXwAy2WCTF4544FGtKuwPDhB6DnxuUmyCcXIQhV1uYoMuEAcOBxEKCHg6TzGFCJUSizuejROKOAM9OY2SnUU7nD89NCcDsLUnIQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-connect_no-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBPz+BMTCBERCBAQCBPz+/MTCxOTi5Nze3OTm5Ly6vNza3ISChFxaXKSipAAAACH5BAEAAAAALAAAAAAWABYAAARiEMhJq7046827/+AVCKE0Dh9BAGdaGISAToFGFMcBU+11I4hDYseSZQiKwwKoI/QwBIYiuFDCZseGdIlYEjUNg1SpY6w2N4cUIW6cjwW1lsFwo+MqgtZuw0/ydw5vH34lBhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-contents2-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBDyGhCyCfFSWlESOjDyKjDSGhCx+fGSinGSenFy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dERIBnRAOiR4ERx8gsSEMBBmGCyEGG3YGBwcgIr8UCwQHECOgG4xCtRkEJAvBJRklJgkSFBQeJ68hJiEoESkFKiEZIbkGARsLlwEGExENGhorGSkpFAYm66NDLAECpGiBYsUIFA8wLHBBQMWLVkdUCFCwaYVFBOymkVCgYEMgOykEpICBccMBAhhELFigTEqAAgIIwCiQ4eRKDyS6EAlJIAI0EpaudF4iIKDAAn9CkRT5eMROEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-fill-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAASC/AQCBMT+xASCBMQCBASaBPyChASyBATCBPwCBARmBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAASCEMhJq704axB2DkLnVeAwiCNHDMWZcsbaul5ZyCaKBcZwFDcgDRNbHX7AmW4SMx2MSOFQQlitEAhosrVcDQQE7NMXzVGqA6xAgCUckabQpJoIYBFsxBspUKBiHQEHaoNvBQJTgBIBdnh5B4hLihONeJBTc0uMaphMS4uRGQYfny9EEQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-filter-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBAwKDMzKzMTGxNTS1MzOzAQGBLS2tLy+vKyqrLSytLy6vMTCxBQWFKyurCQmJBweHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAV7ICCOZGmeaHoGbKuOAjsQhVG764EgyT7YhaCBVQogFMhFImEABoUB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A7
-forward-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VAQCBBxCXDR+nIS21Aw+XJTC1Nzu/KzO3Pz+/Nzq9Pz6/MTe7KTW5FzC1Nzu9CRKZMzi7IzK3Lzi7LTe7HzG3Gy+3AyuzAyexFzC3DRSbHy+1Dy61CSqzAySvAyStLze7IzO5AyGrETa5ByixBRmjCTC1ETS3BTC3Bx2nAyWvEze7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaYQIBwSCwaj8hkMqBsBgTN5IAAjRoDBaq1aDggtMuAWDzoJhTgY+CwYLgZDccDwkgXI5IJZVGxXDAZGnR2QxsLHB0PHRgeHyAZDyFfVUQDCyIgIyCPIB+QJCUmlEMBEiInKCQnKSkeKSQeomoqJrUmKiArKSwZsmoCwMEBGCyxo1EGHr3HUQEEvltCBtDRAAbMW0zV29xDBkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-frac-22:actions actions22 22:photo:22 22:R0lGODlhFwAWAIIAAPwCBAQCBAwODAwKDAQGBIQChAAAAAAAACH5BAEAAAAALAAAAAAXABYAAANICLrc/iwEJSEUQA45LcOKMHWeU5XWiUYZsZClOIjj+naqrS9F7/9A326YCYBypREOpMPBVifjkBRw7SpIG+eJIg2IWC5UikoAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-frameprint-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCB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iAAaRxdgYsl7Ybk8igBZoN5xmAdDxoanp8HyANISF8EBsiXBMjJBolBEQmGHFoRScbKHIKDykqK5lFAZRCnyknTaROLA8tq61OChgtKqyzQgEYEJi6UC4vI3LAASkbMBPARAEBdszR0sACEaPSMTIQM8W6KzNl3bo0NOJDdEEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-int-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIIAAPwCBIQChAQCBBwaHAQGBAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAANJCLrc/iDAuYKlU0r8NHfXB24iEyrCIAjAynakQLQuDS+vrTcnI1M9HyaIykFOKwUhZ6zEWC5oU9GrRY+kkqdUiXCdWW74SzYkAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-leftjust-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIihI+py+1vgpy0Tohzs1T7z3CiBJbQWJnqg4rre7jwTBtGAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-locationbar_erase-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAWABYAAAJChI+py+0PX5i0VmbzVboHPgmCJVoJJY5haR5VGsCa+6ZqZ2Sy95E2n0OVdi2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QAJYk9IjCFEisyoocFEB4UACtBpm0t3LiF4gQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-lsub-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBIQChAAAACH5BAEAAAAALAAAAAAWABYAAAI9hI+pe+EPHTNhgjox04srn4CI2FgkZaaZurGd+5nRfAiCYVuJzfN6jbvdfrshEZE7ApNGXa+nZDaVVIOhAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-lsup-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBIQChAQCBAAAACH5BAEAAAAALAAAAAAWABYAAAI5hI+pF2G9YpszKgcgtgtyuX2I44UcRYkM5qmWAMcyzAn1/eKRnfe7vuD9fEGgQlgkHo2JmRPpStgLACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-mail_forward-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBJR2dLyijPTixPz69Pzq3Pzy3Pzu5PTu7Ozi1LyelOzavPz+/DwqLLyafPTmvPz67Pz29Pzy7LSWlPzmzPz6/LyajPTitOTSzMyurPz25PTatPTi3KyOjPzuxAwqVDQiJHxiZPTetKySlPzqvPz27BQ6bAwmTP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paintbrush-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBMTC/AQCtAQCdPz+/MzKzOzu7KyqrCwuLAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARZEMhJ6wxiDMsp1lvHfRohWuRAmOeVlUTQSukqz3U8A/nd9rtCAWTbAQoGg0q3OyANCOYPA0UgfCdMJnHFimre72sZ7pBWiTLqRUirK5hV7A0P2O3GvD5PjwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-paren-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAWABYAAAJThI+pGou9oDuS1hlqnkxu/niVQB6kYHzAiJYoUK7paLrxpr6GMJjWeqlFGirEaQhcDHQJnEQX2/1kMBv08Yu1ttNkFRr1ikHjIiYYjDjSWLIbUAAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-pencil-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAASC/IQCBPwCBPyChMQCBPzCxAQCBPz+/MzKzISChKyqrDQyNEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARYEMhJ6wxiEMtpIAWxddwXiqRlikSQeiAbuC+wirNR322gv7zcLobzDU+9XypoBBKTR1lz+RTWDgip8nUwZK1XLyIx5XoVicX2RUAo1DVKi7GOBxjxfNwQAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-percent-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIzhI+py+0P4wkU1XfDhBdo/zndF4qh1pkGKYFk2XpTqoJr9G5YfmOz3hixfBZa7IhMJg0FACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-player_eject-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAwKDJSWlFRSVBQSFKymrOzq7HRydERCRPz+/MzGzISGhJyenKSmpGxqbJyWnJSOlKSepLy2vIyOjGRiZPTu9IyGjLSutFxaXExOTHx2fGReZAQCBAQGBBwaHCQiJLSytKyurJSSlFxeXNze3LS2tIyKjFxWXHRudAwGDBQOFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa1QIBwSCwaj8ikcqkMCJjHwIBQgBIDhgMiUbVKFQsGItBdBhpgh4PxIJvRC8cA4oiMy8bvQhJhMAYTFBVOURAWEw0QFxcMERAYCBluVxobDxkVHJocmBwEGgmEQx0dHh0CpKmkH6odVlanBR8FtAIFtiCkSB0LISEiGCIGIxAPDySuRwIOBwrOzwoHJRHJRh0jJgMj2gMnERQUCNVFHQQoCBvo6CkICATjRB0qp7b1K6qv+foyQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-player_end-22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V2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-previous-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBOzC7PTq9NSG1MxW3LQCzNRi7MRGzLQCvPz2/NRq3ORy7HQCdJwClAAAACH5BAEAAAAALAAAAAAWABYAAARUEMhJq70Yh813rl1HheInBYIwrEJwktxJFEbRmuOBJIXivp5LQLcj+HCnBaPBMBhdMBBjw0w8ccEA0/EzdQHaHywmnIyDyDSIrG4LQ+64OSqvx+kRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-prod-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBIQChCH5BAEAAAAALAAAAAAWABYAAAI7hI+py+1/gpy0hlVRZlP19mmSE0YjeIoXuqpkarYYbJQeDdiJrrs77gvOZDVg7Eb8JXtFSpMJiUoB9AIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-queue-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIIAAPwCBAQCBKSipMTC/Pz+/AAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAANfCLrc/jDKEGQMQlDLKM5aZQXDQIHZ9nhleaLqEhAE1bofKCozXZO3l0bmK9qCQ2LRCDQlAb3lkoTZQaVS6jOKpWmt3O5X2fU6wWXfuBM2mmINCpbKkavho56VI9s7DAkAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2Z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20AOw==
-text_block-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUWzvNzo33GfFl5jVlonlTrr1DbvFi9vjeeNUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_bold-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIxhI+py+0Powm0VnknjVkH2AEhE45LZ55Wqn6e65TsMc5eYosbksswubJIhsSiccgvAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-text_center-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUbz3Sh7yIWfFHKjVl4nmFrr1Lpr7LwkjeeIUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBBwaHAwKDBQSFLy+vLS2tJSWlBQWFKyqrFRSVCwqLDQyNNTS1GxqbFxaXJyanIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAVcICCOZGmKQSoMaZsShBsQBdAapHvgaIDUqUPJlRjSbAoT0fRDKgODRbF0PLUYjZO2F2Bst9evNix+dsvDlGKK5jraudQb7qbX6a2HEJ+ycyF+LRE8ZTI+fX5oGCEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_italic-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py+0P4wqUSlQvttrkDnyaOHIdeaGRupplAIauVM3xjeeOUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_left-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+pyw0Bo5zB2UXz3Sp7yG2fFJajVjonmIor2TJvfL0wjecIXQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text_right-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUfz3SZ7yIXdF4kWqZkbCqoMO7kXLC+wVOe6YRQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==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HlEfICEiIxUkGyUmIgknKIhXASkonCorgSwmKQGcKE9IAi0uLxUwMTJWMzQ1NiYwBLBQHws1N7avXgs4NjkcCblMATU6KhvGyG87PAnUKV1MAj0+2zIFp1bg4eJJdkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-view_choose-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz69PTq5Pz+/OzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq70466Cl+AMxBVwnFIVRAmQHCIeBrC1L3tQgJ/SaEbeeC1PLBHE2ybFI9A1HzstHEIK6YCmhDTmBybQaHYJn7QC5zKeytIQe1+pKNE6P2yMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-view_detailed-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz+/Pz69PTq5AQCBOzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAQ+EMhJq7046817+MLQUQFRGMc4lQaSAkcMx3QltMmrDrSu/sCgEPgJhIiFk89DaL1qPRnlhsgBebWhdstVESIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-view_icon-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIM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 100644
index 0d5b2c8695..0000000000
--- a/ext/tk/sample/tkextlib/ICONS/tkIcons.kde
+++ /dev/null
@@ -1,195 +0,0 @@
-actattach16:act act16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBPz+/AQCBAAAACH5BAEAAAAALAAAAAAQABAAAAI2hAOCxg2h0nJHyEshi9HpxU1GOCLdZoKpQ15nibUoprKp9lh2oucUxsBRXsJh4Hjs/QTMpr8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-actbookmark16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy+vERGRFRWVDQ2NKSmpAQCBKyurMTGxISChJyanHR2dIyKjGxubHRydGRmZIyOjFxeXHx6fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVbICACwWieY1CibCCsrBkMb0zchSEcNYskCtqBBzshFkOGQFk0IRqOxqPBODRHCMhCQKteRc9FI/KQWGOIyFYgkDC+gPR4snCcfRGKOIKIgSMQE31+f4OEYCZ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-actbookmarknew16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy6vERGRFRWVDQyNKSipAQCBMTGxKyurISChJSSlJyanHR2dIyKjPz+xISGhPz+BGxubMTCBHx+fPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVfICACwWieY1CibCCsrBkMb0zchTEcNYsIiYHiwIOdEAvigd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EAQJFxUTblwJGH9zGQgVGhUbbhxdG4wBHQQaCwaTb10emB8EBiAhInp8CSKYIw8kDRSfDiUmJ4xCIxMoKSoRJRMrJyy5uhMtLisTLCQkC8bHGBMj1daARgEjLyN03kPZc09FfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-appboxes16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMT+xAT+BASCBATCBMT+/AT+/ASChATCxPz+xPz+BISCBMTCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEEgZwrwYBCFqvhs3DNYXjChRlWBRjIRqGN4UuEUczMZxsDeXykdEsDQVVSLhQxhBCkVlmXA+KVHFYhFYOoHbMGN6pTQaW8YYiQmcG+q16a0+Zipw+4e9B/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-appbox16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+xISCBMTCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANECKoR6ys2IVqokF08yMTA1gwkYX5WQK5ma4VceTYPxXnBWdtY6+0834/Bowgzm6APWRQcH4TiMhPK2WYRiZWW7XK7/gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-appbrowser16:app app16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxONCROfCRKfKx6LNy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JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-appclock16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAALy+vAQCBPwCBMQCBIQCBISChPz+/MTCxCH5BAAAAAAALAAAAAAQABAAAANbCLHcrSLKOZcYmDSCsR1aUABAsXDDJwJGa5SBFwgaWxbCG3CWaBwG3C8Y67FawpYiNQscg65fsVkYuoAmJs1pBR522lQB6ILJLqHRwQQOZzYdZnw+dzruDIA/AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-appdate16:app app16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBPzerPyqXMRaBIQCBISChPz+/KSipMTCxPz+BMTCBPwCBPz+xPzCxMQCBISCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVxICCOQGCeJjkGwkC8RFEEavkax2G8dB0QuRyhhzoBg8MSYsncJXKJZIDZHCoWP1ogGIwGrtnSgUFmHLyNRHhrdpjRamnO/SYkromHdnxwnwkKVxByZW8DgQsQM2JcfwZXO0MBCZSVBgMuLzJaRZ0pfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-apppencil16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/IQCBMQCBPzCxAQCBPz+/MTCxISChDQyNKSipEQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARDEMhJZRBD1H2z3lMnjKCFjUJQimOgcmcbELCXzjXq0hV785WCQYcDFQjDXeloMByKG6YTAdwIDAlqSZJSVFeKLcUfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-appsheet16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAT+/Pz+/KSipPz+BAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANFCBDc7iqIKUW98WkWpx1DAIphR41ouWya+YVpoBAaCKtMoRfsyue8WGC3YxBii5+RtiEWmASFdDVs6GRTKfCa7UK6AH8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-apptool16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBISChGRmZMTCxKSipLS2tHx6fPz+/OTm5FxaXOzu7DQyNMzOzAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAReEMhAq7wYBDECKVSGBcbRfcEYauSZXgFCrEEXgDCSeIEyzKSXZoBYVCoJVIqBGByKu0Cy8QHxmgNngWCkGgqsGWFseu6oMApoXHAWhWnKrv0UqeYDe0YO10/6fhJ+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-apptools16:app app16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBExKTERCRAQ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SipAAAACH5BAEAAAEALAAAAAAQABAAAANOCLrMEUDIOUS9AFLLhx8LIRZjKYZmMRCkaChFLHty/AIiS3y6q+QtT49wq8VotRtQJGwRf6Zmrlj7DJLQXsupTJmeEIN4TB5nII20wp8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-cal5days16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANMCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiIdMmcec7jy53q81qP9OO5VMAj8RXTFWzOZW95HDLdEEM4LA4nIE0zgp/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-cal7days16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANPCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiwcp0fucsj873qvGMv5Jw2FIACUsW4WakGW1O046I05qmGYBhTC6TM5CGWuFPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-calappointment16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/MTCxPz+BISCBISChKSipAAAAAAAAAAAAAAA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xjb3IuY29tADs=
-connecting16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBISCBAQCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZbihUiz60FPnfaA0iBpBVGdHEYWxToEoSHBRHHM9AgSEQRcj+AYkYAJxIPKQFUJiOdTJQFIDU6dYzKKFhTCM+E5g4mXaDAyrlogEG+DGTecA7wsP8EcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-connectno16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBAQCBERCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARPEMhJq704axBEHoPUEdhQGMNYFuwxkKInDYjBniEnwMCQIIebSzXx/WwsFK+YMABZikWuYlrUCtZpEYv4WRPaHhb064YB41kCfJFSQBh/BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-connectyes16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/KSipDQyNMTCxMTGxISChFxaXMzGzAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZxCjgsAtDtUlCOA1gJQ4kl/IDatAoF7xxkS6GgEBr6jAobCyBX42SQBxMOx6A8MhiGASR8YDgrYsNEeJ0zaEGZY7uoH2oB6nOUwtbdLaVOeTUwo/8UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJv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dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-devfloppyunmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVCH5BAEAAAAALAAAAAAQABAAAARcEMgJQqCYBjFu1hxReN82EOhYGieaklJwHIjrqnGCJLqNWhUFYoFQCG1FgWXIIDIYNQKCoawQGI0swuFAbKsxgmDsfZjBkwDBsNM90Jot9A3DbBD0Dwiur9QnfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-devnetwork16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBISChPz+/Nza3ARaZESanCyKlARudARGTLy+vNzq7ARmbMTCxARufAROVMzOzKSipARyfOzq7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVmICAGZFmKQiACweCSBImq41AYB5IodLq2hwWO0ejRWDac48Gb/QKNqNRoqspmrVcAUuIJBANS8sBIFCORUgooPEh4J8B67NgdsVBp9C5XWfl9LRMTCyReX19hARNojWlWLH+AAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-devpc16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBISChHx+fPz+/AQCBAQC/AT+/AQCxAQChAT+BLy+vAR+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derhtml16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBERGRBQWFMzKzOzq7CwqLDw6NARqnAQ+XHR2dKyqrOTm5ExKTERCRHRydMTi7NTu9HS+1KSmpBweHDy67DyixHS61ITG3AxypByu7DxinBw+ZERmdIySjITC3ARypExOTDRurIR2RPTSdJyulEyGvBw+bFSyzJTK3LzKvPzivOTixNTChLSybGyCfCRSnBQqRASGtFyuzDw+PCRShPzy5OzerOTShKyaTEx6pCxerGRufBR+rOTezPTShNy6bER+1BxCfBQuRAxelFSixBw2VISq3GySrPTWlHyanIyitFSO3IymtCRujAxWhCRqlCQ6XGyWvNS2bFyGvDxuvCRSpLy+vMS+vGxqbFyO1GSi3EyO1FRaVCQuPLS2tDxyzKyWNFxaNCQyPGxubCxajERSVExKNJyenAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfZgACCAAECg4eIAAMEBQICBomDBwgJCgsEDA0BDg8BhwYQERKUDxOYDAyeghQVFhehGBmVlwwOqxobHB0eH6EfIAkPIYIiIyQlJhsnKBcpvrYiKissLS4vMDEyFjOvNAA1LDY3ODk6Oyc8PTIyFzQ1Jj42P0A6QTtCQ0REIEUORkdIkihZwsSekBhNnDyBciCKiSNSplDRUcWKkRhXCGDJYgiGli1cpuTocsILjytfFmRpACAGRTBhRogZgzHlAjKGWnIoY+bMgRgBDHRBo/LAIZoxuhwKatRPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-folderlocked16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQSFMzKzOTm5CwuLERCRARqnAQ+XHR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XZlbGNvci5jb20AOw==
-nav1rightarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxCtwoNHTmpvy3rxnnwQh1mUI52o6rCu6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-nav1uparrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PWwhxzmetzFpxnnxfRJbmufgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-nav2downarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+pq+EPXYpxUckoO3AjbF3dJwahllXe6AFgC8d+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-nav2leftarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pyxf5VohmSlsxmpjTzAHeN5ak6UHpqKRi2GpwvH3Q3eT64RcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3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CS61BSavAxefMzq9ETW3CSWtAwmPPz+/CzG1ITC3FyuxBSCnAQeLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZfQIBwSCwaj8hhQJAkDggFQxMQIBwQhUSyqlgwsFpjg6BwPCARySSstC4eFAqEURlYhoMLBpPRUDYcHXt7RgUeFB8gIU0BIoiKjAcUIwiLSQUkJRsmGIwJJwmEU6OkfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-playeject16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+py+0R3IFQUtruXVqn3kkWyIARR4rqKvoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-playend16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+py8Eb3ENRggrxjRnrVIWcIoYd91FaenysMU6wTNeLXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-playpause16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+py+1vgoxzyUCxrZd18ClfmIyVyJ1lqkHuC0N+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-playstart16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pyxudwlNyguqkqRZh3h0gl43hpoElqlHt9UKw7NG27BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-playstop16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+1vgpySUWpvXXqrHmSaeJEYhKYq6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textblock16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py40Bo5SOzRvrwlgrfnkJOIkPaaaJXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textbold16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIihI+py70BowPQ1HZpwNv212Vg9IGHmIjoWa4ey5DSRNd+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-textbottom16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIVhI+py+0Po5y0hYtzrkB7zH0fN/kFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-textcenter16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsnRkqtDnhu1zHfFSpjaY4PavgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-textitalic16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+0BgztwUmmjBXX3jE0auHHhM5Yq4xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textleft16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsgRoqr3Vnt102fFSJjUC6nlPoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-textmiddle16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIXhI+py+0PT5i01pisphjt3UmfFZYm5hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textmove16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsg2kfZvblXbwTg10WlA4rjyvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-textright16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+pm+EPIZstSrqsDhhv1ylfFE5jiYwX6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textsortdec16:text text16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BPwCBAQCBAQC/FxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM5CBDM+uKp8KiMsmaAs82dtnGeCHnNp4TjNQ4jq8CbDNOroIe3ROyEx2A4vOgkOBzgFxQ6Xa0owJ8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-textsortinc16:text text16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BAQC/AQCBPwCBFxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM4CAqxLm61CGBs81FMrQxgpnhKJlaXFJHUGg0w7DrDUmvtPQo8qyuEHoHW6hEVv+DQFvuhWtCFPwEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIlhI8Jwe2/AmpTynqPTXSqrnBM+I0kdmpmGmUp+K4nPMvhYx9+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-texttop16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIWhI9pwe2uYnq0yQtqxbz7D4biSIZ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-textunder16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pu+FxXoOIKpds1oBH7hlYxYxRCaIZ01lhJbHy9tTv7BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-viewchoose16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMzCLrcGlAs6UAYgwLdLtEcI4ygQo7VVp2oupGpG4vmaUVTemX523qlFcw0a4RqNlkx5k8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-viewdetailed16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMmCLrc/i1IAVkYg1Z1iRYUKCqitp1oikqBWV3ZOnhkWNagqu+qnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-viewicon16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCLrcG1AwGOQbw6qANeCEB3pCSZpO6pgowJZqLKuUGE0dnuEhf8IL1kz1shSHDX8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV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ly6vISChNza3FxaXKSipAAAACH5BAEAAAAALAAAAAAWABYAAAR4EMhJqwzY6omD+MNGdR8YilNZnug0qGzrqrL1lnV1fyJBVB6VQEMoGH4ADGwQkxQPBwMiKGA2J8VEAnq0tgiKg5aL/C7C2gTjKCM0zowDQ8tuNQznNL7cKzjOUQsNfER+gguIg19+Pm6ChBZFDmWNi5M5FIyYFHQRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs=
-connectno22:connect connect22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBPz+BMTCBERCBAQCBPz+/MTCxOTi5Nze3OTm5Ly6vNza3ISChFxaXKSipAAAACH5BAEAAAAALAAAAAAWABYAAARiEMhJq7046827/+AVCKE0Dh9BAGdaGISAToFGFMcBU+11I4hDYseSZQiKwwKoI/QwBIYiuFDCZseGdIlYEjUNg1SpY6w2N4cUIW6cjwW1lsFwo+MqgtZuw0/ydw5vH34lBhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-connectyes22:connect connect22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBKyirPz+/KymrOTi5KSipMzCzNza3OTe5Ozi7MzGzPTq9OTm5ISChMS+xFxaXNze3GReZIyCjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWLICCOZGmeaBkAQpoGg7C6JizTQT7CxPwOwFWgYPChYIXkIHC4uQKGAiKRKCyNpxxUUVViVYNFLkqtLo+DAkMMLXQPXwAy2WCTF4544FGtKuwPDhB6DnxuUm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block22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUWzvNzo33GfFl5jVlonlTrr1DbvFi9vjeeNUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textbold22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIxhI+py+0Powm0VnknjVkH2AEhE45LZ55Wqn6e65TsMc5eYosbksswubJIhsSiccgvAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
-textcenter22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUbz3Sh7yIWfFHKjVl4nmFrr1Lpr7LwkjeeIUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textitalic22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py+0P4wqUSlQvttrkDnyaOHIdeaGRupplAIauVM3xjeeOUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textleft22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+pyw0Bo5zB2UXz3Sp7yG2fFJajVjonmIor2TJvfL0wjecIXQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textright22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUfz3SZ7yIXdF4kWqZkbCqoMO7kXLC+wVOe6YRQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-text22:text text22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBBwaHAwKDBQSFLy+vLS2tJSWlBQWFKyqrFRSVCwqLDQyNNTS1GxqbFxaXJyanIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAVcICCOZGmKQSoMaZsShBsQBdAapHvgaIDUqUPJlRjSbAoT0fRDKgODRbF0PLUYjZO2F2Bst9evNix+dsvDlGKK5jraudQb7qbX6a2HEJ+ycyF+LRE8ZTI+fX5oGCEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-textunder22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIvhI+py+0PowmUnhpeVVnb1DkbCI1I2JhX+Z0sOr2cTHpwK7a4rUr+hAnufsTirwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-viewchoose22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz69PTq5Pz+/OzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq70466Cl+AMxBVwnFIVRAmQHCIeBrC1L3tQgJ/SaEbeeC1PLBHE2ybFI9A1HzstHEIK6YCmhDTmBybQaHYJn7QC5zKeytIQe1+pKNE6P2yMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-viewdetailed22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz+/Pz69PTq5AQCBOzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAQ+EMhJq7046817+MLQUQFRGMc4lQaSAkcMx3QltMmrDrSu/sCgEPgJhIiFk89DaL1qPRnlhsgBebWhdstVESIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw==
-viewicon22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz69PTq5AQ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3cuZGV2ZWxjb3IuY29tADs=
-viewtree22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz+/Pz69Pzu5PTq5OzaxBQOFOzKpFRWVFxWXOzexPTexCH5BAEAAAAALAAAAAAWABYAAARPEMhJq704g6A779kHCORAgNskFMYhakE8FkjyBcoWv+JwJItXaELYCTFHlCSpZKKcoB5jYHpOGgUadLKbIRw3jhEzQDyCSuI4zW673yhDBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7
diff --git a/ext/tk/sample/tkextlib/ICONS/viewIcons.rb b/ext/tk/sample/tkextlib/ICONS/viewIcons.rb
deleted file mode 100644
index 7ed3c267e4..0000000000
--- a/ext/tk/sample/tkextlib/ICONS/viewIcons.rb
+++ /dev/null
@@ -1,330 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# viewIcons.rb
-#
-# -- Display icons from icon library.
-#
-# -- Copy the clicked icon data (command string of creating
-# a TkPhotoImage instance) to the clipboard.
-#
-require 'tk'
-require 'tkextlib/ICONS'
-
-class ViewIcons
- #####################################
- private
- #####################################
- def _create_controls
- @controls = base = TkFrame.new
- columns = TkFrame.new(base)
- line1 = TkFrame.new(base, :height=>2, :borderwidth=>1, :relief=>:sunken)
- line2 = TkFrame.new(base, :height=>2, :borderwidth=>1, :relief=>:sunken)
-
- lbl_library = TkLabel.new(base, :font=>@boldfont, :text=>'Library')
- lbl_groups = TkLabel.new(base, :font=>@boldfont, :text=>'Groups')
- lbl_columns = TkLabel.new(base, :font=>@boldfont, :text=>'Columns')
-
- ent_library = TkEntry.new(base, :width=>50, :textvariable=>@library)
- ent_groups = TkEntry.new(base, :width=>50, :textvariable=>@groups)
-
- btn_browse = TkButton.new(base, :text=>'Browse',
- :command=>method(:select_icons))
- btn_view = TkButton.new(base, :text=>'View',
- :command=>method(:display_icons))
- btn_exit = TkButton.new(base, :text=>'Exit', :command=>proc{exit})
-
- @column_btns = {}
- 6.step(20, 2){|i|
- @column_btns[i] = TkButton.new(columns,
- :text=>i.to_s, :width=>2,
- :command=>proc{set_columns(i)}
- ).pack(:side=>:left)
- }
- @column_btns[@columns][:relief] = :sunken
-
- lbl_library.grid(:row=>0, :column=>0, :padx=>4)
- ent_library.grid(:row=>0, :column=>1)
- btn_browse.grid(:row=>0, :column=>2, :padx=>4, :pady=>2, :sticky=>:ew)
-
- line1.grid(:row=>1, :column=>0, :pady=>2, :columnspan=>3, :sticky=>:ew)
-
- lbl_groups.grid(:row=>2, :column=>0, :padx=>4)
- ent_groups.grid(:row=>2, :column=>1)
- btn_view.grid(:row=>2, :column=>2, :padx=>4, :pady=>2, :sticky=>:ew)
-
- line1.grid(:row=>3, :column=>0, :pady=>2, :columnspan=>3, :sticky=>:ew)
-
- lbl_columns.grid(:row=>4, :column=>0, :padx=>4)
- columns.grid(:row=>4, :column=>1, :padx=>2, :sticky=>:ew)
- btn_exit.grid(:row=>4, :column=>2, :padx=>4, :pady=>2, :sticky=>:ew)
-
- base.pack
-
- ent_library.bind('Return', method(:display_icons), '')
- ent_groups.bind('Return', method(:display_icons), '')
- end
-
- def _create_display
- base = TkFrame.new(:borderwidth=>2, :relief=>:sunken)
-
- @icons_window = icons = TkCanvas.new(base)
- xscr = icons.xscrollbar(TkScrollbar.new(base))
- yscr = icons.yscrollbar(TkScrollbar.new(base))
-
- icons.grid(:row=>0, :column=>0, :sticky=>:news)
- yscr.grid(:row=>0, :column=>1, :sticky=>:ns)
- xscr.grid(:row=>1, :column=>0, :sticky=>:ew)
- base.grid_columnconfigure(0, :weight=>1)
- base.grid_columnconfigure(1, :weight=>0)
- base.grid_rowconfigure(0, :weight=>1)
- base.grid_rowconfigure(1, :weight=>0)
- # yscr.pack(:side=>:right, :fill=>:y)
- # xscr.pack(:side=>:bottom, :fill=>:x)
- # icons.pack(:side=>:left, :fill=>:both, :expand=>true)
-
- @icons_layout = TkFrame.new(icons).pack
- TkcWindow.create(icons, 0, 0, :anchor=>:nw, :window=>@icons_layout)
- @icons_layout.bind('Configure', method(:layout_resize), '')
-
- base.pack(:expand=>true, :fill=>:both)
- end
-
- def _create_info_window
- @info_window = TkToplevel.new(:background=>'lightyellow', :borderwidth=>1,
- :relief=>:solid){|w|
- lbl_name = TkLabel.new(w, :text=>'Name', :background=>'lightyellow',
- :font=>@boldfont, :justify=>:left)
- lbl_grps = TkLabel.new(w, :text=>'Groups', :background=>'lightyellow',
- :font=>@boldfont, :justify=>:left)
- lbl_type = TkLabel.new(w, :text=>'Type', :background=>'lightyellow',
- :font=>@boldfont, :justify=>:left)
- lbl_size = TkLabel.new(w, :text=>'Size', :background=>'lightyellow',
- :font=>@boldfont, :justify=>:left)
-
- lbl_name.grid(:row=>0, :column=>0, :sticky=>:w)
- lbl_grps.grid(:row=>1, :column=>0, :sticky=>:w)
- lbl_type.grid(:row=>2, :column=>0, :sticky=>:w)
- lbl_size.grid(:row=>3, :column=>0, :sticky=>:w)
-
- @name = TkLabel.new(w, :background=>'lightyellow', :justify=>:left)
- @grps = TkLabel.new(w, :background=>'lightyellow', :justify=>:left)
- @type = TkLabel.new(w, :background=>'lightyellow', :justify=>:left)
- @size = TkLabel.new(w, :background=>'lightyellow', :justify=>:left)
-
- @name.grid(:row=>0, :column=>1, :sticky=>:w)
- @grps.grid(:row=>1, :column=>1, :sticky=>:w)
- @type.grid(:row=>2, :column=>1, :sticky=>:w)
- @size.grid(:row=>3, :column=>1, :sticky=>:w)
-
- def name(txt)
- @name['text'] = txt
- end
- def groups(txt)
- @grps['text'] = txt
- end
- def type(txt)
- @type['text'] = txt
- end
- def size(txt)
- @size['text'] = txt
- end
-
- overrideredirect(true)
- withdraw
- }
- end
-
- def initialize(init_path = Tk::LIBRARY)
- init_path = Tk::LIBRARY unless init_path
- init_path = File.expand_path(init_path)
- if File.directory?(init_path)
- @initial_dir = init_path
- @initial_file = 'tkIcons'
- else
- @initial_dir = File.dirname(init_path)
- @initial_file = File.basename(init_path)
- end
-
- if Tk::PLATFORM['platform'] == 'unix'
- TkOption.add('*HighlightThickness', 0)
- end
-
- @columns = 14
- @command = ""
-
- @delay_timer = nil
-
- dummy = TkLabel.new
- @font = dummy.font
- @boldfont = TkFont.new(@font, :weight=>:bold)
- @icons = {}
- @icon_name = {}
- @icon_info = {}
-
- @library = TkVariable.new(File.join(@initial_dir, @initial_file))
- @groups = TkVariable.new('*')
-
- _create_controls
-
- _create_display
-
- _create_info_window
-
- Tk.root.title('viewIcons')
- layout_resize
- Tk.root.resizable(false, true)
-
- display_icons
- end
-
- def init_info(item, name)
- @icon_name[item] = name
-
- item.bind('Button-1', method(:clip_info), '%W')
- item.bind('Enter', method(:delay_info), '%W')
- item.bind('Leave', method(:cancel_info), '')
- end
-
- def delay_info(item)
- cancel_info
- @delay_timer = TkTimer.new(200, 1, proc{ show_info(item) }).start
- end
-
- def cancel_info
- if @delay_timer
- @delay_timer.cancel
- @delay_timer = nil
- end
- @info_window.withdraw
- end
-
- def show_info(item)
- name, groups, type, size = @icon_info[@icon_name[item]]
- @info_window.name(name)
- @info_window.groups(groups)
- @info_window.type(type)
- @info_window.size(size)
-
- info_x = item.winfo_rootx + 10
- info_y = item.winfo_rooty + item.winfo_height
-
- @info_window.geometry("+#{info_x}+#{info_y}")
- @info_window.deiconify
-
- @info_window.raise
-
- @delay_timer = nil
- end
-
- def primary_transfer(offset, max_chars)
- @command
- end
-
- def lost_selection
- @command = ""
- end
-
- def clip_info(item)
- name = @icon_name[item]
- data_width = 60
-
- cmd = "#{name} = TkPhotoImage.new(:data=><<'EOD')\n"
-
- icon_data = Tk::ICONS.query(name, :file=>@library.value, :items=>'d')[0][0]
-
- icon_data.scan(/.{1,#{data_width}}/m){|s| cmd << ' ' << s << "\n"}
-
- cmd << "EOD\n"
-
- @command = cmd
-
- TkClipboard.clear
- TkClipboard.append(@command)
-
- if Tk::PLATFORM['platform'] == 'unix'
- TkSelection.handle(Tk.root, method(:primary_transfer),
- :selection=>'PRIMARY')
- TkSelection.set_owner(Tk.root, :selection=>'PRIMARY',
- :command=>method(:lost_selection))
- end
-
- Tk.bell
- end
-
- def layout_resize
- Tk.update
- bbox = @icons_window.bbox('all')
- width = @controls.winfo_width - @icons_window.yscrollbar.winfo_width - 8
-
- @icons_window.configure(:width=>width, :scrollregion=>bbox,
- :xscrollincrement=>'0.1i',
- :yscrollincrement=>'0.1i')
- end
-
- def select_icons
- new_lib = Tk.getOpenFile(:initialdir=>@initial_dir,
- :initialfile=>'tkIcons',
- :title=>'Select Icon Library',
- :filetypes=>[
- ['Icon Libraries', ['tkIcons*']],
- ['All Files', ['*']]
- ])
-
- @library.value = new_lib if new_lib.length != 0
- display_icons
- end
-
- def display_icons
- column = 0
- limit = @columns - 1
- row = 0
-
- unless File.exist?(@library.value)
- Tk.messageBox(:icon=>'warning', :message=>'File does not exist',
- :title=>'viewIcons')
- return
- end
-
- cursor = Tk.root[:cursor]
- Tk.root[:cursor] = 'watch'
-
- Tk::ICONS.delete(@icons)
-
- @icons_frame.destroy if @icons_frame
- @icons_frame = TkFrame.new(@icons_layout).pack
-
- @icons = Tk::ICONS.create(:file=>@library.value, :group=>@groups.value)
-
- Tk::ICONS.query(:file=>@library.value, :group=>@groups.value).each{|inf|
- name = inf[0]
- @icon_info[name] = inf
-
- lbl = TkLabel.new(@icons_frame, :image=>"::icon::#{name}")
- lbl.grid(:column=>column, :row=>row, :padx=>3, :pady=>3)
- # lbl.grid_columnconfigure column
-
- init_info(lbl, name)
-
- if column == limit
- column = 0
- row += 1
- else
- column += 1
- end
- }
-
- Tk.root[:cursor] = cursor
- end
-
- def set_columns(columns)
- @columns = columns
- 6.step(20, 2){|i| @column_btns[i][:relief] = :raised }
- @column_btns[@columns][:relief] = :sunken
- display_icons
- end
-end
-
-ViewIcons.new(ARGV[0])
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/barchart5.rb b/ext/tk/sample/tkextlib/blt/barchart5.rb
deleted file mode 100644
index f818ffc375..0000000000
--- a/ext/tk/sample/tkextlib/blt/barchart5.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/blt'
-
-load File.join(File.dirname(File.expand_path(__FILE__)),
- 'scripts', 'stipples.rb')
-
-TkOption.add('*graph.x.Title', 'X Axis Label')
-TkOption.add('*graph.y.Title', 'Y Axis Label')
-TkOption.add('*graph.title', 'A Simple Barchart')
-TkOption.add('*graph.x.Font', 'Times 10')
-TkOption.add('*graph.Element.Relief', :raised)
-
-visual = Tk.root.winfo_screenvisual
-if visual != 'staticgray' && visual != 'grayscale'
- TkOption.add('*graph.LineMarker.color', 'yellow')
- TkOption.add('*graph.Element.Background', 'white')
- TkOption.add('*graph.Legend.activeForeground', 'pink')
- TkOption.add('*print.background', 'yellow')
- TkOption.add('*quit.background', 'red')
- TkOption.add('*graph.background', 'palegreen')
- TkOption.add('*graph.plotBackground', 'lightblue')
-end
-
-htext = Tk::BLT::Htext.new(:widgetname=>'.htext', :text=><<EOD)
- This is an example of the barchart widget. The barchart has
- many components; x and y axis, legend, crosshairs, elements, etc.
- To create a postscript file "bar.ps", press the %%
-
- ruby {
- b = TkButton.new(Tk::BLT::Htext::Htext_Widget.window,
- :widgetname=>'print', :text=>'Print',
- :command=>proc{
- $graph.postsript(:output=>'bar.ps')
- })
- Tk::BLT::Htext::Htext_Widget.window.append(b)
- }
-
-%% button.
-%%
-
- ruby {
- $graph = Tk::BLT::Barchart.new(:widgetname=>'.htext.graph',
- :relief=>:raised, :borderwidth=>2)
- $graph.xaxis_configure(:rotate=>90, :stepsize=>0)
- Tk::BLT::Htext::Htext_Widget.window.append($graph,
- :fill=>:both, :padx=>4)
- }
-
-%%
- Hit the %%
-
- ruby {
- b = TkButton.new(Tk::BLT::Htext::Htext_Widget.window,
- :widgetname=>'quit', :text=>'Quit',
- :command=>proc{ exit })
- Tk::BLT::Htext::Htext_Widget.window.append(b)
- }
-
-%% button when you've seen enough.%%
-
- ruby {
- l = TkLabel.new(Tk::BLT::Htext::Htext_Widget.window, :bitmap=>'BLT')
- Tk::BLT::Htext::Htext_Widget.window.append(l, :padx=>20)
- }
-
-%%
-EOD
-
-names = %w(One Two Three Four Five Six Seven Eight)
-if visual == 'staticgray' || visual == 'grayscale'
- fgcolors = %w(white white white white white white white white)
- bgcolors = %w(black black black black black black black black)
-else
- fgcolors = %w(yellow orange red magenta purple blue cyan green)
- bgcolors = %w(yellow4 orange4 red4 magenta4 purple4 blue4 cyan4 green4)
-end
-
-numColors = names.length
-
-Tk::TCL_PRECISION.value = 15
-
-x = Tk::BLT::Vector.new
-y = Tk::BLT::Vector.new
-x.seq(-5.0, 5.0, 0.2)
-y.expr("sin(#{x})")
-barWidth = 0.19
-
-$graph.element_create('sin', :relief=>:raised, :borderwidth=>1,
- :x=>x, :y=>y, :barwidth=>barWidth)
-
-Tk::BLT::Table.add(Tk.root, htext, :fill=>:both)
-
-Tk.root.minsize(0, 0)
-
-Tk::BLT.zoom_stack($graph)
-Tk::BLT.crosshairs($graph)
-Tk::BLT.active_legend($graph)
-Tk::BLT.closest_point($graph)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/calendar.rb b/ext/tk/sample/tkextlib/blt/calendar.rb
deleted file mode 100644
index c7989cec36..0000000000
--- a/ext/tk/sample/tkextlib/blt/calendar.rb
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/blt'
-
-require 'date'
-
-dir = File.join(File.dirname(File.expand_path(__FILE__)), 'images')
-file = File.join(dir, 'chalk.gif')
-active = File.join(dir, 'rain.gif')
-
-texture1 = TkPhotoImage.new(:file=>file)
-texture2 = TkPhotoImage.new(:file=>active)
-
-TkOption.add('*Tile', texture1)
-
-TkOption.add('*HighlightThickness', 0)
-TkOption.add('*calendar.weekframe*Tile', texture2)
-TkOption.add('*Calendar.Label.borderWidth', 0)
-TkOption.add('*Calendar.Label.relief', :sunken)
-TkOption.add('*Calendar.Frame.borderWidth', 2)
-TkOption.add('*Calendar.Frame.relief', :raised)
-TkOption.add('*Calendar.Label.font', 'Helvetica 11')
-TkOption.add('*Calendar.Label.foreground', 'navyblue')
-TkOption.add('*button.foreground', 'navyblue')
-TkOption.add('*background', 'grey85')
-TkOption.add('*Label.ipadX', 200)
-
-TkOption.add('*tile', texture2)
-
-class BLT_Calendar_sample
- @@monthInfo = [
- nil, # dummy
- ['January', 31],
- ['February', 28],
- ['March', 31],
- ['April', 30],
- ['May', 31],
- ['June', 30],
- ['July', 31],
- ['August', 31],
- ['September', 30],
- ['October', 31],
- ['November', 30],
- ['December', 31]
- ]
-
- @@abbrDays = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ]
-
- def initialize()
- today = Date.today
-
- if TkComm.bool(Tk.info(:commands, '.calendar'))
- Tk.destroy('.calendar')
- end
- cal = Tk::BLT::Tile::Frame.new(:widgetname=>'.calendar',
- :classname=>'Calendar',
- :width=>'3i', :height=>'3i')
-
- mon = Tk::BLT::Tile::Label.new(cal, :font=>'Courier 14 bold',
- :text=>"#{@@monthInfo[today.month][0]} " +
- "#{today.year}")
- Tk::BLT::Table.add(cal, mon, [1, 0], :cspan=>7, :pady=>10)
-
- week_f = Tk::BLT::Tile::Frame.new(cal, :widgetname=>'weekframe',
- :relief=>:sunken, :borderwidth=>1)
- Tk::BLT::Table.add(cal, week_f, [2, 0], :columnspan=>7, :fill=>:both)
-
- @@abbrDays.each_with_index{|dayName, idx|
- Tk::BLT::Table.add(cal,
- Tk::BLT::Tile::Label.new(cal, :text=>dayName,
- :font=>'Helvetica 12'),
- [2, idx], :pady=>2, :padx=>2)
- }
-
- Tk::BLT::Table.itemconfigure(cal, 'c*', 'r2', :pad=>4)
-
- numDays = @@monthInfo[today.month][1]
- week = 0
- cnt = 1
-
- wkday = today.wday - ((today.day - 1) % 7)
- wkday += 7 if wkday < 0
-
- while cnt <= numDays
- Tk::BLT::Table.add(cal,
- Tk::BLT::Tile::Label.new(cal, :text=>cnt){
- self.configure(:borderwidth=>1,
- :relief=>:sunken) if cnt == today.day
- },
- [week+3, wkday], :fill=>:both, :ipadx=>10, :ipady=>4)
- cnt += 1
- wkday += 1
- if wkday == 7
- week += 1
- wkday = 0
- end
- end
-
- Tk::BLT::Tile::Frame.new(cal, :borderwidth=>1, :relief=>:sunken){|f|
- Tk::BLT::Table.add(f,
- Tk::BLT::Tile::Button.new(f, :widgetname=>'button',
- :command=>proc{exit},
- :borderwidth=>2,
- :text=>'Quit'),
- :padx=>4, :pady=>4)
- Tk::BLT::Table.add(cal, f, [week+4, 5], :cspan=>2, :pady=>4)
- }
-
- Tk::BLT::Table.add(Tk.root, cal, :fill=>:both)
- Tk::BLT::Table.itemconfigure(cal, 'r0', :resize=>:none)
- end
-end
-
-BLT_Calendar_sample.new
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/graph6.rb b/ext/tk/sample/tkextlib/blt/graph6.rb
deleted file mode 100644
index 26baa527ef..0000000000
--- a/ext/tk/sample/tkextlib/blt/graph6.rb
+++ /dev/null
@@ -1,2223 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/blt'
-
-Tk::TCL_PRECISION.value = 15
-
-[
- ['*Graph.Width', '10i'],
- ['*Graph.leftMargin', '.75i'],
- ['*Graph.Height', '6i'],
- ['*Graph.plotBackground', 'black'],
- ['*LineMarker.color', 'white'],
- ['*LineMarker.Dashes', 5],
- ['*TextMarker.foreground', 'white'],
- ['*TextMarker.Background', ''],
-
- ['*Graph.x.hide', true],
- ['*Graph.x.title', ''],
- ['*Graph.y.rotate', 90],
- # ['*Graph.y.stepSize', 2.0],
- ['*Graph.title', ''],
- ['*graph.Title', 'Example s27'],
- ['*graph.x.hide', false],
- ['*graph.topMargin', 0],
- ['*graph.bottomMargin', 0],
- ['*x.Title', 'Time'],
- ['*y.Title', 'Signals'],
- ['*Pixels', 1],
-
- ['*Reduce', 0.5],
- ['*bufferElements', false],
-
- ['*Element.color', 'green4'],
- ['*Element.ScaleSymbols', true],
- ['*Element.Color', 'grey70'],
- ['*Element.Symbol', :none],
- ['*Element.LineWidth', 1],
- # ['*Element.Smooth', :natural],
- ['*Element.Smooth', :catrom],
-
- ['*activeLine.LineWidth', 2],
- ['*activeLine.Color', 'white'],
- ['*activeLine.Color', 'green1'],
-
- # ['*Legend.Hide', true],
- ['*Legend.Position', :right],
- ['*Legend.Relief', :flat],
- ['*Legend.activeRelief', :sunken],
- ['*Legend.borderWidth', 2],
- #['*Legend.Font', '-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*'],
- ['*Legend.Font', 'Helvetica -10'],
- ['*Grid.hide', false],
- ['*Grid.dashes', [1, 5]],
-
- # ['*foreground', 'white'],
- ['*zoomOutline.outline', 'yellow'],
-].each{|k, v| TkOption.add(k, v)}
-
-##############################
-
-class BLT_Graph_Demo
- def initialize
- @graph = Tk::BLT::Graph.new(:widgetname=>'graph')
-
- @root = Tk.root
- @root.minsize(0, 0)
-
- _set_vectors()
- (1..39).each{|i| @graph.element_create("V#{i}", :x=>@x, :y=>@v[i])}
-
- @top = Tk::BLT::Tile::Toplevel.new
-=begin
- legend = Tk::BLT::Graph.new(@top, :widgetname=>'legend',
- :without_creating=>true)
- @graph.legend_configure(:position=>legend)
-=end
- # legend = @graph.legend_window_create(@top, :widgetname=>'legend')
- legend = @graph.legend_window_create(@top)
- legend.pack(:fill=>:both, :expand=>true)
-
- Tk::BLT::Table.add(@root, @graph, [0,0], :fill=>:both)
-
- @quit_btn = Tk::BLT::Tile::Button.new(:text=>' quit ', :background=>'red',
- :command=>proc{exit})
- Tk::BLT::Table.add(@root, @quit_btn, [1,0], :anchor=>:e, :padx=>10)
-
- @graph.zoom_stack
- @graph.crosshairs
- @graph.closest_point
- @graph.print_key
-
- @graph.legend_bind(:all, 'ButtonRelease-1',
- proc{|w| highlightTrace(w)}, '%W')
- @graph.legend_bind(:all, 'ButtonRelease-3',
- proc{|w|
- w.legend_deactivate('*')
- active = w.element_activate
- w.element_deactivate(*active)
- }, '%W')
- end
-
- private
-
- def _set_vectors
- @x = Tk::BLT::Vector.new(:variable=>'')
- @v = []
- (1..39).each{|i| @v[i] = Tk::BLT::Vector.new(:variable=>'')}
-
- @x.set(<<-'EOD')
- 0 1e-10 2e-10 3e-10 4e-10 5e-10 6e-10 7e-10 8e-10 9e-10
- 1e-09 1.1e-09 1.2e-09 1.3e-09 1.4e-09 1.5e-09 1.6e-09 1.7e-09
- 1.8e-09 1.9e-09 2e-09 2.1e-09 2.2e-09 2.3e-09 2.4e-09 2.5e-09
- 2.6e-09 2.7e-09 2.8e-09 2.9e-09 3e-09 3.1e-09 3.2e-09 3.3e-09
- 3.4e-09 3.5e-09 3.6e-09 3.7e-09 3.8e-09 3.9e-09 4e-09 4.1e-09
- 4.2e-09 4.3e-09 4.4e-09 4.5e-09 4.6e-09 4.7e-09 4.8e-09
- 4.9e-09 5e-09 5.1e-09 5.2e-09 5.3e-09 5.4e-09 5.5e-09 5.6e-09
- 5.7e-09 5.8e-09 5.9e-09 6e-09 6.1e-09 6.2e-09 6.3e-09 6.4e-09
- 6.5e-09 6.6e-09 6.7e-09 6.8e-09 6.9e-09 7e-09 7.1e-09 7.2e-09
- 7.3e-09 7.4e-09 7.5e-09 7.6e-09 7.7e-09 7.8e-09 7.9e-09
- 8e-09 8.1e-09 8.2e-09 8.3e-09 8.4e-09 8.5e-09 8.6e-09 8.7e-09
- 8.8e-09 8.9e-09 9e-09 9.1e-09 9.2e-09 9.3e-09 9.4e-09 9.5e-09
- 9.6e-09 9.7e-09 9.8e-09 9.9e-09 1e-08 1.01e-08 1.02e-08
- 1.03e-08 1.04e-08 1.05e-08 1.06e-08 1.07e-08 1.08e-08 1.09e-08
- 1.1e-08 1.11e-08 1.12e-08 1.13e-08 1.14e-08 1.15e-08 1.16e-08
- 1.17e-08 1.18e-08 1.19e-08 1.2e-08 1.21e-08 1.22e-08 1.23e-08
- 1.24e-08 1.25e-08 1.26e-08 1.27e-08 1.28e-08 1.29e-08 1.3e-08
- 1.31e-08 1.32e-08 1.33e-08 1.34e-08 1.35e-08 1.36e-08 1.37e-08
- 1.38e-08 1.39e-08 1.4e-08 1.41e-08 1.42e-08 1.43e-08 1.44e-08
- 1.45e-08 1.46e-08 1.47e-08 1.48e-08 1.49e-08 1.5e-08 1.51e-08
- 1.52e-08 1.53e-08 1.54e-08 1.55e-08 1.56e-08 1.57e-08 1.58e-08
- 1.59e-08 1.6e-08 1.61e-08 1.62e-08 1.63e-08 1.64e-08 1.65e-08
- 1.66e-08 1.67e-08 1.68e-08 1.69e-08 1.7e-08 1.71e-08 1.72e-08
- 1.73e-08 1.74e-08 1.75e-08 1.76e-08 1.77e-08 1.78e-08 1.79e-08
- 1.8e-08 1.81e-08 1.82e-08 1.83e-08 1.84e-08 1.85e-08 1.86e-08
- 1.87e-08 1.88e-08 1.89e-08 1.9e-08 1.91e-08 1.92e-08 1.93e-08
- 1.94e-08 1.95e-08 1.96e-08 1.97e-08 1.98e-08 1.99e-08 2e-08
- 2.01e-08 2.02e-08 2.03e-08 2.04e-08 2.05e-08 2.06e-08 2.07e-08
- 2.08e-08 2.09e-08 2.1e-08 2.11e-08 2.12e-08 2.13e-08 2.14e-08
- 2.15e-08 2.16e-08 2.17e-08 2.18e-08 2.19e-08 2.2e-08 2.21e-08
- 2.22e-08 2.23e-08 2.24e-08 2.25e-08 2.26e-08 2.27e-08 2.28e-08
- 2.29e-08 2.3e-08 2.31e-08 2.32e-08 2.33e-08 2.34e-08 2.35e-08
- 2.36e-08 2.37e-08 2.38e-08 2.39e-08 2.4e-08 2.41e-08 2.42e-08
- 2.43e-08 2.44e-08 2.45e-08 2.46e-08 2.47e-08 2.48e-08 2.49e-08
- 2.5e-08 2.51e-08 2.52e-08 2.53e-08 2.54e-08 2.55e-08 2.56e-08
- 2.57e-08 2.58e-08 2.59e-08 2.6e-08 2.61e-08 2.62e-08 2.63e-08
- 2.64e-08 2.65e-08 2.66e-08 2.67e-08 2.68e-08 2.69e-08 2.7e-08
- 2.71e-08 2.72e-08 2.73e-08 2.74e-08 2.75e-08 2.76e-08 2.77e-08
- 2.78e-08 2.79e-08 2.8e-08 2.81e-08 2.82e-08 2.83e-08 2.84e-08
- 2.85e-08 2.86e-08 2.87e-08 2.88e-08 2.89e-08 2.9e-08 2.91e-08
- 2.92e-08 2.93e-08 2.94e-08 2.95e-08 2.96e-08 2.97e-08 2.98e-08
- 2.99e-08 3e-08 3.01e-08 3.02e-08 3.03e-08 3.04e-08 3.05e-08
- 3.06e-08 3.07e-08 3.08e-08 3.09e-08 3.1e-08 3.11e-08 3.12e-08
- 3.13e-08 3.14e-08 3.15e-08 3.16e-08 3.17e-08 3.18e-08 3.19e-08
- 3.2e-08 3.21e-08 3.22e-08 3.23e-08 3.24e-08 3.25e-08 3.26e-08
- 3.27e-08 3.28e-08 3.29e-08 3.3e-08 3.31e-08 3.32e-08 3.33e-08
- 3.34e-08 3.35e-08 3.36e-08 3.37e-08 3.38e-08 3.39e-08 3.4e-08
- 3.41e-08 3.42e-08 3.43e-08 3.44e-08 3.45e-08 3.46e-08 3.47e-08
- 3.48e-08 3.49e-08 3.5e-08 3.51e-08 3.52e-08 3.53e-08 3.54e-08
- 3.55e-08 3.56e-08 3.57e-08 3.58e-08 3.59e-08 3.6e-08
- EOD
-
- @v[1].set(<<-'EOD')
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5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 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 2.13718e-14 0 0 0 0 0 0 0
- 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- 0 0 0 0
- EOD
-
- @v[7].set(<<-'EOD')
- 5 5.16904 4.84159 3.34542 0.317102 0.103304 0.0275721 0.0221534
- 0.017689 0.0142639 0.0113974 0.00918238 0.00742541 0.00616602
- 0.00481195 0.00397049 -0.0659889 -0.025671 0.165495 0.986891
- 3.05229 4.55511 4.91611 4.98192 4.99428 4.99833 4.99095
- 4.97295 4.95493 4.93428 4.90723 4.94799 4.98584 4.99566
- 4.99813 4.99907 4.99947 4.99965 4.99976 4.99984 4.99989
- 4.99992 4.99994 4.99996 4.99998 5.00002 5.00006 5.00002
- 4.99996 4.99994 4.99999 5.00003 5.00002 5 4.99997 4.99997
- 4.99997 4.99997 4.99997 4.99996 4.99997 4.99997 4.99998
- 4.99998 4.99999 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99998 4.99998 4.99998 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5.16575
- 4.69986 2.43862 0.0230224 0.035229 -0.0210607 -0.0292766
- -0.0172693 -0.00271479 -0.000912251 -0.000349106 -0.000116866
- -4.24733e-05 -1.39536e-05 -3.01179e-05 -0.0657192 -0.0204835
- 0.183378 1.07181 3.118 4.46472 4.84158 4.94795 4.98173 4.99236
- 4.99762 5.01939 5.0433 5.05332 5.04959 5.03955 5.02851 5.02052
- 5.01422 5.00965 5.00631 5.00405 5.00248 5.00083 5.00012
- 5.00209 5.00387 5.00347 4.99917 4.99213 4.98411 4.97521
- 4.96332 4.94601 4.9304 4.94633 4.97936 4.99264 4.99685 4.99857
- 4.99925 4.99954 4.9997 4.99973 4.9997 4.99973 4.99979 4.99983
- 4.99986 4.99988 4.9999 4.9999 4.99992 4.99993 4.99994 4.99995
- 4.99996 4.99996 4.99997 4.99997 4.99998 4.99998 4.99998
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002
- 5.00002 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 5 5 5.14242 4.76101 3.16003 0.299374
- 0.0645506 -0.000498424 -2.45108e-05 -2.27986e-05 -5.24401e-05
- -4.9884e-05 -4.92491e-05 -2.93354e-05 -3.21402e-05 -2.11851e-05
- -3.37925e-05 -0.0657892 -0.020563 0.182582 1.06058 3.12484
- 4.46552 4.84146 4.95102 4.98556 4.99472 4.99806 4.99909
- 4.99955 4.99976 4.99994 4.99992 5.00029 4.99967 4.99849
- 4.99736 4.99884 5.00099 5.00377 5.00215 4.99994 4.99893
- 4.99788 4.99862 5.00055 5.00134 5.00127 5.00073 5.00039
- 5.00018 5.00006 5.00001 4.99985 5.00026 5.00018 5.00003
- 4.99981 4.99985 4.99987 4.99985 4.99982 4.99982 4.99982
- 4.99983 4.99985 4.99987 4.99989 4.99991 4.99992 4.99994
- 4.99995 4.99995 4.99994 4.99994 4.99996 4.99999 5.00002
- 5.00008 5.00009 5.00006 5.00001 5 4.99999 4.99998 4.99997
- 4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 4.99999
- 4.99999 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99998 4.99998
- 4.99998
- EOD
-
- @v[8].set(<<-'EOD')
- 5 5.03758 5.04711 4.96911 4.20882 3.96295 4.01117 4.15521
- 4.2967 4.42274 4.5295 4.6176 4.69014 4.74831 4.7966 4.83537
- 4.80526 4.787 4.79295 4.88588 5.08978 5.15615 5.10778 5.07718
- 5.06652 5.08225 4.9744 4.52977 3.77452 2.69426 1.15294 0.245509
- 0.0981544 0.0567527 0.0367487 0.0252578 0.0180599 0.0133837
- 0.0101497 0.0078616 0.00620186 0.00499056 0.0041027 0.00344223
- 0.00295808 0.00260089 0.00229887 0.00200817 0.00176397 0.00160116
- 0.00147381 0.00134645 0.00125029 0.00116043 0.00107371 0.00101981
- 0.000965921 0.000912028 0.000858135 0.000804242 0.000761669
- 0.00072672 0.000691771 0.000656823 0.000621874 0.000588722
- 0.00057041 0.000552098 0.000533785 0.000515473 0.000497162
- 0.00047885 0.000460537 0.000442226 0.000423914 0.000405601
- 0.000388399 0.000378694 0.000368989 0.000359284 0.00034958
- 0.000339875 0.00033017 0.000320465 0.00031076 0.000301055
- 0.00029135 0.000282207 0.000276247 0.000270287 0.000264327
- 0.000258367 0.000252407 0.000246447 0.000240487 0.000234527
- 0.000228567 0.000222607 0.000217086 0.000213696 0.000210307
- 0.000206918 0.000203528 0.000200139 0.00019675 0.00019336
- 0.000189971 0.000186582 0.000183192 0.000179803 0.000176414
- 0.000173025 0.000169635 0.000166246 0.000162857 0.000159467
- 0.000156078 0.000152689 0.000149299 0.00014591 0.00014255
- 0.0316021 0.163272 0.348732 0.603651 0.35745 0.135965 0.0707354
- 0.0314595 0.0201047 0.00994945 0.00389601 0.00138839 0.00060778
- 0.000329648 0.000492396 -0.0732035 -0.0844077 -0.0789062
- -0.0390837 0.0197559 0.0183094 -0.00180099 -0.0189565 -0.0424144
- -0.0735904 -0.0892423 0.285039 1.13702 2.10809 2.95826 3.60164
- 4.0435 4.35771 4.57254 4.71769 4.81329 4.87534 4.91487 4.94264
- 4.97375 5.01526 5.06517 5.10154 5.06259 4.89005 4.5787 4.12226
- 3.46151 2.49023 1.2586 0.32725 0.116753 0.0701865 0.0455509
- 0.0286914 0.0178176 0.0117599 0.00902715 0.00760583 0.00637745
- 0.00543811 0.00439377 0.00352448 0.0030151 0.00285771 0.002465
- 0.00203114 0.00173004 0.0014839 0.00125177 0.00105327 0.000894905
- 0.000766372 0.000658894 0.000569105 0.000492114 0.000427938
- 0.000370217 0.000314758 0.000266569 0.000233726 0.000209048
- 0.000191957 0.000177169 0.000166604 0.000161 0.000157314
- 0.000143828 0.000130342 0.000116857 0.000103371 8.98855e-05
- 7.63998e-05 6.29141e-05 5.76583e-05 5.30027e-05 4.8347e-05
- 4.36913e-05 3.90357e-05 3.438e-05 2.97243e-05 2.72507e-05
- 2.59083e-05 2.45659e-05 2.32235e-05 2.18811e-05 2.05387e-05
- 1.91963e-05 1.78539e-05 1.65115e-05 1.51691e-05 1.38267e-05
- 1.24843e-05 1.11419e-05 9.79954e-06 8.51574e-06 7.69807e-06
- 6.8804e-06 6.06273e-06 5.24506e-06 0.0287318 0.0317111 -0.0320087
- -0.103609 0.0369639 0.0121128 0.00961197 0.00934971 0.00820853
- 0.00699769 0.00607002 0.00535541 0.00476552 0.00427601 0.00376357
- -0.073012 -0.0866964 -0.0809538 -0.038005 0.0277001 0.0188906
- 0.00614597 0.00373629 0.00489787 0.0146573 0.0191052 0.0151708
- 0.0124224 0.0105859 0.00879272 0.00729464 0.0070047 0.00449575
- -0.00626652 -0.0252417 -0.0147287 0.022538 0.0822905 0.0947372
- 0.0657516 0.0445506 0.0316753 0.0220971 0.0158101 0.0140971
- 0.0161498 0.0139876 0.0122447 0.0106994 0.009397 0.00822236
- 0.00686509 0.00797431 0.00751269 0.00671173 0.00595243 0.00524633
- 0.00459528 0.00401688 0.00350109 0.00303954 0.00260569 0.00222792
- 0.00191033 0.00163917 0.00140949 0.00121464 0.0010471 0.000900638
- 0.000768847 0.000645236 0.000524807 0.000460275 0.000442237
- 0.000446775 0.000397026 0.000301585 0.000228994 0.000190894
- 0.000166569 0.000152261 0.000137953 0.000123644 0.000109336
- 9.50281e-05 8.56557e-05 7.78437e-05 7.00318e-05 6.22198e-05
- 5.44079e-05 4.87539e-05 4.57761e-05 4.27982e-05 3.98203e-05
- 3.68425e-05 3.38646e-05 3.08868e-05 2.79089e-05 2.4931e-05
- 2.19532e-05 1.89753e-05 1.75244e-05 1.64095e-05 1.52946e-05
- 1.41797e-05 1.30648e-05 1.19499e-05 1.0835e-05 9.72011e-06
- 8.60521e-06 7.4903e-06 6.5117e-06 6.10334e-06 5.69497e-06
- 5.2866e-06 4.87824e-06 4.46987e-06 4.06151e-06 3.65314e-06
- 3.24477e-06
- EOD
-
- @v[9].set(<<-'EOD')
- 1.86175 1.99708 2.07867 2.01211 2.43309 3.27194 3.63896
- 3.90426 4.11074 4.27932 4.41496 4.52543 4.61491 4.68862
- 4.7479 4.79666 4.72895 4.68886 4.70354 4.81353 5.01568 5.14184
- 5.10482 5.07362 5.05143 5.03638 5.02323 5.01465 5.00853
- 5.00383 4.99985 5.00454 5.00652 5.00546 5.00411 5.003 5.00214
- 5.00151 5.00106 5.00073 5.0005 5.00034 5.00023 5.00015 5.0001
- 5.00005 5 5.00001 5.00005 5.00005 5.00003 5 4.99998 4.99996
- 4.99994 4.99995 4.99997 4.99998 5 5.00001 5.00002 5.00002
- 5.00003 5.00003 5.00003 5.00003 5.00003 5.00003 5.00002
- 5.00002 5.00001 5.00001 5.00001 5 5 5 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998
- 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 5 5 5 5
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.17392 4.94828 3.78491
- 1.52079 0.608874 0.244031 0.127087 0.0552995 0.0361032 0.0169025
- 0.006364 0.00217624 0.000921391 0.000457305 0.000786754
- -0.120016 -0.148054 -0.15898 -0.0801463 0.16463 0.174017
- 0.0799249 0.0318788 0.0129696 0.00483397 0.0025677 0.0042079
- 0.00350003 0.00178404 -8.72902e-05 -0.00128497 -0.00142213
- -0.00130018 -0.00106874 -0.000789207 -0.000824335 -0.00104518
- -0.00136799 -0.004366 -0.0102621 -0.0109254 -0.00649259
- -0.00194842 0.00029793 0.00148673 0.00221085 0.00228291
- 0.00185261 0.00139687 0.00148183 0.00562266 0.00844119 0.00754627
- 0.00657396 0.00591212 0.00539269 0.0049282 0.00448417 0.0040572
- 0.00363719 0.00320392 0.00279607 0.00243938 0.00211505 0.00182302
- 0.00156254 0.0013341 0.00113834 0.000971865 0.00082776 0.000706193
- 0.000602499 0.000515059 0.000441401 0.00037897 0.000325459
- 0.00028083 0.000242096 0.000207274 0.000176444 0.000150372
- 0.000126407 0.000103373 9.05522e-05 8.53555e-05 8.63685e-05
- 9.02593e-05 8.37346e-05 7.72099e-05 7.06852e-05 6.41605e-05
- 5.76358e-05 5.11112e-05 4.45865e-05 4.08176e-05 3.72497e-05
- 3.36818e-05 3.01138e-05 2.65459e-05 2.2978e-05 1.94101e-05
- 1.76154e-05 1.67399e-05 1.58645e-05 1.4989e-05 1.41136e-05
- 1.32381e-05 1.23626e-05 1.14872e-05 1.06117e-05 9.73629e-06
- 8.86083e-06 7.98538e-06 7.10993e-06 6.23447e-06 5.44363e-06
- 5.32578e-06 5.20792e-06 5.09007e-06 4.97222e-06 0.0784323
- 0.0474527 -0.0764232 -0.151146 0.0615785 0.0144489 0.00974161
- 0.00947176 0.00849005 0.00728201 0.00630581 0.00554032 0.00487809
- 0.00441504 0.00384139 -0.118943 -0.149894 -0.161173 -0.0825299
- 0.171686 0.176912 0.0816085 0.0335236 0.013791 0.0056976
- 0.00238833 0.00105348 0.000526199 0.00025969 0.000396026
- 0.000837835 0.00170131 0.00196699 -0.000553314 -0.0061621
- -0.0111895 -0.0142698 -0.0124608 -0.00795847 -0.00467822
- -0.0043058 -0.00874449 -0.0118584 -0.00871386 -0.00377892
- 1.95244e-05 0.00218952 0.00325486 0.00386497 0.00422837
- 0.00446883 0.00447065 0.00486647 0.00547838 0.00565398 0.00559092
- 0.00538752 0.00507015 0.00466305 0.00420756 0.00373465 0.00328404
- 0.00287059 0.00250057 0.00216124 0.00184861 0.00156815 0.00134624
- 0.00117857 0.00103412 0.0008948 0.000761012 0.000619853
- 0.000462614 0.000319965 0.000287666 0.000356415 0.000379946
- 0.000339183 0.00027972 0.000252982 0.000226244 0.000199507
- 0.000172769 0.000146031 0.000130097 0.000117578 0.000105059
- 9.25401e-05 8.00213e-05 7.11204e-05 6.67061e-05 6.22918e-05
- 5.78775e-05 5.34632e-05 4.90489e-05 4.46346e-05 4.02203e-05
- 3.5806e-05 3.13916e-05 2.69773e-05 2.4827e-05 2.31747e-05
- 2.15225e-05 1.98702e-05 1.8218e-05 1.65658e-05 1.49135e-05
- 1.32613e-05 1.1609e-05 9.95678e-06 8.50108e-06 7.86765e-06
- 7.23422e-06 6.60079e-06 5.96736e-06 5.33393e-06 4.7005e-06
- 4.06707e-06 3.43363e-06
- EOD
-
- @v[10].set(<<-'EOD')
- 1.86175 1.99308 2.16619 2.46661 3.09359 3.76864 4.31299
- 4.65564 4.83425 4.92153 4.96157 4.98063 4.98649 4.99039
- 4.9945 4.9972 4.96206 4.89882 4.83865 4.83202 4.91016 5.04479
- 5.06078 5.04827 5.03474 5.0246 5.01639 5.00996 5.00569 5.00239
- 5.00043 5.00296 5.00437 5.00382 5.00287 5.00208 5.00148
- 5.00104 5.00073 5.0005 5.00034 5.00023 5.00016 5.00011 5.00008
- 5.00007 5.00007 5.00004 5 4.99998 4.99998 4.99997 4.99998
- 4.99999 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001
- 5.00001 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 5.10081
- 5.10949 4.98359 5.00733 5.15145 4.37298 2.36126 0.470759
- 0.0577238 0.0115884 0.00262611 0.000671499 0.000389038 0.000291291
- 0.000317347 -0.0167823 -0.0158344 -0.0140559 0.0104849 0.0865874
- 0.107813 0.0524688 0.0214369 0.00876443 0.00341595 0.00170778
- 0.00259042 0.0022241 0.00118519 1.10217e-06 -0.000784506
- -0.000948169 -0.000856256 -0.000696719 -0.000485987 -0.000724787
- -0.000981491 -0.001454 -0.00552498 -0.0114992 -0.0105266
- -0.00543527 -0.000982798 0.00127356 0.00224212 0.00275439
- 0.00281098 0.0025471 0.00230368 0.00222576 0.00485522 0.00729453
- 0.00691796 0.0062615 0.00573987 0.0052688 0.00481185 0.00436934
- 0.00394326 0.00352712 0.00309978 0.00270038 0.00235335 0.00203742
- 0.00175256 0.00150067 0.00128126 0.00109323 0.000933619
- 0.000795113 0.000678182 0.00057843 0.000494345 0.000423609
- 0.000363821 0.000312766 0.000269856 0.000232389 0.000198382
- 0.000168126 0.00014267 0.000119293 9.69034e-05 8.5669e-05
- 8.26828e-05 8.64066e-05 9.26665e-05 8.5454e-05 7.82416e-05
- 7.10291e-05 6.38167e-05 5.66043e-05 4.93918e-05 4.21794e-05
- 3.86073e-05 3.53007e-05 3.19941e-05 2.86876e-05 2.5381e-05
- 2.20744e-05 1.87678e-05 1.70933e-05 1.62648e-05 1.54363e-05
- 1.46079e-05 1.37794e-05 1.2951e-05 1.21225e-05 1.12941e-05
- 1.04656e-05 9.63716e-06 8.80871e-06 7.98026e-06 7.1518e-06
- 6.32335e-06 5.5374e-06 5.08959e-06 4.64178e-06 4.19397e-06
- 3.74616e-06 0.0438026 0.0242078 -0.0602019 -0.0840866 0.00148461
- -0.00292489 0.000442098 0.00219489 0.00281478 0.00290756
- 0.00277945 0.00263896 0.00240099 0.00223283 0.001947 -0.0153629
- -0.0148815 -0.0128673 0.0126017 0.0905161 0.11051 0.0538958
- 0.022562 0.00935726 0.00397422 0.00172534 0.000790207 0.000416322
- 0.000191632 0.000469721 0.0009779 0.00192566 0.00200688
- -0.0016502 -0.00733932 -0.0128113 -0.0147608 -0.0115456
- -0.00668995 -0.00401368 -0.00463908 -0.0101197 -0.0118993
- -0.0076276 -0.00262656 0.000813059 0.00264455 0.00350796
- 0.00399494 0.0043049 0.00451658 0.00444739 0.00503842 0.00559516
- 0.00568213 0.00556459 0.0053176 0.00496654 0.00454337 0.00408592
- 0.00362171 0.00317793 0.00277001 0.00240394 0.00207009 0.00176575
- 0.00149725 0.00129045 0.00114257 0.00101135 0.000871672
- 0.000723764 0.000580438 0.000427507 0.000296956 0.000281834
- 0.000376628 0.000412266 0.000367547 0.000295305 0.000264513
- 0.000233721 0.000202929 0.000172137 0.000141345 0.000124721
- 0.000112577 0.000100433 8.82893e-05 7.61453e-05 6.75517e-05
- 6.33609e-05 5.91701e-05 5.49792e-05 5.07884e-05 4.65976e-05
- 4.24067e-05 3.82159e-05 3.40251e-05 2.98342e-05 2.56434e-05
- 2.36401e-05 2.21181e-05 2.05961e-05 1.90741e-05 1.75521e-05
- 1.60301e-05 1.45081e-05 1.29861e-05 1.14641e-05 9.94208e-06
- 8.59252e-06 7.96439e-06 7.33626e-06 6.70813e-06 6.07999e-06
- 5.45186e-06 4.82373e-06 4.1956e-06 3.56747e-06
- EOD
-
- @v[11].set(<<-'EOD')
- 1.86175 1.73419 1.42874 1.04055 0.943004 0.268275 0.0826455
- 0.0388346 0.0214104 0.0135431 0.00961322 0.00712846 0.00588262
- 0.00432397 0.00377774 0.00270134 -0.00393731 -0.00542187
- -0.00126596 0.0113777 0.0134522 0.00477056 -0.00211067 -0.00229253
- -0.00173355 -0.00122404 -0.00113426 -0.000744931 -0.000520112
- -0.000410048 -0.000220439 0.000508104 5.15856e-05 -0.000112593
- -0.000118917 -9.57394e-05 -7.15727e-05 -5.11847e-05 -3.58275e-05
- -2.47166e-05 -1.68866e-05 -1.14082e-05 -7.66646e-06 -5.12139e-06
- -3.63426e-06 -3.01815e-06 -2.64862e-06 -1.4947e-06 -1.91403e-07
- -2.5763e-08 -7.73699e-07 -1.52164e-06 -1.07268e-06 -3.81696e-07
- 2.6727e-07 4.75489e-07 6.83708e-07 8.91926e-07 1.10014e-06
- 1.30836e-06 1.2482e-06 1.00726e-06 7.66311e-07 5.25364e-07
- 2.84417e-07 6.27857e-08 7.43904e-10 -6.12979e-08 -1.2334e-07
- -1.85382e-07 -2.47423e-07 -3.09465e-07 -3.71507e-07 -4.33549e-07
- -4.95591e-07 -5.57633e-07 -6.04571e-07 -5.4944e-07 -4.9431e-07
- -4.3918e-07 -3.84049e-07 -3.28919e-07 -2.73789e-07 -2.18659e-07
- -1.63528e-07 -1.08398e-07 -5.32678e-08 1.062e-09 5.08502e-08
- 1.00638e-07 1.50427e-07 2.00215e-07 2.50003e-07 2.99791e-07
- 3.4958e-07 3.99368e-07 4.49156e-07 4.98944e-07 5.34512e-07
- 5.01032e-07 4.67553e-07 4.34073e-07 4.00593e-07 3.67113e-07
- 3.33633e-07 3.00153e-07 2.66674e-07 2.33194e-07 1.99714e-07
- 1.66234e-07 1.32754e-07 9.92744e-08 6.57945e-08 3.23147e-08
- -1.16513e-09 -3.4645e-08 -6.81248e-08 -1.01605e-07 -1.35084e-07
- -1.68564e-07 -2.18729e-07 0.0114926 -0.0245378 -0.111828
- 0.0964775 1.61491 3.22668 4.22041 4.54492 4.82845 4.94868
- 4.98588 4.99609 4.9981 4.99908 4.99788 4.98395 4.99294 4.99724
- 5.01939 5.0471 5.00902 4.98194 4.98496 4.99188 4.99623 4.99862
- 5.00025 4.99974 4.99953 4.99946 4.99958 5.00012 4.99997
- 4.99992 4.99988 4.99985 4.9998 4.9997 4.9988 4.99806 4.99982
- 5.00143 5.00159 5.00098 5.00053 5.00028 5.00007 4.99977
- 4.99992 5.00005 5.00133 5.0009 4.99993 4.99972 4.99975 4.9998
- 4.99982 4.99983 4.99983 4.99983 4.99983 4.99984 4.99986
- 4.99987 4.99989 4.9999 4.99991 4.99992 4.99994 4.99995 4.99995
- 4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 4.99998
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 5 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002
- 5.00002 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 5 5 5.01457 4.99482 4.96561 4.99326
- 5.03452 5.00424 5.00101 5.00045 5.00004 4.99965 4.99997
- 4.99994 4.99958 4.99999 4.99936 4.9839 4.99248 4.99717 5.01976
- 5.04869 5.0087 4.98143 4.98488 4.99199 4.99622 4.9983 4.99928
- 4.99971 4.99986 5.00031 5.00022 5.00035 5.0001 4.99884 4.99811
- 4.99803 4.99887 5.00078 5.00151 5.00116 5.00007 4.99843
- 4.99915 5.00107 5.00168 5.00141 5.00092 5.00055 5.0003 5.00016
- 5.0001 5.00001 5.00016 5.0002 5.00009 4.99993 4.99975 4.99984
- 4.99991 4.99991 4.99982 4.99974 4.99974 4.99985 4.99995
- 4.99999 4.99998 5.00004 5.00013 5.00015 5.00007 4.99988
- 4.99982 4.99985 4.99995 5.00006 5.0002 5.00025 5.0002 5.00009
- 5.00006 5.00004 5.00002 5 4.99998 4.99997 4.99998 4.99998
- 4.99999 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999
- 4.99998 4.99998 4.99998
- EOD
-
- @v[12].set(<<-'EOD')
- 5 5.16975 4.78685 2.94241 0.126698 0.0487004 -0.00422591
- -0.00130689 -0.000486756 -0.000195875 -0.000108988 -6.66736e-05
- -7.26005e-05 -5.63608e-05 -3.81859e-05 -2.123e-05 -0.0646846
- -0.0184474 0.182248 1.06731 3.10988 4.46133 4.84133 4.95113
- 4.98364 4.99455 4.99694 4.99727 4.9994 4.99975 5.0001 5.00132
- 5.00089 5.00039 5.00019 5.00011 5.00006 5.00005 5.00004
- 5.00001 4.99992 4.99992 5.00002 5.00013 5.00017 5.00009
- 4.99992 4.99991 4.99994 4.99996 4.99998 4.99999 5.00001
- 5.00004 5.00006 5.00005 5.00004 5.00003 5.00002 5.00001
- 5 4.99999 4.99999 4.99998 4.99998 4.99997 4.99997 4.99998
- 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999
- 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 5 5.14699 4.78074
- 3.19424 0.305663 0.0611255 -0.00179951 -0.0012032 0.000405978
- 0.000989399 0.000445194 0.000191447 8.30476e-05 3.96236e-05
- 1.91866e-05 1.70665e-05 -0.0655239 -0.0210234 0.1827 1.06848
- 3.11554 4.46518 4.84212 4.94853 4.98244 4.99434 4.9997 5.00081
- 5.00009 4.99972 4.99985 4.99974 4.9995 4.99949 4.99958 4.99973
- 4.99948 4.99914 4.99874 4.99946 5.00309 5.0091 5.01576 5.01835
- 5.01852 5.0176 5.01625 5.01479 5.01345 5.01264 5.011 5.01092
- 5.01344 5.01363 5.01289 5.01184 5.01071 5.00956 5.00848
- 5.00751 5.00663 5.00577 5.00497 5.00427 5.00365 5.0031 5.00264
- 5.00224 5.00191 5.00163 5.00138 5.00117 5.00099 5.00083
- 5.00071 5.00061 5.00053 5.00045 5.00037 5.00029 5.00022
- 5.00019 5.0002 5.00023 5.00024 5.00023 5.00023 5.00022 5.0002
- 5.00018 5.00016 5.00014 5.00011 5.00009 5.00007 5.00006
- 5.00005 5.00005 5.00004 5.00003 5.00002 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002
- 5.00002 5.00001 5.00001 5.00001 5.14298 4.79809 3.32704
- 0.498385 0.105773 0.0160646 0.0319912 0.0299434 0.0240102
- 0.0185844 0.0130411 0.0106532 0.00864871 0.00744519 0.00660887
- -0.0612913 -0.0203719 0.174998 0.991787 3.06292 4.60005
- 4.93058 4.98917 5.00033 4.9999 4.99909 4.9966 4.9955 4.99488
- 4.99374 4.9943 5.00131 5.00506 4.99311 4.96288 4.93567 4.92439
- 4.94236 4.9732 4.98864 4.99458 5.00031 5.00694 5.01525 5.01945
- 5.01998 5.01953 5.01874 5.01766 5.0164 5.01509 5.01326 5.01423
- 5.01455 5.01361 5.01245 5.01122 5.01002 5.00888 5.00783
- 5.00687 5.00596 5.00514 5.00442 5.00379 5.00325 5.00279
- 5.0024 5.00208 5.0018 5.00153 5.00126 5.00107 5.00094 5.00085
- 5.00078 5.00072 5.00063 5.00053 5.00042 5.00038 5.00034
- 5.0003 5.00027 5.00023 5.00021 5.00019 5.00017 5.00015 5.00013
- 5.00012 5.00011 5.0001 5.0001 5.00009 5.00008 5.00007 5.00007
- 5.00006 5.00005 5.00005 5.00004 5.00004 5.00003 5.00003
- 5.00002 5.00002 5.00002 5.00001 5.00001 5 5 5 5.00001 5.00001
- 5.00001 5.00002 5.00002 5.00002 5.00002
- EOD
-
- @v[13].set(<<-'EOD')
- 9.73784e-10 0.0189926 0.0926769 0.206309 0.111533 0.0953491
- 0.0426966 0.0214177 0.0117943 0.00741442 0.00528816 0.00398417
- 0.0032967 0.00266499 0.00206647 0.00158788 -0.0371391 -0.0439528
- -0.0408653 -0.0188706 0.0150241 0.0126852 0.00209817 -0.000239206
- -5.31488e-05 0.000876324 -0.00451221 -0.0165223 -0.0284127
- -0.0427584 -0.0502453 -0.0257366 -0.00903938 -0.00376456
- -0.00233385 -0.00169922 -0.00130397 -0.00102542 -0.000811435
- -0.000648115 -0.000529266 -0.00043795 -0.00036574 -0.00030716
- -0.00026221 -0.000229662 -0.000205112 -0.000181038 -0.000162045
- -0.000148988 -0.000137633 -0.000126278 -0.000115562 -0.000104976
- -9.49324e-05 -9.0585e-05 -8.62375e-05 -8.18901e-05 -7.75426e-05
- -7.31952e-05 -6.93752e-05 -6.59106e-05 -6.24461e-05 -5.89815e-05
- -5.55169e-05 -5.22412e-05 -5.05263e-05 -4.88114e-05 -4.70966e-05
- -4.53817e-05 -4.36668e-05 -4.19519e-05 -4.0237e-05 -3.85222e-05
- -3.68073e-05 -3.50924e-05 -3.34782e-05 -3.25442e-05 -3.16102e-05
- -3.06763e-05 -2.97423e-05 -2.88083e-05 -2.78744e-05 -2.69404e-05
- -2.60064e-05 -2.50725e-05 -2.41385e-05 -2.32635e-05 -2.27232e-05
- -2.21829e-05 -2.16426e-05 -2.11023e-05 -2.0562e-05 -2.00217e-05
- -1.94814e-05 -1.89411e-05 -1.84007e-05 -1.78604e-05 -1.73647e-05
- -1.70853e-05 -1.68059e-05 -1.65265e-05 -1.62471e-05 -1.59677e-05
- -1.56883e-05 -1.54089e-05 -1.51295e-05 -1.48501e-05 -1.45707e-05
- -1.42913e-05 -1.40119e-05 -1.37325e-05 -1.34531e-05 -1.31737e-05
- -1.28943e-05 -1.26149e-05 -1.23355e-05 -1.20561e-05 -1.17767e-05
- -1.14973e-05 -1.10954e-05 0.0152675 0.0228237 -0.00460678
- -0.0341525 0.0232109 -0.0138039 -0.0416538 -0.0458764 -0.0201967
- -0.00878316 -0.00379173 -0.00164621 -0.000785131 -0.00037575
- -0.000352375 -0.0545586 -0.0746881 -0.0771865 -0.05386 -0.0022199
- 0.0136703 0.00633526 0.00138826 -0.00108934 0.0038886 0.0298077
- 0.0475776 0.0481003 0.0464167 0.047818 0.042789 0.035207
- 0.0264423 0.0193959 0.0151614 0.00624257 -0.00913057 -0.0310696
- -0.0430238 0.016426 0.189762 0.49025 0.820116 1.13919 1.43549
- 1.70658 1.95183 2.17414 2.38506 2.5657 2.73958 2.97905 3.21403
- 3.43025 3.62645 3.8028 3.96002 4.09996 4.22443 4.33427 4.42886
- 4.51097 4.5817 4.64326 4.6957 4.74132 4.7797 4.81298 4.84102
- 4.86512 4.88523 4.90224 4.91649 4.92846 4.93868 4.94755
- 4.95483 4.96114 4.96682 4.97161 4.97502 4.9776 4.97944 4.98141
- 4.98319 4.98467 4.98585 4.9869 4.98796 4.98902 4.99008 4.99114
- 4.9922 4.99326 4.9938 4.99429 4.99479 4.99528 4.99578 4.99628
- 4.99677 4.99704 4.99718 4.99733 4.99747 4.99762 4.99777
- 4.99791 4.99806 4.9982 4.99835 4.9985 4.99864 4.99879 4.99893
- 4.99907 4.99916 4.99925 4.99934 4.99943 5.01473 4.92293
- 4.61974 4.0316 3.7835 3.74195 3.78344 3.87272 3.97386 4.07319
- 4.16686 4.25256 4.33126 4.40264 4.46697 4.49249 4.51807
- 4.55803 4.64055 4.78574 4.86074 4.88334 4.8999 4.91455 4.92814
- 4.93926 4.94761 4.95433 4.95907 4.9654 4.98317 5.0208 5.05134
- 4.85852 4.16041 3.00077 1.68376 0.672707 0.240838 0.0794725
- -0.0106347 -0.00879443 0.107196 0.368163 0.701424 1.03581
- 1.3601 1.6678 1.95731 2.22701 2.47544 2.69099 2.92327 3.16648
- 3.3877 3.59067 3.77344 3.93584 4.08066 4.20863 4.32065 4.41791
- 4.50211 4.57423 4.63614 4.68888 4.73377 4.7721 4.80519 4.83338
- 4.85732 4.87815 4.89514 4.90927 4.92108 4.93122 4.94014
- 4.94845 4.95601 4.96251 4.96576 4.969 4.97225 4.9755 4.97874
- 4.98087 4.98265 4.98442 4.9862 4.98797 4.98924 4.9899 4.99055
- 4.9912 4.99186 4.99251 4.99316 4.99381 4.99447 4.99512 4.99577
- 4.99609 4.99634 4.99659 4.99683 4.99708 4.99732 4.99757
- 4.99782 4.99806 4.99831 4.99853 4.99863 4.99873 4.99883
- 4.99893 4.99903 4.99913 4.99923 4.99933
- EOD
-
- @v[14].set(<<-'EOD')
- 1.86175 2.00147 1.85141 1.0654 0.275481 0.205547 0.0712627
- 0.0313387 0.0151431 0.00864531 0.00593861 0.00438111 0.0037479
- 0.00305857 0.00221221 0.0017081 -0.0896128 -0.109079 -0.121356
- -0.0542001 0.175821 0.177442 0.0814591 0.0333042 0.0134909
- 0.00625777 0.00100092 -0.00552776 -0.00411139 -0.00150395
- -0.000564784 3.48169e-05 -0.000287014 -0.000538515 -0.000456537
- -0.000325677 -0.000275468 -0.000166452 -8.27481e-05 -8.28704e-05
- -7.47644e-05 -4.60552e-05 -2.61481e-06 2.26359e-05 2.53852e-05
- -1.39853e-06 -4.23456e-05 -4.0907e-05 -2.8501e-05 -1.5945e-05
- -9.01122e-06 -2.07747e-06 1.49328e-06 4.38398e-06 6.84248e-06
- 4.76711e-06 2.69173e-06 6.16362e-07 -1.45901e-06 -3.53438e-06
- -4.14256e-06 -3.76238e-06 -3.3822e-06 -3.00202e-06 -2.62184e-06
- -2.24878e-06 -1.93456e-06 -1.62033e-06 -1.3061e-06 -9.91867e-07
- -6.77638e-07 -3.63409e-07 -4.91792e-08 2.6505e-07 5.7928e-07
- 8.93509e-07 1.16076e-06 1.11055e-06 1.06034e-06 1.01014e-06
- 9.59927e-07 9.09719e-07 8.59511e-07 8.09302e-07 7.59094e-07
- 7.08886e-07 6.58678e-07 5.99251e-07 4.87523e-07 3.75795e-07
- 2.64068e-07 1.5234e-07 4.06119e-08 -7.1116e-08 -1.82844e-07
- -2.94572e-07 -4.063e-07 -5.18027e-07 -6.08517e-07 -5.95879e-07
- -5.83241e-07 -5.70604e-07 -5.57966e-07 -5.45328e-07 -5.3269e-07
- -5.20053e-07 -5.07415e-07 -4.94777e-07 -4.8214e-07 -4.69502e-07
- -4.56864e-07 -4.44226e-07 -4.31589e-07 -4.18951e-07 -4.06313e-07
- -3.93676e-07 -3.81038e-07 -3.684e-07 -3.55762e-07 -3.43125e-07
- 1.06736e-05 0.0797407 0.0437947 -0.0645098 -0.0877312 0.0653203
- -0.00621184 -0.0353188 -0.0491378 -0.0251957 -0.0110996
- -0.00481123 -0.0020941 -0.000998038 -0.000478747 -0.000445332
- -0.102046 -0.135753 -0.154351 -0.0827509 0.163348 0.174012
- 0.0794822 0.0310624 0.0112213 0.00249061 0.00130764 0.00181315
- 0.00163875 0.00101454 0.000497435 0.000195258 5.31901e-05
- 2.4607e-05 6.62736e-05 7.90718e-05 4.0372e-05 -0.000141184
- -0.000280623 5.5608e-05 0.000799565 0.000920189 0.000931616
- 0.000494527 0.000162303 -8.24884e-05 -0.000183938 -0.000203899
- -0.000144788 -9.87063e-05 -0.000227929 2.93932e-05 0.000208563
- 1.88958e-06 -7.6335e-05 -0.000172472 -0.000165656 -0.000145889
- -0.000177311 -0.000191058 -0.000168287 -0.00015755 -0.00013142
- -8.10488e-05 -6.36115e-05 -7.8699e-05 -8.11282e-05 -7.98625e-05
- -5.98807e-05 -3.40879e-05 -1.95464e-05 -1.79247e-05 -4.45514e-05
- -7.47995e-05 -8.7682e-05 -7.50806e-05 -3.25561e-05 -4.34114e-05
- -7.69099e-05 -0.000141101 -0.00018743 -0.000148471 -5.06546e-05
- 0.000120195 0.000177635 0.000177052 0.000146344 9.75126e-05
- 8.31233e-05 6.8734e-05 5.43447e-05 3.99554e-05 2.55661e-05
- 1.11768e-05 -3.21253e-06 -3.88937e-06 -3.56628e-06 -3.24318e-06
- -2.92008e-06 -2.59699e-06 -2.27389e-06 -1.9508e-06 -1.73227e-06
- -1.56796e-06 -1.40365e-06 -1.23934e-06 -1.07503e-06 -9.10722e-07
- -7.46412e-07 -5.82101e-07 -4.1779e-07 -2.5348e-07 -8.91694e-08
- 7.51412e-08 2.39452e-07 4.03762e-07 5.95733e-07 1.00771e-06
- 1.41969e-06 1.83167e-06 2.24365e-06 0.0828257 0.231038 0.465438
- 1.54516 2.8461 3.19221 3.40395 3.6382 3.80758 3.93848 4.04882
- 4.15428 4.247 4.32917 4.40235 4.36941 4.397 4.48862 4.64552
- 4.86595 5.03475 5.0348 5.02627 5.01967 5.01542 5.00925 4.98613
- 4.9519 4.91581 4.87357 4.82302 4.80403 4.82565 4.86102 4.89483
- 4.92253 4.94428 4.96257 4.97608 4.98373 4.98823 4.99182
- 4.99437 4.99635 4.99745 4.99802 4.99843 4.99873 4.99895
- 4.99912 4.99925 4.99931 4.99962 4.99973 4.99972 4.99971
- 4.9997 4.99969 4.9997 4.99971 4.99973 4.99974 4.99976 4.99978
- 4.9998 4.99982 4.99985 4.99987 4.99989 4.9999 4.99991 4.99991
- 4.99993 4.99994 4.99997 5.00001 5.00006 5.00008 5.00006
- 5.00002 5 4.99999 4.99998 4.99997 4.99995 4.99995 4.99995
- 4.99995 4.99995 4.99995 4.99995 4.99996 4.99997 4.99997
- 4.99998 4.99999 5 5 5.00001 5.00002 5.00002 5.00002 5.00002
- 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00001
- 5.00001 5.00001 5.00001 5.00001 5 5 5 4.99999 4.99999 4.99999
- EOD
-
- @v[15].set(<<-'EOD')
- 1.86175 2.00199 2.08919 1.84314 1.08254 0.214737 0.0377351
- 0.00952455 0.00232763 0.000563614 0.000263477 0.000148642
- 0.000285086 0.000242592 7.34699e-05 -1.53467e-05 -0.0161874
- -0.0157876 -0.0141194 0.0132576 0.0903272 0.109938 0.0535295
- 0.0224216 0.00940945 0.00466825 -0.000649972 -0.00654752
- -0.00333248 -0.00103671 -0.000508276 -5.8896e-05 -0.00043938
- -0.000544704 -0.00044444 -0.000307093 -0.00024517 -0.000154538
- -8.78602e-05 -7.10461e-05 -6.06485e-05 -3.91039e-05 -8.45988e-06
- 9.43442e-06 1.28351e-05 -2.16734e-06 -2.6142e-05 -2.54768e-05
- -1.88997e-05 -1.17906e-05 -7.3808e-06 -2.97101e-06 1.19146e-07
- 2.94246e-06 5.38942e-06 3.88851e-06 2.38761e-06 8.86704e-07
- -6.14201e-07 -2.11511e-06 -2.59565e-06 -2.38885e-06 -2.18205e-06
- -1.97525e-06 -1.76845e-06 -1.56241e-06 -1.36258e-06 -1.16276e-06
- -9.62939e-07 -7.63116e-07 -5.63293e-07 -3.6347e-07 -1.63647e-07
- 3.61756e-08 2.35999e-07 4.35822e-07 6.07653e-07 5.90323e-07
- 5.72994e-07 5.55665e-07 5.38336e-07 5.21007e-07 5.03678e-07
- 4.86349e-07 4.6902e-07 4.51691e-07 4.34361e-07 4.11899e-07
- 3.60315e-07 3.08731e-07 2.57146e-07 2.05562e-07 1.53977e-07
- 1.02393e-07 5.08082e-08 -7.76222e-10 -5.23607e-08 -1.03945e-07
- -1.47815e-07 -1.54225e-07 -1.60635e-07 -1.67045e-07 -1.73455e-07
- -1.79864e-07 -1.86274e-07 -1.92684e-07 -1.99094e-07 -2.05504e-07
- -2.11914e-07 -2.18324e-07 -2.24734e-07 -2.31144e-07 -2.37554e-07
- -2.43964e-07 -2.50373e-07 -2.56783e-07 -2.63193e-07 -2.69603e-07
- -2.76013e-07 -2.82423e-07 2.92534e-06 0.0446777 0.024278
- -0.0518987 -0.0636547 0.00983929 -0.000518204 -0.000265194
- 0.000154772 0.000299538 3.12715e-05 -3.18225e-05 -2.48268e-05
- -1.16701e-05 -6.05117e-06 7.61116e-06 -0.0163668 -0.0158244
- -0.0141177 0.0100085 0.0857144 0.107784 0.051862 0.0204448
- 0.00629858 0.000967736 0.00121674 0.00190276 0.00154009
- 0.000860922 0.000410386 0.000164585 3.99493e-05 1.93797e-05
- 5.67594e-05 0.000110126 2.49925e-05 -7.17815e-05 -0.000142299
- -1.63109e-05 0.000439529 0.000562489 0.000594599 0.000326164
- 0.000126423 -4.26063e-05 -0.000122927 -0.000114152 -6.72706e-05
- -6.41242e-05 -0.000135588 2.61507e-05 0.000134036 6.43734e-06
- -4.6223e-05 -0.000112047 -0.000101388 -8.67847e-05 -0.000117664
- -0.000133957 -0.000116558 -0.000100873 -7.65448e-05 -4.44964e-05
- -3.6677e-05 -5.26632e-05 -5.45172e-05 -5.13545e-05 -3.73869e-05
- -1.99732e-05 -1.0907e-05 -1.10081e-05 -3.02609e-05 -5.18517e-05
- -6.13597e-05 -5.30706e-05 -2.39572e-05 -3.24146e-05 -5.70062e-05
- -0.000103448 -0.000135376 -0.0001024 -2.39007e-05 0.000110929
- 0.000151226 0.000142044 0.000105922 5.62834e-05 4.78476e-05
- 3.94117e-05 3.09759e-05 2.25401e-05 1.41042e-05 5.66837e-06
- -2.76747e-06 -3.08639e-06 -2.81341e-06 -2.54043e-06 -2.26745e-06
- -1.99447e-06 -1.72149e-06 -1.44851e-06 -1.26226e-06 -1.12096e-06
- -9.79661e-07 -8.38363e-07 -6.97065e-07 -5.55768e-07 -4.1447e-07
- -2.73173e-07 -1.31875e-07 9.42259e-09 1.5072e-07 2.92018e-07
- 4.33315e-07 5.74613e-07 7.10363e-07 8.01984e-07 8.93604e-07
- 9.85225e-07 1.07685e-06 0.04474 0.0928765 0.141327 0.0176048
- -0.071675 -0.0124613 0.989022 2.28104 3.40619 4.21417 4.67173
- 4.87438 4.96044 4.98996 4.99858 4.96672 4.89502 4.79391
- 4.76433 4.8387 4.98612 5.0161 5.01722 5.01437 5.01256 4.99827
- 4.95807 4.9209 4.88217 4.83006 4.78461 4.80759 4.85548 4.89604
- 4.9254 4.94617 4.96126 4.97374 4.98255 4.98792 4.99126 4.99361
- 4.99554 4.99699 4.99792 4.99846 4.99881 4.99905 4.99924
- 4.99938 4.99949 4.99955 4.9997 4.9998 4.99982 4.99982 4.99982
- 4.99982 4.99982 4.99983 4.99984 4.99985 4.99986 4.99987
- 4.99988 4.99989 4.9999 4.99992 4.99993 4.99994 4.99995 4.99995
- 4.99996 4.99996 4.99998 4.99999 5.00001 5.00002 5.00002
- 5.00001 5.00001 5 4.99999 4.99999 4.99998 4.99998 4.99998
- 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998
- 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- EOD
-
- @v[16].set(<<-'EOD')
- 1.86175 1.73073 1.50572 1.89001 3.39004 4.36034 4.79012
- 4.93798 4.98305 4.99539 4.9979 4.99904 4.99772 4.9983 4.99935
- 4.99975 4.98837 4.99456 4.99728 5.01838 5.04568 5.00759
- 4.98112 4.98479 4.99197 4.99641 4.99747 4.99775 5.00043
- 5.0007 5.00035 5.00023 4.99976 5.00002 5.00007 5.0002 4.99993
- 5.00003 5.00021 5.00006 4.99993 4.99992 5.00002 5.00013
- 5.00017 5.00009 4.99992 4.99991 4.99993 4.99996 4.99998
- 4.99999 5.00001 5.00003 5.00005 5.00004 5.00004 5.00003
- 5.00002 5.00001 5 4.99999 4.99999 4.99998 4.99998 4.99997
- 4.99997 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999
- 4.99999 4.99999 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00002 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
- 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 5 5.01498 4.99342 4.96899 5.00301 5.02627 4.9977
- 4.99548 4.99757 5.00277 5.00245 5.0014 5.00069 5.00032 5.00014
- 5.00009 4.9867 4.99262 4.99607 5.01805 5.04713 5.00927 4.98184
- 4.98483 4.9914 4.99616 4.99902 4.9999 4.99987 4.99979 4.99981
- 4.99989 4.99994 4.99998 5.0002 5.00001 5.00008 5.00008 5.0001
- 5.00021 5.00032 5.00025 5.00019 5.00006 5.00007 4.99994
- 4.99997 4.99999 5.00023 5.00008 4.99993 4.99998 4.99986
- 4.99982 5.00003 4.99985 4.99996 5.00014 5 4.99984 4.99979
- 4.99982 4.99993 5.00008 5.00011 5.00002 4.99996 4.9999 4.99994
- 5.00001 5.00007 5.00009 4.99995 4.99978 4.99971 4.99976
- 4.99997 4.99996 4.99989 4.99972 4.99955 4.99953 4.99959
- 4.99976 4.9999 5.00005 5.00023 5.00039 5.00034 5.00029 5.00024
- 5.00019 5.00014 5.00009 5.00004 5.00003 5.00002 5.00001
- 5 5 4.99999 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5
- 5.00001 5.00002 5.00003 5.00004 5.01564 5.03395 5.04932
- 5.11868 3.92502 1.31888 0.163888 0.0946876 0.0789578 0.0565084
- 0.0260333 0.0156986 0.00907667 0.00613629 0.00468417 -0.00174008
- -0.0021422 0.000586962 0.0124937 0.0147977 0.00838454 0.00039383
- -0.000522021 -0.000426598 -0.000290214 -0.00173713 -0.00384132
- -0.00382945 -0.00429219 -0.00580193 -0.00393246 0.0017543
- 0.00423045 0.00408931 0.0031976 0.00245457 0.00187293 0.00159068
- 0.00105697 0.000609902 0.000358825 0.000334125 0.000212708
- 0.000168116 8.97349e-05 5.21578e-05 3.84527e-05 2.93033e-05
- 2.10067e-05 1.59954e-05 1.13917e-05 5.49738e-06 2.77217e-05
- 6.51259e-06 -6.65468e-06 2.09837e-06 -6.617e-06 -4.80187e-06
- 1.55031e-06 4.26536e-06 7.69457e-07 -1.46213e-06 -7.25202e-07
- 3.26501e-06 6.55807e-06 7.524e-06 6.07209e-06 6.00701e-06
- 5.41166e-06 3.86573e-06 1.10651e-06 -2.74603e-06 -2.18566e-06
- 2.3658e-06 8.59956e-06 8.35046e-06 2.90621e-06 -8.75982e-07
- -1.87189e-06 -2.1528e-06 -1.94875e-06 -1.74471e-06 -1.54067e-06
- -1.33662e-06 -1.13258e-06 -8.40567e-07 -5.20743e-07 -2.00918e-07
- 1.18906e-07 4.38731e-07 6.11382e-07 6.01529e-07 5.91675e-07
- 5.81822e-07 5.71968e-07 5.62115e-07 5.52261e-07 5.42407e-07
- 5.32554e-07 5.227e-07 5.12847e-07 4.72812e-07 4.26137e-07
- 3.79462e-07 3.32786e-07 2.86111e-07 2.39436e-07 1.92761e-07
- 1.46086e-07 9.94107e-08 5.27356e-08 -2.77779e-10 -7.98079e-08
- -1.59338e-07 -2.38868e-07 -3.18398e-07 -3.97928e-07 -4.77458e-07
- -5.56988e-07 -6.36519e-07
- EOD
-
- @v[17].set(<<-'EOD')
- 5 5.16963 4.84136 3.33754 0.316206 0.103113 0.0273341 0.0221102
- 0.0177008 0.0143758 0.0115203 0.00929231 0.00752716 0.00625439
- 0.00489872 0.00403656 -0.0657317 -0.0256467 0.165394 0.985963
- 3.05067 4.55799 4.89728 4.92464 4.8882 4.90592 4.97315 4.99241
- 4.99694 4.99845 4.99905 4.99939 4.99959 4.99971 4.9998 4.99986
- 4.9999 4.99993 4.99995 4.99996 4.99997 4.99998 4.99998 4.99999
- 4.99999 4.99999 4.99999 4.99999 5 5.00001 5.00003 5.00005
- 5.00004 5.00002 5 4.99999 4.99999 4.99998 4.99998 4.99997
- 4.99997 4.99998 4.99998 4.99999 4.99999 5 5 5 5 5 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5
- 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998
- 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 5 5 5 5 5 5 5.00025 5.1657 4.69981 2.43895
- 0.0229743 0.0351406 -0.0211974 -0.0312063 -0.0160331 -0.0021718
- -0.000766597 -0.000251052 -5.49363e-05 -3.36364e-06 -2.01983e-06
- -9.70575e-06 -0.0657007 -0.0205247 0.183332 1.07163 3.11839
- 4.46213 4.84163 4.95195 4.99159 5.02084 5.04029 5.04138
- 5.0271 5.00445 4.97957 4.95702 4.95231 4.97819 4.99191 4.9963
- 4.99822 4.99878 4.99903 4.99925 4.99942 4.9995 4.99954 4.99957
- 4.99961 4.99966 4.9997 4.99974 4.99977 4.99981 4.99983 4.99986
- 4.99988 4.9999 4.99991 4.99992 4.99994 4.99995 4.99995 4.99996
- 4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00001 5.00001 5.00001
- 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002
- 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5 5 5 4.99999 4.99998 4.99997 4.99996 5.14239 4.76219
- 3.16574 0.299969 0.0631609 -0.00118611 -0.00026052 -5.96333e-05
- -1.44904e-05 -4.3859e-06 -2.99454e-06 1.10547e-06 4.84662e-06
- 1.30971e-05 2.23082e-05 -0.0655844 -0.0204818 0.182507 1.05954
- 3.12277 4.46735 4.83915 4.94512 4.97679 4.98654 4.9966 5.00833
- 5.00776 5.00432 5.00199 5.00086 5.00033 5.00008 5 5.00001
- 5 5.00005 5.00002 4.99981 4.99991 4.99998 4.99979 4.99979
- 4.99984 4.9998 4.9998 5.00006 5.00002 5.00001 5 5 4.99992
- 4.99998 4.99999 5.00002 5.00014 4.99999 4.99987 4.99993
- 5.00003 5.00011 5.00005 4.99996 4.99987 4.99985 4.99994
- 5.00009 5.0001 5 4.99993 4.99997 5.00008 5.00015 5.00021
- 5.00021 5.00007 4.99978 4.99965 4.99973 4.9999 4.99992 4.99995
- 4.99997 4.99999 5.00001 5.00002 5.00001 5.00001 5.00001
- 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 5.00001 5.00002
- 5.00002 5.00002
- EOD
-
- @v[18].set(<<-'EOD')
- 5 5.0333 5.02472 4.92559 4.18383 3.93923 3.9961 4.14293
- 4.28591 4.41336 4.52157 4.61101 4.68472 4.7439 4.79294 4.83239
- 4.80697 4.78808 4.79322 4.8838 5.08529 5.21863 4.88852 3.90198
- 2.14586 0.383977 0.101103 0.0525711 0.0318287 0.020895 0.0146908
- 0.010831 0.00830272 0.00656377 0.00532066 0.00440078 0.00369956
- 0.00315713 0.00272614 0.00237965 0.00209659 0.00186339 0.00167014
- 0.0015081 0.00137172 0.00125607 0.00115393 0.00106076 0.000980166
- 0.000918015 0.000862837 0.00080766 0.000763488 0.000721541
- 0.000680825 0.000653026 0.000625226 0.000597426 0.000569627
- 0.000541827 0.000519087 0.000499756 0.000480424 0.000461093
- 0.000441761 0.000423291 0.000411941 0.00040059 0.00038924
- 0.000377889 0.000366539 0.000355188 0.000343838 0.000332487
- 0.000321137 0.000309786 0.000299055 0.000292509 0.000285963
- 0.000279417 0.000272871 0.000266325 0.000259779 0.000253233
- 0.000246686 0.00024014 0.000233594 0.000227387 0.0002231
- 0.000218813 0.000214526 0.00021024 0.000205953 0.000201666
- 0.000197379 0.000193092 0.000188805 0.000184519 0.000180526
- 0.000177963 0.0001754 0.000172837 0.000170274 0.000167711
- 0.000165148 0.000162585 0.000160022 0.000157459 0.000154895
- 0.000152332 0.000149769 0.000147206 0.000144643 0.00014208
- 0.000139517 0.000136954 0.000134391 0.000131828 0.000129265
- 0.000126702 0.000132838 0.0311184 0.163151 0.34986 0.604501
- 0.357125 0.136137 0.0711304 0.0346959 0.0212674 0.00872193
- 0.00252206 0.000455269 7.59332e-05 2.91532e-05 0.000320562
- -0.0720911 -0.0840491 -0.0791345 -0.0404143 0.0182035 -0.0235871
- -0.0426072 -0.0597501 0.00824773 0.481404 1.32496 2.11949
- 2.57317 2.58202 2.15054 1.33786 0.45702 0.153772 0.0913584
- 0.0604989 0.0421591 0.0271456 0.0170021 0.0115815 0.00907886
- 0.00742466 0.00626096 0.00531127 0.00450501 0.00381927 0.00323718
- 0.00274374 0.00232494 0.00196885 0.00166686 0.00141134 0.00119437
- 0.0010109 0.000855534 0.000723378 0.000611408 0.000516704
- 0.000436769 0.000369523 0.000313026 0.00026526 0.000223976
- 0.000188972 0.000159042 0.000134148 0.000112688 9.49738e-05
- 7.97877e-05 6.721e-05 5.65115e-05 4.77194e-05 4.03591e-05
- 3.42848e-05 2.92627e-05 2.50435e-05 2.1412e-05 1.84532e-05
- 1.58624e-05 1.34673e-05 1.14461e-05 1.00935e-05 9.12375e-06
- 8.50202e-06 7.81431e-06 7.20729e-06 6.73936e-06 6.3702e-06
- 5.90049e-06 5.43077e-06 4.96105e-06 4.49133e-06 4.02162e-06
- 3.5519e-06 3.08218e-06 2.79099e-06 2.51281e-06 2.23463e-06
- 1.95645e-06 1.67827e-06 1.40009e-06 1.12191e-06 1.01376e-06
- 9.9375e-07 9.73741e-07 9.53733e-07 9.33724e-07 9.13715e-07
- 8.93707e-07 8.73698e-07 8.5369e-07 8.33681e-07 8.13673e-07
- 7.93664e-07 7.73655e-07 7.53647e-07 7.21781e-07 5.956e-07
- 4.69419e-07 3.43239e-07 2.17058e-07 0.0284032 0.0374438
- -0.0157543 -0.0680497 0.0504768 0.0100294 0.00222261 0.000528697
- 0.000132929 3.99489e-05 2.46066e-05 4.56327e-06 -6.54853e-06
- 1.33783e-05 -3.68221e-05 -0.0724498 -0.0843663 -0.0792935
- -0.0406426 0.0200019 0.0426259 0.0220753 0.00668555 -0.000968483
- 0.024662 0.0383437 0.0911513 0.087848 0.0602076 0.0390559
- 0.0260573 0.0180444 0.012974 0.00985409 0.00788132 0.0064228
- 0.005545 0.00453571 0.00364245 0.00310278 0.00270523 0.00236439
- 0.0020945 0.00186808 0.00167493 0.00151731 0.00138594 0.00126945
- 0.00116695 0.0010762 0.000996366 0.000928387 0.000864414
- 0.000808258 0.000759574 0.000713865 0.000666712 0.000632716
- 0.000601262 0.000572163 0.000543986 0.000515253 0.0004897
- 0.000468112 0.000449313 0.000432981 0.000417911 0.000401307
- 0.000382712 0.000366678 0.000355736 0.000349171 0.000335727
- 0.000317091 0.000296086 0.000283543 0.000277366 0.000272233
- 0.000267001 0.000263147 0.000256699 0.000250251 0.000243803
- 0.000237355 0.000230907 0.000225424 0.000220247 0.000215069
- 0.000209892 0.000204714 0.000200213 0.000196548 0.000192884
- 0.00018922 0.000185556 0.000181892 0.000178228 0.000174564
- 0.0001709 0.000167236 0.000163572 0.000160824 0.000158279
- 0.000155733 0.000153187 0.000150641 0.000148095 0.000145549
- 0.000143003 0.000140457 0.000137911 0.000135457 0.000133386
- 0.000131315 0.000129245 0.000127174 0.000125103 0.000123032
- 0.000120961 0.000118891
- EOD
-
- @v[19].set(<<-'EOD')
- 1.86175 1.99994 2.0833 2.01627 2.42503 3.25769 3.62134 3.88827
- 4.09688 4.26773 4.40529 4.51734 4.60827 4.68313 4.74346
- 4.79302 4.72815 4.68959 4.70421 4.81316 5.01375 5.14493
- 5.10305 5.0699 5.04484 5.03751 5.03348 5.02504 5.01799 5.01271
- 5.00895 5.00628 5.0044 5.00309 5.00216 5.00151 5.00105 5.00073
- 5.00051 5.00034 5.00023 5.00015 5.0001 5.00007 5.00003 4.99998
- 4.99993 4.99993 4.99995 4.99999 5.00001 5.00003 5.00002
- 5.00001 5 5 5 5 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00017 5.17398
- 4.94779 3.78508 1.52302 0.608808 0.244311 0.126053 0.0597175
- 0.038422 0.0158174 0.00481338 0.00107847 0.000301256 0.000114861
- 0.00059489 -0.118904 -0.147478 -0.158986 -0.080544 0.165361
- 0.171378 0.0776087 0.0435738 0.0428235 0.0423755 0.0347695
- 0.0225061 0.0155539 0.0121357 0.0107997 0.0103976 0.0124406
- 0.016814 0.0167556 0.0149852 0.01459 0.0141182 0.0131934
- 0.0120286 0.0108692 0.0097184 0.00855881 0.00744912 0.00643877
- 0.00554044 0.00475165 0.00406535 0.00347158 0.00295981 0.00251995
- 0.00214318 0.00182101 0.00154613 0.00131196 0.0011119 0.000941587
- 0.000796999 0.000674582 0.000571283 0.000484276 0.000410649
- 0.000347005 0.000292984 0.000246715 0.000208143 0.00017489
- 0.000147412 0.000123854 0.000104332 8.77229e-05 7.40686e-05
- 6.2637e-05 5.32e-05 4.53946e-05 3.88343e-05 3.31864e-05
- 2.85905e-05 2.45725e-05 2.08671e-05 1.77301e-05 1.55911e-05
- 1.40153e-05 1.29421e-05 1.18693e-05 1.09815e-05 1.03484e-05
- 9.87664e-06 9.14446e-06 8.41228e-06 7.68011e-06 6.94793e-06
- 6.21575e-06 5.48357e-06 4.7514e-06 4.38454e-06 4.04432e-06
- 3.7041e-06 3.36388e-06 3.02366e-06 2.68344e-06 2.34322e-06
- 2.15196e-06 2.03791e-06 1.92386e-06 1.80982e-06 1.69577e-06
- 1.58173e-06 1.46768e-06 1.35363e-06 1.23959e-06 1.12554e-06
- 1.0115e-06 8.9745e-07 7.83404e-07 6.69358e-07 4.76113e-07
- -3.47071e-07 -1.17025e-06 -1.99344e-06 -2.81662e-06 0.0783754
- 0.0500262 -0.0659563 -0.120914 0.0815957 0.0154255 0.00347177
- 0.000840357 0.000214582 6.54655e-05 3.91709e-05 8.07396e-06
- -4.44265e-07 1.74384e-05 -4.52725e-05 -0.119379 -0.147984
- -0.159247 -0.0824604 0.169014 0.177628 0.0758742 0.010558
- -0.0346506 -0.0710288 -0.0838952 -0.0599521 -0.034568 -0.0181615
- -0.00968034 -0.00547115 -0.00333511 -0.00232468 -0.00181159
- -0.00143841 -0.00116601 -0.000839755 -0.000569764 -0.000578683
- -0.000490551 -0.000411712 -0.000437859 -0.000408185 -0.000356644
- -0.000311332 -0.000269006 -0.000221396 -0.000210054 -0.0001923
- -0.000175122 -0.000161039 -0.0001428 -0.000126123 -0.000127893
- -8.14516e-05 -0.000120166 -0.000154909 -0.000112733 -8.40377e-05
- -7.11342e-05 -8.09538e-05 -9.77789e-05 -9.82402e-05 -7.73531e-05
- -5.28255e-05 -3.1096e-05 -1.87967e-05 -1.96552e-05 -4.16655e-05
- -5.77185e-05 -5.24142e-05 -2.83153e-05 -1.90012e-05 -1.54415e-05
- -2.52569e-05 -6.23747e-05 -0.000130543 -0.000149394 -0.000110886
- -4.35517e-05 -4.17084e-05 -3.98651e-05 -3.80218e-05 -3.61785e-05
- -3.43352e-05 -3.36249e-05 -3.32729e-05 -3.29208e-05 -3.25687e-05
- -3.22166e-05 -3.17143e-05 -3.10258e-05 -3.03372e-05 -2.96486e-05
- -2.89601e-05 -2.82715e-05 -2.75829e-05 -2.68944e-05 -2.62058e-05
- -2.55173e-05 -2.48287e-05 -2.43043e-05 -2.38159e-05 -2.33276e-05
- -2.28393e-05 -2.2351e-05 -2.18626e-05 -2.13743e-05 -2.0886e-05
- -2.03977e-05 -1.99093e-05 -1.945e-05 -1.91122e-05 -1.87744e-05
- -1.84366e-05 -1.80987e-05 -1.77609e-05 -1.74231e-05 -1.70853e-05
- -1.67474e-05
- EOD
-
- @v[20].set(<<-'EOD')
- 1.86175 1.99724 2.17266 2.48439 3.15933 3.85231 4.38091
- 4.69033 4.85034 4.92851 4.96453 4.98188 4.98736 4.991 4.99482
- 4.9973 4.96422 4.89989 4.83907 4.83151 4.90868 5.04854 5.06104
- 5.04571 5.03219 5.03025 5.02273 5.01707 5.0123 5.0087 5.00611
- 5.00429 5.00301 5.00211 5.00148 5.00103 5.00072 5.0005 5.00035
- 5.00024 5.00016 5.00011 5.00007 5.00005 5.00003 5.00001
- 4.99999 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999
- 5 5 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 5.00002
- 5.00002 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5
- 5 5 4.99981 5.10081 5.10903 4.98404 5.00999 5.14946 4.36501
- 2.23938 0.325144 0.00660272 -0.0102186 -0.0082401 -0.00556785
- -0.00374178 -0.00264763 -0.00202823 -0.0182241 -0.0169551
- -0.0150395 0.0103736 0.0877592 0.104382 0.0515938 0.0373818
- 0.0411547 0.0397009 0.0308946 0.0205793 0.0154037 0.0129191
- 0.0119327 0.011527 0.0124295 0.0161152 0.0161076 0.0145391
- 0.0144541 0.0139287 0.0129215 0.0117239 0.0105795 0.00942983
- 0.00827423 0.00718354 0.00619954 0.00532868 0.00456631 0.00390448
- 0.00333254 0.00284003 0.00241714 0.00205524 0.0017458 0.00148202
- 0.00125739 0.0010655 0.000902213 0.000763611 0.000646279
- 0.000547291 0.000463934 0.000393401 0.000332424 0.000280655
- 0.000236328 0.000199386 0.000167536 0.000141218 0.000118654
- 9.99559e-05 8.40479e-05 7.09694e-05 6.00188e-05 5.09786e-05
- 4.3502e-05 3.72191e-05 3.18114e-05 2.74071e-05 2.35539e-05
- 1.99967e-05 1.69871e-05 1.49449e-05 1.3451e-05 1.24492e-05
- 1.14256e-05 1.05669e-05 9.94487e-06 9.47514e-06 8.77318e-06
- 8.07123e-06 7.36927e-06 6.66731e-06 5.96536e-06 5.2634e-06
- 4.56144e-06 4.23044e-06 3.92649e-06 3.62254e-06 3.31858e-06
- 3.01463e-06 2.71068e-06 2.40673e-06 2.23063e-06 2.12082e-06
- 2.01102e-06 1.90121e-06 1.7914e-06 1.68159e-06 1.57178e-06
- 1.46197e-06 1.35216e-06 1.24235e-06 1.13255e-06 1.02274e-06
- 9.12929e-07 8.0312e-07 6.33171e-07 -1.51288e-08 -6.63428e-07
- -1.31173e-06 -1.96003e-06 0.0437517 0.0265689 -0.0515377
- -0.0658688 0.010727 -0.000511921 -8.36924e-05 2.13278e-05
- 1.45207e-05 4.54862e-06 -6.14726e-06 2.0062e-06 1.02709e-06
- 1.4152e-05 -3.08225e-05 -0.0166501 -0.0157139 -0.013957
- 0.0107537 0.0873717 0.111302 0.0454129 -0.00530142 -0.0468336
- -0.0790063 -0.0826944 -0.0534753 -0.0288705 -0.0149009 -0.00801592
- -0.0046342 -0.00291835 -0.00213019 -0.00170055 -0.001352
- -0.00110593 -0.000742655 -0.000532042 -0.000544742 -0.000479206
- -0.000407307 -0.000403575 -0.000366209 -0.000324161 -0.000286183
- -0.000247579 -0.000214281 -0.000203435 -0.000186896 -0.000171033
- -0.00015779 -0.000145259 -0.000128069 -0.000122647 -9.89398e-05
- -0.000114926 -0.000132195 -0.000107872 -8.91015e-05 -7.87996e-05
- -8.14061e-05 -8.9098e-05 -8.83368e-05 -7.6122e-05 -6.14668e-05
- -4.75402e-05 -3.81855e-05 -3.69696e-05 -4.78656e-05 -5.61346e-05
- -5.35007e-05 -4.1459e-05 -3.35411e-05 -2.52374e-05 -2.37479e-05
- -4.6406e-05 -9.41884e-05 -0.000109222 -8.52676e-05 -4.25166e-05
- -4.10125e-05 -3.95085e-05 -3.80045e-05 -3.65004e-05 -3.49964e-05
- -3.41627e-05 -3.3541e-05 -3.29193e-05 -3.22976e-05 -3.16758e-05
- -3.10334e-05 -3.03653e-05 -2.96971e-05 -2.9029e-05 -2.83609e-05
- -2.76928e-05 -2.70246e-05 -2.63565e-05 -2.56884e-05 -2.50203e-05
- -2.43521e-05 -2.38716e-05 -2.34324e-05 -2.29932e-05 -2.25539e-05
- -2.21147e-05 -2.16755e-05 -2.12362e-05 -2.0797e-05 -2.03578e-05
- -1.99186e-05 -1.95079e-05 -1.9217e-05 -1.8926e-05 -1.8635e-05
- -1.8344e-05 -1.8053e-05 -1.7762e-05 -1.74711e-05 -1.71801e-05
- EOD
-
- @v[21].set(<<-'EOD')
- 1.86175 1.73273 1.42016 1.02483 0.944013 0.274107 0.0823742
- 0.0379366 0.020816 0.0132952 0.00955525 0.00717008 0.00592286
- 0.00437379 0.00383557 0.00273694 -0.0037467 -0.0054191 -0.00131454
- 0.0112179 0.0133918 0.00519747 -0.00260113 -0.00252847 -0.00181292
- 0.000183398 -0.000667607 -0.000750747 -0.000594314 -0.000433904
- -0.000308985 -0.000217858 -0.000152926 -0.000107454 -7.54076e-05
- -5.2675e-05 -3.66299e-05 -2.54341e-05 -1.75095e-05 -1.18848e-05
- -7.97289e-06 -5.30239e-06 -3.53615e-06 -2.38504e-06 -2.40158e-06
- -3.84485e-06 -5.29435e-06 -2.57099e-06 1.95189e-06 3.55083e-06
- 2.06179e-06 5.72753e-07 3.30469e-07 3.40296e-07 3.60221e-07
- 4.86081e-07 6.1194e-07 7.37799e-07 8.63659e-07 9.89518e-07
- 9.21274e-07 7.22275e-07 5.23276e-07 3.24277e-07 1.25278e-07
- -5.59467e-08 -9.03265e-08 -1.24706e-07 -1.59086e-07 -1.93466e-07
- -2.27846e-07 -2.62226e-07 -2.96605e-07 -3.30985e-07 -3.65365e-07
- -3.99745e-07 -4.24266e-07 -3.82163e-07 -3.40061e-07 -2.97959e-07
- -2.55857e-07 -2.13755e-07 -1.71652e-07 -1.2955e-07 -8.7448e-08
- -4.53457e-08 -3.24353e-09 3.76901e-08 7.19937e-08 1.06297e-07
- 1.40601e-07 1.74904e-07 2.09208e-07 2.43512e-07 2.77815e-07
- 3.12119e-07 3.46422e-07 3.80726e-07 4.04507e-07 3.77191e-07
- 3.49876e-07 3.22561e-07 2.95246e-07 2.67931e-07 2.40616e-07
- 2.13301e-07 1.85986e-07 1.58671e-07 1.31356e-07 1.04041e-07
- 7.67256e-08 4.94105e-08 2.20955e-08 -5.21962e-09 -3.25347e-08
- -5.98498e-08 -8.71649e-08 -1.1448e-07 -1.41795e-07 -1.6911e-07
- 7.87893e-06 0.0114592 -0.0245712 -0.111637 0.0961324 1.61168
- 3.22343 4.20442 4.53535 4.83834 4.95464 4.98874 4.99746
- 4.99883 4.99948 4.99815 4.98431 4.99298 4.99718 5.01948
- 5.04749 5.008 4.98243 4.98985 4.99781 4.99887 4.99679 4.99616
- 4.99743 4.99859 4.99936 4.99972 5.00058 5.00123 5.0002 4.99945
- 4.99983 4.9998 4.99966 4.99958 4.99956 4.99956 4.99956 4.99958
- 4.99961 4.99965 4.99969 4.99973 4.99977 4.9998 4.99983 4.99985
- 4.99987 4.99989 4.99991 4.99992 4.99993 4.99994 4.99995
- 4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00001 5.00001
- 5.00001 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002
- 5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5 5 5 4.99999 4.99998 4.99997 4.99996 5.01454
- 4.99566 4.96796 4.99819 5.03232 5.00034 4.99867 4.99937
- 4.99977 4.99992 4.99997 4.99999 5.00001 5.00021 4.99974
- 4.98462 4.99301 4.99723 5.01936 5.04807 5.00929 4.9789 4.97876
- 4.98244 4.9863 4.99575 5.0069 5.00863 5.00624 5.00357 5.0019
- 5.00098 5.00048 5.00025 5.00016 5.00011 5.00013 5.00009
- 4.99982 4.99994 5.00005 4.99994 4.99988 4.99989 4.99997
- 5.00003 5.00005 5.00002 5.00001 5.00001 5.00001 4.99993
- 4.99999 5 5.00021 4.99997 4.99981 5 5.00009 5.0001 5.00001
- 4.99991 4.9999 5 5.00011 5.00017 5.00018 5.00018 5.00014
- 5.00007 4.99999 4.9999 4.9999 5.00001 5.00016 5.00014 4.99999
- 4.99993 4.99999 5.00009 5.00007 5.00006 5.00004 5.00003
- 5.00001 5.00001 5 4.99999 4.99998 4.99997 4.99997 4.99997
- 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999
- 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002
- 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5 5
- EOD
-
- @v[22].set(<<-'EOD')
- 7.10441e-10 0.00107105 0.000637109 -0.00236346 -0.018079
- -0.0120077 -0.00217059 0.00266679 0.00403383 0.00403836
- 0.00356705 0.00303303 0.00244716 0.00198586 0.0016855 0.00136497
- -3.96022e-05 -0.000367409 -3.77079e-05 0.00194085 0.00506964
- -0.0400214 -0.0402572 0.0524434 0.286234 0.803011 1.44795
- 2.02473 2.54768 3.02748 3.4415 3.78287 4.09667 4.35152 4.53987
- 4.67614 4.77407 4.84319 4.89227 4.92702 4.95119 4.96764
- 4.97846 4.98557 4.98982 4.99209 4.99371 4.99569 4.99727
- 4.99802 4.99834 4.99867 4.99892 4.99915 4.99936 4.99939
- 4.99943 4.99946 4.9995 4.99953 4.99957 4.9996 4.99963 4.99967
- 4.9997 4.99973 4.99974 4.99975 4.99976 4.99977 4.99978 4.9998
- 4.99981 4.99982 4.99983 4.99984 4.99985 4.99986 4.99986
- 4.99986 4.99987 4.99987 4.99988 4.99988 4.99989 4.99989
- 4.9999 4.9999 4.9999 4.9999 4.99991 4.99991 4.99991 4.99991
- 4.99992 4.99992 4.99992 4.99992 4.99993 4.99993 4.99993
- 4.99993 4.99993 4.99993 4.99993 4.99993 4.99994 4.99994
- 4.99994 4.99994 4.99994 4.99994 4.99994 4.99994 4.99995
- 4.99995 4.99995 4.99995 4.99995 4.99995 4.99995 5.00145
- 5.00659 5.01209 5.01931 5.00279 4.99273 4.99217 4.99295
- 4.99471 4.99594 4.99696 4.9978 4.99844 4.99891 4.99924 4.99635
- 4.99699 4.99813 5.00068 5.00307 5.0588 4.96365 4.54012 3.6307
- 2.35176 1.0322 0.354379 0.115986 0.0435668 0.0245112 0.020786
- 0.0164656 0.0118409 0.00849698 0.00597078 0.0040105 0.0026076
- 0.0016597 0.00118185 0.00121067 0.00153587 0.00174836 0.00136519
- -0.000189116 -0.00315555 -0.00646603 -0.00898042 -0.010203
- -0.0110896 -0.0123764 -0.00953841 -0.00225795 0.000818314
- 0.00152252 0.00150269 0.00119025 0.000767068 0.000308852
- -3.79272e-05 -0.00019691 -0.000186642 -9.73653e-05 -8.49784e-06
- 2.04147e-05 -9.91086e-06 -1.55959e-05 -1.80499e-05 -1.77097e-05
- -1.51548e-05 -1.1978e-05 -9.84916e-06 -1.29728e-05 -1.67235e-05
- -1.74153e-05 -1.39958e-05 -5.92272e-06 -8.08216e-06 -1.53077e-05
- -2.92531e-05 -3.91049e-05 -2.98935e-05 -7.32122e-06 3.18534e-05
- 4.39134e-05 4.18753e-05 3.22759e-05 1.86766e-05 1.58432e-05
- 1.30098e-05 1.01765e-05 7.34312e-06 4.50975e-06 1.67639e-06
- -1.15697e-06 -1.23877e-06 -1.11991e-06 -1.00106e-06 -8.82208e-07
- -7.63355e-07 -6.44502e-07 -5.2565e-07 -4.29318e-07 -3.44661e-07
- -2.60004e-07 -1.75347e-07 -9.06904e-08 -6.03349e-09 7.86234e-08
- 1.6328e-07 2.47937e-07 3.32594e-07 4.17251e-07 5.01908e-07
- 5.86565e-07 6.71222e-07 7.36123e-07 6.43886e-07 5.5165e-07
- 4.59414e-07 3.67178e-07 0.000334759 -4.60833e-05 -0.00106139
- -0.00166624 0.000859563 0.00102606 0.00410037 0.00419931
- 0.00518997 0.00459791 0.00503125 0.00523877 0.00452158 0.00339924
- 0.00233399 0.000876915 0.000546439 0.000444299 0.000983968
- 0.00119304 -0.0429422 -0.0403983 0.0534896 0.288013 0.807345
- 1.44247 2.03448 2.57021 3.05049 3.47332 3.8131 4.1009 4.34677
- 4.53512 4.67127 4.76531 4.82526 4.86593 4.89586 4.91904
- 4.93806 4.95348 4.96597 4.97629 4.9843 4.98983 4.99335 4.9957
- 4.99741 4.99864 4.99946 4.99994 5.00047 5.00073 5.00086
- 5.00092 5.00094 5.00091 5.00087 5.00081 5.00074 5.00067
- 5.00059 5.00052 5.00046 5.0004 5.00034 5.0003 5.00026 5.00022
- 5.00019 5.00016 5.00014 5.00012 5.0001 5.00009 5.00007 5.00006
- 5.00006 5.00005 5.00004 5.00004 5.00004 5.00003 5.00003
- 5.00003 5.00002 5.00002 5.00002 5.00002 5.00001 5.00001
- 5.00001 5.00001 5.00001 5 5 5 5 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5.00001 5.00001
- 5.00001 5.00001 5.00002 5.00002
- EOD
-
- @v[23].set(<<-'EOD')
- 5 5.00284 5.01266 5.01895 4.98936 4.99575 4.99217 4.99545
- 4.99775 4.99894 4.99946 4.99968 4.99975 4.99977 4.99986
- 4.9999 4.99528 4.99808 5.00039 5.00392 5.00512 4.99985 4.99863
- 4.99942 4.99992 5.00017 4.99897 4.99803 4.99784 4.99739
- 4.99883 5.00365 5.00298 5.00133 5.00048 5.00019 5.00008
- 5.00005 5.00004 5.00003 5.00002 5.00002 5.00001 5.00001
- 5.00001 5.00001 5.00001 5 5 4.99999 4.99997 4.99995 4.99996
- 4.99998 5 5.00001 5.00001 5.00002 5.00002 5.00003 5.00003
- 5.00002 5.00002 5.00001 5.00001 5 5 5 5 5 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99998 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002
- 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5 5 5 5 5 5 5 5.00217 5.00108 4.99547 4.99658 5.00667
- 4.99641 4.99532 4.99938 5.00328 5.00222 5.00114 5.00052
- 5.00024 5.00011 5.00009 4.99285 4.99591 4.99897 5.00403
- 5.00786 5.00318 4.99942 4.9992 4.99949 5.001 5.00408 5.00319
- 5.00063 4.99995 5.00014 4.99982 4.99832 4.99838 4.99865
- 4.99912 4.99836 4.99735 4.99606 4.99814 5.00958 5.02973
- 5.05293 5.06103 4.99342 4.80726 4.50744 4.07509 3.41358
- 2.37924 1.03194 0.261552 0.142392 0.0904482 0.0555071 0.0322869
- 0.018289 0.0113802 0.00875182 0.00757055 0.00629906 0.00523
- 0.00403349 0.0031953 0.00280864 0.00286119 0.00250389 0.00202815
- 0.001723 0.00147312 0.0012411 0.00104401 0.000886204 0.000758277
- 0.000651915 0.00056348 0.000487966 0.000424048 0.000365613
- 0.000308178 0.000258725 0.000228061 0.000207976 0.000198491
- 0.00018518 0.000172716 0.000163197 0.000155007 0.000141734
- 0.000128461 0.000115188 0.000101915 8.86417e-05 7.53686e-05
- 6.20956e-05 5.69164e-05 5.23275e-05 4.77385e-05 4.31495e-05
- 3.85605e-05 3.39716e-05 2.93826e-05 2.69449e-05 2.56224e-05
- 2.42999e-05 2.29774e-05 2.16549e-05 2.03324e-05 1.90099e-05
- 1.76873e-05 1.63648e-05 1.50423e-05 1.37198e-05 1.23973e-05
- 1.10748e-05 9.75232e-06 8.48447e-06 7.65129e-06 6.81811e-06
- 5.98494e-06 5.15176e-06 0.00056893 -0.00787906 -0.0217381
- -0.0370066 -0.00770505 0.00659312 0.00975477 0.00949456
- 0.00777552 0.00655645 0.00568776 0.00508782 0.00458121 0.00410187
- 0.00365665 0.0015121 0.00160863 0.00263181 0.00638941 0.00772607
- 0.00225583 0.0010843 0.000882939 0.000801563 0.00075632
- 0.000554992 0.000435131 0.0003474 0.000217667 0.000491602
- 0.0012267 0.00250446 0.000212058 -0.0174972 -0.0527527 -0.0479071
- 0.194908 1.45838 3.40677 4.49242 4.86894 4.97215 5.01218
- 5.04342 5.06228 5.03069 4.87169 4.57056 4.11523 3.38264
- 2.19691 0.715839 0.172818 0.102162 0.0627162 0.0363388 0.020289
- 0.0119414 0.00826608 0.0066417 0.00549092 0.00492505 0.00439443
- 0.0037156 0.00306471 0.00247451 0.00195965 0.0014822 0.0010815
- 0.000904464 0.0010514 0.00152308 0.00120752 0.000228447
- -0.00102833 -0.00116644 -0.00042067 4.78758e-05 5.09599e-05
- -4.45756e-05 -3.22966e-06 3.81163e-05 7.94622e-05 0.000120808
- 0.000162154 0.000161895 0.000148481 0.000135068 0.000121654
- 0.000108241 9.81453e-05 9.2164e-05 8.61827e-05 8.02014e-05
- 7.42201e-05 6.82388e-05 6.22576e-05 5.62763e-05 5.0295e-05
- 4.43137e-05 3.83324e-05 3.54323e-05 3.321e-05 3.09877e-05
- 2.87654e-05 2.65431e-05 2.43209e-05 2.20986e-05 1.98763e-05
- 1.7654e-05 1.54317e-05 1.34612e-05 1.25441e-05 1.1627e-05
- 1.07099e-05 9.79276e-06 8.87564e-06 7.95851e-06 7.04139e-06
- 6.12427e-06
- EOD
-
- @v[24].set(<<-'EOD')
- 5 5.01099 5.00866 4.97845 4.92369 4.9273 4.97413 4.9929
- 4.99826 4.99958 4.99978 5.00005 4.99968 4.99959 5.00014
- 4.99979 4.99914 4.99982 5.00023 5.00295 5.00664 4.99854
- 4.99647 5.00438 5.01722 5.03681 5.04766 5.04799 5.04867
- 5.04873 5.04685 5.04413 5.0367 5.02505 5.01726 5.01183 5.00806
- 5.00549 5.00371 5.00246 5.00162 5.00105 5.00069 5.00045
- 5.00031 5.00024 5.00019 5.00012 5.00007 5.00004 5.00001
- 4.99998 4.99999 4.99999 5 5.00001 5.00001 5.00002 5.00002
- 5.00003 5.00003 5.00003 5.00002 5.00002 5.00001 5.00001
- 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 5 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5.00418 4.99953 4.99152
- 4.99807 5.00497 5.00112 5.00055 5.00038 5.00018 5.00006
- 5.00006 5.00007 5.00006 5.00004 5.00004 4.99853 4.99945
- 4.99998 5.00304 5.00935 5.00742 4.99181 4.97421 4.93603
- 4.8853 4.8927 4.93984 4.97458 4.99039 4.99614 4.99801 4.99851
- 4.99869 4.99924 5.00108 5.00181 5.00119 5.00059 5.00031
- 5.00022 5.00018 5.00011 5.00001 5.00006 4.99981 4.99977
- 4.99982 5.00012 4.99993 5.00008 5.00043 5.00048 5.00024
- 5.00008 4.99984 4.99993 5.00011 4.99996 4.9998 4.99977 4.9998
- 4.99993 5.00008 5.00011 5.00002 4.99995 4.99989 4.99993
- 5 5.00007 5.00009 4.99994 4.99977 4.9997 4.99975 4.99996
- 4.99996 4.99988 4.9997 4.99952 4.9995 4.99956 4.99973 4.99988
- 5.00005 5.00025 5.00042 5.00036 5.00031 5.00025 5.0002 5.00014
- 5.00009 5.00003 5.00002 5.00001 5.00001 5 4.99999 4.99998
- 4.99998 4.99997 4.99998 4.99998 4.99998 4.99998 4.99998
- 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5.00284
- 5.00442 5.00381 4.98997 4.99092 5.00733 5.07791 4.98237
- 4.86434 4.76835 4.74067 4.79278 4.85094 4.90068 4.93603
- 4.95698 4.96984 4.97856 4.98869 4.99904 5.0005 4.99524 5.00181
- 5.01878 5.05177 5.07986 4.98917 4.56217 3.68 2.3539 1.18541
- 0.505772 0.221044 0.115287 0.0760938 0.0589194 0.0476784
- 0.0457213 0.0412911 0.033889 0.0259741 0.0191452 0.0139018
- 0.0100235 0.00711788 0.00497657 0.00349368 0.00250021 0.00176179
- 0.00121843 0.000838368 0.000582711 0.000423458 0.000294608
- 0.000201251 0.000133748 8.6227e-05 5.44252e-05 3.30514e-05
- 1.93926e-05 1.09814e-05 5.29857e-06 1.92247e-06 3.08708e-07
- -3.74311e-07 -6.11121e-07 -7.27807e-07 -4.87604e-07 -4.80493e-07
- -9.15925e-07 -2.03774e-06 -4.01128e-06 -2.46644e-06 2.10626e-06
- 8.22422e-06 1.04922e-05 9.83047e-06 7.27106e-06 3.29654e-06
- -2.06736e-06 -2.18019e-06 -2.29303e-06 -2.40586e-06 -2.51869e-06
- -2.63153e-06 -2.24615e-06 -1.70325e-06 -1.16036e-06 -6.17468e-07
- -7.45754e-08 2.45198e-07 2.88285e-07 3.31373e-07 3.7446e-07
- 4.17548e-07 4.60635e-07 5.03723e-07 5.4681e-07 5.89898e-07
- 6.32985e-07 6.76073e-07 6.19054e-07 5.4001e-07 4.60967e-07
- 3.81923e-07 3.02879e-07 2.23836e-07 1.44792e-07 6.57488e-08
- -1.32948e-08 -9.23383e-08 -1.6698e-07 -2.23206e-07 -2.79432e-07
- -3.35658e-07 -3.91884e-07 -4.48109e-07 -5.04335e-07 -5.60561e-07
- -6.16787e-07
- EOD
-
- @v[25].set(<<-'EOD')
- 1.34824 1.35838 1.36465 1.34675 1.29167 1.23161 1.2201 1.2185
- 1.2181 1.21798 1.21793 1.21788 1.21785 1.21782 1.21779 1.21776
- 1.21655 1.21656 1.21669 1.21871 1.22421 1.22247 1.21858
- 1.2228 1.23803 1.27737 1.10647 0.395248 0.0600669 0.027687
- 0.0192374 0.015425 0.0130881 0.00977445 0.00696598 0.00491122
- 0.00341952 0.00237078 0.00162339 0.00109178 0.000726647
- 0.000478886 0.00031568 0.000207902 0.000143494 0.000109768
- 8.62987e-05 5.69775e-05 3.36547e-05 2.30356e-05 1.86108e-05
- 1.41861e-05 1.08293e-05 7.68835e-06 4.79593e-06 4.51019e-06
- 4.22444e-06 3.9387e-06 3.65295e-06 3.36721e-06 3.04559e-06
- 2.69981e-06 2.35403e-06 2.00825e-06 1.66247e-06 1.34508e-06
- 1.26225e-06 1.17941e-06 1.09657e-06 1.01373e-06 9.30893e-07
- 8.48054e-07 7.65216e-07 6.82378e-07 5.9954e-07 5.16702e-07
- 4.37489e-07 3.82774e-07 3.2806e-07 2.73346e-07 2.18632e-07
- 1.63917e-07 1.09203e-07 5.4489e-08 -2.2523e-10 -5.49395e-08
- -1.09654e-07 -1.52862e-07 -1.3079e-07 -1.08718e-07 -8.6646e-08
- -6.45739e-08 -4.25019e-08 -2.04298e-08 1.64229e-09 2.37144e-08
- 4.57864e-08 6.78585e-08 8.71693e-08 9.30725e-08 9.89758e-08
- 1.04879e-07 1.10782e-07 1.16685e-07 1.22589e-07 1.28492e-07
- 1.34395e-07 1.40298e-07 1.46201e-07 1.52105e-07 1.58008e-07
- 1.63911e-07 1.69814e-07 1.75718e-07 1.81621e-07 1.87524e-07
- 1.93427e-07 1.9933e-07 2.05234e-07 2.11137e-07 2.19788e-07
- 0.000393944 -0.000218983 -0.00105784 0.00172403 -0.00027134
- -0.000204147 8.79968e-06 5.93762e-05 5.83554e-05 4.13815e-05
- 3.71369e-05 3.03372e-05 2.25336e-05 1.5986e-05 1.07284e-05
- -7.5239e-05 5.60593e-05 6.97571e-05 0.000667617 0.000960856
- 0.00131749 -0.00759564 -0.0217897 -0.0450321 -0.076646 -0.128569
- -0.186391 -0.202175 -0.206953 -0.2082 -0.208416 -0.208669
- -0.208934 -0.209111 -0.209234 -0.209329 -0.209389 -0.209416
- -0.2094 -0.209329 -0.20926 -0.209204 -0.209208 -0.209285
- -0.209454 -0.209641 -0.20977 -0.209811 -0.209833 -0.209887
- -0.209653 -0.209127 -0.208893 -0.208811 -0.208777 -0.208758
- -0.208747 -0.20874 -0.208726 -0.208697 -0.208657 -0.208611
- -0.208565 -0.208524 -0.208488 -0.208451 -0.208412 -0.208373
- -0.208333 -0.208294 -0.208256 -0.208219 -0.208183 -0.208145
- -0.208107 -0.208066 -0.208029 -0.207993 -0.207959 -0.207923
- -0.207883 -0.207838 -0.207789 -0.207747 -0.20771 -0.207675
- -0.207642 -0.207605 -0.207568 -0.207531 -0.207494 -0.207457
- -0.20742 -0.207383 -0.207346 -0.207308 -0.207271 -0.207233
- -0.207196 -0.207158 -0.207121 -0.207084 -0.207046 -0.207009
- -0.206972 -0.206935 -0.206898 -0.206861 -0.206823 -0.206786
- -0.206749 -0.206712 -0.206675 -0.206638 -0.2066 -0.206563
- -0.206526 -0.206489 -0.206452 -0.206415 -0.203384 -0.20015
- -0.196872 -0.205024 -0.210727 -0.206779 -0.0685263 0.586138
- 1.4665 2.22945 2.77554 3.076 3.24926 3.34515 3.40164 3.43006
- 3.43713 3.43075 3.42886 3.4384 3.46567 3.49025 3.51287 3.53821
- 3.57841 3.39846 2.80753 2.22947 1.7549 1.30429 0.707786
- 0.303206 0.131352 0.0671706 0.0429955 0.032461 0.0257161
- 0.0239521 0.0217397 0.0179705 0.0138745 0.0102813 0.00749643
- 0.0054328 0.00386817 0.0027004 0.00189442 0.00135552 0.000954715
- 0.000659981 0.000453435 0.000313993 0.000231347 0.000159665
- 0.000108122 7.10528e-05 4.50233e-05 2.77892e-05 1.62765e-05
- 8.9893e-06 4.5471e-06 1.54614e-06 -1.6542e-07 -8.68508e-07
- -1.04369e-06 -9.63086e-07 -8.44294e-07 -6.57339e-07 -7.35885e-07
- -9.80056e-07 -1.39772e-06 -2.10199e-06 -1.37474e-06 6.13269e-07
- 3.3028e-06 4.60941e-06 4.91053e-06 4.14186e-06 2.45258e-06
- -8.7388e-09 -3.59647e-07 -7.10554e-07 -1.06146e-06 -1.41237e-06
- -1.76328e-06 -1.63073e-06 -1.34534e-06 -1.05995e-06 -7.74561e-07
- -4.8917e-07 -2.95733e-07 -2.16326e-07 -1.3692e-07 -5.75135e-08
- 2.18929e-08 1.01299e-07 1.80706e-07 2.60112e-07 3.39519e-07
- 4.18925e-07 4.98332e-07 4.83984e-07 4.4901e-07 4.14035e-07
- 3.79061e-07 3.44087e-07 3.09112e-07 2.74138e-07 2.39163e-07
- 2.04189e-07 1.69215e-07 1.26002e-07 4.83213e-08 -2.9359e-08
- -1.07039e-07 -1.8472e-07 -2.624e-07 -3.4008e-07 -4.1776e-07
- -4.95441e-07
- EOD
-
- @v[26].set(<<-'EOD')
- 7.10441e-10 0.000309731 -0.000308186 -0.001694 -0.00360784
- 8.40909e-05 0.00203175 0.0012896 0.000596548 0.000277191
- 0.000161134 0.000120439 8.4915e-05 9.49929e-05 6.18812e-05
- 1.65433e-05 1.89682e-05 3.97578e-05 4.95446e-05 0.000225325
- 0.000214579 -0.00230134 -0.000451102 0.00997237 0.0341443
- 0.0449314 0.0424411 0.0341996 0.0315315 0.0308892 0.0291614
- 0.024365 0.0190282 0.0188976 0.017238 0.0138526 0.0105645
- 0.00778548 0.00561753 0.0039871 0.00279554 0.00194075 0.0013468
- 0.000934775 0.000664723 0.000498911 0.000377384 0.000254183
- 0.000163421 0.000120773 9.65058e-05 7.22384e-05 5.60316e-05
- 4.14549e-05 2.79516e-05 2.57096e-05 2.34677e-05 2.12257e-05
- 1.89837e-05 1.67417e-05 1.46737e-05 1.27228e-05 1.07719e-05
- 8.82099e-06 6.87009e-06 5.0896e-06 4.71705e-06 4.34451e-06
- 3.97196e-06 3.59941e-06 3.22686e-06 2.85431e-06 2.48176e-06
- 2.10921e-06 1.73666e-06 1.36411e-06 1.02855e-06 9.42931e-07
- 8.57316e-07 7.71701e-07 6.86086e-07 6.00471e-07 5.14856e-07
- 4.29241e-07 3.43626e-07 2.58011e-07 1.72396e-07 9.85409e-08
- 9.14091e-08 8.42773e-08 7.71456e-08 7.00138e-08 6.2882e-08
- 5.57503e-08 4.86185e-08 4.14867e-08 3.4355e-08 2.72232e-08
- 2.05821e-08 1.63235e-08 1.2065e-08 7.80643e-09 3.54786e-09
- -7.10696e-10 -4.96926e-09 -9.22782e-09 -1.34864e-08 -1.77449e-08
- -2.20035e-08 -2.62621e-08 -3.05206e-08 -3.47792e-08 -3.90378e-08
- -4.32963e-08 -4.75549e-08 -5.18134e-08 -5.6072e-08 -6.03306e-08
- -6.45891e-08 -6.88477e-08 -8.76373e-06 0.000131607 -0.00021685
- -0.000433027 0.00047234 0.000211593 -0.000189601 3.2492e-05
- 0.000575955 7.72235e-05 -0.000285172 -0.000242061 -0.000135112
- -3.50117e-05 -2.75868e-05 5.48974e-05 1.80604e-07 5.48911e-05
- 3.97478e-05 0.000192909 0.000297932 0.00402253 -0.0122366
- -0.047853 -0.0963082 -0.108071 -0.0567275 -0.0239271 -0.0178628
- -0.0233027 -0.031853 -0.0400843 -0.0482725 -0.0576154 -0.0627218
- -0.0511236 -0.0279524 -0.0150986 -0.00931091 -0.00652876
- -0.00479286 -0.00344346 -0.00249578 -0.0019532 -0.00157977
- -0.00131848 -0.00111251 -0.000939229 -0.000797445 -0.000708384
- -0.000630452 -0.000539722 -0.000508862 -0.000480596 -0.000439484
- -0.000407217 -0.000363866 -0.000329506 -0.000318642 -0.000307362
- -0.000286511 -0.000266253 -0.000242943 -0.000218107 -0.000204661
- -0.00020241 -0.000194435 -0.000185062 -0.000173042 -0.000160549
- -0.000151407 -0.000145626 -0.000145976 -0.000147342 -0.000145288
- -0.000137979 -0.000124481 -0.000123218 -0.000127453 -0.000139006
- -0.000145486 -0.000129764 -9.82749e-05 -4.72596e-05 -3.08671e-05
- -3.28834e-05 -4.52254e-05 -6.25389e-05 -6.32516e-05 -6.39643e-05
- -6.4677e-05 -6.53897e-05 -6.61023e-05 -6.6815e-05 -6.75277e-05
- -6.61005e-05 -6.45173e-05 -6.29341e-05 -6.13509e-05 -5.97676e-05
- -5.81844e-05 -5.66012e-05 -5.54231e-05 -5.4455e-05 -5.3487e-05
- -5.25189e-05 -5.15508e-05 -5.05828e-05 -4.96147e-05 -4.86466e-05
- -4.76785e-05 -4.67105e-05 -4.57424e-05 -4.47743e-05 -4.38063e-05
- -4.28382e-05 -4.18821e-05 -4.10211e-05 -4.016e-05 -3.9299e-05
- -3.8438e-05 4.29885e-05 5.14113e-05 -0.000127986 -0.000611463
- -0.000149428 0.000882394 0.00297059 -0.00405825 -0.00591067
- -0.00546997 -0.00158744 0.00190677 0.00298403 0.00268595
- 0.00196161 0.00130289 0.000783347 0.000520683 0.000565306
- 0.00053419 -0.00224696 -0.000920818 0.0132755 0.0322504
- 0.0442808 0.0638615 0.0701007 0.0539356 0.0247771 0.056244
- 0.294266 0.831368 1.45424 2.02898 2.54559 2.9937 3.35333
- 3.72609 4.06363 4.32789 4.52413 4.66504 4.7652 4.83637 4.88631
- 4.92109 4.94464 4.96046 4.97218 4.98079 4.98679 4.99076
- 4.99361 4.99555 4.99686 4.99783 4.99853 4.99902 4.99936
- 4.99959 4.99973 4.99983 4.9999 4.99993 4.99996 4.99998 5
- 5.00001 5 4.99999 4.99997 4.99994 4.99993 4.99994 4.99996
- 4.99999 5.00004 5.00006 5.00005 5.00003 5.00002 5.00001
- 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998
- EOD
-
- @v[27].set(<<-'EOD')
- 5 4.99984 4.99796 4.99478 4.9889 4.98738 4.98896 4.99087
- 4.99262 4.99419 4.99552 4.99659 4.99743 4.99807 4.99855
- 4.9989 4.99894 4.99908 4.99935 5.00001 5.0007 5.00132 5.00032
- 4.99976 5.00134 5.00339 5.00315 5.00157 5.00091 5.00058
- 5.00012 4.99944 4.99886 4.9994 4.99934 4.99899 4.99876 4.99868
- 4.99872 4.99883 4.99898 4.99914 4.9993 4.99944 4.99956 4.99967
- 4.99976 4.99982 4.99986 4.9999 4.99993 4.99997 4.99997 4.99998
- 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998
- 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00009 5.00028 5.00015 4.99983
- 5.00036 4.99996 4.99834 4.99783 5.00383 5.00734 5.00387
- 5.00058 4.99893 4.99836 4.99832 4.99854 4.99873 4.99905
- 4.99927 4.99952 4.99969 4.99834 4.99536 4.99163 4.99073
- 5.0053 5.03631 5.03103 4.9008 4.62503 4.21887 3.70902 3.09967
- 2.35791 1.41912 0.519675 0.210458 0.131362 0.0980819 0.0708209
- 0.0471701 0.0323272 0.0253535 0.0199144 0.0152615 0.0117228
- 0.00917696 0.00738117 0.00609292 0.00512664 0.00436184 0.0037961
- 0.00331639 0.00289006 0.0025477 0.00226529 0.00202925 0.00182793
- 0.00165474 0.00150531 0.00137529 0.00125983 0.00115603 0.00106455
- 0.000982977 0.000911255 0.000846819 0.000790092 0.000738698
- 0.000692816 0.00065107 0.000613595 0.000579642 0.000548935
- 0.00052106 0.000495598 0.000472174 0.000450849 0.000431118
- 0.000412667 0.000395868 0.000381319 0.000368487 0.000357327
- 0.000344212 0.000330334 0.00031622 0.000303298 0.000295809
- 0.00028832 0.000280831 0.000273342 0.000265853 0.000258364
- 0.000250875 0.000245118 0.000239488 0.000233857 0.000228227
- 0.000222596 0.000216966 0.000211336 0.000207047 0.000203455
- 0.000199863 0.00019627 0.000192678 0.000189085 0.000185493
- 0.0001819 0.000178308 0.000174716 0.000171123 0.000167531
- 0.000163938 0.000160346 0.000156835 0.000153973 0.00015111
- 0.000148248 0.000145385 0.000296579 -3.96718e-05 -0.000449085
- 0.000323433 0.000750086 0.000268264 0.000149028 -0.000100249
- 7.00956e-05 0.00012605 0.00022592 0.000193036 0.000120453
- 8.07865e-05 7.65771e-05 -3.27828e-05 0.000116759 0.000169498
- 0.000409804 0.000414965 0.00092323 -0.00590633 -0.0175477
- -0.032433 -0.0559842 -0.0820373 0.0688484 0.626629 1.32929
- 2.01657 2.60925 3.12329 3.38952 3.14128 2.38463 1.23802
- 0.316019 0.107832 0.0694707 0.051837 0.035247 0.0209999
- 0.0116618 0.00967674 0.00789182 0.00574566 0.00386872 0.00258612
- 0.00167126 0.00104169 0.000641093 0.000401246 0.000277928
- 0.000171775 0.000102266 5.89376e-05 3.29258e-05 1.80463e-05
- 1.0057e-05 6.4571e-06 5.10093e-06 4.06791e-06 3.62716e-06
- 3.63321e-06 3.99625e-06 4.64368e-06 5.20886e-06 4.77728e-06
- 3.23919e-06 1.14113e-06 -1.29416e-06 -4.15607e-06 -1.88532e-06
- 5.24411e-06 1.38678e-05 1.28823e-05 3.6758e-06 -2.52285e-06
- -3.97133e-06 -4.03071e-06 -3.37154e-06 -2.71238e-06 -2.05321e-06
- -1.39404e-06 -7.34872e-07 -3.73325e-07 -1.05873e-07 1.61578e-07
- 4.2903e-07 6.96482e-07 8.18468e-07 7.60065e-07 7.01662e-07
- 6.43258e-07 5.84855e-07 5.26452e-07 4.68049e-07 4.09646e-07
- 3.51243e-07 2.9284e-07 2.34437e-07 1.71213e-07 1.06928e-07
- 4.2644e-08 -2.16403e-08 -8.59247e-08 -1.50209e-07 -2.14493e-07
- -2.78778e-07 -3.43062e-07 -4.07346e-07 -4.55065e-07 -4.3348e-07
- -4.11896e-07 -3.90311e-07 -3.68726e-07 -3.47141e-07 -3.25556e-07
- -3.03971e-07 -2.82386e-07
- EOD
-
- @v[28].set(<<-'EOD')
- 0.368163 0.361756 0.327463 0.269513 0.149476 0.0805716 0.0501146
- 0.03403 0.0230886 0.0160474 0.0116071 0.00870013 0.00679614
- 0.00542384 0.00432512 0.00340653 -0.00129719 -0.00399429
- -0.00318719 0.00443085 0.0150156 0.0334147 0.0132288 -0.0189751
- -0.0508377 -0.0252174 -0.0142489 -0.00675908 -0.0038653
- -0.00243423 -0.00168891 -0.00120901 -0.000900426 -0.000685575
- -0.000557595 -0.000457268 -0.000377427 -0.000315269 -0.000266613
- -0.000228397 -0.000198283 -0.000174248 -0.000154886 -0.00013892
- -0.000125864 -0.000115189 -0.000105841 -9.66611e-05 -8.84262e-05
- -8.23872e-05 -7.74668e-05 -7.25463e-05 -6.79992e-05 -6.35276e-05
- -5.92413e-05 -5.68994e-05 -5.45574e-05 -5.22154e-05 -4.98735e-05
- -4.75315e-05 -4.54981e-05 -4.36726e-05 -4.18471e-05 -4.00216e-05
- -3.81961e-05 -3.64559e-05 -3.54209e-05 -3.43858e-05 -3.33508e-05
- -3.23157e-05 -3.12807e-05 -3.02456e-05 -2.92105e-05 -2.81755e-05
- -2.71404e-05 -2.61054e-05 -2.51232e-05 -2.44984e-05 -2.38736e-05
- -2.32487e-05 -2.26239e-05 -2.19991e-05 -2.13742e-05 -2.07494e-05
- -2.01246e-05 -1.94998e-05 -1.88749e-05 -1.82865e-05 -1.79044e-05
- -1.75224e-05 -1.71403e-05 -1.67582e-05 -1.63762e-05 -1.59941e-05
- -1.56121e-05 -1.523e-05 -1.4848e-05 -1.44659e-05 -1.41138e-05
- -1.39075e-05 -1.37011e-05 -1.34947e-05 -1.32883e-05 -1.30819e-05
- -1.28755e-05 -1.26691e-05 -1.24627e-05 -1.22563e-05 -1.205e-05
- -1.18436e-05 -1.16372e-05 -1.14308e-05 -1.12244e-05 -1.1018e-05
- -1.08116e-05 -1.06052e-05 -1.03988e-05 -1.01924e-05 -9.98605e-06
- -9.77966e-06 -2.85319e-05 0.00281092 0.00180106 -0.000981083
- 0.00551926 -0.00119763 -0.0295069 -0.0367677 0.064749 0.119022
- 0.0882007 0.0552062 0.03418 0.0223243 0.015545 0.011949
- 0.00757134 0.00667655 0.00583243 0.00644443 0.00650959 -0.0302575
- -0.0437806 -0.0355466 0.0381776 0.282109 0.674178 1.07582
- 1.45189 1.789 2.08649 2.34663 2.57245 2.81211 3.04778 3.2523
- 3.45877 3.65593 3.83396 3.9923 4.13368 4.25864 4.36719 4.46064
- 4.54086 4.60962 4.66835 4.71838 4.76094 4.79716 4.82796
- 4.85413 4.87634 4.89518 4.91116 4.92476 4.93631 4.94608
- 4.95434 4.9613 4.96715 4.97211 4.97638 4.98001 4.98312 4.98571
- 4.98795 4.98979 4.99138 4.99269 4.99381 4.99474 4.99551
- 4.99615 4.99668 4.99713 4.99752 4.99783 4.99811 4.99836
- 4.99858 4.99873 4.99884 4.99892 4.999 4.99907 4.99912 4.99916
- 4.99921 4.99926 4.99932 4.99937 4.99942 4.99948 4.99953
- 4.99956 4.99958 4.99961 4.99963 4.99966 4.99968 4.99971
- 4.99972 4.99973 4.99974 4.99975 4.99976 4.99977 4.99978
- 4.99979 4.9998 4.9998 4.99981 4.99982 4.99983 4.99984 4.99985
- 4.99986 4.99986 4.99987 4.99987 5.00498 5.00354 4.99359
- 4.98981 5.00498 5.00099 5.00041 5.00022 5.00015 5.00012
- 5.0001 5.00008 5.00005 5.00003 5 4.99431 4.99459 4.99591
- 5.00087 5.01029 5.03935 4.92784 4.51643 3.78356 2.68745
- 1.43417 0.583128 0.205094 0.0777337 0.0391566 0.02723 0.023883
- 0.018808 0.010165 0.00254623 -0.00377463 -0.0038097 0.00144145
- 0.00267231 0.00193045 0.00144538 0.00121758 0.00112893 0.00109424
- 0.0010226 0.000948072 0.000882573 0.000826996 0.000776391
- 0.000729719 0.000686499 0.000647333 0.000610108 0.000575631
- 0.000545069 0.000515485 0.000488514 0.000465316 0.000443215
- 0.000422454 0.00040292 0.00038488 0.000368472 0.000353628
- 0.000339643 0.000326197 0.000313483 0.000302884 0.000294038
- 0.000284003 0.000270941 0.000254925 0.000246511 0.000244089
- 0.000245538 0.000242099 0.000235728 0.000227482 0.000218001
- 0.000207257 0.000202127 0.000196997 0.000191868 0.000186738
- 0.000181608 0.00017758 0.000173899 0.000170219 0.000166538
- 0.000162857 0.000159576 0.00015679 0.000154005 0.000151219
- 0.000148433 0.000145647 0.000142861 0.000140076 0.00013729
- 0.000134504 0.000131718 0.000129603 0.000127635 0.000125668
- 0.0001237 0.000121732 0.000119765 0.000117797 0.000115829
- 0.000113862 0.000111894 0.000109993 0.000108372 0.000106751
- 0.00010513 0.000103509 0.000101887 0.000100266 9.86449e-05
- 9.70237e-05
- EOD
-
- @v[29].set(<<-'EOD')
- 5 4.99899 4.99654 4.99327 4.9863 4.98954 4.99212 4.99378
- 4.9951 4.99624 4.99715 4.99786 4.99839 4.99879 4.99909 4.99931
- 4.99922 4.99933 4.99971 5.00064 5.00084 5.00123 4.99865
- 4.99853 4.99983 5.00457 5.00242 5.00105 5.00062 5.00042
- 4.99971 4.9994 4.9992 4.9996 4.99955 4.99932 4.99918 4.99915
- 4.99919 4.99927 4.99937 4.99948 4.99957 4.99966 4.99974
- 4.9998 4.99985 4.99989 4.99992 4.99993 4.99994 4.99994 4.99996
- 4.99998 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001
- 5.00001 5.00001 5 5 5 5 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99998 4.99998 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5
- 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5 5 5 5 5 5 4.9997 4.99998 4.99954 4.99963
- 5.00059 4.99945 4.99732 4.99957 5.00919 5.00558 5.00033
- 4.99851 4.9983 4.99854 4.99871 4.99928 4.99914 4.99939 4.99952
- 4.9998 4.99976 4.99744 4.99598 4.99478 4.99806 5.01911 5.04602
- 5.05469 5.01317 4.89484 4.69655 4.42036 4.06069 3.60793
- 3.12531 2.72975 2.45187 2.25081 2.09841 1.98509 1.90211
- 1.84084 1.79411 1.7574 1.72763 1.70283 1.68188 1.66389 1.64823
- 1.63438 1.62201 1.61088 1.60081 1.59163 1.58323 1.57549
- 1.56835 1.56173 1.55558 1.54985 1.54451 1.53951 1.53479
- 1.53035 1.52615 1.5222 1.51845 1.5149 1.51153 1.50834 1.50529
- 1.5024 1.49964 1.497 1.49449 1.49208 1.48977 1.48755 1.48542
- 1.48336 1.48138 1.47948 1.47765 1.4759 1.47419 1.47255 1.47096
- 1.46949 1.46823 1.46696 1.4657 1.46444 1.46317 1.46191 1.46065
- 1.45956 1.4585 1.45743 1.45636 1.45529 1.45422 1.45315 1.45226
- 1.45145 1.45064 1.44983 1.44902 1.44821 1.4474 1.44659 1.44579
- 1.44498 1.44417 1.44336 1.44255 1.44174 1.44094 1.44019
- 1.43944 1.43868 1.43793 1.43765 1.43679 1.43515 1.43405
- 1.43478 1.43387 1.43345 1.43184 1.43086 1.43021 1.43003
- 1.42988 1.42944 1.42883 1.42818 1.42702 1.42642 1.42595
- 1.42586 1.42616 1.42783 1.41733 1.38106 1.30738 1.3877 2.09819
- 3.05285 3.58059 3.77601 3.87609 4.02557 4.24887 4.4608 4.60411
- 4.72109 4.8255 4.90465 4.97379 5.01253 5.01532 5.01239 5.0092
- 5.00665 5.00474 5.00333 5.00232 5.00163 5.00117 5.00082
- 5.00057 5.00039 5.00027 5.00019 5.00013 5.00009 5.00006
- 5.00004 5.00003 5.00002 5.00001 5.00001 5 5 5 4.99998 4.99995
- 4.99992 4.99996 5.00005 5.00012 5.00008 4.99996 4.9999 4.99985
- 4.99986 4.99997 5.00021 5.0003 5.00024 5.00009 5.00007 5.00005
- 5.00003 5.00001 4.99998 4.99998 4.99998 4.99999 4.99999
- 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99998
- 4.99998 4.99998
- EOD
-
- @v[30].set(<<-'EOD')
- 7.10441e-10 5.70385e-05 0.000226143 0.000131916 -0.000887764
- -8.01837e-05 -3.49653e-05 9.40039e-05 0.000118663 0.000108025
- 8.6059e-05 6.33268e-05 4.99295e-05 3.16843e-05 3.60692e-05
- 2.07572e-05 -8.6375e-05 3.44583e-05 8.07397e-05 0.000196296
- 0.000115615 -7.12768e-05 -0.000129812 -4.18679e-05 7.94364e-05
- 0.000182034 -5.41226e-05 -0.000451819 -0.000713937 -0.00129863
- -0.00262186 -0.00213417 -0.00133767 0.000775698 0.000969902
- 0.000549281 0.000280946 0.000140321 8.6919e-05 7.22446e-05
- 6.5631e-05 6.45263e-05 6.63087e-05 7.17391e-05 7.59042e-05
- 7.59172e-05 7.03353e-05 6.33558e-05 5.31136e-05 4.64278e-05
- 4.40594e-05 4.16909e-05 4.05674e-05 3.96957e-05 3.87875e-05
- 3.74977e-05 3.62079e-05 3.49181e-05 3.36283e-05 3.23385e-05
- 3.12427e-05 3.02775e-05 2.93124e-05 2.83472e-05 2.7382e-05
- 2.64613e-05 2.59077e-05 2.5354e-05 2.48004e-05 2.42468e-05
- 2.36931e-05 2.31395e-05 2.25859e-05 2.20322e-05 2.14786e-05
- 2.0925e-05 2.03916e-05 1.9995e-05 1.95984e-05 1.92019e-05
- 1.88053e-05 1.84087e-05 1.80122e-05 1.76156e-05 1.7219e-05
- 1.68225e-05 1.64259e-05 1.6051e-05 1.57991e-05 1.55471e-05
- 1.52952e-05 1.50433e-05 1.47913e-05 1.45394e-05 1.42875e-05
- 1.40356e-05 1.37836e-05 1.35317e-05 1.32978e-05 1.31513e-05
- 1.30048e-05 1.28583e-05 1.27118e-05 1.25653e-05 1.24188e-05
- 1.22724e-05 1.21259e-05 1.19794e-05 1.18329e-05 1.16864e-05
- 1.15399e-05 1.13934e-05 1.12469e-05 1.11005e-05 1.0954e-05
- 1.08075e-05 1.0661e-05 1.05145e-05 1.0368e-05 1.02215e-05
- 1.76447e-05 7.21516e-05 -3.59786e-05 -0.000159618 0.000156236
- 0.000135106 -0.000336402 -0.000302283 0.000699323 0.000473866
- -0.000156146 -0.000225625 -0.000123592 -3.78116e-05 8.47472e-06
- 2.43387e-06 -7.44762e-05 7.80111e-05 9.43608e-05 0.000170159
- 8.83919e-05 -0.00018802 -0.000373512 -0.000390597 0.000156875
- 0.0032343 0.00776304 -0.000566905 -0.00760695 -0.0159226
- -0.0245989 -0.0331402 -0.0100902 0.067837 0.266702 0.910818
- 1.82282 2.69714 3.43247 3.98325 4.32893 4.51529 4.67087
- 4.79288 4.87574 4.92797 4.95902 4.97655 4.98622 4.99195
- 4.99526 4.99735 4.9991 4.99974 4.99982 4.99974 4.99961 4.9995
- 4.99943 4.9994 4.9994 4.99942 4.99944 4.99948 4.99952 4.99956
- 4.99961 4.99965 4.9997 4.99974 4.99977 4.99981 4.99983 4.99986
- 4.99988 4.9999 4.99991 4.99992 4.99993 4.99994 4.99995 4.99995
- 4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 4.99999
- 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5
- 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 5 5.00019 4.99888 4.99663 4.99457 4.99902
- 5.00229 5.00323 5.00302 5.0023 5.0015 5.00085 5.00041 5.00013
- 4.99993 4.99979 4.99948 4.99954 4.99983 5.00055 5.00109
- 5.00009 4.9987 4.998 4.99755 4.99676 4.99618 5.01091 5.05272
- 5.04156 4.80112 4.27692 3.42343 2.23953 0.967179 0.429813
- 0.540757 1.32991 2.32147 3.14903 3.78143 4.22325 4.47978
- 4.59448 4.69875 4.79798 4.87419 4.92339 4.95249 4.97174
- 4.98408 4.99124 4.99478 4.99729 4.99868 4.9992 4.99941 4.99947
- 4.99946 4.99943 4.9994 4.99939 4.9994 4.99942 4.99946 4.99951
- 4.99956 4.99961 4.99967 4.99973 4.99977 4.9998 4.99981 4.99983
- 4.99984 4.99987 4.99992 5.00001 5.00005 5.00001 4.99994
- 4.99995 4.99995 4.99996 4.99996 4.99996 4.99997 4.99997
- 4.99997 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999
- 4.99999 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999
- 4.99998 4.99998 4.99998
- EOD
-
- @v[31].set(<<-'EOD')
- 1.8179e-09 -5.28841e-06 -1.44913e-05 -3.62932e-05 -9.75719e-05
- 0.000141781 3.73396e-05 -1.65603e-05 -1.5271e-05 -6.73884e-06
- 4.40157e-06 -4.85345e-06 -1.02964e-05 2.03126e-05 -1.89457e-05
- -8.75564e-06 7.67422e-06 4.71103e-06 1.29798e-05 6.13469e-06
- -1.14363e-05 -0.0394563 -0.0477298 -0.0622012 -0.0519225
- 0.262499 0.943611 1.67052 2.31017 2.84028 3.28467 3.61582
- 3.85887 4.13011 4.36511 4.54063 4.67013 4.76408 4.83263
- 4.8825 4.91837 4.94373 4.96117 4.97318 4.98093 4.98562 4.98906
- 4.99267 4.99539 4.99666 4.99731 4.99797 4.99844 4.99887
- 4.99927 4.99933 4.99938 4.99944 4.99949 4.99955 4.9996 4.99965
- 4.9997 4.99975 4.9998 4.99985 4.99986 4.99987 4.99989 4.9999
- 4.99991 4.99992 4.99993 4.99995 4.99996 4.99997 4.99998
- 4.99998 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5.00001
- 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99997 5.00002 5.00004 5.0001 5.0001 4.99987 5.00009
- 5.00021 5.00002 5.00004 4.99988 5.00013 4.99993 5.00026
- 4.99973 5 5.00006 5.00009 5.00004 5.00004 5.04854 4.82711
- 4.04208 2.64155 0.838902 0.19014 0.0982549 0.0723197 0.0576863
- 0.0427644 0.0301979 0.020146 0.0135728 0.00980358 0.00774482
- 0.00586604 0.0036687 0.00211511 0.00121906 0.000647581 0.000828436
- 0.00190938 0.00224254 0.00199956 0.00165488 0.00135612 0.00113715
- 0.000984181 0.000877175 0.000789973 0.000741139 0.000689338
- 0.000625676 0.000586082 0.000550152 0.000529573 0.000505606
- 0.000482117 0.000460574 0.000441649 0.000424674 0.000408398
- 0.000391914 0.000376272 0.000361487 0.000348181 0.000336045
- 0.000324466 0.000313545 0.000303046 0.000293056 0.00028356
- 0.000274586 0.000266155 0.000258279 0.000250938 0.000243789
- 0.000236912 0.000230244 0.000224186 0.000219291 0.000215346
- 0.000212468 0.000207291 0.000200862 0.00019368 0.000186767
- 0.000183515 0.000180263 0.00017701 0.000173758 0.000170506
- 0.000167253 0.000164001 0.000161164 0.000158357 0.00015555
- 0.000152743 0.000149936 0.000147129 0.000144322 0.000142066
- 0.000140096 0.000138127 0.000136157 0.000134187 0.000132218
- 0.000130248 0.000128278 0.000126308 0.000124339 0.000122369
- 0.000120399 0.000118429 0.00011646 0.000114527 0.000112892
- 0.000111258 0.000109623 0.000107988 0.000103598 6.86052e-05
- 3.337e-05 7.00783e-05 0.000218764 0.000221318 0.000118593
- -0.000113962 5.78552e-05 9.42068e-05 0.000237037 0.000171302
- 0.0001033 6.16066e-05 5.52908e-05 6.30233e-05 7.01897e-05
- 8.48573e-05 0.000106859 8.37213e-05 -0.0391541 -0.047722
- -0.0618454 -0.0169804 0.345725 1.03426 1.74825 2.37152 2.88737
- 3.32173 3.66761 3.9707 4.17762 3.98832 3.30483 2.09737 0.710892
- 0.148159 0.0707463 0.0555808 0.045618 0.0319116 0.0199589
- 0.0133357 0.00898528 0.00586075 0.00375478 0.00245443 0.00156038
- 0.000962344 0.000590953 0.000375107 0.000250243 0.00015882
- 0.000100203 6.18122e-05 3.7372e-05 2.23009e-05 1.32569e-05
- 8.29437e-06 5.72457e-06 3.96832e-06 2.98935e-06 2.59699e-06
- 2.75024e-06 3.38689e-06 4.0453e-06 3.50095e-06 1.64988e-06
- -3.84371e-07 -2.03828e-06 -3.46401e-06 -1.24301e-06 4.63458e-06
- 1.14104e-05 1.02619e-05 2.15487e-06 -2.98487e-06 -3.67221e-06
- -2.94279e-06 -2.58649e-06 -2.23019e-06 -1.87389e-06 -1.5176e-06
- -1.1613e-06 -7.92127e-07 -4.18889e-07 -4.56502e-08 3.27588e-07
- 7.00827e-07 8.79539e-07 8.17025e-07 7.5451e-07 6.91996e-07
- 6.29481e-07 5.66966e-07 5.04452e-07 4.41937e-07 3.79422e-07
- 3.16908e-07 2.54393e-07 1.90078e-07 1.25366e-07 6.0654e-08
- -4.05776e-09 -6.87696e-08 -1.33481e-07 -1.98193e-07 -2.62905e-07
- -3.27617e-07 -3.92329e-07 -4.40392e-07 -4.18802e-07 -3.97213e-07
- -3.75624e-07 -3.54035e-07 -3.32446e-07 -3.10856e-07 -2.89267e-07
- -2.67678e-07
- EOD
-
- @v[32].set(<<-'EOD')
- 1.10294 1.10297 1.10291 1.10277 1.10259 1.10294 1.10313
- 1.10306 1.10299 1.10296 1.10295 1.10295 1.10294 1.10294
- 1.10294 1.10294 1.10294 1.10294 1.10294 1.10296 1.10296
- 1.00547 0.998599 1.5201 2.49297 3.31258 3.73162 3.84757
- 3.92505 4.02965 4.16599 4.30294 4.41541 4.52886 4.64414
- 4.73865 4.81065 4.86391 4.90315 4.93188 4.95258 4.96726
- 4.97738 4.98436 4.98888 4.99162 4.99363 4.99573 4.99731
- 4.99804 4.99843 4.99881 4.99909 4.99934 4.99957 4.9996 4.99964
- 4.99967 4.9997 4.99973 4.99977 4.9998 4.99983 4.99986 4.99988
- 4.99991 4.99992 4.99992 4.99993 4.99994 4.99994 4.99995
- 4.99996 4.99996 4.99997 4.99997 4.99998 4.99998 4.99999
- 4.99999 4.99999 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 5.00028 4.99988 4.99968
- 5.00019 4.99987 5.00021 4.99973 4.99977 4.99996 4.99997
- 5.0002 4.99957 5.00026 4.99947 5.00074 5.00003 4.99987 4.99979
- 5.00008 4.99997 5.08794 5.05993 4.76875 3.99197 3.10174
- 2.5197 2.21771 2.04 1.92235 1.83874 1.77592 1.72665 1.686
- 1.65276 1.6286 1.61299 1.60039 1.58934 1.57954 1.57083 1.56306
- 1.55604 1.54963 1.54375 1.53832 1.53331 1.52865 1.52432
- 1.52026 1.51645 1.51287 1.50949 1.50629 1.50327 1.50039
- 1.49766 1.49505 1.49257 1.49019 1.48792 1.48574 1.48365
- 1.48164 1.47971 1.47784 1.47604 1.47431 1.47264 1.47102
- 1.46945 1.46794 1.46647 1.46505 1.46367 1.46233 1.46103
- 1.45976 1.45853 1.45733 1.45616 1.45502 1.45392 1.45284
- 1.45179 1.45076 1.44975 1.4488 1.44795 1.44711 1.44626 1.44541
- 1.44457 1.44372 1.44287 1.44212 1.44138 1.44063 1.43989
- 1.43914 1.4384 1.43766 1.43701 1.43641 1.43581 1.43522 1.43462
- 1.43402 1.43342 1.43282 1.43223 1.43163 1.43103 1.43043
- 1.42984 1.42924 1.42865 1.42808 1.42752 1.42695 1.42639
- 1.42584 1.42529 1.42472 1.42412 1.42365 1.42326 1.42304
- 1.42162 1.42082 1.42032 1.42029 1.42026 1.41995 1.41947
- 1.41894 1.41841 1.4179 1.41742 1.41699 1.41656 1.32097 1.30963
- 1.78765 2.64656 3.35764 3.747 3.86589 3.94217 4.04185 4.18453
- 4.3561 4.53439 4.68621 4.74905 4.77848 4.84629 4.91261 4.97541
- 5.01284 5.01548 5.01248 5.00924 5.00666 5.00475 5.00334
- 5.00234 5.00164 5.00118 5.00083 5.00058 5.0004 5.00028 5.00019
- 5.00013 5.00009 5.00007 5.00004 5.00003 5.00002 5.00001
- 5.00001 5.00001 5 5 4.99999 4.99995 4.99992 4.99996 5.00006
- 5.00012 5.00009 4.99997 4.9999 4.99985 4.99986 4.99997 5.00021
- 5.00031 5.00024 5.0001 5.00007 5.00005 5.00003 5.00001 4.99998
- 4.99998 4.99999 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5
- 5 4.99999 4.99999 4.99999 4.99998 4.99998 4.99998
- EOD
-
- @v[33].set(<<-'EOD')
- 5 5.00012 5.00023 5.0003 4.99972 4.99988 4.99984 4.99991
- 4.99996 4.99999 5.00008 5.00009 4.99986 5.00003 5.00007
- 4.99995 4.9999 4.99997 5.00013 5.00014 5.00013 4.99701 4.99763
- 4.99742 4.99998 5.02836 5.07262 4.96856 4.57267 3.85637
- 2.79544 1.45942 0.408016 0.084885 0.0271375 0.0119294 0.00707546
- 0.0051087 0.00373035 0.00264737 0.00186477 0.00130379 0.000915857
- 0.000653121 0.000483893 0.000380852 0.000302362 0.000219498
- 0.000154435 0.000121928 0.000104026 8.61242e-05 7.48526e-05
- 6.49216e-05 5.56238e-05 5.29689e-05 5.03139e-05 4.7659e-05
- 4.5004e-05 4.23491e-05 4.00356e-05 3.79522e-05 3.58687e-05
- 3.37852e-05 3.17018e-05 2.97592e-05 2.89804e-05 2.82016e-05
- 2.74228e-05 2.66441e-05 2.58653e-05 2.50865e-05 2.43077e-05
- 2.35289e-05 2.27501e-05 2.19714e-05 2.12346e-05 2.07821e-05
- 2.03295e-05 1.98769e-05 1.94244e-05 1.89718e-05 1.85192e-05
- 1.80667e-05 1.76141e-05 1.71615e-05 1.6709e-05 1.62828e-05
- 1.60061e-05 1.57294e-05 1.54527e-05 1.5176e-05 1.48993e-05
- 1.46226e-05 1.43459e-05 1.40692e-05 1.37925e-05 1.35158e-05
- 1.3262e-05 1.31191e-05 1.29761e-05 1.28332e-05 1.26903e-05
- 1.25474e-05 1.24045e-05 1.22615e-05 1.21186e-05 1.19757e-05
- 1.18328e-05 1.16898e-05 1.15469e-05 1.1404e-05 1.12611e-05
- 1.11182e-05 1.09752e-05 1.08323e-05 1.06894e-05 1.05465e-05
- 1.04036e-05 1.02606e-05 1.00185e-05 3.8343e-05 -3.06781e-05
- -0.000111758 0.000111673 0.000130815 -0.000210491 -0.000231304
- 0.000310226 0.000265303 3.0878e-05 -4.48405e-05 -1.2852e-05
- -7.84469e-06 3.29986e-05 -1.23286e-05 -6.07871e-05 5.35082e-05
- 7.69194e-05 0.000126221 6.57178e-05 0.00223349 -0.0148854
- -0.0476636 -0.0491447 0.220125 1.11174 2.03988 2.90209 3.61069
- 4.13554 4.50679 4.71501 4.83916 4.91027 4.95284 4.98086
- 4.99151 4.98651 4.97113 4.95075 4.93102 4.93683 4.95457
- 4.97071 4.98212 4.98948 4.99386 4.99636 4.99785 4.9987 4.99927
- 4.99989 5.00014 5.00007 4.99988 4.99982 4.99976 4.99973
- 4.99972 4.99972 4.99973 4.99974 4.99975 4.99977 4.99979
- 4.99981 4.99984 4.99986 4.99988 4.99989 4.99991 4.99992
- 4.99993 4.99994 4.99995 4.99996 4.99996 4.99997 4.99997
- 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999
- 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00002 5.00001 5.00001
- 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999
- 4.99999 4.99999 4.99999 5 5.00012 4.99946 4.99839 4.99733
- 4.99948 5.00114 5.00158 5.00147 5.00113 5.00073 5.00043
- 5.0002 5.00006 4.99995 4.99986 4.99973 4.99976 4.9999 5.00029
- 5.00055 4.99704 4.99734 4.9972 5.00278 5.03354 5.07184 4.94057
- 4.51936 3.75638 2.60982 1.23803 0.315016 0.0796102 0.0252894
- 0.0165723 0.0827785 0.491298 1.40686 2.33436 3.1251 3.7691
- 4.22201 4.49976 4.68115 4.80513 4.88509 4.93208 4.95861
- 4.97579 4.98655 4.99268 4.99571 4.99771 4.99881 4.99929
- 4.99954 4.99965 4.9997 4.99971 4.99971 4.99971 4.99971 4.99972
- 4.99974 4.99976 4.99978 4.99981 4.99984 4.99987 4.99989
- 4.99991 4.99991 4.99992 4.99992 4.99993 4.99997 5.00003
- 5.00006 5.00004 5.00001 5 4.99999 4.99998 4.99998 4.99997
- 4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 4.99999
- 4.99999 4.99999 5 5 5 5 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 4.99999
- 4.99999 4.99999 4.99999 4.99998 4.99998
- EOD
-
- @v[34].set(<<-'EOD')
- 5 5.00207 5.00813 5.01486 5.00156 5.0018 4.99861 4.99844
- 4.99888 4.9993 4.99956 4.99971 4.99979 4.99983 4.99987 4.99989
- 4.99671 4.9974 4.99864 5.00131 5.00377 5.0021 5.00039 4.99993
- 5.00004 5.0009 5.00109 4.99636 4.98617 4.96778 4.92047 4.89528
- 4.91112 4.9559 4.98286 4.99369 4.99812 4.99951 4.99994 5.00014
- 5.00008 4.99994 4.99984 4.99989 4.99998 5.00004 5.00004
- 5.00006 5.00005 5.00001 4.99997 4.99992 4.99993 4.99994
- 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996
- 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996
- 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997
- 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997
- 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997
- 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998
- 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998
- 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998
- 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998
- 4.99998 4.99998 4.99998 4.99998 5.00131 5.00072 4.9977 4.99811
- 5.00325 4.99647 4.98948 4.99459 5.00262 5.00276 5.00156
- 5.00072 5.0003 5.00013 4.99995 4.99668 4.99775 4.99917 5.00173
- 5.00386 5.00188 4.99888 4.99757 4.99951 5.01712 5.0557 5.07088
- 5.07704 5.07758 5.06958 5.04223 5.03331 5.0279 5.03408 5.07611
- 5.01911 4.68594 3.99152 2.92195 1.69878 0.809 0.344091 0.154663
- 0.0788717 0.0467212 0.0336168 0.0280514 0.0254947 0.024173
- 0.0223567 0.0220555 0.0271514 0.0295872 0.0296052 0.0283971
- 0.0264726 0.0241813 0.0218244 0.0195349 0.017368 0.0152495
- 0.013295 0.0115444 0.00996982 0.00857091 0.00733891 0.00627261
- 0.0053494 0.00456316 0.00388373 0.00331073 0.00282181 0.00240991
- 0.00206389 0.00177187 0.00152283 0.00131167 0.00112558 0.000954373
- 0.000805726 0.00069326 0.000600991 0.000525743 0.00047355
- 0.00044359 0.000434815 0.000436053 0.000402511 0.000368969
- 0.000335427 0.000301886 0.000268344 0.000234802 0.00020126
- 0.000184967 0.000169932 0.000154896 0.000139861 0.000124825
- 0.00010979 9.47546e-05 8.67896e-05 8.24901e-05 7.81906e-05
- 7.38911e-05 6.95915e-05 6.5292e-05 6.09925e-05 5.66929e-05
- 5.23934e-05 4.80939e-05 4.37943e-05 3.94948e-05 3.51953e-05
- 3.08957e-05 2.67968e-05 2.42936e-05 2.17904e-05 1.92872e-05
- 1.6784e-05 0.00125927 -0.00794344 -0.0305499 -0.0621697
- -0.0463796 -0.0224608 -0.00538381 0.00546086 0.0108675 0.012883
- 0.0131787 0.0127271 0.0119702 0.0110398 0.0100635 0.00649617
- 0.00489388 0.00545863 0.0098351 0.0167428 0.0126563 0.00697542
- 0.00427027 0.00330002 0.00390774 0.00408999 -0.00259143
- -0.0160578 -0.0451849 -0.0409651 0.1301 0.597429 1.3848
- 2.63426 3.81272 4.51373 4.8412 4.98731 4.88165 4.37165 3.40034
- 2.17681 1.12217 0.505129 0.219703 0.104992 0.0622333 0.0448317
- 0.0355782 0.0311867 0.0293529 0.0274615 0.0288739 0.0307845
- 0.0304909 0.029245 0.0273602 0.0251006 0.022697 0.0202765
- 0.0179357 0.0157106 0.0136562 0.0117951 0.0101273 0.00865784
- 0.00739394 0.00634364 0.00551356 0.00480538 0.00415747 0.00356084
- 0.00297585 0.00236711 0.00181853 0.00160713 0.00169822 0.00166542
- 0.00145504 0.00120252 0.00109259 0.000982658 0.00087273
- 0.000762802 0.000652874 0.000584068 0.000528263 0.000472458
- 0.000416653 0.000360848 0.000321155 0.000301442 0.000281729
- 0.000262016 0.000242303 0.00022259 0.000202877 0.000183164
- 0.000163451 0.000143738 0.000124025 0.000114582 0.000107399
- 0.000100216 9.30332e-05 8.58502e-05 7.86672e-05 7.14841e-05
- 6.43011e-05 5.7118e-05 4.9935e-05 4.35378e-05 4.04281e-05
- 3.73184e-05 3.42088e-05 3.10991e-05 2.79894e-05 2.48798e-05
- 2.17701e-05 1.86604e-05
- EOD
-
- @v[35].set(<<-'EOD')
- 7.24585e-12 2.21843e-05 3.20014e-05 1.25076e-05 -2.44947e-05
- 1.8425e-05 5.50546e-06 3.53025e-05 -1.07551e-05 -3.94383e-06
- -2.27848e-06 -9.04789e-05 7.44215e-05 -2.7662e-05 0.000200038
- -2.11998e-05 -2.09011e-05 2.37098e-05 2.18751e-05 -2.28422e-05
- -6.23659e-05 3.58241e-05 1.76386e-05 -4.28311e-05 0.000355626
- 0.00156903 0.00100999 -0.0085304 -0.02067 -0.0389485 -0.0651568
- -0.128475 -0.314362 -0.406837 -0.421558 -0.421277 -0.418176
- -0.414481 -0.410845 -0.407348 -0.403971 -0.400716 -0.397582
- -0.394563 -0.391658 -0.388866 -0.386178 -0.383585 -0.381094
- -0.378789 -0.376569 -0.37435 -0.372256 -0.370188 -0.36815
- -0.366422 -0.364694 -0.362967 -0.361239 -0.359511 -0.357888
- -0.356334 -0.354781 -0.353227 -0.351674 -0.350152 -0.348888
- -0.347625 -0.346361 -0.345098 -0.343834 -0.342571 -0.341307
- -0.340044 -0.33878 -0.337517 -0.336279 -0.335215 -0.334152
- -0.333088 -0.332024 -0.330961 -0.329897 -0.328833 -0.32777
- -0.326706 -0.325642 -0.324601 -0.323683 -0.322766 -0.321849
- -0.320932 -0.320014 -0.319097 -0.31818 -0.317263 -0.316345
- -0.315428 -0.314545 -0.313825 -0.313106 -0.312387 -0.311667
- -0.310948 -0.310228 -0.309509 -0.308789 -0.30807 -0.307351
- -0.306631 -0.305912 -0.305192 -0.304473 -0.303754 -0.303034
- -0.302315 -0.301595 -0.300876 -0.300157 -0.299437 -0.298716
- -0.29798 -0.297329 -0.296691 -0.295837 -0.29516 -0.294725
- -0.294044 -0.292917 -0.292351 -0.291965 -0.291365 -0.290687
- -0.290027 -0.289376 -0.288772 -0.288193 -0.287505 -0.286892
- -0.28626 -0.285714 -0.284545 -0.289246 -0.298717 -0.298492
- -0.214163 0.181451 0.0749974 0.0454707 0.0292987 0.0196837
- 0.0124119 0.00884715 0.00527181 0.00585821 0.0296361 0.169856
- 0.361207 0.538856 0.67469 0.685933 0.392802 0.17772 0.0813085
- 0.0424601 0.0246654 0.0175258 0.0144256 0.0129859 0.012205
- 0.0112846 0.010933 0.0134813 0.0147254 0.0147981 0.0142156
- 0.0132732 0.0121355 0.0109587 0.00981238 0.00872731 0.00767007
- 0.00669346 0.00581341 0.00502167 0.00431819 0.00369842 0.00316168
- 0.00269663 0.00230035 0.00195801 0.00166928 0.00142286 0.00121522
- 0.00104072 0.000893384 0.000767675 0.000661268 0.000567659
- 0.000481766 0.000407101 0.000350044 0.000302721 0.000263424
- 0.000236813 0.00022199 0.000218182 0.000219548 0.0002027
- 0.000185853 0.000169006 0.000152158 0.000135311 0.000118463
- 0.000101616 9.33782e-05 8.57685e-05 7.81588e-05 7.0549e-05
- 6.29393e-05 5.53296e-05 4.77199e-05 4.36954e-05 4.15296e-05
- 3.93637e-05 3.71978e-05 3.50319e-05 3.28661e-05 3.07002e-05
- 2.85343e-05 2.63685e-05 2.42026e-05 2.20367e-05 1.98709e-05
- 1.7705e-05 1.55391e-05 1.34772e-05 1.22416e-05 1.10061e-05
- 9.77055e-06 8.535e-06 0.000631271 -0.00362586 -0.0146235
- -0.0308486 -0.0237466 -0.0117522 -0.00304171 0.00251033
- 0.00531986 0.0063897 0.00657351 0.00636494 0.00599705 0.00553442
- 0.00505994 0.00330925 0.00246671 0.0027006 0.00473161 0.00830333
- 0.00649147 0.00356815 0.00217448 0.00187579 0.00270447 0.00219543
- -0.00546118 -0.0179576 -0.0445306 -0.0649309 0.0197935 0.473629
- 0.87268 0.269542 0.0086094 0.0844602 0.606456 1.04929 0.906014
- 0.916205 0.919425 0.872867 0.556244 0.262457 0.11838 0.0571226
- 0.0333451 0.0237133 0.0185096 0.0159617 0.0148663 0.0138683
- 0.0144081 0.0153797 0.0152551 0.0146487 0.0137192 0.0125973
- 0.0113996 0.0101903 0.00901851 0.00790495 0.00687502 0.00593994
- 0.00510092 0.00436111 0.00372439 0.0031945 0.00277537 0.00241888
- 0.002095 0.00179943 0.00150419 0.00119264 0.00090934 0.000802394
- 0.000852816 0.000838368 0.000730842 0.000601028 0.000546616
- 0.000492205 0.000437793 0.000383381 0.000328969 0.00029454
- 0.000266428 0.000238317 0.000210205 0.000182093 0.000162091
- 0.000152145 0.000142198 0.000132252 0.000122306 0.000112359
- 0.000102413 9.24665e-05 8.25201e-05 7.25738e-05 6.26274e-05
- 5.78553e-05 5.42216e-05 5.05878e-05 4.69541e-05 4.33204e-05
- 3.96867e-05 3.60529e-05 3.24192e-05 2.87855e-05 2.51518e-05
- 2.19153e-05 2.03406e-05 1.8766e-05 1.71913e-05 1.56167e-05
- 1.4042e-05 1.24674e-05 1.08927e-05 9.31806e-06
- EOD
-
- @v[36].set(<<-'EOD')
- 5 5.01426 5.02852 5.01923 4.77685 4.56471 4.52338 4.56813
- 4.63122 4.693 4.74776 4.79385 4.83258 4.86358 4.88918 4.91021
- 4.90553 4.89733 4.89554 4.91953 5.00757 5.07101 5.06318
- 5.05241 5.05535 5.08042 5.07251 4.90973 4.56136 3.98637
- 3.237 2.67216 2.33678 2.13529 2.00544 1.91429 1.84638 1.79461
- 1.75338 1.71958 1.69175 1.6686 1.64918 1.63258 1.61836 1.60607
- 1.59506 1.58483 1.57575 1.56847 1.56193 1.55538 1.54968
- 1.54416 1.5388 1.53523 1.53165 1.52807 1.52449 1.52091 1.51771
- 1.51477 1.51182 1.50888 1.50593 1.50309 1.50113 1.49917
- 1.4972 1.49524 1.49328 1.49132 1.48935 1.48739 1.48543 1.48346
- 1.48157 1.48012 1.47868 1.47724 1.47579 1.47435 1.47291
- 1.47146 1.47002 1.46857 1.46713 1.46574 1.46462 1.4635 1.46238
- 1.46126 1.46014 1.45902 1.4579 1.45678 1.45567 1.45455 1.45349
- 1.45275 1.45201 1.45127 1.45053 1.44979 1.44905 1.44831
- 1.44757 1.44683 1.44609 1.44535 1.44461 1.44387 1.44313
- 1.44239 1.44165 1.44091 1.44017 1.43943 1.43869 1.43795
- 1.43721 1.43874 1.43976 1.43619 1.43182 1.43726 1.43084
- 1.42587 1.42383 1.42642 1.42728 1.42736 1.4271 1.42669 1.42621
- 1.42569 1.41703 1.41244 1.41019 1.41199 1.41833 1.42502
- 1.41504 1.37535 1.28381 1.44779 2.33713 3.25835 3.67554
- 3.84975 4.01125 4.2253 4.45433 4.62215 4.74478 4.82998 4.8868
- 4.92396 4.94768 4.96498 4.98537 5.0128 5.04467 5.06722 5.06535
- 5.01475 4.91956 4.80647 4.7242 4.7059 4.73552 4.76379 4.81684
- 4.87376 4.92276 4.96112 4.9884 5.0045 5.00999 5.00933 5.00619
- 5.00384 5.00342 5.00373 5.00362 5.00309 5.00272 5.00239
- 5.00204 5.00172 5.00146 5.00124 5.00105 5.00089 5.00076
- 5.00065 5.00057 5.00048 5.00041 5.00034 5.00028 5.00023
- 5.00019 5.00015 5.00015 5.00016 5.0002 5.00023 5.00021 5.00019
- 5.00017 5.00015 5.00012 5.0001 5.00008 5.00007 5.00006 5.00005
- 5.00004 5.00003 5.00002 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002
- 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00001
- 5.00001 5.00001 5.00062 4.99506 4.9835 4.96726 4.9728 4.97877
- 4.98675 4.9966 5.00406 5.00679 5.00629 5.00561 5.00487 5.00429
- 5.00384 5.002 5.00164 5.00229 5.00484 5.00769 5.00019 5.00242
- 5.01319 5.0335 5.07265 5.10129 5.11485 5.12551 5.13953 5.16048
- 5.18862 5.22811 5.25656 5.25627 5.19975 4.9139 4.24745 3.43732
- 2.8202 2.43224 2.17409 2.01333 1.93951 1.94622 1.98861 2.02217
- 2.05383 2.08376 2.11184 2.13793 2.16191 2.18267 2.20502
- 2.22837 2.24958 2.26901 2.28648 2.302 2.31582 2.32802 2.33869
- 2.34795 2.35596 2.36282 2.3687 2.37371 2.37797 2.38161 2.38476
- 2.38743 2.3897 2.39168 2.39329 2.39463 2.39575 2.39671 2.39756
- 2.39835 2.39907 2.39968 2.39999 2.4003 2.40061 2.40091 2.40122
- 2.40142 2.40159 2.40176 2.40193 2.4021 2.40222 2.40228 2.40234
- 2.4024 2.40247 2.40253 2.40259 2.40265 2.40271 2.40277 2.40284
- 2.40287 2.40289 2.40291 2.40294 2.40296 2.40298 2.40301
- 2.40303 2.40305 2.40308 2.4031 2.40311 2.40312 2.40313 2.40314
- 2.40315 2.40316 2.40317 2.40318
- EOD
-
- @v[37].set(<<-'EOD')
- 5 5.01732 5.03181 5.05944 5.12686 5.20725 5.28103 5.31254
- 5.32901 5.33709 5.3408 5.34257 5.34311 5.34347 5.34386 5.34411
- 5.3406 5.33484 5.32942 5.32904 5.33644 5.34869 5.35001 5.34882
- 5.34758 5.34672 5.34599 5.34496 5.34364 5.34165 5.33712
- 5.33502 5.3366 5.34067 5.34306 5.34398 5.34434 5.34442 5.34443
- 5.34443 5.34441 5.34439 5.34437 5.34437 5.34438 5.34438
- 5.34438 5.34438 5.34438 5.34437 5.34437 5.34436 5.34436
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437
- 5.34437 5.34437 5.34437 5.34437 5.34437 5.35377 5.35451
- 5.34265 5.34488 5.35861 5.28622 4.90033 4.75027 4.89731
- 4.97098 4.99293 4.99832 4.99909 4.99956 4.99858 4.99829
- 4.9998 5.00035 5.0038 5.00989 5.00251 4.99438 4.9953 4.99761
- 4.99985 5.00152 5.0011 5.00046 4.99996 4.99925 4.99862 4.99919
- 4.99961 5.00048 5.00234 4.99654 4.98235 4.95936 4.83738
- 4.53021 4.21004 4.00593 3.91207 3.88059 3.87822 3.89117
- 3.91278 3.94044 3.97376 4.01152 4.05052 4.10679 4.17908
- 4.25673 4.33414 4.40875 4.47879 4.54342 4.60258 4.65595
- 4.70291 4.74414 4.78018 4.81185 4.83915 4.86291 4.88301
- 4.90048 4.91528 4.92802 4.9387 4.94777 4.95539 4.9618 4.96725
- 4.97195 4.97588 4.97932 4.98247 4.98512 4.98697 4.98831
- 4.98919 4.99015 4.99101 4.99169 4.99222 4.99282 4.99341
- 4.994 4.9946 4.99519 4.99578 4.99638 4.99667 4.99693 4.9972
- 4.99747 4.99773 4.998 4.99827 4.99841 4.99849 4.99856 4.99864
- 4.99872 4.9988 4.99888 4.99896 4.99904 4.99911 4.99919 4.99927
- 4.99935 4.99943 4.9995 4.99955 4.9996 4.99965 4.9997 5.00736
- 4.98252 4.87516 4.66727 4.49142 4.43103 4.4301 4.4571 4.49729
- 4.5407 4.5835 4.62363 4.66114 4.69577 4.72738 4.74632 4.75971
- 4.77576 4.80671 4.87073 4.91665 4.93252 4.94418 4.95331
- 4.96094 4.96727 4.97148 4.97471 4.97612 4.98276 5.00247
- 5.04086 5.08628 5.10673 5.08887 5.0564 5.02767 5.01336 4.99685
- 4.97422 4.90866 4.67035 4.33117 4.07888 3.94432 3.89105
- 3.88174 3.89292 3.91442 3.94564 3.98708 4.0355 4.09134 4.16315
- 4.24088 4.31918 4.39527 4.46693 4.53337 4.59405 4.6486 4.69693
- 4.73938 4.77617 4.80809 4.83551 4.85895 4.87894 4.89596
- 4.91081 4.92417 4.93651 4.94552 4.95198 4.9565 4.96096 4.96523
- 4.96972 4.97428 4.97868 4.98064 4.9826 4.98455 4.98651 4.98847
- 4.98967 4.99064 4.9916 4.99257 4.99353 4.99422 4.99457 4.99493
- 4.99528 4.99563 4.99598 4.99633 4.99668 4.99703 4.99738
- 4.99773 4.9979 4.99804 4.99817 4.9983 4.99843 4.99856 4.99869
- 4.99883 4.99896 4.99909 4.99921 4.99926 4.99931 4.99937
- 4.99942 4.99948 4.99953 4.99959 4.99964
- EOD
-
- @v[38].set(<<-'EOD')
- 4.49849 4.53282 4.58329 4.66625 4.83345 4.97823 5.0207 5.01816
- 5.01116 5.00595 5.00296 5.00148 5.00073 5.00062 5.00033
- 5.0003 4.99864 4.99661 4.99652 4.99928 5.00361 5.12573 5.17251
- 5.22612 5.33479 5.44503 5.44432 5.44379 5.44334 5.443 5.44276
- 5.44258 5.44246 5.44238 5.44232 5.44228 5.44225 5.44223
- 5.44221 5.4422 5.44219 5.44219 5.44218 5.44218 5.44218 5.44218
- 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217
- 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217
- 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44216
- 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216
- 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216
- 5.44216 5.44216 5.44216 5.44216 5.44215 5.44215 5.44215
- 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215
- 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215
- 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215
- 5.44214 5.44214 5.44214 5.44214 5.44214 5.44214 5.44214
- 5.44214 5.44214 5.44214 5.44214 5.44212 5.45159 5.45236
- 5.44064 5.44307 5.45616 5.38122 4.77163 3.53297 2.74466
- 2.34448 2.11802 1.9783 1.88656 1.82001 1.77389 1.72955 1.69632
- 1.66971 1.6526 1.65236 1.56034 1.53764 1.97139 2.75096 3.39212
- 3.74042 3.82345 3.85696 3.88547 3.91862 3.9585 4.00467 4.05903
- 4.1254 4.19533 4.26791 4.34517 4.42112 4.49238 4.55807 4.6179
- 4.6713 4.71815 4.75889 4.79418 4.82456 4.85062 4.87291 4.89196
- 4.90823 4.92209 4.93388 4.9439 4.95242 4.95968 4.96585 4.97108
- 4.9755 4.97923 4.98237 4.98503 4.98732 4.98927 4.99094 4.99233
- 4.99353 4.99452 4.99538 4.99608 4.99668 4.99718 4.9976 4.99794
- 4.99822 4.99847 4.99867 4.99884 4.99899 4.99913 4.99924
- 4.99932 4.99938 4.99943 4.99947 4.99951 4.99953 4.99955
- 4.99958 4.99961 4.99964 4.99967 4.99969 4.99972 4.99975
- 4.99977 4.99978 4.99979 4.99981 4.99982 4.99983 4.99985
- 4.99986 4.99986 4.99987 4.99987 4.99988 4.99988 4.99988
- 4.99989 4.99989 4.9999 4.9999 4.99991 4.99991 4.99992 4.99992
- 4.99993 4.99993 4.99993 4.99994 5.00381 5.00064 4.99246
- 4.99823 5.00349 5.00076 5.00033 5.00015 5.00009 5.00007
- 5.00005 5.00004 5.00003 5.00002 4.99988 4.99732 4.99728
- 4.9978 5.00187 5.00927 5.08712 5.07654 4.92855 4.4863 3.76162
- 3.00049 2.49834 2.20883 2.03492 1.92384 1.84676 1.79021
- 1.74716 1.7132 1.68576 1.66309 1.64406 1.62785 1.61383 1.60162
- 1.59081 1.58117 1.57253 1.56473 1.55765 1.55117 1.54527
- 1.53988 1.53485 1.53012 1.5257 1.5216 1.51773 1.51411 1.51071
- 1.50746 1.50438 1.50146 1.49868 1.49603 1.4935 1.49109 1.48878
- 1.48657 1.48445 1.48242 1.48046 1.47858 1.47677 1.47502
- 1.47333 1.4717 1.47012 1.46859 1.46711 1.46568 1.46428 1.46292
- 1.4616 1.46034 1.45923 1.45812 1.45701 1.4559 1.45479 1.45378
- 1.45279 1.45181 1.45082 1.44983 1.44893 1.44813 1.44732
- 1.44652 1.44571 1.44491 1.4441 1.4433 1.44249 1.44169 1.44089
- 1.44019 1.43951 1.43883 1.43815 1.43747 1.4368 1.43612 1.43544
- 1.43476 1.43408 1.43342 1.43283 1.43223 1.43163 1.43104
- 1.43044 1.42984 1.42924 1.42865
- EOD
-
- @v[39].set(<<-'EOD')
- 5 5.01048 5.01221 4.98887 4.76261 4.54943 4.51564 4.56249
- 4.62621 4.68843 4.74374 4.79044 4.82972 4.86127 4.88724
- 4.90862 4.90791 4.89858 4.89589 4.91767 5.00405 5.16956
- 5.12391 4.7557 3.87953 3.01124 2.48482 2.20424 2.03812 1.92679
- 1.84956 1.79256 1.74907 1.71487 1.68724 1.6644 1.64513 1.6287
- 1.61446 1.60197 1.59095 1.58117 1.57245 1.5646 1.55752 1.55109
- 1.54516 1.53958 1.53444 1.53008 1.52606 1.52205 1.51843
- 1.5149 1.51146 1.50893 1.50639 1.50387 1.50133 1.4988 1.49651
- 1.49436 1.49222 1.49007 1.48793 1.48585 1.48433 1.4828 1.48128
- 1.47975 1.47823 1.4767 1.47518 1.47365 1.47213 1.4706 1.46912
- 1.46795 1.46678 1.46561 1.46444 1.46327 1.4621 1.46093 1.45976
- 1.45859 1.45741 1.45628 1.45534 1.45441 1.45347 1.45254
- 1.4516 1.45067 1.44973 1.4488 1.44786 1.44693 1.44604 1.44539
- 1.44475 1.4441 1.44345 1.44281 1.44216 1.44151 1.44086 1.44022
- 1.43957 1.43892 1.43828 1.43763 1.43698 1.43633 1.43569
- 1.43504 1.43439 1.43375 1.4331 1.43245 1.4318 1.43157 1.43089
- 1.43001 1.43042 1.42899 1.42439 1.42216 1.43447 1.44048
- 1.43705 1.43314 1.43039 1.42861 1.42739 1.42651 1.42548
- 1.42488 1.4243 1.42392 1.4235 1.32443 1.31149 1.78169 2.64844
- 3.43211 3.95252 4.20231 4.3746 4.49948 4.58929 4.65742 4.71183
- 4.77057 4.83196 4.88354 4.92894 4.96625 4.99235 5.00651
- 5.00941 5.00813 5.00689 5.00588 5.00504 5.00431 5.00368
- 5.00314 5.00268 5.00228 5.00194 5.00165 5.0014 5.00118 5.001
- 5.00085 5.00072 5.00061 5.00052 5.00044 5.00037 5.00031
- 5.00027 5.00022 5.00019 5.00016 5.00013 5.00011 5.00009
- 5.00008 5.00007 5.00006 5.00005 5.00004 5.00003 5.00003
- 5.00003 5.00002 5.00002 5.00002 5.00001 5.00001 5.00001
- 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001
- 5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99998
- 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999
- 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5.00001
- 5.00002 5.00003 5.00004 5.00022 4.99974 4.99942 4.99997
- 5.00063 5.00002 5.00003 4.99994 4.99998 4.99999 5 5 5 5
- 5 4.99981 4.99998 5.00004 5.00036 5.00049 5.12012 5.16315
- 5.19712 5.21835 4.87874 4.10151 3.31555 2.74207 2.38075
- 2.15872 2.01614 1.91886 1.84852 1.79401 1.75052 1.71508
- 1.68672 1.66467 1.64602 1.62985 1.61576 1.60343 1.59256
- 1.58287 1.57418 1.56632 1.55922 1.55282 1.54687 1.54132
- 1.53618 1.53143 1.52698 1.52282 1.51895 1.51527 1.5118 1.50851
- 1.5054 1.50244 1.49963 1.49695 1.4944 1.49196 1.48963 1.4874
- 1.48527 1.48322 1.48124 1.47934 1.47751 1.47574 1.47403
- 1.47239 1.4708 1.46926 1.46777 1.46632 1.46491 1.46355 1.46237
- 1.4612 1.46002 1.45884 1.45766 1.45659 1.45555 1.45451 1.45346
- 1.45242 1.45147 1.45062 1.44978 1.44894 1.44809 1.44725
- 1.4464 1.44556 1.44472 1.44387 1.44303 1.4423 1.44159 1.44088
- 1.44017 1.43947 1.43876 1.43805 1.43734 1.43664 1.43593
- 1.43524 1.43462 1.434 1.43338 1.43276 1.43213 1.43151 1.43089
- 1.43027
- EOD
- end
-
- def highlightTrace(graph)
- entry = graph.legend_get(:current)
- active_list = graph.legend_activate
- if active_list.include?(entry)
- graph.legend_deactivate(entry)
- graph.element_deactivate(entry)
- else
- graph.legend_activate(entry)
- graph.element_activate(entry)
- end
- end
-
-end
-
-BLT_Graph_Demo.new
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/graph7.rb b/ext/tk/sample/tkextlib/blt/graph7.rb
deleted file mode 100644
index 0e68388596..0000000000
--- a/ext/tk/sample/tkextlib/blt/graph7.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/blt'
-
-length = 250000
-graph = Tk::BLT::Graph.new(:title=>"Scatter Plot\n#{length} points")
-graph.xaxis_configure(:loose=>false, :title=>'X Axis Label')
-graph.yaxis_configure(:title=>'Y Axis Label')
-graph.legend_configure(:activerelief=>:sunken, :background=>'')
-
-Tk::BLT::Table.add(Tk.root, graph, [0,0], :fill=>:both)
-
-v_x = Tk::BLT::Vector.new(length)
-v_y = Tk::BLT::Vector.new(length)
-v_x.expr("random(#{v_x})")
-v_y.expr("random(#{v_y})")
-v_x.sort(v_y)
-
-plot = Tk::BLT::PlotComponent::Element.new(graph, :symbol=>:square,
- :color=>'green4', :fill=>'green2',
- :linewidth=>0, :outlinewidth=>1,
- :pixels=>4, :label=>'plot',
- :xdata=>v_x, :ydata=>v_y)
-
-Tk.root.minsize(0, 0)
-
-#graph.zoom_stack
-#graph.crosshairs
-#graph.active_legend
-#graph.closest_point
-Tk::BLT.zoom_stack(graph)
-Tk::BLT.crosshairs(graph)
-Tk::BLT.active_legend(graph)
-Tk::BLT.closest_point(graph)
-
-Tk::BLT::Busy.hold(graph)
-Tk.update
-Tk::BLT::Busy.release(graph)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/graph7a.rb b/ext/tk/sample/tkextlib/blt/graph7a.rb
deleted file mode 100644
index aa744f1f74..0000000000
--- a/ext/tk/sample/tkextlib/blt/graph7a.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/blt'
-
-file = File.join(File.dirname(File.expand_path(__FILE__)),
- 'images', 'buckskin.gif')
-bgTexture = TkPhotoImage.new(:file=>file)
-
-TkOption.add('*Graph.Tile', bgTexture)
-TkOption.add('*Label.Tile', bgTexture)
-TkOption.add('*Frame.Tile', bgTexture)
-TkOption.add('*Htext.Tile', bgTexture)
-TkOption.add('*TileOffset', 0)
-TkOption.add('*HighlightThickness', 0)
-TkOption.add('*Element.ScaleSybols', false)
-TkOption.add('*Element.Smooth', :linear)
-TkOption.add('*activeLine.Color', 'yellow4')
-TkOption.add('*activeLine.Fill', 'yellow')
-TkOption.add('*activeLine.LineWidth', 0)
-TkOption.add('*Element.Pixels', 3)
-TkOption.add('*Graph.halo', '7i')
-
-if Tk.root.winfo_screenvisual != 'staticgray'
- TkOption.add('*print.background', 'yellow')
- TkOption.add('*quit.background', 'red')
-end
-
-length = 250000
-graph = Tk::BLT::Graph.new(:title=>"Scatter Plot\n#{length} points")
-graph.xaxis_configure(:loose=>false, :title=>'X Axis Label')
-graph.yaxis_configure(:title=>'Y Axis Label')
-graph.legend_configure(:activerelief=>:sunken, :background=>'')
-
-Tk::BLT::Table.add(Tk.root, graph, [0,0], :fill=>:both)
-
-v_x = Tk::BLT::Vector.new(length)
-v_y = Tk::BLT::Vector.new(length)
-v_x.expr("random(#{v_x})")
-v_y.expr("random(#{v_y})")
-v_x.sort(v_y)
-
-plot = Tk::BLT::PlotComponent::Element.new(graph, :symbol=>:square,
- :color=>'green4', :fill=>'green2',
- :linewidth=>0, :outlinewidth=>1,
- :pixels=>4, :label=>'plot',
- :xdata=>v_x, :ydata=>v_y)
-
-Tk.root.minsize(0, 0)
-
-#graph.zoom_stack
-#graph.crosshairs
-#graph.active_legend
-#graph.closest_point
-Tk::BLT.zoom_stack(graph)
-Tk::BLT.crosshairs(graph)
-Tk::BLT.active_legend(graph)
-Tk::BLT.closest_point(graph)
-
-Tk::BLT::Busy.hold(graph)
-Tk.update
-Tk::BLT::Busy.release(graph)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/graph7b.rb b/ext/tk/sample/tkextlib/blt/graph7b.rb
deleted file mode 100644
index 5b30c4bac0..0000000000
--- a/ext/tk/sample/tkextlib/blt/graph7b.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/blt'
-
-length = 250000
-graph = Tk::BLT::Graph.new(:title=>"Scatter Plot\n#{length} points")
-graph.xaxis_configure(:loose=>false, :title=>'X Axis Label')
-graph.yaxis_configure(:title=>'Y Axis Label')
-graph.legend_configure(:activerelief=>:sunken, :background=>'')
-
-Tk::BLT::Table.add(Tk.root, graph, [0,0], :fill=>:both)
-
-x = Array.new(length)
-y = Array.new(length)
-(0...length).each{|i|
- x[i] = rand
- y[i] = rand
-}
-
-plot = Tk::BLT::PlotComponent::Element.new(graph, :symbol=>:square,
- :color=>'green4', :fill=>'green2',
- :linewidth=>0, :outlinewidth=>1,
- :pixels=>4, :label=>'plot',
- :xdata=>x, :ydata=>y)
-
-Tk.root.minsize(0, 0)
-
-#graph.zoom_stack
-#graph.crosshairs
-#graph.active_legend
-#graph.closest_point
-Tk::BLT.zoom_stack(graph)
-Tk::BLT.crosshairs(graph)
-Tk::BLT.active_legend(graph)
-Tk::BLT.closest_point(graph)
-
-Tk::BLT::Busy.hold(graph)
-Tk.update
-Tk::BLT::Busy.release(graph)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/graph7c.rb b/ext/tk/sample/tkextlib/blt/graph7c.rb
deleted file mode 100644
index 8cbf3223f1..0000000000
--- a/ext/tk/sample/tkextlib/blt/graph7c.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/blt'
-
-length = 250000
-graph = Tk::BLT::Graph.new(:title=>"Scatter Plot\n#{length} points")
-graph.xaxis_configure(:loose=>false, :title=>'X Axis Label')
-graph.yaxis_configure(:title=>'Y Axis Label')
-graph.legend_configure(:activerelief=>:sunken, :background=>'')
-
-Tk::BLT::Table.add(Tk.root, graph, [0,0], :fill=>:both)
-
-v_x = Tk::BLT::Vector.new(length)
-v_y = Tk::BLT::Vector.new(length)
-x = Array.new(length)
-y = Array.new(length)
-(0...length).each{|i|
- x[i] = rand
- y[i] = rand
-}
-v_x.set(x)
-v_y.set(y)
-
-plot = Tk::BLT::PlotComponent::Element.new(graph, :symbol=>:square,
- :color=>'green4', :fill=>'green2',
- :linewidth=>0, :outlinewidth=>1,
- :pixels=>4, :label=>'plot',
- :xdata=>v_x, :ydata=>v_y)
-
-Tk.root.minsize(0, 0)
-
-#graph.zoom_stack
-#graph.crosshairs
-#graph.active_legend
-#graph.closest_point
-Tk::BLT.zoom_stack(graph)
-Tk::BLT.crosshairs(graph)
-Tk::BLT.active_legend(graph)
-Tk::BLT.closest_point(graph)
-
-Tk::BLT::Busy.hold(graph)
-Tk.update
-Tk::BLT::Busy.release(graph)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/images/buckskin.gif b/ext/tk/sample/tkextlib/blt/images/buckskin.gif
deleted file mode 100644
index e2d7be9d62..0000000000
--- a/ext/tk/sample/tkextlib/blt/images/buckskin.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/blt/images/chalk.gif b/ext/tk/sample/tkextlib/blt/images/chalk.gif
deleted file mode 100644
index 30d29a7221..0000000000
--- a/ext/tk/sample/tkextlib/blt/images/chalk.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/blt/images/qv100.t.gif b/ext/tk/sample/tkextlib/blt/images/qv100.t.gif
deleted file mode 100644
index 1e738ee86b..0000000000
--- a/ext/tk/sample/tkextlib/blt/images/qv100.t.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/blt/images/rain.gif b/ext/tk/sample/tkextlib/blt/images/rain.gif
deleted file mode 100644
index d7bb417939..0000000000
--- a/ext/tk/sample/tkextlib/blt/images/rain.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/blt/images/sample.gif b/ext/tk/sample/tkextlib/blt/images/sample.gif
deleted file mode 100644
index 1d8a4010c3..0000000000
--- a/ext/tk/sample/tkextlib/blt/images/sample.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/blt/pareto.rb b/ext/tk/sample/tkextlib/blt/pareto.rb
deleted file mode 100644
index e68cde7992..0000000000
--- a/ext/tk/sample/tkextlib/blt/pareto.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/blt'
-
-# Example of a pareto chart.
-#
-# The pareto chart mixes line and bar elements in the same graph.
-# Each processing operating is represented by a bar element. The
-# total accumulated defects is displayed with a single line element.
-b = Tk::BLT::Barchart.new(:title=>'Defects Found During Inspection',
- :font=>'Helvetica 12', :plotpady=>[12, 4],
- :width=>'6i', :height=>'5i')
-Tk::BLT::Table.add(Tk.root, b, :fill=>:both)
-
-data = [
- ["Spot Weld", 82, 'yellow'],
- ["Lathe", 49, 'orange'],
- ["Gear Cut", 38, 'green'],
- ["Drill", 24, 'blue'],
- ["Grind", 17, 'red'],
- ["Lapping", 12, 'brown'],
- ["Press", 8, 'purple'],
- ["De-burr", 4, 'pink'],
- ["Packaging", 3, 'cyan'],
- ["Other", 12, 'magenta']
-]
-
-# Create an X-Y graph line element to trace the accumulated defects.
-b.line_create('accum', :label=>'', :symbol=>:none, :color=>'red')
-
-# Define a bitmap to be used to stipple the background of each bar.
-pattern1 = Tk::BLT::Bitmap.define([ [4, 4], [1, 2, 4, 8] ])
-
-# For each process, create a bar element to display the magnitude.
-count = 0
-sum = 0
-ydata = [0]
-xdata = [0]
-labels = []
-
-data.each{|label, value, color|
- count += 1
- b.element_create(label, :xdata=>count, :ydata=>value, :foreground=>color,
- :relief=>:solid, :borderwidth=>1, :stipple=>pattern1,
- :background=>'lightblue')
- labels[count] = label
- # Get the total number of defects.
- sum += value
- ydata << sum
- xdata << count
-}
-
-# Configure the coordinates of the accumulated defects,
-# now that we know what they are.
-b.element_configure('accum', :xdata=>xdata, :ydata=>ydata)
-
-# Add text markers to label the percentage of total at each point.
-xdata.zip(ydata){|x, y|
- percent = (y * 100.0) / sum
- if x == 0
- text = ' 0%'
- else
- text = '%.1f' % percent
- end
- b.marker_create(:text, :coords=>[x, y], :text=>text, :font=>'Helvetica 10',
- :foreground=>'red4', :anchor=>:center, :yoffset=>-5)
-}
-
-# Display an auxiliary y-axis for percentages.
-b.axis_configure('y2', :hide=>false, :min=>0.0, :max=>100.0,
- :title=>'Percentage')
-
-# Title the y-axis
-b.axis_configure('y', :title=>'Defects')
-
-# Configure the x-axis to display the process names, instead of numbers.
-b.axis_configure('x', :title=>'Process', :rotate=>90, :subdivisions=>0,
- :command=>proc{|w, val|
- val = val.round
- labels[val]? labels[val]: val
- })
-
-# No legend needed.
-b.legend_configure(:hide=>true)
-
-# Configure the grid lines.
-b.gridline_configure(:mapx=>:x, :color=>'lightblue')
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/plot1.rb b/ext/tk/sample/tkextlib/blt/plot1.rb
deleted file mode 100644
index 95797c96b7..0000000000
--- a/ext/tk/sample/tkextlib/blt/plot1.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/blt'
-
-graph = Tk::BLT::Graph.new.pack
-plot = Tk::BLT::PlotComponent::Element.new(graph, :linewidth=>0, :label=>'foo')
-plot.data([[1.0, 3.4], [1.1, 2.8], [1.2, 3.1], [1.4, 2.9]].flatten)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/plot1b.rb b/ext/tk/sample/tkextlib/blt/plot1b.rb
deleted file mode 100644
index 96adbd792b..0000000000
--- a/ext/tk/sample/tkextlib/blt/plot1b.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/blt'
-
-graph = Tk::BLT::Graph.new.pack
-plot = graph.element_create
-plot.configure(:linewidth=>0, :label=>'foo',
- :data=>[[1.0, 3.4], [1.1, 2.8], [1.2, 3.1], [1.4, 2.9]].flatten)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/readme.txt b/ext/tk/sample/tkextlib/blt/readme.txt
deleted file mode 100644
index 8ac1044b0b..0000000000
--- a/ext/tk/sample/tkextlib/blt/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-The scripts and image files in this directory are based on demo files
-of Tcl/Tk's BLT extension.
diff --git a/ext/tk/sample/tkextlib/blt/scripts/stipples.rb b/ext/tk/sample/tkextlib/blt/scripts/stipples.rb
deleted file mode 100644
index 2a4943e032..0000000000
--- a/ext/tk/sample/tkextlib/blt/scripts/stipples.rb
+++ /dev/null
@@ -1,157 +0,0 @@
-# frozen_string_literal: false
-$stipples = {} unless $stipples
-
-$stipples['bdiagonal1'] = Tk::BLT::Bitmap.new(<<EOD)
-#define bdiagonal1_width 8
-#define bdiagonal1_height 8
-static unsigned char bdiagonal1_bits[] = {
- 0x88, 0x44, 0x22, 0x11, 0x88, 0x44, 0x22, 0x11};
-EOD
-
-$stipples['bdiagonal2'] = Tk::BLT::Bitmap.new(<<EOD)
-#define bdiagonal2_width 8
-#define bdiagonal2_height 8
-static unsigned char bdiagonal2_bits[] = {
- 0x08, 0x04, 0x02, 0x01, 0x80, 0x40, 0x20, 0x10};
-EOD
-
-$stipples['checker2'] = Tk::BLT::Bitmap.new(<<EOD)
-#define checker2_width 8
-#define checker2_height 8
-static unsigned char checker2_bits[] = {
- 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc};
-EOD
-
-
-$stipples['checker3'] = Tk::BLT::Bitmap.new(<<EOD)
-#define checker3_width 8
-#define checker3_height 8
-static unsigned char checker3_bits[] = {
- 0x0f, 0x0f, 0x0f, 0x0f, 0xf0, 0xf0, 0xf0, 0xf0};
-EOD
-
-$stipples['cross1'] = Tk::BLT::Bitmap.new(<<EOD)
-#define cross1_width 8
-#define cross1_height 8
-static unsigned char cross_bits[] = {
- 0xff, 0xaa, 0xff, 0xaa, 0xff, 0xaa, 0xff, 0xaa};
-EOD
-
-$stipples['cross2'] = Tk::BLT::Bitmap.new(<<EOD)
-#define cross2_width 8
-#define cross2_height 8
-static unsigned char cross2_bits[] = {
- 0xff, 0x88, 0x88, 0x88, 0xff, 0x88, 0x88, 0x88};
-EOD
-
-$stipples['cross3'] = Tk::BLT::Bitmap.new(<<EOD)
-#define cross3_width 8
-#define cross3_height 8
-static unsigned char cross3_bits[] = {
- 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01};
-EOD
-
-$stipples['crossdiag'] = Tk::BLT::Bitmap.new(<<EOD)
-#define crossdiag_width 8
-#define crossdiag_height 8
-static unsigned char crossdiag2_bits[] = {
- 0x18, 0x24, 0x42, 0x81, 0x81, 0x42, 0x24, 0x18};
-EOD
-
-$stipples['dot1'] = Tk::BLT::Bitmap.new(<<EOD)
-#define dot1_width 8
-#define dot1_height 8
-static unsigned char dot1_bits[] = {
- 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa};
-EOD
-
-$stipples['dot2'] = Tk::BLT::Bitmap.new(<<EOD)
-#define dot2_width 8
-#define dot2_height 8
-static unsigned char dot2_bits[] = {
- 0x55, 0x00, 0x55, 0x00, 0x55, 0x00, 0x55, 0x00};
-EOD
-
-$stipples['dot3'] = Tk::BLT::Bitmap.new(<<EOD)
-#define dot3_width 8
-#define dot3_height 8
-static unsigned char dot3_bits[] = {
- 0x11, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00};
-EOD
-
-$stipples['dot4'] = Tk::BLT::Bitmap.new(<<EOD)
-#define dot4_width 8
-#define dot4_height 8
-static unsigned char dot4_bits[] = {
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-EOD
-
-$stipples['fdiagonal1'] = Tk::BLT::Bitmap.new(<<EOD)
-#define fdiagonal1_width 8
-#define fdiagonal1_height 8
-static unsigned char fdiagonal1_bits[] = {
- 0x11, 0x22, 0x44, 0x88, 0x11, 0x22, 0x44, 0x88};
-EOD
-
-$stipples['fdiagonal2'] = Tk::BLT::Bitmap.new(<<EOD)
-#define fdiagonal2_width 8
-#define fdiagonal2_height 8
-static unsigned char fdiagonal2_bits[] = {
- 0x10, 0x20, 0x40, 0x80, 0x01, 0x02, 0x04, 0x08};
-EOD
-
-$stipples['hline1'] = Tk::BLT::Bitmap.new(<<EOD)
-#define hline1_width 8
-#define hline1_height 8
-static unsigned char hline1_bits[] = {
- 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00};
-EOD
-
-$stipples['hline2'] = Tk::BLT::Bitmap.new(<<EOD)
-#define hline2_width 8
-#define hline2_height 8
-static unsigned char hline2_bits[] = {
- 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00};
-EOD
-
-$stipples['lbottom'] = Tk::BLT::Bitmap.new(<<EOD)
-#define lbottom_width 8
-#define lbottom_height 8
-static unsigned char lbottom_bits[] = {
- 0x00, 0x11, 0x11, 0x77, 0x00, 0x11, 0x11, 0x77};
-EOD
-
-$stipples['ltop'] = Tk::BLT::Bitmap.new(<<EOD)
-#define ltop_width 8
-#define ltop_height 8
-static unsigned char ltop_bits[] = {
- 0xee, 0x88, 0x88, 0x00, 0xee, 0x88, 0x88, 0x00};
-EOD
-
-$stipples['rbottom'] = Tk::BLT::Bitmap.new(<<EOD)
-#define rbottom_width 8
-#define rbottom_height 8
-static unsigned char rbottom_bits[] = {
- 0x00, 0x88, 0x88, 0xee, 0x00, 0x88, 0x88, 0xee};
-EOD
-
-$stipples['rtop'] = Tk::BLT::Bitmap.new(<<EOD)
-#define rtop_width 8
-#define rtop_height 8
-static unsigned char rtop_bits[] = {
- 0x77, 0x11, 0x11, 0x00, 0x77, 0x11, 0x11, 0x00};
-EOD
-
-$stipples['vline1'] = Tk::BLT::Bitmap.new(<<EOD)
-#define vline1_width 8
-#define vline1_height 8
-static unsigned char vline1_bits[] = {
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55};
-EOD
-
-$stipples['vline2'] = Tk::BLT::Bitmap.new(<<EOD)
-#define vline2_width 8
-#define vline2_height 8
-static unsigned char vline2_bits[] = {
- 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33};
-EOD
diff --git a/ext/tk/sample/tkextlib/blt/winop1.rb b/ext/tk/sample/tkextlib/blt/winop1.rb
deleted file mode 100644
index 32c01cad6b..0000000000
--- a/ext/tk/sample/tkextlib/blt/winop1.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/blt'
-
-file = File.join(File.dirname(File.expand_path(__FILE__)),
- 'images', 'sample.gif')
-if File.exist?(file)
- src = TkPhotoImage.new(:file=>file)
-else
- fail RuntimeError, 'no image file'
-end
-
-width = src.width
-height = src.height
-
-TkOption.add('*Label.font', '*helvetica*10*')
-TkOption.add('*Label.background', 'white')
-
-l_img0 = TkLabel.new(:image=>src)
-l_hdr0 = TkLabel.new(:text=>"#{width} x #{height}")
-l_ftr0 = TkLabel.new(:text=>'100%')
-Tk.root.background('white')
-
-(2..10).each{|i|
- iw = width/i
- ih = height/i
- r = '%6g'%(100.0/i)
- dst = TkPhotoImage.new(:width=>iw, :height=>ih)
- Tk::BLT::Winop.image_resample(src, dst, :sinc)
- l_hdr = TkLabel.new(:text=>"#{iw} x #{ih}")
- l_ftr = TkLabel.new(:text=>"#{r}%")
- l_img = TkLabel.new(:image=>dst)
- Tk::BLT::Table.add(Tk.root,
- [0,i], l_hdr,
- [1,i], l_img,
- [2,i], l_ftr)
- Tk.update
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/blt/winop2.rb b/ext/tk/sample/tkextlib/blt/winop2.rb
deleted file mode 100644
index cc708573ab..0000000000
--- a/ext/tk/sample/tkextlib/blt/winop2.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/blt'
-
-file = File.join(File.dirname(File.expand_path(__FILE__)),
- 'images', 'qv100.t.gif')
-if File.exist?(file)
- src = TkPhotoImage.new(:file=>file)
-else
- fail RuntimeError, 'no image file'
-end
-
-width = src.width
-height = src.height
-
-TkOption.add('*Label.font', '*helvetica*10*')
-TkOption.add('*Label.background', 'white')
-
-[0, 90, 180, 270, 360, 45].each_with_index{|r, i|
- dest = TkPhotoImage.new
- Tk::BLT::Winop.image_rotate(src, dest, r)
- l_txt = TkLabel.new(:text=>"#{r} degrees")
- l_img = TkLabel.new(:image=>dest)
- Tk::BLT::Table.add(Tk.root, [0,i], l_img, [1,i], l_txt)
- Tk.update
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt
deleted file mode 100644
index 16ddca4e3c..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-
- ######################################################################
- ### The following text is the original 'LICENSE.txt' of BWidget ###
- ### 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 files ('bwidgtet.xbm' and 'x1.xbm') ###
- ### included in this directory are quoted from BWidget source ###
- ### archive. So, those bitmaps are under the following license. ###
- ######################################################################
-
-
-BWidget ToolKit
-Copyright (c) 1998-1999 UNIFIX.
-Copyright (c) 2001-2002 ActiveState Corp.
-
-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.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-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.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
-are acquiring the software on behalf of the Department of Defense, the
-software shall be classified as "Commercial Computer Software" and the
-Government shall have only "Restricted Rights" as defined in Clause
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
-authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license.
diff --git a/ext/tk/sample/tkextlib/bwidget/basic.rb b/ext/tk/sample/tkextlib/bwidget/basic.rb
deleted file mode 100644
index 11122ac941..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/basic.rb
+++ /dev/null
@@ -1,199 +0,0 @@
-# frozen_string_literal: false
-#
-# basic demo --- called from demo.rb
-#
-unless Object.const_defined?('DemoVar')
- fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. "
-end
-
-module DemoBasic
- @@var = TkVariable.new_hash
- @@after = nil
- @@count = 0
-
- def self.create(nb)
- frame = nb.insert('end', 'demoBasic', :text=>'Basic')
- topf = TkFrame.new(frame)
-
- titf1 = Tk::BWidget::TitleFrame.new(topf, :text=>'Label')
- titf2 = Tk::BWidget::TitleFrame.new(topf, :text=>'Entry')
-
- titf3 = Tk::BWidget::TitleFrame.new(frame, :text=>'Button and ArrowButton')
-
- _label(titf1.get_frame)
- _entry(titf2.get_frame)
- _button(titf3.get_frame)
-
- Tk.pack(titf1, titf2, :side=>:left, :fill=>:both, :padx=>4, :expand=>true)
- topf.pack(:pady=>2, :fill=>:x)
- titf3.pack(:pady=>2, :padx=>4, :fill=>:x)
- end
-
- def self._label(parent)
- lab = Tk::BWidget::Label.new(parent, :text=>'This is a Label widget',
- :helptext=>'Label widget')
- chk = TkCheckbutton.new(parent, :text=>'Disabled',
- :variable=>@@var.ref(lab, 'state'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{lab[:state] = @@var[lab, 'state']})
- lab.pack(:anchor=>:w, :pady=>4)
- chk.pack(:anchor=>:w)
- end
-
- def self._entry(parent)
- ent = Tk::BWidget::Entry.new(parent, :text=>'Press enter',
- :helptext=>'Entry widget',
- :command=>proc{
- @@var['entcmd'] = 'command called'
- Tk.after(500, proc{@@var['entcmd'] = ''})
- })
-
- chk1 = TkCheckbutton.new(parent, :text=>'Disabled',
- :variable=>@@var.ref(ent, 'state'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{ent.state = @@var[ent, 'state']})
-
- chk2 = TkCheckbutton.new(parent, :text=>'Non editable',
- :variable=>@@var.ref(ent, 'editable'),
- :onvalue=>false, :offvalue=>true,
- :command=>proc{
- ent.editable = @@var[ent, 'editable']
- })
-
- lab = TkLabel.new(parent, :textvariable=>@@var.ref('entcmd'),
- :foreground=>'red')
-
- ent.pack(:pady=>4, :anchor=>:w)
- Tk.pack(chk1, chk2, :anchor=>:w)
- lab.pack(:pady=>4)
- end
-
- def self._button(parent)
- frame = TkFrame.new(parent)
- but = Tk::BWidget::Button.new(frame, :text=>'Press me!',
- :repeatdelay=>300,
- :command=>proc{_butcmd('command')},
- :helptext=>'This is a Button widget')
-
- sep1 = Tk::BWidget::Separator.new(frame, :orient=>:vertical)
- arr1 = Tk::BWidget::ArrowButton.new(frame, :type=>:button,
- :width=>25, :height=>25, :repeatdelay=>300,
- :command=>proc{_butcmd('command')},
- :helptext=>"This is an ArrowButton widget\nof type button")
-
- sep2 = Tk::BWidget::Separator.new(frame, :orient=>:vertical)
- arr2 = Tk::BWidget::ArrowButton.new(frame, :type=>:arrow,
- :width=>25, :height=>25, :relief=>:sunken,
- :ipadx=>0, :ipady=>0, :repeatdelay=>300,
- :command=>proc{_butcmd('command')},
- :helptext=>"This is an ArrowButton widget\nof type arrow")
-
- but.pack(:side=>:left, :padx=>4)
- sep1.pack(:side=>:left, :padx=>4, :fill=>:y)
- arr1.pack(:side=>:left, :padx=>4)
- sep2.pack(:side=>:left, :padx=>4, :fill=>:y)
- arr2.pack(:side=>:left, :padx=>4)
- frame.pack
-
- Tk::BWidget::Separator.new(parent,
- :orient=>:horizontal).pack(:fill=>:x, :pady=>10)
-
- labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Command',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
- subf = labf1.get_frame
- chk1 = TkCheckbutton.new(subf, :text=>'Disabled',
- :variable=>@@var.ref('bstate'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{_bstate(@@var['bstate'],
- but, arr1, arr2)})
- chk2 = TkCheckbutton.new(subf, :text=>"Use armcommand/\ndisarmcommand",
- :variable=>@@var.ref('barmcmd'),
- :command=>proc{_barmcmd(@@var['barmcmd'],
- but, arr1, arr2)})
- Tk.pack(chk1, chk2, :anchor=>:w)
-
- label = TkLabel.new(parent, :textvariable=>@@var.ref('butcmd'),
- :foreground=>'red').pack(:side=>:bottom, :pady=>4)
-
- labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Direction',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
- subf = labf2.get_frame
- @@var['bside'] = :top
- [:top, :left, :bottom, :right].each{|dir|
- TkRadiobutton.new(subf, :text=>"#{dir} arrow",
- :variable=>@@var.ref('bside'), :value=>dir,
- :command=>proc{_bside(@@var['bside'], arr1, arr2)}
- ).pack(:anchor=>:w)
- }
-
- labf3 = Tk::BWidget::LabelFrame.new(parent, :text=>'Relief',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
- subf = labf3.get_frame
- @@var['brelief'] = :raised
- [ %w(raised sunken ridge groove), %w(flat solid link)].each{|lrelief|
- f = TkFrame.new(subf)
- lrelief.each{|relief|
- TkRadiobutton.new(f, :text=>relief,
- :variable=>@@var.ref('brelief'), :value=>relief,
- :command=>proc{
- _brelief(@@var['brelief'], but, arr1, arr2)
- }).pack(:anchor=>:w)
- }
- f.pack(:side=>:left, :padx=>2, :anchor=>:n)
- }
- Tk.pack(labf1, labf2, labf3, :side=>:left, :fill=>:y, :padx=>4)
- end
-
- def self._bstate(state, but, arr1, arr2)
- [but, arr1, arr2].each{|b| b[:state] = state}
- end
-
- def self._brelief(relief, but, arr1, arr2)
- but[:relief] = relief
- if relief.to_s != 'link'
- [arr1, arr2].each{|arr| arr[:relief] = relief}
- end
- end
-
- def self._bside(side, *args)
- args.each{|arr| arr[:dir] = side}
- end
-
- def self._barmcmd(value, but, arr1, arr2)
- if TkComm.bool(value)
- but.configure(:armcommand=>proc{_butcmd('arm')},
- :disarmcommand=>proc{_butcmd('disarm')},
- :command=>'')
- [arr1, arr2].each{|arr|
- arr.configure(:armcommand=>proc{_butcmd('arm')},
- :disarmcommand=>proc{_butcmd('disarm')},
- :command=>'')
- }
- else
- but.configure(:armcommand=>'', :disarmcommand=>'',
- :command=>proc{_butcmd('command')})
- [arr1, arr2].each{|arr|
- arr.configure(:armcommand=>'', :disarmcommand=>'',
- :command=>proc{_butcmd('command')})
- }
- end
- end
-
- def self._butcmd(reason)
- unless @@after
- @@after = TkTimer.new(500, 1, proc{@@var['butcmd'] = ''})
- end
- @@after.stop
- if (reason == 'arm')
- @@count += 1
- @@var['butcmd'] = "#{reason} command called (#{@@count})"
- else
- @@count = 0
- @@var['butcmd'] = "#{reason} command called"
- end
- @@after.start
- end
-end
diff --git a/ext/tk/sample/tkextlib/bwidget/bwidget.xbm b/ext/tk/sample/tkextlib/bwidget/bwidget.xbm
deleted file mode 100644
index 5451ebb9c0..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/bwidget.xbm
+++ /dev/null
@@ -1,46 +0,0 @@
-#define bwidget_width 76
-#define bwidget_height 64
-static char bwidget_bits[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0x00,0xb6,0x6d,0xdb,0x16,0x00,0x00,0x00,0x00,0xf0,
- 0x00,0xdb,0xb6,0x6d,0xab,0x00,0x00,0x00,0x00,0xf0,0x00,0x55,0x55,0x55,0x75,
- 0x01,0x00,0x00,0x00,0xf0,0x00,0x6d,0xdb,0xb6,0xad,0x02,0x00,0x00,0x00,0xf0,
- 0x00,0xb6,0x6d,0xdb,0xb6,0x05,0x00,0x00,0x00,0xf0,0x00,0x55,0x55,0x55,0x55,
- 0x05,0x00,0x00,0x00,0xf0,0x00,0xda,0xb6,0xad,0x6d,0x0b,0x00,0x00,0x00,0xf0,
- 0x00,0x6b,0x03,0xc0,0xb6,0x05,0x00,0x00,0x00,0xf0,0x00,0x56,0x05,0x00,0x55,
- 0x0d,0x00,0x00,0x00,0xf0,0x00,0xbb,0x05,0x80,0xdb,0x06,0x00,0x00,0x00,0xf0,
- 0x00,0xca,0x06,0x00,0x6c,0x0b,0x00,0x00,0x00,0xf0,0x00,0xb6,0x02,0x00,0xaa,
- 0x0a,0x00,0x00,0x00,0xf0,0x00,0xab,0x05,0x00,0x6c,0x0b,0x00,0x00,0x00,0xf0,
- 0x00,0xdd,0x06,0x00,0xb6,0x05,0x00,0x00,0x00,0xf0,0x00,0xaa,0x02,0x00,0x55,
- 0x05,0x00,0x00,0x00,0xf0,0x00,0xb7,0x05,0xc0,0xda,0x02,0x00,0x00,0x00,0xf0,
- 0x00,0xd9,0x06,0x50,0x6b,0x01,0x00,0x00,0x00,0xf0,0x00,0x56,0xb5,0xad,0xad,
- 0x00,0x00,0x00,0x00,0xf0,0x00,0xdb,0xd6,0x76,0x15,0x00,0x00,0x00,0x00,0xf0,
- 0x00,0x6a,0xab,0xaa,0x2d,0x00,0x00,0x00,0x00,0xf0,0x00,0x56,0x75,0xad,0xb6,
- 0x02,0x00,0x00,0x00,0xf0,0x00,0xbb,0xad,0xd6,0xaa,0x05,0x00,0x00,0x00,0xf0,
- 0x00,0xca,0xb6,0x6b,0xdb,0x2a,0x00,0x00,0x00,0xf0,0x00,0x77,0xd5,0x5c,0x6d,
- 0x2d,0x00,0x00,0x00,0xf0,0x00,0x99,0x05,0x00,0xaa,0x56,0x00,0x00,0x00,0xf0,
- 0x00,0xee,0x06,0x00,0x6c,0xbb,0x00,0x00,0x00,0xf0,0x00,0xaa,0x02,0x00,0xb0,
- 0x55,0x00,0x00,0x00,0xf0,0x00,0x55,0x05,0x00,0xa8,0xd6,0x00,0x00,0x00,0xf0,
- 0x00,0xee,0x06,0x00,0xd0,0x6a,0x00,0x00,0x00,0xf0,0x00,0x55,0x03,0x00,0x68,
- 0xb7,0xfc,0x00,0x7e,0xf0,0x00,0x6d,0x05,0x00,0xa8,0xaa,0xfc,0x80,0x7e,0xf0,
- 0x00,0xb6,0x05,0x00,0x50,0xbb,0xfe,0x01,0x7e,0xf0,0x00,0x55,0x05,0x00,0x78,
- 0xad,0xfe,0x81,0x1f,0xf0,0x00,0xb6,0x05,0x00,0xa4,0xb5,0xfe,0x81,0x1f,0xf0,
- 0x00,0x5b,0x05,0x80,0xba,0x56,0xfe,0x83,0x1f,0xf0,0x00,0xaa,0x6b,0x5b,0xd5,
- 0x5a,0xff,0x85,0x1f,0xf0,0x00,0xdb,0x5a,0xad,0x57,0x2b,0xff,0xc7,0x0f,0xf0,
- 0x00,0x6d,0xad,0xd5,0x6a,0x0d,0xff,0xc7,0x0f,0xf0,0x00,0xaa,0xd6,0xb6,0xba,
- 0x05,0xdf,0xc7,0x0f,0xf0,0x00,0xb7,0xb5,0x5a,0xab,0x8a,0xdf,0xcf,0x0f,0xf0,
- 0x00,0xd9,0x5a,0xab,0x6d,0x8f,0xcf,0xef,0x07,0xf0,0x00,0x56,0xad,0x75,0xb5,
- 0xaf,0x8f,0xef,0x07,0xf0,0x00,0xb5,0xeb,0x5a,0x00,0x9f,0xcf,0xef,0x07,0xf0,
- 0x00,0x00,0x00,0x00,0x00,0xff,0x8f,0xff,0x07,0xf0,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0x87,0xff,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0xff,0x03,0xff,0x03,0xf0,
- 0x00,0x00,0x00,0x00,0x00,0xfe,0x03,0xff,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0x03,0xff,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0xff,0x03,0xf0,
- 0x00,0x00,0x00,0x00,0x00,0xfe,0x01,0xfe,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0x01,0xfe,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0};
diff --git a/ext/tk/sample/tkextlib/bwidget/demo.rb b/ext/tk/sample/tkextlib/bwidget/demo.rb
deleted file mode 100644
index 5fe54eebbd..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/demo.rb
+++ /dev/null
@@ -1,244 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/bwidget'
-
-module DemoVar
- @_wfont = nil
- @notebook = nil
- @mainframe = nil
- @status = TkVariable.new
- @prgtext = TkVariable.new
- @prgindic = TkVariable.new
- @font = nil
- @font_name = nil
- @toolbar1 = TkVariable.new(true)
- @toolbar2 = TkVariable.new(true)
-end
-class << DemoVar
- attr_accessor :_wfont, :notebook, :mainframe, :font, :font_name
- attr_reader :status, :prgtext, :prgindic, :toolbar1, :toolbar2
-end
-
-class BWidget_Demo
- DEMODIR = File.dirname(File.expand_path(__FILE__))
-
- %w(manager basic select dnd tree tmpldlg).each{|f|
- require File.join(DEMODIR, f << '.rb')
- }
-
- def initialize
- TkOption.add('*TitleFrame.l.font', 'helvetica 11 bold italic')
-
- root = TkRoot.new(:title=>'BWidget demo')
- root.withdraw
-
- _create
-
- Tk::BWidget.place(root, 0, 0, :center)
- root.deiconify
- root.raise
- root.focus(true)
-
- root.geometry(root.geometry)
- end
-
- def _create
- DemoVar.prgtext.value = 'Please wait while loading font...'
- DemoVar.prgindic.value = -1
-
- intro = _create_intro
-
- Tk.update
-
- Tk::BWidget::SelectFont.load_font
-
- descmenu = [
- '&File', 'all', 'file', 0, [
- ['command', 'E&xit', [], 'Exit BWidget demo', [],
- {:command=>proc{exit}}]
- ],
- '&Options', 'all', 'options', 0, [
- ['checkbutton', 'Toolbar &1', ['all', 'option'],
- 'Show/hide toolbar 1', [],
- { :variable=>DemoVar.toolbar1,
- :command=>proc{
- DemoVar.mainframe.show_toolbar(0, DemoVar.toolbar1.value)
- }
- }
- ],
- ['checkbutton', 'Toolbar &2', ['all', 'option'],
- 'Show/hide toolbar 2', [],
- { :variable=>DemoVar.toolbar2,
- :command=>proc{
- DemoVar.mainframe.show_toolbar(1, DemoVar.toolbar2.value)
- }
- }
- ]
- ]
- ]
-
- DemoVar.prgtext.value = 'Creating MainFrame...'
- DemoVar.prgindic.value = 0
-
- DemoVar.mainframe = Tk::BWidget::MainFrame.new(
- :menu=>descmenu,
- :textvariable=>DemoVar.status,
- :progressvar=>DemoVar.prgindic
- )
-
- # toolbar 1 creation
- DemoVar.prgindic.numeric += 1
-
- DemoVar.mainframe.add_toolbar{|tb1|
- Tk::BWidget::ButtonBox.new(tb1, :spacing=>0, :padx=>1, :pady=>1){|bbox|
- add(:image=>Tk::BWidget::Bitmap.new('new'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Create a new file" icon'},
- :helptext=>"Create a new file")
-
- add(:image=>Tk::BWidget::Bitmap.new('open'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Open an existing file" icon'},
- :helptext=>"Open an existing file")
-
- add(:image=>Tk::BWidget::Bitmap.new('save'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Save file" icon'},
- :helptext=>"Save file")
-
- pack(:side=>:left, :anchor=>:w)
- }
-
- Tk::BWidget::Separator.new(tb1, :orient=>:vertical){
- pack(:side=>:left, :fill=>:y, :padx=>4, :anchor=>:w)
- }
-
- DemoVar.prgindic.numeric += 1
-
- Tk::BWidget::ButtonBox.new(tb1, :spacing=>0, :padx=>1, :pady=>1){|bbox|
- add(:image=>Tk::BWidget::Bitmap.new('cut'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Cut selection" icon'},
- :helptext=>"Cut selection")
-
- add(:image=>Tk::BWidget::Bitmap.new('copy'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Copy selection" icon'},
- :helptext=>"Copy selection")
-
- add(:image=>Tk::BWidget::Bitmap.new('paste'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Paste selection" icon'},
- :helptext=>"Paste selection")
-
- pack(:side=>:left, :anchor=>:w)
- }
- }
-
- # toolbar 2 creation
- DemoVar.prgindic.numeric += 1
-
- tb2 = DemoVar.mainframe.add_toolbar
- DemoVar._wfont = Tk::BWidget::SelectFont::Toolbar.new(tb2,
- :command=>proc{update_font(DemoVar._wfont[:font])}
- )
- DemoVar.font = DemoVar._wfont[:font]
- DemoVar._wfont.pack(:side=>:left, :anchor=>:w)
-
- DemoVar.mainframe.add_indicator(
- :text=>"BWidget #{Tk::BWidget.package_version}"
- )
- DemoVar.mainframe.add_indicator(:textvariable=>'tk_patchLevel')
-
- # NoteBook creation
- DemoVar.notebook = Tk::BWidget::NoteBook.new(DemoVar.mainframe.get_frame)
-
- DemoVar.prgtext.value = "Creating Manager..."
- DemoVar.prgindic.numeric += 1
- DemoManager.create(DemoVar.notebook)
-
- DemoVar.prgtext.value = "Creating Basic..."
- DemoVar.prgindic.numeric += 1
- DemoBasic.create(DemoVar.notebook)
-
- DemoVar.prgtext.value = "Creating Select..."
- DemoVar.prgindic.numeric += 1
- DemoSelect.create(DemoVar.notebook)
-
- DemoVar.prgtext.value = "Creating Dialog..."
- DemoVar.prgindic.numeric += 1
- DemoDialog.create(DemoVar.notebook)
-
- DemoVar.prgtext.value = "Creating Drag and Drop..."
- DemoVar.prgindic.numeric += 1
- DemoDnD.create(DemoVar.notebook)
-
- DemoVar.prgtext.value = "Creating Tree..."
- DemoVar.prgindic.numeric += 1
- DemoTree.create(DemoVar.notebook)
-
- DemoVar.prgtext.value = "Done"
- DemoVar.prgindic.numeric += 1
-
- DemoVar.notebook.compute_size
- DemoVar.notebook.pack(:fill=>:both, :expand=>true, :padx=>4, :pady=>4)
- DemoVar.notebook.raise(DemoVar.notebook.get_page(0))
-
- DemoVar.mainframe.pack(:fill=>:both, :expand=>true)
-
- Tk.update_idletasks
-
- intro.destroy
- end
-
- def update_font(newfont)
- root = Tk.root
- root[:cursor] = 'watch'
- if newfont != '' && DemoVar.font != newfont
- DemoVar._wfont[:font] = newfont
- DemoVar.notebook[:font] = newfont
- DemoVar.font = newfont
- end
- root[:cursor] = ''
- end
-
- def _create_intro
- top = TkToplevel.new(:relief=>:raised, :borderwidth=>2)
- top.withdraw
- top.overrideredirect(true)
-
- ximg = TkLabel.new(top, :bitmap=>"@#{File.join(DEMODIR,'x1.xbm')}",
- :foreground=>'grey90', :background=>'white')
- bwimg = TkLabel.new(ximg, :bitmap=>"@#{File.join(DEMODIR,'bwidget.xbm')}",
- :foreground=>'grey90', :background=>'white')
- frame = TkFrame.new(ximg, :background=>'white')
- TkLabel.new(frame, :text=>'Loading demo',
- :background=>'white', :font=>'times 8').pack
- TkLabel.new(frame, :textvariable=>DemoVar.prgtext,
- :background=>'white', :font=>'times 8', :width=>35).pack
- Tk::BWidget::ProgressBar.new(frame, :width=>50, :height=>10,
- :background=>'white',
- :variable=>DemoVar.prgindic,
- :maximum=>10).pack
- frame.place(:x=>0, :y=>0, :anchor=>:nw)
- bwimg.place(:relx=>1, :rely=>1, :anchor=>:se)
- ximg.pack
- Tk::BWidget.place(top, 0, 0, :center)
- top.deiconify
-
- top
- end
-end
-
-module DemoVar
- Demo = BWidget_Demo.new
-end
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/bwidget/dnd.rb b/ext/tk/sample/tkextlib/bwidget/dnd.rb
deleted file mode 100644
index 326288bade..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/dnd.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# frozen_string_literal: false
-#
-# dnd demo --- called from demo.rb
-#
-unless Object.const_defined?('DemoVar')
- fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. "
-end
-
-module DemoDnD
- def self.create(nb)
- frame = nb.insert('end', 'demoDnD', :text=>'Drag and Drop')
-
- titf1 = Tk::BWidget::TitleFrame.new(frame, :text=>'Drag source')
- subf = titf1.get_frame
-
- ent1 = Tk::BWidget::LabelEntry.new(subf, :label=>'Entry',
- :labelwidth=>14, :dragenabled=>true,
- :dragevent=>3)
- labf1 = Tk::BWidget::LabelFrame.new(subf, :text=>'Label (text)',
- :width=>14)
- f = labf1.get_frame
- lab = Tk::BWidget::Label.new(f, :text=>'Drag this text',
- :dragenabled=>true, :dragevent=>3).pack
-
- labf2 = Tk::BWidget::LabelFrame.new(subf, :text=>'Label (bitmap)',
- :width=>14)
- f = labf2.get_frame
- lab = Tk::BWidget::Label.new(f, :bitmap=>'info',
- :dragenabled=>true, :dragevent=>3).pack
-
- Tk.pack(ent1, labf1, labf2, :side=>:top, :fill=>:x, :pady=>4)
-
- titf2 = Tk::BWidget::TitleFrame.new(frame, :text=>'Drop targets')
- subf = titf2.get_frame
-
- ent1 = Tk::BWidget::LabelEntry.new(subf, :label=>'Entry',
- :labelwidth=>14, :dropenabled=>true)
- labf1 = Tk::BWidget::LabelFrame.new(subf, :text=>'Label', :width=>14)
- f = labf1.get_frame
- lab = Tk::BWidget::Label.new(f, :dropenabled=>true,
- :highlightthickness=>1).pack(:fill=>:x)
- Tk.pack(ent1, labf1, :side=>:top, :fill=>:x, :pady=>4)
- Tk.pack(titf1, titf2, :pady=>4)
-
- frame
- end
-end
diff --git a/ext/tk/sample/tkextlib/bwidget/manager.rb b/ext/tk/sample/tkextlib/bwidget/manager.rb
deleted file mode 100644
index caa2fbef7a..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/manager.rb
+++ /dev/null
@@ -1,151 +0,0 @@
-# frozen_string_literal: false
-#
-# manager demo --- called from demo.rb
-#
-unless Object.const_defined?('DemoVar')
- fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. "
-end
-
-module DemoManager
- @@progress = TkVariable.new(false)
- @@status = TkVariable.new('Compute in progress...')
- @@homogeneous = TkVariable.new(false)
- @@constw = TkVariable.new
- @@afterobj = nil
-
- def self.create(nb)
- frame = nb.insert('end', 'demoManager', :text=>'Manager')
-
- topf = TkFrame.new(frame)
- titf1 = Tk::BWidget::TitleFrame.new(topf, :text=>"MainFrame")
- titf2 = Tk::BWidget::TitleFrame.new(topf, :text=>"NoteBook")
- titf3 = Tk::BWidget::TitleFrame.new(frame, :text=>"Paned & ScrolledWindow")
-
- _mainframe(titf1.get_frame)
- _notebook(titf2.get_frame)
- _paned(titf3.get_frame)
-
- Tk.pack(titf1, titf2, :padx=>4, :side=>:left, :fill=>:both, :expand=>true)
- Tk.pack(topf, :fill=>:x, :pady=>2)
- Tk.pack(titf3, :pady=>2, :padx=>4, :fill=>:both, :expand=>true)
-
- frame
- end
-
- def self._mainframe(parent)
- labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Toolbar',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>2)
- subf = labf1.get_frame
- chk1 = TkCheckbutton.new(subf, :text=>'View toolbar 1',
- :variable=>DemoVar.toolbar1,
- :command=>proc{
- DemoVar.mainframe.show_toolbar(
- 0, DemoVar.toolbar1.value
- )
- })
- chk2 = TkCheckbutton.new(subf, :text=>'View toolbar 2',
- :variable=>DemoVar.toolbar2,
- :command=>proc{
- DemoVar.mainframe.show_toolbar(
- 1, DemoVar.toolbar2.value
- )
- })
-
- Tk.pack(chk1, chk2, :anchor=>:w, :fill=>:x)
- labf1.pack(:fill=>:both)
-
- labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Status bar',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>2)
- subf = labf2.get_frame
- chk1 = TkCheckbutton.new(subf, :text=>"Show Progress\nindicator",
- :justify=>:left, :variable=>@@progress,
- :command=>proc{ _show_progress })
- chk1.pack(:anchor=>:w, :fill=>:x)
-
- Tk.pack(labf1, labf2, :side=>:left, :padx=>4, :fill=>:both)
- end
-
- def self._notebook(parent)
- TkCheckbutton.new(parent, :text=>'Homogeneous label',
- :variable=>@@homogeneous,
- :command=>proc{
- DemoVar.notebook[:homogeneous] = @@homogeneous.value
- }).pack(:side=>:left, :anchor=>:n, :fill=>:x)
- end
-
- def self._paned(parent)
- pw1 = Tk::BWidget::PanedWindow.new(parent, :side=>:top)
- pane = pw1.add(:minsize=>100)
-
- pw2 = Tk::BWidget::PanedWindow.new(pane, :side=>:left)
- pane1 = pw2.add(:minsize=>100)
- pane2 = pw2.add(:minsize=>100)
-
- pane3 = pw1.add(:minsize=>100)
-
- [pane1, pane2].each{|pane|
- sw = Tk::BWidget::ScrolledWindow.new(pane)
- lb = TkListbox.new(sw, :height=>8, :width=>20, :highlightthickness=>0)
- (1..8).each{|i| lb.insert('end', "Value #{i}") }
- sw.set_widget(lb)
- sw.pack(:fill=>:both, :expand=>true)
- }
-
- sw = Tk::BWidget::ScrolledWindow.new(pane3, :relief=>:sunken,
- :borderwidth=>2)
- sf = Tk::BWidget::ScrollableFrame.new(sw)
- sw.set_widget(sf)
- subf = sf.get_frame
- lab = TkLabel.new(subf, :text=>'This is a ScrollableFrame')
- chk = TkCheckbutton.new(subf, :text=>'Constrained with',
- :variable=>@@constw, :command=>proc{
- sf['constrainedwidth'] = @@constw.value
- })
- lab.pack
- chk.pack(:anchor=>:w)
- chk.bind('FocusIn', proc{sf.see(chk)})
- (0..20).each{|i|
- ent = TkEntry.new(subf, :width=>50).pack(:fill=>:x, :pady=>4)
- ent.bind('FocusIn', proc{sf.see(ent)})
- ent.insert('end', "Text field #{i}")
- }
-
- Tk.pack(sw, pw2, pw1, :fill=>:both, :expand=>true)
- end
-
- def self._show_progress
- unless @@afterobj
- @@afterobj = TkTimer.new(30, -1, proc{_update_progress})
- end
- if @@progress.bool
- DemoVar.status.value = 'Compute in progress...'
- DemoVar.prgindic.value = 0
- DemoVar.mainframe.show_statusbar(:progression)
- @@afterobj.start unless @@afterobj.running?
- else
- DemoVar.status.value = ''
- DemoVar.mainframe.show_statusbar(:status)
- @@afterobj.stop
- end
- end
-
- def self._update_progress
- if @@progress.bool
- if DemoVar.prgindic.numeric < 100
- DemoVar.prgindic.numeric += 5
- else
- @@progress.value = false
- DemoVar.mainframe.show_statusbar(:status)
- DemoVar.status.value = 'Done'
- @@afterobj.stop
- Tk.after(500, proc{ DemoVar.status.value = '' })
- end
- else
- @@afterobj.stop
- end
- end
-
-end
-
diff --git a/ext/tk/sample/tkextlib/bwidget/select.rb b/ext/tk/sample/tkextlib/bwidget/select.rb
deleted file mode 100644
index b32a69d837..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/select.rb
+++ /dev/null
@@ -1,83 +0,0 @@
-# frozen_string_literal: false
-#
-# select demo --- called from demo.rb
-#
-unless Object.const_defined?('DemoVar')
- fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. "
-end
-
-module DemoSelect
- @@var = TkVariable.new_hash
-
- def self.create(nb)
- frame = nb.insert('end', 'demoSelect', :text=>'Spin & Combo')
-
- titf1 = Tk::BWidget::TitleFrame.new(frame, :text=>'SpinBox')
- subf = titf1.get_frame
- spin = Tk::BWidget::SpinBox.new(subf, :range=>[1, 100, 1],
- :textvariable=>@@var.ref('spin', 'var'),
- :helptext=>'This is the SpinBox')
- ent = Tk::BWidget::LabelEntry.new(subf, :label=>'Linked var',
- :labelwidth=>10, :labelanchor=>:w,
- :textvariable=>@@var.ref('spin', 'var'),
- :editable=>0,
- :helptext=>"This is an Entry reflecting\nthe linked var of SpinBox")
- labf = Tk::BWidget::LabelFrame.new(subf, :text=>'Options',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1,
- :helptext=>'Modify some options of SpinBox')
- subf = labf.get_frame
- chk1 = TkCheckbutton.new(subf, :text=>'Non editable',
- :variable=>@@var.ref('spin', 'editable'),
- :onvalue=>false, :offvalue=>true,
- :command=>proc{
- spin.editable(@@var['spin', 'editable'])
- })
- chk2 = TkCheckbutton.new(subf, :text=>'Disabled',
- :variable=>@@var.ref('spin', 'state'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{
- spin.state(@@var['spin', 'state'])
- })
- Tk.pack(chk1, chk2, :side=>:left, :anchor=>:w)
- Tk.pack(spin, ent, labf, :pady=>4, :fill=>:x)
- titf1.pack
-
- titf2 = Tk::BWidget::TitleFrame.new(frame, :text=>'ComboBox')
- subf = titf2.get_frame
- combo = Tk::BWidget::ComboBox.new(subf,
- :textvariable=>@@var.ref('combo', 'var'),
- :values=>[
- 'first value', 'second value',
- 'third value', 'fourth value',
- 'fifth value'
- ],
- :helptext=>'This is the ComboBox')
- ent = Tk::BWidget::LabelEntry.new(subf, :label=>'Linked var',
- :labelwidth=>10, :labelanchor=>:w,
- :textvariable=>@@var.ref('combo', 'var'),
- :editable=>0, :helptext=>"This is an Entry reflecting\nthe linked var of ComboBox")
- labf = Tk::BWidget::LabelFrame.new(subf, :text=>'Options', :side=>:top,
- :anchor=>:w, :relief=>:sunken,
- :borderwidth=>1, :helptext=>'Modify some options of ComboBox')
- subf = labf.get_frame
- chk1 = TkCheckbutton.new(subf, :text=>'Non editable',
- :variable=>@@var.ref('combo', 'editable'),
- :onvalue=>false, :offvalue=>true,
- :command=>proc{
- combo.editable(@@var['combo', 'editable'])
- })
- chk2 = TkCheckbutton.new(subf, :text=>'Disabled',
- :variable=>@@var.ref('combo', 'state'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{
- combo.state(@@var['combo', 'state'])
- })
-
- Tk.pack(chk1, chk2, :side=>:left, :anchor=>:w)
- Tk.pack(combo, ent, labf, :pady=>4, :fill=>:x)
- Tk.pack(titf1, titf2, :pady=>4)
-
- frame
- end
-end
diff --git a/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb b/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb
deleted file mode 100644
index 1496cbce2f..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb
+++ /dev/null
@@ -1,222 +0,0 @@
-# frozen_string_literal: false
-#
-# templdlg demo --- called from demo.rb
-#
-unless Object.const_defined?('DemoVar')
- fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. "
-end
-
-module DemoDialog
- @@tmpl = TkVariable.new_hash
- @@msg = TkVariable.new_hash
- @@msgdlg = nil
- @@progmsg = TkVariable.new
- @@progval = TkVariable.new
- @@progdlg = nil
- @@resources = TkVariable.new('en')
-
- def self.create(nb)
- frame = nb.insert('end', 'demoDlg', :text=>'Dialog')
-
- titf1 = Tk::BWidget::TitleFrame.new(frame, :text=>'Resources')
- titf2 = Tk::BWidget::TitleFrame.new(frame, :text=>'Template Dialog')
- titf3 = Tk::BWidget::TitleFrame.new(frame, :text=>'Message Dialog')
- titf4 = Tk::BWidget::TitleFrame.new(frame, :text=>'Other dialog')
-
- subf = titf1.get_frame
- cmd = proc{ TkOption.read_file(File.join(Tk::BWidget::LIBRARY, 'lang',
- @@resources.value + '.rc')) }
- Tk.pack(TkRadiobutton.new(subf, :text=>'English', :value=>'en',
- :variable=>@@resources, :command=>cmd),
- TkRadiobutton.new(subf, :text=>'French', :value=>'fr',
- :variable=>@@resources, :command=>cmd),
- TkRadiobutton.new(subf, :text=>'German', :value=>'de',
- :variable=>@@resources, :command=>cmd),
- :side=>:left)
-
- _tmpldlg(titf2.get_frame)
- _msgdlg(titf3.get_frame)
- _stddlg(titf4.get_frame)
-
- titf1.pack(:fill=>:x, :pady=>2, :padx=>2)
- titf4.pack(:side=>:bottom, :fill=>:x, :pady=>2, :padx=>2)
- Tk.pack(titf2, titf3, :side=>:left, :padx=>2, :fill=>:both, :expand=>true)
- end
-
- def self._tmpldlg(parent)
- @@tmpl['side'] = :bottom
- @@tmpl['anchor'] = :c
-
- labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Button side',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
- subf = labf1.get_frame
- Tk.pack(TkRadiobutton.new(subf, :text=>'Bottom', :value=>:bottom,
- :variable=>@@tmpl.ref('side'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Left', :value=>:left,
- :variable=>@@tmpl.ref('side'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Right', :value=>:right,
- :variable=>@@tmpl.ref('side'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Top', :value=>:top,
- :variable=>@@tmpl.ref('side'), :anchor=>:w),
- :fill=>:x, :anchor=>:w)
-
- labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Button anchor',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
- subf = labf2.get_frame
- Tk.pack(TkRadiobutton.new(subf, :text=>'North', :value=>:n,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'West', :value=>:w,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'East', :value=>:e,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'South', :value=>:s,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Center', :value=>:c,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- :fill=>:x, :anchor=>:w)
-
- sep = Tk::BWidget::Separator.new(parent, :orient=>:horizontal)
- button = TkButton.new(parent, :text=>'Show', :command=>proc{_show_tmpldlg})
-
- button.pack(:side=>:bottom)
- sep.pack(:side=>:bottom, :fill=>:x, :pady=>10)
- Tk.pack(labf1, labf2, :side=>:left, :padx=>4, :anchor=>:n)
- end
-
- def self._msgdlg(parent)
- @@msg['type'] = 'ok'
- @@msg['icon'] = 'info'
-
- labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Type', :side=>:top,
- :anchor=>:w, :relief=>:sunken,
- :borderwidth=>1)
- subf = labf1.get_frame
- Tk.pack(TkRadiobutton.new(subf, :text=>'Ok', :value=>'ok',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Ok, Cancel', :value=>'okcancel',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Retry, Cancel',
- :value=>'retrycancel',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Yes, No', :value=>'yesno',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Yes, No, Cancel',
- :value=>'yesnocancel',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Abort, Retry, Ignore',
- :value=>'abortretryignore',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- :fill=>:x, :anchor=>:w)
-
- Tk.pack(TkRadiobutton.new(subf, :text=>'User', :value=>'user',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- Tk::BWidget::Entry.new(subf, :textvariable=>@@msg.ref('buttons')),
- :side=>:left)
-
- labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Icon', :side=>:top,
- :anchor=>:w, :relief=>:sunken,
- :borderwidth=>1)
- subf = labf2.get_frame
- Tk.pack(TkRadiobutton.new(subf, :text=>'Information', :value=>'info',
- :variable=>@@msg.ref('icon'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Question', :value=>'question',
- :variable=>@@msg.ref('icon'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Warning', :value=>'warning',
- :variable=>@@msg.ref('icon'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Error', :value=>'error',
- :variable=>@@msg.ref('icon'), :anchor=>:w),
- :fill=>:x, :anchor=>:w)
-
- sep = Tk::BWidget::Separator.new(parent, :orient=>:horizontal)
- button = TkButton.new(parent, :text=>'Show', :command=>proc{_show_msgdlg})
-
- button.pack(:side=>:bottom)
- sep.pack(:side=>:bottom, :fill=>:x, :pady=>10)
- Tk.pack(labf1, labf2, :side=>:left, :padx=>4, :anchor=>:n)
- end
-
- def self._stddlg(parent)
- Tk.pack(TkButton.new(parent, :text=>'Select a color '){|w|
- command(proc{DemoDialog._show_color(w)})
- },
- TkButton.new(parent, :text=>'Font selector dialog',
- :command=>proc{_show_fontdlg}),
- TkButton.new(parent, :text=>'Progression dialog',
- :command=>proc{_show_progdlg}),
- TkButton.new(parent, :text=>'Password dialog',
- :command=>proc{_show_passdlg}),
- :side=>:left, :padx=>5, :anchor=>:w)
- end
-
- def self._show_color(w)
- dlg = Tk::BWidget::SelectColor.new(w, :color=>w.background)
- color = dlg.menu([:below, w])
- unless color.empty?
- w.background(color)
- end
- end
-
- def self._show_tmpldlg
- dlg = Tk::BWidget::Dialog.new(:relative=>Tk.root, :modal=>:local,
- :separator=>true, :title=>'Template dialog',
- :side=>@@tmpl['side'],
- :anchor=>@@tmpl['anchor'],
- :default=>0, :cancel=>1)
- dlg.add('name'=>'ok')
- dlg.add('name'=>'cancel')
- TkMessage.new(dlg.get_frame, :text=>"Template\nDialog", :justify=>:center,
- :anchor=>:c, :width=>80).pack(:fill=>:both, :expand=>true,
- :padx=>100, :pady=>100)
- dlg.draw
- dlg.destroy
- end
-
- def self._show_msgdlg
- @@msgdlg.destroy if @@msgdlg
- @@msgdlg = Tk::BWidget::MessageDlg.new(:relative=>Tk.root,
- :message=>'Message for MessageBox',
- :type=>@@msg['type'],
- :icon=>@@msg['icon'],
- :buttons=>@@msg['buttons'])
- @@msgdlg.create
- end
-
- def self._show_fontdlg
- font = Tk::BWidget::SelectFont.new(:relative=>Tk.root,
- :font=>DemoVar.font).create
- DemoVar::Demo.update_font(font)
- end
-
- def self._show_progdlg
- @@progmsg.value = "Compute in progress..."
- @@progval.value = 0
-
- @@progdlg = Tk::BWidget::ProgressDlg.new(:relative=>Tk.root,
- :title=>'Wait...',
- :type=>'infinite', :width=>20,
- :textvariable=>@@progmsg,
- :variable=>@@progval,
- :stop=>'Stop') {
- command(proc{self.destroy})
- create
- }
- _update_progdlg
- end
-
- def self._update_progdlg
- TkTimer.new(20, -1, proc{
- if @@progdlg && @@progdlg.winfo_exist?
- @@progval.value = 2
- else
- stop
- end
- }).start
- end
-
- def self._show_passdlg
- Tk::BWidget::PasswdDlg.new(:relative=>Tk.root).create
- end
-end
-
diff --git a/ext/tk/sample/tkextlib/bwidget/tree.rb b/ext/tk/sample/tkextlib/bwidget/tree.rb
deleted file mode 100644
index 8a2566f9c9..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/tree.rb
+++ /dev/null
@@ -1,290 +0,0 @@
-# frozen_string_literal: false
-#
-# templdlg demo --- called from demo.rb
-#
-unless Object.const_defined?('DemoVar')
- fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. "
-end
-
-module DemoTree
- @@count = 0
- @@dblclick = false
- @@top = nil
-
- def self.create(nb)
- frame = nb.insert('end', 'demoTree', :text=>'Tree')
- pw = Tk::BWidget::PanedWindow.new(frame, :side=>:top)
-
- pane = pw.add(:weight=>1)
- title = Tk::BWidget::TitleFrame.new(pane, :text=>'Directory tree')
- sw = Tk::BWidget::ScrolledWindow.new(title.get_frame,
- :relief=>:sunken, :borderwidth=>2)
- tree = Tk::BWidget::Tree.new(sw, :relief=>:flat, :borderwidth=>0,
- :width=>15, :highlightthickness=>0,
- :redraw=>false, :dropenabled=>true,
- :dragenabled=>true, :dragevent=>3,
- :droptypes=>[
- 'TREE_NODE', [
- :copy, [],
- :move, [],
- :link, []
- ],
- 'LISTBOX_ITEM', [
- :copy, [],
- :move, [],
- :link, []
- ]
- ],
- :opencmd=>proc{|node|
- moddir(1, tree, node)
- },
- :closecmd=>proc{|node|
- moddir(0, tree, node)
- })
- sw.set_widget(tree)
-
- sw.pack(:side=>:top, :expand=>true, :fill=>:both)
- title.pack(:fill=>:both, :expand=>true)
-
- pane = pw.add(:weight=>2)
- lf = Tk::BWidget::TitleFrame.new(pane, :text=>'Content')
- sw = Tk::BWidget::ScrolledWindow.new(lf.get_frame,
- :scrollbar=>:horizontal,
- :auto=>:none, :relief=>:sunken,
- :borderwidth=>2)
-
- list = Tk::BWidget::ListBox.new(sw, :relief=>:flat, :borderwidth=>0,
- :highlightthickness=>0, :width=>20,
- :multicolumn=>true, :redraw=>false,
- :dragevent=>3, :dropenabled=>true,
- :dragenabled=>true,
- :droptypes=>[
- 'TREE_NODE', [
- :copy, [],
- :move, [],
- :link, []
- ],
- 'LISTBOX_ITEM', [
- :copy, [],
- :move, [],
- :link, []
- ]
- ])
- sw.set_widget(list)
-
- Tk.pack(sw, lf, :fill=>:both, :expand=>true)
-
- pw.pack(:fill=>:both, :expand=>true)
-
- tree.textbind('ButtonPress-1',
- proc{|node, ev| select('tree', 1, tree, list, node)})
- tree.textbind('Double-ButtonPress-1',
- proc{|node, ev| select('tree', 2, tree, list, node)})
-
- list.textbind('ButtonPress-1',
- proc{|node, ev| select('list', 1, tree, list, node)})
- list.textbind('Double-ButtonPress-1',
- proc{|node, ev| select('list', 2, tree, list, node)})
-
- list.imagebind('Double-ButtonPress-1',
- proc{|node, ev| select('list', 2, tree, list, node)})
-
- nb.itemconfigure('demoTree',
- :createcmd=>proc{|*args| init(tree, list, *args)},
- :raisecmd=>proc{
- Tk.root.geometry =~
- /\d+x\d+([+-]{1,2}\d+)([+-]{1,2}\d+)/
- global_w = ($1 || 0).to_i
- global_h = ($2 || 0).to_i
- if @@top
- Tk::BWidget.place(@@top, 0, 0, :at,
- global_w - Tk.root.winfo_screenwidth, global_h)
- @@top.deiconify
- Tk.root.bind('Unmap', proc{@@top.withdraw})
- Tk.root.bind('Map', proc{@@top.deiconify})
- Tk.root.bind('Configure', proc{|w|
- if w == Tk.root
- Tk.root.geometry =~
- /\d+x\d+([+-]{1,2}\d+)([+-]{1,2}\d+)/
- global_w = ($1 || 0).to_i
- global_h = ($2 || 0).to_i
- Tk::BWidget.place(@@top, 0, 0, :at,
- global_w - Tk.root.winfo_screenwidth,
- global_h)
- end
- }, '%W')
- end
- },
- :leavecmd=>proc{
- @@top.withdraw if @@top
- Tk.root.bind_remove('Unmap')
- Tk.root.bind_remove('Map')
- Tk.root.bind_remove('Configure')
- true
- })
- end
-
- def self.init(tree, list, *args)
- @@count = 0
- if Tk::PLATFORM['platform'] == 'unix'
- rootdir = File.expand_path('~')
- else
- rootdir = 'c:'
- end
-
- tree.insert('end', 'root', 'home',
- :text=>rootdir, :data=>rootdir, :open=>true,
- :image=>Tk::BWidget::Bitmap.new('openfold'))
- getdir(tree, 'home', rootdir)
- select('tree', 1, tree, list, 'home')
- tree.redraw(true)
- list.redraw(true)
-
- @@top = TkToplevel.new
- @@top.withdraw
- @@top.protocol('WM_DELETE_WINDOW'){
- # don't kill me
- }
- @@top.resizable(false, false)
- @@top.title('Drag rectangle to scroll directory tree')
- @@top.transient(Tk.root)
- Tk::BWidget::ScrollView.new(@@top, :window=>tree, :fill=>'white',
- :width=>300, :height=>300, :relief=>:sunken,
- :bd=>1).pack(:fill=>:both, :expand=>true)
- end
-
- def self.getdir(tree, node, path)
- lentries = Dir.glob(File.join(path, '*')).sort
- lfiles = []
- lentries.each{|f|
- basename = File.basename(f)
- if File.directory?(f)
- Tk::BWidget::Tree::Node.new(tree, node,
- :index=>'end', :text=>basename,
- :image=>Tk::BWidget::Bitmap.new('folder'),
- :drawcross=>:always, :data=>f)
- @@count += 1
- else
- lfiles << basename
- end
- }
- tree.itemconfigure(node, :drawcross=>:auto, :data=>lfiles)
- end
-
- def self.moddir(idx, tree, node)
- if (idx != 0 && tree.itemcget(node, :drawcross).to_s == 'always')
- getdir(tree, node, tree.itemcget(node, :data))
- if tree.nodes(node).empty?
- tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new('folder'))
- else
- tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new('openfold'))
- end
- else
- img = %w(folder openfold)[idx] || 'openfold'
- tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new(img))
- end
- end
-
- def self.select(where, num, tree, list, node)
- @@dblclick = true
- if num == 1
- if (where == 'tree' &&
- tree.selection_get.find{|x|
- TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node)
- })
- @@dblclick = false
- Tk.after(500, proc{edit('tree', tree, list, node)})
- return
- end
- if (where == 'list' &&
- list.selection_get.find{|x|
- TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node)
- })
- @@dblclick = false
- Tk.after(500, proc{edit('list', tree, list, node)})
- return
- end
- if where == 'tree'
- select_node(tree, list, node)
- else
- list.selection_set(node)
- end
- elsif (where == 'list' && tree.exist?(node))
- parent = tree.parent(node)
- while TkUtil._get_eval_string(parent) != 'root'
- tree.itemconfigure(parent, :open=>true)
- parent = tree.parent(parent)
- end
- select_node(tree, list, node)
- end
- end
-
- def self.select_node(tree, list, node)
- tree.selection_set(node)
- Tk.update
- list.delete(*(list.items(0, 'end')))
-
- dir = tree.itemcget(node, :data)
- if tree.itemcget(node, :drawcross).to_s == 'always'
- getdir(tree, node, dir)
- dir = tree.itemcget(node, :data)
- end
-
- tree.nodes(node).each{|subnode|
- list.insert('end', subnode,
- :text=>tree.itemcget(subnode, :text),
- :image=>Tk::BWidget::Bitmap.new('folder'))
- }
-
- TkComm.simplelist(dir).each{|f|
- Tk::BWidget::ListBox::Item.new(list, 'end', :text=>f,
- :image=>Tk::BWidget::Bitmap.new('file'))
- }
- end
-
- def self.edit(where, tree, list, node)
- return if @@dblclick
-
- if (where == 'tree' &&
- tree.selection_get.find{|x|
- TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node)
- })
- res = tree.edit(node, tree.itemcget(node, :text))
- if res != ''
- tree.itemconfigure(node, :text=>res)
- if list.exist?(node)
- list.itemconfigure(node, :text=>res)
- end
- tree.selection_set(node)
- end
- return
- end
-
- if (where == 'list')
- res = list.edit(node, list.igemcget(node, :text))
- if res != ''
- list.itemconfigure(node, :text=>res)
- if tree.exist?(node)
- tree.itemconfigure(node, :text=>res)
- else
- cursel = tree.selection_get[0]
- index = list.index(node) - tree.nodes(cursel).size
- data = TkComm.simplelist(tree.itemcget(cursel, :data))
- data[index] = res
- tree.itemconfigure(cursel, :date=>data)
- end
- list.selection_set(node)
- end
- end
- end
-
- def self.expand(tree, but)
- unless (cur = tree.selection_get).empty?
- if TkComm.bool(but)
- tree.opentree(cur)
- else
- tree.closetree(cur)
- end
- end
- end
-end
diff --git a/ext/tk/sample/tkextlib/bwidget/x1.xbm b/ext/tk/sample/tkextlib/bwidget/x1.xbm
deleted file mode 100644
index 6137a118f8..0000000000
--- a/ext/tk/sample/tkextlib/bwidget/x1.xbm
+++ /dev/null
@@ -1,2258 +0,0 @@
-#define x1_width 626
-#define x1_height 428
-static char x1_bits[] = {
- 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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xff,0xff,0xff,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,0xfc,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,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,
- 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 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,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,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,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,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,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,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,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,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,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,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,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 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,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,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,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x80,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,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,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,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,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x80,0xff,0x03,0x80,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xe0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x20,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,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,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0xf8,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0xc0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x80,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,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,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,
- 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 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,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0xc0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0xfc,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,
- 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,
- 0xfc,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,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,
- 0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0xfc,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,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x80,0xff,
- 0xff,0xff,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,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
- 0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x3f,0x00,0x00,0x00,0x00,0xfc,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,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xfc,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,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,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,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xe0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,
- 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x1f,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xfc,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xc0,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,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,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xfc,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,
- 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x03,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x07,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0x01,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,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,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x1f,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x3f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0x0f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0x07,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xfc,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,
- 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,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,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x03,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x03,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xfc,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x0f,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x0f,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0xfc,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,
- 0x7f,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0x3f,0x00,0x00,0x00,0xc0,0xff,0xff,0x03,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x3f,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xe0,0xff,0xff,
- 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0x1f,0x00,0x00,
- 0x00,0xf0,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,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,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0xfc,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,
- 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xfe,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xfc,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0x07,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x01,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x03,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xe0,0xff,
- 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,
- 0xf8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xfc,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x03,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x00,0x00,0x00,0x00,0xfe,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xfc,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,
- 0xff,0xff,0xff,0x01,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x80,0xff,0x07,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x07,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc0,0xff,0x07,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x07,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xf8,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xfc,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,
- 0x00,0x00,0x00,0x00,0xf8,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,
- 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0xfc,0xff,0x0f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x0f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,
- 0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xfe,0xff,0x0f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,
- 0x00,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0x7f,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x07,0x00,0x00,0x00,0x80,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xc0,0xff,0xff,0x1f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xe0,0xff,0xff,
- 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,
- 0x00,0xf0,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,
- 0xff,0x3f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
- 0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x1f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0x00,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x1f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0x1f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xe0,0xff,
- 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x07,0x00,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,
- 0xff,0xff,0x03,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xf0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x07,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xfd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,
- 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x80,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x80,
- 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x07,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,
- 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0xf8,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,
- 0x03,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0x01,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,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,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x01,0x00,0x00,0x00,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,
- 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x00,0x00,0x00,
- 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,
- 0x7f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0xff,0x7f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0x3f,0x00,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0x1f,0x00,0x00,
- 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
- 0xff,0x1f,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xf0,0xff,0x0f,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,
- 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0x07,0x00,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x07,0x00,
- 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0x03,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0x01,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x01,0x00,0x00,0x00,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x07,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x00,
- 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0x7f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xfe,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0x7f,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,
- 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3f,0x00,0x00,0x00,0xe0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x0f,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,
- 0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x80,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x07,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x80,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x1f,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,
- 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x3f,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x06,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0xf0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,
- 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xfd,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0xf8,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,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,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,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,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,
- 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,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,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x3f,0xfc,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc,0x00,0x00,0x00,
- 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0xfc,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00,0x00,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xfc,0x00,0x00,
- 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x0f,0xfc,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x0f,0xfc,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0xfc,0x00,0x00,0x00,0xe0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0xfc,0x00,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x07,0xfc,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x07,0xfc,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xfc,0x00,0x00,0x00,0xf8,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xfc,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x03,0xfc,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,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,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xfc,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,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,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xfc,0x00,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 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,0xfc,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0xfc,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0xfc,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xfc,0x00,0x00,0x80,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0xfc,0x00,0x00,
- 0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
- 0x00,0xfc,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x3f,0x00,0xfc,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0xfc,0x00,0x00,0xe0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0xfc,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x1f,0x00,0xfc,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0xfc,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0xfc,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0xfc,
- 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x0f,0x00,0xfc,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xfc,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xfc,0x00,0x00,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,
- 0xfc,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x03,0x00,0xfc,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xfc,0x00,0x80,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xfc,0x00,0x80,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0x00,0xfc,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0xfc,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,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,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0xfc,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,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,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0xfc,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,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,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,
- 0x00,0x00,0xfc,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0xfc,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xfc,0x00,0xf0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xfc,
- 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x0f,0x00,0x00,0xfc,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xfc,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xfc,0x00,0xfc,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,
- 0xfc,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x03,0x00,0x00,0xfc,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xfc,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xfc,0x00,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,
- 0x00,0xfc,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0x00,0x00,0x00,0xfc,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0xfc,0x00,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xfc,0x80,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,
- 0x00,0x00,0xfc,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x1f,0x00,0x00,0x00,0xfc,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xfc,0xc0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xfc,
- 0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,
- 0x00,0x00,0x00,0xfc,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xfc,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xfc,0xe0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0xfc,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x01,0x00,0x00,0x00,0xfc,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,
- 0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xfc,0xf8,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x07,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 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,0xe0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0xfc,
- 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,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,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,
- 0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,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,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x7f,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0xf8,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x0f,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,
- 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x01,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x03,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x07,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,
- 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x7f,0x00,0x00,0x00,0xc0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xc0,0x0f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x01,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xe0,
- 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x80,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x80,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xf8,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xfc,0x3f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,
- 0xfc,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x80,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x01,0x00,0x00,0x00,0xfe,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x80,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0x7f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x80,0xff,0x7f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x80,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x80,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0xc0,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xe0,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0xff,0xff,
- 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
- 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0xf8,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x07,0x00,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xfc,0xff,0xff,0x03,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0x3f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,
- 0x00,0x00,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xc0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xc0,0xff,
- 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,
- 0x0f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,
- 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xf8,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x07,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,
- 0xff,0x07,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xf0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x03,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,
- 0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0x01,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x3f,0x00,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x3f,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf8,0xff,0xff,0x1f,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x0f,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x07,0x00,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0x01,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,
- 0x01,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xe0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfe,0x7f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xc0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,
- 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,
- 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x80,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0x03,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x80,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x03,0x00,
- 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0xc0,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,0xe0,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xc0,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xe0,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,0xf0,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0xf0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,
- 0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x1f,0x00,
- 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,
- 0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xfc,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0x7f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x7f,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xf8,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
- 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xf0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0x01,0x00,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x7f,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0x1f,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,
- 0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf0,0x01,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,
- 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xc0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,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,0xf0,0xff,0xff,0x7f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,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,0xf0,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xf8,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xfc,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x01,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfe,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0x07,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,
- 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xc0,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xc0,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,
- 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 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,0xf8,
- 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,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,0xf8,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x1f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,
- 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x80,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,
- 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,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,0x7e,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,
- 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0xf8,
- 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,
- 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,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,0x01,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,
- 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x07,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,0x00,0x00,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,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,0x00,0x00,
- 0xfc,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,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,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x7f,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,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x80,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,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,0x00,0xfc,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,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,
- 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x1f,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x0f,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,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,
- 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,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,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,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,0xfc,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,
- 0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x01,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x30,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x80,0x0f,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,0xfc,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xc0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x80,
- 0xff,0x01,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,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x7f,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,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,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x7f,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,
- 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x1f,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,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,0xfc,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x1f,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0x03,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,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,0xfc,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,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,0xfc,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x01,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x7f,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,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,0xfc,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,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,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
- 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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x03,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,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,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,0x00,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,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,0x00,
- 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 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,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0x0f,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,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0x01,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,0x00,0x00,0xfc,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,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,0x00,0x00,
- 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,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,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0x1f,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,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x01,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,0x00,0x00,0x00,0x00,0xfc,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,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,0x00,0x00,0x00,
- 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,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,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0x0f,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,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0x7f,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,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,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,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,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf8,0xff,0xff,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0x03,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,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,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,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,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,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0xfc};
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt
deleted file mode 100644
index 8392da7cec..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-
- #######################################################################
- ### The following text is the original 'license.terms' of iwidgets ###
- ### extension. ###
- ### Original Tcl source files are not include in this directory, ###
- ### because of all of them are rewritten to Ruby files. ###
- ### However, the image data files in the 'images' directory are ###
- ### quoted from iwidgets source archive. ###
- #######################################################################
-
-
-This software is copyrighted by DSC Technologies and private individual
-contributors. The copyright holder is specifically listed in the header
-of each file. The following terms apply to all files associated with the
-software unless explicitly disclaimed in individual files by private
-contributors.
-
-Copyright 1997 DSC Technologies Corporation
-
-Permission to use, copy, modify, distribute and license this software and
-its documentation for any purpose, and without fee or written agreement
-with DSC, is hereby granted, provided that the above copyright notice
-appears in all copies and that both the copyright notice and warranty
-disclaimer below appear in supporting documentation, and that the names of
-DSC Technologies Corporation or DSC Communications Corporation not be used
-in advertising or publicity pertaining to the software without specific,
-written prior permission.
-
-DSC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, 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. IN NO EVENT SHALL DSC BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
-RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
-CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-RESTRICTED RIGHTS: Use, duplication or disclosure by the 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.
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm
deleted file mode 100644
index 7498e15de2..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm
+++ /dev/null
@@ -1,14 +0,0 @@
-#define Tool_32_box_width 32
-#define Tool_32_box_height 32
-static unsigned char Tool_32_box_bits[] = {
- 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, 0xe0, 0xff, 0xff, 0x0f, 0x20, 0x00, 0x00, 0x08,
- 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08,
- 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08,
- 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08,
- 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08,
- 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08,
- 0xe0, 0xff, 0xff, 0x0f, 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/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/clear.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/clear.gif
deleted file mode 100644
index bd45628aa7..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/clear.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/close.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/close.gif
deleted file mode 100644
index f91b9e9d1e..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/close.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/copy.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/copy.gif
deleted file mode 100644
index 7319f1dcb0..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/copy.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/cut.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/cut.gif
deleted file mode 100644
index 4258b17591..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/cut.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/exit.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/exit.gif
deleted file mode 100644
index e462be033f..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/exit.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/find.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/find.gif
deleted file mode 100644
index dddcb8044b..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/find.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/help.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/help.gif
deleted file mode 100644
index bc8f18c00d..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/help.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm
deleted file mode 100644
index 4622ae978b..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm
+++ /dev/null
@@ -1,14 +0,0 @@
-#define lineOp_width 32
-#define lineOp_height 32
-static unsigned char lineOp_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
- 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
- 0x80, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
- 0x00, 0x3c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00,
- 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00,
- 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3c, 0x00,
- 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x01,
- 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x0f,
- 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/mag.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/mag.gif
deleted file mode 100644
index 4a5be66e76..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/mag.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/new.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/new.gif
deleted file mode 100644
index 9c68ad35f5..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/new.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/open.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/open.gif
deleted file mode 100644
index bed862c8c4..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/open.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm
deleted file mode 100644
index 856bd43785..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm
+++ /dev/null
@@ -1,14 +0,0 @@
-#define ovalOp_width 32
-#define ovalOp_height 32
-static unsigned char ovalOp_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00,
- 0x00, 0x1c, 0x70, 0x00, 0x00, 0x03, 0x80, 0x01, 0x80, 0x00, 0x00, 0x02,
- 0x40, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x10,
- 0x10, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20,
- 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, 0x10,
- 0x10, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x04,
- 0x80, 0x00, 0x00, 0x02, 0x00, 0x03, 0x80, 0x01, 0x00, 0x1c, 0x70, 0x00,
- 0x00, 0xe0, 0x0f, 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/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/paste.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/paste.gif
deleted file mode 100644
index 9974f23bf5..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/paste.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm
deleted file mode 100644
index c50aa4c5f3..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm
+++ /dev/null
@@ -1,14 +0,0 @@
-#define dotPencilOp_width 32
-#define dotPencilOp_height 32
-static unsigned char dotPencilOp_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x12, 0x00,
- 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x80, 0x04, 0x00,
- 0x00, 0x80, 0x04, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00,
- 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00,
- 0x00, 0x90, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00,
- 0x00, 0x24, 0x00, 0x18, 0x00, 0x24, 0x00, 0x18, 0x00, 0x12, 0x00, 0x00,
- 0x00, 0x12, 0x00, 0x30, 0x00, 0x0e, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00,
- 0x00, 0x06, 0x0c, 0x30, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x30, 0xa0, 0x01,
- 0x00, 0x60, 0xb0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/poly.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/poly.gif
deleted file mode 100644
index 2b595bb9b7..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/poly.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/print.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/print.gif
deleted file mode 100644
index d321f17457..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/print.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/ruler.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/ruler.gif
deleted file mode 100644
index 00d26febf6..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/ruler.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/save.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/save.gif
deleted file mode 100644
index d1ceb1a5c4..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/save.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/select.gif b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/select.gif
deleted file mode 100644
index f885c9ca5f..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/select.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm
deleted file mode 100644
index ffb0686303..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm
+++ /dev/null
@@ -1,14 +0,0 @@
-#define font_edit_width 32
-#define font_edit_height 32
-static unsigned char font_edit_bits[] = {
- 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1c,
- 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x80, 0x7b,
- 0x00, 0x00, 0x80, 0x7e, 0x00, 0x00, 0xc0, 0xfd, 0x00, 0x00, 0x60, 0xfb,
- 0x00, 0x00, 0xb0, 0xf7, 0x00, 0x00, 0xd0, 0xef, 0x00, 0x00, 0xf8, 0xdf,
- 0x00, 0x00, 0xd4, 0x7f, 0x00, 0x00, 0xaa, 0x1f, 0x00, 0x00, 0x15, 0x0f,
- 0x00, 0x80, 0x82, 0x06, 0x03, 0x40, 0x01, 0x01, 0x07, 0xa0, 0x80, 0x00,
- 0x0f, 0x10, 0x40, 0x00, 0x1f, 0x08, 0x20, 0x00, 0x3b, 0xe4, 0x1f, 0x00,
- 0x73, 0x1a, 0x00, 0x00, 0xe3, 0x07, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x00,
- 0xe3, 0x03, 0x00, 0x00, 0x7b, 0x07, 0x00, 0x00, 0x1f, 0x06, 0x00, 0x00,
- 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
- 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb
deleted file mode 100644
index c64c3f0247..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-# sample 1
-p bb1 = Tk::Iwidgets::Buttonbox.new
-p bb1.add('Yes', :text=>'Yes', :command=>proc{puts 'Yes'})
-p bb1.add('No', :text=>'No', :command=>proc{puts 'No'})
-p bb1.add('Maybe', :text=>'Maybe', :command=>proc{puts 'Maybe'})
-bb1.default('Yes')
-bb1.pack(:expand=>true, :fill=>:both, :pady=>5)
-print "\n"
-
-# sample 2
-p bb2 = Tk::Iwidgets::Buttonbox.new
-p btn1 = bb2.add(:text=>'Yes', :command=>proc{puts 'Yes'})
-p btn2 = bb2.add(:text=>'No', :command=>proc{puts 'No'})
-p btn3 = bb2.add(:text=>'Maybe', :command=>proc{puts 'Maybe'})
-bb2.default(btn1)
-bb2.pack(:expand=>true, :fill=>:both, :pady=>5)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb b/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb
deleted file mode 100644
index 4093997029..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Calendar.new(:command=>proc{|arg| puts(arg.date)},
- :weekendbackground=>'mistyrose',
- :weekdaybackground=>'ghostwhite',
- :outline=>'black', :startday=>'wednesday',
- :days=>%w(We Th Fr Sa Su Mo Tu)).pack
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb
deleted file mode 100644
index 1680aae695..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Canvasprintbox.new(:orient=>:landscape, :stretch=>1) \
- .pack(:padx=>10, :pady=>10, :fill=>:both, :expand=>true)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb
deleted file mode 100644
index 1bedf2c543..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Canvasprintdialog.new.activate
-
-Tk.mainloop
-
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb
deleted file mode 100644
index bd0a21fd7f..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-cb = Tk::Iwidgets::Checkbox.new
-cb.add('bold', :text=>'Bold')
-cb.add('italic', :text=>'Italic')
-cb.add('underline', :text=>'Underline')
-cb.select('underline')
-cb.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb
deleted file mode 100644
index 1ce2c9085e..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-#
-# Non-editable Dropdown Combobox
-#
-cb1 = Tk::Iwidgets::Combobox.new(:labeltext=>'Month:',
- :selectioncommand=>proc{
- puts(cb1.get_curselection)
- },
- :editable=>false, :listheight=>185,
- :popupcursor=>'hand1')
-
-cb1.insert_list('end', *%w(Jan Feb Mar Apr May June Jul Aug Sept Oct Nov Dec))
-
-
-#
-# Editable Dropdown Combobox
-#
-cb2 = Tk::Iwidgets::Combobox.new(:labeltext=>'Operating System:',
- :selectioncommand=>proc{
- puts(cb2.get_curselection)
- })
-
-cb2.insert_list('end', *%w(Linux HP-UX SunOS Solaris Irix))
-cb2.insert_entry('end', 'L')
-
-cb1.pack(:padx=>10, :pady=>10, :fill=>:x)
-cb2.pack(:padx=>10, :pady=>10, :fill=>:x)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb b/ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb
deleted file mode 100644
index 873f702cb5..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Dateentry.new.pack
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb b/ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb
deleted file mode 100644
index 30c72a1351..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-df = Tk::Iwidgets::Datefield.new(:command=>proc{puts(df.get)})
-df.pack(:fill=>:x, :expand=>true, :padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb
deleted file mode 100644
index f9ceffb201..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Thread.new{Tk.mainloop}
-
-d = Tk::Iwidgets::Dialog.new(:modality=>:application)
-
-d.buttonconfigure('OK', :command=>proc{puts 'OK'; d.deactivate true})
-d.buttonconfigure('Apply', :command=>proc{puts 'Apply'})
-d.buttonconfigure('Cancel', :command=>proc{puts 'Cancel'; d.deactivate false})
-d.buttonconfigure('Help', :command=>proc{puts 'Help'})
-
-TkListbox.new(d.child_site, :relief=>:sunken).pack(:expand=>true, :fill=>:both)
-
-if TkComm.bool(d.activate)
- puts "Exit via OK button"
-else
- puts "Exit via Cancel button"
-end
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb b/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb
deleted file mode 100644
index 240768a259..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-ds = Tk::Iwidgets::Dialogshell.new(:modality=>:none)
-
-ds.add('OK', :text=>'OK', :command=>proc{puts 'OK'; ds.deactivate})
-ds.add('Cancel', :text=>'Cancel', :command=>proc{puts 'Cancel'; ds.deactivate})
-ds.default('OK')
-
-TkButton.new(:text=>'ACTIVATE', :padx=>7, :pady=>7,
- :command=>proc{puts ds.activate}).pack(:padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb
deleted file mode 100644
index 151a06f8da..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-djl = Tk::Iwidgets::Disjointlistbox.new.pack(:fill=>:both, :expand=>true,
- :padx=>10, :pady=>10)
-djl.set_lhs(*[0,2,4,5])
-djl.set_rhs(3,6)
-
-djl.insert_lhs(1,7,8)
-djl.insert_rhs(9)
-
-p djl.get_lhs
-p djl.get_rhs
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb b/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb
deleted file mode 100644
index 1bb68d7434..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#########################################################
-#
-# use Tk::UTF8_String() for a utf8 character
-#
-#########################################################
-require 'tk'
-require 'tkextlib/iwidgets'
-
-TkOption.add('*textBackground', 'white')
-
-ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"})
-
-fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:',
- :fixed=>10, :width=>12)
-
-nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:',
- :validate=>:numeric, :width=>12)
-
-aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:',
- :validate=>:alphabetic, :width=>12,
- :invalid=>proc{
- puts "Alphabetic contents invalid"
- })
-
-pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12,
- :show=>Tk::UTF8_String("\267"),
- ## <=== utf8 character
- :command=>proc{puts "Return Pressed"})
-
-Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef)
-
-ef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-fef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-nef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-aef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-pef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb
deleted file mode 100644
index 0b75e56f9a..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#########################################################
-#
-# set $KCODE to 'utf' for a utf8 character
-#
-#########################################################
-unless defined?(::Encoding.default_external)
- $KCODE='utf'
-else
- DEFAULT_TK_ENCODING = 'UTF-8'
-end
-
-require 'tk'
-require 'tkextlib/iwidgets'
-
-TkOption.add('*textBackground', 'white')
-
-ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"})
-
-fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:',
- :fixed=>10, :width=>12)
-
-nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:',
- :validate=>:numeric, :width=>12)
-
-aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:',
- :validate=>:alphabetic, :width=>12,
- :invalid=>proc{
- puts "Alphabetic contents invalid"
- })
-
-pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12,
- :show=>"\267", ## <=== utf8 character
- :command=>proc{puts "Return Pressed"})
-
-Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef)
-
-ef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-fef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-nef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-aef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-pef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb b/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb
deleted file mode 100644
index 2aad4da2d8..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#########################################################
-#
-# set Tk.encoding = 'utf-8' for a utf8 character
-#
-#########################################################
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk.encoding = 'utf-8'
-
-TkOption.add('*textBackground', 'white')
-
-ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"})
-
-fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:',
- :fixed=>10, :width=>12)
-
-nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:',
- :validate=>:numeric, :width=>12)
-
-aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:',
- :validate=>:alphabetic, :width=>12,
- :invalid=>proc{
- puts "Alphabetic contents invalid"
- })
-
-pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12,
- :show=>"\267", ## <=== utf8 character
- :command=>proc{puts "Return Pressed"})
-
-Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef)
-
-ef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-fef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-nef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-aef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-pef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb b/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb
deleted file mode 100644
index fbacebc563..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Extbutton.new(:text=>'Bitmap example', :bitmap=>'info',
- :background=>'bisque', :activeforeground=>'red',
- :bitmapforeground=>'blue', :defaultring=>true,
- :command=>proc{
- puts "Bisque is beautiful"
- }).pack(:expand=>true)
-
-#img = TkPhotoImage.new(:file=>File.join(File.dirname(File.expand_path(__FILE__)), '../../../images/earthris.gif'))
-img = TkPhotoImage.new(:file=>File.join(File.dirname(File.expand_path(__FILE__)), '../catalog_demo/images/clear.gif'))
-
-Tk::Iwidgets::Extbutton.new(:text=>'Image example', :relief=>:ridge,
- :image=>img, :imagepos=>:e, :font=>'9x15bold',
- :activebackground=>'lightyellow',
- :background=>'lightgreen').pack(:expand=>true)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb
deleted file mode 100644
index 2eb0c7aca0..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Extfileselectionbox.new.pack(:padx=>10, :pady=>10,
- :fill=>:both, :expand=>true)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb
deleted file mode 100644
index 24a32da49a..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mainloop = Thread.new{Tk.mainloop}
-
-#
-# Non-modal example
-#
-nmfsd = Tk::Iwidgets::Extfileselectiondialog.new(:title=>'Non-Modal')
-nmfsd.buttonconfigure('OK', :command=>proc{
- puts "You selected #{nmfsd.get}"
- nmfsd.deactivate
- })
-nmfsd.activate
-
-#
-# Modal example
-#
-mfsd = Tk::Iwidgets::Extfileselectiondialog.new(:modality=>:application)
-mfsd.center
-if TkComm.bool(mfsd.activate)
- puts "You selected #{mfsd.get}"
-else
- puts "You cancelled the dialog"
-end
-
-
-mainloop.join
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb b/ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb
deleted file mode 100644
index 27fe625a5d..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Feedback.new(:labeltext=>'Status', :steps=>20){|fb|
- pack(:padx=>10, :pady=>10, :fill=>:both, :expand=>true)
- TkTimer.new(500, 20, proc{fb.step}).start(2500)
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb
deleted file mode 100644
index c87ee27a6c..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Fileselectionbox.new.pack(:padx=>10, :pady=>10,
- :fill=>:both, :expand=>true)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb
deleted file mode 100644
index 1585bd4639..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mainloop = Thread.new{Tk.mainloop}
-
-#
-# Non-modal example
-#
-nmfsd = Tk::Iwidgets::Fileselectiondialog.new(:title=>'Non-Modal')
-nmfsd.buttonconfigure('OK', :command=>proc{
- puts "You selected #{nmfsd.get}"
- nmfsd.deactivate
- })
-nmfsd.activate
-
-#
-# Modal example
-#
-mfsd = Tk::Iwidgets::Fileselectiondialog.new(:modality=>:application)
-mfsd.center
-if TkComm.bool(mfsd.activate)
- puts "You selected #{mfsd.get}"
-else
- puts "You cancelled the dialog"
-end
-
-mainloop.join
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb
deleted file mode 100644
index a32a08ffbf..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mainloop = Thread.new{Tk.mainloop}
-
-st = Tk::Iwidgets::Scrolledtext.new.pack
-st.insert('end', "Now is the time for all good men\n")
-st.insert('end', "to come to the aid of their country")
-
-fd = Tk::Iwidgets::Finddialog.new(:textwidget=>st)
-fd.center(st)
-fd.activate
-
-mainloop.join
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb b/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb
deleted file mode 100644
index bb65a66b4d..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-def get_files(file)
- dir = (file.empty?)? ENV['HOME'] : TkComm._fromUTF8(file)
- Dir.chdir(dir) rescue return ''
- Dir['*'].sort.collect{|f|
- [TkComm._toUTF8(File.join(dir, f)), TkComm._toUTF8(f)]
- }
-end
-
-Tk::Iwidgets::Hierarchy.new(:querycommand=>proc{|arg| get_files(arg.node)},
- :visibleitems=>'30x15',
- :labeltext=>ENV['HOME']).pack(:side=>:left,
- :expand=>true,
- :fill=>:both)
-
-# Tk::Iwidgets::Hierarchy.new(:querycommand=>[proc{|n| get_files(n)}, '%n'],
-# :visibleitems=>'30x15',
-# :labeltext=>ENV['HOME']).pack(:side=>:left,
-# :expand=>true,
-# :fill=>:both)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb b/ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb
deleted file mode 100644
index dcda4030f3..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mainloop = Thread.new{Tk.mainloop}
-
-dir = '/usr/local/ActiveTcl/demos/IWidgets/html/'
-href = [ 'hyperhelp.n', 'buttonbox.n', 'calendar.n' ]
-
-hh = Tk::Iwidgets::Hyperhelp.new(:topics=>href, :helpdir=>dir)
-hh.show_topic('hyperhelp.n')
-hh.activate
-
-mainloop.join
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb b/ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb
deleted file mode 100644
index 52bf957208..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-lf = Tk::Iwidgets::Labeledframe.new(:labeltext=>'Entry Frame', :labelpos=>:n)
-lf.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>10)
-
-cs = lf.child_site
-
-Tk::Iwidgets::Entryfield.new(cs, :labeltext=>'Name:').pack(:side=>:top, :fill=>:x)
-Tk::Iwidgets::Spinint.new(cs, :labeltext=>'Number:').pack(:side=>:top, :fill=>:x)
-Tk::Iwidgets::Pushbutton.new(cs, :text=>'Details:').pack(:side=>:top, :fill=>:x)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb b/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb
deleted file mode 100644
index 8b45d2bcb0..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-lw = Tk::Iwidgets::Labeledwidget.new(:labeltext=>'Canvas Widget',
- :labelpos=>:s)
-lw.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>10)
-
-cw = TkCanvas.new(lw.child_site, :relief=>:raised, :width=>200, :height=>200,
- :borderwidth=>3, :background=>:white)
-cw.pack(:padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb b/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb
deleted file mode 100644
index 3e5e511a1e..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mw = Tk::Iwidgets::Mainwindow.new
-
-mw.menubar.add(:menubutton, 'file', :text=>'File', :underline=>0,
- :padx=>8, :pady=>2, :menu=>[
- [:options, {:tearoff=>false}],
-
- [:command, 'new', {
- :label=>'New', :underline=>0,
- :helpstr=>'Create a new file'
- }
- ],
-
- [:command, 'open', {
- :label=>'Open ...', :underline=>0,
- :helpstr=>'Open an existing file'
- }
- ],
-
- [:command, 'save', {
- :label=>'Save', :underline=>0,
- :helpstr=>'Save the current file'
- }
- ],
-
- [:command, 'saveas', {
- :label=>'Save As', :underline=>5,
- :helpstr=>'Save the file as a different name'
- }
- ],
-
- [:command, 'print', {
- :label=>'Print', :underline=>0,
- :helpstr=>'Print the file'
- }
- ],
-
- [:separator, 'sep1'],
-
- [:command, 'close', {
- :label=>'Close', :underline=>0,
- :helpstr=>'Close the file'
- }
- ],
-
- [:separator, 'sep2'],
-
- [:command, 'exit', {
- :label=>'Exit', :underline=>1,
- :helpstr=>'Exit this application'
- }
- ],
-
- nil
- ])
-
-Tk::Iwidgets::Scrolledtext.new(mw.child_site).pack(:fill=>:both, :expand=>true)
-
-mw.activate
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb b/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb
deleted file mode 100644
index 389a622966..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-helpvar = TkVariable.new
-viewmode = TkVariable.new
-
-menu_spec = [
- [:menubutton, 'file', {
- :text=>'File', :menu=>[
- [:options, {:tearoff=>false}],
-
- [:command, 'new', {
- :label=>'New', :helpstr=>'Open new document',
- :command=>proc{puts 'NEW'}
- }
- ],
-
- [:command, 'close', {
- :label=>'Close', :helpstr=>'Close current document',
- :command=>proc{puts 'CLOSE'}
- }
- ],
-
- [:separator, 'sep1'],
-
- [:command, 'exit', {
- :label=>'Exit', :helpstr=>'Exit application',
- :command=>proc{exit}
- }
- ]
- ]
- }
- ],
-
- [:menubutton, 'edit', {
- :text=>'Edit', :menu=>[
- [:options, {:tearoff=>false}],
-
- [:command, 'undo', {
- :label=>'Undo', :underline=>0,
- :helpstr=>'Undo last command',
- :command=>proc{puts 'UNDO'}
- }
- ],
-
- [:separator, 'sep2'],
-
- [:command, 'cut', {
- :label=>'Cut', :underline=>1,
- :helpstr=>'Cut selection to clipboard',
- :command=>proc{puts 'CUT'}
- }
- ],
-
- [:command, 'copy', {
- :label=>'Copy', :underline=>1,
- :helpstr=>'Copy selection to clipboard',
- :command=>proc{puts 'COPY'}
- }
- ],
-
- [:command, 'paste', {
- :label=>'Paste', :underline=>0,
- :helpstr=>'Paste clipboard contents',
- :command=>proc{puts 'PASTE'}
- }
- ]
- ]
- }
- ],
-
- [:menubutton, 'options', {
- :text=>'Options', :menu=>[
- [:options, {:tearoff=>false, :selectcolor=>'blue'}],
-
- [:radiobutton, 'byName', {
- :variable=>viewmode, :value=>'NAME',
- :label=>'by Name', :helpstr=>'View files by name order',
- :command=>proc{puts 'NAME'}
- }
- ],
-
- [:radiobutton, 'byDate', {
- :variable=>viewmode, :value=>'DATE',
- :label=>'by Date', :helpstr=>'View files by date order',
- :command=>proc{puts 'DATE'}
- }
- ],
-
- [:cascade, 'prefs', {
- :label=>'Preferences', :menu=>[
- [:command, 'colors', {
- :label=>'Colors...', :helpstr=>'Change text colors',
- :command=>proc{puts 'COLORS'}
- }
- ],
-
- [:command, 'fonts', {
- :label=>'Fonts...', :helpstr=>'Change text font',
- :command=>proc{puts 'COLORS'}
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
-]
-
-#mb = Tk::Iwidgets::Menubar.new(:helpvariable=>helpvar,
-# :menubuttons=>menu_spec)
-mb = Tk::Iwidgets::Menubar.new(:helpvariable=>helpvar)
-mb.configure(:menubuttons=>menu_spec)
-
-fr = TkFrame.new(:width=>300, :height=>300)
-ef = TkEntry.new(:textvariable=>helpvar)
-
-mb.pack(:anchor=>:nw, :fill=>:x, :expand=>true)
-fr.pack(:fill=>:both, :expand=>true)
-ef.pack(:anchor=>:sw, :fill=>:x, :expand=>true)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb
deleted file mode 100644
index c3fd8bc35d..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-helpvar = TkVariable.new
-viewmode = TkVariable.new
-
-mb = Tk::Iwidgets::Menubar.new
-mb.menubuttons = [
- [:menubutton, 'file', {
- :text=>'File', :menu=>[
- [:command, 'new', {:label=>'New'}],
- [:command, 'close', {:label=>'Close'}],
- [:separator, 'sep1'],
- [:command, 'quit', {:label=>'Quit'}]
- ]
- }
- ],
- [:menubutton, 'edit', {:text=>'Edit'}]
-]
-
-mb.add(:command, '.edit.undo', :label=>'Undo', :underline=>0)
-mb.add(:separator, '.edit.sep2')
-mb.add(:command, '.edit.cut', :label=>'Cut', :underline=>1)
-mb.add(:command, '.edit.copy', :label=>'Copy', :underline=>1)
-mb.add(:command, '.edit.paste', :label=>'Paste', :underline=>0)
-
-mb.add(:menubutton, '.options', :text=>'Options', :menu=>[
- [:radiobutton, 'byName', {
- :variable=>viewmode, :value=>'NAME', :label=>'by Name'}
- ],
- [:radiobutton, 'byDate', {
- :variable=>viewmode, :value=>'DATE', :label=>'by Date'}
- ]
- ])
-
-mb.add(:cascade, '.options.prefs', :label=>'Preferences', :menu=>[
- [:command, 'colors', {:label=>'Colors...'}],
- [:command, 'fonts', {:label=>'Fonts...'}]
- ])
-
-mb.pack(:side=>:left, :anchor=>:nw, :fill=>:x, :expand=>true)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb b/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb
deleted file mode 100644
index 8f51ab754f..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mb = Tk::Iwidgets::Messagebox.new(:hscrollmode=>:dynamic,
- :labeltext=>'Messages', :labelpos=>:n,
- :height=>120, :width=>550,
- :savedir=>'/tmp', :textbackground=>'#d9d9d9')
-mb.pack(:padx=>5, :pady=>5, :fill=>:both, :expand=>true)
-
-mb.type_add('ERROR', :background=>'red', :foreground=>'white', :bell=>true)
-mb.type_add('WARNING', :background=>'yellow', :foreground=>'black')
-mb.type_add('INFO', :background=>'white', :foreground=>'black')
-
-mb.issue('This is an error message in red with a beep', 'ERROR')
-mb.issue('This warning message in yellow', 'WARNING')
-mb.issue('This is an informational message', 'INFO')
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb
deleted file mode 100644
index 9bb15ebec2..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mb = Tk::Iwidgets::Messagebox.new(:hscrollmode=>:dynamic,
- :labeltext=>'Messages', :labelpos=>:n,
- :height=>120, :width=>550,
- :savedir=>'/tmp', :textbackground=>'#d9d9d9')
-mb.pack(:padx=>5, :pady=>5, :fill=>:both, :expand=>true)
-
-error = mb.type_add(:background=>'red', :foreground=>'white', :bell=>true)
-warning = mb.type_add(:background=>'yellow', :foreground=>'black')
-info = mb.type_add(:background=>'white', :foreground=>'black')
-
-mb.issue('This is an error message in red with a beep', error)
-mb.issue('This warning message in yellow', warning)
-mb.issue('This is an informational message', info)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb
deleted file mode 100644
index ca73ed54d2..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mainloop = Thread.new{Tk.mainloop}
-
-#
-# Standard question message dialog used for confirmation.
-#
-md = Tk::Iwidgets::Messagedialog.new(:title=>'Message Dialog',
- :text=>'Are you sure ? ',
- :bitmap=>'questhead', :modality=>:global)
-
-md.buttonconfigure('OK', :text=>'Yes')
-md.buttonconfigure('Cancel', :text=>'No')
-
-if TkComm.bool(md.activate)
- md.text('Are you really sure ? ')
- if TkComm.bool(md.activate)
- puts 'Yes'
- else
- puts 'No'
- end
-else
- puts 'No'
-end
-
-md.destroy
-
-#
-# Copyright notice with automatic deactivation.
-#
-bmp = '@' + File.join(File.dirname(File.expand_path(__FILE__)), '../catalog_demo/images/text.xbm')
-
-cr = Tk::Iwidgets::Messagedialog.new(:title=>'Copyright',
- :bitmap=>bmp, :imagepos=>:n,
- :text=>"Copyright 200x XXX Corporation\nAll rights reserved")
-
-cr.hide('Cancel')
-
-cr.activate
-Tk.after(7000, proc{cr.deactivate; Tk.root.destroy})
-
-mainloop.join
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb b/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb
deleted file mode 100644
index 4305db4f5c..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-# Create the tabnotebook widget and pack it.
-nb = Tk::Iwidgets::Notebook.new(:width=>100, :height=>100)
-nb.pack(:anchor=>:nw, :fill=>:both, :expand=>true,
- :side=>:left, :padx=>10, :pady=>10)
-
-# Add two pages to the tabnotebook,
-# labelled "Page One" and "Page Two"
-nb.add(:label=>'Page One')
-nb.add(:label=>'Page Two')
-
-# Get the child site frames of these two pages.
-page1CS = nb.child_site(0)
-page2CS = nb.child_site('Page Two')
-
-# Create buttons on each page of the tabnotebook.
-TkButton.new(page1CS, :text=>'Button One').pack
-TkButton.new(page2CS, :text=>'Button Two').pack
-
-# Select the first page of the tabnotebook.
-nb.select(0)
-
-# Create the scrollbar and associate the scrollbar
-# and the notebook together, then pack the scrollbar
-nb.scrollbar(TkScrollbar.new).pack(:fill=>:y, :expand=>true, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb
deleted file mode 100644
index a3b00b2a87..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-# Create the tabnotebook widget and pack it.
-nb = Tk::Iwidgets::Notebook.new(:width=>100, :height=>100)
-nb.pack(:anchor=>:nw, :fill=>:both, :expand=>true,
- :side=>:top, :padx=>10, :pady=>0)
-
-# Add two pages to the tabnotebook,
-# labelled "Page One" and "Page Two"
-nb.add(:label=>'Page One')
-nb.add(:label=>'Page Two')
-
-# Get the child site frames of these two pages.
-page1CS = nb.child_site(0)
-page2CS = nb.child_site('Page Two')
-
-# Create buttons on each page of the tabnotebook.
-TkButton.new(page1CS, :text=>'Button One').pack
-TkButton.new(page2CS, :text=>'Button Two').pack
-
-# Select the first page of the tabnotebook.
-nb.select(0)
-
-# Create the scrollbar and associate the scrollbar
-# and the notebook together, then pack the scrollbar
-nb.xscrollbar(TkScrollbar.new).pack(:fill=>:x, :expand=>true, :padx=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb b/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb
deleted file mode 100644
index 2dc7eaf411..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-om = Tk::Iwidgets::Optionmenu.new(:labelmargin=>5, :labelpos=>:w,
- :labeltext=>"Operating System :")
-
-om.insert('end', 'Unix', 'VMS', 'Linux', 'OS/2', 'Windows NT', 'DOS')
-om.sort_ascending
-om.select('Linux')
-
-om.pack(:padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb b/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb
deleted file mode 100644
index ba36319f85..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-pw = Tk::Iwidgets::Panedwindow.new(:width=>300, :height=>300)
-
-pw.add('top')
-pw.add('middle', :margin=>10)
-pw.add('bottom', :margin=>10, :minimum=>10)
-
-pw.pack(:fill=>:both, :expand=>true)
-
-pw.child_site_list.each{|pane|
- TkButton.new(pane, :text=>pane.path, :relief=>:raised,
- :borderwidth=>2).pack(:fill=>:both, :expand=>true)
-}
-
-pw.fraction(50,30,20)
-pw.paneconfigure(0, :minimum=>20)
-pw.paneconfigure('bottom', :margin=>15)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb
deleted file mode 100644
index 4abd5f4a45..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-pw = Tk::Iwidgets::Panedwindow.new(:width=>300, :height=>300)
-
-top = pw.add
-middle = pw.add(:margin=>10)
-bottom = pw.add(:margin=>10, :minimum=>10)
-
-pw.pack(:fill=>:both, :expand=>true)
-
-pw.child_site_list.each{|pane|
- TkButton.new(pane, :text=>pane.path, :relief=>:raised,
- :borderwidth=>2).pack(:fill=>:both, :expand=>true)
-}
-
-pw.fraction(50,30,20)
-pw.paneconfigure(0, :minimum=>20) # 0 == pw.index(top)
-pw.paneconfigure(bottom, :margin=>15)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb
deleted file mode 100644
index 7f011f4833..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mainloop = Thread.new{Tk.mainloop}
-
-TkOption.add('*textBackground', 'white')
-
-pd = Tk::Iwidgets::Promptdialog.new(:modality=>:global, :title=>'Password',
- :labeltext=>'Password:', :show=>'*')
-pd.hide('Apply')
-
-if TkComm.bool(pd.activate)
- puts "Password entered: #{pd.get}"
-else
- puts "Password prompt cancelled"
-end
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb b/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb
deleted file mode 100644
index 5d3bdc7efd..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Pushbutton.new(:text=>'Hello',
- :command=>proc{puts 'Hello World'},
- :defaultring=>true).pack(:padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb
deleted file mode 100644
index 470ed8cee5..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-rb = Tk::Iwidgets::Radiobox.new(:labeltext=>'Fonts')
-rb.add('times', :text=>'Times')
-rb.add('helvetica', :text=>'Helvetica')
-rb.add('courier', :text=>'Courier')
-rb.add('symbol', :text=>'Symbol')
-rb.select('courier')
-rb.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb
deleted file mode 100644
index 85e6a47b1a..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-sc = Tk::Iwidgets::Scrolledcanvas.new
-
-sc.create(TkcRectangle, 100, 100, 400, 400, :fill=>'red')
-TkcRectangle.new(sc, 300, 300, 600, 600, :fill=>'green')
-TkcRectangle.new(sc, [[200, 200], [500, 500]], :fill=>'blue')
-
-sc.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb
deleted file mode 100644
index 91d22131c0..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-sf = Tk::Iwidgets::Scrolledframe.new(:width=>150, :height=>180,
- :labeltext=>'scrolledframe')
-cs = sf.child_site
-
-TkButton.new(cs, :text=>'Hello').pack(:pady=>10)
-TkButton.new(cs, :text=>'World').pack(:pady=>10)
-TkButton.new(cs, :text=>'This is a test').pack(:pady=>10)
-TkButton.new(cs, :text=>'This is a really big button').pack(:pady=>10)
-TkButton.new(cs, :text=>'This is another really big button').pack(:pady=>10)
-TkButton.new(cs, :text=>'This is the last really big button').pack(:pady=>10)
-
-sf.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb
deleted file mode 100644
index f825483b2c..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-TkOption.add('*textBackground', 'white')
-
-sh = Tk::Iwidgets::Scrolledhtml.new(:fontname=>'helvetica',
- :linkcommand=>proc{|href|
- sh.import_link(href)
- })
-sh.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
-
-sh.import(Tk.getOpenFile(:title=>'select HTML document'))
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb
deleted file mode 100644
index 3872fb7d40..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-TkOption.add('*textBackground', 'white')
-
-slb = Tk::Iwidgets::Scrolledlistbox.new(:selectmode=>:single,
- :vscrollmode=>:static,
- :hscrollmode=>:dynamic,
- :labeltext=>'List',
- :selectioncommand=>proc{
- puts(slb.get_curselection)
- },
- :dblclickcommand=>proc{
- puts('Double Click')
- puts(slb.get_curselection)
- })
-slb.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
-
-slb.insert('end', *['Hello', 'Out There', 'World'])
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb
deleted file mode 100644
index 4965039371..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-st = Tk::Iwidgets::Scrolledtext.new(:hscrollmode=>:dynamic, :wrap=>:none,
- :labeltext=>'Password File')
-st.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
-
-st.import('/etc/passwd')
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb
deleted file mode 100644
index 8c0b68a22e..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-TkOption.add('*textBackground', 'white')
-
-sb = Tk::Iwidgets::Selectionbox.new.pack(:padx=>10, :pady=>10,
- :fill=>:both, :expand=>true)
-
-sb.insert_items('end', *['Hello', 'Out There', 'World'])
-
-TkLabel.new(sb.child_site,
- :text=>'Child Site is Here').pack(:fill=>:x, :padx=>10, :pady=>10)
-
-sb.insert_items(2, 'Cruel Cruel')
-
-sb.selection_set(1)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb
deleted file mode 100644
index 9fbf8b7d2a..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-mainloop = Thread.new{Tk.mainloop}
-
-TkButton.new(:text=>'QUIT',
- :command=>proc{Tk.root.destroy}).pack(:padx=>10, :pady=>10)
-
-Tk::Iwidgets::Selectiondialog.new.activate
-
-mainloop.join
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb b/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb
deleted file mode 100644
index 4cbf4416c0..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-sh = Tk::Iwidgets::Shell.new(:modality=>:application,
- :padx=>20, :pady=>20, :title=>'Shell')
-
-TkButton.new(:text=>'ACTIVATE', :padx=>7, :pady=>7,
- :command=>proc{puts sh.activate}).pack(:padx=>10, :pady=>10)
-
-TkLabel.new(sh.child_site, :text=>'SHELL').pack
-TkButton.new(sh.child_site, :text=>'YES',
- :command=>proc{sh.deactivate 'press YES'}).pack(:fill=>:x)
-TkButton.new(sh.child_site, :text=>'NO',
- :command=>proc{sh.deactivate 'press NO'}).pack(:fill=>:x)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb b/ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb
deleted file mode 100644
index 38d9b49c86..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Spindate.new.pack(:padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb b/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb
deleted file mode 100644
index 1887f46e05..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-TkOption.add('*textBackground', 'white')
-
-Tk::Iwidgets::Spinint.new(:labeltext=>'Temperature', :labelpos=>:w, :width=>5,
- :fixed=>true, :range=>[32, 212]).pack(:pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb b/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb
deleted file mode 100644
index 2e64bdfb08..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-class Spinner_demo < TkWindow
- Months = %w(January February March April May June July August September October November December)
-
- def block_input(c)
- false
- end
-
- def spin_month(step)
- index = Months.index(@spinner.get) + step
- index = 11 if index < 0
- index = 0 if index > 11
-
- @spinner.value = Months[index]
- end
-
- def initialize(parent=nil)
- @spinner = Tk::Iwidgets::Spinner.new(parent, :labeltext=>'Month : ',
- :width=>10, :fixed=>10,
- :validate=>proc{|c| block_input},
- :decrement=>proc{spin_month -1},
- :increment=>proc{spin_month 1})
- @path = @spinner
- @spinner.insert(0, Months[0])
- end
-end
-
-Spinner_demo.new.pack(:padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb b/ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb
deleted file mode 100644
index 597e7d014c..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Spintime.new.pack(:padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb b/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb
deleted file mode 100644
index 0c94cd1738..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-# Create the tabnotebook widget and pack it.
-tn = Tk::Iwidgets::Tabnotebook.new(:width=>300, :height=>100)
-tn.pack(:anchor=>:nw, :fill=>:both, :expand=>true,
- :side=>:left, :padx=>10, :pady=>10)
-
-# Add two pages to the tabnotebook,
-# labelled "Page One" and "Page Two"
-tn.add(:label=>'Page One')
-tn.add(:label=>'Page Two')
-
-# Get the child site frames of these two pages.
-page1CS = tn.child_site(0)
-page2CS = tn.child_site('Page Two')
-
-# Create buttons on each page of the tabnotebook.
-TkButton.new(page1CS, :text=>'Button One').pack
-TkButton.new(page2CS, :text=>'Button Two').pack
-
-# Select the first page of the tabnotebook.
-tn.select(0)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb
deleted file mode 100644
index 57f9e46214..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-# Create the tabnotebook widget and pack it.
-tn = Tk::Iwidgets::Tabnotebook.new(:width=>300, :height=>100)
-tn.pack(:anchor=>:nw, :fill=>:both, :expand=>true,
- :side=>:top, :padx=>10, :pady=>0)
-
-# Add two pages to the tabnotebook,
-# labelled "Page One" and "Page Two"
-tn.add(:label=>'Page One')
-tn.add(:label=>'Page Two')
-
-# Get the child site frames of these two pages.
-page1CS = tn.child_site(0)
-page2CS = tn.child_site('Page Two')
-
-# Create buttons on each page of the tabnotebook.
-TkButton.new(page1CS, :text=>'Button One').pack
-TkButton.new(page2CS, :text=>'Button Two').pack
-
-# Select the first page of the tabnotebook.
-tn.select(0)
-
-# Create the scrollbar
-# and the notebook together, then pack the scrollbar
-tn.xscrollbar(TkScrollbar.new).pack(:fill=>:x, :expand=>true, :padx=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb b/ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb
deleted file mode 100644
index 99d5ac6071..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-# Create a listbox with two items (one and two)
-l = TkListbox.new(:selectmode=>:single, :exportselection=>false).pack
-l.insert('end', 'one')
-l.insert('end', 'two')
-l.selection_set(0)
-
-# Define a proc that knows how to select an item
-# from a list given an index from the tabset -command callback.
-selectItem = proc{|item|
- l.selection_clear(l.curselection)
- l.selection_set(item)
- l.see(item)
-}
-
-# Create a tabset, set its -command to call selectItem
-# Add two labels to the tabset (one and two).
-ts = Tk::Iwidgets::Tabset.new(:command=>selectItem)
-ts.add(:label=>1)
-ts.add(:label=>2)
-ts.select(0)
-ts.pack(:fill=>:x, :expand=>true)
-
-# Define a proc that knows how to select a tab
-# given a y pixel coordinate from the list..
-selectTab = proc{|y| ts.select(l.nearest(y)) }
-
-# bind button 1 press to the selectTab procedure.
-l.bind('ButtonPress-1', proc{|y| selectTab.call(y) }, '%y')
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb b/ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb
deleted file mode 100644
index 5841f0aadf..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Tk::Iwidgets::Timeentry.new.pack
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb b/ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb
deleted file mode 100644
index e2824b17aa..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-tf = Tk::Iwidgets::Timefield.new(:command=>proc{puts(tf.get)})
-tf.pack(:fill=>:x, :expand=>true, :padx=>10, :pady=>10)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb b/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb
deleted file mode 100644
index 3cbaec210b..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-##########################################
-# icon images
-editcopy22 = TkPhotoImage.new(:data=><<'EOD')
- R0lGODlhFgAWAIUAAPwCBBQSFPz+/DQyNISChDw6PMzKzMTGxERGRIyKjFxa
- XMTCvKSmpHR2dPz6/Pz29PTq3MS2rPz69MTCxFxWVHx6dJyWjNzSzPz27Pzy
- 7Pzu5PTm3NTKvIR+fJyGfHxuZHxqXNTCtPTq5PTi1PTezNS+rExOTFRORMyy
- lPTaxOzWxOzSvNze3NTOxMy2nMyulMyqjAQCBAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbY
- QIBwSCwahYGkUnk0BgTQ6IAQaBKfUWhBYKhaAU+CgXAQIAyChLeJzSIQhcH6
- GFaM0QtGY5kstqEODw8QEQELAhJTc08KBBMEFBUWDRcBE1pca20SGBkaEBsc
- AY5maFRIAgoLHRQRHh8gIQFlZnByqA8ZGSIQIyQjJQEmYgJ5p2ACrK4gJx4g
- KIZZAgdeAQ4ZI9kjKSor0AwEjeAs1S0cHAslLi4vMDDRWeRIfEsxMeET4ATy
- VoYLC5fizXEiAR84BeMG+pEm8EsAFhAjSlR4hR6fLx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AAAAACH5BAEAAAAALAAAAAAWABYAAAVcICCOZGmK
- QSoMaZsShBsQBdAapHvgaIDUqUPJlRjSbAoT0fRDKgODRbF0PLUYjZO2F2Bs
- t9evNix+dsvDlGKK5jraudQb7qbX6a2HEJ+ycyF+LRE8ZTI+fX5oGCEAIf5o
- Q3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxD
- b3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3
- dy5kZXZlbGNvci5jb20AOw==
-EOD
-
-##########################################
-
-bmp_dir = File.join(File.dirname(File.expand_path(__FILE__)),
- '../catalog_demo/images')
-
-##########################################
-
-status_var = TkVariable.new
-radio_var = TkVariable.new
-check_var1 = TkVariable.new
-check_var2 = TkVariable.new
-
-tb = Tk::Iwidgets::Toolbar.new(:helpvariable=>status_var)
-
-##########################################
-
-tb.add(:button, :helpstr=>'Copy It', :image=>editcopy22,
- :balloonstr=>'Copy', :command=>proc{puts 'Copy It'})
-
-tb.add(:button, :helpstr=>'Cut It', :image=>editcut22,
- :balloonstr=>'Cut', :command=>proc{puts 'Cut It'})
-
-tb.add(:button, :helpstr=>'Paste It', :image=>editpaste22,
- :balloonstr=>'Paste', :command=>proc{puts 'Paste It'})
-
-tb.add(:button, :helpstr=>'Delete It', :image=>editdelete22,
- :balloonstr=>'Delete', :command=>proc{puts 'Delete It'})
-
-#--------------------------------
-
-tb.add(:frame, :borderwidth=>1, :width=>10, :height=>10)
-
-#--------------------------------
-
-tb.add(:radiobutton, :variable=>radio_var, :value=>'Box',
- :bitmap=>"@#{bmp_dir}/box.xbm",
- :helpstr=>'Radio Button #1', :balloonstr=>'Radio',
- :command=>proc{puts 'Radio Button "Box"'})
-
-tb.add(:radiobutton, :variable=>radio_var, :value=>'Line',
- :bitmap=>"@#{bmp_dir}/line.xbm",
- :helpstr=>'Radio Button #2', :balloonstr=>'Radio',
- :command=>proc{puts 'Radio Button "Line"'})
-
-tb.add(:radiobutton, :variable=>radio_var, :value=>'Oval',
- :bitmap=>"@#{bmp_dir}/oval.xbm",
- :helpstr=>'Radio Button #3', :balloonstr=>'Radio',
- :command=>proc{puts 'Radio Button "Oval"'})
-
-#--------------------------------
-
-tb.add(:frame, :borderwidth=>1, :width=>10, :height=>10)
-
-#--------------------------------
-
-tb.add(:checkbutton, :variable=>check_var1, :onvalue=>'yes', :offvalue=>'no',
- :image=>text22, :command=>proc{puts 'Checkbutton 1'})
-
-tb.add(:checkbutton, :variable=>check_var2, :onvalue=>'yes', :offvalue=>'no',
- :bitmap=>"@#{bmp_dir}/points.xbm", :command=>proc{puts 'Checkbutton 2'})
-
-tb.pack(:side=>:top, :anchor=>:nw)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb b/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb
deleted file mode 100644
index b06f173eee..0000000000
--- a/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-require 'tk'
-require 'tkextlib/iwidgets'
-
-Thread.new{
- trap('INT') {puts 'catch SIGINT'}
- sleep 5
- trap('INT', 'DEFAULT')
-}
-
-Tk::Iwidgets::Watch.new(:state=>:disabled, :showampm=>:no,
- :width=>155, :height=>155){|w|
- w.pack(:padx=>10, :pady=>10, :fill=>:both, :expand=>true)
- # TkTimer.new(1000, -1, proc{w.show; Tk.update}).start
- TkTimer.new(25, -1, proc{w.show; Tk.update}).start
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt
deleted file mode 100644
index 975f23e3f1..0000000000
--- a/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- >>> The following text is the original 'license.term' of tklib <<<
- >>> extension. <<<
- >>> Original Tcl files are not include in this directory, because <<<
- >>> of all of them are rewritten to Ruby files. <<<
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-
-This software is copyrighted by Ajuba Solutions and other parties.
-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.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-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.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
-are acquiring the software on behalf of the Department of Defense, the
-software shall be classified as "Commercial Computer Software" and the
-Government shall have only "Restricted Rights" as defined in Clause
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
-authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license.
diff --git a/ext/tk/sample/tkextlib/tcllib/datefield.rb b/ext/tk/sample/tkextlib/tcllib/datefield.rb
deleted file mode 100644
index 101950da1a..0000000000
--- a/ext/tk/sample/tkextlib/tcllib/datefield.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/tcllib/datefield'
-require 'parsedate'
-
-Tk.root.title('Datefield example')
-
-
-my_date1 = TkVariable.new
-my_date2 = TkVariable.new
-my_date1.trace('w'){
- begin
- t = Time.local(*(ParseDate.parsedate(my_date1.value)))
- my_date2.value = t.strftime('%A')
- rescue
- # ignore error
- end
-}
-
-df = Tk::Tcllib::Datefield.new(:textvariable=>my_date1)
-Tk.grid(TkLabel.new(:text=>'Enter a date:', :anchor=>:e), df, :sticky=>:ew)
-Tk.grid(TkLabel.new(:text=>'That date is a:', :anchor=>:e),
- TkLabel.new(:textvariable=>my_date2, :relief=>:sunken, :width=>12),
- :sticky=>:ew)
-
-df.set_focus
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb b/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb
deleted file mode 100644
index 89166c1c30..0000000000
--- a/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb
+++ /dev/null
@@ -1,159 +0,0 @@
-#!/usr/bin/ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/tcllib/plotchart'
-
-###############################
-
-c1 = TkCanvas.new(:background=>'white', :width=>400, :height=>200)
-c2 = TkCanvas.new(:background=>'white', :width=>400, :height=>200)
-c3 = TkCanvas.new(:background=>'white', :width=>400, :height=>200)
-Tk.pack(c1,c2,c3, :fill=>:both, :side=>:top)
-
-h = TkToplevel.new(:title=>'h')
-hc1 = TkCanvas.new(h, :background=>'white', :width=>400, :height=>200)
-hc2 = TkCanvas.new(h, :background=>'white', :width=>400, :height=>200)
-Tk.pack(hc1,hc2, :fill=>:both, :side=>:top)
-
-v = TkToplevel.new(:title=>'v')
-vc1 = TkCanvas.new(v, :background=>'white', :width=>400, :height=>200)
-vc2 = TkCanvas.new(v, :background=>'white', :width=>400, :height=>200)
-vc3 = TkCanvas.new(v, :background=>'white', :width=>400, :height=>200)
-Tk.pack(vc1,vc2,vc3, :fill=>:both, :side=>:top)
-
-###############################
-
-s = Tk::Tcllib::Plotchart::XYPlot.new(c1, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0])
-
-
-xd = 5.0
-yd = 20.0
-xold = 0.0
-yold = 50.0
-
-s.dataconfig('series1', :color=>'red')
-
-(0..19).each{|i|
- xnew = xold + xd
- ynew = yold + (rand() - 0.5) * yd
- ynew2 = yold + (rand() - 0.5) * 2.0 * yd
- s.plot('series1', xnew, ynew)
- s.plot('series2', xnew, ynew2)
- xold = xnew
- yold = ynew
-}
-
-s.xtext "X-coordinate"
-s.ytext "Y-data"
-s.title "Aha!"
-
-c1.wait_visibility
-
-s.save_plot "aha.ps"
-
-###############################
-
-s = Tk::Tcllib::Plotchart::Piechart.new(c2)
-
-s.plot([ ["Long names", 10], ["Short names", 30],
- ["Average", 40], ["Ultra-short names", 5] ])
-
-#
-# Note: title should be shifted up
-# - distinguish a separate title area
-#
-s.title "Okay - this works"
-
-###############################
-
-s = Tk::Tcllib::Plotchart::PolarPlot.new(c3, [3.0, 1.0])
-
-0.step(359, 10){|angle|
- rad = 1.0+Math.cos(angle*Math::PI/180.0)
- s.plot('cardioid', rad, angle)
-}
-
-s.title "Cardioid"
-
-###############################
-
-s = Tk::Tcllib::Plotchart::Barchart.new(hc1, %w(A B C D E),
- [0.0, 10.0, 2.0], 2)
-
-s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red')
-s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green')
-s.title "Arbitrary data"
-
-###############################
-
-s = Tk::Tcllib::Plotchart::Barchart.new(hc2, %w(A B C D E),
- [0.0, 20.0, 5.0], :stacked)
-
-s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red')
-s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green')
-s.title "Stacked diagram"
-
-###############################
-
-s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc1, [0.0, 10.0, 2.0],
- %w(A B C D E), 2)
-
-s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red')
-s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green')
-s.title "Arbitrary data"
-
-###############################
-
-s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc2, [0.0, 20.0, 5.0],
- %w(A B C D E), :stacked)
-
-s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red')
-s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green')
-s.title "Stacked diagram"
-
-###############################
-
-s = Tk::Tcllib::Plotchart::Timechart.new(vc3, "1 january 2004",
- "31 december 2004", 4)
-
-s.period("Spring", "1 march 2004", "1 june 2004", 'green')
-s.period("Summer", "1 june 2004", "1 september 2004", 'yellow')
-s.vertline("1 jan", "1 january 2004")
-s.vertline("1 apr", "1 april 2004")
-s.vertline("1 jul", "1 july 2004")
-s.vertline("1 oct", "1 october 2004")
-s.milestone("Longest day", "21 july 2004")
-s.title "Seasons (northern hemisphere)"
-
-###############################
-
-z = TkToplevel.new(:title=>'3D')
-
-zc1 = TkCanvas.new(z, :background=>'white', :width=>400, :height=>300)
-zc2 = TkCanvas.new(z, :background=>'white', :width=>400, :height=>250)
-Tk.pack(zc1,zc2)
-
-s = Tk::Tcllib::Plotchart::Plot3D.new(zc1,
- [0, 10, 3], [-10, 10, 10], [0, 10, 2.5])
-
-s.title "3D Plot"
-s.plot_function{|x, y|
- # cowboyhat
- x1 = x.to_f/9.0
- y1 = y.to_f/9.0
- 3.0 * (1.0-(x1*x1+y1*y1))*(1.0-(x1*x1+y1*y1))
-}
-
-s = Tk::Tcllib::Plotchart::Plot3D.new(zc2,
- [0, 10, 3], [-10, 10, 10], [0, 10, 2.5])
-s.title "3D Plot - data "
-s.colour("green", "black")
-s.plot_data([ [1.0, 2.0, 1.0, 0.0],
- [1.1, 3.0, 1.1, -0.5],
- [3.0, 1.0, 4.0, 5.0] ])
-
-###############################
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb b/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
deleted file mode 100644
index 58c5b1928b..0000000000
--- a/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/tcllib/plotchart'
-
-###############################
-
-c1 = TkCanvas.new(:background=>'white', :width=>400, :height=>200)
-c2 = TkCanvas.new(:background=>'white', :width=>400, :height=>200)
-Tk.pack(c1,c2, :fill=>:both, :side=>:top)
-
-###############################
-# Set up a strip chart
-###############################
-slipchart = Tk::Tcllib::Plotchart::Stripchart.new(c1, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0])
-
-TkTimer.new(500, -1, proc{|obj| # obj --> TkTimer object
- slipchart, xold, xd, yold, yd = obj.return_value
- xnew = xold + xd
- ynew = yold + (rand() - 0.5) * yd
- ynew2 = yold + (rand() - 0.5) * 2.0 * yd
- slipchart.plot('series1', xnew, ynew)
- slipchart.plot('series2', xnew, ynew2)
- obj.stop if xnew >= 200
- [slipchart, xnew, xd, ynew, yd] # return_value
- }).start(100, proc{
- # init return_value
- [slipchart, 0.0, 15.0, 50.0, 30.0]
- })
-
-slipchart.title "Aha!"
-
-###############################
-# Set up an isometric plot
-###############################
-s = Tk::Tcllib::Plotchart::IsometricPlot.new(c2, [0.0, 100.0], [0.0, 200.0],
- :noaxes)
-
-s.set_zoom_pan
-
-s.plot('rectangle', [10.0, 10.0, 50.0, 50.0], 'green')
-s.plot('filled-rectangle', [20.0, 20.0, 40.0, 40.0], 'red')
-s.plot('filled-circle', [70.0, 70.0, 40.0], 'yellow')
-s.plot('circle', [70.0, 70.0, 42.0])
-
-###############################
-# Check the symbols
-###############################
-h = TkToplevel.new(:title=>'h')
-c = TkCanvas.new(h, :bg=>'white', :width=>400, :height=>200).pack(:fill=>:both)
-
-s = Tk::Tcllib::Plotchart::XYPlot.new(c, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0])
-s.dataconfig('series1', :colour=>'red', :type=>:symbol)
-s.dataconfig('series2', :colour=>'green', :type=>:both)
-
-s.yconfig(:format=>"%12.2e")
-
-x = 5.0
-%w(plus cross circle up down dot upfilled downfilled).each{|sym|
- s.dataconfig('series1', :symbol=>sym)
- s.dataconfig('series2', :symbol=>sym)
- s.plot('series1', x, 50.0)
- s.plot('series2', x, 20)
- x += 10
-}
-
-##############################
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb b/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb
deleted file mode 100644
index 816e38b6a6..0000000000
--- a/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/tcllib/plotchart'
-
-###############################
-# Set up a strip chart
-###############################
-
-Tk::Tcllib::Plotchart::Stripchart.new([0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0],
- :background=>'white',
- :width=>400, :height=>200){|chart|
- title "Aha!"
- pack(:fill=>:both, :side=>:top)
-
- series1 = Tk::Tcllib::Plotchart::PlotSeries.new(chart)
- series2 = Tk::Tcllib::Plotchart::PlotSeries.new(chart)
-
- xd = 15.0
- yd = 30.0
-
- TkTimer.new(500, -1, proc{|obj| # obj --> TkTimer object
- xold, yold = obj.return_value
- xnew = xold + xd
- ynew = yold + (rand() - 0.5) * yd
- ynew2 = yold + (rand() - 0.5) * 2.0 * yd
-
- series1.plot(xnew, ynew)
- series2.plot(xnew, ynew2)
-
- obj.stop if xnew >= 200
-
- [xnew, ynew] # return_value
- }).start(100, proc{ [0.0, 50.0] }) # init return_value
-}
-
-###############################
-# Set up an isometric plot
-###############################
-Tk::Tcllib::Plotchart::IsometricPlot.new([0.0, 100.0], [0.0, 200.0], :noaxes,
- :background=>'white',
- :width=>400, :height=>200){|chart|
- pack(:fill=>:both, :side=>:top)
- set_zoom_pan
-
- chart.plot('rectangle', [10.0, 10.0, 50.0, 50.0], 'green')
- chart.plot('filled-rectangle', [20.0, 20.0, 40.0, 40.0], 'red')
- chart.plot('filled-circle', [70.0, 70.0, 40.0], 'yellow')
- chart.plot('circle', [70.0, 70.0, 42.0])
-}
-
-###############################
-# Check the symbols
-###############################
-TkToplevel.new(:title=>'h'){|h|
- Tk::Tcllib::Plotchart::XYPlot.new(h, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0],
- :bg=>'white',
- :width=>400, :height=>200){|chart|
- pack(:fill=>:both)
-
- yconfig(:format=>"%12.2e")
-
- series1 = Tk::Tcllib::Plotchart::PlotSeries.new(chart, :colour=>'red',
- :type=>:symbol)
- series2 = Tk::Tcllib::Plotchart::PlotSeries.new(chart, :colour=>'green',
- :type=>:both)
-
- x = 5.0
- %w(plus cross circle up down dot upfilled downfilled).each{|sym|
- series1.dataconfig(:symbol=>sym)
- series2.dataconfig(:symbol=>sym)
- series1.plot(x, 50.0)
- series2.plot(x, 20)
- x += 10
- }
- }
-}
-
-##############################
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tcllib/xyplot.rb b/ext/tk/sample/tkextlib/tcllib/xyplot.rb
deleted file mode 100644
index 3d71c3bf9f..0000000000
--- a/ext/tk/sample/tkextlib/tcllib/xyplot.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/tcllib/plotchart'
-
-TkCanvas.new(:background=>'white', :width=>400, :height=>200){|c|
- pack(:fill=>:both)
- Tk::Tcllib::Plotchart::XYPlot.new(c, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0]){
- [ [0.0, 32.0], [10.0, 50.0], [25.0, 60.0], [78.0, 11.0] ].each{|x, y|
- plot('series1', x, y)
- }
- title("Data series")
- }
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt
deleted file mode 100644
index 2326ef21fa..0000000000
--- a/ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-
- ######################################################################
- ### The following text is the original 'license.terms' of tile ###
- ### extension. ###
- ######################################################################
-
-
-LICENSE ("MIT-style")
-
-This software is Copyright (C) 2003 Joe English and other parties.
-
-The following terms apply to all files associated with this software
-unless explicitly disclaimed in individual files.
-
-The author(s) 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 in any distributions. No written agreement,
-license, or royalty fee is required for any of the authorized uses.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS for a PARTICULAR PURPOSE. IN NO EVENT
-shall the AUTHORS of THIS SOFTWARE be LIABLE to ANY PARTY for
-DIRECT, INDIRECT, SPECIAL, INCIDENTAL, or CONSEQUENTIAL DAMAGES
-arising out of the USE of THIS SOFTWARE and its DOCUMENTATION.
diff --git a/ext/tk/sample/tkextlib/tile/demo.rb b/ext/tk/sample/tkextlib/tile/demo.rb
deleted file mode 100644
index 8348ecdb58..0000000000
--- a/ext/tk/sample/tkextlib/tile/demo.rb
+++ /dev/null
@@ -1,984 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# Demo for 'tile' package.
-#
-require 'tk'
-
-demodir = File.dirname($0)
-themesdir = File.join(demodir, 'themes')
-Tk::AUTO_PATH.lappend('.', demodir, themesdir)
-
-Dir.foreach(themesdir){|name|
- next if name == '.' || name == '..'
- dir = File.join(themesdir, name)
- Tk::AUTO_PATH.lappend(dir) if File.directory?(dir)
-}
-
-require 'tkextlib/tile'
-
-def version?(ver)
- TkPackage.vcompare(Tk::Tile.package_version, ver) >= 0
-end
-
-# define Tcl/Tk procedures for compatibility
-Tk::Tile.__define_LoadImages_proc_for_compatibility__!
-Tk::Tile::Style.__define_wrapper_proc_for_compatibility__!
-
-unless Tk::Tile::Style.theme_names.include?('step')
- Tk::Tile::Style.theme_create('step')
-end
-
-Tk.load_tclscript(File.join(demodir, 'toolbutton.tcl'))
-Tk.load_tclscript(File.join(demodir, 'repeater.tcl'))
-
-# This forces an update of the available packages list. It's required
-# for package names to find the themes in demos/themes/*.tcl
-## Tk.tk_call(TkPackage.unknown_proc, 'Tcl', TkPackage.provide('Tcl'))
-## --> This doesn't work.
-## Because, unknown_proc may be "command + some arguments".
-Tk.ip_eval("#{TkPackage.unknown_proc} Tcl #{TkPackage.provide('Tcl')}")
-
-TkRoot.new{
- title 'Tile demo'
- iconname 'Tile demo'
-}
-
-# The descriptive names of the builtin themes.
-$THEMELIST = [
- ['default', 'Default'],
- ['classic', 'Classic'],
- ['alt', 'Revitalized'],
- ['winnative', 'Windows native'],
- ['xpnative', 'XP Native'],
- ['aqua', 'Aqua'],
-]
-
-$V = TkVariable.new_hash(:THEME => 'default',
- :COMPOUND => 'top',
- :CONSOLE => false,
- :MENURADIO1 => 'One',
- :MENUCHECK1 => true,
- :PBMODE => 'determinate',
- :SELECTED => true,
- :CHOICE => 2)
-
-# Add in any available loadable themes.
-TkPackage.names.find_all{|n| n =~ /^(tile|ttk)::theme::/}.each{|pkg|
- name = pkg.split('::')[-1]
- unless $THEMELIST.assoc(name)
- $THEMELIST << [name, Tk.tk_call('string', 'totitle', name)]
- end
-}
-
-# Add theme definition written by ruby
-$RUBY_THEMELIST = []
-begin
- load(File.join(demodir, 'themes', 'kroc.rb'), true)
-rescue => e
-raise e
- $RUBY_THEMELIST << ['kroc-rb', 'Kroc (by Ruby)', false]
-else
- $RUBY_THEMELIST << ['kroc-rb', 'Kroc (by Ruby)', true]
-end
-
-def makeThemeControl(parent)
- c = Tk::Tile::Labelframe.new(parent, :text=>'Theme')
- $THEMELIST.each{|theme, name|
- b = Tk::Tile::Radiobutton.new(c, :text=>name, :value=>theme,
- :variable=>$V.ref(:THEME),
- :command=>proc{setTheme(theme)})
- b.grid(:sticky=>:ew)
- unless (TkPackage.names.find{|n| n =~ /(tile|ttk)::theme::#{theme}/})
- b.ttk_state(:disabled)
- end
- }
- $RUBY_THEMELIST.each{|theme, name, available|
- b = Tk::Tile::Radiobutton.new(c, :text=>name, :value=>theme,
- :variable=>$V.ref(:THEME),
- :command=>proc{setTheme(theme)})
- b.grid(:sticky=>:ew)
- b.ttk_state(:disabled) unless available
- }
- c
-end
-
-def makeThemeMenu(parent)
- m = TkMenu.new(parent)
- $THEMELIST.each{|theme, name|
- m.add(:radiobutton, :label=>name, :variable=>$V.ref(:THEME),
- :value=>theme, :command=>proc{setTheme(theme)})
- unless (TkPackage.names.find{|n| n =~ /(tile|ttk)::theme::#{theme}/})
- m.entryconfigure(:end, :state=>:disabled)
- end
- }
- $RUBY_THEMELIST.each{|theme, name, available|
- m.add(:radiobutton, :label=>name, :variable=>$V.ref(:THEME),
- :value=>theme, :command=>proc{setTheme(theme)})
- m.entryconfigure(:end, :state=>:disabled) unless available
- }
- m
-end
-
-def setTheme(theme)
- if (pkg = TkPackage.names.find{|n| n =~ /(tile|ttk)::theme::#{theme}/})
- unless Tk::Tile::Style.theme_names.find{|n| n == theme}
- TkPackage.require(pkg)
- end
- end
- Tk::Tile::Style.theme_use(theme)
-end
-
-#
-# Load icons...
-#
-$BUTTONS = ['open', 'new', 'save']
-$CHECKBOXES = ['bold', 'italic']
-$ICON = {}
-
-def loadIcons(file)
- Tk.load_tclscript(file)
- img_data = TkVarAccess.new('ImgData')
- img_data.keys.each{|icon|
- $ICON[icon] = TkPhotoImage.new(:data=>img_data[icon])
- }
-end
-
-loadIcons(File.join(demodir, 'iconlib.tcl'))
-
-#
-# Utilities:
-#
-def foreachWidget(wins, cmd)
- wins.each{|w|
- cmd.call(w)
- foreachWidget(w.winfo_children, cmd)
- }
-end
-
-# sbstub
-# Used as the :command option for a scrollbar,
-# updates the scrollbar's position.
-#
-def sbstub(sb, cmd, num, units = 'units')
- num = TkComm.number(num)
- case cmd.to_s
- when 'moveto'
- sb.set(num, num+0.5)
-
- when 'scroll'
- if units.to_s == 'pages'
- delta = 0.2
- else
- delta = 0.05
- end
- current = sb.get
- sb.set(current[0] + delta * num, current[1] + delta * num)
- end
-end
-
-# ... for debugging:
-TkBindTag::ALL.bind('ButtonPress-3', proc{|w| $W = w}, '%W')
-TkBindTag::ALL.bind('Control-ButtonPress-3', proc{|w| w.set_focus}, '%W')
-
-def showHelp()
- Tk.messageBox(:message=>'No help yet...')
-end
-
-#
-# See toolbutton.tcl.
-TkOption.add('*Toolbar.relief', :groove)
-TkOption.add('*Toolbar.borderWidth', 2)
-
-TkOption.add('*Toolbar.Button.Pad', 2)
-
-$ROOT = Tk.root
-$BASE = $ROOT
-Tk.destroy(*($ROOT.winfo_children))
-
-$TOOLBARS = []
-
-#
-# Toolbar button standard vs. tile comparison:
-#
-def makeToolbars
- #
- # Tile toolbar:
- #
- tb = Tk::Tile::Frame.new($BASE, :class=>'Toolbar')
- $TOOLBARS << tb
- i = 0
- $BUTTONS.each{|icon|
- i += 1
- Tk::Tile::Button.new(tb, :text=>icon, :image=>$ICON[icon],
- :compound=>$V[:COMPOUND],
- :style=>:Toolbutton).grid(:row=>0, :column=>i,
- :sticky=>:news)
- }
- $CHECKBOXES.each{|icon|
- i += 1
- Tk::Tile::Checkbutton.new(tb, :text=>icon, :image=>$ICON[icon],
- :variable=>$V.ref(icon),
- :compound=>$V[:COMPOUND],
- :style=>:Toolbutton).grid(:row=>0, :column=>i,
- :sticky=>:news)
- }
-
- mb = Tk::Tile::Menubutton.new(tb, :text=>'toolbar', :image=>$ICON['file'],
- :compound=>$V[:COMPOUND])
- mb.configure(:menu=>makeCompoundMenu(mb))
- i += 1
- mb.grid(:row=>0, :column=>i, :sticky=>:news)
-
- i += 1
- tb.grid_columnconfigure(i, :weight=>1)
-
- #
- # Standard toolbar:
- #
- tb = TkFrame.new($BASE, :class=>'Toolbar')
- $TOOLBARS << tb
- i = 0
- $BUTTONS.each{|icon|
- i += 1
- TkButton.new(tb, :text=>icon, :image=>$ICON[icon],
- :compound=>$V[:COMPOUND], :relief=>:flat,
- :overrelief=>:raised).grid(:row=>0, :column=>i,
- :sticky=>:news)
- }
- $CHECKBOXES.each{|icon|
- i += 1
- TkCheckbutton.new(tb, :text=>icon, :image=>$ICON[icon],
- :variable=>$V.ref(icon), :compound=>$V[:COMPOUND],
- :indicatoron=>false, :selectcolor=>'', :relief=>:flat,
- :overrelief=>:raised).grid(:row=>0, :column=>i,
- :sticky=>:news)
- }
-
- mb = TkMenubutton.new(tb, :text=>'toolbar', :image=>$ICON['file'],
- :compound=>$V[:COMPOUND])
- mb.configure(:menu=>makeCompoundMenu(mb))
- i += 1
- mb.grid(:row=>0, :column=>i, :sticky=>:news)
-
- i += 1
- tb.grid_columnconfigure(i, :weight=>1)
-end
-
-#
-# Toolbar :compound control:
-#
-def makeCompoundMenu(mb)
- menu = TkMenu.new(mb)
- %w(text image none top bottom left right center).each{|str|
- menu.add(:radiobutton, :label=>Tk.tk_call('string', 'totitle', str),
- :variable=>$V.ref(:COMPOUND), :value=>str,
- :command=>proc{ changeToolbars() })
- }
- menu
-end
-
-makeToolbars()
-
-## CONTROLS
-control = Tk::Tile::Frame.new($BASE)
-
-#
-# Overall theme control:
-#
-makeThemeControl(control).grid(:sticky=>:news, :padx=>6, :ipadx=>6)
-control.grid_rowconfigure(99, :weight=>1)
-
-def changeToolbars
- foreachWidget($TOOLBARS,
- proc{|w|
- begin
- w.compound($V[:COMPOUND])
- rescue
- end
- })
-end
-
-def scrolledWidget(parent, klass, themed, *args)
- if themed
- f = Tk::Tile::Frame.new(parent)
- t = klass.new(f, *args)
- vs = Tk::Tile::Scrollbar.new(f)
- hs = Tk::Tile::Scrollbar.new(f)
- else
- f = TkFrame.new(parent)
- t = klass.new(f, *args)
- vs = TkScrollbar.new(f)
- hs = TkScrollbar.new(f)
- end
- t.yscrollbar(vs)
- t.xscrollbar(hs)
-
- TkGrid.configure(t, vs, :sticky=>:news)
- TkGrid.configure(hs, 'x', :sticky=>:news)
- TkGrid.rowconfigure(f, 0, :weight=>1)
- TkGrid.columnconfigure(f, 0, :weight=>1)
-
- [f, t]
-end
-
-#
-# Notebook demonstration:
-#
-def makeNotebook
- nb = Tk::Tile::Notebook.new($BASE, :padding=>6)
- nb.enable_traversal
- client = Tk::Tile::Frame.new(nb)
- nb.add(client, :text=>'Demo', :underline=>0)
- nb.select(client)
-
- scales = Tk::Tile::Frame.new(nb)
- nb.add(scales, :text=>'Scales')
- combo = Tk::Tile::Frame.new(nb)
- nb.add(combo, :text=>'Combobox', :underline=>7)
- tree = Tk::Tile::Frame.new(nb)
- nb.add(tree, :text=>'Tree')
- others = Tk::Tile::Frame.new(nb)
- nb.add(others, :text=>'Others', :underline=>4)
-
- [nb, client, scales, combo, tree, others]
-end
-
-nb, client, scales, combo, tree, others = makeNotebook()
-
-#
-# Side-by side check, radio, and menu button comparison:
-#
-def fillMenu(menu)
- %w(above below left right flush).each{|dir|
- menu.add(:command, :label=>Tk.tk_call('string', 'totitle', dir),
- :command=>proc{ menu.winfo_parent.direction(dir) })
- }
- menu.add(:cascade, :label=>'Submenu', :menu=>(submenu = TkMenu.new(menu)))
- submenu.add(:command, :label=>'Subcommand 1')
- submenu.add(:command, :label=>'Subcommand 2')
- submenu.add(:command, :label=>'Subcommand 3')
-
- menu.add(:separator)
- menu.add(:command, :label=>'Quit', :command=>proc{Tk.root.destroy})
-end
-
-l = Tk::Tile::Labelframe.new(client, :text=>'Themed', :padding=>6)
-r = TkLabelframe.new(client, :text=>'Standard', :padx=>6, :pady=>6)
-
-## Styled frame
-cb = Tk::Tile::Checkbutton.new(l, :text=>'Checkbutton',
- :variable=>$V.ref(:SELECTED), :underline=>2)
-rb1 = Tk::Tile::Radiobutton.new(l, :text=>'One', :variable=>$V.ref(:CHOICE),
- :value=>1, :underline=>0)
-rb2 = Tk::Tile::Radiobutton.new(l, :text=>'Two', :variable=>$V.ref(:CHOICE),
- :value=>2)
-rb3 = Tk::Tile::Radiobutton.new(l, :text=>'Three',
- :variable=>$V.ref(:CHOICE),
- :value=>3, :underline=>0)
-btn = Tk::Tile::Button.new(l, :text=>'Button', :underline=>0)
-
-mb = Tk::Tile::Menubutton.new(l, :text=>'Menubutton', :underline=>2)
-m = TkMenu.new(mb)
-mb.menu(m)
-fillMenu(m)
-
-$entryText = TkVariable.new('Entry widget')
-e = Tk::Tile::Entry.new(l, :textvariable=>$entryText)
-e.selection_range(6, :end)
-
-ltext_f, ltext = scrolledWidget(l, TkText, true,
- :width=>12, :height=>5, :wrap=>:none)
-# NOTE TO MAINTAINERS:
-# The checkbuttons are -sticky ew / -expand x on purpose:
-# it demonstrates one of the differences between TCheckbuttons
-# and standard checkbuttons.
-#
-Tk.grid(cb, :sticky=>:ew)
-Tk.grid(rb1, :sticky=>:ew)
-Tk.grid(rb2, :sticky=>:ew)
-Tk.grid(rb3, :sticky=>:ew)
-Tk.grid(btn, :sticky=>:ew, :padx=>2, :pady=>2)
-Tk.grid(mb, :sticky=>:ew, :padx=>2, :pady=>2)
-Tk.grid(e, :sticky=>:ew, :padx=>2, :pady=>2)
-Tk.grid(ltext_f, :sticky=>:news)
-
-TkGrid.columnconfigure(l, 0, :weight=>1)
-TkGrid.rowconfigure(l, 7, :weight=>1) # text widget (grid is a PITA)
-
-## Orig frame
-cb = TkCheckbutton.new(r, :text=>'Checkbutton', :variable=>$V.ref(:SELECTED))
-rb1 = TkRadiobutton.new(r, :text=>'One',
- :variable=>$V.ref(:CHOICE), :value=>1)
-rb2 = TkRadiobutton.new(r, :text=>'Two', :variable=>$V.ref(:CHOICE),
- :value=>2, :underline=>1)
-rb3 = TkRadiobutton.new(r, :text=>'Three',
- :variable=>$V.ref(:CHOICE), :value=>3)
-btn = TkButton.new(r, :text=>'Button')
-
-mb = TkMenubutton.new(r, :text=>'Menubutton', :underline=>3, :takefocus=>true)
-m = TkMenu.new(mb)
-mb.menu(m)
-$V[:rmbIndicatoron] = mb.indicatoron
-m.add(:checkbutton, :label=>'Indicator?', #'
- :variable=>$V.ref(:rmbIndicatoron),
- :command=>proc{mb.indicatoron($V[:rmbIndicatoron])})
-m.add(:separator)
-fillMenu(m)
-
-e = TkEntry.new(r, :textvariable=>$entryText)
-
-rtext_f, rtext = scrolledWidget(r, TkText, false,
- :width=>12, :height=>5, :wrap=>:none)
-
-Tk.grid(cb, :sticky=>:ew)
-Tk.grid(rb1, :sticky=>:ew)
-Tk.grid(rb2, :sticky=>:ew)
-Tk.grid(rb3, :sticky=>:ew)
-Tk.grid(btn, :sticky=>:ew, :padx=>2, :pady=>2)
-Tk.grid(mb, :sticky=>:ew, :padx=>2, :pady=>2)
-Tk.grid(e, :sticky=>:ew, :padx=>2, :pady=>2)
-Tk.grid(rtext_f, :sticky=>:news)
-
-TkGrid.columnconfigure(l, 0, :weight=>1)
-TkGrid.rowconfigure(l, 7, :weight=>1) # text widget (grid is a PITA)
-
-Tk.grid(l, r, :sticky=>:news, :padx=>6, :pady=>6)
-TkGrid.rowconfigure(client, 0, :weight=>1)
-TkGrid.columnconfigure(client, [0, 1], :weight=>1)
-
-#
-# Add some text to the text boxes:
-#
-msgs = [
-"The cat crept into the crypt, crapped and crept out again",
-"Peter Piper picked a peck of pickled peppers",
-"How much wood would a woodchuck chuck if a woodchuck could chuck wood",
-"He thrusts his fists against the posts and still insists he sees the ghosts",
-"Who put the bomb in the bom-b-bom-b-bom,",
-"Is this your sister's sixth zither, sir?",
-"Who put the ram in the ramalamadingdong?",
-"I am not the pheasant plucker, I'm the pheasant plucker's mate."
-]
-
-nmsgs = msgs.size
-(0...50).each{|n|
- msg = msgs[n % nmsgs]
- ltext.insert(:end, "#{n}: #{msg}\n")
- rtext.insert(:end, "#{n}: #{msg}\n")
-}
-#
-# Scales and sliders pane:
-#
-l = Tk::Tile::Labelframe.new(scales, :text=>'Themed', :padding=>6)
-r = TkLabelframe.new(scales, :text=>'Standard', :padx=>6, :pady=>6)
-
-if version?('0.6')
-
- # thremed frame
- scale = Tk::Tile::Scale.new(l, :orient=>:horizontal, :from=>0, :to=>100,
- :variable=>$V.ref(:SCALE))
- vscale = Tk::Tile::Scale.new(l, :orient=>:vertical, :from=>0, :to=>100,
- :variable=>$V.ref(:VSCALE))
- progress = Tk::Tile::Progressbar.new(l, :orient=>:horizontal, :maximum=>100)
- vprogress = Tk::Tile::Progressbar.new(l, :orient=>:vertical, :maximum=>100)
-
- if true
- def progress.inverted(w, value)
- if w.mode == 'indeterminate'
- w.value(value)
- else
- w.value(w.maximum - value)
- end
- end
- scale.command {|value| progress.value(value)}
- vscale.command {|value| progress.inverted(vprogress, value) }
- else
- # This would also work, but the Tk scale widgets
- # in the right hand pane cause some interference when
- # in autoincrement/indeterminate mode.
- #
- progress.variable $V.ref(:SCALE)
- vprogress.variable $V.ref(:VSCALE)
- end
-
- scale.set(50)
- vscale.set(50)
-
- lmode = Tk::Tile::Label.new(l, :text=>'Progress bar mode')
- pbmode0 = Tk::Tile::Radiobutton.new(l, :variable=>$V.ref(:PBMODE),
- :text=>'determinate', :value=>'determinate',
- :command=>proc{pbMode(progress, vprogress)})
- pbmode1 = Tk::Tile::Radiobutton.new(l, :variable=>$V.ref(:PBMODE),
- :text=>'indeterminate', :value=>'indeterminate',
- :command=>proc{pbMode(progress, vprogress)})
- def pbMode(progress, vprogress)
- if vprogress.mode != $V[:PBMODE]
- vprogress.value(vprogress.maximum - vprogress.value)
- end
-
- progress.mode $V[:PBMODE]
- vprogress.mode $V[:PBMODE]
- end
-
- start = Tk::Tile::Button.new(l, :text=>"Start",
- :command=>proc{pbStart(progress, vprogress)})
- def pbStart(progress, vprogress)
- # $V[:PBMODE] = 'indeterminate'
- pbMode(progress, vprogress)
- progress.start 10
- vprogress.start
- end
-
- stop = Tk::Tile::Button.new(l, :text=>'Stop',
- :command=>proc{pbStop(progress, vprogress)})
- def pbStop(progress, vprogress)
- progress.stop
- vprogress.stop
- end
-
- Tk.grid(scale, :columnspan=>2, :sticky=>'ew')
- Tk.grid(progress, :columnspan=>2, :sticky=>'ew')
- Tk.grid(vscale, vprogress, :sticky=>'nws')
-
- Tk.grid(lmode, :sticky=>'we', :columnspan=>2)
- Tk.grid(pbmode0, :sticky=>'we', :columnspan=>2)
- Tk.grid(pbmode1, :sticky=>'we', :columnspan=>2)
- Tk.grid(start, :sticky=>'we', :columnspan=>2)
- Tk.grid(stop, :sticky=>'we', :columnspan=>2)
-
- l.grid_columnconfigure(0, :weight=>1)
- l.grid_columnconfigure(1, :weight=>1)
- l.grid_rowconfigure(99, :weight=>1)
-
- # standard frame
- TkScale.new(r, :orient=>:horizontal, :from=>0, :to=>100,
- :variable=>$V.ref(:SCALE)).grid(:sticky=>'news')
- TkScale.new(r, :orient=>:vertical, :from=>0, :to=>100,
- :variable=>$V.ref(:VSCALE)).grid(:sticky=>'nws')
-
- r.grid_columnconfigure(0, :weight=>1)
- r.grid_columnconfigure(1, :weight=>1)
- r.grid_rowconfigure(99, :weight=>1)
-
-else # tile 0.5 or earlier
-
- # themed frame
- scale = Tk::Tile::Scale.new(l, :variable=>$V.ref(:SCALE),
- :orient=>:horizontal, :from=>0, :to=>100)
- vscale = Tk::Tile::Scale.new(l, :variable=>$V.ref(:VSCALE),
- :orient=>:vertical, :from=>-25, :to=>25)
-
- progress = Tk::Tile::Progress.new(l,
- :orient=>:horizontal, :from=>0, :to=>100)
- vprogress = Tk::Tile::Progress.new(l,
- :orient=>:vertical, :from=>-25, :to=>25)
-
- if true
- scale.command{|value| progress.set(value)}
- vscale.command{|value| vprogress.set(value)}
- else # this would also work. (via TkVariable#trace)
- v1 = scale.variable
- v2 = vscale.variable
- v1.trace('w', proc{ progress.set(v1.value) })
- v2.trace('w', proc{ vprogress.set(v2.value) })
- end
-
- Tk.grid(scale, :columnspan=>2, :sticky=>:ew)
- Tk.grid(progress, :columnspan=>2, :sticky=>:ew)
- Tk.grid(vscale, vprogress, :sticky=>:nws)
- TkGrid.columnconfigure(l, 0, :weight=>1)
- TkGrid.columnconfigure(l, 1, :weight=>1)
-
- # standard frame
- TkScale.new(r, :variable=>$V.ref(:SCALE),
- :orient=>:horizontal, :from=>0, :to=>100).grid(:sticky=>'news')
- TkScale.new(r, :variable=>$V.ref(:VSCALE),
- :orient=>:vertical, :from=>-25, :to=>25).grid(:sticky=>'nws')
-
- TkGrid.columnconfigure(r, 0, :weight=>1)
- TkGrid.columnconfigure(r, 1, :weight=>1)
-end
-
-# layout frames
-Tk.grid(l, r, :sticky=>'nwes', :padx=>6, :pady=>6)
-scales.grid_columnconfigure(0, :weight=>1)
-scales.grid_columnconfigure(1, :weight=>1)
-scales.grid_rowconfigure(0, :weight=>1)
-
-#
-# Command box:
-#
-cmd = Tk::Tile::Frame.new($BASE)
-b_close = Tk::Tile::Button.new(cmd, :text=>'Close',
- :underline=>0, :default=>:normal,
- :command=>proc{Tk.root.destroy})
-b_help = Tk::Tile::Button.new(cmd, :text=>'Help', :underline=>0,
- :default=>:normal, :command=>proc{showHelp()})
-Tk.grid('x', b_close, b_help, :pady=>[6, 4], :padx=>4)
-TkGrid.columnconfigure(cmd, 0, :weight=>1)
-
-#
-# Set up accelerators:
-#
-$ROOT.bind('KeyPress-Escape', proc{Tk.event_generate(b_close, '<Invoke>')})
-$ROOT.bind('<Help>', proc{Tk.event_generate(b_help, '<Invoke>')})
-Tk::Tile::KeyNav.enableMnemonics($ROOT)
-Tk::Tile::KeyNav.defaultButton(b_help)
-
-Tk.grid($TOOLBARS[0], '-', :sticky=>:ew)
-Tk.grid($TOOLBARS[1], '-', :sticky=>:ew)
-Tk.grid(control, nb, :sticky=>:news)
-Tk.grid(cmd, '-', :sticky=>:ew)
-TkGrid.columnconfigure($ROOT, 1, :weight=>1)
-TkGrid.rowconfigure($ROOT, 2, :weight=>1)
-
-#
-# Add a menu
-#
-menu = TkMenu.new($BASE)
-$ROOT.menu(menu)
-m_file = TkMenu.new(menu, :tearoff=>0)
-menu.add(:cascade, :label=>'File', :underline=>0, :menu=>m_file)
-m_file.add(:command, :label=>'Open', :underline=>0,
- :compound=>:left, :image=>$ICON['open'])
-m_file.add(:command, :label=>'Save', :underline=>0,
- :compound=>:left, :image=>$ICON['save'])
-m_file.add(:separator)
-m_f_test = TkMenu.new(menu, :tearoff=>0)
-m_file.add(:cascade, :label=>'Test submenu', :underline=>0, :menu=>m_f_test)
-m_file.add(:checkbutton, :label=>'Text check', :underline=>5,
- :variable=>$V.ref(:MENUCHECK1))
-m_file.insert(:end, :separator)
-
-if Tk.windowingsystem != 'x11'
- TkConsole.create
- m_file.insert(:end, :checkbutton, :label=>'Console', :underline=>5,
- :variable=>$V.ref(:CONSOLE), :command=>proc{toggle_console()})
- def toggle_console
- if TkComm.bool($V[:CONSOLE])
- TkConsole.show
- else
- TkConsole.hide
- end
- end
-end
-
-m_file.add(:command, :label=>'Exit', :underline=>1,
- :command=>proc{Tk.event_generate(b_close, '<Invoke>')})
-
-%w(One Two Three Four).each{|lbl|
- m_f_test.add(:radiobutton, :label=>lbl, :variable=>$V.ref(:MENURADIO1))
-}
-
-# Add Theme menu.
-#
-menu.add(:cascade, :label=>'Theme', :underline=>3,
- :menu=>makeThemeMenu(menu))
-
-setTheme($V[:THEME])
-
-#
-# Combobox demo pane:
-#
-values = %w(list abc def ghi jkl mno pqr stu vwx yz)
-2.times {|i|
- cb = Tk::Tile::Combobox.new(
- combo, :values=>values, :textvariable=>$V.ref(:COMBO))
- cb.pack(:side=>:top, :padx=>2, :pady=>2, :expand=>false, :fill=>:x)
- if i == 1
- cb.ttk_state :readonly
- begin
- cb.current = 3 # ignore if unsupported (tile0.4)
- rescue
- end
- end
-}
-
-#
-# Treeview widget demo pane:
-#
-if version?('0.5')
-
- treeview = nil # avoid 'undefined' error
- scrollbar = Tk::Tile::Scrollbar.new(tree,
- :command=>proc{|*args| treeview.yview(*args)})
- treeview = Tk::Tile::Treeview.new(tree, :columns=>%w(Class), :padding=>4,
- :yscrollcommand=>proc{|*args| scrollbar.set(*args)})
-
- Tk.grid(treeview, scrollbar, :sticky=>'news')
- tree.grid_columnconfigure(0, :weight=>1)
- tree.grid_rowconfigure(0, :weight=>1)
- tree.grid_propagate(0)
-
- # Add initial tree node:
- # Later nodes will be added in <<TreeviewOpen>> binding.
- treeview.insert('', 0, :id=>'.', :text=>'Main Window', :open=>false,
- :values=>[TkWinfo.classname('.')])
- treeview.headingconfigure('#0', :text=>'Widget')
- treeview.headingconfigure('Class', :text=>'Class')
- treeview.bind('<TreeviewOpen>', proc{fillTree(treeview)})
-
- def fillTree(treeview)
- id = treeview.focus_item
- unless TkWinfo.exist?(id)
- treeview.delete(id)
- end
- # Replace tree item children with current list of child windows.
- treeview.delete(treeview.children(id))
- for child in TkWinfo.children(id)
- treeview.insert(id, :end, :id=>child, :text=>TkWinfo.appname(child),
- :open=>false, :values=>[TkWinfo.classname(child)])
- unless TkWinfo.children(child).empty?
- # insert dummy child to show [+] indicator
- treeview.insert(child, :end)
- end
- end
- end
-
-else
- Tk::Tile::Label.new(tree,
- :text=>'Treeview is supported on tile 0.5 or later...').pack
-end
-
-#
-# Other demos:
-#
-$Timers = {:StateMonitor=>nil, :FocusMonitor=>nil}
-
-begin
- msg = Tk::Tile::Label.new(others, :justify=>:left, :wraplength=>300)
-rescue
- msg = TkMessage.new(others, :aspect=>200)
-end
-
-$Desc = {}
-
-showDescription = TkBindTag.new
-showDescription.bind('Enter', proc{|w| msg.text($Desc[w.path])}, '%W')
-showDescription.bind('Leave', proc{|w| msg.text('')}, '%W')
-
-[
- [ :trackStates, "Widget states...",
- "Display/modify widget state bits" ],
-
- [ :scrollbarResizeDemo, "Scrollbar resize behavior...",
- "Shows how Tile and standard scrollbars differ when they're sized too large" ],
-
- [ :trackFocus, "Track keyboard focus..." ,
- "Display the name of the widget that currently has focus" ],
-
- [ :repeatDemo, "Repeating buttons...",
- "Demonstrates custom classes (see demos/repeater.tcl)" ]
-
-].each{|demo_cmd, label, description|
- b = Tk::Tile::Button.new(others, :text=>label,
- :command=>proc{ self.__send__(demo_cmd) })
- $Desc[b.path] = description
- b.bindtags <<= showDescription
-
- b.pack(:side=>:top, :expand=>false, :fill=>:x, :padx=>6, :pady=>6)
-}
-
-msg.pack(:side=>:bottom, :expand=>true, :fill=>:both)
-
-
-#
-# Scrollbar resize demo:
-#
-$scrollbars = nil
-
-def scrollbarResizeDemo
- if $scrollbars
- begin
- $scrollbars.destroy
- rescue
- end
- end
- $scrollbars = TkToplevel.new(:title=>'Scrollbars', :geometry=>'200x200')
- f = TkFrame.new($scrollbars, :height=>200)
- tsb = Tk::Tile::Scrollbar.new(f, :command=>proc{|*args| sbstub(tsb, *args)})
- sb = TkScrollbar.new(f, :command=>proc{|*args| sbstub(sb, *args)})
- Tk.grid(tsb, sb, :sticky=>:news)
-
- sb.set(0, 0.5) # prevent backwards-compatibility mode for old SB
-
- f.grid_columnconfigure(0, :weight=>1)
- f.grid_columnconfigure(1, :weight=>1)
- f.grid_rowconfigure(0, :weight=>1)
-
- f.pack(:expand=>true, :fill=>:both)
-end
-
-#
-# Track focus demo:
-#
-$FocusInf = TkVariable.new_hash
-$focus = nil
-
-def trackFocus
- if $focus
- begin
- $focus.destroy
- rescue
- end
- end
- $focus = TkToplevel.new(:title=>'Keyboard focus')
- i = 0
- [
- ["Focus widget:", :Widget],
- ["Class:", :WidgetClass],
- ["Next:", :WidgetNext],
- ["Grab:", :Grab],
- ["Status:", :GrabStatus]
- ].each{|label, var_index|
- Tk.grid(Tk::Tile::Label.new($focus, :text=>label, :anchor=>:e),
- Tk::Tile::Label.new($focus,
- :textvariable=>$FocusInf.ref(var_index),
- :width=>40, :anchor=>:w, :relief=>:groove),
- :sticky=>:ew)
- i += 1
- }
- $focus.grid_columnconfigure(1, :weight=>1)
- $focus.grid_rowconfigure(i, :weight=>1)
-
- $focus.bind('Destroy', proc{Tk.after_cancel($Timers[:FocusMonitor])})
- focusMonitor
-end
-
-def focusMonitor
- $FocusInf[:Widget] = focus_win = Tk.focus
- if focus_win
- $FocusInf[:WidgetClass] = focus_win.winfo_classname
- $FocusInf[:WidgetNext] = Tk.focus_next(focus_win)
- else
- $FocusInf[:WidgetClass] = $FocusInf[:WidgetNext] = ''
- end
-
- $FocusInf[:Grab] = grab_wins = Tk.current_grabs
- unless grab_wins.empty?
- $FocusInf[:GrabStatus] = grab_wins[0].grab_status
- else
- $FocusInf[:GrabStatus] = ''
- end
-
- $Timers[:FocusMonitor] = Tk.after(200, proc{ focusMonitor() })
-end
-
-#
-# Widget state demo:
-#
-$Widget = TkVariable.new
-
-TkBindTag::ALL.bind('Control-Shift-ButtonPress-1',
- proc{|w|
- $Widget.value = w
- updateStates()
- Tk.callback_break
- }, '%W')
-$states_list = %w(active disabled focus pressed selected
- background indeterminate invalid default)
-$states_btns = {}
-$states = nil
-
-$State = TkVariable.new_hash
-
-def trackStates
- if $states
- begin
- $state.destroy
- rescue
- end
- end
- $states = TkToplevel.new(:title=>'Widget states')
-
- l_inf = Tk::Tile::Label.new($states, :text=>"Press Control-Shift-Button-1 on any widget")
-
- l_lw = Tk::Tile::Label.new($states, :text=>'Widget:',
- :anchor=>:e, :relief=>:groove)
- l_w = Tk::Tile::Label.new($states, :textvariable=>$Widget,
- :anchor=>:w, :relief=>:groove)
-
- Tk.grid(l_inf, '-', :sticky=>:ew, :padx=>6, :pady=>6)
- Tk.grid(l_lw, l_w, :sticky=>:ew)
-
- $states_list.each{|st|
- cb = Tk::Tile::Checkbutton.new($states, :text=>st,
- :variable=>$State.ref(st),
- :command=>proc{ changeState(st) })
- $states_btns[st] = cb
- Tk.grid('x', cb, :sticky=>:nsew)
- }
-
- $states.grid_columnconfigure(1, :weight=>1)
-
- f_cmd = Tk::Tile::Frame.new($states)
- Tk.grid('x', f_cmd, :sticky=>:nse)
-
- b_close = Tk::Tile::Button.new(f_cmd, :text=>'Close',
- :command=>proc{ $states.destroy })
- Tk.grid('x', b_close, :padx=>4, :pady=>[6,4])
- f_cmd.grid_columnconfigure(0, :weight=>1)
-
- $states.bind('KeyPress-Escape', proc{Tk.event_generate(b_close, '<Invoke>')})
-
- $states.bind('Destroy', proc{Tk.after_cancel($Timers[:StateMonitor])})
- stateMonitor()
-end
-
-def stateMonitor
- updateStates() if $Widget.value != ''
- $Timers[:StateMonitor] = Tk.after(200, proc{ stateMonitor() })
-end
-
-def updateStates
- $states_list.each{|st|
- begin
- $State[st] = $Widget.window.ttk_instate(st)
- rescue
- $states_btns[st].ttk_state('disabled')
- else
- $states_btns[st].ttk_state('!disabled')
- end
- }
-end
-
-def changeState(st)
- if $Widget.value != ''
- if $State.bool_element(st)
- $Widget.window.ttk_state(st)
- else
- $Widget.window.ttk_state("!#{st}")
- end
- end
-end
-
-#
-# Repeating buttons demo:
-#
-def repeatDemo
- if defined?($repeatDemo) && $repeatDemo.exist?
- $repeatDemo.deiconify; return
- end
- $repeatDemo = TkToplevel.new(:title=>'Repeating button')
-
- f = Tk::Tile::Frame.new($repeatDemo)
- b = Tk::Tile::Button.new(f, :class=>'Repeater', :text=>'Press and hold')
- if version?('0.6')
- p = Tk::Tile::Progressbar.new(f, :orient=>:horizontal, :maximum=>10)
- else # progressbar is not supported
- p = Tk::Tile::Progress.new(f, :orient=>:horizontal, :from=>0, :to=>10)
- def p.step
- i = self.get + 1
- i = self.from if i > self.to
- self.set(i)
- end
- end
- b.command {p.step}
-
- b.pack(:side=>:left, :expand=>false, :fill=>:none, :padx=>6, :pady=>6)
- p.pack(:side=>:right, :expand=>true, :fill=>:x, :padx=>6, :pady=>6)
- f.pack(:expand=>true, :fill=>:both)
-end
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tile/iconlib.tcl b/ext/tk/sample/tkextlib/tile/iconlib.tcl
deleted file mode 100644
index 9a93ece504..0000000000
--- a/ext/tk/sample/tkextlib/tile/iconlib.tcl
+++ /dev/null
@@ -1,110 +0,0 @@
-array set ImgData {
-bold {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAI6hI+py60U3wj+
-RYQFJYRvEWFBCeFbRFhQQvhG8YPgX0RYUEL4FhEWlBC+RYQFJYQPFN8IPqYut/8hBQA7}
-copy {R0lGODlhEAAQAJEAANnZ2QAAAP///wAAhCH5BAEAAAAALAAAAAAQABAAAAJUhI8JFJ/gY4iI
-UEL4FyIiFIXgW0iEUDgfACBI9pzMAAGRiIghWSMDECR7JEKGtkFIRFBG+TIQKDQxtgzcDcmX
-IfgwQrFlCD4MyZch+EDzj+Bj6mYBADs=}
-cut {R0lGODlhEAAQAJEAANnZ2QAAAAAAhP///yH5BAEAAAAALAAAAAAQABAAAAJFhI+pcUHwEeIi
-E0gACIKPEAFBIXy0gMg8EhM+YmQiKSL4eAIiJMI/EQEhQGYGYiQIQAg+iAkIATIzECMBIgT/
-RBARERlSADs=}
-dragfile {R0lGODlhGAAYAKIAANnZ2TMzM////wAAAJmZmf///////////yH5BAEAAAAALAAAAAAYABgA
-AAPACBi63IqgC4GiyxwogaAbKLrMgSKBoBoousyBogEACIGiyxwoKgGAECI4uiyCExMTOACB
-osuNpDoAGCI4uiyCIkREOACBosutSDoAgSI4usyCIjQAGCi63Iw0ACEoOLrMgiI0ABgoutyM
-NAAhKDi6zIIiNAAYKLrcjDQAISg4usyCIjQAGCi63Iw0AIGiiqPLIyhCA4CBosvNSAMQKKo4
-ujyCIjQAGCi63Iw0AIGiy81IAxCBpMu9GAMAgKPL3QgJADs=}
-dragicon {R0lGODlhGAAYALMAANnZ2TMzM/////8zM8zMzGYAAAAAAJmZmQCZMwAzZgCZzGZmZv//////
-/////////yH5BAEAAAAALAAAAAAYABgAAAT/EMAgJ60SAjlBgEJOSoMIEMgZoJCT0iADBFIG
-KOSkNMwAAABhwiHnIEKIIIQQAQIZhBBwyDmKEMIEE0yABoAghIBDzlGEENDIaQAIQgg45BwF
-CinPOccAECYcUiKEEBFCiHPgMQAEIcQYYyABBUGIQCHlMQCEScZAAhKEEApCECGOARAEIQQp
-BRGIpAyCJCGOASBAISdEcqJAVBLiGABggELOAJGUKyiVhDgGABigkJMEhNAKSqkEhTgGgCCl
-FCQEGIJSSiUhjgEgQCEnJVBJmYQ4BoAAhZyTQCVnEuIYAAIUckoCk5xSiGMACFDISSs9BoBg
-rRXQMQAEKOSklR4DEUAI8MhJ6wwGAACgkZNWCkAEADs=}
-error {R0lGODlhIAAgAKIAANnZ2YQAAP8AAISEhP///////////////yH5BAEAAAAALAAAAAAgACAA
-AAP/CLoMGLqKoMvtGIqiqxEYCLrcioGiyxwIusyBgaLLLRiBoMsQKLrcjYGgu4Giy+2CAkFX
-A0WX2wXFIOgGii7trkCEohsDCACBoktEKLpKhISiGwAIECiqSKooukiqKKoxgACBooukKiIo
-SKooujGDECi6iqQqsopEV2MQAkV3kXQZRXdjEAJFl5F0FUWXY3ACRZcFSRdFlyVwJlB0WZB0
-UXRZAmcCRZeRdBVFl2NwAkV3kXQZRXdjcAJFV5FURVaR6GoMDgSKLpKqiKAgqaLoxgwOBIoq
-kiqKLpIqimrM4ECg6BIRiq4SIaHoxgyCBoou7a5AhKIbMzgAAIGiy+2CTWJmBhAAAkWX2wXF
-zCDoBooud2PMDIKuRqDocgtGzMwg6O4Eii5z4Kgi6DIMhqLoagQGjiqCLvPgYOgqji6CLrfi
-6DIj6HI7jq4i6DIkADs=}
-file {R0lGODlhCwANAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAALAA0AAAIyhI9G8Q0AguSH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DQqBmc
-wlBF0OV2jJqZwggEXW5vVDMVgaDL7Y5qKgJBl9sfVUUg6HL7AxSKoMvtr1AEgi5DAgA7}
-italic {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAIrhI+py+1A4hN8
-hIjINBITPlpEZBqJCR8tIjKNxISPFhGZQOITfExdbv9FCgA7}
-new {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAJFhI95FN8IvgXJ
-jyD4ECQ/JAh+kPyICIIdJP+CYAfJvyDYQfIvCHaQ/AuCHST/gmAHyb8g2EHyLwh2kPwLgk3x
-MQg+pu4WADs=}
-open {R0lGODlhEAAQAKIAANnZ2QAAAP//AP///4SEAP///////////yH5BAEAAAAALAAAAAAQABAA
-AANZCLrczigUQZc1EDQgEHSZAwMgIhB0NQIDQkYwdANBNUZwZGQEJxBUQwZlZGRQAkE1RnAE
-Q5dVcCSQdDcAYySQdDcAISSQdDcAASKQdDcAAQBDlwNBl9sfApQAOw==}
-openfold {R0lGODlhEAANAKIAANnZ2YSEhP///8bGxv//AAAAAP///////yH5BAEAAAAALAAAAAAQAA0A
-AANgCIqhiqDLgaIaCLoagkNDIxi6AIFCQ0M4KKpRgCFDQzg0NIQThaHLSxgVKLochRMVMkhD
-Q4M0VBFYEDKEQ0NDOFFRgCE0NEhDQ4MVBRAoNDSEQ0NRWAAYuqyFBQBYurwJADs=}
-overstrike {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAI3hI+py80Uh+Aj
-RFhQCP8iMILgWwRGEHyLwAiCbxEYQfCB4iPBhwiMIPgXYREEHyEiguBj6nI7FQA7}
-palette {R0lGODlhEAAQAKIAANnZ2QAAAP//AP////8A/4QAhP8AAAD//yH5BAEAAAAALAAAAAAQABAA
-AANtCLrcjqGBoMsRKCMTgaALMSgDAYMSCKoxgAFBITgSAIAQEhUIARCAEgAQOBAwghMQEwga
-MoIjIxAIEg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I9pFB8RIIRC
-+BYQFqQQvkWEBSmEbyFhQQrhW0hYkEL4FhIWpBC+hYQFSYxvIgFAoXy0AAiSGP8kAIIkxgcI
-CSBEQvEBQgIIkVB8gJAAAhgfj+BjWgEAOw==}
-underline {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAI3hI+py60UBy4I
-vkVcBMG/iIsg+BdxEQT/Ii6C4F/ERRD8i7gIgn8RF0HwkWITfExFin8EH1OXCwA7}
-undo {R0lGODlhEAAQAJEAANnZ2QAAhP///////yH5BAEAAAAALAAAAAAQABAAAAIuhI+py+2vSByC
-HxdxQCHsCIg7oAAAEUHwLTAiKIQPgRSbYMfd3VEIH1OX2x8mUgA7}
-warning {R0lGODlhIAAgAKIAANnZ2YSEAP//AMbGxgAAAISEhP///////yH5BAEAAAAALAAAAAAgACAA
-AAP/CLq8gREIutz+KESGEHS5vVGIiAxSIehy+6JAUaUqBF1uBxQoukOFhaDL7RgoukKFhaDL
-3RgoujqEVQi63IyBortUWAi63IuBostDWIWgy60YIjKERCMiSFUIutyAISKCpCoiOFSFoMsd
-KCpIqiKCQlUIusyBooqkKiIoQ1UIuryBooqkiqJKVQi6rIGii6SKojpUWAi6DIGiG0RIgaJL
-VQi6HCi6MoREg6I7VFgIuhsoukqEhKKrVFgIuhoouhuEgaKrQ1iFoAuBortDOCi6S4WFoBso
-uiyEostDWIWgGii63K6IqgAAIVB0WQaJBkV3h7AKAAJFl4WQiFB0mQoLRyBQdFkJiQhFl4ew
-CgJFl3WQaFB0WQirIFB0ud0RVVWg6HJ7o6GqAgwUXW5fNFRVhQCBpMvti0oVABCwdLndEehi
-6XI7I4AEADs=}
-}
diff --git a/ext/tk/sample/tkextlib/tile/readme.txt b/ext/tk/sample/tkextlib/tile/readme.txt
deleted file mode 100644
index 6c4a5cf543..0000000000
--- a/ext/tk/sample/tkextlib/tile/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-All of *.tcl and under themes/ directory (except kroc.rb) are
-quoted from Tcl/Tk's Tile extension. Please read Orig_LICENSE.txt.
diff --git a/ext/tk/sample/tkextlib/tile/repeater.tcl b/ext/tk/sample/tkextlib/tile/repeater.tcl
deleted file mode 100644
index 43beb9430a..0000000000
--- a/ext/tk/sample/tkextlib/tile/repeater.tcl
+++ /dev/null
@@ -1,117 +0,0 @@
-#
-# $Id$
-#
-# Demonstration of custom classes.
-#
-# The Tile button doesn't have built-in support for autorepeat.
-# Instead of adding -repeatdelay and -repeatinterval options,
-# and all the extra binding scripts required to deal with them,
-# we create a custom widget class for autorepeating buttons.
-#
-# Usage:
-# ttk::button .b -class Repeater [... other options ...]
-#
-# TODO:
-# Use system settings for repeat interval and initial delay.
-#
-# Notes:
-# Repeater buttons work more like scrollbar arrows than
-# Tk repeating buttons: they fire once immediately when
-# first pressed, and $State(delay) specifies the initial
-# interval before the button starts autorepeating.
-#
-
-namespace eval tile::Repeater {
- variable State
- set State(timer) {} ;# [after] id of repeat script
- set State(interval) 100 ;# interval between repetitions
- set State(delay) 300 ;# delay after initial invocation
-}
-
-### Class bindings.
-#
-
-bind Repeater <Enter> { %W state active }
-bind Repeater <Leave> { %W state !active }
-
-bind Repeater <Key-space> { tile::Repeater::Activate %W }
-bind Repeater <<Invoke>> { tile::Repeater::Activate %W }
-
-bind Repeater <ButtonPress-1> { tile::Repeater::Press %W }
-bind Repeater <ButtonRelease-1> { tile::Repeater::Release %W }
-bind Repeater <B1-Leave> { tile::Repeater::Pause %W }
-bind Repeater <B1-Enter> { tile::Repeater::Resume %W } ;# @@@ see below
-
-# @@@ Workaround for metacity-induced bug:
-bind Repeater <B1-Enter> \
- { if {"%d" ne "NotifyUngrab"} { tile::Repeater::Resume %W } }
-
-### Binding procedures.
-#
-
-## Activate -- Keyboard activation binding.
-# Simulate clicking the button, and invoke the command once.
-#
-proc tile::Repeater::Activate {w} {
- $w instate disabled { return }
- set oldState [$w state pressed]
- update idletasks; after 100
- $w state $oldState
- after idle [list $w invoke]
-}
-
-## Press -- ButtonPress-1 binding.
-# Invoke the command once and start autorepeating after
-# $State(delay) milliseconds.
-#
-proc tile::Repeater::Press {w} {
- variable State
- $w instate disabled { return }
- $w state pressed
- $w invoke
- after cancel $State(timer)
- set State(timer) [after $State(delay) [list tile::Repeater::Repeat $w]]
-}
-
-## Release -- ButtonRelease binding.
-# Stop repeating.
-#
-proc tile::Repeater::Release {w} {
- variable State
- $w state !pressed
- after cancel $State(timer)
-}
-
-## Pause -- B1-Leave binding
-# Temporarily suspend autorepeat.
-#
-proc tile::Repeater::Pause {w} {
- variable State
- $w state !pressed
- after cancel $State(timer)
-}
-
-## Resume -- B1-Enter binding
-# Resume autorepeat.
-#
-proc tile::Repeater::Resume {w} {
- variable State
- $w instate disabled { return }
- $w state pressed
- $w invoke
- after cancel $State(timer)
- set State(timer) [after $State(interval) [list tile::Repeater::Repeat $w]]
-}
-
-## Repeat -- Timer script
-# Invoke the command and reschedule another repetition
-# after $State(interval) milliseconds.
-#
-proc tile::Repeater::Repeat {w} {
- variable State
- $w instate disabled { return }
- $w invoke
- set State(timer) [after $State(interval) [list tile::Repeater::Repeat $w]]
-}
-
-#*EOF*
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl b/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl
deleted file mode 100644
index 68733e8ad2..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl
+++ /dev/null
@@ -1,149 +0,0 @@
-# blue.tcl - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
-#
-# blue.tcl,v 1.27 2005/10/08 14:56:57 jenglish Exp
-#
-#
-
-namespace eval tile::theme::blue {
-
- package provide tile::theme::blue 0.7
-
- set imgdir [file join [file dirname [info script]] blue]
- array set I [tile::LoadImages $imgdir *.gif]
-
- array set colors {
- -frame "#6699cc"
- -lighter "#bcd2e8"
- -window "#e6f3ff"
- -selectbg "#ffff33"
- -selectfg "#000000"
- -disabledfg "#666666"
- }
-
- style theme create blue -settings {
-
- style default . \
- -borderwidth 1 \
- -background $colors(-frame) \
- -fieldbackground $colors(-window) \
- -troughcolor $colors(-lighter) \
- -selectbackground $colors(-selectbg) \
- -selectforeground $colors(-selectfg) \
- ;
- style map . -foreground [list disabled $colors(-disabledfg)]
-
- ## Buttons.
- #
- style default TButton -padding "10 0"
- style layout TButton {
- Button.button -children {
- Button.focus -children {
- Button.padding -children {
- Button.label
- }
- }
- }
- }
-
- style element create button image $I(button-n) \
- -map [list pressed $I(button-p) active $I(button-h)] \
- -border 4 -sticky ew
-
- style element create Checkbutton.indicator image $I(check-nu) \
- -width 24 -sticky w -map [list \
- {!disabled active selected} $I(check-hc) \
- {!disabled active} $I(check-hu) \
- {!disabled selected} $I(check-nc) ]
-
- style element create Radiobutton.indicator image $I(radio-nu) \
- -width 24 -sticky w -map [list \
- {!disabled active selected} $I(radio-hc) \
- {!disabled active} $I(radio-hu) \
- selected $I(radio-nc) ]
-
- style default TMenubutton -relief raised -padding {10 2}
-
- ## Toolbar buttons.
- #
- style default Toolbutton \
- -width 0 -relief flat -borderwidth 2 -padding 4 \
- -background $colors(-frame) -foreground #000000 ;
- style map Toolbutton -background [list active $colors(-selectbg)]
- style map Toolbutton -foreground [list active $colors(-selectfg)]
- style map Toolbutton -relief {
- disabled flat
- selected sunken
- pressed sunken
- active raised
- }
-
- ## Entry widgets.
- #
- style default TEntry \
- -selectborderwidth 1 -padding 2 -insertwidth 2 -font TkTextFont
- style default TCombobox \
- -selectborderwidth 1 -padding 2 -insertwidth 2 -font TkTextFont
-
- ## Notebooks.
- #
- style default TNotebook.Tab -padding {4 2 4 2}
- style map TNotebook.Tab \
- -background \
- [list selected $colors(-frame) active $colors(-lighter)] \
- -padding [list selected {4 4 4 2}]
-
- ## Labelframes.
- #
- style default TLabelframe -borderwidth 2 -relief groove
-
- ## Scrollbars.
- #
- style layout Vertical.TScrollbar {
- Scrollbar.trough -children {
- Scrollbar.uparrow -side top
- Scrollbar.downarrow -side bottom
- Scrollbar.uparrow -side bottom
- Vertical.Scrollbar.thumb -side top -expand true -sticky ns
- }
- }
-
- style layout Horizontal.TScrollbar {
- Scrollbar.trough -children {
- Scrollbar.leftarrow -side left
- Scrollbar.rightarrow -side right
- Scrollbar.leftarrow -side right
- Horizontal.Scrollbar.thumb -side left -expand true -sticky we
- }
- }
-
- style element create Horizontal.Scrollbar.thumb image $I(sb-thumb) \
- -map [list {pressed !disabled} $I(sb-thumb-p)] -border 3
-
- style element create Vertical.Scrollbar.thumb image $I(sb-vthumb) \
- -map [list {pressed !disabled} $I(sb-vthumb-p)] -border 3
-
- foreach dir {up down left right} {
- style element create ${dir}arrow image $I(arrow${dir}) \
- -map [list \
- disabled $I(arrow${dir}) \
- pressed $I(arrow${dir}-p) \
- active $I(arrow${dir}-h)] \
- -border 1 -sticky {}
- }
-
- ## Scales.
- #
- style element create Scale.slider \
- image $I(slider) -map [list {pressed !disabled} $I(slider-p)]
-
- style element create Vertical.Scale.slider \
- image $I(vslider) -map [list {pressed !disabled} $I(vslider-p)]
-
- style element create Horizontal.Progress.bar \
- image $I(sb-thumb) -border 2
- style element create Vertical.Progress.bar \
- image $I(sb-vthumb) -border 2
-
- }
-}
-
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif
deleted file mode 100644
index 3c1be9d880..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif
deleted file mode 100644
index 1cb36ec554..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown.gif
deleted file mode 100644
index e363c362ed..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif
deleted file mode 100644
index cbc3db2756..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif
deleted file mode 100644
index 14d541b03e..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft.gif
deleted file mode 100644
index 32584a34b2..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gif
deleted file mode 100644
index 913e9da94b..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gif
deleted file mode 100644
index d02208fcf7..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright.gif
deleted file mode 100644
index 2b0f1fd07b..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gif
deleted file mode 100644
index 6059bae094..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif
deleted file mode 100644
index 20b6a824f4..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup.gif
deleted file mode 100644
index 5857616228..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gif
deleted file mode 100644
index 0947f43b90..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.gif
deleted file mode 100644
index d9845283a5..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcf b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcf
deleted file mode 100644
index e38ed19e61..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcf
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gif
deleted file mode 100644
index e819b1b951..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gif
deleted file mode 100644
index b753aead97..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gif
deleted file mode 100644
index 74dbb799a2..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nc.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nc.gif
deleted file mode 100644
index 8f3d9114a3..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gif
deleted file mode 100644
index 6f360ffd62..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif
deleted file mode 100644
index f7c21fb0c3..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif
deleted file mode 100644
index a006630388..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nc.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nc.gif
deleted file mode 100644
index 0281de37d8..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nu.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nu.gif
deleted file mode 100644
index 58ec60c1db..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gif
deleted file mode 100644
index 6cfaa416d1..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif
deleted file mode 100644
index d9bfc0a7be..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif
deleted file mode 100644
index 930d7fd9ff..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif
deleted file mode 100644
index 060be5dd41..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider-p.gif
deleted file mode 100644
index c1c089de3e..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider.gif
deleted file mode 100644
index 1805c2dc7c..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif
deleted file mode 100644
index bc37b31c3d..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gif
deleted file mode 100644
index d3745c7f62..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl b/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl
deleted file mode 100644
index 4facac70d8..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl
+++ /dev/null
@@ -1,6 +0,0 @@
-# Package index for tile demo pixmap themes.
-
-if {[file isdirectory [file join $dir blue]]} {
- package ifneeded tile::theme::blue 0.7 \
- [list source [file join $dir blue.tcl]]
-}
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl
deleted file mode 100644
index 60c59be0ca..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl
+++ /dev/null
@@ -1,194 +0,0 @@
-# keramik.tcl -
-#
-# A sample pixmap theme for the tile package.
-#
-# Copyright (c) 2004 Googie
-# Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
-#
-# $Id$
-
-package require Tk 8.4; # minimum version for Tile
-package require tile 0.5; # depends upon tile 0.5
-
-namespace eval tile {
- namespace eval theme {
- namespace eval keramik {
- variable version 0.3.2
- }
- }
-}
-
-namespace eval tile::theme::keramik {
-
- variable imgdir [file join [file dirname [info script]] keramik]
- variable I
- array set I [tile::LoadImages $imgdir *.gif]
-
- variable colors
- array set colors {
- -frame "#cccccc"
- -lighter "#cccccc"
- -window "#ffffff"
- -selectbg "#eeeeee"
- -selectfg "#000000"
- -disabledfg "#aaaaaa"
- }
-
- style theme create keramik -parent alt -settings {
-
-
- # -----------------------------------------------------------------
- # Theme defaults
- #
- style default . \
- -borderwidth 1 \
- -background $colors(-frame) \
- -troughcolor $colors(-lighter) \
- -font TkDefaultFont \
- ;
-
- style map . -foreground [list disabled $colors(-disabledfg)]
-
- # -----------------------------------------------------------------
- # Button elements
- # - the button has a large rounded border and needs a bit of
- # horizontal padding.
- # - the checkbutton and radiobutton have the focus drawn around
- # the whole widget - hence the new layouts.
- #
- style layout TButton {
- Button.background
- Button.button -children {
- Button.focus -children {
- Button.label
- }
- }
- }
- style layout Toolbutton {
- Toolbutton.background
- Toolbutton.button -children {
- Toolbutton.focus -children {
- Toolbutton.label
- }
- }
- }
- style element create button image $I(button-n) \
- -border {8 6 8 16} -padding {6 6} -sticky news \
- -map [list {pressed !disabled} $I(button-p) \
- {active !selected} $I(button-h) \
- selected $I(button-s) \
- disabled $I(button-d)]
- style default TButton -padding {10 6}
-
- style element create Toolbutton.button image $I(tbar-n) \
- -border {2 8 2 16} -padding {2 2} -sticky news \
- -map [list {pressed !disabled} $I(tbar-p) \
- {active !selected} $I(tbar-a) \
- selected $I(tbar-p)]
-
- style element create Checkbutton.indicator image $I(check-u) \
- -width 20 -sticky w \
- -map [list selected $I(check-c)]
-
- style element create Radiobutton.indicator image $I(radio-u) \
- -width 20 -sticky w \
- -map [list selected $I(radio-c)]
-
- # The layout for the menubutton is modified to have a button element
- # drawn on top of the background. This means we can have transparent
- # pixels in the button element. Also, the pixmap has a special
- # region on the right for the arrow. So we draw the indicator as a
- # sibling element to the button, and draw it after (ie on top of) the
- # button image.
- style layout TMenubutton {
- Menubutton.background
- Menubutton.button -children {
- Menubutton.focus -children {
- Menubutton.padding -children {
- Menubutton.label -side left -expand true
- }
- }
- }
- Menubutton.indicator -side right
- }
- style element create Menubutton.button image $I(mbut-n) \
- -map [list {active !disabled} $I(mbut-a) \
- {pressed !disabled} $I(mbut-a) \
- {disabled} $I(mbut-d)] \
- -border {7 10 29 15} -padding {7 4 29 4} -sticky news
- style element create Menubutton.indicator image $I(mbut-arrow-n) \
- -width 11 -sticky w -padding {0 0 18 0}
-
- # -----------------------------------------------------------------
- # Scrollbars, scale and progress elements
- # - the scrollbar has three arrow buttons, two at the bottom and
- # one at the top.
- #
- style layout Vertical.TScrollbar {
- Scrollbar.background
- Scrollbar.trough -children {
- Scrollbar.uparrow -side top
- Scrollbar.downarrow -side bottom
- Scrollbar.uparrow -side bottom
- Vertical.Scrollbar.thumb -side top -expand true -sticky ns
- }
- }
-
- style layout Horizontal.TScrollbar {
- Scrollbar.background
- Scrollbar.trough -children {
- Scrollbar.leftarrow -side left
- Scrollbar.rightarrow -side right
- Scrollbar.leftarrow -side right
- Horizontal.Scrollbar.thumb -side left -expand true -sticky we
- }
- }
-
- style default TScrollbar -width 16
-
- style element create Horizontal.Scrollbar.thumb image $I(hsb-n) \
- -border {6 4} -width 15 -height 16 -sticky news \
- -map [list {pressed !disabled} $I(hsb-p)]
-
- style element create Vertical.Scrollbar.thumb image $I(vsb-n) \
- -border {4 6} -width 16 -height 15 -sticky news \
- -map [list {pressed !disabled} $I(vsb-p)]
-
- style element create Scale.slider image $I(hslider-n) \
- -border 3
-
- style element create Vertical.Scale.slider image $I(vslider-n) \
- -border 3
-
- style element create Horizontal.Progress.bar image $I(hsb-n) \
- -border {6 4}
-
- style element create Vertical.Progress.bar image $I(vsb-n) \
- -border {4 6}
-
- style element create uparrow image $I(arrowup-n) \
- -map [list {pressed !disabled} $I(arrowup-p)]
-
- style element create downarrow image $I(arrowdown-n) \
- -map [list {pressed !disabled} $I(arrowdown-p)]
-
- style element create rightarrow image $I(arrowright-n) \
- -map [list {pressed !disabled} $I(arrowright-p)]
-
- style element create leftarrow image $I(arrowleft-n) \
- -map [list {pressed !disabled} $I(arrowleft-p)]
-
- # -----------------------------------------------------------------
- # Notebook elements
- #
- style element create tab image $I(tab-n) \
- -map [list selected $I(tab-p) active $I(tab-p)] \
- -border {6 6 6 2} -height 12
-
- ## Labelframes.
- #
- style default TLabelframe -borderwidth 2 -relief groove
- }
-}
-
-package provide tile::theme::keramik $::tile::theme::keramik::version
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif
deleted file mode 100644
index 2d84f29c60..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif
deleted file mode 100644
index 52ee752641..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif
deleted file mode 100644
index ff309c56f2..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif
deleted file mode 100644
index 2159f274a5..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif
deleted file mode 100644
index 905fa7ed1d..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif
deleted file mode 100644
index 0323332f30..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif
deleted file mode 100644
index 20dcadb30e..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif
deleted file mode 100644
index 129169e4c4..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif
deleted file mode 100644
index fe9bf98f81..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif
deleted file mode 100644
index 210734d1ae..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif
deleted file mode 100644
index 5e1eafa854..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif
deleted file mode 100644
index bfd74889f8..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif
deleted file mode 100644
index 1095ed7583..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif
deleted file mode 100644
index 06e8795df8..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif
deleted file mode 100644
index 3c02fcbe81..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif
deleted file mode 100644
index 1d93973c75..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif
deleted file mode 100644
index 18fbae08ab..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif
deleted file mode 100644
index 334e8e4a40..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif
deleted file mode 100644
index 2e2f1c2f10..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif
deleted file mode 100644
index 48197cbfc9..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif
deleted file mode 100644
index 4a294b4984..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif
deleted file mode 100644
index 65c0e4efa2..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif
deleted file mode 100644
index c8257c9336..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif
deleted file mode 100644
index 215a73821c..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif
deleted file mode 100644
index 03099a95be..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif
deleted file mode 100644
index abec6aba40..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif
deleted file mode 100644
index 2c223ba2c5..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif
deleted file mode 100644
index 77ef8a26cf..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif
deleted file mode 100644
index 3179b87ad9..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif
deleted file mode 100644
index be01e4a72a..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif
deleted file mode 100644
index 0bb39e91ff..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif
deleted file mode 100644
index cf03d7f325..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl b/ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl
deleted file mode 100644
index cedec328f8..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl
+++ /dev/null
@@ -1,15 +0,0 @@
-# pkgIndex.tcl for additional tile pixmap themes.
-#
-# We don't provide the package is the image subdirectory isn't present,
-# or we don't have the right version of Tcl/Tk
-#
-# To use this automatically within tile, the tile-using application should
-# use tile::availableThemes and tile::setTheme
-#
-# $Id$
-
-if {![file isdirectory [file join $dir keramik]]} { return }
-if {![package vsatisfies [package provide Tcl] 8.4]} { return }
-
-package ifneeded tile::theme::keramik 0.3.2 \
- [list source [file join $dir keramik.tcl]]
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc.rb b/ext/tk/sample/tkextlib/tile/themes/kroc.rb
deleted file mode 100644
index 3b8569275b..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc.rb
+++ /dev/null
@@ -1,227 +0,0 @@
-# frozen_string_literal: false
-#
-# kroc.rb
-#
-# based on:
-# >> kroc.tcl - Copyright (C) 2004 David Zolli <kroc@kroc.tk>
-#
-
-imgdir = File.join(File.dirname(__FILE__), 'kroc', 'kroc')
-$images = Tk::Tile.load_images(imgdir, '*.gif')
-
-if TkPackage.vcompare(Tk::Tile.package_version, '0.5') >= 0
- $TNotebook_Tab = Tk::Tile::TNotebook.style('Tab')
-else
- $TNotebook_Tab = 'Tab.TNotebook'
-end
-
-def kroc_rb_settings
- # Tk::Tile::Style.default(TkRoot, :background=>'#FCB64F',
- # :troughcolor=>'#F8C278', :borderwidth=>1)
- # or
- # Tk::Tile::Style.default(Tk.root, :background=>'#FCB64F',
- # :troughcolor=>'#F8C278', :borderwidth=>1)
- # or
- # Tk::Tile::Style.default('.', :background=>'#FCB64F',
- # :troughcolor=>'#F8C278', :borderwidth=>1)
- # or
- # Tk::Tile::Style.default(nil, :background=>'#FCB64F',
- # :troughcolor=>'#F8C278', :borderwidth=>1)
- # or
- Tk::Tile::Style.default(:background=>'#FCB64F', :troughcolor=>'#F8C278',
- :borderwidth=>1)
- # Tk::Tile::Style.default(TkRoot, :font=>Tk::Tile::Font::Default,
- # :borderwidth=>1)
- # or
- # Tk::Tile::Style.default(Tk.root, :font=>Tk::Tile::Font::Default,
- # :borderwidth=>1)
- # or
- # Tk::Tile::Style.default('.', :font=>Tk::Tile::Font::Default,
- # :borderwidth=>1)
- # or
- # Tk::Tile::Style.default(nil, :font=>Tk::Tile::Font::Default,
- # :borderwidth=>1)
- # or
- Tk::Tile::Style.default(:font=>Tk::Tile::Font::Default, :borderwidth=>1)
-
- # Tk::Tile::Style.map(TkRoot, :background=>[:active, '#694418'])
- # or
- # Tk::Tile::Style.map(Tk.root, :background=>[:active, '#694418'])
- # or
- # Tk::Tile::Style.map('.', :background=>[:active, '#694418'])
- # or
- # Tk::Tile::Style.map(nil, :background=>[:active, '#694418'])
- # or
- Tk::Tile::Style.map(:background=>[:active, '#694418'])
- Tk::Tile::Style.map(:foreground=>[:disabled, '#B2B2B2', :active, '#FFE7CB'])
-
- # Tk::Tile::Style.default('TButton', :padding=>[10,4])
- Tk::Tile::Style.default(Tk::Tile::TButton, :padding=>[10,4])
-
- # Tk::Tile::Style.default('TNotebook.Tab',
- Tk::Tile::Style.default($TNotebook_Tab,
- :padding=>[10, 3], :font=>Tk::Tile::Font::Default)
- # Tk::Tile::Style.map('TNotebook.Tab',
- Tk::Tile::Style.map($TNotebook_Tab,
- :background=>[:selected, '#FCB64F', '', '#FFE6BA'],
- :foreground=>['', 'black'],
- :padding=>[:selected, [10, 6, 10, 3]])
-
- # Tk::Tile::Style.map('TScrollbar',
- Tk::Tile::Style.map(Tk::Tile::TScrollbar,
- :background=>[:pressed, '#694418'],
- :arrowcolor=>[:pressed, '#FEF7CB'],
- :relief=>[:pressed, :sunken])
-
- # Tk::Tile::Style.layout('Vertical.TScrollbar',
- Tk::Tile::Style.layout(Tk::Tile.style('Vertical', Tk::Tile::TScrollbar),
- ['Scrollbar.trough', {:children=>[
- 'Scrollbar.uparrow', {:side=>:top},
- 'Scrollbar.downarrow', {:side=>:bottom},
- 'Scrollbar.uparrow', {:side=>:bottom},
- 'Scrollbar.thumb', {:side=>:top, :expand=>true}
- ]}
- ])
-
- # Tk::Tile::Style.layout('Horizontal.TScrollbar',
- Tk::Tile::Style.layout(Tk::Tile.style('Horizontal', Tk::Tile::TScrollbar),
- ['Scrollbar.trough', {:children=>[
- 'Scrollbar.leftarrow', {:side=>:left},
- 'Scrollbar.rightarrow', {:side=>:right},
- 'Scrollbar.leftarrow', {:side=>:right},
- 'Scrollbar.thumb', {:side=>:left, :expand=>true}
- ]}
- ])
-
- #
- # Elements:
- #
- if Tk::Tile::TILE_SPEC_VERSION_ID >= 8
- Tk::Tile::Style.element_create('Button.button',
- :image,
- [ $images['button-n'],
- :pressed, $images['button-p'],
- :active, $images['button-h'],
- ], :border=>3, :sticky=>:ew)
-
- Tk::Tile::Style.element_create('Checkbutton.indicator',
- :image,
- [ $images['check-nu'],
- [:pressed, :selected],$images['check-nc'],
- :pressed, $images['check-nu'],
- [:active, :selected], $images['check-hc'],
- :active, $images['check-hu'],
- :selected, $images['check-nc'],
- ], :sticky=>:w)
-
- Tk::Tile::Style.element_create('Radiobutton.indicator',
- :image,
- [ $images['radio-nu'],
- [:pressed,:selected],$images['radio-nc'],
- :pressed, $images['radio-nu'],
- [:active,:selected], $images['radio-hc'],
- :active, $images['radio-hu'],
- :selected, $images['radio-nc'],
- ], :sticky=>:w)
-
- elsif TkPackage.vcompare(Tk::Tile.package_version, '0.5') >= 0
- Tk::Tile::Style.element_create('Button.button',
- :image, $images['button-n'],
- :map=>[
- :pressed, $images['button-p'],
- :active, $images['button-h'],
- ], :border=>3, :sticky=>:ew)
-
- Tk::Tile::Style.element_create('Checkbutton.indicator',
- :image, $images['check-nu'],
- :map=>[
- [:pressed, :selected],$images['check-nc'],
- :pressed, $images['check-nu'],
- [:active, :selected], $images['check-hc'],
- :active, $images['check-hu'],
- :selected, $images['check-nc'],
- ], :sticky=>:w)
-
- Tk::Tile::Style.element_create('Radiobutton.indicator',
- :image, $images['radio-nu'],
- :map=>[
- [:pressed, :selected],$images['radio-nc'],
- :pressed, $images['radio-nu'],
- [:active, :selected], $images['radio-hc'],
- :active, $images['radio-hu'],
- :selected, $images['radio-nc'],
- ], :sticky=>:w)
-
- else # tile 0.4 or earlier
- Tk::Tile::Style.element_create('Button.button', :pixmap,
- :images=>[
- :pressed, $images['button-p'],
- :active, $images['button-h'],
- '', $images['button-n']
- ], :border=>3, :tiling=>:tile)
-
- Tk::Tile::Style.element_create('Checkbutton.indicator', :pixmap,
- :images=>[
- [:pressed, :selected],$images['check-nc'],
- :pressed, $images['check-nu'],
- [:active, :selected], $images['check-hc'],
- :active, $images['check-hu'],
- :selected, $images['check-nc'],
- '', $images['check-nu'],
- ], :tiling=>:fixed)
-
- Tk::Tile::Style.element_create('Radiobutton.indicator', :pixmap,
- :images=>[
- [:pressed, :selected],$images['radio-nc'],
- :pressed, $images['radio-nu'],
- [:active, :selected], $images['radio-hc'],
- :active, $images['radio-hu'],
- :selected, $images['radio-nc'],
- '', $images['radio-nu'],
- ], :tiling=>:fixed)
-
- end
-
- #
- # Settings:
- #
- # Tk::Tile::Style.layout(Tk::Tile::TButton,
- Tk::Tile::Style.layout('TButton', [
- 'Button.button', {:children=>[
- 'Button.focus', {:children=>[
- 'Button.padding', {:children=>[
- 'Button.label', {:expand=>true, :sticky=>''}
- ]}
- ]}
- ]}
- ])
-
- # Tk::Tile::Style.layout(Tk::Tile::TCheckbutton,
- Tk::Tile::Style.layout('TCheckbutton', [
- 'Checkbutton.background', # this is not needed in tile 0.5 or later
- 'Checkbutton.border', {:children=>[
- 'Checkbutton.padding', {:children=>[
- 'Checkbutton.indicator', {:side=>:left},
- 'Checkbutton.focus', {:side=>:left, :children=>[
- 'Checkbutton.label'
- ]}
- ]}
- ]}
- ])
-
- # Tk::Tile::Style.layout(Tk::Tile::TRadiobutton,
- Tk::Tile::Style.layout('TRadiobutton', [
- 'Radiobutton.background', # this is not needed in tile 0.5 or later
- 'Radiobutton.border', {:children=>[
- 'Radiobutton.padding', {:children=>[
- 'Radiobutton.indicator', {:side=>:left},
- 'Radiobutton.focus', {:expand=>true, :sticky=>:w, :children=>[
- 'Radiobutton.label', {:side=>:right, :expand=>true}
- ]}
- ]}
- ]}
- ])
-end
-
-Tk::Tile::Style.theme_create('kroc-rb', :parent=>'alt',
- :settings=>proc{ kroc_rb_settings() })
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl
deleted file mode 100644
index b2cd79679a..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl
+++ /dev/null
@@ -1,163 +0,0 @@
-# kroc.tcl - Copyright (C) 2004 David Zolli <kroc@kroc.tk>
-#
-# A sample pixmap theme for the tile package.
-
-#package require tile::pixmap
-
-namespace eval tile {
- namespace eval kroc {
- variable version 0.0.1
- }
-}
-
-namespace eval tile::kroc {
-
- set imgdir [file join [file dirname [info script]] kroc]
- array set Images [tile::LoadImages $imgdir *.gif]
-
- if {[package vsatisfies [package provide tile] 0.5]} {
- set TNoteBook_Tab TNotebook.Tab
- } else {
- set TNoteBook_Tab Tab.TNotebook
- }
-
- style theme create kroc -parent alt -settings {
-
- style default . -background #FCB64F -troughcolor #F8C278 -borderwidth 1
- style default . -font TkDefaultFont -borderwidth 1
- style map . -background [list active #694418]
- style map . -foreground [list disabled #B2B2B2 active #FFE7CB]
-
- style default TButton -padding "10 4"
-
- style default $TNoteBook_Tab -padding {10 3} -font TkDefaultFont
- style map $TNoteBook_Tab \
- -background [list selected #FCB64F {} #FFE6BA] \
- -foreground [list {} black] \
- -padding [list selected {10 6 10 3}]
-
- style map TScrollbar \
- -background { pressed #694418} \
- -arrowcolor { pressed #FFE7CB } \
- -relief { pressed sunken } \
- ;
-
- style layout Vertical.TScrollbar {
- Scrollbar.trough -children {
- Scrollbar.uparrow -side top
- Scrollbar.downarrow -side bottom
- Scrollbar.uparrow -side bottom
- Scrollbar.thumb -side top -expand true
- }
- }
-
- style layout Horizontal.TScrollbar {
- Scrollbar.trough -children {
- Scrollbar.leftarrow -side left
- Scrollbar.rightarrow -side right
- Scrollbar.leftarrow -side right
- Scrollbar.thumb -side left -expand true
- }
- }
-
- #
- # Elements:
- #
- if {[package vsatisfies [package provide tile] 0.5]} {
-
- style element create Button.button image $Images(button-n) \
- -map [list \
- pressed $Images(button-p) \
- active $Images(button-h) \
- ] -border 3 -sticky ew
-
- style element create Checkbutton.indicator image $Images(check-nu) \
- -map [list \
- {pressed selected} $Images(check-nc) \
- pressed $Images(check-nu) \
- {active selected} $Images(check-hc) \
- active $Images(check-hu) \
- selected $Images(check-nc) \
- ] -sticky w
-
- style element create Radiobutton.indicator image $Images(radio-nu) \
- -map [list \
- {pressed selected} $Images(radio-nc) \
- pressed $Images(radio-nu) \
- {active selected} $Images(radio-hc) \
- active $Images(radio-hu) \
- selected $Images(radio-nc) \
- ] -sticky w
-
- } else {
-
- style element create Button.button pixmap -images [list \
- pressed $Images(button-p) \
- active $Images(button-h) \
- {} $Images(button-n) \
- ] -border 3 -tiling tile
-
- style element create Checkbutton.indicator pixmap -images [list \
- {pressed selected} $Images(check-nc) \
- pressed $Images(check-nu) \
- {active selected} $Images(check-hc) \
- active $Images(check-hu) \
- selected $Images(check-nc) \
- {} $Images(check-nu) \
- ] -tiling fixed
-
- style element create Radiobutton.indicator pixmap -images [list \
- {pressed selected} $Images(radio-nc) \
- pressed $Images(radio-nu) \
- {active selected} $Images(radio-hc) \
- active $Images(radio-hu) \
- selected $Images(radio-nc) \
- {} $Images(radio-nu) \
- ] -tiling fixed
-
- }
-
- #
- # Settings: (*button.background is not needed in tile 0.5 or above)
- #
- style layout TButton {
- Button.button -children {
- Button.focus -children {
- Button.padding -children {
- Button.label -expand true -sticky {}
- }
- }
- }
- }
-
- style layout TCheckbutton {
- Checkbutton.border -children {
- Checkbutton.background
- Checkbutton.padding -children {
- Checkbutton.indicator -side left
- Checkbutton.focus -side left -children {
- Checkbutton.label
- }
- }
- }
- }
-
- style layout TRadiobutton {
- Radiobutton.border -children {
- Radiobutton.background
- Radiobutton.padding -children {
- Radiobutton.indicator -side left
- Radiobutton.focus -expand true -sticky w -children {
- Radiobutton.label -side right -expand true
- }
- }
- }
- }
-
- } }
-
-# -------------------------------------------------------------------------
-
-package provide tile::theme::kroc $::tile::kroc::version
-
-# -------------------------------------------------------------------------
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif
deleted file mode 100644
index e7a140dede..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif
deleted file mode 100644
index 78b506ddeb..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif
deleted file mode 100644
index a5a4e90be1..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif
deleted file mode 100644
index 41503c5ebd..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif
deleted file mode 100644
index b3e512ca67..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif
deleted file mode 100644
index a28c288fce..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif
deleted file mode 100644
index 5c23931bbc..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif
deleted file mode 100644
index 359fe1cc8b..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif
deleted file mode 100644
index 9f46b37926..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif
deleted file mode 100644
index 6437f33a7a..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif
deleted file mode 100644
index 2d2aac8597..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl b/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl
deleted file mode 100644
index de4f3d4555..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl
+++ /dev/null
@@ -1,15 +0,0 @@
-# pkgIndex.tcl for additional tile pixmap themes.
-#
-# We don't provide the package is the image subdirectory isn't present,
-# or we don't have the right version of Tcl/Tk
-#
-# To use this automatically within tile, the tile-using application should
-# use tile::availableThemes and tile::setTheme
-#
-# $Id$
-
-if {![file isdirectory [file join $dir kroc]]} { return }
-if {![package vsatisfies [package provide Tcl] 8.4]} { return }
-
-package ifneeded tile::theme::kroc 0.0.1 \
- [list source [file join $dir kroc.tcl]]
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl b/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl
deleted file mode 100644
index f402a73f10..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl
+++ /dev/null
@@ -1,16 +0,0 @@
-# pkgIndex.tcl for additional tile pixmap themes.
-#
-# We don't provide the package is the image subdirectory isn't present,
-# or we don't have the right version of Tcl/Tk
-#
-# To use this automatically within tile, the tile-using application should
-# use tile::availableThemes and tile::setTheme
-#
-# $Id$
-
-if {![file isdirectory [file join $dir plastik]]} { return }
-if {![package vsatisfies [package provide Tcl] 8.4]} { return }
-
-package ifneeded tile::theme::plastik 0.3.1 \
- [list source [file join $dir plastik.tcl]]
-
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl
deleted file mode 100644
index ea6ed74162..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl
+++ /dev/null
@@ -1,125 +0,0 @@
-# plastik.tcl - Copyright (C) 2004 Googie
-#
-# A sample pixmap theme for the tile package.
-#
-# Copyright (c) 2004 Googie
-# Copyright (c) 2005 Pat Thoyts <patthoyts@users.sourceforge.net>
-#
-# $Id$
-
-package require Tk 8.4
-package require tile 0.5
-
-namespace eval tile::theme::plastik {
-
- variable version 0.3.1
- package provide tile::theme::plastik $version
-
- variable imgdir [file join [file dirname [info script]] plastik]
- variable Images;
- array set Images [tile::LoadImages $imgdir *.gif]
-
- variable colors
- array set colors {
- -frame "#cccccc"
- -disabledfg "#aaaaaa"
- -selectbg "#657a9e"
- -selectfg "#ffffff"
- }
-
-style theme create plastik -parent default -settings {
- style default . \
- -background $colors(-frame) \
- -troughcolor $colors(-frame) \
- -selectbackground $colors(-selectbg) \
- -selectforeground $colors(-selectfg) \
- -font TkDefaultFont \
- -borderwidth 1 \
- ;
-
- style map . -foreground [list disabled $colors(-disabledfg)]
-
- #
- # Layouts:
- #
- style layout Vertical.TScrollbar {
- Scrollbar.background
- Scrollbar.trough -children {
- Scrollbar.uparrow -side top
- Scrollbar.downarrow -side bottom
- Scrollbar.uparrow -side bottom
- Vertical.Scrollbar.thumb -side top -expand true -sticky ns
- }
- }
-
- style layout Horizontal.TScrollbar {
- Scrollbar.background
- Scrollbar.trough -children {
- Scrollbar.leftarrow -side left
- Scrollbar.rightarrow -side right
- Scrollbar.leftarrow -side right
- Horizontal.Scrollbar.thumb -side left -expand true -sticky we
- }
- }
-
- style layout TButton {
- Button.button -children {
- Button.focus -children {
- Button.padding -children {
- Button.label -side left -expand true
- }
- }
- }
- }
-
- #
- # Elements:
- #
- style element create Button.button image $Images(button-n) \
- -border 4 -sticky ew \
- -map [list pressed $Images(button-p) active $Images(button-h)]
-
- style element create Checkbutton.indicator image $Images(check-nu) \
- -sticky {} -map [list \
- {active selected} $Images(check-hc) \
- {pressed selected} $Images(check-pc) \
- active $Images(check-hu) \
- selected $Images(check-nc) \
- ]
-
- style element create Radiobutton.indicator image $Images(radio-nu) \
- -sticky {} -map [list \
- {active selected} $Images(radio-hc) \
- {pressed selected} $Images(radio-pc) \
- active $Images(radio-hu) \
- selected $Images(radio-nc) \
- ]
-
- style element create Horizontal.Scrollbar.thumb \
- image $Images(hsb-n) -border 3 -sticky ew
- style element create Vertical.Scrollbar.thumb \
- image $Images(vsb-n) -border 3 -sticky ns
-
- style element create Scale.slider \
- image $Images(hslider-n) -sticky {}
- style element create Vertical.Scale.slider \
- image $Images(vslider-n) -sticky {}
-
- style element create Scrollbar.uparrow image $Images(arrowup-n) \
- -map [list pressed $Images(arrowup-p)] -sticky {}
- style element create Scrollbar.downarrow image $Images(arrowdown-n) \
- -map [list pressed $Images(arrowdown-p)] -sticky {}
- style element create Scrollbar.leftarrow image $Images(arrowleft-n) \
- -map [list pressed $Images(arrowleft-p)] -sticky {}
- style element create Scrollbar.rightarrow image $Images(arrowright-n) \
- -map [list pressed $Images(arrowright-p)] -sticky {}
-
- #
- # Settings:
- #
- style default TButton -width -10
- style default TNotebook.Tab -padding {6 2 6 2}
- style default TLabelframe -borderwidth 2 -relief groove
-
-} }
-
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif
deleted file mode 100644
index d914e7a3d3..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gif
deleted file mode 100644
index abffaa49f6..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif
deleted file mode 100644
index 9939ae1d50..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gif
deleted file mode 100644
index 1a45ef2e4b..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif
deleted file mode 100644
index f4b563fed2..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif
deleted file mode 100644
index 5459d5e615..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gif
deleted file mode 100644
index 118290cd95..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif
deleted file mode 100644
index 89f9b38c73..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif
deleted file mode 100644
index 548f3769df..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-n.gif
deleted file mode 100644
index 49a25909f3..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif
deleted file mode 100644
index e83f7ed985..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gif
deleted file mode 100644
index b279fa50d8..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif
deleted file mode 100644
index 5b4fb4f037..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif
deleted file mode 100644
index b139e02a09..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif
deleted file mode 100644
index fbe391f9d8..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif
deleted file mode 100644
index 75a3bd635c..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif
deleted file mode 100644
index b8ea07ea92..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gif
deleted file mode 100644
index ce8f28404f..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif
deleted file mode 100644
index 33917715b0..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif
deleted file mode 100644
index 88925d0e1d..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif
deleted file mode 100644
index f8723d367a..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gif
deleted file mode 100644
index fb5140e6a1..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif
deleted file mode 100644
index 176225d9e1..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif
deleted file mode 100644
index 85bac4579e..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gif
deleted file mode 100644
index cf887f9855..0000000000
--- a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tile/toolbutton.tcl b/ext/tk/sample/tkextlib/tile/toolbutton.tcl
deleted file mode 100644
index 91e9ad18bb..0000000000
--- a/ext/tk/sample/tkextlib/tile/toolbutton.tcl
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# $Id$
-#
-# Demonstration of custom widget styles.
-#
-
-#
-# ~ BACKGROUND
-#
-# Checkbuttons in toolbars have a very different appearance
-# than regular checkbuttons: there's no indicator, they
-# "pop up" when the mouse is over them, and they appear sunken
-# when selected.
-#
-# Tk added partial support for toolbar-style buttons in 8.4
-# with the "-overrelief" option, and TIP #82 added further
-# support with the "-offrelief" option. So to get a toolbar-style
-# checkbutton, you can configure it with:
-#
-# checkbutton .cb \
-# -indicatoron false -selectcolor {} -relief flat -overrelief raised
-#
-# Behind the scenes, Tk has a lot of rather complicated logic
-# to implement this checkbutton style; see library/button.tcl,
-# generic/tkButton.c, and the platform-specific files unix/tkUnixButton.c
-# et al. for the full details.
-#
-# The tile widget set has a better way: custom styles.
-# Since the appearance is completely controlled by the theme engine,
-# we can define a new "Toolbutton" style and just use:
-#
-# checkbutton .cb -style Toolbutton
-#
-#
-# ~ DEMONSTRATION
-#
-# The tile built-in themes (default, "alt", windows, and XP)
-# already include Toolbutton styles. This script will add
-# them to the "step" and "blue" themes as a demonstration.
-#
-# (Note: Pushbuttons and radiobuttons can also use the "Toolbutton"
-# style; see demo.tcl.)
-#
-
-style theme settings "step" {
-
-#
-# First, we use [style layout] to define what elements to
-# use and how they're arranged. Toolbuttons are pretty
-# simple, consisting of a border, some internal padding,
-# and a label. (See also the TScrollbar layout definition
-# in demos/blue.tcl for a more complicated layout spec.)
-#
- style layout Toolbutton {
- Toolbutton.background
- Toolbutton.border -children {
- Toolbutton.padding -children {
- Toolbutton.label
- }
- }
- }
-
-# (Actually the above isn't strictly necessary, since the same layout
-# is defined in the default theme; we could have inherited it
-# instead.)
-#
-# Next, specify default values for element options.
-# For many options (like -background), the defaults
-# inherited from the parent style are sufficient.
-#
- style default Toolbutton -width 0 -padding 1 -relief flat -borderwidth 2
-
-#
-# Finally, use [style map] to specify state-specific
-# resource values. We want a flat relief if the widget is
-# disabled, sunken if it's selected (on) or pressed,
-# and raised when it's active (the mouse pointer is
-# over the widget). Each state-value pair is checked
-# in order, and the first matching state takes precedence.
-#
- style map Toolbutton -relief {
- disabled flat
- selected sunken
- pressed sunken
- active raised
- }
-}
-
-#
-# Now for the "blue" theme. (Since the purpose of this
-# theme is to show what *can* be done, not necessarily what
-# *should* be done, the following makes some questionable
-# design decisions from an aesthetic standpoint.)
-#
-if {![catch {package require tile::theme::blue}]} {
-style theme settings "blue" {
-
- #
- # Default values:
- #
- style default Toolbutton \
- -width 0 -relief flat -borderwidth 2 \
- -background #6699CC -foreground #000000 ;
-
- #
- # Configure state-specific values for -relief, as before:
- #
- style map Toolbutton -relief {
- disabled flat
- selected sunken
- pressed sunken
- active raised
- }
-
- #
- # Adjust the -padding at the same time, to enhance
- # the raised/sunken illusion:
- #
- style default Toolbutton -padding 4
- style map Toolbutton -padding {
- disabled {4}
- selected {6 6 2 2}
- pressed {6 6 2 2}
- active {2 2 6 6}
- }
-
- #
- # ... and change the foreground and background colors
- # when the mouse cursor is over the widget:
- #
- style map Toolbutton -background {
- active #008800
- } -foreground {
- active #FFFFFF
- }
-}
-
-}
-
-#
-# ~ A final note:
-#
-# TIP #82 also says: "When -indicatoron is off and the button itself
-# is on, the relief continues to be hard-coded to sunken. For symmetry,
-# we might consider adding another -onrelief option to cover this
-# case. But it is difficult to imagine ever wanting to change the
-# value of -onrelief so it has been omitted from this TIP.
-# If there as strong desire to have -onrelief, it can be added later."
-# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-#
-# The Tile project aims to make sure that this never needs to happen.
-#
diff --git a/ext/tk/sample/tkextlib/tkHTML/Orig_COPYRIGHT.txt b/ext/tk/sample/tkextlib/tkHTML/Orig_COPYRIGHT.txt
deleted file mode 100644
index 2b3757bb23..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/Orig_COPYRIGHT.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-The following text is the original 'COPYRIGHT' file of tkHTML.
-
------------------------------------------------------------------------
-Most of the source code for the Tk Html widget has been place in the
-public domain. You can do with it whatever you want. However, some
-files have been copied from other sources and contain copyrights.
-A copyright notice appears separately at the top of each source file.
------------------------------------------------------------------------
-
-In this sample, HTML documents are quoted in the 'tests' directory of
-tkHTML source tree. There were no copyright notice in the directory.
diff --git a/ext/tk/sample/tkextlib/tkHTML/README b/ext/tk/sample/tkextlib/tkHTML/README
deleted file mode 100644
index 0b9f799cbd..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/README
+++ /dev/null
@@ -1,12 +0,0 @@
-
- [ TkHtml widget example ]
-
-The directory page1 -- page4 are referd from "test" directory of
-original TkHtml extension's source archive.
-( see http://www.hwaci.com/sw/tkhtml/index.html )
-
-You can see the HTML documents on the 'hv.rb' or 'ss.rb' sample script.
-
- e.g.
- LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH /usr/local/bin/ruby ./hv.rb page1/index.html
-
diff --git a/ext/tk/sample/tkextlib/tkHTML/hv.rb b/ext/tk/sample/tkextlib/tkHTML/hv.rb
deleted file mode 100644
index 0f6e595d82..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/hv.rb
+++ /dev/null
@@ -1,314 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# This script implements the "hv" application. Type "hv FILE" to
-# view FILE as HTML.
-#
-# This application is used for testing the HTML widget. It can
-# also server as an example of how to use the HTML widget.
-#
-require 'tk'
-require 'tkextlib/tkHTML'
-
-root = TkRoot.new(:title=>'HTML File Viewer', :iconname=>'HV')
-
-file = ARGV[0]
-
-#
-# These images are used in place of GIFs or of form elements
-#
-biggray = TkPhotoImage.new(:data=><<'EOD')
- R0lGODdhPAA+APAAALi4uAAAACwAAAAAPAA+AAACQISPqcvtD6OctNqLs968+w+G4kiW5omm
- 6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNFgsAO///
-EOD
-
-smgray = TkPhotoImage.new(:data=><<'EOD')
- R0lGODdhOAAYAPAAALi4uAAAACwAAAAAOAAYAAACI4SPqcvtD6OctNqLs968+w+G4kiW5omm
- 6sq27gvH8kzX9m0VADv/
-EOD
-
-nogifbig = TkPhotoImage.new(:data=><<'EOD')
- R0lGODdhJAAkAPEAAACQkADQ0PgAAAAAACwAAAAAJAAkAAACmISPqcsQD6OcdJqKM71PeK15
- AsSJH0iZY1CqqKSurfsGsex08XuTuU7L9HywHWZILAaVJssvgoREk5PolFo1XrHZ29IZ8oo0
- HKEYVDYbyc/jFhz2otvdcyZdF68qeKh2DZd3AtS0QWcDSDgWKJXY+MXS9qY4+JA2+Vho+YPp
- FzSjiTIEWslDQ1rDhPOY2sXVOgeb2kBbu1AAADv/
-EOD
-
-nogifsm = TkPhotoImage.new(:data=><<'EOD')
- R0lGODdhEAAQAPEAAACQkADQ0PgAAAAAACwAAAAAEAAQAAACNISPacHtD4IQz80QJ60as25d
- 3idKZdR0IIOm2ta0Lhw/Lz2S1JqvK8ozbTKlEIVYceWSjwIAO///
-EOD
-
-#
-# define variables
-#
-ul_hyper = TkVariable.new(0)
-show_tbl = TkVariable.new(0)
-show_img = TkVariable.new(1)
-
-#
-# A font chooser routine.
-#
-# html[:fontcommand] = pick_font
-pick_font = proc{|size, attrs|
- puts "FontCmd: #{size} #{attrs}"
- [ ((attrs =~ /fixed/)? 'courier': 'charter'),
- (12 * (1.2**(size.to_f - 4.0))).to_i,
- ((attrs =~ /italic/)? 'italic': 'roman'),
- ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ')
-}
-
-#
-# This routine is called for each form element
-#
-form_cmd = proc{|n, cmd, style, *args|
- # puts "FormCmd: $n $cmd $args"
- case cmd
- when 'select', 'textarea', 'input'
- TkLabel.new(:widgetname=>args[0], :image=>nogifsm)
- end
-}
-
-#
-# This routine is called for every <IMG> markup
-#
-images = {}
-old_imgs = {}
-big_imgs = {}
-
-hotkey = {}
-
-move_big_image = proc{|b|
- if big_imgs.key?(b)
- b.copy(big_imgs[b])
- big_imgs[b].delete
- big_imgs.delete(b)
- Tk.update
- end
-}
-
-image_cmd = proc{|*args|
- if show_img.bool
- smgray
- else
- fn = args[0]
-
- if old_imgs.key?(fn)
- images[fn] = old_imgs[fn]
- old_imgs.delete(fn)
- images[fn]
-
- else
- begin
- img = TkPhotoImage.new(:file=>fn)
- rescue
- smgray
- else
- if img.width * img.height > 20000
- b = TkPhotoImage.new(:width=>img.width, :height=>img.height)
- big_imgs[b] = img
- img = b
- Tk.after_idle(proc{ move_big_image.call(b) })
- end
-
- images[fn] = img
- img
- end
- end
- end
-}
-
-#
-# This routine is called for every <SCRIPT> markup
-#
-script_cmd = proc{|*args|
- # puts "ScriptCmd: #{args.inspect}"
-}
-
-# This routine is called for every <APPLET> markup
-#
-applet_cmd = proc{|w, arglist|
- # puts "AppletCmd: w=#{w} arglist=#{arglist}"
- TkLabel.new(w, :text=>"The Applet #{w}", :bd=>2, :relief=>raised)
-}
-
-#
-# Construct the main HTML viewer
-#
-html = Tk::HTML_Widget.new(:padx=>5, :pady=>9,
- :formcommand=>form_cmd,
- :imagecommand=>image_cmd,
- :scriptcommand=>script_cmd,
- :appletcommand=>applet_cmd,
- :underlinehyperlinks=>0,
- :bg=>'white', :tablerelief=>:raised)
-vscr = html.yscrollbar(TkScrollbar.new)
-hscr = html.xscrollbar(TkScrollbar.new)
-
-Tk.grid(html, vscr, :sticky=>:news)
-Tk.grid(hscr, :sticky=>:ew)
-Tk.root.grid_columnconfigure(0, :weight=>1)
-Tk.root.grid_columnconfigure(1, :weight=>0)
-Tk.root.grid_rowconfigure(0, :weight=>1)
-Tk.root.grid_rowconfigure(1, :weight=>0)
-
-#
-# This procedure is called when the user clicks on a hyperlink.
-#
-priv = {}
-last_file = ''
-
-# Read a file
-#
-read_file = proc{|name|
- begin
- fp = open(name, 'r')
- ret = fp.read(File.size(name))
- rescue
- ret = nil
- fp = nil
- Tk.messageBox(:icon=>'error', :message=>"fail to open '#{name}'",
- :type=>:ok)
- ensure
- fp.close if fp
- end
- ret
-}
-
-# Clear the screen.
-#
-clear_screen = proc{
- html.clear
- old_imgs.clear
- big_imgs.clear
- hotkey.clear
- images.each{|k, v| old_imgs[k] = v }
- images.clear
-}
-
-# Load a file into the HTML widget
-#
-load_file = proc{|name|
- if (doc = read_file.call(name))
- clear_screen.call
- last_file = name
- html.configure(:base=>name)
- html.parse(doc)
- old_imgs.clear
- end
-}
-
-href_binding = proc{|x, y|
- # koba & dg marking text
- html.selection_clear
- priv['mark'] = "@#{x},#{y}"
- lst = html.href(x, y)
-
- unless lst.size.zero?
- lnk, target = lst
-
- if lnk != ""
- if lnk =~ /^#{last_file}#(.*)$/
- html.yview($1)
- else
- load_file.call(lnk)
- end
- end
- end
-}
-html.clipping_window.bind('1', href_binding, '%x %y')
-
-# marking text with the mouse and copying to the clipboard just with tkhtml2.0 working
-html.clipping_window.bind('B1-Motion', proc{|w, x, y|
- w.selection_set(priv['mark'], "@#{x},#{y}")
- TkClipboard.clear
- # avoid tkhtml0.0 errors
- # anyone can fix this for tkhtml0.0
- begin
- TkClipboard.append(TkSelection.get)
- rescue
- end
- }, '%W %x %y')
-
-# This procedure is called when the user selects the File/Open
-# menu option.
-#
-last_dir = Dir.pwd
-sel_load = proc{
- filetypes = [
- ['Html Files', ['.html', '.htm']],
- ['All Files', '*']
- ]
-
- f = Tk.getOpenFile(:initialdir=>last_dir, :filetypes=>filetypes)
- if f != ''
- load_file.call(f)
- last_dir = File.dirname(f)
- end
-}
-
-# Refresh the current file.
-#
-refresh = proc{|*args|
- load_file.call(last_file)
-}
-
-# This binding changes the cursor when the mouse move over
-# top of a hyperlink.
-#
-Tk::HTML_Widget::ClippingWindow.bind('Motion', proc{|w, x, y|
- parent = w.winfo_parent
- url = parent.href(x, y)
- unless url.empty?
- parent[:cursor] = 'hand2'
- else
- parent[:cursor] = ''
- end
- }, '%W %x %y')
-#
-# Setup menu
-#
-menu_spec = [
- [['File', 0],
- ['Open', sel_load, 0],
- ['Refresh', refresh, 0],
- '---',
- ['Exit', proc{exit}, 1]],
-
- [['View', 0],
- ['Underline Hyperlinks', ul_hyper],
- ['Show Table Structure', show_tbl],
- ['Show Images', show_img]]
-]
-
-mbar = Tk.root.add_menubar(menu_spec)
-
-#
-# Setup trace
-#
-ul_hyper.trace('w', proc{
- html[:underlinehyperlinks] = ul_hyper.value
- refresh.call
- })
-
-show_tbl.trace('w', proc{
- if show_tbl.bool
- html[:tablerelief] = :flat
- else
- html[:tablerelief] = :raised
- end
- refresh.call
- })
-
-show_img.trace('w', refresh)
-
-# If an argument was specified, read it into the HTML widget.
-#
-Tk.update
-if file && file != ""
- load_file.call(file)
-end
-
-#####################################
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image1 b/ext/tk/sample/tkextlib/tkHTML/page1/image1
deleted file mode 100644
index 31e96b6797..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image1
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image10 b/ext/tk/sample/tkextlib/tkHTML/page1/image10
deleted file mode 100644
index 80a8f81686..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image10
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image11 b/ext/tk/sample/tkextlib/tkHTML/page1/image11
deleted file mode 100644
index e8cb01d450..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image11
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image12 b/ext/tk/sample/tkextlib/tkHTML/page1/image12
deleted file mode 100644
index c317bbd5cc..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image12
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image13 b/ext/tk/sample/tkextlib/tkHTML/page1/image13
deleted file mode 100644
index ac4b3cd594..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image13
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image14 b/ext/tk/sample/tkextlib/tkHTML/page1/image14
deleted file mode 100644
index c3b02558e3..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image14
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image2 b/ext/tk/sample/tkextlib/tkHTML/page1/image2
deleted file mode 100644
index da26d7092e..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image2
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image3 b/ext/tk/sample/tkextlib/tkHTML/page1/image3
deleted file mode 100644
index d91cdfafab..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image3
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image4 b/ext/tk/sample/tkextlib/tkHTML/page1/image4
deleted file mode 100644
index 5fdf70c0e5..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image4
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image5 b/ext/tk/sample/tkextlib/tkHTML/page1/image5
deleted file mode 100644
index 67cd14d78d..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image5
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image6 b/ext/tk/sample/tkextlib/tkHTML/page1/image6
deleted file mode 100644
index 9e05aa0f36..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image6
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image7 b/ext/tk/sample/tkextlib/tkHTML/page1/image7
deleted file mode 100644
index 879656d45c..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image7
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image8 b/ext/tk/sample/tkextlib/tkHTML/page1/image8
deleted file mode 100644
index 8c647c4f00..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image8
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/image9 b/ext/tk/sample/tkextlib/tkHTML/page1/image9
deleted file mode 100644
index 3a7707589b..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/image9
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page1/index.html b/ext/tk/sample/tkextlib/tkHTML/page1/index.html
deleted file mode 100644
index af87289c28..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page1/index.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<HTML><HEAD><TITLE>Slashdot:News for Nerds. Stuff that Matters.</TITLE> </HEAD>
-<BODY bgcolor="#000000" text="#000000" link="#006666" vlink="#000000">
-<center><a href="http://209.207.224.220/redir.pl?1463" target="_top"><img src="image1" alt="Click Here to enter the Sweepstakes" border="2" width="468" height="60"></a></center> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD WIDTH="1"><SCRIPT LANGUAGE="JAVASCRIPT">
-<!-- now="now" ="" new="new" Date();="Date();" tail="tail" ="" now.getTime();="now.getTime();" document.write("<IMG="document.write("<IMG" SRC="http://209.207.224.245/Slashdot/pc.gif?/slashhead.inc,"+" tail="tail" +="+" "=""" WIDTH="1" HEIGHT="1><BR>");" -->
-</SCRIPT>
-<NOSCRIPT>
-<IMG SRC="image2" WIDTH="1" HEIGHT="1">
-</NOSCRIPT></TD></TR></TABLE><P>
-<TABLE bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" border="0" width="99%" align="center">
- <TR>
- <TD valign="top" align="left" valign="top"><A href="http://slashdot.org/"><IMG src="image3" width="275" height="72" border="0" alt="Welcome to Slashdot"></A></TD>
- <TD><A href="http://slashdot.org/search.pl?topic=linux"><IMG SRC="image4" width="60" height="70" border="0" alt="Linux"></A></TD>
-<TD><A href="http://slashdot.org/search.pl?topic=news"><IMG SRC="image5" width="34" height="44" border="0" alt="News"></A></TD>
-<TD><A href="http://slashdot.org/search.pl?topic=usa"><IMG SRC="image6" width="80" height="61" border="0" alt="United States"></A></TD>
-<TD><A href="http://slashdot.org/search.pl?topic=ed"><IMG SRC="image7" width="87" height="64" border="0" alt="Education"></A></TD>
-<TD><A href="http://slashdot.org/search.pl?topic=space"><IMG SRC="image8" width="73" height="59" border="0" alt="Space"></A></TD>
-
-</TR></TABLE>
-<TABLE width="99%" align="center" cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF"><TR>
-<TD valign="top" rowspan="5"><NOBR><FONT size="2"><B>
-&nbsp;<A href="/faq.shtml">faq</A> <BR>
-&nbsp;<A href="/code.shtml">code</A> <BR>
-&nbsp;<A href="/awards.shtml">awards</A> <BR>
-&nbsp;<A href="http://Andover.Net/privacy.html">privacy</A> <BR>
-&nbsp;<A href="http://slashnet.org">slashNET</A> <BR>
-&nbsp;<A href="/search.pl">older stuff</A> <BR>
-&nbsp;<A href="http://cmdrtaco.net">rob's page</A> <BR>
-&nbsp;<A href="/users.pl?op=preferences">preferences</A> <BR>
-&nbsp;<A href="http://Andover.Net">andover.net</A> <BR>
-&nbsp;<A href="/submit.pl">submit story</A> <BR>
-&nbsp;<A href="/advertising.shtml">advertising</A> <BR>
-&nbsp;<A href="/supporters.shtml">supporters</A> <BR>
-&nbsp;<A href="/pollBooth.pl">past polls</A> <BR>
-&nbsp;<A href="/topics.shtml">topics</A> <BR>
-&nbsp;<A href="/about.shtml">about</A> <BR>
-&nbsp;<A href="/jobs.shtml">jobs</A> <BR>
-&nbsp;<A href="/hof.shtml">hof</A>
-
-</B></FONT></NOBR>
- <P><TABLE border="0" cellpadding="1" cellspacing="0" align="center" bgcolor="#CCCCCC"><TR>
- <TD><FONT size="2" color="#000000"><B> Sections</B></FONT></TD></TR>
- <TR><TD><TABLE border="0" cellspacing="1" cellpadding="1" bgcolor="#FFFFFF" width="100%"><TR><TD><FONT color="#000000" size="2"><NOBR>
-1/23<BR>
-<B><A href="http://slashdot.org/index.pl?section=apache">apache</A></B><BR>
-1/29 (3)<BR>
-<B><A href="http://slashdot.org/index.pl?section=askslashdot">askslashdot</A></B><BR>
-1/27<BR>
-<B><A href="http://slashdot.org/index.pl?section=awards">awards</A></B><BR>
-1/29 (2)<BR>
-<B><A href="http://slashdot.org/index.pl?section=books">books</A></B><BR>
-1/27<BR>
-<B><A href="http://slashdot.org/index.pl?section=bsd">bsd</A></B><BR>
-1/28 (2)<BR>
-<B><A href="http://slashdot.org/index.pl?section=features">features</A></B><BR>
-1/28 (2)<BR>
-<B><A href="http://slashdot.org/index.pl?section=interviews">interviews</A></B><BR>
-1/19<BR>
-<B><A href="http://slashdot.org/index.pl?section=radio">radio</A></B><BR>
-1/27 (2)<BR>
-<B><A href="http://slashdot.org/index.pl?section=science">science</A></B><BR>
-1/28 (3)<BR>
-<B><A href="http://slashdot.org/index.pl?section=yro">yro</A></B><BR> </NOBR></FONT></TD></TR></TABLE><TR>
- <TD><A href="http://andover.net"><FONT size="2" color="#000000"><B>Andover.Net</B></FONT></A></TD></TR>
- <TR><TD><TABLE border="0" cellspacing="1" cellpadding="1" bgcolor="#FFFFFF"><TR><TD>
-<FONT color="#000000" size="2"><NOBR><A href="http://www.andovernews.com">AndoverNews</A><BR><A href="http://www.askreggie.com">Ask Reggie</A><BR><A href="http://www.davecentral.com">DaveCentral</A><BR><A href="http://www.freecode.com">FreeCode</A><BR><A href="http://www.mediabuilder.com">MediaBuilder</A><BR> </NOBR></FONT></TD></TR></TABLE></TD></TR></TABLE></P>
- <P></P>
-</TD><TD valign="top" align="left"><FONT color="#000000"> <TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Who Bought Linux.Net?</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=linux"><IMG src="image4" width="60" height="70" border="0" align="right" hspace="20" vspace="10" alt="Linux"></A> <B>Posted by <A href="http://CmdrTaco.net">CmdrTaco</A> on Saturday January 29, @10:52AM</B><BR> <FONT size="2"><B>from the this-game-again dept.</B></FONT><BR> So Fred VanKampen (who has to hold the record for most money made by reselling two domain names) e-mailed us to say that the Domain Name for 'Linux.Net' has been sold. He won't say to whom, but it supposedly will be announced at LinuxWorld next week. Of course we have no idea what he got for the entry, but the rumors were that he made several million when he sold <A href="http://www.linux.com">Linux.com</A> to <A href="http://www.valinux.com">VA Linux</A>. Hopefully he'll take me for a ride in his yacht. ;) <P><B>( </B><A href="http://slashdot.org/articles/00/01/29/0837235.shtml"><B>Read More...</B></A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/29/0837235&mode=thread&threshold=0">58</A> of <A href="http://slashdot.org/article.pl?sid=00/01/29/0837235&mode=thread&threshold=-1">62</A> </B>comments <B>)</B> <P><TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Book Reviews: E-Mails from (Over?) The Edge</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=news"><IMG src="image5" width="34" height="44" border="0" align="right" hspace="20" vspace="10" alt="News"></A> <B>Posted by <A href="http://hemos.net">Hemos</A> on Saturday January 29, @10:43AM</B><BR> <FONT size="2"><B>from the touching-story dept.</B></FONT><BR> I'd like to thank the author of this book for sending it to me. Nick's written a book that's touching and endearing, and one that's well worth reading for everyone who's ever had social struggles to deal with. As well, his involvement with the fine folks of <a href="http://www.thevenue.org">TheVenue</a>. I'll warn you - it's not a tech text. But it's still worth reading. Click below to read more. <P><B>( </B><A href="http://slashdot.org/books/00/01/24/1146250.shtml"><B>Read More...</B></A> | <A href="http://slashdot.org/article.pl?sid=00/01/24/1146250&mode=nocomment">6197 bytes in body</A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/24/1146250&mode=thread&threshold=0">6</A> of <A href="http://slashdot.org/article.pl?sid=00/01/24/1146250&mode=thread&threshold=-1">22</A> </B>comments <B>)</B> <P><TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Linux Kernel 2.3.41</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=linux"><IMG src="image4" width="60" height="70" border="0" align="right" hspace="20" vspace="10" alt="Linux"></A> <B>Posted by <A href="http://CmdrTaco.net">CmdrTaco</A> on Saturday January 29, @10:21AM</B><BR> <FONT size="2"><B>from the download-compile-reboot-repeat dept.</B></FONT><BR> <A href="mailto:bwhitehead@nospam.acm.org">sdriver</A> writes <I>"For those of us who enjoy *panic*, *oops*, and suddenly seeing their video BIOS... the newest version is out! Be the first on your block to submit a new patch! ;) "</I> If you don't know where to get it, you probably should stick to your warm and cuddly 2.2.x kernel *grin*. Now outta my way, I wanna crash my laptop! <P><B>( </B><A href="http://slashdot.org/articles/00/01/29/0834223.shtml"><B>Read More...</B></A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/29/0834223&mode=thread&threshold=0">52</A> of <A href="http://slashdot.org/article.pl?sid=00/01/29/0834223&mode=thread&threshold=-1">57</A> </B>comments <B>)</B> <P><TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Congress Still Figuring Out E-Mail</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=usa"><IMG src="image6" width="80" height="61" border="0" align="right" hspace="20" vspace="10" alt="United States"></A> <B>Posted by <A href="mailto:roblimo@slashdot.org">Roblimo</A> on Saturday January 29, @07:28AM</B><BR> <FONT size="2"><B>from the voice-of-the-people-can-get-awfully-loud dept.</B></FONT><BR> Jett writes <I>" <A href="http://www.vote.com/">Vote.com</A> has <A href="http://www.vote.com/magazine/editorials/editorial1843752.phtml">an interesting article</A> in their Webmag Fifth Estate about how congressmen have responded to the popularity of e-mail in their daily operations. Quote: 'Of the 440 voting and non-voting House of Representatives members, 22 have no e-mail at all. Even House Speaker Dennis Hastert is wired only halfway -- his office receives e-mail, but does not respond to it. And while all U.S. senators have e-mail, they, like their House counterparts, routinely shun non-constituent mail -- even though they chair committees whose decisions affect the entire country.'"</I> <P><B>( </B><A href="http://slashdot.org/articles/00/01/28/2311232.shtml"><B>Read More...</B></A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/28/2311232&mode=thread&threshold=0">66</A> of <A href="http://slashdot.org/article.pl?sid=00/01/28/2311232&mode=thread&threshold=-1">66</A> </B>comments <B>)</B> <P><TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Ask Slashdot: Sci Fi Literature 101?</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=ed"><IMG src="image7" width="87" height="64" border="0" align="right" hspace="20" vspace="10" alt="Education"></A> <B>Posted by <A href="http://exit118.com/">Cliff</A> on Saturday January 29, @06:56AM</B><BR> <FONT size="2"><B>from the recommendations-wanted dept.</B></FONT><BR> ohlaadee asks: <I>"My niece (she's 13) wants to start reading science fiction. I do too. I gave us both Asimov's </I>_The Foundation_<I>&nbsp; for Christmas. We'll read it together. I suppose we could spend the rest of our lives just reading Asimov, but I'm wondering what books and movies you folks would come up with? What does the /. recommended Science Fiction 101 list include?"</I> <P><B>( </B><A href="http://slashdot.org/askslashdot/00/01/22/1946244.shtml"><B>Read More...</B></A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/22/1946244&mode=thread&threshold=0">345</A> of <A href="http://slashdot.org/article.pl?sid=00/01/22/1946244&mode=thread&threshold=-1">345</A> </B>comments <B>)</B> <P><TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Could Distributed.Net Help the Mars Polar Lander?</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=space"><IMG src="image8" width="73" height="59" border="0" align="right" hspace="20" vspace="10" alt="Space"></A> <B>Posted by <A href="mailto:roblimo@slashdot.org">Roblimo</A> on Saturday January 29, @03:35AM</B><BR> <FONT size="2"><B>from the food-for-thought dept.</B></FONT><BR> Anonymous Coward writes <I>"This official JPL <A href="http://mpfwww.jpl.nasa.gov/msp98/news/mpl000127.html">press release</A> describes the current attempt to listen for faint signals from the Mars Lander. They get three windows a day, and it takes 18 hours to process data because the signal is so weak (if it's really there). Too bad they don't have a deal with <A href="http://www.distributed.net"> distributed.net</A>."</I> Interesting thought. Is anyone at distributed.net or JPL interested in pursuing it? <P><B>( </B><A href="http://slashdot.org/articles/00/01/28/2318246.shtml"><B>Read More...</B></A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/28/2318246&mode=thread&threshold=0">99</A> of <A href="http://slashdot.org/article.pl?sid=00/01/28/2318246&mode=thread&threshold=-1">102</A> </B>comments <B>)</B> <P><TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>iCrave TV Loses Battle against U.S. Broadcasters</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=tv"><IMG src="image10" width="50" height="50" border="0" align="right" hspace="20" vspace="10" alt="Television"></A> <B>Posted by <A href="mailto:roblimo@slashdot.org">Roblimo</A> on Saturday January 29, @12:21AM</B><BR> <FONT size="2"><B>from the shut-down-just-before-the-super-bowl dept.</B></FONT><BR> <A href="mailto:doran@brandx.net">Doran</A> writes <I>"C|Net has <a href="http://news.cnet.com/news/0-1004-200-1535528.html">this story</a> about how the Canadian company <a href="http://www.icravetv.com">iCraveTV.com</a> has lost its latest battle in U.S. courts over whether it can rebroadcast TV signals over the Web. The broadcasters say it's theft, while iCraveTV sez it's just doing what's legal for other cable TV companies in Canada (ie. rebroadcasting TV). Of course, by framing the streaming video iCraveTV is doing more than just rebroadcasting, they're also adding more commercial content, which the broadcasters feel dilutes their TV commercials. "</I> <P><B>( </B><A href="http://slashdot.org/articles/00/01/29/0010203.shtml"><B>Read More...</B></A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/29/0010203&mode=thread&threshold=0">152</A> of <A href="http://slashdot.org/article.pl?sid=00/01/29/0010203&mode=thread&threshold=-1">170</A> </B>comments <B>)</B> <P><TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Win2k Security holes found</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=microsoft"><IMG src="image11" width="75" height="55" border="0" align="right" hspace="20" vspace="10" alt="Microsoft"></A> <B>Posted by <A href="mailto:heunique@slashdot.org">HeUnique</A> on Friday January 28, @04:58PM</B><BR> <FONT size="2"><B>from the and-it's-not-even-out-yet dept.</B></FONT><BR> According to a story posted by <a href="http://www.zdnn.com">ZDNN</a>, <a href="http://www.zdnet.com/zdnn/stories/news/0,4586,2429334,00.html?chkpt=zdnntop">two security holes</a> have been found on Windows 2000, and that's even before the official release of Windows 2000! Administrators who rush to incorporate the patch from MS beware - according to one of the talkback posts on ZDNN, the patch creates a new problem with Windows 2000 news server service. <P><B>( </B><A href="http://slashdot.org/articles/00/01/28/1653228.shtml"><B>Read More...</B></A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/28/1653228&mode=thread&threshold=0">510</A> of <A href="http://slashdot.org/article.pl?sid=00/01/28/1653228&mode=thread&threshold=-1">534</A> </B>comments <B>)</B> <P><TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Encryption Debate at Mitnick Trial</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=encryption"><IMG src="image12" width="80" height="70" border="0" align="right" hspace="20" vspace="10" alt="Encryption"></A> <B>Posted by <A href="http://hemos.net">Hemos</A> on Friday January 28, @03:33PM</B><BR> <FONT size="2"><B>from the gimmie-the-data dept.</B></FONT><BR> A number of people have written about <A HREF="http://nytimes.com/library/tech/00/01/cyber/cyberlaw/28law.html">the latest twist</a> in the Mitnick case. Kevin wants to get his data back, but the government is refusing to do so until he gives them the key. Apparently, the government is unable to crack the encryption that he's got on it - you'd think after having the data for five years, they'd be able to brute-force the darn thing. It's a NYT article - free login required. <P><B>( </B><A href="http://slashdot.org/articles/00/01/28/1320253.shtml"><B>Read More...</B></A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/28/1320253&mode=thread&threshold=0">504</A> of <A href="http://slashdot.org/article.pl?sid=00/01/28/1320253&mode=thread&threshold=-1">521</A> </B>comments <B>)</B> <P><TABLE width="99%" cellpadding="0" cellspacing="0" border="0"><TR><TD valign="top" bgcolor="#006666"><IMG src="image9" width="13" height="16" alt="" align="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Forum: Future Ports of Games to Linux</B></FONT></TD> </TR></TABLE><A href="http://slashdot.org/search.pl?topic=games"><IMG src="image13" width="80" height="56" border="0" align="right" hspace="20" vspace="10" alt="Games"></A> <B>Posted by <A href="http://CmdrTaco.net">CmdrTaco</A> on Friday January 28, @02:26PM</B><BR> <FONT size="2"><B>from the it's-been-awhile dept.</B></FONT><BR> It's been a long time since I posted an open forum like this, but I'm curious what people think on this one. What games do you most want to see ported to Linux in the next few months? Of course, for me personally it's StarCraft and Diablo 2, but I'm curious what games have come out or are due soon that people would most like to see a port of (and note that WINE doesn't count. ;) <P><B>( </B><A href="http://slashdot.org/articles/00/01/28/1257211.shtml"><B>Read More...</B></A> | <B><A href="http://slashdot.org/article.pl?sid=00/01/28/1257211&mode=thread&threshold=0">648</A> of <A href="http://slashdot.org/article.pl?sid=00/01/28/1257211&mode=thread&threshold=-1">652</A> </B>comments <B>)</B> <P></TD><TD width="210" align="center" valign="top"><TABLE cellpadding="1" cellspacing="0" border="0" width="200" align="center"> <TR bgcolor="#006666"> <TD valign="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B><A HREF="/index.pl?section=features"><FONT COLOR="#FFFFFF">Features</FONT></A></B></FONT></TD> </TR><TR><TD bgcolor="#CCCCCC"><FONT color="#000000" size="2"><A href="/vote.pl">Voting has begun</A> for the $100k <A href="/index.pl?section=awards">Slashdot Beanie Awards</A>. Talk amongst yourselves and choose who deserves the cash. <P>The latest installment of <A href="http://www.thesync.com/geeks">Geeks in Space</A> is up at <A href="http://www.thesync.com">The Sync</A>. Listen to CmdrTaco, Hemos, and Nate talk about the latest events to happen - or not happen in the computer world. <P>Perhaps you are seeking Jon Katz's series of articles related to recent events in Colorado. These articles include <A href="/article.pl?sid=99/04/25/1438249">Voices from the Hellmouth</A>, <A href="/article.pl?sid=99/04/27/0310247">More Stories from the Hellmouth</A> or <A href="/article.pl?sid=99/04/29/0124247">The Price of Being Different</A>, <P>For something different, try reading a little essay <A href="/article.pl?sid=99/03/31/0137221">Thoughts from the Furnace</A> about the internet, and flame. <p> And for a bit of an amusing take on the Open Source world, check out <a href="/article.pl?sid=99/08/24/1327256&mode=thread">Open Source as an Ant Farm</a> <P><B>Update: 01/03 03:10</B> by <B><A href="http://cowboyneal.org">CowboyNeal</a></B>: <P align="right"><B><A href="/features/">Past Features</A></B> <!-- end="end" features="features" block="block" --></FONT></TD> </TR> </TABLE><P> <TABLE cellpadding="1" cellspacing="0" border="0" width="200" align="center"> <TR bgcolor="#006666"> <TD valign="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B><A HREF="http://slashdot.org/index.pl?section=askslashdot"><FONT COLOR="#FFFFFF">Ask Slashdot</FONT></A></B></FONT></TD> </TR><TR><TD bgcolor="#CCCCCC"><FONT color="#000000" size="2"><li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/1946244">Sci Fi Literature 101?</A> <li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/192226">Linux and Satellite Internet Services</A> <li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/1843258">Open Defensive Patents?</A> <li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/1825252">Technologies That Shaped the Last Century?</A> <li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/1958212">Disk Repair Tools for Linux?</A> <li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/1955215">Why Can't the Command-Line be More Standardized?</A> <li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/1928235">Packet Radio Networking with PalmOS?</A> <li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/1817211">Cheap Rackmount Enclosures/Systems?</A> <li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/1950249">Open Source Software and Tax Breaks?</A> <li><A HREF="http://slashdot.org/article.pl?sid=00/01/22/1917207">Building an Upgradable Dual Processor System</A> <P> if you have a question for Ask Slashdot, send it to <A href="mailto:askslashdot@slashdot.org">askslashdot@slashdot.org</A></FONT></TD> </TR> </TABLE><P> <TABLE cellpadding="1" cellspacing="0" border="0" width="200" align="center"> <TR bgcolor="#006666"> <TD valign="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B><A HREF="/users.pl"><FONT COLOR="#FFFFFF">Slashdot Login</FONT></A></B></FONT></TD> </TR><TR><TD bgcolor="#CCCCCC"><FONT color="#000000" size="2"><FORM action="/users.pl" METHOD="POST"> <B>Nickname:</B><BR> <INPUT type="text" name="unickname" size="20" value=""><BR> <B>Password:</B><BR> <INPUT type="hidden" name="returnto" value="index.pl"> <INPUT type="password" name="upasswd" size="20"><BR> <INPUT type="submit" name="op" value="userlogin"> </FORM> Don't have an account yet? <A href="/users.pl">Go Create One</A>. A user account will allow you to customize all these <A href="/cheesyportal.shtml">nutty little boxes</A>, tailor the stories you see, as well as remember your comment viewing preferences.</FONT></TD> </TR> </TABLE><P> <TABLE cellpadding="1" cellspacing="0" border="0" width="200" align="center"> <TR bgcolor="#006666"> <TD valign="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Slashdot Poll</B></FONT></TD> </TR><TR><TD bgcolor="#CCCCCC"><FONT color="#000000" size="2"><FORM action="http://slashdot.org/pollBooth.pl"> <INPUT type="hidden" name="qid" value="techadvance"> <B>The Tech Advance I Most Want Is:</B><BR><INPUT type="radio" name="aid" value="1">Nanotechnology<BR><INPUT type="radio" name="aid" value="2">Cold Fusion<BR><INPUT type="radio" name="aid" value="3">Powerful Fuel Cells<BR><INPUT type="radio" name="aid" value="4">Hard Wiring my Body<BR><INPUT type="radio" name="aid" value="5">Universal Strong Crypto<BR><INPUT type="radio" name="aid" value="6">Interstellar Travel<BR><INPUT type="radio" name="aid" value="7">Cybernetic Body Armor<BR><INPUT type="radio" name="aid" value="8">ColecoVision<BR><INPUT type="submit" value="Vote"> [ <A href="http://slashdot.org/pollBooth.pl?qid=techadvance&aid=-1"><B>Results</B></A> | <A href="http://slashdot.org/pollBooth.pl?"><B>Polls</B></A> ] <BR>Comments:<B>656</B> | Votes:<B>29121</B></FORM> </FONT></TD> </TR> </TABLE><P> <TABLE cellpadding="1" cellspacing="0" border="0" width="200" align="center"> <TR bgcolor="#006666"> <TD valign="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Older Stuff</B></FONT></TD> </TR><TR><TD bgcolor="#CCCCCC"><FONT color="#000000" size="2"><P><B><A href="http://slashdot.org/index.pl?section=&issue=730512&mode=thread"><FONT size="4">Friday</FONT></A> January 28</B> <LI><A href="http://slashdot.org/articles/00/01/28/1110258.shtml">Abstract Programming and GPL Enforcement</A> (235) <LI><A href="http://slashdot.org/interviews/00/01/28/1225206.shtml">Interview: FreeDOS Leader Jim Hall Answers</A> (86) <LI><A href="http://slashdot.org/articles/00/01/28/116240.shtml">Open Source's Achilles Heel</A> (466) <LI><A href="http://slashdot.org/features/00/01/26/1915230.shtml">The Virtue of Communal Instincts</A> (237) <LI><A href="http://slashdot.org/articles/00/01/28/0723223.shtml">Gartner Group Debunking Open Source Myths</A> (165) <LI><A href="http://slashdot.org/yro/00/01/28/0917229.shtml">DoubleClick Taken to Court</A> (310) <LI><A href="http://slashdot.org/articles/00/01/28/0718209.shtml">Updated Slash & Server 51</A> (81) <LI><A href="http://slashdot.org/articles/00/01/28/089230.shtml">XMMS 1.0.0 Released</A> (128) <LI><A href="http://slashdot.org/askslashdot/00/01/22/192226.shtml">Linux and Satellite Internet Services</A> (138) <LI><A href="http://slashdot.org/articles/00/01/27/1811221.shtml">UN Wants to Combat Online Racism</A> (531) <P><B><A href="http://slashdot.org/index.pl?section=&issue=730511&mode=thread"><FONT size="4">Thursday</FONT></A> January 27</B> <LI><A href="http://slashdot.org/yro/00/01/27/2330205.shtml">Crackdowns, Fools and the MPAA</A> (351) <LI><A href="http://slashdot.org/articles/00/01/27/0832215.shtml">Heroes of Might and Magic III Demo Released</A> (157) <LI><A href="http://slashdot.org/science/00/01/27/1345241.shtml">Sandia Labs Venture Into Nanotechnology</A> (117) <LI><A href="http://slashdot.org/articles/00/01/27/0931237.shtml">CA Announces Program Ports to Linux</A> (195) <LI><A href="http://slashdot.org/interviews/00/01/27/1118251.shtml">Interview: Larry Augustin Finally Answers</A> (210) <LI><A href="http://slashdot.org/awards/00/01/27/0855252.shtml">Final Call for Voting in Slashdot's Beanie Awards</A> (178) <LI><A href="http://slashdot.org/features/00/01/26/197211.shtml">Transmeta Code Morphing != Just In Time</A> (449) <LI><A href="http://slashdot.org/books/00/01/24/1150256.shtml">Intrusion Detection</A> (65) <LI><A href="http://slashdot.org/science/00/01/27/0824239.shtml">Using Enzymes to Help Fight CO2 Build-Up</A> (165) <LI><A href="http://slashdot.org/articles/00/01/27/0712217.shtml">Jon Johansen on ABC World News Tonight</A> (415) <P align="right"><BR><A href="http://slashdot.org/search.pl?section=&min=30"><B>Older Articles</B></A><BR><A href="http://slashdot.org/index.pl?section=&mode=thread&issue=730512"><B>Yesterday's Edition</B></A> </FONT></TD> </TR> </TABLE><P> <TABLE cellpadding="1" cellspacing="0" border="0" width="200" align="center"> <TR bgcolor="#006666"> <TD valign="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B><A HREF="/index.pl?section=books"><FONT COLOR="#FFFFFF">Book Reviews</FONT></A></B></FONT></TD> </TR><TR><TD bgcolor="#CCCCCC"><FONT color="#000000" size="2"><p>Jon Katz, Resident Gasbag, has a new, very appropriate book coming out soon, <a href="http://www.thinkgeek.com">Geeks</a>. Preorder now and receive the book early. <p>For probably the best fiction read around, check out Neal Stephenson's <cite><a href="/article.pl?sid=99/06/23/139229&mode=thread">Cryptonomicon</a></cite>, an engaging read about WWII, cryptography and buried treasure. And data vaults. <p>If you've been doing a lot of work in Perl, you've probably figured out you really need <cite><a href="/article.pl?sid=99/05/10/2238254&mode=thread">Perl in a Nutshell</a></cite> or <cite><a href="/article.pl?sid=99/01/29/1035246&mode=thread">The Perl Cookbook</a></cite>. If you're still learning, grab <cite><a href="/books/older/980526096229.shtml">Programming Perl</a></cite>. <p>And if you want to learn more about how to become a better coder, grab <cite><a href="/article.pl?sid=99/06/28/1417229&mode=thread">The Unified Software Development Process</a></cite> or <cite><a href="/article.pl?sid=99/04/08/1512209&mode=thread">The Practice of Programming</cite></a> Additionally, check out <cite><a href="http://slashdot.org/article.pl?sid=99/09/16/1333202&mode=thread">Refactoring: Improving the Design of Existing Code</a></cite> . <p>Developing a large application? Grab Eric Greenberg's excellent <cite><a href="/article.pl?sid=99/07/13/1943258&mode=thread">Network Application Frameworks</cite></a>. <P>Visit <A href="/index.pl?section=books">Our Book Reviews Section</A> for more. <br> <B>Update: 11/12 05:19</B> by <B><A href="mailto:hemos@slashdot.org">H</A></B>:</FONT></TD> </TR> </TABLE><P> <TABLE cellpadding="1" cellspacing="0" border="0" width="200" align="center"> <TR bgcolor="#006666"> <TD valign="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B>Quick Links</B></FONT></TD> </TR><TR><TD bgcolor="#CCCCCC"><FONT color="#000000" size="2"><B>Cool Sites:</B> <LI><A href="http://www.linux.com">Linux.com</A> (What <B>is</B> Linux?) <LI><A href="http://everything.blockstackers.com">Everything</A> (Blow your Mind) <LI><A href="http://www.geekculture.com/geekycomics/Aftery2k/aftery2kmain.html">After Y2k</A> (<I>This</I> is Post-Apocalyptic?) <LI><A href="http://www.userfriendly.org">User Friendly</A> (Laugh) <LI><A href="http://themes.org">Themes.org</A> (Make X Perty) <P><B>Support Slashdot:</B> <LI><A href="http://www.thinkgeek.com">ThinkGeek</A> (Clothe Yourself in Slashdot) <LI><A href="http://cdnow.com/from=sr-302791">CDnow</A> (Support <A href="http://www.cdnow.com/gift/malda@slashdot.org">Rob's Who Habit</A>) <LI><A href="http://adfu.slashdot.org">Slashdot Advertiser Index</A></FONT></TD> </TR> </TABLE><P> <TABLE cellpadding="1" cellspacing="0" border="0" width="200" align="center"> <TR bgcolor="#006666"> <TD valign="top"><FONT size="4" color="#FFFFFF" face="arial,helvetica"><B><A HREF="http://freshmeat.net"><FONT COLOR="#FFFFFF">Freshmeat</FONT></A></B></FONT></TD> </TR><TR><TD bgcolor="#CCCCCC"><FONT color="#000000" size="2"><P><FONT size="4" color="#006666"><B>January</B></FONT><BR> <LI><A href="http://freshmeat.net/news/2000/01/29/949208399.html">We should get this out of the door now</A> <LI><A href="http://freshmeat.net/news/2000/01/29/949159642.html">Is Linux for Crazies?</A> <LI><A href="http://freshmeat.net/news/2000/01/29/949156343.html">SQN Linux 1.6</A> <LI><A href="http://freshmeat.net/news/2000/01/29/949156277.html">Limo 0.3.2</A> <LI><A href="http://freshmeat.net/news/2000/01/29/949156237.html">Fusion GS 1.3</A> <LI><A href="http://freshmeat.net/news/2000/01/29/949145887.html">MMR 1.5.4</A> <LI><A href="http://freshmeat.net/news/2000/01/29/949142835.html">KUPS 0.3.4</A> <LI><A href="http://freshmeat.net/news/2000/01/29/949142815.html">3DSE patch for XMMS 4</A> <LI><A href="http://freshmeat.net/news/2000/01/29/949139763.html">Linux 2.3.41</A> <LI><A href="http://freshmeat.net/news/2000/01/29/949139751.html">Free Code for Linux S/390</A> <FORM METHOD="post" ACTION="http://core.freshmeat.net/search.php3"> <FONT size="3" color="#006666"><B>Search Freshmeat:</B></FONT><BR> <INPUT TYPE="hidden" NAME="link" VALUE="freshmeat.net"> <INPUT TYPE="text" NAME="query"> </FORM> <P align="right"><A href="http://freshmeat.net"><B>More Meat...</B></A></FONT></TD> </TR> </TABLE><P> </FONT></TD>
- </TR>
- </TABLE><TABLE cellpadding="0" cellspacing="0" border="0" width="99%" align="center" bgcolor="ffffff">
- <TR>
- <TD colspan="4" align="center"><IMG src="image14" alt="" width="80%" height="1" hspace="10" vspace="30"></TD>
- </TR><TR>
- <TD align="center"><FONT size="2" face="arial,helvetica">
- <FORM method="GET" action="http://slashdot.org/search.pl">
- <INPUT type="name" name="query" value="" width="20" size="20" length="20">
- <INPUT type="submit" value="Search">
- </FORM>
- </FONT>
- </TD>
- <TD bgcolor="#ffffff" width="25"> &nbsp; </TD>
- <TD align="center">
- <FONT size="2" face="arial,helvetica"><I>Wasn't there something about a PASCAL programmer knowing the value of
-everything and the Wirth of nothing?
-<TD>&nbsp;</TD></I></FONT>
- </FONT>
- </TD></TR>
- <TR><TD colspan="4" align="center">
- <FONT size="1" color="#006666" face="arial,helvetica">
-
- All trademarks and copyrights on this
- page are owned by their respective owners. Comments
- are owned by the Poster.
- The Rest 1997-2000 <A href="http://Andover.Net">Andover.Net</A>.
-</FONT></CENTER>
- </TD>
- </TR>
- </TABLE>
- <CENTER>
- <FONT size="2" color="#006666">
-
- [ <A href="http://slashdot.org/"><Font color="#ffffff">home</FONT></A> |
- <A href="http://slashdot.org/awards.shtml"><Font color="#ffffff">awards</FONT></A> |
- <A href="http://slashdot.org/supporters.shtml"><FONT color="#ffffff">supporters</FONT></A> |
- <A href="http://CmdrTaco.net"><FONT color="#ffffff">rob's homepage</FONT></A> |
- <A href="http://slashdot.org/submit.pl"><FONT color="#ffffff">contribute story</FONT></A> |
- <A href="http://slashdot.org/search.pl"><FONT color="#ffffff">older articles</FONT></A> |
- <A href="http://Andover.Net"><FONT color="#ffffff">Andover.Net</FONT></A> |
- <A href="http://slashdot.org/advertising.shtml"><FONT color="#ffffff">advertising</FONT></A> |
- <A href="http://slashdot.org/pollBooth.pl"><FONT color="#ffffff">past polls</FONT></A> |
- <A href="http://slashdot.org/about.shtml"><FONT color="#ffffff">about</FONT></A> |
- <A href="http://slashdot.org/faq.shtml"><FONT color="#ffffff">faq</FONT></A> ]
- </FONT>
- </CENTER>
-</BODY>
-</HTML>
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image1 b/ext/tk/sample/tkextlib/tkHTML/page2/image1
deleted file mode 100644
index 2ed6ddcfe1..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image1
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image10 b/ext/tk/sample/tkextlib/tkHTML/page2/image10
deleted file mode 100644
index 3021b68990..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image10
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image11 b/ext/tk/sample/tkextlib/tkHTML/page2/image11
deleted file mode 100644
index 41d1fe3666..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image11
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image12 b/ext/tk/sample/tkextlib/tkHTML/page2/image12
deleted file mode 100644
index 655a686541..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image12
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image13 b/ext/tk/sample/tkextlib/tkHTML/page2/image13
deleted file mode 100644
index 97d5950e8c..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image13
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image14 b/ext/tk/sample/tkextlib/tkHTML/page2/image14
deleted file mode 100644
index 6d73ad833c..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image14
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image15 b/ext/tk/sample/tkextlib/tkHTML/page2/image15
deleted file mode 100644
index 90cc3b2b16..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image15
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image16 b/ext/tk/sample/tkextlib/tkHTML/page2/image16
deleted file mode 100644
index 93aa853cf1..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image16
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image17 b/ext/tk/sample/tkextlib/tkHTML/page2/image17
deleted file mode 100644
index f46f0308cd..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image17
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image18 b/ext/tk/sample/tkextlib/tkHTML/page2/image18
deleted file mode 100644
index 3badd5e909..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image18
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image19 b/ext/tk/sample/tkextlib/tkHTML/page2/image19
deleted file mode 100644
index bd4f6d9677..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image19
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image2 b/ext/tk/sample/tkextlib/tkHTML/page2/image2
deleted file mode 100644
index 7566dda25d..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image2
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image20 b/ext/tk/sample/tkextlib/tkHTML/page2/image20
deleted file mode 100644
index 358fa95f63..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image20
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image21 b/ext/tk/sample/tkextlib/tkHTML/page2/image21
deleted file mode 100644
index c81aa52588..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image21
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image22 b/ext/tk/sample/tkextlib/tkHTML/page2/image22
deleted file mode 100644
index 6cbd63022a..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image22
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image23 b/ext/tk/sample/tkextlib/tkHTML/page2/image23
deleted file mode 100644
index e8173a7456..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image23
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image24 b/ext/tk/sample/tkextlib/tkHTML/page2/image24
deleted file mode 100644
index bffd4b4956..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image24
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image25 b/ext/tk/sample/tkextlib/tkHTML/page2/image25
deleted file mode 100644
index c656fa4f30..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image25
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image26 b/ext/tk/sample/tkextlib/tkHTML/page2/image26
deleted file mode 100644
index bc93fdb259..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image26
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image27 b/ext/tk/sample/tkextlib/tkHTML/page2/image27
deleted file mode 100644
index 6ad0eff1e7..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image27
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image28 b/ext/tk/sample/tkextlib/tkHTML/page2/image28
deleted file mode 100644
index 88f0d7cea6..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image28
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image29 b/ext/tk/sample/tkextlib/tkHTML/page2/image29
deleted file mode 100644
index e0704183b3..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image29
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image3 b/ext/tk/sample/tkextlib/tkHTML/page2/image3
deleted file mode 100644
index ac3fa33e6f..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image3
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image30 b/ext/tk/sample/tkextlib/tkHTML/page2/image30
deleted file mode 100644
index 4a41950434..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image30
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image31 b/ext/tk/sample/tkextlib/tkHTML/page2/image31
deleted file mode 100644
index 60f13ed564..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image31
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image32 b/ext/tk/sample/tkextlib/tkHTML/page2/image32
deleted file mode 100644
index 04ddc4e8d7..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image32
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image33 b/ext/tk/sample/tkextlib/tkHTML/page2/image33
deleted file mode 100644
index c1ecfff6c4..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image33
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image34 b/ext/tk/sample/tkextlib/tkHTML/page2/image34
deleted file mode 100644
index 3dfd5d76e2..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image34
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image35 b/ext/tk/sample/tkextlib/tkHTML/page2/image35
deleted file mode 100644
index aea44f3017..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image35
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image36 b/ext/tk/sample/tkextlib/tkHTML/page2/image36
deleted file mode 100644
index baef0e0380..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image36
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image37 b/ext/tk/sample/tkextlib/tkHTML/page2/image37
deleted file mode 100644
index 6c6ba52b45..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image37
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image38 b/ext/tk/sample/tkextlib/tkHTML/page2/image38
deleted file mode 100644
index e298e04b29..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image38
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image39 b/ext/tk/sample/tkextlib/tkHTML/page2/image39
deleted file mode 100644
index e16e2f10d5..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image39
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image4 b/ext/tk/sample/tkextlib/tkHTML/page2/image4
deleted file mode 100644
index 9e5e46b7e5..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image4
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image5 b/ext/tk/sample/tkextlib/tkHTML/page2/image5
deleted file mode 100644
index 646a6d9a51..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image5
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image6 b/ext/tk/sample/tkextlib/tkHTML/page2/image6
deleted file mode 100644
index 7df417c710..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image6
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image7 b/ext/tk/sample/tkextlib/tkHTML/page2/image7
deleted file mode 100644
index 0e6ac10aff..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image7
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image8 b/ext/tk/sample/tkextlib/tkHTML/page2/image8
deleted file mode 100644
index ba7fb476b9..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image8
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/image9 b/ext/tk/sample/tkextlib/tkHTML/page2/image9
deleted file mode 100644
index b1cad73ae9..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/image9
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page2/index.html b/ext/tk/sample/tkextlib/tkHTML/page2/index.html
deleted file mode 100644
index 1c67be6c0b..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page2/index.html
+++ /dev/null
@@ -1,433 +0,0 @@
-<html>
-<head>
- <title>Tcl Resource Center</title>
-</head>
-
-<body bgcolor="white" text="black">
-
- <!-- MenuTopLevel Resource Software Extensions -->
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="120" valign="TOP"><a href="/"><img src="image1" width="120" height="79" alt="Scriptics" border="0"></a></td>
- <td valign="top" width="548">
-
- <!-- Table to hold tabs -->
- <table cellpadding="0" cellspacing="0" border="0" width="548">
- <tr>
- <td valign="top" align="right" colspan="15" width="548"><a name="TOP"><img src="image2" width="548" height="9" alt="Tcl/Tk" border="0"></a></td>
- </tr>
- <tr>
- <td valign="top" align="right" colspan="15" width="548"><img src="image3" width="482" height="34" alt="Scripting Solutions for eBusiness Integration" border="0"></td>
- </tr>
- <tr>
- <td width="18" valign="TOP"><img src="image4" width="18" height="36" alt="" border="0"></td>
- <td width="58"><a href="/products/" onMouseOver="msover(4, 'http://images.scriptics.com/images/ProductsMouseOff.gif') ; return true ;" onMouseOut="msover(4, 'http://images.scriptics.com/images/ProductsOff.gif') ; return true ;"><img src="image5" width="58" height="36" alt="Products" border="0"></a></td>
- <td width="14" valign="TOP"><img src="image6" width="14" height="36" alt="" border="0"></td>
- <td width="69"><a href="/customers/" onMouseOver="msover(6, 'http://images.scriptics.com/images/CustomersMouseOff.gif') ; return true ;" onMouseOut="msover(6, 'http://images.scriptics.com/images/CustomersOff.gif') ; return true ;"><img src="image7" width="69" height="36" alt="Customers" border="0"></a></td>
- <td width="14" valign="TOP"><img src="image6" width="14" height="36" alt="" border="0"></td>
- <td width="60"><a href="/partners/" onMouseOver="msover(8, 'http://images.scriptics.com/images/PartnersMouseOff.gif') ; return true ;" onMouseOut="msover(8, 'http://images.scriptics.com/images/PartnersOff.gif') ; return true ;"><img src="image8" width="60" height="36" alt="Partners" border="0"></a></td>
- <td width="14" valign="TOP"><img src="image6" width="14" height="36" alt="" border="0"></td>
- <td width="56"><a href="/services/" onMouseOver="msover(10, 'http://images.scriptics.com/images/ServicesMouseOff.gif') ; return true ;" onMouseOut="msover(10, 'http://images.scriptics.com/images/ServicesOff.gif') ; return true ;"><img src="image9" width="56" height="36" alt="Services" border="0"></a></td>
- <td width="14" valign="TOP"><img src="image10" width="14" height="36" alt="" border="0"></td>
- <td width="88"><a href="/resource/" onMouseOver="msover(12, 'http://images.scriptics.com/images/ResourceMouseOn.gif') ; return true ;" onMouseOut="msover(12, 'http://images.scriptics.com/images/ResourceOn.gif') ; return true ;"><img src="image11" width="88" height="36" alt="Tcl Resources" border="0"></a></td>
- <td width="14" valign="TOP"><img src="image12" width="14" height="36" alt="" border="0"></td>
- <td width="57"><a href="/company/" onMouseOver="msover(14, 'http://images.scriptics.com/images/CompanyMouseOff.gif') ; return true ;" onMouseOut="msover(14, 'http://images.scriptics.com/images/CompanyOff.gif') ; return true ;"><img src="image13" width="57" height="36" alt="Company" border="0"></a></td>
- <td width="8" valign="TOP"><img src="image14" width="8" height="36" alt="" border="0"></td>
- <td width="50" valign="TOP"><img src="image15" width="50" height="36" alt="" border="0"></td>
- <td width="14" valign="TOP"><img src="image16" width="14" height="36" alt="" border="0"></td>
- </tr>
- </table>
- </td>
- </tr>
- </table> <script language="Javascript">
- <!--
- function msover(num, file )
- {
- old = (((navigator.appName=='Netscape') &&
- (parseInt(navigator.appVersion)<=3.0 )))
- if ( !old ) {
- document.images[num].src=file
- }
- }
- //-->
- </SCRIPT>
-
-<!-- MenuSubLevel Resource Software Extensions Tk -->
-
-<table cellpadding="0" cellspacing="0" border="0">
-
-<!-- Left Hand Column-->
-
-<tr><td valign="top" width="120"><table cellpadding="0" cellspacing="0" border="0" width="120">
- <tr>
- <td width="120" valign="TOP"><img src="image17" width="120" height="4" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/software/"><img src="image18" width="120" height="11" alt="Software" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image19" width="120" height="4" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/software/tcltk/"><img src="image20" width="120" height="11" alt="Tcl/Tk Core" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image19" width="120" height="4" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/software/applications/"><img src="image21" width="120" height="11" alt="Applications" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image22" width="120" height="4" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/software/extensions/"><img src="image23" width="120" height="11" alt="Extensions" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image24" width="120" height="6" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/software/patches/"><img src="image25" width="120" height="11" alt="Patches" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image19" width="120" height="4" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/software/java/"><img src="image26" width="120" height="11" alt="Tcl &amp; Java" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image19" width="120" height="4" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/software/ports/"><img src="image27" width="120" height="11" alt="Tcl/Tk Ports" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image19" width="120" height="4" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/software/tools/"><img src="image28" width="120" height="11" alt="Tools" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image29" width="120" height="6" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/doc/"><img src="image30" width="120" height="11" alt="Documentation" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image31" width="120" height="5" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/resource/community/"><img src="image32" width="120" height="11" alt="Community" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image31" width="120" height="5" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/live/bydate"><img src="image33" width="120" height="11" alt="What's New" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image31" width="120" height="5" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/forms/urlnote.html"><img src="image34" width="120" height="11" alt="Add URL" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image31" width="120" height="5" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/live/keyword"><img src="image35" width="120" height="11" alt="Keyword Search" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image31" width="120" height="5" alt="" border="0"></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><a href="/live/sitemap"><img src="image36" width="120" height="11" alt="Index" border="0"></a></td>
- </tr>
- <tr>
- <td width="120" valign="TOP"><img src="image37" width="120" height="6" alt="" border="0"></td>
- </tr>
-</table><!-- End Left Column --></td><!-- Right Hand Column --><td valign="top" width="548" align="left"><table cellpadding="0" cellspacing="0" border="0" width="548">
- <tr>
- <td width="295" valign="TOP"><img src="image38" width="295" height="42" alt="Resource" border="0"></td>
- <td width="187" valign="bottom" align="right"><FORM action="/live/keyword"><img src="image39" width="46" height="24" alt="" border="0"><INPUT TYPE="TEXT" SIZE="10" MAXLENGTH="35" NAME="keywords"><INPUT type="IMAGE" border="0" img="img" src="http://images.scriptics.com/images/Go.gif" value="submit" width="33" height="24"></FORM>
- </tr>
- </table>
- <!-- 2 Columns for spacer -->
- <table cellpadding="0" cellspacing="0" border="0" width="548">
- <tr>
- <!-- Spacer Column -->
- <td valign="top" width="10">
- &nbsp;
- </td>
-
-
- <td valign="top" width="548"><font face="Geneva, Helvetica, Arial" size="2"><h1>Tcl Resource Center</h1>
-<font size="+1"><a href="/resource/">Top</a>&gt;<a href="/resource/software/" ="">Software Central</a>&gt;<a href="/resource/software/extensions/" ="">Extensions</a>&gt;Tk Widgets</font><font size="-1"><br>Viewed by name (<a href="/resource/software/extensions/tk/?sortby=date">By date</a>)</font><br>
-<p>Tk is a toolkit for building graphical user interfaces with Tcl.
- Your Tcl/Tk scripts run on UNIX, Windows, and Macintosh.<p>
-<font face="Geneva, Helvetica, Arial"><ul></ul></font><dl>
-<dt><b><a href="http://marge.phys.washington.edu/%7Ezager/blt80-unoff-exe.zip" ="">BLT 8.0 Unofficial zip and DLL</a></b>
-<dd>This is a compiled version of BLT 8.0 "unofficial" for
-the Windows platform. <a href="/live/annotate?url=http%3a%2f%2fmarge%2ephys%2ewashington%2eedu%2f%257Ezager%2fblt80%2dunoff%2dexe%2ezip">Edit</a>
- <i><font size="-1">(September 24, 1999 06:31)</font></i><dt><b><a href="ftp://ftp.neosoft.com/languages/tcl/sorted/unknown/blt8.0p2-unoff.tgz" ="">BLT 8.0p2 Unofficial tar file</a><a name="bltunoff"></a></b>
-<dd>This is a contributed patch to make BLT compatible with Tcl/Tk 8.0p2. While still "unofficial", it is widely used.
- Make sure you get the 8.0p2 version because the 8.0 version does
- not compile under windows.
- There is also a <a href="ftp://ftp.neosoft.com/languages/sorted/devel/blt2.3-8.1.tar.gz">2.3-8.1 version</a> that has been patched to work with 8.1.
- <a href="ftp://ftp.neosoft.com/languages/tcl/sorted/unknown/blt8.0p2-unoff.README">README file</a>. <a href="/live/annotate?url=ftp%3a%2f%2fftp%2eneosoft%2ecom%2flanguages%2ftcl%2fsorted%2funknown%2fblt8%2e0p2%2dunoff%2etgz">Edit</a>
- <i><font size="-1">(August 30, 1999 06:38)</font></i><dt><b><a href="http://www.tcltk.com/blt/" ="">BLT Home Page</a></b>
-<dd>
- Author <b>George Howlett</b>, Version <b>2.3</b>,
- Works with <b>Tk 4.1 through Tk 8.1</b>
-<br><a href="ftp://ftp.tcltk.com/pub/blt/">Download</a>, <a href="ftp://ftp.tcltk.com/pub/blt/BLT2.3.tar.gz">BLT2.3.tar.gz</a>, <a href="ftp://ftp.tcltk.com/pub/blt/BLT2.4h.tar.gz">BLT2.4h.tar.gz</a>, <a href="ftp://ftp.tcltk.com/pub/blt/BLT2.4i.tar.gz">BLT2.4i.tar.gz</a>, <a href="ftp://ftp.tcltk.com/pub/blt/blt2.4i-for-8.0.exe">blt2.4i-for-8.0.exe</a>, <a href="ftp://ftp.tcltk.com/pub/blt/blt2.4i-for-8.1.exe">blt2.4i-for-8.1.exe</a><br>BLT is a set of widgets for Tk, including a graph widget,
-bar chart, drag&drop, a simple command tracer, and much more.
-The 2.4 release, which is still under development, works with 8.0
-or higher.
-There are also an "<a href="#bltunoff">unofficial</a>" release for 8.0p2
-and 8.1a2 that were not done by the author. <a href="/live/annotate?url=http%3a%2f%2fwww%2etcltk%2ecom%2fblt%2f">Edit</a>
- <i><font size="-1">(October 26, 1999 09:43)</font></i><dt><b><a href="http://www.unifix-online.com/BWidget/index.html" ="">BWidget</a></b>
-<dd>A set of native Tk 8.x Widgets using Tcl8.x namespaces.
-The ToolKit is available under Unix/X11 and Windows.
-The BWidget(s) have a professional look&feel as in other
-well known Toolkits (Tix or Incr Widget) but the concept is
-radically different because everything is native
-so no platform compilation, no compiled extension
-library are needed. The code is 100 Pure Tcl/Tk.
-More 30 components : Notebook, PageManager, Tree, PanedWindow, ButtonBox,
-ScrollView, ComboBox, SpinBox, ListBox, SelectFont, SelectColor,
-ProgressBare ... <a href="/live/annotate?url=http%3a%2f%2fwww%2eunifix%2donline%2ecom%2fBWidget%2findex%2ehtml">Edit</a>
- <i><font size="-1">(September 06, 1999 09:58)</font></i><dt><b><a href="http://purl.oclc.org/net/nijtmans/dash.html" ="">Dash Patch for Tk</a></b>
-<dd>This patch has many enhancements to the Tk and its canvas
-widget, including dashed lines, smoothed polygons,
-and performance enhancements. <a href="/live/annotate?url=http%3a%2f%2fpurl%2eoclc%2eorg%2fnet%2fnijtmans%2fdash%2ehtml">Edit</a>
- <i><font size="-1">(November 21, 1999 06:33)</font></i><dt><b><a href="http://www.hwaci.com/sw/et" ="">Embedded Tk (et)</a></b>
-<dd>
- Author <b><a href="mailto:drh@acm.org" ="">Richard Hipp</a></b>, Version <b>8.0b5</b>,
- Works with <b>Tk 4.0, 4.1, 4.2, 8.0</b>
-<br>Download: <a href="http://www.hwaci.com/sw/et/et80b5.tar.gz">et80b5.tar.gz</a><br>Embedded Tk or ``ET'' is tool for making stand-alone executables out of a mixture of C or C++ and Tcl/Tk.
-Using ET you can invoke a short Tcl/Tk script in the middle of a C routine, or you can invoke a C routine in the
-middle of a Tcl/Tk script. ET also bundles external Tcl/Tk scripts (including the standard Tcl/Tk startup scripts)
-into the executable so that the executable can be run on another binary-compatible computer that doesn't have
-Tcl/Tk installed. <a href="/live/annotate?url=http%3a%2f%2fwww%2ehwaci%2ecom%2fsw%2fet">Edit</a>
- <i><font size="-1">(August 19, 1999 15:35)</font></i><dt><b><a href="http://www.purl.org/net/hobbs/tcl/script/tkcon/" ="">Enhanced Tk Console (TkCon)</a></b>
-<dd>
- Author <b><a href="mailto:jeffrey.hobbs@oen.siemens.de" ="">Jeff Hobbs</a></b>, Version <b>1.3</b>,
- Works with <b>Tk 4.1 through Tk 8.1</b>
-<br>Download: <a href="http://www.purl.org/net/hobbs/tcl/script/tkcon/tkcon.tar.gz">tkcon.tar.gz</a><br>TkCon is a replacement for the standard console that comes with Tk (on Windows/Mac, but also works on
-
-Unix). The console itself provides many more features than the standard console. <a href="/live/annotate?url=http%3a%2f%2fwww%2epurl%2eorg%2fnet%2fhobbs%2ftcl%2fscript%2ftkcon%2f">Edit</a>
- <i><font size="-1">(August 23, 1999 12:06)</font></i><dt><b><a href="http://www.scriptmeridian.org/projects/tk/" ="">Frontier-Tk ScriptMeridian project</a></b>
-<dd>This project seeks to integrate the Tk toolkit
-with the Frontier scripting language. <a href="/live/annotate?url=http%3a%2f%2fwww%2escriptmeridian%2eorg%2fprojects%2ftk%2f">Edit</a>
- <i><font size="-1">(August 19, 1999 15:36)</font></i><dt><b><a href="http://purl.oclc.org/net/nijtmans/img.html" ="">Img image format extension</a></b>
-<dd>This package enhances Tk, adding support for many other Image formats:
-BMP, XBM, XPM, GIF (with transparency), PNG,
-JPEG, TIFF and postscript.
-This is implemented as a shared library that can be dynamically loaded into
-Tcl/Tk.
- <a href="/live/annotate?url=http%3a%2f%2fpurl%2eoclc%2eorg%2fnet%2fnijtmans%2fimg%2ehtml">Edit</a>
- <i><font size="-1">(November 21, 1999 06:35)</font></i><dt><b><a href="http://purl.oclc.org/net/oakley/tcl/mclistbox/index.html" ="">mclistbox - a multi-column listbox widget</a></b>
-<dd>mclistbox is a multi-column listbox that is
-written in pure tcl and runs on all platforms
-that support tcl/tk 8.0 or higher. This widget
-requires no other extensions; it is completely
-standalone. <a href="/live/annotate?url=http%3a%2f%2fpurl%2eoclc%2eorg%2fnet%2foakley%2ftcl%2fmclistbox%2findex%2ehtml">Edit</a>
- <i><font size="-1">(August 19, 1999 15:37)</font></i><dt><b><a href="http://home.t-online.de/home/dshepherd/tkview.htm" ="">MFC views C++ class for embedding Tk</a></b>
-<dd>The idea of embedding Tk in MFC windows always seemed very enticing but information was sparse and contradictory - on a
- scale between "very easy" and "not yet possible". The only thing for it was to have a go and lo, it wasn't that hard after all.
- CTkView is a C++ class which can be used in MFC SDI or MDI applications. An instance of CTkView hosts an embedded Tk
- toplevel widget and performs some management chores for the widget so that it can size, update and react correctly to Windows
- events. <a href="/live/annotate?url=http%3a%2f%2fhome%2et%2donline%2ede%2fhome%2fdshepherd%2ftkview%2ehtm">Edit</a>
- <i><font size="-1">(August 19, 1999 15:38)</font></i><dt><b><a href="http://www.cs.umd.edu/hcil/pad++" ="">Pad++</a></b>
-<dd>
- Author <b><a href="mailto:pad-info@cs.umd.edu" ="">Ben Bederson et al</a></b>, Version <b>0.9p1</b>,
- Works with <b>8.0</b>
-<br>Download: <a href="http://www.cs.umd.edu/hcil/pad++/download.html">download.html</a><br>Pad++ is a Tk widget that provides a Zoomable User Interface (ZUI) that supports real-time interactive zoomable graphics in a fashion similar to the Tk Canvas widget. Pad++ supports tens of thousands of objects which include text, images, graphics, portals, lenses, simple html (and more), including transparency and rotation. <a href="/live/annotate?url=http%3a%2f%2fwww%2ecs%2eumd%2eedu%2fhcil%2fpad%2b%2b">Edit</a>
- <i><font size="-1">(August 19, 1999 15:39)</font></i><dt><b><a href="http://home.t-online.de/home/sesam.com/freeware.htm" ="">Progressbar</a></b>
-<dd>Progressbar is a megawidget written in pure tcl (ie: no compiling required - runs on all platforms Macintosh, Unix, Windows).
-Its primary purpose is to show the progress of any action in percent. <a href="/live/annotate?url=http%3a%2f%2fhome%2et%2donline%2ede%2fhome%2fsesam%2ecom%2ffreeware%2ehtm">Edit</a>
- <i><font size="-1">(January 24, 2000 09:19)</font></i><dt><b><a href="http://jfontain.free.fr/" ="">scwoop (Simple Composite Widget Object Oriented Package)</a></b>
-<dd>Scwoop is a composite widget (also known as mega widget) extension to the great Tk widget library. Scwoop is
-entirely written in Tcl using the stooop (Simple Tcl Only Object Oriented Programming) extension. <a href="/live/annotate?url=http%3a%2f%2fjfontain%2efree%2efr%2f">Edit</a>
- <i><font size="-1">(January 09, 2000 02:10)</font></i><dt><b><a href="http://www2.clearlight.com/~oakley/tcl/supertext.html" ="">Supertext - tk text widget with unlimited undo</a></b>
-<dd>
- Author <b><a href="mailto:oakley@channelpoint.com" ="">Bryan Oakley</a></b>, Version <b>1.0b1</b>,
- Works with <b>Tcl 8.0</b>
-<br>Download: <a href="http://www2.clearlight.com/~oakley/tcl/supertext.tcl">supertext.tcl</a><br>Supertext is a package that provides a tk text widget with full undo and the ability to execute procedures both before and after a text
-widget command has been processed. Supertext may be used as-is, or for the brave it may be used in place of the standard text
-widget. <a href="/live/annotate?url=http%3a%2f%2fwww2%2eclearlight%2ecom%2f%7eoakley%2ftcl%2fsupertext%2ehtml">Edit</a>
- <i><font size="-1">(August 23, 1999 12:06)</font></i><dt><b><a href="http://www.hwaci.com/sw/tk/nbpi.html" ="">Tabbed Notebook Widget</a></b>
-<dd>
- Author <b><a href="mailto:drh@acm.org" ="">Richard Hipp</a></b>, Version <b>1.0</b>,
- Works with <b>Tk 4.1 or later.</b>
-<br>Download: <a href="http://www.hwaci.com/sw/tk/notebook.tcl">notebook.tcl</a><br>This implements a tabbed notebook using
-a canvas widget and embedded frames.
-This is pure Tcl
-code - not a C extension. <a href="/live/annotate?url=http%3a%2f%2fwww%2ehwaci%2ecom%2fsw%2ftk%2fnbpi%2ehtml">Edit</a>
- <i><font size="-1">(August 23, 1999 12:08)</font></i><dt><b><a href="http://www.tcltk.com/ellson/ftp/Gdtclft2.0.README" ="">Tcl GD - graphics</a></b>
-<dd>
- Author <b>John Ellson and Spencer Thomas</b>, Version <b>2.0</b>,
- Works with <b>8.0 and higher</b>
-<br>Download: <a href="http://www.tcltk.com/ellson/ftp/Gdtclft2.0.tar.gz">Gdtclft2.0.tar.gz</a><br>
- Thomas Boutell's Gd package provides a convenient way to generate
- PNG images with a C program. If you prefer Tcl for CGI
- applications, you'll want the TCL GD extension. <a href="/live/annotate?url=http%3a%2f%2fwww%2etcltk%2ecom%2fellson%2fftp%2fGdtclft2%2e0%2eREADME">Edit</a>
- <i><font size="-1">(August 19, 1999 14:52)</font></i><dt><b><a href="http://www.stratasys.com/software/metagui" ="">The Meta-GUI Tools</a></b>
-<dd>The Meta-GUI tools provide a framework for quickly building full
-GUI applications. The GUI is rendered by a run-time engine
-based on a hierarchical set of definitions you provide. At the bottom
-of the hierarchy are abstract data types such as length, angle,
-string, etc., and these are used to progressively build up frames,
-dialogs, toolbars, menus, and operations. <a href="/live/annotate?url=http%3a%2f%2fwww%2estratasys%2ecom%2fsoftware%2fmetagui">Edit</a>
- <i><font size="-1">(August 23, 1999 12:10)</font></i><dt><b><a href="http://jfontain.free.fr/" ="">Tkpiechart Home Page</a></b>
-<dd>Tkpiechart is a Tcl-only extension that allows the programmer to create and dynamically update 2D or 3D pie
-charts in a Tcl/Tk application. This uses the stooop package and builds
-pie charts on a Tk canvas. <a href="/live/annotate?url=http%3a%2f%2fjfontain%2efree%2efr%2f">Edit</a>
- <i><font size="-1">(January 09, 2000 02:12)</font></i><dt><b><a href="http://www.cygnus.com/~irox/tkprint/" ="">TkPrint</a></b>
-<dd>TkPrint is an extension that allows you to print from a
- Tk widget. <a href="/live/annotate?url=http%3a%2f%2fwww%2ecygnus%2ecom%2f%7eirox%2ftkprint%2f">Edit</a>
- <i><font size="-1">(October 11, 1999 09:58)</font></i><dt><b><a href="http://www.purl.org/net/hobbs/tcl/capp/" ="">TkTable Home Page</a></b>
-<dd>The TkTable widget. The <code>table</code> command creates a
-2-dimensional grid of cells. The table can use a Tcl array variable or Tcl
-
-command for data storage and retrieval. <a href="/live/annotate?url=http%3a%2f%2fwww%2epurl%2eorg%2fnet%2fhobbs%2ftcl%2fcapp%2f">Edit</a>
- <i><font size="-1">(November 18, 1999 09:25)</font></i><dt><b><a href="http://ftp.austintx.net/users/jatucker/TkTextmatrix/default.htm" ="">TkTextMatrix (spreadsheet)</a></b>
-<dd>
- Author <b><a href="mailto:jatucker@austin.dsccc.com" ="">John Arthur Tucker</a></b>, Version <b>4.1</b>,
- Works with <b>Tk 4.1</b>
-<br>Download: <a href="http://ftp.austintx.net/users/jatucker/TkTextmatrix/download.htm">download.htm</a>, <a href="http://ftp.austintx.net/users/jatucker/TkTextmatrix/textmatrix4.1.tar.gz">textmatrix4.1.tar.gz</a><br>A Tcl/Tk spreadsheet widget, TkTextmatrix, which is implemented in C++ and is
- basically a Tk Canvas widget plus extra behavior for manipulating rows and columns of cell
- items many times faster than with a plain Tk Canvas. It actually inserts text nearly as fast
- as the Tk Text widget. If you work with or are interested in creating your own Tcl/Tk widgets
- in C++, you might want to take a look at the C++ widget library included with this
- distribution. <a href="/live/annotate?url=http%3a%2f%2fftp%2eaustintx%2enet%2fusers%2fjatucker%2fTkTextmatrix%2fdefault%2ehtm">Edit</a>
- <i><font size="-1">(August 23, 1999 12:14)</font></i><dt><b><a href="http://www.cs.umd.edu/~bederson/Togl.html" ="">ToGL - a Tk Open GL widget</a></b>
-<dd>Togl is a Tk widget for OpenGL rendering. Togl is based on OGLTK, originally written by Benjamin Bederson at the
-University of New Mexico (who has since moved to the University of Maryland). Togl adds the new features:
-<ul>
-<li> color-index mode support including color allocation functions
-<li> support for requesting stencil, accumulation, alpha buffers, etc
-<li> multiple OpenGL drawing widgets
-<li> OpenGL extension testing from Tcl
-<li> simple, portable font support
-<li> overlay plane support
-</ul>
-Togl allows one to create and manage a special Tk/OpenGL widget with Tcl and render into it with a C program. That is,
-a typical Togl program will have Tcl code for managing the user interface and a C program for computations and
-OpenGL rendering. <a href="/live/annotate?url=http%3a%2f%2fwww%2ecs%2eumd%2eedu%2f%7ebederson%2fTogl%2ehtml">Edit</a>
- <i><font size="-1">(August 23, 1999 12:14)</font></i><dt><b><a href="http://www.hwaci.com/sw/tk/treepi.html" ="">Tree Widget</a></b>
-<dd>This implements a tree display in a canvas widget.
-It is similar in layout to that of the
-Windows explorer file viewer. This is pure Tcl
-code - not a C extension. <a href="/live/annotate?url=http%3a%2f%2fwww%2ehwaci%2ecom%2fsw%2ftk%2ftreepi%2ehtml">Edit</a>
- <i><font size="-1">(September 29, 1999 14:37)</font></i><dt><b><a href="http://www.du.edu/~mschwart/tcl-tk.htm" ="">Windows Extensions for Tcl/Tk (Michael Schwartz)</a></b>
-<dd>This site has pointers to several extensions specific to the
-Windows platform. The extensions provide printing,
-a MAPI interface to send email, and an interface to manipulate
-.INI files, among other things. <a href="/live/annotate?url=http%3a%2f%2fwww%2edu%2eedu%2f%7emschwart%2ftcl%2dtk%2ehtm">Edit</a>
- <i><font size="-1">(October 07, 1999 10:50)</font></i><dt><b><a href="http://www.tcltk.com/iwidgets/" ="">[incr Widgets] Home Page</a></b>
-<dd>[incr Widgets] is a set of megawidgets (combo boxes, etc.) that are
-upon the [incr Tcl] object system and the [incr Tk] megawidget
-framework. This comes bundled with the
-<a href="http://www.tcltk.com/itcl/">[incr Tcl]</a> distributions. <a href="/live/annotate?url=http%3a%2f%2fwww%2etcltk%2ecom%2fiwidgets%2f">Edit</a>
- <i><font size="-1">(September 05, 1999 16:08)</font></i><dt><b><a href="http://www1.clearlight.com/~oakley/tcl/combobox/index.html" ="">combobox</a></b>
-<dd>
- Author <b><a href="mailto:oakley@channelpoint.com" ="">Bryan Oakley</a></b>, Version <b>1.03</b>,
- Works with <b>8.x</b>
-<br>Download: <a href="http://www1.clearlight.com/~oakley/tcl/combobox/combobox.tcl">combobox.tcl</a><br>combobox is a pure-tcl implementation of a combobox widget. It is
-entirely self contained and does not require any other OO or megawidget
-extension. It supports both editable and non-editable entries, and
-provides the ability to call a procedure anytime the value of the combobox
-changes. <a href="/live/annotate?url=http%3a%2f%2fwww1%2eclearlight%2ecom%2f%7eoakley%2ftcl%2fcombobox%2findex%2ehtml">Edit</a>
- <i><font size="-1">(August 23, 1999 12:15)</font></i><dt><b><a href="http://www.multimania.com/droche/rnotebook/index.html" ="">Rnotebook</a></b>
-<dd>
- Author <b><a href="mailto:dan@lectra.com" ="">Daniel Roche</a></b>, Version <b>1.0</b>,
- Works with <b>8.0 or higher</b>
-<br>Download: <a href="http://www.multimania.com/droche/rnotebook/index.html">index.html</a><br>This implements a resizeable notebook
-widget in pure tcl/tk <a href="/live/annotate?url=http%3a%2f%2fwww%2emultimania%2ecom%2fdroche%2frnotebook%2findex%2ehtml">Edit</a>
- <i><font size="-1">(August 19, 1999 15:39)</font></i><dt><b><a href="http://www.tregar.com/samdi.html" ="">saMDI v1.0a1 Multi-Document Interface Extension</a></b>
-<dd>A multi-document interface (MDI) extension for TCL/Tk 8.0.
-This is a common interface format in Microsoft Windows that lets a parent window contain multiple child windows.
-In effect you get a window manager inside a window!
-Uses and includes the STOOOP object-oriented extension by
-Jean-Luc Fontaine.
-saMDI v1.0a1 GPL Copyright 1998 Sam Tregar. <a href="/live/annotate?url=http%3a%2f%2fwww%2etregar%2ecom%2fsamdi%2ehtml">Edit</a>
- <i><font size="-1">(August 23, 1999 12:07)</font></i><dt><b><a href="http://tix.mne.com/htdocs/tix/index.html" ="">Tix Support Site</a></b>
-<dd>
- Author <b><a href="mailto:tix@mne.com" ="">Ioi Lam, (adopted by Gregg Squires)</a></b>, Version <b>4.1</b>,
- Works with <b>Tcl 7.4 through Tcl 8.0</b>
-<br><a href="ftp://ftp.tix.mne.com/pub/tix/">Download</a>, <a href="ftp://ftp.tix.mne.com/pub/tix/Tix4.1.0.006.tar.gz">Tix4.1.0.006.tar.gz</a>, <a href="ftp://ftp.tix.mne.com/pub/tix/Tix41p6.zip">Tix41p6.zip</a>, <a href="ftp://ftp.tix.mne.com/pub/tix/win41p6bin.zip">win41p6bin.zip</a><br><b>Tix has found a new home!</b>
- <br>
- Tix provides over 40 new Tk including the
-combo box, file selection dialogs, paned widget,
-notebook, hierarchical list, directory tree, and more.
- <a href="/live/annotate?url=http%3a%2f%2ftix%2emne%2ecom%2fhtdocs%2ftix%2findex%2ehtml">Edit</a>
- <i><font size="-1">(August 23, 1999 12:11)</font></i><dt><b><a href="ftp://ftp.archive.eso.org/pub/tree" ="">Tk Tree Widget (C++)</a></b>
-<dd>Tk Tree widget for Tcl8.0.3.
-
-This version contains (optional) support for \[incr Tcl\] and \[incr Tk\]
-version 3.0.
-<br>
-With the tree widget, you can display a tree in a Tk canvas. The nodes
-can be made up of any number of canvas items or even other Tk widgets.
-You create the objects that make up a node and the line that connects
-it to its parent and pass them to the tree widget. After this the tree
-widget manages the positions of the nodes and end points of the tree
-lines. Operations are available for inserting, moving and removing
-nodes and subtrees and for querrying the position of a node in the
-tree. The tree can be displayed horizontally or vertically.
- <a href="/live/annotate?url=ftp%3a%2f%2fftp%2earchive%2eeso%2eorg%2fpub%2ftree">Edit</a>
- <i><font size="-1">(August 25, 1999 03:14)</font></i><dt><b><a href="http://www.purl.org/net/hobbs/tcl/script/widget/" ="">widget, simple megawidget package</a></b>
-<dd>
- Author <b><a href="mailto:jeffrey.hobbs@oen.siemens.de" ="">Jeffrey Hobbs</a></b>, Version <b>0.9</b>,
- Works with <b>Tcl/Tk 8.0 or higher</b>
-<br>Download: <a href="http://www.purl.org/net/hobbs/tcl/script/widget/widget-0.9.tar.gz">widget-0.9.tar.gz</a><br>This is a package of
- megawidgets (i.e., compound widgets) that work almost exactly like Tk widgets.
- You can also build your own new megawidgets.
-Includes: combobox, hierarchy, console, progressbar,
-tabnotebook, validating entry, pane geometry manager, baloon help. <a href="/live/annotate?url=http%3a%2f%2fwww%2epurl%2eorg%2fnet%2fhobbs%2ftcl%2fscript%2fwidget%2f">Edit</a>
- <i><font size="-1">(August 23, 1999 12:16)</font></i></dl>
-<hr><p><center><font size="-1" face="Geneva, Helvetica, Arial"><br><a href="#TOP"><b>Top</b></a><br><!-- key ResourceSoftwareExtensions --><a href="/">Home</a>
- | <a href="/products/">Products</a>
- | <a href="/customers/">Customers</a>
- | <a href="/partners/">Partners</a>
- | <a href="/services/">Services</a>
- | <a href="/resource/">Tcl Resources</a>
- | <a href="/company/">Company</a>
-<br><a href="/live/keyword">Search</a>
- | <a href="/live/map">Site Map</a>
- | <a href="/company/feedback.html?url=%2fresource%2fsoftware%2fextensions%2ftk%2f">Feedback</a>
- | <a href="/company/contact.html">Contact Us</a>
- | <a href="mailto:info@scriptics.com">info@scriptics.com</a>
-
- <SCRIPT LANGUAGE="Javascript">
-<!--
- browser = (((navigator.appName == "Netscape") &&(parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName =="Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))
-
- if ( browser )
- {
- over = new MakeImageArray(10)
- over[0].src = "http://images.scriptics.com/images/ProductsMouseOff.gif"
- over[1].src = "http://images.scriptics.com/images/CustomersMouseOff.gif"
- over[2].src = "http://images.scriptics.com/images/PartnersMouseOff.gif"
- over[3].src = "http://images.scriptics.com/images/ServicesMouseOff.gif"
- over[4].src = "http://images.scriptics.com/images/ResourceMouseOff.gif"
- over[5].src = "http://images.scriptics.com/images/CompanyMouseOff.gif"
- over[6].src = "http://images.scriptics.com/images/homeMainRollover1.gif"
- over[7].src = "http://images.scriptics.com/images/homeMainRollover2.gif"
- over[8].src = "http://images.scriptics.com/images/homeMainRollover3.gif"
- over[9].src = "http://images.scriptics.com/images/homeMainRollover3.gif"
-
- }
-
- function MakeImageArray(n) {
- this.length = n
- for (var i = 0; i<=n; i++)="i++)" {="{" this[i]="this[i]" ="" new="new" Image()="Image()" }="}" return="return" this="this" }="}" //="//" --="--">
- </SCRIPT><br>
- <font size="2">
- &copy; 1998-2000 Scriptics Corporation. All rights reserved.
- <a href="/legal_notice.html">Legal Notice</a> | <A href="" /privacy.html="/privacy.html">
- Privacy Statement</a>
- </td></tr></table></td></tr></table>
-</Body>
-</Html>
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image1 b/ext/tk/sample/tkextlib/tkHTML/page3/image1
deleted file mode 100644
index 814d1e8f08..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image1
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image10 b/ext/tk/sample/tkextlib/tkHTML/page3/image10
deleted file mode 100644
index 45001faf05..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image10
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image11 b/ext/tk/sample/tkextlib/tkHTML/page3/image11
deleted file mode 100644
index 7c4c170f21..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image11
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image12 b/ext/tk/sample/tkextlib/tkHTML/page3/image12
deleted file mode 100644
index 903e7344a6..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image12
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image13 b/ext/tk/sample/tkextlib/tkHTML/page3/image13
deleted file mode 100644
index 226d4f68c2..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image13
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image14 b/ext/tk/sample/tkextlib/tkHTML/page3/image14
deleted file mode 100644
index 8e8c71814c..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image14
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image2 b/ext/tk/sample/tkextlib/tkHTML/page3/image2
deleted file mode 100644
index 2ddeb3258c..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image2
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image3 b/ext/tk/sample/tkextlib/tkHTML/page3/image3
deleted file mode 100644
index 1651ba7e41..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image3
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image4 b/ext/tk/sample/tkextlib/tkHTML/page3/image4
deleted file mode 100644
index b565c8dd0e..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image4
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image5 b/ext/tk/sample/tkextlib/tkHTML/page3/image5
deleted file mode 100644
index e1268b81c0..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image5
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image6 b/ext/tk/sample/tkextlib/tkHTML/page3/image6
deleted file mode 100644
index 1a6b260b40..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image6
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image7 b/ext/tk/sample/tkextlib/tkHTML/page3/image7
deleted file mode 100644
index cec7aa04d8..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image7
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image8 b/ext/tk/sample/tkextlib/tkHTML/page3/image8
deleted file mode 100644
index ad0d748d65..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image8
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/image9 b/ext/tk/sample/tkextlib/tkHTML/page3/image9
deleted file mode 100644
index 46ade3018b..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/image9
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page3/index.html b/ext/tk/sample/tkextlib/tkHTML/page3/index.html
deleted file mode 100644
index a04470e659..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page3/index.html
+++ /dev/null
@@ -1,2787 +0,0 @@
-<html><body bgcolor="white">
-<hr>
-<h1 align="center">Embedding Tcl in C/C++ Applications</h1>
-
- <table width="100%">
- <tr><td valign="top" align="left" width="46%">
- <b>Presented At:</b>
- <blockquote>
- The&nbsp;Tcl2K&nbsp;Conference<br>
- Austin, Texas<br>
- <nobr>9:00am, February 15, 2000</nobr><br>
- </blockquote>
- </td>
- <td width="5%">&nbsp;</td>
- <td valign="top" align="left" width="46%">
- <b>Instructor:</b>
- <blockquote>
- D. Richard Hipp<br>
- drh@hwaci.com<br>
- http://www.hwaci.com/drh/<br>
- 704.948.4565
- </blockquote>
- </td></tr>
- </table><p>
- <center><table border="2">
- <tr><td>
- <p align="center">
- Copies of these notes, example source code,<br>and other
- resources related to this tutorial<br>are available online at
- <a href="http://www.hwaci.com/tcl2k/">
- http://www.hwaci.com/tcl2k/</a></p>
- <p align="center"><small>$Id$</small></p></td></tr>
- </table>
- </center>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Tutorial Outline</h2>
-<p><ul><li>Introduction</li>
-<li>Building It Yourself</li>
-<ul><li>"Hello, World!" using Tcl</li>
-<li>Tcl scripts as C strings</li>
-<li>Adding new Tcl commands</li>
-<li>A tour of the Tcl API</li>
-<li>Tcl initialization scripts</li>
-<li>Adding Tk</li>
-</ul><li>Tools Survey</li>
-<li>Mktclapp</li>
-<ul><li>"Hello World" using mktclapp</li>
-<li>Adding C code</li>
-<li>Other Features</li>
-<li>Invoking Tcl from C</li>
-<li>Running mktclapp directly</li>
-<li>Real-world examples</li>
-</ul><li>Summary</li>
-</ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Embedding Tcl in C/C++ Applications</h2>
-<p><ul><li>You know how to program in Tcl/Tk</li></ul><ul><li>You know how to program in C/C++</li></ul><ul><li>This tutorial is about how to do both at the same time.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Why Mix C With Tcl/Tk?</h2>
-<p><ul><li>Use C for the things C is good at and Tcl for the things
- Tcl is good at.</li></ul><ul><li>Generate standalone executables.
- <ul><li>Eliminate the need to install Tcl/Tk.</li>
- <li>Prevent problems when the wrong version of Tcl/Tk is installed.</li>
- </ul></li></ul><ul><li>Prevent end users from changing the source code.
- <ul><li>Keeps users from creating new bugs.</li>
- <li>Protects proprietary code.</li>
- </ul></li></ul><ul><li>Office politics</li></ul><ul><li>Use Tcl/Tk as a portability layer for a large C program</li></ul><ul><li>Use Tcl as a testing interface</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Why Mix C With Tcl/Tk?</h2>
-<p><blockquote><big><b>
- "Use C for the things C is good at and use Tcl/Tk for the things
- Tcl/Tk is good at."
- </b></blockquote></p><p>
-
- <table width="100%">
- <tr><td valign="top" align="left" width="46%">
- <b>C is good at:</b>
- <ul>
- <li>Speed</li>
- <li>Complex data structures</li>
- <li>Computation</li>
- <li>Interacting with hardware</li>
- <li>Byte-by-byte data analysis</li>
- </ul>
- </td>
- <td width="5%">&nbsp;</td>
- <td valign="top" align="left" width="46%">
- <b>Tcl/Tk is good at:</b>
- <ul>
- <li>Building a user interface</li>
- <li>Manipulation of strings</li>
- <li>Portability</li>
- <li>Opening sockets</li>
- <li>Handling events</li>
- </ul>
- </td></tr>
- </table>
-<br clear="both"><p><hr></p>
-<h2 align="center">Programming Models</h2>
-<table width="100%">
-<tr><td valign="top" width="49%">
-
- <p><b>Mainstream Tcl Programming Model:</b></p>
-</td>
-<td width="2%">&nbsp;</td>
-<td valign="top" width="49%">
-
- <p><b>Embedded Tcl Programming Model:&nbsp;&nbsp;</b></p>
-</td></tr>
-<tr><td valign="top" width="49%">
-
- <ul><li>Add bits of C code to a large Tcl program</li></ul>
-</td>
-<td width="2%">&nbsp;</td>
-<td valign="top" width="49%">
-
- <ul><li>Add bits of Tcl code to a large C program</li></ul>
-</td></tr>
-<tr><td valign="top" width="49%">
-
- <ul><li>Main Tcl script loads extensions written in C</li></ul>
-</td>
-<td width="2%">&nbsp;</td>
-<td valign="top" width="49%">
-
- <ul><li>Main C procedure invokes the Tcl interpreter</li></ul>
-</td></tr>
-<tr><td valign="top" width="49%">
-
- <ul><li>Tcl/Tk is a programming language</li></ul>
-</td>
-<td width="2%">&nbsp;</td>
-<td valign="top" width="49%">
-
- <ul><li>Tcl/Tk is a C library</li></ul>
-</td></tr>
-<tr><td valign="top" width="49%">
-
- <center><img src="image1"><br>
- Most of the Tcl2K conference is about</center>
-</td>
-<td width="2%">&nbsp;</td>
-<td valign="top" width="49%">
-
- <center><img src="image1"><br>
- This tutorial is about</center>
-</td></tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">"Hello, World!" Using The Tcl Library</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h></tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Always include &lt;tcl.h></td>
-</tr>
-<tr><td valign="center">
-<small><tt>int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Create a new Tcl interpreter</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;"puts&nbsp;{Hello,&nbsp;World!}");</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Execute a Tcl command.</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Compiling "Hello, World!"</h2>
-<p><p><b>Unix:</b></p>
- <blockquote><tt>
- $ gcc hello.c -ltcl -lm -ldl<br>
- $ ./a.out<br>
- Hello, World!</tt></blockquote>
-
- <p><b>Windows using Cygwin:</b></p>
- <blockquote><tt>
- C:> gcc hello.c -ltcl80 -lm<br>
- C:> a.exe<br>
- Hello, World!</tt></blockquote>
-
- <p><b>Windows using Mingw32:</b></p>
- <blockquote><tt>
- C:> gcc -mno-cygwin hello.c -ltcl82 -lm<br>
- </tt></blockquote>
-<table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>Also works with VC++</b></td></tr></table></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Where Does <tt>-ltcl</tt> Come From On Unix?</h2>
-<p><p>Build it yourself using these steps:</p></p><p>
-<p><ul><li>Get tcl8.2.2.tar.gz from Scriptics</li></ul><ul><li><tt>zcat tcl8.2.2.tar.gz | tar vx </tt></li></ul><ul><li><tt>cd tcl8.2.2/unix</tt></li></ul><ul><li><tt>./configure --disable-shared</tt></li></ul><ul><li><tt>make</tt></li></ul><ul><li>Move <b>libtcl8.2.a</b> to your lib directory.</li></ul><ul><li>Copy <b>../generic/tcl.h</b> into /usr/include.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">What Other Libraries Are Required For Unix?</h2>
-<p><ul><li>The sequence of <b>-l</b> options after <b>-ltcl</b>
- varies from system to system</li></ul><ul><li>Observe what libraries the TCL makefile inserts when
- it is building <b>tclsh</b></li></ul><ul><li>Examples in this talk are for RedHat Linux 6.0 for Intel</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">How To Compile Under Unix Without Installing Tcl</h2>
-<p><p>Specify the *.a file directly:</p>
- <blockquote><pre>
- $ gcc -I../tcl8.2.2/generic hello.c \
- ../tcl8.2.2/unix/libtcl8.2.a -lm -ldl
- $ strip a.out
- $ ./a.out
- Hello, World!</pre></blockquote>
-
- <p>Or, tell the C compiler where to look for *.a files:</p>
- <blockquote><pre>
- $ gcc -I../tcl8.2.2/generic hello.c \
- -L../tcl8.2.2/unix -ltcl -lm -ldl
- $ strip a.out
- $ ./a.out
- Hello, World!</pre></blockquote>
-<table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>The <tt>-I../tcl8.2.2</tt> argument
- tells the compiler where to
- find <tt>&lt;tcl.h&gt;</tt>.</p></b></td></tr></table></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">What's "Cygwin"?</h2>
-<p><ul><li>An implementation of GCC/G++ and all development tools
- for Windows95/98/NT/2000</li></ul><ul><li>Available for free download at
- <blockquote>
- <tt>http://sourceware.cygnus.com/cygwin/</tt>
- </blockquote></li></ul><ul><li>Also available shrink-wrapped at your local software retailer or
- online at
- <blockquote>
- <tt>http://www.cygnus.com/cygwin/index.html</tt>
- </blockquote></li></ul><ul><li>Programs compiled using Cygwin require a special
- DLL (<b>cygwin1.dll</b>) that provides a POSIX system API</li></ul><ul><li>Cygwin1.dll cannot be shipped with proprietary programs
- without purchasing a license from Cygnus.</li></ul><ul><li>Mingw32 is the same compiler as Cygwin, but generates
- binaries that do not use cygwin1.dll</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Where Does <tt>-ltcl82</tt> Come From On Windows?</h2>
-<p><p>Build it like this:</p></p><p>
-<p><ul><li>Get <b>tcl82.lib</b> and <b>tcl82.dll</b> from Scriptics.</li></ul><ul><li><tt>echo EXPORTS >tcl82.def</tt></li></ul><ul><li><tt>nm tcl82.lib | grep 'T _' | sed 's/.* T _//' >>tcl82.def</tt></li></ul><ul><li><tt>dlltool --def tcl82.def --dllname tcl82.dll --output-lib libtcl82.a</tt></li></ul><ul><li>Move <b>libtcl82.a</b> to the lib directory and <b>tcl82.dll</b>
- to the bin directory.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Where Does Your Code Go?</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*&nbsp;Your&nbsp;application&nbsp;code&nbsp;goes&nbsp;here&nbsp;*/</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Insert C code here to do whatever it is your program is
- suppose to do</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Building A Simple TCLSH</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;char&nbsp;*z;<br>
-&nbsp;&nbsp;char&nbsp;zLine[2000];<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;while(&nbsp;fgets(zLine,sizeof(zLine),stdin)&nbsp;){</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Get one line of input</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zLine);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Execute the input as Tcl.</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;&nbsp;&nbsp;z&nbsp;=&nbsp;Tcl_GetStringResult(interp);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;if(&nbsp;z[0]&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("¸üÿ¿PX¶\n",&nbsp;z);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Print result if not empty</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>What if user types more than 2000 characters?</b></td></tr></table>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Building A Simple TCLSH</h2>
-<p>Use TCL to handle input. Allows input lines of unlimited length.</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-/*&nbsp;Tcl&nbsp;code&nbsp;to&nbsp;implement&nbsp;the<br>
-**&nbsp;input&nbsp;loop&nbsp;*/<br>
-static&nbsp;char&nbsp;zLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;"while&nbsp;{![eof&nbsp;stdin]}&nbsp;{\n"</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;"&nbsp;&nbsp;set&nbsp;line&nbsp;[gets&nbsp;stdin]\n"</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Get one line of input</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;"&nbsp;&nbsp;set&nbsp;result&nbsp;[eval&nbsp;$line]\n"</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Execute input as Tcl</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;"&nbsp;&nbsp;if&nbsp;{$result!=\"\"}&nbsp;{puts&nbsp;$result}\n"</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Print result</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;"}\n"<br>
-;<br>
-&nbsp;<br>
-<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zLoop);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Run the Tcl input loop</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>But what about commands that span multiple lines of input?</b></td></tr></table>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Better Handling Of Command-Line Input</h2>
-<p>The file "input.tcl"</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>set&nbsp;line&nbsp;{}<br>
-while&nbsp;{![eof&nbsp;stdin]}&nbsp;{</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if&nbsp;{$line!=""}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;-nonewline&nbsp;">&nbsp;"<br>
-&nbsp;&nbsp;}&nbsp;else&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;-nonewline&nbsp;"%&nbsp;"<br>
-&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;flush&nbsp;stdout</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Prompt for user input. The prompt is normally &quot;%&quot;
- but changes to &quot;&gt;&quot; if the current line is a continuation.</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;append&nbsp;line&nbsp;[gets&nbsp;stdin]<br>
-&nbsp;&nbsp;if&nbsp;{[info&nbsp;complete&nbsp;$line]}&nbsp;{</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;{[catch&nbsp;{uplevel&nbsp;#0&nbsp;$line}&nbsp;result]}&nbsp;{</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">If the command is complete, execute it.</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;stderr&nbsp;"Error:&nbsp;$result"<br>
-&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;elseif&nbsp;{$result!=""}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;$result<br>
-&nbsp;&nbsp;&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;&nbsp;&nbsp;set&nbsp;line&nbsp;{}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;}&nbsp;else&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;append&nbsp;line&nbsp;\n<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">If the command is incomplete, append a newline and get
- another line of text.</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Better Handling Of Command-Line Input</h2>
-<p>The file "input.c"</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;"source&nbsp;input.tcl");</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Read and execute the input loop</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>But now the program is not standalone!</b></td></tr></table>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Converting Scripts Into C Strings</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>static&nbsp;char&nbsp;zInputLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;"set&nbsp;line&nbsp;{}\n"<br>
-&nbsp;&nbsp;"while&nbsp;{![eof&nbsp;stdin]}&nbsp;{\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;if&nbsp;{$line!=\"\"}&nbsp;{\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;-nonewline&nbsp;\">&nbsp;\"\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;}&nbsp;else&nbsp;{\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;-nonewline&nbsp;\"%&nbsp;\"\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;}\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;flush&nbsp;stdout\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;append&nbsp;line&nbsp;[gets&nbsp;stdin]\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;if&nbsp;{[info&nbsp;complete&nbsp;$line]}&nbsp;{\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;{[catch&nbsp;{uplevel&nbsp;#0&nbsp;$line}&nbsp;result]}&nbsp;{\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;stderr&nbsp;\"Error:&nbsp;$result\"\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;elseif&nbsp;{$result!=\"\"}&nbsp;{\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;$result\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;}\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;set&nbsp;line&nbsp;{}\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;}&nbsp;else&nbsp;{\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;append&nbsp;line&nbsp;\\n\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;}\n"<br>
-&nbsp;&nbsp;"}\n"<br>
-;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Compile Tcl Scripts Into C Programs</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-static&nbsp;char&nbsp;zInputLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;/*&nbsp;Actual&nbsp;code&nbsp;omitted&nbsp;*/<br>
-;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Copy and paste the converted Tcl script here</td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Execute the Tcl code</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Converting Scripts To Strings<br>Using SED Or TCLSH</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>sed&nbsp;-e&nbsp;'s/\\/\\\\/g'&nbsp;\&nbsp;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Convert <b>\</b> into <b>\\</b></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;-e&nbsp;'s/"/\\"/g'&nbsp;\&nbsp;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Convert <b>"</b> into <b>\"</b></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;-e&nbsp;'s/^/&nbsp;&nbsp;"/'&nbsp;\&nbsp;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Add <b>"</b> to start of each line</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;-e&nbsp;'s/$/\\n"/'&nbsp;input.tcl</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Add <b>\n"</b> to end of each line</td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-&nbsp;<br>
-<br>
-&nbsp;<br>
-<br>
-while&nbsp;{![eof&nbsp;stdin]}&nbsp;{<br>
-&nbsp;&nbsp;set&nbsp;line&nbsp;[gets&nbsp;stdin]</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;regsub&nbsp;-all&nbsp;{\}&nbsp;$line&nbsp;{&amp;&amp;}&nbsp;line</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Convert <b>\</b> into <b>\\</b></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;regsub&nbsp;-all&nbsp;{"}&nbsp;$line&nbsp;{\"}&nbsp;line</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Convert <b>"</b> into <b>\"</b></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;puts&nbsp;"\"$line\\n\""</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Add <b>"</b> in front and <b>\n"</b> at the end</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Converting Scripts Into C Strings</h2>
-<p>You may want to save space by removing comments and extra whitespace
- from scripts.</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>static&nbsp;char&nbsp;zInputLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;"set&nbsp;line&nbsp;{}\n"<br>
-&nbsp;&nbsp;"while&nbsp;{![eof&nbsp;stdin]}&nbsp;{\n"<br>
-&nbsp;&nbsp;"if&nbsp;{$line!=\"\"}&nbsp;{\n"<br>
-&nbsp;&nbsp;"puts&nbsp;-nonewline&nbsp;\">&nbsp;\"\n"<br>
-&nbsp;&nbsp;"}&nbsp;else&nbsp;{\n"<br>
-&nbsp;&nbsp;"puts&nbsp;-nonewline&nbsp;\"%&nbsp;\"\n"<br>
-&nbsp;&nbsp;"}\n"<br>
-&nbsp;&nbsp;"flush&nbsp;stdout\n"<br>
-&nbsp;&nbsp;"append&nbsp;line&nbsp;[gets&nbsp;stdin]\n"<br>
-&nbsp;&nbsp;"if&nbsp;{[info&nbsp;complete&nbsp;$line]}&nbsp;{\n"<br>
-&nbsp;&nbsp;"if&nbsp;{[catch&nbsp;{uplevel&nbsp;#0&nbsp;$line}&nbsp;result]}&nbsp;{\n"<br>
-&nbsp;&nbsp;"puts&nbsp;stderr&nbsp;\"Error:&nbsp;$result\"\n"<br>
-&nbsp;&nbsp;"}&nbsp;elseif&nbsp;{$result!=\"\"}&nbsp;{\n"<br>
-&nbsp;&nbsp;"puts&nbsp;$result\n"<br>
-&nbsp;&nbsp;"}\n"<br>
-&nbsp;&nbsp;"set&nbsp;line&nbsp;{}\n"<br>
-&nbsp;&nbsp;"}&nbsp;else&nbsp;{\n"<br>
-&nbsp;&nbsp;"append&nbsp;line&nbsp;\\n\n"<br>
-&nbsp;&nbsp;"}\n"<br>
-&nbsp;&nbsp;"}\n"<br>
-;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Converting Scripts To Strings</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>sed&nbsp;-e&nbsp;'s/\\/\\\\/g'&nbsp;\&nbsp;<br>
-&nbsp;&nbsp;-e&nbsp;'s/"/\\"/g'&nbsp;\&nbsp;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;-e&nbsp;'/^&nbsp;*#/d'&nbsp;\&nbsp;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Delete lines that begin with #</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;-e&nbsp;'/^&nbsp;*$/d'&nbsp;\&nbsp;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Delete blank lines</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;-e&nbsp;'s/^&nbsp;*/&nbsp;&nbsp;"/'&nbsp;\&nbsp;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Delete leading spaces</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;-e&nbsp;'s/$/\\n"/'&nbsp;input.tcl<br>
-&nbsp;<br>
-<br>
-&nbsp;<br>
-<br>
-&nbsp;<br>
-while&nbsp;{![eof&nbsp;stdin]}&nbsp;{<br>
-&nbsp;&nbsp;set&nbsp;line&nbsp;[gets&nbsp;stdin]</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;set&nbsp;line&nbsp;[string&nbsp;trimleft&nbsp;$line]</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Remove leading space</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if&nbsp;{$line==""}&nbsp;continue</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Delete blank lines</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if&nbsp;{[string&nbsp;index&nbsp;$line&nbsp;0]=="#"}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;continue<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Delete lines starting with #</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;regsub&nbsp;-all&nbsp;{\}&nbsp;$line&nbsp;{&amp;&amp;}&nbsp;line<br>
-&nbsp;&nbsp;regsub&nbsp;-all&nbsp;{"}&nbsp;$line&nbsp;{\"}&nbsp;line<br>
-&nbsp;&nbsp;puts&nbsp;"\"$line\\n\""<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Removing Comments Or Leading Space<br>Will Break Some Tcl Scripts!</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>image&nbsp;create&nbsp;bitmap&nbsp;smiley&nbsp;-data&nbsp;{</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>#define&nbsp;smile_width&nbsp;15<br>
-#define&nbsp;smile_height&nbsp;15</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">These lines begin with # but are not comment</td>
-</tr>
-<tr><td valign="center">
-<small><tt>static&nbsp;unsigned&nbsp;char&nbsp;smile_bits[]&nbsp;=&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;0xc0,&nbsp;0x01,&nbsp;0x30,&nbsp;0x06,&nbsp;0x0c,&nbsp;0x18,<br>
-&nbsp;&nbsp;&nbsp;0x04,&nbsp;0x10,&nbsp;0x22,&nbsp;0x22,&nbsp;0x52,&nbsp;0x25,<br>
-&nbsp;&nbsp;&nbsp;0x01,&nbsp;0x40,&nbsp;0x01,&nbsp;0x40,&nbsp;0x01,&nbsp;0x40,<br>
-&nbsp;&nbsp;&nbsp;0x12,&nbsp;0x24,&nbsp;0xe2,&nbsp;0x23,&nbsp;0x04,&nbsp;0x10,<br>
-&nbsp;&nbsp;&nbsp;0x0c,&nbsp;0x18,&nbsp;0x30,&nbsp;0x06,&nbsp;0xc0,&nbsp;0x01};<br>
-}<br>
-&nbsp;<br>
-<br>
-&nbsp;<br>
-text&nbsp;.t<br>
-pack&nbsp;.t<br>
-.t&nbsp;insert&nbsp;end&nbsp;[string&nbsp;trim&nbsp;{</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>She&nbsp;walks&nbsp;in&nbsp;beauty,&nbsp;like&nbsp;the&nbsp;night<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Of&nbsp;cloudless&nbsp;climes&nbsp;and&nbsp;starry&nbsp;skies;<br>
-And&nbsp;all&nbsp;that's&nbsp;best&nbsp;of&nbsp;dark&nbsp;and&nbsp;bright<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Meet&nbsp;in&nbsp;her&nbsp;aspect&nbsp;and&nbsp;her&nbsp;eyes;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Indentation is deleted on lines 2
- and 4</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}]&nbsp;<br>
-&nbsp;<br>
-</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>Problems like these are rare</b></td></tr></table>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Adding A "continue" Command</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>set&nbsp;line&nbsp;{}<br>
-while&nbsp;{![eof&nbsp;stdin]}&nbsp;{<br>
-&nbsp;&nbsp;if&nbsp;{$line!=""}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;-nonewline&nbsp;">&nbsp;"<br>
-&nbsp;&nbsp;}&nbsp;else&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;-nonewline&nbsp;"%&nbsp;"<br>
-&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;flush&nbsp;stdout<br>
-&nbsp;&nbsp;append&nbsp;line&nbsp;[gets&nbsp;stdin]<br>
-&nbsp;&nbsp;if&nbsp;{[info&nbsp;complete&nbsp;$line]}&nbsp;{</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;{[lindex&nbsp;$line&nbsp;0]=="continue"}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Break out of the loop if the command
- is "continue"</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;elseif&nbsp;{[catch&nbsp;{uplevel&nbsp;#0&nbsp;$line}&nbsp;result]}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;stderr&nbsp;"Error:&nbsp;$result"<br>
-&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;elseif&nbsp;{$result!=""}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;$result<br>
-&nbsp;&nbsp;&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;&nbsp;&nbsp;set&nbsp;line&nbsp;{}<br>
-&nbsp;&nbsp;}&nbsp;else&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;append&nbsp;line&nbsp;\n<br>
-&nbsp;&nbsp;}<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Stop For Tcl Input At Various Points<br>In A C Program</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-static&nbsp;char&nbsp;zInputLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;/*&nbsp;Tcl&nbsp;Input&nbsp;loop&nbsp;as&nbsp;a&nbsp;C&nbsp;string&nbsp;*/<br>
-;<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*&nbsp;Application&nbsp;C&nbsp;code&nbsp;*/</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Do some computation</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Stop for some Tcl input</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*&nbsp;More&nbsp;application&nbsp;C&nbsp;code&nbsp;*/</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Do more computation</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Stop for more Tcl input</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*&nbsp;Finish&nbsp;up&nbsp;the&nbsp;application&nbsp;*/</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Finish the computation</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Using Tcl For Testing</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-static&nbsp;char&nbsp;zInputLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;/*&nbsp;Tcl&nbsp;Input&nbsp;loop&nbsp;as&nbsp;a&nbsp;C&nbsp;string&nbsp;*/<br>
-;<br>
-&nbsp;<br>
-</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-#ifdef&nbsp;TESTING<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Create interpreter only if TESTING
- is defined</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();<br>
-#endif<br>
-&nbsp;&nbsp;/*&nbsp;Application&nbsp;C&nbsp;code&nbsp;*/</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>#ifdef&nbsp;TESTING<br>
-&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);<br>
-#endif</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Accept command-line input only if TESTING
- is defined</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*&nbsp;More&nbsp;application&nbsp;C&nbsp;code&nbsp;*/<br>
-#ifdef&nbsp;TESTING<br>
-&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);<br>
-#endif<br>
-&nbsp;&nbsp;/*&nbsp;Finish&nbsp;up&nbsp;the&nbsp;application&nbsp;*/<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Creating A New Tcl Command In C</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-int&nbsp;NewCmd(</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;void&nbsp;*clientData,<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp,<br>
-&nbsp;&nbsp;int&nbsp;argc,<br>
-&nbsp;&nbsp;char&nbsp;**argv</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">The Tcl command is implemented as
- a C function with four arguments.</td>
-</tr>
-<tr><td valign="center">
-<small><tt>){<br>
-&nbsp;&nbsp;printf("Hello,&nbsp;World!\n");</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;TCL_OK;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Returns TCL_OK or TCL_ERROR</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}<br>
-&nbsp;<br>
-static&nbsp;char&nbsp;zInputLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;/*&nbsp;Tcl&nbsp;code&nbsp;omitted...&nbsp;*/<br>
-;<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_CreateCommand(interp,&nbsp;"helloworld",<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewCmd,&nbsp;0,&nbsp;0);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Tell the interpreter which C function to call when the
- "helloworld" Tcl command is executed</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Linkage From Tcl To C</h2>
-<p><p align="center"><img src="image4"></p></p><p><ul><li>3rd parameter of Tcl_CreateCommand() is a pointer to the C subroutine
- that implements the command.</li></ul><ul><li>4th parameter to Tcl_CreateCommand() becomes the 1st parameter to
- the C routine whenever the Tcl command is executed.</li></ul><ul><li>1st parameter to Tcl_CreateCommand() must be a valid Tcl interpreter.
- The same pointer appears as the second parameter to the C routine
- whenever the Tcl command is executed.</li></ul></p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Linkage From Tcl To C</h2>
-<p><p align="center"><img src="image5"></p></p><p><ul><li>5th parameter of Tcl_CreateCommand() is a pointer to the C subroutine
- that is called when the Tcl command is deleted.</li></ul><ul><li>4th parameter to Tcl_CreateCommand() becomes the 1st parameter to
- the C routine.</li></ul></p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">When To Use A Delete Proc</h2>
-<p>Examples of where the delete proc is used in standard Tcl/Tk:</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>button&nbsp;.b&nbsp;-text&nbsp;Hello<br>
-pack&nbsp;.b</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>rename&nbsp;.b&nbsp;{}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Deleting the <b>.b</b> command causes the button to be destroyed</td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-&nbsp;<br>
-</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>image&nbsp;create&nbsp;photo&nbsp;smiley&nbsp;\&nbsp;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;-file&nbsp;smiley.gif</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>rename&nbsp;smiley&nbsp;{}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Deleting the <b>smiley</b> command destroys the image and reclaims the
- memory used to hold the image</td>
-</tr>
-</table>
-<p><ul><li>Always use a delete proc if the clientData is a pointer to
- malloced memory or some other resource that needs freeing</li></ul><ul><li>Delete procs are never used in the Tcl core but are used
- extensively in Tk</li></ul></p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Linkage From Tcl To C</h2>
-<p>The <tt>argc</tt> and <tt>argv</tt> parameters work just like in
- <tt>main()</tt></p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>helloworld&nbsp;one&nbsp;{two&nbsp;three}&nbsp;four</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><tt>argc = 4<br>
- argv[0] = "helloworld"<br>
- argv[1] = "one"<br>
- argv[2] = "two three"<br>
- argv[3] = "four"<br>
- argv[4] = NULL</tt></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">A Short-Cut</h2>
-<p>In a program with many new Tcl commands implemented in C, it becomes
- tedious to type the same four parameters over and over again. So
- we define a short-cut.</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#define&nbsp;TCLARGS&nbsp;\&nbsp;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;void&nbsp;*clientData,&nbsp;\&nbsp;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;Tcl_Interp&nbsp;*interp,&nbsp;\&nbsp;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;argc,&nbsp;\&nbsp;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;char&nbsp;*argv</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Define TCLARGS once in a header file</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;<br>
-&nbsp;<br>
-&nbsp;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>int&nbsp;NewCmd(TCLARGS){</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Use the TCLARGS macro to define new C functions
- that implement Tcl commands.</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;&nbsp;/*&nbsp;implementation...&nbsp;*/<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>For brevity, we will use the TCLARGS macro during the
- rest of this talk.</b></td></tr></table>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Returning A Value From C Back To Tcl</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>int&nbsp;NewCmd(TCLARGS){</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Note that the C function returns an "int"</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;TCL_OK;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Return value is TCL_OK or TCL_ERROR</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><ul><li>TCL_OK and TCL_ERROR are defined in &lt;tcl.h&gt;</li></ul><ul><li>Other valid return values TCL_RETURN, TCL_BREAK and TCL_CONTINUE
- are rarely used</li></ul><ul><li>Common mistake: forgetting to return TCL_OK</li></ul></p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Returning A Value From C Back To Tcl</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>int&nbsp;NewCmd(TCLARGS){</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_SetResult(interp,"Hello!",TCL_STATIC);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Set the result to "Hello!"</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;TCL_OK;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><ul><li>Result should be the text of an error message if you
- return TCL_ERROR.</li></ul><ul><li>3rd argument to Tcl_SetResult() can be TCL_STATIC,
- TCL_DYNAMIC, TCL_VOLATILE, or a function pointer.</li></ul><ul><li>Also consider using Tcl_AppendResult().</li></ul><ul><li>Direct access to <tt>interp->result</tt> is deprecated.</li></ul><ul><li>See the man pages for details.</li></ul></p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">The Tcl_Obj Interface</h2>
-<p><ul><li>A new way to write Tcl commands in C code</li></ul><ul><li>First introduced in Tcl8.0</li></ul><ul><li>Can be much faster, especially for lists or numeric values.</li></ul><ul><li>Able to handle arbitrary binary data.</li></ul><ul><li>More difficult to program.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">The Tcl_Obj Interface</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>int&nbsp;NewObjCmd(<br>
-&nbsp;&nbsp;void&nbsp;*clientData,<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp,<br>
-&nbsp;&nbsp;int&nbsp;objc,</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Obj&nbsp;*const*&nbsp;objv</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">4th parameter is an array Tcl_Objs, not an array of strings</td>
-</tr>
-<tr><td valign="center">
-<small><tt>){<br>
-&nbsp;&nbsp;/*&nbsp;Implementation...&nbsp;*/<br>
-&nbsp;&nbsp;return&nbsp;TCL_OK;<br>
-}<br>
-&nbsp;<br>
-static&nbsp;char&nbsp;zInputLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;/*&nbsp;Tcl&nbsp;code&nbsp;omitted...&nbsp;*/<br>
-;<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_CreateObjCommand(interp,&nbsp;"newcmd",<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewObjCmd,&nbsp;0,&nbsp;0);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Use a different function to register the command</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">The Tcl_Obj Interface</h2>
-<p><ul><li>There are countless access methods for reading information from and
- placing information in Tcl_Objs. Always use the access methods.</li></ul><ul><li>Details provided at Lee Bernhard's talk this afternoon.</li></ul><ul><li>Definitely use Tcl_Objs if you are writing a new Tcl extension.</li></ul><ul><li>Tcl_Objs address some of the weaknesses of Tcl relative to C/C++.
- <ul>
- <li> Tcl_Objs are faster </li>
- <li> Tcl_Objs work with binary data </li>
- </ul>
- But C/C++ is faster still and better for working with binary data.</li></ul><ul><li>When mixing C/C++ with Tcl/Tk the benefits of Tcl_Objs are
- less important. Using Tcl_Objs in this context may not be
- worth the extra trouble.</li></ul><ul><li>This talk will focus on the string interface.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Nickel Tour Of The Tcl API</h2>
-<p><p><b>Memory allocation functions</b></p>
-<center><table width="90%"><tr>
-<td width="32%" valign="top"><small><tt>
- Tcl_Alloc<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_Free<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_Realloc<br>
-</tt></small></td>
-</table></center><p><b>Functions useful in the implementation of new Tcl commands</b></p>
-<center><table width="90%"><tr>
-<td width="32%" valign="top"><small><tt>
- Tcl_AppendElement<br>
- Tcl_AppendResult<br>
- Tcl_GetBoolean<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_GetDouble<br>
- Tcl_GetInt<br>
- Tcl_GetStringResult<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_ResetResult<br>
- Tcl_SetResult<br>
-</tt></small></td>
-</table></center><p><b>Functions for controlling the Tcl interpreter</b></p>
-<center><table width="90%"><tr>
-<td width="32%" valign="top"><small><tt>
- Tcl_CreateCommand<br>
- Tcl_CreateInterp<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_CreateObjCommand<br>
- Tcl_DeleteCommand<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_DeleteInterp<br>
- Tcl_Exit<br>
-</tt></small></td>
-</table></center></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Nickel Tour Of The Tcl API</h2>
-<p><p><b>I/O functions</b></p>
-<center><table width="90%"><tr>
-<td width="32%" valign="top"><small><tt>
- Tcl_Close<br>
- Tcl_Eof<br>
- Tcl_Flush<br>
- Tcl_GetChannel<br>
- Tcl_GetChannelMode<br>
- Tcl_GetChannelName<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_Gets<br>
- Tcl_OpenCommandChannel<br>
- Tcl_OpenFileChannel<br>
- Tcl_OpenTcpClient<br>
- Tcl_OpenTcpServer<br>
- Tcl_Read<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_Seek<br>
- Tcl_Tell<br>
- Tcl_Ungets<br>
- Tcl_Write<br>
- Tcl_WriteChars<br>
-</tt></small></td>
-</table></center><p><b>Names and meanings of system error codes</b></p>
-<center><table width="90%"><tr>
-<td width="32%" valign="top"><small><tt>
- Tcl_ErrnoId<br>
- Tcl_ErrnoMsg<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_GetErrno<br>
- Tcl_SetErrno<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_SignalId<br>
- Tcl_SignalMsg<br>
-</tt></small></td>
-</table></center></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Nickel Tour Of The Tcl API</h2>
-<p><p><b>General Operating System Calls</b></p>
-<center><table width="90%"><tr>
-<td width="32%" valign="top"><small><tt>
- Tcl_Access<br>
- Tcl_Chdir<br>
- Tcl_GetCwd<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_GetHostName<br>
- Tcl_GetNameOfExecutable<br>
- Tcl_Sleep<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_Stat<br>
-</tt></small></td>
-</table></center><p><b>String Manipulation And Comparison</b></p>
-<center><table width="90%"><tr>
-<td width="32%" valign="top"><small><tt>
- Tcl_Concat<br>
- Tcl_Merge<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_SplitList<br>
- Tcl_StringCaseMatch<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_StringMatch<br>
-</tt></small></td>
-</table></center><p><b>Dynamically Resizable Strings</b></p>
-<center><table width="90%"><tr>
-<td width="49%" valign="top"><small><tt>
- Tcl_DStringAppend<br>
- Tcl_DStringAppendElement<br>
- Tcl_DStringEndSublist<br>
- Tcl_DStringInit<br>
- Tcl_DStringLength<br>
-</tt></small></td>
-<td width="49%" valign="top"><small><tt>
- Tcl_DStringResult<br>
- Tcl_DStringSetLength<br>
- Tcl_DStringStartSublist<br>
- Tcl_DStringValue<br>
-</tt></small></td>
-</table></center></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Nickel Tour Of The Tcl API</h2>
-<p><p><b>Event Handlers</b></p>
-<center><table width="90%"><tr>
-<td width="49%" valign="top"><small><tt>
- Tcl_CancelIdleCall<br>
- Tcl_CreateChannelHandler<br>
- Tcl_CreateTimerHandler<br>
- Tcl_DeleteChannelHandler<br>
-</tt></small></td>
-<td width="49%" valign="top"><small><tt>
- Tcl_DeleteTimerHandler<br>
- Tcl_DoOneEvent<br>
- Tcl_DoWhenIdle<br>
-</tt></small></td>
-</table></center><p><b>Functions For Reading And Writing Tcl Variables</b></p>
-<center><table width="90%"><tr>
-<td width="32%" valign="top"><small><tt>
- Tcl_GetVar<br>
- Tcl_GetVar2<br>
- Tcl_LinkVar<br>
- Tcl_SetVar<br>
- Tcl_SetVar2<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_TraceVar<br>
- Tcl_TraceVar2<br>
- Tcl_UnlinkVar<br>
- Tcl_UnsetVar<br>
- Tcl_UnsetVar2<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_UntraceVar<br>
- Tcl_UntraceVar2<br>
- Tcl_UpdateLinkedVar<br>
-</tt></small></td>
-</table></center><p><b>Functions For Executing Tcl Code</b></p>
-<center><table width="90%"><tr>
-<td width="32%" valign="top"><small><tt>
- Tcl_Eval<br>
- Tcl_EvalFile<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_EvalObj<br>
- Tcl_GlobalEval<br>
-</tt></small></td>
-<td width="32%" valign="top"><small><tt>
- Tcl_GlobalEvalObj<br>
- Tcl_VarEval<br>
-</tt></small></td>
-</table></center></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Nickel Tour Of The Tcl API</h2>
-<p><p><b>Functions For Dealing With Unicode</b></p>
-<center><table width="90%"><tr>
-<td width="49%" valign="top"><small><tt>
- Tcl_NumUtfChars<br>
- Tcl_UniCharAtIndex<br>
- Tcl_UniCharIsAlnum<br>
- Tcl_UniCharIsAlpha<br>
- Tcl_UniCharIsControl<br>
- Tcl_UniCharIsDigit<br>
- Tcl_UniCharIsGraph<br>
- Tcl_UniCharIsLower<br>
- Tcl_UniCharIsPrint<br>
- Tcl_UniCharIsPunct<br>
- Tcl_UniCharIsSpace<br>
- Tcl_UniCharIsUpper<br>
- Tcl_UniCharIsWordChar<br>
- Tcl_UniCharLen<br>
- Tcl_UniCharNcmp<br>
- Tcl_UniCharToLower<br>
- Tcl_UniCharToTitle<br>
-</tt></small></td>
-<td width="49%" valign="top"><small><tt>
- Tcl_UniCharToUpper<br>
- Tcl_UniCharToUtf<br>
- Tcl_UniCharToUtfDString<br>
- Tcl_UtfAtIndex<br>
- Tcl_UtfBackslash<br>
- Tcl_UtfCharComplete<br>
- Tcl_UtfFindFirst<br>
- Tcl_UtfFindLast<br>
- Tcl_UtfNcasecmp<br>
- Tcl_UtfNcmp<br>
- Tcl_UtfNext<br>
- Tcl_UtfPrev<br>
- Tcl_UtfToLower<br>
- Tcl_UtfToTitle<br>
- Tcl_UtfToUniChar<br>
- Tcl_UtfToUniCharDString<br>
- Tcl_UtfToUpper<br>
-</tt></small></td>
-</table></center>
- <p><b>Functions For Dealing With Tcl_Objs</b></p>
- <blockquote><i>Too numerous to list...</i></blockquote></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Documentation Of The Tcl API</h2>
-<p><ul><li>Tcl comes with excellent man pages</li></ul><ul><li>"Use the source, Luke"</li></ul><ul><li>See <tt>tclDecl.h</tt> for a list of API functions</li></ul><ul><li>The header comments on the implementation of API functions usually
- gives a good description of what the function does and how it should
- be used.</li></ul><ul><li>Most API functions are used within Tcl and Tk. Use grep to locate
- examples.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Initialization Scripts</h2>
-<p><ul><li>Run the mini TCLSH implemented above and execute the <tt>parray</tt> command</li></ul><ul><li>It doesn't work! What's wrong? </p></li></li></ul><ul><li><tt>parray</tt> is really a Tcl proc that is read in when the
- interpreter is initialized. </p></li></li></ul><ul><li><tt>parray</tt> (and several other commands) are stored in a
- handful of &quot;Initialization Scripts&quot; </p></li></li></ul><ul><li>All the initialization scripts are stored in the
- &quot;Tcl Library&quot; - a directory on the host
- computer. </p></li></li></ul><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>Invoke the Tcl_Init() function to locate and read the
- Tcl initialization scripts.</b></td></tr></table></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">The <tt>Tcl_Init()</tt> Function</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-static&nbsp;char&nbsp;zInputLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;/*&nbsp;Tcl&nbsp;code&nbsp;omitted...&nbsp;*/<br>
-;<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Init(interp);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Locate and read the initialization scripts</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*&nbsp;Call&nbsp;Tcl_CreateCommand()?&nbsp;*/<br>
-&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>But Tcl_Init() can fail. We need to check its return value...</b></td></tr></table>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">The <tt>Tcl_Init()</tt> Function</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-static&nbsp;char&nbsp;zInputLoop[]&nbsp;=&nbsp;<br>
-&nbsp;&nbsp;/*&nbsp;Tcl&nbsp;code&nbsp;omitted...&nbsp;*/<br>
-;<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;Tcl_Init(interp)!=TCL_OK&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr,"Tcl_Init()&nbsp;failed:&nbsp;¸üÿ¿PX¶",<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tcl_GetStringResult(interp));<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Print error message if Tcl_Init() fails</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*&nbsp;Call&nbsp;Tcl_CreateCommand()?&nbsp;*/<br>
-&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>But now the program is not standalone.</b></td></tr></table>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">How <tt>Tcl_Init()</tt> Works</h2>
-<p><ul><li>Computes the value of variable <tt>tcl_libPath</tt>.</li></ul><ul><li>Invokes the procedure named &quot;<tt>tclInit</tt>&quot;</li></ul><ul><li>A default <tt>tclInit</tt> procedure is built into Tcl.
- You can define an alternative <tt>tclInit</tt> procedure
- prior to calling <tt>Tcl_Init()</tt>.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">The Default <tt>initTcl</tt> Procedure</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>set&nbsp;errors&nbsp;{}<br>
-set&nbsp;dirs&nbsp;{}<br>
-if&nbsp;{[info&nbsp;exists&nbsp;tcl_library]}&nbsp;{<br>
-&nbsp;&nbsp;lappend&nbsp;dirs&nbsp;$tcl_library<br>
-}&nbsp;else&nbsp;{<br>
-&nbsp;&nbsp;if&nbsp;{[info&nbsp;exists&nbsp;env(TCL_LIBRARY)]}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;lappend&nbsp;dirs&nbsp;$env(TCL_LIBRARY)<br>
-&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;lappend&nbsp;dirs&nbsp;$tclDefaultLibrary<br>
-&nbsp;&nbsp;unset&nbsp;tclDefaultLibrary<br>
-&nbsp;&nbsp;set&nbsp;dirs&nbsp;[concat&nbsp;$dirs&nbsp;$tcl_libPath]<br>
-}<br>
-foreach&nbsp;i&nbsp;$dirs&nbsp;{<br>
-&nbsp;&nbsp;set&nbsp;tcl_library&nbsp;$i<br>
-&nbsp;&nbsp;set&nbsp;tclfile&nbsp;[file&nbsp;join&nbsp;$i&nbsp;init.tcl]<br>
-&nbsp;&nbsp;if&nbsp;{[file&nbsp;exists&nbsp;$tclfile]}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;{![catch&nbsp;{uplevel&nbsp;#0&nbsp;[list&nbsp;source&nbsp;$tclfile]}&nbsp;msg]}&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return<br>
-&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;{<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;append&nbsp;errors&nbsp;"$tclfile:&nbsp;$msg\n$errorInfo\n"<br>
-&nbsp;&nbsp;&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;}<br>
-}<br>
-error&nbsp;"Can't&nbsp;find&nbsp;a&nbsp;usable&nbsp;init.tcl&nbsp;..."</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">The Default Initialization Sequence</h2>
-<p><ul><li>The <tt>tclInit</tt> procedure locates and sources the <tt>init.tcl</tt>
- script. The directory that contains <tt>init.tcl</tt> is stored in
- the <tt>tcl_library</tt> variable.</li></ul><ul><li>The <tt>init.tcl</tt> script creates an <tt>unknown</tt> procedure.
- The <tt>unknown</tt> procedure will run whenever Tcl encounters an
- unknown command.</li></ul><ul><li>The <tt>unknown</tt> procedure consults the file <tt>tclIndex</tt> in the
- <tt>tcl_library</tt> directory to see if the command is defined by one of
- the initialization scripts.</li></ul><ul><li>The <tt>unknown</tt> procedure sources any needed initialization scripts
- and retries the command.</li></ul><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>Commands defined in the initialization scripts are loaded
- on demand.</b></td></tr></table></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Standalone Initialization Techniques</h2>
-<p><p><b>Manually execute all initialization scripts</b></p>
-<ul><li>Convert all initialization scripts into C strings and
- put them in the executable.</li></ul><ul><li>Call <tt>Tcl_Eval()</tt> on each initialization script and omit the
- call to <tt>Tcl_Init()</tt></li></ul><ul><li>Or, redefine <tt>tclInit</tt> so that it does not attempt to source
- <tt>init.tcl</tt> then call <tt>Tcl_Eval()</tt> on each initialization
- script after <tt>Tcl_Init()</tt> returns.</li></ul><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>This approach is not recommended</b></td></tr></table></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Standalone Initialization Techniques</h2>
-<p><p><b>Redefining the builtin <tt>source</tt> command</b></p>
-<ul><li>Convert all initialization scripts into C strings and
- put them in the executable.</li></ul><ul><li>Create a new <tt>source</tt> command that
- calls <tt>Tcl_Eval()</tt> on the appropriate built-in string
- instead of reading from the disk.</li></ul><ul><li>Read from disk if the named file is not one that is built in.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Redefining <tt>source</tt></h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>static&nbsp;char&nbsp;zInitTcl[]&nbsp;=&nbsp;"...";<br>
-static&nbsp;char&nbsp;zParrayTcl[]&nbsp;=&nbsp;"...";</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Scripts <tt>init.tcl</tt> and <tt>parray.tcl</tt></td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-int&nbsp;NewSourceCmd(TCLARGS){</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;!strcmp(argv[1],"/builtin/init.tcl")&nbsp;)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;Tcl_Eval(interp,&nbsp;zInitTcl);<br>
-&nbsp;&nbsp;if(&nbsp;!strcmp(argv[1],"/builtin/parray.tcl")&nbsp;)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;Tcl_Eval(interp,&nbsp;zParrayTcl);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Call <tt>Tcl_Eval()</tt> on builtin strings if the names match</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;Tcl_EvalFile(interp,&nbsp;argv[1]);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Call <tt>Tcl_EvalFile()</tt> if no match</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;setenv("TCL_LIBRARY","/builtin");</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Causes <tt>tclInit</tt> to look for <tt>init.tcl</tt> in <tt>/builtin</tt></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_CreateCommand(interp,&nbsp;"source",<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewSourceCmd,&nbsp;0,&nbsp;0);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Redefine <tt>source</tt></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Init(interp);<br>
-&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Redefining <tt>source</tt></h2>
-<p><ul><li>This approach works for all versions of Tcl and Tk.</li></ul><ul><li>Also need to redefine the "<tt>file exists</tt>" Tcl command since it
- too is used by <tt>tclInit</tt>.</li></ul><ul><li>To verify that the program is really standalone, remove the call
- to <tt>Tcl_EvalFile()</tt>.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Standalone Initialization Techniques</h2>
-<p><p><b>Use the <tt>Tcl</tt>*<tt>InsertProc()</tt> functions</b></p>
-<ul><li>Three routines that overload basic file I/O operations:
- <ul>
- <li> <tt>TclStatInsertProc()</tt> </li>
- <li> <tt>TclAccessInsertProc()</tt> </li>
- <li> <tt>TclOpenFileChannelInsertProc()</tt> </li>
- </ul></li></ul><ul><li>Allows us to implement a virtual filesystem that overlays the
- real filesystem.</li></ul><ul><li>The virtual filesystem contains all the initialization scripts
- as compiled-in strings. The initialization scripts look like
- they are resident on disk even though they are built in.</li></ul><ul><li>These functions first appeared in Tcl8.0.3.
- Presumably to support TclPro Wrapper.</li></ul><ul><li>The only documentation is comments on the code.
- See the Tcl source file <tt>generic/tclIOUtil.c</tt></li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">The <tt>TclStatInsertProc()</tt> Function</h2>
-<p><ul><li>Sole argument is a pointer to a function whose interface is the
- same as <tt>stat()</tt></li></ul><ul><li>Functions are stacked. Tcl tries each <tt>stat</tt> function on the
- list, beginning with the most recently inserted, until one succeeds.</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">The <tt>TclStatInsertProc()</tt> Function</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tclInt.h></tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Rather than <tt>&lt;tcl.h&gt;</tt>!</td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-static&nbsp;int<br>
-BltinFileStat(char&nbsp;*path,struct&nbsp;stat&nbsp;*buf){<br>
-&nbsp;&nbsp;char&nbsp;*zData;<br>
-&nbsp;&nbsp;int&nbsp;nData;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;zData&nbsp;=&nbsp;FindBuiltinFile(path,&nbsp;0,&nbsp;&amp;nData);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Check if <tt>path</tt> is a builtin</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;zData==0&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;-1;<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Fail if <tt>path</tt> is not a builtin</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;memset(buf,&nbsp;0,&nbsp;sizeof(*buf));<br>
-&nbsp;&nbsp;buf->st_mode&nbsp;=&nbsp;0400;<br>
-&nbsp;&nbsp;buf->st_size&nbsp;=&nbsp;nData;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;0;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Success if it is builtin</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;TclStatInsertProc(BltinFileStat);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Register new <tt>stat</tt> function</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();<br>
-&nbsp;&nbsp;Tcl_Init(interp);<br>
-&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">The <tt>TclAccessInsertProc()</tt> Function</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tclInt.h></tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Rather than <tt>&lt;tcl.h&gt;</tt>!</td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-/*&nbsp;BltinFileStat()&nbsp;not&nbsp;shown...&nbsp;*/<br>
-&nbsp;<br>
-static&nbsp;int<br>
-BltinFileAccess(char&nbsp;*path,&nbsp;int&nbsp;mode){<br>
-&nbsp;&nbsp;char&nbsp;*zData;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;mode&nbsp;&amp;&nbsp;3&nbsp;)&nbsp;return&nbsp;-1;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">All builtins are read-only</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;zData&nbsp;=&nbsp;FindBuiltinFile(path,&nbsp;0,&nbsp;&amp;nData);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Check if <tt>path</tt> is a builtin</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;zData==0&nbsp;)&nbsp;return&nbsp;-1;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Fail if <tt>path</tt> is not a builtin</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;0;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Success if it is builtin</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;TclStatInsertProc(BltinFileStat);<br>
-&nbsp;&nbsp;TclAccessInsertProc(BltinFileAccess);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Register new <tt>stat</tt> and <tt>access</tt> functions</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();<br>
-&nbsp;&nbsp;Tcl_Init(interp);<br>
-&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zInputLoop);<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">The <tt>TclOpenFileChannelInsertProc()</tt> Function</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>static&nbsp;Tcl_Channel&nbsp;BuiltinFileOpen(<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp,&nbsp;&nbsp;&nbsp;/*&nbsp;The&nbsp;TCL&nbsp;interpreter&nbsp;doing&nbsp;the&nbsp;open&nbsp;*/<br>
-&nbsp;&nbsp;char&nbsp;*zFilename,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Name&nbsp;of&nbsp;the&nbsp;file&nbsp;to&nbsp;open&nbsp;*/<br>
-&nbsp;&nbsp;char&nbsp;*modeString,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Mode&nbsp;string&nbsp;for&nbsp;the&nbsp;open&nbsp;(ignored)&nbsp;*/<br>
-&nbsp;&nbsp;int&nbsp;permissions&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Permissions&nbsp;for&nbsp;a&nbsp;newly&nbsp;created&nbsp;file&nbsp;(ignored)&nbsp;*/<br>
-){<br>
-&nbsp;&nbsp;char&nbsp;*zData;<br>
-&nbsp;&nbsp;BuiltinFileStruct&nbsp;*p;<br>
-&nbsp;&nbsp;int&nbsp;nData;<br>
-&nbsp;&nbsp;char&nbsp;zName[50];<br>
-&nbsp;&nbsp;Tcl_Channel&nbsp;chan;<br>
-&nbsp;&nbsp;static&nbsp;int&nbsp;count&nbsp;=&nbsp;1;<br>
-&nbsp;<br>
-&nbsp;&nbsp;zData&nbsp;=&nbsp;FindBuiltinFile(zFilename,&nbsp;1,&nbsp;&amp;nData);<br>
-&nbsp;&nbsp;if(&nbsp;zData==0&nbsp;)&nbsp;return&nbsp;NULL;<br>
-&nbsp;&nbsp;p&nbsp;=&nbsp;(BuiltinFileStruct*)Tcl_Alloc(&nbsp;sizeof(BuiltinFileStruct)&nbsp;);<br>
-&nbsp;&nbsp;if(&nbsp;p==0&nbsp;)&nbsp;return&nbsp;NULL;<br>
-&nbsp;&nbsp;p->zData&nbsp;=&nbsp;zData;<br>
-&nbsp;&nbsp;p->nData&nbsp;=&nbsp;nData;<br>
-&nbsp;&nbsp;p->cursor&nbsp;=&nbsp;0;<br>
-&nbsp;&nbsp;sprintf(zName,"etbi_bffffc7c_8049b04",((int)BuiltinFileOpen)>>12,count++);<br>
-&nbsp;&nbsp;chan&nbsp;=&nbsp;Tcl_CreateChannel(&amp;builtinChannelType,&nbsp;zName,&nbsp;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ClientData)p,&nbsp;TCL_READABLE);<br>
-&nbsp;&nbsp;return&nbsp;chan;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">The <tt>TclOpenFileChannelInsertProc()</tt> Function</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>static&nbsp;Tcl_ChannelType&nbsp;builtinChannelType&nbsp;=&nbsp;{<br>
-&nbsp;&nbsp;"builtin",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Type&nbsp;name.&nbsp;*/<br>
-&nbsp;&nbsp;NULL,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Always&nbsp;non-blocking.*/<br>
-&nbsp;&nbsp;BuiltinFileClose,&nbsp;&nbsp;&nbsp;/*&nbsp;Close&nbsp;proc.&nbsp;*/<br>
-&nbsp;&nbsp;BuiltinFileInput,&nbsp;&nbsp;&nbsp;/*&nbsp;Input&nbsp;proc.&nbsp;*/<br>
-&nbsp;&nbsp;BuiltinFileOutput,&nbsp;&nbsp;/*&nbsp;Output&nbsp;proc.&nbsp;*/<br>
-&nbsp;&nbsp;BuiltinFileSeek,&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Seek&nbsp;proc.&nbsp;*/<br>
-&nbsp;&nbsp;NULL,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Set&nbsp;option&nbsp;proc.&nbsp;*/<br>
-&nbsp;&nbsp;NULL,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Get&nbsp;option&nbsp;proc.&nbsp;*/<br>
-&nbsp;&nbsp;BuiltinFileWatch,&nbsp;&nbsp;&nbsp;/*&nbsp;Watch&nbsp;for&nbsp;events&nbsp;on&nbsp;console.&nbsp;*/<br>
-&nbsp;&nbsp;BuiltinFileHandle,&nbsp;&nbsp;/*&nbsp;Get&nbsp;a&nbsp;handle&nbsp;from&nbsp;the&nbsp;device.&nbsp;*/<br>
-};</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p>
- <p>For additional information see:</p>
- <ul>
- <li>The man page for <tt>Tcl_CreateChannel()</tt></li>
- <li>Tk source code file <tt>generic/tkConsole.c</tt></li>
- </ul>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Initializing Tk</h2>
-<p><ul><li>All the same initialization script issues as Tcl</li></ul><ul><li>Tk initialization scripts are in a different directory
- than the Tcl initialization scripts - the "Tk Library"</li></ul><ul><li>Call <tt>Tk_Init()</tt> after <tt>Tcl_Init()</tt></li></ul><ul><li>Must have an event loop or Tk will not work!</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Implementing An Event Loop</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>button&nbsp;.b&nbsp;-text&nbsp;Hello&nbsp;-command&nbsp;exit<br>
-pack&nbsp;.b</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Create a Tk interface</td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>bind&nbsp;.&nbsp;&lt;Destroy>&nbsp;{<br>
-&nbsp;&nbsp;if&nbsp;{![winfo&nbsp;exists&nbsp;.]}&nbsp;exit<br>
-}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Close the application when the main window
- is destroyed</td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>while&nbsp;1&nbsp;{vwait&nbsp;forever}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">The event loop</td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">"Hello, World!" Using Tk</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tk.h><br>
-&nbsp;<br>
-</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>static&nbsp;char&nbsp;zHello[]&nbsp;=&nbsp;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">The application code</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;"button&nbsp;.b&nbsp;"<br>
-&nbsp;&nbsp;&nbsp;&nbsp;"-text&nbsp;{Hello,&nbsp;World}&nbsp;"<br>
-&nbsp;&nbsp;&nbsp;&nbsp;"-command&nbsp;exit\n"<br>
-&nbsp;&nbsp;"pack&nbsp;.b\n";<br>
-&nbsp;<br>
-</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>static&nbsp;char&nbsp;zEventLoop[]&nbsp;=</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">The event loop</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;"bind&nbsp;.&nbsp;&lt;Destroy>&nbsp;{\n"<br>
-&nbsp;&nbsp;"&nbsp;&nbsp;if&nbsp;{![winfo&nbsp;exists&nbsp;.]}&nbsp;exit\n"<br>
-&nbsp;&nbsp;"}\n"<br>
-&nbsp;&nbsp;"while&nbsp;1&nbsp;{vwait&nbsp;forever}\n";<br>
-&nbsp;<br>
-<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;Tcl_Interp&nbsp;*interp;<br>
-&nbsp;&nbsp;interp&nbsp;=&nbsp;Tcl_CreateInterp();</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Init(interp);<br>
-&nbsp;&nbsp;Tk_Init(interp);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">We really should check the return values of the init functions...</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zHello);</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_Eval(interp,&nbsp;zEventLoop);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">The event loop never returns</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*NOTREACHED*/<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Compiling "Hello, World!" For Tk</h2>
-<p><p><b>Unix:</b></p>
- <blockquote><pre>
- $ gcc hello.c -ltk -L/usr/X11R6/lib \
- -lX11 -ltcl -lm -ldl
- $ ./a.out</pre></blockquote>
-
- <p><b>Windows using Cygwin:</b></p>
- <blockquote><pre>
- C:> gcc hello.c -mwindows -ltk80 -ltcl80 -lm
- C:> a.exe</pre></blockquote>
-
- <p><b>Windows using Mingw32:</b></p>
- <blockquote><pre>
- C:> gcc -mno-cygwin hello.c -mwindows \
- -ltk82 -ltcl82 -lm
- C:> a.exe</pre></blockquote></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Making The Program Standalone</h2>
-<p><p>To make a Tcl application standalone you have to convert the following
- initialization scripts to C strings and compile them into the
- executable:</p>
- <table><tr>
- <td valign="top"><tt>
- &nbsp;&nbsp;auto.tcl<br>
- &nbsp;&nbsp;history.tcl<br>
- &nbsp;&nbsp;init.tcl
- </tt></td>
- <td valign="top"><tt>
- &nbsp;&nbsp;ldAout.tcl<br>
- &nbsp;&nbsp;package.tcl
- </tt></td>
- <td valign="top"><tt>
- &nbsp;&nbsp;parray.tcl<br>
- &nbsp;&nbsp;safe.tcl
- </tt></td>
- <td valign="top"><tt>
- &nbsp;&nbsp;tclIndex<br>
- &nbsp;&nbsp;word.tcl
- </tt></td>
- </tr></table>
-
- <p>To make a Tk application standalone requires these additional
- initialization scripts from the Tk Library:</p>
- <table><tr>
- <td valign="top"><tt>
- &nbsp;&nbsp;bgerror.tcl<br>
- &nbsp;&nbsp;button.tcl<br>
- &nbsp;&nbsp;clrpick.tcl<br>
- &nbsp;&nbsp;comdlg.tcl<br>
- &nbsp;&nbsp;console.tcl<br>
- &nbsp;&nbsp;dialog.tcl
- </tt></td>
- <td valign="top"><tt>
- &nbsp;&nbsp;entry.tcl<br>
- &nbsp;&nbsp;focus.tcl<br>
- &nbsp;&nbsp;listbox.tcl<br>
- &nbsp;&nbsp;menu.tcl<br>
- &nbsp;&nbsp;msgbox.tcl<br>
- &nbsp;&nbsp;optMenu.tcl
- </tt></td>
- <td valign="top"><tt>
- &nbsp;&nbsp;palette.tcl<br>
- &nbsp;&nbsp;safetk.tcl<br>
- &nbsp;&nbsp;scale.tcl<br>
- &nbsp;&nbsp;scrlbar.tcl<br>
- &nbsp;&nbsp;tclIndex<br>
- &nbsp;&nbsp;tearoff.tcl
- </tt></td>
- <td valign="top"><tt>
- &nbsp;&nbsp;text.tcl<br>
- &nbsp;&nbsp;tk.tcl<br>
- &nbsp;&nbsp;tkfbox.tcl<br>
- &nbsp;&nbsp;xmfbox.tcl
- </tt></td>
- </tr></table>
-
- <p>Total of about 13K lines and 400K bytes of text or 9K lines and
- 250K bytes if you strip comments and leading spaces</p></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">A Review Of The Features We Want</h2>
-<p><ol type="A">
- <li value="1">
- Combine C/C++ with Tcl/Tk into a single executable.</dd>
- </li></ol>
-
- <ol type="A">
- <li value="2">
- The executable should be standalone. It must not depend
- on files not normally found on the system.
- </li></ol>
-
- <ol type="A">
- <li value="3">
- It should be difficult for end users to alter the program
- (and introduce bugs).
- </li></ol></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Available Programming Aids</h2>
-<p><p>Several tools are available. The chart below shows which tools
- help achieve which objectives.</p>
-
- <center><table border="2">
- <tr>
- <td></td>
- <td colspan="3" align="center">
- <b>Features The Tool Helps To Achieve</b></td>
- </tr>
- <tr>
- <td align="center"><b>Tool Name</b></td>
- <td align="center">Mix C and Tcl</td>
- <td align="center">Standalone</td>
- <td align="center">Hide Source</td>
- </tr>
- <tr>
- <td>SWIG</td>
- <td align="center"><img src="image6"></td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td>TclPro Wrapper</td>
- <td>&nbsp;</td>
- <td align="center"><img src="image6"></td>
- <td align="center"><img src="image6"></td>
- </tr>
- <tr>
- <td>FreeWrap</td>
- <td>&nbsp;</td>
- <td align="center"><img src="image6"></td>
- <td align="center"><img src="image6"></td>
- </tr>
- <tr>
- <td>Wrap</td>
- <td>&nbsp;</td>
- <td align="center"><img src="image6"></td>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td>mktclapp</td>
- <td align="center"><img src="image6"></td>
- <td align="center"><img src="image6"></td>
- <td align="center"><img src="image6"></td>
- </tr>
- </table></center></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">SWIG</h2>
-<table><tr><td valign="top"><img src="image7"></td>
-<td valign="top"><p><ul><li>Creates an interface between an existing C/C++ library and a high-level
- programming language. Support for:
- <ul>
- <li> Tcl/Tk </li>
- <li> Perl </li>
- <li> Python </li>
- <li> Java </li>
- <li> Eiffel </li>
- <li> Guile </li>
- </ul></li></ul><ul><li>No changes required to C/C++ code. Can be used with legacy libraries.</li></ul><ul><li>Generates an extension, not a standalone binary</li></ul><ul><li>The tutorial on SWIG was yesterday afternoon.</li></ul><ul><li>http://www.swig.org/</li></ul></p></td></tr></table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Wrapper Programs</h2>
-<table><tr><td valign="top"><img src="image8"></td>
-<td valign="top"><p><ul><li>Convert a pure Tcl/Tk program into a standalone binary</li></ul><ul><li>Several wrapper programs are available:
- <ul>
- <li> TclPro Wrapper - http://www.scriptics.com/ </li>
- <li> FreeWrap - http://www.albany.net/~dlabelle/freewrap/freewrap.html </li>
- <li> Wrap - http://members1.chello.nl/~j.nijtmans/wrap.html </li>
- </ul></li></ul><ul><li>No C compiler required!</li></ul><ul><li>TclPro will convert Tcl script into bytecode so that it cannot be
- easily read by the end user. FreeWrap encrypts the scripts.</li></ul><ul><li>FreeWrap uses compression on its executable.
- Wrap uses compression on both the executable and on the bundled script files.</li></ul><ul><li>Usually include extensions like winico and/or BLT</li></ul></p></td></tr></table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">mktclapp</h2>
-<table><tr><td valign="top"><img src="image9"></td>
-<td valign="top"><p><ul><li>Mix C/C++ with Tcl/Tk into a standalone binary</li></ul>
-<ul><li><tt>mktclapp</tt> generates an application initialization file
- that contains Tcl scripts as strings and makes all necessary calls
- to <tt>Tcl_Init</tt>, <tt>Tcl_CreateCommand</tt>,
- <tt>Tcl</tt>*<tt>InsertProc</tt>, etc.</li></ul><ul><li>Features to make it easier to write new Tcl command in C</li></ul><ul><li><tt>xmktclapp.tcl</tt> provides a GUI interface to <tt>mktclapp</tt></li></ul><ul><li>http://www.hwaci.com/sw/mktclapp/</li></ul></p></td></tr></table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">"Hello, World!" Using Mktclapp</h2>
-<p><ul><li>Download <tt>mktclapp.c</tt> and <tt>xmktclapp.tcl</tt> from
- http://www.hwaci.com/sw/mktclapp/</li></ul><ul><li>Compile <tt>mktclapp</tt>:
- <blockquote><pre>
- cc -o mktclapp mktclapp.c
- </pre></blockquote></li></ul><ul><li>Create "Hello, World!" as a Tcl script in file <tt>hw.tcl</tt>:
- <blockquote><pre>
- button .b -text {Hello, World!} -command exit
- pack .b
- </pre></blockquote></li></ul><ul><li>Launch xmktclapp:
- <blockquote><pre>
- wish xmktclapp.tcl
- </pre></blockquote></li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">"Hello, World!" Using Mktclapp</h2>
-<table width="100%"><tr><td valign="top"><p><ul><li>Set "Command Line Input?" to "None"</li></ul><ul><li>Set "Standalone?" to "Yes"</li></ul><ul><li>Enter "<tt>hw.mta</tt>" for the Configuration File</li></ul><ul><li>Enter "<tt>hw.c</tt>" for the Output C File</li></ul></p></td>
-<td valign="top" align="right"><img src="image10"></td></tr></table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">"Hello, World!" Using Mktclapp</h2>
-<table width="100%"><tr><td valign="top"><p><ul><li>Go to the "Tcl Scripts" page</li></ul><ul><li>Press "Insert" and add <tt>hw.tcl</tt> to the list of
- Tcl scripts</li></ul><ul><li>Change the "Startup Script" to be <tt>hw.tcl</tt>.</li></ul><ul><li>Select File/Build and File/Exit</li></ul></p></td>
-<td valign="top" align="right"><img src="image11"></td></tr></table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">"Hello, World!" Using Mktclapp</h2>
-<p><ul><li>Mktclapp generates <tt>hw.c</tt>.
- Compile it something like this:
- <pre>
- cc hw.c -ltk -L/usr/X11R6/lib -lX11 -ltcl -lm -ldl
- </pre></li></ul><ul><li>Or, if using Cygwin:
- <pre>
- gcc hw.c -mwindows -ltk80 -ltcl80 -lm
- </pre></li></ul><ul><li>Or, if using Mingw32:
- <pre>
- gcc -mno-cygwin hw.c -mwindows -ltk82 -ltcl82 -lm
- </pre></li></ul><ul><li>And you're done!</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Adding C Code To Your Program</h2>
-<p>Put the new C code in a new source file named "<tt>add.c</tt>"</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;"hw.h"</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Generated by mktclapp</td>
-</tr>
-<tr><td valign="center">
-<small><tt></tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>int&nbsp;ET_COMMAND_add(ET_TCLARGS){</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><tt>ET_TCLARGS</tt> is a macro defined in <tt>hw.h</tt></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;int&nbsp;a,&nbsp;b;<br>
-&nbsp;&nbsp;char&nbsp;zResult[30];<br>
-&nbsp;&nbsp;a&nbsp;=&nbsp;atoi(argv[1]);<br>
-&nbsp;&nbsp;b&nbsp;=&nbsp;atoi(argv[2]);<br>
-&nbsp;&nbsp;sprintf(zResult,&nbsp;"-1073742724",&nbsp;a+b);<br>
-&nbsp;&nbsp;Tcl_SetResult(interp,&nbsp;zResult,&nbsp;TCL_VOLATILE);<br>
-&nbsp;&nbsp;return&nbsp;TCL_OK;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Adding C Code To Your Program</h2>
-<table width="100%"><tr><td valign="top"><p><ul><li>Go to the "C/C++ Modules" page of xmktclapp.tcl</li></ul>
-<ul><li>Press "Insert" and add <tt>add.c</tt> to the list of
- C/C++ modules</p></li></ul></li></ul><ul><li>Select File/Build and File/Exit</li></ul></p></td>
-<td valign="top" align="right"><img src="image12"></td></tr></table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Adding C Code To Your Program</h2>
-<p><ul><li>Compile as follows:
- <pre>
- cc add.c hw.c -ltk -L/usr/X11R6/lib -ltcl -lm -ldl
- </pre></li></ul><ul><li>Or construct a Makefile that compiles <tt>add.c</tt> into <tt>add.o</tt>
- and <tt>hw.c</tt> into <tt>hw.o</tt> and then links them.</li></ul><ul><li>Compile the same way for Windows except use the usual Windows
- libraries and options...</li></ul><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>Don't have to worry with <tt>Tcl_CreateCommand()</tt> - Mktclapp takes
- care of that automatically.</b></td></tr></table></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Checking Parameters In The <tt>add</tt> Command</h2>
-<p>Modify <tt>add.c</tt> to insure the <tt>add</tt> command
- is called with exactly two integer arguments</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;"hw.h"<br>
-&nbsp;<br>
-int&nbsp;ET_COMMAND_add(ET_TCLARGS){<br>
-&nbsp;&nbsp;int&nbsp;a,&nbsp;b;<br>
-&nbsp;&nbsp;char&nbsp;zResult[30];</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;argc!=3&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;Tcl_AppendResult(interp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"wrong&nbsp;#&nbsp;args:&nbsp;should&nbsp;be:&nbsp;\"",<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;argv[0],&nbsp;"&nbsp;VALUE&nbsp;VALUE\"",&nbsp;0);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Report an error if there are not exactly
- 2 arguments</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;Tcl_GetInt(interp,&nbsp;argv[1],&nbsp;&amp;a)!=TCL_OK&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Report an error if the first argument is
- not an integer</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;Tcl_GetInt(interp,&nbsp;argv[2],&nbsp;&amp;b)!=TCL_OK&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Do the same for the second argument</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;sprintf(zResult,&nbsp;"-1073742724",&nbsp;a+b);<br>
-&nbsp;&nbsp;Tcl_SetResult(interp,&nbsp;zResult,&nbsp;TCL_VOLATILE);<br>
-&nbsp;&nbsp;return&nbsp;TCL_OK;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Using The Tcl_Obj Interface</h2>
-<p>In the file <tt>objadd.c</tt> put this code:</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;"hw.h"</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-int&nbsp;ET_OBJCOMMAND_add2(ET_OBJARGS){<br>
-&nbsp;&nbsp;int&nbsp;a,&nbsp;b;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Use "<tt>ET_OBJCOMMAND</tt>" instead of "<tt>ET_COMMAND</tt>" and
- "<tt>ET_OBJARGS</tt>" instead of "<tt>ET_TCLARGS</tt>"</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;objc!=3&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;Tcl_WrongNumArgs(interp,&nbsp;1,&nbsp;objv,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"number&nbsp;number");<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">A special routine for "wrong # args" error</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;Tcl_GetIntFromObj(interp,&nbsp;objv[1],&nbsp;&amp;a)&nbsp;){</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Instead of <tt>Tcl_GetInt</tt></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;if(&nbsp;Tcl_GetIntFromObj(interp,&nbsp;objv[2],&nbsp;&amp;b)&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_SetIntObj(Tcl_GetObjResult(interp),&nbsp;a+b);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Result stored as integer, not a string</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;TCL_OK;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Speed Of Tcl_Obj Versus "char*" Interfaces</h2>
-<p><ul><li>Compile both <tt>add</tt> and <tt>add2</tt> into the same executable.</li></ul><ul><li>Compare their speeds:
- <pre>
- time {add 123456 654321} 10000
- <font color="blue">26 microseconds per iteration</font>
- time {add2 123456 654321} 10000
- <font color="blue">4 microseconds per iteration</font>
- </pre></li></ul><ul><li>The Tcl_Obj version is 650 faster!</li></ul><ul><li>Replace the addition with a "real" computation that takes
- 10 milliseconds.</li></ul><ul><li>Now the Tcl_Obj version is only 0.2 faster!</li></ul><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>In many real-world problems, the Tcl_Obj interface has no noticeable
- speed advantage over the string interface.</b></td></tr></table></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">More About Built-in Tcl Scripts</h2>
-<table><tr><td valign="top"><img src="image11"></td>
-<td valign="top"><p><ul><li>Comments and leading white-space are removed from the
- script by default. Use the "Don't Strip Comments"
- button to change this.</li></ul><ul><li>The file name must exactly match the name that is
- used by the <tt>source</tt> command.</li></ul></p></td></tr></table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Locations Of Libraries</h2>
-<table><tr><td valign="top"><img src="image13"></td>
-<td valign="top"><p><ul><li>Tells mktclapp where to look for script libraries.</li></ul><ul><li>All Tcl scripts in the indicated directories are
- compiled into the <tt>appinit.c</tt> file.</li></ul><ul><li>Comments and extra white-space are removed.
- There is no way to turn this off.</li></ul></p></td></tr></table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Built-in Binary Data Files</h2>
-<table><tr><td valign="top"><img src="image14"></td>
-<td valign="top"><p><ul><li>Arbitrary files become part of the virtual filesystem</li></ul><ul><li>No comment or white-space removal is attempted</li></ul><ul><li>Useful for images or other binary data</li></ul></p></td></tr></table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">New Commands In Namespaces</h2>
-<p>Two underscores (__) are replaced by two colons (::) in
- command names, thus giving the ability to define new commands
- in a namespace</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;hw.h></tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt><br>
-int&nbsp;ET_COMMAND_adder__add(ET_TCLARGS){<br>
-&nbsp;&nbsp;int&nbsp;a,&nbsp;b;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Creates the Tcl command called "<tt>adder::add</tt>"</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;char&nbsp;*zResult[30];<br>
-&nbsp;&nbsp;if(&nbsp;argc!=3&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;Tcl_AppendResult(interp,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"wrong&nbsp;#&nbsp;args:&nbsp;should&nbsp;be:&nbsp;\"",<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;argv[0],&nbsp;"&nbsp;VALUE&nbsp;VALUE\"",&nbsp;0);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;if(&nbsp;Tcl_GetInt(interp,&nbsp;argv[1],&nbsp;&amp;a)!=TCL_OK&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;if(&nbsp;Tcl_GetInt(interp,&nbsp;argv[1],&nbsp;&amp;b)!=TCL_OK&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}<br>
-&nbsp;&nbsp;sprintf(zResult,&nbsp;"-1073742724",&nbsp;a+b);<br>
-&nbsp;&nbsp;Tcl_SetResult(interp,&nbsp;zResult,&nbsp;TCL_VOLATILE);<br>
-&nbsp;&nbsp;return&nbsp;TCL_OK;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Adding Your Own <tt>main()</tt></h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;/*&nbsp;Application&nbsp;specific&nbsp;initialization&nbsp;*/</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Et_Init(argc,&nbsp;argv);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Never returns!</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*NOTREACHED*/<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><table><tr><td valign="top"><img src="image3"></td>
-<td valign="top"><b>The "Autofork" feature is disabled if you supply your own <tt>main()</tt></b></td></tr></table>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Initializing The Tcl Interpreter</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-int&nbsp;counter&nbsp;=&nbsp;0;<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){<br>
-&nbsp;&nbsp;&nbsp;Et_Init(argc,&nbsp;argv);<br>
-&nbsp;&nbsp;&nbsp;/*NOTREACHED*/<br>
-&nbsp;&nbsp;&nbsp;return&nbsp;0;<br>
-}<br>
-&nbsp;<br>
-int&nbsp;Et_AppInit(Tcl_Interp&nbsp;*interp){</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;if(&nbsp;Blt_Init(Interp)&nbsp;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;TCL_ERROR;<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Example: Initialize an extension</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Tcl_LinkVar(interp,&nbsp;"counter",&nbsp;&amp;counter,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TCL_LINK_INT);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Or link a C variable to a Tcl variable</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return&nbsp;TCL_OK;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Return TCL_OK if successful</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Writing Your Own Event Loop</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>void&nbsp;Et_CustomMainLoop(Tcl_Interp&nbsp;*interp){</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Replaces the default event loop</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;return;</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Ex: Return without handling any events.</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Et_Init(argc,&nbsp;argv);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">This now returns after initializing Tcl</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*&nbsp;Application&nbsp;code&nbsp;here&nbsp;*/<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Writing Your Own Event Loop</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;&lt;tcl.h><br>
-&nbsp;<br>
-void&nbsp;Et_CustomMainLoop(Tcl_Interp&nbsp;*interp){</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;for(;;){<br>
-&nbsp;&nbsp;&nbsp;&nbsp;Tcl_DoOneEvent(TCL_ALL_EVENTS|TCL_DONT_WAIT);<br>
-&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Other&nbsp;processing...&nbsp;*/<br>
-&nbsp;&nbsp;}</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Intermix processing and event handling</td>
-</tr>
-<tr><td valign="center">
-<small><tt>}<br>
-&nbsp;<br>
-int&nbsp;main(int&nbsp;argc,&nbsp;char&nbsp;**argv){</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;Et_Init(argc,&nbsp;argv);</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Never returns</td>
-</tr>
-<tr><td valign="center">
-<small><tt>&nbsp;&nbsp;/*NOTREACHED*/<br>
-&nbsp;&nbsp;return&nbsp;0;<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Mktclapp Initialization Sequence</h2>
-<p><ul><li>Initialization starts when the <tt>Et_Init()</tt>
- function is called either by client code or by
- the <tt>main()</tt> that mktclapp generates</li></ul><ul><li>Create the main Tcl interpreter</li></ul><ul><li>Construct the virtual filesystem overlay by redefining
- the <tt>source</tt> command and by using the
- <tt>Tcl</tt>*<tt>InsertProc()</tt> functions</li></ul><ul><li>Call <tt>Et_PreInit()</tt> if the client defines it</li></ul><ul><li>Call <tt>Tcl_Init()</tt> and <tt>Tk_Init()</tt></li></ul><ul><li>Call <tt>Tcl_CreateCommand()</tt> and <tt>Tcl_CreateObjCommand()</tt>
- for every <tt>ET_COMMAND_</tt>* and <tt>ET_OBJCOMMAND_</tt>* function
- in the client code</li></ul><ul><li>Call <tt>Et_AppInit()</tt> if the client defines it</li></ul><ul><li>Run the main Tcl script if there is one</li></ul><ul><li>Call <tt>Et_CustomMainLoop()</tt> if defined by client code or
- else run the built-in event loop</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Invoking Tcl From C</h2>
-<p><ul><li>Use one of the built-in evaluation functions:
- <center><table width="80%">
- <tr><td valign="top" width="50%"><ul>
- <li> Tcl_Eval() </li>
- <li> Tcl_VarEval() </li>
- <li> Tcl_EvalFile() </li>
- <li> Tcl_GlobalEval() </li>
- </ul></td>
- <td valign="top" width="50%"><ul>
- <li> Tcl_EvalObj() </li>
- <li> Tcl_GlobalEvalObj() </li>
- </ul></td></tr>
- </table></center></li></ul><ul><li>Mktclapp provides evaluation functions with variable argument
- lists as in <tt>printf()</tt>:
- <ul>
- <li> Et_EvalF() </li>
- <li> Et_GlobalEvalF() </li>
- </ul></li></ul><ul><li>Mktclapp provides a global variable <tt>Et_Interp</tt> which is
- a pointer to the main interpreter</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Invoking Tcl From C</h2>
-<p>Example: A C function that pops up an error message dialog box</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;"appinit.h"<br>
-&nbsp;<br>
-void&nbsp;ErrMsg(char&nbsp;*zMsg){<br>
-&nbsp;&nbsp;Tcl_SetVar(Et_Interp,&nbsp;"zMsg",&nbsp;zMsg,&nbsp;TCL_GLOBAL_ONLY);<br>
-&nbsp;&nbsp;Tcl_GlobalEval(Et_Interp,&nbsp;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;"tk_messageBox&nbsp;-icon&nbsp;error&nbsp;-msg&nbsp;$zMsg&nbsp;-type&nbsp;ok");<br>
-&nbsp;&nbsp;Tcl_UnsetVar(Et_Interp,&nbsp;"zMsg",&nbsp;TCL_GLOBAL_ONLY);<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Invoking Tcl From C</h2>
-<p>The same C function implemented using <tt>Et_EvalF()</tt> instead
- of <tt>Tcl_GlobalEval()</tt></p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;"appinit.h"<br>
-&nbsp;<br>
-void&nbsp;ErrMsg(char&nbsp;*zMsg){<br>
-&nbsp;&nbsp;Et_EvalF(Et_Interp,&nbsp;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;"tk_messageBox&nbsp;-icon&nbsp;error&nbsp;-msg&nbsp;{¸üÿ¿PX¶}&nbsp;-type&nbsp;ok",<br>
-&nbsp;&nbsp;&nbsp;&nbsp;zMsg);<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p>
- <ul><li>
- Suppose the function is called as follows:
- <blockquote>
- <tt>ErrMsg("Syntax error near \"}\"");</tt>
- </blockquote>
- </li></ul>
-
- <ul><li>
- The command that gets executed is:
- <pre>
- tk_messageBox -icon error -msg \
- {Syntax error near "}"} -type ok
- </pre>
- </li></ul>
-
- <ul><li>
- But this is an ill-formed Tcl command!
- </li></ul>
-</p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Invoking Tcl From C</h2>
-<p>Use the "<tt></tt>" format to generate a quoted string</p><p>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#include&nbsp;"appinit.h"<br>
-&nbsp;<br>
-void&nbsp;ErrMsg(char&nbsp;*zMsg){<br>
-&nbsp;&nbsp;Et_EvalF(Et_Interp,&nbsp;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;"tk_messageBox&nbsp;-icon&nbsp;error&nbsp;-msg&nbsp;\"%\"&nbsp;-type&nbsp;ok",<br>
-&nbsp;&nbsp;&nbsp;&nbsp;zMsg);<br>
-}</tt></small></td>
-<td></td><td></td><td></td><td></td>
-</tr>
-</table>
-<p><ul><li>The <tt></tt> puts a backslash before all characters that
- are special to Tcl</li></ul><ul><li>The Tcl command becomes:
- <pre>
- tk_messageBox -icon error -msg \
- "Syntax error near \"\}\"" -type ok
- </pre></li></ul></p>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Other Functions Provided By Mktclapp</h2>
-<p><ul><li><tt>void Et_ResultF(Tcl_Interp*, ...);</tt></li></ul><ul><li><tt>char *Et_DStringAppendF(Tcl_DString*, ...);</tt></li></ul><ul><li><tt>int Et_AppendObjF(Tcl_Obj*, ...);</tt></li></ul><ul><li><tt>char *mprintf(const char *format, ...);<br>
- char *vmprintf(const char *format, va_list);</tt></li></ul><ul><li><tt>void Et_NewBuiltinFile(char *filename, char *data, int amt);</tt></li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Operating Mktclapp From The Command Line</h2>
-<p><ul><li>Generate the <tt>appinit.h</tt> header file like this:
- <blockquote>
- <tt>mktclapp -header &gt;appinit.h</tt>
- </blockquote></li></ul><ul><li>Generate the <tt>appinit.c</tt> file like this:
- <blockquote>
- <tt>mktclapp -f appinit.mta >appinit.c</tt>
- </blockquote></li></ul><ul><li>The <tt>*.mta</tt> file is just a list of command-line options</li></ul><ul><li>Enter
- <blockquote>
- <tt>mktclapp -help</tt>
- </blockquote>
- to get a list of available options</li></ul><ul><li>Look at MTA files generated by xmktclapp.tcl for examples</li></ul></p>
-<br clear="both"><p><hr></p>
-<h2 align="center">Format Of An MTA File</h2>
-<table cellspacing="0" cellpadding="0" border="0">
-<tr><td valign="center">
-<small><tt>#&nbsp;Configuration&nbsp;file&nbsp;generated&nbsp;by&nbsp;xmktclapp<br>
-#&nbsp;Hand&nbsp;editing&nbsp;is&nbsp;not&nbsp;recommended<br>
-#</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Comments begin with one #</td>
-</tr>
-<tr><td valign="center">
-<small><tt>##&nbsp;Autofork&nbsp;No<br>
-##&nbsp;CFile:add.c&nbsp;1<br>
-##&nbsp;CFile:objadd.c&nbsp;1<br>
-##&nbsp;CmdLine&nbsp;Console<br>
-##&nbsp;ConfigFile&nbsp;hw.mta<br>
-##&nbsp;Data:check.gif&nbsp;1<br>
-##&nbsp;MainScript&nbsp;hw.tcl<br>
-##&nbsp;Mode&nbsp;Tcl/Tk<br>
-##&nbsp;NoSource&nbsp;No<br>
-##&nbsp;OutputFile&nbsp;hw.c<br>
-##&nbsp;Shroud&nbsp;No<br>
-##&nbsp;Standalone&nbsp;Yes<br>
-##&nbsp;TclFile:hw.tcl&nbsp;1<br>
-##&nbsp;TclLib&nbsp;/usr/lib/tcl8.0<br>
-##&nbsp;TkLib&nbsp;/usr/lib/tk8.0</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">Lines beginning with two #s are used
- by xmktclapp.tcl and ignored by mktclapp</td>
-</tr>
-<tr><td valign="center">
-<small><tt>-console<br>
--main-script&nbsp;"hw.tcl"<br>
--tcl-library&nbsp;"/usr/lib/tcl8.0"<br>
--tk-library&nbsp;"/usr/lib/tk8.0"<br>
-"add.c"<br>
-"objadd.c"<br>
--i&nbsp;"check.gif"<br>
--strip-tcl&nbsp;"hw.tcl"</tt></small></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center"><img src="image2"></td>
-<td>&nbsp;&nbsp;</td>
-<td valign="center">All other lines are read by mktclapp and
- ignored by xmktclapp.tcl</td>
-</tr>
-</table>
-
-<br clear="both"><p><hr></p>
-<h2 align="center">Summary</h2>
-<p><ul><li>Use Tcl for the things Tcl is good at and use C/C++ for the things that
- C/C++ is good at</li></ul><ul><li>Use wrapper programs to make pure Tcl programs standalone</li></ul><ul><li>Use mktclapp to combine Tcl/Tk with C/C++ into a standalone</li></ul></p>
-<br clear="both"><p><hr></p>
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image1 b/ext/tk/sample/tkextlib/tkHTML/page4/image1
deleted file mode 100644
index da26d7092e..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/image1
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image2 b/ext/tk/sample/tkextlib/tkHTML/page4/image2
deleted file mode 100644
index e176a96a55..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/image2
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image3 b/ext/tk/sample/tkextlib/tkHTML/page4/image3
deleted file mode 100644
index e829d3712c..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/image3
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image4 b/ext/tk/sample/tkextlib/tkHTML/page4/image4
deleted file mode 100644
index f14ea13547..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/image4
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image5 b/ext/tk/sample/tkextlib/tkHTML/page4/image5
deleted file mode 100644
index 4ef6277226..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/image5
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image6 b/ext/tk/sample/tkextlib/tkHTML/page4/image6
deleted file mode 100644
index 1adb261b40..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/image6
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image7 b/ext/tk/sample/tkextlib/tkHTML/page4/image7
deleted file mode 100644
index ba0d26ec18..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/image7
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image8 b/ext/tk/sample/tkextlib/tkHTML/page4/image8
deleted file mode 100644
index 8b81d58e27..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/image8
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/image9 b/ext/tk/sample/tkextlib/tkHTML/page4/image9
deleted file mode 100644
index f0a352f9d0..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/image9
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tkHTML/page4/index.html b/ext/tk/sample/tkextlib/tkHTML/page4/index.html
deleted file mode 100644
index 588ae5ccd7..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/page4/index.html
+++ /dev/null
@@ -1,768 +0,0 @@
-<!DOCTYPE HTML="HTML" PUBLIC="PUBLIC" "-//W3C//DTD=""-//W3C//DTD" HTML="HTML" 4.0="4.0" Transitional//EN"="Transitional//EN"">
-<HTML>
-<HEAD>
-<TITLE>[fm] welcome to freshmeat.net</TITLE>
-<STYLE TYPE="text/css"><!-- A:link {text-decoration: none}A:visited{text-decoration:none}A:active{text-decoration:none}--></STYLE>
-</HEAD>
-<BODY MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" RIGHTMARGIN="0" TOPMARGIN="0" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#336699" VLINK="#336699" ALINK="#336699">
-<BR><CENTER><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD WIDTH="1"><SCRIPT LANGUAGE="JAVASCRIPT">
-<!--
-now = new Date();
-tail = now.getTime();
-document.write("<IMG SRC='http://209.207.224.246/FreshMeat/Core/pc.gif?/index.php3," + tail + "' WIDTH=1 HEIGHT=1><BR>");
-//-->
-</SCRIPT>
-<NOSCRIPT>
-<IMG SRC="image1" WIDTH="1" HEIGHT="1"><BR>
-</NOSCRIPT></TD></TR></TABLE>
-<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD WIDTH="468"><SCRIPT LANGUAGE="JAVASCRIPT">
-<!--
-now = new Date();
-tail = now.getTime();
-AltText = "\"Please click here.\"";
-document.write("<A HREF='http://ads.freshmeat.net/cgi-bin/ad_click.pl?index,tsof0001en'>")
-document.write("<IMG SRC='http://ads.freshmeat.net/tsof0001en.gif?" + tail + "' WIDTH=468 HEIGHT=60 ALT=" + AltText + "></A><BR>");
-//-->
-</SCRIPT>
-<NOSCRIPT>
-<A HREF="http://ads.freshmeat.net/cgi-bin/ad_click.pl?index,tsof0001en"><IMG SRC="image2" WIDTH="468" HEIGHT="60" ALT="Please click here."></A><BR>
-</NOSCRIPT></TD></TR></TABLE>
-
-<TABLE CELLSPACING="0" CELLPADDING="2" BORDER="0" WIDTH="97%"><TR>
-<TD ALIGN="left" VALIGN="bottom"><A HREF="/"><IMG SRC="image3" BORDER="0" ALT="freshmeat.net" WIDTH="300" HEIGHT="65"></A></TD>
-<TD VALIGN="bottom" ALIGN="left" ROWSPAN="2"><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<FORM METHOD="get" ACTION="/search.php3">
-<SMALL>find: <INPUT TYPE="text" SIZE="15" NAME="query"></SMALL></FORM></FONT></TD>
-<TD ALIGN="right" VALIGN="bottom"><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<A HREF="http://www.linux.com"><FONT COLOR="#000000"><B><SMALL>linux.com partner</SMALL></B></FONT></A><BR>
-<TABLE CELLSPACING="0" CELLPADDING="1" BORDER="0" WIDTH="100%"><TR>
-<TD ALIGN="right"><SMALL><NOBR><FONT FACE="Lucida,Verdana,Helvetica,Arial"><B><A HREF="/">news</A> |<BR>
-<A HREF="/appindex/">appindex</A> |<BR>
-<A HREF="/editorials/">editorials</A> |</B></FONT></NOBR></SMALL></TD>
-<TD ALIGN="right"><SMALL><NOBR><FONT FACE="Lucida,Verdana,Helvetica,Arial"><B><A HREF="/lounge/">lounge</A> |<BR>
-<A HREF="/contrib.php3">contribute</A> |<BR>
-<A HREF="/feedback.php3">feedback</A> |</B></FONT></NOBR></SMALL></TD>
-<TD ALIGN="right"><SMALL><NOBR><FONT FACE="Lucida,Verdana,Helvetica,Arial"><B><A HREF="/about.php3">about</A> |<BR>
-<A HREF="/awards.php3">awards</A> |<BR>
-<A HREF="/faq.php3">FAQ</A> |</B></FONT></NOBR></SMALL></TD>
-</TR></TABLE></TD>
-</TR></TABLE>
-<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
-<TR BGCOLOR="#000000"><TD><IMG SRC="image4" WIDTH="1" HEIGHT="2" ALT=""></TD></TR></TABLE>
-<TABLE CELLSPACING="0" CELLPADDING="3" BORDER="0" WIDTH="100%" BGCOLOR="#BBDDFF">
-<TR><TD ALIGN="center" VALIGN="top">
-<BR>
-<FONT FACE="Lucida,Verdana,Helvetica,Arial">
-
-
-<SMALL><B>sort by: [ <A HREF="/news/2000/01/29/">date</A> | <A HREF="/news/list.php3?day=/2000/01/29/&orderby=name">name</A> | <A HREF="/news/list.php3?day=/2000/01/29/&orderby=urgency">urgency</A> ]</B></SMALL><BR></TD><TD>&nbsp;</TD></TR><TR><TD VALIGN="top" ALIGN="center"><FONT FACE="Lucida,Verdana,Helvetica,Arial"><TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">We should get this out of the door now</FONT></B><BR>
-<SMALL><B><A HREF="mailto:scoop@freshmeat.net">scoop</A> - January 29th 2000, 23:59 EST</B></SMALL>
-<P>Everyone else is talking about it, so we should announce it ourselves
-before you start to think it's a government hoax. <A HREF="http://server51.freshmeat.net/">Server 51</A> is our new hosting service for Open Source projects, based on Super Cool Space Alien Technology(TM). We hadn't planned to announce it quite so soon, and it's still in the alpha stage as we work day and night at integrating SCSAT with our terrestrial systems, but feel free to take a look around and see what's going on. When we're out of the testing stage and ready to make room for your project, we'll send word via your implants. Be listening.
-
-
-
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949208399.html">comments (8)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>Category: freshmeat
-</SMALL></B></FONT></FONT></TD><TD ALIGN="right">
- <A HREF="http://server51.freshmeat.net"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">Is Linux for Crazies?</FONT></B><BR>
-<SMALL><B><A HREF="mailto:jeff.covey@pobox.com">jeff covey</A> - January 29th 2000, 23:59 EST</B></SMALL>
-<P>Ray Woodcock writes: "In terms relevant to Linux, this freshmeat
-editorial glances at the tendency of mainstream viewpoints to dismiss
-other viewpoints as 'fringe,' the propensity of dissident movements to
-splinter into factions before they can effectively counter their
-primary adversaries, and the difficulty of creating stability without
-squelching curiosity."
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949208340.html">comments (2), 2065 words in body</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>Category: Editorial
-</SMALL></B></FONT></FONT></TD><TD ALIGN="right">
- &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">RabbIT 2.0.2</FONT></B><BR>
-<SMALL><B><A HREF="mailto:d94-rol@nada.kth.se">Ernimril</A> - January 29th 2000, 18:29 EST</B></SMALL>
-<DIV ALIGN="justify"><P>RabbIt is the mutating, caching webproxy which is used to speed up surfing over slow links like modems. It does this by removing advertising and background images and scaling down images to low quality JPEGs. RabbIT is written in Java and should be able to run on any platform. It does depend upon an image converter if imagescaleing is on. The recommended image converter is "convert" from the ImageMagick package.</DIV>
-<P><B>Changes:</B> Fixes have been made for a few bugs concerning keep alive and the HTTP response header, a bug with NT and cache directories, a bug concerning requests without a response body, a bug in GZIPHandler that caused it to not gzip already compressed (gzip or compress) streams, a bug in HTTPHeader regarding response phrases that are multiline, and a few bugs in ImageHandler and NCache. GZIPHandler has been built as an intermediate(*) to FilterHandler (this means that it is possible to gzip text/plain, etc., without filtering those streams) uuencoding has been added to the Coder, RabbIT now uses HTTP/1.1, HTMLParser now compiles cleanly with Jikes, and GeneralHeader has been created to allow for HTTPFooter (which is useful when sending chunked data).
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949188564.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: freely distributable</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/daemons/proxy.html"><FONT COLOR="#FFFFFF">Daemons/Proxy</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/902659138/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/902659138/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="/appindex/1998/08/09/902659138.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">nmpg 1.1.3</FONT></B><BR>
-<SMALL><B><A HREF="mailto:narkos@linuxmail.org">Joel Lindau</A> - January 29th 2000, 18:18 EST</B></SMALL>
-<DIV ALIGN="justify"><P>nmpg is a small command-driven frontend and network-jukebox for mpg123.</DIV>
-<P><B>Changes:</B> Bugfixes, better memory management, a new .nmpgrc parser, and new options.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949187896.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: OpenSource</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/console/sound.html"><FONT COLOR="#FFFFFF">Console/Sound</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/935430877/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/935430877/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/935430877/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/08/23/935430877.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">mod_dtcl 0.7.3</FONT></B><BR>
-<SMALL><B><A HREF="mailto:davidw@prosa.it">David Welton</A> - January 29th 2000, 18:11 EST</B></SMALL>
-<DIV ALIGN="justify"><P>Mod_dtcl is a free/open source implementation of server-parsed Tcl under Apache. It allows you to tightly integrate HTML with Tcl, a widely-used scripting language with many years of development invested in it. There are also many external Tcl modules that you can load into mod_dtcl, to create images, access databases, etc.</DIV>
-<P><B>Changes:</B> A major overhaul of header handling and internal buffering, and the addition of the ability to handle binary data.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949187471.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/web/development.html"><FONT COLOR="#FFFFFF">Web/Development</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/917925309/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/917925309/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/917925309/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/02/01/917925309.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">CoreLinux++ 0.4.6</FONT></B><BR>
-<SMALL><B><A HREF="mailto:frankc@users.sourceforge.net">Frank V. Castellucci</A> - January 29th 2000, 18:07 EST</B></SMALL>
-<DIV ALIGN="justify"><P>CoreLinux++ is an initiative to normalize methods and conventions for OOA/OOD/C++ development for Linux, materialized in a set of Open Source C++ class libraries (libcorelinux++ and libcoreframework++) to support common patterns and exploit the C++ standards.</DIV>
-<P><B>Changes:</B> This release adds AbstractFactory and AssociativeIterator analysis, design, implementations, test code, a CVS daily tarball, a Patch Submission facility and updated FAQ, Web Pages, and defect reporting guidelines.
-<P><B>Urgency:</B> medium
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949187233.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: LGPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/development/libraries.html"><FONT COLOR="#FFFFFF">Development/Libraries</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/944077775/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/944077775/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/944077775/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/12/01/944077775.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">scribe 0.2</FONT></B><BR>
-<SMALL><B><A HREF="mailto:kahlage@logoncafe.net">ChromeBob</A> - January 29th 2000, 12:12 EST</B></SMALL>
-<DIV ALIGN="justify"><P>scribe writes functions prototypes for your C code, so you don't have to. It also compares unique functions between source code files and will 'extern' when appropriate. C++ methods support is also planned.</DIV>
-<P><B>Changes:</B> A fix for an fflush() bug and better documentation.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949165962.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/development/tools.html"><FONT COLOR="#FFFFFF">Development/Tools</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/946661656/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/946661656/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="/appindex/1999/12/31/946661656.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">E theme updater 0.1</FONT></B><BR>
-<SMALL><B><A HREF="mailto:hallvar@ii.uib.no">Hallvar Helleseth</A> - January 29th 2000, 12:04 EST</B></SMALL>
-<DIV ALIGN="justify"><P>E theme Updater is a bash script to automatically update all of your Enlightenment themes from e.themes.org.</DIV>
-<P><B>Changes:</B> Initial release.
-
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949165472.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/console/misc.html"><FONT COLOR="#FFFFFF">Console/Misc</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/949164501/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/949164501/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="/appindex/2000/01/29/949164501.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">Powertweak-Linux 0.1.7</FONT></B><BR>
-<SMALL><B><A HREF="mailto:dave@denial.force9.co.uk">Dave Jones</A> - January 29th 2000, 12:03 EST</B></SMALL>
-<DIV ALIGN="justify"><P>Powertweak-Linux is a port of the Microsoft Windows tool of the same name rewritten from the ground up. Its main function is to tune your system to its optimal performance settings. Currently, it tunes PCI chipsets and can set /proc/sys entries.</DIV>
-<P><B>Changes:</B> A major GUI overhaul, the ability to generate configuration files, extended PCI information tabs, extra information support for the Matrox G200, and numerous other bugfixes & improvements.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949165416.html">comments (2)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/console/system.html"><FONT COLOR="#FFFFFF">Console/System</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/930836224/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/930836224/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/930836224/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/07/01/930836224.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">Pexeso Beta</FONT></B><BR>
-<SMALL><B><A HREF="mailto:pavolkrigler@pobox.sk">Pavol Krigler</A> - January 29th 2000, 11:55 EST</B></SMALL>
-<DIV ALIGN="justify"><P>pexeso is a simple graphic card game for one or two players.</DIV>
-<P><B>Changes:</B> Initial public release.
-
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164956.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: Freeware</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/console/games.html"><FONT COLOR="#FFFFFF">Console/Games</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/949141436/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/949141436/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="/appindex/2000/01/29/949141436.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">XZX 2.9.2</FONT></B><BR>
-<SMALL><B><A HREF="mailto:Erik.Kunze@fantasy.muc.de">E. Kunze</A> - January 29th 2000, 11:54 EST</B></SMALL>
-<DIV ALIGN="justify"><P>XZX is a portable emulator of ZX Spectrum 48K/128K/+3 (8-bit home computers made by Sir Clive Sinclair) and Pentagon/Scorpion (Spectrum clones made in Russia) for machines running UNIX and the X Window system. XZX is completely written in C and emulates Spectrum 48K, 128K, +2 and +3, Pentagon and Scorpion, Interface I with up to 8 microdrives, Multiface 128 and Multiface 3, BetaDisk 128 interface by Technology Research Ltd with 4 disk drives, +D interface by Miles Gordon Technology with 2 disk drives, Kempston mouse, Kempston joystick and built-in machine code monitor.</DIV>
-<P><B>Changes:</B> Lots of feature improvement and bug fixes. Most parts of the audio support has been rewritten for different UNICES.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164896.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: Shareware</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/x11/emulators.html"><FONT COLOR="#FFFFFF">X11/Emulators</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/936956384/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/936956384/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/936956384/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/09/10/936956384.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">DistroLib 0.4</FONT></B><BR>
-<SMALL><B><A HREF="mailto:phir@gcu-squad.org">PhiR</A> - January 29th 2000, 11:54 EST</B></SMALL>
-<DIV ALIGN="justify"><P>DistroLib is an abstraction library designed to make the development of distributed application easier. Its main target is currently compute-bound tasks based on a one server, many clients model (much like distributed.net), but it is quite generic and could be used for any client/server app. It is lightweight, easy-to-use, and relies heavily on threads.</DIV>
-<P><B>Changes:</B> Important bug fixes and command history support.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164869.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/development/libraries.html"><FONT COLOR="#FFFFFF">Development/Libraries</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/942588431/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/942588431/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/942588431/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/11/14/942588431.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">ToutDoux 1.1.7</FONT></B><BR>
-<SMALL><B><A HREF="mailto:yeupou@altern.org">yeupou</A> - January 29th 2000, 11:54 EST</B></SMALL>
-<DIV ALIGN="justify"><P>ToutDoux is a project manager which lets you design a plan of action using a tree structure, with translations in French and English.</DIV>
-<P><B>Changes:</B> A new menu and XML standard for save files.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164843.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/gnome/tools.html"><FONT COLOR="#FFFFFF">GNOME/Tools</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/944433411/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/944433411/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="/appindex/1999/12/05/944433411.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">goMP 1.0.3</FONT></B><BR>
-<SMALL><B><A HREF="mailto:dioxine@poulet.org">Gautier</A> - January 29th 2000, 11:52 EST</B></SMALL>
-<DIV ALIGN="justify"><P>goMP is a set of CGI scripts that allows you to remotely control, via a Web browser, a computer acting as an MP3 jukebox. This program is very useful for someone who's got a dedicated computer with a lot of MP3 files but that doesn't have any output and input devices except network and sound card. It's main advantages are built-in cataloging, fast access to music, and no special software needed on the client side.</DIV>
-<P><B>Changes:</B> Bugfixes, a password-protected config page, basic search function, easier installation thanks to an install script, and relocation of HTML docs and CGIs to a subdirectory.
-<P><B>Urgency:</B> medium
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164772.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: Artistic</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/web/tools.html"><FONT COLOR="#FFFFFF">Web/Tools</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/948492962/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/948492962/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/948492962/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/2000/01/21/948492962.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">APSEND 1.40</FONT></B><BR>
-<SMALL><B><A HREF="mailto:sventek@gmx.net">M.K.</A> - January 29th 2000, 11:50 EST</B></SMALL>
-<DIV ALIGN="justify"><P>APSEND is a TCP/IP packet sender to test firewalls and other network applications. It also includes a syn flood option, the land DoS attack, and a DoS attack against tcpdump running on a UNIX-based system. Future updates will include support for a scripting language to construct TCP packets and a few more options and protocols like UDP and ICMP. A port of APSEND from Perl to C is planned as well.</DIV>
-<P><B>Changes:</B> The stream attack, bugfixes, and rewrites for parts of the code.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164633.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/console/networking.html"><FONT COLOR="#FFFFFF">Console/Networking</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/941654429/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/941654429/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/941654429/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/11/03/941654429.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">ecasound 1.6.12r10</FONT></B><BR>
-<SMALL><B><A HREF="mailto:kaiv@wakkanet.fi">Kai Vehmanen</A> - January 29th 2000, 11:48 EST</B></SMALL>
-<DIV ALIGN="justify"><P>Ecasound is a software package designed for multitrack audio processing. It can be used for simple tasks like audio playback, recording and format conversions, as well as for multitrack effect processing, mixing, recording and signal recycling. Ecasound supports a wide range of audio inputs, outputs and effect algorithms. Ecasound has a chain-based design that allows effects to be easily combined both in series and in parallel. Oscillators and MIDI-CCs can be used for controlling effect parameters. Includes a versatile console mode interface, a Qt-based X-interface and various command-line utils suitable for batch processing.</DIV>
-<P><B>Changes:</B> Support for 24- and 32-bit audio formats and for ALSA 0.5, multichannel noisegate, a new 2nd order lowpass filter, some ia-mode commands, and various bugfixes and low-level improvements.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164529.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/console/sound.html"><FONT COLOR="#FFFFFF">Console/Sound</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/931819147/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/931819147/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/931819147/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/07/12/931819147.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">SCEZ 20000129</FONT></B><BR>
-<SMALL><B><A HREF="mailto:m032@mbsks.franken.de">endergone Zwiebeltuete</A> - January 29th 2000, 11:46 EST</B></SMALL>
-<DIV ALIGN="justify"><P>SCEZ is a library that should make the handling of smart cards (not memory cards) and card readers as simple as possible and be at the same time small and easily portable. Currently supported are Dumb Mouse, CT-API and Towitoko readers and Schlumberger Cryptoflex, Gemplus GPK4000, GSM SIM and Telesec SigG cards. A PKCS#15 implementation is in the design phase. There are ports to PalmOS and MS-Windows available.</DIV>
-<P><B>Changes:</B> More card and reader drivers, and an application to read out GSM SIM card (phone book and SMS) and write it to the card.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164394.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: BSD type</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/development/libraries.html"><FONT COLOR="#FFFFFF">Development/Libraries</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/939677525/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/939677525/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="/appindex/1999/10/11/939677525.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">Comicq 0.2.0</FONT></B><BR>
-<SMALL><B><A HREF="mailto:terminal6@submail.net">Terminal6</A> - January 29th 2000, 11:45 EST</B></SMALL>
-<DIV ALIGN="justify"><P>COMICQ is a command line ICQ messaging tool that allows a user to connect to ICQ using your UIN and password, then sends a message to the destination UIN.</DIV>
-<P><B>Changes:</B> Several bugfixes, icq99a compliance, and a new option --ip that allows you to get any user's IP by their UIN.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164350.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/console/communication.html"><FONT COLOR="#FFFFFF">Console/Communication</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/948389309/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/948389309/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="/appindex/2000/01/20/948389309.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">senv 0.2</FONT></B><BR>
-<SMALL><B><A HREF="mailto:kojak@ids.pl">Zbyszek Sobiecki</A> - January 29th 2000, 11:44 EST</B></SMALL>
-<DIV ALIGN="justify"><P>Senv allows you to run programs with a specified environment. It can set uid, gid, root directory, working directory, limits, and environment variables. It is useful in init scripts and as a shell for users for setting resource limits and environment variables. You can create sets of configurations and specify the one to use from command line.</DIV>
-<P><B>Changes:</B> Login shell limits and environment setting for users, permanent resource limits for specified groups of users and environment variables, and other minor bugfixes.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949164259.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: GPL</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/console/administration.html"><FONT COLOR="#FFFFFF">Console/Administration</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/944953892/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/changelog/944953892/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/12/11/944953892.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="97%" BORDER="0" BGCOLOR="#000000"><TR><TD COLSPAN="2">
-<TABLE CELLSPACING="0" CELLPADDING="3" WIDTH="100%" BORDER="0" BGCOLOR="#FFFFFF">
-<TR><TD><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B><FONT SIZE="+2">XZX 2.9.2</FONT></B><BR>
-<SMALL><B><A HREF="mailto:Erik.Kunze@fantasy.muc.de">E. Kunze</A> - January 29th 2000, 10:55 EST</B></SMALL>
-<DIV ALIGN="justify"><P>XZX is a portable emulator of ZX Spectrum 48K/128K/+3 (8-bit home computers made by Sir Clive Sinclair) and Pentagon/Scorpion (Spectrum clones made in Russia) for machines running UNIX and the X Window system. XZX is completely written in C and emulates Spectrum 48K, 128K, +2 and +3, Pentagon and Scorpion, Interface I with up to 8 microdrives, Multiface 128 and Multiface 3, BetaDisk 128 interface by Technology Research Ltd with 4 disk drives, +D interface by Miles Gordon Technology with 2 disk drives, Kempston mouse, Kempston joystick and built-in machine code monitor.</DIV>
-<P><B>Changes:</B> Lots of feature improvement and bug fixes. Most parts of the audio support has been rewritten for different UNICES.
-<P><B>Urgency:</B> low
-<P ALIGN="right"><B>[ <A HREF="/news/2000/01/29/949161354.html">comments (0)</A> ]</B>
-</FONT></TD></TR></TABLE></TD></TR><TR><TD VALIGN="middle">
-&nbsp;<FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#FFFFFF"><B><SMALL>License: Shareware</SMALL></B><BR>
-<B><SMALL>&nbsp;Category: <A HREF="/appindex/x11/emulators.html"><FONT COLOR="#FFFFFF">X11/Emulators</FONT></A></SMALL></B></FONT></FONT></TD><TD ALIGN="right">
-<A HREF="http://apps.freshmeat.net/download/936956384/"><IMG SRC="image6" WIDTH="21" HEIGHT="21" BORDER="0" ALT="download"></A> <A HREF="http://apps.freshmeat.net/homepage/936956384/"><IMG SRC="image5" WIDTH="21" HEIGHT="21" BORDER="0" ALT="homepage"></A> <A HREF="http://apps.freshmeat.net/changelog/936956384/"><IMG SRC="image8" WIDTH="21" HEIGHT="21" BORDER="0" ALT="changelog"></A> <A HREF="/appindex/1999/09/10/936956384.html"><IMG SRC="image7" WIDTH="21" HEIGHT="21" BORDER="0" ALT="appindex record"></A> &nbsp;
-</TD></TR></TABLE>
-<HR WIDTH="0" SIZE="0">
-
-
-<P><SMALL><CENTER><B>[ <A HREF="/news/2000/01/29/">full page for today</A> | <A HREF="/news/2000/01/28/">yesterday's edition</A> ]</SMALL></B></CENTER></FONT></TD><TD WIDTH="27%" VALIGN="top" ALIGN="center"><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000">navigator</FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="/news/2000/01/29/"><FONT COLOR="#000000">full page for today</FONT></A><BR>
-- <A HREF="/news/2000/01/28/"><FONT COLOR="#000000">yesterday's edition</FONT></A><BR>
-- <A HREF="news://news.freshmeat.net/"><FONT COLOR="#000000"><B>new:</B> fm news via NNTP</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000">eye catcher</FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<B>Free Shirts</B><BR>We give away a free freshmeat t-shirt every week for the best comment added to an application announcement or story posted on freshmeat.
-<P><B>#freshmeat</B><BR>If you want to chat about what's new on freshmeat and hang out with other fm lounge lizards and the fm staff, head over to #freshmeat on irc.freshmeat.net, part of <A HREF="http://openprojects.nu/">The Open Projects Network</A>.
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000">site notes</FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="/news/2000/01/29/949208399.html"><FONT COLOR="#000000">We should get this out of the door now (Jan 29th)</FONT></A><BR>
-- <A HREF="/news/2000/01/01/946704535.html"><FONT COLOR="#000000">freshmeat Y2K report (Jan 01st)</FONT></A><BR>
-- <A HREF="/news/1999/08/16/934862340.html"><FONT COLOR="#000000">Assorted freshmeat notes (Aug 16th)</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000">recent editorials</FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="/news/2000/01/29/949208340.html"><FONT COLOR="#000000">Is Linux for Crazies? (Jan 29th)</FONT></A><BR>
-- <A HREF="/news/2000/01/22/948603540.html"><FONT COLOR="#000000">A New Business Plan for Free Software (Jan 22nd)</FONT></A><BR>
-- <A HREF="/news/2000/01/15/947998740.html"><FONT COLOR="#000000">Is Linux Going to Reunite the UNIX Market? (Jan 15th)</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000">andover.net</FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-<BR><CENTER><A HREF="http://andover.net"><IMG SRC="image9" BORDER="0" WIDTH="150" HEIGHT="43" ALT="Mirror Logo"></A></CENTER><P>
-- <A HREF="http://www.animfactory.com/"><FONT COLOR="#000000">Animation Factory</FONT></A><BR>
-- <A HREF="http://www.davecentral.com/"><FONT COLOR="#000000">DaveCentral</FONT></A><BR>
-- <A HREF="http://www.freecode.com/"><FONT COLOR="#000000">FreeCode</FONT></A><BR>
-- <A HREF="http://www.InternetTrafficReport.com/"><FONT COLOR="#000000">Internet Traffic Report</FONT></A><BR>
-- <A HREF="http://www.ITManagersJournal.com/"><FONT COLOR="#000000">IT Manager's Journal</FONT></A><BR>
-- <A HREF="http://www.mediabuilder.com/"><FONT COLOR="#000000">MediaBuilder</FONT></A><BR>
-- <A HREF="http://slashdot.org/"><FONT COLOR="#000000">Slashdot</FONT></A><BR>
-- <A HREF="http://www.slaughterhouse.com/"><FONT COLOR="#000000">Slaughterhouse</FONT></A><BR>
-- <A HREF="http://www.techmailings.com/"><FONT COLOR="#000000">TechMailings</FONT></A><BR>
-- <A HREF="http://www.techsightings.com/"><FONT COLOR="#000000">TechSightings</FONT></A><BR>
-<BR><CENTER><B>E-Commerce</B></CENTER><P>
-- <A HREF="http://www.thinkgeek.com"><FONT COLOR="#000000">ThinkGeek (Stuff for smart masses)</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000">supported sites</FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="http://www.userfriendly.org"><FONT COLOR="#000000">Userfriendly.org</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com"><FONT COLOR="#000000">SecurityFocus</FONT></A><BR>
-- <A HREF="http://copyleft.net"><FONT COLOR="#000000">copyleft</FONT></A><BR>
-- <A HREF="http://filewatcher.org"><FONT COLOR="#000000">Filewatcher</FONT></A><BR>
-- <A HREF="http://www.linux.com"><FONT COLOR="#000000">Linux.com</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org"><FONT COLOR="#000000">LinuxTelephony</FONT></A><BR>
-- <A HREF="http://www.linuxtoday.com"><FONT COLOR="#000000">LinuxToday</FONT></A><BR>
-- <A HREF="http://openprojects.nu/services/irc.html"><FONT COLOR="#000000">Openprojects</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com"><FONT COLOR="#000000">32bitsonline</FONT></A><BR>
-- <A HREF="http://www.gnu.org"><FONT COLOR="#000000">The GNU Project</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000"><a href="/news/2000/01/29/"><font color="#000000">saturday</font></a></FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="/news/2000/01/29/949208399.html"><FONT COLOR="#000000">We should get this out of the door now</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949208340.html"><FONT COLOR="#000000">Is Linux for Crazies?</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949188564.html"><FONT COLOR="#000000">RabbIT 2.0.2</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949187896.html"><FONT COLOR="#000000">nmpg 1.1.3</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949187471.html"><FONT COLOR="#000000">mod_dtcl 0.7.3</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949187233.html"><FONT COLOR="#000000">CoreLinux++ 0.4.6</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949165962.html"><FONT COLOR="#000000">scribe 0.2</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949165472.html"><FONT COLOR="#000000">E theme updater 0.1</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949165416.html"><FONT COLOR="#000000">Powertweak-Linux 0.1.7</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164956.html"><FONT COLOR="#000000">Pexeso Beta</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164896.html"><FONT COLOR="#000000">XZX 2.9.2</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164869.html"><FONT COLOR="#000000">DistroLib 0.4</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164843.html"><FONT COLOR="#000000">ToutDoux 1.1.7</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164772.html"><FONT COLOR="#000000">goMP 1.0.3</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164633.html"><FONT COLOR="#000000">APSEND 1.40</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164529.html"><FONT COLOR="#000000">ecasound 1.6.12r10</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164394.html"><FONT COLOR="#000000">SCEZ 20000129</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164350.html"><FONT COLOR="#000000">Comicq 0.2.0</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949164259.html"><FONT COLOR="#000000">senv 0.2</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949161354.html"><FONT COLOR="#000000">XZX 2.9.2</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949161036.html"><FONT COLOR="#000000">log4j 0.7.5</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949156343.html"><FONT COLOR="#000000">SQN Linux 1.6</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949156277.html"><FONT COLOR="#000000">Limo 0.3.2</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949156237.html"><FONT COLOR="#000000">Fusion GS 1.3</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949145887.html"><FONT COLOR="#000000">MMR 1.5.4</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949142835.html"><FONT COLOR="#000000">KUPS 0.3.4</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949142815.html"><FONT COLOR="#000000">3DSE patch for XMMS 4</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949139763.html"><FONT COLOR="#000000">Linux 2.3.41</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949139751.html"><FONT COLOR="#000000">Free Code for Linux S/390</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135979.html"><FONT COLOR="#000000">CircleMUD 3.0 beta patchlevel 17</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135938.html"><FONT COLOR="#000000">NiL Isn't Liero 000128</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135913.html"><FONT COLOR="#000000">OpenSSH Unix Port 1.2.2</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135889.html"><FONT COLOR="#000000">KBoxes! 1.3</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135867.html"><FONT COLOR="#000000">phpLanParty 0.23</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135509.html"><FONT COLOR="#000000">DGen/SDL 1.20</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135482.html"><FONT COLOR="#000000">EdcomLib 1.0 alpha 5</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135309.html"><FONT COLOR="#000000">Etherboot 4.4.2</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135205.html"><FONT COLOR="#000000">BLADE 0.18.0</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135115.html"><FONT COLOR="#000000">Sapphire 0.13.7</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949135070.html"><FONT COLOR="#000000">ippl 1.99.3</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134977.html"><FONT COLOR="#000000">Saint 1.5patch1</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134943.html"><FONT COLOR="#000000">Zircon 1.18.232</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134927.html"><FONT COLOR="#000000">nmap 2.3BETA14</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134901.html"><FONT COLOR="#000000">xterm patch #124</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134817.html"><FONT COLOR="#000000">MyThreads-Links v0.5.2</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134633.html"><FONT COLOR="#000000">sudo 1.6.2p1</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134552.html"><FONT COLOR="#000000">MIT Photonic-Bands 0.10</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134246.html"><FONT COLOR="#000000">Launcher 0.86</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134179.html"><FONT COLOR="#000000">nano 0.8.1</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134103.html"><FONT COLOR="#000000">Gtk-- 1.1.8</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949134049.html"><FONT COLOR="#000000">tkchooser 0.65</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949133420.html"><FONT COLOR="#000000">XShipWars 1.33a</FONT></A><BR>
-- <A HREF="/news/2000/01/29/949133280.html"><FONT COLOR="#000000">Lamerpad 0.1</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000"><a href="/news/2000/01/28/"><font color="#000000">friday</font></a></FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="/news/2000/01/28/949117833.html"><FONT COLOR="#000000">fsv 0.9</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949117711.html"><FONT COLOR="#000000">popsneaker 0.1.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949114716.html"><FONT COLOR="#000000">eyep-updater.sh 1.0</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949113240.html"><FONT COLOR="#000000">W3Mail 0.5.0</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949113214.html"><FONT COLOR="#000000">The Urgent Decision 0.9.9</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949112269.html"><FONT COLOR="#000000">LTSP 1.02</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949112198.html"><FONT COLOR="#000000">Production BASIC 0.2.12</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949112123.html"><FONT COLOR="#000000">Postfix 19991231-pl03</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949109732.html"><FONT COLOR="#000000">Mp3 Commander 0.7</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949109324.html"><FONT COLOR="#000000">iManager 1.0.1b</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949108399.html"><FONT COLOR="#000000">Eterm 0.9</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949108308.html"><FONT COLOR="#000000">dqd_dirindex 1.0</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949108087.html"><FONT COLOR="#000000">Tidings 1.0.4</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949108026.html"><FONT COLOR="#000000">localscan 2.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949107922.html"><FONT COLOR="#000000">WMKeyboard 0.3</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949107834.html"><FONT COLOR="#000000">fcmp 1.0.2</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949107767.html"><FONT COLOR="#000000">Akkord 0.3.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949107649.html"><FONT COLOR="#000000">HiM 0.1.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949106305.html"><FONT COLOR="#000000">cdrecord 1.8</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949103400.html"><FONT COLOR="#000000">eMixer 0.05.5</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949103187.html"><FONT COLOR="#000000">FreeVSD 1.4.0</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949103096.html"><FONT COLOR="#000000">Common C++ Libraries 0.0</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949095155.html"><FONT COLOR="#000000">Moonshine 1.0beta2</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949095112.html"><FONT COLOR="#000000">swim 0.3.5</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949095009.html"><FONT COLOR="#000000">Xmame/xmess 0.36b15.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949094448.html"><FONT COLOR="#000000">pcmcia-cs 3.1.9</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949091509.html"><FONT COLOR="#000000">gPS 0.5.2</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949091415.html"><FONT COLOR="#000000">Snort 1.5.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949090436.html"><FONT COLOR="#000000">Pygmy Linux 0.7 beta</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949090237.html"><FONT COLOR="#000000">Intro to Bash Programming HOWTO 0.3</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949084379.html"><FONT COLOR="#000000">GNU Pth 1.3b2</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949084356.html"><FONT COLOR="#000000">Laonux 0.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949084304.html"><FONT COLOR="#000000">x-wvdial 0.12</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949084188.html"><FONT COLOR="#000000">Intro to Bash Programming HOWTO 0.3</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949084106.html"><FONT COLOR="#000000">Catalog 1.02</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949084062.html"><FONT COLOR="#000000">harvest 1.5.20-kj-0.9</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949068306.html"><FONT COLOR="#000000">wmseti 0.3.0a</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949057272.html"><FONT COLOR="#000000">RIG 1.02</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949057019.html"><FONT COLOR="#000000">FreeAddr 0.2</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949056939.html"><FONT COLOR="#000000">GtkAda 1.2.5</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949056664.html"><FONT COLOR="#000000">dot.conf 0.6.0</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949055099.html"><FONT COLOR="#000000">dep.pl 1.28.0</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949054980.html"><FONT COLOR="#000000">Prae's Scripts 1.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949044301.html"><FONT COLOR="#000000">Project Clock 0.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949044285.html"><FONT COLOR="#000000">Xtheater 0.2.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949040013.html"><FONT COLOR="#000000">i-no Chart 0.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949039945.html"><FONT COLOR="#000000">spliff 0.8.1</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949038953.html"><FONT COLOR="#000000">Regexx 0.95</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949038316.html"><FONT COLOR="#000000">RBook 0.5.0</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949036742.html"><FONT COLOR="#000000">RIG 1.01</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949036714.html"><FONT COLOR="#000000">wchat 1.2.0</FONT></A><BR>
-- <A HREF="/news/2000/01/28/949036428.html"><FONT COLOR="#000000">PCCS MySQLDatabase Admin Tool 1.2.2</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000"><a href="/news/2000/01/27/"><font color="#000000">thursday</font></a></FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="/news/2000/01/27/949033332.html"><FONT COLOR="#000000">CADUBI 1.1b1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949032987.html"><FONT COLOR="#000000">Angus' Chess Clock 0.8.1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949032555.html"><FONT COLOR="#000000">MP3 Report Generator 1.0.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949032518.html"><FONT COLOR="#000000">4DOM 0.9.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949032386.html"><FONT COLOR="#000000">4XSLT 0.8.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949031346.html"><FONT COLOR="#000000">OpenNaken 1.10</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949025747.html"><FONT COLOR="#000000">iManager 1.0b</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949025168.html"><FONT COLOR="#000000">QuakeForge 0.1.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949023271.html"><FONT COLOR="#000000">pylice 0.7.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949023250.html"><FONT COLOR="#000000">Solfege 0.6.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949023151.html"><FONT COLOR="#000000">xinetd 2.1.8.7p1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949022849.html"><FONT COLOR="#000000">jac 0.13</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949022803.html"><FONT COLOR="#000000">Xmms 1.0.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949022319.html"><FONT COLOR="#000000">KSrnd 0.97</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949021877.html"><FONT COLOR="#000000">getpg / UW-IMAP 0.54</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949021849.html"><FONT COLOR="#000000">getpg 0.53</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949021824.html"><FONT COLOR="#000000">setserial 2.17</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949021250.html"><FONT COLOR="#000000">Pan 0.7.3</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949021216.html"><FONT COLOR="#000000">jwhois 2.4.1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949021126.html"><FONT COLOR="#000000">Kmp3 1.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949020964.html"><FONT COLOR="#000000">xPine 0.0.12</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949019905.html"><FONT COLOR="#000000">Avenger's News System 2.1 Alpha</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949019709.html"><FONT COLOR="#000000">RIG 1.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949019321.html"><FONT COLOR="#000000">scroller 1.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949018347.html"><FONT COLOR="#000000">Perl EyeP Client 0.1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949017796.html"><FONT COLOR="#000000">sfront 0.54</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949017631.html"><FONT COLOR="#000000">XFrisk 1.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949016202.html"><FONT COLOR="#000000">Moffy 0.0.1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949015348.html"><FONT COLOR="#000000">Solid POP3 0.14</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949014200.html"><FONT COLOR="#000000">php3guest 1.5</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949013630.html"><FONT COLOR="#000000">crUD 01.27.2000</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949013380.html"><FONT COLOR="#000000">crUD 01.27.2000</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949012979.html"><FONT COLOR="#000000">Free Pascal Compiler 0.99.14</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949012771.html"><FONT COLOR="#000000">gtk-font-hack 0.2-gtk-1.2.6</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949009233.html"><FONT COLOR="#000000">Linux 2.2.15pre5</FONT></A><BR>
-- <A HREF="/news/2000/01/27/949005620.html"><FONT COLOR="#000000">krunseti 0.2.1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948996446.html"><FONT COLOR="#000000">CompuPic 5.0.1036</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948995905.html"><FONT COLOR="#000000">gfontview 0.3.3</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948995819.html"><FONT COLOR="#000000">authlocal 1.0.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948995600.html"><FONT COLOR="#000000">bigwig 1.1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948995501.html"><FONT COLOR="#000000">CAFire 0.0.11</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948995429.html"><FONT COLOR="#000000">ANVLOGIN 2.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948994944.html"><FONT COLOR="#000000">sawmill.el 1.9</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948994810.html"><FONT COLOR="#000000">Perlsh 20000127</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948994776.html"><FONT COLOR="#000000">sitescooper 2.1.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948994691.html"><FONT COLOR="#000000">MHDns 1.4</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948994419.html"><FONT COLOR="#000000">JChemPaint 0.5</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948994364.html"><FONT COLOR="#000000">Filesystems HOWTO 0.7.3</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948994343.html"><FONT COLOR="#000000">KSnes9x 1.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948993513.html"><FONT COLOR="#000000">Mozilla M13</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948993439.html"><FONT COLOR="#000000">edna 0.3</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948993409.html"><FONT COLOR="#000000">GMasqdialer 0.99.8</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948993341.html"><FONT COLOR="#000000">spliff 0.8</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948992808.html"><FONT COLOR="#000000">MultiSeti 0.3</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970667.html"><FONT COLOR="#000000">rude 0.50</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970605.html"><FONT COLOR="#000000">cgi-util++ 0.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970479.html"><FONT COLOR="#000000">Cricket 0.72</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970458.html"><FONT COLOR="#000000">nuni 0.04</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970379.html"><FONT COLOR="#000000">Ksetiwatch 0.3.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970358.html"><FONT COLOR="#000000">SiteMgrYAP 0.1.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970322.html"><FONT COLOR="#000000">phpLanParty 0.21</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970285.html"><FONT COLOR="#000000">Glitter Newsreader 0.1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970263.html"><FONT COLOR="#000000">Fastresolve 2.4</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970164.html"><FONT COLOR="#000000">ColdSync 1.1.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970080.html"><FONT COLOR="#000000">DDD 3.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948970032.html"><FONT COLOR="#000000">X Northern Captain 4.2.1</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948969919.html"><FONT COLOR="#000000">abcde 1.0.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948969659.html"><FONT COLOR="#000000">Gnapster 1.3.2</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948969551.html"><FONT COLOR="#000000">xmix 1.0 Alpha</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948969488.html"><FONT COLOR="#000000">gtktetcolor 0.3</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948969412.html"><FONT COLOR="#000000">muttzilla 0.40</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948969395.html"><FONT COLOR="#000000">muttzilla 0.40</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948969337.html"><FONT COLOR="#000000">asp2php 0.73.6</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948969217.html"><FONT COLOR="#000000">mod_ticket 1.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948969078.html"><FONT COLOR="#000000">MegaHAL for Eggdrop .01</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948968456.html"><FONT COLOR="#000000">Jetty 2.3.5</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948968386.html"><FONT COLOR="#000000">xlpotdb 1.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948968341.html"><FONT COLOR="#000000">Koala Complete MUD Server 0.1.1a</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948968255.html"><FONT COLOR="#000000">mcountd 0.4</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948967933.html"><FONT COLOR="#000000">cdbackup 0.5.0</FONT></A><BR>
-- <A HREF="/news/2000/01/27/948967908.html"><FONT COLOR="#000000">The Java SSH/Telnet Application/Applet 2.0 RC1</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000"><a href="http://slashdot.org"><font color="#000000">slashdot</font></a></FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/29/1534255"><FONT COLOR="#000000">Petition Apple for Linux QuickTime</FONT></A><BR>
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/29/1223249"><FONT COLOR="#000000">GNUstep 0.6.5 freeze</FONT></A><BR>
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/28/2324203"><FONT COLOR="#000000">YETI@Home</FONT></A><BR>
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/29/1024215"><FONT COLOR="#000000">Documents Unsealed in Microsoft/Caldera Case</FONT></A><BR>
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/29/0837235"><FONT COLOR="#000000">Who Bought Linux.Net?</FONT></A><BR>
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/24/1146250"><FONT COLOR="#000000">E-Mails from (Over?) The Edge</FONT></A><BR>
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/29/0834223"><FONT COLOR="#000000">Linux Kernel 2.3.41</FONT></A><BR>
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/28/2311232"><FONT COLOR="#000000">Congress Still Figuring Out E-Mail</FONT></A><BR>
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/22/1946244"><FONT COLOR="#000000">Sci Fi Literature 101?</FONT></A><BR>
-- <A HREF="http://slashdot.org/article.pl?sid=00/01/28/2318246"><FONT COLOR="#000000">Could Distributed.Net Help the Mars Polar Lander?</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000"><a href="http://www.securityfocus.com"><font color="#000000">securityfocus</font></a></FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="http://www.securityfocus.com/level2/?go=news&id=http://www.zdnet.com/zdnn/stories/news/0,4586,2429334,00.html?chkpt=zdnntop"><FONT COLOR="#000000">Win2000 security hole a 'major threat'</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com/level2/?go=news&id=http://www.computerworld.com/home/print.nsf/all/000128e45a"><FONT COLOR="#000000">Visa acknowledges cracker break-ins</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com/level2/?go=news&id=http://www.zdnet.com/sr/stories/column/0,4712,2429536,00.html"><FONT COLOR="#000000">What's Wrong With Microsoft Security?</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com/level2/?go=news&id=http://www.zdnet.com/pcweek/stories/news/0,4153,2429334,00.html"><FONT COLOR="#000000">Microsoft posts first Win2K security patch</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com/level2/?go=tools&id=1018"><FONT COLOR="#000000">Libnids 1.12</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com/level2/?go=news&id=http://www.theregister.co.uk/000127-000005.html"><FONT COLOR="#000000">New hack attack is greater threat than imagined</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com/level2/?go=news&id=http://www.mercurycenter.com/svtech/news/indepth/docs/hacker012700.htm"><FONT COLOR="#000000">Student charged with hacking</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com/level2/?go=library&id=63"><FONT COLOR="#000000">Building and Managing Virtual Private Networks (book)</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com/level2/?go=library&id=111"><FONT COLOR="#000000">Threats, Vulnerabilities and Real-Worl Responses: The Foundations of the TruSecure Process</FONT></A><BR>
-- <A HREF="http://www.securityfocus.com/level2/?go=library&id=1701"><FONT COLOR="#000000">The Hundredth Window : Protecting Your Privacy and Security in the Age of the Internet (boo</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000"><a href="http://www.bebits.com"><font color="#000000">bebits</font></a></FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="http://www.bebits.com/app/706/"><FONT COLOR="#000000">Pe 3.0a3</FONT></A><BR>
-- <A HREF="http://www.bebits.com/app/757/"><FONT COLOR="#000000">Rarscript 1.5</FONT></A><BR>
-- <A HREF="http://www.bebits.com/app/736/"><FONT COLOR="#000000">CD Manager 0.66a beta</FONT></A><BR>
-- <A HREF="http://www.bebits.com/app/174/"><FONT COLOR="#000000">TraX 1.1</FONT></A><BR>
-- <A HREF="http://www.bebits.com/app/785/"><FONT COLOR="#000000">BeMath 1.2.2</FONT></A><BR>
-- <A HREF="http://www.bebits.com/app/784/"><FONT COLOR="#000000">simple blackjack 1</FONT></A><BR>
-- <A HREF="http://www.bebits.com/app/758/"><FONT COLOR="#000000">HtmlTree 0.5.3</FONT></A><BR>
-- <A HREF="http://www.bebits.com/app/783/"><FONT COLOR="#000000">Yacp 0.1</FONT></A><BR>
-- <A HREF="http://www.bebits.com/app/222/"><FONT COLOR="#000000">TicTacToe 1.5</FONT></A><BR>
-- <A HREF="http://www.bebits.com/app/706/"><FONT COLOR="#000000">Pe 3.0a2</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000"><a href="http://linuxtoday.com"><font color="#000000">linuxtoday</font></a></FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="http://linuxtoday.com/story.php3?sn=15878"><FONT COLOR="#000000">Linux Journal: KDE--The Next Generation</FONT></A><BR>
-- <A HREF="http://linuxtoday.com/story.php3?sn=15876"><FONT COLOR="#000000">Kernel Cousin gimp-devel #11 Is Out</FONT></A><BR>
-- <A HREF="http://linuxtoday.com/story.php3?sn=15875"><FONT COLOR="#000000">Infoworld: Corel Linux OS ideal for the desktop</FONT></A><BR>
-- <A HREF="http://linuxtoday.com/story.php3?sn=15874"><FONT COLOR="#000000">Technology Evaluation: IBM Jumps on the Linux Bandwagon with Both Feet, Sort Of</FONT></A><BR>
-- <A HREF="http://linuxtoday.com/story.php3?sn=15873"><FONT COLOR="#000000">Tobias Hövekamp: European Union acknowledges</FONT></A><BR>
-- <A HREF=""><FONT COLOR="#000000">&</FONT></A><BR>
-- <A HREF=""><FONT COLOR="#000000">#34;Open Source Software</FONT></A><BR>
-- <A HREF=""><FONT COLOR="#000000">&</FONT></A><BR>
-- <A HREF=""><FONT COLOR="#000000">#34;</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000"><a href="http://www.linuxtelephony.org"><font color="#000000">linuxtelephony</font></a></FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=208&r=0"><FONT COLOR="#000000">Traverse Technologies releases NETspider-U in US</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=207&r=0"><FONT COLOR="#000000">Quicknet releases new GPL'd Linux Drivers!</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=206&r=0"><FONT COLOR="#000000">Natural Microsystems Delivers Carrier-Class Linux</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=205&r=0"><FONT COLOR="#000000">Quicknet is hiring programmers of all kinds!</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=204&r=0"><FONT COLOR="#000000">Babylon MLPPP Software Released under GPL</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=202&r=0"><FONT COLOR="#000000">Linux Telephony Server Project?</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=203&r=0"><FONT COLOR="#000000">Vovida Networks to Hire Telephony Software Engineers</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=200&r=0"><FONT COLOR="#000000">SPIRO-Linux Introduces Web-Enabled Phone Administration</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=199&r=0"><FONT COLOR="#000000">LinuxTelephony sponsors area at LinuxFest 2000</FONT></A><BR>
-- <A HREF="http://www.linuxtelephony.org/article.cgi?i=198&r=0"><FONT COLOR="#000000">GSM-Mobile Switching Center (MSC) with Linux-PC</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<TABLE BORDER="0" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#000000" WIDTH="97%"><TR><TD>
-<TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3">
-<TR><TD ALIGN="center" BGCOLOR="#EEEEEE"><B><FONT FACE="Lucida,Verdana,Helvetica,Arial"><FONT COLOR="#000000"><a href="http://www.32bitsonline.com"><font color="#000000">32bitsonline</font></a></FONT></FONT></B></TD></TR><TR><TD BGCOLOR="#FFFFFF"><SMALL><FONT FACE="Lucida,Verdana,Helvetica,Arial">
-- <A HREF="http://www.32bitsonline.com/article.php3?file=issues/200001/homeworld&page=1
-"><FONT COLOR="#000000">Game: Homeworld</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com/news.php3?news=news/200001/nb200001271a&page=1
-"><FONT COLOR="#000000">DVD Lawsuit Spreads Its Own 'Trade Secrets'</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com/news.php3?news=news/200001/nb200001272&page=1
-"><FONT COLOR="#000000">Register.com Adds 'One-step' Domain Registration</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com/article.php3?file=issues/200001/webevent&page=1
-"><FONT COLOR="#000000">WebEvent: Keeping you organized</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com/news.php3?news=news/200001/nb200001273a&page=1
-"><FONT COLOR="#000000">Y2K Officers Defend $100 Bil Investment</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com/article.php3?file=issues/200001/jan2000_john_berger&page=1
-"><FONT COLOR="#000000">DON'T BE FOOLED</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com/news.php3?news=news/200001/nb200001274&page=1
-"><FONT COLOR="#000000">Microsoft Scorns Think-Tank's Breakup Idea</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com/news.php3?news=news/200001/nb200001275a&page=1
-"><FONT COLOR="#000000">Yahoo Accused Of Stalking Internet Users</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com/news.php3?news=news/200001/nb200001276a&page=1
-"><FONT COLOR="#000000">eToys.com Settles Spat With Swiss Artist Group</FONT></A><BR>
-- <A HREF="http://www.32bitsonline.com/
-"><FONT COLOR="#000000">[more articles/news]</FONT></A><BR>
-&nbsp;</FONT></SMALL></TD></TR></TABLE></TD></TR></TABLE><P>
-<BR><BR></FONT>
-</TD></TR></TABLE>
-<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
-<TR BGCOLOR="#000000"><TD><IMG SRC="image4" WIDTH="1" HEIGHT="2" ALT=""></TD></TR></TABLE>
-</CENTER>
-<TABLE CELLSPACING="0" CELLPADDING="2" WIDTH="100%" BORDER="0"><TR>
-<TD VALIGN="top" ALIGN="center"><FONT FACE="Lucida,Verdana,Helvetica,Arial"><SMALL>copyright © 1997-2000 <A HREF="http://andover.net">Andover.Net</A> -
-icons courtesy of <A HREF="mailto:tigert@gimp.org">tigert@gimp.org</A> -
-code revision <A HREF="http://freshmeat.net/ChangeLog">20000101</A> -
-our <A HREF="http://www.andover.net/privacy.html">privacy policy</A></SMALL></FONT></TD>
-</TR></TABLE>
-</BODY>
-</HTML>
-
-
diff --git a/ext/tk/sample/tkextlib/tkHTML/ss.rb b/ext/tk/sample/tkextlib/tkHTML/ss.rb
deleted file mode 100644
index 6531fef0e1..0000000000
--- a/ext/tk/sample/tkextlib/tkHTML/ss.rb
+++ /dev/null
@@ -1,437 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# This script implements the "ss" application. "ss" implements
-# a presentation slide-show based on HTML slides.
-#
-require 'tk'
-require 'tkextlib/tkHTML'
-
-file = ARGV[0]
-
-class TkHTML_File_Viewer
- include TkComm
-
-# These are images to use with the actual image specified in a
-# "<img>" markup can't be found.
-#
-@@biggray = TkPhotoImage.new(:data=><<'EOD')
- R0lGODdhPAA+APAAALi4uAAAACwAAAAAPAA+AAACQISPqcvtD6OctNqLs968+w+G4kiW5omm
- 6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNFgsAO///
-EOD
-
-@@smgray = TkPhotoImage.new(:data=><<'EOD')
- R0lGODdhOAAYAPAAALi4uAAAACwAAAAAOAAYAAACI4SPqcvtD6OctNqLs968+w+G4kiW5omm
- 6sq27gvH8kzX9m0VADv/
-EOD
-
- def initialize(file = nil)
- @root = TkRoot.new(:title=>'HTML File Viewer', :iconname=>'HV')
- @fswin = nil
-
- @html = nil
- @html_fs = nil
-
- @hotkey = {}
-
- @applet_arg = TkVarAccess.new_hash('AppletArg')
-
- @images = {}
- @old_imgs = {}
- @big_imgs = {}
-
- @last_dir = Dir.pwd
-
- @last_file = ''
-
- @key_block = false
-
- Tk::HTML_Widget::ClippingWindow.bind('1',
- proc{|w, ksym| key_press(w, ksym)},
- '%W Down')
- Tk::HTML_Widget::ClippingWindow.bind('3',
- proc{|w, ksym| key_press(w, ksym)},
- '%W Up')
- Tk::HTML_Widget::ClippingWindow.bind('2',
- proc{|w, ksym| key_press(w, ksym)},
- '%W Down')
-
- Tk::HTML_Widget::ClippingWindow.bind('KeyPress',
- proc{|w, ksym| key_press(w, ksym)},
- '%W %K')
-
- ############################################
- #
- # Build the half-size view of the page
- #
- menu_spec = [
- [['File', 0],
- ['Open', proc{sel_load()}, 0],
- ['Full Screen', proc{fullscreen()}, 0],
- ['Refresh', proc{refresh()}, 0],
- '---',
- ['Exit', proc{exit}, 1]]
- ]
-
- mbar = @root.add_menubar(menu_spec)
-
- @html = Tk::HTML_Widget.new(:width=>512, :height=>384,
- :padx=>5, :pady=>9,
- :formcommand=>proc{|*args| form_cmd(*args)},
- :imagecommand=>proc{|*args|
- image_cmd(1, *args)
- },
- :scriptcommand=>proc{|*args|
- script_cmd(*args)
- },
- :appletcommand=>proc{|*args|
- applet_cmd(*args)
- },
- :hyperlinkcommand=>proc{|*args|
- hyper_cmd(*args)
- },
- :fontcommand=>proc{|*args|
- pick_font(*args)
- },
- :appletcommand=>proc{|*args|
- run_applet('small', *args)
- },
- :bg=>'white', :tablerelief=>:raised)
-
- @html.token_handler('meta', proc{|*args| meta(@html, *args)})
-
- vscr = @html.yscrollbar(TkScrollbar.new)
- hscr = @html.xscrollbar(TkScrollbar.new)
-
- Tk.grid(@html, vscr, :sticky=>:news)
- Tk.grid(hscr, :sticky=>:ew)
- @root.grid_columnconfigure(0, :weight=>1)
- @root.grid_columnconfigure(1, :weight=>0)
- @root.grid_rowconfigure(0, :weight=>1)
- @root.grid_rowconfigure(1, :weight=>0)
-
- ############################################
-
- @html.clipwin.focus
-
- # If an argument was specified, read it into the HTML widget.
- #
- Tk.update
- if file && file != ""
- load_file(file)
- end
- end
-
- #
- # A font chooser routine.
- #
- # html[:fontcommand] = pick_font
- def pick_font(size, attrs)
- # puts "FontCmd: #{size} #{attrs}"
- [ ((attrs =~ /fixed/)? 'courier': 'charter'),
- (12 * (1.2**(size.to_f - 4.0))).to_i,
- ((attrs =~ /italic/)? 'italic': 'roman'),
- ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ')
- end
-
- # This routine is called to pick fonts for the fullscreen view.
- #
- def pick_font_fs(size, attrs)
- baseFontSize = 24
-
- # puts "FontCmd: #{size} #{attrs}"
- [ ((attrs =~ /fixed/)? 'courier': 'charter'),
- (baseFontSize * (1.2**(size.to_f - 4.0))).to_i,
- ((attrs =~ /italic/)? 'italic': 'roman'),
- ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ')
- end
-
- #
- #
- def hyper_cmd(*args)
- puts "HyperlinkCommand: #{args.inspect}"
- end
-
- # This routine is called to run an applet
- #
- def run_applet(size, w, arglist)
- applet_arg.value = Hash[*simplelist(arglist)]
-
- return unless @applet_arg.key?('src')
-
- src = @html.remove(@applet_arg['src'])
-
- @applet_arg['window'] = w
- @applet_arg['fontsize'] = size
-
- begin
- Tk.load_tclscript(src)
- rescue => e
- puts "Applet error: #{e.message}"
- end
- end
-
- #
- #
- def form_cmd(n, cmd, *args)
- # p [n, cmd, *args]
- end
-
- #
- #
- def move_big_image(b)
- return unless @big_imgs.key?(b)
- b.copy(@big_imgs[b])
- @big_imgs[b].delete
- @big_imgs.delete(b)
- end
-
- def image_cmd(hs, *args)
- fn = args[0]
-
- if @old_imgs.key?(fn)
- return (@images[fn] = @old_imgs.delete(fn))
- end
-
- begin
- img = TkPhotoImage.new(:file=>fn)
- rescue
- return ((hs)? @@smallgray: @@biggray)
- end
-
- if hs
- img2 = TkPhotoImage.new
- img2.copy(img, :subsample=>[2,2])
- img.delete
- img = img2
- end
-
- if img.width * img.height > 20000
- b = TkPhotoImage.new(:width=>img.width, :height=>img.height)
- @big_imgs[b] = img
- img = b
- Tk.after_idle(proc{ move_big_image(b) })
- end
-
- @images[fn] = img
-
- img
- end
-
- #
- # This routine is called for every <SCRIPT> markup
- #
- def script_cmd(*args)
- # puts "ScriptCmd: #{args.inspect}"
- end
-
- # This routine is called for every <APPLET> markup
- #
- def applet_cmd(w, arglist)
- # puts "AppletCmd: w=#{w} arglist=#{arglist}"
- #TkLabel.new(w, :text=>"The Applet #{w}", :bd=>2, :relief=>raised)
- end
-
- # This binding fires when there is a click on a hyperlink
- #
- def href_binding(w, x, y)
- lst = w.href(x, y)
- unless lst.empty?
- process_url(lst)
- end
- end
-
- #
- #
- def sel_load
- filetypes = [
- ['Html Files', ['.html', '.htm']],
- ['All Files', '*']
- ]
-
- f = Tk.getOpenFile(:initialdir=>@last_dir, :filetypes=>filetypes)
- if f != ''
- load_file(f)
- @last_dir = File.dirname(f)
- end
- end
-
- # Clear the screen.
- #
- def clear_screen
- if @html_fs && @html_fs.exist?
- w = @html_fs
- else
- w = @html
- end
- w.clear
- @old_imgs.clear
- @big_imgs.clear
- @hotkey.clear
- @images.each{|k, v| @old_imgs[k] = v }
- @images.clear
- end
-
- # Read a file
- #
- def read_file(name)
- begin
- fp = open(name, 'r')
- ret = fp.read(File.size(name))
- rescue
- ret = nil
- fp = nil
- Tk.messageBox(:icon=>'error', :message=>"fail to open '#{name}'",
- :type=>:ok)
- ensure
- fp.close if fp
- end
- ret
- end
-
- # Process the given URL
- #
- def process_url(url)
- case url[0]
- when /^file:/
- load_file(url[0][5..-1])
- when /^exec:/
- Tk.ip_eval(url[0][5..-1].tr('\\', ' '))
- else
- load_file(url[0])
- end
- end
-
- # Load a file into the HTML widget
- #
- def load_file(name)
- return unless (doc = read_file(name))
- clear_screen()
- @last_file = name
- if @html_fs && @html_fs.exist?
- w = @html_fs
- else
- w = @html
- end
- w.configure(:base=>name)
- w.parse(doc)
- w.configure(:cursor=>'top_left_arrow')
- @old_imgs.clear
- end
-
- # Refresh the current file.
- #
- def refresh(*args)
- load_file(@last_file) if @last_file
- end
-
- # This routine is called whenever a "<meta>" markup is seen.
- #
- def meta(w, tag, alist)
- v = Hash[*simplelist(alist)]
-
- if v.key?('key') && v.key?('href')
- @hotkey[v['key']] = w.resolve(v['href'])
- end
-
- if v.key?('next')
- @hotkey['Down'] =v['next']
- end
-
- if v.key?('prev')
- @hotkey['Up'] =v['prev']
- end
-
- if v.key?('other')
- @hotkey['o'] =v['other']
- end
- end
-
- # Go from full-screen mode back to window mode.
- #
- def fullscreen_off
- @fswin.destroy
- @root.deiconify
- Tk.update
- @root.raise
- @html.clipwin.focus
- clear_screen()
- @old_imgs.clear
- refresh()
- end
-
- # Go from window mode to full-screen mode.
- #
- def fullscreen
- if @fswin && @fswin.exist?
- @fswin.deiconify
- Tk.update
- @fswin.raise
- return
- end
-
- width = @root.winfo_screenwidth
- height = @root.winfo_screenheight
- @fswin = TkToplevel.new(:overrideredirect=>true,
- :geometry=>"#{width}x#{height}+0+0")
-
- @html_fs = Tk::HTML_Widget.new(@fswin, :padx=>5, :pady=>9,
- :formcommand=>proc{|*args|
- form_cmd(*args)
- },
- :imagecommand=>proc{|*args|
- image_cmd(0, *args)
- },
- :scriptcommand=>proc{|*args|
- script_cmd(*args)
- },
- :appletcommand=>proc{|*args|
- applet_cmd(*args)
- },
- :hyperlinkcommand=>proc{|*args|
- hyper_cmd(*args)
- },
- :appletcommand=>proc{|*args|
- run_applet('big', *args)
- },
- :fontcommand=>proc{|*args|
- pick_font_fs(*args)
- },
- :bg=>'white', :tablerelief=>:raised,
- :cursor=>:tcross) {
- pack(:fill=>:both, :expand=>true)
- token_handler('meta', proc{|*args| meta(self, *args)})
- }
-
- clear_screen()
- @old_imgs.clear
- refresh()
- Tk.update
- @html_fs.clipwin.focus
- end
-
- #
- #
- def key_press(w, keysym)
- return if @key_block
- @key_block = true
- Tk.after(250, proc{@key_block = false})
-
- if @hotkey.key?(keysym)
- process_url(@hotkey[keysym])
- end
- case keysym
- when 'Escape'
- if @fswin && @fswin.exist?
- fullscreen_off()
- else
- fullscreen()
- end
- end
- end
-end
-############################################
-
-TkHTML_File_Viewer.new(file)
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tkimg/demo.rb b/ext/tk/sample/tkextlib/tkimg/demo.rb
deleted file mode 100644
index 0f0d585fc7..0000000000
--- a/ext/tk/sample/tkextlib/tkimg/demo.rb
+++ /dev/null
@@ -1,1479 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# Tk::Img demo
-#
-# -- This script is based on demo.tcl of Tcl/Tk's 'Img' extension.
-# Image data in this script is those of demo.tcl.
-# Please read 'license_terms_of_Img_extension' file.
-#
-require 'tk'
-require 'tkextlib/tkimg'
-
-#
-# Make the Image format available.
-#
-class TkImg_demo
- def initialize
- img_version = Tk::Img.package_version
-
- @typeFrame = Hash.new
- @imgPriv = Hash.new
-
- root = TkRoot.new(:title=>'Tests for available image formats')
-
- root.winfo_children.each{|w| w.destroy}
- TkImage.names{|img| img.delete}
-
- f = TkFrame.new
- TkButton.new(f, :text=>'Dismiss', :command=>proc{exit}).pack(:side=>:left)
- f.pack(:side=>:top, :expand=>:y, :fill=>:both)
-
- TkMessage.new(:aspect=>900, :text=>format('This page shows the available image formats of the Img extension (Img version %s, using Tcl/Tk %s)', img_version, Tk::TK_PATCHLEVEL)).pack(:side=>:top, :expand=>:y, :fill=>:both)
- end
-
-##############################
-
- def update_animated_gif(w, method, num)
- return unless @imgPriv[w]
-
- if @imgPriv[w][:args]
- im = TkPhotoImage.new
- im.copy(@imgPriv[w][num])
- num += 1
- begin
- im.configure(@imgPriv[w][:args].merge(:format=>[:gif, {:index=>num}]))
- im.configure(:data=>'', :file=>'') #free storage
- @imgPriv[w][num] = im
- rescue
- @imgPriv[w].delete(:args)
- if num > 1
- num = 0
- im = @imgPriv[w][num]
- else
- # this is not an animated GIF; just stop
- @imgPriv[w].delete(0)
- return
- end
- end
- else
- num += 1
- num = 0 unless @imgPriv[w][num]
- im = @imgPriv[w][num]
- end
- begin
- w.__send__(method, im)
- Tk.update_idletasks
- Tk.after(20, proc{update_animated_gif(w, method, num)})
- rescue
- @imgPriv[w].delete(:args)
- @imgPriv[w].each{|im|
- @im.delete
- @imgPriv.delete(im)
- }
- end
- end
-
- def show_animated_gif(keys)
- w = TkLabel.new
- begin
- im = TkPhotoImage.new(keys.merge(:format=>[:gif, {:index=>0}]))
- im.configure(:data=>'', :file=>'', :format=>'') #free storage
- w.image(im)
- @imgPriv[w] ||= Hash.new
- @imgPriv[w][0] = im
- @imgPriv[w][:args] = keys
- Tk.update_idletasks
- Tk.after(20, proc{update_animated_gif(w, :image, 0)})
- rescue => e
- w.configure(:text=>"error displaying animated gif:\n#{e.message}",
- :image=>'', :relief=>:ridge)
- end
- w.pack
- end
-
- def show_image(fmt, type, data)
- fmt = fmt.to_s.capitalize
- unless @typeFrame[fmt]
- @typeFrame[fmt] = TkFrame.new.pack(:side=>:top, :expand=>true, :fill=>:x)
- TkLabel.new(@typeFrame[fmt], :text=>"#{fmt} : ").pack(:side=>:left)
- end
- begin
- f = TkFrame.new(@typeFrame[fmt],
- :borderwidth=>2, :relief=>:ridge).pack(:side=>:left)
- im = TkPhotoImage.new(:data=>data)
- im['data'] = ''
- TkLabel.new(f, :image=>im).pack
- TkLabel.new(f, :text=>type, :borderwidth=>0, :pady=>0, :padx=>2,
- :font=>'Helvetica 8').pack
- rescue => e
- TkMessage.new(f, :text=>"error displaying #{type} image: #{e.message}",
- :aspect=>250).pack
- end
- Tk.update
- end
-
-end
-
-##############
-
-demo = TkImg_demo.new
-
-##############
-
-demo.show_animated_gif(:data=><<'ENDofIMG')
-R0lGODlhYgIEAIIAAQAAACQAJEkASW0AbZIAkrYAttsA2/8A/yH/C05FVFNDQVBFMi4wAwEA
-AAAh+QQABgD/ACwAAAAAYgIEAAIDuUg63CMwwiCCvQAHwLv/YCiOZGmeaKqubOu+pZXNV03d
-kuAwysLoucjNlpFtYMikcslsOp+ijbRow1EiD12jtyA4INnJZGg8HmfQtHrNbrPP6KqlEgRq
-B17vzi6ukKVmHXBuhIWGh4RTcXJ0QQ8OeVx6XzlWVTRoiJqbnJ0tGmUXdDhgd1uTP2FCo5dT
-g56wsbKaoYBzVlimPJJ7QX9EirPCw8RttTZ1ul29Er81mMXR0tMvxzXJO1wAACH5BAAGAP8A
-LAAAAABiAgQAA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FAcUExMf
-CwoAAwkAAAAAAAEAAQAKCgAJBBMTCRQTEwELAAoKAAMJAAAAAAABAAEACgoACQMTEwkXExMe
-CwAKCgADCQAAAAAAAQABAAoKAAgCFxMcHRMVBwsKAAMJAAAAAAABAAEACgoABwIJExsZExMA
-DQoBAAEAAAABAAEADAoABhMTGhMTFAwKAQABAAAAAQABAAsKAAkJExMXExMTAgsACgoBAAEA
-AAABAAERCwoBBwYTAQcBCQoKAQABAAAAAQABAgsKAQcGEwAEGAILDQgKAQABAAAAAQABAgsK
-AQcHEwAEAAsQCwcKAQEBAAAAAQABBAsKAQkBFAYTAAQACwoPBwoBAgEAAAABAAEECAoADw8L
-CgsZExMTGAkBAAsLDgAHCgEEAQAAAAEAAQUICgAFDwoKCgMABBMADwkKCwoLDgsKEAsKCgoF
-AAAAAAEAAQYNCgEZBBMECgAEDgoKDAQKAQcBAAAAAQABBwkKAA4PCgoKFhcTExMYCgoKCwcK
-AQgBAAAAAQABBwgKAAwLDgsKCgsCFBMTExUKCgEJAQAAAAEAAQgHCgADDwoMAAQKAAYLARIT
-EwkLCgEAAAABAAEJBwoABA0LChAECgAFCwIAEQsACwoBAAAAAQABCQcKAAUNCwoOCwAFCgEL
-AQsMCgEAAAABAAEJBwoABg8PCgoMCxIKAQAAAAEACAoABwsMCwoNDgsAEQoBAAAAAQANCgEL
-EgoBAAAAAQAgCgECAAABACAKAQMAAAEAFgoACwkEBgcHCQkJCgoFAAAAAA0AAAABAgMEBQYH
-CAkJAAgKAQYMAAAAIgAAAQ==
-ENDofIMG
-end
-
-demo.show_image('bmp', '32-bit', <<'ENDofIMG')
-Qk2GFAAAAAAAADYAAAAoAAAAIgAAADIAAAABABgAAAAAAFAUAABtCwAAbQsAAAAAAAAAAAAA
-////ZmbMmZnMmZn/zMz/7u7u////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////AAD///8A
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzM8wzM8wzM8wzM8wzM8wzM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///8AAP///wAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///wAA////ADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMMzPM////AAD///8AM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzM8z///8AAP///wAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzDNmzP///wAA////ADPMADPMADPMADPMAADMADPMADPM
-ADPMAADMADPMADPMADPMAADMADPMADPMADPMZmbMADPMADPMAADMADPMADPMADPMAADMADPM
-AADMADPMADPMADPMADPMADPMZmbM////AAD///8zM8wAM8wAM8wAAMz///9mZswAM8wAM8yZ
-mf9mmcwAAMwAM8zMzP9mZswAM8wAAMyZmf8AM8wAM8zu7u5mmcwAM8wzM8z///8zM8z///8z
-M8wAM8wAM8wAM8wAM8xmZsz///8AAP///zMzzAAzzAAzzAAAzP///wAAzAAzzJmZ/zMzzAAA
-zAAzzAAzzJmZ/zMzzAAzzAAAzGZmzAAzzAAAzP///wAAzAAzzAAAzP///////wAzzAAzzAAz
-zAAzzAAzzAAzzJmZzP///wAA////MzPMADPMADPMADPM////ADPMADPMMzPMZmbM////AADM
-ADPMmZn/MzPMADPMMzPMADPMADPMADPM////ADPMADPMAADM////ZmbMADPMADPMADPMADPM
-ADPMADPMmZn/////AAD///8zZswAM8wAM8wAAMz///8AM8wAM8wAM8wAM8wAM8wAM8wAM8yZ
-mf8zM8wAM8xmmcwAAMwAM8wAAMz///8AAMwAM8wAAMz///8AM8wzM8wAM8wAM8wAM8wAM8wA
-M8yZmf////8AAP///2ZmzAAzzAAzzAAzzAAAzAAzzAAzzAAzzAAzzAAzzAAzzAAzzJnM/zMz
-zAAzzJnM/wAAzAAzzAAzzAAAzAAzzAAzzAAzzP///wAAzAAzzAAzzAAzzAAzzAAzzAAzzMzM
-/////wAA////ZmbMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM
-3d3dMzOZADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMzMz/////
-AAD///9mmcwAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzM8yZZjPMzJmZ
-MwAAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8zu7u7///8AAP//
-/5mZzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzDMzzJlmAGYzZsyZZpkzAJmZ
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///////wAA////mZn/
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMAADMzJlmmTMAMzOZmWYzmTMAmWYzMzPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM////////AAD///+Zmf8AM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzZszMzP+ZMwAzM8yZZgCZMwCZMwCZmf8AM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///////8AAP///5mZ/wAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzJlmAGZmzJlmAGYzM5kzAMzM/wAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///////wAA////zMz/ADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMM2bMmTMAZmbMmWYAmTMAZmb/7u7uADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPM////////AAD////MzP8AM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8yIiIiZZgBmZsyZMwCZMwBmZswAAMwAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8z///////8AAP///93d3QAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAAzHd3d5kzAGaZzJkzAJkzAGYzZpmZ/wAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzP///////wAA////7u7uADPMADPMADPMADPMADPMADPMADPMADPM
-ADPMADPMMzPMZjMzmTMAZpn/mTMAmTMAZjMzmcz/ADPMADPMADPMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPM////////AAD///////8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wzZsyZMwCZZgBmZv+ZMwCZMwCZMwDMzP8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8z///////8AAP///////wAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzGaZ
-/5kzAJlmAGZmzJlmAJkzAJkzAMz//wAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zDMzzP///////wAA////////ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMmZn/mTMA
-mTMAMzPMmWYAmTMAmTMA7u7uAADMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMMzPM
-////////AAD///////8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8yZzP+ZMwCZMwAz
-M8yZZjOZMwCZMwC7u7sAAMwAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wzM8z/////
-//8AAP///////wAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzMzM/5lmM5kzADMzZsyZ
-M5kzADMzmWZmzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzDMzzP///////wAA
-////////ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMzMz/MzPMmTMAZjMzzJlmmTMA
-mTMAADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM////////AAD/////
-//8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8yZMwCZMwCZmZmZMwCZMwCZ
-ZgAAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///////8AAP///////wAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzDMzzJkzAJkzAJlmM5kzAJkzAJkzAMzM
-/wAAzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///////wAA////3d3dADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMZmbMmTMAmTMAmTMAmTMAmTMAmTMAZmbMMzPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM////////AAD////MzP8AM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8xmZsyZMwCZMwCZMwCZMwCZMwCZMwBmM2bMzP8AAMwA
-mf8AM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///////8AAP///8zM/wAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzGZmzJkzAJkzAJkzAJkzAJkzAJkzAJkzAP///wAAzACZzAAA
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzO7u7v///wAA////mZn/ADPMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMMzPMmWYAmTMAmTMAmTMAmTMAmTMAmTMA////A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z
-zAAAzAAAzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///wAA////MzPM
-ADPMADPMADPMADPMADPMADPMADPMAGbMAGbMADPMADPMAMz/AADMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM////AAD///8AM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAAMwAzP8AAMwAM8wAmf8A//8AAMwAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8z///8AAP///wAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAAzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzP///wAA////ADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPMADPM
-ADPMADPMADPMADPMADPMADPMADPMADPMADPMzMz/AAD///8AM8wAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wAM8wA
-M8wAM8wAM8wAM8wAM8wAM8wAM8wAM8yZzP8AAP///wAzzAAzzAAzzAAzzAAzzAAzzAAzzAAz
-zAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzAAzzDMzzJmZ/2aZzGZm
-zGZmzDMzzDMzzDMzzAAzzAAzzJmZzAAA////////////7u7uzMz/mcz/mZn/mZnMZpnMZmbM
-M2bMMzPMMzPMADPMADPMADPMADPMADPMADPMADPMADPMZpnM////////////////////////
-////////////////////////AAD/////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////
-//////////////////8AAA==
-ENDofIMG
-
-demo.show_image('gif', 'gif87a', <<'ENDofIMG')
-R0lGODdhQAAoAPcAAAAAADgoOHBgYJiIkIB4iJCAiIB4gGBIUGhggKiYmLCYoLiooHBocMCA
-eJBocLCYmMCooKiQkKCAgGBASIiAiGhYeLiQiIhoaJhwcJh4gMCYkMCgoMCoqKiQiEBAWEg4
-QMiwoMioqMComLCIiFhAWIBgaJhweHBgcLiQkIiAgDg4UIhwgHhgYJh4cMiooFBQcGBYeJiA
-iIBwgIh4iKCAiKB4eHhYYGhIWKiIiEhAWFBIYEhAaEhIaHBYcHBgeFBQeHBogHBQYHBQWGBA
-UFhQaGBYaFhYeKCIkLCQmHhYaGBIWLCYiFBAYEhAYFhQYFBIaFhYcKCIiKCQkKiIkLCIgHBQ
-aIhwcJiAeIBgcJBwcLCQiKiAeKB4gHhwgNCwqMiwqIBoeHBYaJh4eMCYmJBweGhYYNC4qEg4
-UEA4WGBQWEBAYFBQaHBoeFhQcGhgeGhYcMiwsJB4cGBIYNjIwEAwSMCgmHhocFBAWNDAuNDI
-uIBweGBYcHhoeDgwQGhgaKCIgNjQuKiAgNjIuKiIgKCAeKCQiEhIWFBIUGBQaNC4sGBQcGBY
-YMi4sGhYWFhIYFhIaFhQWHhoaLCQkDg4SHBgaJB4gJB4eLiYmLiomGhYaEhIYFhYaIh4gHho
-gGhgcIBoaGBIaHhgcNDAsFBAUGhQYLigoLioqJiIgGhQaFA4SFhIWHhweFBIWJiAgIh4eFhI
-UHBYYIhweEg4WLiYkDg4WGBQYEA4SEA4UMCwqIhocHhgaJB4iJCAgFhASEBAUEhAUIBocFhA
-UKCQmHhgeEgwSNjQwEg4SLCgmDgwUGhQWLCgoEAwUFBASLigmEAwQGhIUFg4SIhoeEgwQKiY
-kFA4UDgwSJiIiIBwcKiQmLCooLCYkDgoQP//////////////////////////////////////
-////////////////////////////////////////////////////////////////////////
-/////////////////////////////////ywAAAAAQAAoAAAI/gABCBxIsKDBggEEDBhAoICB
-AwcjSpxIMSKCBAoWIGDQoIGDBxAURJBAoKLJkwcnUKgQoYEFlxcwdO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LCgmDgwUGhQWLCgoEAwUFBASLigmEAwQGhIUFg4SIhoeEgwQKiY
-kFA4UDgwSJiIiIBwcKiQmLCooLCYkDgoQP//////////////////////////////////////
-////////////////////////////////////////////////////////////////////////
-/////////////////////////////////yH5BAEAAAAALAAAAABAACgAAAj+AAEIHEiwoMGC
-AQQMGECggIEDByNKnEgxIoIEChYgYNCggYMHEBREkECgosmTBydQqBChgQWXFzB07JihgYYN
-HDp4QMlz4gcJIEKIeDliJokSMzuaOAECRQoCKnpKHbhipgaZSRtgYNHChYaXGhy8gAEjhowZ
-U3vSqJE1KQsbN1rgGGEih44dPHr4+PHDBwIgaU+i6IjhZQMWQVgIuWFjCIsGRTveIFKECBEC
-RowcIYAgMEUkGmZeSKJkyJAJqDMsQVGCLQYNTJo40fHkyQsoUUJI6ez54JQGVEpUgSvEhhUb
-V7CwyKLFhJYtXFCQgNGkOpEkXWBU8PKFAODeBIH+ZADDIoyYEmOmgCFTpsoKMyAwbFkC4gya
-NGrQqGmyZs0SNm24cQQCBDgB3kAIvFFCGRnAEccYcowBxxx0XGEGClTUUYMdTNzRARJ24OHF
-HHnoMQcee+zhHR99HNiFETBg4ccfgFQRCBlhiWChIF+MIcgGHQwCgR0DEFKIIYcgksgccJjA
-QQVAdGHHgTAssIcibiwiCCNz1GGBCHOAQAggZIQAAiCNKGHCHA3gwYQjj+wAiSNIRCIJEli4
-AcQkvRHAyB56PMEGJXpUYokWlwyyRRwXJDKCiIRsAAEmf2SiCRpr5GDAJkQwQQQGU3DiAxuI
-9DZDJ558AooalPRwAiT+OMSBAgqCACKIAyBQAVkiSIQiSiSjPKKDJqQsUsEbNvwhxQM9eNIb
-ECuUYkoopyCxACp2iMCVAxoIMsYciWTwSSqIWFAHEkvkEAYTTKjiBBpMFMBABhzY0YNnhQBh
-yg6F8HHCKqWcUYYNDdTAwgUazIECCzX0wEoODQhBSiuioJGDB47k4IomOjiiwRgFePJKYAT8
-kEIMcExRSRNPoDGKS2C9dMMNsMRSgSwX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LrIw
-iGaUwhKWaMYgrHGMWdzgCAKwgypcwQle6OEXt4AEU+8qEASwwQ2qWIAUekEJG9QBAqbggBXE
-EIUFKKMUDxjYxACMMQ1SuMIKVqiEHYoACVZwliAIuMYAEoCNViwgGwm4RASagYlsmOK42khA
-NjhRgALwQQ+R6AQD3PAGTfy2IAgwQHSzAYFsYOMYzZCEMh4wi2w4170ytYYwrGFdTxDhoN8t
-yCQKkIIIJEAbSFBAApTh3gUYOBvKIG4EBlAACsgABnvIQX4jAgRHzAAbGF6vAo5xCWVMYxpI
-kEIEYsCLU6yAEnadsESgUIABRCEK2IhABIQh4wHQgAbWsCwfnLANFZskAJ2YQUN2UYAYzIDE
-XWADDO5A1YAAADs=
-ENDofIMG
-
-teapot = <<'ENDofIMG'
-",
-".. c #998074",
-"#. c #84aadc",
-"a. c #c47e55",
-"b. c #4c6ea0",
-"c. c #d48a64",
-"d. c #ecccbc",
-"e. c #8c6252",
-"f. c #b1a094",
-"g. c #714628",
-"h. c #af8a76",
-"i. c #2c5284",
-"j. c #98745f",
-"k. c #8f5124",
-"l. c #844614",
-"m. c #5074a6",
-"n. c #aeb2b9",
-"o. c #3e291c",
-"p. c #44689b",
-"q. c #4c2705",
-"r. c #1b2b43",
-"s. c #e1c8bb",
-"t. c #dd782d",
-"u. c #9c5824",
-"v. c #547aac",
-"w. c #906e5a",
-"x. c #545253",
-"y. c #e07e33",
-"z. c #bcaeac",
-"A. c #aeb6bc",
-"B. c #6f737b",
-"C. c #7e5942",
-"D. c #b55e1a",
-"E. c #7c5134",
-"F. c #8c7a70",
-"G. c #62524d",
-"H. c #bc8a6c",
-"I. c #936754",
-"J. c #6e6d75",
-"K. c #8cb0e2",
-"L. c #d4beb4",
-"M. c #2a201a",
-"N. c #c48664",
-"O. c #412105",
-"P. c #a95a19",
-"Q. c #747a7c",
-"R. c #2a2e33",
-"S. c #484c53",
-"T. c #8690a1",
-"U. c #6c524c",
-"V. c #505967",
-"W. c #040204",
-"X. c #8cb6e4",
-"Y. c #8f4912",
-"Z. c #846e5c",
-"0. c #244a7c",
-"1. c #dcc2b6",
-"2. c #33261b",
-"3. c #81736c",
-"4. c #3c3b46",
-"5. c #735f53",
-"6. c #545e69",
-"7. c #bc7c58",
-"8. c #4c2f1d",
-"9. c #a4806b",
-".# c #604c4c",
-"## c #d4916b",
-"a# c #5c80b2",
-"b# c #e3d3cd",
-"c# c #c8ad9a",
-"d# c #bf6c2e",
-"e# c #08121c",
-"f# c #9c5e34",
-"g# c #9298a1",
-"h# c #8b7f7c",
-"i# c #835f44",
-"j# c #a46e54",
-"k# c #474649",
-"l# c #a65d26",
-"m# c #be6420",
-"n# c #7c9ed2",
-"o# c #ac622c",
-"p# c #726e6c",
-"q# c #e1a684",
-"r# c #a48676",
-"s# c #54464c",
-"t# c #a0a4ac",
-"u# c #b37b5a",
-"v# c #947a70",
-"w# c #543d31",
-"x# c #743e12",
-"y# c #98bcee",
-"z# c #d49e7c",
-"A# c #64320c",
-"B# c #d4cac6",
-"C# c #2c3642",
-"D# c #6e686b",
-"E# c #5c463e",
-"F# c #7f7575",
-"G# c #bcb2b0",
-"H# c #979dac",
-"I# c #a47a61",
-"J# c #8c9094",
-"K# c #1c262c",
-"L# c #d3c3bc",
-"M# c #9cc2f4",
-"N# c #af7455",
-"O# c #fcad5f",
-"P# c #6486b8",
-"Q# c #d4742d",
-"R# c #6d4e3d",
-"S# c #242224",
-"T# c #3b444c",
-"U# c #181515",
-"V# c #6e4024",
-"W# c #749bcc",
-"X# c #afabac",
-"Y# c #7e6a64",
-"Z# c #343634",
-"0# c #e8ac8a",
-"1# c #343a44",
-"2# c #b18f7a",
-"3# c #dda07f",
-"4# c #6f380d",
-"5# c #2f5684",
-"6# c #a08d86",
-"7# c #5f6068",
-"8# c #625751",
-"9# c #16253b",
-".a c #94b6e9",
-"#a c #dfcec8",
-"aa c #3c6194",
-"ba c #ecdad3",
-"ca c #948a89",
-"da c #a4c8fa",
-"ea c #bcb6b8",
-"fa c #604432",
-"ga c #cc6d29",
-"ha c #949ea4",
-"ia c #413024",
-"ja c #a48a7a",
-"ka c #9a867d",
-"la c #1c1a1c",
-"ma c #342116",
-"na c #bc8364",
-"oa c #9c8674",
-"pa c #844e25",
-"qa c #3c4a5c",
-"ra c #582c0d",
-"sa c #c7835a",
-"ta c #613c24",
-"ua c #614b41",
-"va c #adaeb5",
-"wa c #805c4c",
-"xa c #0a0b0f",
-"ya c #c4b2ac",
-"za c #648abc",
-"Aa c #af846a",
-"Ba c #c68a69",
-"Ca c #483c39",
-"Da c #7f400d",
-"Ea c #646e74",
-"Fa c #a85515",
-"Ga c #042244",
-"Ha c #816759",
-"Ia c #95817c",
-"Ja c #9c9aa1",
-"Ka c #9c6b54",
-"La c #7e4924",
-"Ma c #0c1a2c",
-"Na c #5f595f",
-"Oa c #6f615e",
-"Pa c #474149",
-"Qa c #8c9aac",
-"Ra c #cbbeb8",
-"Sa c #806e68",
-"Ta c #82624e",
-"Ua c #949294",
-"Va c #b4652c",
-"Wa c #9c9ea4",
-"Xa c #72574c",
-"Ya c #2a303e",
-"Za c #bc9175",
-"0a c #9c7a64",
-"1a c #261a13",
-"2a c #aca6ac",
-"3a c #341a04",
-"4a c #593520",
-"5a c #d49878",
-"6a c #26282c",
-"7a c #475261",
-"8a c #3f3535",
-"9a c #63676f",
-".b c #a47255",
-"#b c #bc967c",
-"ab c #52433a",
-"bb c #80a4d6",
-"cb c #544c4c",
-"db c #bc723c",
-"eb c #645e54",
-"fb c #a4abb4",
-"gb c #c89070",
-"hb c #8c7469",
-"ib c #c7b8b3",
-" ",
-" ",
-" ",
-" wawae.e.wa ",
-" .#j#N#7.a.db.# ",
-" 8.g.x#C.o. ",
-" N#DaA#raY.Xa4aV#4aPas#q.W.W.6a ",
-" i#O.l.4.4.4.4.4.s#wa7.N#wawaXawawawaA#q.C. ",
-" 3a3a4#wawawae.e.e.I.j#m#d#VaN#KaI.e.e.e.e.waDaO..#j#j#N#N#j#fa ",
-" O.A#wae.e.I.e.I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.s.r#r#h.jajajar#a#M#v.a#a#a#a#a#a#P#dadadaM# "};
-ENDofIMG
-
-demo.show_image('xpm', 'color', "/* XPM */
-static char * teapot[] = {
-\"64 48 204 2\",
-\" c #145ec4#{teapot}")
-
-demo.show_image('xpm', 'transparent', "/* XPM */
-static char * teapot[] = {
-\"64 48 204 2\",
-\" s None c None#{teapot}")
-
-demo.show_image('xbm', 'bitmap', <<'ENDofIMG')
-#define flagup_width 48
-#define flagup_height 48
-static char flagup_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00,
- 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xef, 0x6a, 0x00,
- 0x00, 0x00, 0xc0, 0x7b, 0x75, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x6a, 0x00,
- 0x00, 0x00, 0x30, 0x60, 0x75, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x7f, 0x00,
- 0x00, 0x00, 0x0c, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x06, 0xe0, 0x04, 0x00,
- 0x00, 0x00, 0x03, 0xe0, 0x04, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x06, 0x00,
- 0x00, 0xc0, 0x1f, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x7f, 0xe0, 0x07, 0x00,
- 0x00, 0x70, 0xe0, 0xe0, 0x05, 0x00, 0x00, 0x38, 0x80, 0xe1, 0x04, 0x00,
- 0x00, 0x18, 0x80, 0xf1, 0x04, 0x00, 0x00, 0x0c, 0x00, 0xfb, 0x04, 0x00,
- 0x00, 0x0c, 0x00, 0xff, 0x04, 0x00, 0x00, 0x86, 0x1f, 0xee, 0x04, 0x00,
- 0x00, 0x06, 0x06, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00,
- 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x66, 0x04, 0x00,
- 0x7f, 0x56, 0x52, 0x06, 0xe4, 0xff, 0x00, 0x76, 0x55, 0x06, 0x04, 0x00,
- 0x00, 0x56, 0x57, 0x06, 0x04, 0x00, 0x00, 0x56, 0x55, 0x06, 0x06, 0x00,
- 0x00, 0x56, 0xd5, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00,
- 0x54, 0x06, 0x00, 0xc6, 0x54, 0x55, 0xaa, 0x06, 0x00, 0x66, 0xaa, 0x2a,
- 0x54, 0x06, 0x00, 0x36, 0x55, 0x55, 0xaa, 0x06, 0x00, 0xbe, 0xaa, 0x2a,
- 0x54, 0xfe, 0xff, 0x6f, 0x55, 0x55, 0xaa, 0xfc, 0xff, 0xa7, 0xaa, 0x2a,
- 0x54, 0x01, 0x88, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
- 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
- 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
- 0x54, 0x55, 0x8d, 0x50, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa8, 0xaa, 0x2a,
- 0x54, 0x55, 0x95, 0x54, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a,
- 0x54, 0x55, 0x55, 0x55, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-ENDofIMG
-
-demo.show_image('png', 'color', <<'ENDofIMG')
-iVBORw0KGgoAAAANSUhEUgAAAC4AAAAjCAIAAAETQp8oAAAIVklEQVR4nNVXPYgbSRb+xm7B
-K5CgC07QtaCDOvBCDeyAFAxIwQYdbKCBDeTgQBMqtOGCcTYOvXDBODjwHBzsBHcwExzMBAtW
-4GN7YQ1ScKAOBNPBLFcLHugGC7pgBf0WeuGC1v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AAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABtAABJAABJAABJAACSJCRJ
-AABtJABtAACSSSRtJACSbSSSSSTbkm222222km22bUm2kknbtpLb25K2km22kknbtpLbtm3b
-tpLbtm22km3btpK2km3btpLb25L//9v/25L/25Lb29v//7b/27b//7b/27b/25Lb29v/27bb
-tpL//9v//////7b///////////////+2bUkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAABJAABJAABJAABJAABJJACSSSSSJABtSQCSSSSSSSSSSSSSJCSSSSS2
-bUmSSSSSJABtJABtAACSSSS2kkm2bUnbkkm2kkn/25K2kknbtm22km3bkm22km3/tm3btm3b
-tm3btpLbkm22km22kkm2kknbtm3bkpL/25L/27b//7b/27b//7b/////tm3btpL/27b/tm3b
-tpLbtm3//7b/25L//9v/////////////////////2/8AAAAAAAAAAAAAAACSSSQkAABtJABJ
-AABtJABJAABJAABJAACSSSRtSQBtJABtSSS2kkmSJCSSJCSSSSSSSSSSSSSSSSSSSSSSSSRt
-JACSSSSSSSS2bUm2km3//9u2bUm2bUm2bUm2SSS2bUm2bUm2km2SSSSSSSTbtm3btpL/25K2
-km3btkm2km3btm22km3bkm3btpL/25K2tm3bkm22km3btm22bUm2bUm2bUm2kkm2bUnbtm22
-tm3bkm3b25L//9v///////////8ADgEAAAMAAAABAEAAAAEBAAMAAAABACgAAAECAAMAAAAD
-AAAetgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAESAAMAAAABAAEAAAEV
-AAMAAAABAAMAAAEWAAMAAAABACgAAAEXAAQAAAABAAAeAAEaAAUAAAABAAAevAEbAAUAAAAB
-AAAexAEcAAMAAAABAAEAAAEoAAMAAAABAAIAAAAAAAAACAAIAAgSwAAAAAQAABLAAAAABAAA
-ENDofIMG
-
-demo.show_image('tiff', 'packbits compressed', <<'ENDofIMG')
-TU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L/27b/tm3btpLbtm3//7b/25L//9vx/wHb//UAAZJJ/yT/AH9tJABJAABtJABJ
-AABJAABJAACSSSRtSQBtJABtSSS2kkmSJCSSJCSSSSSSSSSSSSSSSSSSSSSSSSRtJACSSSSS
-SSS2bUm2km3//9u2bUm2bUm2bUm2SSS2bUm2bUm2km2SSSSSSSTbtm3btpL/25K2km3btkm2
-km3btm22km3bkjBt27aS/9uStrZt25JttpJt27Zttm1Jtm1Jtm1JtpJJtm1J27ZttrZt25Jt
-29uS///b+P8ADgEAAAMAAAABAEAAAAEBAAMAAAABACgAAAECAAMAAAADAAAEuAEDAAMAAAAB
-gAUAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAESAAMAAAABAAEAAAEVAAMAAAABAAMAAAEW
-AAMAAAABACgAAAEXAAQAAAABAAAEAgEaAAUAAAABAAAEvgEbAAUAAAABAAAExgEcAAMAAAAB
-AAEAAAEoAAMAAAABAAIAAAAAAAAACAAIAAgSwAAAAAQAABLAAAAABAAA
-ENDofIMG
-
-if false
-demo.show_image('tiff', 'pixarlog compressed', <<'ENDofIMG')
-TU0AKgAAA3Z4nO2aIWzbUBCGz7HjYyVTNDAp0CgKDRorCauiSGFjRmWRxs0rlQ2FlUWKrLKQ
-sIDK1BoyjFRUjZSF7f13eYnjpZOmdeuU3Wc1se+dn17uf/ee5SuRYRiGYRiGYRiGYRiGYRiG
-YRg/YxVt3EG04IpLJkqocJ8VD6S1746ELsOP8UNMxO1J9MbDPQs2EvOKcV66uOsZoo34lwxb
-JraMfEsif+S06Lrj74/5XNi2iG6jdbCKruMRz3gdfKUbF/OFi/c0vHbzfNvqBDl1giENKHdt
-492dI/7sdIElMRV+i0l0G62igcx3ZMBhnUFc0ebV4fZzeBfDfx2ofyGr1DycOt+3/RXnALIB
-63rTqnYo9SVYBxptVS11+WDz//WZh/MQ8Z5E8/AiwjdmPnTg9qfg1sV+Hn7gabiK3gWbSDPl
-rcdsGIZhGIZhGIZhGIZhnCebXc1IKxeJ2LSG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sgAAAQYAAwAAAAEAAgAA
-AREABAAAAAEAAAAIARIAAwAAAAEAAQAAARUAAwAAAAEAAwAAARYAAwAAAAEAKAAAARcABAAA
-AAEAAAGfARoABQAAAAEAAAJcARsABQAAAAEAAAJkARwAAwAAAAEAAQAAASgAAwAAAAEAAgAA
-AAAAAAAIAAgACBLAAAAABAAAEsAAAAAEAAA=
-ENDofIMG
-
-if Tk::PLATFORM['platform'] != 'windows'
-demo.show_image('other', 'postscript', <<'ENDofIMG')
-%!PS-Adobe-3
-%%Title: postscript.ps
-%%BoundingBox: 66 648 146 720
-%%Pages: 1
-%%DocumentProcSets: Adobe_distill 0.96
-%%EndComments
-%%BeginProcSet: Adobe_distill 0.96
-/PROLOGUE 30 40 add dict def
- % 30 procedure entries + room for 40 cached font dictionaries
- PROLOGUE begin
- /clip { } def % causes problems. remove if "clip" is needed
- /bdef { bind def } bind def /ldef { load def } bdef
- /T { moveto show } bdef /A { moveto ashow } bdef
- /W { moveto widthshow } bdef /AW { moveto awidthshow } bdef
- /f /fill ldef /R { { rlineto } repeat } bdef
- /r /rlineto ldef /L { { lineto } repeat } bdef
- /m /moveto ldef /l { moveto lineto stroke } bdef
- /x { 0 rlineto } bdef /y { 0 exch rlineto } bdef
- /c /curveto ldef /cp /closepath ldef
- /s /stroke ldef /w /setlinewidth ldef
- /g /setgray ldef /j /setlinejoin ldef
- /d /setdash ldef /F /setfont ldef
- /C /setcmykcolor where { /setcmykcolor get }{ %ifelse
- { %def
- 1 sub 3 { 3 index add neg dup 0 lt { pop 0 } if 3 1 roll } repeat
- setrgbcolor
- } bind
- } ifelse def
- /selectfont where { pop }{ %ifelse
- /selectfont { exch findfont exch scalefont setfont } bdef
- } ifelse
- /MF { exch findfont exch makefont setfont } bdef
- /FF /selectfont ldef
- /DF { selectfont currentfont def } bdef
- /BEGINPAGE { pop /pagesave save def } bdef
- /ENDPAGE { pop pagesave restore showpage } def
- /REMAP { %def
- FontDirectory 2 index known { pop pop pop } { %ifelse
- findfont dup length dict begin
- { 1 index /FID ne {def}{pop pop} ifelse } forall
- exch dup length 0 gt { /Encoding exch def }{ pop } ifelse
- currentdict end definefont pop
- } ifelse
- } bdef
- /RECODE { %def
- 3 -1 roll 1 index findfont /Encoding get 256 array copy exch
- 0 exch { %forall
- dup type/nametype eq
- { 3 {2 index} repeat put pop 1 add }{ exch pop }ifelse
- } forall pop 3 1 roll REMAP
- } bdef
- end %PROLOGUE
-%%EndProcSet: Adobe_distill 0.96
-%%EndProlog
-%%BeginSetup
-PROLOGUE begin
-%%EndSetup
-%%Page: 1 1
-1 BEGINPAGE
-1 g
-2 setlinecap
-144 53 m
-390 x
--19 y
--390 x
-eofill
-0 g
-1.268 w
-0 setlinecap
-4 setmiterlimit
-[] 0 d
-109.698 714.182 m
-111.525 713.672 112.472 713.234 113.624 712.431 c
--22.3128 -25.8381 r
-97.4019 682.652 103.794 672.84 100.329 664.844 c
-102.034 675.687 90.7436 683.82 84.1099 684.842 c
-25.588 29.3407 r
-f
-1.0361 w
-f
-f
-91.8805 654.468 m
-96.0255 654.285 100.155 654.188 104.481 654.188 c
-113.804 654.188 122.752 654.636 131.141 655.44 c
-134.222 655.737 136.724 658.133 137.108 661.279 c
-137.79 666.855 138.107 672.696 138.107 678.705 c
-138.107 684.714 137.79 690.555 137.108 696.131 c
-136.724 699.277 134.222 701.674 131.141 701.97 c
-127.476 702.321 123.704 702.604 119.84 702.813 c
-119.84 702.813 103.842 668.373 102.231 664.827 c
-99.8549 659.595 96.601 655.765 91.8805 654.468 c
-f
-0.7851 w
-77.8202 655.44 m
-74.7171 655.948 72.2887 657.716 71.8525 661.279 c
-71.1725 666.855 70.8549 672.696 70.8549 678.705 c
-70.8549 684.714 71.1725 690.555 71.8525 696.131 c
-72.2381 699.277 74.7417 701.674 77.8202 701.97 c
-82.1335 702.383 86.5932 702.702 91.1764 702.916 c
-8.16241 9.07727 r
-99.2863 711.98 101.266 712.345 102.996 711.921 c
--28.4564 -32.9334 r
-80.6983 681.906 98.7446 677.354 98.7446 666.708 c
-98.7446 655.332 86.3243 654.054 77.8202 655.44 c
-f
-0.0843 w
-139.67 644.154 m
-140.194 644.154 140.619 644.576 140.619 645.098 c
-140.619 645.619 140.194 646.042 139.67 646.042 c
-139.146 646.042 138.721 645.619 138.721 645.098 c
-138.721 644.576 139.146 644.154 139.67 644.154 c
-1 ENDPAGE
-%%Trailer
-end %PROLOGUE
-%%Pages: 1
-%%EOF
-ENDofIMG
-end
-
-if false
-demo.show_image('other', 'pdf', <<'ENDofIMG')
-JVBERi0xLjIKJcfsj6IKNCAwIG9iago8PC9MZW5ndGggNSAwIFIvRmlsdGVyIC9GbGF0ZURl
-Y29kZT4+CnN0cmVhbQp4nF1TSY7cQAy7+xX1AkFbaXlG3jBAgAAzh/z/Esp2uyeDPhhUayEp
-FZMsnt/9/fg6/h6y/hzCHdS1UlyodH0dIrJJNyIWlLpE1OcLrGQOjLg6MOIm6+NoMULWiopN
-bevz6HRiaUQ0aKMHW1L7itQitGA2UvwdDuhoIaw8zSN3UOVqTnILNLAiXQVy3NNvCvQs+M57
-Zv4Gj6LivWK7UxS0dDCknBGl2jNY6MKoKmBkljwYfQUD2d8ZqjkKgINASEyEfCq208nc0Fon
-YSdZIiFy7IldQmbACe4FraKUfVYkzEAgarhgIBJyvIGi+IYrCWqm4I6UJ4mvV4PmfTW4J3TI
-tZCHQzdmDqeLY7Jgpf6IAG7KKVAsLAMBxWIEqrEvuAAc8xXp2Rtgkdhp038B7PfcCyQZ5WDV
-oXIuWGdCI387SO/GjezVgcZyuRaAP1b3gXVmopb1ZfXXkSM/z6Imx+4xpHAsseGHgD2abFzu
-2+qEzjwjl9fJN4vb6zd+ef1Ebq+fDrfZz4zH7GFhc0O32cPSJR+zXzIes0vnMPZlNk73ejWT
-gFNDYs/IOM3tkTXmGUbMsaPF9cAwq8KuyNwxFMc4gJY+d47S0Td/68nSNxkiUNpz159H8Twg
-g1LkcKyGBe6TkQYL3jhwTDwreSJ7gw9eZeBY3GZpPBU/FjY7/HX8A9+h3WJlbmRzdHJlYW0K
-ZW5kb2JqCjUgMCBvYmoKNTE2CmVuZG9iagozIDAgb2JqCjw8Ci9UeXBlIC9QYWdlCi9NZWRp
-YUJveCBbMCAwIDYxMiA3OTJdCi9QYXJlbnQgMiAwIFIKL1Jlc291cmNlcyA8PCAvUHJvY1Nl
-dCBbL1BERl0KPj4KL0NvbnRlbnRzIDQgMCBSCj4+CmVuZG9iagoyIDAgb2JqCjw8IC9UeXBl
-IC9QYWdlcyAvS2lkcyBbCjMgMCBSCl0gL0NvdW50IDEKPj4KZW5kb2JqCjEgMCBvYmoKPDwg
-L1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDIgMCBSCj4+CmVuZG9iago2IDAgb2JqCjw8IC9DcmVh
-dGlvbkRhdGUgKEQ6MTk5NzEyMDUyMjU2MzcpCi9Qcm9kdWNlciAoQWxhZGRpbiBHaG9zdHNj
-cmlwdCA1LjEwKQo+PgplbmRvYmoKeHJlZgowIDcKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAw
-MDAwNzk5IDAwMDAwIG4gCjAwMDAwMDA3NDAgMDAwMDAgbiAKMDAwMDAwMDYyMCAwMDAwMCBu
-IAowMDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDA2MDEgMDAwMDAgbiAKMDAwMDAwMDg0OCAw
-MDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDcgL1Jvb3QgMSAwIFIgL0luZm8gNiAwIFIKPj4K
-c3RhcnR4cmVmCjkzOQolJUVPRgo=
-ENDofIMG
-end
-
-#######################
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tkimg/license_terms_of_Img_extension b/ext/tk/sample/tkextlib/tkimg/license_terms_of_Img_extension
deleted file mode 100644
index 23238e9c66..0000000000
--- a/ext/tk/sample/tkextlib/tkimg/license_terms_of_Img_extension
+++ /dev/null
@@ -1,41 +0,0 @@
-This software is copyrighted by Jan Nijtmans (the maintainer)
-and a lot of other people who contributed code (most notably
-Andreas Kupries, Thomas G. Lane, Ioi K. Lam, Mario Weilguni
-and Roger E Critchlow Jr).
-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.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-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.
-
-GOVERNMENT USE: If you are acquiring this software on behalf of the
-U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
-Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
-are acquiring the software on behalf of the Department of Defense, the
-software shall be classified as "Commercial Computer Software" and the
-Government shall have only "Restricted Rights" as defined in Clause
-252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
-authors grant the U.S. Government and others acting in its behalf
-permission to use and distribute the software in accordance with the
-terms specified in this license.
diff --git a/ext/tk/sample/tkextlib/tkimg/readme.txt b/ext/tk/sample/tkextlib/tkimg/readme.txt
deleted file mode 100644
index 8fd1a3e67d..0000000000
--- a/ext/tk/sample/tkextlib/tkimg/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-The script 'demo.rb' is based on 'demo.tcl' of Tcl/Tk's 'Img' extension.
-Image data in 'demo.rb' is those of 'demo.tcl'.
-Please read 'license_terms_of_Img_extension' file.
diff --git a/ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt
deleted file mode 100644
index b06b0b463b..0000000000
--- a/ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-
- #######################################################################
- ### The following text is the original 'license.txt' of tktable ###
- ### extension. ###
- ### Original Tcl source files are not include in this directory, ###
- ### because of all of them are rewritten to Ruby files. ###
- ### However, the image data file is quoted from iwidgets source ###
- ### archive. ###
- #######################################################################
-
-
- * 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 <jeff.hobbs@acm.org>. 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/ext/tk/sample/tkextlib/tktable/basic.rb b/ext/tk/sample/tkextlib/tktable/basic.rb
deleted file mode 100644
index eed5351a8a..0000000000
--- a/ext/tk/sample/tkextlib/tktable/basic.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-##
-## basic.rb
-##
-## This demo shows the basic use of the table widget
-##
-## ( based on 'basic.tcl' included source archive of tktable extension )
-##
-require 'tk'
-require 'tkextlib/tktable'
-
-ary = TkVariable.new_hash
-rows = 8
-cols = 8
-
-# fill table variable
-((-(rows))..rows).each{|x|
- ((-(cols))..cols).each{|y|
- ary[x,y] = "r#{x},c#{y}"
- }
-}
-
-lbl = TkLabel.new(:text=>"TkTable v1 Example")
-
-table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :variable=>ary,
- :width=>6, :height=>6,
- :titlerows=>1, :titlecols=>2,
- :roworigin=>-1, :colorigin=>-2,
- :rowstretchmode=>:last, :colstretchmode=>:last,
- :rowtagcommand=>proc{|row|
- row = Integer(row)
- (row>0 && row%2 == 1)? 'OddRow': ''
- },
- :coltagcommand=>proc{|col|
- col = Integer(col)
- (col>0 && col%2 == 1)? 'OddCol': ''
- },
- :selectmode=>:extended, :sparsearray=>false)
-
-sx = table.xscrollbar(TkScrollbar.new)
-sy = table.yscrollbar(TkScrollbar.new)
-
-btn = TkButton.new(:text=>'Exit', :command=>proc{exit})
-
-Tk.grid(lbl, '-', :sticky=>:ew)
-Tk.grid(table, sy, :sticky=>:news)
-Tk.grid(sx, :sticky=>:ew)
-Tk.grid(btn, :sticky=>:ew, :columnspan=>2)
-
-Tk.root.grid_columnconfig(0, :weight=>1)
-Tk.root.grid_rowconfig(1, :weight=>1)
-
-table.tag_configure('OddRow', :bg=>'orange', :fg=>'purple')
-table.tag_configure('OddCol', :bg=>'brown', :fg=>'pink')
-
-table.set_width([-2, 7], [-1, 7], [1, 5], [2, 8], [4, 14])
-
-puts "Table is #{table.path} with array #{(table['variable'])}"
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tktable/buttons.rb b/ext/tk/sample/tkextlib/tktable/buttons.rb
deleted file mode 100644
index a1fc720b40..0000000000
--- a/ext/tk/sample/tkextlib/tktable/buttons.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-##
-## buttons.rb
-##
-## demonstrates the simulation of a button array
-##
-## ( based on 'buttons.tcl' included source archive of tktable extension )
-##
-require 'tk'
-require 'tkextlib/tktable'
-
-# create the table
-tab = TkVariable.new_hash
-rows = 20
-cols = 20
-
-table = Tk::TkTable.new(:rows=>rows + 1, :cols=>cols + 1,
- :variable=>tab, :titlerows=>1, :titlecols=>1,
- :roworigin=>-1, :colorigin=>-1,
- :colwidth=>4, :width=>8, :height=>8,
- :cursor=>'top_left_arrow', :borderwidth=>2,
- :flashmode=>false, :state=>:disabled)
-
-sx = table.xscrollbar(TkScrollbar.new)
-sy = table.yscrollbar(TkScrollbar.new)
-
-Tk.grid(table, sy, :sticky=>:news)
-Tk.grid(sx, :sticky=>:ew)
-
-Tk.root.grid_columnconfig(0, :weight=>1)
-Tk.root.grid_rowconfig(0, :weight=>1)
-
-# set up tags for the various states of the buttons
-table.tag_configure('OFF', :bg=>'red', :relief=>:raised)
-table.tag_configure('ON', :bg=>'green', :relief=>:sunken)
-table.tag_configure('sel', :bg=>'gray75', :relief=>:flat)
-
-# clean up if mouse leaves the widget
-table.bind('Leave', proc{|w| w.selection_clear_all}, '%W')
-
-# highlight the cell under the mouse
-table.bind('Motion', proc{|w, x, y|
- Tk.callback_break if w.selection_include?(TkComm._at(x,y))
- w.selection_clear_all
- w.selection_set(TkComm._at(x,y))
- Tk.callback_break
- ## "break" prevents the call to tkTableCheckBorder
- }, '%W %x %y')
-
-# mousebutton 1 toggles the value of the cell
-# use of "selection includes" would work here
-table.bind('1', proc{|w, x, y|
- #rc = w.curselection[0]
- rc = w.index(TkComm._at(x,y))
- if tab[rc] == 'ON'
- tab[rc] = 'OFF'
- w.tag_cell('OFF', rc)
- else
- tab[rc] = 'ON'
- w.tag_cell('ON', rc)
- end}, '%W %x %y')
-
-
-# initialize the array, titles, and celltags
-0.step(rows){|i|
- tab[i,-1] = i
- 0.step(cols){|j|
- if i == 0
- tab[-1,j] = j
- end
- tab[i,j] = "OFF"
- table.tag_cell('OFF', "#{i},#{j}")
- }
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tktable/command.rb b/ext/tk/sample/tkextlib/tktable/command.rb
deleted file mode 100644
index 05ee47aa17..0000000000
--- a/ext/tk/sample/tkextlib/tktable/command.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-##
-## command.rb
-##
-## This demo shows the use of the table widget's -command options
-##
-## ( based on 'command.tcl' included source archive of tktable extension )
-##
-require 'tk'
-require 'tkextlib/tktable'
-
-# create the table
-data = TkVariable.new_hash
-rows = 10
-cols = 10
-
-# fill table variable
-((-(rows))..rows).each{|x|
- ((-(cols))..cols).each{|y|
- data[x,y] = "#{x} x #{y}"
- }
-}
-
-lbl = TkLabel.new(:text=>"TkTable :command Example")
-cur_var = TkVariable.new
-current = TkLabel.new(:textvariable=>cur_var, :width=>5)
-ent_var = TkVariable.new
-entry = TkEntry.new(:textvariable=>ent_var)
-
-table = Tk::TkTable.new(:rows=>rows, :cols=>cols,
- :command=>[proc{|mode, cell, val|
- if (mode == :w)
- data[cell] = val
- else
- begin
- data[cell] # exist
- rescue
- '' # not exist
- end
- end
- }, '%i %C %s'],
- :width=>6, :height=>6,
- :titlerows=>1, :titlecols=>1,
- :roworigin=>-1, :colorigin=>-1,
- :rowstretchmode=>:last, :colstretchmode=>:last,
- :rowtagcommand=>proc{|row|
- row = Integer(row)
- (row>0 && row%2 == 1)? 'OddRow': ''
- },
- :coltagcommand=>proc{|col|
- col = Integer(col)
- (col>0 && col%2 == 1)? 'OddCol': ''
- },
- :selectmode=>:extended, :flashmode=>true,
- :rowstretch=>:unset, :colstretch=>:unset,
- :browsecommand=>[proc{|w, s|
- cur_var.value = s
- ent_var.value = w.get(s)
- }, '%W %S'],
- :validate=>true,
- :validatecommand=>proc{|e|
- ent_var.value = e.new_value; true
- })
-=begin
- :validatecommand=>[
- proc{|s|
- ent_var.value = s; true
- }, '%S'])
-=end
-
-sx = table.xscrollbar(TkScrollbar.new)
-sy = table.yscrollbar(TkScrollbar.new)
-
-entry.bind('Return', proc{|w| table.curvalue = w.value}, '%W')
-
-Tk.grid(lbl, '-', '-', :sticky=>:ew)
-Tk.grid(current, entry, '-', :sticky=>:ew)
-Tk.grid(table, '-', sy, :sticky=>:news)
-Tk.grid(sx, '-', :sticky=>:ew)
-
-Tk.root.grid_columnconfig(1, :weight=>1)
-Tk.root.grid_rowconfig(2, :weight=>1)
-
-table.tag_configure('OddRow', :bg=>'orange', :fg=>'purple')
-table.tag_configure('OddCol', :bg=>'brown', :fg=>'pink')
-
-puts "Table is #{table.path}"
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tktable/debug.rb b/ext/tk/sample/tkextlib/tktable/debug.rb
deleted file mode 100644
index 831b3a1846..0000000000
--- a/ext/tk/sample/tkextlib/tktable/debug.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-##
-## debug.rb
-##
-## This demo uses most features of the table widget
-##
-## ( based on 'debug.tcl' included source archive of tktable extension )
-##
-require 'tk'
-require 'tkextlib/tktable'
-
-# create the table
-ary = TkVariable.new_hash
-rows = 25
-cols = 20
-
-# fill table variable
-((-(rows))..rows).each{|x|
- ((-(cols))..cols).each{|y|
- ary[x,y] = "r#{x},c#{y}"
- }
-}
-
-lbl = TkLabel.new(:text=>"TkTable v2 Example")
-
-table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :variable=>ary,
- :width=>6, :height=>6,
- :titlerows=>1, :titlecols=>2,
- :roworigin=>-5, :colorigin=>-2,
- :coltagcommand=>proc{|col|
- col = Integer(col)
- (col>0 && col%2 == 1)? 'OddCol': ''
- },
- :selectmode=>:extended, :flashmode=>true,
- :rowstretch=>:unset, :colstretch=>:unset,
- :selecttitles=>false, :drawmode=>:single)
-
-sx = table.xscrollbar(TkScrollbar.new)
-sy = table.yscrollbar(TkScrollbar.new)
-
-btn = TkButton.new(:text=>'Exit', :command=>proc{exit})
-
-Tk.grid(lbl, '-', :sticky=>:ew)
-Tk.grid(table, sy, :sticky=>:news)
-Tk.grid(sx, :sticky=>:ew)
-Tk.grid(btn, :sticky=>:ew, :columnspan=>2)
-
-Tk.root.grid_columnconfig(0, :weight=>1)
-Tk.root.grid_rowconfig(1, :weight=>1)
-
-table.tag_configure('OddCol', :bg=>'brown', :fg=>'pink')
-table.tag_configure('title', :bg=>'red', :fg=>'green', :relief=>:sunken)
-table.tag_configure('dis', :state=>:disabled)
-
-first = table[:colorigin]
-%w(n s e w nw ne sw se c).each_with_index{|anchor, idx|
- table.tag_configure(anchor, :anchor=>anchor)
- table.tag_row(anchor, idx)
- table.set([idx,first], anchor)
-}
-courier = TkFont.new(:family=>'Courier', :size=>10)
-table.tag_configure('s', :font=>courier, :justify=>:center)
-
-logo = TkPhotoImage.new(:file=>File.join(File.dirname(File.expand_path(__FILE__)), 'tcllogo.gif'))
-table.tag_configure('logo', :image=>logo, :showtext=>true)
-table.tag_cell('logo', [1,2], [2,3], [4,1])
-table.tag_cell('dis', [2,1], [1,-1], [3,0])
-table.set_width([-2,8], [-1,9], [0, 12], [4, 14])
-
-table.set([1,1], "multi-line\ntext\nmight be\ninteresting",
- [3,2], "more\nmulti-line\nplaying\n",
- [2,2], "null\0byte")
-
-# This is in the row span
-l = TkLabel.new(table, :text=>'Window s', :bg=>'yellow')
-table.window_configure([6,0], :sticky=>:s, :window=>l)
-
-# This is in the row titles
-l = TkLabel.new(table, :text=>'Window ne', :bg=>'yellow')
-table.window_configure([4,-1], :sticky=>:ne, :window=>l)
-
-# This will get swallowed by a span
-l = TkLabel.new(table, :text=>'Window ew', :bg=>'yellow')
-table.window_configure([5,3], :sticky=>:ew, :window=>l)
-
-# This is in the col titles
-l = TkLabel.new(table, :text=>'Window news', :bg=>'yellow')
-table.window_configure([-5,1], :sticky=>:news, :window=>l)
-
-l = TkLabel.new(table.winfo_parent, :text=>'Sibling l', :bg=>'orange')
-table.window_configure([5,1], :sticky=>:news, :window=>l)
-
-if table.span_list.empty?
- table.set_spans([-1,-2], [0,3], [1,2], [0,5], [3,2], [2,2], [6,0], [4,0])
-end
-
-puts "Table is #{table.path} with array #{(table['variable'])}"
-
-# table.postscript(:file=>'out.ps', :first=>:origin, :last=>[2,2])
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tktable/dynarows.rb b/ext/tk/sample/tkextlib/tktable/dynarows.rb
deleted file mode 100644
index ae3349daba..0000000000
--- a/ext/tk/sample/tkextlib/tktable/dynarows.rb
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-##
-## dynarows.rb
-##
-## This demos shows the use of the validation mechanism of the table
-## and uses the table's cache (no -command or -variable) with a cute
-## dynamic row routine.
-##
-## ( based on 'dynarows.tcl' included source archive of tktable extension )
-##
-require 'tk'
-require 'tkextlib/tktable'
-
-def table_validate(w, idx)
- return unless idx =~ /^(\d+),(\d+)$/
- row = Integer($1)
- col = Integer($2)
- val = w.get(idx)
-
- [w, idx]
- nrows = w[:rows]
- return if row == nrows - 1 && val == ''
-
- begin
- time = Tk.tk_call('clock', 'scan', val)
- date = []
- Tk.tk_call('clock', 'format', time,
- :format=>'%m %d %Y').split(' ').each{|item|
- date << item.sub(/^\s*0*/,'')
- }
- w.set(idx, date.join('/'))
- if row == nrows - 1
- if w.get([row,1]) != '' && w.get([row,2]) != ''
- w.tag_row_reset(row)
- w.set([row,0], row)
- nrows += 1
- row += 1
- w.configure(:rows=>nrows)
- w.tag_row('unset', row)
- w.set([row,0], '*')
- w.see([row,1])
- w.activate([row,1])
- end
- end
- rescue
- Tk.bell
- w.activate(idx)
- w.selection_clear_all
- w.selection_set(:active)
- w.see(:active)
- end
-end
-
-
-lbl = TkLabel.new(:text=>"Dynamic Date Validated Rows")
-
-table = Tk::TkTable.new(:rows=>2, :cols=>3, :cache=>1, :selecttype=>:row,
- :titlerows=>1, :titlecols=>1, :height=>5,
- :colstretch=>:unset, :rowstretch=>:unset,
- :autoclear=>true,
- :browsecommand=>[
- proc{|w,s| table_validate(w, s)},
- '%W %s'
- ])
-table.set([0,1], 'Begin', [0,2], 'End', [1,0], '*')
-table.tag_configure('unset', :fg=>'#008811')
-table.tag_configure('title', :fg=>'red')
-table.tag_row('unset', 1)
-table.set_width(0,3)
-
-sx = table.xscrollbar(TkScrollbar.new)
-sy = table.yscrollbar(TkScrollbar.new)
-
-Tk.grid(lbl, '-', :sticky=>:ew)
-Tk.grid(table, sy, :sticky=>:news)
-Tk.grid(sx, :sticky=>:ew)
-
-Tk.root.grid_columnconfig(0, :weight=>1)
-Tk.root.grid_rowconfig(1, :weight=>1)
-
-rtn_proc = proc{|w|
- r = w.row_index(:active)
- c = w.col_index(:active)
-
- if c == 2
- r += 1
- w.activate([r,1])
- else
- c += 1
- w.activate([r,c])
- end
- w.see(:active)
- Tk.callback_break
-}
-
-table.bind('Return', rtn_proc, '%W')
-table.bind('KP_Enter', rtn_proc, '%W')
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tktable/maxsize.rb b/ext/tk/sample/tkextlib/tktable/maxsize.rb
deleted file mode 100644
index 51aa619126..0000000000
--- a/ext/tk/sample/tkextlib/tktable/maxsize.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-##
-## maxsize.rb
-##
-## This demo uses a really big table. The big startup time is in
-## filling the table's Tcl array var.
-##
-## ( based on 'maxsize.tcl' included source archive of tktable extension )
-##
-require 'tk'
-require 'tkextlib/tktable'
-
-ary = TkVariable.new_hash
-rows = 40000
-cols = 10
-
-# fill table variable
-((-(rows))..rows).each{|x|
- ((-(cols))..cols).each{|y|
- ary[x,y] = "#{x},#{y}"
- }
-}
-
-lbl = TkLabel.new(:text=>"TkTable v2 Example")
-
-table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :variable=>ary,
- :width=>6, :height=>8,
- :titlerows=>1, :titlecols=>1,
- :coltagcommand=>proc{|col|
- col = Integer(col)
- (col>0 && col%2 == 1)? 'OddCol': ''
- },
- :selectmode=>:extended,
- :colstretch=>:unset, :rowstretch=>:unset,
- :selecttitles=>false, :drawmode=>:slow)
-
-sx = table.xscrollbar(TkScrollbar.new)
-sy = table.yscrollbar(TkScrollbar.new)
-
-btn = TkButton.new(:text=>'Exit', :command=>proc{exit})
-
-Tk.grid(lbl, '-', :sticky=>:ew)
-Tk.grid(table, sy, :sticky=>:news)
-Tk.grid(sx, :sticky=>:ew)
-Tk.grid(btn, :sticky=>:ew, :columnspan=>2)
-
-Tk.root.grid_columnconfig(0, :weight=>1)
-Tk.root.grid_rowconfig(1, :weight=>1)
-
-table.tag_configure('OddCol', :bg=>'brown', :fg=>'pink')
-table.tag_configure('title', :bg=>'red', :fg=>'blue', :relief=>:sunken)
-table.tag_configure('dis', :state=>:disabled)
-
-first = table[:colorigin]
-%w(n s e w nw ne sw se c).each_with_index{|anchor, idx|
- table.tag_configure(anchor, :anchor=>anchor)
- table.tag_row(anchor, idx)
- table.set([idx,first], anchor)
-}
-courier = TkFont.new(:family=>'Courier', :size=>10)
-table.tag_configure('s', :font=>courier, :justify=>:center)
-
-table.set_width([-2, 8], [-1, 9], [0, 12], [4, 14])
-
-puts "Table is #{table.path} with array #{(table['variable'])}"
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tktable/spreadsheet.rb b/ext/tk/sample/tkextlib/tktable/spreadsheet.rb
deleted file mode 100644
index a801045d41..0000000000
--- a/ext/tk/sample/tkextlib/tktable/spreadsheet.rb
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-##
-## spreadsheet.rb
-##
-## This demos shows how you can simulate a 3D table
-## and has other basic features to begin a basic spreadsheet
-##
-## ( based on 'spreadsheet.tcl' included source archive of tktable extension )
-##
-require 'tk'
-require 'tkextlib/tktable'
-
-rows = 10
-cols = 10
-cur_var = TkVariable.new
-table_list = Hash.new{|hash, key| hash[key] = TkVariable.new_hash}
-page = TkVariable.new('AA')
-color = Hash.new('pink')
-color['AA'] = 'orange'
-color['BB'] = 'blue'
-color['CC'] = 'green'
-
-def colorize(num)
- num = Integer(num)
- return 'colored' if (num > 0 && num % 2 == 1)
-end
-
-def fill_table(tbl_list, page, r=10, c=10)
- ary = tbl_list[page]
-
- (0...r).each{|i|
- (0...c).each{|j|
- if i!=0 && j!=0
- ary[i,j] = "#{page} #{i},#{j}"
- elsif i!=0
- ary[i,j] = i.to_s
- else
- ary[i,j] = (64+j).chr
- end
- }
- }
-end
-
-def changepage(tbl_list, tbl, ent, col, var, elem, op)
- if elem != ''
- page = var[elem]
- else
- page = var.value
- end
- if tbl[:variable] != tbl_list[page].id
- tbl.selection_clear_all
- tbl.variable(tbl_list[page])
- ent.textvariable(tbl_list[page].ref('active'))
- tbl.activate('origin')
- tbl.tag_configure('colored', :bg=>col[page])
- tbl.see('active')
- end
-end
-
-lbl = TkLabel.new(:text=>"TkTable v1 Spreadsheet Example")
-
-current = TkLabel.new(:textvariable=>cur_var, :width=>5)
-entry = TkEntry.new(:textvariable=>table_list[page.value].ref('active'))
-lpage = TkLabel.new(:text=>'PAGE:', :width=>6, :anchor=>:e)
-optmenu = TkOptionMenubutton.new(page, *(%w(AA BB CC DD)))
-
-fill_table(table_list, page.value)
-fill_table(table_list, 'BB', Integer(rows/2), Integer(cols/2))
-
-table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :width=>5, :height=>5,
- :variable=>table_list[page.value],
- :titlerows=>1, :titlecols=>1,
- :coltagcommand=>proc{|n| colorize(n)},
- :flashmode=>true, :selectmode=>:extended,
- :colstretch=>:unset, :rowstretch=>:unset,
- :browsecommand=>proc{|e| cur_var.value = e.new_index})
-
-page.trace(:w, proc{|var, elem, op|
- changepage(table_list, table, entry, color, var, elem, op)
- })
-
-table.tag_configure('colored', :bg=>color[page.value])
-table.tag_configure('title', :fg=>'red', :relief=>:groove)
-table.tag_configure('blue', :bg=>'blue')
-table.tag_configure('green', :bg=>'green')
-
-table.tag_cell('green', [6,3], [5,7], [4,9])
-table.tag_cell('blue', [8,8])
-table.tag_row('blue', 7)
-table.tag_col('blue', 6, 8)
-table.set_width([0, 3], [2, 7])
-
-sx = table.xscrollbar(TkScrollbar.new)
-sy = table.yscrollbar(TkScrollbar.new)
-
-btn = TkButton.new(:text=>'Exit', :command=>proc{exit})
-
-Tk.grid(lbl, '-', '-', '-', '-', :sticky=>:ew)
-Tk.grid(current, entry, lpage, optmenu, '-', :sticky=>:ew)
-Tk.grid(table, '-', '-', '-', sy, :sticky=>:ns)
-Tk.grid(sx, '-', '-', '-', :sticky=>:ew)
-Tk.grid(btn, '-', '-', '-', '-', :sticky=>:ew)
-
-Tk.root.grid_columnconfig(1, :weight=>1)
-Tk.root.grid_rowconfig(2, :weight=>1)
-
-table.grid_configure(:sticky=>:news)
-
-entry.bind('Return', proc{
- r = table.row_index(:active)
- c = table.col_index(:active)
- rmax = table[:rows]
- cmax = table[:cols]
-
- c += 1
- if c == cmax
- c = table[:titlecols]
- r += 1
- if r == rmax
- r = table[:titlerows]
- end
- end
- table.activate([r, c])
- table.see('active')
- })
-
-menu = TkMenu.new
-m_file = TkMenu.new(menu)
-Tk.root.menu(menu)
-menu.add(:cascade, :label=>'File', :underline=>0, :menu=>m_file)
-m_file.add(:command, :label=>'Fill Array',
- :command=>proc{ fill_table(table_list, page.value) })
-m_file.add(:command, :label=>'Quit', :command=>proc{exit})
-
-puts "Table is #{table.path} with array #{(table['variable'])}"
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/tktable/tcllogo.gif b/ext/tk/sample/tkextlib/tktable/tcllogo.gif
deleted file mode 100644
index 4603d4ff41..0000000000
--- a/ext/tk/sample/tkextlib/tktable/tcllogo.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/tktable/valid.rb b/ext/tk/sample/tkextlib/tktable/valid.rb
deleted file mode 100644
index f11e511884..0000000000
--- a/ext/tk/sample/tkextlib/tktable/valid.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-##
-## valid.rb
-##
-## This demos shows the use of the validation mechanism of the table
-## and uses the table's cache (no -command or -variable)
-##
-## ( based on 'valid.tcl' included source archive of tktable extension )
-##
-require 'tk'
-require 'tkextlib/tktable'
-
-rows = 10
-cols = 10
-
-def colorize(num)
- num = Integer(num)
- return 'colored' if (num > 0 && num % 2 == 1)
-end
-
-def fill_headers(w, r=10, c=10)
- (1..(r-1)).each{|i| w.set([i,0], i.to_s)}
-
- (1..(c-1)).each{|j|
- if j % 3 == 1
- w.set([0,j], 'AlphaNum')
- elsif j % 2 == 1
- w.set([0,j], 'Alpha')
- elsif j != 0
- w.set([0,j], 'Real')
- end
- }
-end
-
-def validate_proc(c, val)
- if c % 3 == 1
- # AlphaNum
- regexp = /^[A-Za-z0-9 ]*$/
- elsif c % 2 == 1
- # Alpha
- regexp = /^[A-Za-z ]*$/
- elsif c != 0
- # 'Real'
- regexp = /^[-+]?[0-9]*\.?[0-9]*([0-9]\.?e[-+]?[0-9]*)?$/
- end
- if val =~ regexp
- return true
- else
- Tk.bell
- return false
- end
-end
-
-lbl = TkLabel.new(:text=>"TkTable v1 Validated Table Example")
-
-table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :cache=>1,
- :width=>5, :height=>5, :titlerows=>1, :titlecols=>1,
- :coltagcommand=>proc{|n| colorize(n)},
- :flashmode=>true, :selectmode=>:extended,
- :colstretch=>:unset, :rowstretch=>:unset,
- :validate=>true,
- :validatecommand=>proc{|e|
- unless e.widget.tag_include?('title', e.index)
- validate_proc(e.column, e.new_value)
- end } )
-
-fill_headers(table)
-
-table.tag_configure('colored', :bg=>'lightblue')
-table.tag_configure('title', :fg=>'red')
-table.set_width(0,3)
-
-sx = table.xscrollbar(TkScrollbar.new)
-sy = table.yscrollbar(TkScrollbar.new)
-
-btn = TkButton.new(:text=>'Exit', :command=>proc{exit})
-
-Tk.grid(lbl, '-', :sticky=>:ew)
-Tk.grid(table, sy, :sticky=>:news)
-Tk.grid(sx, :sticky=>:ew)
-Tk.grid(btn, '-', :sticky=>:ew)
-
-Tk.root.grid_columnconfig(0, :weight=>1)
-Tk.root.grid_rowconfig(1, :weight=>1)
-
-puts "Table is #{table.path}"
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/treectrl/bitmaps.rb b/ext/tk/sample/tkextlib/treectrl/bitmaps.rb
deleted file mode 100644
index a42e7ac541..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/bitmaps.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-# frozen_string_literal: false
-#
-# Demo: Bitmaps
-#
-def demoBitmaps(t)
- #if $Version_1_1_OrLater
- if @has_bgimg
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :selectmode=>:browse, :orient=>:horizontal, :wrap=>'5 items',
- :showheader=>false, :backgroundimage=>@images['sky'])
- else
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :selectmode=>:browse, :orient=>:horizontal, :wrap=>'5 items',
- :showheader=>false)
- end
-
- if $HasColumnCreate
- t.column_create(:itembackground=>['gray90', []])
- else
- t.column_configure(0, :itembackground=>['gray90', []])
- end
-
- t.element_create('elemTxt', :text,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('elemSelTxt', :rect, :showfocus=>true,
- :fill=>[@SystemHighlight, ['selected', 'focus']])
- t.element_create('elemSelBmp', :rect, :outlinewidth=>4,
- :outline=>[@SystemHighlight, ['selected', 'focus']])
- t.element_create('elemBmp', :bitmap,
- :foreground=>[@SystemHighlight, ['selected', 'focus']],
- :background=>'linen',
- :bitmap=>['question' ['selected']])
-
- s = t.style_create('STYLE', :orient=>:vertical)
- t.style_elements(s, ['elemSelBmp', 'elemBmp', 'elemSelTxt', 'elemTxt'])
- t.style_layout(s, 'elemSelBmp', :union=>'elemBmp', :ipadx=>6, :ipady=>6)
- t.style_layout(s, 'elemBmp', :pady=>[0, 6], :expand=>:we)
- t.style_layout(s, 'elemSelTxt', :union=>'elemTxt', :ipadx=>2)
- t.style_layout(s, 'elemTxt', :expand=>:we)
-
- # Set default item style
- if $Version_1_1_OrLater
- t.defaultstyle = [s]
- end
-
- bitmap_names = %w(error gray75 gray50 gray25 gray12
- hourglass info questhead question warning)
-
- bitmap_names.each{|name|
- i = t.item_create
- unless $Version_1_1_OrLater
- t.item_style_set(i, 0, s)
- end
- t.item_text(i, 0, name)
- t.item_element_configure(i, 0, 'elemBmp', :bitmap=>name)
- t.item_lastchild(:root, i)
- }
-
- bitmap_names.each{|name|
- i = t.item_create
- t.item_style_set(i, 0, s)
- t.item_text(i, 0, name)
- if true
- t.item_element_configure(i, 0, 'elemBmp', :bitmap=>name,
- :foreground=>['brown', ''],
- :background=>['', ''])
- else
- t.item_element_configure(i, 0, 'elemBmp', :bitmap=>name,
- :foreground=>[
- @SystemHighlight, ['selected', 'focus'],
- 'brown', []
- ],
- :background=>['', []])
- end
- t.item_lastchild(:root, i)
- }
-end
diff --git a/ext/tk/sample/tkextlib/treectrl/demo.rb b/ext/tk/sample/tkextlib/treectrl/demo.rb
deleted file mode 100644
index cd277cf2a9..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/demo.rb
+++ /dev/null
@@ -1,1306 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/treectrl'
-
-$ScriptDir = File.dirname(File.expand_path(__FILE__))
-
-$HasColumnCreate = Tk::TreeCtrl::HasColumnCreateCommand
-
-$Version_1_1_OrLater = (TkPackage.vcompare(Tk::TreeCtrl.package_version, '1.1') >= 0)
-
-#if Hash.instance_methods.include?(:key)
-if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
- # ruby 1.9.x --> use Hash#key
- # Because Hash#index show warning "Hash#index is deprecated; use Hash#key".
-else
- # ruby 1.8.x --> use Hash#index
- class Hash
- alias key index
- end
-end
-
-class TkTreeCtrl_demo
- def initialize(dir)
- @ScriptDir = dir || '.'
-
- @thisPlatform = Tk::PLATFORM['platform']
- if @thisPlatform == 'unix' && Tk.windowingsystem == 'aqua'
- @thisPlatform = 'macosx'
- end
-
- @RandomN = [500]
-
- @images = Hash.new
- @sel_images = Hash.new
-
- @popup = Hash.new
- @mTree = Hash.new
- @mHeader = Hash.new
-
- @non_clear_list = []
-
- @demoCmd = Hash.new
- @demoFile = Hash.new
-
- # Get default colors
- w = TkListbox.new
- @SystemButtonFace = w[:highlightbackground]
- @SystemHighlight = w[:selectbackground]
- @SystemHighlightText = w[:selectforeground]
- w.destroy
-
- ####################
-
- make_source_window()
- make_menubar()
- make_main_window()
-
- if $Version_1_1_OrLater
- begin
- @tree2[:backgroundimage]
- @has_bgimg = true
- rescue
- @has_bgimg = false
- end
- else
- @has_bgimg = false
- end
-
- ####################
-
- make_list_popup()
- make_header_popup()
-
- init_pics('sky')
-
- ####################
-
- @tree2.bind('ButtonPress-3',
- proc{|w, x, y, rootx, rooty|
- show_list_popup(w, x, y, rootx, rooty)
- }, '%W %x %y %X %Y')
-
- # Allow "scan" bindings
- if @thisPlatform == 'windows'
- @tree2.bind_remove('Control-ButtonPress-3')
- end
-
- ####################
-
- init_demo_scripts_module()
- load_demo_scripts()
- init_demo_list()
-
- ####################
-
- @tree1.notify_bind(@tree1, 'Selection',
- proc{|c, t|
- if c == 1
- item = t.selection_get[0]
- demo_set(@demoCmd[item], @demoFile[item])
- end
- }, '%c %T')
-
- # When one item is selected in the demo list, display the styles in
- # that item.
- # See DemoClear for why the tag "DontDelete" is used
- @tree2.notify_bind('DontDelete', 'Selection',
- proc{|c, t|
- display_styles_in_item(t.selection_get[0]) if c == 1
- }, '%c %T')
- end
-
- ##########################
-
- def init_pics(*args)
- args.each{|pat|
- unless TkImage.names.find{|img| (name = @images.key(img)) && File.fnmatch(pat, name)}
- Dir.glob(File.join(@ScriptDir, 'pics', "#{pat}.gif")).each{|file|
- name = File.basename(file, '.gif')
- img = TkPhotoImage.new(:file=>file)
- @images[name] = img
- @sel_images[name] = TkPhotoImage.new
- @sel_images[name].copy(img)
- Tk::TreeCtrl.image_tint(@sel_images[name], @SystemHighlight, 128)
- }
- end
- }
- end
-
- ##########################
-
- private
-
- def make_menubar
- menuspec = [
- [['File']]
- ]
- if Tk::PLATFORM['platform'] != 'unix'
- TkConsole.create
- TkConsole.eval('.console conf -height 8')
- menuspec[0] << ['Console', proc{
- if TkComm.bool(TkConsole.eval('winfo ismapped .'))
- TkConsole.hide
- else
- TkConsole.show
- end
- }]
- end
- menuspec[0] << ['View Source', proc{toggle_source_window()}]
- menuspec[0] << ['Quit', proc{exit}]
- Tk.root.add_menubar(menuspec)
- end
-
- def make_source_window
- @src_top = TkToplevel.new
- f = TkFrame.new(@src_top, :borderwidth=>0)
- case @thisPlatform
- when 'unix'
- font = TkFont.new(['Courier', -12])
- else
- font = TkFont.new(['Courier', 9])
- end
-
- @src_txt = TkText.new(f, :font=>font, :tabs=>font.measure('1234'),
- :wrap=>:none)
- xscr = @src_txt.xscrollbar(TkScrollbar.new(f))
- yscr = @src_txt.yscrollbar(TkScrollbar.new(f))
-
- f.pack(:expand=>true, :fill=>:both)
- f.grid_columnconfigure(0, :weight=>1)
- f.grid_rowconfigure(0, :weight=>1)
- @src_txt.grid(:row=>0, :column=>0, :sticky=>:news)
- xscr.grid(:row=>1, :column=>0, :sticky=>:we)
- yscr.grid(:row=>0, :column=>1, :sticky=>:ns)
-
- @src_top.protocol('WM_DELETE_WINDOW', proc{@src_top.withdraw})
- @src_top.geometry('-0+0')
- @src_top.withdraw
- end
-
- def show_source(file)
- @src_top.title("Demo Source: #{file}")
- @src_txt.value = IO.read(File.join(@ScriptDir, file))
- @src_txt.set_insert('1.0')
- end
-
- def toggle_source_window
- if @src_top.winfo_mapped?
- @src_top.withdraw
- else
- @src_top.deiconify
- end
- end
-
- def tree_plus_scrollbars_in_a_frame(parent, h, v)
- f = TkFrame.new(parent, :borderwidth=>1, :relief=>:sunken)
- case @thisPlatform
- when 'unix'
- font = TkFont.new(['Helvetica', -12])
- else
- # There is a bug on my Win98 box with Tk_MeasureChars() and
- # MS Sans Serif 8.
- font = TkFont.new(['MS Sans', 8])
- end
-
- tree = Tk::TreeCtrl.new(f, :highlightthickness=>0,
- :borderwidth=>0, :font=>font)
- tree[:xscrollincrement] = 20
- tree.debug_configure(:enable=>false, :display=>false)
-
- if h
- h_scr = TkScrollbar.new(f, :orient=>:horizontal,
- :command=>proc{|*args| tree.xview(*args)})
- tree.notify_bind(h_scr, 'Scroll-x',
- proc{|w, l, u| w.set(l, u)}, '%W %l %u')
- h_scr.bind('ButtonPress-1', proc{tree.set_focus})
- end
-
- if v
- v_scr = TkScrollbar.new(f, :orient=>:vertical,
- :command=>proc{|*args| tree.yview(*args)})
- tree.notify_bind(v_scr, 'Scroll-y',
- proc{|w, l, u| w.set(l, u)}, '%W %l %u')
- v_scr.bind('ButtonPress-1', proc{tree.set_focus})
- end
-
- f.grid_columnconfigure(0, :weight=>1)
- f.grid_rowconfigure(0, :weight=>1)
- tree.grid(:row=>0, :column=>0, :sticky=>:news)
- h_scr.grid(:row=>1, :column=>0, :sticky=>:we) if h
- v_scr.grid(:row=>0, :column=>1, :sticky=>:ns) if v
-
- [f, tree]
- end
-
- def make_main_window
- Tk.root.title('Tk::TreeCtrl Demo')
-
- case @thisPlatform
- when 'macosx'
- Tk.root.geometry('+40+40')
- else
- Tk.root.geometry('+0+30')
- end
-
- pane1 = TkPanedWindow.new(:orient=>:vertical, :borderwidth=>0)
- pane2 = TkPanedWindow.new(:orient=>:horizontal, :borderwidth=>0)
-
- # Tree + scrollbar: demos
- f1, @tree1 = tree_plus_scrollbars_in_a_frame(nil, false, true)
- @tree1.configure(:showbuttons=>false, :showlines=>:false,
- :showroot=>false, :height=>100)
- if $HasColumnCreate
- @tree1.column_create(:text=>'List of Demos',
- :expand=>true, :button=>false)
- else
- @tree1.column_configure(0, :text=>'List of Demos',
- :expand=>true, :button=>false)
- end
-
- # Tree + scrollbar: styles + elements in list
- f4, @tree4 = tree_plus_scrollbars_in_a_frame(nil, false, true)
- @tree4.configure(:showroot=>false, :height=>140)
- if $HasColumnCreate
- @tree4.column_create(:text=>'Elements and Styles',
- :expand=>true, :button=>false)
- else
- @tree4.column_configure(0, :text=>'Elements and Styles',
- :expand=>true, :button=>false)
- end
-
- # Tree + scrollbar: styles + elements in selected item
- f3, @tree3 = tree_plus_scrollbars_in_a_frame(nil, false, true)
- @tree3.configure(:showroot=>false)
- if $HasColumnCreate
- @tree3.column_create(:text=>'Styles in Item',
- :expand=>true, :button=>false)
- else
- @tree3.column_configure(0, :text=>'Styles in Item',
- :expand=>true, :button=>false)
- end
-
- pane1.add(f1, f4, f3, :height=>150)
- pane1.pack(:expand=>true, :fill=>:both)
-
- # Frame on right
- f2_base = TkFrame.new
-
- # Tree + scrollbars
- f2, @tree2 = tree_plus_scrollbars_in_a_frame(f2_base, true, true)
- @tree2.configure(:indent=>19)
- @tree2.debug_configure(:enable=>false, :display=>true,
- :erasecolor=>'pink', :displaydelay=>30)
-
- # Give it a big border to debug drawing
- @tree2.configure(:borderwidth=>6, :relief=>:ridge, :highlightthickness=>3)
-
- f2_base.grid_columnconfigure(0, :weight=>1)
- f2_base.grid_rowconfigure(0, :weight=>1)
- f2.grid(:row=>0, :column=>0, :sticky=>:news, :pady=>0)
-
- pane2.add(pane1, :width=>200)
- pane2.add(f2_base, :width=>450)
-
- pane2.pack(:expand=>true, :fill=>:both)
-
- ###
- # A treectrl widget can generate the following built-in events:
- # <ActiveItem> called when the active item changes
- # <Collapse-before> called before an item is closed
- # <Collapse-after> called after an item is closed
- # <Expand-before> called before an item is opened
- # <Expand-after> called after an item is opened
- # <Selection> called when items are added to or removed from the selection
- # <Scroll-x> called when horizontal scroll position changes
- # <Scroll-y> called when vertical scroll position changes
- #
- # The application programmer can define custom events to be
- # generated by the "T notify generate" command. The following events
- # are generated by the example bindings.
-
- @tree2.notify_install_event('Header')
- @tree2.notify_install_detail('Header', 'invoke')
-
- @tree2.notify_install_event('Drag')
- @tree2.notify_install_detail('Drag', 'begin')
- @tree2.notify_install_detail('Drag', 'end')
- @tree2.notify_install_detail('Drag', 'receive')
-
- @tree2.notify_install_event('Edit')
- @tree2.notify_install_detail('Edit', 'accept')
- end
-
- def make_list_popup
- @popup[:bgimg] = TkVariable.new
- @popup[:bgmode] = TkVariable.new
- @popup[:debug] = Hash.new{|h, k| h[k] = TkVariable.new}
- @popup[:doublebuffer] = TkVariable.new
- @popup[:linestyle] = TkVariable.new
- @popup[:orient] = TkVariable.new
- @popup[:selectmode] = TkVariable.new
- @popup[:show] = Hash.new{|h, k| h[k] = TkVariable.new}
-
- menuspec = [
- [ 'Collapse', [], nil, '', {:menu_config=>{:tearoff=>false}} ],
-
- [ 'Expand', [], nil, '', {:menu_config=>{:tearoff=>false}} ]
- ]
-
- # if $Version_1_1_OrLater
- if @has_bgimg
- menuspec << \
- [ 'Background Image',
- [
- [ 'none', [@popup[:bgimg], 'none'], nil, '',
- {:command=>proc{@tree2.backgroundimage = ''}} ],
- [ 'sky', [@popup[:bgimg], 'sky'], nil, '',
- {:command=>proc{
- @tree2.backgroundimage = @images[@popup[:bgimg].value]}} ]
- ],
- nil, '', {:menu_config=>{:tearoff=>false}}
- ]
- end
-
- menuspec.concat([
- [ 'Background Mode',
- %w(column index row visindex).collect{|val|
- [ val, [@popup[:bgmode], val] , nil, '',
- {:command=>proc{@tree2.backgroundmode = @popup[:bgmode].value}} ]
- },
- nil, '', {:menu_config=>{:tearoff=>false}}
- ],
-
- [ 'Debug',
- [
- [ 'Data', @popup[:debug][:data], nil, '',
- {:command=>proc{
- @tree2.debug_configure(:data=>@popup[:debug][:data].value)
- }
- } ],
- [ 'Display', @popup[:debug][:display], nil, '',
- {:command=>proc{
- @tree2.debug_configure(:display=>@popup[:debug][:display].value)
- }
- } ],
- [ 'Enable', @popup[:debug][:enable], nil, '',
- {:command=>proc{
- @tree2.debug_configure(:enable=>@popup[:debug][:enable].value)
- }
- } ]
- ],
- nil, '', {:menu_config=>{:tearoff=>false}}
- ],
-
- [ 'Buffering',
- [
- [ 'none', [@popup[:doublebuffer], 'none'], nil, '',
- {:command=>proc{
- @tree2.doublebuffer = @popup[:doublebuffer].value
- }
- } ],
- [ 'item', [@popup[:doublebuffer], 'item'], nil, '',
- {:command=>proc{
- @tree2.doublebuffer = @popup[:doublebuffer].value
- }
- } ],
- [ 'window', [@popup[:doublebuffer], 'window'], nil, '',
- {:command=>proc{
- @tree2.doublebuffer = @popup[:doublebuffer].value
- }
- } ]
- ],
- nil, '', {:menu_config=>{:tearoff=>false}}
- ],
-
- [ 'Line style',
- [
- [ 'dot', [@popup[:linestyle], 'dot'], nil, '',
- {:command=>proc{@tree2.linestyle = @popup[:linestyle].value}} ],
- [ 'solid', [@popup[:linestyle], 'solid'], nil, '',
- {:command=>proc{@tree2.linestyle = @popup[:linestyle].value}} ]
- ],
- nil, '', {:menu_config=>{:tearoff=>false}}
- ],
-
- [ 'Orient',
- [
- [ 'Horizontal', [@popup[:orient], 'horizontal'], nil, '',
- {:command=>proc{@tree2.orient = @popup[:orient].value}} ],
- [ 'Vertical', [@popup[:orient], 'vertical'], nil, '',
- {:command=>proc{@tree2.orient = @popup[:orient].value}} ]
- ],
- nil, '', {:menu_config=>{:tearoff=>false}}
- ],
-
- [ 'Selectmode',
- %w(list browse extended multiple single).collect{|val|
- [ val, [@popup[:selectmode], val] , nil, '',
- {:command=>proc{@tree2.selectmode = @popup[:selectmode].value}} ]
- },
- nil, '', {:menu_config=>{:tearoff=>false}}
- ],
-
- [ 'Show',
- [
- [ 'Buttons', @popup[:show][:buttons], nil, '',
- {:command=>proc{
- @tree2.showbuttons = @popup[:show][:buttons].value
- }
- } ],
- [ 'Header', @popup[:show][:header], nil, '',
- {:command=>proc{
- @tree2.showheader = @popup[:show][:header].value
- }
- } ],
- [ 'Lines', @popup[:show][:lines], nil, '',
- {:command=>proc{
- @tree2.showlines = @popup[:show][:lines].value
- }
- } ],
- [ 'Root', @popup[:show][:root], nil, '',
- {:command=>proc{
- @tree2.showroot = @popup[:show][:root].value
- }
- } ],
- [ 'Root Button', @popup[:show][:rootbutton], nil, '',
- {:command=>proc{
- @tree2.showrootbutton = @popup[:show][:rootbutton].value
- }
- } ]
- ],
- nil, '', {:menu_config=>{:tearoff=>false}}
- ],
-
- [ 'Visible', [], nil, '', {:menu_config=>{:tearoff=>false}} ]
- ])
-
- m = TkMenu.new_menuspec(menuspec, @tree2, false)
- @non_clear_list << m
- @mTree[@tree2] = m
- end
-
- def show_list_popup(w, x, y, rootx, rooty)
- id = w.identify(x, y)
- unless id.empty?
- if id[0] == 'header'
- col = id[1]
- @popup[:column].value = col
- @popup[:arrow].value = w.column_cget(col, :arrow)
- @popup[:arrowside].value = w.column_cget(col, :arrowside)
- @popup[:arrowgravity].value = w.column_cget(col, :arrowgravity)
- @popup[:expand].value = w.column_cget(col, :expand)
- @popup[:squeeze].value = w.column_cget(col, :squeeze)
- @popup[:justify].value = w.column_cget(col, :justify)
- @mHeader[w].popup(rootx, rooty)
- return
- end
- end
-
- m = @mTree[w].entrycget('Collapse', :menu)
- m.delete(0, :end)
- if $Version_1_1_OrLater
- m.add_command(:label=>'All', :command=>proc{w.item_collapse(:all)})
- else
- m.add_command(:label=>'All', :command=>proc{w.collapse(:all)})
- end
- unless id.empty?
- if id[0] == 'item'
- item = id[1]
- if $Version_1_1_OrLater
- m.add_command(:label=>"Item #{item}",
- :command=>proc{w.item_collapse(item)})
- m.add_command(:label=>"Item #{item} (recurse)",
- :command=>proc{w.item_collapse_recurse(item)})
- else
- m.add_command(:label=>"Item #{item}",
- :command=>proc{w.collapse(item)})
- m.add_command(:label=>"Item #{item} (recurse)",
- :command=>proc{w.collapse_recurse(item)})
- end
- end
- end
-
- m = @mTree[w].entrycget('Expand', :menu)
- m.delete(0, :end)
- if $Version_1_1_OrLater
- m.add_command(:label=>'All', :command=>proc{w.item_expand(:all)})
- else
- m.add_command(:label=>'All', :command=>proc{w.expand(:all)})
- end
- unless id.empty?
- if id[0] == 'item'
- item = id[1]
- if $Version_1_1_OrLater
- m.add_command(:label=>"Item #{item}",
- :command=>proc{w.item_expand(item)})
- m.add_command(:label=>"Item #{item} (recurse)",
- :command=>proc{w.item_expand_recurse(item)})
- else
- m.add_command(:label=>"Item #{item}",
- :command=>proc{w.expand(item)})
- m.add_command(:label=>"Item #{item} (recurse)",
- :command=>proc{w.expand_recurse(item)})
- end
- end
- end
-
- [:data, :display, :enable].each{|k|
- @popup[:debug][k].value = w.debug_cget(k)
- }
- # if $Version_1_1_OrLater
- if @has_bgimg
- @popup[:bgimg].value = @images.key(w[:backgroundimage])
- end
- @popup[:bgmode].value = w[:backgroundmode]
- @popup[:doublebuffer].value = w[:doublebuffer]
- @popup[:linestyle].value = w[:linestyle]
- @popup[:orient].value = w[:orient]
- @popup[:selectmode].value = w[:selectmode]
- @popup[:show][:buttons].value = w[:showbuttons]
- @popup[:show][:header].value = w[:showheader]
- @popup[:show][:lines].value = w[:showlines]
- @popup[:show][:root].value = w[:showroot]
- @popup[:show][:rootbutton].value = w[:showrootbutton]
-
- m = @mTree[w].entrycget('Visible', :menu)
- m.delete(0, :end)
- @popup[:visible] = []
- (0...(w.numcolumns)).each{|i|
- @popup[:visible][i] = TkVariable.new(w.column_cget(i, :visible))
- txt = w.column_cget(i, :text)
- img_name = w.column_cget(i, :image)
- img_name = @images.key(img_name) if img_name.kind_of?(TkImage)
- m.add_checkbutton(:variable=>@popup[:visible][i],
- :label=>"Column #{i} \"#{txt}\" [#{img_name}]",
- :command=>proc{w.column_configure(i, :visible=>@popup[:visible][i].value)})
- }
-
- @mTree[w].popup(rootx, rooty)
- end
-
- def make_header_popup
- @popup[:column] = TkVariable.new unless @popup[:column]
- @popup[:arrow] = TkVariable.new
- @popup[:arrowside] = TkVariable.new
- @popup[:arrowgravity] = TkVariable.new
- @popup[:expand] = TkVariable.new
- @popup[:squeeze] = TkVariable.new
- @popup[:justify] = TkVariable.new
-
- menuspec = [
- [ 'Arrow',
- [
- [ 'None', [@popup[:arrow], 'none'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value, :arrow=>:none)
- }
- } ],
- [ 'Up', [@popup[:arrow], 'up'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value, :arrow=>:up)
- }
- } ],
- [ 'Down', [@popup[:arrow], 'down'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value, :arrow=>:down)
- }
- } ],
-
- '---',
-
- [ 'Side Left', [@popup[:arrowside], 'left'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value,
- :arrowside=>:left)
- }
- } ],
- [ 'Side Right', [@popup[:arrowside], 'right'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value,
- :arrowside=>:right)
- }
- } ],
-
- '---',
-
- [ 'Gravity Left', [@popup[:arrowgravity], 'left'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value,
- :arrowgravity=>:left)
- }
- } ],
- [ 'Gravity Right', [@popup[:arrowgravity], 'right'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value,
- :arrowgravity=>:right)
- }
- } ],
- ],
- nil, '', {:menu_config=>{:tearoff=>false}} ],
-
- [ 'Expand', @popup[:expand], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value,
- :expand=>@popup[:expand].value)
- }
- } ],
-
- [ 'Squeeze', @popup[:squeeze], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value,
- :squeeze=>@popup[:squeeze].value)
- }
- } ],
-
- [ 'Justify',
- [
- [ 'Left', [@popup[:justify], 'left'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value, :justify=>:left)
- }
- } ],
- [ 'Center', [@popup[:justify], 'center'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value,
- :justify=>:center)
- }
- } ],
- [ 'Right', [@popup[:justify], 'right'], nil, '',
- {:command=>proc{
- @tree2.column_configure(@popup[:column].value,
- :justify=>:right)
- }
- } ]
- ],
- nil, '', {:menu_config=>{:tearoff=>false}} ]
- ]
-
- m = TkMenu.new_menuspec(menuspec, @tree2, false)
- @non_clear_list << m
- @mHeader[@tree2] = m
- end
-
- ###########################
-
- def init_demo_scripts_module
- @demo_scripts = Module.new
-
- master = self
-
- has_bgimg = @has_bgimg
-
- scriptDir = @ScriptDir
-
- thisPlatform = @thisPlatform
-
- randomN = @RandomN
-
- images = @images
- sel_images = @sel_images
-
- systemButtonFace = @SystemButtonFace
- systemHighlight = @SystemHighlight
- systemHighlightText = @SystemHighlightText
-
- def master._pub_display_styles_in_item(item)
- display_styles_in_item(item)
- end
- proc_disp_styles_in_item = proc{|item|
- master._pub_display_styles_in_item(item)
- }
-
- @demo_scripts.instance_eval{
- @master = master
-
- @has_bgimg = has_bgimg
-
- @display_styles_in_item = proc_disp_styles_in_item
-
- @Priv = TkVarAccess.new('::TreeCtrl::Priv')
-
- @ScriptDir = scriptDir
-
- @thisPlatform = thisPlatform
-
- @RandomN = randomN
-
- @images = images
- @sel_images = sel_images
-
- @SystemButtonFace = systemButtonFace
- @SystemHighlight = systemHighlight
- @SystemHighlightText = systemHighlightText
- }
-
- class << @demo_scripts
- def _get_binding
- binding
- end
- private :_get_binding
-
- def load_demo(file)
- puts "load \"#{file}\"" if $DEBUG
- begin
- eval(IO.readlines(file).join, _get_binding())
- rescue Exception => e
- bt = e.backtrace
-
- if bt[0] =~ /^([^:]+):(\d+):/
- errline = $2.to_i
- else
- raise e
- end
-
- if bt[1] =~ /^([^:]+):(\d+):/
- bt.unshift("#{file}:#{errline - $2.to_i + 1}")
- raise e
- else
- raise e
- end
- end
- end
-
- def init_pics(*args)
- @master.init_pics(*args)
- end
- end
- end
-
- def load_demo_scripts
- # demo sources
- [
- 'bitmaps',
- 'explorer',
- 'help',
- 'imovie',
- 'layout',
- 'mailwasher',
- 'outlook-folders',
- 'outlook-newgroup',
- 'random',
- 'www-options'
- ].each{|f|
- @demo_scripts.load_demo(File.join(@ScriptDir, "#{f}.rb"))
- }
- end
-
- ###########################
-
- def init_demo_list
- @tree1.element_create('e1', :text,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- @tree1.element_create('e2', :rect, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus'],
- ])
- @tree1.style_create('s1')
- @tree1.style_elements('s1', ['e2', 'e1'])
-
- # Tk listbox has linespace + 1 height
- @tree1.style_layout('s1', 'e2', :union=>['e1'],
- :ipadx=>2, :ipady=>[0, 1], :iexpand=>:e)
-
- if $Version_1_1_OrLater
- @tree1.defaultstyle = 's1'
- end
-
- ###
- [
- ["Random #{@RandomN[0]} Items", :demoRandom, 'random.rb'],
- ["Random #{@RandomN[0]} Items, Button Images", :demoRandom2, 'random.rb'],
- ["Outlook Express (Folders)", :demoOutlookFolders, 'outlook-folders.rb'],
- ["Outlook Express (Newsgroup)", :demoOutlookNewsgroup, 'outlook-newgroup.rb'],
- ["Explorer (Details)", :demoExplorerDetails, 'explorer.rb'],
- ["Explorer (List)", :demoExplorerList, 'explorer.rb'],
- ["Explorer (Large icons)", :demoExplorerLargeIcons, 'explorer.rb'],
- ["Explorer (Small icons)", :demoExplorerSmallIcons, 'explorer.rb'],
- ["Internet Options", :demoInternetOptions, 'www-options.rb'],
- ["Help Contents", :demoHelpContents, 'help.rb'],
- ["Layout", :demoLayout, 'layout.rb'],
- ["MailWasher", :demoMailWasher, 'mailwasher.rb'],
- ["Bitmaps", :demoBitmaps, 'bitmaps.rb'],
- ["iMovie", :demoIMovie, 'imovie.rb']
- ].each{|label, cmd, file|
- item = @tree1.item_create
- @tree1.item_lastchild(:root, item)
- unless $Version_1_1_OrLater
- @tree1.item_style_set(item, 0, 's1')
- end
- @tree1.item_text(item, 0, label)
- @demoCmd[item] = cmd
- @demoFile[item] = file
- }
-
- @tree1.yview_moveto(0.0)
- end
-
- def demo_set(cmd, file)
- demo_clear()
- clicks = Tk::Clock.clicks
- @demo_scripts.__send__(cmd, @tree2)
- clicks = Tk::Clock.clicks - clicks
- puts "set list in #{'%.2g'%(clicks/1000000.0)} seconds (#{clicks} clicks)"
- @tree2.xview_moveto(0)
- @tree2.yview_moveto(0)
- Tk.update
- display_styles_in_list()
- show_source(file)
- end
-
- def display_styles_in_list
- # Create elements and styles the first time this is called
- if @tree4.style_names.empty?
- @tree4.element_create('e1', :text,
- :fill=>[@SystemHighlightText,['selected','focus']])
- @tree4.element_create('e2', :text,
- :fill=>[
- @SystemHighlightText, ['selected','focus'],
- '', ['selected','!focus'],
- 'blue', []
- ])
- @tree4.element_create('e3', :rect, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected','focus'],
- 'gray', ['selected', '!focus']
- ])
-
- @tree4.style_create('s1')
- @tree4.style_elements('s1', ['e3', 'e1'])
- @tree4.style_layout('s1', 'e3', :union=>['e1'], :ipadx=>1, :ipady=>[0,1])
-
- @tree4.style_create('s2')
- @tree4.style_elements('s2', ['e3', 'e1', 'e2'])
- @tree4.style_layout('s2', 'e1', :padx=>[0,4])
- @tree4.style_layout('s2', 'e3', :union=>['e1', 'e2'],
- :ipadx=>1, :ipady=>[0,1])
- end
-
- # Clear the list
- @tree4.item_delete(:all)
-
- # One item for each element in the demo list
- @tree2.element_names.sort.each{|elem|
- if $Version_1_1_OrLater
- item = @tree4.item_create(:button=>true)
- @tree4.item_collapse(item)
- else
- item = @tree4.item_create
- @tree4.item_hasbutton(item, true)
- @tree4.collapse(item)
- end
- @tree4.item_style_set(item, 0, 's1')
- @tree4.item_text(item, 0,
- "Element #{elem} (#{@tree2.element_type(elem)})")
-
- # One item for each configuration option for this element
- @tree2.element_configinfo(elem).each{|name, x, y, default, current|
- item2 = @tree4.item_create
-
- if default == current
- @tree4.item_style_set(item2, 0, 's1')
- @tree4.item_complex(item2, [
- ['e1', {:text=>"#{name} #{current.inspect}"}]
- ])
- else
- @tree4.item_style_set(item2, 0, 's2')
- @tree4.item_complex(item2, [
- ['e1', {:text=>name}],
- ['e2', {:text=>current.inspect}]
- ])
- end
-
- @tree4.item_lastchild(item, item2)
- }
-
- @tree4.item_lastchild(:root, item)
- }
-
- # One item for each style in the demo list
- @tree2.style_names.sort.each{|sty|
- if $Version_1_1_OrLater
- item = @tree4.item_create(:button=>true)
- @tree4.item_collapse(item)
- else
- item = @tree4.item_create
- @tree4.item_hasbutton(item, true)
- @tree4.collapse(item)
- end
- @tree4.item_style_set(item, 0, 's1')
- @tree4.item_text(item, 0, "Style #{sty}")
-
- # One item for each element in the style
- @tree2.style_elements(sty).each{|elem|
- if $Version_1_1_OrLater
- item2 = @tree4.item_create(:button=>true)
- @tree4.item_collapse(item2)
- else
- item2 = @tree4.item_create
- @tree4.item_hasbutton(item2, true)
- @tree4.collapse(item2)
- end
- @tree4.item_style_set(item2, 0, 's1')
- @tree4.item_text(item2, 0,
- "Element #{elem} (#{@tree2.element_type(elem)})")
-
- # One item for each layout option for this element in this style
- @tree2.style_layout(sty, elem).each{|k, v|
- item3 = @tree4.item_create
- unless $Version_1_1_OrLater
- @tree4.item_hasbutton(item3, false)
- end
- @tree4.item_style_set(item3, 0, 's1')
- @tree4.item_text(item3, 0, "#{k} #{v.inspect}")
- @tree4.item_lastchild(item2, item3)
- }
-
- @tree4.item_lastchild(item, item2)
- }
-
- @tree4.item_lastchild(:root, item)
- }
-
- @tree4.xview_moveto(0)
- @tree4.yview_moveto(0)
- end
-
- def display_styles_in_item(item)
- @tree3.column_configure(0, :text=>"Styles in item #{@tree2.index(item)}")
-
- # Create elements and styles the first time this is called
- if @tree3.style_names.empty?
- @tree3.element_create('e1', :text,
- :fill=>[@SystemHighlightText,['selected','focus']])
- @tree3.element_create('e2', :text,
- :fill=>[
- @SystemHighlightText, ['selected','focus'],
- '', ['selected','!focus'],
- 'blue', []
- ])
- @tree3.element_create('e3', :rect, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected','focus'],
- 'gray', ['selected', '!focus']
- ])
-
- @tree3.style_create('s1')
- @tree3.style_elements('s1', ['e3', 'e1'])
- @tree3.style_layout('s1', 'e3', :union=>['e1'], :ipadx=>1, :ipady=>[0,1])
-
- @tree3.style_create('s2')
- @tree3.style_elements('s2', ['e3', 'e1', 'e2'])
- @tree3.style_layout('s2', 'e1', :padx=>[0,4])
- @tree3.style_layout('s2', 'e3', :union=>['e1', 'e2'],
- :ipadx=>1, :ipady=>[0,1])
- end
- # Clear the list
- @tree3.item_delete(:all)
-
- # One item for each item-column
- column = 0
- @tree2.item_style_set(item).each{|sty|
- item2 = @tree3.item_create
- if $Version_1_1_OrLater
- @tree3.item_collapse(item2)
- else
- @tree3.collapse(item2)
- end
- @tree3.item_style_set(item2, 0, 's1')
- @tree3.item_element_configure(item2, 0, 'e1',
- :text=>"Column #{column}: Style #{sty}")
-
- button = false
-
- # One item for each element in this style
- unless sty.to_s.empty?
- @tree2.item_style_elements(item, column).each{|elem|
- button = true
- if $Version_1_1_OrLater
- item3 = @tree3.item_create(:button=>true)
- else
- item3 = @tree3.item_create
- @tree3.item_hasbutton(item3, true)
- end
- if $Version_1_1_OrLater
- @tree3.item_collapse(item3)
- else
- @tree3.collapse(item3)
- end
- @tree3.item_style_set(item3, 0, 's1')
- @tree3.item_element_configure(item3, 0, 'e1',
- :text=>"Element #{elem} (#{@tree2.element_type(elem)})")
-
- # One item for each configuration option in this element
- @tree2.item_element_configinfo(item, column, elem) \
- .each{|name, x, y, default, current|
- item4 = @tree3.item_create
- masterDefault = @tree2.element_cget(elem, name)
- sameAsMaster = (masterDefault == current)
- if !sameAsMaster && current == ''
- sameAsMaster = true
- current = masterDefault
- end
-
- if sameAsMaster
- @tree3.item_style_set(item4, 0, 's1')
- @tree3.item_complex(item4, [
- ['e1',
- {:text=>"#{name} #{current.inspect}"}]
- ])
- else
- @tree3.item_style_set(item4, 0, 's2')
- @tree3.item_complex(item4, [
- ['e1', {:text=>name}],
- ['e2', {:text=>current.inspect}]
- ])
- end
- @tree3.item_lastchild(item3, item4)
- }
- @tree3.item_lastchild(item2, item3)
- }
- if $Version_1_1_OrLater
- @tree3.item_configure(item2, :button=>true) if button
- else
- @tree3.item_hasbutton(item2, true) if button
- end
- end
- @tree3.item_lastchild(:root, item2)
- column += 1
- }
-
- @tree3.xview_moveto(0)
- @tree3.yview_moveto(0)
- end
-
- def demo_clear
- # Clear the demo list
- @tree2.item_delete(:all)
-
- # Clear all bindings on the demo list added by the previous demo.
- # This is why DontDelete is used for the <Selection> binding.
- @tree2.notify_bindinfo(@tree2).each{|ev|
- @tree2.notify_bind_remove(@tree2, ev)
- }
-
- # Clear all run-time states
- @tree2.state_names.each{|st| @tree2.state_undefine(st) }
-
- # Clear the styles-in-item list
- @tree3.item_delete(:all)
-
- # Delete columns in demo list
- while (@tree2.numcolumns > 0)
- @tree2.column_delete(0)
- end
-
- # Delete all styles in demo list
- @tree2.style_delete(*(@tree2.style_names))
-
- # Delete all elements in demo list
- @tree2.element_delete(*(@tree2.element_names))
-
- if $Version_1_1_OrLater
- @tree2.item_configure(:root, :button=>false)
- @tree2.item_expand(:root)
- else
- @tree2.item_hasbutton(:root, false)
- @tree2.expand(:root)
- end
-
- # Restore some happy defaults to the demo list
- # if $Version_1_1_OrLater
- if @has_bgimg
- @tree2.configure(:orient=>:vertical, :wrap=>'',
- :xscrollincrement=>0, :yscrollincrement=>0,
- :itemheight=>0, :showheader=>true,
- :background=>'white', :scrollmargin=>0,
- :xscrolldelay=>50, :yscrolldelay=>50,
- :openbuttonimage=>'', :closedbuttonimage=>'',
- :backgroundmode=>:row, :treecolumn=>0, :indent=>19,
- :defaultstyle=>'', :backgroundimage=>'')
- else
- @tree2.configure(:orient=>:vertical, :wrap=>'',
- :xscrollincrement=>0, :yscrollincrement=>0,
- :itemheight=>0, :showheader=>true,
- :background=>'white', :scrollmargin=>0,
- :xscrolldelay=>50, :yscrolldelay=>50,
- :openbuttonimage=>'', :closedbuttonimage=>'',
- :backgroundmode=>:row, :treecolumn=>0, :indent=>19)
- end
-
- # Restore default bindings to the demo list
- @tree2.bindtags = [ @tree2, Tk::TreeCtrl, @tree2.winfo_toplevel, :all ]
-
- @tree2.winfo_children.each{|w|
- w.destroy unless @non_clear_list.include?(w)
- }
- end
-end
-
-TkTreeCtrl_demo.new($ScriptDir)
-
-##############################################
-
-def cursor_window(top = nil)
- top.destroy if top.kind_of?(TkWindow) && top.winfo_exist?
- top = TkToplevel.new(:title=>'Cursor Window')
-
- c = TkCanvas.new(top, :background=>'white',
- :width=>50*10, :highlightthickness=>0,
- :borderwidth=>0).pack(:expand=>true, :fill=>:both)
- cursors = %w(
- X_cursor
- arrow
- based_arrow_down
- based_arrow_up
- boat
- bogosity
- bottom_left_corner
- bottom_right_corner
- bottom_side
- bottom_tee
- box_spiral
- center_ptr
- circle
- clock
- coffee_mug
- cross
- cross_reverse
- crosshair
- diamond_cross
- dot
- dotbox
- double_arrow
- draft_large
- draft_small
- draped_box
- exchange
- fleur
- gobbler
- gumby
- hand1
- hand2
- heart
- icon
- iron_cross
- left_ptr
- left_side
- left_tee
- leftbutton
- ll_angle
- lr_angle
- man
- middlebutton
- mouse
- pencil
- pirate
- plus
- question_arrow
- right_ptr
- right_side
- right_tee
- rightbutton
- rtl_logo
- sailboat
- sb_down_arrow
- sb_h_double_arrow
- sb_left_arrow
- sb_right_arrow
- sb_up_arrow
- sb_v_double_arrow
- shuttle
- sizing
- spider
- spraycan
- star
- target
- tcross
- top_left_arrow
- top_left_corner
- top_right_corner
- top_side
- top_tee
- trek
- ul_angle
- umbrella
- ur_angle
- watch
- xterm
- )
-
- orig_cursor = c.cursor
- col = 0
- row = 0
-
- cursors.each{|cur|
- x = col * 50
- y = row * 40
-
- begin
- c.cursor = cur
-
- r = TkcRectangle.new(c, x, y, x+50, y+40,
- :fill=>'gray90', :outline=>'black', :width=>2)
- t = TkcText.new(c, x+50/2, y+4, :text=>cur, :anchor=>:n, :width=>42)
-
- col += 1
- if col >= 10
- col = 0
- row += 1
- end
-
- r.bind('Enter', proc{c.cursor = cur; r.fill = 'linen'})
- r.bind('Leave', proc{c.cursor = ''; r.fill = 'gray90'})
-
- t.bind('Enter', proc{c.cursor = cur})
- t.bind('Leave', proc{c.cursor = ''})
- rescue
- c.cursor = orig_cursor
- end
- }
-
- c.cursor = orig_cursor
- c.height = (row + 1) * 40
-end
-
-cursor_window()
-
-##############################################
-
-# A little screen magnifier for X11
-if Tk::PLATFORM['platform'] == 'unix' && Tk.windowingsystem != 'aqua'
- def show_loupe(setting=nil)
- loupe = (setting.kind_of?(Hash))? setting: {}
- loupe[:zoom] = 3 unless loupe[:zoom]
- loupe[:x] = 0 unless loupe[:x]
- loupe[:y] = 0 unless loupe[:y]
- loupe[:auto] = true unless loupe[:auto]
- loupe[:delay] = 500 unless loupe[:delay]
- loupe[:image] =
- TkPhotoImage.new(:width=>150, :height=>150) unless loupe[:image]
-
- top = TkToplevel.new(:geometry=>'-0+30',
- :title=>'A little screen magnifier for X11')
- TkLabel.new(top, :image=>loupe[:image]).pack
-
- TkTimer.new(proc{loupe[:delay]}, -1, proc{
- x, y = TkWinfo.pointerxy(Tk.root)
- if loupe[:auto] || loupe[:x] != x || loupe[:y] != y
- w = loupe[:image].width
- h = loupe[:image].height
- Tk::TreeCtrl.loupe(loupe[:image], x, y, w, h, loupe[:zoom])
- loupe[:x] = x
- loupe[:y] = y
- end
- }).start
- end
-
- show_loupe()
-end
-
-##############################################
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/treectrl/explorer.rb b/ext/tk/sample/tkextlib/treectrl/explorer.rb
deleted file mode 100644
index 3b54bf269c..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/explorer.rb
+++ /dev/null
@@ -1,431 +0,0 @@
-# frozen_string_literal: false
-
-def demoExplorerAux(t, dir_proc, file_proc)
- base_dir = File.dirname(File.dirname(@ScriptDir))
-
- clicks = Tk::Clock.clicks
- globDirs = Dir.glob(File.join(base_dir, '*')).find_all{|file|
- FileTest.directory?(file)
- }
- clickGlobDirs = Tk::Clock.clicks - clicks
-
- clicks = Tk::Clock.clicks
- list = globDirs.sort
- clickSortDirs = Tk::Clock.clicks - clicks
-
- clicks = Tk::Clock.clicks
- list.each{|file| dir_proc.call(file)}
- clickAddDirs = Tk::Clock.clicks - clicks
-
- clicks = Tk::Clock.clicks
- globFiles = Dir.glob(File.join(base_dir, '*')).find_all{|file|
- FileTest.file?(file)
- }
- clickGlobFiles = Tk::Clock.clicks - clicks
-
- clicks = Tk::Clock.clicks
- list = globFiles.sort
- clickSortFiles = Tk::Clock.clicks - clicks
-
- clicks = Tk::Clock.clicks
- list.each{|file| file_proc.call(file)}
- clickAddFiles = Tk::Clock.clicks - clicks
-
- gd = '%.2g' % (clickGlobDirs / 1000000.0)
- sd = '%.2g' % (clickSortDirs / 1000000.0)
- ad = '%.2g' % (clickAddDirs / 1000000.0)
- gf = '%.2g' % (clickGlobFiles / 1000000.0)
- sf = '%.2g' % (clickSortFiles / 1000000.0)
- af = '%.2g' % (clickAddFiles / 1000000.0)
-
- puts "dirs(#{globDirs.length}) glob/sort/add #{gd}/#{sd}/#{ad} files(#{globFiles.length}) glob/sort/add #{gf}/#{sf}/#{af}"
-
- @Priv[:DirCnt, t] = globDirs.length
-end
-
-#
-# Demo: explorer files
-#
-def demoExplorerDetails(t)
- height = t.font.metrics(:linespace)
- height = 18 if height < 18
-
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :itemheight=>height, :selectmode=>:extended,
- :xscrollincrement=>20, :scrollmargin=>16,
- :xscrolldelay=>[500, 50], :yscrolldelay=>[500, 50])
-
- init_pics('small-*')
-
- if $HasColumnCreate
- t.column_create(:text=>'Name', :tag=>'name',
- :width=>200, :arrow=>:up, :arrowpad=>6)
- t.column_create(:text=>'Size', :tag=>'size', :justify=>:right,
- :width=>60, :arrowside=>:left, :arrowgravity=>:right)
- t.column_create(:text=>'Type', :tag=>'type', :width=>120)
- t.column_create(:text=>'Modified', :tag=>'modified', :width=>130)
- else
- t.column_configure(0, :text=>'Name', :tag=>'name',
- :width=>200, :arrow=>:up, :arrowpad=>6)
- t.column_configure(1, :text=>'Size', :tag=>'size', :justify=>:right,
- :width=>60, :arrowside=>:left, :arrowgravity=>:right)
- t.column_configure(2, :text=>'Type', :tag=>'type', :width=>120)
- t.column_configure(3, :text=>'Modified', :tag=>'modified', :width=>130)
- end
-
- t.element_create('e1', :image,
- :image=>[
- @sel_images['small-folder'], ['selected'],
- @images['small-folder'], []
- ])
- t.element_create('e2', :text, :lines=>1,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('txtType', :text, :lines=>1)
- t.element_create('txtSize', :text, :lines=>1,
- :datatype=>:integer, :format=>'%dKB')
- t.element_create('txtDate', :text, :lines=>1,
- :datatype=>:time, :format=>'%d/%m/%y %I:%M %p')
- t.element_create('e4', :rect, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
-
- # image + text
- s = t.style_create('styName', :orient=>:horizontal)
- t.style_elements(s, ['e4', 'e1', 'e2'])
- t.style_layout(s, 'e1', :expand=>:ns)
- t.style_layout(s, 'e2', :padx=>[2,0], :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'e4', :union=>['e2'], :iexpand=>:ns, :ipadx=>2)
-
- # column 1: text
- s = t.style_create('stySize')
- t.style_elements(s, ['txtSize'])
- t.style_layout(s, 'txtSize', :padx=>6, :squeeze=>:x, :expand=>:ns)
-
- # column 2: text
- s = t.style_create('styType')
- t.style_elements(s, ['txtType'])
- t.style_layout(s, 'txtType', :padx=>6, :squeeze=>:x, :expand=>:ns)
-
- # column 3: text
- s = t.style_create('styDate')
- t.style_elements(s, ['txtDate'])
- t.style_layout(s, 'txtDate', :padx=>6, :squeeze=>:x, :expand=>:ns)
-
- @Priv[:edit, t] = ['e2']
- @Priv[:sensitive, t] = [ ['name', 'styName', 'e1', 'e2'] ]
- @Priv[:dragimage, t] = [ ['name', 'styName', 'e1', 'e2'] ]
-
- t.notify_bind(t, 'Edit-accept',
- proc{|w, i, tt| w.item_text(i, 0, tt)}, '%T %I %t')
-
- dir_proc = proc{|file|
- item = t.item_create
- t.item_style_set(item, 0, 'styName', 2, 'styType', 3, 'styDate')
- t.item_complex(item,
- [['e2', {:text=>File.basename(file)}]],
- [],
- [['txtType', {:text=>'Folder'}]],
- [['txtDate', {:data=>File.mtime(file).tv_sec}]])
- t.item_lastchild(:root, item)
- }
-
- file_proc = proc{|file|
- item = t.item_create
- t.item_style_set(item, 0, 'styName', 1, 'stySize',
- 2, 'styType', 3, 'styDate')
-
- ext = File.extname(file)
- case ext
- when '.dll'
- img = 'small-dll'
- when '.exe'
- img = 'small-exe'
- when '.txt'
- img = 'small-txt'
- else
- img = 'small-file'
- end
-
- type = ext.upcase
- type = type[1..-1] << ' ' unless type.empty?
- type << 'File'
-
- t.item_complex(item,
- [
- ['e1', {:image=>[@sel_images[img], ['selected'],
- @images[img], []]}],
- ['e2', {:text=>File.basename(file)}]
- ],
- [ ['txtSize', {:data=>File.size(file)/1024 + 1}] ],
- [ ['txtType', {:text=>type}] ],
- [ ['txtDate', {:data=>File.mtime(file).tv_sec}] ]
- )
- t.item_lastchild(:root, item)
- }
-
- demoExplorerAux(t, dir_proc, file_proc)
-
- @SortColumn = 0
- t.notify_bind(t, 'Header-invoke',
- proc{|w, c| explorerHeaderInvoke(t, w, c)}, '%T %C')
-
- t.bindtags = [ t, 'TreeCtrlFileList', Tk::TreeCtrl, t.winfo_toplevel, :all ]
-end
-
-def explorerHeaderInvoke(t, w, c)
- if (c == @SortColumn)
- if t.column_cget(@SortColumn, :arrow) == 'down'
- order = :increasing
- arrow = :up
- else
- order = :decreasing
- arrow = :down
- end
- else
- if t.column_cget(@SortColumn, :arrow) == 'down'
- order = :decreasing
- arrow = :down
- else
- order = :increasing
- arrow = :up
- end
- t.column_configure(@SortColumn, :arrow=>:none)
- @SortColumn = c
- end
-
- t.column_configure(c, :arrow=>arrow)
- dirCount = TkComm.number(@Priv[:DirCnt, t])
- lastDir = dirCount - 1
- case t.column_cget(c, :tag)
- when 'name'
- if dirCount > 0
- t.item_sort(:root, order, {:last=>"root child #{lastDir}"},
- {:column=>c, :dictionary=>true})
- end
- if dirCount < t.numitems - 1
- t.item_sort(:root, order, {:first=>"root child #{dirCount}"},
- {:column=>c, :dictionary=>true})
- end
-
- when 'size'
- if dirCount < t.numitems - 1
- t.item_sort(:root, order, {:first=>"root child #{dirCount}"},
- {:column=>c, :integer=>true},
- {:column=>'name', :dictionary=>true})
- end
-
- when 'type'
- if dirCount < t.numitems - 1
- t.item_sort(:root, order, {:first=>"root child #{dirCount}"},
- {:column=>c, :dictionary=>true},
- {:column=>'name', :dictionary=>true})
- end
-
- when 'modified'
- if dirCount > 0
- t.item_sort(:root, order, {:last=>"root child #{lastDir}"},
- {:column=>c, :integer=>true},
- {:column=>'name', :dictionary=>true})
- end
- if dirCount < t.numitems - 1
- t.item_sort(:root, order, {:first=>"root child #{dirCount}"},
- {:column=>c, :integer=>true},
- {:column=>'name', :dictionary=>true})
- end
-
- end
-end
-
-def demoExplorerLargeIcons(t)
- # Item height is 32 for icon, 4 padding, 3 lines of text
- itemHeight = 32 + 4 + t.font.metrics(:linespace) * 3
-
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :selectmode=>:extended, :wrap=>:window, :orient=>:horizontal,
- :itemheight=>itemHeight, :showheader=>false, :scrollmargin=>16,
- :xscrolldelay=>[500, 50], :yscrolldelay=>[500, 50])
-
- init_pics('big-*')
-
- if $HasColumnCreate
- t.column_create(:width=>75)
- else
- t.column_configure(0, :width=>75)
- end
-
- t.element_create('elemImg', :image,
- :image=>[
- @sel_images['big-folder'], ['selected'],
- @images['big-folder'], []
- ])
- t.element_create('elemTxt', :text, :justify=>:center,
- :lines=>1, :width=>71, :wrap=>:word,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('elemSel', :rect, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected']
- ])
-
- # image + text
- s = t.style_create('STYLE', :orient=>:vertical)
- t.style_elements(s, ['elemSel', 'elemImg', 'elemTxt'])
- t.style_layout(s, 'elemImg', :expand=>:we)
- t.style_layout(s, 'elemTxt',
- :pady=>[4,0], :padx=>2, :squeeze=>:x, :expand=>:we)
- t.style_layout(s, 'elemSel', :union=>['elemTxt'])
-
- @Priv[:edit, t] = ['elemTxt']
- @Priv[:sensitive, t] = [ [0, 'STYLE', 'elemImg', 'elemTxt'] ]
- @Priv[:dragimage, t] = [ [0, 'STYLE', 'elemImg', 'elemTxt'] ]
-
- t.notify_bind(t, 'Edit-accept',
- proc{|w, i, tt| w.item_text(i, 0, tt)}, '%T %I %t')
-
- dir_proc = proc{|file|
- item = t.item_create
- t.item_style_set(item, 0, 'STYLE')
- t.item_text(item, 0, File.basename(file))
- t.item_lastchild(:root, item)
- }
-
- file_proc = proc{|file|
- item = t.item_create
- t.item_style_set(item, 0, 'STYLE')
-
- ext = File.extname(file)
- case ext
- when '.dll'
- img = 'big-dll'
- when '.exe'
- img = 'big-exe'
- when '.txt'
- img = 'big-txt'
- else
- img = 'big-file'
- end
-
- type = ext.upcase
- type = type[1..-1] << ' ' unless type.empty?
- type << 'File'
-
- t.item_complex(item,
- [
- ['elemImg', {:image=>[@sel_images[img], ['selected'],
- @images[img], []]}],
- ['elemTxt', {:text=>File.basename(file)}]
- ])
- t.item_lastchild(:root, item)
- }
-
- demoExplorerAux(t, dir_proc, file_proc)
-
- t.activate(t.index('root firstchild'))
-
- t.notify_bind(t, 'ActiveItem',
- proc{|w, a, c|
- w.item_element_configure(a, 0, 'elemTxt', :lines=>'')
- w.item_element_configure(c, 0, 'elemTxt', :lines=>3)
- }, '%T %p %c')
-
- t.bindtags = [ t, 'TreeCtrlFileList', Tk::TreeCtrl, t.winfo_toplevel, :all ]
-end
-
-# Tree is horizontal, wrapping occurs at right edge of window, each item
-# is as wide as the smallest needed multiple of 110 pixels
-def demoExplorerSmallIcons(t)
- demoExplorerList(t)
- t.configure(:orient=>:horizontal, :xscrollincrement=>0)
- t.column_configure(0, :width=>'', :stepwidth=>110, :widthhack=>false)
-end
-
-# Tree is vertical, wrapping occurs at bottom of window, each range has the
-# same width (as wide as the longest item), xscrollincrement is by range
-def demoExplorerList(t)
- height = t.font.metrics(:linespace) + 2
- height = 18 if height < 18
-
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :itemheight=>height, :selectmode=>:extended, :wrap=>:window,
- :showheader=>false, :scrollmargin=>16,
- :xscrolldelay=>[500, 50], :yscrolldelay=>[500, 50])
-
- init_pics('small-*')
-
- if $HasColumnCreate
- t.column_create(:widthhack=>true)
- else
- t.column_configure(0, :widthhack=>true)
- end
-
- t.element_create('elemImg', :image,
- :image=>[
- @sel_images['small-folder'], ['selected'],
- @images['small-folder'], []
- ])
- t.element_create('elemTxt', :text, :lines=>1,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('elemSel', :rect, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
-
- # image + text
- s = t.style_create('STYLE')
- t.style_elements(s, ['elemSel', 'elemImg', 'elemTxt'])
- t.style_layout(s, 'elemImg', :expand=>:ns)
- t.style_layout(s, 'elemTxt', :squeeze=>:x, :expand=>:ns, :padx=>[2,0])
- t.style_layout(s, 'elemSel', :union=>['elemTxt'], :iexpand=>:ns, :ipadx=>2)
-
- @Priv[:edit, t] = ['elemTxt']
- @Priv[:sensitive, t] = [ [0, 'STYLE', 'elemImg', 'elemTxt'] ]
- @Priv[:dragimage, t] = [ [0, 'STYLE', 'elemImg', 'elemTxt'] ]
-
- t.notify_bind(t, 'Edit-accept',
- proc{|w, i, tt| w.item_text(i, 0, tt)}, '%T %I %t')
-
- dir_proc = proc{|file|
- item = t.item_create
- t.item_style_set(item, 0, 'STYLE')
- t.item_text(item, 0, File.basename(file))
- t.item_lastchild(:root, item)
- }
-
- file_proc = proc{|file|
- item = t.item_create
- t.item_style_set(item, 0, 'STYLE')
-
- ext = File.extname(file)
- case ext
- when '.dll'
- img = 'small-dll'
- when '.exe'
- img = 'small-exe'
- when '.txt'
- img = 'small-txt'
- else
- img = 'small-file'
- end
-
- type = ext.upcase
- type = type[1..-1] << ' ' unless type.empty?
- type << 'File'
-
- t.item_complex(item,
- [
- ['elemImg', {:image=>[@sel_images[img], ['selected'],
- @images[img], []]}],
- ['elemTxt', {:text=>File.basename(file)}]
- ])
- t.item_lastchild(:root, item)
- }
-
- demoExplorerAux(t, dir_proc, file_proc)
-
- t.activate(t.item_firstchild(:root))
-
- t.bindtags = [ t, 'TreeCtrlFileList', Tk::TreeCtrl, t.winfo_toplevel, :all ]
-end
diff --git a/ext/tk/sample/tkextlib/treectrl/help.rb b/ext/tk/sample/tkextlib/treectrl/help.rb
deleted file mode 100644
index 251330277b..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/help.rb
+++ /dev/null
@@ -1,405 +0,0 @@
-# frozen_string_literal: false
-#
-# Demo: Help contents
-#
-def demoHelpContents(t)
- height = t.font.metrics(:linespace)
- height = 18 if height < 18
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :itemheight=>height, :selectmode=>:browse)
-
- init_pics('help-*')
-
- if $Version_1_1_OrLater
- t.column_create(:text=>'Help Contents')
- else # TreeCtrl 1.0
- t.column_configure(0, :text=>'Help Contents')
- end
-
- # Define a new item state
- t.state_define('mouseover')
-
- t.element_create('e1', :image, :image=>@images['help-page'])
- t.element_create('e2', :image, :image=>[
- @images['help-book-open'], ['open'],
- @images['help-book-closed'], [],
- ])
- t.element_create('e3', :text,
- :font=>[t.font.dup.underline(true), ['mouseover']],
- :fill=>[
- @SystemHighlightText, ['selected', 'focus'],
- 'blue', ['mouseover']
- ])
- t.element_create('e4', :rect, :showfocus=>true,
- :fill=>[@SystemHighlight, ['selected', 'focus']])
-
- # book
- s = t.style_create('s1')
- t.style_elements(s, ['e4', 'e1', 'e3'])
- t.style_layout(s, 'e1', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e3', :expand=>:ns)
- t.style_layout(s, 'e4', :union=>['e3'], :iexpand=>:ns, :ipadx=>2)
-
- # page
- s = t.style_create('s2')
- t.style_elements(s, ['e4', 'e2', 'e3'])
- t.style_layout(s, 'e2', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e3', :expand=>:ns)
- t.style_layout(s, 'e4', :union=>['e3'], :iexpand=>:ns, :ipadx=>2)
-
- parentList = [:root, '', '', '', '', '', '']
- parent = :root
- [
- [0, 's1', "Welcome to Help"],
- [0, 's2', "Introducing Windows 98"],
- [1, 's2', "How to Use Help"],
- [2, 's1', "Find a topic"],
- [2, 's1', "Get more out of help"],
- [1, 's2', "Register Your Software"],
- [2, 's1', "Registering Windows 98 online"],
- [1, 's2', "What's New in Windows 98"],
- [2, 's1', "Innovative, easy-to-use features"],
- [2, 's1', "Improved reliability"],
- [2, 's1', "A faster operating system"],
- [2, 's1', "True Web integration"],
- [2, 's1', "More entertaining and fun"],
- [1, 's2', "If You're New to Windows 98"],
- [2, 's2', "Tips for Macintosh Users"],
- [3, 's1', "Why does the mouse have two buttons?"]
- ].each{|depth, style, text|
- item = t.item_create
- t.item_style_set(item, 0, style)
- t.item_element_configure(item, 0, 'e3', :text=>text)
- if $Version_1_1_OrLater
- t.item_collapse(item)
- else # TreeCtrl 1.0
- t.collapse(item)
- end
- t.item_lastchild(parentList[depth], item)
- depth += 1
- parentList[depth] = item
- }
-
- treeCtrlHelp = TkBindTag.new
-
- treeCtrlHelp.bind('Double-ButtonPress-1',
- proc{|w, x, y|
- if w.identify(x, y)[0] == 'header'
- Tk::TreeCtrl::BindCallback.doubleButton1(w, x, y)
- else
- helpButton1(w, x, y)
- end
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('ButtonPress-1',
- proc{|w, x, y|
- helpButton1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('Button1-Motion',
- proc{|w, x, y|
- helpMotion1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('Button1-Leave',
- proc{|w, x, y|
- helpLeave1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('ButtonRelease-1',
- proc{|w, x, y|
- helpRelease1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('Motion', proc{|w, x, y| helpMotion(w, x, y) }, '%W %x %y')
-
- treeCtrlHelp.bind('Leave', proc{|w, x, y| helpMotion(w, x, y) }, '%W %x %y')
-
- treeCtrlHelp.bind('KeyPress-Return',
- proc{|w, x, y|
- if w.selection_get.length == 1
- if $Version_1_1_OrLater
- w.item_toggle(w.selection_get[0])
- else # TreeCtrl 1.0
- w.toggle(w.selection_get[0])
- end
- end
- Tk.callback_break
- }, '%W %x %y')
-
- @Priv[:help, :prev] = ''
-
- t.bindtags = [ t, treeCtrlHelp, Tk::TreeCtrl, t.winfo_toplevel, :all ]
-end
-
-# This is an alternate implementation that does not define a new item state
-# to change the appearance of the item under the cursor.
-def demoHelpContents2(t)
- height = t.font.metrics(:linespace)
- height = 18 if height < 18
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :itemheight=>height, :selectmode=>:browse)
-
- init_pics('help-*')
-
- if $Version_1_1_OrLater
- t.column_create(:text=>'Help Contents')
- else # TreeCtrl 1.0
- t.column_configure(0, :text=>'Help Contents')
- end
-
- t.element_create('e1', :image, :image=>@images['help-page'])
- t.element_create('e2', :image, :image=>[
- @images['help-book-open'], ['open'],
- @images['help-book-closed'], [],
- ])
- t.element_create('e3', :text,
- :fill=>[
- @SystemHighlightText, ['selected', 'focus'],
- 'blue', []
- ])
- t.element_create('e4', :rect, :showfocus=>true,
- :fill=>[@SystemHighligh, ['selected', 'focus']])
- t.element_create('e5', :text, :font=>t.font.dup.underline(true),
- :fill=>[
- @SystemHighlightText, ['selected', 'focus'],
- 'blue', []
- ])
-
- # book
- s = t.style_create('s1')
- t.style_elements(s, ['e4', 'e1', 'e3'])
- t.style_layout(s, 'e1', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e3', :expand=>:ns)
- t.style_layout(s, 'e4', :union=>['e3'], :iexpand=>:ns, :ipadx=>2)
-
- # page
- s = t.style_create('s2')
- t.style_elements(s, ['e4', 'e2', 'e3'])
- t.style_layout(s, 'e2', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e3', :expand=>:ns)
- t.style_layout(s, 'e4', :union=>['e3'], :iexpand=>:ns, :ipadx=>2)
-
- # book (focus)
- s = t.style_create('s1.f')
- t.style_elements(s, ['e4', 'e1', 'e5'])
- t.style_layout(s, 'e1', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e5', :expand=>:ns)
- t.style_layout(s, 'e4', :union=>['e5'], :iexpand=>:ns, :ipadx=>2)
-
- # page (focus)
- s = t.style_create('s2')
- t.style_elements(s, ['e4', 'e2', 'e5'])
- t.style_layout(s, 'e2', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e5', :expand=>:ns)
- t.style_layout(s, 'e4', :union=>['e5'], :iexpand=>:ns, :ipadx=>2)
-
- parentList = [:root, '', '', '', '', '', '']
- parent = :root
- [
- [0, 's1', "Welcome to Help"],
- [0, 's2', "Introducing Windows 98"],
- [1, 's2', "How to Use Help"],
- [2, 's1' "Find a topic"],
- [2, 's1', "Get more out of help"],
- [1, 's2', "Register Your Software"],
- [2, 's1', "Registering Windows 98 online"],
- [1, 's2', "What's New in Windows 98"],
- [2, 's1', "Innovative, easy-to-use features"],
- [2, 's1', "Improved reliability"],
- [2, 's1', "A faster operating system"],
- [2, 's1', "True Web integration"],
- [2, 's1', "More entertaining and fun"],
- [1, 's2', "If You're New to Windows 98"],
- [2, 's2', "Tips for Macintosh Users"],
- [3, 's1', "Why does the mouse have two buttons?"]
- ].each{|depth, style, text|
- item = t.item_create
- t.item_style_set(item, 0, style)
- t.item_element_configure(item, 0, 'e3', :text=>text)
- if $Version_1_1_OrLater
- t.item_collapse(item)
- else # TreeCtrl 1.0
- t.collapse(item)
- end
- t.item_lastchild(parentList[depth], item)
- depth += 1
- parentList[depth] = item
- }
-
- treeCtrlHelp = TkBindTag.new
-
- treeCtrlHelp.bind('Double-ButtonPress-1',
- proc{|w, x, y|
- if w.identify(x, y)[0] == 'header'
- Tk::TreeCtrl::BindCallback.doubleButton1(w, x, y)
- else
- helpButton1(w, x, y)
- end
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('ButtonPress-1',
- proc{|w, x, y|
- helpButton1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('Button1-Motion',
- proc{|w, x, y|
- helpMotion1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('Button1-Leave',
- proc{|w, x, y|
- helpLeave1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('ButtonRelease-1',
- proc{|w, x, y|
- helpRelease1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlHelp.bind('Motion', proc{|w, x, y| helpMotion(w, x, y) }, '%W %x %y')
-
- treeCtrlHelp.bind('Leave', proc{|w, x, y| helpMotion(w, x, y) }, '%W %x %y')
-
- treeCtrlHelp.bind('KeyPress-Return',
- proc{|w, x, y|
- if w.selection_get.length == 1
- w.item_toggle(w.selection_get[0])
- end
- Tk.callback_break
- }, '%W %x %y')
-
- @Priv[:help, :prev] = ''
-
- t.bindtags = [ t, treeCtrlHelp, Tk::TreeCtrl, t.winfo_toplevel, :all ]
-end
-
-def helpButton1(w, x, y)
- w.set_focus
- id = w.identify(x, y)
- @Priv['buttonMode'] = ''
- if id[0] == 'header'
- Tk::TreeCtrl::BindCallback.buttonPress1(w, x, y)
- elsif id[0] == 'item'
- item = id[1]
- # didn't click an element
- return if id.length != 6
- if w.selection_includes(item)
- w.toggle(item)
- return
- end
- if w.selection_get.length > 0
- item2 = w.selection_get[0]
- if $Version_1_1_OrLater
- w.item_collapse(item2)
- else # TreeCtrl 1.0
- w.collapse(item2)
- end
- w.item_ancestors(item2).each{|i|
- if $Version_1_1_OrLater
- w.item_collapse(i) if w.compare(item, '!=', i)
- else # TreeCtrl 1.0
- w.collapse(i) if w.compare(item, '!=', i)
- end
- }
- end
- w.activate(item)
- if $Version_1_1_OrLater
- w.item_ancestors(item).each{|i|
- w.item_expand(i)
- }
- w.item_toggle(item)
- else # TreeCtrl 1.0
- w.expand(*(w.item_ancestors(item)))
- w.toggle(item)
- end
- w.selection_modify(item, :all)
- end
-end
-
-def helpMotion1(w, x, y)
- case @Priv['buttonMode']
- when 'resize', 'header'
- Tk::TreeCtrl::BindCallback.motion1(w, x, y)
- end
-end
-
-def helpLeave1(w, x, y)
- # This is called when I do ButtonPress-1 on Unix for some reason,
- # and buttonMode is undefined.
- return unless @Priv.exist?('buttonMode')
- case @Priv['buttonMode']
- when 'header'
- w.column_configure(@Priv['column'], :sunken=>false)
- end
-end
-
-def helpRelease1(w, x, y)
- case @Priv['buttonMode']
- when 'resize', 'header'
- Tk::TreeCtrl::BindCallback.release1(w, x, y)
- end
- @Priv['buttonMode'] = ''
-end
-
-def helpMotion(w, x, y)
- id = w.identify(x, y)
- if id.empty?
- elsif id[0] == 'header'
- elsif id[0] == 'item'
- item = id[1]
- if id.length == 6
- if @Priv[:help, :prev] != TkComm._get_eval_string(item)
- if @Priv[:help, :prev] != ''
- w.item_state_set(@Priv[:help, :prev], '!mouseover')
- end
- w.item_state_set(item, 'mouseover')
- @Priv[:help, :prev] = item
- end
- return
- end
- end
- if @Priv[:help, :prev] != ''
- w.item_state_set(@Priv[:help, :prev], '!mouseover')
- @Priv[:help, :prev] = ''
- end
-end
-
-# Alternate implementation doesn't rely on mouseover state
-def helpMotion2(w, x, y)
- id = w.identify(x, y)
- if id[0] == 'header'
- elsif !id.empty?
- item = id[1]
- if id.length == 6
- if @Priv[:help, :prev] != TkComm._get_eval_string(item)
- if @Priv[:help, :prev] != ''
- style = w.item_style_set(@Priv[:help, :prev], 0)
- style.sub!(/\.f$/, '')
- w.item_style_map(@Priv[:help, :prev], 0, style, ['e5', 'e3'])
- end
- style = w.item_style_set(item, 0)
- w.item_style_map(item, 0, style + '.f', ['e3', 'e5'])
- @Priv[:help, :prev] = item
- end
- return
- end
- end
- if @Priv[:help, :prev] != ''
- style = w.item_style_set(@Priv[:help, :prev], 0)
- style.sub!(/\.f$/, '')
- w.item_style_map(@Priv[:help, :prev], 0, style, ['e5', 'e3'])
- @Priv[:help, :prev] = ''
- end
-end
diff --git a/ext/tk/sample/tkextlib/treectrl/imovie.rb b/ext/tk/sample/tkextlib/treectrl/imovie.rb
deleted file mode 100644
index 4419496ac4..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/imovie.rb
+++ /dev/null
@@ -1,131 +0,0 @@
-# frozen_string_literal: false
-#
-# Demo: iMovie
-#
-def demoIMovie(t)
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :selectmode=>:browse, :orient=>:horizontal, :wrap=>:window,
- :showheader=>false, :background=>'#dcdcdc')
-
- if $HasColumnCreate
- t.column_create
- end
-
- init_pics('imovie-*')
-
- case @thisPlatform
- when 'macintosh', 'macosx'
- font1 = TkFont.new(['Geneva', 9])
- font2 = TkFont.new(['Geneva', 10])
- when 'unix'
- font1 = TkFont.new(['Helvetica', -12])
- font2 = TkFont.new(['Helvetica', -14])
- else
- font1 = TkFont.new(['Helvetica', 8])
- font2 = TkFont.new(['Helvetica', 10])
- end
-
- t.element_create('elemTime', :text, :font=>font1)
- t.element_create('elemName', :text, :font=>font2, :lines=>1, :width=>80)
- t.element_create('elemRect', :rect, :outline=>'#827878', :outlinewidth=>1,
- :fill=>['#ffdc5a', ['selected'], 'white', []])
- t.element_create('elemImg', :image)
- t.element_create('elemShadow', :rect, :outline=>'gray', :outlinewidth=>1,
- :open=>:wn)
-
- s = t.style_create('STYLE', :orient=>:vertical)
- t.style_elements(s, [
- 'elemShadow', 'elemRect', 'elemTime',
- 'elemImg', 'elemName'
- ])
- t.style_layout(s, 'elemShadow', :detach=>true,
- :padx=>[1,2], :pady=>[1,2], :iexpand=>:es)
- t.style_layout(s, 'elemTime', :padx=>[2,0])
- t.style_layout(s, 'elemImg', :pady=>[0,1])
- t.style_layout(s, 'elemName', :expand=>:we, :ipady=>[0,2], :padx=>[0,3],
- :squeeze=>:x)
- t.style_layout(s, 'elemRect', :union=>['elemTime', 'elemImg', 'elemName'],
- :ipadx=>6, :padx=>[0,3], :pady=>[0,3])
-
- # Set default item style
- if $Version_1_1_OrLater
- t.defaultstyle([s])
- end
-
- (0..4).each{|i|
- [
- ['15:20', 'Clip 1', @images['imovie-01']],
- ['19:18', 'Clip 2', @images['imovie-02']],
- ['07:20', 'Clip 3', @images['imovie-03']],
- ['07:20', 'Clip 4', @images['imovie-04']],
- ['07:20', 'Clip 5', @images['imovie-05']],
- ['07:20', 'Clip 6', @images['imovie-06']],
- ['07:20', 'Clip 7', @images['imovie-07']]
- ].each{|time, name, image|
- item = t.item_create
- unless $Version_1_1_OrLater
- t.item_style_set(item, 0, s)
- end
- t.item_element_configure(item, 0, 'elemTime', :text=>time)
- t.item_element_configure(item, 0, 'elemName', :text=>name)
- t.item_element_configure(item, 0, 'elemImg', :image=>image)
- t.item_lastchild(:root, item)
- }
- }
-
- t.notify_bind(t, 'Edit-accept', proc{|w, i, c, e, tt|
- w.item_element_configure(i, c, e, :text=>tt)
- }, '%T %I %C %E %t')
-
- iMovie = TkBindTag.new
- iMovie.bind('ButtonPress-1', proc{|w, x, y|
- iMovieButton1(w, x, y)
- }, '%W %x %y')
-
- t.bindtags = [t, iMovie, Tk::TreeCtrl, t.winfo_toplevel, TkBindTag::ALL]
-end
-
-def iMovieButton1(w, x, y)
- w.set_focus
- id = w.identify(x,y)
-
- if id.empty?
- # Click outside any item
-
- elsif id[0] == 'header'
- # Click in header
- Tk::TreeCtrl::BindCallback.buttonPress1(w, x, y)
-
- elsif id[0] == 'item'
- # Click in item
- Tk::TreeCtrl::BindCallback.buttonPress1(w, x, y)
- Tk.update
- where, item, arg1, arg2, arg3, arg4 = id
- case arg1
- when 'column'
- i = id[1]
- if id.length == 6
- e = id[-1]
- if e == 'elemName'
- exists = TkWinfo.exist?(w.path + '.entry')
- Tk::TreeCtrl::BindCallback.entryOpen(w, i, 0, e)
- ent = TkComm.window(w.path + '.entry')
- unless exists
- ent.configure(:borderwidth=>0, :justify=>:center,
- :background=>'#ffdc5a')
- x1, y1, x2, y2 = w.item_bbox(i, 0, e)
- ent.place(:y=>y1 - 1)
- end
- ent.selection_clear
- x1, y1, x2, y2 = w.item_bbox(i)
- ent.place(:x=>x1 + 1, :width=>x2 - x1 - 5)
- puts "@#{x - (x1 + 1)}"
- # ent.icursor = ent.index("@#{x - (x1 + 1)}")
- ent.icursor = ent.index(TkComm._at(x - (x1 + 1)))
- end
- end
- end
- end
-
- Tk.callback_break
-end
diff --git a/ext/tk/sample/tkextlib/treectrl/layout.rb b/ext/tk/sample/tkextlib/treectrl/layout.rb
deleted file mode 100644
index 50c332641b..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/layout.rb
+++ /dev/null
@@ -1,160 +0,0 @@
-# frozen_string_literal: false
-#
-# Demo: Layout
-#
-def demoLayout(t)
- t.configure(:showroot=>false, :showrootbutton=>true, :showbuttons=>true,
- :showlines=>true, :itemheight=>0, :selectmode=>:browse)
-
- if $HasColumnCreate
- t.column_create(:text=>'Layout')
- else
- t.column_configure(0, :text=>'Layout')
- end
-
- t.element_create('e1', :rect, :width=>30, :height=>30, :fill=>'gray20')
- t.element_create('e2', :rect, :width=>30, :height=>30, :fill=>'gray40',
- :outline=>'blue', :outlinewidth=>3)
- t.element_create('e3', :rect, :fill=>'gray60')
- t.element_create('e4', :rect, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'], 'gray80', []
- ])
- t.element_create('e5', :rect, :fill=>'{sky blue}', :width=>20, :height=>20)
- t.element_create('e6', :rect, :fill=>'{sea green}', :width=>30, :height=>16)
- t.element_create('e7', :rect, :fill=>'{sky blue}', :width=>30, :height=>16)
- t.element_create('e8', :rect, :fill=>'gray70', :height=>1)
-
- s = t.style_create('s1')
- t.style_elements(s, ['e4', 'e3', 'e1', 'e2', 'e5', 'e6', 'e7'])
- t.style_layout(s, 'e1', :padx=>[28, 4], :pady=>4)
- t.style_layout(s, 'e2', :expand=>:es, :padx=>[0, 38])
- t.style_layout(s, 'e3', :union=>['e1', 'e2'], :ipadx=>4, :ipady=>4, :pady=>2)
- t.style_layout(s, 'e4', :detach=>true, :iexpand=>:es)
- t.style_layout(s, 'e5', :detach=>true, :padx=>[2,0], :pady=>2, :iexpand=>:s)
- t.style_layout(s, 'e6', :detach=>true, :expand=>:ws,
- :padx=>[0,2], :pady=>[2,0])
- t.style_layout(s, 'e7', :detach=>true, :expand=>:wn,
- :padx=>[0,2], :pady=>[0,2])
-
- if $Version_1_1_OrLater
- i = t.item_create(:button=>true)
- else
- i = t.item_create
- t.item_hasbutton(i, true)
- end
- t.item_style_set(i, 0, s)
- t.item_lastchild(:root, i)
- parent = i
-
- i = t.item_create()
- unless $Version_1_1_OrLater
- t.item_hasbutton(i, false)
- end
- t.item_style_set(i, 0, s)
- t.item_lastchild(parent, i)
-
- ###
-
- s = t.style_create('s2')
- t.style_elements(s, ['e4', 'e3', 'e1'])
- t.style_layout(s, 'e1', :padx=>8, :pady=>8, :iexpand=>:e)
- t.style_layout(s, 'e3', :union=>['e1'], :ipadx=>[20,4], :ipady=>[4,12])
- t.style_layout(s, 'e4', :detach=>true, :iexpand=>:es)
-
- if $Version_1_1_OrLater
- i = t.item_create(:button=>true)
- else
- i = t.item_create
- t.item_hasbutton(i, true)
- end
- t.item_style_set(i, 0, s)
- t.item_lastchild(:root, i)
-
- i2 = t.item_create()
- unless $Version_1_1_OrLater
- t.item_hasbutton(i2, false)
- end
- t.item_style_set(i2, 0, s)
- t.item_lastchild(i, i2)
-
- ###
-
- s = t.style_create('s3')
- t.style_elements(s, ['e4', 'e3', 'e1', 'e5', 'e6'])
- t.style_layout(s, 'e4', :union=>['e1', 'e6'], :ipadx=>8, :ipady=>[8,0])
- t.style_layout(s, 'e3', :union=>['e1', 'e5'], :ipadx=>4, :ipady=>4)
- t.style_layout(s, 'e5', :ipady=>[0,20])
-
- if $Version_1_1_OrLater
- i = t.item_create(:button=>true)
- else
- i = t.item_create
- t.item_hasbutton(i, true)
- end
- t.item_style_set(i, 0, s)
- t.item_lastchild(:root, i)
-
- i2 = t.item_create()
- unless $Version_1_1_OrLater
- t.item_hasbutton(i2, false)
- end
- t.item_style_set(i2, 0, s)
- t.item_lastchild(i, i2)
-
- ###
-
- t.element_create('eb', :border, :background=>@SystemButtonFace,
- :relief=>[:sunken, ['selected'], :raised, []],
- :thickness=>2, :filled=>true)
- t.element_create('et', :text)
-
- text = "Here is a text element surrounded by a border element.\nResize the column to watch me wrap."
-
- s = t.style_create('e4')
- t.style_elements(s, ['eb', 'et'])
- t.style_layout(s, 'eb', :union=>['et'], :ipadx=>2, :ipady=>2)
- t.style_layout(s, 'et', :squeeze=>:x)
-
- if $Version_1_1_OrLater
- i = t.item_create(:button=>true)
- else
- i = t.item_create
- t.item_hasbutton(i, true)
- end
- t.item_style_set(i, 0, s)
- t.item_text(i, 0, text)
- t.item_lastchild(:root, i)
- parent = i
-
- i = t.item_create()
- unless $Version_1_1_OrLater
- t.item_hasbutton(i, false)
- end
- t.item_style_set(i, 0, s)
- t.item_text(i, 0, text)
- t.item_lastchild(parent, i)
-
- ###
-
- styleNum = 5
- [
- [:horizontal, [:s, :ns, :n]],
- [:vertical, [:e, :we, :w]]
- ].each{|orient, expandList|
- expandList.each{|expand|
- s = t.style_create("s#{styleNum}", :orient=>orient)
- t.style_elements(s, ['e4', 'e8', 'e2', 'e5', 'e6'])
- t.style_layout(s, 'e4', :detach=>true, :iexpand=>:es)
- t.style_layout(s, 'e8', :detach=>true, :expand=>:n, :iexpand=>:e)
- t.style_layout(s, 'e2', :expand=>expand)
- t.style_layout(s, 'e5', :expand=>expand)
- t.style_layout(s, 'e6', :expand=>expand)
- styleNum += 1
-
- i = t.item_create()
- t.item_style_set(i, 0, s)
- t.item_lastchild(:root, i)
- }
- }
-end
diff --git a/ext/tk/sample/tkextlib/treectrl/mailwasher.rb b/ext/tk/sample/tkextlib/treectrl/mailwasher.rb
deleted file mode 100644
index 81ffe743b6..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/mailwasher.rb
+++ /dev/null
@@ -1,270 +0,0 @@
-# frozen_string_literal: false
-#
-# Demo: MailWasher
-#
-def demoMailWasher(t)
- init_pics('*checked')
-
- height = t.font.metrics(:linespace) + 2
- height = 18 if height < 18
-
- t.configure(:showroot=>false, :showrootbutton=>false, :showbuttons=>false,
- :showlines=>false, :itemheight=>height, :selectmode=>:browse,
- :xscrollincrement=>1)
-
- pad = 4
-
- if $Version_1_1_OrLater
- t.column_create(:text=>'Delete', :textpadx=>pad, :tag=>'delete')
- t.column_create(:text=>'Bounce', :textpadx=>pad, :tag=>'bounce')
- t.column_create(:text=>'Status', :width=>80, :textpadx=>pad,
- :tag=>'status')
- t.column_create(:text=>'Size', :width=>40, :textpadx=>pad,
- :justify=>:right, :tag=>'size')
- t.column_create(:text=>'From', :width=>140, :textpadx=>pad, :tag=>'from')
- t.column_create(:text=>'Subject', :width=>240, :textpadx=>pad,
- :tag=>'subject')
- t.column_create(:text=>'Received', :textpadx=>pad, :arrow=>:up,
- :arrowpad=>[4,0], :tag=>'received')
- t.column_create(:text=>'Attachments', :textpadx=>pad, :tag=>'attachments')
-
- t.state_define('CHECK')
-
- t.element_create('imgCheck', :image, :image=>[
- @images['checked'], ['CHECK'], @images['unchecked'], []
- ])
-
- else # TreeCtrl 1.0
- t.column_configure(0, :text=>'Delete', :textpadx=>pad, :tag=>'delete')
- t.column_configure(1, :text=>'Bounce', :textpadx=>pad, :tag=>'bounce')
- t.column_configure(2, :text=>'Status', :width=>80, :textpadx=>pad,
- :tag=>'status')
- t.column_configure(3, :text=>'Size', :width=>40, :textpadx=>pad,
- :justify=>:right, :tag=>'size')
- t.column_configure(4, :text=>'From', :width=>140, :textpadx=>pad,
- :tag=>'from')
- t.column_configure(5, :text=>'Subject', :width=>240, :textpadx=>pad,
- :tag=>'subject')
- t.column_configure(6, :text=>'Received', :textpadx=>pad, :arrow=>:up,
- :arrowpad=>[4,0], :tag=>'received')
- t.column_configure(7, :text=>'Attachments', :textpadx=>pad,
- :tag=>'attachments')
-
- t.element_create('imgOff', :image, :image=>@images['unchecked'])
- t.element_create('imgOn', :image, :image=>@images['checked'])
- end
-
- t.element_create('border', :rect, :open=>:nw, :outline=>'gray',
- :outlinewidth=>1, :fill=>[@SystemHighlight, ['selected']])
- t.element_create('txtAny', :text, :lines=>1,
- :fill=>[@SystemHighlightText, ['selected']])
- t.element_create('txtNone', :text, :text=>'none', :lines=>1,
- :fill=>[@SystemHighlightText, ['selected']])
- t.element_create('txtYes', :text, :text=>'yes', :lines=>1,
- :fill=>[@SystemHighlightText, ['selected']])
- t.element_create('txtNormal', :text, :text=>'Normal', :lines=>1,
- :fill=>[@SystemHighlightText, ['selected'], '#006800', []])
- t.element_create('txtPossSpam', :text, :text=>'Possible Spam', :lines=>1,
- :fill=>[@SystemHighlightText, ['selected'], '#787800', []])
- t.element_create('txtProbSpam', :text, :text=>'Probably Spam', :lines=>1,
- :fill=>[@SystemHighlightText, ['selected'], '#FF9000', []])
- t.element_create('txtBlacklist', :text, :text=>'Blacklisted', :lines=>1,
- :fill=>[@SystemHighlightText, ['selected'], '#FF5800', []])
-
- if $Version_1_1_OrLater
- s = t.style_create('styCheck')
- t.style_elements(s, ['border', 'imgCheck'])
- t.style_layout(s, 'border', :detach=>true, :iexpand=>:es)
- t.style_layout(s, 'imgCheck', :expand=>:news)
- else
- ['Off', 'On'].each{|name|
- s = t.style_create('sty' << name)
- i = 'img' << name
- t.style_elements(s, ['border', i])
- t.style_layout(s, 'border', :detach=>true, :iexpand=>:es)
- t.style_layout(s, i, :expand=>:news)
- }
- end
-
- pad = 4
-
- %w(Any None Yes Normal PossSpam ProbSpam Blacklist).each{|name|
- s = t.style_create('sty' << name)
- e = 'txt' << name
- t.style_elements(s, ['border', e])
- t.style_layout(s, 'border', :detach=>true, :iexpand=>:es)
- t.style_layout(s, e, :padx=>pad, :squeeze=>:x, :expand=>:ns)
- }
-
- [
- ['baldy@spammer.com', "Your hair is thinning"],
- ['flat@spammer.com', "Your breasts are too small"],
- ['tiny@spammer.com', "Your penis is too small"],
- ['dumbass@spammer.com', "You are not very smart"],
- ['bankrobber@spammer.com', "You need more money"],
- ['loser@spammer.com', "You need better friends"],
- ['gossip@spammer.com', "Find out what your coworkers think about you"],
- ['whoami@spammer.com', "Find out what you think about yourself"],
- ['downsized@spammer.com', "You need a better job"],
- ['poorhouse@spammer.com', "Your mortgage is a joke"],
- ['spam4ever@spammer.com', "You need more spam"]
- ].each{|frm, subj|
- item = t.item_create
- status = ['styNormal','styPossSpam','styProbSpam','styBlacklist'][rand(4)]
- attachments = ['styNone','styYes'][rand(2)]
-
- if $Version_1_1_OrLater
- delete = [false, true][rand(2)]
- bounce = [false, true][rand(2)]
- t.item_style_set(item,
- 0, 'styCheck', 1, 'styCheck', 2, status, 3, 'styAny',
- 4, 'styAny', 5, 'styAny', 6, 'styAny', 7, attachments)
- t.item_state_forcolumn(item, 'delete', 'CHECK') if delete
- t.item_state_forcolumn(item, 'bounce', 'CHECK') if bounce
-
- else # TreeCtrl 1.0
- delete = ['styOn', 'styOff'][rand(2)]
- bounce = ['styOn', 'styOff'][rand(2)]
- t.item_style_set(item,
- 0, delete, 1, bounce, 2, status, 3, 'styAny',
- 4, 'styAny', 5, 'styAny', 6, 'styAny', 7, attachments)
- end
-
- bytes = 512 + rand(1024 * 12)
- size = "#{bytes / 1024 + 1}KB"
- seconds = Tk::Clock.seconds - rand(100000)
- received = Tk::Clock.format(seconds, '%d/%m/%y %I:%M %p')
- t.item_text(item, 3, size, 4, frm, 5, subj, 6, received)
- t.item_lastchild(:root, item)
- }
-
- sortColumn = 6
- t.notify_bind(t, 'Header-invoke',
- proc{|c, w|
- if c == sortColumn
- if w.column_cget(sortColumn, :arrow) == 'down'
- order = :increasing
- arrow = :up
- else
- order = :decreasing
- arrow = :down
- end
- else
- if w.column_cget(sortColumn, :arrow) == 'down'
- order = :decreasing
- arrow = :down
- else
- order = :increasing
- arrow = :up
- end
- w.column_configure(sortColumn, :arrow=>:none)
- sortColumn = c
- end
- w.column_configure(c, :arrow=>arrow)
- case w.column_cget(c, :tag)
- when 'bounce', 'delete'
- w.item_sort(:root, order,
- {
- :column=>c,
- :command=>proc{|item1, item2|
- compareOnOff(w, c, item1, item2)
- }
- },
- { :column=>'subject', :dictionary=>true })
- when 'status'
- w.item_sort(:root, order,
- { :column=>c, :dictionary=>true })
- when 'from'
- w.item_sort(:root, order,
- { :column=>c, :dictionary=>true },
- { :column=>'subject', :dictionary=>true })
- when 'subject'
- w.item_sort(:root, order,
- { :column=>c, :dictionary=>true })
- when 'size'
- w.item_sort(:root, order,
- { :column=>c, :dictionary=>true },
- { :column=>'subject', :dictionary=>true })
- when 'received'
- w.item_sort(:root, order,
- { :column=>c, :dictionary=>true },
- { :column=>'subject', :dictionary=>true })
- when 'attachments'
- w.item_sort(:root, order,
- { :column=>c, :dictionary=>true },
- { :column=>'subject', :dictionary=>true })
- end
- }, '%C %T')
-
- mailWasher = TkBindTag.new
-
- if $Version_1_1_OrLater
- mailWasher.bind('ButtonPress-1',
- proc{|w, x, y|
- id = w.identify(x, y)
- if id.empty?
- elsif id[0] == 'header'
- else
- what, item, where, arg1, arg2, arg3 = id
- if where == 'column'
- tag = w.column_cget(arg1, :tag)
- if tag == 'delete' || tag == 'bounce'
- w.item_state_forcolumn(item, arg1, '~CHECK')
- end
- end
- end
- }, '%W %x %y')
- else # TreeCtrl 1.0
- mailWasher.bind('ButtonPress-1',
- proc{|w, x, y|
- id = w.identify(x, y)
- if id.empty?
- elsif id[0] == 'header'
- else
- what, item, where, arg1, arg2, arg3 = id
- if where == 'column'
- tag = w.column_cget(arg1, :tag)
- if tag == 'delete' || tag == 'bounce'
- style = w.item_style_set(item, arg1)
- if style == 'styOn'
- style = 'styOff'
- else
- style = 'styOn'
- end
- w.item_style_set(item, arg1, style)
- @display_styles_in_item.call(item)
- end
- end
- end
- }, '%W %x %y')
- end
-
- t.bindtags = [t, mailWasher, Tk::TreeCtrl, t.winfo_toplevel, TkBindTag::ALL]
-end
-
-if $Version_1_1_OrLater
- def compareOnOff(w, c, item1, item2)
- s1 = w.item_state_forcolumn(item1, c)
- s2 = w.item_state_forcolumn(item2, c)
- if (s1 == s2)
- 0
- elsif (s1 == 'CHECK')
- -1
- else
- 1
- end
- end
-
-else # TreeCtrl 1.0
- def compareOnOff(w, c, item1, item2)
- s1 = w.item_style_set(item1, c)
- s2 = w.item_style_set(item2, c)
- if (s1 == s2)
- 0
- elsif (s1 == 'styOff')
- -1
- else
- 1
- end
- end
-end
diff --git a/ext/tk/sample/tkextlib/treectrl/outlook-folders.rb b/ext/tk/sample/tkextlib/treectrl/outlook-folders.rb
deleted file mode 100644
index 8707251ee9..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/outlook-folders.rb
+++ /dev/null
@@ -1,125 +0,0 @@
-# frozen_string_literal: false
-#
-# Demo: Outlook Express folder list
-#
-def demoOutlookFolders(t)
- init_pics('outlook-*')
-
- height = t.font.metrics(:linespace) + 2
- height = 18 if height < 18
-
- t.configure(:itemheight=>height, :selectmode=>:browse, :showlines=>true,
- :showroot=>true, :showrootbutton=>false, :showbuttons=>true)
-
- if $HasColumnCreate
- t.column_create(:text=>'Folders')
- else
- t.column_configure(0, :text=>'Folders')
- end
-
- t.element_create('e1', :image)
- t.element_create('e2', :text, :lines=>1,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('e3', :text, :lines=>1, :font=>t.font.dup.weight(:bold),
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('e4', :text, :fill=>'blue')
- t.element_create('e5', :image, :image=>@images['outlook-folder'])
- t.element_create('e6', :rect, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
-
- # image + text
- s = t.style_create('s1')
- t.style_elements(s, ['e6', 'e1', 'e2'])
- t.style_layout(s, 'e1', :expand=>:ns)
- t.style_layout(s, 'e2', :padx=>[4,0], :expand=>:ns, :squeeze=>:x)
- t.style_layout(s, 'e6', :union=>['e2'], :iexpand=>:ns, :ipadx=>2)
-
- # image + text + text
- s = t.style_create('s2')
- t.style_elements(s, ['e6', 'e1', 'e3', 'e4'])
- t.style_layout(s, 'e1', :expand=>:ns)
- t.style_layout(s, 'e3', :padx=>4, :expand=>:ns, :squeeze=>:x)
- t.style_layout(s, 'e4', :expand=>:ns)
- t.style_layout(s, 'e6', :union=>['e3'], :iexpand=>:ns, :ipadx=>2)
-
- # folder + text
- s = t.style_create('s3')
- t.style_elements(s, ['e6', 'e5', 'e2'])
- t.style_layout(s, 'e5', :expand=>:ns)
- t.style_layout(s, 'e2', :padx=>[4,0], :expand=>:ns, :squeeze=>:x)
- t.style_layout(s, 'e6', :union=>['e2'], :iexpand=>:ns, :ipadx=>2)
-
- # folder + text + text
- s = t.style_create('s4')
- t.style_elements(s, ['e6', 'e5', 'e3', 'e4'])
- t.style_layout(s, 'e5', :expand=>:ns)
- t.style_layout(s, 'e3', :padx=>4, :expand=>:ns, :squeeze=>:x)
- t.style_layout(s, 'e4', :expand=>:ns)
- t.style_layout(s, 'e6', :union=>['e3'], :iexpand=>:ns, :ipadx=>2)
-
- t.item_style_set(:root, 0, 's1')
- t.item_complex(:root,
- [
- ['e1', {:image=>@images['outlook-main']}],
- ['e2', {:text=>'Outlook Express'}]
- ])
-
- parentList = [:root, '', '', '', '', '', '']
- parent = :root
- [
- [0, :local, "Local Folders", true, 0],
- [1, :inbox, 'Inbox', false, 5],
- [1, :outbox, 'Outbox', false, 0],
- [1, :sent, "Sent Items", false, 0],
- [1, :deleted, "Deleted Items", false, 50],
- [1, :draft, 'Drafts', false, 0],
- [1, :folder, "Messages to Dad", false, 0],
- [1, :folder, "Messages to Sis", false, 0],
- [1, :folder, "Messages to Me", false, 0],
- [2, :folder, "2001", false, 0],
- [2, :folder, "2000", false, 0],
- [2, :folder, "1999", false, 0],
- [0, :server, "news.gmane.org", true, 0],
- [1, :group, "gmane.comp.lang.lua.general", false, 498]
- ].each{|depth, img, text, button, unread|
- if $Version_1_1_OrLater
- item = t.item_create(:button=>button)
- else
- item = t.item_create
- t.item_hasbutton(item, button)
- end
- if img == :folder
- if unread != 0
- t.item_style_set(item, 0, 's4')
- t.item_complex(item,
- [['e3', {:text=>text}], ['e4', {:text=>"(#{unread})"}]])
- else
- t.item_style_set(item, 0, 's3')
- t.item_complex(item, [['e2', {:text=>text}]])
- end
- else
- if unread != 0
- t.item_style_set(item, 0, 's2')
- t.item_complex(item,
- [
- ['e1', {:image=>@images["outlook-#{img}"]}],
- ['e3', {:text=>text}],
- ['e4', {:text=>"(#{unread})"}]
- ])
- else
- t.item_style_set(item, 0, 's1')
- t.item_complex(item,
- [
- ['e1', {:image=>@images["outlook-#{img}"]}],
- ['e2', {:text=>text}]
- ])
- end
- end
- t.item_lastchild(parentList[depth], item)
- depth += 1
- parentList[depth] = item
- }
-end
diff --git a/ext/tk/sample/tkextlib/treectrl/outlook-newgroup.rb b/ext/tk/sample/tkextlib/treectrl/outlook-newgroup.rb
deleted file mode 100644
index 3d8f015206..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/outlook-newgroup.rb
+++ /dev/null
@@ -1,449 +0,0 @@
-# frozen_string_literal: false
-#
-# Demo: Outlook Express newsgroup messages
-#
-def demoOutlookNewsgroup(t)
- init_pics('outlook-*')
-
- height = t.font.metrics(:linespace)
- height = 18 if height < 18
- t.configure(:itemheight=>height, :selectmode=>:browse, :showlines=>false,
- :showroot=>false, :showrootbutton=>false, :showbuttons=>true)
-
- if $Version_1_1_OrLater
- t.column_create(:image=>@images['outlook-clip'], :tag=>'clip')
- t.column_create(:image=>@images['outlook-arrow'], :tag=>'arrow')
- t.column_create(:image=>@images['outlook-watch'], :tag=>'watch')
- t.column_create(:text=>'Subject', :width=>250, :tag=>'subject')
- t.column_create(:text=>'From', :width=>150, :tag=>'from')
- t.column_create(:text=>'Sent', :width=>150, :tag=>'sent')
- t.column_create(:text=>'Size', :width=>60, :justify=>:right, :tag=>'size')
- else # TreeCtrl 1.0
- t.column_configure(0, :image=>@images['outlook-clip'], :tag=>'clip')
- t.column_configure(1, :image=>@images['outlook-arrow'], :tag=>'arrow')
- t.column_configure(2, :image=>@images['outlook-watch'], :tag=>'watch')
- t.column_configure(3, :text=>'Subject', :width=>250, :tag=>'subject')
- t.column_configure(4, :text=>'From', :width=>150, :tag=>'from')
- t.column_configure(5, :text=>'Sent', :width=>150, :tag=>'sent')
- t.column_configure(6, :text=>'Size', :width=>60, :justify=>:right,
- :tag=>'size')
- end
-
- # Would be nice if I could specify a column -tag too
- t.treecolumn = 3
-
- # State for a read message
- t.state_define('read')
-
- # State for a message with unread descendants
- t.state_define('unread')
-
- t.element_create('elemImg', :image,
- :image=>[
- @sel_images['outlook-read-2'],
- ['selected', 'read', 'unread', '!open'],
- @images['outlook-read-2'], ['read', 'unread', '!open'],
- @sel_images['outlook-read'], ['selected', 'read'],
- @images['outlook-read'], ['read'],
- @sel_images['outlook-unread'], ['selected'],
- @images['outlook-unread'], []
- ])
- t.element_create('elemTxt', :text, :lines=>1,
- :fill=>[@SystemHighlightText, ['selected', 'focus']],
- :font=>[
- t.font.dup.weight(:bold), ['read', 'unread', '!open'],
- t.font.dup.weight(:bold), ['!read']
- ])
- t.element_create('sel.e', :rect, :open=>:e, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
- t.element_create('sel.w', :rect, :open=>:w, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
- t.element_create('sel.we', :rect, :open=>:we, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
-
- # Image + text
- s = t.style_create('s1')
- t.style_elements(s, ['sel.e', 'elemImg', 'elemTxt'])
- t.style_layout(s, 'elemImg', :expand=>:ns)
- t.style_layout(s, 'elemTxt', :padx=>[2,6], :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.e', :union=>['elemTxt'],
- :iexpand=>:nes, :ipadx=>[2,0])
-
- # Text
- s = t.style_create('s2.we')
- t.style_elements(s, ['sel.we', 'elemTxt'])
- t.style_layout(s, 'elemTxt', :padx=>6, :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.we', :detach=>true, :iexpand=>:es)
-
- # Text
- s = t.style_create('s2.w')
- t.style_elements(s, ['sel.w', 'elemTxt'])
- t.style_layout(s, 'elemTxt', :padx=>6, :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.w', :detach=>true, :iexpand=>:es)
-
- # Set default item style
- if $Version_1_1_OrLater
- t.defaultstyle = ['', '', '', 's1', 's2.we', 's2.we', 's2.w']
- end
-
- msgCnt = 100
- thread = 0
-
- @Message = Hash.new{|k, v| k[v] = Hash.new}
- @Message[:count][0] = 0
-
- items = [t.index(:root)]
-
- (1...(msgCnt)).each{|i|
- item_i = t.item_create
- item_j = nil
- j = nil
- loop {
- j = rand(i)
- item_j = items[j]
- break if j == 0
- next if t.depth(item_j) == 5
- next if @Message[:count][@Message[:thread][item_j]] == 15
- break
- }
- t.item_lastchild(item_j, item_i)
-
- @Message[:read][item_i] = (rand(2) == 0)
- if j == 0
- thread += 1
- @Message[:thread][item_i] = thread
- @Message[:seconds][item_i] = (Tk::Clock.seconds - rand(500000))
- @Message[:seconds2][item_i] = @Message[:seconds][item_i]
- @Message[:count][thread] = 1
- else
- @Message[:thread][item_i] = @Message[:thread][item_j]
- @Message[:seconds][item_i] = (@Message[:seconds2][item_j] + rand(10000))
- @Message[:seconds2][item_i] = @Message[:seconds][item_i]
- @Message[:seconds2][item_j] = @Message[:seconds][item_i]
- @Message[:count][@Message[:thread][item_j]] += 1
- end
- items << item_i
- }
-
- (1...(msgCnt)).each{|i|
- item_i = items[i]
- subject = "This is thread number #{@Message[:thread][item_i]}"
- from = 'somebody@somewhere.net'
- sent = Tk::Clock.format(@Message[:seconds][item_i], "%d/%m/%y %I:%M %p")
- size = "#{1 + rand(10)}KB"
-
- # This message has been read
- t.item_state_set(item_i, 'read') if @Message[:read][item_i]
-
- # This message has unread descendants
- t.item_state_set(item_i, 'unread') if anyUnreadDescendants(t, item_i)
-
- if t.item_numchildren(item_i) > 0
- if $Version_1_1_OrLater
- t.item_configure(item_i, :button=>true)
- else # TreeCtrl 1.0
- t.item_hasbutton(item_i, true)
- end
-
- # Collapse some messages
- if $Version_1_1_OrLater
- t.item_collapse(item_i) if rand(2) == 0
- else # TreeCtrl 1.0
- t.collapse(item_i) if rand(2) == 0
- end
- end
-
- unless $Version_1_1_OrLater
- t.item_style_set(item_i, 3, 's1', 4, 's2.we', 5, 's2.we', 6, 's2.w')
- end
- t.item_text(item_i, 3, subject, 4, from, 5, sent, 6, size)
- }
-
- # Do something when the selection changes
- t.notify_bind(t, 'Selection',
- proc{|w|
- if w.selection_count == 1
- # One item is selected
- if @Message[:afterId][:id]
- Tk.after_cancel(@Message[:afterId][:id])
- end
- @Message[:afterId][:item] = w.selection_get[0]
- @Message[:afterId][:id] = Tk.after(500, proc{
- messageReadDelayed(w)
- })
- end
- }, '%T')
-end
-
-def messageReadDelayed(t)
- @Message[:afterId].delete(:id)
- i = @Message[:afterId][:item]
- return unless t.selection_includes(i)
-
- # This message is not read
- unless @Message[:read][i]
- # Read the message
- t.item_state_set(i, 'read')
- @Message[:read][i] = true
-
- # Check ancestors (except root)
- t.item_ancestors(i)[0..-2].each{|i2|
- # This ancestor has no more unread descendants
- t.item_state_set(i2, '!unread') unless anyUnreadDescendants(t, i2)
- }
- end
-end
-
-# Alternate implementation which does not rely on run-time states
-def demoOutlookNewsgroup2(t)
- init_pics('outlook-*')
-
- height = t.font.metrics(:linespace)
- height = 18 if height < 18
- t.configure(:itemheight=>height, :selectmode=>:browse, :showlines=>false,
- :showroot=>false, :showrootbutton=>false, :showbuttons=>true)
-
- if $Version_1_1_OrLater
- t.column_create(:image=>@images['outlook-clip'], :tag=>'clip')
- t.column_create(:image=>@images['outlook-arrow'], :tag=>'arrow')
- t.column_create(:image=>@images['outlook-watch'], :tag=>'watch')
- t.column_create(:text=>'Subject', :width=>250, :tag=>'subject')
- t.column_create(:text=>'From', :width=>150, :tag=>'from')
- t.column_create(:text=>'Sent', :width=>150, :tag=>'sent')
- t.column_create(:text=>'Size', :width=>60, :justify=>:right, :tag=>'size')
- else # TreeCtrl 1.0
- t.column_configure(0, :image=>@images['outlook-clip'], :tag=>'clip')
- t.column_configure(1, :image=>@images['outlook-arrow'], :tag=>'arrow')
- t.column_configure(2, :image=>@images['outlook-watch'], :tag=>'watch')
- t.column_configure(3, :text=>'Subject', :width=>250, :tag=>'subject')
- t.column_configure(4, :text=>'From', :width=>150, :tag=>'from')
- t.column_configure(5, :text=>'Sent', :width=>150, :tag=>'sent')
- t.column_configure(6, :text=>'Size', :width=>60, :justify=>:right,
- :tag=>'size')
- end
-
- t.treecolumn = 3
-
- t.element_create('image.unread', :image, :image=>@images['outlook-unread'])
- t.element_create('image.read', :image, :image=>@images['outlook-read'])
- t.element_create('image.read2', :image, :image=>@images['outlook-read-2'])
- t.element_create('text.read', :text, :lines=>1,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('text.unread', :text, :lines=>1,
- :fill=>[@SystemHighlightText, ['selected', 'focus']],
- :font=>t.font.dup.weight(:bold))
- t.element_create('sel.e', :rect, :open=>:e, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
- t.element_create('sel.w', :rect, :open=>:w, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
- t.element_create('sel.we', :rect, :open=>:we, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
-
- # Image + text
- s = t.style_create('unread')
- t.style_elements(s, ['sel.e', 'image.unread', 'text.unread'])
- t.style_layout(s, 'image.unread', :expand=>:ns)
- t.style_layout(s, 'text.unread', :padx=>[2,6], :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.e', :union=>['text.unread'],
- :iexpand=>:nes, :ipadx=>[2,0])
-
- # Image + text
- s = t.style_create('read')
- t.style_elements(s, ['sel.e', 'image.read', 'text.read'])
- t.style_layout(s, 'image.read', :expand=>:ns)
- t.style_layout(s, 'text.read', :padx=>[2,6], :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.e', :union=>['text.read'],
- :iexpand=>:nes, :ipadx=>[2,0])
-
- # Image + text
- s = t.style_create('read2')
- t.style_elements(s, ['sel.e', 'image.read2', 'text.unread'])
- t.style_layout(s, 'image.read2', :expand=>:ns)
- t.style_layout(s, 'text.unread', :padx=>[2,6], :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.e', :union=>['text.unread'],
- :iexpand=>:nes, :ipadx=>[2,0])
-
- # Text
- s = t.style_create('unread.we')
- t.style_elements(s, ['sel.we', 'text.unread'])
- t.style_layout(s, 'text.unread', :padx=>6, :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.we', :detach=>true, :iexpand=>:es)
-
- # Text
- s = t.style_create('read.we')
- t.style_elements(s, ['sel.we', 'text.read'])
- t.style_layout(s, 'text.read', :padx=>6, :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.we', :detach=>true, :iexpand=>:es)
-
- # Text
- s = t.style_create('unread.w')
- t.style_elements(s, ['sel.w', 'text.unread'])
- t.style_layout(s, 'text.unread', :padx=>6, :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.w', :detach=>true, :iexpand=>:es)
-
- # Text
- s = t.style_create('read.w')
- t.style_elements(s, ['sel.w', 'text.read'])
- t.style_layout(s, 'text.read', :padx=>6, :squeeze=>:x, :expand=>:ns)
- t.style_layout(s, 'sel.w', :detach=>true, :iexpand=>:es)
-
- msgCnt = 100
- thread = 0
-
- @Message = Hash.new{|k, v| k[v] = Hash.new}
- @Message[:count][0] = 0
-
- (1...(msgCnt)).each{|i|
- t.item_create
- j = nil
- loop {
- j = rand(i)
- break if j == 0
- next if t.depth(j) == 5
- next if @Message[:count][@Message[:thread][j]] == 15
- break
- }
- t.item_lastchild(j, i)
-
- @Message[:read][i] = (rand(2) == 0)
- if j == 0
- thread += 1
- @Message[:thread][i] = thread
- @Message[:seconds][i] = (Tk::Clock.seconds - rand(500000))
- @Message[:seconds2][i] = @Message[:seconds][i]
- @Message[:count][thread] = 1
- else
- @Message[:thread][i] = @Message[:thread][j]
- @Message[:seconds][i] = (@Message[:seconds2][j] + rand(10000))
- @Message[:seconds2][i] = @Message[:seconds][i]
- @Message[:seconds2][j] = @Message[:seconds][i]
- @Message[:count][@Message[:thread][j]] += 1
- end
- }
-
- (1...(msgCnt)).each{|i|
- subject = "This is thread number #{@Message[:thread][i]}"
- from = 'somebody@somewhere.net'
- sent = Tk::Clock.format(@Message[:seconds][i], "%d/%m/%y %I:%M %p")
- size = "#{1 + rand(10)}KB"
- if @Message[:read][i]
- style = 'read'
- style2 = 'read2'
- else
- style = 'unread'
- style2 = 'unread2'
- end
- t.item_style_set(i, 3, style, 4, "#{style2}.we", 5, "#{style2}.we",
- 6, "#{style2}.w")
- t.item_text(i, 3, subject, 4, from, 5, sent, 6, size)
- if t.item_numchildren(i) > 0
- t.item_configure(item_i, :button=>true)
- end
- }
-
- # Do something when the selection changes
- t.notify_bind(t, 'Selection',
- proc{|w|
- if w.selection_count == 1
- i = t.selection_get[0]
- unless @Message[:read][i]
- if t.item_isopen(i) || !anyUnreadDescendants(t, i)
- # unread -> read
- t.item_style_map(i, 'subject', 'read',
- ['text.unread', 'text.read'])
- t.item_style_map(i, 'from', 'read.we',
- ['text.unread', 'text.read'])
- t.item_style_map(i, 'sent', 'read.we',
- ['text.unread', 'text.read'])
- t.item_style_map(i, 'size', 'read.w',
- ['text.unread', 'text.read'])
- else
- # unread -> read2
- t.item_style_map(i, 'subject', 'read2',
- ['text.unread', 'text.unread'])
- end
-
- @Message[:read][i] = true
- @display_styles_in_item.call(i)
- end
- end
- }, '%T')
-
- t.notify_bind(t, 'Expand-after',
- proc{|w, i|
- if @Message[:read][i] && anyUnreadDescendants(t, i)
- # read2 -> read
- t.item_style_map(i, 'subject', 'read',
- ['text.unread', 'text.read'])
- # unread -> read
- t.item_style_map(i, 'from', 'read.we',
- ['text.unread', 'text.read'])
- t.item_style_map(i, 'sent', 'read.we',
- ['text.unread', 'text.read'])
- t.item_style_map(i, 'size', 'read.w',
- ['text.unread', 'text.read'])
- end
- }, '%T %I')
-
- t.notify_bind(t, 'Collapse-after',
- proc{|w, i|
- if @Message[:read][i] && anyUnreadDescendants(t, i)
- # read -> read2
- t.item_style_map(i, 'subject', 'read2',
- ['text.read', 'text.unread'])
- # read -> unread
- t.item_style_map(i, 'from', 'unread.we',
- ['text.read', 'text.unread'])
- t.item_style_map(i, 'sent', 'unread.we',
- ['text.read', 'text.unread'])
- t.item_style_map(i, 'size', 'unread.w',
- ['text.read', 'text.unread'])
- end
- }, '%T %I')
-
- (1...(msgCnt)).each{|i|
- if rand(2) == 0
- if t.item_numchildren(i) > 0
- if $Version_1_1_OrLater
- t.item_collapse(i)
- else # TreeCtrl 1.0
- t.collapse(i)
- end
- end
- end
- }
-end
-
-def anyUnreadDescendants(t, i)
- itemList = []
- item = t.item_firstchild(i)
- itemList.push(item) if item != ''
-
- while item = itemList.pop
- return true unless @Message[:read][item]
-
- item2 = t.item_nextsibling(item)
- itemList.push(item2) if item2 != ''
- item2 = t.item_firstchild(item)
- itemList.push(item2) if item2 != ''
- end
- false
-end
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/big-dll.gif b/ext/tk/sample/tkextlib/treectrl/pics/big-dll.gif
deleted file mode 100644
index 09170c0e26..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/big-dll.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/big-exe.gif b/ext/tk/sample/tkextlib/treectrl/pics/big-exe.gif
deleted file mode 100644
index e19aac1a2d..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/big-exe.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/big-file.gif b/ext/tk/sample/tkextlib/treectrl/pics/big-file.gif
deleted file mode 100644
index 6c752312a3..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/big-file.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/big-folder.gif b/ext/tk/sample/tkextlib/treectrl/pics/big-folder.gif
deleted file mode 100644
index 186c9749fd..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/big-folder.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/big-txt.gif b/ext/tk/sample/tkextlib/treectrl/pics/big-txt.gif
deleted file mode 100644
index a93492586e..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/big-txt.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/checked.gif b/ext/tk/sample/tkextlib/treectrl/pics/checked.gif
deleted file mode 100644
index 3b9b176ab3..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/checked.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/file.gif b/ext/tk/sample/tkextlib/treectrl/pics/file.gif
deleted file mode 100644
index a64c2a06bd..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/file.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/folder-closed.gif b/ext/tk/sample/tkextlib/treectrl/pics/folder-closed.gif
deleted file mode 100644
index 0a064376c9..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/folder-closed.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/folder-open.gif b/ext/tk/sample/tkextlib/treectrl/pics/folder-open.gif
deleted file mode 100644
index 3fac27ffd9..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/folder-open.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/help-book-closed.gif b/ext/tk/sample/tkextlib/treectrl/pics/help-book-closed.gif
deleted file mode 100644
index 0a0497bfa3..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/help-book-closed.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/help-book-open.gif b/ext/tk/sample/tkextlib/treectrl/pics/help-book-open.gif
deleted file mode 100644
index 40656c5194..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/help-book-open.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/help-page.gif b/ext/tk/sample/tkextlib/treectrl/pics/help-page.gif
deleted file mode 100644
index e1ce1d72f5..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/help-page.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/imovie-01.gif b/ext/tk/sample/tkextlib/treectrl/pics/imovie-01.gif
deleted file mode 100644
index 5fd9215551..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/imovie-01.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/imovie-02.gif b/ext/tk/sample/tkextlib/treectrl/pics/imovie-02.gif
deleted file mode 100644
index 3d2d1c17c2..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/imovie-02.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/imovie-03.gif b/ext/tk/sample/tkextlib/treectrl/pics/imovie-03.gif
deleted file mode 100644
index 9fccf12b51..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/imovie-03.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/imovie-04.gif b/ext/tk/sample/tkextlib/treectrl/pics/imovie-04.gif
deleted file mode 100644
index eff851c9bb..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/imovie-04.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/imovie-05.gif b/ext/tk/sample/tkextlib/treectrl/pics/imovie-05.gif
deleted file mode 100644
index ad00c827f6..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/imovie-05.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/imovie-06.gif b/ext/tk/sample/tkextlib/treectrl/pics/imovie-06.gif
deleted file mode 100644
index 238bf162ac..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/imovie-06.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/imovie-07.gif b/ext/tk/sample/tkextlib/treectrl/pics/imovie-07.gif
deleted file mode 100644
index a9287e1b1c..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/imovie-07.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/internet-check-off.gif b/ext/tk/sample/tkextlib/treectrl/pics/internet-check-off.gif
deleted file mode 100644
index e64866a394..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/internet-check-off.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/internet-check-on.gif b/ext/tk/sample/tkextlib/treectrl/pics/internet-check-on.gif
deleted file mode 100644
index cf652beff2..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/internet-check-on.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/internet-print.gif b/ext/tk/sample/tkextlib/treectrl/pics/internet-print.gif
deleted file mode 100644
index 7ac25b10e9..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/internet-print.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/internet-radio-off.gif b/ext/tk/sample/tkextlib/treectrl/pics/internet-radio-off.gif
deleted file mode 100644
index 90ef62971f..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/internet-radio-off.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/internet-radio-on.gif b/ext/tk/sample/tkextlib/treectrl/pics/internet-radio-on.gif
deleted file mode 100644
index 9de742c198..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/internet-radio-on.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/internet-search.gif b/ext/tk/sample/tkextlib/treectrl/pics/internet-search.gif
deleted file mode 100644
index 1f9a047701..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/internet-search.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/internet-security.gif b/ext/tk/sample/tkextlib/treectrl/pics/internet-security.gif
deleted file mode 100644
index 86d3943786..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/internet-security.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/mac-collapse.gif b/ext/tk/sample/tkextlib/treectrl/pics/mac-collapse.gif
deleted file mode 100644
index 81302c80c1..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/mac-collapse.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/mac-expand.gif b/ext/tk/sample/tkextlib/treectrl/pics/mac-expand.gif
deleted file mode 100644
index 0a2cd80040..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/mac-expand.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-arrow.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-arrow.gif
deleted file mode 100644
index b1c2afd426..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-arrow.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-clip.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-clip.gif
deleted file mode 100644
index 8578132702..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-clip.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-deleted.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-deleted.gif
deleted file mode 100644
index 7cc8369b4b..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-deleted.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-draft.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-draft.gif
deleted file mode 100644
index f19585050f..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-draft.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-folder.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-folder.gif
deleted file mode 100644
index b3f733563b..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-folder.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-group.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-group.gif
deleted file mode 100644
index 29ad9b466e..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-group.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-inbox.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-inbox.gif
deleted file mode 100644
index f41d804444..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-inbox.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-local.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-local.gif
deleted file mode 100644
index 0c74970d32..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-local.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-main.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-main.gif
deleted file mode 100644
index 92325fa85f..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-main.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-outbox.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-outbox.gif
deleted file mode 100644
index c7e80527a0..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-outbox.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-read-2.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-read-2.gif
deleted file mode 100644
index 2f15a3af05..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-read-2.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-read.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-read.gif
deleted file mode 100644
index a6f956207a..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-read.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-sent.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-sent.gif
deleted file mode 100644
index 963b56c4c9..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-sent.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-server.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-server.gif
deleted file mode 100644
index c950845d62..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-server.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-unread.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-unread.gif
deleted file mode 100644
index 3df4b99439..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-unread.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/outlook-watch.gif b/ext/tk/sample/tkextlib/treectrl/pics/outlook-watch.gif
deleted file mode 100644
index 87ec861312..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/outlook-watch.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/sky.gif b/ext/tk/sample/tkextlib/treectrl/pics/sky.gif
deleted file mode 100644
index b7fbf14a0a..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/sky.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/small-dll.gif b/ext/tk/sample/tkextlib/treectrl/pics/small-dll.gif
deleted file mode 100644
index d8875ec23f..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/small-dll.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/small-exe.gif b/ext/tk/sample/tkextlib/treectrl/pics/small-exe.gif
deleted file mode 100644
index 69d30beacd..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/small-exe.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/small-file.gif b/ext/tk/sample/tkextlib/treectrl/pics/small-file.gif
deleted file mode 100644
index f340662879..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/small-file.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/small-folder.gif b/ext/tk/sample/tkextlib/treectrl/pics/small-folder.gif
deleted file mode 100644
index ad1b24da84..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/small-folder.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/small-txt.gif b/ext/tk/sample/tkextlib/treectrl/pics/small-txt.gif
deleted file mode 100644
index cdc7cbfe99..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/small-txt.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/pics/unchecked.gif b/ext/tk/sample/tkextlib/treectrl/pics/unchecked.gif
deleted file mode 100644
index 833e48268b..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/pics/unchecked.gif
+++ /dev/null
Binary files differ
diff --git a/ext/tk/sample/tkextlib/treectrl/random.rb b/ext/tk/sample/tkextlib/treectrl/random.rb
deleted file mode 100644
index 33bbcc2631..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/random.rb
+++ /dev/null
@@ -1,509 +0,0 @@
-# frozen_string_literal: false
-#
-def random_N
- @RandomN[0] || 500
-end
-
-#
-# Demo: random N items
-#
-def demoRandom(t)
- init_pics('folder-*', 'small-*')
-
- height = t.font.metrics(:linespace)
- height = 18 if height < 18
- t.configure(:itemheight=>height, :selectmode=>:extended,
- :showroot=>true, :showrootbutton=>true, :showbuttons=>true,
- :showlines=>true, :scrollmargin=>16,
- :xscrolldelay=>[500, 50], :yscrolldelay=>[500, 50])
-
- if $Version_1_1_OrLater
- t.column_create(:expand=>true, :text=>'Item',
- :itembackground=>['#e0e8f0', []], :tag=>'item')
- t.column_create(:text=>'Parent', :justify=>:center,
- :itembackground=>['gray90', []], :tag=>'parent')
- t.column_create(:text=>'Depth', :justify=>:center,
- :itembackground=>['linen', []], :tag=>'depth')
- else # TreeCtrl 1.0
- t.column_configure(0, :expand=>true, :text=>'Item',
- :itembackground=>['#e0e8f0', []], :tag=>'item')
- t.column_configure(1, :text=>'Parent', :justify=>:center,
- :itembackground=>['gray90', []], :tag=>'parent')
- t.column_configure(2, :text=>'Depth', :justify=>:center,
- :itembackground=>['linen', []], :tag=>'depth')
- end
-
- t.element_create('e1', :image, :image=>[
- @images['folder-open'], ['open'],
- @images['folder-closed'], []
- ])
- t.element_create('e2', :image, :image=>@images['small-file'])
- t.element_create('e3', :text,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('e4', :text, :fill=>'blue')
- t.element_create('e6', :text)
- t.element_create('e5', :rect, :showfocus=>true,
- :fill=>[
- @SystemHighlight, ['selected', 'focus'],
- 'gray', ['selected', '!focus']
- ])
-
- s = t.style_create('s1')
- t.style_elements(s, ['e5', 'e1', 'e3', 'e4'])
- t.style_layout(s, 'e1', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e3', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e4', :padx=>[0,6], :expand=>:ns)
- t.style_layout(s, 'e5', :union=>['e3'], :iexpand=>:ns, :ipadx=>2)
-
- s = t.style_create('s2')
- t.style_elements(s, ['e5', 'e2', 'e3'])
- t.style_layout(s, 'e2', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e3', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e5', :union=>['e3'], :iexpand=>:ns, :ipadx=>2)
-
- s = t.style_create('s3')
- t.style_elements(s, ['e6'])
- t.style_layout(s, 'e6', :padx=>6, :expand=>:ns)
-
- @Priv[:sensitive, t] = [
- [:item, 's1', 'e5', 'e1', 'e3'],
- [:item, 's2', 'e5', 'e2', 'e3']
- ]
- @Priv[:dragimage, t] = [
- [:item, 's1', 'e1', 'e3'],
- [:item, 's2', 'e2', 'e3']
- ]
-
- clicks = Tk::Clock.clicks
- items = [ t.index(:root) ]
- (1...(random_N())).each{|i|
- item_i = t.item_create
- item_j = nil
- loop {
- j = rand(i)
- item_j = items[j]
- break if t.depth(item_j) < 5
- }
- if $Version_1_1_OrLater
- t.item_collapse(item_i) if rand(2) == 0
- else # TreeCtrl 1.0
- t.collapse(item_i) if rand(2) == 0
- end
- if rand(2) == 0
- t.item_lastchild(item_j, item_i)
- else
- t.item_firstchild(item_j, item_i)
- end
- items << item_i
- }
- puts "created #{random_N() - 1} items in #{Tk::Clock.clicks - clicks} clicks"
-
- clicks = Tk::Clock.clicks
- (0...(random_N())).each{|i|
- item_i = items[i]
- numChildren = t.item_numchildren(item_i)
- if numChildren > 0
- if $Version_1_1_OrLater
- t.item_configure(item_i, :button=>true)
- else # TreeCtrl 1.0
- t.item_hasbutton(item_i, true)
- end
- t.item_style_set(item_i, 0, 's1', 1, 's3', 2, 's3')
- t.item_complex(item_i,
- [ ['e3', {:text=>"Item #{i}"}],
- ['e4', {:text=>"(#{numChildren})"}] ],
- [ ['e6', {:text=>"#{t.item_parent(item_i)}"}] ],
- [ ['e6', {:text=>"#{t.depth(item_i)}"}] ])
- else
- t.item_style_set(item_i, 1, 's3', 2, 's3', 0, 's2')
- t.item_complex(item_i,
- [ ['e3', {:text=>"Item #{i}"}] ],
- [ ['e6', {:text=>"#{t.item_parent(item_i)}"}] ],
- [ ['e6', {:text=>"#{t.depth(item_i)}"}] ])
- end
- }
- puts "configured #{random_N()} items in #{Tk::Clock.clicks - clicks} clicks"
-
- treeCtrlRandom = TkBindTag.new
-
- treeCtrlRandom.bind('Double-ButtonPress-1',
- proc{|w, x, y|
- Tk::TreeCtrl::BindCallback.doubleButton1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlRandom.bind('Control-ButtonPress-1',
- proc{|w, x, y|
- @Priv['selectMode'] = :toggle
- randomButton1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlRandom.bind('Shift-ButtonPress-1',
- proc{|w, x, y|
- @Priv['selectMode'] = :add
- randomButton1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlRandom.bind('ButtonPress-1',
- proc{|w, x, y|
- @Priv['selectMode'] = :set
- randomButton1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlRandom.bind('Button1-Motion',
- proc{|w, x, y|
- randomMotion1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlRandom.bind('Button1-Leave',
- proc{|w, x, y|
- randomLeave1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- treeCtrlRandom.bind('ButtonRelease-1',
- proc{|w, x, y|
- randomRelease1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- t.bindtags = [ t, treeCtrlRandom, Tk::TreeCtrl, t.winfo_toplevel, :all ]
-end
-
-def randomButton1(t, x, y)
- t.set_focus
- id = t.identify(x, y)
- puts id.inspect
- @Priv['buttonMode'] = ''
-
- # Click outside any item
- if id.empty?
- t.selection_clear
-
- # Click in header
- elsif id[0] == 'header'
- Tk::TreeCtrl::BindCallback.buttonPress1(t, x, y)
-
- # Click in item
- else
- where, item, arg1, arg2, arg3, arg4 = id
- case arg1
- when 'button'
- if $Version_1_1_OrLater
- t.item_toggle(item)
- else # TreeCtrl 1.0
- t.toggle(item)
- end
-
- when 'line'
- if $Version_1_1_OrLater
- t.item_toggle(arg2)
- else # TreeCtrl 1.0
- t.toggle(arg2)
- end
-
- when 'column'
- ok = false
- # Clicked an element
- if id.length == 6
- column = id[3]
- e = id[5]
- @Priv.list_element(:sensitive, t).each{|lst|
- c, s, *eList = TkComm.simplelist(lst)
- next if column != t.column_index(c)
- next if t.item_style_set(item, c) != s
- next if eList.find{|le| le == e} == nil
- ok = true
- break
- }
- end
- unless ok
- t.selection_clear
- return
- end
-
- @Priv[:drag, :motion] = 0
- @Priv[:drag, :x] = t.canvasx(x)
- @Priv[:drag, :y] = t.canvasy(y)
- @Priv[:drop] = ''
-
- if @Priv['selectMode'] == 'add'
- Tk::TreeCtrl::BindCallback.beginExtend(t, item)
- elsif @Priv['selectMode'] == 'toggle'
- Tk::TreeCtrl::BindCallback.beginToggle(t, item)
- elsif ! t.selection_includes(item)
- Tk::TreeCtrl::BindCallback.beginSelect(t, item)
- end
- t.activate(item)
-
- if t.selection_includes(item)
- @Priv['buttonMode'] = 'drag'
- end
- end
- end
-end
-
-def randomMotion1(t, x, y)
- case @Priv['buttonMode']
- when 'resize', 'header'
- Tk::TreeCtrl::BindCallback.motion1(t, x, y)
- when 'drag'
- randomAutoScanCheck(t, x, y)
- randomMotion(t, x, y)
- end
-end
-
-def randomMotion(t, x, y)
- case @Priv['buttonMode']
- when 'resize', 'header'
- Tk::TreeCtrl::BindCallback.motion1(t, x, y)
-
- when 'drag'
- # Detect initial mouse movement
- unless @Priv.bool_element(:drag, :motion)
- @Priv[:selection] = t.selection_get
- @Priv[:drop] = ''
- t.dragimage_clear
- # For each selected item, add 2nd and 3rd elements of
- # column "item" to the dragimage
- @Priv.list_element(:selection).each{|i|
- @Priv.list_element(:dragimage,t).each{|lst|
- c, s, *eList = TkComm.simplelist(lst)
- if t.item_style_set(i, c) == s
- t.dragimage_add(i, c, *eList)
- end
- }
- }
- @Priv[:drag,:motion] = true
- end
-
- # Find the item under the cursor
- cursor = 'X_cursor'
- drop = ''
- id = t.identify(x, y)
- ok = false
- if !id.empty? && id[0] == 'item' && id.length == 6
- item = id[1]
- column = id[3]
- e = id[5]
- @Priv.list_element(:sensitive,t).each{|lst|
- c, s, *eList = TkComm.simplelist(lst)
- next if column != t.column_index(c)
- next if t.item_style_set(item, c) != s
- next unless eList.find{|val| val.to_s == e.to_s}
- ok = true
- break
- }
- ok = true if @Priv.list_element(:sensitive,t).find{|val| TkComm.simplelist(val).index(e)}
- end
-
- if ok
- # If the item is not in the pre-drag selection
- # (i.e. not being dragged) see if we can drop on it
- unless @Priv.list_element(:selection).find{|val| val.to_s == item.to_s}
- drop = item
- # We can drop if dragged item isn't an ancestor
- @Priv.list_element(:selection).each{|item2|
- if t.item_isancestor(item2, item)
- drop = ''
- break
- end
- }
- if drop != ''
- x1, y1, x2, y2 = t.item_bbox(drop)
- if y < y1 + 3
- cursor = 'top_side'
- @Priv[:drop,:pos] = 'prevsibling'
- elsif y >= y2 - 3
- cursor = 'bottom_side'
- @Priv[:drop,:pos] = 'nextsibling'
- else
- cursor = ''
- @Priv[:drop,:pos] = 'lastchild'
- end
- end
- end
- end
-
- t[:cursor] = cursor if t[:cursor] != cursor
-
- # Select the item under the cursor (if any) and deselect
- # the previous drop-item (if any)
- t.selection_modify(drop, @Priv[:drop])
- @Priv[:drop] = drop
-
- # Show the dragimage in its new position
- x = t.canvasx(x) - @Priv.numeric_element(:drag,:x)
- y = t.canvasx(y) - @Priv.numeric_element(:drag,:y)
- t.dragimage_offset(x, y)
- t.dragimage_configure(:visible=>true)
- end
-end
-
-def randomLeave1(t, x, y)
- # This is called when I do ButtonPress-1 on Unix for some reason,
- # and buttonMode is undefined.
- return unless @Priv.exist?('buttonMode')
- case @Priv['buttonMode']
- when 'header'
- Tk::TreeCtrl::BindCallback.leave1(t, x, y)
- end
-end
-
-def randomRelease1(t, x, y)
- case @Priv['buttonMode']
- when 'resize', 'header'
- Tk::TreeCtrl::BindCallback.release1(t, x, y)
- when 'drag'
- Tk::TreeCtrl::BindCallback.autoScanCancel(t)
- t.dragimage_configure(:visible=>false)
- t.selection_modify('', @Priv[:drop])
- t[:cursor] = ''
- if @Priv[:drop] != ''
- randomDrop(t, @Priv[:drop], @Priv.list_element(:selection),
- @Priv[:drop, :pos])
- end
- end
- @Priv['buttonMode'] = ''
-end
-
-def randomDrop(t, target, src, pos)
- parentList = []
- case pos
- when 'lastchild'
- parent = target
- when 'prevsibling'
- parent = t.item_parent(target)
- when 'nextsibling'
- parent = t.item_parent(target)
- end
- src.each{|item|
- # Ignore any item whose ancestor is also selected
- ignore = false
- t.item_ancestors(item).each{|ancestor|
- if src.find{|val| val.to_s == ancestor.to_s}
- ignore = true
- break
- end
- }
- next if ignore
-
- # Update the old parent of this moved item later
- unless parentList.find{|val| val.to_s == item.to_s}
- parentList << t.item_parent(item)
- end
-
- # Add to target
- t.__send__("item_#{pos}", target, item)
-
- # Update text: parent
- t.item_element_configure(item, 'parent', 'e6', :text=>parent)
-
- # Update text: depth
- t.item_element_configure(item, 'depth', 'e6', :text=>t.depth(item))
-
- # Recursively update text: depth
- itemList = []
- item = t.item_firstchild(item)
- itemList << item if item != ''
-
- while item = itemList.pop
- t.item_element_configure(item, 'depth', 'e6', :text=>t.depth(item))
-
- item2 = t.item_nextsibling(item)
- itemList << item2 if item2 != ''
-
- item2 = t.item_firstchild(item)
- itemList << item2 if item2 != ''
- end
- }
-
- # Update items that lost some children
- parentList.each{|item|
- numChildren = t.item_numchildren(item)
- if numChildren == 0
- if $Version_1_1_OrLater
- t.item_configure(item, :button=>false)
- else # TreeCtrl 1.0
- t.item_hasbutton(item, false)
- end
- t.item_style_map(item, 'item', 's2', ['e3', 'e3'])
- else
- t.item_element_configure(item, 'item', 'e4', :text=>"(#{numChildren})")
- end
- }
-
- # Update the target that gained some children
- if t.item_style_set(parent, 0) != 's1'
- if $Version_1_1_OrLater
- t.item_configure(parent, :button=>true)
- else # TreeCtrl 1.0
- t.item_hasbutton(parent, true)
- end
- t.item_style_map(parent, 'item', 's1', ['e3', 'e3'])
- end
- numChildren = t.item_numchildren(parent)
- t.item_element_configure(parent, 'item', 'e4', :text=>"(#{numChildren})")
-end
-
-# Same as TreeCtrl::AutoScanCheck, but calls RandomMotion and
-# RandomAutoScanCheckAux
-def randomAutoScanCheck(t, x, y)
- x1, y1, x2, y2 = t.contentbox
- margin = t.winfo_pixels(t.scrollmargin)
- if x < x1 + margin || x >= x2 - margin || y < y1 + margin || y >= y2 - margin
- if ! @Priv.exist?(:autoscan, :afterId, t)
- if y >= y2 - margin
- t.yview(:scroll, 1, :units)
- delay = t.yscrolldelay
- elsif y < y1 + margin
- t.yview(:scroll, -1, :units)
- delay = t.yscrolldelay
- elsif x >= x2 - margin
- t.xview(:scroll, 1, :units)
- delay = t.xscrolldelay
- elsif x < x1 + margin
- t.xview(:scroll, -1, :units)
- delay = t.xscrolldelay
- end
- if @Priv.exist?(:autoscan, :scanning, t)
- delay = delay[1] if delay.kind_of?(Array)
- else
- delay = delay[0] if delay.kind_of?(Array)
- @Priv[:autoscan, :scanning, t] = true
- end
- case @Priv['buttonMode']
- when 'drag', 'marquee'
- randomMotion(t, x, y)
- end
- @Priv[:autoscan, :afterId, t] =
- Tk.after(delay, proc{ randomAutoScanCheckAux(t) })
- end
- return
- end
- Tk::TreeCtrl::BindCallback.autoScanCancel(t)
-end
-
-def randomAutoScanCheckAux(t)
- @Priv.unset(:autoscan, :afterId, t)
- x = t.winfo_pointerx - t.winfo_rootx
- y = t.winfo_pointery - t.winfo_rooty
- randomAutoScanCheck(t, x, y)
-end
-
-#
-# Demo: random N items, button images
-#
-def demoRandom2(t)
- demoRandom(t)
-
- init_pics('mac-*')
-
- t.configure(:openbuttonimage=>@images['mac-collapse'],
- :closedbuttonimage=>@images['mac-expand'],
- :showlines=>false)
-end
diff --git a/ext/tk/sample/tkextlib/treectrl/readme.txt b/ext/tk/sample/tkextlib/treectrl/readme.txt
deleted file mode 100644
index 81e13b24aa..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-The scripts and image files in this directory are based on demo files
-of Tcl/Tk's TreeCtrl extension.
diff --git a/ext/tk/sample/tkextlib/treectrl/www-options.rb b/ext/tk/sample/tkextlib/treectrl/www-options.rb
deleted file mode 100644
index 81f5349abc..0000000000
--- a/ext/tk/sample/tkextlib/treectrl/www-options.rb
+++ /dev/null
@@ -1,304 +0,0 @@
-# frozen_string_literal: false
-def demoInternetOptions (t)
- @Option = TkVarAccess.new_hash('::Option')
-
- height = t.font.metrics(:linespace) + 2
- height = 18 if height < 18
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :itemheight=>height, :selectmode=>:browse)
-
- init_pics('internet-*')
-
- if $HasColumnCreate
- t.column_create(:text=>'Internet Options')
- else
- t.column_configure(0, :text=>'Internet Options')
- end
-
- t.state_define('check')
- t.state_define('radio')
- t.state_define('on')
-
- t.element_create('e1', :image, :image=>[
- @images['internet-check-on'], ['check', 'on'],
- @images['internet-check-off'], ['check'],
- @images['internet-radio-on'], ['radio', 'on'],
- @images['internet-radio-off'], ['radio']
- ])
- t.element_create('e2', :text,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('e3', :rect, :showfocus=>true,
- :fill=>[@SystemHighlight, ['selected', 'focus']])
-
- s = t.style_create('s1')
- t.style_elements(s, ['e3', 'e1', 'e2'])
- t.style_layout(s, 'e1', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e2', :expand=>:ns)
- t.style_layout(s, 'e3', :union=>['e2'], :iexpand=>:ns, :ipadx=>2)
-
- parentList = [:root, '', '', '', '', '', '']
- parent = :root
- [
- [0, :print, "Printing", "", ""],
- [1, :off, "Print background colors and images", "o1", ""],
- [0, :search, "Search from Address bar", "", ""],
- [1, :search, "When searching", "", ""],
- [2, :off, "Display results, and go to the most likely sites",
- "o2", "r1"],
- [2, :off, "Do not search from the Address bar", "o3", "r1"],
- [2, :off, "Just display the results in the main window",
- "o4", "r1"],
- [2, :on, "Just go to the most likely site", "o5", "r1"],
- [0, :security, "Security", "", ""],
- [1, :on, "Check for publisher's certificate revocation", "o5", ""],
- [1, :off, "Check for server certificate revocation (requires restart)",
- "o6", ""]
- ].each{|depth, setting, text, option, group|
- item = t.item_create()
- t.item_style_set(item, 0, 's1')
- t.item_element_configure(item, 0, 'e2', :text=>text)
- @Option[:option, item] = option
- @Option[:group, item] = group
- if setting == :on || setting == :off
- @Option[:setting, item] = setting
- if group == ''
- t.item_state_set(item, 'check')
- if setting == :on
- t.item_state_set(item, 'on')
- end
- else
- if setting == :on
- @Option[:current, group] = item
- t.item_state_set(item, 'on')
- end
- t.item_state_set(item, 'radio')
- end
- else
- t.item_element_configure(item, 0, 'e1',
- :image=>@images["internet-#{setting}"])
- end
- t.item_lastchild(parentList[depth], item)
- depth += 1
- parentList[depth] = item
- }
-
- treeCtrlOption = TkBindTag.new
- treeCtrlOption.bind('Double-ButtonPress-1', proc{|w, x, y|
- Tk::TreeCtrl::BindCallback.doubleButton1(w, x, y)
- }, '%W %x %y')
- treeCtrlOption.bind('ButtonPress-1', proc{|w, x, y|
- optionButton1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
- treeCtrlOption.bind('Button1-Motion', proc{|w, x, y|
- optionMotion1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
- treeCtrlOption.bind('Button1-Leave', proc{|w, x, y|
- optionLeave1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
- treeCtrlOption.bind('ButtonRelease-1', proc{|w, x, y|
- optionRelease1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- t.bindtags = [
- t, treeCtrlOption, Tk::TreeCtrl, t.winfo_toplevel, TkBindTag::ALL
- ]
-end
-
-def optionButton1(w, x, y)
- w.set_focus
- id = w.identify(x, y)
- if id[0] == 'header'
- Tk::TreeCtrl::BindCallback.buttonPress1(w, x, y)
- elsif id.empty?
- @Priv['buttonMode'] = ''
- else
- @Priv['buttonMode'] = ''
- item = id[1]
- w.selection_modify(item, :all)
- w.activate(item)
- return if @Option[:option, item] == ''
- group = @Option[:group, item]
- if group == ''
- # a checkbutton
- w.item_state_set(item, '~on')
- if @Option[:setting, item] == 'on'
- setting = :off
- else
- setting = :on
- end
- @Option[:setting, item] = setting
- else
- # a radiobutton
- current = @Option[:current, group]
- return if current == item.to_s
- w.item_state_set(current, '!on')
- w.item_state_set(item, 'on')
- @Option[:setting, item] = :on
- @Option[:current, group] = item
- end
- end
-end
-
-# Alternate implementation that doesn't rely on run-time styles
-def demoInternetOptions_2(t)
- height = t.font.metrics(:linespace) + 2
- height = 18 if height < 18
- t.configure(:showroot=>false, :showbuttons=>false, :showlines=>false,
- :itemheight=>height, :selectmode=>:browse)
-
- init_pics('internet-*')
-
- t.column_configure(0, :text=>'Internet Options')
-
- t.element_create('e1', :image)
- t.element_create('e2', :text,
- :fill=>[@SystemHighlightText, ['selected', 'focus']])
- t.element_create('e3', :rect, :showfocus=>true,
- :fill=>[@SystemHighlight, ['selected', 'focus']])
-
- s = t.style_create('s1')
- t.style_elements('s1', ['e3', 'e1', 'e2'])
- t.style_layout(s, 'e1', :padx=>[0,4], :expand=>:ns)
- t.style_layout(s, 'e2', :expand=>:ns)
- t.style_layout(s, 'e3', :union=>['e2'], :iexpand=>:ns, :ipadx=>2)
-
- parentList = [:root, '', '', '', '', '', '']
- parent = :root
- [
- [0, :print, "Printing", "", ""],
- [1, :off, "Print background colors and images", "o1", ""],
- [0, :search, "Search from Address bar", "", ""],
- [1, :search, "When searching", "", ""],
- [2, :off, "Display results, and go to the most likely sites",
- "o2", "r1"],
- [2, :off, "Do not search from the Address bar", "o3", "r1"],
- [2, :off, "Just display the results in the main window",
- "o4", "r1"],
- [2, :on, "Just go to the most likely site", "o5", "r1"],
- [0, :security, "Security", "", ""],
- [1, :on, "Check for publisher's certificate revocation", "o5", ""],
- [1, :off, "Check for server certificate revocation (requires restart)",
- "o6", ""]
- ].each{|depth, setting, text, option, group|
- item = t.item_create()
- t.item_style_set(item, 0, 's1')
- t.item_element_configure(item, 0, 'e2', :text=>text)
- @Option[:option, item] = option
- @Option[:group, item] = group
- if setting == :on || setting == :off
- @Option[:setting, item] = setting
- if group == ''
- img = @images["internet-check-#{setting}"]
- t.item_element_configure(item, 0, 'e1', :image=>img)
- else
- if setting == :on
- @Option[:current, group] = item
- end
- img = @images["internet-radio-#{setting}"]
- t.item_element_configure(item, 0, 'e1', :image=>img)
- end
- else
- t.item_element_configure(item, 0, 'e1',
- :image=>@images["internet-#{setting}"])
- end
- t.item_lastchild(parentList[depth], item)
- depth += 1
- parentList[depth] = item
- }
-
- treeCtrlOption = TkBindTag.new
- treeCtrlOption.bind('Double-ButtonPress-1', proc{|w, x, y|
- Tk::TreeCtrl::BindCallback.doubleButton1(w, x, y)
- }, '%W %x %y')
- treeCtrlOption.bind('ButtonPress-1', proc{|w, x, y|
- optionButton1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
- treeCtrlOption.bind('Button1-Motion', proc{|w, x, y|
- optionMotion1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
- treeCtrlOption.bind('Button1-Leave', proc{|w, x, y|
- optionLeave1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
- treeCtrlOption.bind('ButtonRelease-1', proc{|w, x, y|
- optionRelease1(w, x, y)
- Tk.callback_break
- }, '%W %x %y')
-
- t.bindtags = [
- t, treeCtrlOption, Tk::TreeCtrl, t.winfo_toplevel, TkBindTag::ALL
- ]
-end
-
-def optionButton1_2(w, x, y)
- w.set_focus
- id = w.identify(x, y)
- if id[0] == 'header'
- Tk::TreeCtrl::BindCallback.buttonPress1(w, x, y)
- elsif id.empty?
- @Priv['buttonMode'] = ''
- else
- @Priv['buttonMode'] = ''
- item = id[1]
- w.selection_modify(item, :all)
- w.activate(item)
- return if @Option[:option, item] == ''
- group = @Option[:group, item]
- if group == ''
- # a checkbutton
- if @Option[:setting, item] == 'on'
- setting = :off
- else
- setting = :on
- end
- w.item_element_configure(item, 0, 'e1',
- :image=>@images["internet-check-#{setting}"])
- @Option[:setting, item] = setting
- else
- # a radiobutton
- current = @Option[:current, group]
- return if current == item.to_s
- w.item_element_configure(current, 0, 'e1',
- :image=>@images["internet-radio-off"])
- w.item_element_configure(item, 0, 'e1',
- :image=>@images["internet-radio-on"])
- @Option[:setting, item] = :on
- @Option[:current, group] = item
- end
- end
-end
-
-def optionMotion1(w, x, y)
- case @Priv['buttonMode']
- when 'resize', 'header'
- Tk::TreeCtrl::BindCallback.motion1(w, x, y)
- end
-end
-
-def optionLeave1(w, x, y)
- # This is called when I do ButtonPress-1 on Unix for some reason,
- # and buttonMode is undefined.
- begin
- mode = @Priv['buttonMode']
- rescue
- else
- case mode
- when 'header'
- t.column_configure(@Priv['column'], :sunken=>false)
- end
- end
-end
-
-def optionRelease1(w, x, y)
- case @Priv['buttonMode']
- when 'resize', 'header'
- Tk::TreeCtrl::BindCallback.release1(w, x, y)
- end
- @Priv['buttonMode'] = ''
-end
diff --git a/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt
deleted file mode 100644
index f2e0edcf42..0000000000
--- a/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- >>> 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 <jeff.hobbs@acm.org> 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/ext/tk/sample/tkextlib/vu/README.txt b/ext/tk/sample/tkextlib/vu/README.txt
deleted file mode 100644
index 2fe72d5d5c..0000000000
--- a/ext/tk/sample/tkextlib/vu/README.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- >>> 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"
- <p> creates DEMO.ps
-
-canvSticker2.tcl
- compares "sticker" and "text"; press <1>, <2> or <1> ...
- <p> 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 digital inputs and 4 analog 8 bit values with an
- resolution of ~1 millisecond (!!!) running Realtime Linux.
- <p> 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> ...
- <p> creates DEMO.ps
-
diff --git a/ext/tk/sample/tkextlib/vu/canvItems.rb b/ext/tk/sample/tkextlib/vu/canvItems.rb
deleted file mode 100644
index aa9bd5e9f6..0000000000
--- a/ext/tk/sample/tkextlib/vu/canvItems.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-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/ext/tk/sample/tkextlib/vu/canvSticker.rb b/ext/tk/sample/tkextlib/vu/canvSticker.rb
deleted file mode 100644
index ffc485443a..0000000000
--- a/ext/tk/sample/tkextlib/vu/canvSticker.rb
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-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 background.'
- 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/ext/tk/sample/tkextlib/vu/canvSticker2.rb b/ext/tk/sample/tkextlib/vu/canvSticker2.rb
deleted file mode 100644
index 5dec81aed9..0000000000
--- a/ext/tk/sample/tkextlib/vu/canvSticker2.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-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/ext/tk/sample/tkextlib/vu/dial_demo.rb b/ext/tk/sample/tkextlib/vu/dial_demo.rb
deleted file mode 100644
index 409b8d73cf..0000000000
--- a/ext/tk/sample/tkextlib/vu/dial_demo.rb
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-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/ext/tk/sample/tkextlib/vu/m128_000.xbm b/ext/tk/sample/tkextlib/vu/m128_000.xbm
deleted file mode 100644
index 455e3c5e0f..0000000000
--- a/ext/tk/sample/tkextlib/vu/m128_000.xbm
+++ /dev/null
@@ -1,174 +0,0 @@
-#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, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x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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/ext/tk/sample/tkextlib/vu/oscilloscope.rb b/ext/tk/sample/tkextlib/vu/oscilloscope.rb
deleted file mode 100644
index de57409a5e..0000000000
--- a/ext/tk/sample/tkextlib/vu/oscilloscope.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-require 'tkextlib/vu/charts'
-
-#---USAGE
-info = "...the heart of a Realtime Oscilloscope, where the PCIs
-joystick port gives 4 digital inputs and 4 analog 8 bit
-values with an resolution of ~1 millisecond (!!!)
-running Realtime Linux.
-<p> creates DEMO.ps
-<B1-Motion> 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/ext/tk/sample/tkextlib/vu/pie.rb b/ext/tk/sample/tkextlib/vu/pie.rb
deleted file mode 100644
index a61a19188e..0000000000
--- a/ext/tk/sample/tkextlib/vu/pie.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-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/ext/tk/sample/tkextlib/vu/vu_demo.rb b/ext/tk/sample/tkextlib/vu/vu_demo.rb
deleted file mode 100644
index 7b9741f933..0000000000
--- a/ext/tk/sample/tkextlib/vu/vu_demo.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-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
diff --git a/ext/tk/sample/tkfrom.rb b/ext/tk/sample/tkfrom.rb
deleted file mode 100644
index 69a122ffe1..0000000000
--- a/ext/tk/sample/tkfrom.rb
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require "base64"
-
-class Mail
- def Mail.new(f)
- if !f.kind_of?(IO)
- f = open(f, "r")
- me = super(f)
- f.close
- else
- me = super
- end
- return me
- end
-
- def initialize(f)
- @header = {}
- @body = []
- while line = f.gets()
- $_.chop!
- next if /^From / =~ line # skip From-line
- break if /^$/ =~ line # end of header
- if /^(\S+):\s*(.*)/ =~ line
- @header[attr = $1.capitalize] = $2
- elsif attr
- sub(/^\s*/, '')
- @header[attr] += "\n" + $_
- end
- end
-
- return unless $_
-
- while line = f.gets()
- break if /^From / =~ line
- @body.push($_)
- end
- end
-
- def header
- return @header
- end
-
- def body
- return @body
- end
-
-end
-
-if ARGV.length == 0
- if ENV['MAIL']
- ARGV[0] = ENV['MAIL']
- elsif ENV['USER']
- ARGV[0] = '/var/spool/mail/' + ENV['USER']
- elsif ENV['LOGNAME']
- ARGV[0] = '/var/spool/mail/' + ENV['LOGNAME']
- end
-end
-
-require "tk"
-list = scroll = nil
-TkFrame.new{|f|
- list = TkListbox.new(f) {
- yscroll proc{|*idx|
- scroll.set *idx
- }
- relief 'raised'
-# geometry "80x5"
- width 80
- height 5
- setgrid 'yes'
- pack('side'=>'left','fill'=>'both','expand'=>'yes')
- }
- scroll = TkScrollbar.new(f) {
- command proc{|idx|
- list.yview *idx
- }
- pack('side'=>'right','fill'=>'y')
- }
- pack
-}
-root = Tk.root
-TkButton.new(root) {
- text 'Dismiss'
- command proc {exit}
- pack('fill'=>'both','expand'=>'yes')
-}
-root.bind "Control-c", proc{exit}
-root.bind "Control-q", proc{exit}
-root.bind "space", proc{exit}
-
-$outcount = 0;
-for file in ARGV
- next unless File.exist?(file)
- atime = File.atime(file)
- mtime = File.mtime(file)
- f = open(file, "r")
- begin
- until f.eof
- mail = Mail.new(f)
- date = mail.header['Date']
- next unless date
- from = mail.header['From']
- subj = mail.header['Subject']
- y = m = d = 0
- if date
- date = Date.parse(date) if date
- y, m, d = date.year, date.mon, date.mday
- end
- from = "sombody@somewhere" unless from
- subj = "(nil)" unless subj
- from = decode_b(from)
- subj = decode_b(subj)
- list.insert 'end', format('%-02d/%02d/%02d [%-28.28s] %s',y,m,d,from,subj)
- $outcount += 1
- end
- ensure
- f.close
- File.utime(atime, mtime, file)
- list.see 'end'
- end
-end
-
-limit = 10000
-if $outcount == 0
- list.insert 'end', "You have no mail."
- limit = 2000
-end
-Tk.after limit, proc{
- exit
-}
-Tk.mainloop
diff --git a/ext/tk/sample/tkhello.rb b/ext/tk/sample/tkhello.rb
deleted file mode 100644
index 02de5ff381..0000000000
--- a/ext/tk/sample/tkhello.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: false
-require "tk"
-
-TkButton.new(nil,
- :text => 'hello',
- :command => proc{print "hello\n"}).pack(:fill=>'x')
-TkButton.new(nil,
- :text => 'quit',
- :command => proc{exit}).pack(:fill=>'x')
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkline.rb b/ext/tk/sample/tkline.rb
deleted file mode 100644
index f823319f76..0000000000
--- a/ext/tk/sample/tkline.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: false
-
-require "tkclass"
-
-$tkline_init = false
-def start_random
- return if $tkline_init
- $tkline_init = true
- if defined? Thread
- Thread.start do
- loop do
- sleep 2
- Line.new($c, rand(400), rand(200), rand(400), rand(200))
- end
- end
- end
-end
-
-Label.new('text'=>'Please press or drag button-1').pack
-
-$c = Canvas.new
-$c.pack
-$start_x = start_y = 0
-
-def do_press(x, y)
- $start_x = x
- $start_y = y
- $current_line = Line.new($c, x, y, x, y)
- start_random
-end
-def do_motion(x, y)
- if $current_line
- $current_line.coords $start_x, $start_y, x, y
- end
-end
-
-def do_release(x, y)
- if $current_line
- $current_line.coords $start_x, $start_y, x, y
- $current_line.fill 'black'
- $current_line = nil
- end
-end
-
-$c.bind("1", proc{|e| do_press e.x, e.y})
-$c.bind("B1-Motion", proc{|x, y| do_motion x, y}, "%x %y")
-$c.bind("ButtonRelease-1", proc{|x, y| do_release x, y}, "%x %y")
-Tk.mainloop
diff --git a/ext/tk/sample/tkmenubutton.rb b/ext/tk/sample/tkmenubutton.rb
deleted file mode 100644
index 2107e42a75..0000000000
--- a/ext/tk/sample/tkmenubutton.rb
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# menubutton sample : based on sample menubuttons on the Tcl/Tk demo script
-#
-require 'tk'
-
-TkLabel.new(:text=>'Sample of TkMenubutton').pack(:side=>:top)
-
-TkFrame.new{|f|
- pack(:side=>:top)
-
-
- TkMenubutton.new(:parent=>f, :text=>'Right', :underline=>0,
- :direction=>:right, :relief=>:raised){|mb|
- menu TkMenu.new(:parent=>mb, :tearoff=>0){
- add(:command, :label=>'Right menu: first item',
- :command=>proc{print 'You have selected the first item' +
- " from the Right menu.\n"})
- add(:command, :label=>'Right menu: second item',
- :command=>proc{print 'You have selected the second item' +
- " from the Right menu.\n"})
- }
- pack(:side=>:left, :padx=>25, :pady=>25)
- }
-
- TkMenubutton.new(:parent=>f, :text=>'Below', :underline=>0,
- :direction=>:below, :relief=>:raised){|mb|
- menu(TkMenu.new(:parent=>mb, :tearoff=>0){
- add(:command, :label=>'Below menu: first item',
- :command=>proc{print 'You have selected the first item' +
- " from the Below menu.\n"})
- add(:command, :label=>'Below menu: second item',
- :command=>proc{print 'You have selected the second item' +
- " from the Below menu.\n"})
- })
- pack(:side=>:left, :padx=>25, :pady=>25)
- }
-
- TkMenubutton.new(:parent=>f, :text=>'Above', :underline=>0,
- :direction=>:above, :relief=>:raised){|mb|
- menu TkMenu.new(:parent=>mb, :tearoff=>0){
- add(:command, :label=>'Above menu: first item',
- :command=>proc{print 'You have selected the first item' +
- " from the Above menu.\n"})
- add(:command, :label=>'Above menu: second item',
- :command=>proc{print 'You have selected the second item' +
- " from the Above menu.\n"})
- }
- pack(:side=>:left, :padx=>25, :pady=>25)
- }
-
- TkMenubutton.new(:parent=>f, :text=>'Left', :underline=>0,
- :direction=>:left, :relief=>:raised){|mb|
- menu(TkMenu.new(:parent=>mb, :tearoff=>0){
- add(:command, :label=>'Left menu: first item',
- :command=>proc{print 'You have selected the first item' +
- " from the Left menu.\n"})
- add(:command, :label=>'Left menu: second item',
- :command=>proc{print 'You have selected the second item' +
- " from the Left menu.\n"})
- })
- pack(:side=>:left, :padx=>25, :pady=>25)
- }
-}
-
-############################
-TkFrame.new(:borderwidth=>2, :relief=>:sunken,
- :height=>5).pack(:side=>:top, :fill=>:x, :padx=>20)
-############################
-
-TkLabel.new(:text=>'Sample of TkOptionMenu').pack(:side=>:top)
-
-colors = %w(Black red4 DarkGreen NavyBlue gray75 Red Green Blue gray50
- Yellow Cyan Magenta White Brown DarkSeaGreen DarkViolet)
-
-TkFrame.new{|f|
- pack(:side=>:top)
-
- b1 = TkOptionMenubutton .
- new(:parent=>f, :values=>%w(one two three)) .
- pack(:side=>:left, :padx=>25, :pady=>25)
-
- b2 = TkOptionMenubutton.new(:parent=>f, :values=>colors) {|optMB|
- colors.each{|color|
- no_sel = TkPhotoImage.new(:height=>16, :width=>16){
- put 'gray50', *[ 0, 0, 16, 1]
- put 'gray50', *[ 0, 1, 1, 16]
- put 'gray75', *[ 0, 15, 16, 16]
- put 'gray75', *[15, 1, 16, 16]
- put color, *[ 1, 1, 15, 15]
- }
- sel = TkPhotoImage.new(:height=>16, :width=>16){
- put 'Black', *[ 0, 0, 16, 2]
- put 'Black', *[ 0, 2, 2, 16]
- put 'Black', *[ 2, 14, 16, 16]
- put 'Black', *[14, 2, 16, 14]
- put color, *[ 2, 2, 14, 14]
- }
- optMB.entryconfigure(color, :hidemargin=>1,
- :image=>no_sel, :selectimage=>sel)
- }
- optMB.menuconfigure(:tearoff, 1)
- %w(Black gray75 gray50 White).each{|color|
- optMB.entryconfigure(color, :columnbreak=>true)
- }
- pack(:side=>:left, :padx=>25, :pady=>25)
- }
-
- TkButton.new(:parent=>f){
- text 'show values'
- command proc{p [b1.value, b2.value]}
- pack(:side=>:left, :padx=>25, :pady=>5, :anchor=>:s)
- }
-}
-
-############################
-TkFrame.new(:borderwidth=>2, :relief=>:sunken,
- :height=>5).pack(:side=>:top, :fill=>:x, :padx=>20)
-############################
-
-root = TkRoot.new(:title=>'menubutton samples')
-
-TkButton.new(root, :text=>'exit', :command=>proc{exit}){
- pack(:side=>:top, :padx=>25, :pady=>5, :anchor=>:e)
-}
-
-# VirtualEvent <<MenuSelect>> on Tcl/Tk ==> '<MenuSelect>' on Ruby/Tk
-# ( remove the most external <, > for Ruby/Tk notation )
-TkMenu.bind('<MenuSelect>', proc{|widget|
- p widget.entrycget('active', :label)
- }, '%W')
-
-############################
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkmsgcat-load_rb.rb b/ext/tk/sample/tkmsgcat-load_rb.rb
deleted file mode 100644
index bacf85de50..0000000000
--- a/ext/tk/sample/tkmsgcat-load_rb.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-
-demo_dir = File.dirname($0)
-msgcat_dir = [demo_dir, 'msgs_rb'].join(File::Separator)
-top_win = nil
-#msgcat = TkMsgCatalog.new('::tk')
-msgcat = TkMsgCatalog.new('::tkmsgcat_demo')
-default_locale = msgcat.locale
-#msgcat.load_rb(msgcat_dir)
-msgcat.load(msgcat_dir)
-
-col_proc = TkComm.install_bind(proc{|w, color, frame, label|
- TkComm.window(frame).background(color)
- Tk.update
- TkComm.window(label).text(
- msgcat["%1$s:: %2$s", 'Color',
- color.capitalize])
- w.flash; w.flash
- Tk.callback_break;
- }, "%W")
-
-del_proc = TkComm.install_cmd(proc{top_win.destroy; top_win = nil})
-
-err_proc = TkComm.install_cmd(proc{fail(RuntimeError,
- msgcat['Application Error'])})
-
-show_sample = proc{|loc|
- top_win = TkToplevel.new(:title=>loc)
-
- msgcat.locale = loc
- #msgcat.load_rb(msgcat_dir)
- msgcat.load(msgcat_dir)
-
- TkLabel.new(top_win){
- text "preferences:: #{msgcat.preferences.join(' ')}"
- pack(:pady=>10, :padx=>10)
- }
-
- lbl = TkLabel.new(top_win, :text=>msgcat["%1$s:: %2$s",
- 'Color', '']).pack(:anchor=>'w')
-
- bg = TkFrame.new(top_win).pack(:ipadx=>20, :ipady=>10,
- :expand=>true, :fill=>:both)
-
- TkFrame.new(bg){|f|
- ['blue', 'green', 'red'].each{|col|
- TkButton.new(f, :text=>msgcat[col]){
- bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
- }.pack(:fill=>:x)
- }
- }.pack(:anchor=>'center', :pady=>15)
-
- TkFrame.new(top_win){|f|
- TkButton.new(f, :text=>msgcat['Delete'],
- :command=>del_proc).pack(:side=>:right, :padx=>5)
- TkButton.new(f, :text=>msgcat['Error'],
- :command=>err_proc).pack(:side=>:left, :padx=>5)
- }.pack(:side=>:bottom, :fill=>:x)
-
- top_win
-}
-
-
-# listbox for locale list
-TkLabel.new(:text=>"Please click a locale.").pack(:padx=>5, :pady=>3)
-
-TkFrame.new{|f|
- TkButton.new(f, :text=>msgcat['Exit'],
- :command=>proc{exit}).pack(:side=>:right, :padx=>5)
-}.pack(:side=>:bottom, :fill=>:x)
-
-f = TkFrame.new.pack(:side=>:top, :fill=>:both, :expand=>true)
-lbox = TkListbox.new(f).pack(:side=>:left, :fill=>:both, :expand=>true)
-lbox.yscrollbar(TkScrollbar.new(f, :width=>12).pack(:side=>:right, :fill=>:y))
-
-lbox.bind('ButtonRelease-1'){|ev|
- idx = lbox.index("@#{ev.x},#{ev.y}")
- if idx == 0
- loc = default_locale
- else
- loc = lbox.get(idx)
- end
- if top_win != nil && top_win.exist?
- top_win.destroy
- end
- top_win = show_sample.call(loc)
-}
-
-lbox.insert('end', 'default')
-
-Dir.entries(msgcat_dir).sort.each{|f|
- if f =~ /^(.*).msg$/
- lbox.insert('end', $1)
- end
-}
-
-top_win = show_sample.call(default_locale)
-
-# start eventloop
-Tk.mainloop
diff --git a/ext/tk/sample/tkmsgcat-load_rb2.rb b/ext/tk/sample/tkmsgcat-load_rb2.rb
deleted file mode 100644
index 53e41bc481..0000000000
--- a/ext/tk/sample/tkmsgcat-load_rb2.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-
-demo_dir = File.dirname($0)
-msgcat_dir = [demo_dir, 'msgs_rb2'].join(File::Separator)
-top_win = nil
-#msgcat = TkMsgCatalog.new('::tk')
-msgcat = TkMsgCatalog.new('::tkmsgcat_demo')
-default_locale = msgcat.locale
-#msgcat.load_rb(msgcat_dir)
-msgcat.load(msgcat_dir)
-
-col_proc = TkComm.install_bind(proc{|w, color, frame, label|
- TkComm.window(frame).background(color)
- Tk.update
- TkComm.window(label).text(
- msgcat["%1$s:: %2$s", 'Color',
- color.capitalize])
- w.flash; w.flash
- Tk.callback_break;
- }, "%W")
-
-del_proc = TkComm.install_cmd(proc{top_win.destroy; top_win = nil})
-
-err_proc = TkComm.install_cmd(proc{fail(RuntimeError,
- msgcat['Application Error'])})
-
-show_sample = proc{|loc|
- top_win = TkToplevel.new(:title=>loc)
-
- msgcat.locale = loc
- #msgcat.load_rb(msgcat_dir)
- msgcat.load(msgcat_dir)
-
- TkLabel.new(top_win){
- text "preferences:: #{msgcat.preferences.join(' ')}"
- pack(:pady=>10, :padx=>10)
- }
-
- lbl = TkLabel.new(top_win, :text=>msgcat["%1$s:: %2$s",
- 'Color', '']).pack(:anchor=>'w')
-
- bg = TkFrame.new(top_win).pack(:ipadx=>20, :ipady=>10,
- :expand=>true, :fill=>:both)
-
- TkFrame.new(bg){|f|
- ['blue', 'green', 'red'].each{|col|
- TkButton.new(f, :text=>msgcat[col]){
- bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
- }.pack(:fill=>:x)
- }
- }.pack(:anchor=>'center', :pady=>15)
-
- TkFrame.new(top_win){|f|
- TkButton.new(f, :text=>msgcat['Delete'],
- :command=>del_proc).pack(:side=>:right, :padx=>5)
- TkButton.new(f, :text=>msgcat['Error'],
- :command=>err_proc).pack(:side=>:left, :padx=>5)
- }.pack(:side=>:bottom, :fill=>:x)
-
- top_win
-}
-
-
-# listbox for locale list
-TkLabel.new(:text=>"Please click a locale.").pack(:padx=>5, :pady=>3)
-
-TkFrame.new{|f|
- TkButton.new(f, :text=>msgcat['Exit'],
- :command=>proc{exit}).pack(:side=>:right, :padx=>5)
-}.pack(:side=>:bottom, :fill=>:x)
-
-f = TkFrame.new.pack(:side=>:top, :fill=>:both, :expand=>true)
-lbox = TkListbox.new(f).pack(:side=>:left, :fill=>:both, :expand=>true)
-lbox.yscrollbar(TkScrollbar.new(f, :width=>12).pack(:side=>:right, :fill=>:y))
-
-lbox.bind('ButtonRelease-1'){|ev|
- idx = lbox.index("@#{ev.x},#{ev.y}")
- if idx == 0
- loc = default_locale
- else
- loc = lbox.get(idx)
- end
- if top_win != nil && top_win.exist?
- top_win.destroy
- end
- top_win = show_sample.call(loc)
-}
-
-lbox.insert('end', 'default')
-
-Dir.entries(msgcat_dir).sort.each{|f|
- if f =~ /^(.*).msg$/
- lbox.insert('end', $1)
- end
-}
-
-top_win = show_sample.call(default_locale)
-
-# start eventloop
-Tk.mainloop
diff --git a/ext/tk/sample/tkmsgcat-load_tk.rb b/ext/tk/sample/tkmsgcat-load_tk.rb
deleted file mode 100644
index 783d03ccf2..0000000000
--- a/ext/tk/sample/tkmsgcat-load_tk.rb
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'tk'
-
-demo_dir = File.dirname($0)
-msgcat_dir = [demo_dir, 'msgs_tk'].join(File::Separator)
-top_win = nil
-#msgcat = TkMsgCatalog.new('::tk')
-msgcat = TkMsgCatalog.new('::tkmsgcat_demo')
-default_locale = msgcat.locale
-msgcat.load_tk(msgcat_dir)
-
-col_proc = TkComm.install_bind(proc{|w, color, frame, label|
- TkComm.window(frame).background(color)
- Tk.update
- TkComm.window(label).text(
- msgcat.mc("%1$s:: %2$s", 'Color',
- color.capitalize))
- w.flash; w.flash
- Tk.callback_break;
- }, "%W")
-
-del_proc = TkComm.install_cmd(proc{top_win.destroy; top_win = nil})
-
-err_proc = TkComm.install_cmd(proc{fail(RuntimeError,
- msgcat.mc('Application Error'))})
-
-show_sample = proc{|loc|
- top_win = TkToplevel.new(:title=>loc)
-
- msgcat.locale = loc
- msgcat.load_tk(msgcat_dir)
-
- TkLabel.new(top_win){
- text "preferences:: #{msgcat.preferences.join(' ')}"
- pack(:pady=>10, :padx=>10)
- }
-
- lbl = TkLabel.new(top_win, :text=>msgcat.mc("%1$s:: %2$s",
- 'Color', '')).pack(:anchor=>'w')
-
- bg = TkFrame.new(top_win).pack(:ipadx=>20, :ipady=>10,
- :expand=>true, :fill=>:both)
-
- TkFrame.new(bg){|f|
- ['blue', 'green', 'red'].each{|col|
- TkButton.new(f, :text=>msgcat.mc(col)){
- bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
- }.pack(:fill=>:x)
-=begin
- TkButton.new(f, :text=>msgcat.mc(col),
- :command=>proc{
- bg.background col
- lbl.text msgcat.mc("%1$s:: %2$s", 'Color', col.capitalize)
- }).pack(:fill=>:x)
-=end
- }
- }.pack(:anchor=>'center', :pady=>15)
-
- TkFrame.new(top_win){|f|
- TkButton.new(f, :text=>msgcat.mc('Delete'),
- :command=>del_proc).pack(:side=>:right, :padx=>5)
- TkButton.new(f, :text=>msgcat.mc('Error'),
- :command=>err_proc).pack(:side=>:left, :padx=>5)
-=begin
- TkButton.new(f, :text=>msgcat.mc('Delete'),
- :command=>proc{
- top_win.destroy
- top_win = nil
- }).pack(:side=>:right, :padx=>5)
- TkButton.new(f, :text=>msgcat.mc('Error'),
- :command=>proc{
- fail RuntimeError, msgcat.mc('Application Error')
- }).pack(:side=>:left, :padx=>5)
-=end
- }.pack(:side=>:bottom, :fill=>:x)
-
- top_win
-}
-
-
-# listbox for locale list
-TkLabel.new(:text=>"Please click a locale.").pack(:padx=>5, :pady=>3)
-
-TkFrame.new{|f|
- TkButton.new(f, :text=>msgcat.mc('Exit'),
- :command=>proc{exit}).pack(:side=>:right, :padx=>5)
-}.pack(:side=>:bottom, :fill=>:x)
-
-f = TkFrame.new.pack(:side=>:top, :fill=>:both, :expand=>true)
-lbox = TkListbox.new(f).pack(:side=>:left, :fill=>:both, :expand=>true)
-lbox.yscrollbar(TkScrollbar.new(f, :width=>12).pack(:side=>:right, :fill=>:y))
-
-lbox.bind('ButtonRelease-1'){|ev|
- idx = lbox.index("@#{ev.x},#{ev.y}")
- if idx == 0
- loc = default_locale
- else
- loc = lbox.get(idx)
- end
- if top_win != nil && top_win.exist?
- top_win.destroy
- end
- top_win = show_sample.call(loc)
-}
-
-lbox.insert('end', 'default')
-
-Dir.entries(msgcat_dir).sort.each{|f|
- if f =~ /^(.*).msg$/
- lbox.insert('end', $1)
- end
-}
-
-top_win = show_sample.call(default_locale)
-
-# start eventloop
-Tk.mainloop
diff --git a/ext/tk/sample/tkmulticolumnlist.rb b/ext/tk/sample/tkmulticolumnlist.rb
deleted file mode 100644
index 1b26077995..0000000000
--- a/ext/tk/sample/tkmulticolumnlist.rb
+++ /dev/null
@@ -1,744 +0,0 @@
-# frozen_string_literal: false
-#
-# tkmulticolumnlist.rb : multiple column list widget on scrollable frame
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-class TkMultiColumnList < TkText
- include TkComposite
-
- # lbox_height : height of listboxes (pixel)
- # title_info : array [ [<title_string>,<init_width>], ... ]
- # keys : hash {<option>=><value>, ... }
- def initialize_composite(lbox_height, title_info, keys={})
- # argument check
- if (! title_info.kind_of? Array) or (title_info.size < 2)
- raise
- end
-
- # mode
- @keep_minsize = true
- @show_each_hscr = true
- @show_win_hscr = true
-
- # init arrays
- @base_list = []
- @rel_list = []
- @title_list = []
- @title_cmd = []
- @lbox_list = []
- @hscr_list = []
-
- # decide total width
- @lbox_total = title_info.size
- @width_total = 0
- title_info.each{|title, width, cmd|
- @width_total += width.to_f
- @title_cmd << cmd
- }
-
- # rel-table of label=>index
- @name_index = {}
-
- # size definition
- @window_width = @width_total
- @sash = 5
- @scrbar_width = 15
- @scrbar_border = 3
- @lbox_border = 1
- @title_border = 3
- @h_l_thick = 0
-
- # init status
- @mode = :title
- @command = nil
-
- # vertical scrollbar
- @v_scroll = TkYScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'width'=>@scrbar_width)
-
- # horizontal scrollbar
- @h_scroll = TkXScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'width'=>@scrbar_width)
-
- # create base flames
- @c_title = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
- @f_title = TkFrame.new(@c_title, 'width'=>@width_total)
- @w_title = TkcWindow.new(@c_title, 0, 0,
- 'window'=>@f_title, 'anchor'=>'nw')
-
- @c_lbox = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
- @f_lbox = TkFrame.new(@c_lbox, 'width'=>@width_total)
- @w_lbox = TkcWindow.new(@c_lbox, 0, 0, 'window'=>@f_lbox, 'anchor'=>'nw')
-
- @c_hscr = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
- @f_hscr = TkFrame.new(@c_hscr, 'width'=>@width_total)
- @w_hscr = TkcWindow.new(@c_hscr, 0, 0, 'window'=>@f_hscr, 'anchor'=>'nw')
-
- # create each listbox
- sum = 0.0
- @rel_list << sum/@width_total
- title_info.each_with_index{|(label, width), idx|
- # set relation between label and index
- if @name_index.include?(label)
- @name_index[label] << idx
- else
- @name_index[label] = [idx]
- end
-
- # calculate relative positioning
- sum += width
- @rel_list << sum/@width_total
-
- # title field
- f = TkFrame.new(@f_title, 'width'=>width)
- base = [f]
-
- title = TkLabel.new(f, 'text'=>label, 'borderwidth'=>@title_border,
- 'relief'=>'raised', 'highlightthickness'=>@h_l_thick)
- title_binding(title, idx)
- title.pack('fill'=>'x')
-
- @title_list << title
-
- f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relheight'=>1.0,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
-
- # listbox field
- f = TkFrame.new(@f_lbox, 'width'=>width)
- base << f
- @lbox_list << TkText.new(f, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@lbox_border,
- 'takefocus'=>false,
- 'wrap'=>'none') {
-
- bindtags(bindtags - [TkText])
-
- @seltag = TkTextTag.new(self, 'background'=>'#b3b3b3',
- 'borderwidth'=>1, 'relief'=>'raised')
- def self.nearest(y)
- self.index("@1,#{y}").split('.')[0].to_i
- end
-
- def self.select_clear(first, last=nil)
- first = "#{first}.0" if first.kind_of?(Integer)
- first = self.index(first.to_s + ' linestart')
- last = first unless last
- last = "#{last}.0" if first.kind_of?(Integer)
- last = self.index(last.to_s + ' + 1 lines linestart')
- @seltag.remove(first, last)
- end
-
- def self.select_set(first, last=nil)
- first = "#{first}.0" if first.kind_of?(Integer)
- first = self.index(first.to_s + ' linestart')
- last = first unless last
- last = "#{last}.0" if first.kind_of?(Integer)
- last = self.index(last.to_s + ' + 1 lines linestart')
- @seltag.add(first, last)
- end
-
- def self.select_index
- self.index(@seltag.first).split('.')[0].to_i
- end
-
- pack('fill'=>'both', 'expand'=>true)
- }
-
- f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx], 'relheight'=>1.0)
-
- # scrollbar field
- f = TkFrame.new(@f_hscr, 'width'=>width)
- base << f
- @hscr_list << TkXScrollbar.new(f, 'width'=>@scrbar_width,
- 'borderwidth'=>@scrbar_border,
- 'highlightthickness'=>@h_l_thick
- ).pack('fill'=>'x', 'anchor'=>'w')
- f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
-
- @lbox_list[idx].xscrollbar(@hscr_list[idx])
-
- # add new base
- @base_list << base
- }
-
- # pad
- @f_title_pad = TkFrame.new(@frame, 'relief'=>'raised',
- 'borderwidth'=>@title_border,
- 'highlightthickness'=>@h_l_thick)
-
- @f_scr_pad = TkFrame.new(@frame, 'relief'=>'sunken',
- 'borderwidth'=>1,
- 'highlightthickness'=>@h_l_thick)
-
- # height check
- title_height = 0
- @title_list.each{|w|
- h = w.winfo_reqheight
- title_height = h if title_height < h
- }
-
- hscr_height = 0
- @hscr_list.each{|w|
- h = w.winfo_reqheight
- hscr_height = h if hscr_height < h
- }
-
- @f_title.height title_height
- @f_lbox.height lbox_height
- @f_hscr.height hscr_height
-
- # set control procedure for vertical scroll
- @v_scroll.assign(*@lbox_list)
-
- # set control procedure for horizontal scroll
- @h_scroll.assign(@c_title, @c_lbox, @c_hscr)
-
- # binding for listboxes
- @lbox_list.each_with_index{|l, idx|
- l.bind('Button-1', proc{|w, y|
- @frame.focus
- select_line(w, w.nearest(y))
- }, '%W %y')
- l.bind('B1-Motion', proc{|w, y|
- select_line(w, w.nearest(y))
- }, '%W %y')
- l.bind('Double-Button-1', proc{
- @command.call(get_select) if @command
- })
-
- l.bind('Control-Home', proc{|w| select_line(w, 0)}, '%W')
- l.bind('Control-End', proc{|w| select_line(w, 'end')}, '%W')
-
- l.bind('Button-2', proc{|x, y|
- @lbox_mark_x = x
- @lbox_list.each{|lbox| lbox.scan_mark(x, y)}
- }, '%x %y')
- l.bind('B2-Motion', proc{|x, y|
- @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)}
- l.scan_dragto(x, y)
- }, '%x %y')
- }
-
- bbox = @w_title.bbox
- @c_title.height(bbox[3])
- @c_title.scrollregion(bbox)
-
- bbox = @w_lbox.bbox
- @c_lbox.height(bbox[3])
- @c_lbox.scrollregion(bbox)
-
- if @show_each_hscr
- bbox = @w_hscr.bbox
- @c_hscr.height(bbox[3])
- @c_hscr.scrollregion(bbox)
- end
-
- # binding
- @frame.takefocus(true)
- @frame.bind('Key-Up', proc{select_shift(@lbox_list[0], -1)})
- @frame.bind('Key-Down', proc{select_shift(@lbox_list[0], 1)})
- @frame.bind('Return', proc{@command.call(get_select) if @command})
-
- # alignment
- TkGrid.rowconfigure(@frame, 0, 'weight'=>0)
- TkGrid.rowconfigure(@frame, 1, 'weight'=>1)
- TkGrid.rowconfigure(@frame, 2, 'weight'=>0)
- TkGrid.rowconfigure(@frame, 3, 'weight'=>0)
- TkGrid.columnconfigure(@frame, 0, 'weight'=>1)
- TkGrid.columnconfigure(@frame, 1, 'weight'=>0)
- TkGrid.columnconfigure(@frame, 2, 'weight'=>0)
- @v_scroll.grid('row'=>1, 'column'=>2, 'sticky'=>'ns')
- @c_title.grid('row'=>0, 'column'=>0, 'sticky'=>'news')
- @f_title_pad.grid('row'=>0, 'column'=>2, 'sticky'=>'news')
- @c_lbox.grid('row'=>1, 'column'=>0, 'sticky'=>'news')
- @c_hscr.grid('row'=>2, 'column'=>0, 'sticky'=>'ew') if @show_each_hscr
- @h_scroll.grid('row'=>3, 'column'=>0, 'sticky'=>'ew') if @show_win_hscr
- @f_scr_pad.grid('row'=>2, 'rowspan'=>2, 'column'=>2, 'sticky'=>'news')
-
- # binding for 'Configure' event
- @c_lbox.bind('Configure',
- proc{|height, width| reconstruct(height, width)},
- '%h %w')
-
- # set default receiver of method calls
- @path = @frame.path
-
- # configure options
- keys = {} unless keys
- keys = _symbolkey2str(keys)
-
- # command
- cmd = keys.delete('command')
- command(cmd) if cmd
-
- # 'scrollbarwidth' option == 'width' option of scrollbars
- width = keys.delete('scrollbarwidth')
- scrollbarwidth(width) if width
-
- # options for listbox titles
- title_font = keys.delete('titlefont')
- titlefont(title_font) if title_font
-
- title_fg = keys.delete('titleforeground')
- titleforeground(title_fg) if title_fg
-
- title_bg = keys.delete('titlebackground')
- titlebackground(title_bg) if title_bg
-
- # set receivers for configure methods
- delegate('DEFAULT', *@lbox_list)
- delegate('activebackground', @v_scroll, @h_scroll, *@hscr_list)
- delegate('troughcolor', @v_scroll, @h_scroll, *@hscr_list)
- delegate('repeatdelay', @v_scroll, @h_scroll, *@hscr_list)
- delegate('repeatinterval', @v_scroll, @h_scroll, *@hscr_list)
- delegate('borderwidth', @frame)
- delegate('width', @c_lbox, @c_title, @c_hscr)
- delegate('relief', @frame)
-
- # configure
- configure(keys) if keys.size > 0
- end
- private :initialize_composite
-
- # keep_minsize?
- def keep_minsize?
- @keep_minsize
- end
- def keep_minsize(bool)
- @keep_minsize = bool
- end
-
- # each hscr
- def show_each_hscr
- @show_each_hscr = true
- @c_hscr.grid('row'=>2, 'column'=>0, 'sticky'=>'ew')
- end
- def hide_each_hscr
- @show_each_hscr = false
- @c_hscr.ungrid
- end
-
- # window hscroll
- def show_win_hscr
- @show_win_hscr = true
- @h_scroll.grid('row'=>3, 'column'=>0, 'sticky'=>'ew')
- end
- def hide_win_hscr
- @show_each_hscr = false
- @h_scroll.ungrid
- end
-
- # set command
- def command(cmd)
- @command = cmd
- self
- end
-
- # set scrollbar width
- def scrollbarwidth(width)
- @scrbar_width = width
- @v_scroll['width'] = @scrbar_width
- @h_scroll['width'] = @scrbar_width
- @hscr_list.each{|hscr| hscr['width'] = @scrbar_width}
- self
- end
-
- # set scrollbar border
- def scrollbarborder(width)
- @scrbar_border = width
- @v_scroll['border'] = @scrbar_border
- @h_scroll['border'] = @scrbar_border
- @hscr_list.each{|hscr| hscr['border'] = @scrbar_border}
- self
- end
-
- # set listbox borders
- def listboxborder(width)
- @lbox_border = width
- @lbox_list.each{|w| w['border'] = @lbox_border}
- self
- end
-
- # set listbox relief
- def listboxrelief(relief)
- @lbox_list.each{|w| w['relief'] = relief}
- self
- end
-
- # set title borders
- def titleborder(width)
- @title_border = width
- @f_title_pad['border'] = @title_border
- @title_list.each{|label| label['border'] = @title_border}
- self
- end
-
- # set title font
- def titlefont(font)
- @title_list.each{|label| label['font'] = font}
- title_height = 0
- @title_list.each{|w|
- h = w.winfo_reqheight
- title_height = h if title_height < h
- }
- @f_title.height title_height
- bbox = @w_title.bbox
- @c_title.height(bbox[3])
- @c_title.scrollregion(bbox)
- self
- end
-
- # set title foreground color
- def titleforeground(fg)
- @title_list.each{|label| label['foreground'] = fg}
- self
- end
-
- # set title background color
- def titlebackground(bg)
- @f_title_pad['background'] = bg
- @title_list.each{|label| label['background'] = bg}
- self
- end
-
- # set title cmds
- def titlecommand(idx, cmd=Proc.new)
- @title_cmd[idx] = cmd
- end
-
- # call title cmds
- def titleinvoke(idx)
- @title_cmd[idx].call if @title_cmd[idx]
- end
-
- # get label widgets of listbox titles
- def titlelabels(*indices)
- @title_list[*indices]
- end
-
- # get listbox widgets
- def columns(*indices)
- @lbox_list[*indices]
- end
-
- def delete(*idx)
- idx = idx.collect{|i|
- if i.kind_of?(Integer)
- "#{i}.0"
- else
- i.to_s
- end
- }
- @lbox_list.collect{|lbox| lbox.delete(*idx)}
- end
-
- def get(idx_s, idx_e=nil)
- unless idx_e
- if idx_s.kind_of?(Integer)
- idx_s = "#{idx_s}.0"
- idx_e = "#{idx_s} lineend"
- else
- idx_s = idx_s.to_s
- idx_e = "#{idx_s} lineend"
- end
- @lbox_list.collect{|lbox|
- lbox.get(idx_s, idx_e)
- }
- else
- if idx_s.kind_of?(Integer)
- idx_s = "#{idx_s}.0"
- else
- idx_s = idx_s.to_s
- end
- if idx_e.kind_of?(Integer)
- idx_e = "#{idx_e}.end"
- else
- idx_e = "#{idx_e} lineend"
- end
- list = @lbox_list.collect{|lbox| lbox.get(idx_s, idx_e).split(/\n/)}
- result = []
- list[0].each_with_index{|line, index|
- result << list.collect{|lines| lines[index]}
- }
- result
- end
- end
-
- def get_select
- get(@lbox_list[0].select_index)
- end
-
- def _line_array_to_hash(line)
- result = {}
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- result[label] = line[indices[0]]
- else
- result[label] = indices.collect{|index| line[index]}
- end
- }
- result
- end
- private :_line_array_to_hash
-
- def get_by_hash(*idx)
- get_result = get(*idx)
- if idx.size == 1
- _line_array_to_hash(get_result)
- else
- get_result.collect{|line| _line_array_to_hash(line)}
- end
- end
-
- def insert(idx, *lines)
- lbox_ins = []
- (0..@lbox_list.size).each{lbox_ins << []}
-
- if idx.kind_of?(Integer)
- idx = "#{idx}.0"
- else
- idx = idx.to_s
- end
-
- if @lbox_list[0].index('1.0 + 1 char') == @lbox_list[0].index('end')
- cr = ""
- else
- cr = "\n"
- end
-
- lines.each{|line|
- if line.kind_of? Hash
- array = []
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- array[indices[0]] = line[label]
- else
- if line[label].kind_of? Array
- indices.each_with_index{|index, num|
- array[index] = line[label][num]
- }
- else
- array[indices[0]] = line[label]
- end
- end
- }
- line = array
- end
-
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- lbox_ins[indices[0]] << line[indices[0]]
- else
- indices.each{|index| lbox_ins[index] << line[index]}
- end
- }
- }
-
- @lbox_list.each_with_index{|lbox, index|
- lbox.insert(idx, cr + lbox_ins[index].join("\n")) if lbox_ins[index]
- }
- end
-
- def select_clear(first, last=None)
- @lbox_list.each{|lbox| lbox.sel_clear(first, last=None)}
- end
-
- def select_set(first, last=None)
- @lbox_list.each{|lbox| lbox.sel_set(first, last=None)}
- end
-
- ###########################################
- private
-
- def reconstruct(height, width)
- if @keep_minsize && width <= @width_total
- @f_title.width(@width_total)
- @f_lbox.width(@width_total)
- @f_hscr.width(@width_total) if @show_each_hscr
- @window_width = @width_total
- else
- @f_title.width(width)
- @f_lbox.width(width)
- @f_hscr.width(width) if @show_each_hscr
- @window_width = width
- end
-
- @f_lbox.height(height)
-
- @c_title.scrollregion(@w_title.bbox)
- @c_lbox.scrollregion(@w_lbox.bbox)
- @c_hscr.scrollregion(@w_hscr.bbox) if @show_each_hscr
-
- (0..(@rel_list.size - 2)).each{|idx|
- title, lbox, hscr = @base_list[idx]
- title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
- lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relheight'=>1.0)
- hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
- }
- end
-
- def resize(x)
- idx = @sel_sash
- return if idx == 0
-
- # adjustment of relative positioning
- delta = (x - @x) / @frame_width
- if delta < @rel_list[idx-1] - @rel_list[idx] + (2*@sash/@frame_width)
- delta = @rel_list[idx-1] - @rel_list[idx] + (2*@sash/@frame_width)
- elsif delta > @rel_list[idx+1] - @rel_list[idx] - (2*@sash/@frame_width)
- delta = @rel_list[idx+1] - @rel_list[idx] - (2*@sash/@frame_width)
- end
- @rel_list[idx] += delta
-
- # adjustment of leftside widget of the sash
- title, lbox, hscr = @base_list[idx - 1]
- title.place('relwidth'=>@rel_list[idx] - @rel_list[idx-1])
- lbox.place('relwidth'=>@rel_list[idx] - @rel_list[idx-1], 'relheight'=>1.0)
- hscr.place('relwidth'=>@rel_list[idx] - @rel_list[idx-1])
-
- # adjustment of rightside widget of the sash
- title, lbox, hscr = @base_list[idx]
- title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
- lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx], 'relheight'=>1.0)
- hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
-
- # update reference position
- @x = x
- end
-
- def motion_cb(w, x, idx)
- if x <= @sash && idx > 0
- w.cursor 'sb_h_double_arrow'
- @mode = :sash
- @sel_sash = idx
- elsif x >= w.winfo_width - @sash && idx < @lbox_total - 1
- w.cursor 'sb_h_double_arrow'
- @mode = :sash
- @sel_sash = idx + 1
- else
- w.cursor ""
- @mode = :title
- @sel_sash = 0
- end
- end
-
- def title_binding(title, index)
- title.bind('Motion', proc{|w, x, idx| motion_cb(w, x, idx.to_i)},
- "%W %x #{index}")
-
- title.bind('Enter', proc{|w, x, idx| motion_cb(w, x, idx.to_i)},
- "%W %x #{index}")
-
- title.bind('Leave', proc{|w| w.cursor ""}, "%W")
-
- title.bind('Button-1',
- proc{|w, x|
- if @mode == :sash
- @x = x
- @frame_width = TkWinfo.width(@f_title).to_f
- else
- title.relief 'sunken'
- end
- },
- '%W %X')
-
- title.bind('ButtonRelease-1',
- proc{|w, x, idx|
- i = idx.to_i
- if @mode == :title && @title_cmd[i].kind_of?(Proc)
- @title_cmd[i].call
- end
- title.relief 'raised'
- motion_cb(w,x,i)
- },
- "%W %x #{index}")
-
- title.bind('B1-Motion', proc{|x| resize(x) if @mode == :sash}, "%X")
- end
-
- ########################
- def select_line(w, idx)
- @lbox_list.each{|l|
- l.select_clear(1, 'end')
- l.select_set(idx)
- }
- w.select_set(idx)
- end
-
- def select_shift(w, dir)
- head = w.index('@1,1').split('.')[0].to_i
- tail = w.index("@1,#{w.winfo_height - 1}").split('.')[0].to_i - 1
- idx = w.select_index + dir
- last = w.index('end - 1 char').split('.')[0].to_i
- if idx < 1
- idx = 1
- elsif idx > last
- idx = last
- end
- @lbox_list.each{|l|
- l.select_clear(1, 'end')
- l.select_set(idx)
- }
- if head > idx
- @lbox_list.each{|l| l.yview('scroll', -1, 'units')}
- elsif tail < idx
- @lbox_list.each{|l| l.yview('scroll', 1, 'units')}
- end
- end
- ########################
-end
-
-################################################
-# test
-################################################
-if __FILE__ == $0
- l = TkMultiColumnList.new(nil, 200,
- [ ['L1', 200, proc{p 'click L1'}],
- ['L2', 100],
- ['L3', 200] ],
- 'width'=>350,
- #'titleforeground'=>'yellow',
- 'titleforeground'=>'white',
- #'titlebackground'=>'navy',
- 'titlebackground'=>'blue',
- 'titlefont'=>'courier'
- ).pack('fill'=>'both', 'expand'=>true)
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
- 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
- 'cccccccccccccccccccccccccccccccccccccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbbbbb','ccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbbbbb','ccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbbbbb','ccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- p l.columns(1)
- p l.columns(1..3)
- p l.columns(1,2)
-
- l.command proc{|line_info| p line_info}
-
- Tk.mainloop
-end
diff --git a/ext/tk/sample/tkmultilistbox.rb b/ext/tk/sample/tkmultilistbox.rb
deleted file mode 100644
index 29a2077fd0..0000000000
--- a/ext/tk/sample/tkmultilistbox.rb
+++ /dev/null
@@ -1,655 +0,0 @@
-# frozen_string_literal: false
-#
-# tkmultilistbox.rb : multiple listbox widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-class TkMultiListbox < TkListbox
- include TkComposite
-
- # lbox_height : height of listboxes (pixel)
- # title_info : array [ [<title_string>,<init_width>], ... ]
- # keys : hash {<option>=><value>, ... }
- def initialize_composite(lbox_height, title_info, keys={})
- # argument check
- if (! title_info.kind_of? Array) or (title_info.size < 2)
- raise
- end
-
- # decide total width
- @width_total = 0
- title_info.each{|title, width| @width_total += width.to_f}
-
- # vertical scrollbar
- @v_scroll = TkScrollbar.new(@frame, 'orient'=>'vertical')
-
- # init arrays
- @base_list = []
- @rel_list = []
- @title_list = []
- @lbox_list = []
- @hscr_list = []
-
- # rel-table of label=>index
- @name_index = {}
-
- # create base flames
- @f_title = TkFrame.new(@frame, 'width'=>@width_total)
- @f_lbox = TkFrame.new(@frame,
- 'width'=>@width_total, 'height'=>lbox_height)
- @f_hscr = TkFrame.new(@frame, 'width'=>@width_total,
- 'height'=>@v_scroll.cget('width') +
- 2 * @v_scroll.cget('borderwidth'))
-
- # dummy label to keep the height of title space
- TkLabel.new(@f_title, 'text'=>' ').pack
-
- # create each listbox
- sum = 0.0
- @rel_list << sum/@width_total
- title_info.each_with_index{|(label, width), idx|
- # set relation between label and index
- if @name_index.include?(label)
- @name_index[label] << idx
- else
- @name_index[label] = [idx]
- end
-
- # calculate relative positioning
- sum += width
- @rel_list << sum/@width_total
-
- # title field
- f = TkFrame.new(@f_title, 'width'=>width)
- base = [f]
- @title_list << TkLabel.new(f, 'text'=>label).pack('fill'=>'x')
- f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>-6,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
-
- # listbox field
- f = TkFrame.new(@f_lbox, 'width'=>width)
- base << f
- @lbox_list << TkListbox.new(f).pack('fill'=>'both', 'expand'=>true)
- f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>-4,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx], 'relheight'=>1.0)
-
- # scrollbar field
- f = TkFrame.new(@f_hscr, 'width'=>width)
- base << f
- @hscr_list << TkScrollbar.new(f, 'orient'=>'horizontal') .
- pack('fill'=>'x', 'anchor'=>'w')
- f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>-4,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
-
- @lbox_list[idx].xscrollcommand proc{|first, last|
- @hscr_list[idx].set first, last
- }
- @hscr_list[idx].command proc{|*args| @lbox_list[idx].xview *args}
-
- # add new base
- @base_list << base
- }
-
- # create tab
- @tab_list = [nil]
- (1..(@rel_list.size - 2)).each{|idx|
- tab = TkFrame.new(@f_title, 'cursor'=>'sb_h_double_arrow',
- 'width'=>6, 'borderwidth'=>2, 'relief'=>'raised')
- @tab_list << tab
- tab.place('relx'=>@rel_list[idx], 'anchor'=>'ne', 'relheight'=>0.95)
- tab.bind('Button-1',
- proc{|x| @x = x; @frame_width = TkWinfo.width(@f_title).to_f},
- '%X')
- tab.bind('B1-Motion', proc{|x, idx| resize(x, idx.to_i)}, "%X #{idx}")
- }
-
- # set control procedure for vertical scroll
- @lbox_list.each{|lbox|
- lbox.yscrollcommand proc{|first, last|
- @v_scroll.set first, last
- }
- }
- @v_scroll.command proc{|*args| @lbox_list.each{|lbox| lbox.yview *args} }
-
- # binding for listboxes
- @mode = {}
- @mode['browse'] = browse_mode_bindtag
- @mode['single'] = single_mode_bindtag
- @mode['extended'] = extended_mode_bindtag
- @mode['multiple'] = multiple_mode_bindtag
- @current_mode = 'browse'
- @lbox_list.each{|l|
- l.bind('Shift-Key-Left',
- proc{|w| focus_shift(w, -1); Tk.callback_break}, '%W')
- l.bind('Shift-Key-Right',
- proc{|w| focus_shift(w, 1); Tk.callback_break}, '%W')
-
- l.bind('Button-2', proc{|x, y|
- @lbox_mark_x = x
- @lbox_list.each{|lbox| lbox.scan_mark(x, y)}
- }, '%x %y')
- l.bind('B2-Motion', proc{|x, y|
- @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)}
- l.scan_dragto(x, y)
- }, '%x %y')
-
- l.bindtags(l.bindtags.unshift(@mode[@current_mode]))
- }
-
- # alignment
- TkGrid.rowconfigure(@frame, 0, 'weight'=>0)
- TkGrid.rowconfigure(@frame, 1, 'weight'=>1)
- TkGrid.rowconfigure(@frame, 2, 'weight'=>0)
- TkGrid.columnconfigure(@frame, 0, 'weight'=>1)
- TkGrid.columnconfigure(@frame, 1, 'weight'=>0)
- @v_scroll.grid('row'=>1, 'column'=>1, 'sticky'=>'ns')
- @f_title.grid('row'=>0, 'column'=>0, 'sticky'=>'news')
- @f_lbox.grid('row'=>1, 'column'=>0, 'sticky'=>'news')
- @f_hscr.grid('row'=>2, 'column'=>0, 'sticky'=>'ew')
-
- # binding for 'Configure' event
- @frame.bind('Configure', proc{reconstruct})
-
- # set default receiver of method calls
- @path = @lbox_list[0].path
-
- # configure options
- keys = {} unless keys
- keys = _symbolkey2str(keys)
-
- # 'mode' option of listboxes
- sel_mode = keys.delete('mode')
- mode(sel_mode) if sel_mode
-
- # 'scrollbarwidth' option == 'width' option of scrollbars
- width = keys.delete('scrollbarwidth')
- scrollbarwidth(width) if width
-
- # options for listbox titles
- title_font = keys.delete('titlefont')
- title_fg = keys.delete('titleforeground')
- title_bg = keys.delete('titlebackground')
- if title_font or title_fg or title_bg
- titleconfig(title_font, title_fg, title_bg)
- end
-
- # set receivers for configure methods
- delegate('DEFAULT', *@lbox_list)
- delegate('activebackground', @v_scroll, *@hscr_list)
- delegate('troughcolor', @v_scroll, *@hscr_list)
- delegate('repeatdelay', @v_scroll, *@hscr_list)
- delegate('repeatinterval', @v_scroll, *@hscr_list)
- delegate('borderwidth', @frame)
- delegate('relief', @frame)
-
- # configure
- configure(keys) if keys.size > 0
- end
- private :initialize_composite
-
- # set 'mode' option of listboxes
- def mode(sel_mode)
- @lbox_list.each{|l|
- tags = l.bindtags
- tags = tags - [ @mode[@current_mode] ]
- l.bindtags(tags.unshift(@mode[sel_mode]))
- @current_mode = sel_mode
- }
- end
-
- # set scrollbar width
- def scrollbarwidth(width)
- @v_scroll['width'] = width
- @hscr_list.each{|hscr| hscr['width'] = width}
- @f_hscr['height'] = width + 2 * @v_scroll.cget('borderwidth')
- end
-
- # set options of titles
- def titleconfig(font, fg, bg)
- keys = {}
- keys['font'] = font if font
- keys['foreground'] = fg if fg
- keys['background'] = bg if bg
- @title_list.each{|label| label.configure(keys)}
- end
-
- # get label widgets of listbox titles
- def titlelabels(*indices)
- @title_list[*indices]
- end
-
- # get listbox widgets
- def columns(*indices)
- @lbox_list[*indices]
- end
-
- def activate(idx)
- @lbox_list.each{|lbox| lbox.activate(idx)}
- end
-
- def bbox(idx)
- @lbox_list.collect{|lbox| lbox.bbox(idx)}
- end
-
- def delete(*idx)
- @lbox_list.collect{|lbox| lbox.delete(*idx)}
- end
-
- def get(*idx)
- if idx.size == 1
- @lbox_list.collect{|lbox| lbox.get(*idx)}
- else
- list = @lbox_list.collect{|lbox| lbox.get(*idx)}
- result = []
- list[0].each_with_index{|line, index|
- result << list.collect{|lines| lines[index]}
- }
- result
- end
- end
-
- def _line_array_to_hash(line)
- result = {}
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- result[label] = line[indices[0]]
- else
- result[label] = indices.collect{|index| line[index]}
- end
- }
- result
- end
- private :_line_array_to_hash
-
- def get_by_hash(*idx)
- get_result = get(*idx)
- if idx.size == 1
- _line_array_to_hash(get_result)
- else
- get_result.collect{|line| _line_array_to_hash(line)}
- end
- end
-
- def insert(idx, *lines)
- lbox_ins = []
- (0..@lbox_list.size).each{lbox_ins << []}
-
- lines.each{|line|
- if line.kind_of? Hash
- array = []
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- array[indices[0]] = line[label]
- else
- if line[label].kind_of? Array
- indices.each_with_index{|index, num|
- array[index] = line[label][num]
- }
- else
- array[indices[0]] = line[label]
- end
- end
- }
- line = array
- end
-
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- lbox_ins[indices[0]] << line[indices[0]]
- else
- indices.each{|index| lbox_ins[index] << line[index]}
- end
- }
- }
-
- @lbox_list.each_with_index{|lbox, index|
- lbox.insert(idx, *lbox_ins[index]) if lbox_ins[index]
- }
- end
-
- def selection_anchor(index)
- @lbox_list.each{|lbox| lbox.selection_anchor(index)}
- end
-
- def selection_clear(first, last=None)
- @lbox_list.each{|lbox| lbox.selection_clear(first, last=None)}
- end
-
- def selection_set(first, last=None)
- @lbox_list.each{|lbox| lbox.selection_set(first, last=None)}
- end
-
- ###########################################
- private
-
- def reconstruct
- (0..(@rel_list.size - 2)).each{|idx|
- title, lbox, hscr = @base_list[idx]
- title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
- lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relheight'=>1.0)
- hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
-
- tab = @tab_list[idx]
- tab.place('relx'=>@rel_list[idx]) if tab
- }
- end
-
- def resize(x, idx)
- # adjustment of relative positioning
- delta = (x - @x) / @frame_width
- if delta < @rel_list[idx-1] - @rel_list[idx] + 0.02
- delta = @rel_list[idx-1] - @rel_list[idx] + 0.02
- elsif delta > @rel_list[idx+1] - @rel_list[idx] - 0.02
- delta = @rel_list[idx+1] - @rel_list[idx] - 0.02
- end
- @rel_list[idx] += delta
-
- # adjustment of leftside widget of the tab
- title, lbox, hscr = @base_list[idx - 1]
- title.place('relwidth'=>@rel_list[idx] - @rel_list[idx-1])
- lbox.place('relwidth'=>@rel_list[idx] - @rel_list[idx-1], 'relheight'=>1.0)
- hscr.place('relwidth'=>@rel_list[idx] - @rel_list[idx-1])
-
- # adjustment of the tab position
- @tab_list[idx].place('relx'=>@rel_list[idx])
-
- # adjustment of rightside widget of the tab
- title, lbox, hscr = @base_list[idx]
- title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
- lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx], 'relheight'=>1.0)
- hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
-
- # update reference position
- @x = x
- end
-
- #################################
- def browse_mode_bindtag
- t = TkBindTag.new
- t.bind('Button-1',
- proc{|w, y| w.focus; select_line(w, w.nearest(y))}, '%W %y')
- t.bind('B1-Motion', proc{|w, y| select_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Shift-Button-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Key-Up', proc{|w| select_shift(w, -1)}, '%W')
- t.bind('Key-Down', proc{|w| select_shift(w, 1)}, '%W')
-
- t.bind('Control-Home', proc{|w| select_line(w, 0)}, '%W')
- t.bind('Control-End', proc{|w| select_line(w, 'end')}, '%W')
-
- t.bind('space', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Select', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Control-slash',
- proc{|w| select_line(w, w.index('active').to_i)}, '%W')
-
- t
- end
-
- ########################
- def single_mode_bindtag
- t = TkBindTag.new
- t.bind('Button-1',
- proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
- t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Shift-Button-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Key-Up', proc{|w| select_shift(w, -1)}, '%W')
- t.bind('Key-Down', proc{|w| select_shift(w, 1)}, '%W')
-
- t.bind('Control-Home', proc{|w| select_line(w, 0)}, '%W')
- t.bind('Control-End', proc{|w| select_line(w, 'end')}, '%W')
-
- t.bind('space', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Select', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Control-slash',
- proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Control-backslash',
- proc{@lbox_list.each{|l| l.selection_clear(0, 'end')}})
-
- t
- end
-
- ########################
- def extended_mode_bindtag
- t = TkBindTag.new
- t.bind('Button-1',
- proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
- t.bind('B1-Motion', proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
-
- t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Shift-Button-1',
- proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
- t.bind('Shift-B1-Motion',
- proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
-
- t.bind('Control-Button-1',
- proc{|w, y| select_toggle(w, w.nearest(y))}, '%W %y')
-
- t.bind('Control-B1-Motion',
- proc{|w, y| select_drag(w, w.nearest(y))}, '%W %y')
-
- t.bind('Key-Up', proc{|w| active_shift(w, -1)}, '%W')
- t.bind('Key-Down', proc{|w| active_shift(w, 1)}, '%W')
-
- t.bind('Shift-Up', proc{|w| select_expand(w, -1)}, '%W')
- t.bind('Shift-Down', proc{|w| select_expand(w, 1)}, '%W')
-
- t.bind('Control-Home', proc{|w| select_line2(w, 0)}, '%W')
- t.bind('Control-End', proc{|w| select_line2(w, 'end')}, '%W')
-
- t.bind('Control-Shift-Home', proc{|w| select_range(w, 0)}, '%W')
- t.bind('Control-Shift-End', proc{|w| select_range(w, 'end')}, '%W')
-
- t.bind('space', proc{|w| select_active(w)}, '%W')
- t.bind('Select', proc{|w| select_active(w)}, '%W')
- t.bind('Control-slash', proc{|w| select_all}, '%W')
- t.bind('Control-backslash', proc{|w| clear_all}, '%W')
-
- t
- end
-
- ########################
- def multiple_mode_bindtag
- t = TkBindTag.new
- t.bind('Button-1',
- proc{|w, y| w.focus; select_line3(w, w.nearest(y))}, '%W %y')
- t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Key-Up', proc{|w| active_shift(w, -1)}, '%W')
- t.bind('Key-Down', proc{|w| active_shift(w, 1)}, '%W')
-
- t.bind('Control-Home', proc{|w| select_line2(w, 0)}, '%W')
- t.bind('Control-End', proc{|w| select_line2(w, 'end')}, '%W')
-
- t.bind('Control-Shift-Home', proc{|w| active_line(w, 0)}, '%W')
- t.bind('Control-Shift-End', proc{|w| active_line(w, 'end')}, '%W')
-
- t.bind('space', proc{|w| select_active(w)}, '%W')
- t.bind('Select', proc{|w| select_active(w)}, '%W')
- t.bind('Control-slash', proc{|w| select_all}, '%W')
- t.bind('Control-backslash', proc{|w| clear_all}, '%W')
-
- t
- end
-
- ########################
- def active_line(w, idx)
- @lbox_list.each{|l| l.activate(idx)}
- end
-
- def select_only(w, idx)
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- l.selection_anchor(idx)
- l.selection_set('anchor')
- }
- end
-
- def select_range(w, idx)
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- l.selection_set('anchor', idx)
- }
- end
-
- def select_toggle(w, idx)
- st = w.selection_includes(idx)
- @lbox_list.each{|l|
- l.selection_anchor(idx)
- if st == 1
- l.selection_clear(idx)
- else
- l.selection_set(idx)
- end
- }
- end
-
- def select_drag(w, idx)
- st = w.selection_includes('anchor')
- @lbox_list.each{|l|
- if st == 1
- l.selection_set('anchor', idx)
- else
- l.selection_clear('anchor', idx)
- end
- }
- end
-
- def select_line(w, idx)
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- l.activate(idx)
- l.selection_anchor(idx)
- l.selection_set('anchor')
- }
- w.selection_set('anchor')
- end
-
- def select_line2(w, idx)
- @lbox_list.each{|l|
- l.activate(idx)
- l.selection_anchor(idx)
- l.selection_set('anchor')
- }
- end
-
- def select_line3(w, idx)
- @lbox_list.each{|l|
- l.selection_set(idx)
- }
- end
-
- def select_active(w)
- idx = l.activate(idx)
- @lbox_list.each{|l|
- l.selection_set(idx)
- }
- end
-
- def select_expand(w, dir)
- idx = w.index('active').to_i + dir
- if idx < 0
- idx = 0
- elsif idx >= w.size
- idx = w.size - 1
- end
- @lbox_list.each{|l|
- l.activate(idx)
- l.selection_set(idx)
- }
- end
-
- def active_shift(w, dir)
- idx = w.index('active').to_i + dir
- if idx < 0
- idx = 0
- elsif idx >= w.size
- idx = w.size - 1
- end
- @lbox_list.each{|l|
- l.activate(idx)
- l.selection_anchor(idx)
- }
- end
-
- def select_shift(w, dir)
- idx = w.index('anchor').to_i + dir
- if idx < 0
- idx = 0
- elsif idx >= w.size
- idx = w.size - 1
- end
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- l.activate(idx)
- l.selection_anchor(idx)
- l.selection_set('anchor')
- }
- end
-
- def select_all
- @lbox_list.each{|l|
- l.selection_set(0, 'end')
- }
- end
-
- def clear_all
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- }
- end
-
- def focus_shift(w, dir)
- idx = @lbox_list.index(w) + dir
- return if idx < 0
- return if idx >= @lbox_list.size
- @lbox_list[idx].focus
- end
- ########################
-end
-
-################################################
-# test
-################################################
-if __FILE__ == $0
- f = TkFrame.new(nil, 'width'=>300,
- 'height'=>200).pack('fill'=>'both', 'expand'=>'true')
- #f = TkFrame.new.pack('fill'=>'both', 'expand'=>'true')
- l = TkMultiListbox.new(f, 150,
- [ ['L1', 100],
- ['L2', 200],
- ['L3', 50] ],
- 'titlefont'=>'courier',
- 'titleforeground'=>'yellow',
- 'titlebackground'=>'navy'
- ).pack('fill'=>'both', 'expand'=>true)
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbbbbb','ccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbbbbb','ccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbbbbb','ccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- p l.columns(1)
- p l.columns(1..3)
- p l.columns(1,2)
- Tk.mainloop
-end
diff --git a/ext/tk/sample/tkmultilistframe.rb b/ext/tk/sample/tkmultilistframe.rb
deleted file mode 100644
index 5e07b4e230..0000000000
--- a/ext/tk/sample/tkmultilistframe.rb
+++ /dev/null
@@ -1,941 +0,0 @@
-# frozen_string_literal: false
-#
-# tkmultilistframe.rb : multiple listbox widget on scrollable frame
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-class TkMultiListFrame < TkListbox
- include TkComposite
-
- # lbox_height : height of listboxes (pixel)
- # title_info : array [ [<title_string>,<init_width>], ... ]
- # keys : hash {<option>=><value>, ... }
- def initialize_composite(lbox_height, title_info, keys={})
- # argument check
- if (! title_info.kind_of? Array) or (title_info.size < 2)
- raise
- end
-
- # mode
- @keep_minsize = true
- @show_each_hscr = true
- @show_win_hscr = true
-
- # init arrays
- @base_list = []
- @rel_list = []
- @title_list = []
- @title_cmd = []
- @lbox_list = []
- @hscr_list = []
-
- # decide total width
- @lbox_total = title_info.size
- @width_total = 0
- title_info.each{|title, width, cmd|
- @width_total += width.to_f
- @title_cmd << cmd
- }
-
- # rel-table of label=>index
- @name_index = {}
-
- # size definition
- @window_width = @width_total
- @sash = 5
- @scrbar_width = 15
- @scrbar_border = 3
- @lbox_border = 1
- @title_border = 3
- @h_l_thick = 0
-
- # init status
- @mode = :title
-
- # vertical scrollbar
-=begin
- @v_scroll = TkScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'orient'=>'vertical', 'width'=>@scrbar_width)
-=end
- @v_scroll = TkYScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'width'=>@scrbar_width)
-
- # horizontal scrollbar
-=begin
- @h_scroll = TkScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'orient'=>'horizontal', 'width'=>@scrbar_width)
-=end
- @h_scroll = TkXScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'width'=>@scrbar_width)
-
- # create base flames
- @c_title = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
- @f_title = TkFrame.new(@c_title, 'width'=>@width_total)
- @w_title = TkcWindow.new(@c_title, 0, 0,
- 'window'=>@f_title, 'anchor'=>'nw')
-
- @c_lbox = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
- @f_lbox = TkFrame.new(@c_lbox, 'width'=>@width_total)
- @w_lbox = TkcWindow.new(@c_lbox, 0, 0, 'window'=>@f_lbox, 'anchor'=>'nw')
-
- @c_hscr = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
- @f_hscr = TkFrame.new(@c_hscr, 'width'=>@width_total)
- @w_hscr = TkcWindow.new(@c_hscr, 0, 0, 'window'=>@f_hscr, 'anchor'=>'nw')
-
- # create each listbox
- sum = 0.0
- @rel_list << sum/@width_total
- title_info.each_with_index{|(label, width), idx|
- # set relation between label and index
- if @name_index.include?(label)
- @name_index[label] << idx
- else
- @name_index[label] = [idx]
- end
-
- # calculate relative positioning
- sum += width
- @rel_list << sum/@width_total
-
- # title field
- f = TkFrame.new(@f_title, 'width'=>width)
- base = [f]
-
- title = TkLabel.new(f, 'text'=>label, 'borderwidth'=>@title_border,
- 'relief'=>'raised', 'highlightthickness'=>@h_l_thick)
- title_binding(title, idx)
- title.pack('fill'=>'x')
-
- @title_list << title
-
- f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relheight'=>1.0,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
-
- # listbox field
- f = TkFrame.new(@f_lbox, 'width'=>width)
- base << f
- @lbox_list << TkListbox.new(f, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@lbox_border
- ).pack('fill'=>'both', 'expand'=>true)
- f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx], 'relheight'=>1.0)
-
- # scrollbar field
- f = TkFrame.new(@f_hscr, 'width'=>width)
- base << f
-=begin
- @hscr_list << TkScrollbar.new(f, 'orient'=>'horizontal',
- 'width'=>@scrbar_width,
- 'borderwidth'=>@scrbar_border,
- 'highlightthickness'=>@h_l_thick
- ).pack('fill'=>'x', 'anchor'=>'w')
-=end
- @hscr_list << TkXScrollbar.new(f, 'width'=>@scrbar_width,
- 'borderwidth'=>@scrbar_border,
- 'highlightthickness'=>@h_l_thick
- ).pack('fill'=>'x', 'anchor'=>'w')
- f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
-
-=begin
- @lbox_list[idx].xscrollcommand proc{|first, last|
- @hscr_list[idx].set first, last
- }
- @hscr_list[idx].command proc{|*args| @lbox_list[idx].xview *args}
-=end
- @lbox_list[idx].xscrollbar(@hscr_list[idx])
-
- # add new base
- @base_list << base
- }
-
- # pad
- # @f_title_pad = TkFrame.new(@frame)
- @f_title_pad = TkFrame.new(@frame, 'relief'=>'raised',
- 'borderwidth'=>@title_border,
- 'highlightthickness'=>@h_l_thick)
-
- @f_scr_pad = TkFrame.new(@frame, 'relief'=>'sunken',
- 'borderwidth'=>1,
- 'highlightthickness'=>@h_l_thick)
-
- # height check
- title_height = 0
- @title_list.each{|w|
- h = w.winfo_reqheight
- title_height = h if title_height < h
- }
-
- hscr_height = 0
- @hscr_list.each{|w|
- h = w.winfo_reqheight
- hscr_height = h if hscr_height < h
- }
-
- @f_title.height title_height
- @f_lbox.height lbox_height
- @f_hscr.height hscr_height
-
- # set control procedure for vertical scroll
-=begin
- @lbox_list.each{|lbox|
- lbox.yscrollcommand proc{|first, last|
- @v_scroll.set first, last
- }
- }
- @v_scroll.command proc{|*args| @lbox_list.each{|lbox| lbox.yview *args} }
-=end
- @v_scroll.assign(*@lbox_list)
-
- # set control procedure for horizontal scroll
-=begin
- @c_title.xscrollcommand proc{|first, last|
- @h_scroll.set first, last
- }
- @c_lbox.xscrollcommand proc{|first, last|
- @h_scroll.set first, last
- }
- @c_hscr.xscrollcommand proc{|first, last|
- @h_scroll.set first, last
- }
- @h_scroll.command proc{|*args|
- @c_title.xview *args
- @c_lbox.xview *args
- @c_hscr.xview *args if @show_each_hscr
- }
-=end
- @h_scroll.assign(@c_title, @c_lbox, @c_hscr)
-
- # binding for listboxes
- @lbox_mode = {}
- @lbox_mode['browse'] = browse_mode_bindtag
- @lbox_mode['single'] = single_mode_bindtag
- @lbox_mode['extended'] = extended_mode_bindtag
- @lbox_mode['multiple'] = multiple_mode_bindtag
- @current_mode = 'browse'
- @lbox_list.each_with_index{|l, idx|
- l.bind('Shift-Key-Left',
- proc{|w| focus_shift(w, -1); Tk.callback_break}, '%W')
- l.bind('Shift-Key-Right',
- proc{|w| focus_shift(w, 1); Tk.callback_break}, '%W')
-
- l.bind('Button-2', proc{|x, y|
- @lbox_mark_x = x
- @lbox_list.each{|lbox| lbox.scan_mark(x, y)}
- }, '%x %y')
- l.bind('B2-Motion', proc{|x, y|
- @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)}
- l.scan_dragto(x, y)
- }, '%x %y')
-
- l.bindtags(l.bindtags.unshift(@lbox_mode[@current_mode]))
- }
-
- bbox = @w_title.bbox
- @c_title.height(bbox[3])
- @c_title.scrollregion(bbox)
-
- bbox = @w_lbox.bbox
- @c_lbox.height(bbox[3])
- @c_lbox.scrollregion(bbox)
-
- if @show_each_hscr
- bbox = @w_hscr.bbox
- @c_hscr.height(bbox[3])
- @c_hscr.scrollregion(bbox)
- end
-
- # alignment
- TkGrid.rowconfigure(@frame, 0, 'weight'=>0)
- TkGrid.rowconfigure(@frame, 1, 'weight'=>1)
- TkGrid.rowconfigure(@frame, 2, 'weight'=>0)
- TkGrid.rowconfigure(@frame, 3, 'weight'=>0)
- TkGrid.columnconfigure(@frame, 0, 'weight'=>1)
- TkGrid.columnconfigure(@frame, 1, 'weight'=>0)
- TkGrid.columnconfigure(@frame, 2, 'weight'=>0)
- @v_scroll.grid('row'=>1, 'column'=>2, 'sticky'=>'ns')
- @c_title.grid('row'=>0, 'column'=>0, 'sticky'=>'news')
- @f_title_pad.grid('row'=>0, 'column'=>2, 'sticky'=>'news')
- @c_lbox.grid('row'=>1, 'column'=>0, 'sticky'=>'news')
- @c_hscr.grid('row'=>2, 'column'=>0, 'sticky'=>'ew') if @show_each_hscr
- @h_scroll.grid('row'=>3, 'column'=>0, 'sticky'=>'ew') if @show_win_hscr
- @f_scr_pad.grid('row'=>2, 'rowspan'=>2, 'column'=>2, 'sticky'=>'news')
-
- # binding for 'Configure' event
- @c_lbox.bind('Configure',
- proc{|height, width| reconstruct(height, width)},
- '%h %w')
-
- # set default receiver of method calls
- @path = @lbox_list[0].path
-
- # configure options
- keys = {} unless keys
- keys = _symbolkey2str(keys)
-
- # 'mode' option of listboxes
- sel_mode = keys.delete('mode')
- mode(sel_mode) if sel_mode
-
- # 'scrollbarwidth' option == 'width' option of scrollbars
- width = keys.delete('scrollbarwidth')
- scrollbarwidth(width) if width
-
- # options for listbox titles
- title_font = keys.delete('titlefont')
- titlefont(title_font) if title_font
-
- title_fg = keys.delete('titleforeground')
- titleforeground(title_fg) if title_fg
-
- title_bg = keys.delete('titlebackground')
- titlebackground(title_bg) if title_bg
-
- # set receivers for configure methods
- delegate('DEFAULT', *@lbox_list)
- delegate('activebackground', @v_scroll, @h_scroll, *@hscr_list)
- delegate('troughcolor', @v_scroll, @h_scroll, *@hscr_list)
- delegate('repeatdelay', @v_scroll, @h_scroll, *@hscr_list)
- delegate('repeatinterval', @v_scroll, @h_scroll, *@hscr_list)
- delegate('borderwidth', @frame)
- delegate('width', @c_lbox, @c_title, @c_hscr)
- delegate('relief', @frame)
-
- # configure
- configure(keys) if keys.size > 0
- end
- private :initialize_composite
-
- # set 'mode' option of listboxes
- def mode(sel_mode)
- @lbox_list.each{|l|
- tags = l.bindtags
- tags = tags - [ @lbox_mode[@current_mode] ]
- l.bindtags(tags.unshift(@lbox_mode[sel_mode]))
- @current_mode = sel_mode
- }
- end
-
- # keep_minsize?
- def keep_minsize?
- @keep_minsize
- end
- def keep_minsize(bool)
- @keep_minsize = bool
- end
-
- # each hscr
- def show_each_hscr
- @show_each_hscr = true
- @c_hscr.grid('row'=>2, 'column'=>0, 'sticky'=>'ew')
- end
- def hide_each_hscr
- @show_each_hscr = false
- @c_hscr.ungrid
- end
-
- # window hscroll
- def show_win_hscr
- @show_win_hscr = true
- @h_scroll.grid('row'=>3, 'column'=>0, 'sticky'=>'ew')
- end
- def hide_win_hscr
- @show_each_hscr = false
- @h_scroll.ungrid
- end
-
- # set scrollbar width
- def scrollbarwidth(width)
- @scrbar_width = width
- @v_scroll['width'] = @scrbar_width
- @h_scroll['width'] = @scrbar_width
- @hscr_list.each{|hscr| hscr['width'] = @scrbar_width}
- self
- end
-
- # set scrollbar border
- def scrollbarborder(width)
- @scrbar_border = width
- @v_scroll['border'] = @scrbar_border
- @h_scroll['border'] = @scrbar_border
- @hscr_list.each{|hscr| hscr['border'] = @scrbar_border}
- self
- end
-
- # set listbox borders
- def listboxborder(width)
- @lbox_border = width
- @lbox_list.each{|w| w['border'] = @lbox_border}
- self
- end
-
- # set listbox relief
- def listboxrelief(relief)
- @lbox_list.each{|w| w['relief'] = relief}
- self
- end
-
- # set title borders
- def titleborder(width)
- @title_border = width
- @f_title_pad['border'] = @title_border
- @title_list.each{|label| label['border'] = @title_border}
- self
- end
-
- # set title font
- def titlefont(font)
- @title_list.each{|label| label['font'] = font}
- title_height = 0
- @title_list.each{|w|
- h = w.winfo_reqheight
- title_height = h if title_height < h
- }
- @f_title.height title_height
- bbox = @w_title.bbox
- @c_title.height(bbox[3])
- @c_title.scrollregion(bbox)
- self
- end
-
- # set title foreground color
- def titleforeground(fg)
- @title_list.each{|label| label['foreground'] = fg}
- self
- end
-
- # set title background color
- def titlebackground(bg)
- @f_title_pad['background'] = bg
- @title_list.each{|label| label['background'] = bg}
- self
- end
-
- # set title cmds
- def titlecommand(idx, cmd=Proc.new)
- @title_cmd[idx] = cmd
- end
-
- # call title cmds
- def titleinvoke(idx)
- @title_cmd[idx].call if @title_cmd[idx]
- end
-
- # get label widgets of listbox titles
- def titlelabels(*indices)
- @title_list[*indices]
- end
-
- # get listbox widgets
- def columns(*indices)
- @lbox_list[*indices]
- end
-
- def activate(idx)
- @lbox_list.each{|lbox| lbox.activate(idx)}
- end
-
- def bbox(idx)
- @lbox_list.collect{|lbox| lbox.bbox(idx)}
- end
-
- def delete(*idx)
- @lbox_list.collect{|lbox| lbox.delete(*idx)}
- end
-
- def get(*idx)
- if idx.size == 1
- @lbox_list.collect{|lbox| lbox.get(*idx)}
- else
- list = @lbox_list.collect{|lbox| lbox.get(*idx)}
- result = []
- list[0].each_with_index{|line, index|
- result << list.collect{|lines| lines[index]}
- }
- result
- end
- end
-
- def _line_array_to_hash(line)
- result = {}
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- result[label] = line[indices[0]]
- else
- result[label] = indices.collect{|index| line[index]}
- end
- }
- result
- end
- private :_line_array_to_hash
-
- def get_by_hash(*idx)
- get_result = get(*idx)
- if idx.size == 1
- _line_array_to_hash(get_result)
- else
- get_result.collect{|line| _line_array_to_hash(line)}
- end
- end
-
- def insert(idx, *lines)
- lbox_ins = []
- (0..@lbox_list.size).each{lbox_ins << []}
-
- lines.each{|line|
- if line.kind_of? Hash
- array = []
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- array[indices[0]] = line[label]
- else
- if line[label].kind_of? Array
- indices.each_with_index{|index, num|
- array[index] = line[label][num]
- }
- else
- array[indices[0]] = line[label]
- end
- end
- }
- line = array
- end
-
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- lbox_ins[indices[0]] << line[indices[0]]
- else
- indices.each{|index| lbox_ins[index] << line[index]}
- end
- }
- }
-
- @lbox_list.each_with_index{|lbox, index|
- lbox.insert(idx, *lbox_ins[index]) if lbox_ins[index]
- }
- end
-
- def selection_anchor(index)
- @lbox_list.each{|lbox| lbox.selection_anchor(index)}
- end
-
- def selection_clear(first, last=None)
- @lbox_list.each{|lbox| lbox.selection_clear(first, last=None)}
- end
-
- def selection_set(first, last=None)
- @lbox_list.each{|lbox| lbox.selection_set(first, last=None)}
- end
-
- ###########################################
- private
-
- def reconstruct(height, width)
- if @keep_minsize && width <= @width_total
- @f_title.width(@width_total)
- @f_lbox.width(@width_total)
- @f_hscr.width(@width_total) if @show_each_hscr
- @window_width = @width_total
- else
- @f_title.width(width)
- @f_lbox.width(width)
- @f_hscr.width(width) if @show_each_hscr
- @window_width = width
- end
-
- @f_lbox.height(height)
-
- @c_title.scrollregion(@w_title.bbox)
- @c_lbox.scrollregion(@w_lbox.bbox)
- @c_hscr.scrollregion(@w_hscr.bbox) if @show_each_hscr
-
- (0..(@rel_list.size - 2)).each{|idx|
- title, lbox, hscr = @base_list[idx]
- title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
- lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relheight'=>1.0)
- hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
- }
- end
-
- def resize(x)
- idx = @sel_sash
- return if idx == 0
-
- # adjustment of relative positioning
- delta = (x - @x) / @frame_width
- if delta < @rel_list[idx-1] - @rel_list[idx] + (2*@sash/@frame_width)
- delta = @rel_list[idx-1] - @rel_list[idx] + (2*@sash/@frame_width)
- elsif delta > @rel_list[idx+1] - @rel_list[idx] - (2*@sash/@frame_width)
- delta = @rel_list[idx+1] - @rel_list[idx] - (2*@sash/@frame_width)
- end
- @rel_list[idx] += delta
-
- # adjustment of leftside widget of the sash
- title, lbox, hscr = @base_list[idx - 1]
- title.place('relwidth'=>@rel_list[idx] - @rel_list[idx-1])
- lbox.place('relwidth'=>@rel_list[idx] - @rel_list[idx-1], 'relheight'=>1.0)
- hscr.place('relwidth'=>@rel_list[idx] - @rel_list[idx-1])
-
- # adjustment of rightside widget of the sash
- title, lbox, hscr = @base_list[idx]
- title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
- lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx], 'relheight'=>1.0)
- hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
-
- # update reference position
- @x = x
- end
-
- def motion_cb(w, x, idx)
- if x <= @sash && idx > 0
- w.cursor 'sb_h_double_arrow'
- @mode = :sash
- @sel_sash = idx
- elsif x >= w.winfo_width - @sash && idx < @lbox_total - 1
- w.cursor 'sb_h_double_arrow'
- @mode = :sash
- @sel_sash = idx + 1
- else
- w.cursor ""
- @mode = :title
- @sel_sash = 0
- end
- end
-
- def title_binding(title, index)
- title.bind('Motion', proc{|w, x, idx| motion_cb(w, x, idx.to_i)},
- "%W %x #{index}")
-
- title.bind('Enter', proc{|w, x, idx| motion_cb(w, x, idx.to_i)},
- "%W %x #{index}")
-
- title.bind('Leave', proc{|w| w.cursor ""}, "%W")
-
- title.bind('Button-1',
- proc{|w, x|
- if @mode == :sash
- @x = x
- @frame_width = TkWinfo.width(@f_title).to_f
- else
- title.relief 'sunken'
- end
- },
- '%W %X')
-
- title.bind('ButtonRelease-1',
- proc{|w, x, idx|
- i = idx.to_i
- if @mode == :title && @title_cmd[i].kind_of?(Proc)
- @title_cmd[i].call
- end
- title.relief 'raised'
- motion_cb(w,x,i)
- },
- "%W %x #{index}")
-
- title.bind('B1-Motion', proc{|x| resize(x) if @mode == :sash}, "%X")
- end
-
- #################################
- def browse_mode_bindtag
- t = TkBindTag.new
- t.bind('Button-1',
- proc{|w, y| w.focus; select_line(w, w.nearest(y))}, '%W %y')
- t.bind('B1-Motion', proc{|w, y| select_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Shift-Button-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Key-Up', proc{|w| select_shift(w, -1)}, '%W')
- t.bind('Key-Down', proc{|w| select_shift(w, 1)}, '%W')
-
- t.bind('Control-Home', proc{|w| select_line(w, 0)}, '%W')
- t.bind('Control-End', proc{|w| select_line(w, 'end')}, '%W')
-
- t.bind('space', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Select', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Control-slash',
- proc{|w| select_line(w, w.index('active').to_i)}, '%W')
-
- t
- end
-
- ########################
- def single_mode_bindtag
- t = TkBindTag.new
- t.bind('Button-1',
- proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
- t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Shift-Button-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Key-Up', proc{|w| select_shift(w, -1)}, '%W')
- t.bind('Key-Down', proc{|w| select_shift(w, 1)}, '%W')
-
- t.bind('Control-Home', proc{|w| select_line(w, 0)}, '%W')
- t.bind('Control-End', proc{|w| select_line(w, 'end')}, '%W')
-
- t.bind('space', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Select', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Control-slash',
- proc{|w| select_line(w, w.index('active').to_i)}, '%W')
- t.bind('Control-backslash',
- proc{@lbox_list.each{|l| l.selection_clear(0, 'end')}})
-
- t
- end
-
- ########################
- def extended_mode_bindtag
- t = TkBindTag.new
- t.bind('Button-1',
- proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
- t.bind('B1-Motion', proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
-
- t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Shift-Button-1',
- proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
- t.bind('Shift-B1-Motion',
- proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
-
- t.bind('Control-Button-1',
- proc{|w, y| select_toggle(w, w.nearest(y))}, '%W %y')
-
- t.bind('Control-B1-Motion',
- proc{|w, y| select_drag(w, w.nearest(y))}, '%W %y')
-
- t.bind('Key-Up', proc{|w| active_shift(w, -1)}, '%W')
- t.bind('Key-Down', proc{|w| active_shift(w, 1)}, '%W')
-
- t.bind('Shift-Up', proc{|w| select_expand(w, -1)}, '%W')
- t.bind('Shift-Down', proc{|w| select_expand(w, 1)}, '%W')
-
- t.bind('Control-Home', proc{|w| select_line2(w, 0)}, '%W')
- t.bind('Control-End', proc{|w| select_line2(w, 'end')}, '%W')
-
- t.bind('Control-Shift-Home', proc{|w| select_range(w, 0)}, '%W')
- t.bind('Control-Shift-End', proc{|w| select_range(w, 'end')}, '%W')
-
- t.bind('space', proc{|w| select_active(w)}, '%W')
- t.bind('Select', proc{|w| select_active(w)}, '%W')
- t.bind('Control-slash', proc{|w| select_all}, '%W')
- t.bind('Control-backslash', proc{|w| clear_all}, '%W')
-
- t
- end
-
- ########################
- def multiple_mode_bindtag
- t = TkBindTag.new
- t.bind('Button-1',
- proc{|w, y| w.focus; select_line3(w, w.nearest(y))}, '%W %y')
- t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
-
- t.bind('Key-Up', proc{|w| active_shift(w, -1)}, '%W')
- t.bind('Key-Down', proc{|w| active_shift(w, 1)}, '%W')
-
- t.bind('Control-Home', proc{|w| select_line2(w, 0)}, '%W')
- t.bind('Control-End', proc{|w| select_line2(w, 'end')}, '%W')
-
- t.bind('Control-Shift-Home', proc{|w| active_line(w, 0)}, '%W')
- t.bind('Control-Shift-End', proc{|w| active_line(w, 'end')}, '%W')
-
- t.bind('space', proc{|w| select_active(w)}, '%W')
- t.bind('Select', proc{|w| select_active(w)}, '%W')
- t.bind('Control-slash', proc{|w| select_all}, '%W')
- t.bind('Control-backslash', proc{|w| clear_all}, '%W')
-
- t
- end
-
- ########################
- def active_line(w, idx)
- @lbox_list.each{|l| l.activate(idx)}
- end
-
- def select_only(w, idx)
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- l.selection_anchor(idx)
- l.selection_set('anchor')
- }
- end
-
- def select_range(w, idx)
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- l.selection_set('anchor', idx)
- }
- end
-
- def select_toggle(w, idx)
- st = w.selection_includes(idx)
- @lbox_list.each{|l|
- l.selection_anchor(idx)
- if st == 1
- l.selection_clear(idx)
- else
- l.selection_set(idx)
- end
- }
- end
-
- def select_drag(w, idx)
- st = w.selection_includes('anchor')
- @lbox_list.each{|l|
- if st == 1
- l.selection_set('anchor', idx)
- else
- l.selection_clear('anchor', idx)
- end
- }
- end
-
- def select_line(w, idx)
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- l.activate(idx)
- l.selection_anchor(idx)
- l.selection_set('anchor')
- }
- w.selection_set('anchor')
- end
-
- def select_line2(w, idx)
- @lbox_list.each{|l|
- l.activate(idx)
- l.selection_anchor(idx)
- l.selection_set('anchor')
- }
- end
-
- def select_line3(w, idx)
- @lbox_list.each{|l|
- l.selection_set(idx)
- }
- end
-
- def select_active(w)
- idx = l.activate(idx)
- @lbox_list.each{|l|
- l.selection_set(idx)
- }
- end
-
- def select_expand(w, dir)
- idx = w.index('active').to_i + dir
- if idx < 0
- idx = 0
- elsif idx >= w.size
- idx = w.size - 1
- end
- @lbox_list.each{|l|
- l.activate(idx)
- l.selection_set(idx)
- }
- end
-
- def active_shift(w, dir)
- idx = w.index('active').to_i + dir
- if idx < 0
- idx = 0
- elsif idx >= w.size
- idx = w.size - 1
- end
- @lbox_list.each{|l|
- l.activate(idx)
- l.selection_anchor(idx)
- }
- end
-
- def select_shift(w, dir)
- idx = w.index('anchor').to_i + dir
- if idx < 0
- idx = 0
- elsif idx >= w.size
- idx = w.size - 1
- end
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- l.activate(idx)
- l.selection_anchor(idx)
- l.selection_set('anchor')
- }
- end
-
- def select_all
- @lbox_list.each{|l|
- l.selection_set(0, 'end')
- }
- end
-
- def clear_all
- @lbox_list.each{|l|
- l.selection_clear(0, 'end')
- }
- end
-
- def focus_shift(w, dir)
- idx = @lbox_list.index(w) + dir
- return if idx < 0
- return if idx >= @lbox_list.size
- @lbox_list[idx].focus
- end
- ########################
-end
-
-################################################
-# test
-################################################
-if __FILE__ == $0
- l = TkMultiListFrame.new(nil, 200,
- [ ['L1', 200, proc{p 'click L1'}],
- ['L2', 100],
- ['L3', 200] ],
- 'width'=>350,
- #'titleforeground'=>'yellow',
- 'titleforeground'=>'white',
- #'titlebackground'=>'navy',
- 'titlebackground'=>'blue',
- 'titlefont'=>'courier'
- ).pack('fill'=>'both', 'expand'=>true)
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
- 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
- 'cccccccccccccccccccccccccccccccccccccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbbbbb','ccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbbbbb','ccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbbbbb','ccccccccccccccccc'])
- l.insert('end', [1,2,3])
- l.insert('end', [4,5,6], [4,5,6])
- p l.columns(1)
- p l.columns(1..3)
- p l.columns(1,2)
- Tk.mainloop
-end
diff --git a/ext/tk/sample/tkoptdb-safeTk.rb b/ext/tk/sample/tkoptdb-safeTk.rb
deleted file mode 100755
index c0502448ac..0000000000
--- a/ext/tk/sample/tkoptdb-safeTk.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-
-require 'multi-tk'
-
-TkMessage.new(:text => <<EOM).pack
-This is a sample of the safe-Tk slave interpreter. \
-On the slave interpreter, 'tkoptdb.rb' demo is running.
-( NOTE:: a safe-Tk interpreter can't read options \
-from a file. Options are given by the master interpreter \
-in this script. )
-The window shown this message is a root widget of \
-the default master interpreter. The other window \
-is a toplevel widget of the master interpreter, and it \
-has a container frame of the safe-Tk slave interpreter.
-'exit' on the slave interpreter exits the slave only. \
-You can also delete the slave by the button on the toplevel widget.
-EOM
-
-if ENV['LANG'] =~ /^ja/
- # read Japanese resource
- ent = TkOptionDB.read_entries(File.expand_path('resource.ja',
- File.dirname(__FILE__)),
- 'utf-8')
-else
- # read English resource
- ent = TkOptionDB.read_entries(File.expand_path('resource.en',
- File.dirname(__FILE__)))
-end
-
-file = File.expand_path('tkoptdb.rb', File.dirname(__FILE__))
-
-ip = MultiTkIp.new_safeTk{
- # When a block is given to 'new_safeTk' method,
- # the block is evaluated on $SAFE==1.
- ent.each{|pat, val| Tk.tk_call('option', 'add', pat, val)}
-}
-
-print "ip.eval_proc{$SAFE} ==> ", ip.eval_proc{$SAFE}, "\n"
-
-print "\ncall 'ip.wait_on_mainloop = false'\n"
-print "If 'ip.wait_on_mainloop? == true', ",
- "when 'mainloop' is called on 'ip.eval_proc', ",
- "'ip.eval_proc' doesn't return while the root window exists.\n",
- "If you want to avoid that, set wait_on_mainloop to false. ",
- "Then the mainloop in the eval_proc returns soon ",
- "and the following steps are evaluated. \n",
- "If you hate the both of them, use 'ip.bg_eval_proc' or ",
- "wrap 'ip.eval_proc' by a thread.\n"
-
-ip.wait_on_mainloop = false
-
-ret = ip.eval_proc{
- # When a block is given to 'eval_proc' method,
- # the block is evaluated on the IP's current safe level.
- # So, the followings raises an exception.
- # An Exception object of the exception is returned as a
- # return value of this method.
-
- load file
-}
-print "\nip.eval_proc{}, which includes insecure operation in the given block, returns an exception object: ", ret.inspect, "\n"
-
-print "If a proc object is given, the proc is evaluated on the safe-level which is kept on the proc :: ip.eval_proc( proc{$SAFE} ) ==> ", ip.eval_proc(proc{$SAFE}), "\n"
-
-safe0_cmd = Proc.new{
- print 'safe0_cmd safe-level == ', $SAFE, "\n"
- # This proc object keeps current safe-level ($SAFE==0).
- load file
-}
-ip.eval_proc{safe0_cmd.call}
-
-# Tk.mainloop is ignored on the slave-IP
-Tk.mainloop
diff --git a/ext/tk/sample/tkoptdb.rb b/ext/tk/sample/tkoptdb.rb
deleted file mode 100644
index 3fb2464260..0000000000
--- a/ext/tk/sample/tkoptdb.rb
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# sample script of TkOptionDB
-#
-# If 'LANG' environment variable's value is started by 'ja',
-# then read Japanese resource data and display Japanese button text.
-# In other case, read English resource data and display English text.
-#
-require "tk"
-
-if __FILE__ == $0 || !TkCore::INTERP.safe?
- if ENV['LANG'] =~ /^ja/
- # read Japanese resource
- TkOptionDB.read_with_encoding(File.expand_path('resource.ja',
- File.dirname(__FILE__)),
- 'utf-8')
- else
- # read English resource
- TkOptionDB.readfile(File.expand_path('resource.en',
- File.dirname(__FILE__)))
- end
-end
-
-# 'show_msg' and 'bye_msg' procedures can be defined on BTN_CMD resource.
-# Those procedures are called under $SAFE==2
-cmd = TkOptionDB.new_proc_class(:BTN_CMD, [:show_msg, :bye_msg], 3) {
- # If you want to check resource string (str),
- # please define __check_proc_string__(str) like this.
- class << self
- def __check_proc_string__(str)
- print "($SAFE=#{$SAFE} >>>) check!! str.tainted?::#{str.tainted?}"
- str.untaint
- print "==>#{str.tainted?} (<<< $SAFE=#{$SAFE}): "
- str
- end
- private :__check_proc_string__
- end
-}
-
-# following two frame widgets use same database entry
-TkFrame.new(:class=>'BtnFrame'){|f|
- pack(:padx=>5, :pady=>5)
- TkButton.new(:parent=>f, :widgetname=>'hello'){
- command proc{
- print "($SAFE=#{$SAFE} >>>) : "
- cmd.show_msg(TkOptionDB.inspect)
- print "(<<< $SAFE=#{$SAFE})"
- }
- pack(:fill=>:x, :padx=>10, :pady=>10)
- }
- TkButton.new(:command=>proc{
- print "($SAFE=#{$SAFE} >>>) : "
- cmd.bye_msg
- print "(<<< $SAFE=#{$SAFE} ) : "
- exit
- },
- :parent=>f, :widgetname=>'quit'){
- pack(:fill=>:x, :padx=>10, :pady=>10)
- }
-}
-
-class BtnFrame < TkFrame; end
-BtnFrame.new{|f|
- pack(:padx=>5, :pady=>5)
- TkButton.new(:parent=>f, :widgetname=>'hello'){
- command proc{
- print "($SAFE=#{$SAFE} >>>) : "
- cmd.show_msg(TkOptionDB.inspect)
- print "(<<< $SAFE=#{$SAFE})"
- }
- pack(:fill=>:x, :padx=>10, :pady=>10)
- }
- TkButton.new(:command=>proc{
- print "($SAFE=#{$SAFE} >>>) : "
- cmd.bye_msg
- print "(<<< $SAFE=#{$SAFE})"
- exit
- },
- :parent=>f, :widgetname=>'quit'){
- pack(:fill=>:x, :padx=>10, :pady=>10)
- }
-}
-
-# if unknown class, use default option values
-TkFrame.new(:class=>'BtnFrame2'){|f|
- pack(:padx=>5, :pady=>5)
- TkButton.new(:parent=>f, :widgetname=>'hello'){
- command proc{
- print "($SAFE=#{$SAFE} >>>) : "
- cmd.show_msg(TkOptionDB.inspect)
- print "(<<< $SAFE=#{$SAFE})"
- }
- pack(:fill=>:x, :padx=>10, :pady=>10)
- }
- TkButton.new(:command=>proc{
- print "($SAFE=#{$SAFE} >>>) : "
- cmd.bye_msg
- print "(<<< $SAFE=#{$SAFE})"
- exit
- },
- :parent=>f, :widgetname=>'quit'){
- pack(:fill=>:x, :padx=>10, :pady=>10)
- }
-}
-
-Tk.mainloop
diff --git a/ext/tk/sample/tkrttimer.rb b/ext/tk/sample/tkrttimer.rb
deleted file mode 100644
index cde15620b6..0000000000
--- a/ext/tk/sample/tkrttimer.rb
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-# This script is a re-implementation of tktimer.rb with TkTimer(TkAfter) class.
-
-require "tk"
-
-root = TkRoot.new(:title=>'realtime timer sample')
-
-f1 = TkFrame.new(:borderwidth=>2, :relief=>:ridge)
-f1.pack(:side=>:bottom, :fill=>:both)
-TkLabel.new(f1, :text=>'use TkTimer (TkAfter) class').pack(:anchor=>:center)
-label1 = TkLabel.new(:parent=>f1, :relief=>:raised,
- :width=>10).pack(:fill=>:both)
-
-f2 = TkFrame.new(:borderwidth=>2, :relief=>:ridge)
-f2.pack(:side=>:bottom, :fill=>:both)
-TkLabel.new(f2, :text=>'use TkRTTimer class').pack
-label2 = TkLabel.new(:parent=>f2, :relief=>:raised,
- :width=>10).pack(:fill=>:both)
-
-TkLabel.new(:padx=>10, :pady=>5, :justify=>'left', :text=><<EOT).pack
-Interval setting of each timer object is 10 ms.
-Each timer object counts up the value on each callback
-(the value is not the clock data).
-The count of the TkTimer object is delayed by execution
-time of callbacks and inaccuracy of interval.
-On the other hand, the count of the TkRTTimer object is
-not delayed. Its callback interval is not accurate too.
-But it can compute error correction about the time when
-a callback should start.
-EOT
-
-# define the procedure repeated by the TkTimer object
-tick = proc{|aobj| #<== TkTimer object
- cnt = aobj.return_value + 1 # return_value keeps a result of the last proc
- label = aobj.current_args[0]
- label.text format("%d.%02d", *(cnt.divmod(100)))
- cnt #==> return value is kept by TkTimer object
- # (so, can be send to the next repeat-proc)
-}
-
-timer1 = TkTimer.new(10, -1, [tick, label1]) # 10 ms interval
-timer2 = TkRTTimer.new(10, -1, [tick, label2]) # 10 ms interval
-
-timer1.start(0, proc{ label1.text('0.00'); 0 })
-timer2.start(0, proc{ label2.text('0.00'); 0 })
-
-b_start = TkButton.new(:text=>'Start', :state=>:disabled) {
- pack(:side=>:left, :fill=>:both, :expand=>true)
-}
-
-b_stop = TkButton.new(:text=>'Stop', :state=>:normal) {
- pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes')
-}
-
-b_start.command {
- timer1.continue
- timer2.continue
- b_stop.state(:normal)
- b_start.state(:disabled)
-}
-
-b_stop.command {
- timer1.stop
- timer2.stop
- b_start.state(:normal)
- b_stop.state(:disabled)
-}
-
-TkButton.new(:text=>'Reset', :state=>:normal) {
- command { timer1.reset; timer2.reset }
- pack(:side=>:right, :fill=>:both, :expand=>:yes)
-}
-
-ev_quit = TkVirtualEvent.new('Control-c', 'Control-q')
-Tk.root.bind(ev_quit, proc{Tk.exit}).focus
-
-Tk.mainloop
diff --git a/ext/tk/sample/tksleep_sample.rb b/ext/tk/sample/tksleep_sample.rb
deleted file mode 100644
index 14ce3a475f..0000000000
--- a/ext/tk/sample/tksleep_sample.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: false
-require 'tk'
-
-v = TkVariable.new(0)
-l = TkLabel.new(:textvariable=>v).pack(:pady=>[1, 10])
-
-a = TkButton.new(:text=>"button A :: proc{p ['AAA', v.value]}").pack(:fill=>:x, :pady=>[1, 15], :padx=>15)
-a.command{p ['AAA', v.value]}
-
-TkLabel.new(:text=>'Callback of the button B returns LIFO order').pack
-b = TkButton.new(:text=>"button B :: proc{n = v.value; p ['B:start', n]; Tk.sleep(10000); p ['B:end', n]}").pack(:fill=>:x, :pady=>[1, 15], :padx=>15)
-b.command{n = v.value; p ['B:start', n]; Tk.sleep(10000); p ['B:end', n]}
-
-TkLabel.new(:text=>'Callback of the button C returns FIFO order').pack
-c = TkButton.new(:text=>"button C :: proc{n = v.value; Thread.new{p ['C:start', n]; Tk.sleep(10000); p ['C:end', n]}}").pack(:fill=>:x, :pady=>[1, 15], :padx=>15)
-c.command{n = v.value; Thread.new{p ['C:start', n]; Tk.sleep(10000); p ['C:end', n]}}
-
-TkLabel.new(:text=>'Callback of the button D blocks eventloop (no respond to event)').pack
-d = TkButton.new(:text=>"button D :: proc{n = v.value; p ['D:start', n]; sleep(10); p ['D:end', n]}").pack(:fill=>:x, :pady=>[1,15], :padx=>15)
-d.command{n = v.value; p ['D:start', n]; sleep(10); p ['D:end', n]}
-
-TkLabel.new(:text=>'Callback of the button E is another way to avoid eventloop blocking').pack
-e = TkButton.new(:text=>"button E :: proc{n = v.value; Thread.new{p ['D:start', n]; sleep(10); p ['D:end', n]}}").pack(:fill=>:x, :pady=>[1,15], :padx=>15)
-e.command{n = v.value; Thread.new{p ['D:start', n]; sleep(10); p ['D:end', n]}}
-
-TkButton.new(:text=>'QUIT', :command=>proc{exit}).pack
-
-TkTimer.new(500, -1){v.numeric += 1}.start
-
-Tk.mainloop
diff --git a/ext/tk/sample/tktextframe.rb b/ext/tk/sample/tktextframe.rb
deleted file mode 100644
index 60f9a277cc..0000000000
--- a/ext/tk/sample/tktextframe.rb
+++ /dev/null
@@ -1,282 +0,0 @@
-# frozen_string_literal: false
-#
-# tktextframe.rb : a sample of TkComposite
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-require 'tk'
-
-module Tk::ScrollbarComposite
- include TkComposite
-
- def component_construct_keys
- # If a component requires options for construction,
- # return an Array of option-keys.
- []
- end
- private :component_construct_keys
-
- def create_component(keys={})
- # This method must return the created component widget.
- end
- private :create_component
-
- def component_delegates
- # if want to override default option-methods or delegates,
- # please define here.
- end
- private :component_delegates
-
- def define_delegates
- # option methods for scrollbars
- option_methods([:scrollbarwidth, :get_scrollbarwidth])
-
- # set receiver widgets for configure methods (with alias)
- delegate_alias('scrollbarrelief', 'relief', @h_scroll, @v_scroll)
- delegate_alias('framebackground', 'background',
- @frame, @h_scroll, @v_scroll)
- delegate_alias('activeframebackground', 'activebackground',
- @h_scroll, @v_scroll)
-
- # set receiver widgets for configure methods
- delegate('DEFAULT', @component)
- delegate('troughcolor', @h_scroll, @v_scroll)
- delegate('repeatdelay', @h_scroll, @v_scroll)
- delegate('repeatinterval', @h_scroll, @v_scroll)
- delegate('borderwidth', @frame)
- delegate('relief', @frame)
-
- component_delegates
- end
- private :define_delegates
-
- DEFAULT_VSCROLL = true
- DEFAULT_HSCROLL = true
-
- def initialize_composite(keys={})
- keys = _symbolkey2str(keys)
-
- # create scrollbars
- @v_scroll = TkScrollbar.new(@frame, 'orient'=>'vertical')
- @h_scroll = TkScrollbar.new(@frame, 'orient'=>'horizontal')
-
- # create a component
- construct_keys = {}
- ((component_construct_keys.map{|k| k.to_s}) & keys.keys).each{|k|
- construct_keys[k] = keys.delete(k)
- }
-
- # create a component (the component must be scrollable)
- @component = create_component(construct_keys)
-
- # set default receiver of method calls
- @path = @component.path
-
- # assign scrollbars
- @component.xscrollbar(@h_scroll)
- @component.yscrollbar(@v_scroll)
-
- # alignment
- TkGrid.rowconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
- @component.grid('row'=>0, 'column'=>0, 'sticky'=>'news')
-
- # scrollbars ON
- vscroll(keys.delete('vscroll'){self.class::DEFAULT_VSCROLL})
- hscroll(keys.delete('hscroll'){self.class::DEFAULT_HSCROLL})
-
- # do configure
- define_delegates
-
- # do configure
- configure keys unless keys.empty?
- end
- private :initialize_composite
-
- # get/set width of scrollbar
- def get_scrollbarwidth
- @v_scroll.width
- end
- def set_scrollbarwidth(width)
- @v_scroll.width(width)
- @h_scroll.width(width)
- end
- alias :scrollbarwidth :set_scrollbarwidth
-
- def hook_vscroll_on(*args); end
- def hook_vscroll_off(*args); end
- def hook_hscroll_on(*args); end
- def hook_hscroll_off(*args); end
- private :hook_vscroll_on,:hook_vscroll_off,:hook_hscroll_on,:hook_hscroll_off
-
- # vertical scrollbar : ON/OFF
- def vscroll(mode, *args)
- st = TkGrid.info(@v_scroll)
- if mode && st.size == 0 then
- @v_scroll.grid('row'=>0, 'column'=>1, 'sticky'=>'ns')
- hook_vscroll_on(*args)
- elsif !mode && st.size != 0 then
- @v_scroll.ungrid
- hook_vscroll_off(*args)
- end
- self
- end
-
- # horizontal scrollbar : ON/OFF
- def hscroll(mode, *args)
- st = TkGrid.info(@h_scroll)
- if mode && st.size == 0 then
- @h_scroll.grid('row'=>1, 'column'=>0, 'sticky'=>'ew')
- hook_hscroll_on(*args)
- elsif !mode && st.size != 0 then
- @h_scroll.ungrid
- hook_hscroll_off(*args)
- end
- self
- end
-end
-
-################################################
-
-class TkTextFrame < TkText
- include Tk::ScrollbarComposite
-
- # def component_construct_keys; []; end
- # private :component_construct_keys
-
- def create_component(keys={})
- # keys has options which are listed by component_construct_keys method.
- @text = TkText.new(@frame, 'wrap'=>'none')
- @text.configure(keys) unless keys.empty?
-
- # option methods for component
- option_methods(
- [:textbackground, nil, :textbg_info],
- :textborderwidth,
- :textrelief
- )
-
- # return the created component
- @text
- end
- private :create_component
-
- # def component_delegates; end
- # private :component_delegates
-
- def hook_hscroll_on(wrap_mode=nil)
- if wrap_mode
- wrap wrap_mode
- else
- wrap 'none' # => self.wrap('none')
- end
- end
- def hook_hscroll_off(wrap_mode)
- wrap wrap_mode # => self.wrap(wrap_mode)
- end
- def hscroll(mode, wrap_mode="char")
- super
- end
-
- # set background color of text widget
- def textbackground(color = nil)
- if color
- @text.background(color)
- else
- @text.background
- end
- end
-
- def textbg_info
- info = @text.configinfo(:background)
- if TkComm::GET_CONFIGINFO_AS_ARRAY
- info[0] = 'textbackground'
- info
- else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
- {'textbackground' => info['background']}
- end
- end
-
- # get/set borderwidth of text widget
- def set_textborderwidth(width)
- @text.borderwidth(width)
- end
- def get_textborderwidth
- @text.borderwidth
- end
- def textborderwidth(width = nil)
- if width
- set_textborderwidth(width)
- else
- get_textborderwidth
- end
- end
-
- # set relief of text widget
- def textrelief(type)
- @text.relief(type)
- end
-end
-
-################################################
-# test
-################################################
-if __FILE__ == $0
- TkLabel.new(:text=>'TkTextFrame is an example of Tk::ScrollbarComposite module.').pack
- f = TkFrame.new.pack('fill'=>'x')
- #t = TkTextFrame.new.pack
- t = TkTextFrame.new(:textborderwidth=>3,
- :textrelief=>:ridge,
- :scrollbarrelief=>:ridge).pack
- p t.configinfo
- TkButton.new(f, 'text'=>'vscr OFF',
- 'command'=>proc{t.vscroll(false)}).pack('side'=>'right')
- TkButton.new(f, 'text'=>'vscr ON',
- 'command'=>proc{t.vscroll(true)}).pack('side'=>'right')
- TkButton.new(f, 'text'=>'hscr ON',
- 'command'=>proc{t.hscroll(true)}).pack('side'=>'left')
- TkButton.new(f, 'text'=>'hscr OFF',
- 'command'=>proc{t.hscroll(false)}).pack('side'=>'left')
-
- ############################################
-
- # Tk.default_widget_set = :Ttk
-
- TkFrame.new.pack(:pady=>10)
- TkLabel.new(:text=>'The following is another example of Tk::ScrollbarComposite module.').pack
-
- #----------------------------------
- class ScrListbox < TkListbox
- include Tk::ScrollbarComposite
-
- DEFAULT_HSCROLL = false
-
- def create_component(keys={})
- TkListbox.new(@frame, keys)
- end
- private :create_component
- end
- #----------------------------------
-
- f = TkFrame.new.pack(:pady=>5)
- lbox = ScrListbox.new(f).pack(:side=>:left)
- lbox.value = %w(aa bb cc dd eeeeeeeeeeeeeeeeeeeeeeeeee ffffffffff gg hh ii jj kk ll mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm nn oo pp qq)
- fb = TkFrame.new(f).pack(:expand=>true, :fill=>:y, :padx=>5)
- TkButton.new(fb, 'text'=>'lbox hscr OFF',
- 'command'=>proc{lbox.hscroll(false)}).pack(:side=>:bottom,
- :fill=>:x)
- TkButton.new(fb, 'text'=>'lbox hscr ON',
- 'command'=>proc{lbox.hscroll(true)}).pack(:side=>:bottom,
- :fill=>:x)
- TkFrame.new(fb).pack(:pady=>5, :side=>:bottom)
- TkButton.new(fb, 'text'=>'lbox vscr OFF',
- 'command'=>proc{lbox.vscroll(false)}).pack(:side=>:bottom,
- :fill=>:x)
- TkButton.new(fb, 'text'=>'lbox vscr ON',
- 'command'=>proc{lbox.vscroll(true)}).pack(:side=>:bottom,
- :fill=>:x)
-
- ############################################
-
- Tk.mainloop
-end
diff --git a/ext/tk/sample/tktextio.rb b/ext/tk/sample/tktextio.rb
deleted file mode 100644
index cc0326ed20..0000000000
--- a/ext/tk/sample/tktextio.rb
+++ /dev/null
@@ -1,1061 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# TkTextIO class :: handling I/O stream on a TkText widget
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-# NOTE: TkTextIO supports 'character' (not 'byte') access only.
-# So, for example, TkTextIO#getc returns a character, TkTextIO#pos
-# means the character position, TkTextIO#read(size) counts by
-# characters, and so on.
-# Of course, it is available to make TkTextIO class to support
-# 'byte' access. However, it may break multi-byte characters.
-# and then, displayed string on the text widget may be garbled.
-# I think that it is not good on the supposed situation of using
-# TkTextIO.
-#
-require 'tk'
-require 'tk/text'
-require 'tk/textmark'
-require 'thread'
-
-class TkTextIO < TkText
- # keep safe level
- @@create_queues = proc{ [Queue.new, Mutex.new, Queue.new, Mutex.new] }
-
- OPT_DEFAULTS = {
- 'mode' => nil,
- 'overwrite' => false,
- 'text' => nil,
- 'show' => :pos,
- 'wrap' => 'char',
- 'sync' => true,
- 'prompt' => nil,
- 'prompt_cmd' => nil,
- 'hist_size' => 1000,
- }
-
- def create_self(keys)
- opts = _get_io_params((keys.kind_of?(Hash))? keys: {})
-
- super(keys)
-
- @count_var = TkVariable.new
-
- @write_buffer = ''
- @read_buffer = ''
- @buf_size = 0
- @buf_max = 1024
-
- @write_buf_queue, @write_buf_mutex,
- @read_buf_queue, @read_buf_mutex = @@create_queues.call
-
- @idle_flush = TkTimer.new(:idle, 1, proc{ @flusher.run rescue nil })
- @timer_flush = TkTimer.new(250, -1, proc{ @flusher.run rescue nil })
-
- @flusher = Thread.new{ loop { Thread.stop; flush() } }
-
- @receiver = Thread.new{
- begin
- loop {
- str = @write_buf_queue.deq
- @write_buf_mutex.synchronize { @write_buffer << str }
- @idle_flush.start
- }
- ensure
- @flusher.kill
- end
- }
-
- @timer_flush.start
-
- _setup_io(opts)
- end
- private :create_self
-
- def destroy
- @flusher.kill rescue nil
-
- @idle_flush.stop rescue nil
- @timer_flush.stop rescue nil
-
- @receiver.kill rescue nil
-
- super()
- end
-
- ####################################
-
- def _get_io_params(keys)
- opts = {}
- self.class.const_get(:OPT_DEFAULTS).each{|k, v|
- if keys.has_key?(k)
- opts[k] = keys.delete(k)
- else
- opts[k] = v
- end
- }
- opts
- end
-
- def _setup_io(opts)
- unless defined? @txtpos
- @txtpos = TkTextMark.new(self, '1.0')
- else
- @txtpos.set('1.0')
- end
- @txtpos.gravity = :left
-
- @lineno = 0
- @line_offset = 0
-
- @hist_max = opts['hist_size'].to_i
- @hist_index = 0
- @history = Array.new(@hist_max)
- @history[0] = ''
-
- self['wrap'] = wrap
-
- self.show_mode = opts['show']
-
- self.value = opts['text'] if opts['text']
-
- @overwrite = (opts['overwrite'])? true: false
-
- @sync = opts['sync']
-
- @prompt = opts['prompt']
- @prompt_cmd = opts['prompt_cmd']
-
- @open = {:r => true, :w => true} # default is 'r+'
-
- @console_mode = false
- @end_of_stream = false
- @console_buffer = nil
-
- case opts['mode']
- when nil
- # do nothing
-
- when :console, 'console'
- @console_mode = true
- # @console_buffer = TkTextIO.new(:mode=>'r')
- @console_buffer = self.class.new(:mode=>'r')
- self.show_mode = :insert
-
- when 'r', 'rb'
- @open[:r] = true; @open[:w] = nil
-
- when 'r+', 'rb+', 'r+b'
- @open[:r] = true; @open[:w] = true
-
- when 'w', 'wb'
- @open[:r] = nil; @open[:w] = true
- self.value=''
-
- when 'w+', 'wb+', 'w+b'
- @open[:r] = true; @open[:w] = true
- self.value=''
-
- when 'a', 'ab'
- @open[:r] = nil; @open[:w] = true
- @txtpos.set('end - 1 char')
- @txtpos.gravity = :right
-
- when 'a+', 'ab+', 'a+b'
- @open[:r] = true; @open[:w] = true
- @txtpos.set('end - 1 char')
- @txtpos.gravity = :right
-
- else
- fail ArgumentError, "unknown mode `#{opts['mode']}'"
- end
-
- unless defined? @ins_head
- @ins_head = TkTextMark.new(self, 'insert')
- @ins_head.gravity = :left
- end
-
- unless defined? @ins_tail
- @ins_tail = TkTextMark.new(self, 'insert')
- @ins_tail.gravity = :right
- end
-
- unless defined? @tmp_mark
- @tmp_mark = TkTextMark.new(self, 'insert')
- @tmp_mark.gravity = :left
- end
-
- if @console_mode
- _set_console_line
- _setup_console_bindings
- end
- end
- private :_get_io_params, :_setup_io
-
- def _set_console_line
- @tmp_mark.set(@ins_tail)
-
- mark_set('insert', 'end')
-
- prompt = ''
- prompt << @prompt_cmd.call if @prompt_cmd
- prompt << @prompt if @prompt
- insert(@tmp_mark, prompt)
-
- @ins_head.set(@ins_tail)
- @ins_tail.set('insert')
-
- @txtpos.set(@tmp_mark)
-
- _see_pos
- end
-
- def _replace_console_line(str)
- self.delete(@ins_head, @ins_tail)
- self.insert(@ins_head, str)
- end
-
- def _get_console_line
- @tmp_mark.set(@ins_tail)
- s = self.get(@ins_head, @tmp_mark)
- _set_console_line
- s
- end
- private :_set_console_line, :_replace_console_line, :_get_console_line
-
- def _cb_up
- @history[@hist_index].replace(self.get(@ins_head, @ins_tail))
- @hist_index += 1
- @hist_index -= 1 if @hist_index >= @hist_max || !@history[@hist_index]
- _replace_console_line(@history[@hist_index]) if @history[@hist_index]
- Tk.callback_break
- end
- def _cb_down
- @history[@hist_index].replace(self.get(@ins_head, @ins_tail))
- @hist_index -= 1
- @hist_index = 0 if @hist_index < 0
- _replace_console_line(@history[@hist_index]) if @history[@hist_index]
- Tk.callback_break
- end
- def _cb_left
- if @console_mode && compare('insert', '<=', @ins_head)
- mark_set('insert', @ins_head)
- Tk.callback_break
- end
- end
- def _cb_backspace
- if @console_mode && compare('insert', '<=', @ins_head)
- Tk.callback_break
- end
- end
- def _cb_ctrl_a
- if @console_mode
- mark_set('insert', @ins_head)
- Tk.callback_break
- end
- end
- def _cb_ctrl_u
- if @console_mode
- mark_set('insert', @ins_head)
- delete('insert', 'insert lineend')
- Tk.callback_break
- end
- end
- private :_cb_up, :_cb_down, :_cb_left, :_cb_backspace,
- :_cb_ctrl_a, :_cb_ctrl_u
-
- def _setup_console_bindings
- @bindtag = TkBindTag.new
-
- tags = self.bindtags
- tags[tags.index(self)+1, 0] = @bindtag
- self.bindtags = tags
-
- @bindtag.bind('Return'){
- insert('end - 1 char', "\n")
- if (str = _get_console_line)
- @read_buf_queue.push(str)
-
- @history[0].replace(str.chomp)
- @history.pop
- @history.unshift('')
- @hist_index = 0
- end
-
- Tk.update
- Tk.callback_break
- }
- @bindtag.bind('Alt-Return'){
- Tk.callback_continue
- }
-
- @bindtag.bind('FocusIn'){
- if @console_mode
- mark_set('insert', @ins_tail)
- Tk.callback_break
- end
- }
-
- ins_mark = TkTextMark.new(self, 'insert')
-
- @bindtag.bind('ButtonPress'){
- if @console_mode
- ins_mark.set('insert')
- end
- }
-
- @bindtag.bind('ButtonRelease-1'){
- if @console_mode && compare('insert', '<=', @ins_head)
- mark_set('insert', ins_mark)
- Tk.callback_break
- end
- }
-
- @bindtag.bind('ButtonRelease-2', '%x %y'){|x, y|
- if @console_mode
- # paste a text at 'insert' only
- x1, y1, x2, y2 = bbox(ins_mark)
- unless x == x1 && y == y1
- Tk.event_generate(self, 'ButtonRelease-2', :x=>x1, :y=>y1)
- Tk.callback_break
- end
- end
- }
-
- @bindtag.bind('Up'){ _cb_up }
- @bindtag.bind('Control-p'){ _cb_up }
-
- @bindtag.bind('Down'){ _cb_down }
- @bindtag.bind('Control-n'){ _cb_down }
-
- @bindtag.bind('Left'){ _cb_left }
- @bindtag.bind('Control-b'){ _cb_left }
-
- @bindtag.bind('BackSpace'){ _cb_backspace }
- @bindtag.bind('Control-h'){ _cb_backspace }
-
- @bindtag.bind('Home'){ _cb_ctrl_a }
- @bindtag.bind('Control-a'){ _cb_ctrl_a }
-
- @bindtag.bind('Control-u'){ _cb_ctrl_u }
- end
- private :_setup_console_bindings
-
- def _block_read(size = nil, ret = '', block_mode = true)
- return '' if size == 0
- return nil if ! @read_buf_queue && @read_buffer.empty?
- ret = '' unless ret.kind_of?(String)
- ret.replace('') unless ret.empty?
-
- if block_mode == nil # partial
- if @read_buffer.empty?
- ret << @read_buffer.slice!(0..-1)
- return ret
- end
- end
-
- if size.kind_of?(Numeric)
- loop{
- @read_buf_mutex.synchronize {
- buf_len = @read_buffer.length
- if buf_len >= size
- ret << @read_buffer.slice!(0, size)
- return ret
- else
- ret << @read_buffer.slice!(0..-1)
- size -= buf_len
- return ret unless @read_buf_queue
- end
- }
- @read_buffer << @read_buf_queue.pop
- }
- else # readline
- rs = (size)? size: $/
- rs = rs.to_s if rs.kind_of?(Regexp)
- loop{
- @read_buf_mutex.synchronize {
- if (str = @read_buffer.slice!(/\A(.*)(#{rs})/m))
- ret << str
- return ret
- else
- ret << @read_buffer.slice!(0..-1)
- return ret unless @read_buf_queue
- end
- }
- @read_buffer << @read_buf_queue.pop
- }
- end
- end
-
- def _block_write
- ###### currently, not support
- end
- private :_block_read, :_block_write
-
- ####################################
-
- def <<(obj)
- _write(obj)
- self
- end
-
- def binmode
- self
- end
-
- def clone
- fail NotImplementedError, 'cannot clone TkTextIO'
- end
- def dup
- fail NotImplementedError, 'cannot duplicate TkTextIO'
- end
-
- def close
- close_read
- close_write
- nil
- end
- def close_read
- @open[:r] = false if @open[:r]
- nil
- end
- def close_write
- @open[:w] = false if @open[:w]
- nil
- end
-
- def closed?(dir=nil)
- case dir
- when :r, 'r'
- !@open[:r]
- when :w, 'w'
- !@open[:w]
- else
- !@open[:r] && !@open[:w]
- end
- end
-
- def _check_readable
- fail IOError, "not opened for reading" if @open[:r].nil?
- fail IOError, "closed stream" if !@open[:r]
- end
- def _check_writable
- fail IOError, "not opened for writing" if @open[:w].nil?
- fail IOError, "closed stream" if !@open[:w]
- end
- private :_check_readable, :_check_writable
-
- def each_line(rs = $/)
- _check_readable
- while(s = self.gets(rs))
- yield(s)
- end
- self
- end
- alias each each_line
-
- def each_char
- _check_readable
- while(c = self.getc)
- yield(c)
- end
- self
- end
- alias each_byte each_char
-
- def eof?
- compare(@txtpos, '==', 'end - 1 char')
- end
- alias eof eof?
-
- def fcntl(*args)
- fail NotImplementedError, "fcntl is not implemented on #{self.class}"
- end
-
- def fsync
- 0
- end
-
- def fileno
- nil
- end
-
- def flush
- Thread.pass
- if @open[:w] || ! @write_buffer.empty?
- @write_buf_mutex.synchronize {
- _sync_write_buf(@write_buffer)
- @write_buffer[0..-1] = ''
- }
- end
- self
- end
-
- def getc
- return _block_read(1) if @console_mode
-
- _check_readable
- return nil if eof?
- c = get(@txtpos)
- @txtpos.set(@txtpos + '1 char')
- _see_pos
- c
- end
-
- def gets(rs = $/)
- return _block_read(rs) if @console_mode
-
- _check_readable
- return nil if eof?
- _readline(rs)
- end
-
- def ioctrl(*args)
- fail NotImplementedError, 'ioctrl is not implemented on TkTextIO'
- end
-
- def isatty
- false
- end
- def tty?
- false
- end
-
- def lineno
- @lineno + @line_offset
- end
-
- def lineno=(num)
- @line_offset = num - @lineno
- num
- end
-
- def overwrite?
- @overwrite
- end
-
- def overwrite=(ovwt)
- @overwrite = (ovwt)? true: false
- end
-
- def pid
- nil
- end
-
- def index_pos
- index(@txtpos)
- end
- alias tell_index index_pos
-
- def index_pos=(idx)
- @txtpos.set(idx)
- @txtpos.set('end - 1 char') if compare(@txtpos, '>=', :end)
- _see_pos
- idx
- end
-
- def pos
- s = get('1.0', @txtpos)
- number(tk_call('string', 'length', s))
- end
- alias tell pos
-
- def pos=(idx)
- seek(idx, IO::SEEK_SET)
- idx
- end
-
- def pos_gravity
- @txtpos.gravity
- end
-
- def pos_gravity=(side)
- @txtpos.gravity = side
- side
- end
-
- def print(arg=$_, *args)
- _check_writable
- args.unshift(arg)
- args.map!{|val| (val == nil)? 'nil': val.to_s }
- str = args.join($,)
- str << $\ if $\
- _write(str)
- nil
- end
- def printf(*args)
- _check_writable
- _write(sprintf(*args))
- nil
- end
-
- def putc(c)
- _check_writable
- c = c.chr if c.kind_of?(Fixnum)
- _write(c)
- c
- end
-
- def puts(*args)
- _check_writable
- if args.empty?
- _write("\n")
- return nil
- end
- args.each{|arg|
- if arg == nil
- _write("nil\n")
- elsif arg.kind_of?(Array)
- puts(*arg)
- elsif arg.kind_of?(String)
- _write(arg.chomp)
- _write("\n")
- else
- begin
- arg = arg.to_ary
- puts(*arg)
- rescue
- puts(arg.to_s)
- end
- end
- }
- nil
- end
-
- def _read(len)
- epos = @txtpos + "#{len} char"
- s = get(@txtpos, epos)
- @txtpos.set(epos)
- @txtpos.set('end - 1 char') if compare(@txtpos, '>=', :end)
- _see_pos
- s
- end
- private :_read
-
- def read(len=nil, buf=nil)
- return _block_read(len, buf) if @console_mode
-
- _check_readable
- if len
- return "" if len == 0
- return nil if eof?
- s = _read(len)
- else
- s = get(@txtpos, 'end - 1 char')
- @txtpos.set('end - 1 char')
- _see_pos
- end
- buf.replace(s) if buf.kind_of?(String)
- s
- end
-
- def readchar
- return _block_read(1) if @console_mode
-
- _check_readable
- fail EOFError if eof?
- c = get(@txtpos)
- @txtpos.set(@txtpos + '1 char')
- _see_pos
- c
- end
-
- def _readline(rs = $/)
- if rs == nil
- s = get(@txtpos, 'end - 1 char')
- @txtpos.set('end - 1 char')
- elsif rs == ''
- @count_var.value # make it global
- idx = tksearch_with_count([:regexp], @count_var,
- "\n(\n)+", @txtpos, 'end - 1 char')
- if idx
- s = get(@txtpos, idx) << "\n"
- @txtpos.set("#{idx} + #{@count_var.value} char")
- @txtpos.set('end - 1 char') if compare(@txtpos, '>=', :end)
- else
- s = get(@txtpos, 'end - 1 char')
- @txtpos.set('end - 1 char')
- end
- else
- @count_var.value # make it global
- idx = tksearch_with_count(@count_var, rs, @txtpos, 'end - 1 char')
- if idx
- s = get(@txtpos, "#{idx} + #{@count_var.value} char")
- @txtpos.set("#{idx} + #{@count_var.value} char")
- @txtpos.set('end - 1 char') if compare(@txtpos, '>=', :end)
- else
- s = get(@txtpos, 'end - 1 char')
- @txtpos.set('end - 1 char')
- end
- end
-
- _see_pos
- @lineno += 1
- $_ = s
- end
- private :_readline
-
- def readline(rs = $/)
- return _block_readline(rs) if @console_mode
-
- _check_readable
- fail EOFError if eof?
- _readline(rs)
- end
-
- def readlines(rs = $/)
- if @console_mode
- lines = []
- while (line = _block_readline(rs))
- lines << line
- end
- return lines
- end
-
- _check_readable
- lines = []
- until(eof?)
- lines << _readline(rs)
- end
- $_ = nil
- lines
- end
-
- def readpartial(maxlen, buf=nil)
- #return @console_buffer.readpartial(maxlen, buf) if @console_mode
- return _block_read(maxlen, buf, nil) if @console_mode
-
- _check_readable
- fail EOFError if eof?
- s = _read(maxlen)
- buf.replace(s) if buf.kind_of?(String)
- s
- end
-
- def reopen(*args)
- fail NotImplementedError, 'reopen is not implemented on TkTextIO'
- end
-
- def rewind
- @txtpos.set('1.0')
- _see_pos
- @lineno = 0
- @line_offset = 0
- self
- end
-
- def seek(offset, whence=IO::SEEK_SET)
- case whence
- when IO::SEEK_SET
- offset = "1.0 + #{offset} char" if offset.kind_of?(Numeric)
- @txtpos.set(offset)
-
- when IO::SEEK_CUR
- offset = "#{offset} char" if offset.kind_of?(Numeric)
- @txtpos.set(@txtpos + offset)
-
- when IO::SEEK_END
- offset = "#{offset} char" if offset.kind_of?(Numeric)
- @txtpos.set("end - 1 char + #{offset}")
-
- else
- fail Errno::EINVAL, 'invalid whence argument'
- end
-
- @txtpos.set('end - 1 char') if compare(@txtpos, '>=', :end)
- _see_pos
-
- 0
- end
- alias sysseek seek
-
- def _see_pos
- see(@show) if @show
- end
- private :_see_pos
-
- def show_mode
- (@show == @txtpos)? :pos : @show
- end
-
- def show_mode=(mode)
- # define show mode when file position is changed.
- # mode == :pos or "pos" or true :: see current file position.
- # mode == :insert or "insert" :: see insert cursor position.
- # mode == nil or false :: do nothing
- # else see 'mode' position ('mode' should be text index or mark)
- case mode
- when :pos, 'pos', true
- @show = @txtpos
- when :insert, 'insert'
- @show = :insert
- when nil, false
- @show = false
- else
- begin
- index(mode)
- rescue
- fail ArgumentError, 'invalid show-position'
- end
- @show = mode
- end
-
- _see_pos
-
- mode
- end
-
- def stat
- fail NotImplementedError, 'stat is not implemented on TkTextIO'
- end
-
- def sync
- @sync
- end
-
- def sync=(mode)
- @sync = mode
- end
-
- def sysread(len, buf=nil)
- return _block_read(len, buf) if @console_mode
-
- _check_readable
- fail EOFError if eof?
- s = _read(len)
- buf.replace(s) if buf.kind_of?(String)
- s
- end
-
- def syswrite(obj)
- _write(obj)
- end
-
- def to_io
- self
- end
-
- def truncate(len)
- delete("1.0 + #{len} char", :end)
- 0
- end
-
- def ungetc(c)
- if @console_mode
- @read_buf_mutex.synchronize {
- @read_buffer[0,0] = c.chr
- }
- return nil
- end
-
- _check_readable
- c = c.chr if c.kind_of?(Fixnum)
- if compare(@txtpos, '>', '1.0')
- @txtpos.set(@txtpos - '1 char')
- delete(@txtpos)
- insert(@txtpos, tk_call('string', 'range', c, 0, 1))
- @txtpos.set(@txtpos - '1 char') if @txtpos.gravity == 'right'
- _see_pos
- else
- fail IOError, 'cannot ungetc at head of stream'
- end
- nil
- end
-
-=begin
- def _write(obj)
- #s = _get_eval_string(obj)
- s = (obj.kind_of?(String))? obj: obj.to_s
- n = number(tk_call('string', 'length', s))
- delete(@txtpos, @txtpos + "#{n} char") if @overwrite
- self.insert(@txtpos, s)
- @txtpos.set(@txtpos + "#{n} char")
- @txtpos.set('end - 1 char') if compare(@txtpos, '>=', :end)
- _see_pos
- Tk.update if @sync
- n
- end
- private :_write
-=end
-#=begin
- def _sync_write_buf(s)
- if (n = number(tk_call('string', 'length', s))) > 0
- delete(@txtpos, @txtpos + "#{n} char") if @overwrite
- self.insert(@txtpos, s)
- #Tk.update
-
- @txtpos.set(@txtpos + "#{n} char")
- @txtpos.set('end - 1 char') if compare(@txtpos, '>=', :end)
-
- @ins_head.set(@txtpos) if compare(@txtpos, '>', @ins_head)
-
- _see_pos
- end
- self
- end
- private :_sync_write_buf
-
- def _write(obj)
- s = (obj.kind_of?(String))? obj: obj.to_s
- n = number(tk_call('string', 'length', s))
- @write_buf_queue.enq(s)
- if @sync
- Thread.pass
- Tk.update
- end
- n
- end
- private :_write
-#=end
-
- def write(obj)
- _check_writable
- _write(obj)
- end
-end
-
-####################
-# TEST
-####################
-if __FILE__ == $0
- ev_loop = Thread.new{Tk.mainloop}
-
- f = TkFrame.new.pack
- #tio = TkTextIO.new(f, :show=>:nil,
- #tio = TkTextIO.new(f, :show=>:pos,
- tio = TkTextIO.new(f, :show=>:insert,
- :text=>">>> This is an initial text line. <<<\n\n"){
-# yscrollbar(TkScrollbar.new(f).pack(:side=>:right, :fill=>:y))
- pack(:side=>:left, :fill=>:both, :expand=>true)
- }
-
- Tk.update
-
- $stdin = tio
- $stdout = tio
- $stderr = tio
-
- STDOUT.print("\n========= TkTextIO#gets for initial text ========\n\n")
-
- while(s = gets)
- STDOUT.print(s)
- end
-
- STDOUT.print("\n============ put strings to TkTextIO ===========\n\n")
-
- puts "On this sample, a text widget works as if it is a I/O stream."
- puts "Please see the code."
- puts
- printf("printf message: %d %X\n", 123456, 255)
- puts
- printf("(output by 'p' method) This TkTextIO object is ...\n")
- p tio
- print(" [ Current wrap mode of this object is 'char'. ]\n")
- puts
- warn("This is a warning message generated by 'warn' method.")
- puts
- puts "current show_mode is #{tio.show_mode}."
- if tio.show_mode == :pos
- puts "So, you can see the current file position on this text widget."
- else
- puts "So, you can see the position '#{tio.show_mode}' on this text widget."
- end
- print("Please scroll up this text widget to see the head of lines.\n")
- print("---------------------------------------------------------\n")
-
- STDOUT.print("\n=============== TkTextIO#readlines =============\n\n")
-
- tio.seek(0)
- lines = readlines
- STDOUT.puts(lines.inspect)
-
- STDOUT.print("\n================== TkTextIO#each ===============\n\n")
-
- tio.rewind
- tio.each{|line| STDOUT.printf("%2d: %s\n", tio.lineno, line.chomp)}
-
- STDOUT.print("\n================================================\n\n")
-
- STDOUT.print("\n========= reverse order (seek by lines) ========\n\n")
-
- tio.seek(-1, IO::SEEK_END)
- begin
- begin
- tio.seek(:linestart, IO::SEEK_CUR)
- rescue
- # maybe use old version of tk/textmark.rb
- tio.seek('0 char linestart', IO::SEEK_CUR)
- end
- STDOUT.print(gets)
- tio.seek('-1 char linestart -1 char', IO::SEEK_CUR)
- end while(tio.pos > 0)
-
- STDOUT.print("\n================================================\n\n")
-
- tio.seek(0, IO::SEEK_END)
-
- STDOUT.print("tio.sync == #{tio.sync}\n")
-# tio.sync = false
-# STDOUT.print("tio.sync == #{tio.sync}\n")
-
- (0..10).each{|i|
- STDOUT.print("#{i}\n")
- s = ''
- (0..1000).each{ s << '*' }
- print(s)
- }
- print("\n")
- print("\n=========================================================\n\n")
-
- s = ''
- timer = TkTimer.new(:idle, -1, proc{
- #STDOUT.print("idle call\n")
- unless s.empty?
- print(s)
- s = ''
- end
- }).start
- (0..10).each{|i|
- STDOUT.print("#{i}\n")
- (0..1000).each{ s << '*' }
- }
-# timer.stop
- until s.empty?
- sleep 0.1
- end
- timer.stop
-
-=begin
- tio.sync = false
- print("\n")
- #(0..10000).each{ putc('*') }
- (0..10).each{|i|
- STDOUT.print("#{i}\n")
- (0..1000).each{ putc('*') }
- }
-
- (0..10).each{|i|
- STDOUT.print("#{i}\n")
- s = ''
- (0..1000).each{ s << '*' }
- print(s)
- }
-=end
-
- num = 0
-# io = TkTextIO.new(:mode=>:console, :prompt=>'').pack
-#=begin
- io = TkTextIO.new(:mode=>:console,
- :prompt_cmd=>proc{
- s = "[#{num}]"
- num += 1
- s
- },
- :prompt=>'-> ').pack
-#=end
- Thread.new{loop{sleep 2; io.puts 'hoge'}}
- Thread.new{loop{p io.gets}}
-
- ev_loop.join
-end
diff --git a/ext/tk/sample/tktimer.rb b/ext/tk/sample/tktimer.rb
deleted file mode 100644
index b68d309254..0000000000
--- a/ext/tk/sample/tktimer.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-# This script generates a counter with start and stop buttons.
-
-require "tk"
-$label = TkLabel.new {
- text '0.00'
- relief 'raised'
- width 10
- pack('side'=>'bottom', 'fill'=>'both')
-}
-
-TkButton.new {
- text 'Start'
- command proc {
- if $stopped
- $stopped = false
- tick
- end
- }
- pack('side'=>'left','fill'=>'both','expand'=>'yes')
-}
-TkButton.new {
- text 'Stop'
- command proc{
- exit if $stopped
- $stopped = true
- }
- pack('side'=>'right','fill'=>'both','expand'=>'yes')
-}
-
-$seconds=0
-$hundredths=0
-$stopped=true
-
-def tick
- if $stopped then return end
- Tk.after 50, proc{tick}
- $hundredths+=5
- if $hundredths >= 100
- $hundredths=0
- $seconds+=1
- end
- $label.text format("%d.%02d", $seconds, $hundredths)
-end
-
-root = Tk.root
-root.bind "Control-c", proc{root.destroy}
-root.bind "Control-q", proc{root.destroy}
-Tk.root.focus
-Tk.mainloop
diff --git a/ext/tk/sample/tktimer2.rb b/ext/tk/sample/tktimer2.rb
deleted file mode 100644
index 3f8d722153..0000000000
--- a/ext/tk/sample/tktimer2.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-# This script is a re-implementation of tktimer.rb with TkTimer(TkAfter) class.
-
-require "tk"
-
-# new notation :
-# * symbols are acceptable as keys or values of the option hash
-# * the parent widget can be given by :parent key on the option hash
-root = TkRoot.new(:title=>'timer sample')
-label = TkLabel.new(:parent=>root, :relief=>:raised, :width=>10) \
- .pack(:side=>:bottom, :fill=>:both)
-
-# define the procedure repeated by the TkTimer object
-tick = proc{|aobj| #<== TkTimer object
- cnt = aobj.return_value + 5 # return_value keeps a result of the last proc
- label.text format("%d.%02d", *(cnt.divmod(100)))
- cnt #==> return value is kept by TkTimer object
- # (so, can be send to the next repeat-proc)
-}
-
-timer = TkTimer.new(50, -1, tick).start(0, proc{ label.text('0.00'); 0 })
- # ==> repeat-interval : (about) 50 ms,
- # repeat : infinite (-1) times,
- # repeat-procedure : tick (only one, in this case)
- #
- # ==> wait-before-call-init-proc : 0 ms,
- # init_proc : proc{ label.text('0.00'); 0 }
- #
- # (0ms)-> init_proc ->(50ms)-> tick ->(50ms)-> tick ->....
-
-TkButton.new(:text=>'Start') {
- command proc{ timer.continue unless timer.running? }
- pack(:side=>:left, :fill=>:both, :expand=>true)
-}
-TkButton.new(:text=>'Restart') {
- command proc{ timer.restart(0, proc{ label.text('0.00'); 0 }) }
- pack(:side=>:left, :fill=>:both, :expand=>true)
-}
-TkButton.new(:text=>'Stop') {
- command proc{ timer.stop if timer.running? }
- pack('side'=>'right','fill'=>'both','expand'=>'yes')
-}
-
-ev_quit = TkVirtualEvent.new('Control-c', 'Control-q')
-Tk.root.bind(ev_quit, proc{Tk.exit}).focus
-
-Tk.mainloop
diff --git a/ext/tk/sample/tktimer3.rb b/ext/tk/sample/tktimer3.rb
deleted file mode 100644
index bce3cd6b6c..0000000000
--- a/ext/tk/sample/tktimer3.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-# This script is a re-implementation of tktimer.rb with TkTimer(TkAfter) class.
-
-require "tk"
-
-# new notation :
-# * symbols are acceptable as keys or values of the option hash
-# * the parent widget can be given by :parent key on the option hash
-root = TkRoot.new(:title=>'timer sample')
-label = TkLabel.new(:parent=>root, :relief=>:raised, :width=>10) \
- .pack(:side=>:bottom, :fill=>:both)
-
-# define the procedure repeated by the TkTimer object
-tick = proc{|aobj| #<== TkTimer object
- cnt = aobj.return_value + 5 # return_value keeps a result of the last proc
- label.text format("%d.%02d", *(cnt.divmod(100)))
- cnt #==> return value is kept by TkTimer object
- # (so, can be send to the next repeat-proc)
-}
-
-timer = TkTimer.new(50, -1, tick).start(0, proc{ label.text('0.00'); 0 })
- # ==> repeat-interval : (about) 50 ms,
- # repeat : infinite (-1) times,
- # repeat-procedure : tick (only one, in this case)
- #
- # ==> wait-before-call-init-proc : 0 ms,
- # init_proc : proc{ label.text('0.00'); 0 }
- #
- # (0ms)-> init_proc ->(50ms)-> tick ->(50ms)-> tick ->....
-
-b_start = TkButton.new(:text=>'Start', :state=>:disabled) {
- pack(:side=>:left, :fill=>:both, :expand=>true)
-}
-
-b_stop = TkButton.new(:text=>'Stop', :state=>:normal) {
- pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes')
-}
-
-b_start.command {
- timer.continue
- b_stop.state(:normal)
- b_start.state(:disabled)
-}
-
-b_stop.command {
- timer.stop
- b_start.state(:normal)
- b_stop.state(:disabled)
-}
-
-TkButton.new(:text=>'Reset', :state=>:normal) {
- command { timer.reset }
- pack(:side=>:right, :fill=>:both, :expand=>:yes)
-}
-
-ev_quit = TkVirtualEvent.new('Control-c', 'Control-q')
-Tk.root.bind(ev_quit, proc{Tk.exit}).focus
-
-Tk.mainloop
diff --git a/ext/tk/sample/tktree.rb b/ext/tk/sample/tktree.rb
deleted file mode 100644
index 47622973e7..0000000000
--- a/ext/tk/sample/tktree.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-# frozen_string_literal: false
-##########################################################################
-# TkTree widget class
-#
-# see <http://wiki.tcl.tk/10615>
-#
-# Note: optional argument '-font' of the Tcl library is changed to
-# 'itemfont' on this Ruby library, because of avoiding font
-# operation trouble in 'initialize' method ( see the following
-# test script ).
-#
-##########################################################################
-require 'tk'
-
-class TkTree < TkCanvas
- TCL_SCRIPT_PATH = File.join(File.dirname(__FILE__), 'tktree.tcl')
-
- def create_self(keys)
- args = [@path]
- if keys.kind_of?(Hash)
- font = keys.delete('itemfont')
-# font = hash_kv(font) if font.kind_of?(Hash)
- keys['font'] = font if font
-# args.concat(hash_kv(keys))
- args << keys
- end
- begin
- tk_call('::tktree::treecreate', *args)
- rescue NameError, RuntimeError
- Tk.load_tclscript(TkTree::TCL_SCRIPT_PATH)
- tk_call('::tktree::treecreate', *args)
- end
- end
-
- def newitem(itempath, keys = nil)
- if keys.kind_of?(Hash)
- keys = _symbolkey2str(keys)
- font = keys.delete('itemfont')
-# font = hash_kv(font) if font.kind_of?(Hash)
- keys['font'] = font if font
-# tk_call('::tktree::newitem', @path, itempath, *hash_kv(keys))
- tk_call('::tktree::newitem', @path, itempath, keys)
- else
- tk_call('::tktree::newitem', @path, itempath)
- end
- end
-
- def delitem(itempath)
- tk_call('::tktree::delitem', @path, itempath)
- end
-
- def labelat(xpos, ypos)
- tk_call('::tktree::delitem', @path, xpos, ypos)
- end
-
- def getselection
- tk_call('::tktree::getselection', @path)
- end
-
- def setselection(itempath)
- tk_call('::tktree::getselection', @path, itempath)
- end
-end
-
-
-##########################################################################
-# test script
-##########################################################################
-if __FILE__ == $0
- TkLabel.new(:text=><<EOL, :relief=>:ridge, :justify=>:left).pack
-
- This is a sample to use a Tcl library script on Ruby/Tk.
- This sample loads tktree.tcl (see <http://wiki.tcl.tk/10615>)
- and calls functions of the Tcl script.
-EOL
-
- items = %w(/group1/item1 /group1/item2 /group1/subgroup/item1 /group2/item1 /item1)
-
- tr1 = TkTree.new.pack(:expand=>true, :fill=>:both)
- tr1.focus
-
- items.each{|item|
- tr1.newitem(item,
- :command=>proc{Tk.messageBox(:message=>"#{item} executed")})
- }
-
- f = TkFrame.new.pack(:expand=>true, :fill=>:both)
- tr2 = TkTree.new(f, :bg=>'black', #:itemfont=>{:family=>'Times', :size=>14},
- :textcolor=>'red', :bd=>4, :relief=>:ridge,
- :selectbackground=>'darkBlue', :selectforeground=>'yellow',
- :selectborderwidth=>3, :linecolor=>'yellow') {
- yscrollbar(TkScrollbar.new(f, :width=>10).pack(:side=>:right, :fill=>:y))
- xscrollbar(TkScrollbar.new(f, :width=>10).pack(:side=>:bottom, :fill=>:x))
- pack(:expand=>true, :fill=>:both)
- }
-
- items.each{|item|
- tr2.newitem(item, :textcolor=>'green', :image=>'',
- :itemfont=>{:family=>'Times', :size=>10},
- :command=>proc{Tk.messageBox(:message=>"#{item} executed")})
- }
-
- Tk.mainloop
-end
diff --git a/ext/tk/sample/tktree.tcl b/ext/tk/sample/tktree.tcl
deleted file mode 100644
index a5e47eb776..0000000000
--- a/ext/tk/sample/tktree.tcl
+++ /dev/null
@@ -1,305 +0,0 @@
-#
-# This Tcl/Tk script is quoted from <http://wiki.tcl.tk/10615>.
-#
- package require Tk
- namespace eval ::tktree {
-
- # Images used for open and close state of subgroups
- set ::tktree::imgcollapse [image create photo .tktreeopenbm -data {
- R0lGODdhCQAJAIAAAAEBAf///ywAAAAACQAJAAACEISPoRvG614D80x5ZXyogwIAOw==}]
- set ::tktree::imgexpand [image create photo .tktreeclosebm -data {
- R0lGODdhCQAJAIAAAAEBAf///ywAAAAACQAJAAACEYSPoRu28KCSDSJLc44s3lMAADs=}]
- ###Default images for groups and children
- set ::tktree::imgsubgroups [image create photo .tktreeimgfolder -data {
- R0lGODlhEAANAKIAANnZ2Xh4eLi4uPj4APj4+AAAAP///////yH5BAEAAAAA
- LAAAAAAQAA0AAANkCIChiqDLITgyEgi6GoIjIyMYugCBpMsaWBA0giMjIzgy
- UYBBMjIoIyODEgVBODIygiMjE1gQJIMyMjIoI1GAQSMjODIyghMFQSgjI4My
- MhJYEDSCIyMjODJRgKHLXAiApcsMmAA7}]
- set ::tktree::imgchildren [image create photo .tktreeimgfile -data {
- R0lGODlhDQAQAKIAANnZ2Xh4ePj4+Li4uAAAAP///////////yH5BAEAAAAA
- LAAAAAANABAAAANSGLoLgACBoqsRCBAoujqCASGDojtESCEihCREIjgUKLo8
- hCGCpCsySIGiy0MYIki6IoMUKLo8hCGCpCsySIGiy0MYKLo8hIGiy0MYOLo8
- SLrMCQA7}]
-
- #### Swtich all subgroups of a layer to open or close
- proc ::tktree::switchlayer {win opn {layer /}} {
- variable cfg
- foreach child $cfg($win,$layer:subgroups) {
- set cfg($win,$child:open) $opn
- switchlayer $win $opn $child
- }
- buildwhenidle $win
- }
-
- #### will open or close the item given
- proc ::tktree::switchstate {win item} {
- set ::tktree::cfg($win,$item:open) [expr ! $::tktree::cfg($win,$item:open)]
- buildwhenidle $win
- }
-
- #### Select the next item up or down
- proc ::tktree::updown {win down} {
- variable cfg
- set index [lsearch -exact $cfg($win,sortlist) $cfg($win,selection)]
- if {$down} {incr index} {incr index -1}
- if {$index < 0} {set index end} elseif {$index >= [llength $cfg($win,sortlist)]} {set index 0}
- setselection $win [lindex $cfg($win,sortlist) $index]
- }
-
- #### left-right button binding commands
- proc ::tktree::leftright {win right} {
- variable cfg
- set item $cfg($win,selection)
- set index [lsearch -exact $cfg($win,sortlist) $item]
- set parentindex [lsearch -exact $cfg($win,sortlist) [file dirname $item]]
- if {$parentindex == -1} {set parentindex [expr $index - 1]}
- if {$cfg($win,$item:group)} {
- if {$right} {
- if {$cfg($win,$item:open)} {incr index} {set cfg($win,$item:open) 1}
- } else {
- if {$cfg($win,$item:open)} {set cfg($win,$item:open) 0} {set index $parentindex}
- }
- } else {
- if {$right} {incr index} {set index $parentindex}
- }
- if {$index < 0} {set index end} elseif {$index >= [llength $cfg($win,sortlist)]} {set index 0}
- setselection $win [lindex $cfg($win,sortlist) $index]
- buildwhenidle $win
- }
-
- #### will return the pathname of the item at x and y cooridinates
- proc ::tktree::labelat {win x y} {
- set x [$win canvasx $x]; set y [$win canvasy $y]
- foreach m [$win find overlapping $x $y $x $y] {
- if {[info exists ::tktree::cfg($win,tag:$m)]} {return $::tktree::cfg($win,tag:$m)}
- }
- return ""
- }
-
- #### will return the path of the current selection in the given tree widget
- proc ::tktree::getselection {win} {
- return $::tktree::cfg($win,selection)
- }
-
- #### adjust the scrollview to show the selected item as needed
- proc ::tktree::scrolladjust {win tag} {
- update
- set item [$win bbox $tag]
- set region [$win cget -scrollregion]
- foreach {axis idx1 idx2} {yview 1 3 xview 0 2} {
- set range [expr abs([lindex $region $idx2]) - abs([lindex $region $idx1])]
- set itemtop [lindex $item $idx1]; set itembot [lindex $item $idx2]
- set viewtop [expr $range * [lindex [$win $axis] 0]]
- set viewbot [expr $range * [lindex [$win $axis] 1]]
- if {$itembot > $viewbot} {$win $axis moveto [expr ($itembot. - $viewbot + $viewtop) / $range]}
- if {$itemtop < $viewtop} {$win $axis moveto [expr $itemtop. / $range]}
- }
- }
-
- #### will set the current selection to the given item on the given tree
- proc ::tktree::setselection {win item} {
- variable cfg
- if {![llength $cfg($win,sortlist)]} {return}
- if {$item eq ""} {set item [lindex $cfg($win,sortlist) 0]}
- if {![info exists cfg($win,$item:tag)]} {set item [lindex $cfg($win,sortlist) 0]}
- if {[$win gettags $cfg($win,$item:tag)] ne ""} {
- $win select from $cfg($win,$item:tag) 0
- $win select to $cfg($win,$item:tag) end
- set cfg($win,selection) $item
- scrolladjust $win $cfg($win,$item:tag)
- } {
- setselection $win "/[lindex $cfg($win,/:sortlist) 0]"
- }
- }
-
- #### will delete the item given from the tree given
- proc ::tktree::delitem {win item} {
- variable cfg
- if {$item eq "/"} {
- array unset cfg $win,* ; catch {destroy $win}
- } {
- set group [file dirname $item]
- if {$cfg($win,$item:group)} {set type subgroups} {set type children}
- set index [lsearch -exact $cfg($win,$group:$type) $item]
- set cfg($win,$group:$type) [lreplace $cfg($win,$group:$type) $index $index]
- array unset cfg $win,$item*
- buildwhenidle $win
- }
- }
-
- #### create a new item in the tree and rebuild the widget
- proc ::tktree::newitem {win item args} {
- variable cfg
- if {[string index $item 0] ne "/"} {set item /$item}
- if {[string index $item end] eq "/"} {
- set subgroup 1
- set type subgroups
- set item [string range $item 0 end-1]
- set cfg($win,$item:command) [list ::tktree::switchstate $win $item]
- } {
- set subgroup 0
- set type children
- set cfg($win,$item:command) {}
- }
- #Build parent group if needed
- set group [file dirname $item]
- if {![info exists cfg($win,$group:open)]} {newitem $win "$group\/"}
- lappend cfg($win,$group:$type) $item
- #Configure the new item
- set cfg($win,$item:group) $subgroup
- set cfg($win,$item:subgroups) {}
- set cfg($win,$item:children) {}
- set cfg($win,$item:sortlist) {}
- set cfg($win,$item:tags) {}
- set cfg($win,$item:open) 0
- set cfg($win,$item:image) {}
- set cfg($win,$item:textcolor) $cfg($win,textcolor)
- set cfg($win,$item:font) $cfg($win,font)
- if {$cfg($win,images)} {set cfg($win,$item:image) [eval list \$::tktree::img$type]}
- foreach {confitem confval} $args {
- switch -exact -- $confitem {
- -textcolor {set cfg($win,$item:textcolor) $confval}
- -command {set cfg($win,$item:command) $confval}
- -image {set cfg($win,$item:image) $confval}
- -font {set cfg($win,$item:font) $confval}
- }
- }
- buildwhenidle $win
- }
-
- #### Draw the given layer of the tree on the canvas starting at xposition
- proc ::tktree::buildlayer {win layer xpos} {
- variable cfg
- #Record y positions for vertical line later on
- set ystart $cfg($win,y); set yend $cfg($win,y)
- if {$layer eq "/"} {set cfg($win,sortlist) ""}
- foreach child $cfg($win,$layer:sortlist) {
- lappend cfg($win,sortlist) $child
- #Check spacing required for images
- set imgwidth 0; set imgheight 0
- if {[string length $cfg($win,$child:image)]} {
- set imgwidth [expr ([image width $cfg($win,$child:image)] + 2) / 2]
- set imgheight [expr ([image height $cfg($win,$child:image)] + 2) / 2]
- }
- #find X-axis points for image, horiz line, and text
- if {$imgwidth} {
- set centerX [expr $imgwidth + $xpos + 7]
- set rightX [expr $xpos + 7]
- set textX [expr ($imgwidth * 2) + $xpos + 10]
- } {
- set centerX [expr $xpos + 10]
- set rightX [expr $centerX + 4]
- set textX [expr $rightX + 1]
- }
- #Find the proper amount to increment the y axis
- set fontheight [lindex [font metrics $cfg($win,$child:font)] 5]
- set yincr [expr ($fontheight + 1) / 2]
- if {$imgheight > $yincr} {set yincr $imgheight}
- incr cfg($win,y) $yincr
- #Draw the horizonal line
- $win create line $xpos $cfg($win,y) $rightX $cfg($win,y) -fill $cfg($win,linecolor)
- set yend $cfg($win,y)
- #Draw the image, if it exists
- if {$imgwidth} {
- set it [$win create image $centerX $cfg($win,y) -image $cfg($win,$child:image)]
- $win bind $it <1> [list ::tktree::setselection $win $child]
- }
- #Draw text and store tags for reference
- set cfg($win,$child:tag) [$win create text $textX $cfg($win,y) \
- -text [file tail $child] -font $cfg($win,$child:font) -anchor w -tags x -fill $cfg($win,$child:textcolor)]
- set cfg($win,tag:$cfg($win,$child:tag)) $child
- #Command binding
- $win bind $cfg($win,$child:tag) <1> [list ::tktree::setselection $win $child]
- $win bind $cfg($win,$child:tag) <Double-1> $cfg($win,$child:command)
- #next step up on the y axis
- incr cfg($win,y) $yincr
- #If its a group, add open-close functionality
- if {$cfg($win,$child:group)} {
- if {$cfg($win,$child:open)} {set img collapse} {set img expand}
- set ocimg [$win create image $xpos [expr $cfg($win,y) - $yincr] -image [eval list \$::tktree::img$img]]
- $win bind $ocimg <1> [list ::tktree::switchstate $win $child]
- if {$cfg($win,$child:open)} {buildlayer $win $child $centerX}
- }
- }
- #Vertical line
- $win lower [$win create line $xpos [expr $ystart - 7] $xpos $yend -fill $cfg($win,linecolor)]
- }
-
- #### sort the layer by subgroups then children
- proc ::tktree::sortlayer {win {layer /}} {
- variable cfg
- set cfg($win,$layer:subgroups) [lsort -dictionary $cfg($win,$layer:subgroups)]
- set cfg($win,$layer:children) [lsort -dictionary $cfg($win,$layer:children)]
- set cfg($win,$layer:sortlist) [join [list $cfg($win,$layer:subgroups) $cfg($win,$layer:children)]]
- foreach group $cfg($win,$layer:subgroups) {sortlayer $win $group}
- }
-
- #### build the tree at the given path
- proc ::tktree::buildtree {win} {
- variable cfg
- $win delete all
- sortlayer $win
- set xpos 5
- set cfg($win,y) 5
- #Draw global expand/contract button, if needed
- if {[string length $cfg($win,/:subgroups)] && $cfg($win,expandall)} {
- set exp 0
- foreach subgroup $cfg($win,/:subgroups) {incr exp $cfg($win,$subgroup:open)}
- if {$exp} {set type collapse} {set type expand}
- set ocimg [$win create image 1 1 -image [eval list \$::tktree::img$type] -anchor w]
- $win bind $ocimg <1> [list ::tktree::switchlayer $win [expr ! $exp]]
- }
- #Build the layers and set initial selection
- buildlayer $win / $xpos
- $win config -scrollregion [$win bbox all]
- setselection $win $cfg($win,selection)
- }
-
- #### internal use - set up a handle to build the tree when everything is idle
- proc ::tktree::buildwhenidle {win} {
- catch {after cancel $::tktree::cfg($win,buildHandle)}
- set ::tktree::cfg($win,buildHandle) [after idle [list ::tktree::buildtree $win]]
- }
-
- #### will create a new tree widget at the given path
- proc ::tktree::treecreate {win args} {
- variable cfg
- #Default configuration for new tree
- set cfg($win,selection) {}
- set cfg($win,selidx) {}
- set cfg($win,/:subgroups) {}
- set cfg($win,/:children) {}
- set cfg($win,/:open) 1
- set cfg($win,images) 1
- set cfg($win,expandall) 1
- set cfg($win,linecolor) black
- set cfg($win,textcolor) black
- set cfg($win,font) {-family Helvetica -size 10}
- #Parse and setup custom configuration options
- set canvascfg ""
- foreach {item val} $args {
- switch -- $item {
- -linecolor {set cfg($win,linecolor) $val}
- -textcolor {set cfg($win,textcolor) $val}
- -font {set cfg($win,font) $val}
- -images {set cfg($win,images) $val}
- -expandall {set cfg($win,expandall) $val}
- default {lappend canvascfg $item $val}
- }
- }
- #Build the canvas
- eval {canvas $win -takefocus 1} $canvascfg
- bind $win <Destroy> [list ::tktree::delitem $win /]
- bind $win <1> [list focus $win]
- bind $win <Return> {eval $::tktree::cfg(%W,[::tktree::getselection %W]:command)}
- bind $win <space> {eval $::tktree::cfg(%W,[::tktree::getselection %W]:command)}
- bind $win <Up> [list ::tktree::updown $win 0]
- bind $win <Down> [list ::tktree::updown $win 1]
- bind $win <Left> [list ::tktree::leftright $win 0]
- bind $win <Right> [list ::tktree::leftright $win 1]
-
- #Build the tree when idle
- buildwhenidle $win
- }
- }
-
diff --git a/ext/tk/sample/ttk_wrapper.rb b/ext/tk/sample/ttk_wrapper.rb
deleted file mode 100644
index 1706c867d2..0000000000
--- a/ext/tk/sample/ttk_wrapper.rb
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/usr/bin/env ruby
-# frozen_string_literal: false
-#
-# ttk_wrapper.rb -- use Ttk widgets as default on old Ruby/Tk scripts
-#
-# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
-#
-version = '0.1.3'
-#
-##########################################################################
-# parse commandline arguments
-##########################################################################
-require 'optparse'
-opt = OptionParser.new("Usage: #{$0} [options] rubytk_script" << "\n " <<
- "Ruby/Tk script wrapper. Use Ttk widgets as default.")
-opt.version = version
-
-OPTS = {}
-OPTS[:themedir] = []
-OPTS[:rb_theme] = []
-OPTS[:theme] = 'default'
-
-opt.on('-l', '--list', 'list available theme names'){|v| OPTS[:list] = true}
-opt.on('-t', '--theme theme', 'theme name'){|v| OPTS[:theme] = v}
-opt.on('-d', '--themedir themes_dir', 'directory of theme definitions'){|v|
- OPTS[:themedir] << v
-}
-opt.on('-r', '--rubytheme rb_theme', 'theme definition file (ruby script)'){|v|
- OPTS[:rb_theme] << v
-}
-opt.on('-v', '--verbose', 'print verbose messages'){|v| OPTS[:verbose] = true}
-
-opt.parse!(ARGV)
-
-
-##########################################################################
-# load Ttk (Tile) extension
-##########################################################################
-require 'tk'
-
-begin
- require 'tkextlib/tile'
- Tk.default_widget_set = :Ttk
-rescue LoadError
- if OPTS[:verbose]
- print "warning: fail to load 'Ttk' extension. use standard widgets.\n"
- end
-end
-
-if OPTS[:verbose]
- print "current default widget set is '#{Tk.default_widget_set}'\n"
-end
-
-
-##########################################################################
-# define Tcl/Tk procedures for compatibility.
-# those are required when want to use themes included
-# in "sample/tkextlib/tile/demo.rb".
-##########################################################################
-Tk::Tile.__define_LoadImages_proc_for_compatibility__!
-Tk::Tile::Style.__define_wrapper_proc_for_compatibility__!
-
-
-##########################################################################
-# use themes defined on the demo of Ttk (Tile) extension
-##########################################################################
-demodir = File.dirname(__FILE__)
-demo_themesdir = File.expand_path(File.join(demodir, 'tkextlib', 'tile', 'themes'))
-
-Tk::AUTO_PATH.lappend(*OPTS[:themedir]) unless OPTS[:themedir].empty?
-Tk::AUTO_PATH.lappend('.', demodir, demo_themesdir)
-
-OPTS[:themedir] << demo_themesdir
-print "theme-dirs: #{OPTS[:themedir].inspect}\n" if OPTS[:verbose]
-
-OPTS[:themedir].each{|themesdir|
- if File.directory?(themesdir)
- Dir.foreach(themesdir){|name|
- next if name == '.' || name == '..'
- path = File.join(themesdir, name)
- Tk::AUTO_PATH.lappend(path) if File.directory?(path)
- }
- end
-}
-
-# This forces an update of the available packages list. It's required
-# for package names to find the themes in demos/themes/*.tcl
-Tk.ip_eval("#{TkPackage.unknown_proc} Tcl #{TkPackage.provide('Tcl')}")
-
-# load themes written in Ruby.
-themes_by_ruby = [File.join(demo_themesdir, 'kroc.rb')]
-themes_by_ruby.concat OPTS[:rb_theme]
-print "ruby-themes: #{themes_by_ruby.inspect}\n" if OPTS[:verbose]
-
-themes_by_ruby.each{|f|
- begin
- load(f, true)
- rescue LoadError
- print "fail to load \"#{f}\"\n" if OPTS[:verbose]
- end
-}
-
-
-##########################################################################
-# ignore unsupported options of Ttk widgets
-##########################################################################
-TkConfigMethod.__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__! true
-TkItemConfigMethod.__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__! true
-
-
-##########################################################################
-# set theme of widget style
-##########################################################################
-if OPTS[:list] || OPTS[:verbose]
- print "supported theme names: #{Tk::Tile.themes.inspect}\n"
- exit if OPTS[:list] && ARGV.empty?
-end
-print "use theme: \"#{OPTS[:theme]}\"\n" if OPTS[:theme] && OPTS[:verbose]
-#setTheme(OPTS[:theme]) if OPTS[:theme]
-Tk::Tile.set_theme(OPTS[:theme]) if OPTS[:theme]
-
-
-##########################################################################
-# replace $0 and $PROGRAM_NAME
-##########################################################################
-# When the expand_path of the target script is long, ruby sometimes
-# fails to set the path to $0 (the path string is trimmed).
-# The following replaces $0 and $PROGNAME to avoid such trouble.
-progname_obj = $0.dup
-$program_name = progname_obj
-
-alias $REAL_PROGRAM_NAME $0
-alias $PROGRAM_NAME $program_name
-alias $0 $program_name
-
-trace_var(:$program_name){|val|
- unless progname_obj.object_id == val.object_id
- progname_obj.replace(val.to_s)
- $program_name = progname_obj
- end
-}
-
-
-##########################################################################
-# load script
-##########################################################################
-if (path = ARGV.shift) && (script = File.expand_path(path))
- print "load script \"#{script}\"\n" if OPTS[:verbose]
- $0 = script
- load(script)
-else
- print "Error: no script is given.\n"
- print opt.help
- exit(1)
-end
diff --git a/ext/tk/stubs.c b/ext/tk/stubs.c
deleted file mode 100644
index 89da88aea4..0000000000
--- a/ext/tk/stubs.c
+++ /dev/null
@@ -1,592 +0,0 @@
-/************************************************
-
- stubs.c - Tcl/Tk stubs support
-
-************************************************/
-
-#include "ruby.h"
-#include "stubs.h"
-
-#if !defined(RSTRING_PTR)
-#define RSTRING_PTR(s) (RSTRING(s)->ptr)
-#define RSTRING_LEN(s) (RSTRING(s)->len)
-#endif
-
-#include <tcl.h>
-#include <tk.h>
-
-/*------------------------------*/
-
-#ifdef __MACOS__
-# include <tkMac.h>
-# include <Quickdraw.h>
-
-static int call_macinit = 0;
-
-static void
-_macinit(void)
-{
- if (!call_macinit) {
- tcl_macQdPtr = &qd; /* setup QuickDraw globals */
- Tcl_MacSetEventProc(TkMacConvertEvent); /* setup event handler */
- call_macinit = 1;
- }
-}
-#endif
-
-/*------------------------------*/
-
-static int nativethread_checked = 0;
-
-static void
-_nativethread_consistency_check(ip)
- Tcl_Interp *ip;
-{
- if (nativethread_checked || ip == (Tcl_Interp *)NULL) {
- return;
- }
-
- /* If the variable "tcl_platform(threaded)" exists,
- then the Tcl interpreter was compiled with threads enabled. */
- if (Tcl_GetVar2(ip, "tcl_platform", "threaded", TCL_GLOBAL_ONLY) != (char*)NULL) {
-#ifdef HAVE_NATIVETHREAD
- /* consistent */
-#else
- rb_warn("Inconsistency. Loaded Tcl/Tk libraries are enabled nativethread-support. But `tcltklib' is not. The inconsistency causes SEGV or other troubles frequently.");
-#endif
- } else {
-#ifdef HAVE_NATIVETHREAD
- rb_warning("Inconsistency.`tcltklib' is enabled nativethread-support. But loaded Tcl/Tk libraries are not. (Probably, the inconsistency doesn't cause any troubles.)");
-#else
- /* consistent */
-#endif
- }
-
- Tcl_ResetResult(ip);
-
- nativethread_checked = 1;
-}
-
-/*------------------------------*/
-
-#if defined USE_TCL_STUBS && defined USE_TK_STUBS
-
-#if defined _WIN32 || defined __CYGWIN__
-# ifdef HAVE_RUBY_RUBY_H
-# include "ruby/util.h"
-# else
-# include "util.h"
-# endif
-# include <windows.h>
- typedef HINSTANCE DL_HANDLE;
-# define DL_OPEN LoadLibrary
-# define DL_SYM GetProcAddress
-# define TCL_INDEX 4
-# define TK_INDEX 3
-# define TCL_NAME "tcl89"
-# define TK_NAME "tk89"
-# undef DLEXT
-# define DLEXT ".dll"
-#elif defined HAVE_DLOPEN
-# include <dlfcn.h>
- typedef void *DL_HANDLE;
-# define DL_OPEN(file) dlopen(file, RTLD_LAZY|RTLD_GLOBAL)
-# define DL_SYM dlsym
-# define TCL_INDEX 8
-# define TK_INDEX 7
-# define TCL_NAME "libtcl8.9"
-# define TK_NAME "libtk8.9"
-# ifdef __APPLE__
-# undef DLEXT
-# define DLEXT ".dylib"
-# endif
-#endif
-
-static DL_HANDLE tcl_dll = (DL_HANDLE)0;
-static DL_HANDLE tk_dll = (DL_HANDLE)0;
-
-int
-#ifdef HAVE_PROTOTYPES
-ruby_open_tcl_dll(char *appname)
-#else
-ruby_open_tcl_dll(appname)
- char *appname;
-#endif
-{
- void (*p_Tcl_FindExecutable)(const char *);
- int n;
- char *ruby_tcl_dll = 0;
-
- if (tcl_dll) return TCLTK_STUBS_OK;
-
- ruby_tcl_dll = getenv("RUBY_TCL_DLL");
-#if defined _WIN32
- if (ruby_tcl_dll) ruby_tcl_dll = ruby_strdup(ruby_tcl_dll);
-#endif
- if (ruby_tcl_dll) {
- tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
- } else {
- char tcl_name[] = TCL_NAME DLEXT;
- /* examine from 8.9 to 8.1 */
- for (n = '9'; n > '0'; n--) {
- tcl_name[TCL_INDEX] = n;
- tcl_dll = (DL_HANDLE)DL_OPEN(tcl_name);
- if (tcl_dll)
- break;
- }
- }
-
-#if defined _WIN32
- if (ruby_tcl_dll) ruby_xfree(ruby_tcl_dll);
-#endif
-
- if (!tcl_dll)
- return NO_TCL_DLL;
-
- p_Tcl_FindExecutable = (void (*)(const char *))DL_SYM(tcl_dll, "Tcl_FindExecutable");
- if (!p_Tcl_FindExecutable)
- return NO_FindExecutable;
-
- if (appname) {
- p_Tcl_FindExecutable(appname);
- } else {
- p_Tcl_FindExecutable("ruby");
- }
-
- return TCLTK_STUBS_OK;
-}
-
-int
-ruby_open_tk_dll(void)
-{
- int n;
- char *ruby_tk_dll = 0;
-
- if (!tcl_dll) {
- /* int ret = ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */
- int ret = ruby_open_tcl_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0);
- if (ret != TCLTK_STUBS_OK) return ret;
- }
-
- if (tk_dll) return TCLTK_STUBS_OK;
-
- ruby_tk_dll = getenv("RUBY_TK_DLL");
- if (ruby_tk_dll) {
- tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
- } else {
- char tk_name[] = TK_NAME DLEXT;
- /* examine from 8.9 to 8.1 */
- for (n = '9'; n > '0'; n--) {
- tk_name[TK_INDEX] = n;
- tk_dll = (DL_HANDLE)DL_OPEN(tk_name);
- if (tk_dll)
- break;
- }
- }
-
- if (!tk_dll)
- return NO_TK_DLL;
-
- return TCLTK_STUBS_OK;
-}
-
-int
-#ifdef HAVE_PROTOTYPES
-ruby_open_tcltk_dll(char *appname)
-#else
-ruby_open_tcltk_dll(appname)
- char *appname;
-#endif
-{
- return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
-}
-
-int
-tcl_stubs_init_p(void)
-{
- return(tclStubsPtr != (TclStubs*)NULL);
-}
-
-int
-tk_stubs_init_p(void)
-{
- return(tkStubsPtr != (TkStubs*)NULL);
-}
-
-
-Tcl_Interp *
-#ifdef HAVE_PROTOTYPES
-ruby_tcl_create_ip_and_stubs_init(int *st)
-#else
-ruby_tcl_create_ip_and_stubs_init(st)
- int *st;
-#endif
-{
- Tcl_Interp *tcl_ip;
-
- if (st) *st = 0;
-
- if (tcl_stubs_init_p()) {
- tcl_ip = Tcl_CreateInterp();
-
- if (!tcl_ip) {
- if (st) *st = FAIL_CreateInterp;
- return (Tcl_Interp*)NULL;
- }
-
- _nativethread_consistency_check(tcl_ip);
-
- return tcl_ip;
-
- } else {
- Tcl_Interp *(*p_Tcl_CreateInterp)();
- Tcl_Interp *(*p_Tcl_DeleteInterp)();
-
- if (!tcl_dll) {
- /* int ret = ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */
- int ret = ruby_open_tcl_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0);
-
- if (ret != TCLTK_STUBS_OK) {
- if (st) *st = ret;
- return (Tcl_Interp*)NULL;
- }
- }
-
- p_Tcl_CreateInterp
- = (Tcl_Interp *(*)())DL_SYM(tcl_dll, "Tcl_CreateInterp");
- if (!p_Tcl_CreateInterp) {
- if (st) *st = NO_CreateInterp;
- return (Tcl_Interp*)NULL;
- }
-
- p_Tcl_DeleteInterp
- = (Tcl_Interp *(*)())DL_SYM(tcl_dll, "Tcl_DeleteInterp");
- if (!p_Tcl_DeleteInterp) {
- if (st) *st = NO_DeleteInterp;
- return (Tcl_Interp*)NULL;
- }
-
- tcl_ip = (*p_Tcl_CreateInterp)();
- if (!tcl_ip) {
- if (st) *st = FAIL_CreateInterp;
- return (Tcl_Interp*)NULL;
- }
-
- if (!Tcl_InitStubs(tcl_ip, "8.1", 0)) {
- if (st) *st = FAIL_Tcl_InitStubs;
- (*p_Tcl_DeleteInterp)(tcl_ip);
- return (Tcl_Interp*)NULL;
- }
-
- _nativethread_consistency_check(tcl_ip);
-
- return tcl_ip;
- }
-}
-
-int
-ruby_tcl_stubs_init(void)
-{
- int st;
- Tcl_Interp *tcl_ip;
-
- if (!tcl_stubs_init_p()) {
- tcl_ip = ruby_tcl_create_ip_and_stubs_init(&st);
-
- if (!tcl_ip) return st;
-
- Tcl_DeleteInterp(tcl_ip);
- }
-
- return TCLTK_STUBS_OK;
-}
-
-int
-#ifdef HAVE_PROTOTYPES
-ruby_tk_stubs_init(Tcl_Interp *tcl_ip)
-#else
-ruby_tk_stubs_init(tcl_ip)
- Tcl_Interp *tcl_ip;
-#endif
-{
- Tcl_ResetResult(tcl_ip);
-
- if (tk_stubs_init_p()) {
- if (Tk_Init(tcl_ip) == TCL_ERROR) {
- return FAIL_Tk_Init;
- }
- } else {
- int (*p_Tk_Init)(Tcl_Interp *);
-
- if (!tk_dll) {
- int ret = ruby_open_tk_dll();
- if (ret != TCLTK_STUBS_OK) return ret;
- }
-
- p_Tk_Init = (int (*)(Tcl_Interp *))DL_SYM(tk_dll, "Tk_Init");
- if (!p_Tk_Init)
- return NO_Tk_Init;
-
-#if defined USE_TK_STUBS && defined TK_FRAMEWORK && defined(__APPLE__)
- /*
- FIX ME : dirty hack for Mac OS X frameworks.
- With stubs, fails to find Resource/Script directory of Tk.framework.
- So, teach it to a Tcl interpreter by an environment variable.
- e.g. when $tcl_library ==
- /Library/Frameworks/Tcl.framwwork/8.5/Resources/Scripts
- ==> /Library/Frameworks/Tk.framwwork/8.5/Resources/Scripts
- */
- if (Tcl_Eval(tcl_ip,
- "if {[array get env TK_LIBRARY] == {}} { set env(TK_LIBRARY) [regsub -all -nocase {(t)cl} $tcl_library {\\1k}] }"
- ) != TCL_OK) {
- return FAIL_Tk_Init;
- }
-#endif
-
- if ((*p_Tk_Init)(tcl_ip) == TCL_ERROR)
- return FAIL_Tk_Init;
-
- if (!Tk_InitStubs(tcl_ip, (char *)"8.1", 0))
- return FAIL_Tk_InitStubs;
-
-#ifdef __MACOS__
- _macinit();
-#endif
- }
-
- return TCLTK_STUBS_OK;
-}
-
-int
-#ifdef HAVE_PROTOTYPES
-ruby_tk_stubs_safeinit(Tcl_Interp *tcl_ip)
-#else
-ruby_tk_stubs_safeinit(tcl_ip)
- Tcl_Interp *tcl_ip;
-#endif
-{
- Tcl_ResetResult(tcl_ip);
-
- if (tk_stubs_init_p()) {
- if (Tk_SafeInit(tcl_ip) == TCL_ERROR)
- return FAIL_Tk_Init;
- } else {
- int (*p_Tk_SafeInit)(Tcl_Interp *);
-
- if (!tk_dll) {
- int ret = ruby_open_tk_dll();
- if (ret != TCLTK_STUBS_OK) return ret;
- }
-
- p_Tk_SafeInit = (int (*)(Tcl_Interp *))DL_SYM(tk_dll, "Tk_SafeInit");
- if (!p_Tk_SafeInit)
- return NO_Tk_Init;
-
- if ((*p_Tk_SafeInit)(tcl_ip) == TCL_ERROR)
- return FAIL_Tk_Init;
-
- if (!Tk_InitStubs(tcl_ip, (char *)"8.1", 0))
- return FAIL_Tk_InitStubs;
-
-#ifdef __MACOS__
- _macinit();
-#endif
- }
-
- return TCLTK_STUBS_OK;
-}
-
-int
-ruby_tcltk_stubs(void)
-{
- int st;
- Tcl_Interp *tcl_ip;
-
- /* st = ruby_open_tcltk_dll(RSTRING_PTR(rb_argv0)); */
- st = ruby_open_tcltk_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0);
- switch(st) {
- case NO_FindExecutable:
- return -7;
- case NO_TCL_DLL:
- case NO_TK_DLL:
- return -1;
- }
-
- tcl_ip = ruby_tcl_create_ip_and_stubs_init(&st);
- if (!tcl_ip) {
- switch(st) {
- case NO_CreateInterp:
- case NO_DeleteInterp:
- return -2;
- case FAIL_CreateInterp:
- return -3;
- case FAIL_Tcl_InitStubs:
- return -5;
- }
- }
-
- st = ruby_tk_stubs_init(tcl_ip);
- switch(st) {
- case NO_Tk_Init:
- Tcl_DeleteInterp(tcl_ip);
- return -4;
- case FAIL_Tk_Init:
- case FAIL_Tk_InitStubs:
- Tcl_DeleteInterp(tcl_ip);
- return -6;
- }
-
- Tcl_DeleteInterp(tcl_ip);
-
- return 0;
-}
-
-/*###################################################*/
-#else /* ! USE_TCL_STUBS || ! USE_TK_STUBS) */
-/*###################################################*/
-
-static int open_tcl_dll = 0;
-static int call_tk_stubs_init = 0;
-
-int
-#ifdef HAVE_PROTOTYPES
-ruby_open_tcl_dll(char *appname)
-#else
-ruby_open_tcl_dll(appname)
- char *appname;
-#endif
-{
- if (appname) {
- Tcl_FindExecutable(appname);
- } else {
- Tcl_FindExecutable("ruby");
- }
- open_tcl_dll = 1;
-
- return TCLTK_STUBS_OK;
-}
-
-int
-ruby_open_tk_dll(void)
-{
- if (!open_tcl_dll) {
- /* ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */
- ruby_open_tcl_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0);
- }
-
- return TCLTK_STUBS_OK;
-}
-
-int
-#ifdef HAVE_PROTOTYPES
-ruby_open_tcltk_dll(char *appname)
-#else
-ruby_open_tcltk_dll(appname)
- char *appname;
-#endif
-{
- return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
-}
-
-int
-tcl_stubs_init_p(void)
-{
- return 1;
-}
-
-int
-tk_stubs_init_p(void)
-{
- return call_tk_stubs_init;
-}
-
-Tcl_Interp *
-#ifdef HAVE_PROTOTYPES
-ruby_tcl_create_ip_and_stubs_init(int *st)
-#else
-ruby_tcl_create_ip_and_stubs_init(st)
- int *st;
-#endif
-{
- Tcl_Interp *tcl_ip;
-
- if (!open_tcl_dll) {
- /* ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */
- ruby_open_tcl_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0);
- }
-
- if (st) *st = 0;
- tcl_ip = Tcl_CreateInterp();
- if (!tcl_ip) {
- if (st) *st = FAIL_CreateInterp;
- return (Tcl_Interp*)NULL;
- }
-
- _nativethread_consistency_check(tcl_ip);
-
- return tcl_ip;
-}
-
-int
-ruby_tcl_stubs_init(void)
-{
- return TCLTK_STUBS_OK;
-}
-
-int
-#ifdef HAVE_PROTOTYPES
-ruby_tk_stubs_init(Tcl_Interp *tcl_ip)
-#else
-ruby_tk_stubs_init(tcl_ip)
- Tcl_Interp *tcl_ip;
-#endif
-{
- if (Tk_Init(tcl_ip) == TCL_ERROR)
- return FAIL_Tk_Init;
-
- if (!call_tk_stubs_init) {
-#ifdef __MACOS__
- _macinit();
-#endif
- call_tk_stubs_init = 1;
- }
-
- return TCLTK_STUBS_OK;
-}
-
-int
-#ifdef HAVE_PROTOTYPES
-ruby_tk_stubs_safeinit(Tcl_Interp *tcl_ip)
-#else
-ruby_tk_stubs_safeinit(tcl_ip)
- Tcl_Interp *tcl_ip;
-#endif
-{
-#if TCL_MAJOR_VERSION >= 8
- if (Tk_SafeInit(tcl_ip) == TCL_ERROR)
- return FAIL_Tk_Init;
-
- if (!call_tk_stubs_init) {
-#ifdef __MACOS__
- _macinit();
-#endif
- call_tk_stubs_init = 1;
- }
-
- return TCLTK_STUBS_OK;
-
-#else /* TCL_MAJOR_VERSION < 8 */
-
- return FAIL_Tk_Init;
-#endif
-}
-
-int
-ruby_tcltk_stubs(void)
-{
- /* Tcl_FindExecutable(RSTRING_PTR(rb_argv0)); */
- Tcl_FindExecutable(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0);
- return 0;
-}
-
-#endif
diff --git a/ext/tk/stubs.h b/ext/tk/stubs.h
deleted file mode 100644
index b4a85dbd1f..0000000000
--- a/ext/tk/stubs.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <tcl.h>
-
-extern int ruby_open_tcl_dll(char *);
-extern int ruby_open_tk_dll(void);
-extern int ruby_open_tcltk_dll(char *);
-extern int tcl_stubs_init_p(void);
-extern int tk_stubs_init_p(void);
-extern Tcl_Interp *ruby_tcl_create_ip_and_stubs_init(int*);
-extern int ruby_tcl_stubs_init(void);
-extern int ruby_tk_stubs_init(Tcl_Interp*);
-extern int ruby_tk_stubs_safeinit(Tcl_Interp*);
-extern int ruby_tcltk_stubs(void);
-
-/* no error */
-#define TCLTK_STUBS_OK (0)
-
-/* return value of ruby_open_tcl_dll() */
-#define NO_TCL_DLL (1)
-#define NO_FindExecutable (2)
-
-/* return value of ruby_open_tk_dll() */
-#define NO_TK_DLL (-1)
-
-/* status value of ruby_tcl_create_ip_and_stubs_init(st) */
-#define NO_CreateInterp (3)
-#define NO_DeleteInterp (4)
-#define FAIL_CreateInterp (5)
-#define FAIL_Tcl_InitStubs (6)
-
-/* return value of ruby_tk_stubs_init() */
-#define NO_Tk_Init (7)
-#define FAIL_Tk_Init (8)
-#define FAIL_Tk_InitStubs (9)
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
deleted file mode 100644
index 1e425d7654..0000000000
--- a/ext/tk/tcltklib.c
+++ /dev/null
@@ -1,11066 +0,0 @@
-/*
- * tcltklib.c
- * Aug. 27, 1997 Y. Shigehiro
- * Oct. 24, 1997 Y. Matsumoto
- */
-
-#define TCLTKLIB_RELEASE_DATE "2010-08-25"
-/* #define CREATE_RUBYTK_KIT */
-
-#include "ruby.h"
-
-#ifdef HAVE_RUBY_ENCODING_H
-#include "ruby/encoding.h"
-#endif
-#ifdef HAVE_RUBY_VERSION_H
-#include "ruby/version.h"
-#endif
-
-#undef RUBY_UNTYPED_DATA_WARNING
-#define RUBY_UNTYPED_DATA_WARNING 0
-
-#ifdef HAVE_RB_THREAD_CHECK_TRAP_PENDING
-static int rb_thread_critical; /* dummy */
-int rb_thread_check_trap_pending(void);
-#else
-/* use rb_thread_critical on Ruby 1.8.x */
-#include "rubysig.h"
-#define rb_thread_check_trap_pending() (0+rb_trap_pending)
-#endif
-
-#if !defined(RSTRING_PTR)
-#define RSTRING_PTR(s) (RSTRING(s)->ptr)
-#define RSTRING_LEN(s) (RSTRING(s)->len)
-#endif
-#if !defined(RSTRING_LENINT)
-#define RSTRING_LENINT(s) ((int)RSTRING_LEN(s))
-#endif
-#if !defined(RARRAY_PTR)
-#define RARRAY_PTR(s) (RARRAY(s)->ptr)
-#define RARRAY_LEN(s) (RARRAY(s)->len)
-#endif
-#if !defined(RARRAY_CONST_PTR)
-#define RARRAY_CONST_PTR(s) (const VALUE *)RARRAY_PTR(s)
-#endif
-#if !defined(RARRAY_AREF)
-#define RARRAY_AREF(a, i) RARRAY_CONST_PTR(a)[i]
-#endif
-
-#ifdef OBJ_UNTRUST
-#define RbTk_OBJ_UNTRUST(x) do {OBJ_TAINT(x); OBJ_UNTRUST(x);} while (0)
-#else
-#define RbTk_OBJ_UNTRUST(x) OBJ_TAINT(x)
-#endif
-#define RbTk_ALLOC_N(type, n) (type *)ckalloc((int)(sizeof(type) * (n)))
-
-#if defined(HAVE_RB_PROC_NEW) && !defined(RUBY_VM)
-/* Ruby 1.8 :: rb_proc_new() was hidden from intern.h at 2008/04/22 */
-extern VALUE rb_proc_new _((VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE));
-#endif
-
-#undef EXTERN /* avoid conflict with tcl.h of tcl8.2 or before */
-#include <stdio.h>
-#ifdef HAVE_STDARG_PROTOTYPES
-#include <stdarg.h>
-#define va_init_list(a,b) va_start(a,b)
-#else
-#include <varargs.h>
-#define va_init_list(a,b) va_start(a)
-#endif
-#include <string.h>
-
-#if !defined HAVE_VSNPRINTF && !defined vsnprintf
-# ifdef WIN32
- /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-# define vsnprintf _vsnprintf
-# else
-# ifdef HAVE_RUBY_RUBY_H
-# include "ruby/missing.h"
-# else
-# include "missing.h"
-# endif
-# endif
-#endif
-
-#include <tcl.h>
-#include <tk.h>
-
-#ifndef HAVE_RUBY_NATIVE_THREAD_P
-#define ruby_native_thread_p() is_ruby_native_thread()
-#undef RUBY_USE_NATIVE_THREAD
-#else
-#define RUBY_USE_NATIVE_THREAD 1
-#endif
-
-#ifndef HAVE_RB_ERRINFO
-#define rb_errinfo() (ruby_errinfo+0) /* cannot be l-value */
-#else
-VALUE rb_errinfo(void);
-#endif
-#ifndef HAVE_RB_SAFE_LEVEL
-#define rb_safe_level() (ruby_safe_level+0)
-#endif
-#ifndef HAVE_RB_SOURCEFILE
-#define rb_sourcefile() (ruby_sourcefile+0)
-#endif
-
-#include "stubs.h"
-
-#ifndef TCL_ALPHA_RELEASE
-#define TCL_ALPHA_RELEASE 0 /* "alpha" */
-#define TCL_BETA_RELEASE 1 /* "beta" */
-#define TCL_FINAL_RELEASE 2 /* "final" */
-#endif
-
-static struct {
- int major;
- int minor;
- int type; /* ALPHA==0, BETA==1, FINAL==2 */
- int patchlevel;
-} tcltk_version = {0, 0, 0, 0};
-
-static void
-set_tcltk_version(void)
-{
- if (tcltk_version.major) return;
-
- Tcl_GetVersion(&(tcltk_version.major),
- &(tcltk_version.minor),
- &(tcltk_version.patchlevel),
- &(tcltk_version.type));
-}
-
-#if TCL_MAJOR_VERSION >= 8
-# ifndef CONST84
-# if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION <= 4 /* Tcl8.0.x -- 8.4b1 */
-# define CONST84
-# else /* unknown (maybe TCL_VERSION >= 8.5) */
-# ifdef CONST
-# define CONST84 CONST
-# else
-# define CONST84
-# endif
-# endif
-# endif
-#else /* TCL_MAJOR_VERSION < 8 */
-# ifdef CONST
-# define CONST84 CONST
-# else
-# define CONST
-# define CONST84
-# endif
-#endif
-
-#ifndef CONST86
-# if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION <= 5 /* Tcl8.0.x -- 8.5.x */
-# define CONST86
-# else
-# define CONST86 CONST84
-# endif
-#endif
-
-/* copied from eval.c */
-#define TAG_RETURN 0x1
-#define TAG_BREAK 0x2
-#define TAG_NEXT 0x3
-#define TAG_RETRY 0x4
-#define TAG_REDO 0x5
-#define TAG_RAISE 0x6
-#define TAG_THROW 0x7
-#define TAG_FATAL 0x8
-
-/* for ruby_debug */
-#define DUMP1(ARG1) if (ruby_debug) { fprintf(stderr, "tcltklib: %s\n", ARG1); fflush(stderr); }
-#define DUMP2(ARG1, ARG2) if (ruby_debug) { fprintf(stderr, "tcltklib: ");\
-fprintf(stderr, ARG1, ARG2); fprintf(stderr, "\n"); fflush(stderr); }
-#define DUMP3(ARG1, ARG2, ARG3) if (ruby_debug) { fprintf(stderr, "tcltklib: ");\
-fprintf(stderr, ARG1, ARG2, ARG3); fprintf(stderr, "\n"); fflush(stderr); }
-/*
-#define DUMP1(ARG1)
-#define DUMP2(ARG1, ARG2)
-#define DUMP3(ARG1, ARG2, ARG3)
-*/
-
-/* release date */
-static const char tcltklib_release_date[] = TCLTKLIB_RELEASE_DATE;
-
-/* finalize_proc_name */
-static const char finalize_hook_name[] = "INTERP_FINALIZE_HOOK";
-
-static void ip_finalize _((Tcl_Interp*));
-static void ip_free _((void *p));
-
-static int at_exit = 0;
-
-#ifdef HAVE_RUBY_ENCODING_H
-static VALUE cRubyEncoding;
-
-/* encoding */
-static int ENCODING_INDEX_UTF8;
-static int ENCODING_INDEX_BINARY;
-#endif
-static VALUE ENCODING_NAME_UTF8;
-static VALUE ENCODING_NAME_BINARY;
-
-static VALUE create_dummy_encoding_for_tk_core _((VALUE, VALUE, VALUE));
-static VALUE create_dummy_encoding_for_tk _((VALUE, VALUE));
-static int update_encoding_table _((VALUE, VALUE, VALUE));
-static VALUE encoding_table_get_name_core _((VALUE, VALUE, VALUE));
-static VALUE encoding_table_get_obj_core _((VALUE, VALUE, VALUE));
-static VALUE encoding_table_get_name _((VALUE, VALUE));
-static VALUE encoding_table_get_obj _((VALUE, VALUE));
-static VALUE create_encoding_table _((VALUE));
-static VALUE ip_get_encoding_table _((VALUE));
-
-
-/* for callback break & continue */
-static VALUE eTkCallbackReturn;
-static VALUE eTkCallbackBreak;
-static VALUE eTkCallbackContinue;
-
-static VALUE eLocalJumpError;
-
-static VALUE eTkLocalJumpError;
-static VALUE eTkCallbackRetry;
-static VALUE eTkCallbackRedo;
-static VALUE eTkCallbackThrow;
-
-static VALUE tcltkip_class;
-
-static ID ID_at_enc;
-static ID ID_at_interp;
-
-static ID ID_encoding_name;
-static ID ID_encoding_table;
-
-static ID ID_stop_p;
-static ID ID_alive_p;
-static ID ID_kill;
-static ID ID_join;
-static ID ID_value;
-
-static ID ID_call;
-static ID ID_backtrace;
-static ID ID_message;
-
-static ID ID_at_reason;
-static ID ID_return;
-static ID ID_break;
-static ID ID_next;
-
-static ID ID_to_s;
-static ID ID_inspect;
-
-static VALUE ip_invoke_real _((int, VALUE*, VALUE));
-static VALUE ip_invoke _((int, VALUE*, VALUE));
-static VALUE ip_invoke_with_position _((int, VALUE*, VALUE, Tcl_QueuePosition));
-static VALUE tk_funcall _((VALUE(), int, VALUE*, VALUE));
-static VALUE callq_safelevel_handler _((VALUE, VALUE));
-
-/* Tcl's object type */
-#if TCL_MAJOR_VERSION >= 8
-static const char Tcl_ObjTypeName_ByteArray[] = "bytearray";
-static CONST86 Tcl_ObjType *Tcl_ObjType_ByteArray;
-
-static const char Tcl_ObjTypeName_String[] = "string";
-static CONST86 Tcl_ObjType *Tcl_ObjType_String;
-
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1)
-#define IS_TCL_BYTEARRAY(obj) ((obj)->typePtr == Tcl_ObjType_ByteArray)
-#define IS_TCL_STRING(obj) ((obj)->typePtr == Tcl_ObjType_String)
-#define IS_TCL_VALID_STRING(obj) ((obj)->bytes != (char*)NULL)
-#endif
-#endif
-
-#ifndef HAVE_RB_HASH_LOOKUP
-#define rb_hash_lookup rb_hash_aref
-#endif
-
-#ifndef HAVE_RB_THREAD_ALIVE_P
-#define rb_thread_alive_p(thread) rb_funcall2((thread), ID_alive_p, 0, NULL)
-#endif
-
-/* safe Tcl_Eval and Tcl_GlobalEval */
-static int
-#ifdef HAVE_PROTOTYPES
-tcl_eval(Tcl_Interp *interp, const char *cmd)
-#else
-tcl_eval(interp, cmd)
- Tcl_Interp *interp;
- const char *cmd; /* don't have to be writable */
-#endif
-{
- char *buf = strdup(cmd);
- int ret;
-
- Tcl_AllowExceptions(interp);
- ret = Tcl_Eval(interp, buf);
- free(buf);
- return ret;
-}
-
-#undef Tcl_Eval
-#define Tcl_Eval tcl_eval
-
-static int
-#ifdef HAVE_PROTOTYPES
-tcl_global_eval(Tcl_Interp *interp, const char *cmd)
-#else
-tcl_global_eval(interp, cmd)
- Tcl_Interp *interp;
- const char *cmd; /* don't have to be writable */
-#endif
-{
- char *buf = strdup(cmd);
- int ret;
-
- Tcl_AllowExceptions(interp);
- ret = Tcl_GlobalEval(interp, buf);
- free(buf);
- return ret;
-}
-
-#undef Tcl_GlobalEval
-#define Tcl_GlobalEval tcl_global_eval
-
-/* Tcl_{Incr|Decr}RefCount for tcl7.x or earlier */
-#if TCL_MAJOR_VERSION < 8
-#define Tcl_IncrRefCount(obj) (1)
-#define Tcl_DecrRefCount(obj) (1)
-#endif
-
-/* Tcl_GetStringResult for tcl7.x or earlier */
-#if TCL_MAJOR_VERSION < 8
-#define Tcl_GetStringResult(interp) ((interp)->result)
-#endif
-
-/* Tcl_[GS]etVar2Ex for tcl8.0 */
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
-static Tcl_Obj *
-Tcl_GetVar2Ex(interp, name1, name2, flags)
- Tcl_Interp *interp;
- CONST char *name1;
- CONST char *name2;
- int flags;
-{
- Tcl_Obj *nameObj1, *nameObj2 = NULL, *retObj;
-
- nameObj1 = Tcl_NewStringObj((char*)name1, -1);
- Tcl_IncrRefCount(nameObj1);
-
- if (name2) {
- nameObj2 = Tcl_NewStringObj((char*)name2, -1);
- Tcl_IncrRefCount(nameObj2);
- }
-
- retObj = Tcl_ObjGetVar2(interp, nameObj1, nameObj2, flags);
-
- if (name2) {
- Tcl_DecrRefCount(nameObj2);
- }
-
- Tcl_DecrRefCount(nameObj1);
-
- return retObj;
-}
-
-static Tcl_Obj *
-Tcl_SetVar2Ex(interp, name1, name2, newValObj, flags)
- Tcl_Interp *interp;
- CONST char *name1;
- CONST char *name2;
- Tcl_Obj *newValObj;
- int flags;
-{
- Tcl_Obj *nameObj1, *nameObj2 = NULL, *retObj;
-
- nameObj1 = Tcl_NewStringObj((char*)name1, -1);
- Tcl_IncrRefCount(nameObj1);
-
- if (name2) {
- nameObj2 = Tcl_NewStringObj((char*)name2, -1);
- Tcl_IncrRefCount(nameObj2);
- }
-
- retObj = Tcl_ObjSetVar2(interp, nameObj1, nameObj2, newValObj, flags);
-
- if (name2) {
- Tcl_DecrRefCount(nameObj2);
- }
-
- Tcl_DecrRefCount(nameObj1);
-
- return retObj;
-}
-#endif
-
-/* from tkAppInit.c */
-
-#if TCL_MAJOR_VERSION < 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
-# if !defined __MINGW32__
-/*
- * The following variable is a special hack that is needed in order for
- * Sun shared libraries to be used for Tcl.
- */
-
-extern int matherr();
-int *tclDummyMathPtr = (int *) matherr;
-# endif
-#endif
-
-/*---- module TclTkLib ----*/
-
-struct invoke_queue {
- Tcl_Event ev;
- int argc;
-#if TCL_MAJOR_VERSION >= 8
- Tcl_Obj **argv;
-#else /* TCL_MAJOR_VERSION < 8 */
- char **argv;
-#endif
- VALUE interp;
- int *done;
- int safe_level;
- VALUE result;
- VALUE thread;
-};
-
-struct eval_queue {
- Tcl_Event ev;
- char *str;
- int len;
- VALUE interp;
- int *done;
- int safe_level;
- VALUE result;
- VALUE thread;
-};
-
-struct call_queue {
- Tcl_Event ev;
- VALUE (*func)();
- int argc;
- VALUE *argv;
- VALUE interp;
- int *done;
- int safe_level;
- VALUE result;
- VALUE thread;
-};
-
-void
-invoke_queue_mark(struct invoke_queue *q)
-{
- rb_gc_mark(q->interp);
- rb_gc_mark(q->result);
- rb_gc_mark(q->thread);
-}
-
-void
-eval_queue_mark(struct eval_queue *q)
-{
- rb_gc_mark(q->interp);
- rb_gc_mark(q->result);
- rb_gc_mark(q->thread);
-}
-
-void
-call_queue_mark(struct call_queue *q)
-{
- int i;
-
- for(i = 0; i < q->argc; i++) {
- rb_gc_mark(q->argv[i]);
- }
-
- rb_gc_mark(q->interp);
- rb_gc_mark(q->result);
- rb_gc_mark(q->thread);
-}
-
-
-static VALUE eventloop_thread;
-static Tcl_Interp *eventloop_interp;
-#ifdef RUBY_USE_NATIVE_THREAD
-Tcl_ThreadId tk_eventloop_thread_id; /* native thread ID of Tcl interpreter */
-#endif
-static VALUE eventloop_stack;
-static int window_event_mode = ~0;
-
-static VALUE watchdog_thread;
-
-Tcl_Interp *current_interp;
-
-/* thread control strategy */
-/* multi-tk works with the following settings only ???
- : CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE 1
- : USE_TOGGLE_WINDOW_MODE_FOR_IDLE 0
- : DO_THREAD_SCHEDULE_AT_CALLBACK_DONE 0
-*/
-#ifdef RUBY_USE_NATIVE_THREAD
-#define CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE 1
-#define USE_TOGGLE_WINDOW_MODE_FOR_IDLE 0
-#define DO_THREAD_SCHEDULE_AT_CALLBACK_DONE 1
-#else /* ! RUBY_USE_NATIVE_THREAD */
-#define CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE 1
-#define USE_TOGGLE_WINDOW_MODE_FOR_IDLE 0
-#define DO_THREAD_SCHEDULE_AT_CALLBACK_DONE 0
-#endif
-
-#if CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE
-static int have_rb_thread_waiting_for_value = 0;
-#endif
-
-/*
- * 'event_loop_max' is a maximum events which the eventloop processes in one
- * term of thread scheduling. 'no_event_tick' is the count-up value when
- * there are no event for processing.
- * 'timer_tick' is a limit of one term of thread scheduling.
- * If 'timer_tick' == 0, then not use the timer for thread scheduling.
- */
-#ifdef RUBY_USE_NATIVE_THREAD
-#define DEFAULT_EVENT_LOOP_MAX 800/*counts*/
-#define DEFAULT_NO_EVENT_TICK 10/*counts*/
-#define DEFAULT_NO_EVENT_WAIT 5/*milliseconds ( 1 -- 999 ) */
-#define WATCHDOG_INTERVAL 10/*milliseconds ( 1 -- 999 ) */
-#define DEFAULT_TIMER_TICK 0/*milliseconds ( 0 -- 999 ) */
-#define NO_THREAD_INTERRUPT_TIME 100/*milliseconds ( 1 -- 999 ) */
-#else /* ! RUBY_USE_NATIVE_THREAD */
-#define DEFAULT_EVENT_LOOP_MAX 800/*counts*/
-#define DEFAULT_NO_EVENT_TICK 10/*counts*/
-#define DEFAULT_NO_EVENT_WAIT 20/*milliseconds ( 1 -- 999 ) */
-#define WATCHDOG_INTERVAL 10/*milliseconds ( 1 -- 999 ) */
-#define DEFAULT_TIMER_TICK 0/*milliseconds ( 0 -- 999 ) */
-#define NO_THREAD_INTERRUPT_TIME 100/*milliseconds ( 1 -- 999 ) */
-#endif
-
-#define EVENT_HANDLER_TIMEOUT 100/*milliseconds*/
-
-static int event_loop_max = DEFAULT_EVENT_LOOP_MAX;
-static int no_event_tick = DEFAULT_NO_EVENT_TICK;
-static int no_event_wait = DEFAULT_NO_EVENT_WAIT;
-static int timer_tick = DEFAULT_TIMER_TICK;
-static int req_timer_tick = DEFAULT_TIMER_TICK;
-static int run_timer_flag = 0;
-
-static int event_loop_wait_event = 0;
-static int event_loop_abort_on_exc = 1;
-static int loop_counter = 0;
-
-static int check_rootwidget_flag = 0;
-
-
-/* call ruby interpreter */
-#if TCL_MAJOR_VERSION >= 8
-static int ip_ruby_eval _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
-static int ip_ruby_cmd _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
-#else /* TCL_MAJOR_VERSION < 8 */
-static int ip_ruby_eval _((ClientData, Tcl_Interp *, int, char **));
-static int ip_ruby_cmd _((ClientData, Tcl_Interp *, int, char **));
-#endif
-
-struct cmd_body_arg {
- VALUE receiver;
- ID method;
- VALUE args;
-};
-
-/*----------------------------*/
-/* use Tcl internal functions */
-/*----------------------------*/
-#ifndef TCL_NAMESPACE_DEBUG
-#define TCL_NAMESPACE_DEBUG 0
-#endif
-
-#if TCL_NAMESPACE_DEBUG
-
-#if TCL_MAJOR_VERSION >= 8
-EXTERN struct TclIntStubs *tclIntStubsPtr;
-#endif
-
-/*-- Tcl_GetCurrentNamespace --*/
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 5
-/* Tcl7.x doesn't have namespace support. */
-/* Tcl8.5+ has definition of Tcl_GetCurrentNamespace() in tclDecls.h */
-# ifndef Tcl_GetCurrentNamespace
-EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace _((Tcl_Interp *));
-# endif
-# if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
-# ifndef Tcl_GetCurrentNamespace
-# ifndef FunctionNum_of_GetCurrentNamespace
-#define FunctionNum_of_GetCurrentNamespace 124
-# endif
-struct DummyTclIntStubs_for_GetCurrentNamespace {
- int magic;
- struct TclIntStubHooks *hooks;
- void (*func[FunctionNum_of_GetCurrentNamespace])();
- Tcl_Namespace * (*tcl_GetCurrentNamespace) _((Tcl_Interp *));
-};
-
-#define Tcl_GetCurrentNamespace \
- (((struct DummyTclIntStubs_for_GetCurrentNamespace *)tclIntStubsPtr)->tcl_GetCurrentNamespace)
-# endif
-# endif
-#endif
-
-/* namespace check */
-/* ip_null_namespace(Tcl_Interp *interp) */
-#if TCL_MAJOR_VERSION < 8
-#define ip_null_namespace(interp) (0)
-#else /* support namespace */
-#define ip_null_namespace(interp) \
- (Tcl_GetCurrentNamespace(interp) == (Tcl_Namespace *)NULL)
-#endif
-
-/* rbtk_invalid_namespace(tcltkip *ptr) */
-#if TCL_MAJOR_VERSION < 8
-#define rbtk_invalid_namespace(ptr) (0)
-#else /* support namespace */
-#define rbtk_invalid_namespace(ptr) \
- ((ptr)->default_ns == (Tcl_Namespace*)NULL || Tcl_GetCurrentNamespace((ptr)->ip) != (ptr)->default_ns)
-#endif
-
-/*-- Tcl_PopCallFrame & Tcl_PushCallFrame --*/
-#if TCL_MAJOR_VERSION >= 8
-# ifndef CallFrame
-typedef struct CallFrame {
- Tcl_Namespace *nsPtr;
- int dummy1;
- int dummy2;
- char *dummy3;
- struct CallFrame *callerPtr;
- struct CallFrame *callerVarPtr;
- int level;
- char *dummy7;
- char *dummy8;
- int dummy9;
- char* dummy10;
-} CallFrame;
-# endif
-
-# if !defined(TclGetFrame) && !defined(TclGetFrame_TCL_DECLARED)
-EXTERN int TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
-# endif
-# if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
-# ifndef TclGetFrame
-# ifndef FunctionNum_of_GetFrame
-#define FunctionNum_of_GetFrame 32
-# endif
-struct DummyTclIntStubs_for_GetFrame {
- int magic;
- struct TclIntStubHooks *hooks;
- void (*func[FunctionNum_of_GetFrame])();
- int (*tclGetFrame) _((Tcl_Interp *, CONST char *, CallFrame **));
-};
-#define TclGetFrame \
- (((struct DummyTclIntStubs_for_GetFrame *)tclIntStubsPtr)->tclGetFrame)
-# endif
-# endif
-
-# if !defined(Tcl_PopCallFrame) && !defined(Tcl_PopCallFrame_TCL_DECLARED)
-EXTERN void Tcl_PopCallFrame _((Tcl_Interp *));
-EXTERN int Tcl_PushCallFrame _((Tcl_Interp *, Tcl_CallFrame *, Tcl_Namespace *, int));
-# endif
-# if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
-# ifndef Tcl_PopCallFrame
-# ifndef FunctionNum_of_PopCallFrame
-#define FunctionNum_of_PopCallFrame 128
-# endif
-struct DummyTclIntStubs_for_PopCallFrame {
- int magic;
- struct TclIntStubHooks *hooks;
- void (*func[FunctionNum_of_PopCallFrame])();
- void (*tcl_PopCallFrame) _((Tcl_Interp *));
- int (*tcl_PushCallFrame) _((Tcl_Interp *, Tcl_CallFrame *, Tcl_Namespace *, int));
-};
-
-#define Tcl_PopCallFrame \
- (((struct DummyTclIntStubs_for_PopCallFrame *)tclIntStubsPtr)->tcl_PopCallFrame)
-#define Tcl_PushCallFrame \
- (((struct DummyTclIntStubs_for_PopCallFrame *)tclIntStubsPtr)->tcl_PushCallFrame)
-# endif
-# endif
-
-#else /* Tcl7.x */
-# ifndef CallFrame
-typedef struct CallFrame {
- Tcl_HashTable varTable;
- int level;
- int argc;
- char **argv;
- struct CallFrame *callerPtr;
- struct CallFrame *callerVarPtr;
-} CallFrame;
-# endif
-# ifndef Tcl_CallFrame
-#define Tcl_CallFrame CallFrame
-# endif
-
-# if !defined(TclGetFrame) && !defined(TclGetFrame_TCL_DECLARED)
-EXTERN int TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
-# endif
-
-# if !defined(Tcl_PopCallFrame) && !defined(Tcl_PopCallFrame_TCL_DECLARED)
-typedef struct DummyInterp {
- char *dummy1;
- char *dummy2;
- int dummy3;
- Tcl_HashTable dummy4;
- Tcl_HashTable dummy5;
- Tcl_HashTable dummy6;
- int numLevels;
- int maxNestingDepth;
- CallFrame *framePtr;
- CallFrame *varFramePtr;
-} DummyInterp;
-
-static void
-Tcl_PopCallFrame(interp)
- Tcl_Interp *interp;
-{
- DummyInterp *iPtr = (DummyInterp*)interp;
- CallFrame *frame = iPtr->varFramePtr;
-
- /* **** DUMMY **** */
- iPtr->framePtr = frame.callerPtr;
- iPtr->varFramePtr = frame.callerVarPtr;
-
- return TCL_OK;
-}
-
-/* dummy */
-#define Tcl_Namespace char
-
-static int
-Tcl_PushCallFrame(interp, framePtr, nsPtr, isProcCallFrame)
- Tcl_Interp *interp;
- Tcl_CallFrame *framePtr;
- Tcl_Namespace *nsPtr;
- int isProcCallFrame;
-{
- DummyInterp *iPtr = (DummyInterp*)interp;
- CallFrame *frame = (CallFrame *)framePtr;
-
- /* **** DUMMY **** */
- Tcl_InitHashTable(&frame.varTable, TCL_STRING_KEYS);
- if (iPtr->varFramePtr != NULL) {
- frame.level = iPtr->varFramePtr->level + 1;
- } else {
- frame.level = 1;
- }
- frame.callerPtr = iPtr->framePtr;
- frame.callerVarPtr = iPtr->varFramePtr;
- iPtr->framePtr = &frame;
- iPtr->varFramePtr = &frame;
-
- return TCL_OK;
-}
-# endif
-
-#endif
-
-#endif /* TCL_NAMESPACE_DEBUG */
-
-
-/*---- class TclTkIp ----*/
-struct tcltkip {
- Tcl_Interp *ip; /* the interpreter */
-#if TCL_NAMESPACE_DEBUG
- Tcl_Namespace *default_ns; /* default namespace */
-#endif
-#ifdef RUBY_USE_NATIVE_THREAD
- Tcl_ThreadId tk_thread_id; /* native thread ID of Tcl interpreter */
-#endif
- int has_orig_exit; /* has original 'exit' command ? */
- Tcl_CmdInfo orig_exit_info; /* command info of original 'exit' command */
- int ref_count; /* reference count of rbtk_preserve_ip call */
- int allow_ruby_exit; /* allow exiting ruby by 'exit' function */
- int return_value; /* return value */
-};
-
-static const rb_data_type_t tcltkip_type = {
- "tcltkip",
- {0, ip_free, 0,},
-};
-
-static struct tcltkip *
-get_ip(self)
- VALUE self;
-{
- struct tcltkip *ptr;
-
- TypedData_Get_Struct(self, struct tcltkip, &tcltkip_type, ptr);
- if (ptr == 0) {
- /* rb_raise(rb_eTypeError, "uninitialized TclTkIp"); */
- return((struct tcltkip *)NULL);
- }
- if (ptr->ip == (Tcl_Interp*)NULL) {
- /* rb_raise(rb_eRuntimeError, "deleted IP"); */
- return((struct tcltkip *)NULL);
- }
- return ptr;
-}
-
-static int
-deleted_ip(ptr)
- struct tcltkip *ptr;
-{
- if (!ptr || !ptr->ip || Tcl_InterpDeleted(ptr->ip)
-#if TCL_NAMESPACE_DEBUG
- || rbtk_invalid_namespace(ptr)
-#endif
- ) {
- DUMP1("ip is deleted");
- return 1;
- }
- return 0;
-}
-
-/* increment/decrement reference count of tcltkip */
-static int
-rbtk_preserve_ip(ptr)
- struct tcltkip *ptr;
-{
- ptr->ref_count++;
- if (ptr->ip == (Tcl_Interp*)NULL) {
- /* deleted IP */
- ptr->ref_count = 0;
- } else {
- Tcl_Preserve((ClientData)ptr->ip);
- }
- return(ptr->ref_count);
-}
-
-static int
-rbtk_release_ip(ptr)
- struct tcltkip *ptr;
-{
- ptr->ref_count--;
- if (ptr->ref_count < 0) {
- ptr->ref_count = 0;
- } else if (ptr->ip == (Tcl_Interp*)NULL) {
- /* deleted IP */
- ptr->ref_count = 0;
- } else {
- Tcl_Release((ClientData)ptr->ip);
- }
- return(ptr->ref_count);
-}
-
-
-static VALUE
-#ifdef HAVE_STDARG_PROTOTYPES
-create_ip_exc(VALUE interp, VALUE exc, const char *fmt, ...)
-#else
-create_ip_exc(interp, exc, fmt, va_alist)
- VALUE interp:
- VALUE exc;
- const char *fmt;
- va_dcl
-#endif
-{
- va_list args;
- VALUE msg;
- VALUE einfo;
- struct tcltkip *ptr = get_ip(interp);
-
- va_init_list(args,fmt);
- msg = rb_vsprintf(fmt, args);
- va_end(args);
- einfo = rb_exc_new_str(exc, msg);
- rb_ivar_set(einfo, ID_at_interp, interp);
- if (ptr) {
- Tcl_ResetResult(ptr->ip);
- }
-
- return einfo;
-}
-
-
-/*####################################################################*/
-#if defined CREATE_RUBYTK_KIT || defined CREATE_RUBYKIT
-
-/*--------------------------------------------------------*/
-
-#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 84
-#error Ruby/Tk-Kit requires Tcl/Tk8.4 or later.
-#endif
-
-/*--------------------------------------------------------*/
-
-/* Many part of code to support Ruby/Tk-Kit is quoted from Tclkit. */
-/* But, never ask Tclkit community about Ruby/Tk-Kit. */
-/* Please ask Ruby (Ruby/Tk) community (e.g. "ruby-dev" mailing list). */
-/*
-----<< license terms of TclKit (from kitgen's "README" file) >>---------------
-The Tclkit-specific sources are license free, they just have a copyright. Hold
-the author(s) harmless and any lawful use is permitted.
-
-This does *not* apply to any of the sources of the other major Open Source
-Software used in Tclkit, which each have very liberal BSD/MIT-like licenses:
-
- * Tcl/Tk, TclVFS, Thread, Vlerq, Zlib
-------------------------------------------------------------------------------
- */
-/* Tcl/Tk stubs may work, but probably it is meaningless. */
-#if defined USE_TCL_STUBS || defined USE_TK_STUBS
-# error Not support Tcl/Tk stubs with Ruby/Tk-Kit or Rubykit.
-#endif
-
-#ifndef KIT_INCLUDES_ZLIB
-#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 86
-#define KIT_INCLUDES_ZLIB 1
-#else
-#define KIT_INCLUDES_ZLIB 0
-#endif
-#endif
-
-#ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#endif
-
-#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 86
-EXTERN Tcl_Obj* TclGetStartupScriptPath();
-EXTERN void TclSetStartupScriptPath _((Tcl_Obj*));
-#define Tcl_GetStartupScript(encPtr) TclGetStartupScriptPath()
-#define Tcl_SetStartupScript(path,enc) TclSetStartupScriptPath(path)
-#endif
-#if !defined(TclSetPreInitScript) && !defined(TclSetPreInitScript_TCL_DECLARED)
-EXTERN char* TclSetPreInitScript _((char *));
-#endif
-
-#ifndef KIT_INCLUDES_TK
-# define KIT_INCLUDES_TK 1
-#endif
-/* #define KIT_INCLUDES_ITCL 1 */
-/* #define KIT_INCLUDES_THREAD 1 */
-
-Tcl_AppInitProc Vfs_Init, Rechan_Init;
-#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
-Tcl_AppInitProc Pwb_Init;
-#endif
-
-#ifdef KIT_LITE
-Tcl_AppInitProc Vlerq_Init, Vlerq_SafeInit;
-#else
-Tcl_AppInitProc Mk4tcl_Init;
-#endif
-
-#if defined TCL_THREADS && defined KIT_INCLUDES_THREAD
-Tcl_AppInitProc Thread_Init;
-#endif
-
-#if KIT_INCLUDES_ZLIB
-Tcl_AppInitProc Zlib_Init;
-#endif
-
-#ifdef KIT_INCLUDES_ITCL
-Tcl_AppInitProc Itcl_Init;
-#endif
-
-#ifdef _WIN32
-Tcl_AppInitProc Dde_Init, Dde_SafeInit, Registry_Init;
-#endif
-
-/*--------------------------------------------------------*/
-
-#define RUBYTK_KITPATH_CONST_NAME "RUBYTK_KITPATH"
-
-static char *rubytk_kitpath = NULL;
-
-static char rubytkkit_preInitCmd[] =
-"proc tclKitPreInit {} {\n"
- "rename tclKitPreInit {}\n"
- "load {} rubytk_kitpath\n"
-#if KIT_INCLUDES_ZLIB
- "catch {load {} zlib}\n"
-#endif
-#ifdef KIT_LITE
- "load {} vlerq\n"
- "namespace eval ::vlerq {}\n"
- "if {[catch { vlerq open $::tcl::kitpath } ::vlerq::starkit_root]} {\n"
- "set n -1\n"
- "} else {\n"
- "set files [vlerq get $::vlerq::starkit_root 0 dirs 0 files]\n"
- "set n [lsearch [vlerq get $files * name] boot.tcl]\n"
- "}\n"
- "if {$n >= 0} {\n"
- "array set a [vlerq get $files $n]\n"
-#else
- "load {} Mk4tcl\n"
-#if defined KIT_VFS_WRITABLE && !defined CREATE_RUBYKIT
- /* running command cannot open itself for writing */
- "mk::file open exe $::tcl::kitpath\n"
-#else
- "mk::file open exe $::tcl::kitpath -readonly\n"
-#endif
- "set n [mk::select exe.dirs!0.files name boot.tcl]\n"
- "if {[llength $n] == 1} {\n"
- "array set a [mk::get exe.dirs!0.files!$n]\n"
-#endif
- "if {![info exists a(contents)]} { error {no boot.tcl file} }\n"
- "if {$a(size) != [string length $a(contents)]} {\n"
- "set a(contents) [zlib decompress $a(contents)]\n"
- "}\n"
- "if {$a(contents) eq \"\"} { error {empty boot.tcl} }\n"
- "uplevel #0 $a(contents)\n"
-#if 0
- "} elseif {[lindex $::argv 0] eq \"-init-\"} {\n"
- "uplevel #0 { source [lindex $::argv 1] }\n"
- "exit\n"
-#endif
- "} else {\n"
- /* When cannot find VFS data, try to use a real directory */
- "set vfsdir \"[file rootname $::tcl::kitpath].vfs\"\n"
- "if {[file isdirectory $vfsdir]} {\n"
- "set ::tcl_library [file join $vfsdir lib tcl$::tcl_version]\n"
- "set ::tcl_libPath [list $::tcl_library [file join $vfsdir lib]]\n"
- "catch {uplevel #0 [list source [file join $vfsdir config.tcl]]}\n"
- "uplevel #0 [list source [file join $::tcl_library init.tcl]]\n"
- "set ::auto_path $::tcl_libPath\n"
- "} else {\n"
- "error \"\n $::tcl::kitpath has no VFS data to start up\"\n"
- "}\n"
- "}\n"
-"}\n"
-"tclKitPreInit"
-;
-
-#if 0
-/* Not use this script.
- It's a memo to support an initScript for Tcl interpreters in the future. */
-static const char initScript[] =
-"if {[file isfile [file join $::tcl::kitpath main.tcl]]} {\n"
- "if {[info commands console] != {}} { console hide }\n"
- "set tcl_interactive 0\n"
- "incr argc\n"
- "set argv [linsert $argv 0 $argv0]\n"
- "set argv0 [file join $::tcl::kitpath main.tcl]\n"
-"} else continue\n"
-;
-#endif
-
-/*--------------------------------------------------------*/
-
-static char*
-set_rubytk_kitpath(const char *kitpath)
-{
- if (kitpath) {
- int len = (int)strlen(kitpath);
- if (rubytk_kitpath) {
- ckfree(rubytk_kitpath);
- }
-
- rubytk_kitpath = (char *)ckalloc(len + 1);
- memcpy(rubytk_kitpath, kitpath, len);
- rubytk_kitpath[len] = '\0';
- }
- return rubytk_kitpath;
-}
-
-/*--------------------------------------------------------*/
-
-#ifdef WIN32
-#define DEV_NULL "NUL"
-#else
-#define DEV_NULL "/dev/null"
-#endif
-
-static void
-check_tclkit_std_channels(void)
-{
- Tcl_Channel chan;
-
- /*
- * We need to verify if we have the standard channels and create them if
- * not. Otherwise internals channels may get used as standard channels
- * (like for encodings) and panic.
- */
- chan = Tcl_GetStdChannel(TCL_STDIN);
- if (chan == NULL) {
- chan = Tcl_OpenFileChannel(NULL, DEV_NULL, "r", 0);
- if (chan != NULL) {
- Tcl_SetChannelOption(NULL, chan, "-encoding", "utf-8");
- }
- Tcl_SetStdChannel(chan, TCL_STDIN);
- }
- chan = Tcl_GetStdChannel(TCL_STDOUT);
- if (chan == NULL) {
- chan = Tcl_OpenFileChannel(NULL, DEV_NULL, "w", 0);
- if (chan != NULL) {
- Tcl_SetChannelOption(NULL, chan, "-encoding", "utf-8");
- }
- Tcl_SetStdChannel(chan, TCL_STDOUT);
- }
- chan = Tcl_GetStdChannel(TCL_STDERR);
- if (chan == NULL) {
- chan = Tcl_OpenFileChannel(NULL, DEV_NULL, "w", 0);
- if (chan != NULL) {
- Tcl_SetChannelOption(NULL, chan, "-encoding", "utf-8");
- }
- Tcl_SetStdChannel(chan, TCL_STDERR);
- }
-}
-
-/*--------------------------------------------------------*/
-
-static int
-rubytk_kitpathObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
-{
- const char* str;
- if (objc == 2) {
- set_rubytk_kitpath(Tcl_GetString(objv[1]));
- } else if (objc > 2) {
- Tcl_WrongNumArgs(interp, 1, objv, "?path?");
- }
- str = rubytk_kitpath ? rubytk_kitpath : Tcl_GetNameOfExecutable();
- Tcl_SetObjResult(interp, Tcl_NewStringObj(str, -1));
- return TCL_OK;
-}
-
-/*
- * Public entry point for ::tcl::kitpath.
- * Creates both link variable name and Tcl command ::tcl::kitpath.
- */
-static int
-rubytk_kitpath_init(Tcl_Interp *interp)
-{
- Tcl_CreateObjCommand(interp, "::tcl::kitpath", rubytk_kitpathObjCmd, 0, 0);
- if (Tcl_LinkVar(interp, "::tcl::kitpath", (char *) &rubytk_kitpath,
- TCL_LINK_STRING | TCL_LINK_READ_ONLY) != TCL_OK) {
- Tcl_ResetResult(interp);
- }
-
- Tcl_CreateObjCommand(interp, "::tcl::rubytk_kitpath", rubytk_kitpathObjCmd, 0, 0);
- if (Tcl_LinkVar(interp, "::tcl::rubytk_kitpath", (char *) &rubytk_kitpath,
- TCL_LINK_STRING | TCL_LINK_READ_ONLY) != TCL_OK) {
- Tcl_ResetResult(interp);
- }
-
- if (rubytk_kitpath == NULL) {
- /*
- * XXX: We may want to avoid doing this to allow tcl::kitpath calls
- * XXX: to obtain changes in nameofexe, if they occur.
- */
- set_rubytk_kitpath(Tcl_GetNameOfExecutable());
- }
-
- return Tcl_PkgProvide(interp, "rubytk_kitpath", "1.0");
-}
-
-/*--------------------------------------------------------*/
-
-static void
-init_static_tcltk_packages(void)
-{
- /*
- * Ensure that std channels exist (creating them if necessary)
- */
- check_tclkit_std_channels();
-
-#ifdef KIT_INCLUDES_ITCL
- Tcl_StaticPackage(0, "Itcl", Itcl_Init, NULL);
-#endif
-#ifdef KIT_LITE
- Tcl_StaticPackage(0, "Vlerq", Vlerq_Init, Vlerq_SafeInit);
-#else
- Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL);
-#endif
-#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
- Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL);
-#endif
- Tcl_StaticPackage(0, "rubytk_kitpath", rubytk_kitpath_init, NULL);
- Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL);
- Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL);
-#if KIT_INCLUDES_ZLIB
- Tcl_StaticPackage(0, "zlib", Zlib_Init, NULL);
-#endif
-#if defined TCL_THREADS && defined KIT_INCLUDES_THREAD
- Tcl_StaticPackage(0, "Thread", Thread_Init, Thread_SafeInit);
-#endif
-#ifdef _WIN32
-#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION > 84
- Tcl_StaticPackage(0, "dde", Dde_Init, Dde_SafeInit);
-#else
- Tcl_StaticPackage(0, "dde", Dde_Init, NULL);
-#endif
- Tcl_StaticPackage(0, "registry", Registry_Init, NULL);
-#endif
-#ifdef KIT_INCLUDES_TK
- Tcl_StaticPackage(0, "Tk", Tk_Init, Tk_SafeInit);
-#endif
-}
-
-/*--------------------------------------------------------*/
-
-static int
-call_tclkit_init_script(Tcl_Interp *interp)
-{
-#if 0
- /* Currently, do nothing in this function.
- It's a memo (quoted from kitInit.c of Tclkit)
- to support an initScript for Tcl interpreters in the future. */
- if (Tcl_EvalEx(interp, initScript, -1, TCL_EVAL_GLOBAL) == TCL_OK) {
- const char *encoding = NULL;
- Tcl_Obj* path = Tcl_GetStartupScript(&encoding);
- Tcl_SetStartupScript(Tcl_GetObjResult(interp), encoding);
- if (path == NULL) {
- Tcl_Eval(interp, "incr argc -1; set argv [lrange $argv 1 end]");
- }
- }
-#endif
-
- return 1;
-}
-
-/*--------------------------------------------------------*/
-
-#ifdef __WIN32__
-/* #include <tkWinInt.h> *//* conflict definition of struct timezone */
-/* #include <tkIntPlatDecls.h> */
-/* #include <windows.h> */
-EXTERN void TkWinSetHINSTANCE(HINSTANCE hInstance);
-void rbtk_win32_SetHINSTANCE(const char *module_name)
-{
- /* TCHAR szBuf[256]; */
- HINSTANCE hInst;
-
- /* hInst = GetModuleHandle(NULL); */
- /* hInst = GetModuleHandle("tcltklib.so"); */
- hInst = GetModuleHandle(module_name);
- TkWinSetHINSTANCE(hInst);
-
- /* GetModuleFileName(hInst, szBuf, sizeof(szBuf) / sizeof(TCHAR)); */
- /* MessageBox(NULL, szBuf, TEXT("OK"), MB_OK); */
-}
-#endif
-
-/*--------------------------------------------------------*/
-
-static void
-setup_rubytkkit(void)
-{
- init_static_tcltk_packages();
-
- {
- ID const_id;
- const_id = rb_intern(RUBYTK_KITPATH_CONST_NAME);
-
- if (rb_const_defined(rb_cObject, const_id)) {
- volatile VALUE pathobj;
- pathobj = rb_const_get(rb_cObject, const_id);
-
- if (rb_obj_is_kind_of(pathobj, rb_cString)) {
-#ifdef HAVE_RUBY_ENCODING_H
- pathobj = rb_str_export_to_enc(pathobj, rb_utf8_encoding());
-#endif
- set_rubytk_kitpath(RSTRING_PTR(pathobj));
- }
- }
- }
-
-#ifdef CREATE_RUBYTK_KIT
- if (rubytk_kitpath == NULL) {
-#ifdef __WIN32__
- /* rbtk_win32_SetHINSTANCE("tcltklib.so"); */
- {
-# ifdef HAVE_RUBY_ENC_FIND_BASENAME
- const char *base = ruby_enc_find_basename(rb_sourcefile(), NULL, NULL,
- rb_filesystem_encoding());
- rbtk_win32_SetHINSTANCE(base);
-# else
- VALUE basename;
- basename = rb_funcall(rb_cFile, rb_intern("basename"), 1,
- rb_str_new2(rb_sourcefile()));
- rbtk_win32_SetHINSTANCE(RSTRING_PTR(basename));
- RB_GC_GUARD(basename);
-# endif
- }
-#endif
- set_rubytk_kitpath(rb_sourcefile());
- }
-#endif
-
- if (rubytk_kitpath == NULL) {
- set_rubytk_kitpath(Tcl_GetNameOfExecutable());
- }
-
- TclSetPreInitScript(rubytkkit_preInitCmd);
-}
-
-/*--------------------------------------------------------*/
-
-#endif /* defined CREATE_RUBYTK_KIT || defined CREATE_RUBYKIT */
-/*####################################################################*/
-
-
-/**********************************************************************/
-
-/* stub status */
-static void
-tcl_stubs_check(void)
-{
- if (!tcl_stubs_init_p()) {
- int st = ruby_tcl_stubs_init();
- switch(st) {
- case TCLTK_STUBS_OK:
- break;
- case NO_TCL_DLL:
- rb_raise(rb_eLoadError, "tcltklib: fail to open tcl_dll");
- case NO_FindExecutable:
- rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_FindExecutable");
- case NO_CreateInterp:
- rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_CreateInterp()");
- case NO_DeleteInterp:
- rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_DeleteInterp()");
- case FAIL_CreateInterp:
- rb_raise(rb_eRuntimeError, "tcltklib: fail to create a new IP to call Tcl_InitStubs()");
- case FAIL_Tcl_InitStubs:
- rb_raise(rb_eRuntimeError, "tcltklib: fail to Tcl_InitStubs()");
- default:
- rb_raise(rb_eRuntimeError, "tcltklib: unknown error(%d) on ruby_tcl_stubs_init()", st);
- }
- }
-}
-
-
-static VALUE
-tcltkip_init_tk(interp)
- VALUE interp;
-{
- struct tcltkip *ptr = get_ip(interp);
-
-#if TCL_MAJOR_VERSION >= 8
- int st;
-
- if (Tcl_IsSafe(ptr->ip)) {
- DUMP1("Tk_SafeInit");
- st = ruby_tk_stubs_safeinit(ptr->ip);
- switch(st) {
- case TCLTK_STUBS_OK:
- break;
- case NO_Tk_Init:
- return rb_exc_new2(rb_eLoadError,
- "tcltklib: can't find Tk_SafeInit()");
- case FAIL_Tk_Init:
- return create_ip_exc(interp, rb_eRuntimeError,
- "tcltklib: fail to Tk_SafeInit(). %s",
- Tcl_GetStringResult(ptr->ip));
- case FAIL_Tk_InitStubs:
- return create_ip_exc(interp, rb_eRuntimeError,
- "tcltklib: fail to Tk_InitStubs(). %s",
- Tcl_GetStringResult(ptr->ip));
- default:
- return create_ip_exc(interp, rb_eRuntimeError,
- "tcltklib: unknown error(%d) on ruby_tk_stubs_safeinit", st);
- }
- } else {
- DUMP1("Tk_Init");
- st = ruby_tk_stubs_init(ptr->ip);
- switch(st) {
- case TCLTK_STUBS_OK:
- break;
- case NO_Tk_Init:
- return rb_exc_new2(rb_eLoadError,
- "tcltklib: can't find Tk_Init()");
- case FAIL_Tk_Init:
- return create_ip_exc(interp, rb_eRuntimeError,
- "tcltklib: fail to Tk_Init(). %s",
- Tcl_GetStringResult(ptr->ip));
- case FAIL_Tk_InitStubs:
- return create_ip_exc(interp, rb_eRuntimeError,
- "tcltklib: fail to Tk_InitStubs(). %s",
- Tcl_GetStringResult(ptr->ip));
- default:
- return create_ip_exc(interp, rb_eRuntimeError,
- "tcltklib: unknown error(%d) on ruby_tk_stubs_init", st);
- }
- }
-
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tk_Init");
- if (ruby_tk_stubs_init(ptr->ip) != TCLTK_STUBS_OK) {
- return rb_exc_new2(rb_eRuntimeError, ptr->ip->result);
- }
-#endif
-
-#ifdef RUBY_USE_NATIVE_THREAD
- ptr->tk_thread_id = Tcl_GetCurrentThread();
-#endif
-
- return Qnil;
-}
-
-
-/* treat exception on Tcl side */
-static VALUE rbtk_pending_exception;
-static int rbtk_eventloop_depth = 0;
-static int rbtk_internal_eventloop_handler = 0;
-
-
-static int
-pending_exception_check0(void)
-{
- volatile VALUE exc = rbtk_pending_exception;
-
- if (!NIL_P(exc) && rb_obj_is_kind_of(exc, rb_eException)) {
- DUMP1("find a pending exception");
- if (rbtk_eventloop_depth > 0
- || rbtk_internal_eventloop_handler > 0
- ) {
- return 1; /* pending */
- } else {
- rbtk_pending_exception = Qnil;
-
- if (rb_obj_is_kind_of(exc, eTkCallbackRetry)) {
- DUMP1("pending_exception_check0: call rb_jump_tag(retry)");
- rb_jump_tag(TAG_RETRY);
- } else if (rb_obj_is_kind_of(exc, eTkCallbackRedo)) {
- DUMP1("pending_exception_check0: call rb_jump_tag(redo)");
- rb_jump_tag(TAG_REDO);
- } else if (rb_obj_is_kind_of(exc, eTkCallbackThrow)) {
- DUMP1("pending_exception_check0: call rb_jump_tag(throw)");
- rb_jump_tag(TAG_THROW);
- }
-
- rb_exc_raise(exc);
- }
- } else {
- return 0;
- }
-
- UNREACHABLE;
-}
-
-static int
-pending_exception_check1(thr_crit_bup, ptr)
- int thr_crit_bup;
- struct tcltkip *ptr;
-{
- volatile VALUE exc = rbtk_pending_exception;
-
- if (!NIL_P(exc) && rb_obj_is_kind_of(exc, rb_eException)) {
- DUMP1("find a pending exception");
-
- if (rbtk_eventloop_depth > 0
- || rbtk_internal_eventloop_handler > 0
- ) {
- return 1; /* pending */
- } else {
- rbtk_pending_exception = Qnil;
-
- if (ptr != (struct tcltkip *)NULL) {
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- }
-
- rb_thread_critical = thr_crit_bup;
-
- if (rb_obj_is_kind_of(exc, eTkCallbackRetry)) {
- DUMP1("pending_exception_check1: call rb_jump_tag(retry)");
- rb_jump_tag(TAG_RETRY);
- } else if (rb_obj_is_kind_of(exc, eTkCallbackRedo)) {
- DUMP1("pending_exception_check1: call rb_jump_tag(redo)");
- rb_jump_tag(TAG_REDO);
- } else if (rb_obj_is_kind_of(exc, eTkCallbackThrow)) {
- DUMP1("pending_exception_check1: call rb_jump_tag(throw)");
- rb_jump_tag(TAG_THROW);
- }
- rb_exc_raise(exc);
- }
- } else {
- return 0;
- }
-
- UNREACHABLE;
-}
-
-
-/* call original 'exit' command */
-static void
-call_original_exit(ptr, state)
- struct tcltkip *ptr;
- int state;
-{
- int thr_crit_bup;
- Tcl_CmdInfo *info;
-#if TCL_MAJOR_VERSION >= 8
- Tcl_Obj *cmd_obj;
- Tcl_Obj *state_obj;
-#endif
- DUMP1("original_exit is called");
-
- if (!(ptr->has_orig_exit)) return;
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- Tcl_ResetResult(ptr->ip);
-
- info = &(ptr->orig_exit_info);
-
- /* memory allocation for arguments of this command */
-#if TCL_MAJOR_VERSION >= 8
- state_obj = Tcl_NewIntObj(state);
- Tcl_IncrRefCount(state_obj);
-
- if (info->isNativeObjectProc) {
- Tcl_Obj **argv;
-#define USE_RUBY_ALLOC 0
-#if USE_RUBY_ALLOC
- argv = (Tcl_Obj **)ALLOC_N(Tcl_Obj *, 3);
-#else /* not USE_RUBY_ALLOC */
- argv = RbTk_ALLOC_N(Tcl_Obj *, 3);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)argv); /* XXXXXXXX */
-#endif
-#endif
- cmd_obj = Tcl_NewStringObj("exit", 4);
- Tcl_IncrRefCount(cmd_obj);
-
- argv[0] = cmd_obj;
- argv[1] = state_obj;
- argv[2] = (Tcl_Obj *)NULL;
-
- ptr->return_value
- = (*(info->objProc))(info->objClientData, ptr->ip, 2, argv);
-
- Tcl_DecrRefCount(cmd_obj);
-
-#if USE_RUBY_ALLOC
- xfree(argv);
-#else /* not USE_RUBY_ALLOC */
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)argv, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)argv); /* XXXXXXXX */
-#else
- /* free(argv); */
- ckfree((char*)argv);
-#endif
-#endif
-#endif
-#undef USE_RUBY_ALLOC
-
- } else {
- /* string interface */
- CONST84 char **argv;
-#define USE_RUBY_ALLOC 0
-#if USE_RUBY_ALLOC
- argv = ALLOC_N(char *, 3); /* XXXXXXXXXX */
-#else /* not USE_RUBY_ALLOC */
- argv = RbTk_ALLOC_N(CONST84 char *, 3);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)argv); /* XXXXXXXX */
-#endif
-#endif
- argv[0] = (char *)"exit";
- /* argv[1] = Tcl_GetString(state_obj); */
- argv[1] = Tcl_GetStringFromObj(state_obj, (int*)NULL);
- argv[2] = (char *)NULL;
-
- ptr->return_value = (*(info->proc))(info->clientData, ptr->ip, 2, argv);
-
-#if USE_RUBY_ALLOC
- xfree(argv);
-#else /* not USE_RUBY_ALLOC */
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)argv, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)argv); /* XXXXXXXX */
-#else
- /* free(argv); */
- ckfree((char*)argv);
-#endif
-#endif
-#endif
-#undef USE_RUBY_ALLOC
- }
-
- Tcl_DecrRefCount(state_obj);
-
-#else /* TCL_MAJOR_VERSION < 8 */
- {
- /* string interface */
- char **argv;
-#define USE_RUBY_ALLOC 0
-#if USE_RUBY_ALLOC
- argv = (char **)ALLOC_N(char *, 3);
-#else /* not USE_RUBY_ALLOC */
- argv = RbTk_ALLOC_N(char *, 3);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)argv); /* XXXXXXXX */
-#endif
-#endif
- argv[0] = "exit";
- argv[1] = RSTRING_PTR(rb_fix2str(INT2NUM(state), 10));
- argv[2] = (char *)NULL;
-
- ptr->return_value = (*(info->proc))(info->clientData, ptr->ip,
- 2, argv);
-
-#if USE_RUBY_ALLOC
- xfree(argv);
-#else /* not USE_RUBY_ALLOC */
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)argv, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)argv); /* XXXXXXXX */
-#else
- /* free(argv); */
- ckfree(argv);
-#endif
-#endif
-#endif
-#undef USE_RUBY_ALLOC
- }
-#endif
- DUMP1("complete original_exit");
-
- rb_thread_critical = thr_crit_bup;
-}
-
-/* Tk_ThreadTimer */
-static Tcl_TimerToken timer_token = (Tcl_TimerToken)NULL;
-
-/* timer callback */
-static void _timer_for_tcl _((ClientData));
-static void
-_timer_for_tcl(clientData)
- ClientData clientData;
-{
- int thr_crit_bup;
-
- /* struct invoke_queue *q, *tmp; */
- /* VALUE thread; */
-
- DUMP1("call _timer_for_tcl");
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- Tcl_DeleteTimerHandler(timer_token);
-
- run_timer_flag = 1;
-
- if (timer_tick > 0) {
- timer_token = Tcl_CreateTimerHandler(timer_tick, _timer_for_tcl,
- (ClientData)0);
- } else {
- timer_token = (Tcl_TimerToken)NULL;
- }
-
- rb_thread_critical = thr_crit_bup;
-
- /* rb_thread_schedule(); */
- /* tick_counter += event_loop_max; */
-}
-
-#ifdef RUBY_USE_NATIVE_THREAD
-#if USE_TOGGLE_WINDOW_MODE_FOR_IDLE
-static int
-toggle_eventloop_window_mode_for_idle(void)
-{
- if (window_event_mode & TCL_IDLE_EVENTS) {
- /* idle -> event */
- window_event_mode |= TCL_WINDOW_EVENTS;
- window_event_mode &= ~TCL_IDLE_EVENTS;
- return 1;
- } else {
- /* event -> idle */
- window_event_mode |= TCL_IDLE_EVENTS;
- window_event_mode &= ~TCL_WINDOW_EVENTS;
- return 0;
- }
-}
-#endif
-#endif
-
-static VALUE
-set_eventloop_window_mode(self, mode)
- VALUE self;
- VALUE mode;
-{
-
- if (RTEST(mode)) {
- window_event_mode = ~0;
- } else {
- window_event_mode = ~TCL_WINDOW_EVENTS;
- }
-
- return mode;
-}
-
-static VALUE
-get_eventloop_window_mode(self)
- VALUE self;
-{
- if ( ~window_event_mode ) {
- return Qfalse;
- } else {
- return Qtrue;
- }
-}
-
-static VALUE
-set_eventloop_tick(self, tick)
- VALUE self;
- VALUE tick;
-{
- int ttick = NUM2INT(tick);
- int thr_crit_bup;
-
-
- if (ttick < 0) {
- rb_raise(rb_eArgError,
- "timer-tick parameter must be 0 or positive number");
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* delete old timer callback */
- Tcl_DeleteTimerHandler(timer_token);
-
- timer_tick = req_timer_tick = ttick;
- if (timer_tick > 0) {
- /* start timer callback */
- timer_token = Tcl_CreateTimerHandler(timer_tick, _timer_for_tcl,
- (ClientData)0);
- } else {
- timer_token = (Tcl_TimerToken)NULL;
- }
-
- rb_thread_critical = thr_crit_bup;
-
- return tick;
-}
-
-static VALUE
-get_eventloop_tick(self)
- VALUE self;
-{
- return INT2NUM(timer_tick);
-}
-
-static VALUE
-ip_set_eventloop_tick(self, tick)
- VALUE self;
- VALUE tick;
-{
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return get_eventloop_tick(self);
- }
-
- if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
- /* slave IP */
- return get_eventloop_tick(self);
- }
- return set_eventloop_tick(self, tick);
-}
-
-static VALUE
-ip_get_eventloop_tick(self)
- VALUE self;
-{
- return get_eventloop_tick(self);
-}
-
-static VALUE
-set_no_event_wait(self, wait)
- VALUE self;
- VALUE wait;
-{
- int t_wait = NUM2INT(wait);
-
-
- if (t_wait <= 0) {
- rb_raise(rb_eArgError,
- "no_event_wait parameter must be positive number");
- }
-
- no_event_wait = t_wait;
-
- return wait;
-}
-
-static VALUE
-get_no_event_wait(self)
- VALUE self;
-{
- return INT2NUM(no_event_wait);
-}
-
-static VALUE
-ip_set_no_event_wait(self, wait)
- VALUE self;
- VALUE wait;
-{
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return get_no_event_wait(self);
- }
-
- if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
- /* slave IP */
- return get_no_event_wait(self);
- }
- return set_no_event_wait(self, wait);
-}
-
-static VALUE
-ip_get_no_event_wait(self)
- VALUE self;
-{
- return get_no_event_wait(self);
-}
-
-static VALUE
-set_eventloop_weight(self, loop_max, no_event)
- VALUE self;
- VALUE loop_max;
- VALUE no_event;
-{
- int lpmax = NUM2INT(loop_max);
- int no_ev = NUM2INT(no_event);
-
-
- if (lpmax <= 0 || no_ev <= 0) {
- rb_raise(rb_eArgError, "weight parameters must be positive numbers");
- }
-
- event_loop_max = lpmax;
- no_event_tick = no_ev;
-
- return rb_ary_new3(2, loop_max, no_event);
-}
-
-static VALUE
-get_eventloop_weight(self)
- VALUE self;
-{
- return rb_ary_new3(2, INT2NUM(event_loop_max), INT2NUM(no_event_tick));
-}
-
-static VALUE
-ip_set_eventloop_weight(self, loop_max, no_event)
- VALUE self;
- VALUE loop_max;
- VALUE no_event;
-{
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return get_eventloop_weight(self);
- }
-
- if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
- /* slave IP */
- return get_eventloop_weight(self);
- }
- return set_eventloop_weight(self, loop_max, no_event);
-}
-
-static VALUE
-ip_get_eventloop_weight(self)
- VALUE self;
-{
- return get_eventloop_weight(self);
-}
-
-static VALUE
-set_max_block_time(self, time)
- VALUE self;
- VALUE time;
-{
- struct Tcl_Time tcl_time;
- VALUE divmod;
-
- switch(TYPE(time)) {
- case T_FIXNUM:
- case T_BIGNUM:
- /* time is micro-second value */
- divmod = rb_funcall(time, rb_intern("divmod"), 1, LONG2NUM(1000000));
- tcl_time.sec = NUM2LONG(RARRAY_AREF(divmod, 0));
- tcl_time.usec = NUM2LONG(RARRAY_AREF(divmod, 1));
- break;
-
- case T_FLOAT:
- /* time is second value */
- divmod = rb_funcall(time, rb_intern("divmod"), 1, INT2FIX(1));
- tcl_time.sec = NUM2LONG(RARRAY_AREF(divmod, 0));
- tcl_time.usec = (long)(NUM2DBL(RARRAY_AREF(divmod, 1)) * 1000000);
- break;
-
- default:
- rb_raise(rb_eArgError, "invalid value for time: '%+"PRIsVALUE"'", time);
- }
-
- Tcl_SetMaxBlockTime(&tcl_time);
-
- return Qnil;
-}
-
-static VALUE
-lib_evloop_thread_p(self)
- VALUE self;
-{
- if (NIL_P(eventloop_thread)) {
- return Qnil; /* no eventloop */
- } else if (rb_thread_current() == eventloop_thread) {
- return Qtrue; /* is eventloop */
- } else {
- return Qfalse; /* not eventloop */
- }
-}
-
-static VALUE
-lib_evloop_abort_on_exc(self)
- VALUE self;
-{
- if (event_loop_abort_on_exc > 0) {
- return Qtrue;
- } else if (event_loop_abort_on_exc == 0) {
- return Qfalse;
- } else {
- return Qnil;
- }
-}
-
-static VALUE
-ip_evloop_abort_on_exc(self)
- VALUE self;
-{
- return lib_evloop_abort_on_exc(self);
-}
-
-static VALUE
-lib_evloop_abort_on_exc_set(self, val)
- VALUE self, val;
-{
- if (RTEST(val)) {
- event_loop_abort_on_exc = 1;
- } else if (NIL_P(val)) {
- event_loop_abort_on_exc = -1;
- } else {
- event_loop_abort_on_exc = 0;
- }
- return lib_evloop_abort_on_exc(self);
-}
-
-static VALUE
-ip_evloop_abort_on_exc_set(self, val)
- VALUE self, val;
-{
- struct tcltkip *ptr = get_ip(self);
-
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return lib_evloop_abort_on_exc(self);
- }
-
- if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
- /* slave IP */
- return lib_evloop_abort_on_exc(self);
- }
- return lib_evloop_abort_on_exc_set(self, val);
-}
-
-static VALUE
-lib_num_of_mainwindows_core(self, argc, argv)
- VALUE self;
- int argc; /* dummy */
- VALUE *argv; /* dummy */
-{
- if (tk_stubs_init_p()) {
- return INT2FIX(Tk_GetNumMainWindows());
- } else {
- return INT2FIX(0);
- }
-}
-
-static VALUE
-lib_num_of_mainwindows(self)
- VALUE self;
-{
-#ifdef RUBY_USE_NATIVE_THREAD /* Ruby 1.9+ !!! */
- return tk_funcall(lib_num_of_mainwindows_core, 0, (VALUE*)NULL, self);
-#else
- return lib_num_of_mainwindows_core(self, 0, (VALUE*)NULL);
-#endif
-}
-
-void
-rbtk_EventSetupProc(ClientData clientData, int flag)
-{
- Tcl_Time tcl_time;
- tcl_time.sec = 0;
- tcl_time.usec = 1000L * (long)no_event_tick;
- Tcl_SetMaxBlockTime(&tcl_time);
-}
-
-void
-rbtk_EventCheckProc(ClientData clientData, int flag)
-{
- rb_thread_schedule();
-}
-
-
-#ifdef RUBY_USE_NATIVE_THREAD /* Ruby 1.9+ !!! */
-static VALUE
-#ifdef HAVE_PROTOTYPES
-call_DoOneEvent_core(VALUE flag_val)
-#else
-call_DoOneEvent_core(flag_val)
- VALUE flag_val;
-#endif
-{
- int flag;
-
- flag = FIX2INT(flag_val);
- if (Tcl_DoOneEvent(flag)) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-
-static VALUE
-#ifdef HAVE_PROTOTYPES
-call_DoOneEvent(VALUE flag_val)
-#else
-call_DoOneEvent(flag_val)
- VALUE flag_val;
-#endif
-{
- return tk_funcall(call_DoOneEvent_core, 0, (VALUE*)NULL, flag_val);
-}
-
-#else /* Ruby 1.8- */
-static VALUE
-#ifdef HAVE_PROTOTYPES
-call_DoOneEvent(VALUE flag_val)
-#else
-call_DoOneEvent(flag_val)
- VALUE flag_val;
-#endif
-{
- int flag;
-
- flag = FIX2INT(flag_val);
- if (Tcl_DoOneEvent(flag)) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-#endif
-
-
-#if 0
-static VALUE
-#ifdef HAVE_PROTOTYPES
-eventloop_sleep(VALUE dummy)
-#else
-eventloop_sleep(dummy)
- VALUE dummy;
-#endif
-{
- struct timeval t;
-
- if (no_event_wait <= 0) {
- return Qnil;
- }
-
- t.tv_sec = 0;
- t.tv_usec = (int)(no_event_wait*1000.0);
-
-#ifdef HAVE_NATIVETHREAD
-#ifndef RUBY_USE_NATIVE_THREAD
- if (!ruby_native_thread_p()) {
- rb_bug("cross-thread violation on eventloop_sleep()");
- }
-#endif
-#endif
-
- DUMP2("eventloop_sleep: rb_thread_wait_for() at thread : %"PRIxVALUE, rb_thread_current());
- rb_thread_wait_for(t);
- DUMP2("eventloop_sleep: finish at thread : %"PRIxVALUE, rb_thread_current());
-
-#ifdef HAVE_NATIVETHREAD
-#ifndef RUBY_USE_NATIVE_THREAD
- if (!ruby_native_thread_p()) {
- rb_bug("cross-thread violation on eventloop_sleep()");
- }
-#endif
-#endif
-
- return Qnil;
-}
-#endif
-
-#define USE_EVLOOP_THREAD_ALONE_CHECK_FLAG 0
-
-#if USE_EVLOOP_THREAD_ALONE_CHECK_FLAG
-static int
-get_thread_alone_check_flag(void)
-{
-#ifdef RUBY_USE_NATIVE_THREAD
- return 0;
-#else
- set_tcltk_version();
-
- if (tcltk_version.major < 8) {
- /* Tcl/Tk 7.x */
- return 1;
- } else if (tcltk_version.major == 8) {
- if (tcltk_version.minor < 5) {
- /* Tcl/Tk 8.0 - 8.4 */
- return 1;
- } else if (tcltk_version.minor == 5) {
- if (tcltk_version.type < TCL_FINAL_RELEASE) {
- /* Tcl/Tk 8.5a? - 8.5b? */
- return 1;
- } else {
- /* Tcl/Tk 8.5.x */
- return 0;
- }
- } else {
- /* Tcl/Tk 8.6 - 8.9 ?? */
- return 0;
- }
- } else {
- /* Tcl/Tk 9+ ?? */
- return 0;
- }
-#endif
-}
-#endif
-
-#define TRAP_CHECK() do { \
- if (trap_check(check_var) == 0) return 0; \
-} while (0)
-
-static int
-trap_check(int *check_var)
-{
- DUMP1("trap check");
-
-#ifdef RUBY_VM
- if (rb_thread_check_trap_pending()) {
- if (check_var != (int*)NULL) {
- /* wait command */
- return 0;
- }
- else {
- rb_thread_check_ints();
- }
- }
-#else
- if (rb_trap_pending) {
- run_timer_flag = 0;
- if (rb_prohibit_interrupt || check_var != (int*)NULL) {
- /* pending or on wait command */
- return 0;
- } else {
- rb_trap_exec();
- }
- }
-#endif
-
- return 1;
-}
-
-static int
-check_eventloop_interp(void)
-{
- DUMP1("check eventloop_interp");
- if (eventloop_interp != (Tcl_Interp*)NULL
- && Tcl_InterpDeleted(eventloop_interp)) {
- DUMP2("eventloop_interp(%p) was deleted", eventloop_interp);
- return 1;
- }
-
- return 0;
-}
-
-static int
-lib_eventloop_core(check_root, update_flag, check_var, interp)
- int check_root;
- int update_flag;
- int *check_var;
- Tcl_Interp *interp;
-{
- volatile VALUE current = eventloop_thread;
- int found_event = 1;
- int event_flag;
-#if 0
- struct timeval t;
-#endif
- int thr_crit_bup;
- int status;
- int depth = rbtk_eventloop_depth;
-#if USE_EVLOOP_THREAD_ALONE_CHECK_FLAG
- int thread_alone_check_flag = 1;
-#else
- enum {thread_alone_check_flag = 1};
-#endif
-
- if (update_flag) DUMP1("update loop start!!");
-
-#if 0
- t.tv_sec = 0;
- t.tv_usec = 1000 * no_event_wait;
-#endif
-
- Tcl_DeleteTimerHandler(timer_token);
- run_timer_flag = 0;
- if (timer_tick > 0) {
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
- timer_token = Tcl_CreateTimerHandler(timer_tick, _timer_for_tcl,
- (ClientData)0);
- rb_thread_critical = thr_crit_bup;
- } else {
- timer_token = (Tcl_TimerToken)NULL;
- }
-
-#if USE_EVLOOP_THREAD_ALONE_CHECK_FLAG
- /* version check */
- thread_alone_check_flag = get_thread_alone_check_flag();
-#endif
-
- for(;;) {
- if (check_eventloop_interp()) return 0;
-
- if (thread_alone_check_flag && rb_thread_alone()) {
- DUMP1("no other thread");
- event_loop_wait_event = 0;
-
- if (update_flag) {
- event_flag = update_flag;
- /* event_flag = update_flag | TCL_DONT_WAIT; */ /* for safety */
- } else {
- event_flag = TCL_ALL_EVENTS;
- /* event_flag = TCL_ALL_EVENTS | TCL_DONT_WAIT; */
- }
-
- if (timer_tick == 0 && update_flag == 0) {
- timer_tick = NO_THREAD_INTERRUPT_TIME;
- timer_token = Tcl_CreateTimerHandler(timer_tick,
- _timer_for_tcl,
- (ClientData)0);
- }
-
- if (check_var != (int *)NULL) {
- if (*check_var || !found_event) {
- return found_event;
- }
- if (interp != (Tcl_Interp*)NULL
- && Tcl_InterpDeleted(interp)) {
- /* IP for check_var is deleted */
- return 0;
- }
- }
-
- /* found_event = Tcl_DoOneEvent(event_flag); */
- found_event = RTEST(rb_protect(call_DoOneEvent,
- INT2FIX(event_flag), &status));
- if (status) {
- switch (status) {
- case TAG_RAISE:
- if (NIL_P(rb_errinfo())) {
- rbtk_pending_exception
- = rb_exc_new2(rb_eException, "unknown exception");
- } else {
- rbtk_pending_exception = rb_errinfo();
-
- if (!NIL_P(rbtk_pending_exception)) {
- if (rbtk_eventloop_depth == 0) {
- VALUE exc = rbtk_pending_exception;
- rbtk_pending_exception = Qnil;
- rb_exc_raise(exc);
- } else {
- return 0;
- }
- }
- }
- break;
-
- case TAG_FATAL:
- if (NIL_P(rb_errinfo())) {
- rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
- } else {
- rb_exc_raise(rb_errinfo());
- }
- }
- }
-
- if (depth != rbtk_eventloop_depth) {
- DUMP2("DoOneEvent(1) abnormal exit!! %d",
- rbtk_eventloop_depth);
- }
-
- if (check_var != (int*)NULL && !NIL_P(rbtk_pending_exception)) {
- DUMP1("exception on wait");
- return 0;
- }
-
- if (pending_exception_check0()) {
- /* pending -> upper level */
- return 0;
- }
-
- if (update_flag != 0) {
- if (found_event) {
- DUMP1("next update loop");
- continue;
- } else {
- DUMP1("update complete");
- return 0;
- }
- }
-
- TRAP_CHECK();
- if (check_eventloop_interp()) return 0;
-
- DUMP1("check Root Widget");
- if (check_root && tk_stubs_init_p() && Tk_GetNumMainWindows() == 0) {
- run_timer_flag = 0;
- TRAP_CHECK();
- return 1;
- }
-
- if (loop_counter++ > 30000) {
- /* fprintf(stderr, "loop_counter > 30000\n"); */
- loop_counter = 0;
- }
-
- } else {
- int tick_counter;
-
- DUMP1("there are other threads");
- event_loop_wait_event = 1;
-
- found_event = 1;
-
- if (update_flag) {
- event_flag = update_flag; /* for safety */
- /* event_flag = update_flag | TCL_DONT_WAIT; */ /* for safety */
- } else {
- event_flag = TCL_ALL_EVENTS;
- /* event_flag = TCL_ALL_EVENTS | TCL_DONT_WAIT; */
- }
-
- timer_tick = req_timer_tick;
- tick_counter = 0;
- while(tick_counter < event_loop_max) {
- if (check_var != (int *)NULL) {
- if (*check_var || !found_event) {
- return found_event;
- }
- if (interp != (Tcl_Interp*)NULL
- && Tcl_InterpDeleted(interp)) {
- /* IP for check_var is deleted */
- return 0;
- }
- }
-
- if (NIL_P(eventloop_thread) || current == eventloop_thread) {
- int st;
- int status;
-
-#ifdef RUBY_USE_NATIVE_THREAD
- if (update_flag) {
- st = RTEST(rb_protect(call_DoOneEvent,
- INT2FIX(event_flag), &status));
- } else {
- st = RTEST(rb_protect(call_DoOneEvent,
- INT2FIX(event_flag & window_event_mode),
- &status));
-#if USE_TOGGLE_WINDOW_MODE_FOR_IDLE
- if (!st) {
- if (toggle_eventloop_window_mode_for_idle()) {
- /* idle-mode -> event-mode*/
- tick_counter = event_loop_max;
- } else {
- /* event-mode -> idle-mode */
- tick_counter = 0;
- }
- }
-#endif
- }
-#else
- /* st = Tcl_DoOneEvent(event_flag); */
- st = RTEST(rb_protect(call_DoOneEvent,
- INT2FIX(event_flag), &status));
-#endif
-
-#if CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE
- if (have_rb_thread_waiting_for_value) {
- have_rb_thread_waiting_for_value = 0;
- rb_thread_schedule();
- }
-#endif
-
- if (status) {
- switch (status) {
- case TAG_RAISE:
- if (NIL_P(rb_errinfo())) {
- rbtk_pending_exception
- = rb_exc_new2(rb_eException,
- "unknown exception");
- } else {
- rbtk_pending_exception = rb_errinfo();
-
- if (!NIL_P(rbtk_pending_exception)) {
- if (rbtk_eventloop_depth == 0) {
- VALUE exc = rbtk_pending_exception;
- rbtk_pending_exception = Qnil;
- rb_exc_raise(exc);
- } else {
- return 0;
- }
- }
- }
- break;
-
- case TAG_FATAL:
- if (NIL_P(rb_errinfo())) {
- rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
- } else {
- rb_exc_raise(rb_errinfo());
- }
- }
- }
-
- if (depth != rbtk_eventloop_depth) {
- DUMP2("DoOneEvent(2) abnormal exit!! %d",
- rbtk_eventloop_depth);
- return 0;
- }
-
- TRAP_CHECK();
-
- if (check_var != (int*)NULL
- && !NIL_P(rbtk_pending_exception)) {
- DUMP1("exception on wait");
- return 0;
- }
-
- if (pending_exception_check0()) {
- /* pending -> upper level */
- return 0;
- }
-
- if (st) {
- tick_counter++;
- } else {
- if (update_flag != 0) {
- DUMP1("update complete");
- return 0;
- }
-
- tick_counter += no_event_tick;
-
-#if 0
- /* rb_thread_wait_for(t); */
- rb_protect(eventloop_sleep, Qnil, &status);
-
- if (status) {
- switch (status) {
- case TAG_RAISE:
- if (NIL_P(rb_errinfo())) {
- rbtk_pending_exception
- = rb_exc_new2(rb_eException,
- "unknown exception");
- } else {
- rbtk_pending_exception = rb_errinfo();
-
- if (!NIL_P(rbtk_pending_exception)) {
- if (rbtk_eventloop_depth == 0) {
- VALUE exc = rbtk_pending_exception;
- rbtk_pending_exception = Qnil;
- rb_exc_raise(exc);
- } else {
- return 0;
- }
- }
- }
- break;
-
- case TAG_FATAL:
- if (NIL_P(rb_errinfo())) {
- rb_exc_raise(rb_exc_new2(rb_eFatal,
- "FATAL"));
- } else {
- rb_exc_raise(rb_errinfo());
- }
- }
- }
-#endif
- }
-
- } else {
- DUMP2("sleep eventloop %"PRIxVALUE, current);
- DUMP2("eventloop thread is %"PRIxVALUE, eventloop_thread);
- /* rb_thread_stop(); */
- rb_thread_sleep_forever();
- }
-
- if (!NIL_P(watchdog_thread) && eventloop_thread != current) {
- return 1;
- }
-
- TRAP_CHECK();
- if (check_eventloop_interp()) return 0;
-
- DUMP1("check Root Widget");
- if (check_root && tk_stubs_init_p() && Tk_GetNumMainWindows() == 0) {
- run_timer_flag = 0;
- TRAP_CHECK();
- return 1;
- }
-
- if (loop_counter++ > 30000) {
- /* fprintf(stderr, "loop_counter > 30000\n"); */
- loop_counter = 0;
- }
-
- if (run_timer_flag) {
- /*
- DUMP1("timer interrupt");
- run_timer_flag = 0;
- */
- break; /* switch to other thread */
- }
- }
-
- DUMP1("thread scheduling");
- rb_thread_schedule();
- }
-
- DUMP1("check interrupts");
-#if defined(RUBY_USE_NATIVE_THREAD) || defined(RUBY_VM)
- if (update_flag == 0) rb_thread_check_ints();
-#else
- if (update_flag == 0) CHECK_INTS;
-#endif
-
- }
- return 1;
-}
-
-
-struct evloop_params {
- int check_root;
- int update_flag;
- int *check_var;
- Tcl_Interp *interp;
- int thr_crit_bup;
-};
-
-VALUE
-lib_eventloop_main_core(args)
- VALUE args;
-{
- struct evloop_params *params = (struct evloop_params *)args;
-
- check_rootwidget_flag = params->check_root;
-
- Tcl_CreateEventSource(rbtk_EventSetupProc, rbtk_EventCheckProc, (ClientData)args);
-
- if (lib_eventloop_core(params->check_root,
- params->update_flag,
- params->check_var,
- params->interp)) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-
-VALUE
-lib_eventloop_main(args)
- VALUE args;
-{
- return lib_eventloop_main_core(args);
-
-#if 0
- volatile VALUE ret;
- int status = 0;
-
- ret = rb_protect(lib_eventloop_main_core, args, &status);
-
- switch (status) {
- case TAG_RAISE:
- if (NIL_P(rb_errinfo())) {
- rbtk_pending_exception
- = rb_exc_new2(rb_eException, "unknown exception");
- } else {
- rbtk_pending_exception = rb_errinfo();
- }
- return Qnil;
-
- case TAG_FATAL:
- if (NIL_P(rb_errinfo())) {
- rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
- } else {
- rbtk_pending_exception = rb_errinfo();
- }
- return Qnil;
- }
-
- return ret;
-#endif
-}
-
-VALUE
-lib_eventloop_ensure(args)
- VALUE args;
-{
- struct evloop_params *ptr = (struct evloop_params *)args;
- volatile VALUE current_evloop = rb_thread_current();
-
- Tcl_DeleteEventSource(rbtk_EventSetupProc, rbtk_EventCheckProc, (ClientData)args);
-
- DUMP2("eventloop_ensure: current-thread : %"PRIxVALUE, current_evloop);
- DUMP2("eventloop_ensure: eventloop-thread : %"PRIxVALUE, eventloop_thread);
- if (eventloop_thread != current_evloop) {
- DUMP2("finish eventloop %"PRIxVALUE" (NOT current eventloop)", current_evloop);
-
- rb_thread_critical = ptr->thr_crit_bup;
-
- xfree(ptr);
- /* ckfree((char*)ptr); */
-
- return Qnil;
- }
-
- while((eventloop_thread = rb_ary_pop(eventloop_stack))) {
- DUMP2("eventloop-ensure: new eventloop-thread -> %"PRIxVALUE,
- eventloop_thread);
-
- if (eventloop_thread == current_evloop) {
- rbtk_eventloop_depth--;
- DUMP2("eventloop %"PRIxVALUE" : back from recursive call", current_evloop);
- break;
- }
-
- if (NIL_P(eventloop_thread)) {
- Tcl_DeleteTimerHandler(timer_token);
- timer_token = (Tcl_TimerToken)NULL;
-
- break;
- }
-
- if (RTEST(rb_thread_alive_p(eventloop_thread))) {
- DUMP2("eventloop-enshure: wake up parent %"PRIxVALUE, eventloop_thread);
- rb_thread_wakeup(eventloop_thread);
-
- break;
- }
- }
-
-#ifdef RUBY_USE_NATIVE_THREAD
- if (NIL_P(eventloop_thread)) {
- tk_eventloop_thread_id = (Tcl_ThreadId) 0;
- }
-#endif
-
- rb_thread_critical = ptr->thr_crit_bup;
-
- xfree(ptr);
- /* ckfree((char*)ptr);*/
-
- DUMP2("finish current eventloop %"PRIxVALUE, current_evloop);
- return Qnil;
-}
-
-static VALUE
-lib_eventloop_launcher(check_root, update_flag, check_var, interp)
- int check_root;
- int update_flag;
- int *check_var;
- Tcl_Interp *interp;
-{
- volatile VALUE parent_evloop = eventloop_thread;
- struct evloop_params *args = ALLOC(struct evloop_params);
- /* struct evloop_params *args = RbTk_ALLOC_N(struct evloop_params, 1); */
-
- tcl_stubs_check();
-
- eventloop_thread = rb_thread_current();
-#ifdef RUBY_USE_NATIVE_THREAD
- tk_eventloop_thread_id = Tcl_GetCurrentThread();
-#endif
-
- if (parent_evloop == eventloop_thread) {
- DUMP2("eventloop: recursive call on %"PRIxVALUE, parent_evloop);
- rbtk_eventloop_depth++;
- }
-
- if (!NIL_P(parent_evloop) && parent_evloop != eventloop_thread) {
- DUMP2("wait for stop of parent_evloop %"PRIxVALUE, parent_evloop);
- while(!RTEST(rb_funcall(parent_evloop, ID_stop_p, 0))) {
- DUMP2("parent_evloop %"PRIxVALUE" doesn't stop", parent_evloop);
- rb_thread_run(parent_evloop);
- }
- DUMP1("succeed to stop parent");
- }
-
- rb_ary_push(eventloop_stack, parent_evloop);
-
- DUMP3("tcltklib: eventloop-thread : %"PRIxVALUE" -> %"PRIxVALUE"\n",
- parent_evloop, eventloop_thread);
-
- args->check_root = check_root;
- args->update_flag = update_flag;
- args->check_var = check_var;
- args->interp = interp;
- args->thr_crit_bup = rb_thread_critical;
-
- rb_thread_critical = Qfalse;
-
-#if 0
- return rb_ensure(lib_eventloop_main, (VALUE)args,
- lib_eventloop_ensure, (VALUE)args);
-#endif
- return rb_ensure(lib_eventloop_main_core, (VALUE)args,
- lib_eventloop_ensure, (VALUE)args);
-}
-
-/* execute Tk_MainLoop */
-static VALUE
-lib_mainloop(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- VALUE check_rootwidget;
-
- if (rb_scan_args(argc, argv, "01", &check_rootwidget) == 0) {
- check_rootwidget = Qtrue;
- } else if (RTEST(check_rootwidget)) {
- check_rootwidget = Qtrue;
- } else {
- check_rootwidget = Qfalse;
- }
-
- return lib_eventloop_launcher(RTEST(check_rootwidget), 0,
- (int*)NULL, (Tcl_Interp*)NULL);
-}
-
-static VALUE
-ip_mainloop(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- volatile VALUE ret;
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return Qnil;
- }
-
- if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
- /* slave IP */
- return Qnil;
- }
-
- eventloop_interp = ptr->ip;
- ret = lib_mainloop(argc, argv, self);
- eventloop_interp = (Tcl_Interp*)NULL;
- return ret;
-}
-
-
-static VALUE
-watchdog_evloop_launcher(check_rootwidget)
- VALUE check_rootwidget;
-{
- return lib_eventloop_launcher(RTEST(check_rootwidget), 0,
- (int*)NULL, (Tcl_Interp*)NULL);
-}
-
-#define EVLOOP_WAKEUP_CHANCE 3
-
-static VALUE
-lib_watchdog_core(check_rootwidget)
- VALUE check_rootwidget;
-{
- VALUE evloop;
- int prev_val = -1;
- int chance = 0;
- int check = RTEST(check_rootwidget);
- struct timeval t0, t1;
-
- t0.tv_sec = 0;
- t0.tv_usec = (long)((NO_THREAD_INTERRUPT_TIME)*1000.0);
- t1.tv_sec = 0;
- t1.tv_usec = (long)((WATCHDOG_INTERVAL)*1000.0);
-
- /* check other watchdog thread */
- if (!NIL_P(watchdog_thread)) {
- if (RTEST(rb_funcall(watchdog_thread, ID_stop_p, 0))) {
- rb_funcall(watchdog_thread, ID_kill, 0);
- } else {
- return Qnil;
- }
- }
- watchdog_thread = rb_thread_current();
-
- /* watchdog start */
- do {
- if (NIL_P(eventloop_thread)
- || (loop_counter == prev_val && chance >= EVLOOP_WAKEUP_CHANCE)) {
- /* start new eventloop thread */
- DUMP2("eventloop thread %"PRIxVALUE" is sleeping or dead",
- eventloop_thread);
- evloop = rb_thread_create(watchdog_evloop_launcher,
- (void*)&check_rootwidget);
- DUMP2("create new eventloop thread %"PRIxVALUE, evloop);
- loop_counter = -1;
- chance = 0;
- rb_thread_run(evloop);
- } else {
- prev_val = loop_counter;
- if (RTEST(rb_funcall(eventloop_thread, ID_stop_p, 0))) {
- ++chance;
- } else {
- chance = 0;
- }
- if (event_loop_wait_event) {
- rb_thread_wait_for(t0);
- } else {
- rb_thread_wait_for(t1);
- }
- /* rb_thread_schedule(); */
- }
- } while(!check || !tk_stubs_init_p() || Tk_GetNumMainWindows() != 0);
-
- return Qnil;
-}
-
-VALUE
-lib_watchdog_ensure(arg)
- VALUE arg;
-{
- eventloop_thread = Qnil; /* stop eventloops */
-#ifdef RUBY_USE_NATIVE_THREAD
- tk_eventloop_thread_id = (Tcl_ThreadId) 0;
-#endif
- return Qnil;
-}
-
-static VALUE
-lib_mainloop_watchdog(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- VALUE check_rootwidget;
-
-#ifdef RUBY_VM
- rb_raise(rb_eNotImpError,
- "eventloop_watchdog is not implemented on Ruby VM.");
-#endif
-
- if (rb_scan_args(argc, argv, "01", &check_rootwidget) == 0) {
- check_rootwidget = Qtrue;
- } else if (RTEST(check_rootwidget)) {
- check_rootwidget = Qtrue;
- } else {
- check_rootwidget = Qfalse;
- }
-
- return rb_ensure(lib_watchdog_core, check_rootwidget,
- lib_watchdog_ensure, Qnil);
-}
-
-static VALUE
-ip_mainloop_watchdog(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return Qnil;
- }
-
- if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
- /* slave IP */
- return Qnil;
- }
- return lib_mainloop_watchdog(argc, argv, self);
-}
-
-
-/* thread-safe(?) interaction between Ruby and Tk */
-struct thread_call_proc_arg {
- VALUE proc;
- int *done;
-};
-
-void
-_thread_call_proc_arg_mark(struct thread_call_proc_arg *q)
-{
- rb_gc_mark(q->proc);
-}
-
-static VALUE
-_thread_call_proc_core(arg)
- VALUE arg;
-{
- struct thread_call_proc_arg *q = (struct thread_call_proc_arg*)arg;
- return rb_funcall(q->proc, ID_call, 0);
-}
-
-static VALUE
-_thread_call_proc_ensure(arg)
- VALUE arg;
-{
- struct thread_call_proc_arg *q = (struct thread_call_proc_arg*)arg;
- *(q->done) = 1;
- return Qnil;
-}
-
-static VALUE
-_thread_call_proc(arg)
- VALUE arg;
-{
- struct thread_call_proc_arg *q = (struct thread_call_proc_arg*)arg;
-
- return rb_ensure(_thread_call_proc_core, (VALUE)q,
- _thread_call_proc_ensure, (VALUE)q);
-}
-
-static VALUE
-#ifdef HAVE_PROTOTYPES
-_thread_call_proc_value(VALUE th)
-#else
-_thread_call_proc_value(th)
- VALUE th;
-#endif
-{
- return rb_funcall(th, ID_value, 0);
-}
-
-static VALUE
-lib_thread_callback(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- struct thread_call_proc_arg *q;
- VALUE proc, th, ret;
- int status;
-
- if (rb_scan_args(argc, argv, "01", &proc) == 0) {
- proc = rb_block_proc();
- }
-
- q = (struct thread_call_proc_arg *)ALLOC(struct thread_call_proc_arg);
- /* q = RbTk_ALLOC_N(struct thread_call_proc_arg, 1); */
- q->proc = proc;
- q->done = (int*)ALLOC(int);
- /* q->done = RbTk_ALLOC_N(int, 1); */
- *(q->done) = 0;
-
- /* create call-proc thread */
- th = rb_thread_create(_thread_call_proc, (void*)q);
-
- rb_thread_schedule();
-
- /* start sub-eventloop */
- lib_eventloop_launcher(/* not check root-widget */0, 0,
- q->done, (Tcl_Interp*)NULL);
-
- if (RTEST(rb_thread_alive_p(th))) {
- rb_funcall(th, ID_kill, 0);
- ret = Qnil;
- } else {
- ret = rb_protect(_thread_call_proc_value, th, &status);
- }
-
- xfree(q->done);
- xfree(q);
- /* ckfree((char*)q->done); */
- /* ckfree((char*)q); */
-
- if (NIL_P(rbtk_pending_exception)) {
- /* return rb_errinfo(); */
- if (status) {
- rb_exc_raise(rb_errinfo());
- }
- } else {
- VALUE exc = rbtk_pending_exception;
- rbtk_pending_exception = Qnil;
- /* return exc; */
- rb_exc_raise(exc);
- }
-
- return ret;
-}
-
-
-/* do_one_event */
-static VALUE
-lib_do_one_event_core(argc, argv, self, is_ip)
- int argc;
- VALUE *argv;
- VALUE self;
- int is_ip;
-{
- VALUE vflags;
- int flags;
- int found_event;
-
- if (!NIL_P(eventloop_thread)) {
- rb_raise(rb_eRuntimeError, "eventloop is already running");
- }
-
- tcl_stubs_check();
-
- if (rb_scan_args(argc, argv, "01", &vflags) == 0) {
- flags = TCL_ALL_EVENTS | TCL_DONT_WAIT;
- } else {
- Check_Type(vflags, T_FIXNUM);
- flags = (int)FIX2LONG(vflags);
- }
-
- if (is_ip) {
- /* check IP */
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return Qfalse;
- }
-
- if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
- /* slave IP */
- flags |= TCL_DONT_WAIT;
- }
- }
-
- /* found_event = Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT); */
- found_event = Tcl_DoOneEvent(flags);
-
- if (pending_exception_check0()) {
- return Qfalse;
- }
-
- if (found_event) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-
-static VALUE
-lib_do_one_event(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- return lib_do_one_event_core(argc, argv, self, 0);
-}
-
-static VALUE
-ip_do_one_event(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- return lib_do_one_event_core(argc, argv, self, 0);
-}
-
-
-static void
-ip_set_exc_message(interp, exc)
- Tcl_Interp *interp;
- VALUE exc;
-{
- char *buf;
- Tcl_DString dstr;
- volatile VALUE msg;
- int thr_crit_bup;
-
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0)
- volatile VALUE enc;
- Tcl_Encoding encoding;
-#endif
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- msg = rb_funcallv(exc, ID_message, 0, 0);
- StringValue(msg);
-
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0)
- enc = rb_attr_get(exc, ID_at_enc);
- if (NIL_P(enc)) {
- enc = rb_attr_get(msg, ID_at_enc);
- }
- if (NIL_P(enc)) {
- encoding = (Tcl_Encoding)NULL;
- } else if (RB_TYPE_P(enc, T_STRING)) {
- /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
- encoding = Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(enc));
- } else {
- enc = rb_funcallv(enc, ID_to_s, 0, 0);
- /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
- encoding = Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(enc));
- }
-
- /* to avoid a garbled error message dialog */
- /* buf = ALLOC_N(char, (RSTRING(msg)->len)+1);*/
- /* memcpy(buf, RSTRING(msg)->ptr, RSTRING(msg)->len);*/
- /* buf[RSTRING(msg)->len] = 0; */
- buf = ALLOC_N(char, RSTRING_LENINT(msg)+1);
- /* buf = ckalloc(RSTRING_LENINT(msg)+1); */
- memcpy(buf, RSTRING_PTR(msg), RSTRING_LEN(msg));
- buf[RSTRING_LEN(msg)] = 0;
-
- Tcl_DStringInit(&dstr);
- Tcl_DStringFree(&dstr);
- Tcl_ExternalToUtfDString(encoding, buf, RSTRING_LENINT(msg), &dstr);
-
- Tcl_AppendResult(interp, Tcl_DStringValue(&dstr), (char*)NULL);
- DUMP2("error message:%s", Tcl_DStringValue(&dstr));
- Tcl_DStringFree(&dstr);
- xfree(buf);
- /* ckfree(buf); */
-
-#else /* TCL_VERSION <= 8.0 */
- Tcl_AppendResult(interp, RSTRING_PTR(msg), (char*)NULL);
-#endif
-
- rb_thread_critical = thr_crit_bup;
-}
-
-static VALUE
-TkStringValue(obj)
- VALUE obj;
-{
- switch(TYPE(obj)) {
- case T_STRING:
- return obj;
-
- case T_NIL:
- return rb_str_new2("");
-
- case T_TRUE:
- return rb_str_new2("1");
-
- case T_FALSE:
- return rb_str_new2("0");
-
- case T_ARRAY:
- return rb_funcall(obj, ID_join, 1, rb_str_new2(" "));
-
- default:
- if (rb_respond_to(obj, ID_to_s)) {
- return rb_funcallv(obj, ID_to_s, 0, 0);
- }
- }
-
- return rb_funcallv(obj, ID_inspect, 0, 0);
-}
-
-static int
-#ifdef HAVE_PROTOTYPES
-tcl_protect_core(Tcl_Interp *interp, VALUE (*proc)(VALUE), VALUE data)
-#else
-tcl_protect_core(interp, proc, data) /* should not raise exception */
- Tcl_Interp *interp;
- VALUE (*proc)();
- VALUE data;
-#endif
-{
- volatile VALUE ret, exc = Qnil;
- int status = 0;
- int thr_crit_bup = rb_thread_critical;
-
- Tcl_ResetResult(interp);
-
- rb_thread_critical = Qfalse;
- ret = rb_protect(proc, data, &status);
- rb_thread_critical = Qtrue;
- if (status) {
- char *buf;
- VALUE old_gc;
- volatile VALUE type, str;
-
- old_gc = rb_gc_disable();
-
- switch(status) {
- case TAG_RETURN:
- type = eTkCallbackReturn;
- goto error;
- case TAG_BREAK:
- type = eTkCallbackBreak;
- goto error;
- case TAG_NEXT:
- type = eTkCallbackContinue;
- goto error;
- error:
- str = rb_str_new2("LocalJumpError: ");
- rb_str_append(str, rb_obj_as_string(rb_errinfo()));
- exc = rb_exc_new3(type, str);
- break;
-
- case TAG_RETRY:
- if (NIL_P(rb_errinfo())) {
- DUMP1("rb_protect: retry");
- exc = rb_exc_new2(eTkCallbackRetry, "retry jump error");
- } else {
- exc = rb_errinfo();
- }
- break;
-
- case TAG_REDO:
- if (NIL_P(rb_errinfo())) {
- DUMP1("rb_protect: redo");
- exc = rb_exc_new2(eTkCallbackRedo, "redo jump error");
- } else {
- exc = rb_errinfo();
- }
- break;
-
- case TAG_RAISE:
- if (NIL_P(rb_errinfo())) {
- exc = rb_exc_new2(rb_eException, "unknown exception");
- } else {
- exc = rb_errinfo();
- }
- break;
-
- case TAG_FATAL:
- if (NIL_P(rb_errinfo())) {
- exc = rb_exc_new2(rb_eFatal, "FATAL");
- } else {
- exc = rb_errinfo();
- }
- break;
-
- case TAG_THROW:
- if (NIL_P(rb_errinfo())) {
- DUMP1("rb_protect: throw");
- exc = rb_exc_new2(eTkCallbackThrow, "throw jump error");
- } else {
- exc = rb_errinfo();
- }
- break;
-
- default:
- buf = ALLOC_N(char, 256);
- /* buf = ckalloc(sizeof(char) * 256); */
- sprintf(buf, "unknown loncaljmp status %d", status);
- exc = rb_exc_new2(rb_eException, buf);
- xfree(buf);
- /* ckfree(buf); */
- break;
- }
-
- if (old_gc == Qfalse) rb_gc_enable();
-
- ret = Qnil;
- }
-
- rb_thread_critical = thr_crit_bup;
-
- Tcl_ResetResult(interp);
-
- /* status check */
- if (!NIL_P(exc)) {
- volatile VALUE eclass = rb_obj_class(exc);
- volatile VALUE backtrace;
-
- DUMP1("(failed)");
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- DUMP1("set backtrace");
- if (!NIL_P(backtrace = rb_funcallv(exc, ID_backtrace, 0, 0))) {
- backtrace = rb_ary_join(backtrace, rb_str_new2("\n"));
- Tcl_AddErrorInfo(interp, StringValueCStr(backtrace));
- }
-
- rb_thread_critical = thr_crit_bup;
-
- ip_set_exc_message(interp, exc);
-
- if (eclass == eTkCallbackReturn)
- return TCL_RETURN;
-
- if (eclass == eTkCallbackBreak)
- return TCL_BREAK;
-
- if (eclass == eTkCallbackContinue)
- return TCL_CONTINUE;
-
- if (eclass == rb_eSystemExit || eclass == rb_eInterrupt) {
- rbtk_pending_exception = exc;
- return TCL_RETURN;
- }
-
- if (rb_obj_is_kind_of(exc, eTkLocalJumpError)) {
- rbtk_pending_exception = exc;
- return TCL_ERROR;
- }
-
- if (rb_obj_is_kind_of(exc, eLocalJumpError)) {
- VALUE reason = rb_ivar_get(exc, ID_at_reason);
-
- if (RB_TYPE_P(reason, T_SYMBOL)) {
- if (SYM2ID(reason) == ID_return)
- return TCL_RETURN;
-
- if (SYM2ID(reason) == ID_break)
- return TCL_BREAK;
-
- if (SYM2ID(reason) == ID_next)
- return TCL_CONTINUE;
- }
- }
-
- return TCL_ERROR;
- }
-
- /* result must be string or nil */
- if (!NIL_P(ret)) {
- /* copy result to the tcl interpreter */
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- ret = TkStringValue(ret);
- DUMP1("Tcl_AppendResult");
- Tcl_AppendResult(interp, RSTRING_PTR(ret), (char *)NULL);
-
- rb_thread_critical = thr_crit_bup;
- }
-
- DUMP2("(result) %s", NIL_P(ret) ? "nil" : RSTRING_PTR(ret));
-
- return TCL_OK;
-}
-
-static int
-tcl_protect(interp, proc, data)
- Tcl_Interp *interp;
- VALUE (*proc)();
- VALUE data;
-{
- int code;
-
-#ifdef HAVE_NATIVETHREAD
-#ifndef RUBY_USE_NATIVE_THREAD
- if (!ruby_native_thread_p()) {
- rb_bug("cross-thread violation on tcl_protect()");
- }
-#endif
-#endif
-
-#ifdef RUBY_VM
- code = tcl_protect_core(interp, proc, data);
-#else
- do {
- int old_trapflag = rb_trap_immediate;
- rb_trap_immediate = 0;
- code = tcl_protect_core(interp, proc, data);
- rb_trap_immediate = old_trapflag;
- } while (0);
-#endif
-
- return code;
-}
-
-static int
-#if TCL_MAJOR_VERSION >= 8
-ip_ruby_eval(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- Tcl_Obj *CONST argv[];
-#else /* TCL_MAJOR_VERSION < 8 */
-ip_ruby_eval(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- char *argv[];
-#endif
-{
- char *arg;
- int thr_crit_bup;
- int code;
-
- if (interp == (Tcl_Interp*)NULL) {
- rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
- "IP is deleted");
- return TCL_ERROR;
- }
-
- /* ruby command has 1 arg. */
- if (argc != 2) {
-#if 0
- rb_raise(rb_eArgError,
- "wrong number of arguments (%d for 1)", argc - 1);
-#else
- char buf[sizeof(int)*8 + 1];
- Tcl_ResetResult(interp);
- sprintf(buf, "%d", argc-1);
- Tcl_AppendResult(interp, "wrong number of arguments (",
- buf, " for 1)", (char *)NULL);
- rbtk_pending_exception = rb_exc_new2(rb_eArgError,
- Tcl_GetStringResult(interp));
- return TCL_ERROR;
-#endif
- }
-
- /* get C string from Tcl object */
-#if TCL_MAJOR_VERSION >= 8
- {
- char *str;
- int len;
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- str = Tcl_GetStringFromObj(argv[1], &len);
- arg = ALLOC_N(char, len + 1);
- /* arg = ckalloc(sizeof(char) * (len + 1)); */
- memcpy(arg, str, len);
- arg[len] = 0;
-
- rb_thread_critical = thr_crit_bup;
-
- }
-#else /* TCL_MAJOR_VERSION < 8 */
- arg = argv[1];
-#endif
-
- /* evaluate the argument string by ruby */
- DUMP2("rb_eval_string(%s)", arg);
-
- code = tcl_protect(interp, rb_eval_string, (VALUE)arg);
-
-#if TCL_MAJOR_VERSION >= 8
- xfree(arg);
- /* ckfree(arg); */
-#endif
-
- return code;
-}
-
-
-/* Tcl command `ruby_cmd' */
-static VALUE
-ip_ruby_cmd_core(arg)
- struct cmd_body_arg *arg;
-{
- volatile VALUE ret;
- int thr_crit_bup;
-
- DUMP1("call ip_ruby_cmd_core");
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qfalse;
- ret = rb_apply(arg->receiver, arg->method, arg->args);
- DUMP2("rb_apply return:%"PRIxVALUE, ret);
- rb_thread_critical = thr_crit_bup;
- DUMP1("finish ip_ruby_cmd_core");
-
- return ret;
-}
-
-static VALUE
-ip_ruby_cmd_receiver_const_get(name)
- char *name;
-{
- return rb_path2class(name);
-}
-
-static VALUE
-ip_ruby_cmd_receiver_get(str)
- char *str;
-{
- volatile VALUE receiver;
- int state;
-
- if (str[0] == ':' || ('A' <= str[0] && str[0] <= 'Z')) {
- /* class | module | constant */
- receiver = rb_protect(ip_ruby_cmd_receiver_const_get, (VALUE)str, &state);
- if (state) return Qnil;
- } else if (str[0] == '$') {
- /* global variable */
- receiver = rb_gv_get(str);
- } else {
- /* global variable omitted '$' */
- char *buf;
- size_t len;
-
- len = strlen(str);
- buf = ALLOC_N(char, len + 2);
- /* buf = ckalloc(sizeof(char) * (len + 2)); */
- buf[0] = '$';
- memcpy(buf + 1, str, len);
- buf[len + 1] = 0;
- receiver = rb_gv_get(buf);
- xfree(buf);
- /* ckfree(buf); */
- }
-
- return receiver;
-}
-
-/* ruby_cmd receiver method arg ... */
-static int
-#if TCL_MAJOR_VERSION >= 8
-ip_ruby_cmd(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- Tcl_Obj *CONST argv[];
-#else /* TCL_MAJOR_VERSION < 8 */
-ip_ruby_cmd(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- char *argv[];
-#endif
-{
- volatile VALUE receiver;
- volatile ID method;
- volatile VALUE args;
- char *str;
- int i;
- int len;
- struct cmd_body_arg *arg;
- int thr_crit_bup;
- VALUE old_gc;
- int code;
-
- if (interp == (Tcl_Interp*)NULL) {
- rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
- "IP is deleted");
- return TCL_ERROR;
- }
-
- if (argc < 3) {
-#if 0
- rb_raise(rb_eArgError, "too few arguments");
-#else
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "too few arguments", (char *)NULL);
- rbtk_pending_exception = rb_exc_new2(rb_eArgError,
- Tcl_GetStringResult(interp));
- return TCL_ERROR;
-#endif
- }
-
- /* get arguments from Tcl objects */
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
- old_gc = rb_gc_disable();
-
- /* get receiver */
-#if TCL_MAJOR_VERSION >= 8
- str = Tcl_GetStringFromObj(argv[1], &len);
-#else /* TCL_MAJOR_VERSION < 8 */
- str = argv[1];
-#endif
- DUMP2("receiver:%s",str);
- /* receiver = rb_protect(ip_ruby_cmd_receiver_get, (VALUE)str, &code); */
- receiver = ip_ruby_cmd_receiver_get(str);
- if (NIL_P(receiver)) {
-#if 0
- rb_raise(rb_eArgError,
- "unknown class/module/global-variable '%s'", str);
-#else
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "unknown class/module/global-variable '",
- str, "'", (char *)NULL);
- rbtk_pending_exception = rb_exc_new2(rb_eArgError,
- Tcl_GetStringResult(interp));
- if (old_gc == Qfalse) rb_gc_enable();
- return TCL_ERROR;
-#endif
- }
-
- /* get metrhod */
-#if TCL_MAJOR_VERSION >= 8
- str = Tcl_GetStringFromObj(argv[2], &len);
-#else /* TCL_MAJOR_VERSION < 8 */
- str = argv[2];
-#endif
- method = rb_intern(str);
-
- /* get args */
- args = rb_ary_new2(argc - 2);
- for(i = 3; i < argc; i++) {
- VALUE s;
-#if TCL_MAJOR_VERSION >= 8
- str = Tcl_GetStringFromObj(argv[i], &len);
- s = rb_tainted_str_new(str, len);
-#else /* TCL_MAJOR_VERSION < 8 */
- str = argv[i];
- s = rb_tainted_str_new2(str);
-#endif
- DUMP2("arg:%s",str);
- rb_ary_push(args, s);
- }
-
- if (old_gc == Qfalse) rb_gc_enable();
- rb_thread_critical = thr_crit_bup;
-
- /* allocate */
- arg = ALLOC(struct cmd_body_arg);
- /* arg = RbTk_ALLOC_N(struct cmd_body_arg, 1); */
-
- arg->receiver = receiver;
- arg->method = method;
- arg->args = args;
-
- /* evaluate the argument string by ruby */
- code = tcl_protect(interp, ip_ruby_cmd_core, (VALUE)arg);
-
- xfree(arg);
- /* ckfree((char*)arg); */
-
- return code;
-}
-
-
-/*****************************/
-/* relpace of 'exit' command */
-/*****************************/
-static int
-#if TCL_MAJOR_VERSION >= 8
-#ifdef HAVE_PROTOTYPES
-ip_InterpExitObjCmd(ClientData clientData, Tcl_Interp *interp,
- int argc, Tcl_Obj *CONST argv[])
-#else
-ip_InterpExitObjCmd(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- Tcl_Obj *CONST argv[];
-#endif
-#else /* TCL_MAJOR_VERSION < 8 */
-#ifdef HAVE_PROTOTYPES
-ip_InterpExitCommand(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
-#else
-ip_InterpExitCommand(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- char *argv[];
-#endif
-#endif
-{
- DUMP1("start ip_InterpExitCommand");
- if (interp != (Tcl_Interp*)NULL
- && !Tcl_InterpDeleted(interp)
-#if TCL_NAMESPACE_DEBUG
- && !ip_null_namespace(interp)
-#endif
- ) {
- Tcl_ResetResult(interp);
- /* Tcl_Preserve(interp); */
- /* Tcl_Eval(interp, "interp eval {} {destroy .}; interp delete {}"); */
- if (!Tcl_InterpDeleted(interp)) {
- ip_finalize(interp);
-
- Tcl_DeleteInterp(interp);
- Tcl_Release(interp);
- }
- }
- return TCL_OK;
-}
-
-static int
-#if TCL_MAJOR_VERSION >= 8
-#ifdef HAVE_PROTOTYPES
-ip_RubyExitObjCmd(ClientData clientData, Tcl_Interp *interp,
- int argc, Tcl_Obj *CONST argv[])
-#else
-ip_RubyExitObjCmd(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- Tcl_Obj *CONST argv[];
-#endif
-#else /* TCL_MAJOR_VERSION < 8 */
-#ifdef HAVE_PROTOTYPES
-ip_RubyExitCommand(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
-#else
-ip_RubyExitCommand(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- char *argv[];
-#endif
-#endif
-{
- int state;
- char *cmd, *param;
-#if TCL_MAJOR_VERSION < 8
- char *endptr;
- cmd = argv[0];
-#endif
-
- DUMP1("start ip_RubyExitCommand");
-
-#if TCL_MAJOR_VERSION >= 8
- /* cmd = Tcl_GetString(argv[0]); */
- cmd = Tcl_GetStringFromObj(argv[0], (int*)NULL);
-#endif
-
- if (argc < 1 || argc > 2) {
- /* argument error */
- Tcl_AppendResult(interp,
- "wrong number of arguments: should be \"",
- cmd, " ?returnCode?\"", (char *)NULL);
- return TCL_ERROR;
- }
-
- if (interp == (Tcl_Interp*)NULL) return TCL_OK;
-
- Tcl_ResetResult(interp);
-
- if (Tcl_IsSafe(interp)) {
- if (!Tcl_InterpDeleted(interp)) {
- ip_finalize(interp);
-
- Tcl_DeleteInterp(interp);
- Tcl_Release(interp);
- }
- return TCL_OK;
- }
-
- switch(argc) {
- case 1:
- /* rb_exit(0); */ /* not return if succeed */
- Tcl_AppendResult(interp,
- "fail to call \"", cmd, "\"", (char *)NULL);
-
- rbtk_pending_exception = rb_exc_new2(rb_eSystemExit,
- Tcl_GetStringResult(interp));
- rb_iv_set(rbtk_pending_exception, "status", INT2FIX(0));
-
- return TCL_RETURN;
-
- case 2:
-#if TCL_MAJOR_VERSION >= 8
- if (Tcl_GetIntFromObj(interp, argv[1], &state) == TCL_ERROR) {
- return TCL_ERROR;
- }
- /* param = Tcl_GetString(argv[1]); */
- param = Tcl_GetStringFromObj(argv[1], (int*)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- state = (int)strtol(argv[1], &endptr, 0);
- if (*endptr) {
- Tcl_AppendResult(interp,
- "expected integer but got \"",
- argv[1], "\"", (char *)NULL);
- return TCL_ERROR;
- }
- param = argv[1];
-#endif
- /* rb_exit(state); */ /* not return if succeed */
-
- Tcl_AppendResult(interp, "fail to call \"", cmd, " ",
- param, "\"", (char *)NULL);
-
- rbtk_pending_exception = rb_exc_new2(rb_eSystemExit,
- Tcl_GetStringResult(interp));
- rb_iv_set(rbtk_pending_exception, "status", INT2FIX(state));
-
- return TCL_RETURN;
-
- default:
- /* argument error */
- Tcl_AppendResult(interp,
- "wrong number of arguments: should be \"",
- cmd, " ?returnCode?\"", (char *)NULL);
- return TCL_ERROR;
- }
-}
-
-
-/**************************/
-/* based on tclEvent.c */
-/**************************/
-
-/*********************/
-/* replace of update */
-/*********************/
-#if TCL_MAJOR_VERSION >= 8
-static int ip_rbUpdateObjCmd _((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST []));
-static int
-ip_rbUpdateObjCmd(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- Tcl_Obj *CONST objv[];
-#else /* TCL_MAJOR_VERSION < 8 */
-static int ip_rbUpdateCommand _((ClientData, Tcl_Interp *, int, char *[]));
-static int
-ip_rbUpdateCommand(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- char *objv[];
-#endif
-{
- int flags = 0;
- static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
- enum updateOptions {REGEXP_IDLETASKS};
-
- DUMP1("Ruby's 'update' is called");
- if (interp == (Tcl_Interp*)NULL) {
- rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
- "IP is deleted");
- return TCL_ERROR;
- }
-#ifdef HAVE_NATIVETHREAD
-#ifndef RUBY_USE_NATIVE_THREAD
- if (!ruby_native_thread_p()) {
- rb_bug("cross-thread violation on ip_ruby_eval()");
- }
-#endif
-#endif
-
- Tcl_ResetResult(interp);
-
- if (objc == 1) {
- flags = TCL_DONT_WAIT;
-
- } else if (objc == 2) {
-#if TCL_MAJOR_VERSION >= 8
- int optionIndex;
- if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)updateOptions,
- "option", 0, &optionIndex) != TCL_OK) {
- return TCL_ERROR;
- }
- switch ((enum updateOptions) optionIndex) {
- case REGEXP_IDLETASKS: {
- flags = TCL_IDLE_EVENTS;
- break;
- }
- default: {
- rb_bug("ip_rbUpdateObjCmd: bad option index to UpdateOptions");
- }
- }
-#else
- if (strncmp(objv[1], "idletasks", strlen(objv[1])) != 0) {
- Tcl_AppendResult(interp, "bad option \"", objv[1],
- "\": must be idletasks", (char *) NULL);
- return TCL_ERROR;
- }
- flags = TCL_IDLE_EVENTS;
-#endif
- } else {
-#ifdef Tcl_WrongNumArgs
- Tcl_WrongNumArgs(interp, 1, objv, "[ idletasks ]");
-#else
-# if TCL_MAJOR_VERSION >= 8
- int dummy;
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- Tcl_GetStringFromObj(objv[0], &dummy),
- " [ idletasks ]\"",
- (char *) NULL);
-# else /* TCL_MAJOR_VERSION < 8 */
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- objv[0], " [ idletasks ]\"", (char *) NULL);
-# endif
-#endif
- return TCL_ERROR;
- }
-
- Tcl_Preserve(interp);
-
- /* call eventloop */
- /* ret = lib_eventloop_core(0, flags, (int *)NULL);*/ /* ignore result */
- lib_eventloop_launcher(0, flags, (int *)NULL, interp); /* ignore result */
-
- /* exception check */
- if (!NIL_P(rbtk_pending_exception)) {
- Tcl_Release(interp);
-
- /*
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
- */
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
- || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
- return TCL_RETURN;
- } else{
- return TCL_ERROR;
- }
- }
-
- /* trap check */
- if (rb_thread_check_trap_pending()) {
- Tcl_Release(interp);
-
- return TCL_RETURN;
- }
-
- /*
- * Must clear the interpreter's result because event handlers could
- * have executed commands.
- */
-
- DUMP2("last result '%s'", Tcl_GetStringResult(interp));
- Tcl_ResetResult(interp);
- Tcl_Release(interp);
-
- DUMP1("finish Ruby's 'update'");
- return TCL_OK;
-}
-
-
-/**********************/
-/* update with thread */
-/**********************/
-struct th_update_param {
- VALUE thread;
- int done;
-};
-
-static void rb_threadUpdateProc _((ClientData));
-static void
-rb_threadUpdateProc(clientData)
- ClientData clientData; /* Pointer to integer to set to 1. */
-{
- struct th_update_param *param = (struct th_update_param *) clientData;
-
- DUMP1("threadUpdateProc is called");
- param->done = 1;
- rb_thread_wakeup(param->thread);
-
- return;
-}
-
-#if TCL_MAJOR_VERSION >= 8
-static int ip_rb_threadUpdateObjCmd _((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST []));
-static int
-ip_rb_threadUpdateObjCmd(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- Tcl_Obj *CONST objv[];
-#else /* TCL_MAJOR_VERSION < 8 */
-static int ip_rb_threadUpdateCommand _((ClientData, Tcl_Interp *, int,
- char *[]));
-static int
-ip_rb_threadUpdateCommand(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- char *objv[];
-#endif
-{
-# if 0
- int flags = 0;
-# endif
- struct th_update_param *param;
- static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
- enum updateOptions {REGEXP_IDLETASKS};
- volatile VALUE current_thread = rb_thread_current();
- struct timeval t;
-
- DUMP1("Ruby's 'thread_update' is called");
- if (interp == (Tcl_Interp*)NULL) {
- rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
- "IP is deleted");
- return TCL_ERROR;
- }
-#ifdef HAVE_NATIVETHREAD
-#ifndef RUBY_USE_NATIVE_THREAD
- if (!ruby_native_thread_p()) {
- rb_bug("cross-thread violation on ip_rb_threadUpdateCommand()");
- }
-#endif
-#endif
-
- if (rb_thread_alone()
- || NIL_P(eventloop_thread) || eventloop_thread == current_thread) {
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("call ip_rbUpdateObjCmd");
- return ip_rbUpdateObjCmd(clientData, interp, objc, objv);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("call ip_rbUpdateCommand");
- return ip_rbUpdateCommand(clientData, interp, objc, objv);
-#endif
- }
-
- DUMP1("start Ruby's 'thread_update' body");
-
- Tcl_ResetResult(interp);
-
- if (objc == 1) {
-# if 0
- flags = TCL_DONT_WAIT;
-# endif
- } else if (objc == 2) {
-#if TCL_MAJOR_VERSION >= 8
- int optionIndex;
- if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)updateOptions,
- "option", 0, &optionIndex) != TCL_OK) {
- return TCL_ERROR;
- }
- switch ((enum updateOptions) optionIndex) {
- case REGEXP_IDLETASKS: {
-# if 0
- flags = TCL_IDLE_EVENTS;
-# endif
- break;
- }
- default: {
- rb_bug("ip_rb_threadUpdateObjCmd: bad option index to UpdateOptions");
- }
- }
-#else
- if (strncmp(objv[1], "idletasks", strlen(objv[1])) != 0) {
- Tcl_AppendResult(interp, "bad option \"", objv[1],
- "\": must be idletasks", (char *) NULL);
- return TCL_ERROR;
- }
-# if 0
- flags = TCL_IDLE_EVENTS;
-# endif
-#endif
- } else {
-#ifdef Tcl_WrongNumArgs
- Tcl_WrongNumArgs(interp, 1, objv, "[ idletasks ]");
-#else
-# if TCL_MAJOR_VERSION >= 8
- int dummy;
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- Tcl_GetStringFromObj(objv[0], &dummy),
- " [ idletasks ]\"",
- (char *) NULL);
-# else /* TCL_MAJOR_VERSION < 8 */
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- objv[0], " [ idletasks ]\"", (char *) NULL);
-# endif
-#endif
- return TCL_ERROR;
- }
-
- DUMP1("pass argument check");
-
- /* param = (struct th_update_param *)Tcl_Alloc(sizeof(struct th_update_param)); */
- param = RbTk_ALLOC_N(struct th_update_param, 1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)param);
-#endif
- param->thread = current_thread;
- param->done = 0;
-
- DUMP1("set idle proc");
- Tcl_DoWhenIdle(rb_threadUpdateProc, (ClientData) param);
-
- t.tv_sec = 0;
- t.tv_usec = (long)((EVENT_HANDLER_TIMEOUT)*1000.0);
-
- while(!param->done) {
- DUMP1("wait for complete idle proc");
- /* rb_thread_stop(); */
- /* rb_thread_sleep_forever(); */
- rb_thread_wait_for(t);
- if (NIL_P(eventloop_thread)) {
- break;
- }
- }
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)param, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)param);
-#else
- /* Tcl_Free((char *)param); */
- ckfree((char *)param);
-#endif
-#endif
-
- DUMP1("finish Ruby's 'thread_update'");
- return TCL_OK;
-}
-
-
-/***************************/
-/* replace of vwait/tkwait */
-/***************************/
-#if TCL_MAJOR_VERSION >= 8
-static int ip_rbVwaitObjCmd _((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST []));
-static int ip_rb_threadVwaitObjCmd _((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST []));
-static int ip_rbTkWaitObjCmd _((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST []));
-static int ip_rb_threadTkWaitObjCmd _((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST []));
-#else
-static int ip_rbVwaitCommand _((ClientData, Tcl_Interp *, int, char *[]));
-static int ip_rb_threadVwaitCommand _((ClientData, Tcl_Interp *, int,
- char *[]));
-static int ip_rbTkWaitCommand _((ClientData, Tcl_Interp *, int, char *[]));
-static int ip_rb_threadTkWaitCommand _((ClientData, Tcl_Interp *, int,
- char *[]));
-#endif
-
-#if TCL_MAJOR_VERSION >= 8
-static char *VwaitVarProc _((ClientData, Tcl_Interp *,
- CONST84 char *,CONST84 char *, int));
-static char *
-VwaitVarProc(clientData, interp, name1, name2, flags)
- ClientData clientData; /* Pointer to integer to set to 1. */
- Tcl_Interp *interp; /* Interpreter containing variable. */
- CONST84 char *name1; /* Name of variable. */
- CONST84 char *name2; /* Second part of variable name. */
- int flags; /* Information about what happened. */
-#else /* TCL_MAJOR_VERSION < 8 */
-static char *VwaitVarProc _((ClientData, Tcl_Interp *, char *, char *, int));
-static char *
-VwaitVarProc(clientData, interp, name1, name2, flags)
- ClientData clientData; /* Pointer to integer to set to 1. */
- Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Name of variable. */
- char *name2; /* Second part of variable name. */
- int flags; /* Information about what happened. */
-#endif
-{
- int *donePtr = (int *) clientData;
-
- *donePtr = 1;
- return (char *) NULL;
-}
-
-#if TCL_MAJOR_VERSION >= 8
-static int
-ip_rbVwaitObjCmd(clientData, interp, objc, objv)
- ClientData clientData; /* Not used */
- Tcl_Interp *interp;
- int objc;
- Tcl_Obj *CONST objv[];
-#else /* TCL_MAJOR_VERSION < 8 */
-static int
-ip_rbVwaitCommand(clientData, interp, objc, objv)
- ClientData clientData; /* Not used */
- Tcl_Interp *interp;
- int objc;
- char *objv[];
-#endif
-{
- int ret, done, foundEvent;
- char *nameString;
- int dummy;
- int thr_crit_bup;
-
- DUMP1("Ruby's 'vwait' is called");
- if (interp == (Tcl_Interp*)NULL) {
- rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
- "IP is deleted");
- return TCL_ERROR;
- }
-
-#if 0
- if (!rb_thread_alone()
- && eventloop_thread != Qnil
- && eventloop_thread != rb_thread_current()) {
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("call ip_rb_threadVwaitObjCmd");
- return ip_rb_threadVwaitObjCmd(clientData, interp, objc, objv);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("call ip_rb_threadVwaitCommand");
- return ip_rb_threadVwaitCommand(clientData, interp, objc, objv);
-#endif
- }
-#endif
-
- Tcl_Preserve(interp);
-#ifdef HAVE_NATIVETHREAD
-#ifndef RUBY_USE_NATIVE_THREAD
- if (!ruby_native_thread_p()) {
- rb_bug("cross-thread violation on ip_rbVwaitCommand()");
- }
-#endif
-#endif
-
- Tcl_ResetResult(interp);
-
- if (objc != 2) {
-#ifdef Tcl_WrongNumArgs
- Tcl_WrongNumArgs(interp, 1, objv, "name");
-#else
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if TCL_MAJOR_VERSION >= 8
- /* nameString = Tcl_GetString(objv[0]); */
- nameString = Tcl_GetStringFromObj(objv[0], &dummy);
-#else /* TCL_MAJOR_VERSION < 8 */
- nameString = objv[0];
-#endif
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- nameString, " name\"", (char *) NULL);
-
- rb_thread_critical = thr_crit_bup;
-#endif
-
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_IncrRefCount(objv[1]);
- /* nameString = Tcl_GetString(objv[1]); */
- nameString = Tcl_GetStringFromObj(objv[1], &dummy);
-#else /* TCL_MAJOR_VERSION < 8 */
- nameString = objv[1];
-#endif
-
- /*
- if (Tcl_TraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- VwaitVarProc, (ClientData) &done) != TCL_OK) {
- return TCL_ERROR;
- }
- */
- ret = Tcl_TraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- VwaitVarProc, (ClientData) &done);
-
- rb_thread_critical = thr_crit_bup;
-
- if (ret != TCL_OK) {
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[1]);
-#endif
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- done = 0;
-
- foundEvent = RTEST(lib_eventloop_launcher(/* not check root-widget */0,
- 0, &done, interp));
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- Tcl_UntraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- VwaitVarProc, (ClientData) &done);
-
- rb_thread_critical = thr_crit_bup;
-
- /* exception check */
- if (!NIL_P(rbtk_pending_exception)) {
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[1]);
-#endif
- Tcl_Release(interp);
-
-/*
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
-*/
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
- || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
- return TCL_RETURN;
- } else{
- return TCL_ERROR;
- }
- }
-
- /* trap check */
- if (rb_thread_check_trap_pending()) {
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[1]);
-#endif
- Tcl_Release(interp);
-
- return TCL_RETURN;
- }
-
- /*
- * Clear out the interpreter's result, since it may have been set
- * by event handlers.
- */
-
- Tcl_ResetResult(interp);
- if (!foundEvent) {
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- Tcl_AppendResult(interp, "can't wait for variable \"", nameString,
- "\": would wait forever", (char *) NULL);
-
- rb_thread_critical = thr_crit_bup;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[1]);
-#endif
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[1]);
-#endif
- Tcl_Release(interp);
- return TCL_OK;
-}
-
-
-/**************************/
-/* based on tkCmd.c */
-/**************************/
-#if TCL_MAJOR_VERSION >= 8
-static char *WaitVariableProc _((ClientData, Tcl_Interp *,
- CONST84 char *,CONST84 char *, int));
-static char *
-WaitVariableProc(clientData, interp, name1, name2, flags)
- ClientData clientData; /* Pointer to integer to set to 1. */
- Tcl_Interp *interp; /* Interpreter containing variable. */
- CONST84 char *name1; /* Name of variable. */
- CONST84 char *name2; /* Second part of variable name. */
- int flags; /* Information about what happened. */
-#else /* TCL_MAJOR_VERSION < 8 */
-static char *WaitVariableProc _((ClientData, Tcl_Interp *,
- char *, char *, int));
-static char *
-WaitVariableProc(clientData, interp, name1, name2, flags)
- ClientData clientData; /* Pointer to integer to set to 1. */
- Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Name of variable. */
- char *name2; /* Second part of variable name. */
- int flags; /* Information about what happened. */
-#endif
-{
- int *donePtr = (int *) clientData;
-
- *donePtr = 1;
- return (char *) NULL;
-}
-
-static void WaitVisibilityProc _((ClientData, XEvent *));
-static void
-WaitVisibilityProc(clientData, eventPtr)
- ClientData clientData; /* Pointer to integer to set to 1. */
- XEvent *eventPtr; /* Information about event (not used). */
-{
- int *donePtr = (int *) clientData;
-
- if (eventPtr->type == VisibilityNotify) {
- *donePtr = 1;
- }
- if (eventPtr->type == DestroyNotify) {
- *donePtr = 2;
- }
-}
-
-static void WaitWindowProc _((ClientData, XEvent *));
-static void
-WaitWindowProc(clientData, eventPtr)
- ClientData clientData; /* Pointer to integer to set to 1. */
- XEvent *eventPtr; /* Information about event. */
-{
- int *donePtr = (int *) clientData;
-
- if (eventPtr->type == DestroyNotify) {
- *donePtr = 1;
- }
-}
-
-#if TCL_MAJOR_VERSION >= 8
-static int
-ip_rbTkWaitObjCmd(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- Tcl_Obj *CONST objv[];
-#else /* TCL_MAJOR_VERSION < 8 */
-static int
-ip_rbTkWaitCommand(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- char *objv[];
-#endif
-{
- Tk_Window tkwin = (Tk_Window) clientData;
- Tk_Window window;
- int done, index;
- static CONST char *optionStrings[] = { "variable", "visibility", "window",
- (char *) NULL };
- enum options { TKWAIT_VARIABLE, TKWAIT_VISIBILITY, TKWAIT_WINDOW };
- char *nameString;
- int ret, dummy;
- int thr_crit_bup;
-
- DUMP1("Ruby's 'tkwait' is called");
- if (interp == (Tcl_Interp*)NULL) {
- rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
- "IP is deleted");
- return TCL_ERROR;
- }
-
-#if 0
- if (!rb_thread_alone()
- && eventloop_thread != Qnil
- && eventloop_thread != rb_thread_current()) {
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("call ip_rb_threadTkWaitObjCmd");
- return ip_rb_threadTkWaitObjCmd((ClientData)tkwin, interp, objc, objv);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("call ip_rb_threadTkWaitCommand");
- return ip_rb_threadTkWwaitCommand((ClientData)tkwin, interp, objc, objv);
-#endif
- }
-#endif
-
- Tcl_Preserve(interp);
- Tcl_ResetResult(interp);
-
- if (objc != 3) {
-#ifdef Tcl_WrongNumArgs
- Tcl_WrongNumArgs(interp, 1, objv, "variable|visibility|window name");
-#else
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- Tcl_GetStringFromObj(objv[0], &dummy),
- " variable|visibility|window name\"",
- (char *) NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- objv[0], " variable|visibility|window name\"",
- (char *) NULL);
-#endif
-
- rb_thread_critical = thr_crit_bup;
-#endif
-
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
-#if TCL_MAJOR_VERSION >= 8
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /*
- if (Tcl_GetIndexFromObj(interp, objv[1],
- (CONST84 char **)optionStrings,
- "option", 0, &index) != TCL_OK) {
- return TCL_ERROR;
- }
- */
- ret = Tcl_GetIndexFromObj(interp, objv[1],
- (CONST84 char **)optionStrings,
- "option", 0, &index);
-
- rb_thread_critical = thr_crit_bup;
-
- if (ret != TCL_OK) {
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-#else /* TCL_MAJOR_VERSION < 8 */
- {
- int c = objv[1][0];
- size_t length = strlen(objv[1]);
-
- if ((c == 'v') && (strncmp(objv[1], "variable", length) == 0)
- && (length >= 2)) {
- index = TKWAIT_VARIABLE;
- } else if ((c == 'v') && (strncmp(objv[1], "visibility", length) == 0)
- && (length >= 2)) {
- index = TKWAIT_VISIBILITY;
- } else if ((c == 'w') && (strncmp(objv[1], "window", length) == 0)) {
- index = TKWAIT_WINDOW;
- } else {
- Tcl_AppendResult(interp, "bad option \"", objv[1],
- "\": must be variable, visibility, or window",
- (char *) NULL);
- Tcl_Release(interp);
- return TCL_ERROR;
- }
- }
-#endif
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_IncrRefCount(objv[2]);
- /* nameString = Tcl_GetString(objv[2]); */
- nameString = Tcl_GetStringFromObj(objv[2], &dummy);
-#else /* TCL_MAJOR_VERSION < 8 */
- nameString = objv[2];
-#endif
-
- rb_thread_critical = thr_crit_bup;
-
- switch ((enum options) index) {
- case TKWAIT_VARIABLE:
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
- /*
- if (Tcl_TraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- WaitVariableProc, (ClientData) &done) != TCL_OK) {
- return TCL_ERROR;
- }
- */
- ret = Tcl_TraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- WaitVariableProc, (ClientData) &done);
-
- rb_thread_critical = thr_crit_bup;
-
- if (ret != TCL_OK) {
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- done = 0;
- /* lib_eventloop_core(check_rootwidget_flag, 0, &done); */
- lib_eventloop_launcher(check_rootwidget_flag, 0, &done, interp);
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- Tcl_UntraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- WaitVariableProc, (ClientData) &done);
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
-
- rb_thread_critical = thr_crit_bup;
-
- /* exception check */
- if (!NIL_P(rbtk_pending_exception)) {
- Tcl_Release(interp);
-
- /*
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
- */
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
- || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
- return TCL_RETURN;
- } else{
- return TCL_ERROR;
- }
- }
-
- /* trap check */
- if (rb_thread_check_trap_pending()) {
- Tcl_Release(interp);
-
- return TCL_RETURN;
- }
-
- break;
-
- case TKWAIT_VISIBILITY:
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* This function works on the Tk eventloop thread only. */
- if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
- window = NULL;
- } else {
- window = Tk_NameToWindow(interp, nameString, tkwin);
- }
-
- if (window == NULL) {
- Tcl_AppendResult(interp, ": tkwait: ",
- "no main-window (not Tk application?)",
- (char*)NULL);
- rb_thread_critical = thr_crit_bup;
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- Tk_CreateEventHandler(window,
- VisibilityChangeMask|StructureNotifyMask,
- WaitVisibilityProc, (ClientData) &done);
-
- rb_thread_critical = thr_crit_bup;
-
- done = 0;
- /* lib_eventloop_core(check_rootwidget_flag, 0, &done); */
- lib_eventloop_launcher(check_rootwidget_flag, 0, &done, interp);
-
- /* exception check */
- if (!NIL_P(rbtk_pending_exception)) {
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
- Tcl_Release(interp);
-
- /*
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
- */
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
- || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
- return TCL_RETURN;
- } else{
- return TCL_ERROR;
- }
- }
-
- /* trap check */
- if (rb_thread_check_trap_pending()) {
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
- Tcl_Release(interp);
-
- return TCL_RETURN;
- }
-
- if (done != 1) {
- /*
- * Note that we do not delete the event handler because it
- * was deleted automatically when the window was destroyed.
- */
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "window \"", nameString,
- "\" was deleted before its visibility changed",
- (char *) NULL);
-
- rb_thread_critical = thr_crit_bup;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
-
- Tk_DeleteEventHandler(window,
- VisibilityChangeMask|StructureNotifyMask,
- WaitVisibilityProc, (ClientData) &done);
-
- rb_thread_critical = thr_crit_bup;
-
- break;
-
- case TKWAIT_WINDOW:
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* This function works on the Tk eventloop thread only. */
- if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
- window = NULL;
- } else {
- window = Tk_NameToWindow(interp, nameString, tkwin);
- }
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
-
- if (window == NULL) {
- Tcl_AppendResult(interp, ": tkwait: ",
- "no main-window (not Tk application?)",
- (char*)NULL);
- rb_thread_critical = thr_crit_bup;
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- Tk_CreateEventHandler(window, StructureNotifyMask,
- WaitWindowProc, (ClientData) &done);
-
- rb_thread_critical = thr_crit_bup;
-
- done = 0;
- /* lib_eventloop_core(check_rootwidget_flag, 0, &done); */
- lib_eventloop_launcher(check_rootwidget_flag, 0, &done, interp);
-
- /* exception check */
- if (!NIL_P(rbtk_pending_exception)) {
- Tcl_Release(interp);
-
- /*
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
- */
- if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
- || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
- return TCL_RETURN;
- } else{
- return TCL_ERROR;
- }
- }
-
- /* trap check */
- if (rb_thread_check_trap_pending()) {
- Tcl_Release(interp);
-
- return TCL_RETURN;
- }
-
- /*
- * Note: there's no need to delete the event handler. It was
- * deleted automatically when the window was destroyed.
- */
- break;
- }
-
- /*
- * Clear out the interpreter's result, since it may have been set
- * by event handlers.
- */
-
- Tcl_ResetResult(interp);
- Tcl_Release(interp);
- return TCL_OK;
-}
-
-/****************************/
-/* vwait/tkwait with thread */
-/****************************/
-struct th_vwait_param {
- VALUE thread;
- int done;
-};
-
-#if TCL_MAJOR_VERSION >= 8
-static char *rb_threadVwaitProc _((ClientData, Tcl_Interp *,
- CONST84 char *,CONST84 char *, int));
-static char *
-rb_threadVwaitProc(clientData, interp, name1, name2, flags)
- ClientData clientData; /* Pointer to integer to set to 1. */
- Tcl_Interp *interp; /* Interpreter containing variable. */
- CONST84 char *name1; /* Name of variable. */
- CONST84 char *name2; /* Second part of variable name. */
- int flags; /* Information about what happened. */
-#else /* TCL_MAJOR_VERSION < 8 */
-static char *rb_threadVwaitProc _((ClientData, Tcl_Interp *,
- char *, char *, int));
-static char *
-rb_threadVwaitProc(clientData, interp, name1, name2, flags)
- ClientData clientData; /* Pointer to integer to set to 1. */
- Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Name of variable. */
- char *name2; /* Second part of variable name. */
- int flags; /* Information about what happened. */
-#endif
-{
- struct th_vwait_param *param = (struct th_vwait_param *) clientData;
-
- if (flags & (TCL_INTERP_DESTROYED | TCL_TRACE_DESTROYED)) {
- param->done = -1;
- } else {
- param->done = 1;
- }
- if (param->done != 0) rb_thread_wakeup(param->thread);
-
- return (char *)NULL;
-}
-
-#define TKWAIT_MODE_VISIBILITY 1
-#define TKWAIT_MODE_DESTROY 2
-
-static void rb_threadWaitVisibilityProc _((ClientData, XEvent *));
-static void
-rb_threadWaitVisibilityProc(clientData, eventPtr)
- ClientData clientData; /* Pointer to integer to set to 1. */
- XEvent *eventPtr; /* Information about event (not used). */
-{
- struct th_vwait_param *param = (struct th_vwait_param *) clientData;
-
- if (eventPtr->type == VisibilityNotify) {
- param->done = TKWAIT_MODE_VISIBILITY;
- }
- if (eventPtr->type == DestroyNotify) {
- param->done = TKWAIT_MODE_DESTROY;
- }
- if (param->done != 0) rb_thread_wakeup(param->thread);
-}
-
-static void rb_threadWaitWindowProc _((ClientData, XEvent *));
-static void
-rb_threadWaitWindowProc(clientData, eventPtr)
- ClientData clientData; /* Pointer to integer to set to 1. */
- XEvent *eventPtr; /* Information about event. */
-{
- struct th_vwait_param *param = (struct th_vwait_param *) clientData;
-
- if (eventPtr->type == DestroyNotify) {
- param->done = TKWAIT_MODE_DESTROY;
- }
- if (param->done != 0) rb_thread_wakeup(param->thread);
-}
-
-#if TCL_MAJOR_VERSION >= 8
-static int
-ip_rb_threadVwaitObjCmd(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- Tcl_Obj *CONST objv[];
-#else /* TCL_MAJOR_VERSION < 8 */
-static int
-ip_rb_threadVwaitCommand(clientData, interp, objc, objv)
- ClientData clientData; /* Not used */
- Tcl_Interp *interp;
- int objc;
- char *objv[];
-#endif
-{
- struct th_vwait_param *param;
- char *nameString;
- int ret, dummy;
- int thr_crit_bup;
- volatile VALUE current_thread = rb_thread_current();
- struct timeval t;
-
- DUMP1("Ruby's 'thread_vwait' is called");
- if (interp == (Tcl_Interp*)NULL) {
- rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
- "IP is deleted");
- return TCL_ERROR;
- }
-
- if (rb_thread_alone() || eventloop_thread == current_thread) {
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("call ip_rbVwaitObjCmd");
- return ip_rbVwaitObjCmd(clientData, interp, objc, objv);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("call ip_rbVwaitCommand");
- return ip_rbVwaitCommand(clientData, interp, objc, objv);
-#endif
- }
-
- Tcl_Preserve(interp);
- Tcl_ResetResult(interp);
-
- if (objc != 2) {
-#ifdef Tcl_WrongNumArgs
- Tcl_WrongNumArgs(interp, 1, objv, "name");
-#else
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if TCL_MAJOR_VERSION >= 8
- /* nameString = Tcl_GetString(objv[0]); */
- nameString = Tcl_GetStringFromObj(objv[0], &dummy);
-#else /* TCL_MAJOR_VERSION < 8 */
- nameString = objv[0];
-#endif
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- nameString, " name\"", (char *) NULL);
-
- rb_thread_critical = thr_crit_bup;
-#endif
-
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_IncrRefCount(objv[1]);
- /* nameString = Tcl_GetString(objv[1]); */
- nameString = Tcl_GetStringFromObj(objv[1], &dummy);
-#else /* TCL_MAJOR_VERSION < 8 */
- nameString = objv[1];
-#endif
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* param = (struct th_vwait_param *)Tcl_Alloc(sizeof(struct th_vwait_param)); */
- param = RbTk_ALLOC_N(struct th_vwait_param, 1);
-#if 1 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)param);
-#endif
- param->thread = current_thread;
- param->done = 0;
-
- /*
- if (Tcl_TraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- rb_threadVwaitProc, (ClientData) param) != TCL_OK) {
- return TCL_ERROR;
- }
- */
- ret = Tcl_TraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- rb_threadVwaitProc, (ClientData) param);
-
- rb_thread_critical = thr_crit_bup;
-
- if (ret != TCL_OK) {
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)param, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 1 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)param);
-#else
- /* Tcl_Free((char *)param); */
- ckfree((char *)param);
-#endif
-#endif
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[1]);
-#endif
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- t.tv_sec = 0;
- t.tv_usec = (long)((EVENT_HANDLER_TIMEOUT)*1000.0);
-
- while(!param->done) {
- /* rb_thread_stop(); */
- /* rb_thread_sleep_forever(); */
- rb_thread_wait_for(t);
- if (NIL_P(eventloop_thread)) {
- break;
- }
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- if (param->done > 0) {
- Tcl_UntraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- rb_threadVwaitProc, (ClientData) param);
- }
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)param, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 1 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)param);
-#else
- /* Tcl_Free((char *)param); */
- ckfree((char *)param);
-#endif
-#endif
-
- rb_thread_critical = thr_crit_bup;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[1]);
-#endif
- Tcl_Release(interp);
- return TCL_OK;
-}
-
-#if TCL_MAJOR_VERSION >= 8
-static int
-ip_rb_threadTkWaitObjCmd(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- Tcl_Obj *CONST objv[];
-#else /* TCL_MAJOR_VERSION < 8 */
-static int
-ip_rb_threadTkWaitCommand(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- char *objv[];
-#endif
-{
- struct th_vwait_param *param;
- Tk_Window tkwin = (Tk_Window) clientData;
- Tk_Window window;
- int index;
- static CONST char *optionStrings[] = { "variable", "visibility", "window",
- (char *) NULL };
- enum options { TKWAIT_VARIABLE, TKWAIT_VISIBILITY, TKWAIT_WINDOW };
- char *nameString;
- int ret, dummy;
- int thr_crit_bup;
- volatile VALUE current_thread = rb_thread_current();
- struct timeval t;
-
- DUMP1("Ruby's 'thread_tkwait' is called");
- if (interp == (Tcl_Interp*)NULL) {
- rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
- "IP is deleted");
- return TCL_ERROR;
- }
-
- if (rb_thread_alone() || eventloop_thread == current_thread) {
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("call ip_rbTkWaitObjCmd");
- DUMP2("eventloop_thread %"PRIxVALUE, eventloop_thread);
- DUMP2("current_thread %"PRIxVALUE, current_thread);
- return ip_rbTkWaitObjCmd(clientData, interp, objc, objv);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("call rb_VwaitCommand");
- return ip_rbTkWaitCommand(clientData, interp, objc, objv);
-#endif
- }
-
- Tcl_Preserve(interp);
- Tcl_Preserve(tkwin);
-
- Tcl_ResetResult(interp);
-
- if (objc != 3) {
-#ifdef Tcl_WrongNumArgs
- Tcl_WrongNumArgs(interp, 1, objv, "variable|visibility|window name");
-#else
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- Tcl_GetStringFromObj(objv[0], &dummy),
- " variable|visibility|window name\"",
- (char *) NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- objv[0], " variable|visibility|window name\"",
- (char *) NULL);
-#endif
-
- rb_thread_critical = thr_crit_bup;
-#endif
-
- Tcl_Release(tkwin);
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
-#if TCL_MAJOR_VERSION >= 8
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
- /*
- if (Tcl_GetIndexFromObj(interp, objv[1],
- (CONST84 char **)optionStrings,
- "option", 0, &index) != TCL_OK) {
- return TCL_ERROR;
- }
- */
- ret = Tcl_GetIndexFromObj(interp, objv[1],
- (CONST84 char **)optionStrings,
- "option", 0, &index);
-
- rb_thread_critical = thr_crit_bup;
-
- if (ret != TCL_OK) {
- Tcl_Release(tkwin);
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-#else /* TCL_MAJOR_VERSION < 8 */
- {
- int c = objv[1][0];
- size_t length = strlen(objv[1]);
-
- if ((c == 'v') && (strncmp(objv[1], "variable", length) == 0)
- && (length >= 2)) {
- index = TKWAIT_VARIABLE;
- } else if ((c == 'v') && (strncmp(objv[1], "visibility", length) == 0)
- && (length >= 2)) {
- index = TKWAIT_VISIBILITY;
- } else if ((c == 'w') && (strncmp(objv[1], "window", length) == 0)) {
- index = TKWAIT_WINDOW;
- } else {
- Tcl_AppendResult(interp, "bad option \"", objv[1],
- "\": must be variable, visibility, or window",
- (char *) NULL);
- Tcl_Release(tkwin);
- Tcl_Release(interp);
- return TCL_ERROR;
- }
- }
-#endif
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_IncrRefCount(objv[2]);
- /* nameString = Tcl_GetString(objv[2]); */
- nameString = Tcl_GetStringFromObj(objv[2], &dummy);
-#else /* TCL_MAJOR_VERSION < 8 */
- nameString = objv[2];
-#endif
-
- /* param = (struct th_vwait_param *)Tcl_Alloc(sizeof(struct th_vwait_param)); */
- param = RbTk_ALLOC_N(struct th_vwait_param, 1);
-#if 1 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)param);
-#endif
- param->thread = current_thread;
- param->done = 0;
-
- rb_thread_critical = thr_crit_bup;
-
- switch ((enum options) index) {
- case TKWAIT_VARIABLE:
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
- /*
- if (Tcl_TraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- rb_threadVwaitProc, (ClientData) param) != TCL_OK) {
- return TCL_ERROR;
- }
- */
- ret = Tcl_TraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- rb_threadVwaitProc, (ClientData) param);
-
- rb_thread_critical = thr_crit_bup;
-
- if (ret != TCL_OK) {
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)param, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 1 /* use Tcl_Preserve/Release */
- Tcl_Release(param);
-#else
- /* Tcl_Free((char *)param); */
- ckfree((char *)param);
-#endif
-#endif
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
-
- Tcl_Release(tkwin);
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- t.tv_sec = 0;
- t.tv_usec = (long)((EVENT_HANDLER_TIMEOUT)*1000.0);
-
- while(!param->done) {
- /* rb_thread_stop(); */
- /* rb_thread_sleep_forever(); */
- rb_thread_wait_for(t);
- if (NIL_P(eventloop_thread)) {
- break;
- }
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- if (param->done > 0) {
- Tcl_UntraceVar(interp, nameString,
- TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- rb_threadVwaitProc, (ClientData) param);
- }
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
-
- rb_thread_critical = thr_crit_bup;
-
- break;
-
- case TKWAIT_VISIBILITY:
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if 0 /* variable 'tkwin' must keep the token of MainWindow */
- if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
- window = NULL;
- } else {
- window = Tk_NameToWindow(interp, nameString, tkwin);
- }
-#else
- if (!tk_stubs_init_p() || tkwin == (Tk_Window)NULL) {
- window = NULL;
- } else {
- /* Tk_NameToWindow() returns right token on non-eventloop thread */
- Tcl_CmdInfo info;
- if (Tcl_GetCommandInfo(interp, ".", &info)) { /* check root */
- window = Tk_NameToWindow(interp, nameString, tkwin);
- } else {
- window = NULL;
- }
- }
-#endif
-
- if (window == NULL) {
- Tcl_AppendResult(interp, ": thread_tkwait: ",
- "no main-window (not Tk application?)",
- (char*)NULL);
-
- rb_thread_critical = thr_crit_bup;
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)param, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 1 /* use Tcl_Preserve/Release */
- Tcl_Release(param);
-#else
- /* Tcl_Free((char *)param); */
- ckfree((char *)param);
-#endif
-#endif
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
- Tcl_Release(tkwin);
- Tcl_Release(interp);
- return TCL_ERROR;
- }
- Tcl_Preserve(window);
-
- Tk_CreateEventHandler(window,
- VisibilityChangeMask|StructureNotifyMask,
- rb_threadWaitVisibilityProc, (ClientData) param);
-
- rb_thread_critical = thr_crit_bup;
-
- t.tv_sec = 0;
- t.tv_usec = (long)((EVENT_HANDLER_TIMEOUT)*1000.0);
-
- while(param->done != TKWAIT_MODE_VISIBILITY) {
- if (param->done == TKWAIT_MODE_DESTROY) break;
- /* rb_thread_stop(); */
- /* rb_thread_sleep_forever(); */
- rb_thread_wait_for(t);
- if (NIL_P(eventloop_thread)) {
- break;
- }
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* when a window is destroyed, no need to call Tk_DeleteEventHandler */
- if (param->done != TKWAIT_MODE_DESTROY) {
- Tk_DeleteEventHandler(window,
- VisibilityChangeMask|StructureNotifyMask,
- rb_threadWaitVisibilityProc,
- (ClientData) param);
- }
-
- if (param->done != 1) {
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "window \"", nameString,
- "\" was deleted before its visibility changed",
- (char *) NULL);
-
- rb_thread_critical = thr_crit_bup;
-
- Tcl_Release(window);
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)param, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 1 /* use Tcl_Preserve/Release */
- Tcl_Release(param);
-#else
- /* Tcl_Free((char *)param); */
- ckfree((char *)param);
-#endif
-#endif
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
-
- Tcl_Release(tkwin);
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- Tcl_Release(window);
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
-
- rb_thread_critical = thr_crit_bup;
-
- break;
-
- case TKWAIT_WINDOW:
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if 0 /* variable 'tkwin' must keep the token of MainWindow */
- if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
- window = NULL;
- } else {
- window = Tk_NameToWindow(interp, nameString, tkwin);
- }
-#else
- if (!tk_stubs_init_p() || tkwin == (Tk_Window)NULL) {
- window = NULL;
- } else {
- /* Tk_NameToWindow() returns right token on non-eventloop thread */
- Tcl_CmdInfo info;
- if (Tcl_GetCommandInfo(interp, ".", &info)) { /* check root */
- window = Tk_NameToWindow(interp, nameString, tkwin);
- } else {
- window = NULL;
- }
- }
-#endif
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[2]);
-#endif
-
- if (window == NULL) {
- Tcl_AppendResult(interp, ": thread_tkwait: ",
- "no main-window (not Tk application?)",
- (char*)NULL);
-
- rb_thread_critical = thr_crit_bup;
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)param, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 1 /* use Tcl_Preserve/Release */
- Tcl_Release(param);
-#else
- /* Tcl_Free((char *)param); */
- ckfree((char *)param);
-#endif
-#endif
-
- Tcl_Release(tkwin);
- Tcl_Release(interp);
- return TCL_ERROR;
- }
-
- Tcl_Preserve(window);
-
- Tk_CreateEventHandler(window, StructureNotifyMask,
- rb_threadWaitWindowProc, (ClientData) param);
-
- rb_thread_critical = thr_crit_bup;
-
- t.tv_sec = 0;
- t.tv_usec = (long)((EVENT_HANDLER_TIMEOUT)*1000.0);
-
- while(param->done != TKWAIT_MODE_DESTROY) {
- /* rb_thread_stop(); */
- /* rb_thread_sleep_forever(); */
- rb_thread_wait_for(t);
- if (NIL_P(eventloop_thread)) {
- break;
- }
- }
-
- Tcl_Release(window);
-
- /* when a window is destroyed, no need to call Tk_DeleteEventHandler
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- Tk_DeleteEventHandler(window, StructureNotifyMask,
- rb_threadWaitWindowProc, (ClientData) param);
-
- rb_thread_critical = thr_crit_bup;
- */
-
- break;
- } /* end of 'switch' statement */
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)param, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 1 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)param);
-#else
- /* Tcl_Free((char *)param); */
- ckfree((char *)param);
-#endif
-#endif
-
- /*
- * Clear out the interpreter's result, since it may have been set
- * by event handlers.
- */
-
- Tcl_ResetResult(interp);
-
- Tcl_Release(tkwin);
- Tcl_Release(interp);
- return TCL_OK;
-}
-
-static VALUE
-ip_thread_vwait(self, var)
- VALUE self;
- VALUE var;
-{
- VALUE argv[2];
- volatile VALUE cmd_str = rb_str_new2("thread_vwait");
-
- argv[0] = cmd_str;
- argv[1] = var;
-
- return ip_invoke_with_position(2, argv, self, TCL_QUEUE_TAIL);
-}
-
-static VALUE
-ip_thread_tkwait(self, mode, target)
- VALUE self;
- VALUE mode;
- VALUE target;
-{
- VALUE argv[3];
- volatile VALUE cmd_str = rb_str_new2("thread_tkwait");
-
- argv[0] = cmd_str;
- argv[1] = mode;
- argv[2] = target;
-
- return ip_invoke_with_position(3, argv, self, TCL_QUEUE_TAIL);
-}
-
-
-/* delete slave interpreters */
-#if TCL_MAJOR_VERSION >= 8
-static void
-delete_slaves(ip)
- Tcl_Interp *ip;
-{
- int thr_crit_bup;
- Tcl_Interp *slave;
- Tcl_Obj *slave_list, *elem;
- char *slave_name;
- int i, len;
-
- DUMP1("delete slaves");
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- if (!Tcl_InterpDeleted(ip) && Tcl_Eval(ip, "interp slaves") == TCL_OK) {
- slave_list = Tcl_GetObjResult(ip);
- Tcl_IncrRefCount(slave_list);
-
- if (Tcl_ListObjLength((Tcl_Interp*)NULL, slave_list, &len) == TCL_OK) {
- for(i = 0; i < len; i++) {
- Tcl_ListObjIndex((Tcl_Interp*)NULL, slave_list, i, &elem);
-
- if (elem == (Tcl_Obj*)NULL) continue;
-
- Tcl_IncrRefCount(elem);
-
- /* get slave */
- /* slave_name = Tcl_GetString(elem); */
- slave_name = Tcl_GetStringFromObj(elem, (int*)NULL);
- DUMP2("delete slave:'%s'", slave_name);
-
- Tcl_DecrRefCount(elem);
-
- slave = Tcl_GetSlave(ip, slave_name);
- if (slave == (Tcl_Interp*)NULL) continue;
-
- if (!Tcl_InterpDeleted(slave)) {
- /* call ip_finalize */
- ip_finalize(slave);
-
- Tcl_DeleteInterp(slave);
- /* Tcl_Release(slave); */
- }
- }
- }
-
- Tcl_DecrRefCount(slave_list);
- }
-
- rb_thread_critical = thr_crit_bup;
-}
-#else /* TCL_MAJOR_VERSION < 8 */
-static void
-delete_slaves(ip)
- Tcl_Interp *ip;
-{
- int thr_crit_bup;
- Tcl_Interp *slave;
- int argc;
- char **argv;
- char *slave_list;
- char *slave_name;
- int i, len;
-
- DUMP1("delete slaves");
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- if (!Tcl_InterpDeleted(ip) && Tcl_Eval(ip, "interp slaves") == TCL_OK) {
- slave_list = ip->result;
- if (Tcl_SplitList((Tcl_Interp*)NULL,
- slave_list, &argc, &argv) == TCL_OK) {
- for(i = 0; i < argc; i++) {
- slave_name = argv[i];
-
- DUMP2("delete slave:'%s'", slave_name);
-
- slave = Tcl_GetSlave(ip, slave_name);
- if (slave == (Tcl_Interp*)NULL) continue;
-
- if (!Tcl_InterpDeleted(slave)) {
- /* call ip_finalize */
- ip_finalize(slave);
-
- Tcl_DeleteInterp(slave);
- }
- }
- }
- }
-
- rb_thread_critical = thr_crit_bup;
-}
-#endif
-
-
-/* finalize operation */
-static void
-#ifdef HAVE_PROTOTYPES
-lib_mark_at_exit(VALUE self)
-#else
-lib_mark_at_exit(self)
- VALUE self;
-#endif
-{
- at_exit = 1;
-}
-
-static int
-#if TCL_MAJOR_VERSION >= 8
-#ifdef HAVE_PROTOTYPES
-ip_null_proc(ClientData clientData, Tcl_Interp *interp,
- int argc, Tcl_Obj *CONST argv[])
-#else
-ip_null_proc(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- Tcl_Obj *CONST argv[];
-#endif
-#else /* TCL_MAJOR_VERSION < 8 */
-#ifdef HAVE_PROTOTYPES
-ip_null_proc(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
-#else
-ip_null_proc(clientData, interp, argc, argv)
- ClientData clientData;
- Tcl_Interp *interp;
- int argc;
- char *argv[];
-#endif
-#endif
-{
- Tcl_ResetResult(interp);
- return TCL_OK;
-}
-
-static void
-ip_finalize(ip)
- Tcl_Interp *ip;
-{
- Tcl_CmdInfo info;
- int thr_crit_bup;
-
- VALUE rb_debug_bup, rb_verbose_bup;
- /* When ruby is exiting, printing debug messages in some callback
- operations from Tcl-IP sometimes cause SEGV. I don't know the
- reason. But I got SEGV when calling "rb_io_write(rb_stdout, ...)".
- So, in some part of this function, debug mode and verbose mode
- are disabled. If you know the reason, please fix it.
- -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) */
-
- DUMP1("start ip_finalize");
-
- if (ip == (Tcl_Interp*)NULL) {
- DUMP1("ip is NULL");
- return;
- }
-
- if (Tcl_InterpDeleted(ip)) {
- DUMP2("ip(%p) is already deleted", ip);
- return;
- }
-
-#if TCL_NAMESPACE_DEBUG
- if (ip_null_namespace(ip)) {
- DUMP2("ip(%p) has null namespace", ip);
- return;
- }
-#endif
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- rb_debug_bup = ruby_debug;
- rb_verbose_bup = ruby_verbose;
-
- Tcl_Preserve(ip);
-
- /* delete slaves */
- delete_slaves(ip);
-
- /* shut off some connections from Tcl-proc to Ruby */
- if (at_exit) {
- /* NOTE: Only when at exit.
- Because, ruby removes objects, which depends on the deleted
- interpreter, on some callback operations.
- It is important for GC. */
-#if TCL_MAJOR_VERSION >= 8
- Tcl_CreateObjCommand(ip, "ruby", ip_null_proc,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
- Tcl_CreateObjCommand(ip, "ruby_eval", ip_null_proc,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
- Tcl_CreateObjCommand(ip, "ruby_cmd", ip_null_proc,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- Tcl_CreateCommand(ip, "ruby", ip_null_proc,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
- Tcl_CreateCommand(ip, "ruby_eval", ip_null_proc,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
- Tcl_CreateCommand(ip, "ruby_cmd", ip_null_proc,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#endif
- /*
- rb_thread_critical = thr_crit_bup;
- return;
- */
- }
-
- /* delete root widget */
-#ifdef RUBY_VM
- /* cause SEGV on Ruby 1.9 */
-#else
- DUMP1("check `destroy'");
- if (Tcl_GetCommandInfo(ip, "destroy", &info)) {
- DUMP1("call `destroy .'");
- Tcl_GlobalEval(ip, "catch {destroy .}");
- }
-#endif
-#if 1
- DUMP1("destroy root widget");
- if (tk_stubs_init_p() && Tk_MainWindow(ip) != (Tk_Window)NULL) {
- /*
- * On Ruby VM, this code piece may be not called, because
- * Tk_MainWindow() returns NULL on a native thread except
- * the thread which initialize Tk environment.
- * Of course, that is a problem. But maybe not so serious.
- * All widgets are destroyed when the Tcl interp is deleted.
- * At then, Ruby may raise exceptions on the delete hook
- * callbacks which registered for the deleted widgets, and
- * may fail to clear objects which depends on the widgets.
- * Although it is the problem, it is possibly avoidable by
- * rescuing exceptions and the finalize hook of the interp.
- */
- Tk_Window win = Tk_MainWindow(ip);
-
- DUMP1("call Tk_DestroyWindow");
- ruby_debug = Qfalse;
- ruby_verbose = Qnil;
- if (! (((Tk_FakeWin*)win)->flags & TK_ALREADY_DEAD)) {
- Tk_DestroyWindow(win);
- }
- ruby_debug = rb_debug_bup;
- ruby_verbose = rb_verbose_bup;
- }
-#endif
-
- /* call finalize-hook-proc */
- DUMP1("check `finalize-hook-proc'");
- if ( Tcl_GetCommandInfo(ip, finalize_hook_name, &info)) {
- DUMP2("call finalize hook proc '%s'", finalize_hook_name);
- ruby_debug = Qfalse;
- ruby_verbose = Qnil;
- Tcl_GlobalEval(ip, finalize_hook_name);
- ruby_debug = rb_debug_bup;
- ruby_verbose = rb_verbose_bup;
- }
-
- DUMP1("check `foreach' & `after'");
- if ( Tcl_GetCommandInfo(ip, "foreach", &info)
- && Tcl_GetCommandInfo(ip, "after", &info) ) {
- DUMP1("cancel after callbacks");
- ruby_debug = Qfalse;
- ruby_verbose = Qnil;
- Tcl_GlobalEval(ip, "catch {foreach id [after info] {after cancel $id}}");
- ruby_debug = rb_debug_bup;
- ruby_verbose = rb_verbose_bup;
- }
-
- Tcl_Release(ip);
-
- DUMP1("finish ip_finalize");
- ruby_debug = rb_debug_bup;
- ruby_verbose = rb_verbose_bup;
- rb_thread_critical = thr_crit_bup;
-}
-
-
-/* destroy interpreter */
-static void
-ip_free(p)
- void *p;
-{
- struct tcltkip *ptr = p;
- int thr_crit_bup;
-
- DUMP2("free Tcl Interp %p", ptr->ip);
- if (ptr) {
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- if ( ptr->ip != (Tcl_Interp*)NULL
- && !Tcl_InterpDeleted(ptr->ip)
- && Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL
- && !Tcl_InterpDeleted(Tcl_GetMaster(ptr->ip)) ) {
- DUMP2("parent IP(%p) is not deleted",
- Tcl_GetMaster(ptr->ip));
- DUMP2("slave IP(%p) should not be deleted",
- ptr->ip);
- xfree(ptr);
- /* ckfree((char*)ptr); */
- rb_thread_critical = thr_crit_bup;
- return;
- }
-
- if (ptr->ip == (Tcl_Interp*)NULL) {
- DUMP1("ip_free is called for deleted IP");
- xfree(ptr);
- /* ckfree((char*)ptr); */
- rb_thread_critical = thr_crit_bup;
- return;
- }
-
- if (!Tcl_InterpDeleted(ptr->ip)) {
- ip_finalize(ptr->ip);
-
- Tcl_DeleteInterp(ptr->ip);
- Tcl_Release(ptr->ip);
- }
-
- ptr->ip = (Tcl_Interp*)NULL;
- xfree(ptr);
- /* ckfree((char*)ptr); */
-
- rb_thread_critical = thr_crit_bup;
- }
-
- DUMP1("complete freeing Tcl Interp");
-}
-
-
-/* create and initialize interpreter */
-static VALUE ip_alloc _((VALUE));
-static VALUE
-ip_alloc(self)
- VALUE self;
-{
- return TypedData_Wrap_Struct(self, &tcltkip_type, 0);
-}
-
-static void
-ip_replace_wait_commands(interp, mainWin)
- Tcl_Interp *interp;
- Tk_Window mainWin;
-{
- /* replace 'vwait' command */
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"vwait\")");
- Tcl_CreateObjCommand(interp, "vwait", ip_rbVwaitObjCmd,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"vwait\")");
- Tcl_CreateCommand(interp, "vwait", ip_rbVwaitCommand,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* replace 'tkwait' command */
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"tkwait\")");
- Tcl_CreateObjCommand(interp, "tkwait", ip_rbTkWaitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"tkwait\")");
- Tcl_CreateCommand(interp, "tkwait", ip_rbTkWaitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* add 'thread_vwait' command */
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"thread_vwait\")");
- Tcl_CreateObjCommand(interp, "thread_vwait", ip_rb_threadVwaitObjCmd,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"thread_vwait\")");
- Tcl_CreateCommand(interp, "thread_vwait", ip_rb_threadVwaitCommand,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* add 'thread_tkwait' command */
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"thread_tkwait\")");
- Tcl_CreateObjCommand(interp, "thread_tkwait", ip_rb_threadTkWaitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"thread_tkwait\")");
- Tcl_CreateCommand(interp, "thread_tkwait", ip_rb_threadTkWaitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* replace 'update' command */
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"update\")");
- Tcl_CreateObjCommand(interp, "update", ip_rbUpdateObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"update\")");
- Tcl_CreateCommand(interp, "update", ip_rbUpdateCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* add 'thread_update' command */
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"thread_update\")");
- Tcl_CreateObjCommand(interp, "thread_update", ip_rb_threadUpdateObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"thread_update\")");
- Tcl_CreateCommand(interp, "thread_update", ip_rb_threadUpdateCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
-}
-
-
-#if TCL_MAJOR_VERSION >= 8
-static int
-ip_rb_replaceSlaveTkCmdsObjCmd(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- Tcl_Obj *CONST objv[];
-#else /* TCL_MAJOR_VERSION < 8 */
-static int
-ip_rb_replaceSlaveTkCmdsCommand(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- char *objv[];
-#endif
-{
- char *slave_name;
- Tcl_Interp *slave;
- Tk_Window mainWin;
-
- if (objc != 2) {
-#ifdef Tcl_WrongNumArgs
- Tcl_WrongNumArgs(interp, 1, objv, "slave_name");
-#else
- char *nameString;
-#if TCL_MAJOR_VERSION >= 8
- nameString = Tcl_GetStringFromObj(objv[0], (int*)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- nameString = objv[0];
-#endif
- Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
- nameString, " slave_name\"", (char *) NULL);
-#endif
- }
-
-#if TCL_MAJOR_VERSION >= 8
- slave_name = Tcl_GetStringFromObj(objv[1], (int*)NULL);
-#else
- slave_name = objv[1];
-#endif
-
- slave = Tcl_GetSlave(interp, slave_name);
- if (slave == NULL) {
- Tcl_AppendResult(interp, "cannot find slave \"",
- slave_name, "\"", (char *)NULL);
- return TCL_ERROR;
- }
- mainWin = Tk_MainWindow(slave);
-
- /* replace 'exit' command --> 'interp_exit' command */
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
- Tcl_CreateObjCommand(slave, "exit", ip_InterpExitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
- Tcl_CreateCommand(slave, "exit", ip_InterpExitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* replace vwait and tkwait */
- ip_replace_wait_commands(slave, mainWin);
-
- return TCL_OK;
-}
-
-#ifndef ORIG_NAMESPACE_CMD
-#define ORIG_NAMESPACE_CMD "__orig_namespace_command__"
-#endif
-
-#if TCL_MAJOR_VERSION >= 8
-static int ip_rbNamespaceObjCmd _((ClientData, Tcl_Interp *, int,
- Tcl_Obj *CONST []));
-static int
-ip_rbNamespaceObjCmd(clientData, interp, objc, objv)
- ClientData clientData;
- Tcl_Interp *interp;
- int objc;
- Tcl_Obj *CONST objv[];
-{
- Tcl_CmdInfo info;
- int ret;
-
- DUMP1("call ip_rbNamespaceObjCmd");
- DUMP2("objc = %d", objc);
- DUMP2("objv[0] = '%s'", Tcl_GetString(objv[0]));
- DUMP2("objv[1] = '%s'", Tcl_GetString(objv[1]));
- if (!Tcl_GetCommandInfo(interp, ORIG_NAMESPACE_CMD, &(info))) {
- DUMP1("fail to get "ORIG_NAMESPACE_CMD);
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp,
- "invalid command name \"namespace\"", (char*)NULL);
- return TCL_ERROR;
- }
-
- rbtk_eventloop_depth++;
- DUMP2("namespace wrapper enter depth == %d", rbtk_eventloop_depth);
-
- if (info.isNativeObjectProc) {
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6
- DUMP1("call a native-object-proc");
- ret = (*(info.objProc))(info.objClientData, interp, objc, objv);
-#else
- /* Tcl8.6 or later */
- int i;
- Tcl_Obj **cp_objv;
- char org_ns_cmd_name[] = ORIG_NAMESPACE_CMD;
-
- DUMP1("call a native-object-proc for tcl8.6 or later");
- cp_objv = RbTk_ALLOC_N(Tcl_Obj *, (objc + 1));
-
- cp_objv[0] = Tcl_NewStringObj(org_ns_cmd_name, strlen(org_ns_cmd_name));
- for(i = 1; i < objc; i++) {
- cp_objv[i] = objv[i];
- }
- cp_objv[objc] = (Tcl_Obj *)NULL;
-
- /* ret = Tcl_EvalObjv(interp, objc, cp_objv, TCL_EVAL_DIRECT); */
- ret = Tcl_EvalObjv(interp, objc, cp_objv, 0);
-
- ckfree((char*)cp_objv);
-#endif
- } else {
- /* string interface */
- int i;
- char **argv;
-
- DUMP1("call with the string-interface");
- /* argv = (char **)Tcl_Alloc(sizeof(char *) * (objc + 1)); */
- argv = RbTk_ALLOC_N(char *, (objc + 1));
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)argv); /* XXXXXXXX */
-#endif
-
- for(i = 0; i < objc; i++) {
- /* argv[i] = Tcl_GetString(objv[i]); */
- argv[i] = Tcl_GetStringFromObj(objv[i], (int*)NULL);
- }
- argv[objc] = (char *)NULL;
-
- ret = (*(info.proc))(info.clientData, interp,
- objc, (CONST84 char **)argv);
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)argv, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)argv); /* XXXXXXXX */
-#else
- /* Tcl_Free((char*)argv); */
- ckfree((char*)argv);
-#endif
-#endif
- }
-
- DUMP2("namespace wrapper exit depth == %d", rbtk_eventloop_depth);
- rbtk_eventloop_depth--;
-
- DUMP1("end of ip_rbNamespaceObjCmd");
- return ret;
-}
-#endif
-
-static void
-ip_wrap_namespace_command(interp)
- Tcl_Interp *interp;
-{
-#if TCL_MAJOR_VERSION >= 8
-
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6
- Tcl_CmdInfo orig_info;
-
- if (!Tcl_GetCommandInfo(interp, "namespace", &(orig_info))) {
- return;
- }
-
- if (orig_info.isNativeObjectProc) {
- Tcl_CreateObjCommand(interp, ORIG_NAMESPACE_CMD,
- orig_info.objProc, orig_info.objClientData,
- orig_info.deleteProc);
- } else {
- Tcl_CreateCommand(interp, ORIG_NAMESPACE_CMD,
- orig_info.proc, orig_info.clientData,
- orig_info.deleteProc);
- }
-
-#else /* tcl8.6 or later */
- Tcl_Eval(interp, "rename namespace "ORIG_NAMESPACE_CMD);
-
-#endif
-
- Tcl_CreateObjCommand(interp, "namespace", ip_rbNamespaceObjCmd,
- (ClientData) 0, (Tcl_CmdDeleteProc *)NULL);
-#endif
-}
-
-
-/* call when interpreter is deleted */
-static void
-#ifdef HAVE_PROTOTYPES
-ip_CallWhenDeleted(ClientData clientData, Tcl_Interp *ip)
-#else
-ip_CallWhenDeleted(clientData, ip)
- ClientData clientData;
- Tcl_Interp *ip;
-#endif
-{
- int thr_crit_bup;
- /* Tk_Window main_win = (Tk_Window) clientData; */
-
- DUMP1("start ip_CallWhenDeleted");
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- ip_finalize(ip);
-
- DUMP1("finish ip_CallWhenDeleted");
- rb_thread_critical = thr_crit_bup;
-}
-
-/*--------------------------------------------------------*/
-
-/* initialize interpreter */
-static VALUE
-ip_init(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- struct tcltkip *ptr; /* tcltkip data struct */
- VALUE argv0, opts;
- int cnt;
- int st;
- int with_tk = 1;
- Tk_Window mainWin = (Tk_Window)NULL;
-
- /* create object */
- TypedData_Get_Struct(self, struct tcltkip, &tcltkip_type, ptr);
- if (DATA_PTR(self)) {
- rb_raise(rb_eArgError, "already initialized interpreter");
- }
- ptr = ALLOC(struct tcltkip);
- /* ptr = RbTk_ALLOC_N(struct tcltkip, 1); */
- DATA_PTR(self) = ptr;
-#ifdef RUBY_USE_NATIVE_THREAD
- ptr->tk_thread_id = 0;
-#endif
- ptr->ref_count = 0;
- ptr->allow_ruby_exit = 1;
- ptr->return_value = 0;
-
- /* from Tk_Main() */
- DUMP1("Tcl_CreateInterp");
- ptr->ip = ruby_tcl_create_ip_and_stubs_init(&st);
- if (ptr->ip == NULL) {
- switch(st) {
- case TCLTK_STUBS_OK:
- break;
- case NO_TCL_DLL:
- rb_raise(rb_eLoadError, "tcltklib: fail to open tcl_dll");
- case NO_FindExecutable:
- rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_FindExecutable");
- case NO_CreateInterp:
- rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_CreateInterp()");
- case NO_DeleteInterp:
- rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_DeleteInterp()");
- case FAIL_CreateInterp:
- rb_raise(rb_eRuntimeError, "tcltklib: fail to create a new IP");
- case FAIL_Tcl_InitStubs:
- rb_raise(rb_eRuntimeError, "tcltklib: fail to Tcl_InitStubs()");
- default:
- rb_raise(rb_eRuntimeError, "tcltklib: unknown error(%d) on ruby_tcl_create_ip_and_stubs_init", st);
- }
- }
-
-#if TCL_MAJOR_VERSION >= 8
-#if TCL_NAMESPACE_DEBUG
- DUMP1("get current namespace");
- if ((ptr->default_ns = Tcl_GetCurrentNamespace(ptr->ip))
- == (Tcl_Namespace*)NULL) {
- rb_raise(rb_eRuntimeError, "a new Tk interpreter has a NULL namespace");
- }
-#endif
-#endif
-
- rbtk_preserve_ip(ptr);
- DUMP2("IP ref_count = %d", ptr->ref_count);
- current_interp = ptr->ip;
-
- ptr->has_orig_exit
- = Tcl_GetCommandInfo(ptr->ip, "exit", &(ptr->orig_exit_info));
-
-#if defined CREATE_RUBYTK_KIT || defined CREATE_RUBYKIT
- call_tclkit_init_script(current_interp);
-
-# if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION > 84
- {
- Tcl_DString encodingName;
- Tcl_GetEncodingNameFromEnvironment(&encodingName);
- if (strcmp(Tcl_DStringValue(&encodingName), Tcl_GetEncodingName(NULL))) {
- /* fails, so we set a variable and do it in the boot.tcl script */
- Tcl_SetSystemEncoding(NULL, Tcl_DStringValue(&encodingName));
- }
- Tcl_SetVar(current_interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), 0);
- Tcl_DStringFree(&encodingName);
- }
-# endif
-#endif
-
- /* set variables */
- Tcl_Eval(ptr->ip, "set argc 0; set argv {}; set argv0 tcltklib.so");
-
- cnt = rb_scan_args(argc, argv, "02", &argv0, &opts);
- switch(cnt) {
- case 2:
- /* options */
- if (NIL_P(opts) || opts == Qfalse) {
- /* without Tk */
- with_tk = 0;
- } else {
- /* Tcl_SetVar(ptr->ip, "argv", StringValueCStr(opts), 0); */
- Tcl_SetVar(ptr->ip, "argv", StringValueCStr(opts), TCL_GLOBAL_ONLY);
- Tcl_Eval(ptr->ip, "set argc [llength $argv]");
- }
- case 1:
- /* argv0 */
- if (!NIL_P(argv0)) {
- const char *name = StringValueCStr(argv0);
- long len = RSTRING_LEN(argv0);
- int flag = TCL_GLOBAL_ONLY;
- if ((len == 2 && memcmp(name, "-e", 2) == 0)
- || (len == 1 && memcmp(name, "-", 1) == 0)) {
- name = "ruby";
- } else {
- /* flag = 0; */
- }
- Tcl_SetVar(ptr->ip, "argv0", name, flag);
- }
- case 0:
- /* no args */
- ;
- }
-
- /* from Tcl_AppInit() */
- DUMP1("Tcl_Init");
-#if (defined CREATE_RUBYTK_KIT || defined CREATE_RUBYKIT) && (!defined KIT_LITE) && (10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION == 85)
- /*************************************************************************/
- /* FIX ME (2010/06/28) */
- /* Don't use ::chan command for Mk4tcl + tclvfs-1.4 on Tcl8.5. */
- /* It fails to access VFS files because of vfs::zstream. */
- /* So, force to use ::rechan by temporarily hiding ::chan. */
- /*************************************************************************/
- Tcl_Eval(ptr->ip, "catch {rename ::chan ::_tmp_chan}");
- if (Tcl_Init(ptr->ip) == TCL_ERROR) {
- rb_raise(rb_eRuntimeError, "%s", Tcl_GetStringResult(ptr->ip));
- }
- Tcl_Eval(ptr->ip, "catch {rename ::_tmp_chan ::chan}");
-#else
- if (Tcl_Init(ptr->ip) == TCL_ERROR) {
- rb_raise(rb_eRuntimeError, "%s", Tcl_GetStringResult(ptr->ip));
- }
-#endif
-
- st = ruby_tcl_stubs_init();
- /* from Tcl_AppInit() */
- if (with_tk) {
- DUMP1("Tk_Init");
- st = ruby_tk_stubs_init(ptr->ip);
- switch(st) {
- case TCLTK_STUBS_OK:
- break;
- case NO_Tk_Init:
- rb_raise(rb_eLoadError, "tcltklib: can't find Tk_Init()");
- case FAIL_Tk_Init:
- rb_raise(rb_eRuntimeError, "tcltklib: fail to Tk_Init(). %s",
- Tcl_GetStringResult(ptr->ip));
- case FAIL_Tk_InitStubs:
- rb_raise(rb_eRuntimeError, "tcltklib: fail to Tk_InitStubs(). %s",
- Tcl_GetStringResult(ptr->ip));
- default:
- rb_raise(rb_eRuntimeError, "tcltklib: unknown error(%d) on ruby_tk_stubs_init", st);
- }
-
- DUMP1("Tcl_StaticPackage(\"Tk\")");
-#if TCL_MAJOR_VERSION >= 8
- Tcl_StaticPackage(ptr->ip, "Tk", Tk_Init, Tk_SafeInit);
-#else /* TCL_MAJOR_VERSION < 8 */
- Tcl_StaticPackage(ptr->ip, "Tk", Tk_Init,
- (Tcl_PackageInitProc *) NULL);
-#endif
-
-#ifdef RUBY_USE_NATIVE_THREAD
- /* set Tk thread ID */
- ptr->tk_thread_id = Tcl_GetCurrentThread();
-#endif
- /* get main window */
- mainWin = Tk_MainWindow(ptr->ip);
- Tk_Preserve((ClientData)mainWin);
- }
-
- /* add ruby command to the interpreter */
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"ruby\")");
- Tcl_CreateObjCommand(ptr->ip, "ruby", ip_ruby_eval, (ClientData)NULL,
- (Tcl_CmdDeleteProc *)NULL);
- DUMP1("Tcl_CreateObjCommand(\"ruby_eval\")");
- Tcl_CreateObjCommand(ptr->ip, "ruby_eval", ip_ruby_eval, (ClientData)NULL,
- (Tcl_CmdDeleteProc *)NULL);
- DUMP1("Tcl_CreateObjCommand(\"ruby_cmd\")");
- Tcl_CreateObjCommand(ptr->ip, "ruby_cmd", ip_ruby_cmd, (ClientData)NULL,
- (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"ruby\")");
- Tcl_CreateCommand(ptr->ip, "ruby", ip_ruby_eval, (ClientData)NULL,
- (Tcl_CmdDeleteProc *)NULL);
- DUMP1("Tcl_CreateCommand(\"ruby_eval\")");
- Tcl_CreateCommand(ptr->ip, "ruby_eval", ip_ruby_eval, (ClientData)NULL,
- (Tcl_CmdDeleteProc *)NULL);
- DUMP1("Tcl_CreateCommand(\"ruby_cmd\")");
- Tcl_CreateCommand(ptr->ip, "ruby_cmd", ip_ruby_cmd, (ClientData)NULL,
- (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* add 'interp_exit', 'ruby_exit' and replace 'exit' command */
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"interp_exit\")");
- Tcl_CreateObjCommand(ptr->ip, "interp_exit", ip_InterpExitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
- DUMP1("Tcl_CreateObjCommand(\"ruby_exit\")");
- Tcl_CreateObjCommand(ptr->ip, "ruby_exit", ip_RubyExitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
- DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"ruby_exit\"");
- Tcl_CreateObjCommand(ptr->ip, "exit", ip_RubyExitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"interp_exit\")");
- Tcl_CreateCommand(ptr->ip, "interp_exit", ip_InterpExitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
- DUMP1("Tcl_CreateCommand(\"ruby_exit\")");
- Tcl_CreateCommand(ptr->ip, "ruby_exit", ip_RubyExitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
- DUMP1("Tcl_CreateCommand(\"exit\") --> \"ruby_exit\"");
- Tcl_CreateCommand(ptr->ip, "exit", ip_RubyExitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* replace vwait and tkwait */
- ip_replace_wait_commands(ptr->ip, mainWin);
-
- /* wrap namespace command */
- ip_wrap_namespace_command(ptr->ip);
-
- /* define command to replace commands which depend on slave's MainWindow */
-#if TCL_MAJOR_VERSION >= 8
- Tcl_CreateObjCommand(ptr->ip, "__replace_slave_tk_commands__",
- ip_rb_replaceSlaveTkCmdsObjCmd,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- Tcl_CreateCommand(ptr->ip, "__replace_slave_tk_commands__",
- ip_rb_replaceSlaveTkCmdsCommand,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* set finalizer */
- Tcl_CallWhenDeleted(ptr->ip, ip_CallWhenDeleted, (ClientData)mainWin);
-
- if (mainWin != (Tk_Window)NULL) {
- Tk_Release((ClientData)mainWin);
- }
-
- return self;
-}
-
-static VALUE
-ip_create_slave_core(interp, argc, argv)
- VALUE interp;
- int argc;
- VALUE *argv;
-{
- struct tcltkip *master = get_ip(interp);
- struct tcltkip *slave;
- /* struct tcltkip *slave = RbTk_ALLOC_N(struct tcltkip, 1); */
- VALUE safemode;
- VALUE name;
- VALUE new_ip;
- int safe;
- int thr_crit_bup;
- Tk_Window mainWin;
-
- /* ip is deleted? */
- if (deleted_ip(master)) {
- return rb_exc_new2(rb_eRuntimeError,
- "deleted master cannot create a new slave");
- }
-
- name = argv[0];
- safemode = argv[1];
-
- if (Tcl_IsSafe(master->ip) == 1) {
- safe = 1;
- } else if (safemode == Qfalse || NIL_P(safemode)) {
- safe = 0;
- } else {
- safe = 1;
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if 0
- /* init Tk */
- if (RTEST(with_tk)) {
- volatile VALUE exc;
- if (!tk_stubs_init_p()) {
- exc = tcltkip_init_tk(interp);
- if (!NIL_P(exc)) {
- rb_thread_critical = thr_crit_bup;
- return exc;
- }
- }
- }
-#endif
-
- new_ip = TypedData_Make_Struct(CLASS_OF(interp), struct tcltkip,
- &tcltkip_type, slave);
- /* create slave-ip */
-#ifdef RUBY_USE_NATIVE_THREAD
- /* slave->tk_thread_id = 0; */
- slave->tk_thread_id = master->tk_thread_id; /* == current thread */
-#endif
- slave->ref_count = 0;
- slave->allow_ruby_exit = 0;
- slave->return_value = 0;
-
- slave->ip = Tcl_CreateSlave(master->ip, StringValueCStr(name), safe);
- if (slave->ip == NULL) {
- rb_thread_critical = thr_crit_bup;
- return rb_exc_new2(rb_eRuntimeError,
- "fail to create the new slave interpreter");
- }
-#if TCL_MAJOR_VERSION >= 8
-#if TCL_NAMESPACE_DEBUG
- slave->default_ns = Tcl_GetCurrentNamespace(slave->ip);
-#endif
-#endif
- rbtk_preserve_ip(slave);
-
- slave->has_orig_exit
- = Tcl_GetCommandInfo(slave->ip, "exit", &(slave->orig_exit_info));
-
- /* replace 'exit' command --> 'interp_exit' command */
- mainWin = (tk_stubs_init_p())? Tk_MainWindow(slave->ip): (Tk_Window)NULL;
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
- Tcl_CreateObjCommand(slave->ip, "exit", ip_InterpExitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
- Tcl_CreateCommand(slave->ip, "exit", ip_InterpExitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* replace vwait and tkwait */
- ip_replace_wait_commands(slave->ip, mainWin);
-
- /* wrap namespace command */
- ip_wrap_namespace_command(slave->ip);
-
- /* define command to replace cmds which depend on slave-slave's MainWin */
-#if TCL_MAJOR_VERSION >= 8
- Tcl_CreateObjCommand(slave->ip, "__replace_slave_tk_commands__",
- ip_rb_replaceSlaveTkCmdsObjCmd,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- Tcl_CreateCommand(slave->ip, "__replace_slave_tk_commands__",
- ip_rb_replaceSlaveTkCmdsCommand,
- (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- /* set finalizer */
- Tcl_CallWhenDeleted(slave->ip, ip_CallWhenDeleted, (ClientData)mainWin);
-
- rb_thread_critical = thr_crit_bup;
-
- return new_ip;
-}
-
-static VALUE
-ip_create_slave(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- struct tcltkip *master = get_ip(self);
- VALUE safemode;
- VALUE name;
- VALUE callargv[2];
-
- /* ip is deleted? */
- if (deleted_ip(master)) {
- rb_raise(rb_eRuntimeError,
- "deleted master cannot create a new slave interpreter");
- }
-
- /* argument check */
- if (rb_scan_args(argc, argv, "11", &name, &safemode) == 1) {
- safemode = Qfalse;
- }
- if (Tcl_IsSafe(master->ip) != 1
- && (safemode == Qfalse || NIL_P(safemode))) {
- }
-
- StringValue(name);
- callargv[0] = name;
- callargv[1] = safemode;
-
- return tk_funcall(ip_create_slave_core, 2, callargv, self);
-}
-
-
-/* self is slave of master? */
-static VALUE
-ip_is_slave_of_p(self, master)
- VALUE self, master;
-{
- if (!rb_obj_is_kind_of(master, tcltkip_class)) {
- rb_raise(rb_eArgError, "expected TclTkIp object");
- }
-
- if (Tcl_GetMaster(get_ip(self)->ip) == get_ip(master)->ip) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-
-
-/* create console (if supported) */
-#if defined(MAC_TCL) || defined(__WIN32__)
-#if TCL_MAJOR_VERSION < 8 \
- || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) \
- || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 \
- && (TCL_RELEASE_LEVEL == TCL_ALPHA_RELEASE \
- || (TCL_RELEASE_LEVEL == TCL_BETA_RELEASE \
- && TCL_RELEASE_SERIAL < 2) ) )
-EXTERN void TkConsoleCreate _((void));
-#endif
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 \
- && ( (TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE \
- && TCL_RELEASE_SERIAL == 0) \
- || (TCL_RELEASE_LEVEL == TCL_BETA_RELEASE \
- && TCL_RELEASE_SERIAL >= 2) )
-EXTERN void TkConsoleCreate_ _((void));
-#endif
-#endif
-static VALUE
-ip_create_console_core(interp, argc, argv)
- VALUE interp;
- int argc; /* dummy */
- VALUE *argv; /* dummy */
-{
- struct tcltkip *ptr = get_ip(interp);
-
- if (!tk_stubs_init_p()) {
- tcltkip_init_tk(interp);
- }
-
- if (Tcl_GetVar(ptr->ip,"tcl_interactive",TCL_GLOBAL_ONLY) == (char*)NULL) {
- Tcl_SetVar(ptr->ip, "tcl_interactive", "0", TCL_GLOBAL_ONLY);
- }
-
-#if TCL_MAJOR_VERSION > 8 \
- || (TCL_MAJOR_VERSION == 8 \
- && (TCL_MINOR_VERSION > 1 \
- || (TCL_MINOR_VERSION == 1 \
- && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE \
- && TCL_RELEASE_SERIAL >= 1) ) )
- Tk_InitConsoleChannels(ptr->ip);
-
- if (Tk_CreateConsoleWindow(ptr->ip) != TCL_OK) {
- rb_raise(rb_eRuntimeError, "fail to create console-window");
- }
-#else
-#if defined(MAC_TCL) || defined(__WIN32__)
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 \
- && ( (TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE && TCL_RELEASE_SERIAL == 0) \
- || (TCL_RELEASE_LEVEL == TCL_BETA_RELEASE && TCL_RELEASE_SERIAL >= 2) )
- TkConsoleCreate_();
-#else
- TkConsoleCreate();
-#endif
-
- if (TkConsoleInit(ptr->ip) != TCL_OK) {
- rb_raise(rb_eRuntimeError, "fail to create console-window");
- }
-#else
- rb_notimplement();
-#endif
-#endif
-
- return interp;
-}
-
-static VALUE
-ip_create_console(self)
- VALUE self;
-{
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- rb_raise(rb_eRuntimeError, "interpreter is deleted");
- }
-
- return tk_funcall(ip_create_console_core, 0, (VALUE*)NULL, self);
-}
-
-/* make ip "safe" */
-static VALUE
-ip_make_safe_core(interp, argc, argv)
- VALUE interp;
- int argc; /* dummy */
- VALUE *argv; /* dummy */
-{
- struct tcltkip *ptr = get_ip(interp);
- Tk_Window mainWin;
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return rb_exc_new2(rb_eRuntimeError, "interpreter is deleted");
- }
-
- if (Tcl_MakeSafe(ptr->ip) == TCL_ERROR) {
- /* return rb_exc_new2(rb_eRuntimeError,
- Tcl_GetStringResult(ptr->ip)); */
- return create_ip_exc(interp, rb_eRuntimeError, "%s",
- Tcl_GetStringResult(ptr->ip));
- }
-
- ptr->allow_ruby_exit = 0;
-
- /* replace 'exit' command --> 'interp_exit' command */
- mainWin = (tk_stubs_init_p())? Tk_MainWindow(ptr->ip): (Tk_Window)NULL;
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
- Tcl_CreateObjCommand(ptr->ip, "exit", ip_InterpExitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
- Tcl_CreateCommand(ptr->ip, "exit", ip_InterpExitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
-
- return interp;
-}
-
-static VALUE
-ip_make_safe(self)
- VALUE self;
-{
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- rb_raise(rb_eRuntimeError, "interpreter is deleted");
- }
-
- return tk_funcall(ip_make_safe_core, 0, (VALUE*)NULL, self);
-}
-
-/* is safe? */
-static VALUE
-ip_is_safe_p(self)
- VALUE self;
-{
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- rb_raise(rb_eRuntimeError, "interpreter is deleted");
- }
-
- if (Tcl_IsSafe(ptr->ip)) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-
-/* allow_ruby_exit? */
-static VALUE
-ip_allow_ruby_exit_p(self)
- VALUE self;
-{
- struct tcltkip *ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- rb_raise(rb_eRuntimeError, "interpreter is deleted");
- }
-
- if (ptr->allow_ruby_exit) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-
-/* allow_ruby_exit = mode */
-static VALUE
-ip_allow_ruby_exit_set(self, val)
- VALUE self, val;
-{
- struct tcltkip *ptr = get_ip(self);
- Tk_Window mainWin;
-
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- rb_raise(rb_eRuntimeError, "interpreter is deleted");
- }
-
- if (Tcl_IsSafe(ptr->ip)) {
- rb_raise(rb_eSecurityError,
- "insecure operation on a safe interpreter");
- }
-
- /*
- * Because of cross-threading, the following line may fail to find
- * the MainWindow, even if the Tcl/Tk interpreter has one or more.
- * But it has no problem. Current implementation of both type of
- * the "exit" command don't need maiinWin token.
- */
- mainWin = (tk_stubs_init_p())? Tk_MainWindow(ptr->ip): (Tk_Window)NULL;
-
- if (RTEST(val)) {
- ptr->allow_ruby_exit = 1;
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"ruby_exit\"");
- Tcl_CreateObjCommand(ptr->ip, "exit", ip_RubyExitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"exit\") --> \"ruby_exit\"");
- Tcl_CreateCommand(ptr->ip, "exit", ip_RubyExitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
- return Qtrue;
-
- } else {
- ptr->allow_ruby_exit = 0;
-#if TCL_MAJOR_VERSION >= 8
- DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
- Tcl_CreateObjCommand(ptr->ip, "exit", ip_InterpExitObjCmd,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
- Tcl_CreateCommand(ptr->ip, "exit", ip_InterpExitCommand,
- (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
-#endif
- return Qfalse;
- }
-}
-
-/* delete interpreter */
-static VALUE
-ip_delete(self)
- VALUE self;
-{
- int thr_crit_bup;
- struct tcltkip *ptr = get_ip(self);
-
- /* if (ptr == (struct tcltkip *)NULL || ptr->ip == (Tcl_Interp*)NULL) { */
- if (deleted_ip(ptr)) {
- DUMP1("delete deleted IP");
- return Qnil;
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- DUMP1("delete interp");
- if (!Tcl_InterpDeleted(ptr->ip)) {
- DUMP1("call ip_finalize");
- ip_finalize(ptr->ip);
-
- Tcl_DeleteInterp(ptr->ip);
- Tcl_Release(ptr->ip);
- }
-
- rb_thread_critical = thr_crit_bup;
-
- return Qnil;
-}
-
-
-/* is deleted? */
-static VALUE
-ip_has_invalid_namespace_p(self)
- VALUE self;
-{
- struct tcltkip *ptr = get_ip(self);
-
- if (ptr == (struct tcltkip *)NULL || ptr->ip == (Tcl_Interp *)NULL) {
- /* deleted IP */
- return Qtrue;
- }
-
-#if TCL_NAMESPACE_DEBUG
- if (rbtk_invalid_namespace(ptr)) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-#else
- return Qfalse;
-#endif
-}
-
-static VALUE
-ip_is_deleted_p(self)
- VALUE self;
-{
- struct tcltkip *ptr = get_ip(self);
-
- if (deleted_ip(ptr)) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-
-static VALUE
-ip_has_mainwindow_p_core(self, argc, argv)
- VALUE self;
- int argc; /* dummy */
- VALUE *argv; /* dummy */
-{
- struct tcltkip *ptr = get_ip(self);
-
- if (deleted_ip(ptr) || !tk_stubs_init_p()) {
- return Qnil;
- } else if (Tk_MainWindow(ptr->ip) == (Tk_Window)NULL) {
- return Qfalse;
- } else {
- return Qtrue;
- }
-}
-
-static VALUE
-ip_has_mainwindow_p(self)
- VALUE self;
-{
- return tk_funcall(ip_has_mainwindow_p_core, 0, (VALUE*)NULL, self);
-}
-
-
-/*** ruby string <=> tcl object ***/
-#if TCL_MAJOR_VERSION >= 8
-static VALUE
-get_str_from_obj(obj)
- Tcl_Obj *obj;
-{
- int len, binary = 0;
- const char *s;
- volatile VALUE str;
-
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
- s = Tcl_GetStringFromObj(obj, &len);
-#else
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION <= 3
- /* TCL_VERSION 8.1 -- 8.3 */
- if (Tcl_GetCharLength(obj) != Tcl_UniCharLen(Tcl_GetUnicode(obj))) {
- /* possibly binary string */
- s = (char *)Tcl_GetByteArrayFromObj(obj, &len);
- binary = 1;
- } else {
- /* possibly text string */
- s = Tcl_GetStringFromObj(obj, &len);
- }
-#else /* TCL_VERSION >= 8.4 */
- if (IS_TCL_BYTEARRAY(obj)) {
- s = (char *)Tcl_GetByteArrayFromObj(obj, &len);
- binary = 1;
- } else {
- s = Tcl_GetStringFromObj(obj, &len);
- }
-
-#endif
-#endif
- str = s ? rb_str_new(s, len) : rb_str_new2("");
- if (binary) {
-#ifdef HAVE_RUBY_ENCODING_H
- rb_enc_associate_index(str, ENCODING_INDEX_BINARY);
-#endif
- rb_ivar_set(str, ID_at_enc, ENCODING_NAME_BINARY);
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1)
- } else {
-#ifdef HAVE_RUBY_ENCODING_H
- rb_enc_associate_index(str, ENCODING_INDEX_UTF8);
-#endif
- rb_ivar_set(str, ID_at_enc, ENCODING_NAME_UTF8);
-#endif
- }
- return str;
-}
-
-static Tcl_Obj *
-get_obj_from_str(str)
- VALUE str;
-{
- const char *s = StringValueCStr(str);
-
-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
- return Tcl_NewStringObj((char*)s, RSTRING_LEN(str));
-#else /* TCL_VERSION >= 8.1 */
- VALUE enc = rb_attr_get(str, ID_at_enc);
-
- if (!NIL_P(enc)) {
- StringValue(enc);
- if (strcmp(RSTRING_PTR(enc), "binary") == 0) {
- /* binary string */
- return Tcl_NewByteArrayObj((const unsigned char *)s, RSTRING_LENINT(str));
- } else {
- /* text string */
- return Tcl_NewStringObj(s, RSTRING_LENINT(str));
- }
-#ifdef HAVE_RUBY_ENCODING_H
- } else if (rb_enc_get_index(str) == ENCODING_INDEX_BINARY) {
- /* binary string */
- return Tcl_NewByteArrayObj((const unsigned char *)s, RSTRING_LENINT(str));
-#endif
- } else if (memchr(s, 0, RSTRING_LEN(str))) {
- /* probably binary string */
- return Tcl_NewByteArrayObj((const unsigned char *)s, RSTRING_LENINT(str));
- } else {
- /* probably text string */
- return Tcl_NewStringObj(s, RSTRING_LENINT(str));
- }
-#endif
-}
-#endif /* ruby string <=> tcl object */
-
-static VALUE
-ip_get_result_string_obj(interp)
- Tcl_Interp *interp;
-{
-#if TCL_MAJOR_VERSION >= 8
- Tcl_Obj *retObj;
- volatile VALUE strval;
-
- retObj = Tcl_GetObjResult(interp);
- Tcl_IncrRefCount(retObj);
- strval = get_str_from_obj(retObj);
- RbTk_OBJ_UNTRUST(strval);
- Tcl_ResetResult(interp);
- Tcl_DecrRefCount(retObj);
- return strval;
-#else
- return rb_tainted_str_new2(interp->result);
-#endif
-}
-
-/* call Tcl/Tk functions on the eventloop thread */
-static VALUE
-callq_safelevel_handler(arg, callq)
- VALUE arg;
- VALUE callq;
-{
- struct call_queue *q;
-
- Data_Get_Struct(callq, struct call_queue, q);
- DUMP2("(safe-level handler) $SAFE = %d", q->safe_level);
- rb_set_safe_level(q->safe_level);
- return((q->func)(q->interp, q->argc, q->argv));
-}
-
-static int call_queue_handler _((Tcl_Event *, int));
-static int
-call_queue_handler(evPtr, flags)
- Tcl_Event *evPtr;
- int flags;
-{
- struct call_queue *q = (struct call_queue *)evPtr;
- volatile VALUE ret;
- volatile VALUE q_dat;
- volatile VALUE thread = q->thread;
- struct tcltkip *ptr;
-
- DUMP2("do_call_queue_handler : evPtr = %p", evPtr);
- DUMP2("call_queue_handler thread : %"PRIxVALUE, rb_thread_current());
- DUMP2("added by thread : %"PRIxVALUE, thread);
-
- if (*(q->done)) {
- DUMP1("processed by another event-loop");
- return 0;
- } else {
- DUMP1("process it on current event-loop");
- }
-
- if (RTEST(rb_thread_alive_p(thread))
- && ! RTEST(rb_funcall(thread, ID_stop_p, 0))) {
- DUMP1("caller is not yet ready to receive the result -> pending");
- return 0;
- }
-
- /* process it */
- *(q->done) = 1;
-
- /* deleted ipterp ? */
- ptr = get_ip(q->interp);
- if (deleted_ip(ptr)) {
- /* deleted IP --> ignore */
- return 1;
- }
-
- /* incr internal handler mark */
- rbtk_internal_eventloop_handler++;
-
- /* check safe-level */
- if (rb_safe_level() != q->safe_level) {
- /* q_dat = Data_Wrap_Struct(rb_cData,0,-1,q); */
- q_dat = Data_Wrap_Struct(0,call_queue_mark,-1,q);
- ret = rb_funcall(rb_proc_new(callq_safelevel_handler, q_dat),
- ID_call, 0);
- rb_gc_force_recycle(q_dat);
- q_dat = (VALUE)NULL;
- } else {
- DUMP2("call function (for caller thread:%"PRIxVALUE")", thread);
- DUMP2("call function (current thread:%"PRIxVALUE")", rb_thread_current());
- ret = (q->func)(q->interp, q->argc, q->argv);
- }
-
- /* set result */
- RARRAY_ASET(q->result, 0, ret);
- ret = (VALUE)NULL;
-
- /* decr internal handler mark */
- rbtk_internal_eventloop_handler--;
-
- /* complete */
- *(q->done) = -1;
-
- /* unlink ruby objects */
- q->argv = (VALUE*)NULL;
- q->interp = (VALUE)NULL;
- q->result = (VALUE)NULL;
- q->thread = (VALUE)NULL;
-
- /* back to caller */
- if (RTEST(rb_thread_alive_p(thread))) {
- DUMP2("back to caller (caller thread:%"PRIxVALUE")", thread);
- DUMP2(" (current thread:%"PRIxVALUE")", rb_thread_current());
-#if CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE
- have_rb_thread_waiting_for_value = 1;
- rb_thread_wakeup(thread);
-#else
- rb_thread_run(thread);
-#endif
- DUMP1("finish back to caller");
-#if DO_THREAD_SCHEDULE_AT_CALLBACK_DONE
- rb_thread_schedule();
-#endif
- } else {
- DUMP2("caller is dead (caller thread:%"PRIxVALUE")", thread);
- DUMP2(" (current thread:%"PRIxVALUE")", rb_thread_current());
- }
-
- /* end of handler : remove it */
- return 1;
-}
-
-static VALUE
-tk_funcall(func, argc, argv, obj)
- VALUE (*func)();
- int argc;
- VALUE *argv;
- VALUE obj;
-{
- struct call_queue *callq;
- struct tcltkip *ptr;
- int *alloc_done;
- int thr_crit_bup;
- int is_tk_evloop_thread;
- volatile VALUE current = rb_thread_current();
- volatile VALUE ip_obj = obj;
- volatile VALUE result;
- volatile VALUE ret;
- struct timeval t;
-
- if (!NIL_P(ip_obj) && rb_obj_is_kind_of(ip_obj, tcltkip_class)) {
- ptr = get_ip(ip_obj);
- if (deleted_ip(ptr)) return Qnil;
- } else {
- ptr = (struct tcltkip *)NULL;
- }
-
-#ifdef RUBY_USE_NATIVE_THREAD
- if (ptr) {
- /* on Tcl interpreter */
- is_tk_evloop_thread = (ptr->tk_thread_id == (Tcl_ThreadId) 0
- || ptr->tk_thread_id == Tcl_GetCurrentThread());
- } else {
- /* on Tcl/Tk library */
- is_tk_evloop_thread = (tk_eventloop_thread_id == (Tcl_ThreadId) 0
- || tk_eventloop_thread_id == Tcl_GetCurrentThread());
- }
-#else
- is_tk_evloop_thread = 1;
-#endif
-
- if (is_tk_evloop_thread
- && (NIL_P(eventloop_thread) || current == eventloop_thread)
- ) {
- if (NIL_P(eventloop_thread)) {
- DUMP2("tk_funcall from thread:%"PRIxVALUE" but no eventloop", current);
- } else {
- DUMP2("tk_funcall from current eventloop %"PRIxVALUE, current);
- }
- result = (func)(ip_obj, argc, argv);
- if (rb_obj_is_kind_of(result, rb_eException)) {
- rb_exc_raise(result);
- }
- return result;
- }
-
- DUMP2("tk_funcall from thread %"PRIxVALUE" (NOT current eventloop)", current);
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* allocate memory (argv cross over thread : must be in heap) */
- if (argv) {
- /* VALUE *temp = ALLOC_N(VALUE, argc); */
- VALUE *temp = RbTk_ALLOC_N(VALUE, argc);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)temp); /* XXXXXXXX */
-#endif
- MEMCPY(temp, argv, VALUE, argc);
- argv = temp;
- }
-
- /* allocate memory (keep result) */
- /* alloc_done = (int*)ALLOC(int); */
- alloc_done = RbTk_ALLOC_N(int, 1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)alloc_done); /* XXXXXXXX */
-#endif
- *alloc_done = 0;
-
- /* allocate memory (freed by Tcl_ServiceEvent) */
- /* callq = (struct call_queue *)Tcl_Alloc(sizeof(struct call_queue)); */
- callq = RbTk_ALLOC_N(struct call_queue, 1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve(callq);
-#endif
-
- /* allocate result obj */
- result = rb_ary_new3(1, Qnil);
-
- /* construct event data */
- callq->done = alloc_done;
- callq->func = func;
- callq->argc = argc;
- callq->argv = argv;
- callq->interp = ip_obj;
- callq->result = result;
- callq->thread = current;
- callq->safe_level = rb_safe_level();
- callq->ev.proc = call_queue_handler;
-
- /* add the handler to Tcl event queue */
- DUMP1("add handler");
-#ifdef RUBY_USE_NATIVE_THREAD
- if (ptr && ptr->tk_thread_id) {
- /* Tcl_ThreadQueueEvent(ptr->tk_thread_id,
- &(callq->ev), TCL_QUEUE_HEAD); */
- Tcl_ThreadQueueEvent(ptr->tk_thread_id,
- (Tcl_Event*)callq, TCL_QUEUE_HEAD);
- Tcl_ThreadAlert(ptr->tk_thread_id);
- } else if (tk_eventloop_thread_id) {
- /* Tcl_ThreadQueueEvent(tk_eventloop_thread_id,
- &(callq->ev), TCL_QUEUE_HEAD); */
- Tcl_ThreadQueueEvent(tk_eventloop_thread_id,
- (Tcl_Event*)callq, TCL_QUEUE_HEAD);
- Tcl_ThreadAlert(tk_eventloop_thread_id);
- } else {
- /* Tcl_QueueEvent(&(callq->ev), TCL_QUEUE_HEAD); */
- Tcl_QueueEvent((Tcl_Event*)callq, TCL_QUEUE_HEAD);
- }
-#else
- /* Tcl_QueueEvent(&(callq->ev), TCL_QUEUE_HEAD); */
- Tcl_QueueEvent((Tcl_Event*)callq, TCL_QUEUE_HEAD);
-#endif
-
- rb_thread_critical = thr_crit_bup;
-
- /* wait for the handler to be processed */
- t.tv_sec = 0;
- t.tv_usec = (long)((EVENT_HANDLER_TIMEOUT)*1000.0);
-
- DUMP2("callq wait for handler (current thread:%"PRIxVALUE")", current);
- while(*alloc_done >= 0) {
- DUMP2("*** callq wait for handler (current thread:%"PRIxVALUE")", current);
- /* rb_thread_stop(); */
- /* rb_thread_sleep_forever(); */
- rb_thread_wait_for(t);
- DUMP2("*** callq wakeup (current thread:%"PRIxVALUE")", current);
- DUMP2("*** (eventloop thread:%"PRIxVALUE")", eventloop_thread);
- if (NIL_P(eventloop_thread)) {
- DUMP1("*** callq lost eventloop thread");
- break;
- }
- }
- DUMP2("back from handler (current thread:%"PRIxVALUE")", current);
-
- /* get result & free allocated memory */
- ret = RARRAY_AREF(result, 0);
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)alloc_done, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)alloc_done); /* XXXXXXXX */
-#else
- /* free(alloc_done); */
- ckfree((char*)alloc_done);
-#endif
-#endif
- /* if (argv) free(argv); */
- if (argv) {
- /* if argv != NULL, alloc as 'temp' */
- int i;
- for(i = 0; i < argc; i++) { argv[i] = (VALUE)NULL; }
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)argv, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)argv); /* XXXXXXXX */
-#else
- ckfree((char*)argv);
-#endif
-#endif
- }
-
-#if 0 /* callq is freed by Tcl_ServiceEvent */
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release(callq);
-#else
- ckfree((char*)callq);
-#endif
-#endif
-
- /* exception? */
- if (rb_obj_is_kind_of(ret, rb_eException)) {
- DUMP1("raise exception");
- /* rb_exc_raise(ret); */
- rb_exc_raise(rb_exc_new3(rb_obj_class(ret),
- rb_funcallv(ret, ID_to_s, 0, 0)));
- }
-
- DUMP1("exit tk_funcall");
- return ret;
-}
-
-
-/* eval string in tcl by Tcl_Eval() */
-#if TCL_MAJOR_VERSION >= 8
-struct call_eval_info {
- struct tcltkip *ptr;
- Tcl_Obj *cmd;
-};
-
-static VALUE
-#ifdef HAVE_PROTOTYPES
-call_tcl_eval(VALUE arg)
-#else
-call_tcl_eval(arg)
- VALUE arg;
-#endif
-{
- struct call_eval_info *inf = (struct call_eval_info *)arg;
-
- Tcl_AllowExceptions(inf->ptr->ip);
- inf->ptr->return_value = Tcl_EvalObj(inf->ptr->ip, inf->cmd);
-
- return Qnil;
-}
-#endif
-
-static VALUE
-ip_eval_real(self, cmd_str, cmd_len)
- VALUE self;
- char *cmd_str;
- int cmd_len;
-{
- volatile VALUE ret;
- struct tcltkip *ptr = get_ip(self);
- int thr_crit_bup;
-
-#if TCL_MAJOR_VERSION >= 8
- /* call Tcl_EvalObj() */
- {
- Tcl_Obj *cmd;
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- cmd = Tcl_NewStringObj(cmd_str, cmd_len);
- Tcl_IncrRefCount(cmd);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- Tcl_DecrRefCount(cmd);
- rb_thread_critical = thr_crit_bup;
- ptr->return_value = TCL_OK;
- return rb_tainted_str_new2("");
- } else {
- int status;
- struct call_eval_info inf;
-
- /* Tcl_Preserve(ptr->ip); */
- rbtk_preserve_ip(ptr);
-
-#if 0
- ptr->return_value = Tcl_EvalObj(ptr->ip, cmd);
- /* ptr->return_value = Tcl_GlobalEvalObj(ptr->ip, cmd); */
-#else
- inf.ptr = ptr;
- inf.cmd = cmd;
- ret = rb_protect(call_tcl_eval, (VALUE)&inf, &status);
- switch(status) {
- case TAG_RAISE:
- if (NIL_P(rb_errinfo())) {
- rbtk_pending_exception = rb_exc_new2(rb_eException,
- "unknown exception");
- } else {
- rbtk_pending_exception = rb_errinfo();
- }
- break;
-
- case TAG_FATAL:
- if (NIL_P(rb_errinfo())) {
- rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
- } else {
- rbtk_pending_exception = rb_errinfo();
- }
- }
-#endif
- }
-
- Tcl_DecrRefCount(cmd);
-
- }
-
- if (pending_exception_check1(thr_crit_bup, ptr)) {
- rbtk_release_ip(ptr);
- return rbtk_pending_exception;
- }
-
- /* if (ptr->return_value == TCL_ERROR) { */
- if (ptr->return_value != TCL_OK) {
- if (event_loop_abort_on_exc > 0 && !Tcl_InterpDeleted(ptr->ip)) {
- volatile VALUE exc;
-
- switch (ptr->return_value) {
- case TCL_RETURN:
- exc = create_ip_exc(self, eTkCallbackReturn,
- "ip_eval_real receives TCL_RETURN");
- case TCL_BREAK:
- exc = create_ip_exc(self, eTkCallbackBreak,
- "ip_eval_real receives TCL_BREAK");
- case TCL_CONTINUE:
- exc = create_ip_exc(self, eTkCallbackContinue,
- "ip_eval_real receives TCL_CONTINUE");
- default:
- exc = create_ip_exc(self, rb_eRuntimeError, "%s",
- Tcl_GetStringResult(ptr->ip));
- }
-
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
- return exc;
- } else {
- if (event_loop_abort_on_exc < 0) {
- rb_warning("%s (ignore)", Tcl_GetStringResult(ptr->ip));
- } else {
- rb_warn("%s (ignore)", Tcl_GetStringResult(ptr->ip));
- }
- Tcl_ResetResult(ptr->ip);
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
- return rb_tainted_str_new2("");
- }
- }
-
- /* pass back the result (as string) */
- ret = ip_get_result_string_obj(ptr->ip);
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
- return ret;
-
-#else /* TCL_MAJOR_VERSION < 8 */
- DUMP2("Tcl_Eval(%s)", cmd_str);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- ptr->return_value = TCL_OK;
- return rb_tainted_str_new2("");
- } else {
- /* Tcl_Preserve(ptr->ip); */
- rbtk_preserve_ip(ptr);
- ptr->return_value = Tcl_Eval(ptr->ip, cmd_str);
- /* ptr->return_value = Tcl_GlobalEval(ptr->ip, cmd_str); */
- }
-
- if (pending_exception_check1(thr_crit_bup, ptr)) {
- rbtk_release_ip(ptr);
- return rbtk_pending_exception;
- }
-
- /* if (ptr->return_value == TCL_ERROR) { */
- if (ptr->return_value != TCL_OK) {
- volatile VALUE exc;
-
- switch (ptr->return_value) {
- case TCL_RETURN:
- exc = create_ip_exc(self, eTkCallbackReturn,
- "ip_eval_real receives TCL_RETURN");
- case TCL_BREAK:
- exc = create_ip_exc(self, eTkCallbackBreak,
- "ip_eval_real receives TCL_BREAK");
- case TCL_CONTINUE:
- exc = create_ip_exc(self, eTkCallbackContinue,
- "ip_eval_real receives TCL_CONTINUE");
- default:
- exc = create_ip_exc(self, rb_eRuntimeError, "%s", ptr->ip->result);
- }
-
- rbtk_release_ip(ptr);
- return exc;
- }
- DUMP2("(TCL_Eval result) %d", ptr->return_value);
-
- /* pass back the result (as string) */
- ret = ip_get_result_string_obj(ptr->ip);
- rbtk_release_ip(ptr);
- return ret;
-#endif
-}
-
-static VALUE
-evq_safelevel_handler(arg, evq)
- VALUE arg;
- VALUE evq;
-{
- struct eval_queue *q;
-
- Data_Get_Struct(evq, struct eval_queue, q);
- DUMP2("(safe-level handler) $SAFE = %d", q->safe_level);
- rb_set_safe_level(q->safe_level);
- return ip_eval_real(q->interp, q->str, q->len);
-}
-
-int eval_queue_handler _((Tcl_Event *, int));
-int
-eval_queue_handler(evPtr, flags)
- Tcl_Event *evPtr;
- int flags;
-{
- struct eval_queue *q = (struct eval_queue *)evPtr;
- volatile VALUE ret;
- volatile VALUE q_dat;
- volatile VALUE thread = q->thread;
- struct tcltkip *ptr;
-
- DUMP2("do_eval_queue_handler : evPtr = %p", evPtr);
- DUMP2("eval_queue_thread : %"PRIxVALUE, rb_thread_current());
- DUMP2("added by thread : %"PRIxVALUE, thread);
-
- if (*(q->done)) {
- DUMP1("processed by another event-loop");
- return 0;
- } else {
- DUMP1("process it on current event-loop");
- }
-
- if (RTEST(rb_thread_alive_p(thread))
- && ! RTEST(rb_funcall(thread, ID_stop_p, 0))) {
- DUMP1("caller is not yet ready to receive the result -> pending");
- return 0;
- }
-
- /* process it */
- *(q->done) = 1;
-
- /* deleted ipterp ? */
- ptr = get_ip(q->interp);
- if (deleted_ip(ptr)) {
- /* deleted IP --> ignore */
- return 1;
- }
-
- /* incr internal handler mark */
- rbtk_internal_eventloop_handler++;
-
- /* check safe-level */
- if (rb_safe_level() != q->safe_level) {
-#ifdef HAVE_NATIVETHREAD
-#ifndef RUBY_USE_NATIVE_THREAD
- if (!ruby_native_thread_p()) {
- rb_bug("cross-thread violation on eval_queue_handler()");
- }
-#endif
-#endif
- /* q_dat = Data_Wrap_Struct(rb_cData,0,-1,q); */
- q_dat = Data_Wrap_Struct(0,eval_queue_mark,-1,q);
- ret = rb_funcall(rb_proc_new(evq_safelevel_handler, q_dat),
- ID_call, 0);
- rb_gc_force_recycle(q_dat);
- q_dat = (VALUE)NULL;
- } else {
- ret = ip_eval_real(q->interp, q->str, q->len);
- }
-
- /* set result */
- RARRAY_ASET(q->result, 0, ret);
- ret = (VALUE)NULL;
-
- /* decr internal handler mark */
- rbtk_internal_eventloop_handler--;
-
- /* complete */
- *(q->done) = -1;
-
- /* unlink ruby objects */
- q->interp = (VALUE)NULL;
- q->result = (VALUE)NULL;
- q->thread = (VALUE)NULL;
-
- /* back to caller */
- if (RTEST(rb_thread_alive_p(thread))) {
- DUMP2("back to caller (caller thread:%"PRIxVALUE")", thread);
- DUMP2(" (current thread:%"PRIxVALUE")", rb_thread_current());
-#if CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE
- have_rb_thread_waiting_for_value = 1;
- rb_thread_wakeup(thread);
-#else
- rb_thread_run(thread);
-#endif
- DUMP1("finish back to caller");
-#if DO_THREAD_SCHEDULE_AT_CALLBACK_DONE
- rb_thread_schedule();
-#endif
- } else {
- DUMP2("caller is dead (caller thread:%"PRIxVALUE")", thread);
- DUMP2(" (current thread:%"PRIxVALUE")", rb_thread_current());
- }
-
- /* end of handler : remove it */
- return 1;
-}
-
-static VALUE
-ip_eval(self, str)
- VALUE self;
- VALUE str;
-{
- struct eval_queue *evq;
-#ifdef RUBY_USE_NATIVE_THREAD
- struct tcltkip *ptr;
-#endif
- char *eval_str;
- int *alloc_done;
- int thr_crit_bup;
- volatile VALUE current = rb_thread_current();
- volatile VALUE ip_obj = self;
- volatile VALUE result;
- volatile VALUE ret;
- Tcl_QueuePosition position;
- struct timeval t;
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
- StringValue(str);
- rb_thread_critical = thr_crit_bup;
-
-#ifdef RUBY_USE_NATIVE_THREAD
- ptr = get_ip(ip_obj);
- DUMP2("eval status: ptr->tk_thread_id %p", ptr->tk_thread_id);
- DUMP2("eval status: Tcl_GetCurrentThread %p", Tcl_GetCurrentThread());
-#else
- DUMP2("status: Tcl_GetCurrentThread %p", Tcl_GetCurrentThread());
-#endif
- DUMP2("status: eventloopt_thread %"PRIxVALUE, eventloop_thread);
-
- if (
-#ifdef RUBY_USE_NATIVE_THREAD
- (ptr->tk_thread_id == 0 || ptr->tk_thread_id == Tcl_GetCurrentThread())
- &&
-#endif
- (NIL_P(eventloop_thread) || current == eventloop_thread)
- ) {
- if (NIL_P(eventloop_thread)) {
- DUMP2("eval from thread:%"PRIxVALUE" but no eventloop", current);
- } else {
- DUMP2("eval from current eventloop %"PRIxVALUE, current);
- }
- result = ip_eval_real(self, RSTRING_PTR(str), RSTRING_LENINT(str));
- if (rb_obj_is_kind_of(result, rb_eException)) {
- rb_exc_raise(result);
- }
- return result;
- }
-
- DUMP2("eval from thread %"PRIxVALUE" (NOT current eventloop)", current);
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* allocate memory (keep result) */
- /* alloc_done = (int*)ALLOC(int); */
- alloc_done = RbTk_ALLOC_N(int, 1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)alloc_done); /* XXXXXXXX */
-#endif
- *alloc_done = 0;
-
- /* eval_str = ALLOC_N(char, RSTRING_LEN(str) + 1); */
- eval_str = ckalloc(RSTRING_LENINT(str) + 1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)eval_str); /* XXXXXXXX */
-#endif
- memcpy(eval_str, RSTRING_PTR(str), RSTRING_LEN(str));
- eval_str[RSTRING_LEN(str)] = 0;
-
- /* allocate memory (freed by Tcl_ServiceEvent) */
- /* evq = (struct eval_queue *)Tcl_Alloc(sizeof(struct eval_queue)); */
- evq = RbTk_ALLOC_N(struct eval_queue, 1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve(evq);
-#endif
-
- /* allocate result obj */
- result = rb_ary_new3(1, Qnil);
-
- /* construct event data */
- evq->done = alloc_done;
- evq->str = eval_str;
- evq->len = RSTRING_LENINT(str);
- evq->interp = ip_obj;
- evq->result = result;
- evq->thread = current;
- evq->safe_level = rb_safe_level();
- evq->ev.proc = eval_queue_handler;
-
- position = TCL_QUEUE_TAIL;
-
- /* add the handler to Tcl event queue */
- DUMP1("add handler");
-#ifdef RUBY_USE_NATIVE_THREAD
- if (ptr->tk_thread_id) {
- /* Tcl_ThreadQueueEvent(ptr->tk_thread_id, &(evq->ev), position); */
- Tcl_ThreadQueueEvent(ptr->tk_thread_id, (Tcl_Event*)evq, position);
- Tcl_ThreadAlert(ptr->tk_thread_id);
- } else if (tk_eventloop_thread_id) {
- Tcl_ThreadQueueEvent(tk_eventloop_thread_id, (Tcl_Event*)evq, position);
- /* Tcl_ThreadQueueEvent(tk_eventloop_thread_id,
- &(evq->ev), position); */
- Tcl_ThreadAlert(tk_eventloop_thread_id);
- } else {
- /* Tcl_QueueEvent(&(evq->ev), position); */
- Tcl_QueueEvent((Tcl_Event*)evq, position);
- }
-#else
- /* Tcl_QueueEvent(&(evq->ev), position); */
- Tcl_QueueEvent((Tcl_Event*)evq, position);
-#endif
-
- rb_thread_critical = thr_crit_bup;
-
- /* wait for the handler to be processed */
- t.tv_sec = 0;
- t.tv_usec = (long)((EVENT_HANDLER_TIMEOUT)*1000.0);
-
- DUMP2("evq wait for handler (current thread:%"PRIxVALUE")", current);
- while(*alloc_done >= 0) {
- DUMP2("*** evq wait for handler (current thread:%"PRIxVALUE")", current);
- /* rb_thread_stop(); */
- /* rb_thread_sleep_forever(); */
- rb_thread_wait_for(t);
- DUMP2("*** evq wakeup (current thread:%"PRIxVALUE")", current);
- DUMP2("*** (eventloop thread:%"PRIxVALUE")", eventloop_thread);
- if (NIL_P(eventloop_thread)) {
- DUMP1("*** evq lost eventloop thread");
- break;
- }
- }
- DUMP2("back from handler (current thread:%"PRIxVALUE")", current);
-
- /* get result & free allocated memory */
- ret = RARRAY_AREF(result, 0);
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)alloc_done, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)alloc_done); /* XXXXXXXX */
-#else
- /* free(alloc_done); */
- ckfree((char*)alloc_done);
-#endif
-#endif
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)eval_str, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)eval_str); /* XXXXXXXX */
-#else
- /* free(eval_str); */
- ckfree(eval_str);
-#endif
-#endif
-#if 0 /* evq is freed by Tcl_ServiceEvent */
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release(evq);
-#else
- ckfree((char*)evq);
-#endif
-#endif
-
- if (rb_obj_is_kind_of(ret, rb_eException)) {
- DUMP1("raise exception");
- /* rb_exc_raise(ret); */
- rb_exc_raise(rb_exc_new3(rb_obj_class(ret),
- rb_funcallv(ret, ID_to_s, 0, 0)));
- }
-
- return ret;
-}
-
-
-static int
-ip_cancel_eval_core(interp, msg, flag)
- Tcl_Interp *interp;
- VALUE msg;
- int flag;
-{
-#if TCL_MAJOR_VERSION < 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6)
- rb_raise(rb_eNotImpError,
- "cancel_eval is supported Tcl/Tk8.6 or later.");
-
- UNREACHABLE;
-#else
- Tcl_Obj *msg_obj;
-
- if (NIL_P(msg)) {
- msg_obj = NULL;
- } else {
- char *s = StringValueCStr(msg);
- msg_obj = Tcl_NewStringObj(s, RSTRING_LENINT(msg));
- Tcl_IncrRefCount(msg_obj);
- }
-
- return Tcl_CancelEval(interp, msg_obj, 0, flag);
-#endif
-}
-
-static VALUE
-ip_cancel_eval(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- VALUE retval;
-
- if (rb_scan_args(argc, argv, "01", &retval) == 0) {
- retval = Qnil;
- }
- if (ip_cancel_eval_core(get_ip(self)->ip, retval, 0) == TCL_OK) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-
-#ifndef TCL_CANCEL_UNWIND
-#define TCL_CANCEL_UNWIND 0x100000
-#endif
-static VALUE
-ip_cancel_eval_unwind(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- int flag = 0;
- VALUE retval;
-
- if (rb_scan_args(argc, argv, "01", &retval) == 0) {
- retval = Qnil;
- }
-
- flag |= TCL_CANCEL_UNWIND;
- if (ip_cancel_eval_core(get_ip(self)->ip, retval, flag) == TCL_OK) {
- return Qtrue;
- } else {
- return Qfalse;
- }
-}
-
-/* restart Tk */
-static VALUE
-lib_restart_core(interp, argc, argv)
- VALUE interp;
- int argc; /* dummy */
- VALUE *argv; /* dummy */
-{
- volatile VALUE exc;
- struct tcltkip *ptr = get_ip(interp);
- int thr_crit_bup;
-
-
- /* tcl_stubs_check(); */ /* already checked */
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return rb_exc_new2(rb_eRuntimeError, "interpreter is deleted");
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* Tcl_Preserve(ptr->ip); */
- rbtk_preserve_ip(ptr);
-
- /* destroy the root wdiget */
- ptr->return_value = Tcl_Eval(ptr->ip, "destroy .");
- /* ignore ERROR */
- DUMP2("(TCL_Eval result) %d", ptr->return_value);
- Tcl_ResetResult(ptr->ip);
-
-#if TCL_MAJOR_VERSION >= 8
- /* delete namespace ( tested on tk8.4.5 ) */
- ptr->return_value = Tcl_Eval(ptr->ip, "namespace delete ::tk::msgcat");
- /* ignore ERROR */
- DUMP2("(TCL_Eval result) %d", ptr->return_value);
- Tcl_ResetResult(ptr->ip);
-#endif
-
- /* delete trace proc ( tested on tk8.4.5 ) */
- ptr->return_value = Tcl_Eval(ptr->ip, "trace vdelete ::tk_strictMotif w ::tk::EventMotifBindings");
- /* ignore ERROR */
- DUMP2("(TCL_Eval result) %d", ptr->return_value);
- Tcl_ResetResult(ptr->ip);
-
- /* execute Tk_Init or Tk_SafeInit */
- exc = tcltkip_init_tk(interp);
- if (!NIL_P(exc)) {
- rb_thread_critical = thr_crit_bup;
- rbtk_release_ip(ptr);
- return exc;
- }
-
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
-
- rb_thread_critical = thr_crit_bup;
-
- /* return Qnil; */
- return interp;
-}
-
-static VALUE
-lib_restart(self)
- VALUE self;
-{
- struct tcltkip *ptr = get_ip(self);
-
-
- tcl_stubs_check();
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- rb_raise(rb_eRuntimeError, "interpreter is deleted");
- }
-
- return tk_funcall(lib_restart_core, 0, (VALUE*)NULL, self);
-}
-
-
-static VALUE
-ip_restart(self)
- VALUE self;
-{
- struct tcltkip *ptr = get_ip(self);
-
-
- tcl_stubs_check();
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- rb_raise(rb_eRuntimeError, "interpreter is deleted");
- }
-
- if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
- /* slave IP */
- return Qnil;
- }
- return lib_restart(self);
-}
-
-static VALUE
-lib_toUTF8_core(ip_obj, src, encodename)
- VALUE ip_obj;
- VALUE src;
- VALUE encodename;
-{
- volatile VALUE str = src;
-
-#ifdef TCL_UTF_MAX
-# if 0
- Tcl_Interp *interp;
-# endif
- Tcl_Encoding encoding;
- Tcl_DString dstr;
- int taint_flag = OBJ_TAINTED(str);
- struct tcltkip *ptr;
- char *buf;
- int thr_crit_bup;
-#endif
-
- tcl_stubs_check();
-
- if (NIL_P(src)) {
- return rb_str_new2("");
- }
-
-#ifdef TCL_UTF_MAX
- if (NIL_P(ip_obj)) {
-# if 0
- interp = (Tcl_Interp *)NULL;
-# endif
- } else {
- ptr = get_ip(ip_obj);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
-# if 0
- interp = (Tcl_Interp *)NULL;
- } else {
- interp = ptr->ip;
-# endif
- }
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- if (NIL_P(encodename)) {
- if (RB_TYPE_P(str, T_STRING)) {
- volatile VALUE enc;
-
-#ifdef HAVE_RUBY_ENCODING_H
- enc = rb_funcallv(rb_obj_encoding(str), ID_to_s, 0, 0);
-#else
- enc = rb_attr_get(str, ID_at_enc);
-#endif
- if (NIL_P(enc)) {
- if (NIL_P(ip_obj)) {
- encoding = (Tcl_Encoding)NULL;
- } else {
- enc = rb_attr_get(ip_obj, ID_at_enc);
- if (NIL_P(enc)) {
- encoding = (Tcl_Encoding)NULL;
- } else {
- /* StringValue(enc); */
- enc = rb_funcallv(enc, ID_to_s, 0, 0);
- /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
- if (!RSTRING_LEN(enc)) {
- encoding = (Tcl_Encoding)NULL;
- } else {
- encoding = Tcl_GetEncoding((Tcl_Interp*)NULL,
- RSTRING_PTR(enc));
- if (encoding == (Tcl_Encoding)NULL) {
- rb_warning("Tk-interp has unknown encoding information (@encoding:'%s')", RSTRING_PTR(enc));
- }
- }
- }
- }
- } else {
- StringValue(enc);
- if (strcmp(RSTRING_PTR(enc), "binary") == 0) {
-#ifdef HAVE_RUBY_ENCODING_H
- rb_enc_associate_index(str, ENCODING_INDEX_BINARY);
-#endif
- rb_ivar_set(str, ID_at_enc, ENCODING_NAME_BINARY);
- rb_thread_critical = thr_crit_bup;
- return str;
- }
- /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
- encoding = Tcl_GetEncoding((Tcl_Interp*)NULL,
- RSTRING_PTR(enc));
- if (encoding == (Tcl_Encoding)NULL) {
- rb_warning("string has unknown encoding information (@encoding:'%s')", RSTRING_PTR(enc));
- }
- }
- } else {
- encoding = (Tcl_Encoding)NULL;
- }
- } else {
- StringValue(encodename);
- if (strcmp(RSTRING_PTR(encodename), "binary") == 0) {
-#ifdef HAVE_RUBY_ENCODING_H
- rb_enc_associate_index(str, ENCODING_INDEX_BINARY);
-#endif
- rb_ivar_set(str, ID_at_enc, ENCODING_NAME_BINARY);
- rb_thread_critical = thr_crit_bup;
- return str;
- }
- /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(encodename)); */
- encoding = Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(encodename));
- if (encoding == (Tcl_Encoding)NULL) {
- /*
- rb_warning("unknown encoding name '%s'",
- RSTRING_PTR(encodename));
- */
- rb_raise(rb_eArgError, "unknown encoding name '%s'",
- RSTRING_PTR(encodename));
- }
- }
-
- StringValue(str);
- if (!RSTRING_LEN(str)) {
- rb_thread_critical = thr_crit_bup;
- return str;
- }
- buf = ALLOC_N(char, RSTRING_LEN(str)+1);
- /* buf = ckalloc(sizeof(char) * (RSTRING_LENINT(str)+1)); */
- memcpy(buf, RSTRING_PTR(str), RSTRING_LEN(str));
- buf[RSTRING_LEN(str)] = 0;
-
- Tcl_DStringInit(&dstr);
- Tcl_DStringFree(&dstr);
- /* Tcl_ExternalToUtfDString(encoding,buf,strlen(buf),&dstr); */
- Tcl_ExternalToUtfDString(encoding, buf, RSTRING_LENINT(str), &dstr);
-
- /* str = rb_tainted_str_new2(Tcl_DStringValue(&dstr)); */
- /* str = rb_str_new2(Tcl_DStringValue(&dstr)); */
- str = rb_str_new(Tcl_DStringValue(&dstr), Tcl_DStringLength(&dstr));
-#ifdef HAVE_RUBY_ENCODING_H
- rb_enc_associate_index(str, ENCODING_INDEX_UTF8);
-#endif
- if (taint_flag) RbTk_OBJ_UNTRUST(str);
- rb_ivar_set(str, ID_at_enc, ENCODING_NAME_UTF8);
-
- /*
- if (encoding != (Tcl_Encoding)NULL) {
- Tcl_FreeEncoding(encoding);
- }
- */
- Tcl_DStringFree(&dstr);
-
- xfree(buf);
- /* ckfree(buf); */
-
- rb_thread_critical = thr_crit_bup;
-#endif
-
- return str;
-}
-
-static VALUE
-lib_toUTF8(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- VALUE str, encodename;
-
- if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
- encodename = Qnil;
- }
- return lib_toUTF8_core(Qnil, str, encodename);
-}
-
-static VALUE
-ip_toUTF8(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- VALUE str, encodename;
-
- if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
- encodename = Qnil;
- }
- return lib_toUTF8_core(self, str, encodename);
-}
-
-static VALUE
-lib_fromUTF8_core(ip_obj, src, encodename)
- VALUE ip_obj;
- VALUE src;
- VALUE encodename;
-{
- volatile VALUE str = src;
-
-#ifdef TCL_UTF_MAX
- Tcl_Interp *interp;
- Tcl_Encoding encoding;
- Tcl_DString dstr;
- int taint_flag = OBJ_TAINTED(str);
- char *buf;
- int thr_crit_bup;
-#endif
-
- tcl_stubs_check();
-
- if (NIL_P(src)) {
- return rb_str_new2("");
- }
-
-#ifdef TCL_UTF_MAX
- if (NIL_P(ip_obj)) {
- interp = (Tcl_Interp *)NULL;
- } else if (get_ip(ip_obj) == (struct tcltkip *)NULL) {
- interp = (Tcl_Interp *)NULL;
- } else {
- interp = get_ip(ip_obj)->ip;
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- if (NIL_P(encodename)) {
- volatile VALUE enc;
-
- if (RB_TYPE_P(str, T_STRING)) {
- enc = rb_attr_get(str, ID_at_enc);
- if (!NIL_P(enc)) {
- StringValue(enc);
- if (strcmp(RSTRING_PTR(enc), "binary") == 0) {
-#ifdef HAVE_RUBY_ENCODING_H
- rb_enc_associate_index(str, ENCODING_INDEX_BINARY);
-#endif
- rb_ivar_set(str, ID_at_enc, ENCODING_NAME_BINARY);
- rb_thread_critical = thr_crit_bup;
- return str;
- }
-#ifdef HAVE_RUBY_ENCODING_H
- } else if (rb_enc_get_index(str) == ENCODING_INDEX_BINARY) {
- rb_enc_associate_index(str, ENCODING_INDEX_BINARY);
- rb_ivar_set(str, ID_at_enc, ENCODING_NAME_BINARY);
- rb_thread_critical = thr_crit_bup;
- return str;
-#endif
- }
- }
-
- if (NIL_P(ip_obj)) {
- encoding = (Tcl_Encoding)NULL;
- } else {
- enc = rb_attr_get(ip_obj, ID_at_enc);
- if (NIL_P(enc)) {
- encoding = (Tcl_Encoding)NULL;
- } else {
- /* StringValue(enc); */
- enc = rb_funcallv(enc, ID_to_s, 0, 0);
- /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
- if (!RSTRING_LEN(enc)) {
- encoding = (Tcl_Encoding)NULL;
- } else {
- encoding = Tcl_GetEncoding((Tcl_Interp*)NULL,
- RSTRING_PTR(enc));
- if (encoding == (Tcl_Encoding)NULL) {
- rb_warning("Tk-interp has unknown encoding information (@encoding:'%s')", RSTRING_PTR(enc));
- } else {
- encodename = rb_obj_dup(enc);
- }
- }
- }
- }
-
- } else {
- StringValue(encodename);
-
- if (strcmp(RSTRING_PTR(encodename), "binary") == 0) {
- Tcl_Obj *tclstr;
- char *s;
- int len;
-
- StringValue(str);
- tclstr = Tcl_NewStringObj(RSTRING_PTR(str), RSTRING_LENINT(str));
- Tcl_IncrRefCount(tclstr);
- s = (char*)Tcl_GetByteArrayFromObj(tclstr, &len);
- str = rb_tainted_str_new(s, len);
- s = (char*)NULL;
- Tcl_DecrRefCount(tclstr);
-#ifdef HAVE_RUBY_ENCODING_H
- rb_enc_associate_index(str, ENCODING_INDEX_BINARY);
-#endif
- rb_ivar_set(str, ID_at_enc, ENCODING_NAME_BINARY);
-
- rb_thread_critical = thr_crit_bup;
- return str;
- }
-
- /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(encodename)); */
- encoding = Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(encodename));
- if (encoding == (Tcl_Encoding)NULL) {
- /*
- rb_warning("unknown encoding name '%s'",
- RSTRING_PTR(encodename));
- encodename = Qnil;
- */
- rb_raise(rb_eArgError, "unknown encoding name '%s'",
- RSTRING_PTR(encodename));
- }
- }
-
- StringValue(str);
-
- if (RSTRING_LEN(str) == 0) {
- rb_thread_critical = thr_crit_bup;
- return rb_tainted_str_new2("");
- }
-
- buf = ALLOC_N(char, RSTRING_LEN(str)+1);
- /* buf = ckalloc(sizeof(char) * (RSTRING_LENINT(str)+1)); */
- memcpy(buf, RSTRING_PTR(str), RSTRING_LEN(str));
- buf[RSTRING_LEN(str)] = 0;
-
- Tcl_DStringInit(&dstr);
- Tcl_DStringFree(&dstr);
- /* Tcl_UtfToExternalDString(encoding,buf,strlen(buf),&dstr); */
- Tcl_UtfToExternalDString(encoding,buf,RSTRING_LENINT(str),&dstr);
-
- /* str = rb_tainted_str_new2(Tcl_DStringValue(&dstr)); */
- /* str = rb_str_new2(Tcl_DStringValue(&dstr)); */
- str = rb_str_new(Tcl_DStringValue(&dstr), Tcl_DStringLength(&dstr));
-#ifdef HAVE_RUBY_ENCODING_H
- if (interp) {
- /* can access encoding_table of TclTkIp */
- /* -> try to use encoding_table */
- VALUE tbl = ip_get_encoding_table(ip_obj);
- VALUE encobj = encoding_table_get_obj(tbl, encodename);
- rb_enc_associate_index(str, rb_to_encoding_index(encobj));
- } else {
- /* cannot access encoding_table of TclTkIp */
- /* -> try to find on Ruby Encoding */
- rb_enc_associate_index(str, rb_enc_find_index(RSTRING_PTR(encodename)));
- }
-#endif
-
- if (taint_flag) RbTk_OBJ_UNTRUST(str);
- rb_ivar_set(str, ID_at_enc, encodename);
-
- /*
- if (encoding != (Tcl_Encoding)NULL) {
- Tcl_FreeEncoding(encoding);
- }
- */
- Tcl_DStringFree(&dstr);
-
- xfree(buf);
- /* ckfree(buf); */
-
- rb_thread_critical = thr_crit_bup;
-#endif
-
- return str;
-}
-
-static VALUE
-lib_fromUTF8(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- VALUE str, encodename;
-
- if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
- encodename = Qnil;
- }
- return lib_fromUTF8_core(Qnil, str, encodename);
-}
-
-static VALUE
-ip_fromUTF8(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- VALUE str, encodename;
-
- if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
- encodename = Qnil;
- }
- return lib_fromUTF8_core(self, str, encodename);
-}
-
-static VALUE
-lib_UTF_backslash_core(self, str, all_bs)
- VALUE self;
- VALUE str;
- int all_bs;
-{
-#ifdef TCL_UTF_MAX
- char *src_buf, *dst_buf, *ptr;
- int read_len = 0, dst_len = 0;
- int taint_flag = OBJ_TAINTED(str);
- int thr_crit_bup;
-
- tcl_stubs_check();
-
- StringValue(str);
- if (!RSTRING_LEN(str)) {
- return str;
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* src_buf = ALLOC_N(char, RSTRING_LEN(str)+1); */
- src_buf = ckalloc(RSTRING_LENINT(str)+1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)src_buf); /* XXXXXXXX */
-#endif
- memcpy(src_buf, RSTRING_PTR(str), RSTRING_LEN(str));
- src_buf[RSTRING_LEN(str)] = 0;
-
- /* dst_buf = ALLOC_N(char, RSTRING_LEN(str)+1); */
- dst_buf = ckalloc(RSTRING_LENINT(str)+1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)dst_buf); /* XXXXXXXX */
-#endif
-
- ptr = src_buf;
- while(RSTRING_LEN(str) > ptr - src_buf) {
- if (*ptr == '\\' && (all_bs || *(ptr + 1) == 'u')) {
- dst_len += Tcl_UtfBackslash(ptr, &read_len, (dst_buf + dst_len));
- ptr += read_len;
- } else {
- *(dst_buf + (dst_len++)) = *(ptr++);
- }
- }
-
- str = rb_str_new(dst_buf, dst_len);
- if (taint_flag) RbTk_OBJ_UNTRUST(str);
-#ifdef HAVE_RUBY_ENCODING_H
- rb_enc_associate_index(str, ENCODING_INDEX_UTF8);
-#endif
- rb_ivar_set(str, ID_at_enc, ENCODING_NAME_UTF8);
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)src_buf, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)src_buf); /* XXXXXXXX */
-#else
- /* free(src_buf); */
- ckfree(src_buf);
-#endif
-#endif
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)dst_buf, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)dst_buf); /* XXXXXXXX */
-#else
- /* free(dst_buf); */
- ckfree(dst_buf);
-#endif
-#endif
-
- rb_thread_critical = thr_crit_bup;
-#endif
-
- return str;
-}
-
-static VALUE
-lib_UTF_backslash(self, str)
- VALUE self;
- VALUE str;
-{
- return lib_UTF_backslash_core(self, str, 0);
-}
-
-static VALUE
-lib_Tcl_backslash(self, str)
- VALUE self;
- VALUE str;
-{
- return lib_UTF_backslash_core(self, str, 1);
-}
-
-static VALUE
-lib_get_system_encoding(self)
- VALUE self;
-{
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0)
- tcl_stubs_check();
- return rb_str_new2(Tcl_GetEncodingName((Tcl_Encoding)NULL));
-#else
- return Qnil;
-#endif
-}
-
-static VALUE
-lib_set_system_encoding(self, enc_name)
- VALUE self;
- VALUE enc_name;
-{
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0)
- tcl_stubs_check();
-
- if (NIL_P(enc_name)) {
- Tcl_SetSystemEncoding((Tcl_Interp *)NULL, (CONST char *)NULL);
- return lib_get_system_encoding(self);
- }
-
- enc_name = rb_funcallv(enc_name, ID_to_s, 0, 0);
- if (Tcl_SetSystemEncoding((Tcl_Interp *)NULL,
- StringValueCStr(enc_name)) != TCL_OK) {
- rb_raise(rb_eArgError, "unknown encoding name '%s'",
- RSTRING_PTR(enc_name));
- }
-
- return enc_name;
-#else
- return Qnil;
-#endif
-}
-
-
-/* invoke Tcl proc */
-struct invoke_info {
- struct tcltkip *ptr;
- Tcl_CmdInfo cmdinfo;
-#if TCL_MAJOR_VERSION >= 8
- int objc;
- Tcl_Obj **objv;
-#else
- int argc;
- char **argv;
-#endif
-};
-
-static VALUE
-#ifdef HAVE_PROTOTYPES
-invoke_tcl_proc(VALUE arg)
-#else
-invoke_tcl_proc(arg)
- VALUE arg;
-#endif
-{
- struct invoke_info *inf = (struct invoke_info *)arg;
-#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION < 6
- int i, len;
- int argc = inf->objc;
- char **argv = (char **)NULL;
-#endif
-
- DUMP1("call invoke_tcl_proc");
-
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 6)
- /* Tcl/Tk 8.6 or later */
-
- /* eval */
- inf->ptr->return_value = Tcl_EvalObjv(inf->ptr->ip, inf->objc, inf->objv, TCL_EVAL_DIRECT);
- /* inf->ptr->return_value = Tcl_EvalObjv(inf->ptr->ip, inf->objc, inf->objv, 0); */
-
-#else /* Tcl/Tk 7.x, 8.0 -- 8.5 */
-
- /* memory allocation for arguments of this command */
-#if TCL_MAJOR_VERSION == 8
- /* Tcl/Tk 8.0 -- 8.5 */
- if (!inf->cmdinfo.isNativeObjectProc) {
- DUMP1("called proc is not a native-obj-proc");
- /* string interface */
- /* argv = (char **)ALLOC_N(char *, argc+1);*/ /* XXXXXXXXXX */
- argv = RbTk_ALLOC_N(char *, (argc+1));
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)argv); /* XXXXXXXX */
-#endif
- for (i = 0; i < argc; ++i) {
- argv[i] = Tcl_GetStringFromObj(inf->objv[i], &len);
- }
- argv[argc] = (char *)NULL;
- }
-#endif
-
- DUMP1("reset result of tcl-interp");
- Tcl_ResetResult(inf->ptr->ip);
-
- /* Invoke the C procedure */
-#if TCL_MAJOR_VERSION == 8
- /* Tcl/Tk 8.0 -- 8.5 */
- if (inf->cmdinfo.isNativeObjectProc) {
- DUMP1("call tcl_proc as a native-obj-proc");
- inf->ptr->return_value
- = (*(inf->cmdinfo.objProc))(inf->cmdinfo.objClientData,
- inf->ptr->ip, inf->objc, inf->objv);
- }
- else
-#endif
- {
-#if TCL_MAJOR_VERSION == 8
- /* Tcl/Tk 8.0 -- 8.5 */
- DUMP1("call tcl_proc as not a native-obj-proc");
- inf->ptr->return_value
- = (*(inf->cmdinfo.proc))(inf->cmdinfo.clientData, inf->ptr->ip,
- argc, (CONST84 char **)argv);
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)argv, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)argv); /* XXXXXXXX */
-#else
- /* free(argv); */
- ckfree((char*)argv);
-#endif
-#endif
-
-#else /* TCL_MAJOR_VERSION < 8 */
- inf->ptr->return_value
- = (*(inf->cmdinfo.proc))(inf->cmdinfo.clientData, inf->ptr->ip,
- inf->argc, inf->argv);
-#endif
- }
-
-#endif /* Tcl/Tk 8.6 or later || Tcl 7.x, 8.0 -- 8.5 */
-
- DUMP1("end of invoke_tcl_proc");
- return Qnil;
-}
-
-
-#if TCL_MAJOR_VERSION >= 8
-static VALUE
-ip_invoke_core(interp, objc, objv)
- VALUE interp;
- int objc;
- Tcl_Obj **objv;
-#else
-static VALUE
-ip_invoke_core(interp, argc, argv)
- VALUE interp;
- int argc;
- char **argv;
-#endif
-{
- struct tcltkip *ptr;
- Tcl_CmdInfo info;
- char *cmd;
- int len;
- int thr_crit_bup;
- int unknown_flag = 0;
-
-#if 1 /* wrap tcl-proc call */
- struct invoke_info inf;
- int status;
-#else
-#if TCL_MAJOR_VERSION >= 8
- int argc = objc;
- char **argv = (char **)NULL;
- /* Tcl_Obj *resultPtr; */
-#endif
-#endif
-
- /* get the command name string */
-#if TCL_MAJOR_VERSION >= 8
- cmd = Tcl_GetStringFromObj(objv[0], &len);
-#else /* TCL_MAJOR_VERSION < 8 */
- cmd = argv[0];
-#endif
-
- /* get the data struct */
- ptr = get_ip(interp);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return rb_tainted_str_new2("");
- }
-
- /* Tcl_Preserve(ptr->ip); */
- rbtk_preserve_ip(ptr);
-
- /* map from the command name to a C procedure */
- DUMP2("call Tcl_GetCommandInfo, %s", cmd);
- if (!Tcl_GetCommandInfo(ptr->ip, cmd, &info)) {
- DUMP1("error Tcl_GetCommandInfo");
- DUMP1("try auto_load (call 'unknown' command)");
- if (!Tcl_GetCommandInfo(ptr->ip,
-#if TCL_MAJOR_VERSION >= 8
- "::unknown",
-#else
- "unknown",
-#endif
- &info)) {
- DUMP1("fail to get 'unknown' command");
- /* if (event_loop_abort_on_exc || cmd[0] != '.') { */
- if (event_loop_abort_on_exc > 0) {
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- /*rb_ip_raise(obj,rb_eNameError,"invalid command name `%s'",cmd);*/
- return create_ip_exc(interp, rb_eNameError,
- "invalid command name `%s'", cmd);
- } else {
- if (event_loop_abort_on_exc < 0) {
- rb_warning("invalid command name `%s' (ignore)", cmd);
- } else {
- rb_warn("invalid command name `%s' (ignore)", cmd);
- }
- Tcl_ResetResult(ptr->ip);
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- return rb_tainted_str_new2("");
- }
- } else {
-#if TCL_MAJOR_VERSION >= 8
- Tcl_Obj **unknown_objv;
-#else
- char **unknown_argv;
-#endif
- DUMP1("find 'unknown' command -> set arguments");
- unknown_flag = 1;
-
-#if TCL_MAJOR_VERSION >= 8
- /* unknown_objv = (Tcl_Obj **)ALLOC_N(Tcl_Obj *, objc+2); */
- unknown_objv = RbTk_ALLOC_N(Tcl_Obj *, (objc+2));
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)unknown_objv); /* XXXXXXXX */
-#endif
- unknown_objv[0] = Tcl_NewStringObj("::unknown", 9);
- Tcl_IncrRefCount(unknown_objv[0]);
- memcpy(unknown_objv + 1, objv, sizeof(Tcl_Obj *)*objc);
- unknown_objv[++objc] = (Tcl_Obj*)NULL;
- objv = unknown_objv;
-#else
- /* unknown_argv = (char **)ALLOC_N(char *, argc+2); */
- unknown_argv = RbTk_ALLOC_N(char *, (argc+2));
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)unknown_argv); /* XXXXXXXX */
-#endif
- unknown_argv[0] = strdup("unknown");
- memcpy(unknown_argv + 1, argv, sizeof(char *)*argc);
- unknown_argv[++argc] = (char *)NULL;
- argv = unknown_argv;
-#endif
- }
- }
- DUMP1("end Tcl_GetCommandInfo");
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
-#if 1 /* wrap tcl-proc call */
- /* setup params */
- inf.ptr = ptr;
- inf.cmdinfo = info;
-#if TCL_MAJOR_VERSION >= 8
- inf.objc = objc;
- inf.objv = objv;
-#else
- inf.argc = argc;
- inf.argv = argv;
-#endif
-
- /* invoke tcl-proc */
- DUMP1("invoke tcl-proc");
- rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
- DUMP2("status of tcl-proc, %d", status);
- switch(status) {
- case TAG_RAISE:
- if (NIL_P(rb_errinfo())) {
- rbtk_pending_exception = rb_exc_new2(rb_eException,
- "unknown exception");
- } else {
- rbtk_pending_exception = rb_errinfo();
- }
- break;
-
- case TAG_FATAL:
- if (NIL_P(rb_errinfo())) {
- rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
- } else {
- rbtk_pending_exception = rb_errinfo();
- }
- }
-
-#else /* !wrap tcl-proc call */
-
- /* memory allocation for arguments of this command */
-#if TCL_MAJOR_VERSION >= 8
- if (!info.isNativeObjectProc) {
- int i;
-
- /* string interface */
- /* argv = (char **)ALLOC_N(char *, argc+1); */
- argv = RbTk_ALLOC_N(char *, (argc+1));
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)argv); /* XXXXXXXX */
-#endif
- for (i = 0; i < argc; ++i) {
- argv[i] = Tcl_GetStringFromObj(objv[i], &len);
- }
- argv[argc] = (char *)NULL;
- }
-#endif
-
- Tcl_ResetResult(ptr->ip);
-
- /* Invoke the C procedure */
-#if TCL_MAJOR_VERSION >= 8
- if (info.isNativeObjectProc) {
- ptr->return_value = (*info.objProc)(info.objClientData, ptr->ip,
- objc, objv);
-#if 0
- /* get the string value from the result object */
- resultPtr = Tcl_GetObjResult(ptr->ip);
- Tcl_SetResult(ptr->ip, Tcl_GetStringFromObj(resultPtr, &len),
- TCL_VOLATILE);
-#endif
- }
- else
-#endif
- {
-#if TCL_MAJOR_VERSION >= 8
- ptr->return_value = (*info.proc)(info.clientData, ptr->ip,
- argc, (CONST84 char **)argv);
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)argv, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)argv); /* XXXXXXXX */
-#else
- /* free(argv); */
- ckfree((char*)argv);
-#endif
-#endif
-
-#else /* TCL_MAJOR_VERSION < 8 */
- ptr->return_value = (*info.proc)(info.clientData, ptr->ip,
- argc, argv);
-#endif
- }
-#endif /* ! wrap tcl-proc call */
-
- /* free allocated memory for calling 'unknown' command */
- if (unknown_flag) {
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(objv[0]);
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)objv, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)objv); /* XXXXXXXX */
-#else
- /* free(objv); */
- ckfree((char*)objv);
-#endif
-#endif
-#else /* TCL_MAJOR_VERSION < 8 */
- free(argv[0]);
- /* ckfree(argv[0]); */
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)argv, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)argv); /* XXXXXXXX */
-#else
- /* free(argv); */
- ckfree((char*)argv);
-#endif
-#endif
-#endif
- }
-
- /* exception on mainloop */
- if (pending_exception_check1(thr_crit_bup, ptr)) {
- return rbtk_pending_exception;
- }
-
- rb_thread_critical = thr_crit_bup;
-
- /* if (ptr->return_value == TCL_ERROR) { */
- if (ptr->return_value != TCL_OK) {
- if (event_loop_abort_on_exc > 0 && !Tcl_InterpDeleted(ptr->ip)) {
- switch (ptr->return_value) {
- case TCL_RETURN:
- return create_ip_exc(interp, eTkCallbackReturn,
- "ip_invoke_core receives TCL_RETURN");
- case TCL_BREAK:
- return create_ip_exc(interp, eTkCallbackBreak,
- "ip_invoke_core receives TCL_BREAK");
- case TCL_CONTINUE:
- return create_ip_exc(interp, eTkCallbackContinue,
- "ip_invoke_core receives TCL_CONTINUE");
- default:
- return create_ip_exc(interp, rb_eRuntimeError, "%s",
- Tcl_GetStringResult(ptr->ip));
- }
-
- } else {
- if (event_loop_abort_on_exc < 0) {
- rb_warning("%s (ignore)", Tcl_GetStringResult(ptr->ip));
- } else {
- rb_warn("%s (ignore)", Tcl_GetStringResult(ptr->ip));
- }
- Tcl_ResetResult(ptr->ip);
- return rb_tainted_str_new2("");
- }
- }
-
- /* pass back the result (as string) */
- return ip_get_result_string_obj(ptr->ip);
-}
-
-
-#if TCL_MAJOR_VERSION >= 8
-static Tcl_Obj **
-#else /* TCL_MAJOR_VERSION < 8 */
-static char **
-#endif
-alloc_invoke_arguments(argc, argv)
- int argc;
- VALUE *argv;
-{
- int i;
- int thr_crit_bup;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_Obj **av;
-#else /* TCL_MAJOR_VERSION < 8 */
- char **av;
-#endif
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* memory allocation */
-#if TCL_MAJOR_VERSION >= 8
- /* av = ALLOC_N(Tcl_Obj *, argc+1);*/ /* XXXXXXXXXX */
- av = RbTk_ALLOC_N(Tcl_Obj *, (argc+1));
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)av); /* XXXXXXXX */
-#endif
- for (i = 0; i < argc; ++i) {
- av[i] = get_obj_from_str(argv[i]);
- Tcl_IncrRefCount(av[i]);
- }
- av[argc] = NULL;
-
-#else /* TCL_MAJOR_VERSION < 8 */
- /* string interface */
- /* av = ALLOC_N(char *, argc+1); */
- av = RbTk_ALLOC_N(char *, (argc+1));
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)av); /* XXXXXXXX */
-#endif
- for (i = 0; i < argc; ++i) {
- av[i] = strdup(StringValueCStr(argv[i]));
- }
- av[argc] = NULL;
-#endif
-
- rb_thread_critical = thr_crit_bup;
-
- return av;
-}
-
-static void
-free_invoke_arguments(argc, av)
- int argc;
-#if TCL_MAJOR_VERSION >= 8
- Tcl_Obj **av;
-#else /* TCL_MAJOR_VERSION < 8 */
- char **av;
-#endif
-{
- int i;
-
- for (i = 0; i < argc; ++i) {
-#if TCL_MAJOR_VERSION >= 8
- Tcl_DecrRefCount(av[i]);
- av[i] = (Tcl_Obj*)NULL;
-#else /* TCL_MAJOR_VERSION < 8 */
- free(av[i]);
- av[i] = (char*)NULL;
-#endif
- }
-#if TCL_MAJOR_VERSION >= 8
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)av, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)av); /* XXXXXXXX */
-#else
- ckfree((char*)av);
-#endif
-#endif
-#else /* TCL_MAJOR_VERSION < 8 */
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)av, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)av); /* XXXXXXXX */
-#else
- /* free(av); */
- ckfree((char*)av);
-#endif
-#endif
-#endif
-}
-
-static VALUE
-ip_invoke_real(argc, argv, interp)
- int argc;
- VALUE *argv;
- VALUE interp;
-{
- VALUE v;
- struct tcltkip *ptr; /* tcltkip data struct */
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_Obj **av = (Tcl_Obj **)NULL;
-#else /* TCL_MAJOR_VERSION < 8 */
- char **av = (char **)NULL;
-#endif
-
- DUMP2("invoke_real called by thread:%"PRIxVALUE, rb_thread_current());
-
- /* get the data struct */
- ptr = get_ip(interp);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return rb_tainted_str_new2("");
- }
-
- /* allocate memory for arguments */
- av = alloc_invoke_arguments(argc, argv);
-
- /* Invoke the C procedure */
- Tcl_ResetResult(ptr->ip);
- v = ip_invoke_core(interp, argc, av);
-
- /* free allocated memory */
- free_invoke_arguments(argc, av);
-
- return v;
-}
-
-VALUE
-ivq_safelevel_handler(arg, ivq)
- VALUE arg;
- VALUE ivq;
-{
- struct invoke_queue *q;
-
- Data_Get_Struct(ivq, struct invoke_queue, q);
- DUMP2("(safe-level handler) $SAFE = %d", q->safe_level);
- rb_set_safe_level(q->safe_level);
- return ip_invoke_core(q->interp, q->argc, q->argv);
-}
-
-int invoke_queue_handler _((Tcl_Event *, int));
-int
-invoke_queue_handler(evPtr, flags)
- Tcl_Event *evPtr;
- int flags;
-{
- struct invoke_queue *q = (struct invoke_queue *)evPtr;
- volatile VALUE ret;
- volatile VALUE q_dat;
- volatile VALUE thread = q->thread;
- struct tcltkip *ptr;
-
- DUMP2("do_invoke_queue_handler : evPtr = %p", evPtr);
- DUMP2("invoke queue_thread : %"PRIxVALUE, rb_thread_current());
- DUMP2("added by thread : %"PRIxVALUE, thread);
-
- if (*(q->done)) {
- DUMP1("processed by another event-loop");
- return 0;
- } else {
- DUMP1("process it on current event-loop");
- }
-
- if (RTEST(rb_thread_alive_p(thread))
- && ! RTEST(rb_funcall(thread, ID_stop_p, 0))) {
- DUMP1("caller is not yet ready to receive the result -> pending");
- return 0;
- }
-
- /* process it */
- *(q->done) = 1;
-
- /* deleted ipterp ? */
- ptr = get_ip(q->interp);
- if (deleted_ip(ptr)) {
- /* deleted IP --> ignore */
- return 1;
- }
-
- /* incr internal handler mark */
- rbtk_internal_eventloop_handler++;
-
- /* check safe-level */
- if (rb_safe_level() != q->safe_level) {
- /* q_dat = Data_Wrap_Struct(rb_cData,0,0,q); */
- q_dat = Data_Wrap_Struct(0,invoke_queue_mark,-1,q);
- ret = rb_funcall(rb_proc_new(ivq_safelevel_handler, q_dat),
- ID_call, 0);
- rb_gc_force_recycle(q_dat);
- q_dat = (VALUE)NULL;
- } else {
- DUMP2("call invoke_real (for caller thread:%"PRIxVALUE")", thread);
- DUMP2("call invoke_real (current thread:%"PRIxVALUE")", rb_thread_current());
- ret = ip_invoke_core(q->interp, q->argc, q->argv);
- }
-
- /* set result */
- RARRAY_ASET(q->result, 0, ret);
- ret = (VALUE)NULL;
-
- /* decr internal handler mark */
- rbtk_internal_eventloop_handler--;
-
- /* complete */
- *(q->done) = -1;
-
- /* unlink ruby objects */
- q->interp = (VALUE)NULL;
- q->result = (VALUE)NULL;
- q->thread = (VALUE)NULL;
-
- /* back to caller */
- if (RTEST(rb_thread_alive_p(thread))) {
- DUMP2("back to caller (caller thread:%"PRIxVALUE")", thread);
- DUMP2(" (current thread:%"PRIxVALUE")", rb_thread_current());
-#if CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE
- have_rb_thread_waiting_for_value = 1;
- rb_thread_wakeup(thread);
-#else
- rb_thread_run(thread);
-#endif
- DUMP1("finish back to caller");
-#if DO_THREAD_SCHEDULE_AT_CALLBACK_DONE
- rb_thread_schedule();
-#endif
- } else {
- DUMP2("caller is dead (caller thread:%"PRIxVALUE")", thread);
- DUMP2(" (current thread:%"PRIxVALUE")", rb_thread_current());
- }
-
- /* end of handler : remove it */
- return 1;
-}
-
-static VALUE
-ip_invoke_with_position(argc, argv, obj, position)
- int argc;
- VALUE *argv;
- VALUE obj;
- Tcl_QueuePosition position;
-{
- struct invoke_queue *ivq;
-#ifdef RUBY_USE_NATIVE_THREAD
- struct tcltkip *ptr;
-#endif
- int *alloc_done;
- int thr_crit_bup;
- volatile VALUE current = rb_thread_current();
- volatile VALUE ip_obj = obj;
- volatile VALUE result;
- volatile VALUE ret;
- struct timeval t;
-
-#if TCL_MAJOR_VERSION >= 8
- Tcl_Obj **av = (Tcl_Obj **)NULL;
-#else /* TCL_MAJOR_VERSION < 8 */
- char **av = (char **)NULL;
-#endif
-
- if (argc < 1) {
- rb_raise(rb_eArgError, "command name missing");
- }
-
-#ifdef RUBY_USE_NATIVE_THREAD
- ptr = get_ip(ip_obj);
- DUMP2("invoke status: ptr->tk_thread_id %p", ptr->tk_thread_id);
- DUMP2("invoke status: Tcl_GetCurrentThread %p", Tcl_GetCurrentThread());
-#else
- DUMP2("status: Tcl_GetCurrentThread %p", Tcl_GetCurrentThread());
-#endif
- DUMP2("status: eventloopt_thread %"PRIxVALUE, eventloop_thread);
-
- if (
-#ifdef RUBY_USE_NATIVE_THREAD
- (ptr->tk_thread_id == 0 || ptr->tk_thread_id == Tcl_GetCurrentThread())
- &&
-#endif
- (NIL_P(eventloop_thread) || current == eventloop_thread)
- ) {
- if (NIL_P(eventloop_thread)) {
- DUMP2("invoke from thread:%"PRIxVALUE" but no eventloop", current);
- } else {
- DUMP2("invoke from current eventloop %"PRIxVALUE, current);
- }
- result = ip_invoke_real(argc, argv, ip_obj);
- if (rb_obj_is_kind_of(result, rb_eException)) {
- rb_exc_raise(result);
- }
- return result;
- }
-
- DUMP2("invoke from thread %"PRIxVALUE" (NOT current eventloop)", current);
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* allocate memory (for arguments) */
- av = alloc_invoke_arguments(argc, argv);
-
- /* allocate memory (keep result) */
- /* alloc_done = (int*)ALLOC(int); */
- alloc_done = RbTk_ALLOC_N(int, 1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)alloc_done); /* XXXXXXXX */
-#endif
- *alloc_done = 0;
-
- /* allocate memory (freed by Tcl_ServiceEvent) */
- /* ivq = (struct invoke_queue *)Tcl_Alloc(sizeof(struct invoke_queue)); */
- ivq = RbTk_ALLOC_N(struct invoke_queue, 1);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)ivq); /* XXXXXXXX */
-#endif
-
- /* allocate result obj */
- result = rb_ary_new3(1, Qnil);
-
- /* construct event data */
- ivq->done = alloc_done;
- ivq->argc = argc;
- ivq->argv = av;
- ivq->interp = ip_obj;
- ivq->result = result;
- ivq->thread = current;
- ivq->safe_level = rb_safe_level();
- ivq->ev.proc = invoke_queue_handler;
-
- /* add the handler to Tcl event queue */
- DUMP1("add handler");
-#ifdef RUBY_USE_NATIVE_THREAD
- if (ptr->tk_thread_id) {
- /* Tcl_ThreadQueueEvent(ptr->tk_thread_id, &(ivq->ev), position); */
- Tcl_ThreadQueueEvent(ptr->tk_thread_id, (Tcl_Event*)ivq, position);
- Tcl_ThreadAlert(ptr->tk_thread_id);
- } else if (tk_eventloop_thread_id) {
- /* Tcl_ThreadQueueEvent(tk_eventloop_thread_id,
- &(ivq->ev), position); */
- Tcl_ThreadQueueEvent(tk_eventloop_thread_id,
- (Tcl_Event*)ivq, position);
- Tcl_ThreadAlert(tk_eventloop_thread_id);
- } else {
- /* Tcl_QueueEvent(&(ivq->ev), position); */
- Tcl_QueueEvent((Tcl_Event*)ivq, position);
- }
-#else
- /* Tcl_QueueEvent(&(ivq->ev), position); */
- Tcl_QueueEvent((Tcl_Event*)ivq, position);
-#endif
-
- rb_thread_critical = thr_crit_bup;
-
- /* wait for the handler to be processed */
- t.tv_sec = 0;
- t.tv_usec = (long)((EVENT_HANDLER_TIMEOUT)*1000.0);
-
- DUMP2("ivq wait for handler (current thread:%"PRIxVALUE")", current);
- while(*alloc_done >= 0) {
- /* rb_thread_stop(); */
- /* rb_thread_sleep_forever(); */
- rb_thread_wait_for(t);
- DUMP2("*** ivq wakeup (current thread:%"PRIxVALUE")", current);
- DUMP2("*** (eventloop thread:%"PRIxVALUE")", eventloop_thread);
- if (NIL_P(eventloop_thread)) {
- DUMP1("*** ivq lost eventloop thread");
- break;
- }
- }
- DUMP2("back from handler (current thread:%"PRIxVALUE")", current);
-
- /* get result & free allocated memory */
- ret = RARRAY_AREF(result, 0);
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)alloc_done, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)alloc_done); /* XXXXXXXX */
-#else
- /* free(alloc_done); */
- ckfree((char*)alloc_done);
-#endif
-#endif
-
-#if 0 /* ivq is freed by Tcl_ServiceEvent */
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)ivq, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release(ivq);
-#else
- ckfree((char*)ivq);
-#endif
-#endif
-#endif
-
- /* free allocated memory */
- free_invoke_arguments(argc, av);
-
- /* exception? */
- if (rb_obj_is_kind_of(ret, rb_eException)) {
- DUMP1("raise exception");
- /* rb_exc_raise(ret); */
- rb_exc_raise(rb_exc_new3(rb_obj_class(ret),
- rb_funcallv(ret, ID_to_s, 0, 0)));
- }
-
- DUMP1("exit ip_invoke");
- return ret;
-}
-
-
-/* get return code from Tcl_Eval() */
-static VALUE
-ip_retval(self)
- VALUE self;
-{
- struct tcltkip *ptr; /* tcltkip data struct */
-
- /* get the data strcut */
- ptr = get_ip(self);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return rb_tainted_str_new2("");
- }
-
- return (INT2FIX(ptr->return_value));
-}
-
-static VALUE
-ip_invoke(argc, argv, obj)
- int argc;
- VALUE *argv;
- VALUE obj;
-{
- return ip_invoke_with_position(argc, argv, obj, TCL_QUEUE_TAIL);
-}
-
-static VALUE
-ip_invoke_immediate(argc, argv, obj)
- int argc;
- VALUE *argv;
- VALUE obj;
-{
- /* POTENTIALY INSECURE : can create infinite loop */
- return ip_invoke_with_position(argc, argv, obj, TCL_QUEUE_HEAD);
-}
-
-
-/* access Tcl variables */
-static VALUE
-ip_get_variable2_core(interp, argc, argv)
- VALUE interp;
- int argc;
- VALUE *argv;
-{
- struct tcltkip *ptr = get_ip(interp);
- int thr_crit_bup;
- volatile VALUE varname, index, flag;
-
- varname = argv[0];
- index = argv[1];
- flag = argv[2];
-
- /*
- StringValue(varname);
- if (!NIL_P(index)) StringValue(index);
- */
-
-#if TCL_MAJOR_VERSION >= 8
- {
- Tcl_Obj *ret;
- volatile VALUE strval;
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- rb_thread_critical = thr_crit_bup;
- return rb_tainted_str_new2("");
- } else {
- /* Tcl_Preserve(ptr->ip); */
- rbtk_preserve_ip(ptr);
- ret = Tcl_GetVar2Ex(ptr->ip, RSTRING_PTR(varname),
- NIL_P(index) ? NULL : RSTRING_PTR(index),
- FIX2INT(flag));
- }
-
- if (ret == (Tcl_Obj*)NULL) {
- volatile VALUE exc;
- /* exc = rb_exc_new2(rb_eRuntimeError,
- Tcl_GetStringResult(ptr->ip)); */
- exc = create_ip_exc(interp, rb_eRuntimeError, "%s",
- Tcl_GetStringResult(ptr->ip));
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
- return exc;
- }
-
- Tcl_IncrRefCount(ret);
- strval = get_str_from_obj(ret);
- RbTk_OBJ_UNTRUST(strval);
- Tcl_DecrRefCount(ret);
-
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
- return(strval);
- }
-#else /* TCL_MAJOR_VERSION < 8 */
- {
- char *ret;
- volatile VALUE strval;
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return rb_tainted_str_new2("");
- } else {
- /* Tcl_Preserve(ptr->ip); */
- rbtk_preserve_ip(ptr);
- ret = Tcl_GetVar2(ptr->ip, RSTRING_PTR(varname),
- NIL_P(index) ? NULL : RSTRING_PTR(index),
- FIX2INT(flag));
- }
-
- if (ret == (char*)NULL) {
- volatile VALUE exc;
- exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
- return exc;
- }
-
- strval = rb_tainted_str_new2(ret);
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
-
- return(strval);
- }
-#endif
-}
-
-static VALUE
-ip_get_variable2(self, varname, index, flag)
- VALUE self;
- VALUE varname;
- VALUE index;
- VALUE flag;
-{
- VALUE argv[3];
- VALUE retval;
-
- StringValue(varname);
- if (!NIL_P(index)) StringValue(index);
-
- argv[0] = varname;
- argv[1] = index;
- argv[2] = flag;
-
- retval = tk_funcall(ip_get_variable2_core, 3, argv, self);
-
- if (NIL_P(retval)) {
- return rb_tainted_str_new2("");
- } else {
- return retval;
- }
-}
-
-static VALUE
-ip_get_variable(self, varname, flag)
- VALUE self;
- VALUE varname;
- VALUE flag;
-{
- return ip_get_variable2(self, varname, Qnil, flag);
-}
-
-static VALUE
-ip_set_variable2_core(interp, argc, argv)
- VALUE interp;
- int argc;
- VALUE *argv;
-{
- struct tcltkip *ptr = get_ip(interp);
- int thr_crit_bup;
- volatile VALUE varname, index, value, flag;
-
- varname = argv[0];
- index = argv[1];
- value = argv[2];
- flag = argv[3];
-
- /*
- StringValue(varname);
- if (!NIL_P(index)) StringValue(index);
- StringValue(value);
- */
-
-#if TCL_MAJOR_VERSION >= 8
- {
- Tcl_Obj *valobj, *ret;
- volatile VALUE strval;
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- valobj = get_obj_from_str(value);
- Tcl_IncrRefCount(valobj);
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- Tcl_DecrRefCount(valobj);
- rb_thread_critical = thr_crit_bup;
- return rb_tainted_str_new2("");
- } else {
- /* Tcl_Preserve(ptr->ip); */
- rbtk_preserve_ip(ptr);
- ret = Tcl_SetVar2Ex(ptr->ip, RSTRING_PTR(varname),
- NIL_P(index) ? NULL : RSTRING_PTR(index),
- valobj, FIX2INT(flag));
- }
-
- Tcl_DecrRefCount(valobj);
-
- if (ret == (Tcl_Obj*)NULL) {
- volatile VALUE exc;
- /* exc = rb_exc_new2(rb_eRuntimeError,
- Tcl_GetStringResult(ptr->ip)); */
- exc = create_ip_exc(interp, rb_eRuntimeError, "%s",
- Tcl_GetStringResult(ptr->ip));
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
- return exc;
- }
-
- Tcl_IncrRefCount(ret);
- strval = get_str_from_obj(ret);
- RbTk_OBJ_UNTRUST(strval);
- Tcl_DecrRefCount(ret);
-
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
-
- return(strval);
- }
-#else /* TCL_MAJOR_VERSION < 8 */
- {
- CONST char *ret;
- volatile VALUE strval;
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return rb_tainted_str_new2("");
- } else {
- /* Tcl_Preserve(ptr->ip); */
- rbtk_preserve_ip(ptr);
- ret = Tcl_SetVar2(ptr->ip, RSTRING_PTR(varname),
- NIL_P(index) ? NULL : RSTRING_PTR(index),
- RSTRING_PTR(value), FIX2INT(flag));
- }
-
- if (ret == (char*)NULL) {
- return rb_exc_new2(rb_eRuntimeError, ptr->ip->result);
- }
-
- strval = rb_tainted_str_new2(ret);
-
- /* Tcl_Release(ptr->ip); */
- rbtk_release_ip(ptr);
- rb_thread_critical = thr_crit_bup;
-
- return(strval);
- }
-#endif
-}
-
-static VALUE
-ip_set_variable2(self, varname, index, value, flag)
- VALUE self;
- VALUE varname;
- VALUE index;
- VALUE value;
- VALUE flag;
-{
- VALUE argv[4];
- VALUE retval;
-
- StringValue(varname);
- if (!NIL_P(index)) StringValue(index);
- StringValue(value);
-
- argv[0] = varname;
- argv[1] = index;
- argv[2] = value;
- argv[3] = flag;
-
- retval = tk_funcall(ip_set_variable2_core, 4, argv, self);
-
- if (NIL_P(retval)) {
- return rb_tainted_str_new2("");
- } else {
- return retval;
- }
-}
-
-static VALUE
-ip_set_variable(self, varname, value, flag)
- VALUE self;
- VALUE varname;
- VALUE value;
- VALUE flag;
-{
- return ip_set_variable2(self, varname, Qnil, value, flag);
-}
-
-static VALUE
-ip_unset_variable2_core(interp, argc, argv)
- VALUE interp;
- int argc;
- VALUE *argv;
-{
- struct tcltkip *ptr = get_ip(interp);
- volatile VALUE varname, index, flag;
-
- varname = argv[0];
- index = argv[1];
- flag = argv[2];
-
- /*
- StringValue(varname);
- if (!NIL_P(index)) StringValue(index);
- */
-
- /* ip is deleted? */
- if (deleted_ip(ptr)) {
- return Qtrue;
- }
-
- ptr->return_value = Tcl_UnsetVar2(ptr->ip, RSTRING_PTR(varname),
- NIL_P(index) ? NULL : RSTRING_PTR(index),
- FIX2INT(flag));
-
- if (ptr->return_value == TCL_ERROR) {
- if (FIX2INT(flag) & TCL_LEAVE_ERR_MSG) {
- /* return rb_exc_new2(rb_eRuntimeError,
- Tcl_GetStringResult(ptr->ip)); */
- return create_ip_exc(interp, rb_eRuntimeError, "%s",
- Tcl_GetStringResult(ptr->ip));
- }
- return Qfalse;
- }
- return Qtrue;
-}
-
-static VALUE
-ip_unset_variable2(self, varname, index, flag)
- VALUE self;
- VALUE varname;
- VALUE index;
- VALUE flag;
-{
- VALUE argv[3];
- VALUE retval;
-
- StringValue(varname);
- if (!NIL_P(index)) StringValue(index);
-
- argv[0] = varname;
- argv[1] = index;
- argv[2] = flag;
-
- retval = tk_funcall(ip_unset_variable2_core, 3, argv, self);
-
- if (NIL_P(retval)) {
- return rb_tainted_str_new2("");
- } else {
- return retval;
- }
-}
-
-static VALUE
-ip_unset_variable(self, varname, flag)
- VALUE self;
- VALUE varname;
- VALUE flag;
-{
- return ip_unset_variable2(self, varname, Qnil, flag);
-}
-
-static VALUE
-ip_get_global_var(self, varname)
- VALUE self;
- VALUE varname;
-{
- return ip_get_variable(self, varname,
- INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
-}
-
-static VALUE
-ip_get_global_var2(self, varname, index)
- VALUE self;
- VALUE varname;
- VALUE index;
-{
- return ip_get_variable2(self, varname, index,
- INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
-}
-
-static VALUE
-ip_set_global_var(self, varname, value)
- VALUE self;
- VALUE varname;
- VALUE value;
-{
- return ip_set_variable(self, varname, value,
- INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
-}
-
-static VALUE
-ip_set_global_var2(self, varname, index, value)
- VALUE self;
- VALUE varname;
- VALUE index;
- VALUE value;
-{
- return ip_set_variable2(self, varname, index, value,
- INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
-}
-
-static VALUE
-ip_unset_global_var(self, varname)
- VALUE self;
- VALUE varname;
-{
- return ip_unset_variable(self, varname,
- INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
-}
-
-static VALUE
-ip_unset_global_var2(self, varname, index)
- VALUE self;
- VALUE varname;
- VALUE index;
-{
- return ip_unset_variable2(self, varname, index,
- INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
-}
-
-
-/* treat Tcl_List */
-static VALUE
-lib_split_tklist_core(ip_obj, list_str)
- VALUE ip_obj;
- VALUE list_str;
-{
- Tcl_Interp *interp;
- volatile VALUE ary, elem;
- int idx;
- int taint_flag = OBJ_TAINTED(list_str);
-#ifdef HAVE_RUBY_ENCODING_H
- int list_enc_idx;
- volatile VALUE list_ivar_enc;
-#endif
- int result;
- VALUE old_gc;
-
- tcl_stubs_check();
-
- if (NIL_P(ip_obj)) {
- interp = (Tcl_Interp *)NULL;
- } else if (get_ip(ip_obj) == (struct tcltkip *)NULL) {
- interp = (Tcl_Interp *)NULL;
- } else {
- interp = get_ip(ip_obj)->ip;
- }
-
- StringValue(list_str);
-#ifdef HAVE_RUBY_ENCODING_H
- list_enc_idx = rb_enc_get_index(list_str);
- list_ivar_enc = rb_ivar_get(list_str, ID_at_enc);
-#endif
-
- {
-#if TCL_MAJOR_VERSION >= 8
- /* object style interface */
- Tcl_Obj *listobj;
- int objc;
- Tcl_Obj **objv;
- int thr_crit_bup;
-
- listobj = get_obj_from_str(list_str);
-
- Tcl_IncrRefCount(listobj);
-
- result = Tcl_ListObjGetElements(interp, listobj, &objc, &objv);
-
- if (result == TCL_ERROR) {
- Tcl_DecrRefCount(listobj);
- if (interp == (Tcl_Interp*)NULL) {
- rb_raise(rb_eRuntimeError, "can't get elements from list");
- } else {
- rb_raise(rb_eRuntimeError, "%s", Tcl_GetStringResult(interp));
- }
- }
-
- for(idx = 0; idx < objc; idx++) {
- Tcl_IncrRefCount(objv[idx]);
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- ary = rb_ary_new2(objc);
- if (taint_flag) RbTk_OBJ_UNTRUST(ary);
-
- old_gc = rb_gc_disable();
-
- for(idx = 0; idx < objc; idx++) {
- elem = get_str_from_obj(objv[idx]);
- if (taint_flag) RbTk_OBJ_UNTRUST(elem);
-
-#ifdef HAVE_RUBY_ENCODING_H
- if (rb_enc_get_index(elem) == ENCODING_INDEX_BINARY) {
- rb_enc_associate_index(elem, ENCODING_INDEX_BINARY);
- rb_ivar_set(elem, ID_at_enc, ENCODING_NAME_BINARY);
- } else {
- rb_enc_associate_index(elem, list_enc_idx);
- rb_ivar_set(elem, ID_at_enc, list_ivar_enc);
- }
-#endif
- /* RARRAY(ary)->ptr[idx] = elem; */
- rb_ary_push(ary, elem);
- }
-
- /* RARRAY(ary)->len = objc; */
-
- if (old_gc == Qfalse) rb_gc_enable();
-
- rb_thread_critical = thr_crit_bup;
-
- for(idx = 0; idx < objc; idx++) {
- Tcl_DecrRefCount(objv[idx]);
- }
-
- Tcl_DecrRefCount(listobj);
-
-#else /* TCL_MAJOR_VERSION < 8 */
- /* string style interface */
- int argc;
- char **argv;
-
- if (Tcl_SplitList(interp, RSTRING_PTR(list_str),
- &argc, &argv) == TCL_ERROR) {
- if (interp == (Tcl_Interp*)NULL) {
- rb_raise(rb_eRuntimeError, "can't get elements from list");
- } else {
- rb_raise(rb_eRuntimeError, "%s", interp->result);
- }
- }
-
- ary = rb_ary_new2(argc);
- if (taint_flag) RbTk_OBJ_UNTRUST(ary);
-
- old_gc = rb_gc_disable();
-
- for(idx = 0; idx < argc; idx++) {
- if (taint_flag) {
- elem = rb_tainted_str_new2(argv[idx]);
- } else {
- elem = rb_str_new2(argv[idx]);
- }
- /* rb_ivar_set(elem, ID_at_enc, rb_str_new2("binary")); */
- /* RARRAY(ary)->ptr[idx] = elem; */
- rb_ary_push(ary, elem)
- }
- /* RARRAY(ary)->len = argc; */
-
- if (old_gc == Qfalse) rb_gc_enable();
-#endif
- }
-
- return ary;
-}
-
-static VALUE
-lib_split_tklist(self, list_str)
- VALUE self;
- VALUE list_str;
-{
- return lib_split_tklist_core(Qnil, list_str);
-}
-
-
-static VALUE
-ip_split_tklist(self, list_str)
- VALUE self;
- VALUE list_str;
-{
- return lib_split_tklist_core(self, list_str);
-}
-
-static VALUE
-lib_merge_tklist(argc, argv, obj)
- int argc;
- VALUE *argv;
- VALUE obj;
-{
- int num, len;
- int *flagPtr;
- char *dst, *result;
- volatile VALUE str;
- int taint_flag = 0;
- int thr_crit_bup;
- VALUE old_gc;
-
- if (argc == 0) return rb_str_new2("");
-
- tcl_stubs_check();
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
- old_gc = rb_gc_disable();
-
- /* based on Tcl/Tk's Tcl_Merge() */
- /* flagPtr = ALLOC_N(int, argc); */
- flagPtr = RbTk_ALLOC_N(int, argc);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)flagPtr); /* XXXXXXXXXX */
-#endif
-
- /* pass 1 */
- len = 1;
- for(num = 0; num < argc; num++) {
- if (OBJ_TAINTED(argv[num])) taint_flag = 1;
- dst = StringValueCStr(argv[num]);
-#if TCL_MAJOR_VERSION >= 8
- len += Tcl_ScanCountedElement(dst, RSTRING_LENINT(argv[num]),
- &flagPtr[num]) + 1;
-#else /* TCL_MAJOR_VERSION < 8 */
- len += Tcl_ScanElement(dst, &flagPtr[num]) + 1;
-#endif
- }
-
- /* pass 2 */
- /* result = (char *)Tcl_Alloc(len); */
- result = (char *)ckalloc(len);
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Preserve((ClientData)result);
-#endif
- dst = result;
- for(num = 0; num < argc; num++) {
-#if TCL_MAJOR_VERSION >= 8
- len = Tcl_ConvertCountedElement(RSTRING_PTR(argv[num]),
- RSTRING_LENINT(argv[num]),
- dst, flagPtr[num]);
-#else /* TCL_MAJOR_VERSION < 8 */
- len = Tcl_ConvertElement(RSTRING_PTR(argv[num]), dst, flagPtr[num]);
-#endif
- dst += len;
- *dst = ' ';
- dst++;
- }
- if (dst == result) {
- *dst = 0;
- } else {
- dst[-1] = 0;
- }
-
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)flagPtr, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)flagPtr);
-#else
- /* free(flagPtr); */
- ckfree((char*)flagPtr);
-#endif
-#endif
-
- /* create object */
- str = rb_str_new(result, dst - result - 1);
- if (taint_flag) RbTk_OBJ_UNTRUST(str);
-#if 0 /* use Tcl_EventuallyFree */
- Tcl_EventuallyFree((ClientData)result, TCL_DYNAMIC); /* XXXXXXXX */
-#else
-#if 0 /* use Tcl_Preserve/Release */
- Tcl_Release((ClientData)result); /* XXXXXXXXXXX */
-#else
- /* Tcl_Free(result); */
- ckfree(result);
-#endif
-#endif
-
- if (old_gc == Qfalse) rb_gc_enable();
- rb_thread_critical = thr_crit_bup;
-
- return str;
-}
-
-static VALUE
-lib_conv_listelement(self, src)
- VALUE self;
- VALUE src;
-{
- int len, scan_flag;
- volatile VALUE dst;
- int taint_flag = OBJ_TAINTED(src);
- int thr_crit_bup;
-
- tcl_stubs_check();
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- StringValue(src);
-
-#if TCL_MAJOR_VERSION >= 8
- len = Tcl_ScanCountedElement(RSTRING_PTR(src), RSTRING_LENINT(src),
- &scan_flag);
- dst = rb_str_new(0, len + 1);
- len = Tcl_ConvertCountedElement(RSTRING_PTR(src), RSTRING_LENINT(src),
- RSTRING_PTR(dst), scan_flag);
-#else /* TCL_MAJOR_VERSION < 8 */
- len = Tcl_ScanElement(RSTRING_PTR(src), &scan_flag);
- dst = rb_str_new(0, len + 1);
- len = Tcl_ConvertElement(RSTRING_PTR(src), RSTRING_PTR(dst), scan_flag);
-#endif
-
- rb_str_resize(dst, len);
- if (taint_flag) RbTk_OBJ_UNTRUST(dst);
-
- rb_thread_critical = thr_crit_bup;
-
- return dst;
-}
-
-static VALUE
-lib_getversion(self)
- VALUE self;
-{
- set_tcltk_version();
-
- return rb_ary_new3(4, INT2NUM(tcltk_version.major),
- INT2NUM(tcltk_version.minor),
- INT2NUM(tcltk_version.type),
- INT2NUM(tcltk_version.patchlevel));
-}
-
-static VALUE
-lib_get_reltype_name(self)
- VALUE self;
-{
- set_tcltk_version();
-
- switch(tcltk_version.type) {
- case TCL_ALPHA_RELEASE:
- return rb_str_new2("alpha");
- case TCL_BETA_RELEASE:
- return rb_str_new2("beta");
- case TCL_FINAL_RELEASE:
- return rb_str_new2("final");
- default:
- rb_raise(rb_eRuntimeError, "tcltklib has invalid release type number");
- }
-
- UNREACHABLE;
-}
-
-
-static VALUE
-tcltklib_compile_info(void)
-{
- VALUE ret;
- static const char info[] =
- "tcltklib " TCLTKLIB_RELEASE_DATE " "
- ":: Ruby"
-#ifdef RUBY_API_VERSION_MAJOR
- STRINGIZE(RUBY_API_VERSION_MAJOR)"."
- STRINGIZE(RUBY_API_VERSION_MINOR)"."
- STRINGIZE(RUBY_API_VERSION_TEENY)" "
-#else
- RUBY_VERSION" "
-#endif
-#ifdef RUBY_RELEASE_DATE
- "("RUBY_RELEASE_DATE") "
-#endif
-#ifdef HAVE_NATIVETHREAD
- "with"
-#else
- "without"
-#endif
- " pthread "
- ":: Tcl" TCL_PATCH_LEVEL "("
-#ifdef USE_TCL_STUBS
- "with"
-#else
- "without"
-#endif
- " stub)"
- "/"
- "Tk" TK_PATCH_LEVEL "("
-#ifdef USE_TK_STUBS
- "with"
-#else
- "without"
-#endif
- " stub) "
-#ifdef WITH_TCL_ENABLE_THREAD
-# if WITH_TCL_ENABLE_THREAD
- "with"
-# else
- "without"
-# endif
-#else
- "unknown"
-#endif
- " tcl_threads";
- ret = rb_obj_freeze(rb_str_new2(info));
-
- return ret;
-}
-
-
-/*###############################################*/
-
-static VALUE
-create_dummy_encoding_for_tk_core(interp, name, error_mode)
- VALUE interp;
- VALUE name;
- VALUE error_mode;
-{
- get_ip(interp);
-
-
- StringValue(name);
-
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1)
- if (Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(name)) == (Tcl_Encoding)NULL) {
- if (RTEST(error_mode)) {
- rb_raise(rb_eArgError, "invalid Tk encoding name '%s'",
- RSTRING_PTR(name));
- } else {
- return Qnil;
- }
- }
-#endif
-
-#ifdef HAVE_RUBY_ENCODING_H
- if (RTEST(rb_define_dummy_encoding(RSTRING_PTR(name)))) {
- int idx = rb_enc_find_index(StringValueCStr(name));
- return rb_enc_from_encoding(rb_enc_from_index(idx));
- } else {
- if (RTEST(error_mode)) {
- rb_raise(rb_eRuntimeError, "fail to create dummy encoding for '%s'",
- RSTRING_PTR(name));
- } else {
- return Qnil;
- }
- }
-
- UNREACHABLE;
-#else
- return name;
-#endif
-}
-static VALUE
-create_dummy_encoding_for_tk(interp, name)
- VALUE interp;
- VALUE name;
-{
- return create_dummy_encoding_for_tk_core(interp, name, Qtrue);
-}
-
-
-#ifdef HAVE_RUBY_ENCODING_H
-static int
-update_encoding_table(table, interp, error_mode)
- VALUE table;
- VALUE interp;
- VALUE error_mode;
-{
- struct tcltkip *ptr;
- int retry = 0;
- int i, idx, objc;
- Tcl_Obj **objv;
- Tcl_Obj *enc_list;
- volatile VALUE encname = Qnil;
- volatile VALUE encobj = Qnil;
-
- /* interpreter check */
- if (NIL_P(interp)) return 0;
- ptr = get_ip(interp);
- if (ptr == (struct tcltkip *) NULL) return 0;
- if (deleted_ip(ptr)) return 0;
-
- /* get Tcl's encoding list */
- Tcl_GetEncodingNames(ptr->ip);
- enc_list = Tcl_GetObjResult(ptr->ip);
- Tcl_IncrRefCount(enc_list);
-
- if (Tcl_ListObjGetElements(ptr->ip, enc_list,
- &objc, &objv) != TCL_OK) {
- Tcl_DecrRefCount(enc_list);
- /* rb_raise(rb_eRuntimeError, "failt to get Tcl's encoding names");*/
- return 0;
- }
-
- /* check each encoding name */
- for(i = 0; i < objc; i++) {
- encname = rb_str_new2(Tcl_GetString(objv[i]));
- if (NIL_P(rb_hash_lookup(table, encname))) {
- /* new Tk encoding -> add to table */
- idx = rb_enc_find_index(StringValueCStr(encname));
- if (idx < 0) {
- encobj = create_dummy_encoding_for_tk_core(interp,encname,error_mode);
- } else {
- encobj = rb_enc_from_encoding(rb_enc_from_index(idx));
- }
- encname = rb_obj_freeze(encname);
- rb_hash_aset(table, encname, encobj);
- if (!NIL_P(encobj) && NIL_P(rb_hash_lookup(table, encobj))) {
- rb_hash_aset(table, encobj, encname);
- }
- retry = 1;
- }
- }
-
- Tcl_DecrRefCount(enc_list);
-
- return retry;
-}
-
-static VALUE
-encoding_table_get_name_core(table, enc_arg, error_mode)
- VALUE table;
- VALUE enc_arg;
- VALUE error_mode;
-{
- volatile VALUE enc = enc_arg;
- volatile VALUE name = Qnil;
- volatile VALUE tmp = Qnil;
- volatile VALUE interp = rb_ivar_get(table, ID_at_interp);
- struct tcltkip *ptr = (struct tcltkip *) NULL;
- int idx;
-
- /* deleted interp ? */
- if (!NIL_P(interp)) {
- ptr = get_ip(interp);
- if (deleted_ip(ptr)) {
- ptr = (struct tcltkip *) NULL;
- }
- }
-
- /* encoding argument check */
- /* 1st: default encoding setting of interp */
- if (ptr && NIL_P(enc)) {
- if (rb_respond_to(interp, ID_encoding_name)) {
- enc = rb_funcallv(interp, ID_encoding_name, 0, 0);
- }
- }
- /* 2nd: Encoding.default_internal */
- if (NIL_P(enc)) {
- enc = rb_enc_default_internal();
- }
- /* 3rd: encoding system of Tcl/Tk */
- if (NIL_P(enc)) {
- enc = rb_str_new2(Tcl_GetEncodingName((Tcl_Encoding)NULL));
- }
- /* 4th: Encoding.default_external */
- if (NIL_P(enc)) {
- enc = rb_enc_default_external();
- }
- /* 5th: Encoding.locale_charmap */
- if (NIL_P(enc)) {
- enc = rb_locale_charmap(rb_cEncoding);
- }
-
- if (RTEST(rb_obj_is_kind_of(enc, cRubyEncoding))) {
- /* Ruby's Encoding object */
- name = rb_hash_lookup(table, enc);
- if (!NIL_P(name)) {
- /* find */
- return name;
- }
-
- /* is it new ? */
- /* update check of Tk encoding names */
- if (update_encoding_table(table, interp, error_mode)) {
- /* add new relations to the table */
- /* RETRY: registered Ruby encoding? */
- name = rb_hash_lookup(table, enc);
- if (!NIL_P(name)) {
- /* find */
- return name;
- }
- }
- /* fail to find */
-
- } else {
- /* String or Symbol? */
- name = rb_funcallv(enc, ID_to_s, 0, 0);
-
- if (!NIL_P(rb_hash_lookup(table, name))) {
- /* find */
- return name;
- }
-
- /* is it new ? */
- idx = rb_enc_find_index(StringValueCStr(name));
- if (idx >= 0) {
- enc = rb_enc_from_encoding(rb_enc_from_index(idx));
-
- /* registered Ruby encoding? */
- tmp = rb_hash_lookup(table, enc);
- if (!NIL_P(tmp)) {
- /* find */
- return tmp;
- }
-
- /* update check of Tk encoding names */
- if (update_encoding_table(table, interp, error_mode)) {
- /* add new relations to the table */
- /* RETRY: registered Ruby encoding? */
- tmp = rb_hash_lookup(table, enc);
- if (!NIL_P(tmp)) {
- /* find */
- return tmp;
- }
- }
- }
- /* fail to find */
- }
-
- if (RTEST(error_mode)) {
- enc = rb_funcallv(enc_arg, ID_to_s, 0, 0);
- rb_raise(rb_eArgError, "unsupported Tk encoding '%s'", RSTRING_PTR(enc));
- }
- return Qnil;
-}
-static VALUE
-encoding_table_get_obj_core(table, enc, error_mode)
- VALUE table;
- VALUE enc;
- VALUE error_mode;
-{
- volatile VALUE obj = Qnil;
-
- obj = rb_hash_lookup(table,
- encoding_table_get_name_core(table, enc, error_mode));
- if (RTEST(rb_obj_is_kind_of(obj, cRubyEncoding))) {
- return obj;
- } else {
- return Qnil;
- }
-}
-
-#else /* ! HAVE_RUBY_ENCODING_H */
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1)
-static int
-update_encoding_table(table, interp, error_mode)
- VALUE table;
- VALUE interp;
- VALUE error_mode;
-{
- struct tcltkip *ptr;
- int retry = 0;
- int i, objc;
- Tcl_Obj **objv;
- Tcl_Obj *enc_list;
- volatile VALUE encname = Qnil;
-
- /* interpreter check */
- if (NIL_P(interp)) return 0;
- ptr = get_ip(interp);
- if (ptr == (struct tcltkip *) NULL) return 0;
- if (deleted_ip(ptr)) return 0;
-
- /* get Tcl's encoding list */
- Tcl_GetEncodingNames(ptr->ip);
- enc_list = Tcl_GetObjResult(ptr->ip);
- Tcl_IncrRefCount(enc_list);
-
- if (Tcl_ListObjGetElements(ptr->ip, enc_list, &objc, &objv) != TCL_OK) {
- Tcl_DecrRefCount(enc_list);
- /* rb_raise(rb_eRuntimeError, "failt to get Tcl's encoding names"); */
- return 0;
- }
-
- /* get encoding name and set it to table */
- for(i = 0; i < objc; i++) {
- encname = rb_str_new2(Tcl_GetString(objv[i]));
- if (NIL_P(rb_hash_lookup(table, encname))) {
- /* new Tk encoding -> add to table */
- encname = rb_obj_freeze(encname);
- rb_hash_aset(table, encname, encname);
- retry = 1;
- }
- }
-
- Tcl_DecrRefCount(enc_list);
-
- return retry;
-}
-
-static VALUE
-encoding_table_get_name_core(table, enc, error_mode)
- VALUE table;
- VALUE enc;
- VALUE error_mode;
-{
- volatile VALUE name = Qnil;
-
- enc = rb_funcallv(enc, ID_to_s, 0, 0);
- name = rb_hash_lookup(table, enc);
-
- if (!NIL_P(name)) {
- /* find */
- return name;
- }
-
- /* update check */
- if (update_encoding_table(table, rb_ivar_get(table, ID_at_interp),
- error_mode)) {
- /* add new relations to the table */
- /* RETRY: registered Ruby encoding? */
- name = rb_hash_lookup(table, enc);
- if (!NIL_P(name)) {
- /* find */
- return name;
- }
- }
-
- if (RTEST(error_mode)) {
- rb_raise(rb_eArgError, "unsupported Tk encoding '%s'", RSTRING_PTR(enc));
- }
- return Qnil;
-}
-static VALUE
-encoding_table_get_obj_core(table, enc, error_mode)
- VALUE table;
- VALUE enc;
- VALUE error_mode;
-{
- return encoding_table_get_name_core(table, enc, error_mode);
-}
-
-#else /* Tcl/Tk 7.x or 8.0 */
-static VALUE
-encoding_table_get_name_core(table, enc, error_mode)
- VALUE table;
- VALUE enc;
- VALUE error_mode;
-{
- return Qnil;
-}
-static VALUE
-encoding_table_get_obj_core(table, enc, error_mode)
- VALUE table;
- VALUE enc;
- VALUE error_mode;
-{
- return Qnil;
-}
-#endif /* end of dependency for the version of Tcl/Tk */
-#endif
-
-static VALUE
-encoding_table_get_name(table, enc)
- VALUE table;
- VALUE enc;
-{
- return encoding_table_get_name_core(table, enc, Qtrue);
-}
-static VALUE
-encoding_table_get_obj(table, enc)
- VALUE table;
- VALUE enc;
-{
- return encoding_table_get_obj_core(table, enc, Qtrue);
-}
-
-#ifdef HAVE_RUBY_ENCODING_H
-static VALUE
-create_encoding_table_core(arg, interp)
- VALUE arg;
- VALUE interp;
-{
- struct tcltkip *ptr = get_ip(interp);
- volatile VALUE table = rb_hash_new();
- volatile VALUE encname = Qnil;
- volatile VALUE encobj = Qnil;
- int i, idx, objc;
- Tcl_Obj **objv;
- Tcl_Obj *enc_list;
-
-#ifdef HAVE_RB_SET_SAFE_LEVEL_FORCE
- rb_set_safe_level_force(0);
-#else
- rb_set_safe_level(0);
-#endif
-
- /* set 'binary' encoding */
- encobj = rb_enc_from_encoding(rb_enc_from_index(ENCODING_INDEX_BINARY));
- rb_hash_aset(table, ENCODING_NAME_BINARY, encobj);
- rb_hash_aset(table, encobj, ENCODING_NAME_BINARY);
-
-
- /* Tcl stub check */
- tcl_stubs_check();
-
- /* get Tcl's encoding list */
- Tcl_GetEncodingNames(ptr->ip);
- enc_list = Tcl_GetObjResult(ptr->ip);
- Tcl_IncrRefCount(enc_list);
-
- if (Tcl_ListObjGetElements(ptr->ip, enc_list, &objc, &objv) != TCL_OK) {
- Tcl_DecrRefCount(enc_list);
- rb_raise(rb_eRuntimeError, "failt to get Tcl's encoding names");
- }
-
- /* get encoding name and set it to table */
- for(i = 0; i < objc; i++) {
- int name2obj, obj2name;
-
- name2obj = 1; obj2name = 1;
- encname = rb_obj_freeze(rb_str_new2(Tcl_GetString(objv[i])));
- idx = rb_enc_find_index(StringValueCStr(encname));
- if (idx < 0) {
- /* fail to find ruby encoding -> check known encoding */
- if (strcmp(RSTRING_PTR(encname), "identity") == 0) {
- name2obj = 1; obj2name = 0;
- idx = ENCODING_INDEX_BINARY;
-
- } else if (strcmp(RSTRING_PTR(encname), "shiftjis") == 0) {
- name2obj = 1; obj2name = 0;
- idx = rb_enc_find_index("Shift_JIS");
-
- } else if (strcmp(RSTRING_PTR(encname), "unicode") == 0) {
- name2obj = 1; obj2name = 0;
- idx = ENCODING_INDEX_UTF8;
-
- } else if (strcmp(RSTRING_PTR(encname), "symbol") == 0) {
- name2obj = 1; obj2name = 0;
- idx = rb_enc_find_index("ASCII-8BIT");
-
- } else {
- /* regist dummy encoding */
- name2obj = 1; obj2name = 1;
- }
- }
-
- if (idx < 0) {
- /* unknown encoding -> create dummy */
- encobj = create_dummy_encoding_for_tk(interp, encname);
- } else {
- encobj = rb_enc_from_encoding(rb_enc_from_index(idx));
- }
-
- if (name2obj) {
- DUMP2("create_encoding_table: name2obj: %s", RSTRING_PTR(encname));
- rb_hash_aset(table, encname, encobj);
- }
- if (obj2name) {
- DUMP2("create_encoding_table: obj2name: %s", RSTRING_PTR(encname));
- rb_hash_aset(table, encobj, encname);
- }
- }
-
- Tcl_DecrRefCount(enc_list);
-
- rb_ivar_set(table, ID_at_interp, interp);
- rb_ivar_set(interp, ID_encoding_table, table);
-
- return table;
-}
-
-#else /* ! HAVE_RUBY_ENCODING_H */
-#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1)
-static VALUE
-create_encoding_table_core(arg, interp)
- VALUE arg;
- VALUE interp;
-{
- struct tcltkip *ptr = get_ip(interp);
- volatile VALUE table = rb_hash_new();
- volatile VALUE encname = Qnil;
- int i, objc;
- Tcl_Obj **objv;
- Tcl_Obj *enc_list;
-
-
- /* set 'binary' encoding */
- rb_hash_aset(table, ENCODING_NAME_BINARY, ENCODING_NAME_BINARY);
-
- /* get Tcl's encoding list */
- Tcl_GetEncodingNames(ptr->ip);
- enc_list = Tcl_GetObjResult(ptr->ip);
- Tcl_IncrRefCount(enc_list);
-
- if (Tcl_ListObjGetElements(ptr->ip, enc_list, &objc, &objv) != TCL_OK) {
- Tcl_DecrRefCount(enc_list);
- rb_raise(rb_eRuntimeError, "failt to get Tcl's encoding names");
- }
-
- /* get encoding name and set it to table */
- for(i = 0; i < objc; i++) {
- encname = rb_obj_freeze(rb_str_new2(Tcl_GetString(objv[i])));
- rb_hash_aset(table, encname, encname);
- }
-
- Tcl_DecrRefCount(enc_list);
-
- rb_ivar_set(table, ID_at_interp, interp);
- rb_ivar_set(interp, ID_encoding_table, table);
-
- return table;
-}
-
-#else /* Tcl/Tk 7.x or 8.0 */
-static VALUE
-create_encoding_table_core(arg, interp)
- VALUE arg;
- VALUE interp;
-{
- volatile VALUE table = rb_hash_new();
- rb_ivar_set(interp, ID_encoding_table, table);
- return table;
-}
-#endif
-#endif
-
-static VALUE
-create_encoding_table(interp)
- VALUE interp;
-{
- return rb_funcall(rb_proc_new(create_encoding_table_core, interp),
- ID_call, 0);
-}
-
-static VALUE
-ip_get_encoding_table(interp)
- VALUE interp;
-{
- volatile VALUE table = Qnil;
-
- table = rb_ivar_get(interp, ID_encoding_table);
-
- if (NIL_P(table)) {
- /* initialize encoding_table */
- table = create_encoding_table(interp);
- rb_define_singleton_method(table, "get_name", encoding_table_get_name, 1);
- rb_define_singleton_method(table, "get_obj", encoding_table_get_obj, 1);
- }
-
- return table;
-}
-
-
-/*###############################################*/
-
-/*
- * The following is based on tkMenu.[ch]
- * of Tcl/Tk (Tk8.0 -- Tk8.5b1) source code.
- */
-#if TCL_MAJOR_VERSION >= 8
-
-#define MASTER_MENU 0
-#define TEAROFF_MENU 1
-#define MENUBAR 2
-
-struct dummy_TkMenuEntry {
- int type;
- struct dummy_TkMenu *menuPtr;
- /* , and etc. */
-};
-
-struct dummy_TkMenu {
- Tk_Window tkwin;
- Display *display;
- Tcl_Interp *interp;
- Tcl_Command widgetCmd;
- struct dummy_TkMenuEntry **entries;
- int numEntries;
- int active;
- int menuType; /* MASTER_MENU, TEAROFF_MENU, or MENUBAR */
- Tcl_Obj *menuTypePtr;
- /* , and etc. */
-};
-
-struct dummy_TkMenuRef {
- struct dummy_TkMenu *menuPtr;
- char *dummy1;
- char *dummy2;
- char *dummy3;
-};
-
-#if 0 /* was available on Tk8.0 -- Tk8.4 */
-EXTERN struct dummy_TkMenuRef *TkFindMenuReferences(Tcl_Interp*, char*);
-#else /* based on Tk8.0 -- Tk8.5.0 */
-#define MENU_HASH_KEY "tkMenus"
-#endif
-
-#endif
-
-static VALUE
-ip_make_menu_embeddable_core(interp, argc, argv)
- VALUE interp;
- int argc;
- VALUE *argv;
-{
-#if TCL_MAJOR_VERSION >= 8
- volatile VALUE menu_path;
- struct tcltkip *ptr = get_ip(interp);
- struct dummy_TkMenuRef *menuRefPtr = NULL;
- XEvent event;
- Tcl_HashTable *menuTablePtr;
- Tcl_HashEntry *hashEntryPtr;
-
- menu_path = argv[0];
- StringValue(menu_path);
-
-#if 0 /* was available on Tk8.0 -- Tk8.4 */
- menuRefPtr = TkFindMenuReferences(ptr->ip, RSTRING_PTR(menu_path));
-#else /* based on Tk8.0 -- Tk8.5b1 */
- if ((menuTablePtr
- = (Tcl_HashTable *) Tcl_GetAssocData(ptr->ip, MENU_HASH_KEY, NULL))
- != NULL) {
- if ((hashEntryPtr
- = Tcl_FindHashEntry(menuTablePtr, RSTRING_PTR(menu_path)))
- != NULL) {
- menuRefPtr = (struct dummy_TkMenuRef *) Tcl_GetHashValue(hashEntryPtr);
- }
- }
-#endif
-
- if (menuRefPtr == (struct dummy_TkMenuRef *) NULL) {
- rb_raise(rb_eArgError, "not a menu widget, or invalid widget path");
- }
-
- if (menuRefPtr->menuPtr == (struct dummy_TkMenu *) NULL) {
- rb_raise(rb_eRuntimeError,
- "invalid menu widget (maybe already destroyed)");
- }
-
- if ((menuRefPtr->menuPtr)->menuType != MENUBAR) {
- rb_raise(rb_eRuntimeError,
- "target menu widget must be a MENUBAR type");
- }
-
- (menuRefPtr->menuPtr)->menuType = TEAROFF_MENU;
-#if 0 /* cause SEGV */
- {
- /* char *s = "tearoff"; */
- char *s = "normal";
- /* Tcl_SetStringObj((menuRefPtr->menuPtr)->menuTypePtr, s, strlen(s));*/
- (menuRefPtr->menuPtr)->menuTypePtr = Tcl_NewStringObj(s, strlen(s));
- /* Tcl_IncrRefCount((menuRefPtr->menuPtr)->menuTypePtr); */
- /* (menuRefPtr->menuPtr)->menuType = TEAROFF_MENU; */
- (menuRefPtr->menuPtr)->menuType = MASTER_MENU;
- }
-#endif
-
-#if 0 /* was available on Tk8.0 -- Tk8.4 */
- TkEventuallyRecomputeMenu(menuRefPtr->menuPtr);
- TkEventuallyRedrawMenu(menuRefPtr->menuPtr,
- (struct dummy_TkMenuEntry *)NULL);
-#else /* based on Tk8.0 -- Tk8.5b1 */
- memset((void *) &event, 0, sizeof(event));
- event.xany.type = ConfigureNotify;
- event.xany.serial = NextRequest(Tk_Display((menuRefPtr->menuPtr)->tkwin));
- event.xany.send_event = 0; /* FALSE */
- event.xany.window = Tk_WindowId((menuRefPtr->menuPtr)->tkwin);
- event.xany.display = Tk_Display((menuRefPtr->menuPtr)->tkwin);
- event.xconfigure.window = event.xany.window;
- Tk_HandleEvent(&event);
-#endif
-
-#else /* TCL_MAJOR_VERSION <= 7 */
- rb_notimplement();
-#endif
-
- return interp;
-}
-
-static VALUE
-ip_make_menu_embeddable(interp, menu_path)
- VALUE interp;
- VALUE menu_path;
-{
- VALUE argv[1];
-
- argv[0] = menu_path;
- return tk_funcall(ip_make_menu_embeddable_core, 1, argv, interp);
-}
-
-
-/*###############################################*/
-
-/*---- initialization ----*/
-void
-Init_tcltklib(void)
-{
- int ret;
-
- VALUE lib = rb_define_module("TclTkLib");
- VALUE ip = rb_define_class("TclTkIp", rb_cObject);
-
- VALUE ev_flag = rb_define_module_under(lib, "EventFlag");
- VALUE var_flag = rb_define_module_under(lib, "VarAccessFlag");
- VALUE release_type = rb_define_module_under(lib, "RELEASE_TYPE");
-
- /* --------------------------------------------------------------- */
-
- tcltkip_class = ip;
-
- /* --------------------------------------------------------------- */
-
-#ifdef HAVE_RUBY_ENCODING_H
- rb_global_variable(&cRubyEncoding);
- cRubyEncoding = rb_path2class("Encoding");
-
- ENCODING_INDEX_UTF8 = rb_enc_to_index(rb_utf8_encoding());
- ENCODING_INDEX_BINARY = rb_enc_find_index("binary");
-#endif
-
- rb_global_variable(&ENCODING_NAME_UTF8);
- rb_global_variable(&ENCODING_NAME_BINARY);
-
- ENCODING_NAME_UTF8 = rb_obj_freeze(rb_str_new2("utf-8"));
- ENCODING_NAME_BINARY = rb_obj_freeze(rb_str_new2("binary"));
-
- /* --------------------------------------------------------------- */
-
- rb_global_variable(&eTkCallbackReturn);
- rb_global_variable(&eTkCallbackBreak);
- rb_global_variable(&eTkCallbackContinue);
-
- rb_global_variable(&eventloop_thread);
- rb_global_variable(&eventloop_stack);
- rb_global_variable(&watchdog_thread);
-
- rb_global_variable(&rbtk_pending_exception);
-
- /* --------------------------------------------------------------- */
-
- rb_define_const(lib, "COMPILE_INFO", tcltklib_compile_info());
-
- rb_define_const(lib, "RELEASE_DATE",
- rb_obj_freeze(rb_str_new2(tcltklib_release_date)));
-
- rb_define_const(lib, "FINALIZE_PROC_NAME",
- rb_str_new2(finalize_hook_name));
-
- /* --------------------------------------------------------------- */
-
-#ifdef __WIN32__
-# define TK_WINDOWING_SYSTEM "win32"
-#else
-# ifdef MAC_TCL
-# define TK_WINDOWING_SYSTEM "classic"
-# else
-# ifdef MAC_OSX_TK
-# define TK_WINDOWING_SYSTEM "aqua"
-# else
-# define TK_WINDOWING_SYSTEM "x11"
-# endif
-# endif
-#endif
- rb_define_const(lib, "WINDOWING_SYSTEM",
- rb_obj_freeze(rb_str_new2(TK_WINDOWING_SYSTEM)));
-
- /* --------------------------------------------------------------- */
-
- rb_define_const(ev_flag, "NONE", INT2FIX(0));
- rb_define_const(ev_flag, "WINDOW", INT2FIX(TCL_WINDOW_EVENTS));
- rb_define_const(ev_flag, "FILE", INT2FIX(TCL_FILE_EVENTS));
- rb_define_const(ev_flag, "TIMER", INT2FIX(TCL_TIMER_EVENTS));
- rb_define_const(ev_flag, "IDLE", INT2FIX(TCL_IDLE_EVENTS));
- rb_define_const(ev_flag, "ALL", INT2FIX(TCL_ALL_EVENTS));
- rb_define_const(ev_flag, "DONT_WAIT", INT2FIX(TCL_DONT_WAIT));
-
- /* --------------------------------------------------------------- */
-
- rb_define_const(var_flag, "NONE", INT2FIX(0));
- rb_define_const(var_flag, "GLOBAL_ONLY", INT2FIX(TCL_GLOBAL_ONLY));
-#ifdef TCL_NAMESPACE_ONLY
- rb_define_const(var_flag, "NAMESPACE_ONLY", INT2FIX(TCL_NAMESPACE_ONLY));
-#else /* probably Tcl7.6 */
- rb_define_const(var_flag, "NAMESPACE_ONLY", INT2FIX(0));
-#endif
- rb_define_const(var_flag, "LEAVE_ERR_MSG", INT2FIX(TCL_LEAVE_ERR_MSG));
- rb_define_const(var_flag, "APPEND_VALUE", INT2FIX(TCL_APPEND_VALUE));
- rb_define_const(var_flag, "LIST_ELEMENT", INT2FIX(TCL_LIST_ELEMENT));
-#ifdef TCL_PARSE_PART1
- rb_define_const(var_flag, "PARSE_VARNAME", INT2FIX(TCL_PARSE_PART1));
-#else /* probably Tcl7.6 */
- rb_define_const(var_flag, "PARSE_VARNAME", INT2FIX(0));
-#endif
-
- /* --------------------------------------------------------------- */
-
- rb_define_module_function(lib, "get_version", lib_getversion, -1);
- rb_define_module_function(lib, "get_release_type_name",
- lib_get_reltype_name, -1);
-
- rb_define_const(release_type, "ALPHA", INT2FIX(TCL_ALPHA_RELEASE));
- rb_define_const(release_type, "BETA", INT2FIX(TCL_BETA_RELEASE));
- rb_define_const(release_type, "FINAL", INT2FIX(TCL_FINAL_RELEASE));
-
- /* --------------------------------------------------------------- */
-
- eTkCallbackReturn = rb_define_class("TkCallbackReturn", rb_eStandardError);
- eTkCallbackBreak = rb_define_class("TkCallbackBreak", rb_eStandardError);
- eTkCallbackContinue = rb_define_class("TkCallbackContinue",
- rb_eStandardError);
-
- /* --------------------------------------------------------------- */
-
- eLocalJumpError = rb_const_get(rb_cObject, rb_intern("LocalJumpError"));
-
- eTkLocalJumpError = rb_define_class("TkLocalJumpError", eLocalJumpError);
-
- eTkCallbackRetry = rb_define_class("TkCallbackRetry", eTkLocalJumpError);
- eTkCallbackRedo = rb_define_class("TkCallbackRedo", eTkLocalJumpError);
- eTkCallbackThrow = rb_define_class("TkCallbackThrow", eTkLocalJumpError);
-
- /* --------------------------------------------------------------- */
-
- ID_at_enc = rb_intern("@encoding");
- ID_at_interp = rb_intern("@interp");
- ID_encoding_name = rb_intern("encoding_name");
- ID_encoding_table = rb_intern("encoding_table");
-
- ID_stop_p = rb_intern("stop?");
-#ifndef HAVE_RB_THREAD_ALIVE_P
- ID_alive_p = rb_intern("alive?");
-#endif
- ID_kill = rb_intern("kill");
- ID_join = rb_intern("join");
- ID_value = rb_intern("value");
-
- ID_call = rb_intern("call");
- ID_backtrace = rb_intern("backtrace");
- ID_message = rb_intern("message");
-
- ID_at_reason = rb_intern("@reason");
- ID_return = rb_intern("return");
- ID_break = rb_intern("break");
- ID_next = rb_intern("next");
-
- ID_to_s = rb_intern("to_s");
- ID_inspect = rb_intern("inspect");
-
- /* --------------------------------------------------------------- */
-
- rb_define_module_function(lib, "mainloop", lib_mainloop, -1);
- rb_define_module_function(lib, "mainloop_thread?",
- lib_evloop_thread_p, 0);
- rb_define_module_function(lib, "mainloop_watchdog",
- lib_mainloop_watchdog, -1);
- rb_define_module_function(lib, "do_thread_callback",
- lib_thread_callback, -1);
- rb_define_module_function(lib, "do_one_event", lib_do_one_event, -1);
- rb_define_module_function(lib, "mainloop_abort_on_exception",
- lib_evloop_abort_on_exc, 0);
- rb_define_module_function(lib, "mainloop_abort_on_exception=",
- lib_evloop_abort_on_exc_set, 1);
- rb_define_module_function(lib, "set_eventloop_window_mode",
- set_eventloop_window_mode, 1);
- rb_define_module_function(lib, "get_eventloop_window_mode",
- get_eventloop_window_mode, 0);
- rb_define_module_function(lib, "set_eventloop_tick",set_eventloop_tick,1);
- rb_define_module_function(lib, "get_eventloop_tick",get_eventloop_tick,0);
- rb_define_module_function(lib, "set_no_event_wait", set_no_event_wait, 1);
- rb_define_module_function(lib, "get_no_event_wait", get_no_event_wait, 0);
- rb_define_module_function(lib, "set_eventloop_weight",
- set_eventloop_weight, 2);
- rb_define_module_function(lib, "set_max_block_time", set_max_block_time,1);
- rb_define_module_function(lib, "get_eventloop_weight",
- get_eventloop_weight, 0);
- rb_define_module_function(lib, "num_of_mainwindows",
- lib_num_of_mainwindows, 0);
-
- /* --------------------------------------------------------------- */
-
- rb_define_module_function(lib, "_split_tklist", lib_split_tklist, 1);
- rb_define_module_function(lib, "_merge_tklist", lib_merge_tklist, -1);
- rb_define_module_function(lib, "_conv_listelement",
- lib_conv_listelement, 1);
- rb_define_module_function(lib, "_toUTF8", lib_toUTF8, -1);
- rb_define_module_function(lib, "_fromUTF8", lib_fromUTF8, -1);
- rb_define_module_function(lib, "_subst_UTF_backslash",
- lib_UTF_backslash, 1);
- rb_define_module_function(lib, "_subst_Tcl_backslash",
- lib_Tcl_backslash, 1);
-
- rb_define_module_function(lib, "encoding_system",
- lib_get_system_encoding, 0);
- rb_define_module_function(lib, "encoding_system=",
- lib_set_system_encoding, 1);
- rb_define_module_function(lib, "encoding",
- lib_get_system_encoding, 0);
- rb_define_module_function(lib, "encoding=",
- lib_set_system_encoding, 1);
-
- /* --------------------------------------------------------------- */
-
- rb_define_alloc_func(ip, ip_alloc);
- rb_define_method(ip, "initialize", ip_init, -1);
- rb_define_method(ip, "create_slave", ip_create_slave, -1);
- rb_define_method(ip, "slave_of?", ip_is_slave_of_p, 1);
- rb_define_method(ip, "make_safe", ip_make_safe, 0);
- rb_define_method(ip, "safe?", ip_is_safe_p, 0);
- rb_define_method(ip, "allow_ruby_exit?", ip_allow_ruby_exit_p, 0);
- rb_define_method(ip, "allow_ruby_exit=", ip_allow_ruby_exit_set, 1);
- rb_define_method(ip, "delete", ip_delete, 0);
- rb_define_method(ip, "deleted?", ip_is_deleted_p, 0);
- rb_define_method(ip, "has_mainwindow?", ip_has_mainwindow_p, 0);
- rb_define_method(ip, "invalid_namespace?", ip_has_invalid_namespace_p, 0);
- rb_define_method(ip, "_eval", ip_eval, 1);
- rb_define_method(ip, "_cancel_eval", ip_cancel_eval, -1);
- rb_define_method(ip, "_cancel_eval_unwind", ip_cancel_eval_unwind, -1);
- rb_define_method(ip, "_toUTF8", ip_toUTF8, -1);
- rb_define_method(ip, "_fromUTF8", ip_fromUTF8, -1);
- rb_define_method(ip, "_thread_vwait", ip_thread_vwait, 1);
- rb_define_method(ip, "_thread_tkwait", ip_thread_tkwait, 2);
- rb_define_method(ip, "_invoke", ip_invoke, -1);
- rb_define_method(ip, "_immediate_invoke", ip_invoke_immediate, -1);
- rb_define_method(ip, "_return_value", ip_retval, 0);
-
- rb_define_method(ip, "_create_console", ip_create_console, 0);
-
- /* --------------------------------------------------------------- */
-
- rb_define_method(ip, "create_dummy_encoding_for_tk",
- create_dummy_encoding_for_tk, 1);
- rb_define_method(ip, "encoding_table", ip_get_encoding_table, 0);
-
- /* --------------------------------------------------------------- */
-
- rb_define_method(ip, "_get_variable", ip_get_variable, 2);
- rb_define_method(ip, "_get_variable2", ip_get_variable2, 3);
- rb_define_method(ip, "_set_variable", ip_set_variable, 3);
- rb_define_method(ip, "_set_variable2", ip_set_variable2, 4);
- rb_define_method(ip, "_unset_variable", ip_unset_variable, 2);
- rb_define_method(ip, "_unset_variable2", ip_unset_variable2, 3);
- rb_define_method(ip, "_get_global_var", ip_get_global_var, 1);
- rb_define_method(ip, "_get_global_var2", ip_get_global_var2, 2);
- rb_define_method(ip, "_set_global_var", ip_set_global_var, 2);
- rb_define_method(ip, "_set_global_var2", ip_set_global_var2, 3);
- rb_define_method(ip, "_unset_global_var", ip_unset_global_var, 1);
- rb_define_method(ip, "_unset_global_var2", ip_unset_global_var2, 2);
-
- /* --------------------------------------------------------------- */
-
- rb_define_method(ip, "_make_menu_embeddable", ip_make_menu_embeddable, 1);
-
- /* --------------------------------------------------------------- */
-
- rb_define_method(ip, "_split_tklist", ip_split_tklist, 1);
- rb_define_method(ip, "_merge_tklist", lib_merge_tklist, -1);
- rb_define_method(ip, "_conv_listelement", lib_conv_listelement, 1);
-
- /* --------------------------------------------------------------- */
-
- rb_define_method(ip, "mainloop", ip_mainloop, -1);
- rb_define_method(ip, "mainloop_watchdog", ip_mainloop_watchdog, -1);
- rb_define_method(ip, "do_one_event", ip_do_one_event, -1);
- rb_define_method(ip, "mainloop_abort_on_exception",
- ip_evloop_abort_on_exc, 0);
- rb_define_method(ip, "mainloop_abort_on_exception=",
- ip_evloop_abort_on_exc_set, 1);
- rb_define_method(ip, "set_eventloop_tick", ip_set_eventloop_tick, 1);
- rb_define_method(ip, "get_eventloop_tick", ip_get_eventloop_tick, 0);
- rb_define_method(ip, "set_no_event_wait", ip_set_no_event_wait, 1);
- rb_define_method(ip, "get_no_event_wait", ip_get_no_event_wait, 0);
- rb_define_method(ip, "set_eventloop_weight", ip_set_eventloop_weight, 2);
- rb_define_method(ip, "get_eventloop_weight", ip_get_eventloop_weight, 0);
- rb_define_method(ip, "set_max_block_time", set_max_block_time, 1);
- rb_define_method(ip, "restart", ip_restart, 0);
-
- /* --------------------------------------------------------------- */
-
- eventloop_thread = Qnil;
- eventloop_interp = (Tcl_Interp*)NULL;
-
-#ifndef DEFAULT_EVENTLOOP_DEPTH
-#define DEFAULT_EVENTLOOP_DEPTH 7
-#endif
- eventloop_stack = rb_ary_new2(DEFAULT_EVENTLOOP_DEPTH);
- RbTk_OBJ_UNTRUST(eventloop_stack);
-
- watchdog_thread = Qnil;
-
- rbtk_pending_exception = Qnil;
-
- /* --------------------------------------------------------------- */
-
-#ifdef HAVE_NATIVETHREAD
- /* if ruby->nativethread-support and tcltklib->doesn't,
- the following will cause link-error. */
- ruby_native_thread_p();
-#endif
-
- /* --------------------------------------------------------------- */
-
- rb_set_end_proc(lib_mark_at_exit, 0);
-
- /* --------------------------------------------------------------- */
-
- ret = ruby_open_tcl_dll(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0);
- switch(ret) {
- case TCLTK_STUBS_OK:
- break;
- case NO_TCL_DLL:
- rb_raise(rb_eLoadError, "tcltklib: fail to open tcl_dll");
- case NO_FindExecutable:
- rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_FindExecutable");
- default:
- rb_raise(rb_eLoadError, "tcltklib: unknown error(%d) on ruby_open_tcl_dll", ret);
- }
-
- /* --------------------------------------------------------------- */
-
-#if defined CREATE_RUBYTK_KIT || defined CREATE_RUBYKIT
- setup_rubytkkit();
-#endif
-
- /* --------------------------------------------------------------- */
-
- /* Tcl stub check */
- tcl_stubs_check();
-
- Tcl_ObjType_ByteArray = Tcl_GetObjType(Tcl_ObjTypeName_ByteArray);
- Tcl_ObjType_String = Tcl_GetObjType(Tcl_ObjTypeName_String);
-
- /* --------------------------------------------------------------- */
-
- (void)call_original_exit;
-}
-
-/* eof */
diff --git a/ext/tk/tkutil/depend b/ext/tk/tkutil/depend
deleted file mode 100644
index 53f41d0243..0000000000
--- a/ext/tk/tkutil/depend
+++ /dev/null
@@ -1,13 +0,0 @@
-# AUTOGENERATED DEPENDENCIES START
-tkutil.o: $(RUBY_EXTCONF_H)
-tkutil.o: $(arch_hdrdir)/ruby/config.h
-tkutil.o: $(hdrdir)/ruby/backward.h
-tkutil.o: $(hdrdir)/ruby/defines.h
-tkutil.o: $(hdrdir)/ruby/intern.h
-tkutil.o: $(hdrdir)/ruby/missing.h
-tkutil.o: $(hdrdir)/ruby/ruby.h
-tkutil.o: $(hdrdir)/ruby/st.h
-tkutil.o: $(hdrdir)/ruby/subst.h
-tkutil.o: $(top_srcdir)/include/ruby.h
-tkutil.o: tkutil.c
-# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/tk/tkutil/extconf.rb b/ext/tk/tkutil/extconf.rb
deleted file mode 100644
index 0b3ce03595..0000000000
--- a/ext/tk/tkutil/extconf.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: false
-begin
- require 'mkmf'
-
- have_func("rb_obj_instance_exec", "ruby.h")
- have_func("rb_obj_untrust", "ruby.h")
- have_func("rb_obj_taint", "ruby.h")
- have_func("rb_sym2str", "ruby.h")
- have_func("rb_id2str", "ruby.h")
- have_func("rb_ary_cat", "ruby.h")
- have_func("strndup", "string.h")
-
- create_makefile('tkutil')
-end
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
deleted file mode 100644
index cd1fa2bc8d..0000000000
--- a/ext/tk/tkutil/tkutil.c
+++ /dev/null
@@ -1,1900 +0,0 @@
-/************************************************
-
- tkutil.c -
-
- $Author$
- created at: Fri Nov 3 00:47:54 JST 1995
-
-************************************************/
-
-#define TKUTIL_RELEASE_DATE "2010-03-26"
-
-#include "ruby.h"
-
-#ifdef RUBY_VM
-static int rb_thread_critical; /* dummy */
-#else
-/* On Ruby 1.8.x, use rb_thread_critical (defined at rubysig.h) */
-#include "rubysig.h"
-#endif
-#ifdef HAVE_RUBY_ST_H
-#include "ruby/st.h"
-#else
-#include "st.h"
-#endif
-
-#undef RUBY_UNTYPED_DATA_WARNING
-#define RUBY_UNTYPED_DATA_WARNING 1
-
-#if !defined(RHASH_TBL)
-#define RHASH_TBL(h) (RHASH(h)->tbl)
-#endif
-#if !defined(RSTRING_PTR)
-#define RSTRING_PTR(s) (RSTRING(s)->ptr)
-#define RSTRING_LEN(s) (RSTRING(s)->len)
-#endif
-#if !defined(RARRAY_PTR)
-#define RARRAY_PTR(s) (RARRAY(s)->ptr)
-#define RARRAY_LEN(s) (RARRAY(s)->len)
-#endif
-#if !defined(RARRAY_CONST_PTR)
-#define RARRAY_CONST_PTR(s) (const VALUE *)RARRAY_PTR(s)
-#endif
-#if !defined(RARRAY_AREF)
-#define RARRAY_AREF(a, i) RARRAY_CONST_PTR(a)[i]
-#endif
-
-#if defined(HAVE_STRNDUP) && !defined(_GNU_SOURCE)
-extern char *strndup(const char* _ptr, size_t _len);
-#endif
-
-#ifndef HAVE_RB_SYM2STR
-# define rb_sym2str(obj) rb_id2str(SYM2ID(obj))
-#endif
-
-#ifndef HAVE_RB_ID2STR
-# define rb_id2str(id) rb_str_new2(rb_id2name(id))
-#endif
-
-static VALUE cMethod;
-
-static VALUE cTclTkLib;
-
-static VALUE cTkObject;
-static VALUE cTkCallbackEntry;
-
-static VALUE TK_None;
-
-static VALUE cCB_SUBST;
-static VALUE cSUBST_INFO;
-
-static VALUE ENCODING_NAME_UTF8; /* for saving GC cost */
-
-static ID ID_split_tklist;
-static ID ID_toUTF8;
-static ID ID_fromUTF8;
-static ID ID_path;
-static ID ID_at_path;
-static ID ID_at_enc;
-static ID ID_to_eval;
-static ID ID_to_s;
-static ID ID_source;
-static ID ID_downcase;
-static ID ID_install_cmd;
-static ID ID_merge_tklist;
-static ID ID_encoding;
-static ID ID_encoding_system;
-static ID ID_call;
-
-static ID ID_SUBST_INFO;
-
-static VALUE CALLBACK_TABLE;
-static unsigned long CALLBACK_ID_NUM = 0;
-
-/*************************************/
-
-#ifndef HAVE_STRNDUP
-static char * strndup _((const char *, size_t));
-static char *
-strndup(ptr, len)
- const char *ptr;
- size_t len;
-{
- char *newptr = malloc(len + 1);
- if (newptr) {
- memcpy(newptr, ptr, len);
- newptr[len] = '\0';
- }
- return newptr;
-}
-#endif
-
-#ifndef HAVE_RB_ARY_CAT
-static VALUE rb_ary_cat _((VALUE, const VALUE *, long));
-static VALUE
-rb_ary_cat(ary, argv, len)
- VALUE ary;
- const VALUE *argv;
- long len;
-{
- long i;
- for (i = 0; i < len; i++) {
- rb_ary_push(ary, argv[i]);
- }
- return ary;
-}
-#endif
-
-/*************************************/
-
-#if defined(HAVE_RB_OBJ_INSTANCE_EXEC) && !defined(RUBY_VM)
-extern VALUE rb_obj_instance_exec _((int, VALUE*, VALUE));
-#endif
-static VALUE
-tk_s_new(argc, argv, klass)
- int argc;
- VALUE *argv;
- VALUE klass;
-{
- VALUE obj = rb_class_new_instance(argc, argv, klass);
-
- if (rb_block_given_p()) {
-#ifndef HAVE_RB_OBJ_INSTANCE_EXEC
- rb_obj_instance_eval(0, 0, obj);
-#else
- rb_obj_instance_exec(1, &obj, obj);
-#endif
- }
- return obj;
-}
-
-/*************************************/
-
-static VALUE
-tkNone_to_s(self)
- VALUE self;
-{
- return rb_str_new2("");
-}
-
-static VALUE
-tkNone_inspect(self)
- VALUE self;
-{
- return rb_str_new2("None");
-}
-
-/*************************************/
-
-static VALUE
-tk_obj_untrust(self, obj)
- VALUE self;
- VALUE obj;
-{
-#ifdef HAVE_RB_OBJ_TAINT
- rb_obj_taint(obj);
-#endif
-#ifdef HAVE_RB_OBJ_UNTRUST
- rb_obj_untrust(obj);
-#endif
-
- return obj;
-}
-
-static VALUE
-tk_eval_cmd(argc, argv, self)
- int argc;
- VALUE argv[];
- VALUE self;
-{
- VALUE cmd, rest;
-
- rb_scan_args(argc, argv, "1*", &cmd, &rest);
- return rb_eval_cmd(cmd, rest, 0);
-}
-
-static VALUE
-tk_do_callback(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
-#if 0
- volatile VALUE id;
- volatile VALUE rest;
-
- rb_scan_args(argc, argv, "1*", &id, &rest);
- return rb_apply(rb_hash_aref(CALLBACK_TABLE, id), ID_call, rest);
-#endif
- return rb_funcall2(rb_hash_aref(CALLBACK_TABLE, argv[0]),
- ID_call, argc - 1, argv + 1);
-}
-
-static const char cmd_id_head[] = "ruby_cmd TkUtil callback ";
-static const char cmd_id_prefix[] = "cmd";
-
-static VALUE
-tk_install_cmd_core(cmd)
- VALUE cmd;
-{
- volatile VALUE id_num;
-
- id_num = ULONG2NUM(CALLBACK_ID_NUM++);
- id_num = rb_funcallv(id_num, ID_to_s, 0, 0);
- id_num = rb_str_append(rb_str_new2(cmd_id_prefix), id_num);
- rb_hash_aset(CALLBACK_TABLE, id_num, cmd);
- return rb_str_append(rb_str_new2(cmd_id_head), id_num);
-}
-
-static VALUE
-tk_install_cmd(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- volatile VALUE cmd;
-
-#if 0
- if (rb_scan_args(argc, argv, "01", &cmd) == 0) {
- cmd = rb_block_proc();
- }
- return tk_install_cmd_core(cmd);
-#endif
- if (argc == 0) {
- cmd = rb_block_proc();
- } else {
- cmd = argv[0];
- }
- return tk_install_cmd_core(cmd);
-}
-
-static VALUE
-tk_uninstall_cmd(self, cmd_id)
- VALUE self;
- VALUE cmd_id;
-{
- size_t head_len = strlen(cmd_id_head);
- size_t prefix_len = strlen(cmd_id_prefix);
-
- StringValue(cmd_id);
- if (strncmp(cmd_id_head, RSTRING_PTR(cmd_id), head_len) != 0) {
- return Qnil;
- }
- if (strncmp(cmd_id_prefix,
- RSTRING_PTR(cmd_id) + head_len, prefix_len) != 0) {
- return Qnil;
- }
-
- return rb_hash_delete(CALLBACK_TABLE,
- rb_str_new2(RSTRING_PTR(cmd_id) + head_len));
-}
-
-static VALUE
-tk_toUTF8(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- return rb_funcall2(cTclTkLib, ID_toUTF8, argc, argv);
-}
-
-static VALUE
-tk_fromUTF8(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- return rb_funcall2(cTclTkLib, ID_fromUTF8, argc, argv);
-}
-
-static VALUE
-fromDefaultEnc_toUTF8(str, self)
- VALUE str;
- VALUE self;
-{
- VALUE argv[1];
-
- argv[0] = str;
- return tk_toUTF8(1, argv, self);
-}
-
-#if 0
-static VALUE
-fromUTF8_toDefaultEnc(str, self)
- VALUE str;
- VALUE self;
-{
- VALUE argv[1];
-
- argv[0] = str;
- return tk_fromUTF8(1, argv, self);
-}
-#endif
-
-static int
-to_strkey(key, value, hash)
- VALUE key;
- VALUE value;
- VALUE hash;
-{
- rb_hash_aset(hash, rb_funcallv(key, ID_to_s, 0, 0), value);
- return ST_CHECK;
-}
-
-static VALUE
-tk_symbolkey2str(self, keys)
- VALUE self;
- VALUE keys;
-{
- volatile VALUE new_keys = rb_hash_new();
-
- if (NIL_P(keys)) return new_keys;
- keys = rb_convert_type(keys, T_HASH, "Hash", "to_hash");
- st_foreach_check(RHASH_TBL(keys), to_strkey, new_keys, Qundef);
- return new_keys;
-}
-
-static VALUE get_eval_string_core _((VALUE, VALUE, VALUE));
-static VALUE ary2list _((VALUE, VALUE, VALUE));
-static VALUE ary2list2 _((VALUE, VALUE, VALUE));
-static VALUE hash2list _((VALUE, VALUE));
-static VALUE hash2list_enc _((VALUE, VALUE));
-static VALUE hash2kv _((VALUE, VALUE, VALUE));
-static VALUE hash2kv_enc _((VALUE, VALUE, VALUE));
-
-static VALUE
-ary2list(ary, enc_flag, self)
- VALUE ary;
- VALUE enc_flag;
- VALUE self;
-{
- long idx, idx2, size, size2;
- int req_chk_flag;
- volatile VALUE val, val2, str_val;
- volatile VALUE dst;
- volatile VALUE sys_enc, dst_enc, str_enc;
-
- sys_enc = rb_funcallv(cTclTkLib, ID_encoding, 0, 0);
- if (NIL_P(sys_enc)) {
- sys_enc = rb_funcallv(cTclTkLib, ID_encoding_system, 0, 0);
- sys_enc = rb_funcallv(sys_enc, ID_to_s, 0, 0);
- }
-
- if (NIL_P(enc_flag)) {
- dst_enc = sys_enc;
- req_chk_flag = 1;
- } else if (enc_flag == Qtrue || enc_flag == Qfalse) {
- dst_enc = enc_flag;
- req_chk_flag = 0;
- } else {
- dst_enc = rb_funcallv(enc_flag, ID_to_s, 0, 0);
- req_chk_flag = 0;
- }
-
- /* size = RARRAY_LEN(ary); */
- size = 0;
- for(idx = 0; idx < RARRAY_LEN(ary); idx++) {
- if (RB_TYPE_P(RARRAY_AREF(ary, idx), T_HASH)) {
- size += 2 * RHASH_SIZE(RARRAY_AREF(ary, idx));
- } else {
- size++;
- }
- }
-
- dst = rb_ary_new2(size);
- for(idx = 0; idx < RARRAY_LEN(ary); idx++) {
- val = RARRAY_AREF(ary, idx);
- str_val = Qnil;
- switch(TYPE(val)) {
- case T_ARRAY:
- str_val = ary2list(val, enc_flag, self);
- rb_ary_push(dst, str_val);
-
- if (req_chk_flag) {
- str_enc = rb_ivar_get(str_val, ID_at_enc);
- if (!NIL_P(str_enc)) {
- str_enc = rb_funcallv(str_enc, ID_to_s, 0, 0);
- } else {
- str_enc = sys_enc;
- }
- if (!rb_str_cmp(str_enc, dst_enc)) {
- dst_enc = Qtrue;
- req_chk_flag = 0;
- }
- }
-
- break;
-
- case T_HASH:
- /* rb_ary_push(dst, hash2list(val, self)); */
- if (RTEST(enc_flag)) {
- val = hash2kv_enc(val, Qnil, self);
- } else {
- val = hash2kv(val, Qnil, self);
- }
- size2 = RARRAY_LEN(val);
- for(idx2 = 0; idx2 < size2; idx2++) {
- val2 = RARRAY_AREF(val, idx2);
- switch(TYPE(val2)) {
- case T_ARRAY:
- str_val = ary2list(val2, enc_flag, self);
- rb_ary_push(dst, str_val);
- break;
-
- case T_HASH:
- if (RTEST(enc_flag)) {
- str_val = hash2list_enc(val2, self);
- } else {
- str_val = hash2list(val2, self);
- }
- rb_ary_push(dst, str_val);
- break;
-
- default:
- if (val2 != TK_None) {
- str_val = get_eval_string_core(val2, enc_flag, self);
- rb_ary_push(dst, str_val);
- }
- }
-
- if (req_chk_flag) {
- str_enc = rb_ivar_get(str_val, ID_at_enc);
- if (!NIL_P(str_enc)) {
- str_enc = rb_funcallv(str_enc, ID_to_s, 0, 0);
- } else {
- str_enc = sys_enc;
- }
- if (!rb_str_cmp(str_enc, dst_enc)) {
- dst_enc = Qtrue;
- req_chk_flag = 0;
- }
- }
- }
- break;
-
- default:
- if (val != TK_None) {
- str_val = get_eval_string_core(val, enc_flag, self);
- rb_ary_push(dst, str_val);
-
- if (req_chk_flag) {
- str_enc = rb_ivar_get(str_val, ID_at_enc);
- if (!NIL_P(str_enc)) {
- str_enc = rb_funcallv(str_enc, ID_to_s, 0, 0);
- } else {
- str_enc = sys_enc;
- }
- if (!rb_str_cmp(str_enc, dst_enc)) {
- dst_enc = Qtrue;
- req_chk_flag = 0;
- }
- }
- }
- }
- }
-
- if (RTEST(dst_enc) && !NIL_P(sys_enc)) {
- for(idx = 0; idx < RARRAY_LEN(dst); idx++) {
- str_val = RARRAY_AREF(dst, idx);
- if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
- str_val = rb_funcall(self, ID_toUTF8, 1, str_val);
- } else {
- str_val = rb_funcall(cTclTkLib, ID_toUTF8, 1, str_val);
- }
- RARRAY_ASET(dst, idx, str_val);
- }
- val = rb_apply(cTclTkLib, ID_merge_tklist, dst);
- if (RB_TYPE_P(dst_enc, T_STRING)) {
- val = rb_funcall(cTclTkLib, ID_fromUTF8, 2, val, dst_enc);
- rb_ivar_set(val, ID_at_enc, dst_enc);
- } else {
- rb_ivar_set(val, ID_at_enc, ENCODING_NAME_UTF8);
- }
- return val;
- } else {
- return rb_apply(cTclTkLib, ID_merge_tklist, dst);
- }
-}
-
-static VALUE
-ary2list2(ary, enc_flag, self)
- VALUE ary;
- VALUE enc_flag;
- VALUE self;
-{
- long idx, size;
- int req_chk_flag;
- volatile VALUE val, str_val;
- volatile VALUE dst;
- volatile VALUE sys_enc, dst_enc, str_enc;
-
- sys_enc = rb_funcallv(cTclTkLib, ID_encoding, 0, 0);
- if (NIL_P(sys_enc)) {
- sys_enc = rb_funcallv(cTclTkLib, ID_encoding_system, 0, 0);
- sys_enc = rb_funcallv(sys_enc, ID_to_s, 0, 0);
- }
-
- if (NIL_P(enc_flag)) {
- dst_enc = sys_enc;
- req_chk_flag = 1;
- } else if (enc_flag == Qtrue || enc_flag == Qfalse) {
- dst_enc = enc_flag;
- req_chk_flag = 0;
- } else {
- dst_enc = rb_funcallv(enc_flag, ID_to_s, 0, 0);
- req_chk_flag = 0;
- }
-
- size = RARRAY_LEN(ary);
- dst = rb_ary_new2(size);
- for(idx = 0; idx < RARRAY_LEN(ary); idx++) {
- val = RARRAY_AREF(ary, idx);
- str_val = Qnil;
- switch(TYPE(val)) {
- case T_ARRAY:
- str_val = ary2list(val, enc_flag, self);
- break;
-
- case T_HASH:
- if (RTEST(enc_flag)) {
- str_val = hash2list(val, self);
- } else {
- str_val = hash2list_enc(val, self);
- }
- break;
-
- default:
- if (val != TK_None) {
- str_val = get_eval_string_core(val, enc_flag, self);
- }
- }
-
- if (!NIL_P(str_val)) {
- rb_ary_push(dst, str_val);
-
- if (req_chk_flag) {
- str_enc = rb_ivar_get(str_val, ID_at_enc);
- if (!NIL_P(str_enc)) {
- str_enc = rb_funcallv(str_enc, ID_to_s, 0, 0);
- } else {
- str_enc = sys_enc;
- }
- if (!rb_str_cmp(str_enc, dst_enc)) {
- dst_enc = Qtrue;
- req_chk_flag = 0;
- }
- }
- }
- }
-
- if (RTEST(dst_enc) && !NIL_P(sys_enc)) {
- for(idx = 0; idx < RARRAY_LEN(dst); idx++) {
- str_val = RARRAY_AREF(dst, idx);
- if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
- str_val = rb_funcall(self, ID_toUTF8, 1, str_val);
- } else {
- str_val = rb_funcall(cTclTkLib, ID_toUTF8, 1, str_val);
- }
- RARRAY_ASET(dst, idx, str_val);
- }
- val = rb_apply(cTclTkLib, ID_merge_tklist, dst);
- if (RB_TYPE_P(dst_enc, T_STRING)) {
- val = rb_funcall(cTclTkLib, ID_fromUTF8, 2, val, dst_enc);
- rb_ivar_set(val, ID_at_enc, dst_enc);
- } else {
- rb_ivar_set(val, ID_at_enc, ENCODING_NAME_UTF8);
- }
- return val;
- } else {
- return rb_apply(cTclTkLib, ID_merge_tklist, dst);
- }
-}
-
-static VALUE
-key2keyname(key)
- VALUE key;
-{
- return rb_str_append(rb_str_new2("-"), rb_funcallv(key, ID_to_s, 0, 0));
-}
-
-static VALUE
-assoc2kv(assoc, ary, self)
- VALUE assoc;
- VALUE ary;
- VALUE self;
-{
- long i, len;
- volatile VALUE pair;
- volatile VALUE val;
- volatile VALUE dst = rb_ary_new2(2 * RARRAY_LEN(assoc));
-
- len = RARRAY_LEN(assoc);
-
- for(i = 0; i < len; i++) {
- pair = RARRAY_AREF(assoc, i);
- if (!RB_TYPE_P(pair, T_ARRAY)) {
- rb_ary_push(dst, key2keyname(pair));
- continue;
- }
- switch(RARRAY_LEN(assoc)) {
- case 2:
- rb_ary_push(dst, RARRAY_AREF(pair, 2));
-
- case 1:
- rb_ary_push(dst, key2keyname(RARRAY_AREF(pair, 0)));
-
- case 0:
- continue;
-
- default:
- rb_ary_push(dst, key2keyname(RARRAY_AREF(pair, 0)));
-
- val = rb_ary_new2(RARRAY_LEN(pair) - 1);
- rb_ary_cat(val, RARRAY_CONST_PTR(pair) + 1, RARRAY_LEN(pair) - 1);
-
- rb_ary_push(dst, val);
- }
- }
-
- if (NIL_P(ary)) {
- return dst;
- } else {
- return rb_ary_plus(ary, dst);
- }
-}
-
-static VALUE
-assoc2kv_enc(assoc, ary, self)
- VALUE assoc;
- VALUE ary;
- VALUE self;
-{
- long i, len;
- volatile VALUE pair;
- volatile VALUE val;
- volatile VALUE dst = rb_ary_new2(2 * RARRAY_LEN(assoc));
-
- len = RARRAY_LEN(assoc);
-
- for(i = 0; i < len; i++) {
- pair = RARRAY_AREF(assoc, i);
- if (!RB_TYPE_P(pair, T_ARRAY)) {
- rb_ary_push(dst, key2keyname(pair));
- continue;
- }
- switch(RARRAY_LEN(assoc)) {
- case 2:
- rb_ary_push(dst, get_eval_string_core(RARRAY_AREF(pair, 2), Qtrue, self));
-
- case 1:
- rb_ary_push(dst, key2keyname(RARRAY_AREF(pair, 0)));
-
- case 0:
- continue;
-
- default:
- rb_ary_push(dst, key2keyname(RARRAY_AREF(pair, 0)));
-
- val = rb_ary_new2(RARRAY_LEN(pair) - 1);
- rb_ary_cat(val, RARRAY_CONST_PTR(pair) + 1, RARRAY_LEN(pair) - 1);
-
- rb_ary_push(dst, get_eval_string_core(val, Qtrue, self));
- }
- }
-
- if (NIL_P(ary)) {
- return dst;
- } else {
- return rb_ary_plus(ary, dst);
- }
-}
-
-static int
-push_kv(key, val, args)
- VALUE key;
- VALUE val;
- VALUE args;
-{
- volatile VALUE ary;
-
- ary = RARRAY_AREF(args, 0);
-
-#if 0
- rb_ary_push(ary, key2keyname(key));
- if (val != TK_None) rb_ary_push(ary, val);
-#endif
- rb_ary_push(ary, key2keyname(key));
-
- if (val == TK_None) return ST_CHECK;
-
- rb_ary_push(ary, get_eval_string_core(val, Qnil, RARRAY_AREF(args, 1)));
-
- return ST_CHECK;
-}
-
-static VALUE
-hash2kv(hash, ary, self)
- VALUE hash;
- VALUE ary;
- VALUE self;
-{
- volatile VALUE dst = rb_ary_new2(2 * RHASH_SIZE(hash));
- volatile VALUE args = rb_ary_new3(2, dst, self);
-
- st_foreach_check(RHASH_TBL(hash), push_kv, args, Qundef);
-
- if (NIL_P(ary)) {
- return dst;
- } else {
- return rb_ary_concat(ary, dst);
- }
-}
-
-static int
-push_kv_enc(key, val, args)
- VALUE key;
- VALUE val;
- VALUE args;
-{
- volatile VALUE ary;
-
- ary = RARRAY_AREF(args, 0);
-
-#if 0
- rb_ary_push(ary, key2keyname(key));
- if (val != TK_None) {
- rb_ary_push(ary, get_eval_string_core(val, Qtrue,
- RARRAY_AREF(args, 1)));
- }
-#endif
- rb_ary_push(ary, key2keyname(key));
-
- if (val == TK_None) return ST_CHECK;
-
- rb_ary_push(ary, get_eval_string_core(val, Qtrue, RARRAY_AREF(args, 1)));
-
- return ST_CHECK;
-}
-
-static VALUE
-hash2kv_enc(hash, ary, self)
- VALUE hash;
- VALUE ary;
- VALUE self;
-{
- volatile VALUE dst = rb_ary_new2(2 * RHASH_SIZE(hash));
- volatile VALUE args = rb_ary_new3(2, dst, self);
-
- st_foreach_check(RHASH_TBL(hash), push_kv_enc, args, Qundef);
-
- if (NIL_P(ary)) {
- return dst;
- } else {
- return rb_ary_concat(ary, dst);
- }
-}
-
-static VALUE
-hash2list(hash, self)
- VALUE hash;
- VALUE self;
-{
- return ary2list2(hash2kv(hash, Qnil, self), Qfalse, self);
-}
-
-
-static VALUE
-hash2list_enc(hash, self)
- VALUE hash;
- VALUE self;
-{
- return ary2list2(hash2kv_enc(hash, Qnil, self), Qfalse, self);
-}
-
-static VALUE
-tk_hash_kv(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- volatile VALUE hash, enc_flag, ary;
-
- ary = Qnil;
- enc_flag = Qnil;
- switch(argc) {
- case 3:
- ary = argv[2];
- if (!NIL_P(ary)) Check_Type(ary, T_ARRAY);
- case 2:
- enc_flag = argv[1];
- case 1:
- hash = argv[0];
- break;
- case 0:
- rb_raise(rb_eArgError, "too few arguments");
- default: /* >= 3 */
- rb_raise(rb_eArgError, "too many arguments");
- }
-
- switch(TYPE(hash)) {
- case T_ARRAY:
- if (RTEST(enc_flag)) {
- return assoc2kv_enc(hash, ary, self);
- } else {
- return assoc2kv(hash, ary, self);
- }
-
- case T_HASH:
- if (RTEST(enc_flag)) {
- return hash2kv_enc(hash, ary, self);
- } else {
- return hash2kv(hash, ary, self);
- }
-
- case T_NIL:
- if (NIL_P(ary)) {
- return rb_ary_new();
- } else {
- return ary;
- }
-
- default:
- if (hash == TK_None) {
- if (NIL_P(ary)) {
- return rb_ary_new();
- } else {
- return ary;
- }
- }
- rb_raise(rb_eArgError, "Hash is expected for 1st argument");
- }
-
- UNREACHABLE;
-}
-
-static VALUE
-get_eval_string_core(obj, enc_flag, self)
- VALUE obj;
- VALUE enc_flag;
- VALUE self;
-{
- switch(TYPE(obj)) {
- case T_FLOAT:
- case T_FIXNUM:
- case T_BIGNUM:
- return rb_funcallv(obj, ID_to_s, 0, 0);
-
- case T_STRING:
- if (RTEST(enc_flag)) {
- if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
- return rb_funcall(self, ID_toUTF8, 1, obj);
- } else {
- return fromDefaultEnc_toUTF8(obj, self);
- }
- } else {
- return obj;
- }
-
- case T_SYMBOL:
- if (RTEST(enc_flag)) {
- if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
- return rb_funcall(self, ID_toUTF8, 1,
- rb_str_dup(rb_sym2str(obj)));
- } else {
- return fromDefaultEnc_toUTF8(rb_sym2str(obj), self);
- }
- } else {
- return rb_sym2str(obj);
- }
-
- case T_HASH:
- if (RTEST(enc_flag)) {
- return hash2list_enc(obj, self);
- } else {
- return hash2list(obj, self);
- }
-
- case T_ARRAY:
- return ary2list(obj, enc_flag, self);
-
- case T_FALSE:
- return rb_str_new2("0");
-
- case T_TRUE:
- return rb_str_new2("1");
-
- case T_NIL:
- return rb_str_new2("");
-
- case T_REGEXP:
- return rb_funcallv(obj, ID_source, 0, 0);
-
- default:
- if (rb_obj_is_kind_of(obj, cTkObject)) {
- /* return rb_str_new3(rb_funcallv(obj, ID_path, 0, 0)); */
- return get_eval_string_core(rb_funcallv(obj, ID_path, 0, 0),
- enc_flag, self);
- }
-
- if (rb_obj_is_kind_of(obj, rb_cProc)
- || rb_obj_is_kind_of(obj, cMethod)
- || rb_obj_is_kind_of(obj, cTkCallbackEntry)) {
- if (rb_obj_respond_to(self, ID_install_cmd, Qtrue)) {
- return rb_funcall(self, ID_install_cmd, 1, obj);
- } else {
- return tk_install_cmd_core(obj);
- }
- }
-
- if (obj == TK_None) return Qnil;
-
- if (rb_obj_respond_to(obj, ID_to_eval, Qtrue)) {
- /* return rb_funcallv(obj, ID_to_eval, 0, 0); */
- return get_eval_string_core(rb_funcallv(obj, ID_to_eval, 0, 0),
- enc_flag, self);
- } else if (rb_obj_respond_to(obj, ID_path, Qtrue)) {
- /* return rb_funcallv(obj, ID_path, 0, 0); */
- return get_eval_string_core(rb_funcallv(obj, ID_path, 0, 0),
- enc_flag, self);
- } else if (rb_obj_respond_to(obj, ID_to_s, Qtrue)) {
- return rb_funcallv(obj, ID_to_s, 0, 0);
- }
- }
-
- rb_warning("fail to convert '%+"PRIsVALUE"' to string for Tk", obj);
-
- return obj;
-}
-
-static VALUE
-tk_get_eval_string(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- VALUE obj, enc_flag;
-
- if (rb_scan_args(argc, argv, "11", &obj, &enc_flag) == 1) {
- enc_flag = Qnil;
- }
-
- return get_eval_string_core(obj, enc_flag, self);
-}
-
-static VALUE
-tk_get_eval_enc_str(self, obj)
- VALUE self;
- VALUE obj;
-{
- if (obj == TK_None) {
- return obj;
- } else {
- return get_eval_string_core(obj, Qtrue, self);
- }
-}
-
-static VALUE
-tk_conv_args(argc, argv, self)
- int argc;
- VALUE *argv; /* [0]:base_array, [1]:enc_mode, [2]..[n]:args */
- VALUE self;
-{
- int idx;
- long size;
- volatile VALUE dst;
- int thr_crit_bup;
- VALUE old_gc;
-
- if (argc < 2) {
- rb_raise(rb_eArgError, "too few arguments");
- }
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
- old_gc = rb_gc_disable();
-
- for(size = 0, idx = 2; idx < argc; idx++) {
- if (RB_TYPE_P(argv[idx], T_HASH)) {
- size += 2 * RHASH_SIZE(argv[idx]);
- } else {
- size++;
- }
- }
- /* dst = rb_ary_new2(argc - 2); */
- dst = rb_ary_new2(size);
- for(idx = 2; idx < argc; idx++) {
- if (RB_TYPE_P(argv[idx], T_HASH)) {
- if (RTEST(argv[1])) {
- hash2kv_enc(argv[idx], dst, self);
- } else {
- hash2kv(argv[idx], dst, self);
- }
- } else if (argv[idx] != TK_None) {
- rb_ary_push(dst, get_eval_string_core(argv[idx], argv[1], self));
- }
- }
-
- if (old_gc == Qfalse) rb_gc_enable();
- rb_thread_critical = thr_crit_bup;
-
- return rb_ary_plus(argv[0], dst);
-}
-
-
-/*************************************/
-
-static VALUE
-tcl2rb_bool(self, value)
- VALUE self;
- VALUE value;
-{
- if (RB_TYPE_P(value, T_FIXNUM)) {
- if (NUM2INT(value) == 0) {
- return Qfalse;
- } else {
- return Qtrue;
- }
- }
-
- if (value == Qtrue || value == Qfalse) {
- return value;
- }
-
- rb_check_type(value, T_STRING);
-
- value = rb_funcall(value, ID_downcase, 0);
-
- if (RSTRING_PTR(value) == (char*)NULL) return Qnil;
-
- if (RSTRING_PTR(value)[0] == '\0'
- || strcmp(RSTRING_PTR(value), "0") == 0
- || strcmp(RSTRING_PTR(value), "no") == 0
- || strcmp(RSTRING_PTR(value), "off") == 0
- || strcmp(RSTRING_PTR(value), "false") == 0) {
- return Qfalse;
- } else {
- return Qtrue;
- }
-}
-
-#if 0
-static VALUE
-tkstr_to_dec(value)
- VALUE value;
-{
- return rb_cstr_to_inum(RSTRING_PTR(value), 10, 1);
-}
-#endif
-
-static VALUE
-tkstr_to_int(value)
- VALUE value;
-{
- return rb_cstr_to_inum(RSTRING_PTR(value), 0, 1);
-}
-
-static VALUE
-tkstr_to_float(value)
- VALUE value;
-{
- return rb_float_new(rb_cstr_to_dbl(RSTRING_PTR(value), 1));
-}
-
-static VALUE
-tkstr_invalid_numstr(value)
- VALUE value;
-{
- rb_raise(rb_eArgError,
- "invalid value for Number: '%s'", RSTRING_PTR(value));
- return Qnil; /*dummy*/
-}
-
-static VALUE
-tkstr_rescue_float(value)
- VALUE value;
-{
- return rb_rescue2(tkstr_to_float, value,
- tkstr_invalid_numstr, value,
- rb_eArgError, 0);
-}
-
-static VALUE
-tkstr_to_number(value)
- VALUE value;
-{
- rb_check_type(value, T_STRING);
-
- if (RSTRING_PTR(value) == (char*)NULL) return INT2FIX(0);
-
- return rb_rescue2(tkstr_to_int, value,
- tkstr_rescue_float, value,
- rb_eArgError, 0);
-}
-
-static VALUE
-tcl2rb_number(self, value)
- VALUE self;
- VALUE value;
-{
- return tkstr_to_number(value);
-}
-
-static VALUE
-tkstr_to_str(value)
- VALUE value;
-{
- char * ptr;
- long len;
-
- ptr = RSTRING_PTR(value);
- len = RSTRING_LEN(value);
-
- if (len > 1 && *ptr == '{' && *(ptr + len - 1) == '}') {
- return rb_str_new(ptr + 1, len - 2);
- }
- return value;
-}
-
-static VALUE
-tcl2rb_string(self, value)
- VALUE self;
- VALUE value;
-{
- rb_check_type(value, T_STRING);
-
- if (RSTRING_PTR(value) == (char*)NULL) return rb_tainted_str_new2("");
-
- return tkstr_to_str(value);
-}
-
-static VALUE
-tcl2rb_num_or_str(self, value)
- VALUE self;
- VALUE value;
-{
- rb_check_type(value, T_STRING);
-
- if (RSTRING_PTR(value) == (char*)NULL) return rb_tainted_str_new2("");
-
- return rb_rescue2(tkstr_to_number, value,
- tkstr_to_str, value,
- rb_eArgError, 0);
-}
-
-static VALUE
-tcl2rb_num_or_nil(self, value)
- VALUE self;
- VALUE value;
-{
- rb_check_type(value, T_STRING);
-
- if (RSTRING_LEN(value) == 0) return Qnil;
-
- return tkstr_to_number(value);
-}
-
-
-/*************************************/
-
-#define CBSUBST_TBL_MAX (256)
-struct cbsubst_info {
- long full_subst_length;
- long keylen[CBSUBST_TBL_MAX];
- char *key[CBSUBST_TBL_MAX];
- char type[CBSUBST_TBL_MAX];
- ID ivar[CBSUBST_TBL_MAX];
- VALUE proc;
- VALUE aliases;
-};
-
-static void
-subst_mark(ptr)
- struct cbsubst_info *ptr;
-{
- rb_gc_mark(ptr->proc);
- rb_gc_mark(ptr->aliases);
-}
-
-static void
-subst_free(ptr)
- struct cbsubst_info *ptr;
-{
- int i;
-
- if (ptr) {
- for(i = 0; i < CBSUBST_TBL_MAX; i++) {
- if (ptr->key[i] != NULL) {
- free(ptr->key[i]); /* allocated by malloc */
- ptr->key[i] = NULL;
- }
- }
- xfree(ptr); /* allocated by ALLOC */
- }
-}
-
-static size_t
-subst_memsize(ptr)
- const struct cbsubst_info *ptr;
-{
- return sizeof(*ptr);
-}
-
-static const rb_data_type_t cbsubst_info_type = {
- "TkUtil/CallbackSubst/Info",
- {
- subst_mark,
- subst_free,
- subst_memsize,
- },
- 0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
-};
-
-static VALUE
-allocate_cbsubst_info(struct cbsubst_info **inf_ptr)
-{
- struct cbsubst_info *inf;
- volatile VALUE proc, aliases;
- int idx;
-
- VALUE info = TypedData_Make_Struct(cSUBST_INFO, struct cbsubst_info,
- &cbsubst_info_type, inf);
-
- inf->full_subst_length = 0;
-
- for(idx = 0; idx < CBSUBST_TBL_MAX; idx++) {
- inf->keylen[idx] = 0;
- inf->key[idx] = NULL;
- inf->type[idx] = '\0';
- inf->ivar[idx] = (ID) 0;
- }
-
- proc = rb_hash_new();
- inf->proc = proc;
-
- aliases = rb_hash_new();
- inf->aliases = aliases;
-
- if (inf_ptr != (struct cbsubst_info **)NULL) *inf_ptr = inf;
-
- return info;
-}
-
-static void
-cbsubst_init(void)
-{
- rb_const_set(cCB_SUBST, ID_SUBST_INFO,
- allocate_cbsubst_info((struct cbsubst_info **)NULL));
-}
-
-static struct cbsubst_info *
-cbsubst_get_ptr(klass)
- VALUE klass;
-{
- return rb_check_typeddata(rb_const_get(klass, ID_SUBST_INFO), &cbsubst_info_type);
-}
-
-static VALUE
-cbsubst_initialize(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- struct cbsubst_info *inf;
- int idx, iv_idx;
-
- inf = cbsubst_get_ptr(rb_obj_class(self));
-
- if (argc > 0) {
- idx = 0;
- for (iv_idx = 0; iv_idx < CBSUBST_TBL_MAX; iv_idx++) {
- if (inf->ivar[iv_idx] == (ID)0) continue;
- rb_ivar_set(self, inf->ivar[iv_idx], argv[idx++]);
- if (idx >= argc) break;
- }
- }
-
- return self;
-}
-
-static VALUE
-cbsubst_ret_val(self, val)
- VALUE self;
- VALUE val;
-{
- /* This method may be overwritten on some sub-classes. */
- /* This method is used for converting from ruby's callback-return-value */
- /* to tcl's value (e.g. validation procedure of entry widget). */
- return val;
-}
-
-static int
-each_attr_def(key, value, klass)
- VALUE key, value, klass;
-{
- ID key_id, value_id;
-
- if (key == Qundef) return ST_CONTINUE;
-
- switch(TYPE(key)) {
- case T_STRING:
- key_id = rb_intern_str(key);
- break;
- case T_SYMBOL:
- key_id = SYM2ID(key);
- break;
- default:
- rb_raise(rb_eArgError,
- "includes invalid key(s). expected a String or a Symbol");
- }
-
- switch(TYPE(value)) {
- case T_STRING:
- value_id = rb_intern_str(value);
- break;
- case T_SYMBOL:
- value_id = SYM2ID(value);
- break;
- default:
- rb_raise(rb_eArgError,
- "includes invalid value(s). expected a String or a Symbol");
- }
-
- rb_alias(klass, key_id, value_id);
-
- return ST_CONTINUE;
-}
-
-static VALUE
-cbsubst_def_attr_aliases(self, tbl)
- VALUE self;
- VALUE tbl;
-{
- struct cbsubst_info *inf;
-
- if (!RB_TYPE_P(tbl, T_HASH)) {
- rb_raise(rb_eArgError, "expected a Hash");
- }
-
- inf = cbsubst_get_ptr(self);
-
- rb_hash_foreach(tbl, each_attr_def, self);
-
- return rb_funcall(inf->aliases, rb_intern("update"), 1, tbl);
-}
-
-static VALUE
-cbsubst_append_inf_key(str, inf, idx)
- VALUE str;
- const struct cbsubst_info *inf;
- int idx;
-{
- const long len = inf->keylen[idx];
- const long olen = RSTRING_LEN(str);
- char *buf, *ptr;
-
- rb_str_modify_expand(str, (len ? len : 1) + 2);
- buf = RSTRING_PTR(str);
- ptr = buf + olen;
-
- *(ptr++) = '%';
-
- if (len != 0) {
- /* longname */
- strncpy(ptr, inf->key[idx], len);
- ptr += len;
- }
- else {
- /* single char */
- *(ptr++) = (unsigned char)idx;
- }
-
- *(ptr++) = ' ';
-
- rb_str_set_len(str, ptr - buf);
-
- return str;
-}
-
-static VALUE
-cbsubst_sym_to_subst(self, sym)
- VALUE self;
- VALUE sym;
-{
- struct cbsubst_info *inf;
- VALUE str;
- int idx;
- ID id;
- volatile VALUE ret;
-
- if (!RB_TYPE_P(sym, T_SYMBOL)) return sym;
-
- inf = cbsubst_get_ptr(self);
-
- if (!NIL_P(ret = rb_hash_aref(inf->aliases, sym))) {
- str = rb_sym2str(ret);
- } else {
- str = rb_sym2str(sym);
- }
-
- id = rb_intern_str(rb_sprintf("@%"PRIsVALUE, str));
-
- for(idx = 0; idx < CBSUBST_TBL_MAX; idx++) {
- if (inf->ivar[idx] == id) break;
- }
- if (idx >= CBSUBST_TBL_MAX) return sym;
-
- return cbsubst_append_inf_key(rb_str_new(0, 0), inf, idx);
-}
-
-static VALUE
-cbsubst_get_subst_arg(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- struct cbsubst_info *inf;
- VALUE str;
- int i, idx;
- ID id;
- VALUE arg_sym, ret, result;
-
- inf = cbsubst_get_ptr(self);
-
- result = rb_str_new(0, 0);
- for(i = 0; i < argc; i++) {
- switch(TYPE(argv[i])) {
- case T_STRING:
- str = argv[i];
- arg_sym = rb_check_symbol(&str);
- if (NIL_P(arg_sym)) goto not_found;
- break;
- case T_SYMBOL:
- arg_sym = argv[i];
- str = rb_sym2str(arg_sym);
- break;
- default:
- rb_raise(rb_eArgError, "arg #%d is not a String or a Symbol", i);
- }
-
- if (!NIL_P(ret = rb_hash_aref(inf->aliases, arg_sym))) {
- str = rb_sym2str(ret);
- }
-
- ret = rb_sprintf("@%"PRIsVALUE, str);
- id = rb_check_id(&ret);
- if (!id) goto not_found;
-
- for(idx = 0; idx < CBSUBST_TBL_MAX; idx++) {
- if (inf->ivar[idx] == id) break;
- }
- if (idx >= CBSUBST_TBL_MAX) {
- not_found:
- rb_raise(rb_eArgError, "cannot find attribute :%"PRIsVALUE, str);
- }
-
- result = cbsubst_append_inf_key(result, inf, idx);
- }
-
- return result;
-}
-
-static VALUE
-cbsubst_get_subst_key(self, str)
- VALUE self;
- VALUE str;
-{
- struct cbsubst_info *inf;
- VALUE list;
- VALUE ret;
- long i, len, keylen;
- int idx;
- char *buf, *ptr;
-
- list = rb_funcall(cTclTkLib, ID_split_tklist, 1, str);
- Check_Type(list, T_ARRAY);
- len = RARRAY_LEN(list);
-
- inf = cbsubst_get_ptr(self);
-
- ret = rb_str_new(0, len);
- ptr = buf = RSTRING_PTR(ret);
-
- for(i = 0; i < len; i++) {
- VALUE keyval = RARRAY_AREF(list, i);
- const char *key = (Check_Type(keyval, T_STRING), StringValueCStr(keyval));
- if (*key == '%') {
- if (*(key + 2) == '\0') {
- /* single char */
- *(ptr++) = *(key + 1);
- } else {
- /* search longname-key */
- keylen = RSTRING_LEN(keyval) - 1;
- for(idx = 0; idx < CBSUBST_TBL_MAX; idx++) {
- if (inf->keylen[idx] != keylen) continue;
- if ((unsigned char)inf->key[idx][0] != (unsigned char)*(key + 1)) continue;
- if (strncmp(inf->key[idx], key + 1, keylen)) continue;
- break;
- }
- if (idx < CBSUBST_TBL_MAX) {
- *(ptr++) = (unsigned char)idx;
- } else {
- *(ptr++) = ' ';
- }
- }
- } else {
- *(ptr++) = ' ';
- }
- }
-
- rb_str_set_len(ret, ptr - buf);
- return ret;
-}
-
-static VALUE
-cbsubst_get_all_subst_keys(self)
- VALUE self;
-{
- struct cbsubst_info *inf;
- char *keys_buf, *keys_ptr;
- int idx;
- VALUE str, keys_str;
-
- inf = cbsubst_get_ptr(self);
-
- str = rb_str_new(0, 0);
- keys_str = rb_str_new(0, CBSUBST_TBL_MAX);
- keys_ptr = keys_buf = RSTRING_PTR(keys_str);
-
- for(idx = 0; idx < CBSUBST_TBL_MAX; idx++) {
- if (inf->ivar[idx] == (ID) 0) continue;
-
- *(keys_ptr++) = (unsigned char)idx;
-
- str = cbsubst_append_inf_key(str, inf, idx);
- }
- rb_str_set_len(keys_str, keys_ptr - keys_buf);
-
- return rb_ary_new3(2, keys_str, str);
-}
-
-static VALUE
-cbsubst_table_setup(argc, argv, self)
- int argc;
- VALUE *argv;
- VALUE self;
-{
- VALUE cbsubst_obj;
- VALUE key_inf;
- VALUE longkey_inf;
- VALUE proc_inf;
- VALUE inf, subst, name, type, ivar, proc;
- const VALUE *infp;
- ID id;
- struct cbsubst_info *subst_inf;
- long idx;
- unsigned char chr;
-
- /* accept (key_inf, proc_inf) or (key_inf, longkey_inf, procinf) */
- if (rb_scan_args(argc, argv, "21", &key_inf, &longkey_inf, &proc_inf) == 2) {
- proc_inf = longkey_inf;
- longkey_inf = rb_ary_new();
- }
- Check_Type(key_inf, T_ARRAY);
- Check_Type(longkey_inf, T_ARRAY);
- Check_Type(proc_inf, T_ARRAY);
-
- /* check the number of longkeys */
- if (RARRAY_LEN(longkey_inf) > 125 /* from 0x80 to 0xFD */) {
- rb_raise(rb_eArgError, "too many longname-key definitions");
- }
-
- /* init */
- cbsubst_obj = allocate_cbsubst_info(&subst_inf);
-
- /*
- * keys : array of [subst, type, ivar]
- * subst ==> char code or string
- * type ==> char code or string
- * ivar ==> symbol
- */
- for(idx = 0; idx < RARRAY_LEN(key_inf); idx++) {
- inf = RARRAY_AREF(key_inf, idx);
- if (!RB_TYPE_P(inf, T_ARRAY)) continue;
- if (RARRAY_LEN(inf) < 3) continue;
- infp = RARRAY_CONST_PTR(inf);
- subst = infp[0];
- type = infp[1];
- ivar = infp[2];
-
- chr = NUM2CHR(subst);
- subst_inf->type[chr] = NUM2CHR(type);
-
- subst_inf->full_subst_length += 3;
-
- id = SYM2ID(ivar);
- subst_inf->ivar[chr] = rb_intern_str(rb_sprintf("@%"PRIsVALUE, rb_id2str(id)));
-
- rb_attr(self, id, 1, 0, Qtrue);
- }
- RB_GC_GUARD(key_inf);
-
-
- /*
- * longkeys : array of [name, type, ivar]
- * name ==> longname key string
- * type ==> char code or string
- * ivar ==> symbol
- */
- for(idx = 0; idx < RARRAY_LEN(longkey_inf); idx++) {
- inf = RARRAY_AREF(longkey_inf, idx);
- if (!RB_TYPE_P(inf, T_ARRAY)) continue;
- if (RARRAY_LEN(inf) < 3) continue;
- infp = RARRAY_CONST_PTR(inf);
- name = infp[0];
- type = infp[1];
- ivar = infp[2];
-
- Check_Type(name, T_STRING);
- chr = (unsigned char)(0x80 + idx);
- subst_inf->keylen[chr] = RSTRING_LEN(name);
- subst_inf->key[chr] = strndup(RSTRING_PTR(name),
- RSTRING_LEN(name));
- subst_inf->type[chr] = NUM2CHR(type);
-
- subst_inf->full_subst_length += (subst_inf->keylen[chr] + 2);
-
- id = SYM2ID(ivar);
- subst_inf->ivar[chr] = rb_intern_str(rb_sprintf("@%"PRIsVALUE, rb_id2str(id)));
-
- rb_attr(self, id, 1, 0, Qtrue);
- }
- RB_GC_GUARD(longkey_inf);
-
- /*
- * procs : array of [type, proc]
- * type ==> char code or string
- * proc ==> proc/method/obj (must respond to 'call')
- */
- for(idx = 0; idx < RARRAY_LEN(proc_inf); idx++) {
- inf = RARRAY_AREF(proc_inf, idx);
- if (!RB_TYPE_P(inf, T_ARRAY)) continue;
- if (RARRAY_LEN(inf) < 2) continue;
- type = rb_ary_entry(inf, 0);
- proc = rb_ary_entry(inf, 1);
- if (RB_TYPE_P(type, T_STRING))
- type = INT2FIX(*(RSTRING_PTR(type)));
- rb_hash_aset(subst_inf->proc, type, proc);
- }
- RB_GC_GUARD(proc_inf);
-
- rb_const_set(self, ID_SUBST_INFO, cbsubst_obj);
-
- return self;
-}
-
-static VALUE
-cbsubst_get_extra_args_tbl(self)
- VALUE self;
-{
- return rb_ary_new();
-}
-
-static VALUE
-cbsubst_scan_args(self, arg_key, val_ary)
- VALUE self;
- VALUE arg_key;
- VALUE val_ary;
-{
- struct cbsubst_info *inf;
- long idx;
- unsigned char *keyptr = (unsigned char*)StringValueCStr(arg_key);
- long keylen = RSTRING_LEN(arg_key);
- long vallen = (Check_Type(val_ary, T_ARRAY), RARRAY_LEN(val_ary));
- unsigned char type_chr;
- volatile VALUE dst = rb_ary_new2(vallen);
- volatile VALUE proc;
- int thr_crit_bup;
- VALUE old_gc;
-
- thr_crit_bup = rb_thread_critical;
- rb_thread_critical = Qtrue;
-
- old_gc = rb_gc_disable();
-
- inf = cbsubst_get_ptr(self);
-
- for(idx = 0; idx < vallen; idx++) {
- if (idx >= keylen) {
- proc = Qnil;
- } else if (*(keyptr + idx) == ' ') {
- proc = Qnil;
- } else {
- if ((type_chr = inf->type[*(keyptr + idx)]) != 0) {
- proc = rb_hash_aref(inf->proc, INT2FIX((int)type_chr));
- } else {
- proc = Qnil;
- }
- }
-
- if (NIL_P(proc)) {
- rb_ary_push(dst, RARRAY_AREF(val_ary, idx));
- } else {
- rb_ary_push(dst, rb_funcall(proc, ID_call, 1,
- RARRAY_AREF(val_ary, idx)));
- }
- }
-
- if (old_gc == Qfalse) rb_gc_enable();
- rb_thread_critical = thr_crit_bup;
-
- return dst;
-}
-
-static VALUE
-cbsubst_inspect(self)
- VALUE self;
-{
- return rb_str_new2("CallbackSubst");
-}
-
-static VALUE
-substinfo_inspect(self)
- VALUE self;
-{
- return rb_str_new2("SubstInfo");
-}
-
-/*************************************/
-
-static VALUE
-tk_cbe_inspect(self)
- VALUE self;
-{
- return rb_str_new2("TkCallbackEntry");
-}
-
-/*************************************/
-
-static VALUE
-tkobj_path(self)
- VALUE self;
-{
- return rb_ivar_get(self, ID_at_path);
-}
-
-
-/*************************************/
-/* release date */
-const char tkutil_release_date[] = TKUTIL_RELEASE_DATE;
-
-void
-Init_tkutil(void)
-{
- VALUE cTK = rb_define_class("TkKernel", rb_cObject);
- VALUE mTK = rb_define_module("TkUtil");
-
- /* --------------------- */
-
- rb_define_const(mTK, "RELEASE_DATE",
- rb_obj_freeze(rb_str_new2(tkutil_release_date)));
-
- /* --------------------- */
- rb_global_variable(&cMethod);
- cMethod = rb_const_get(rb_cObject, rb_intern("Method"));
-
- ID_path = rb_intern("path");
- ID_at_path = rb_intern("@path");
- ID_at_enc = rb_intern("@encoding");
- ID_to_eval = rb_intern("to_eval");
- ID_to_s = rb_intern("to_s");
- ID_source = rb_intern("source");
- ID_downcase = rb_intern("downcase");
- ID_install_cmd = rb_intern("install_cmd");
- ID_merge_tklist = rb_intern("_merge_tklist");
- ID_encoding = rb_intern("encoding");
- ID_encoding_system = rb_intern("encoding_system");
- ID_call = rb_intern("call");
-
- /* --------------------- */
- cCB_SUBST = rb_define_class_under(mTK, "CallbackSubst", rb_cObject);
- rb_define_singleton_method(cCB_SUBST, "inspect", cbsubst_inspect, 0);
-
- cSUBST_INFO = rb_define_class_under(cCB_SUBST, "Info", rb_cObject);
- rb_define_singleton_method(cSUBST_INFO, "inspect", substinfo_inspect, 0);
-
- ID_SUBST_INFO = rb_intern("SUBST_INFO");
- rb_define_singleton_method(cCB_SUBST, "ret_val", cbsubst_ret_val, 1);
- rb_define_singleton_method(cCB_SUBST, "scan_args", cbsubst_scan_args, 2);
- rb_define_singleton_method(cCB_SUBST, "_sym2subst",
- cbsubst_sym_to_subst, 1);
- rb_define_singleton_method(cCB_SUBST, "subst_arg",
- cbsubst_get_subst_arg, -1);
- rb_define_singleton_method(cCB_SUBST, "_get_subst_key",
- cbsubst_get_subst_key, 1);
- rb_define_singleton_method(cCB_SUBST, "_get_all_subst_keys",
- cbsubst_get_all_subst_keys, 0);
- rb_define_singleton_method(cCB_SUBST, "_setup_subst_table",
- cbsubst_table_setup, -1);
- rb_define_singleton_method(cCB_SUBST, "_get_extra_args_tbl",
- cbsubst_get_extra_args_tbl, 0);
- rb_define_singleton_method(cCB_SUBST, "_define_attribute_aliases",
- cbsubst_def_attr_aliases, 1);
-
- rb_define_method(cCB_SUBST, "initialize", cbsubst_initialize, -1);
-
- cbsubst_init();
-
- /* --------------------- */
- rb_global_variable(&cTkCallbackEntry);
- cTkCallbackEntry = rb_define_class("TkCallbackEntry", cTK);
- rb_define_singleton_method(cTkCallbackEntry, "inspect", tk_cbe_inspect, 0);
-
- /* --------------------- */
- rb_global_variable(&cTkObject);
- cTkObject = rb_define_class("TkObject", cTK);
- rb_define_method(cTkObject, "path", tkobj_path, 0);
-
- /* --------------------- */
- rb_require("tcltklib");
- rb_global_variable(&cTclTkLib);
- cTclTkLib = rb_const_get(rb_cObject, rb_intern("TclTkLib"));
- ID_split_tklist = rb_intern("_split_tklist");
- ID_toUTF8 = rb_intern("_toUTF8");
- ID_fromUTF8 = rb_intern("_fromUTF8");
-
- /* --------------------- */
- rb_define_singleton_method(cTK, "new", tk_s_new, -1);
-
- /* --------------------- */
- rb_global_variable(&TK_None);
- TK_None = rb_obj_alloc(rb_cObject);
- rb_define_const(mTK, "None", TK_None);
- rb_define_singleton_method(TK_None, "to_s", tkNone_to_s, 0);
- rb_define_singleton_method(TK_None, "inspect", tkNone_inspect, 0);
- OBJ_FREEZE(TK_None);
-
- /* --------------------- */
- rb_global_variable(&CALLBACK_TABLE);
- CALLBACK_TABLE = rb_hash_new();
-
- /* --------------------- */
- rb_define_singleton_method(mTK, "untrust", tk_obj_untrust, 1);
-
- rb_define_singleton_method(mTK, "eval_cmd", tk_eval_cmd, -1);
- rb_define_singleton_method(mTK, "callback", tk_do_callback, -1);
- rb_define_singleton_method(mTK, "install_cmd", tk_install_cmd, -1);
- rb_define_singleton_method(mTK, "uninstall_cmd", tk_uninstall_cmd, 1);
- rb_define_singleton_method(mTK, "_symbolkey2str", tk_symbolkey2str, 1);
- rb_define_singleton_method(mTK, "hash_kv", tk_hash_kv, -1);
- rb_define_singleton_method(mTK, "_get_eval_string",
- tk_get_eval_string, -1);
- rb_define_singleton_method(mTK, "_get_eval_enc_str",
- tk_get_eval_enc_str, 1);
- rb_define_singleton_method(mTK, "_conv_args", tk_conv_args, -1);
-
- rb_define_singleton_method(mTK, "bool", tcl2rb_bool, 1);
- rb_define_singleton_method(mTK, "number", tcl2rb_number, 1);
- rb_define_singleton_method(mTK, "string", tcl2rb_string, 1);
- rb_define_singleton_method(mTK, "num_or_str", tcl2rb_num_or_str, 1);
- rb_define_singleton_method(mTK, "num_or_nil", tcl2rb_num_or_nil, 1);
-
- rb_define_method(mTK, "_toUTF8", tk_toUTF8, -1);
- rb_define_method(mTK, "_fromUTF8", tk_fromUTF8, -1);
- rb_define_method(mTK, "_symbolkey2str", tk_symbolkey2str, 1);
- rb_define_method(mTK, "hash_kv", tk_hash_kv, -1);
- rb_define_method(mTK, "_get_eval_string", tk_get_eval_string, -1);
- rb_define_method(mTK, "_get_eval_enc_str", tk_get_eval_enc_str, 1);
- rb_define_method(mTK, "_conv_args", tk_conv_args, -1);
-
- rb_define_method(mTK, "bool", tcl2rb_bool, 1);
- rb_define_method(mTK, "number", tcl2rb_number, 1);
- rb_define_method(mTK, "string", tcl2rb_string, 1);
- rb_define_method(mTK, "num_or_str", tcl2rb_num_or_str, 1);
- rb_define_method(mTK, "num_or_nil", tcl2rb_num_or_nil, 1);
-
- /* --------------------- */
- rb_global_variable(&ENCODING_NAME_UTF8);
- ENCODING_NAME_UTF8 = rb_obj_freeze(rb_str_new2("utf-8"));
-
- /* --------------------- */
-}