tk 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1060) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.travis.yml +6 -0
  4. data/BSDL +22 -0
  5. data/ChangeLog.tkextlib +949 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +56 -0
  8. data/MANUAL_tcltklib.eng +467 -0
  9. data/MANUAL_tcltklib.ja +578 -0
  10. data/README.1st +19 -0
  11. data/README.ActiveTcl +62 -0
  12. data/README.fork +34 -0
  13. data/README.macosx-aqua +67 -0
  14. data/README.md +33 -0
  15. data/README.tcltklib +152 -0
  16. data/Rakefile +16 -0
  17. data/bin/console +14 -0
  18. data/bin/setup +8 -0
  19. data/ext/tk/config_list.in +41 -0
  20. data/ext/tk/extconf.rb +2098 -0
  21. data/ext/tk/old-extconf.rb +441 -0
  22. data/ext/tk/stubs.c +592 -0
  23. data/ext/tk/stubs.h +33 -0
  24. data/ext/tk/tcltklib.c +11066 -0
  25. data/ext/tk/tkutil/extconf.rb +14 -0
  26. data/ext/tk/tkutil/tkutil.c +1900 -0
  27. data/lib/README +30 -0
  28. data/lib/multi-tk.rb +3743 -0
  29. data/lib/remote-tk.rb +527 -0
  30. data/lib/tcltk.rb +369 -0
  31. data/lib/tk.rb +5758 -0
  32. data/lib/tk/after.rb +7 -0
  33. data/lib/tk/autoload.rb +763 -0
  34. data/lib/tk/bgerror.rb +30 -0
  35. data/lib/tk/bindtag.rb +139 -0
  36. data/lib/tk/busy.rb +119 -0
  37. data/lib/tk/button.rb +32 -0
  38. data/lib/tk/canvas.rb +847 -0
  39. data/lib/tk/canvastag.rb +460 -0
  40. data/lib/tk/checkbutton.rb +33 -0
  41. data/lib/tk/clipboard.rb +76 -0
  42. data/lib/tk/clock.rb +72 -0
  43. data/lib/tk/composite.rb +485 -0
  44. data/lib/tk/console.rb +53 -0
  45. data/lib/tk/dialog.rb +327 -0
  46. data/lib/tk/encodedstr.rb +188 -0
  47. data/lib/tk/entry.rb +121 -0
  48. data/lib/tk/event.rb +563 -0
  49. data/lib/tk/font.rb +2352 -0
  50. data/lib/tk/fontchooser.rb +181 -0
  51. data/lib/tk/frame.rb +133 -0
  52. data/lib/tk/grid.rb +280 -0
  53. data/lib/tk/image.rb +396 -0
  54. data/lib/tk/itemconfig.rb +1222 -0
  55. data/lib/tk/itemfont.rb +328 -0
  56. data/lib/tk/kinput.rb +72 -0
  57. data/lib/tk/label.rb +23 -0
  58. data/lib/tk/labelframe.rb +32 -0
  59. data/lib/tk/listbox.rb +285 -0
  60. data/lib/tk/macpkg.rb +81 -0
  61. data/lib/tk/menu.rb +719 -0
  62. data/lib/tk/menubar.rb +138 -0
  63. data/lib/tk/menuspec.rb +457 -0
  64. data/lib/tk/message.rb +25 -0
  65. data/lib/tk/mngfocus.rb +34 -0
  66. data/lib/tk/msgcat.rb +300 -0
  67. data/lib/tk/namespace.rb +547 -0
  68. data/lib/tk/optiondb.rb +372 -0
  69. data/lib/tk/optionobj.rb +213 -0
  70. data/lib/tk/pack.rb +108 -0
  71. data/lib/tk/package.rb +144 -0
  72. data/lib/tk/palette.rb +56 -0
  73. data/lib/tk/panedwindow.rb +261 -0
  74. data/lib/tk/place.rb +129 -0
  75. data/lib/tk/radiobutton.rb +74 -0
  76. data/lib/tk/root.rb +96 -0
  77. data/lib/tk/scale.rb +113 -0
  78. data/lib/tk/scrollable.rb +83 -0
  79. data/lib/tk/scrollbar.rb +184 -0
  80. data/lib/tk/scrollbox.rb +40 -0
  81. data/lib/tk/selection.rb +87 -0
  82. data/lib/tk/spinbox.rb +145 -0
  83. data/lib/tk/tagfont.rb +44 -0
  84. data/lib/tk/text.rb +1605 -0
  85. data/lib/tk/textimage.rb +89 -0
  86. data/lib/tk/textmark.rb +205 -0
  87. data/lib/tk/texttag.rb +322 -0
  88. data/lib/tk/textwindow.rb +155 -0
  89. data/lib/tk/timer.rb +666 -0
  90. data/lib/tk/tk_mac.rb +159 -0
  91. data/lib/tk/toplevel.rb +265 -0
  92. data/lib/tk/ttk_selector.rb +99 -0
  93. data/lib/tk/txtwin_abst.rb +40 -0
  94. data/lib/tk/validation.rb +398 -0
  95. data/lib/tk/variable.rb +1797 -0
  96. data/lib/tk/virtevent.rb +140 -0
  97. data/lib/tk/winfo.rb +393 -0
  98. data/lib/tk/winpkg.rb +157 -0
  99. data/lib/tk/wm.rb +553 -0
  100. data/lib/tk/xim.rb +123 -0
  101. data/lib/tkafter.rb +5 -0
  102. data/lib/tkbgerror.rb +5 -0
  103. data/lib/tkcanvas.rb +5 -0
  104. data/lib/tkclass.rb +48 -0
  105. data/lib/tkconsole.rb +5 -0
  106. data/lib/tkdialog.rb +5 -0
  107. data/lib/tkentry.rb +5 -0
  108. data/lib/tkextlib/ICONS.rb +14 -0
  109. data/lib/tkextlib/ICONS/icons.rb +130 -0
  110. data/lib/tkextlib/ICONS/setup.rb +9 -0
  111. data/lib/tkextlib/SUPPORT_STATUS +193 -0
  112. data/lib/tkextlib/blt.rb +190 -0
  113. data/lib/tkextlib/blt/barchart.rb +80 -0
  114. data/lib/tkextlib/blt/bitmap.rb +113 -0
  115. data/lib/tkextlib/blt/busy.rb +84 -0
  116. data/lib/tkextlib/blt/component.rb +2219 -0
  117. data/lib/tkextlib/blt/container.rb +29 -0
  118. data/lib/tkextlib/blt/cutbuffer.rb +24 -0
  119. data/lib/tkextlib/blt/dragdrop.rb +270 -0
  120. data/lib/tkextlib/blt/eps.rb +33 -0
  121. data/lib/tkextlib/blt/graph.rb +68 -0
  122. data/lib/tkextlib/blt/htext.rb +113 -0
  123. data/lib/tkextlib/blt/setup.rb +9 -0
  124. data/lib/tkextlib/blt/spline.rb +24 -0
  125. data/lib/tkextlib/blt/stripchart.rb +75 -0
  126. data/lib/tkextlib/blt/table.rb +413 -0
  127. data/lib/tkextlib/blt/tabnotebook.rb +111 -0
  128. data/lib/tkextlib/blt/tabset.rb +505 -0
  129. data/lib/tkextlib/blt/ted.rb +69 -0
  130. data/lib/tkextlib/blt/tile.rb +26 -0
  131. data/lib/tkextlib/blt/tile/button.rb +17 -0
  132. data/lib/tkextlib/blt/tile/checkbutton.rb +18 -0
  133. data/lib/tkextlib/blt/tile/frame.rb +17 -0
  134. data/lib/tkextlib/blt/tile/label.rb +17 -0
  135. data/lib/tkextlib/blt/tile/radiobutton.rb +18 -0
  136. data/lib/tkextlib/blt/tile/scrollbar.rb +17 -0
  137. data/lib/tkextlib/blt/tile/toplevel.rb +17 -0
  138. data/lib/tkextlib/blt/tree.rb +1059 -0
  139. data/lib/tkextlib/blt/treeview.rb +1288 -0
  140. data/lib/tkextlib/blt/unix_dnd.rb +142 -0
  141. data/lib/tkextlib/blt/vector.rb +257 -0
  142. data/lib/tkextlib/blt/watch.rb +176 -0
  143. data/lib/tkextlib/blt/win_printer.rb +62 -0
  144. data/lib/tkextlib/blt/winop.rb +108 -0
  145. data/lib/tkextlib/bwidget.rb +154 -0
  146. data/lib/tkextlib/bwidget/arrowbutton.rb +22 -0
  147. data/lib/tkextlib/bwidget/bitmap.rb +22 -0
  148. data/lib/tkextlib/bwidget/button.rb +32 -0
  149. data/lib/tkextlib/bwidget/buttonbox.rb +91 -0
  150. data/lib/tkextlib/bwidget/combobox.rb +63 -0
  151. data/lib/tkextlib/bwidget/dialog.rb +195 -0
  152. data/lib/tkextlib/bwidget/dragsite.rb +32 -0
  153. data/lib/tkextlib/bwidget/dropsite.rb +40 -0
  154. data/lib/tkextlib/bwidget/dynamichelp.rb +64 -0
  155. data/lib/tkextlib/bwidget/entry.rb +44 -0
  156. data/lib/tkextlib/bwidget/label.rb +42 -0
  157. data/lib/tkextlib/bwidget/labelentry.rb +81 -0
  158. data/lib/tkextlib/bwidget/labelframe.rb +53 -0
  159. data/lib/tkextlib/bwidget/listbox.rb +362 -0
  160. data/lib/tkextlib/bwidget/mainframe.rb +133 -0
  161. data/lib/tkextlib/bwidget/messagedlg.rb +193 -0
  162. data/lib/tkextlib/bwidget/notebook.rb +167 -0
  163. data/lib/tkextlib/bwidget/pagesmanager.rb +74 -0
  164. data/lib/tkextlib/bwidget/panedwindow.rb +43 -0
  165. data/lib/tkextlib/bwidget/panelframe.rb +68 -0
  166. data/lib/tkextlib/bwidget/passwddlg.rb +45 -0
  167. data/lib/tkextlib/bwidget/progressbar.rb +21 -0
  168. data/lib/tkextlib/bwidget/progressdlg.rb +59 -0
  169. data/lib/tkextlib/bwidget/scrollableframe.rb +41 -0
  170. data/lib/tkextlib/bwidget/scrolledwindow.rb +49 -0
  171. data/lib/tkextlib/bwidget/scrollview.rb +26 -0
  172. data/lib/tkextlib/bwidget/selectcolor.rb +74 -0
  173. data/lib/tkextlib/bwidget/selectfont.rb +92 -0
  174. data/lib/tkextlib/bwidget/separator.rb +21 -0
  175. data/lib/tkextlib/bwidget/setup.rb +9 -0
  176. data/lib/tkextlib/bwidget/spinbox.rb +99 -0
  177. data/lib/tkextlib/bwidget/statusbar.rb +63 -0
  178. data/lib/tkextlib/bwidget/titleframe.rb +34 -0
  179. data/lib/tkextlib/bwidget/tree.rb +501 -0
  180. data/lib/tkextlib/bwidget/widget.rb +130 -0
  181. data/lib/tkextlib/itcl.rb +14 -0
  182. data/lib/tkextlib/itcl/incr_tcl.rb +179 -0
  183. data/lib/tkextlib/itcl/setup.rb +14 -0
  184. data/lib/tkextlib/itk.rb +14 -0
  185. data/lib/tkextlib/itk/incr_tk.rb +447 -0
  186. data/lib/tkextlib/itk/setup.rb +14 -0
  187. data/lib/tkextlib/iwidgets.rb +95 -0
  188. data/lib/tkextlib/iwidgets/buttonbox.rb +122 -0
  189. data/lib/tkextlib/iwidgets/calendar.rb +126 -0
  190. data/lib/tkextlib/iwidgets/canvasprintbox.rb +54 -0
  191. data/lib/tkextlib/iwidgets/canvasprintdialog.rb +39 -0
  192. data/lib/tkextlib/iwidgets/checkbox.rb +131 -0
  193. data/lib/tkextlib/iwidgets/combobox.rb +105 -0
  194. data/lib/tkextlib/iwidgets/dateentry.rb +21 -0
  195. data/lib/tkextlib/iwidgets/datefield.rb +59 -0
  196. data/lib/tkextlib/iwidgets/dialog.rb +21 -0
  197. data/lib/tkextlib/iwidgets/dialogshell.rb +122 -0
  198. data/lib/tkextlib/iwidgets/disjointlistbox.rb +51 -0
  199. data/lib/tkextlib/iwidgets/entryfield.rb +186 -0
  200. data/lib/tkextlib/iwidgets/extbutton.rb +41 -0
  201. data/lib/tkextlib/iwidgets/extfileselectionbox.rb +47 -0
  202. data/lib/tkextlib/iwidgets/extfileselectiondialog.rb +34 -0
  203. data/lib/tkextlib/iwidgets/feedback.rb +36 -0
  204. data/lib/tkextlib/iwidgets/fileselectionbox.rb +47 -0
  205. data/lib/tkextlib/iwidgets/fileselectiondialog.rb +34 -0
  206. data/lib/tkextlib/iwidgets/finddialog.rb +43 -0
  207. data/lib/tkextlib/iwidgets/hierarchy.rb +366 -0
  208. data/lib/tkextlib/iwidgets/hyperhelp.rb +51 -0
  209. data/lib/tkextlib/iwidgets/labeledframe.rb +40 -0
  210. data/lib/tkextlib/iwidgets/labeledwidget.rb +46 -0
  211. data/lib/tkextlib/iwidgets/mainwindow.rb +68 -0
  212. data/lib/tkextlib/iwidgets/menubar.rb +213 -0
  213. data/lib/tkextlib/iwidgets/messagebox.rb +94 -0
  214. data/lib/tkextlib/iwidgets/messagedialog.rb +21 -0
  215. data/lib/tkextlib/iwidgets/notebook.rb +176 -0
  216. data/lib/tkextlib/iwidgets/optionmenu.rb +93 -0
  217. data/lib/tkextlib/iwidgets/panedwindow.rb +135 -0
  218. data/lib/tkextlib/iwidgets/promptdialog.rb +132 -0
  219. data/lib/tkextlib/iwidgets/pushbutton.rb +36 -0
  220. data/lib/tkextlib/iwidgets/radiobox.rb +122 -0
  221. data/lib/tkextlib/iwidgets/scopedobject.rb +25 -0
  222. data/lib/tkextlib/iwidgets/scrolledcanvas.rb +354 -0
  223. data/lib/tkextlib/iwidgets/scrolledframe.rb +60 -0
  224. data/lib/tkextlib/iwidgets/scrolledhtml.rb +59 -0
  225. data/lib/tkextlib/iwidgets/scrolledlistbox.rb +208 -0
  226. data/lib/tkextlib/iwidgets/scrolledtext.rb +569 -0
  227. data/lib/tkextlib/iwidgets/scrolledwidget.rb +21 -0
  228. data/lib/tkextlib/iwidgets/selectionbox.rb +103 -0
  229. data/lib/tkextlib/iwidgets/selectiondialog.rb +93 -0
  230. data/lib/tkextlib/iwidgets/setup.rb +9 -0
  231. data/lib/tkextlib/iwidgets/shell.rb +39 -0
  232. data/lib/tkextlib/iwidgets/spindate.rb +49 -0
  233. data/lib/tkextlib/iwidgets/spinint.rb +31 -0
  234. data/lib/tkextlib/iwidgets/spinner.rb +170 -0
  235. data/lib/tkextlib/iwidgets/spintime.rb +49 -0
  236. data/lib/tkextlib/iwidgets/tabnotebook.rb +182 -0
  237. data/lib/tkextlib/iwidgets/tabset.rb +146 -0
  238. data/lib/tkextlib/iwidgets/timeentry.rb +26 -0
  239. data/lib/tkextlib/iwidgets/timefield.rb +59 -0
  240. data/lib/tkextlib/iwidgets/toolbar.rb +113 -0
  241. data/lib/tkextlib/iwidgets/watch.rb +57 -0
  242. data/lib/tkextlib/pkg_checker.rb +185 -0
  243. data/lib/tkextlib/setup.rb +9 -0
  244. data/lib/tkextlib/tcllib.rb +106 -0
  245. data/lib/tkextlib/tcllib/README +135 -0
  246. data/lib/tkextlib/tcllib/autoscroll.rb +159 -0
  247. data/lib/tkextlib/tcllib/calendar.rb +56 -0
  248. data/lib/tkextlib/tcllib/canvas_sqmap.rb +37 -0
  249. data/lib/tkextlib/tcllib/canvas_zoom.rb +22 -0
  250. data/lib/tkextlib/tcllib/chatwidget.rb +152 -0
  251. data/lib/tkextlib/tcllib/crosshair.rb +118 -0
  252. data/lib/tkextlib/tcllib/ctext.rb +161 -0
  253. data/lib/tkextlib/tcllib/cursor.rb +98 -0
  254. data/lib/tkextlib/tcllib/dateentry.rb +63 -0
  255. data/lib/tkextlib/tcllib/datefield.rb +58 -0
  256. data/lib/tkextlib/tcllib/diagrams.rb +225 -0
  257. data/lib/tkextlib/tcllib/dialog.rb +85 -0
  258. data/lib/tkextlib/tcllib/getstring.rb +135 -0
  259. data/lib/tkextlib/tcllib/history.rb +74 -0
  260. data/lib/tkextlib/tcllib/ico.rb +147 -0
  261. data/lib/tkextlib/tcllib/ip_entry.rb +76 -0
  262. data/lib/tkextlib/tcllib/khim.rb +69 -0
  263. data/lib/tkextlib/tcllib/menuentry.rb +48 -0
  264. data/lib/tkextlib/tcllib/ntext.rb +147 -0
  265. data/lib/tkextlib/tcllib/panelframe.rb +79 -0
  266. data/lib/tkextlib/tcllib/plotchart.rb +1405 -0
  267. data/lib/tkextlib/tcllib/ruler.rb +66 -0
  268. data/lib/tkextlib/tcllib/screenruler.rb +69 -0
  269. data/lib/tkextlib/tcllib/scrolledwindow.rb +58 -0
  270. data/lib/tkextlib/tcllib/scrollwin.rb +62 -0
  271. data/lib/tkextlib/tcllib/setup.rb +9 -0
  272. data/lib/tkextlib/tcllib/statusbar.rb +80 -0
  273. data/lib/tkextlib/tcllib/style.rb +62 -0
  274. data/lib/tkextlib/tcllib/superframe.rb +52 -0
  275. data/lib/tkextlib/tcllib/swaplist.rb +151 -0
  276. data/lib/tkextlib/tcllib/tablelist.rb +29 -0
  277. data/lib/tkextlib/tcllib/tablelist_core.rb +1073 -0
  278. data/lib/tkextlib/tcllib/tablelist_tile.rb +44 -0
  279. data/lib/tkextlib/tcllib/tkpiechart.rb +315 -0
  280. data/lib/tkextlib/tcllib/toolbar.rb +176 -0
  281. data/lib/tkextlib/tcllib/tooltip.rb +105 -0
  282. data/lib/tkextlib/tcllib/validator.rb +66 -0
  283. data/lib/tkextlib/tcllib/widget.rb +83 -0
  284. data/lib/tkextlib/tclx.rb +14 -0
  285. data/lib/tkextlib/tclx/setup.rb +9 -0
  286. data/lib/tkextlib/tclx/tclx.rb +75 -0
  287. data/lib/tkextlib/tile.rb +450 -0
  288. data/lib/tkextlib/tile/dialog.rb +103 -0
  289. data/lib/tkextlib/tile/setup.rb +9 -0
  290. data/lib/tkextlib/tile/sizegrip.rb +33 -0
  291. data/lib/tkextlib/tile/style.rb +337 -0
  292. data/lib/tkextlib/tile/tbutton.rb +35 -0
  293. data/lib/tkextlib/tile/tcheckbutton.rb +39 -0
  294. data/lib/tkextlib/tile/tcombobox.rb +56 -0
  295. data/lib/tkextlib/tile/tentry.rb +50 -0
  296. data/lib/tkextlib/tile/tframe.rb +35 -0
  297. data/lib/tkextlib/tile/tlabel.rb +35 -0
  298. data/lib/tkextlib/tile/tlabelframe.rb +39 -0
  299. data/lib/tkextlib/tile/tmenubutton.rb +39 -0
  300. data/lib/tkextlib/tile/tnotebook.rb +148 -0
  301. data/lib/tkextlib/tile/tpaned.rb +246 -0
  302. data/lib/tkextlib/tile/tprogressbar.rb +58 -0
  303. data/lib/tkextlib/tile/tradiobutton.rb +39 -0
  304. data/lib/tkextlib/tile/treeview.rb +1337 -0
  305. data/lib/tkextlib/tile/tscale.rb +57 -0
  306. data/lib/tkextlib/tile/tscrollbar.rb +64 -0
  307. data/lib/tkextlib/tile/tseparator.rb +35 -0
  308. data/lib/tkextlib/tile/tspinbox.rb +108 -0
  309. data/lib/tkextlib/tile/tsquare.rb +31 -0
  310. data/lib/tkextlib/tkDND.rb +19 -0
  311. data/lib/tkextlib/tkDND/setup.rb +9 -0
  312. data/lib/tkextlib/tkDND/shape.rb +126 -0
  313. data/lib/tkextlib/tkDND/tkdnd.rb +183 -0
  314. data/lib/tkextlib/tkHTML.rb +14 -0
  315. data/lib/tkextlib/tkHTML/htmlwidget.rb +454 -0
  316. data/lib/tkextlib/tkHTML/setup.rb +9 -0
  317. data/lib/tkextlib/tkimg.rb +37 -0
  318. data/lib/tkextlib/tkimg/README +26 -0
  319. data/lib/tkextlib/tkimg/bmp.rb +34 -0
  320. data/lib/tkextlib/tkimg/dted.rb +34 -0
  321. data/lib/tkextlib/tkimg/gif.rb +34 -0
  322. data/lib/tkextlib/tkimg/ico.rb +34 -0
  323. data/lib/tkextlib/tkimg/jpeg.rb +34 -0
  324. data/lib/tkextlib/tkimg/pcx.rb +34 -0
  325. data/lib/tkextlib/tkimg/pixmap.rb +45 -0
  326. data/lib/tkextlib/tkimg/png.rb +34 -0
  327. data/lib/tkextlib/tkimg/ppm.rb +34 -0
  328. data/lib/tkextlib/tkimg/ps.rb +34 -0
  329. data/lib/tkextlib/tkimg/raw.rb +34 -0
  330. data/lib/tkextlib/tkimg/setup.rb +9 -0
  331. data/lib/tkextlib/tkimg/sgi.rb +34 -0
  332. data/lib/tkextlib/tkimg/sun.rb +34 -0
  333. data/lib/tkextlib/tkimg/tga.rb +34 -0
  334. data/lib/tkextlib/tkimg/tiff.rb +34 -0
  335. data/lib/tkextlib/tkimg/window.rb +34 -0
  336. data/lib/tkextlib/tkimg/xbm.rb +34 -0
  337. data/lib/tkextlib/tkimg/xpm.rb +34 -0
  338. data/lib/tkextlib/tktable.rb +15 -0
  339. data/lib/tkextlib/tktable/setup.rb +9 -0
  340. data/lib/tkextlib/tktable/tktable.rb +967 -0
  341. data/lib/tkextlib/tktrans.rb +15 -0
  342. data/lib/tkextlib/tktrans/setup.rb +9 -0
  343. data/lib/tkextlib/tktrans/tktrans.rb +65 -0
  344. data/lib/tkextlib/treectrl.rb +14 -0
  345. data/lib/tkextlib/treectrl/setup.rb +9 -0
  346. data/lib/tkextlib/treectrl/tktreectrl.rb +2523 -0
  347. data/lib/tkextlib/trofs.rb +14 -0
  348. data/lib/tkextlib/trofs/setup.rb +9 -0
  349. data/lib/tkextlib/trofs/trofs.rb +52 -0
  350. data/lib/tkextlib/version.rb +7 -0
  351. data/lib/tkextlib/vu.rb +49 -0
  352. data/lib/tkextlib/vu/bargraph.rb +62 -0
  353. data/lib/tkextlib/vu/charts.rb +54 -0
  354. data/lib/tkextlib/vu/dial.rb +103 -0
  355. data/lib/tkextlib/vu/pie.rb +287 -0
  356. data/lib/tkextlib/vu/setup.rb +9 -0
  357. data/lib/tkextlib/vu/spinbox.rb +23 -0
  358. data/lib/tkextlib/winico.rb +15 -0
  359. data/lib/tkextlib/winico/setup.rb +9 -0
  360. data/lib/tkextlib/winico/winico.rb +225 -0
  361. data/lib/tkfont.rb +5 -0
  362. data/lib/tkmacpkg.rb +5 -0
  363. data/lib/tkmenubar.rb +5 -0
  364. data/lib/tkmngfocus.rb +5 -0
  365. data/lib/tkpalette.rb +5 -0
  366. data/lib/tkscrollbox.rb +5 -0
  367. data/lib/tktext.rb +5 -0
  368. data/lib/tkvirtevent.rb +5 -0
  369. data/lib/tkwinpkg.rb +5 -0
  370. data/old-README.tcltklib.ja +159 -0
  371. data/sample/24hr_clock.rb +287 -0
  372. data/sample/binding_sample.rb +88 -0
  373. data/sample/bindtag_sample.rb +128 -0
  374. data/sample/binstr_usage.rb +46 -0
  375. data/sample/btn_with_frame.rb +21 -0
  376. data/sample/cd_timer.rb +82 -0
  377. data/sample/cmd_res_test.rb +18 -0
  378. data/sample/cmd_resource +5 -0
  379. data/sample/demos-en/ChangeLog +64 -0
  380. data/sample/demos-en/ChangeLog.prev +9 -0
  381. data/sample/demos-en/README +138 -0
  382. data/sample/demos-en/README.1st +18 -0
  383. data/sample/demos-en/README.tkencoding +29 -0
  384. data/sample/demos-en/anilabel.rb +175 -0
  385. data/sample/demos-en/aniwave.rb +119 -0
  386. data/sample/demos-en/arrow.rb +250 -0
  387. data/sample/demos-en/bind.rb +128 -0
  388. data/sample/demos-en/bitmap.rb +76 -0
  389. data/sample/demos-en/browse1 +63 -0
  390. data/sample/demos-en/browse2 +82 -0
  391. data/sample/demos-en/button.rb +85 -0
  392. data/sample/demos-en/check.rb +73 -0
  393. data/sample/demos-en/check2.rb +110 -0
  394. data/sample/demos-en/clrpick.rb +88 -0
  395. data/sample/demos-en/colors.rb +159 -0
  396. data/sample/demos-en/combo.rb +97 -0
  397. data/sample/demos-en/cscroll.rb +137 -0
  398. data/sample/demos-en/ctext.rb +208 -0
  399. data/sample/demos-en/dialog1.rb +39 -0
  400. data/sample/demos-en/dialog2.rb +42 -0
  401. data/sample/demos-en/doc.org/README +7 -0
  402. data/sample/demos-en/doc.org/README.JP +14 -0
  403. data/sample/demos-en/doc.org/README.tk80 +46 -0
  404. data/sample/demos-en/doc.org/license.terms +39 -0
  405. data/sample/demos-en/doc.org/license.terms.tk80 +39 -0
  406. data/sample/demos-en/entry1.rb +59 -0
  407. data/sample/demos-en/entry2.rb +94 -0
  408. data/sample/demos-en/entry3.rb +221 -0
  409. data/sample/demos-en/filebox.rb +103 -0
  410. data/sample/demos-en/floor.rb +1724 -0
  411. data/sample/demos-en/floor2.rb +1723 -0
  412. data/sample/demos-en/form.rb +65 -0
  413. data/sample/demos-en/goldberg.rb +2007 -0
  414. data/sample/demos-en/hello +14 -0
  415. data/sample/demos-en/hscale.rb +76 -0
  416. data/sample/demos-en/icon.rb +106 -0
  417. data/sample/demos-en/image1.rb +66 -0
  418. data/sample/demos-en/image2.rb +108 -0
  419. data/sample/demos-en/image3.rb +126 -0
  420. data/sample/demos-en/items.rb +382 -0
  421. data/sample/demos-en/ixset +333 -0
  422. data/sample/demos-en/ixset2 +367 -0
  423. data/sample/demos-en/knightstour.rb +272 -0
  424. data/sample/demos-en/label.rb +73 -0
  425. data/sample/demos-en/labelframe.rb +96 -0
  426. data/sample/demos-en/mclist.rb +118 -0
  427. data/sample/demos-en/menu.rb +197 -0
  428. data/sample/demos-en/menu84.rb +216 -0
  429. data/sample/demos-en/menubu.rb +238 -0
  430. data/sample/demos-en/msgbox.rb +91 -0
  431. data/sample/demos-en/msgbox2.rb +92 -0
  432. data/sample/demos-en/paned1.rb +48 -0
  433. data/sample/demos-en/paned2.rb +95 -0
  434. data/sample/demos-en/pendulum.rb +241 -0
  435. data/sample/demos-en/plot.rb +125 -0
  436. data/sample/demos-en/puzzle.rb +135 -0
  437. data/sample/demos-en/radio.rb +87 -0
  438. data/sample/demos-en/radio2.rb +110 -0
  439. data/sample/demos-en/radio3.rb +118 -0
  440. data/sample/demos-en/rmt +268 -0
  441. data/sample/demos-en/rolodex +320 -0
  442. data/sample/demos-en/ruler.rb +206 -0
  443. data/sample/demos-en/sayings.rb +107 -0
  444. data/sample/demos-en/search.rb +188 -0
  445. data/sample/demos-en/spin.rb +66 -0
  446. data/sample/demos-en/square +81 -0
  447. data/sample/demos-en/states.rb +81 -0
  448. data/sample/demos-en/style.rb +232 -0
  449. data/sample/demos-en/tcolor +526 -0
  450. data/sample/demos-en/text.rb +129 -0
  451. data/sample/demos-en/textpeer.rb +77 -0
  452. data/sample/demos-en/timer +136 -0
  453. data/sample/demos-en/tkencoding.rb +43 -0
  454. data/sample/demos-en/toolbar.rb +131 -0
  455. data/sample/demos-en/tree.rb +120 -0
  456. data/sample/demos-en/ttkbut.rb +140 -0
  457. data/sample/demos-en/ttkmenu.rb +86 -0
  458. data/sample/demos-en/ttknote.rb +90 -0
  459. data/sample/demos-en/ttkpane.rb +214 -0
  460. data/sample/demos-en/ttkprogress.rb +67 -0
  461. data/sample/demos-en/twind.rb +292 -0
  462. data/sample/demos-en/twind2.rb +385 -0
  463. data/sample/demos-en/unicodeout.rb +115 -0
  464. data/sample/demos-en/vscale.rb +80 -0
  465. data/sample/demos-en/widget +1087 -0
  466. data/sample/demos-jp/README +54 -0
  467. data/sample/demos-jp/README.1st +20 -0
  468. data/sample/demos-jp/anilabel.rb +178 -0
  469. data/sample/demos-jp/aniwave.rb +121 -0
  470. data/sample/demos-jp/arrow.rb +248 -0
  471. data/sample/demos-jp/bind.rb +126 -0
  472. data/sample/demos-jp/bitmap.rb +75 -0
  473. data/sample/demos-jp/browse1 +63 -0
  474. data/sample/demos-jp/browse2 +82 -0
  475. data/sample/demos-jp/button.rb +84 -0
  476. data/sample/demos-jp/check.rb +71 -0
  477. data/sample/demos-jp/check2.rb +111 -0
  478. data/sample/demos-jp/clrpick.rb +85 -0
  479. data/sample/demos-jp/colors.rb +156 -0
  480. data/sample/demos-jp/combo.rb +99 -0
  481. data/sample/demos-jp/cscroll.rb +135 -0
  482. data/sample/demos-jp/ctext.rb +205 -0
  483. data/sample/demos-jp/dialog1.rb +40 -0
  484. data/sample/demos-jp/dialog2.rb +44 -0
  485. data/sample/demos-jp/doc.org/README +7 -0
  486. data/sample/demos-jp/doc.org/README.JP +14 -0
  487. data/sample/demos-jp/doc.org/README.tk80 +46 -0
  488. data/sample/demos-jp/doc.org/license.terms +39 -0
  489. data/sample/demos-jp/doc.org/license.terms.tk80 +39 -0
  490. data/sample/demos-jp/entry1.rb +61 -0
  491. data/sample/demos-jp/entry2.rb +92 -0
  492. data/sample/demos-jp/entry3.rb +226 -0
  493. data/sample/demos-jp/filebox.rb +103 -0
  494. data/sample/demos-jp/floor.rb +1722 -0
  495. data/sample/demos-jp/floor2.rb +1720 -0
  496. data/sample/demos-jp/form.rb +67 -0
  497. data/sample/demos-jp/goldberg.rb +2012 -0
  498. data/sample/demos-jp/hello +10 -0
  499. data/sample/demos-jp/hscale.rb +79 -0
  500. data/sample/demos-jp/icon.rb +104 -0
  501. data/sample/demos-jp/image1.rb +65 -0
  502. data/sample/demos-jp/image2.rb +107 -0
  503. data/sample/demos-jp/image3.rb +128 -0
  504. data/sample/demos-jp/items.rb +380 -0
  505. data/sample/demos-jp/ixset +333 -0
  506. data/sample/demos-jp/ixset2 +369 -0
  507. data/sample/demos-jp/knightstour.rb +274 -0
  508. data/sample/demos-jp/label.rb +70 -0
  509. data/sample/demos-jp/labelframe.rb +103 -0
  510. data/sample/demos-jp/mclist.rb +122 -0
  511. data/sample/demos-jp/menu.rb +202 -0
  512. data/sample/demos-jp/menu84.rb +214 -0
  513. data/sample/demos-jp/menu8x.rb +234 -0
  514. data/sample/demos-jp/menubu.rb +239 -0
  515. data/sample/demos-jp/msgbox.rb +90 -0
  516. data/sample/demos-jp/msgbox2.rb +91 -0
  517. data/sample/demos-jp/paned1.rb +53 -0
  518. data/sample/demos-jp/paned2.rb +101 -0
  519. data/sample/demos-jp/pendulum.rb +243 -0
  520. data/sample/demos-jp/plot.rb +127 -0
  521. data/sample/demos-jp/puzzle.rb +132 -0
  522. data/sample/demos-jp/radio.rb +85 -0
  523. data/sample/demos-jp/radio2.rb +113 -0
  524. data/sample/demos-jp/radio3.rb +120 -0
  525. data/sample/demos-jp/rmt +268 -0
  526. data/sample/demos-jp/rolodex +320 -0
  527. data/sample/demos-jp/rolodex-j +300 -0
  528. data/sample/demos-jp/ruler.rb +204 -0
  529. data/sample/demos-jp/sayings.rb +104 -0
  530. data/sample/demos-jp/search.rb +185 -0
  531. data/sample/demos-jp/spin.rb +72 -0
  532. data/sample/demos-jp/square +81 -0
  533. data/sample/demos-jp/states.rb +75 -0
  534. data/sample/demos-jp/style.rb +271 -0
  535. data/sample/demos-jp/tcolor +534 -0
  536. data/sample/demos-jp/text.rb +121 -0
  537. data/sample/demos-jp/textpeer.rb +83 -0
  538. data/sample/demos-jp/timer +136 -0
  539. data/sample/demos-jp/toolbar.rb +137 -0
  540. data/sample/demos-jp/tree.rb +121 -0
  541. data/sample/demos-jp/ttkbut.rb +146 -0
  542. data/sample/demos-jp/ttkmenu.rb +92 -0
  543. data/sample/demos-jp/ttknote.rb +98 -0
  544. data/sample/demos-jp/ttkpane.rb +217 -0
  545. data/sample/demos-jp/ttkprogress.rb +72 -0
  546. data/sample/demos-jp/twind.rb +293 -0
  547. data/sample/demos-jp/twind2.rb +385 -0
  548. data/sample/demos-jp/unicodeout.rb +120 -0
  549. data/sample/demos-jp/vscale.rb +81 -0
  550. data/sample/demos-jp/widget +1122 -0
  551. data/sample/editable_listbox.rb +149 -0
  552. data/sample/encstr_usage.rb +31 -0
  553. data/sample/figmemo_sample.rb +457 -0
  554. data/sample/images/earth.gif +0 -0
  555. data/sample/images/earthris.gif +0 -0
  556. data/sample/images/face.xbm +173 -0
  557. data/sample/images/flagdown.xbm +27 -0
  558. data/sample/images/flagup.xbm +27 -0
  559. data/sample/images/gray25.xbm +6 -0
  560. data/sample/images/grey.25 +6 -0
  561. data/sample/images/grey.5 +6 -0
  562. data/sample/images/letters.xbm +27 -0
  563. data/sample/images/noletter.xbm +27 -0
  564. data/sample/images/pattern.xbm +6 -0
  565. data/sample/images/tcllogo.gif +0 -0
  566. data/sample/images/teapot.ppm +31 -0
  567. data/sample/irbtk.rb +31 -0
  568. data/sample/irbtkw.rbw +156 -0
  569. data/sample/iso2022-kr.txt +2 -0
  570. data/sample/menubar1.rb +52 -0
  571. data/sample/menubar2.rb +57 -0
  572. data/sample/menubar3.rb +73 -0
  573. data/sample/msgs_rb/README +3 -0
  574. data/sample/msgs_rb/cs.msg +84 -0
  575. data/sample/msgs_rb/de.msg +88 -0
  576. data/sample/msgs_rb/el.msg +98 -0
  577. data/sample/msgs_rb/en.msg +83 -0
  578. data/sample/msgs_rb/en_gb.msg +7 -0
  579. data/sample/msgs_rb/eo.msg +87 -0
  580. data/sample/msgs_rb/es.msg +84 -0
  581. data/sample/msgs_rb/fr.msg +84 -0
  582. data/sample/msgs_rb/it.msg +84 -0
  583. data/sample/msgs_rb/ja.msg +13 -0
  584. data/sample/msgs_rb/nl.msg +123 -0
  585. data/sample/msgs_rb/pl.msg +87 -0
  586. data/sample/msgs_rb/ru.msg +87 -0
  587. data/sample/msgs_rb2/README +5 -0
  588. data/sample/msgs_rb2/de.msg +88 -0
  589. data/sample/msgs_rb2/ja.msg +85 -0
  590. data/sample/msgs_tk/README +4 -0
  591. data/sample/msgs_tk/cs.msg +84 -0
  592. data/sample/msgs_tk/de.msg +88 -0
  593. data/sample/msgs_tk/el.msg +103 -0
  594. data/sample/msgs_tk/en.msg +83 -0
  595. data/sample/msgs_tk/en_gb.msg +7 -0
  596. data/sample/msgs_tk/eo.msg +87 -0
  597. data/sample/msgs_tk/es.msg +84 -0
  598. data/sample/msgs_tk/fr.msg +84 -0
  599. data/sample/msgs_tk/it.msg +84 -0
  600. data/sample/msgs_tk/ja.msg +13 -0
  601. data/sample/msgs_tk/license.terms +39 -0
  602. data/sample/msgs_tk/nl.msg +123 -0
  603. data/sample/msgs_tk/pl.msg +87 -0
  604. data/sample/msgs_tk/ru.msg +87 -0
  605. data/sample/multi-ip_sample.rb +104 -0
  606. data/sample/multi-ip_sample2.rb +30 -0
  607. data/sample/optobj_sample.rb +68 -0
  608. data/sample/propagate.rb +31 -0
  609. data/sample/remote-ip_sample.rb +34 -0
  610. data/sample/remote-ip_sample2.rb +57 -0
  611. data/sample/resource.en +13 -0
  612. data/sample/resource.ja +13 -0
  613. data/sample/safe-tk.rb +132 -0
  614. data/sample/scrollframe.rb +250 -0
  615. data/sample/tcltklib/batsu.gif +0 -0
  616. data/sample/tcltklib/lines0.tcl +42 -0
  617. data/sample/tcltklib/lines1.rb +51 -0
  618. data/sample/tcltklib/lines2.rb +55 -0
  619. data/sample/tcltklib/lines3.rb +55 -0
  620. data/sample/tcltklib/lines4.rb +55 -0
  621. data/sample/tcltklib/maru.gif +0 -0
  622. data/sample/tcltklib/safeTk.rb +23 -0
  623. data/sample/tcltklib/sample0.rb +40 -0
  624. data/sample/tcltklib/sample1.rb +635 -0
  625. data/sample/tcltklib/sample2.rb +452 -0
  626. data/sample/tkalignbox.rb +236 -0
  627. data/sample/tkballoonhelp.rb +221 -0
  628. data/sample/tkbiff.rb +156 -0
  629. data/sample/tkbrowse.rb +80 -0
  630. data/sample/tkcombobox.rb +498 -0
  631. data/sample/tkdialog.rb +62 -0
  632. data/sample/tkextlib/ICONS/Orig_LICENSE.txt +61 -0
  633. data/sample/tkextlib/ICONS/tkIcons +195 -0
  634. data/sample/tkextlib/ICONS/tkIcons-sample.kde +658 -0
  635. data/sample/tkextlib/ICONS/tkIcons.kde +195 -0
  636. data/sample/tkextlib/ICONS/viewIcons.rb +330 -0
  637. data/sample/tkextlib/blt/barchart5.rb +102 -0
  638. data/sample/tkextlib/blt/calendar.rb +118 -0
  639. data/sample/tkextlib/blt/graph6.rb +2223 -0
  640. data/sample/tkextlib/blt/graph7.rb +41 -0
  641. data/sample/tkextlib/blt/graph7a.rb +64 -0
  642. data/sample/tkextlib/blt/graph7b.rb +42 -0
  643. data/sample/tkextlib/blt/graph7c.rb +46 -0
  644. data/sample/tkextlib/blt/images/buckskin.gif +0 -0
  645. data/sample/tkextlib/blt/images/chalk.gif +0 -0
  646. data/sample/tkextlib/blt/images/qv100.t.gif +0 -0
  647. data/sample/tkextlib/blt/images/rain.gif +0 -0
  648. data/sample/tkextlib/blt/images/sample.gif +0 -0
  649. data/sample/tkextlib/blt/pareto.rb +91 -0
  650. data/sample/tkextlib/blt/plot1.rb +10 -0
  651. data/sample/tkextlib/blt/plot1b.rb +11 -0
  652. data/sample/tkextlib/blt/readme.txt +2 -0
  653. data/sample/tkextlib/blt/scripts/stipples.rb +157 -0
  654. data/sample/tkextlib/blt/winop1.rb +41 -0
  655. data/sample/tkextlib/blt/winop2.rb +29 -0
  656. data/sample/tkextlib/bwidget/Orig_LICENSE.txt +53 -0
  657. data/sample/tkextlib/bwidget/basic.rb +199 -0
  658. data/sample/tkextlib/bwidget/bwidget.xbm +46 -0
  659. data/sample/tkextlib/bwidget/demo.rb +244 -0
  660. data/sample/tkextlib/bwidget/dnd.rb +47 -0
  661. data/sample/tkextlib/bwidget/manager.rb +151 -0
  662. data/sample/tkextlib/bwidget/select.rb +83 -0
  663. data/sample/tkextlib/bwidget/tmpldlg.rb +222 -0
  664. data/sample/tkextlib/bwidget/tree.rb +290 -0
  665. data/sample/tkextlib/bwidget/x1.xbm +2258 -0
  666. data/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt +42 -0
  667. data/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm +14 -0
  668. data/sample/tkextlib/iwidgets/catalog_demo/images/clear.gif +0 -0
  669. data/sample/tkextlib/iwidgets/catalog_demo/images/close.gif +0 -0
  670. data/sample/tkextlib/iwidgets/catalog_demo/images/copy.gif +0 -0
  671. data/sample/tkextlib/iwidgets/catalog_demo/images/cut.gif +0 -0
  672. data/sample/tkextlib/iwidgets/catalog_demo/images/exit.gif +0 -0
  673. data/sample/tkextlib/iwidgets/catalog_demo/images/find.gif +0 -0
  674. data/sample/tkextlib/iwidgets/catalog_demo/images/help.gif +0 -0
  675. data/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm +14 -0
  676. data/sample/tkextlib/iwidgets/catalog_demo/images/mag.gif +0 -0
  677. data/sample/tkextlib/iwidgets/catalog_demo/images/new.gif +0 -0
  678. data/sample/tkextlib/iwidgets/catalog_demo/images/open.gif +0 -0
  679. data/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm +14 -0
  680. data/sample/tkextlib/iwidgets/catalog_demo/images/paste.gif +0 -0
  681. data/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm +14 -0
  682. data/sample/tkextlib/iwidgets/catalog_demo/images/poly.gif +0 -0
  683. data/sample/tkextlib/iwidgets/catalog_demo/images/print.gif +0 -0
  684. data/sample/tkextlib/iwidgets/catalog_demo/images/ruler.gif +0 -0
  685. data/sample/tkextlib/iwidgets/catalog_demo/images/save.gif +0 -0
  686. data/sample/tkextlib/iwidgets/catalog_demo/images/select.gif +0 -0
  687. data/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm +14 -0
  688. data/sample/tkextlib/iwidgets/sample/buttonbox.rb +23 -0
  689. data/sample/tkextlib/iwidgets/sample/calendar.rb +11 -0
  690. data/sample/tkextlib/iwidgets/sample/canvasprintbox.rb +9 -0
  691. data/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb +9 -0
  692. data/sample/tkextlib/iwidgets/sample/checkbox.rb +13 -0
  693. data/sample/tkextlib/iwidgets/sample/combobox.rb +33 -0
  694. data/sample/tkextlib/iwidgets/sample/dateentry.rb +8 -0
  695. data/sample/tkextlib/iwidgets/sample/datefield.rb +9 -0
  696. data/sample/tkextlib/iwidgets/sample/dialog.rb +21 -0
  697. data/sample/tkextlib/iwidgets/sample/dialogshell.rb +15 -0
  698. data/sample/tkextlib/iwidgets/sample/disjointlistbox.rb +17 -0
  699. data/sample/tkextlib/iwidgets/sample/entryfield-1.rb +40 -0
  700. data/sample/tkextlib/iwidgets/sample/entryfield-2.rb +45 -0
  701. data/sample/tkextlib/iwidgets/sample/entryfield-3.rb +41 -0
  702. data/sample/tkextlib/iwidgets/sample/extbutton.rb +21 -0
  703. data/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb +9 -0
  704. data/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb +30 -0
  705. data/sample/tkextlib/iwidgets/sample/feedback.rb +11 -0
  706. data/sample/tkextlib/iwidgets/sample/fileselectionbox.rb +9 -0
  707. data/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb +29 -0
  708. data/sample/tkextlib/iwidgets/sample/finddialog.rb +16 -0
  709. data/sample/tkextlib/iwidgets/sample/hierarchy.rb +26 -0
  710. data/sample/tkextlib/iwidgets/sample/hyperhelp.rb +15 -0
  711. data/sample/tkextlib/iwidgets/sample/labeledframe.rb +15 -0
  712. data/sample/tkextlib/iwidgets/sample/labeledwidget.rb +14 -0
  713. data/sample/tkextlib/iwidgets/sample/mainwindow.rb +65 -0
  714. data/sample/tkextlib/iwidgets/sample/menubar.rb +125 -0
  715. data/sample/tkextlib/iwidgets/sample/menubar2.rb +45 -0
  716. data/sample/tkextlib/iwidgets/sample/messagebox1.rb +20 -0
  717. data/sample/tkextlib/iwidgets/sample/messagebox2.rb +20 -0
  718. data/sample/tkextlib/iwidgets/sample/messagedialog.rb +45 -0
  719. data/sample/tkextlib/iwidgets/sample/notebook.rb +31 -0
  720. data/sample/tkextlib/iwidgets/sample/notebook2.rb +31 -0
  721. data/sample/tkextlib/iwidgets/sample/optionmenu.rb +15 -0
  722. data/sample/tkextlib/iwidgets/sample/panedwindow.rb +23 -0
  723. data/sample/tkextlib/iwidgets/sample/panedwindow2.rb +23 -0
  724. data/sample/tkextlib/iwidgets/sample/promptdialog.rb +18 -0
  725. data/sample/tkextlib/iwidgets/sample/pushbutton.rb +10 -0
  726. data/sample/tkextlib/iwidgets/sample/radiobox.rb +14 -0
  727. data/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb +14 -0
  728. data/sample/tkextlib/iwidgets/sample/scrolledframe.rb +19 -0
  729. data/sample/tkextlib/iwidgets/sample/scrolledhtml.rb +16 -0
  730. data/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb +23 -0
  731. data/sample/tkextlib/iwidgets/sample/scrolledtext.rb +12 -0
  732. data/sample/tkextlib/iwidgets/sample/selectionbox.rb +20 -0
  733. data/sample/tkextlib/iwidgets/sample/selectiondialog.rb +13 -0
  734. data/sample/tkextlib/iwidgets/sample/shell.rb +18 -0
  735. data/sample/tkextlib/iwidgets/sample/spindate.rb +8 -0
  736. data/sample/tkextlib/iwidgets/sample/spinint.rb +11 -0
  737. data/sample/tkextlib/iwidgets/sample/spinner.rb +34 -0
  738. data/sample/tkextlib/iwidgets/sample/spintime.rb +8 -0
  739. data/sample/tkextlib/iwidgets/sample/tabnotebook.rb +27 -0
  740. data/sample/tkextlib/iwidgets/sample/tabnotebook2.rb +31 -0
  741. data/sample/tkextlib/iwidgets/sample/tabset.rb +35 -0
  742. data/sample/tkextlib/iwidgets/sample/timeentry.rb +8 -0
  743. data/sample/tkextlib/iwidgets/sample/timefield.rb +9 -0
  744. data/sample/tkextlib/iwidgets/sample/toolbar.rb +153 -0
  745. data/sample/tkextlib/iwidgets/sample/watch.rb +19 -0
  746. data/sample/tkextlib/tcllib/Orig_LICENSE.txt +46 -0
  747. data/sample/tkextlib/tcllib/datefield.rb +30 -0
  748. data/sample/tkextlib/tcllib/plotdemos1.rb +159 -0
  749. data/sample/tkextlib/tcllib/plotdemos2.rb +72 -0
  750. data/sample/tkextlib/tcllib/plotdemos3.rb +84 -0
  751. data/sample/tkextlib/tcllib/xyplot.rb +18 -0
  752. data/sample/tkextlib/tile/Orig_LICENSE.txt +30 -0
  753. data/sample/tkextlib/tile/demo.rb +984 -0
  754. data/sample/tkextlib/tile/iconlib.tcl +110 -0
  755. data/sample/tkextlib/tile/readme.txt +2 -0
  756. data/sample/tkextlib/tile/repeater.tcl +117 -0
  757. data/sample/tkextlib/tile/themes/blue/blue.tcl +149 -0
  758. data/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif +0 -0
  759. data/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif +0 -0
  760. data/sample/tkextlib/tile/themes/blue/blue/arrowdown.gif +0 -0
  761. data/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif +0 -0
  762. data/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif +0 -0
  763. data/sample/tkextlib/tile/themes/blue/blue/arrowleft.gif +0 -0
  764. data/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gif +0 -0
  765. data/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gif +0 -0
  766. data/sample/tkextlib/tile/themes/blue/blue/arrowright.gif +0 -0
  767. data/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gif +0 -0
  768. data/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif +0 -0
  769. data/sample/tkextlib/tile/themes/blue/blue/arrowup.gif +0 -0
  770. data/sample/tkextlib/tile/themes/blue/blue/button-h.gif +0 -0
  771. data/sample/tkextlib/tile/themes/blue/blue/button-n.gif +0 -0
  772. data/sample/tkextlib/tile/themes/blue/blue/button-n.xcf +0 -0
  773. data/sample/tkextlib/tile/themes/blue/blue/button-p.gif +0 -0
  774. data/sample/tkextlib/tile/themes/blue/blue/check-hc.gif +0 -0
  775. data/sample/tkextlib/tile/themes/blue/blue/check-hu.gif +0 -0
  776. data/sample/tkextlib/tile/themes/blue/blue/check-nc.gif +0 -0
  777. data/sample/tkextlib/tile/themes/blue/blue/check-nu.gif +0 -0
  778. data/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif +0 -0
  779. data/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif +0 -0
  780. data/sample/tkextlib/tile/themes/blue/blue/radio-nc.gif +0 -0
  781. data/sample/tkextlib/tile/themes/blue/blue/radio-nu.gif +0 -0
  782. data/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gif +0 -0
  783. data/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif +0 -0
  784. data/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif +0 -0
  785. data/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif +0 -0
  786. data/sample/tkextlib/tile/themes/blue/blue/slider-p.gif +0 -0
  787. data/sample/tkextlib/tile/themes/blue/blue/slider.gif +0 -0
  788. data/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif +0 -0
  789. data/sample/tkextlib/tile/themes/blue/blue/vslider.gif +0 -0
  790. data/sample/tkextlib/tile/themes/blue/pkgIndex.tcl +6 -0
  791. data/sample/tkextlib/tile/themes/keramik/keramik.tcl +194 -0
  792. data/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif +0 -0
  793. data/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif +0 -0
  794. data/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif +0 -0
  795. data/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif +0 -0
  796. data/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif +0 -0
  797. data/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif +0 -0
  798. data/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif +0 -0
  799. data/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif +0 -0
  800. data/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif +0 -0
  801. data/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif +0 -0
  802. data/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif +0 -0
  803. data/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif +0 -0
  804. data/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif +0 -0
  805. data/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif +0 -0
  806. data/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif +0 -0
  807. data/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif +0 -0
  808. data/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif +0 -0
  809. data/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif +0 -0
  810. data/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif +0 -0
  811. data/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif +0 -0
  812. data/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif +0 -0
  813. data/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif +0 -0
  814. data/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif +0 -0
  815. data/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif +0 -0
  816. data/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif +0 -0
  817. data/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif +0 -0
  818. data/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif +0 -0
  819. data/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif +0 -0
  820. data/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif +0 -0
  821. data/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif +0 -0
  822. data/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif +0 -0
  823. data/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif +0 -0
  824. data/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl +15 -0
  825. data/sample/tkextlib/tile/themes/kroc.rb +227 -0
  826. data/sample/tkextlib/tile/themes/kroc/kroc.tcl +163 -0
  827. data/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif +0 -0
  828. data/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif +0 -0
  829. data/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif +0 -0
  830. data/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif +0 -0
  831. data/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif +0 -0
  832. data/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif +0 -0
  833. data/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif +0 -0
  834. data/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif +0 -0
  835. data/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif +0 -0
  836. data/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif +0 -0
  837. data/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif +0 -0
  838. data/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl +15 -0
  839. data/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl +16 -0
  840. data/sample/tkextlib/tile/themes/plastik/plastik.tcl +125 -0
  841. data/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif +0 -0
  842. data/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gif +0 -0
  843. data/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif +0 -0
  844. data/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gif +0 -0
  845. data/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif +0 -0
  846. data/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif +0 -0
  847. data/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gif +0 -0
  848. data/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif +0 -0
  849. data/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif +0 -0
  850. data/sample/tkextlib/tile/themes/plastik/plastik/button-n.gif +0 -0
  851. data/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif +0 -0
  852. data/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gif +0 -0
  853. data/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif +0 -0
  854. data/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif +0 -0
  855. data/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif +0 -0
  856. data/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif +0 -0
  857. data/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif +0 -0
  858. data/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gif +0 -0
  859. data/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif +0 -0
  860. data/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif +0 -0
  861. data/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif +0 -0
  862. data/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gif +0 -0
  863. data/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif +0 -0
  864. data/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif +0 -0
  865. data/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gif +0 -0
  866. data/sample/tkextlib/tile/toolbutton.tcl +152 -0
  867. data/sample/tkextlib/tkHTML/Orig_COPYRIGHT.txt +12 -0
  868. data/sample/tkextlib/tkHTML/README +12 -0
  869. data/sample/tkextlib/tkHTML/hv.rb +314 -0
  870. data/sample/tkextlib/tkHTML/page1/image1 +0 -0
  871. data/sample/tkextlib/tkHTML/page1/image10 +0 -0
  872. data/sample/tkextlib/tkHTML/page1/image11 +0 -0
  873. data/sample/tkextlib/tkHTML/page1/image12 +0 -0
  874. data/sample/tkextlib/tkHTML/page1/image13 +0 -0
  875. data/sample/tkextlib/tkHTML/page1/image14 +0 -0
  876. data/sample/tkextlib/tkHTML/page1/image2 +0 -0
  877. data/sample/tkextlib/tkHTML/page1/image3 +0 -0
  878. data/sample/tkextlib/tkHTML/page1/image4 +0 -0
  879. data/sample/tkextlib/tkHTML/page1/image5 +0 -0
  880. data/sample/tkextlib/tkHTML/page1/image6 +0 -0
  881. data/sample/tkextlib/tkHTML/page1/image7 +0 -0
  882. data/sample/tkextlib/tkHTML/page1/image8 +0 -0
  883. data/sample/tkextlib/tkHTML/page1/image9 +0 -0
  884. data/sample/tkextlib/tkHTML/page1/index.html +115 -0
  885. data/sample/tkextlib/tkHTML/page2/image1 +0 -0
  886. data/sample/tkextlib/tkHTML/page2/image10 +0 -0
  887. data/sample/tkextlib/tkHTML/page2/image11 +0 -0
  888. data/sample/tkextlib/tkHTML/page2/image12 +0 -0
  889. data/sample/tkextlib/tkHTML/page2/image13 +0 -0
  890. data/sample/tkextlib/tkHTML/page2/image14 +0 -0
  891. data/sample/tkextlib/tkHTML/page2/image15 +0 -0
  892. data/sample/tkextlib/tkHTML/page2/image16 +0 -0
  893. data/sample/tkextlib/tkHTML/page2/image17 +0 -0
  894. data/sample/tkextlib/tkHTML/page2/image18 +0 -0
  895. data/sample/tkextlib/tkHTML/page2/image19 +0 -0
  896. data/sample/tkextlib/tkHTML/page2/image2 +0 -0
  897. data/sample/tkextlib/tkHTML/page2/image20 +0 -0
  898. data/sample/tkextlib/tkHTML/page2/image21 +0 -0
  899. data/sample/tkextlib/tkHTML/page2/image22 +0 -0
  900. data/sample/tkextlib/tkHTML/page2/image23 +0 -0
  901. data/sample/tkextlib/tkHTML/page2/image24 +0 -0
  902. data/sample/tkextlib/tkHTML/page2/image25 +0 -0
  903. data/sample/tkextlib/tkHTML/page2/image26 +0 -0
  904. data/sample/tkextlib/tkHTML/page2/image27 +0 -0
  905. data/sample/tkextlib/tkHTML/page2/image28 +0 -0
  906. data/sample/tkextlib/tkHTML/page2/image29 +0 -0
  907. data/sample/tkextlib/tkHTML/page2/image3 +0 -0
  908. data/sample/tkextlib/tkHTML/page2/image30 +0 -0
  909. data/sample/tkextlib/tkHTML/page2/image31 +0 -0
  910. data/sample/tkextlib/tkHTML/page2/image32 +0 -0
  911. data/sample/tkextlib/tkHTML/page2/image33 +0 -0
  912. data/sample/tkextlib/tkHTML/page2/image34 +0 -0
  913. data/sample/tkextlib/tkHTML/page2/image35 +0 -0
  914. data/sample/tkextlib/tkHTML/page2/image36 +0 -0
  915. data/sample/tkextlib/tkHTML/page2/image37 +0 -0
  916. data/sample/tkextlib/tkHTML/page2/image38 +0 -0
  917. data/sample/tkextlib/tkHTML/page2/image39 +0 -0
  918. data/sample/tkextlib/tkHTML/page2/image4 +0 -0
  919. data/sample/tkextlib/tkHTML/page2/image5 +0 -0
  920. data/sample/tkextlib/tkHTML/page2/image6 +0 -0
  921. data/sample/tkextlib/tkHTML/page2/image7 +0 -0
  922. data/sample/tkextlib/tkHTML/page2/image8 +0 -0
  923. data/sample/tkextlib/tkHTML/page2/image9 +0 -0
  924. data/sample/tkextlib/tkHTML/page2/index.html +433 -0
  925. data/sample/tkextlib/tkHTML/page3/image1 +0 -0
  926. data/sample/tkextlib/tkHTML/page3/image10 +0 -0
  927. data/sample/tkextlib/tkHTML/page3/image11 +0 -0
  928. data/sample/tkextlib/tkHTML/page3/image12 +0 -0
  929. data/sample/tkextlib/tkHTML/page3/image13 +0 -0
  930. data/sample/tkextlib/tkHTML/page3/image14 +0 -0
  931. data/sample/tkextlib/tkHTML/page3/image2 +0 -0
  932. data/sample/tkextlib/tkHTML/page3/image3 +0 -0
  933. data/sample/tkextlib/tkHTML/page3/image4 +0 -0
  934. data/sample/tkextlib/tkHTML/page3/image5 +0 -0
  935. data/sample/tkextlib/tkHTML/page3/image6 +0 -0
  936. data/sample/tkextlib/tkHTML/page3/image7 +0 -0
  937. data/sample/tkextlib/tkHTML/page3/image8 +0 -0
  938. data/sample/tkextlib/tkHTML/page3/image9 +0 -0
  939. data/sample/tkextlib/tkHTML/page3/index.html +2787 -0
  940. data/sample/tkextlib/tkHTML/page4/image1 +0 -0
  941. data/sample/tkextlib/tkHTML/page4/image2 +0 -0
  942. data/sample/tkextlib/tkHTML/page4/image3 +0 -0
  943. data/sample/tkextlib/tkHTML/page4/image4 +0 -0
  944. data/sample/tkextlib/tkHTML/page4/image5 +0 -0
  945. data/sample/tkextlib/tkHTML/page4/image6 +0 -0
  946. data/sample/tkextlib/tkHTML/page4/image7 +0 -0
  947. data/sample/tkextlib/tkHTML/page4/image8 +0 -0
  948. data/sample/tkextlib/tkHTML/page4/image9 +0 -0
  949. data/sample/tkextlib/tkHTML/page4/index.html +768 -0
  950. data/sample/tkextlib/tkHTML/ss.rb +437 -0
  951. data/sample/tkextlib/tkimg/demo.rb +1479 -0
  952. data/sample/tkextlib/tkimg/license_terms_of_Img_extension +41 -0
  953. data/sample/tkextlib/tkimg/readme.txt +3 -0
  954. data/sample/tkextlib/tktable/Orig_LICENSE.txt +52 -0
  955. data/sample/tkextlib/tktable/basic.rb +61 -0
  956. data/sample/tkextlib/tktable/buttons.rb +77 -0
  957. data/sample/tkextlib/tktable/command.rb +90 -0
  958. data/sample/tkextlib/tktable/debug.rb +102 -0
  959. data/sample/tkextlib/tktable/dynarows.rb +100 -0
  960. data/sample/tkextlib/tktable/maxsize.rb +68 -0
  961. data/sample/tkextlib/tktable/spreadsheet.rb +138 -0
  962. data/sample/tkextlib/tktable/tcllogo.gif +0 -0
  963. data/sample/tkextlib/tktable/valid.rb +89 -0
  964. data/sample/tkextlib/treectrl/bitmaps.rb +77 -0
  965. data/sample/tkextlib/treectrl/demo.rb +1306 -0
  966. data/sample/tkextlib/treectrl/explorer.rb +431 -0
  967. data/sample/tkextlib/treectrl/help.rb +405 -0
  968. data/sample/tkextlib/treectrl/imovie.rb +131 -0
  969. data/sample/tkextlib/treectrl/layout.rb +160 -0
  970. data/sample/tkextlib/treectrl/mailwasher.rb +270 -0
  971. data/sample/tkextlib/treectrl/outlook-folders.rb +125 -0
  972. data/sample/tkextlib/treectrl/outlook-newgroup.rb +449 -0
  973. data/sample/tkextlib/treectrl/pics/big-dll.gif +0 -0
  974. data/sample/tkextlib/treectrl/pics/big-exe.gif +0 -0
  975. data/sample/tkextlib/treectrl/pics/big-file.gif +0 -0
  976. data/sample/tkextlib/treectrl/pics/big-folder.gif +0 -0
  977. data/sample/tkextlib/treectrl/pics/big-txt.gif +0 -0
  978. data/sample/tkextlib/treectrl/pics/checked.gif +0 -0
  979. data/sample/tkextlib/treectrl/pics/file.gif +0 -0
  980. data/sample/tkextlib/treectrl/pics/folder-closed.gif +0 -0
  981. data/sample/tkextlib/treectrl/pics/folder-open.gif +0 -0
  982. data/sample/tkextlib/treectrl/pics/help-book-closed.gif +0 -0
  983. data/sample/tkextlib/treectrl/pics/help-book-open.gif +0 -0
  984. data/sample/tkextlib/treectrl/pics/help-page.gif +0 -0
  985. data/sample/tkextlib/treectrl/pics/imovie-01.gif +0 -0
  986. data/sample/tkextlib/treectrl/pics/imovie-02.gif +0 -0
  987. data/sample/tkextlib/treectrl/pics/imovie-03.gif +0 -0
  988. data/sample/tkextlib/treectrl/pics/imovie-04.gif +0 -0
  989. data/sample/tkextlib/treectrl/pics/imovie-05.gif +0 -0
  990. data/sample/tkextlib/treectrl/pics/imovie-06.gif +0 -0
  991. data/sample/tkextlib/treectrl/pics/imovie-07.gif +0 -0
  992. data/sample/tkextlib/treectrl/pics/internet-check-off.gif +0 -0
  993. data/sample/tkextlib/treectrl/pics/internet-check-on.gif +0 -0
  994. data/sample/tkextlib/treectrl/pics/internet-print.gif +0 -0
  995. data/sample/tkextlib/treectrl/pics/internet-radio-off.gif +0 -0
  996. data/sample/tkextlib/treectrl/pics/internet-radio-on.gif +0 -0
  997. data/sample/tkextlib/treectrl/pics/internet-search.gif +0 -0
  998. data/sample/tkextlib/treectrl/pics/internet-security.gif +0 -0
  999. data/sample/tkextlib/treectrl/pics/mac-collapse.gif +0 -0
  1000. data/sample/tkextlib/treectrl/pics/mac-expand.gif +0 -0
  1001. data/sample/tkextlib/treectrl/pics/outlook-arrow.gif +0 -0
  1002. data/sample/tkextlib/treectrl/pics/outlook-clip.gif +0 -0
  1003. data/sample/tkextlib/treectrl/pics/outlook-deleted.gif +0 -0
  1004. data/sample/tkextlib/treectrl/pics/outlook-draft.gif +0 -0
  1005. data/sample/tkextlib/treectrl/pics/outlook-folder.gif +0 -0
  1006. data/sample/tkextlib/treectrl/pics/outlook-group.gif +0 -0
  1007. data/sample/tkextlib/treectrl/pics/outlook-inbox.gif +0 -0
  1008. data/sample/tkextlib/treectrl/pics/outlook-local.gif +0 -0
  1009. data/sample/tkextlib/treectrl/pics/outlook-main.gif +0 -0
  1010. data/sample/tkextlib/treectrl/pics/outlook-outbox.gif +0 -0
  1011. data/sample/tkextlib/treectrl/pics/outlook-read-2.gif +0 -0
  1012. data/sample/tkextlib/treectrl/pics/outlook-read.gif +0 -0
  1013. data/sample/tkextlib/treectrl/pics/outlook-sent.gif +0 -0
  1014. data/sample/tkextlib/treectrl/pics/outlook-server.gif +0 -0
  1015. data/sample/tkextlib/treectrl/pics/outlook-unread.gif +0 -0
  1016. data/sample/tkextlib/treectrl/pics/outlook-watch.gif +0 -0
  1017. data/sample/tkextlib/treectrl/pics/sky.gif +0 -0
  1018. data/sample/tkextlib/treectrl/pics/small-dll.gif +0 -0
  1019. data/sample/tkextlib/treectrl/pics/small-exe.gif +0 -0
  1020. data/sample/tkextlib/treectrl/pics/small-file.gif +0 -0
  1021. data/sample/tkextlib/treectrl/pics/small-folder.gif +0 -0
  1022. data/sample/tkextlib/treectrl/pics/small-txt.gif +0 -0
  1023. data/sample/tkextlib/treectrl/pics/unchecked.gif +0 -0
  1024. data/sample/tkextlib/treectrl/random.rb +509 -0
  1025. data/sample/tkextlib/treectrl/readme.txt +2 -0
  1026. data/sample/tkextlib/treectrl/www-options.rb +304 -0
  1027. data/sample/tkextlib/vu/Orig_LICENSE.txt +51 -0
  1028. data/sample/tkextlib/vu/README.txt +50 -0
  1029. data/sample/tkextlib/vu/canvItems.rb +91 -0
  1030. data/sample/tkextlib/vu/canvSticker.rb +83 -0
  1031. data/sample/tkextlib/vu/canvSticker2.rb +102 -0
  1032. data/sample/tkextlib/vu/dial_demo.rb +114 -0
  1033. data/sample/tkextlib/vu/m128_000.xbm +174 -0
  1034. data/sample/tkextlib/vu/oscilloscope.rb +69 -0
  1035. data/sample/tkextlib/vu/pie.rb +57 -0
  1036. data/sample/tkextlib/vu/vu_demo.rb +68 -0
  1037. data/sample/tkfrom.rb +133 -0
  1038. data/sample/tkhello.rb +11 -0
  1039. data/sample/tkline.rb +48 -0
  1040. data/sample/tkmenubutton.rb +136 -0
  1041. data/sample/tkmsgcat-load_rb.rb +103 -0
  1042. data/sample/tkmsgcat-load_rb2.rb +103 -0
  1043. data/sample/tkmsgcat-load_tk.rb +119 -0
  1044. data/sample/tkmulticolumnlist.rb +744 -0
  1045. data/sample/tkmultilistbox.rb +655 -0
  1046. data/sample/tkmultilistframe.rb +941 -0
  1047. data/sample/tkoptdb-safeTk.rb +74 -0
  1048. data/sample/tkoptdb.rb +107 -0
  1049. data/sample/tkrttimer.rb +78 -0
  1050. data/sample/tksleep_sample.rb +30 -0
  1051. data/sample/tktextframe.rb +282 -0
  1052. data/sample/tktextio.rb +1061 -0
  1053. data/sample/tktimer.rb +51 -0
  1054. data/sample/tktimer2.rb +48 -0
  1055. data/sample/tktimer3.rb +60 -0
  1056. data/sample/tktree.rb +104 -0
  1057. data/sample/tktree.tcl +305 -0
  1058. data/sample/ttk_wrapper.rb +155 -0
  1059. data/tk.gemspec +24 -0
  1060. metadata +1144 -0
@@ -0,0 +1,2219 @@
1
+ # frozen_string_literal: false
2
+ #
3
+ # tkextlib/blt/component.rb
4
+ # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
5
+ #
6
+
7
+ require 'tk'
8
+ require 'tkextlib/blt.rb'
9
+
10
+ module Tk::BLT
11
+ module PlotComponent
12
+ include TkItemConfigMethod
13
+
14
+ module OptKeys
15
+ def __item_font_optkeys(id)
16
+ ['font', 'tickfont', 'titlefont']
17
+ end
18
+ private :__item_font_optkeys
19
+
20
+ def __item_numstrval_optkeys(id)
21
+ ['xoffset', 'yoffset']
22
+ end
23
+ private :__item_numstrval_optkeys
24
+
25
+ def __item_boolval_optkeys(id)
26
+ ['hide', 'under', 'descending', 'logscale', 'loose', 'showticks',
27
+ 'titlealternate', 'scalesymbols', 'minor', 'raised',
28
+ 'center', 'decoration', 'landscape', 'maxpect']
29
+ end
30
+ private :__item_boolval_optkeys
31
+
32
+ def __item_strval_optkeys(id)
33
+ ['text', 'label', 'limits', 'title',
34
+ 'show', 'file', 'maskdata', 'maskfile',
35
+ 'color', 'titlecolor', 'fill', 'outline', 'offdash']
36
+ end
37
+ private :__item_strval_optkeys
38
+
39
+ def __item_listval_optkeys(id)
40
+ ['bindtags']
41
+ end
42
+ private :__item_listval_optkeys
43
+
44
+ def __item_numlistval_optkeys(id)
45
+ ['dashes', 'majorticks', 'minorticks']
46
+ end
47
+ private :__item_numlistval_optkeys
48
+
49
+ def __item_tkvariable_optkeys(id)
50
+ ['variable', 'textvariable', 'colormap', 'fontmap']
51
+ end
52
+ private :__item_tkvariable_optkeys
53
+ end
54
+
55
+ include OptKeys
56
+
57
+ def __item_cget_cmd(id)
58
+ if id.kind_of?(Array)
59
+ # id := [ type, name ]
60
+ [self.path, id[0], 'cget', id[1]]
61
+ else
62
+ [self.path, id, 'cget']
63
+ end
64
+ end
65
+ private :__item_cget_cmd
66
+
67
+ def __item_config_cmd(id)
68
+ if id.kind_of?(Array)
69
+ # id := [ type, name, ... ]
70
+ type, *names = id
71
+ [self.path, type, 'configure'].concat(names)
72
+ else
73
+ [self.path, id, 'configure']
74
+ end
75
+ end
76
+ private :__item_config_cmd
77
+
78
+ def __item_pathname(id)
79
+ if id.kind_of?(Array)
80
+ id = tagid(id[1])
81
+ end
82
+ [self.path, id].join(';')
83
+ end
84
+ private :__item_pathname
85
+
86
+ def axis_cget_tkstring(id, option)
87
+ ret = itemcget_tkstring(['axis', tagid(id)], option)
88
+ end
89
+ def axis_cget(id, option)
90
+ ret = itemcget(['axis', tagid(id)], option)
91
+ end
92
+ def axis_cget_strict(id, option)
93
+ ret = itemcget_strict(['axis', tagid(id)], option)
94
+ end
95
+ def axis_configure(*args)
96
+ slot = args.pop
97
+ if slot.kind_of?(Hash)
98
+ value = None
99
+ slot = _symbolkey2str(slot)
100
+ if cmd = slot.delete('command')
101
+ slot['command'] = proc{|w, tick|
102
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
103
+ }
104
+ end
105
+ else
106
+ value = slot
107
+ slot = args.pop
108
+ if slot == :command || slot == 'command'
109
+ cmd = value
110
+ value = proc{|w, tick|
111
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
112
+ }
113
+ end
114
+ end
115
+ id_list = args.flatten.collect!{|id| tagid(id)}.unshift('axis')
116
+ itemconfigure(id_list, slot, value)
117
+ end
118
+ def axis_configinfo(id, slot=nil)
119
+ itemconfiginfo(['axis', tagid(id)], slot)
120
+ end
121
+ def current_axis_configinfo(id, slot=nil)
122
+ current_itemconfiginfo(['axis', tagid(id)], slot)
123
+ end
124
+
125
+ def crosshairs_cget_tkstring(option)
126
+ itemcget_tkstring('crosshairs', option)
127
+ end
128
+ def crosshairs_cget(option)
129
+ itemcget('crosshairs', option)
130
+ end
131
+ def crosshairs_cget_strict(option)
132
+ itemcget_strict('crosshairs', option)
133
+ end
134
+ def crosshairs_configure(slot, value=None)
135
+ itemconfigure('crosshairs', slot, value)
136
+ end
137
+ def crosshairs_configinfo(slot=nil)
138
+ itemconfiginfo('crosshairs', slot)
139
+ end
140
+ def current_crosshairs_configinfo(slot=nil)
141
+ current_itemconfiginfo('crosshairs', slot)
142
+ end
143
+
144
+ def element_cget_tkstring(id, option)
145
+ itemcget_tkstring(['element', tagid(id)], option)
146
+ end
147
+ def element_cget(id, option)
148
+ itemcget(['element', tagid(id)], option)
149
+ end
150
+ def element_cget_strict(id, option)
151
+ itemcget_strict(['element', tagid(id)], option)
152
+ end
153
+ def element_configure(*args)
154
+ slot = args.pop
155
+ if slot.kind_of?(Hash)
156
+ value = None
157
+ else
158
+ value = slot
159
+ slot = args.pop
160
+ end
161
+ id_list = args.flatten.collect!{|id| tagid(id)}.unshift('element')
162
+ itemconfigure(id_list, slot, value)
163
+ end
164
+ def element_configinfo(id, slot=nil)
165
+ itemconfiginfo(['element', tagid(id)], slot)
166
+ end
167
+ def current_element_configinfo(id, slot=nil)
168
+ current_itemconfiginfo(['element', tagid(id)], slot)
169
+ end
170
+
171
+ def bar_cget_tkstring(id, option)
172
+ itemcget_tkstring(['bar', tagid(id)], option)
173
+ end
174
+ def bar_cget(id, option)
175
+ itemcget(['bar', tagid(id)], option)
176
+ end
177
+ def bar_cget_strict(id, option)
178
+ itemcget_strict(['bar', tagid(id)], option)
179
+ end
180
+ def bar_configure(*args)
181
+ slot = args.pop
182
+ if slot.kind_of?(Hash)
183
+ value = None
184
+ else
185
+ value = slot
186
+ slot = args.pop
187
+ end
188
+ id_list = args.flatten.collect!{|id| tagid(id)}.unshift('bar')
189
+ itemconfigure(id_list, slot, value)
190
+ end
191
+ def bar_configinfo(id, slot=nil)
192
+ itemconfiginfo(['bar', tagid(id)], slot)
193
+ end
194
+ def current_bar_configinfo(id, slot=nil)
195
+ current_itemconfiginfo(['bar', tagid(id)], slot)
196
+ end
197
+
198
+ def line_cget_tkstring(id, option)
199
+ itemcget_tkstring(['line', tagid(id)], option)
200
+ end
201
+ def line_cget(id, option)
202
+ itemcget(['line', tagid(id)], option)
203
+ end
204
+ def line_cget_strict(id, option)
205
+ itemcget_strict(['line', tagid(id)], option)
206
+ end
207
+ def line_configure(*args)
208
+ slot = args.pop
209
+ if slot.kind_of?(Hash)
210
+ value = None
211
+ else
212
+ value = slot
213
+ slot = args.pop
214
+ end
215
+ id_list = args.flatten.collect!{|id| tagid(id)}.unshift('line')
216
+ itemconfigure(id_list, slot, value)
217
+ end
218
+ def line_configinfo(id, slot=nil)
219
+ itemconfiginfo(['line', tagid(id)], slot)
220
+ end
221
+ def current_line_configinfo(id, slot=nil)
222
+ current_itemconfiginfo(['line', tagid(id)], slot)
223
+ end
224
+
225
+ def gridline_cget_tkstring(option)
226
+ itemcget_tkstring('grid', option)
227
+ end
228
+ def gridline_cget(option)
229
+ itemcget('grid', option)
230
+ end
231
+ def gridline_cget_strict(option)
232
+ itemcget_strict('grid', option)
233
+ end
234
+ def gridline_configure(slot, value=None)
235
+ itemconfigure('grid', slot, value)
236
+ end
237
+ def gridline_configinfo(slot=nil)
238
+ itemconfiginfo('grid', slot)
239
+ end
240
+ def current_gridline_configinfo(slot=nil)
241
+ current_itemconfiginfo('grid', slot)
242
+ end
243
+
244
+ def legend_cget_tkstring(option)
245
+ itemcget_tkstring('legend', option)
246
+ end
247
+ def legend_cget(option)
248
+ itemcget('legend', option)
249
+ end
250
+ def legend_cget_strict(option)
251
+ itemcget_strict('legend', option)
252
+ end
253
+ def legend_configure(slot, value=None)
254
+ itemconfigure('legend', slot, value)
255
+ end
256
+ def legend_configinfo(slot=nil)
257
+ itemconfiginfo('legend', slot)
258
+ end
259
+ def current_legend_configinfo(slot=nil)
260
+ current_itemconfiginfo('legend', slot)
261
+ end
262
+
263
+ def pen_cget_tkstring(id, option)
264
+ itemcget_tkstring(['pen', tagid(id)], option)
265
+ end
266
+ def pen_cget(id, option)
267
+ itemcget(['pen', tagid(id)], option)
268
+ end
269
+ def pen_cget_strict(id, option)
270
+ itemcget_strict(['pen', tagid(id)], option)
271
+ end
272
+ def pen_configure(*args)
273
+ slot = args.pop
274
+ if slot.kind_of?(Hash)
275
+ value = None
276
+ else
277
+ value = slot
278
+ slot = args.pop
279
+ end
280
+ id_list = args.flatten.collect!{|id| tagid(id)}.unshift('pen')
281
+ itemconfigure(id_list, slot, value)
282
+ end
283
+ def pen_configinfo(id, slot=nil)
284
+ itemconfiginfo(['pen', tagid(id)], slot)
285
+ end
286
+ def current_pen_configinfo(id, slot=nil)
287
+ current_itemconfiginfo(['pen', tagid(id)], slot)
288
+ end
289
+
290
+ def postscript_cget_tkstring(option)
291
+ itemcget_tkstring('postscript', option)
292
+ end
293
+ def postscript_cget(option)
294
+ itemcget('postscript', option)
295
+ end
296
+ def postscript_cget_strict(option)
297
+ itemcget_strict('postscript', option)
298
+ end
299
+ def postscript_configure(slot, value=None)
300
+ itemconfigure('postscript', slot, value)
301
+ end
302
+ def postscript_configinfo(slot=nil)
303
+ itemconfiginfo('postscript', slot)
304
+ end
305
+ def current_postscript_configinfo(slot=nil)
306
+ current_itemconfiginfo('postscript', slot)
307
+ end
308
+
309
+ def marker_cget_tkstring(id, option)
310
+ itemcget_tkstring(['marker', tagid(id)], option)
311
+ end
312
+ def marker_cget(id, option)
313
+ itemcget(['marker', tagid(id)], option)
314
+ end
315
+ def marker_cget_strict(id, option)
316
+ itemcget_strict(['marker', tagid(id)], option)
317
+ end
318
+ def marker_configure(*args)
319
+ slot = args.pop
320
+ if slot.kind_of?(Hash)
321
+ value = None
322
+ else
323
+ value = slot
324
+ slot = args.pop
325
+ end
326
+ id_list = args.flatten.collect!{|id| tagid(id)}.unshift('marker')
327
+ itemconfigure(id_list, slot, value)
328
+ end
329
+ def marker_configinfo(id, slot=nil)
330
+ itemconfiginfo(['marker', tagid(id)], slot)
331
+ end
332
+ def current_marker_configinfo(id, slot=nil)
333
+ current_itemconfiginfo(['marker', tagid(id)], slot)
334
+ end
335
+
336
+ alias __itemcget_tkstring itemcget_tkstring
337
+ alias __itemcget itemcget
338
+ alias __itemcget_strict itemcget_strict
339
+ alias __itemconfiginfo itemconfiginfo
340
+ alias __current_itemconfiginfo current_itemconfiginfo
341
+ private :__itemcget_tkstring, :__itemcget, :__itemconfiginfo, :__current_itemconfiginfo
342
+
343
+ def itemcget_tkstring(tagOrId, option)
344
+ __itemcget_tkstring(tagid(tagOrId), option)
345
+ end
346
+ def itemcget_strict(tagOrId, option)
347
+ ret = __itemcget(tagid(tagOrId), option)
348
+ if option == 'bindtags' || option == :bindtags
349
+ ret.collect{|tag| TkBindTag.id2obj(tag)}
350
+ else
351
+ ret
352
+ end
353
+ end
354
+ def itemcget(tagOrId, option)
355
+ unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
356
+ itemcget_strict(tagOrId, option)
357
+ else
358
+ begin
359
+ itemcget_strict(tagOrId, option)
360
+ rescue => e
361
+ begin
362
+ if current_itemconfiginfo(tagOrId).has_key?(option.to_s)
363
+ # error on known option
364
+ fail e
365
+ else
366
+ # unknown option
367
+ nil
368
+ end
369
+ rescue
370
+ fail e # tag error
371
+ end
372
+ end
373
+ end
374
+ end
375
+ def itemconfiginfo(tagOrId, slot = nil)
376
+ ret = __itemconfiginfo(tagid(tagOrId), slot)
377
+
378
+ if TkComm::GET_CONFIGINFO_AS_ARRAY
379
+ if slot
380
+ if slot == 'bindtags' || slot == :bindtags
381
+ ret[-2] = ret[-2].collect{|tag| TkBindTag.id2obj(tag)}
382
+ ret[-1] = ret[-1].collect{|tag| TkBindTag.id2obj(tag)}
383
+ end
384
+ else
385
+ if (inf = ret.assoc('bindtags'))
386
+ inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)}
387
+ inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)}
388
+ end
389
+ end
390
+
391
+ else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
392
+ if (inf = ret['bindtags'])
393
+ inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)}
394
+ inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)}
395
+ ret['bindtags'] = inf
396
+ end
397
+ end
398
+
399
+ ret
400
+ end
401
+ def current_itemconfiginfo(tagOrId, slot = nil)
402
+ ret = __current_itemconfiginfo(tagid(tagOrId), slot)
403
+
404
+ if (val = ret['bindtags'])
405
+ ret['bindtags'] = val.collect{|tag| TkBindTag.id2obj(tag)}
406
+ end
407
+
408
+ ret
409
+ end
410
+
411
+ private :itemcget_tkstring, :itemcget, :itemcget_strict
412
+ private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
413
+
414
+ #################
415
+
416
+ class Axis < TkObject
417
+ (OBJ_ID = ['blt_chart_axis'.freeze, TkUtil.untrust('00000')]).instance_eval{
418
+ @mutex = Mutex.new
419
+ def mutex; @mutex; end
420
+ freeze
421
+ }
422
+
423
+ AxisID_TBL = TkCore::INTERP.create_table
424
+
425
+ TkCore::INTERP.init_ip_env{
426
+ AxisID_TBL.mutex.synchronize{ AxisID_TBL.clear }
427
+ }
428
+
429
+ def self.id2obj(chart, id)
430
+ cpath = chart.path
431
+ AxisID_TBL.mutex.synchronize{
432
+ return id unless AxisID_TBL[cpath]
433
+ AxisID_TBL[cpath][id]? AxisID_TBL[cpath][id]: id
434
+ }
435
+ end
436
+
437
+ def self.new(chart, axis=nil, keys={})
438
+ if axis.kind_of?(Hash)
439
+ keys = axis
440
+ axis = nil
441
+ end
442
+ if keys
443
+ keys = _symbolkey2str(keys)
444
+ not_create = keys.delete('without_creating')
445
+ else
446
+ not_create = false
447
+ end
448
+
449
+ obj = nil
450
+ AxisID_TBL.mutex.synchronize{
451
+ chart_path = chart.path
452
+ AxisID_TBL[chart_path] ||= {}
453
+ if axis && AxisID_TBL[chart_path][axis]
454
+ obj = AxisID_TBL[chart_path][axis]
455
+ else
456
+ (obj = self.allocate).instance_eval{
457
+ if axis
458
+ @axis = @id = axis.to_s
459
+ else
460
+ OBJ_ID.mutex.synchronize{
461
+ @axis = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
462
+ OBJ_ID[1].succ!
463
+ }
464
+ end
465
+ @path = @id
466
+ @parent = @chart = chart
467
+ @cpath = @chart.path
468
+ Axis::AxisID_TBL[@cpath][@axis] = self
469
+ unless not_create
470
+ tk_call(@chart, 'axis', 'create', @axis, keys)
471
+ return obj
472
+ end
473
+ }
474
+ end
475
+ }
476
+
477
+ obj.configure(keys) if obj && ! keys.empty?
478
+ obj
479
+ end
480
+
481
+ def initialize(chart, axis=nil, keys={})
482
+ # dummy:: not called by 'new' method
483
+
484
+ if axis.kind_of?(Hash)
485
+ keys = axis
486
+ axis = nil
487
+ end
488
+ if axis
489
+ @axis = @id = axis.to_s
490
+ else
491
+ OBJ_ID.mutex.synchronize{
492
+ @axis = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
493
+ OBJ_ID[1].succ!
494
+ }
495
+ end
496
+ @path = @id
497
+ @parent = @chart = chart
498
+ @cpath = @chart.path
499
+ # Axis::AxisID_TBL[@cpath][@axis] = self
500
+ keys = _symbolkey2str(keys)
501
+ unless keys.delete('without_creating')
502
+ # @chart.axis_create(@axis, keys)
503
+ tk_call(@chart, 'axis', 'create', @axis, keys)
504
+ end
505
+ end
506
+
507
+ def id
508
+ @id
509
+ end
510
+
511
+ def to_eval
512
+ @id
513
+ end
514
+
515
+ def cget_tkstring(option)
516
+ @chart.axis_cget_tkstring(@id, option)
517
+ end
518
+ def cget(option)
519
+ @chart.axis_cget(@id, option)
520
+ end
521
+ def cget_strict(option)
522
+ @chart.axis_cget_strict(@id, option)
523
+ end
524
+ def configure(key, value=None)
525
+ @chart.axis_configure(@id, key, value)
526
+ self
527
+ end
528
+ def configinfo(key=nil)
529
+ @chart.axis_configinfo(@id, key)
530
+ end
531
+ def current_configinfo(key=nil)
532
+ @chart.current_axis_configinfo(@id, key)
533
+ end
534
+
535
+ def command(cmd=nil, &b)
536
+ if cmd
537
+ configure('command', cmd)
538
+ elsif b
539
+ configure('command', Proc.new(&b))
540
+ else
541
+ cget('command')
542
+ end
543
+ end
544
+
545
+ def delete
546
+ @chart.axis_delete(@id)
547
+ self
548
+ end
549
+
550
+ def invtransform(val)
551
+ @chart.axis_invtransform(@id, val)
552
+ end
553
+
554
+ def limits
555
+ @chart.axis_limits(@id)
556
+ end
557
+
558
+ def name
559
+ @axis
560
+ end
561
+
562
+ def transform(val)
563
+ @chart.axis_transform(@id, val)
564
+ end
565
+
566
+ def view
567
+ @chart.axis_view(@id)
568
+ self
569
+ end
570
+
571
+ def use(name=None) # if @id == xaxis | x2axis | yaxis | y2axis
572
+ @chart.axis_use(@id, name)
573
+ end
574
+
575
+ def use_as(axis) # axis := xaxis | x2axis | yaxis | y2axis
576
+ @chart.axis_use(axis, @id)
577
+ end
578
+ end
579
+
580
+ #################
581
+
582
+ class Crosshairs < TkObject
583
+ CrosshairsID_TBL = TkCore::INTERP.create_table
584
+
585
+ TkCore::INTERP.init_ip_env{
586
+ CrosshairsID_TBL.mutex.synchronize{ CrosshairsID_TBL.clear }
587
+ }
588
+
589
+ def self.new(chart, keys={})
590
+ obj = nil
591
+ CrosshairsID_TBL.mutex.synchronize{
592
+ unless (obj = CrosshairsID_TBL[chart.path])
593
+ (obj = self.allocate).instance_eval{
594
+ @parent = @chart = chart
595
+ @cpath = @chart.path
596
+ @path = @id = 'crosshairs'
597
+ Crosshairs::CrosshairsID_TBL[@cpath] = self
598
+ }
599
+ end
600
+ }
601
+ chart.crosshair_configure(keys) if obj && ! keys.empty?
602
+ obj
603
+ end
604
+
605
+ def initialize(chart, keys={})
606
+ # dummy:: not called by 'new' method
607
+
608
+ @parent = @chart = chart
609
+ @cpath = @chart.path
610
+ # Crosshairs::CrosshairsID_TBL[@cpath] = self
611
+ @chart.crosshair_configure(keys) unless keys.empty?
612
+ @path = @id = 'crosshairs'
613
+ end
614
+
615
+ def id
616
+ @id
617
+ end
618
+
619
+ def to_eval
620
+ @id
621
+ end
622
+
623
+ def cget_tkstring(option)
624
+ @chart.crosshair_cget_tkstring(option)
625
+ end
626
+ def cget(option)
627
+ @chart.crosshair_cget(option)
628
+ end
629
+ def cget_strict(option)
630
+ @chart.crosshair_cget_strict(option)
631
+ end
632
+ def configure(key, value=None)
633
+ @chart.crosshair_configure(key, value)
634
+ self
635
+ end
636
+ def configinfo(key=nil)
637
+ @chart.crosshair_configinfo(key)
638
+ end
639
+ def current_configinfo(key=nil)
640
+ @chart.current_crosshair_configinfo(key)
641
+ end
642
+
643
+ def off
644
+ @chart.crosshair_off
645
+ self
646
+ end
647
+ def on
648
+ @chart.crosshair_on
649
+ self
650
+ end
651
+ def toggle
652
+ @chart.crosshair_toggle
653
+ self
654
+ end
655
+ end
656
+
657
+ #################
658
+
659
+ class Element < TkObject
660
+ extend Tk
661
+ extend TkItemFontOptkeys
662
+ extend TkItemConfigOptkeys
663
+
664
+ extend Tk::BLT::PlotComponent::OptKeys
665
+
666
+ ElementTypeName = 'element'
667
+ ElementTypeToClass = { ElementTypeName=>self }
668
+
669
+ ElementID_TBL = TkCore::INTERP.create_table
670
+
671
+ TkCore::INTERP.init_ip_env{
672
+ ElementID_TBL.mutex.synchronize{ ElementID_TBL.clear }
673
+ }
674
+
675
+ (OBJ_ID = ['blt_chart_element'.freeze, TkUtil.untrust('00000')]).instance_eval{
676
+ @mutex = Mutex.new
677
+ def mutex; @mutex; end
678
+ freeze
679
+ }
680
+
681
+ def Element.type2class(type)
682
+ ElementTypeToClass[type]
683
+ end
684
+
685
+ def Element.id2obj(chart, id)
686
+ cpath = chart.path
687
+ ElementID_TBL.mutex.synchronize{
688
+ return id unless ElementID_TBL[cpath]
689
+ ElementID_TBL[cpath][id]? ElementID_TBL[cpath][id]: id
690
+ }
691
+ end
692
+
693
+ def self.new(chart, element=nil, keys={})
694
+ if element.kind_of?(Hash)
695
+ keys = element
696
+ element = nil
697
+ end
698
+ if keys
699
+ keys = _symbolkey2str(keys)
700
+ not_create = keys.delete('without_creating')
701
+ else
702
+ not_create = false
703
+ end
704
+
705
+ obj = nil
706
+ ElementID_TBL.mutex.synchronize{
707
+ chart_path = chart.path
708
+ ElementID_TBL[chart_path] ||= {}
709
+ if element && ElementID_TBL[chart_path][element]
710
+ obj = ElementID_TBL[chart_path][element]
711
+ else
712
+ (obj = self.allocate).instance_eval{
713
+ if element
714
+ @element = @id = element.to_s
715
+ else
716
+ OBJ_ID.mutex.synchronize{
717
+ @element = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
718
+ OBJ_ID[1].succ!
719
+ }
720
+ end
721
+ @path = @id
722
+ @parent = @chart = chart
723
+ @cpath = @chart.path
724
+ @typename = self.class::ElementTypeName
725
+ Element::ElementID_TBL[@cpath][@element] = self
726
+ unless not_create
727
+ tk_call(@chart, @typename, 'create', @element, keys)
728
+ return obj
729
+ end
730
+ }
731
+ end
732
+ }
733
+
734
+ obj.configure(keys) if obj && ! keys.empty?
735
+ obj
736
+ end
737
+
738
+ def initialize(chart, element=nil, keys={})
739
+ # dummy:: not called by 'new' method
740
+
741
+ if element.kind_of?(Hash)
742
+ keys = element
743
+ element = nil
744
+ end
745
+ if element
746
+ @element = @id = element.to_s
747
+ else
748
+ OBJ_ID.mutex.synchronize{
749
+ @element = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
750
+ OBJ_ID[1].succ!
751
+ }
752
+ end
753
+ @path = @id
754
+ @parent = @chart = chart
755
+ @cpath = @chart.path
756
+ @typename = self.class::ElementTypeName
757
+ # Element::ElementID_TBL[@cpath][@element] = self
758
+ keys = _symbolkey2str(keys)
759
+ unless keys.delete('without_creating')
760
+ # @chart.element_create(@element, keys)
761
+ tk_call(@chart, @typename, 'create', @element, keys)
762
+ end
763
+ end
764
+
765
+ def id
766
+ @id
767
+ end
768
+
769
+ def to_eval
770
+ @id
771
+ end
772
+
773
+ def cget_tkstring(option)
774
+ # @chart.element_cget(@id, option)
775
+ @chart.__send__(@typename + '_cget_tkstring', @id, option)
776
+ end
777
+ def cget(option)
778
+ # @chart.element_cget(@id, option)
779
+ @chart.__send__(@typename + '_cget', @id, option)
780
+ end
781
+ def cget_strict(option)
782
+ @chart.__send__(@typename + '_cget_strict', @id, option)
783
+ end
784
+ def configure(key, value=None)
785
+ # @chart.element_configure(@id, key, value)
786
+ @chart.__send__(@typename + '_configure', @id, key, value)
787
+ self
788
+ end
789
+ def configinfo(key=nil)
790
+ # @chart.element_configinfo(@id, key)
791
+ @chart.__send__(@typename + '_configinfo', @id, key)
792
+ end
793
+ def current_configinfo(key=nil)
794
+ # @chart.current_element_configinfo(@id, key)
795
+ @chart.__send__('current_' << @typename << '_configinfo', @id, key)
796
+ end
797
+
798
+ def activate(*args)
799
+ @chart.element_activate(@id, *args)
800
+ end
801
+
802
+ def closest(x, y, var, keys={})
803
+ # @chart.element_closest(x, y, var, @id, keys)
804
+ @chart.__send__(@typename + '_closest', x, y, var, @id, keys)
805
+ end
806
+
807
+ def deactivate
808
+ @chart.element_deactivate(@id)
809
+ self
810
+ end
811
+
812
+ def delete
813
+ @chart.element_delete(@id)
814
+ self
815
+ end
816
+
817
+ def exist?
818
+ @chart.element_exist?(@id)
819
+ end
820
+
821
+ def name
822
+ @element
823
+ end
824
+
825
+ def type
826
+ @chart.element_type(@id)
827
+ end
828
+ end
829
+
830
+ class Bar < Element
831
+ ElementTypeName = 'bar'.freeze
832
+ ElementTypeToClass[ElementTypeName] = self
833
+ end
834
+ class Line < Element
835
+ ElementTypeName = 'line'.freeze
836
+ ElementTypeToClass[ElementTypeName] = self
837
+ end
838
+
839
+ #################
840
+
841
+ class GridLine < TkObject
842
+ GridLineID_TBL = TkCore::INTERP.create_table
843
+ TkCore::INTERP.init_ip_env{
844
+ GridLineID_TBL.mutex.synchronize{ GridLineID_TBL.clear }
845
+ }
846
+
847
+ def self.new(chart, keys={})
848
+ obj = nil
849
+ GridLineID_TBL.mutex.synchronize{
850
+ unless (obj = GridLineID_TBL[chart.path])
851
+ (obj = self.allocate).instance_eval{
852
+ @parent = @chart = chart
853
+ @cpath = @chart.path
854
+ @path = @id = 'grid'
855
+ GridLine::GridLineID_TBL[@cpath] = self
856
+ }
857
+ end
858
+ }
859
+ chart.gridline_configure(keys) if obj && ! keys.empty?
860
+ obj
861
+ end
862
+
863
+ def initialize(chart, keys={})
864
+ # dummy:: not called by 'new' method
865
+
866
+ @parent = @chart = chart
867
+ @cpath = @chart.path
868
+ # GridLine::GridLineID_TBL[@cpath] = self
869
+ @chart.gridline_configure(keys) unless keys.empty?
870
+ @path = @id = 'grid'
871
+ end
872
+
873
+ def id
874
+ @id
875
+ end
876
+
877
+ def to_eval
878
+ @id
879
+ end
880
+
881
+ def cget_tkstring(option)
882
+ @chart.gridline_cget_tkstring(option)
883
+ end
884
+ def cget(option)
885
+ @chart.gridline_cget(option)
886
+ end
887
+ def cget_strict(option)
888
+ @chart.gridline_cget_strict(option)
889
+ end
890
+ def configure(key, value=None)
891
+ @chart.gridline_configure(key, value)
892
+ self
893
+ end
894
+ def configinfo(key=nil)
895
+ @chart.gridline_configinfo(key)
896
+ end
897
+ def current_configinfo(key=nil)
898
+ @chart.current_gridline_configinfo(key)
899
+ end
900
+
901
+ def off
902
+ @chart.gridline_off
903
+ self
904
+ end
905
+ def on
906
+ @chart.gridline_on
907
+ self
908
+ end
909
+ def toggle
910
+ @chart.gridline_toggle
911
+ self
912
+ end
913
+ end
914
+
915
+ #################
916
+
917
+ class Legend < TkObject
918
+ LegendID_TBL = TkCore::INTERP.create_table
919
+
920
+ TkCore::INTERP.init_ip_env{
921
+ LegendID_TBL.mutex.synchronize{ LegendID_TBL.clear }
922
+ }
923
+
924
+ def self.new(chart, keys={})
925
+ obj = nil
926
+ LegenedID_TBL.mutex.synchronize{
927
+ unless (obj = LegenedID_TBL[chart.path])
928
+ (obj = self.allocate).instance_eval{
929
+ @parent = @chart = chart
930
+ @cpath = @chart.path
931
+ @path = @id = 'crosshairs'
932
+ Legend::LegenedID_TBL[@cpath] = self
933
+ }
934
+ end
935
+ }
936
+ chart.legend_configure(keys) if obj && ! keys.empty?
937
+ obj
938
+ end
939
+
940
+ def initialize(chart, keys={})
941
+ # dummy:: not called by 'new' method
942
+
943
+ @parent = @chart = chart
944
+ @cpath = @chart.path
945
+ # Legend::LegendID_TBL[@cpath] = self
946
+ @chart.legend_configure(keys) unless keys.empty?
947
+ @path = @id = 'legend'
948
+ end
949
+
950
+ def id
951
+ @id
952
+ end
953
+
954
+ def to_eval
955
+ @id
956
+ end
957
+
958
+ def cget_tkstring(option)
959
+ @chart.legend_cget_tkstring(option)
960
+ end
961
+ def cget(option)
962
+ @chart.legend_cget(option)
963
+ end
964
+ def cget_strict(option)
965
+ @chart.legend_cget_strict(option)
966
+ end
967
+ def configure(key, value=None)
968
+ @chart.legend_configure(key, value)
969
+ self
970
+ end
971
+ def configinfo(key=nil)
972
+ @chart.legend_configinfo(key)
973
+ end
974
+ def current_configinfo(key=nil)
975
+ @chart.current_legend_configinfo(key)
976
+ end
977
+
978
+ def activate(*args)
979
+ @chart.legend_activate(*args)
980
+ end
981
+
982
+ def deactivate(*args)
983
+ @chart.legend_deactivate(*args)
984
+ end
985
+
986
+ def get(pos, y=nil)
987
+ @chart.legend_get(pos, y)
988
+ end
989
+ end
990
+
991
+ #################
992
+
993
+ class Pen < TkObject
994
+ (OBJ_ID = ['blt_chart_pen'.freeze, TkUtil.untrust('00000')]).instance_eval{
995
+ @mutex = Mutex.new
996
+ def mutex; @mutex; end
997
+ freeze
998
+ }
999
+
1000
+ PenID_TBL = TkCore::INTERP.create_table
1001
+
1002
+ TkCore::INTERP.init_ip_env{
1003
+ PenID_TBL.mutex.synchronize{ PenID_TBL.clear }
1004
+ }
1005
+
1006
+ def self.id2obj(chart, id)
1007
+ cpath = chart.path
1008
+ PenID_TBL.mutex.synchronize{
1009
+ return id unless PenID_TBL[cpath]
1010
+ PenID_TBL[cpath][id]? PenID_TBL[cpath][id]: id
1011
+ }
1012
+ end
1013
+
1014
+ def self.new(chart, pen=nil, keys={})
1015
+ if pen.kind_of?(Hash)
1016
+ keys = pen
1017
+ pen = nil
1018
+ end
1019
+ if keys
1020
+ keys = _symbolkey2str(keys)
1021
+ not_create = keys.delete('without_creating')
1022
+ else
1023
+ not_create = false
1024
+ end
1025
+
1026
+ obj = nil
1027
+ PenID_TBL.mutex.synchronize{
1028
+ chart_path = chart.path
1029
+ PenID_TBL[chart_path] ||= {}
1030
+ if pen && PenID_TBL[chart_path][pen]
1031
+ obj = PenID_TBL[chart_path][pen]
1032
+ else
1033
+ (obj = self.allocate).instance_eval{
1034
+ if pen
1035
+ @pen = @id = pen.to_s
1036
+ else
1037
+ OBJ_ID.mutex.synchronize{
1038
+ @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
1039
+ OBJ_ID[1].succ!
1040
+ }
1041
+ end
1042
+ @path = @id
1043
+ @parent = @chart = chart
1044
+ @cpath = @chart.path
1045
+ Pen::PenID_TBL[@cpath][@pen] = self
1046
+ unless not_create
1047
+ tk_call(@chart, 'pen', 'create', @pen, keys)
1048
+ return obj
1049
+ end
1050
+ }
1051
+ end
1052
+ }
1053
+
1054
+ obj.configure(keys) if obj && ! keys.empty?
1055
+ obj
1056
+ end
1057
+
1058
+ def initialize(chart, pen=nil, keys={})
1059
+ if pen.kind_of?(Hash)
1060
+ keys = pen
1061
+ pen = nil
1062
+ end
1063
+ if pen
1064
+ @pen = @id = pen.to_s
1065
+ else
1066
+ OBJ_ID.mutex.synchronize{
1067
+ @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
1068
+ OBJ_ID[1].succ!
1069
+ }
1070
+ end
1071
+ @path = @id
1072
+ @parent = @chart = chart
1073
+ @cpath = @chart.path
1074
+ Pen::PenID_TBL[@cpath][@pen] = self
1075
+ keys = _symbolkey2str(keys)
1076
+ unless keys.delete('without_creating')
1077
+ # @chart.pen_create(@pen, keys)
1078
+ tk_call(@chart, 'pen', 'create', @pen, keys)
1079
+ end
1080
+ end
1081
+
1082
+ def id
1083
+ @id
1084
+ end
1085
+
1086
+ def to_eval
1087
+ @id
1088
+ end
1089
+
1090
+ def cget_tkstring(option)
1091
+ @chart.pen_cget_tkstring(@id, option)
1092
+ end
1093
+ def cget(option)
1094
+ @chart.pen_cget(@id, option)
1095
+ end
1096
+ def cget_strict(option)
1097
+ @chart.pen_cget_strict(@id, option)
1098
+ end
1099
+ def configure(key, value=None)
1100
+ @chart.pen_configure(@id, key, value)
1101
+ self
1102
+ end
1103
+ def configinfo(key=nil)
1104
+ @chart.pen_configinfo(@id, key)
1105
+ end
1106
+ def current_configinfo(key=nil)
1107
+ @chart.current_pen_configinfo(@id, key)
1108
+ end
1109
+
1110
+ def delete
1111
+ @chart.pen_delete(@id)
1112
+ self
1113
+ end
1114
+
1115
+ def name
1116
+ @pen
1117
+ end
1118
+ end
1119
+
1120
+ #################
1121
+
1122
+ class Postscript < TkObject
1123
+ PostscriptID_TBL = TkCore::INTERP.create_table
1124
+
1125
+ TkCore::INTERP.init_ip_env{
1126
+ PostscriptID_TBL.mutex.synchronize{ PostscriptID_TBL.clear }
1127
+ }
1128
+
1129
+ def self.new(chart, keys={})
1130
+ obj = nil
1131
+ PostscriptID_TBL.mutex.synchronize{
1132
+ unless (obj = PostscriptID_TBL[chart.path])
1133
+ (obj = self.allocate).instance_eval{
1134
+ @parent = @chart = chart
1135
+ @cpath = @chart.path
1136
+ @path = @id = 'postscript'
1137
+ Postscript::PostscriptID_TBL[@cpath] = self
1138
+ }
1139
+ end
1140
+ }
1141
+ chart.postscript_configure(keys) if obj && ! keys.empty?
1142
+ obj
1143
+ end
1144
+
1145
+ def initialize(chart, keys={})
1146
+ # dummy:: not called by 'new' method
1147
+
1148
+ @parent = @chart = chart
1149
+ @cpath = @chart.path
1150
+ # Postscript::PostscriptID_TBL[@cpath] = self
1151
+ @chart.postscript_configure(keys) unless keys.empty?
1152
+ @path = @id = 'postscript'
1153
+ end
1154
+
1155
+ def id
1156
+ @id
1157
+ end
1158
+
1159
+ def to_eval
1160
+ @id
1161
+ end
1162
+
1163
+ def cget_tkstring(option)
1164
+ @chart.postscript_cget_tkstring(option)
1165
+ end
1166
+ def cget(option)
1167
+ @chart.postscript_cget(option)
1168
+ end
1169
+ def cget_strict(option)
1170
+ @chart.postscript_cget_strict(option)
1171
+ end
1172
+ def configure(key, value=None)
1173
+ @chart.postscript_configure(key, value)
1174
+ self
1175
+ end
1176
+ def configinfo(key=nil)
1177
+ @chart.postscript_configinfo(key)
1178
+ end
1179
+ def current_configinfo(key=nil)
1180
+ @chart.current_postscript_configinfo(key)
1181
+ end
1182
+
1183
+ def output(file=nil, keys={})
1184
+ if file.kind_of?(Hash)
1185
+ keys = file
1186
+ file = nil
1187
+ end
1188
+
1189
+ ret = @chart.postscript_output(file, keys)
1190
+
1191
+ if file
1192
+ self
1193
+ else
1194
+ ret
1195
+ end
1196
+ end
1197
+ end
1198
+
1199
+ #################
1200
+ class Marker < TkObject
1201
+ extend Tk
1202
+ extend TkItemFontOptkeys
1203
+ extend TkItemConfigOptkeys
1204
+
1205
+ extend Tk::BLT::PlotComponent::OptKeys
1206
+
1207
+ MarkerTypeName = nil
1208
+ MarkerTypeToClass = {}
1209
+ MarkerID_TBL = TkCore::INTERP.create_table
1210
+
1211
+ TkCore::INTERP.init_ip_env{
1212
+ MarkerID_TBL.mutex.synchronize{ MarkerID_TBL.clear }
1213
+ }
1214
+
1215
+ def Marker.type2class(type)
1216
+ MarkerTypeToClass[type]
1217
+ end
1218
+
1219
+ def Marker.id2obj(chart, id)
1220
+ cpath = chart.path
1221
+ MarkerID_TBL.mutex.synchronize{
1222
+ if MarkerID_TBL[cpath]
1223
+ MarkerID_TBL[cpath][id]? MarkerID_TBL[cpath][id]: id
1224
+ else
1225
+ id
1226
+ end
1227
+ }
1228
+ end
1229
+
1230
+ def self._parse_create_args(keys)
1231
+ fontkeys = {}
1232
+ methodkeys = {}
1233
+ if keys.kind_of? Hash
1234
+ keys = _symbolkey2str(keys)
1235
+
1236
+ __item_font_optkeys(nil).each{|key|
1237
+ fkey = key.to_s
1238
+ fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
1239
+
1240
+ fkey = "kanji#{key}"
1241
+ fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
1242
+
1243
+ fkey = "latin#{key}"
1244
+ fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
1245
+
1246
+ fkey = "ascii#{key}"
1247
+ fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey)
1248
+ }
1249
+
1250
+ __item_optkey_aliases(nil).each{|alias_name, real_name|
1251
+ alias_name = alias_name.to_s
1252
+ if keys.has_key?(alias_name)
1253
+ keys[real_name.to_s] = keys.delete(alias_name)
1254
+ end
1255
+ }
1256
+
1257
+ __item_methodcall_optkeys(nil).each{|key|
1258
+ key = key.to_s
1259
+ methodkeys[key] = keys.delete(key) if keys.key?(key)
1260
+ }
1261
+
1262
+ __item_ruby2val_optkeys(nil).each{|key, method|
1263
+ key = key.to_s
1264
+ keys[key] = method.call(keys[key]) if keys.has_key?(key)
1265
+ }
1266
+
1267
+ args = itemconfig_hash_kv(nil, keys)
1268
+ else
1269
+ args = []
1270
+ end
1271
+
1272
+ [args, fontkeys, methodkeys]
1273
+ end
1274
+ private_class_method :_parse_create_args
1275
+
1276
+ def self.create(chart, keys={})
1277
+ unless self::MarkerTypeName
1278
+ fail RuntimeError, "#{self} is an abstract class"
1279
+ end
1280
+ args, fontkeys, methodkeys = _parse_create_args(keys)
1281
+ idnum = tk_call_without_enc(chart.path, 'marker', 'create',
1282
+ self::MarkerTypeName, *args)
1283
+ chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
1284
+ chart.marker_configure(idnum, methodkeys) unless methodkeys.empty?
1285
+ idnum.to_i # 'item id' is an integer number
1286
+ end
1287
+
1288
+ def self.create_type(chart, type, keys={})
1289
+ args, fontkeys, methodkeys = _parse_create_args(keys)
1290
+ idnum = tk_call_without_enc(chart.path, 'marker', 'create',
1291
+ type, *args)
1292
+ chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
1293
+ chart.marker_configure(idnum, methodkeys) unless methodkeys.empty?
1294
+ id = idnum.to_i # 'item id' is an integer number
1295
+ obj = self.allocate
1296
+ obj.instance_eval{
1297
+ @parent = @chart = chart
1298
+ @cpath = chart.path
1299
+ @id = id
1300
+ Tk::BLT::PlotComponent::Marker::MarkerID_TBL.mutex.synchronize{
1301
+ Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath] ||= {}
1302
+ Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath][@id] = self
1303
+ }
1304
+ }
1305
+ obj
1306
+ end
1307
+
1308
+ def initialize(parent, *args)
1309
+ @parent = @chart = parent
1310
+ @cpath = parent.path
1311
+
1312
+ @path = @id = create_self(*args) # an integer number as 'item id'
1313
+ Tk::BLT::PlotComponent::Marker::MarkerID_TBL.mutex.synchronize{
1314
+ Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath] ||= {}
1315
+ Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath][@id] = self
1316
+ }
1317
+ end
1318
+ def create_self(*args)
1319
+ self.class.create(@chart, *args) # return an integer as 'item id'
1320
+ end
1321
+ private :create_self
1322
+
1323
+ def id
1324
+ @id
1325
+ end
1326
+
1327
+ def to_eval
1328
+ @id
1329
+ end
1330
+
1331
+ def cget_tkstring(option)
1332
+ @chart.marker_cget_tkstring(@id, option)
1333
+ end
1334
+ def cget(option)
1335
+ @chart.marker_cget(@id, option)
1336
+ end
1337
+ def cget_strict(option)
1338
+ @chart.marker_cget_strict(@id, option)
1339
+ end
1340
+ def configure(key, value=None)
1341
+ @chart.marker_configure(@id, key, value)
1342
+ self
1343
+ end
1344
+ def configinfo(key=nil)
1345
+ @chart.marker_configinfo(@id, key)
1346
+ end
1347
+ def current_configinfo(key=nil)
1348
+ @chart.current_marker_configinfo(@id, key)
1349
+ end
1350
+
1351
+ def after(target=None)
1352
+ @chart.marker_after(@id, target)
1353
+ end
1354
+
1355
+ def before(target=None)
1356
+ @chart.marker_before(@id, target)
1357
+ end
1358
+
1359
+ def delete
1360
+ @chart.marker_delete(@id)
1361
+ end
1362
+
1363
+ def exist?
1364
+ @chart.marker_exist(@id)
1365
+ end
1366
+
1367
+ def type
1368
+ @chart.marker_type(@id)
1369
+ end
1370
+ end
1371
+
1372
+ class TextMarker < Marker
1373
+ MarkerTypeName = 'text'.freeze
1374
+ MarkerTypeToClass[MarkerTypeName] = self
1375
+ end
1376
+ class LineMarker < Marker
1377
+ MarkerTypeName = 'line'.freeze
1378
+ MarkerTypeToClass[MarkerTypeName] = self
1379
+ end
1380
+ class BitmapMarker < Marker
1381
+ MarkerTypeName = 'bitmap'.freeze
1382
+ MarkerTypeToClass[MarkerTypeName] = self
1383
+ end
1384
+ class ImageMarker < Marker
1385
+ MarkerTypeName = 'image'.freeze
1386
+ MarkerTypeToClass[MarkerTypeName] = self
1387
+ end
1388
+ class PolygonMarker < Marker
1389
+ MarkerTypeName = 'polygon'.freeze
1390
+ MarkerTypeToClass[MarkerTypeName] = self
1391
+ end
1392
+ class WindowMarker < Marker
1393
+ MarkerTypeName = 'window'.freeze
1394
+ MarkerTypeToClass[MarkerTypeName] = self
1395
+ end
1396
+
1397
+ #################
1398
+
1399
+ def __destroy_hook__
1400
+ Axis::AxisID_TBL.delete(@path)
1401
+ Crosshairs::CrosshairsID_TBL.delete(@path)
1402
+ Element::ElementID_TBL.delete(@path)
1403
+ GridLine::GridLineID_TBL.delete(@path)
1404
+ Legend::LegendID_TBL.delete(@path)
1405
+ Pen::PenID_TBL.delete(@path)
1406
+ Postscript::PostscriptID_TBL.delete(@path)
1407
+ Marker::MarkerID_TBL.delete(@path)
1408
+ super()
1409
+ end
1410
+
1411
+ #################
1412
+
1413
+ def tagid(tag)
1414
+ if tag.kind_of?(Axis) ||
1415
+ tag.kind_of?(Crosshairs) ||
1416
+ tag.kind_of?(Element) ||
1417
+ tag.kind_of?(GridLine) ||
1418
+ tag.kind_of?(Legend) ||
1419
+ tag.kind_of?(Pen) ||
1420
+ tag.kind_of?(Postscript) ||
1421
+ tag.kind_of?(Marker)
1422
+ tag.id
1423
+ else
1424
+ tag # maybe an Array of configure parameters
1425
+ end
1426
+ end
1427
+
1428
+ def _component_bind(target, tag, context, *args)
1429
+ if TkComm._callback_entry?(args[0]) || !block_given?
1430
+ cmd = args.shift
1431
+ else
1432
+ cmd = Proc.new
1433
+ end
1434
+ _bind([path, target, 'bind', tagid(tag)], context, cmd, *args)
1435
+ self
1436
+ end
1437
+ def _component_bind_append(target, tag, context, *args)
1438
+ if TkComm._callback_entry?(args[0]) || !block_given?
1439
+ cmd = args.shift
1440
+ else
1441
+ cmd = Proc.new
1442
+ end
1443
+ _bind_append([path, target, 'bind', tagid(tag)], context, cmd, *args)
1444
+ self
1445
+ end
1446
+ def _component_bind_remove(target, tag, context)
1447
+ _bind_remove([path, target, 'bind', tagid(tag)], context)
1448
+ self
1449
+ end
1450
+ def _component_bindinfo(target, tag, context=nil)
1451
+ _bindinfo([path, target, 'bind', tagid(tag)], context)
1452
+ end
1453
+ private :_component_bind, :_component_bind_append
1454
+ private :_component_bind_remove, :_component_bindinfo
1455
+
1456
+ def axis_bind(tag, context, *args)
1457
+ _component_bind('axis', tag, context, *args)
1458
+ end
1459
+ def axis_bind_append(tag, context, *args)
1460
+ _component_bind_append('axis', tag, context, *args)
1461
+ end
1462
+ def axis_bind_remove(tag, context)
1463
+ _component_bind_remove('axis', tag, context)
1464
+ end
1465
+ def axis_bindinfo(tag, context=nil)
1466
+ _component_bindinfo('axis', tag, context)
1467
+ end
1468
+
1469
+ def element_bind(tag, context, *args)
1470
+ _component_bind('element', tag, context, *args)
1471
+ end
1472
+ def element_bind_append(tag, context, *args)
1473
+ _component_bind_append('element', tag, context, *args)
1474
+ end
1475
+ def element_bind_remove(tag, context)
1476
+ _component_bind_remove('element', tag, context)
1477
+ end
1478
+ def element_bindinfo(tag, context=nil)
1479
+ _component_bindinfo('element', tag, context)
1480
+ end
1481
+
1482
+ def bar_bind(tag, context, *args)
1483
+ _component_bind('bar', tag, context, *args)
1484
+ end
1485
+ def bar_bind_append(tag, context, *args)
1486
+ _component_bind_append('bar', tag, context, *args)
1487
+ end
1488
+ def bar_bind_remove(tag, context)
1489
+ _component_bind_remove('bar', tag, context)
1490
+ end
1491
+ def bar_bindinfo(tag, context=nil)
1492
+ _component_bindinfo('bar', tag, context)
1493
+ end
1494
+
1495
+ def line_bind(tag, context, *args)
1496
+ _component_bind('line', tag, context, *args)
1497
+ end
1498
+ def line_bind_append(tag, context, *args)
1499
+ _component_bind_append('line', tag, context, *args)
1500
+ end
1501
+ def line_bind_remove(tag, context)
1502
+ _component_bind_remove('line', tag, context)
1503
+ end
1504
+ def line_bindinfo(tag, context=nil)
1505
+ _component_bindinfo('line', tag, context)
1506
+ end
1507
+
1508
+ def legend_bind(tag, context, *args)
1509
+ _component_bind('legend', tag, context, *args)
1510
+ end
1511
+ def legend_bind_append(tag, context, *args)
1512
+ _component_bind_append('legend', tag, context, *args)
1513
+ end
1514
+ def legend_bind_remove(tag, context)
1515
+ _component_bind_remove('legend', tag, context)
1516
+ end
1517
+ def legend_bindinfo(tag, context=nil)
1518
+ _component_bindinfo('legend', tag, context)
1519
+ end
1520
+
1521
+ def marker_bind(tag, context, *args)
1522
+ _component_bind('marker', tag, context, *args)
1523
+ end
1524
+ def marker_bind_append(tag, context, *args)
1525
+ _component_bind_append('marker', tag, context, *args)
1526
+ end
1527
+ def marker_bind_remove(tag, context)
1528
+ _component_bind_remove('marker', tag, context)
1529
+ end
1530
+ def marker_bindinfo(tag, context=nil)
1531
+ _component_bindinfo('marker', tag, context)
1532
+ end
1533
+
1534
+ ###################
1535
+
1536
+ def axis_create(id=nil, keys={})
1537
+ # tk_send('axis', 'create', tagid(id), keys)
1538
+ Tk::BLT::PlotComponent::Axis.new(self, tagid(id), keys)
1539
+ end
1540
+ def axis_delete(*ids)
1541
+ tk_send('axis', 'delete', *(ids.collect{|id| tagid(id)}))
1542
+ self
1543
+ end
1544
+ def axis_invtransform(id, val)
1545
+ list(tk_send('axis', 'invtransform', tagid(id), val))
1546
+ end
1547
+ def axis_limits(id)
1548
+ list(tk_send('axis', 'limits', tagid(id)))
1549
+ end
1550
+ def axis_names(*pats)
1551
+ simplelist(tk_send('axis', 'names',
1552
+ *(pats.collect{|pat| tagid(pat)}))).collect{|axis|
1553
+ Tk::BLT::PlotComponent::Axis.id2obj(self, axis)
1554
+ }
1555
+ end
1556
+ def axis_transform(id, val)
1557
+ list(tk_send('axis', 'transform', tagid(id), val))
1558
+ end
1559
+ def axis_view(id)
1560
+ tk_send('axis', 'view', tagid(id))
1561
+ self
1562
+ end
1563
+ def axis_use(id, target=nil)
1564
+ if target
1565
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
1566
+ tk_send('axis', 'use',
1567
+ tagid(id), tagid(target)))
1568
+ else
1569
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
1570
+ tk_send('axis', 'use', tagid(id)))
1571
+ end
1572
+ end
1573
+
1574
+ ###################
1575
+
1576
+ def crosshairs_off
1577
+ tk_send_without_enc('crosshairs', 'off')
1578
+ self
1579
+ end
1580
+ def crosshairs_on
1581
+ tk_send_without_enc('crosshairs', 'on')
1582
+ self
1583
+ end
1584
+ def crosshairs_toggle
1585
+ tk_send_without_enc('crosshairs', 'toggle')
1586
+ self
1587
+ end
1588
+
1589
+ ###################
1590
+
1591
+ def element_create(id=nil, keys={})
1592
+ # tk_send('element', 'create', tagid(id), keys)
1593
+ Tk::BLT::PlotComponent::Element.new(self, tagid(id), keys)
1594
+ end
1595
+ def element_activate(*args)
1596
+ if args.empty?
1597
+ list(tk_send('element', 'activate')).collect{|elem|
1598
+ Tk::BLT::PlotComponent::Element.id2obj(self, elem)
1599
+ }
1600
+ else
1601
+ # id, *indices
1602
+ id = args.shift
1603
+ tk_send('element', 'activate', tagid(id), *args)
1604
+ end
1605
+ end
1606
+ def element_closest(x, y, var, *args)
1607
+ if args[-1].kind_of?(Hash)
1608
+ keys = args.pop
1609
+ bool(tk_send('element', 'closest', x, y, var,
1610
+ *(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
1611
+ else
1612
+ bool(tk_send('element', 'closest', x, y, var,
1613
+ *(args.collect{|id| tagid(id)})))
1614
+ end
1615
+ end
1616
+ def element_deactivate(*ids)
1617
+ tk_send('element', 'deactivate', *(ids.collect{|id| tagid(id)}))
1618
+ self
1619
+ end
1620
+ def element_delete(*ids)
1621
+ tk_send('element', 'delete', *(ids.collect{|id| tagid(id)}))
1622
+ self
1623
+ end
1624
+ def element_exist?(id)
1625
+ bool(tk_send('element', 'exists', tagid(id)))
1626
+ end
1627
+ def element_names(*pats)
1628
+ simplelist(tk_send('element', 'names',
1629
+ *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
1630
+ Tk::BLT::PlotComponent::Element.id2obj(self, elem)
1631
+ }
1632
+ end
1633
+ def element_show(*names)
1634
+ if names.empty?
1635
+ simplelist(tk_send('element', 'show'))
1636
+ else
1637
+ tk_send('element', 'show', *(names.collect{|n| tagid(n)}))
1638
+ self
1639
+ end
1640
+ end
1641
+ def element_type(id)
1642
+ tk_send('element', 'type', tagid(id))
1643
+ end
1644
+
1645
+ ###################
1646
+
1647
+ def bar_create(id=nil, keys={})
1648
+ # tk_send('bar', 'create', tagid(id), keys)
1649
+ Tk::BLT::PlotComponent::Bar.new(self, tagid(id), keys)
1650
+ end
1651
+ alias bar bar_create
1652
+ def bar_activate(*args)
1653
+ if args.empty?
1654
+ list(tk_send('bar', 'activate')).collect{|elem|
1655
+ Tk::BLT::PlotComponent::Element.id2obj(self, elem)
1656
+ }
1657
+ else
1658
+ # id, *indices
1659
+ id = args.shift
1660
+ tk_send('bar', 'activate', tagid(id), *args)
1661
+ end
1662
+ end
1663
+ def bar_closest(x, y, var, *args)
1664
+ if args[-1].kind_of?(Hash)
1665
+ keys = args.pop
1666
+ bool(tk_send('bar', 'closest', x, y, var,
1667
+ *(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
1668
+ else
1669
+ bool(tk_send('bar', 'closest', x, y, var,
1670
+ *(args.collect{|id| tagid(id)})))
1671
+ end
1672
+ end
1673
+ def bar_deactivate(*ids)
1674
+ tk_send('bar', 'deactivate', *(ids.collect{|id| tagid(id)}))
1675
+ self
1676
+ end
1677
+ def bar_delete(*ids)
1678
+ tk_send('bar', 'delete', *(ids.collect{|id| tagid(id)}))
1679
+ self
1680
+ end
1681
+ def bar_exist?(id)
1682
+ bool(tk_send('bar', 'exists', tagid(id)))
1683
+ end
1684
+ def bar_names(*pats)
1685
+ simplelist(tk_send('bar', 'names',
1686
+ *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
1687
+ Tk::BLT::PlotComponent::Element.id2obj(self, elem)
1688
+ }
1689
+ end
1690
+ def bar_show(*names)
1691
+ if names.empty?
1692
+ simplelist(tk_send('bar', 'show'))
1693
+ else
1694
+ tk_send('bar', 'show', *(names.collect{|n| tagid(n)}))
1695
+ self
1696
+ end
1697
+ end
1698
+ def bar_type(id)
1699
+ tk_send('bar', 'type', tagid(id))
1700
+ end
1701
+
1702
+ ###################
1703
+
1704
+ def line_create(id=nil, keys={})
1705
+ # tk_send('line', 'create', tagid(id), keys)
1706
+ Tk::BLT::PlotComponent::Line.new(self, tagid(id), keys)
1707
+ end
1708
+ alias bar line_create
1709
+ def line_activate(*args)
1710
+ if args.empty?
1711
+ list(tk_send('line', 'activate')).collect{|elem|
1712
+ Tk::BLT::PlotComponent::Element.id2obj(self, elem)
1713
+ }
1714
+ else
1715
+ # id, *indices
1716
+ id = args.shift
1717
+ tk_send('line', 'activate', tagid(id), *args)
1718
+ end
1719
+ end
1720
+ def line_closest(x, y, var, *args)
1721
+ if args[-1].kind_of?(Hash)
1722
+ keys = args.pop
1723
+ bool(tk_send('line', 'closest', x, y, var,
1724
+ *(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
1725
+ else
1726
+ bool(tk_send('line', 'closest', x, y, var,
1727
+ *(args.collect{|id| tagid(id)})))
1728
+ end
1729
+ end
1730
+ def line_deactivate(*ids)
1731
+ tk_send('line', 'deactivate', *(ids.collect{|id| tagid(id)}))
1732
+ self
1733
+ end
1734
+ def line_delete(*ids)
1735
+ tk_send('line', 'delete', *(ids.collect{|id| tagid(id)}))
1736
+ self
1737
+ end
1738
+ def line_exist?(id)
1739
+ bool(tk_send('line', 'exists', tagid(id)))
1740
+ end
1741
+ def line_names(*pats)
1742
+ simplelist(tk_send('line', 'names',
1743
+ *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
1744
+ Tk::BLT::PlotComponent::Element.id2obj(self, elem)
1745
+ }
1746
+ end
1747
+ def line_show(*names)
1748
+ if names.empty?
1749
+ simplelist(tk_send('line', 'show'))
1750
+ else
1751
+ tk_send('line', 'show', *(names.collect{|n| tagid(n)}))
1752
+ self
1753
+ end
1754
+ end
1755
+ def line_type(id)
1756
+ tk_send('line', 'type', tagid(id))
1757
+ end
1758
+
1759
+ ###################
1760
+
1761
+ def gridline_off
1762
+ tk_send_without_enc('grid', 'off')
1763
+ self
1764
+ end
1765
+ def gridline_on
1766
+ tk_send_without_enc('grid', 'on')
1767
+ self
1768
+ end
1769
+ def gridline_toggle
1770
+ tk_send_without_enc('grid', 'toggle')
1771
+ self
1772
+ end
1773
+
1774
+ ###################
1775
+
1776
+ def legend_window_create(parent=nil, keys=nil)
1777
+ if parent.kind_of?(Hash)
1778
+ keys = _symbolkey2str(parent)
1779
+ parent = keys.delete('parent')
1780
+ widgetname = keys.delete('widgetname')
1781
+ keys.delete('without_creating')
1782
+ elsif keys
1783
+ keys = _symbolkey2str(keys)
1784
+ widgetname = keys.delete('widgetname')
1785
+ keys.delete('without_creating')
1786
+ end
1787
+
1788
+ legend = self.class.new(parent, :without_creating=>true,
1789
+ :widgetname=>widgetname)
1790
+ class << legend
1791
+ def __destroy_hook__
1792
+ TkCore::INTERP.tk_windows.delete(@path)
1793
+ end
1794
+ end
1795
+
1796
+ if keys
1797
+ self.legend_configure(keys.update('position'=>legend))
1798
+ else
1799
+ self.legend_configure('position'=>legend)
1800
+ end
1801
+ legend
1802
+ end
1803
+
1804
+ def legend_activate(*pats)
1805
+ list(tk_send('legend', 'activate',
1806
+ *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
1807
+ Tk::BLT::PlotComponent::Element.id2obj(self, elem)
1808
+ }
1809
+ end
1810
+ def legend_deactivate(*pats)
1811
+ list(tk_send('legend', 'deactivate',
1812
+ *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
1813
+ Tk::BLT::PlotComponent::Element.id2obj(self, elem)
1814
+ }
1815
+ end
1816
+ def legend_get(pos, y=nil)
1817
+ if y
1818
+ Tk::BLT::PlotComponent::Element.id2obj(self,
1819
+ tk_send('legend', 'get',
1820
+ _at(pos, y)))
1821
+ else
1822
+ Tk::BLT::PlotComponent::Element.id2obj(self,
1823
+ tk_send('legend', 'get', pos))
1824
+ end
1825
+ end
1826
+
1827
+ ###################
1828
+
1829
+ def pen_create(id=nil, keys={})
1830
+ # tk_send('pen', 'create', tagid(id), keys)
1831
+ Tk::BLT::PlotComponent::Pen.new(self, tagid(id), keys)
1832
+ end
1833
+ def pen_delete(*ids)
1834
+ tk_send('pen', 'delete', *(ids.collect{|id| tagid(id)}))
1835
+ self
1836
+ end
1837
+ def pen_names(*pats)
1838
+ simplelist(tk_send('pen', 'names',
1839
+ *(pats.collect{|pat| tagid(pat)}))).collect{|pen|
1840
+ Tk::BLT::PlotComponent::Pen.id2obj(self, pen)
1841
+ }
1842
+ end
1843
+
1844
+ ###################
1845
+
1846
+ def postscript_output(file=nil, keys={})
1847
+ if file.kind_of?(Hash)
1848
+ keys = file
1849
+ file = nil
1850
+ end
1851
+
1852
+ if file
1853
+ tk_send('postscript', 'output', file, keys)
1854
+ self
1855
+ else
1856
+ tk_send('postscript', 'output', keys)
1857
+ end
1858
+ end
1859
+
1860
+ ###################
1861
+
1862
+ def marker_create(type, keys={})
1863
+ case type
1864
+ when :text, 'text'
1865
+ Tk::BLT::PlotComponent::TextMarker.new(self, keys)
1866
+ when :line, 'line'
1867
+ Tk::BLT::PlotComponent::LineMarker.new(self, keys)
1868
+ when :bitmap, 'bitmap'
1869
+ Tk::BLT::PlotComponent::BitmapMarker.new(self, keys)
1870
+ when :image, 'image'
1871
+ Tk::BLT::PlotComponent::ImageMarker.new(self, keys)
1872
+ when :polygon, 'polygon'
1873
+ Tk::BLT::PlotComponent::PolygonMarker.new(self, keys)
1874
+ when :window, 'window'
1875
+ Tk::BLT::PlotComponent::WindowMarker.new(self, keys)
1876
+ else
1877
+ if type.kind_of?(Tk::BLT::PlotComponent::Marker)
1878
+ type.new(self, keys)
1879
+ else
1880
+ Tk::BLT::PlotComponent::Marker.create_type(self, type, keys)
1881
+ end
1882
+ end
1883
+ end
1884
+ def marker_after(id, target=nil)
1885
+ if target
1886
+ tk_send_without_enc('marker', 'after', tagid(id), tagid(target))
1887
+ else
1888
+ tk_send_without_enc('marker', 'after', tagid(id))
1889
+ end
1890
+ self
1891
+ end
1892
+ def marker_before(id, target=None)
1893
+ if target
1894
+ tk_send_without_enc('marker', 'before', tagid(id), tagid(target))
1895
+ else
1896
+ tk_send_without_enc('marker', 'before', tagid(id))
1897
+ end
1898
+ self
1899
+ end
1900
+ def marker_delete(*ids)
1901
+ tk_send('marker', 'delete', *(ids.collect{|id| tagid(id)}))
1902
+ self
1903
+ end
1904
+ def marker_exist?(id)
1905
+ bool(tk_send('marker', 'exists', tagid(id)))
1906
+ end
1907
+ def marker_names(*pats)
1908
+ simplelist(tk_send('marker', 'names',
1909
+ *(pats.collect{|pat| tagid(pat)}))).collect{|id|
1910
+ Tk::BLT::PlotComponent::Marker.id2obj(self, id)
1911
+ }
1912
+ end
1913
+ def marker_type(id)
1914
+ tk_send('marker', 'type', tagid(id))
1915
+ end
1916
+
1917
+ ###################
1918
+
1919
+ def xaxis_cget_tkstring(option)
1920
+ itemcget_tkstring('xaxis', option)
1921
+ end
1922
+ def xaxis_cget(option)
1923
+ itemcget('xaxis', option)
1924
+ end
1925
+ def xaxis_cget_strict(option)
1926
+ itemcget_strict('xaxis', option)
1927
+ end
1928
+ def xaxis_configure(slot, value=None)
1929
+ if slot.kind_of?(Hash)
1930
+ slot = _symbolkey2str(slot)
1931
+ if cmd = slot.delete('command')
1932
+ slot['command'] = proc{|w, tick|
1933
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
1934
+ }
1935
+ end
1936
+ elsif slot == :command || slot == 'command'
1937
+ cmd = value
1938
+ value = proc{|w, tick|
1939
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
1940
+ }
1941
+ end
1942
+ itemconfigure('xaxis', slot, value)
1943
+ end
1944
+ def xaxis_configinfo(slot=nil)
1945
+ itemconfiginfo('xaxis', slot)
1946
+ end
1947
+ def current_xaxis_configinfo(slot=nil)
1948
+ current_itemconfiginfo('xaxis', slot)
1949
+ end
1950
+ def xaxis_bind(context, *args)
1951
+ if TkComm._callback_entry?(args[0]) || !block_given?
1952
+ cmd = args.shift
1953
+ else
1954
+ cmd = Proc.new
1955
+ end
1956
+ _bind([path, 'xaxis', 'bind'], context, cmd, *args)
1957
+ self
1958
+ end
1959
+ def xaxis_bind_append(context, *args)
1960
+ if TkComm._callback_entry?(args[0]) || !block_given?
1961
+ cmd = args.shift
1962
+ else
1963
+ cmd = Proc.new
1964
+ end
1965
+ _bind_append([path, 'xaxis', 'bind'], context, cmd, *args)
1966
+ self
1967
+ end
1968
+ def xaxis_bind_remove(context)
1969
+ _bind_remove([path, 'xaxis', 'bind'], context)
1970
+ self
1971
+ end
1972
+ def xaxis_bindinfo(context=nil)
1973
+ _bindinfo([path, 'xaxis', 'bind'], context)
1974
+ end
1975
+ def xaxis_invtransform(val)
1976
+ list(tk_send('xaxis', 'invtransform', val))
1977
+ end
1978
+ def xaxis_limits
1979
+ list(tk_send('xaxis', 'limits'))
1980
+ end
1981
+ def xaxis_transform(val)
1982
+ list(tk_send('xaxis', 'transform', val))
1983
+ end
1984
+ def xaxis_use(target=nil)
1985
+ if target
1986
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
1987
+ tk_send('xaxis', 'use',
1988
+ tagid(target)))
1989
+ else
1990
+ Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('xaxis', 'use'))
1991
+ end
1992
+ end
1993
+
1994
+ def x2axis_cget_tkstring(option)
1995
+ itemcget_tkstring('x2axis', option)
1996
+ end
1997
+ def x2axis_cget(option)
1998
+ itemcget('x2axis', option)
1999
+ end
2000
+ def x2axis_cget_strict(option)
2001
+ itemcget_strict('x2axis', option)
2002
+ end
2003
+ def x2axis_configure(slot, value=None)
2004
+ if slot.kind_of?(Hash)
2005
+ slot = _symbolkey2str(slot)
2006
+ if cmd = slot.delete('command')
2007
+ slot['command'] = proc{|w, tick|
2008
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
2009
+ }
2010
+ end
2011
+ elsif slot == :command || slot == 'command'
2012
+ cmd = value
2013
+ value = proc{|w, tick|
2014
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
2015
+ }
2016
+ end
2017
+ itemconfigure('x2axis', slot, value)
2018
+ end
2019
+ def x2axis_configinfo(slot=nil)
2020
+ itemconfiginfo('x2axis', slot)
2021
+ end
2022
+ def current_x2axis_configinfo(slot=nil)
2023
+ current_itemconfiginfo('x2axis', slot)
2024
+ end
2025
+ def x2axis_bind(context, *args)
2026
+ if TkComm._callback_entry?(args[0]) || !block_given?
2027
+ cmd = args.shift
2028
+ else
2029
+ cmd = Proc.new
2030
+ end
2031
+ _bind([path, 'x2axis', 'bind'], context, cmd, *args)
2032
+ self
2033
+ end
2034
+ def x2axis_bind_append(context, *args)
2035
+ if TkComm._callback_entry?(args[0]) || !block_given?
2036
+ cmd = args.shift
2037
+ else
2038
+ cmd = Proc.new
2039
+ end
2040
+ _bind_append([path, 'x2axis', 'bind'], context, cmd, *args)
2041
+ self
2042
+ end
2043
+ def x2axis_bind_remove(context)
2044
+ _bind_remove([path, 'x2axis', 'bind'], context)
2045
+ self
2046
+ end
2047
+ def x2axis_bindinfo(context=nil)
2048
+ _bindinfo([path, 'x2axis', 'bind'], context)
2049
+ end
2050
+ def x2axis_invtransform(val)
2051
+ list(tk_send('x2axis', 'invtransform', val))
2052
+ end
2053
+ def x2axis_limits
2054
+ list(tk_send('x2axis', 'limits'))
2055
+ end
2056
+ def x2axis_transform(val)
2057
+ list(tk_send('x2axis', 'transform', val))
2058
+ end
2059
+ def x2axis_use(target=nil)
2060
+ if target
2061
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
2062
+ tk_send('x2axis', 'use',
2063
+ tagid(target)))
2064
+ else
2065
+ Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('x2axis', 'use'))
2066
+ end
2067
+ end
2068
+
2069
+ def yaxis_cget_tkstring(option)
2070
+ itemcget_tkstring('yaxis', option)
2071
+ end
2072
+ def yaxis_cget(option)
2073
+ itemcget('yaxis', option)
2074
+ end
2075
+ def yaxis_cget_strict(option)
2076
+ itemcget_strict('yaxis', option)
2077
+ end
2078
+ def yaxis_configure(slot, value=None)
2079
+ if slot.kind_of?(Hash)
2080
+ slot = _symbolkey2str(slot)
2081
+ if cmd = slot.delete('command')
2082
+ slot['command'] = proc{|w, tick|
2083
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
2084
+ }
2085
+ end
2086
+ elsif slot == :command || slot == 'command'
2087
+ cmd = value
2088
+ value = proc{|w, tick|
2089
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
2090
+ }
2091
+ end
2092
+ itemconfigure('yaxis', slot, value)
2093
+ end
2094
+ def yaxis_configinfo(slot=nil)
2095
+ itemconfiginfo('yaxis', slot)
2096
+ end
2097
+ def current_yaxis_configinfo(slot=nil)
2098
+ current_itemconfiginfo('yaxis', slot)
2099
+ end
2100
+ def yaxis_bind(context, *args)
2101
+ if TkComm._callback_entry?(args[0]) || !block_given?
2102
+ cmd = args.shift
2103
+ else
2104
+ cmd = Proc.new
2105
+ end
2106
+ _bind([path, 'yaxis', 'bind'], context, cmd, *args)
2107
+ self
2108
+ end
2109
+ def yaxis_bind_append(context, *args)
2110
+ if TkComm._callback_entry?(args[0]) || !block_given?
2111
+ cmd = args.shift
2112
+ else
2113
+ cmd = Proc.new
2114
+ end
2115
+ _bind_append([path, 'yaxis', 'bind'], context, cmd, *args)
2116
+ self
2117
+ end
2118
+ def yaxis_bind_remove(context)
2119
+ _bind_remove([path, 'yaxis', 'bind'], context)
2120
+ self
2121
+ end
2122
+ def yaxis_bindinfo(context=nil)
2123
+ _bindinfo([path, 'yaxis', 'bind'], context)
2124
+ end
2125
+ def yaxis_invtransform(val)
2126
+ list(tk_send('yaxis', 'invtransform', val))
2127
+ end
2128
+ def yaxis_limits
2129
+ list(tk_send('yaxis', 'limits'))
2130
+ end
2131
+ def yaxis_transform(val)
2132
+ list(tk_send('yaxis', 'transform', val))
2133
+ end
2134
+ def yaxis_use(target=nil)
2135
+ if target
2136
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
2137
+ tk_send('yaxis', 'use',
2138
+ tagid(target)))
2139
+ else
2140
+ Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('yaxis', 'use'))
2141
+ end
2142
+ end
2143
+
2144
+ def y2axis_cget_tkstring(option)
2145
+ itemcget_tkstring('y2axis', option)
2146
+ end
2147
+ def y2axis_cget(option)
2148
+ itemcget('y2axis', option)
2149
+ end
2150
+ def y2axis_cget_strict(option)
2151
+ itemcget_strict('y2axis', option)
2152
+ end
2153
+ def y2axis_configure(slot, value=None)
2154
+ if slot.kind_of?(Hash)
2155
+ slot = _symbolkey2str(slot)
2156
+ if cmd = slot.delete('command')
2157
+ slot['command'] = proc{|w, tick|
2158
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
2159
+ }
2160
+ end
2161
+ elsif slot == :command || slot == 'command'
2162
+ cmd = value
2163
+ value = proc{|w, tick|
2164
+ cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
2165
+ }
2166
+ end
2167
+ itemconfigure('y2axis', slot, value)
2168
+ end
2169
+ def y2axis_configinfo(slot=nil)
2170
+ axis_configinfo('y2axis', slot)
2171
+ end
2172
+ def current_y2axis_configinfo(slot=nil)
2173
+ current_itemconfiginfo('y2axis', slot)
2174
+ end
2175
+ def y2axis_bind(context, *args)
2176
+ if TkComm._callback_entry?(args[0]) || !block_given?
2177
+ cmd = args.shift
2178
+ else
2179
+ cmd = Proc.new
2180
+ end
2181
+ _bind([path, 'y2axis', 'bind'], context, cmd, *args)
2182
+ self
2183
+ end
2184
+ def y2axis_bind_append(context, *args)
2185
+ if TkComm._callback_entry?(args[0]) || !block_given?
2186
+ cmd = args.shift
2187
+ else
2188
+ cmd = Proc.new
2189
+ end
2190
+ _bind_append([path, 'y2axis', 'bind'], context, cmd, *args)
2191
+ self
2192
+ end
2193
+ def y2axis_bind_remove(context)
2194
+ _bind_remove([path, 'y2axis', 'bind'], context)
2195
+ self
2196
+ end
2197
+ def y2axis_bindinfo(context=nil)
2198
+ _bindinfo([path, 'y2axis', 'bind'], context)
2199
+ end
2200
+ def y2axis_invtransform(val)
2201
+ list(tk_send('y2axis', 'invtransform', val))
2202
+ end
2203
+ def y2axis_limits
2204
+ list(tk_send('y2axis', 'limits'))
2205
+ end
2206
+ def y2axis_transform(val)
2207
+ list(tk_send('y2axis', 'transform', val))
2208
+ end
2209
+ def y2axis_use(target=nil)
2210
+ if target
2211
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
2212
+ tk_send('y2axis', 'use',
2213
+ tagid(target)))
2214
+ else
2215
+ Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('y2axis', 'use'))
2216
+ end
2217
+ end
2218
+ end
2219
+ end