tk-win 0.2.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +46 -0
- data/VERSION +1 -0
- data/lib/tcltk.rb +367 -0
- data/lib/tk.rb +5682 -0
- data/lib/tk/after.rb +6 -0
- data/lib/tk/autoload.rb +760 -0
- data/lib/tk/bgerror.rb +29 -0
- data/lib/tk/bindtag.rb +138 -0
- data/lib/tk/button.rb +31 -0
- data/lib/tk/canvas.rb +816 -0
- data/lib/tk/canvastag.rb +459 -0
- data/lib/tk/checkbutton.rb +32 -0
- data/lib/tk/clipboard.rb +75 -0
- data/lib/tk/clock.rb +71 -0
- data/lib/tk/composite.rb +484 -0
- data/lib/tk/console.rb +52 -0
- data/lib/tk/dialog.rb +326 -0
- data/lib/tk/encodedstr.rb +187 -0
- data/lib/tk/entry.rb +120 -0
- data/lib/tk/event.rb +562 -0
- data/lib/tk/font.rb +2351 -0
- data/lib/tk/frame.rb +132 -0
- data/lib/tk/grid.rb +279 -0
- data/lib/tk/image.rb +275 -0
- data/lib/tk/itemconfig.rb +1222 -0
- data/lib/tk/itemfont.rb +327 -0
- data/lib/tk/kinput.rb +71 -0
- data/lib/tk/label.rb +22 -0
- data/lib/tk/labelframe.rb +31 -0
- data/lib/tk/listbox.rb +284 -0
- data/lib/tk/macpkg.rb +80 -0
- data/lib/tk/menu.rb +718 -0
- data/lib/tk/menubar.rb +137 -0
- data/lib/tk/menuspec.rb +456 -0
- data/lib/tk/message.rb +24 -0
- data/lib/tk/mngfocus.rb +33 -0
- data/lib/tk/msgcat.rb +296 -0
- data/lib/tk/namespace.rb +551 -0
- data/lib/tk/optiondb.rb +377 -0
- data/lib/tk/optionobj.rb +212 -0
- data/lib/tk/pack.rb +107 -0
- data/lib/tk/package.rb +143 -0
- data/lib/tk/palette.rb +55 -0
- data/lib/tk/panedwindow.rb +260 -0
- data/lib/tk/place.rb +128 -0
- data/lib/tk/radiobutton.rb +73 -0
- data/lib/tk/root.rb +95 -0
- data/lib/tk/scale.rb +112 -0
- data/lib/tk/scrollable.rb +82 -0
- data/lib/tk/scrollbar.rb +183 -0
- data/lib/tk/scrollbox.rb +39 -0
- data/lib/tk/selection.rb +86 -0
- data/lib/tk/spinbox.rb +144 -0
- data/lib/tk/tagfont.rb +43 -0
- data/lib/tk/text.rb +1604 -0
- data/lib/tk/textimage.rb +88 -0
- data/lib/tk/textmark.rb +204 -0
- data/lib/tk/texttag.rb +321 -0
- data/lib/tk/textwindow.rb +154 -0
- data/lib/tk/timer.rb +669 -0
- data/lib/tk/toplevel.rb +264 -0
- data/lib/tk/ttk_selector.rb +98 -0
- data/lib/tk/txtwin_abst.rb +39 -0
- data/lib/tk/validation.rb +397 -0
- data/lib/tk/variable.rb +1799 -0
- data/lib/tk/virtevent.rb +139 -0
- data/lib/tk/winfo.rb +392 -0
- data/lib/tk/winpkg.rb +156 -0
- data/lib/tk/wm.rb +552 -0
- data/lib/tk/xim.rb +122 -0
- data/lib/tkafter.rb +4 -0
- data/lib/tkbgerror.rb +4 -0
- data/lib/tkcanvas.rb +4 -0
- data/lib/tkclass.rb +47 -0
- data/lib/tkconsole.rb +4 -0
- data/lib/tkdialog.rb +4 -0
- data/lib/tkentry.rb +4 -0
- data/lib/tkextlib/ICONS.rb +13 -0
- data/lib/tkextlib/ICONS/icons.rb +129 -0
- data/lib/tkextlib/ICONS/setup.rb +8 -0
- data/lib/tkextlib/SUPPORT_STATUS +198 -0
- data/lib/tkextlib/blt.rb +189 -0
- data/lib/tkextlib/blt/barchart.rb +79 -0
- data/lib/tkextlib/blt/bitmap.rb +112 -0
- data/lib/tkextlib/blt/busy.rb +83 -0
- data/lib/tkextlib/blt/component.rb +2218 -0
- data/lib/tkextlib/blt/container.rb +28 -0
- data/lib/tkextlib/blt/cutbuffer.rb +23 -0
- data/lib/tkextlib/blt/dragdrop.rb +269 -0
- data/lib/tkextlib/blt/eps.rb +32 -0
- data/lib/tkextlib/blt/graph.rb +67 -0
- data/lib/tkextlib/blt/htext.rb +112 -0
- data/lib/tkextlib/blt/setup.rb +8 -0
- data/lib/tkextlib/blt/spline.rb +23 -0
- data/lib/tkextlib/blt/stripchart.rb +74 -0
- data/lib/tkextlib/blt/table.rb +412 -0
- data/lib/tkextlib/blt/tabnotebook.rb +110 -0
- data/lib/tkextlib/blt/tabset.rb +504 -0
- data/lib/tkextlib/blt/ted.rb +68 -0
- data/lib/tkextlib/blt/tile.rb +25 -0
- data/lib/tkextlib/blt/tile/button.rb +16 -0
- data/lib/tkextlib/blt/tile/checkbutton.rb +17 -0
- data/lib/tkextlib/blt/tile/frame.rb +16 -0
- data/lib/tkextlib/blt/tile/label.rb +16 -0
- data/lib/tkextlib/blt/tile/radiobutton.rb +17 -0
- data/lib/tkextlib/blt/tile/scrollbar.rb +16 -0
- data/lib/tkextlib/blt/tile/toplevel.rb +16 -0
- data/lib/tkextlib/blt/tree.rb +1058 -0
- data/lib/tkextlib/blt/treeview.rb +1287 -0
- data/lib/tkextlib/blt/unix_dnd.rb +141 -0
- data/lib/tkextlib/blt/vector.rb +256 -0
- data/lib/tkextlib/blt/watch.rb +175 -0
- data/lib/tkextlib/blt/win_printer.rb +61 -0
- data/lib/tkextlib/blt/winop.rb +107 -0
- data/lib/tkextlib/bwidget.rb +153 -0
- data/lib/tkextlib/bwidget/arrowbutton.rb +21 -0
- data/lib/tkextlib/bwidget/bitmap.rb +21 -0
- data/lib/tkextlib/bwidget/button.rb +31 -0
- data/lib/tkextlib/bwidget/buttonbox.rb +90 -0
- data/lib/tkextlib/bwidget/combobox.rb +62 -0
- data/lib/tkextlib/bwidget/dialog.rb +194 -0
- data/lib/tkextlib/bwidget/dragsite.rb +31 -0
- data/lib/tkextlib/bwidget/dropsite.rb +39 -0
- data/lib/tkextlib/bwidget/dynamichelp.rb +63 -0
- data/lib/tkextlib/bwidget/entry.rb +43 -0
- data/lib/tkextlib/bwidget/label.rb +41 -0
- data/lib/tkextlib/bwidget/labelentry.rb +80 -0
- data/lib/tkextlib/bwidget/labelframe.rb +52 -0
- data/lib/tkextlib/bwidget/listbox.rb +361 -0
- data/lib/tkextlib/bwidget/mainframe.rb +132 -0
- data/lib/tkextlib/bwidget/messagedlg.rb +192 -0
- data/lib/tkextlib/bwidget/notebook.rb +166 -0
- data/lib/tkextlib/bwidget/pagesmanager.rb +73 -0
- data/lib/tkextlib/bwidget/panedwindow.rb +42 -0
- data/lib/tkextlib/bwidget/panelframe.rb +67 -0
- data/lib/tkextlib/bwidget/passwddlg.rb +44 -0
- data/lib/tkextlib/bwidget/progressbar.rb +20 -0
- data/lib/tkextlib/bwidget/progressdlg.rb +58 -0
- data/lib/tkextlib/bwidget/scrollableframe.rb +40 -0
- data/lib/tkextlib/bwidget/scrolledwindow.rb +48 -0
- data/lib/tkextlib/bwidget/scrollview.rb +25 -0
- data/lib/tkextlib/bwidget/selectcolor.rb +73 -0
- data/lib/tkextlib/bwidget/selectfont.rb +91 -0
- data/lib/tkextlib/bwidget/separator.rb +20 -0
- data/lib/tkextlib/bwidget/setup.rb +8 -0
- data/lib/tkextlib/bwidget/spinbox.rb +98 -0
- data/lib/tkextlib/bwidget/statusbar.rb +62 -0
- data/lib/tkextlib/bwidget/titleframe.rb +33 -0
- data/lib/tkextlib/bwidget/tree.rb +500 -0
- data/lib/tkextlib/bwidget/widget.rb +129 -0
- data/lib/tkextlib/itcl.rb +13 -0
- data/lib/tkextlib/itcl/incr_tcl.rb +178 -0
- data/lib/tkextlib/itcl/setup.rb +13 -0
- data/lib/tkextlib/itk.rb +13 -0
- data/lib/tkextlib/itk/incr_tk.rb +446 -0
- data/lib/tkextlib/itk/setup.rb +13 -0
- data/lib/tkextlib/iwidgets.rb +94 -0
- data/lib/tkextlib/iwidgets/buttonbox.rb +121 -0
- data/lib/tkextlib/iwidgets/calendar.rb +125 -0
- data/lib/tkextlib/iwidgets/canvasprintbox.rb +53 -0
- data/lib/tkextlib/iwidgets/canvasprintdialog.rb +38 -0
- data/lib/tkextlib/iwidgets/checkbox.rb +130 -0
- data/lib/tkextlib/iwidgets/combobox.rb +104 -0
- data/lib/tkextlib/iwidgets/dateentry.rb +20 -0
- data/lib/tkextlib/iwidgets/datefield.rb +58 -0
- data/lib/tkextlib/iwidgets/dialog.rb +20 -0
- data/lib/tkextlib/iwidgets/dialogshell.rb +121 -0
- data/lib/tkextlib/iwidgets/disjointlistbox.rb +50 -0
- data/lib/tkextlib/iwidgets/entryfield.rb +185 -0
- data/lib/tkextlib/iwidgets/extbutton.rb +40 -0
- data/lib/tkextlib/iwidgets/extfileselectionbox.rb +46 -0
- data/lib/tkextlib/iwidgets/extfileselectiondialog.rb +33 -0
- data/lib/tkextlib/iwidgets/feedback.rb +35 -0
- data/lib/tkextlib/iwidgets/fileselectionbox.rb +46 -0
- data/lib/tkextlib/iwidgets/fileselectiondialog.rb +33 -0
- data/lib/tkextlib/iwidgets/finddialog.rb +42 -0
- data/lib/tkextlib/iwidgets/hierarchy.rb +365 -0
- data/lib/tkextlib/iwidgets/hyperhelp.rb +50 -0
- data/lib/tkextlib/iwidgets/labeledframe.rb +39 -0
- data/lib/tkextlib/iwidgets/labeledwidget.rb +45 -0
- data/lib/tkextlib/iwidgets/mainwindow.rb +67 -0
- data/lib/tkextlib/iwidgets/menubar.rb +212 -0
- data/lib/tkextlib/iwidgets/messagebox.rb +93 -0
- data/lib/tkextlib/iwidgets/messagedialog.rb +20 -0
- data/lib/tkextlib/iwidgets/notebook.rb +175 -0
- data/lib/tkextlib/iwidgets/optionmenu.rb +92 -0
- data/lib/tkextlib/iwidgets/panedwindow.rb +134 -0
- data/lib/tkextlib/iwidgets/promptdialog.rb +131 -0
- data/lib/tkextlib/iwidgets/pushbutton.rb +35 -0
- data/lib/tkextlib/iwidgets/radiobox.rb +121 -0
- data/lib/tkextlib/iwidgets/scopedobject.rb +24 -0
- data/lib/tkextlib/iwidgets/scrolledcanvas.rb +353 -0
- data/lib/tkextlib/iwidgets/scrolledframe.rb +59 -0
- data/lib/tkextlib/iwidgets/scrolledhtml.rb +58 -0
- data/lib/tkextlib/iwidgets/scrolledlistbox.rb +207 -0
- data/lib/tkextlib/iwidgets/scrolledtext.rb +568 -0
- data/lib/tkextlib/iwidgets/scrolledwidget.rb +20 -0
- data/lib/tkextlib/iwidgets/selectionbox.rb +102 -0
- data/lib/tkextlib/iwidgets/selectiondialog.rb +92 -0
- data/lib/tkextlib/iwidgets/setup.rb +8 -0
- data/lib/tkextlib/iwidgets/shell.rb +38 -0
- data/lib/tkextlib/iwidgets/spindate.rb +48 -0
- data/lib/tkextlib/iwidgets/spinint.rb +30 -0
- data/lib/tkextlib/iwidgets/spinner.rb +169 -0
- data/lib/tkextlib/iwidgets/spintime.rb +48 -0
- data/lib/tkextlib/iwidgets/tabnotebook.rb +181 -0
- data/lib/tkextlib/iwidgets/tabset.rb +145 -0
- data/lib/tkextlib/iwidgets/timeentry.rb +25 -0
- data/lib/tkextlib/iwidgets/timefield.rb +58 -0
- data/lib/tkextlib/iwidgets/toolbar.rb +112 -0
- data/lib/tkextlib/iwidgets/watch.rb +56 -0
- data/lib/tkextlib/pkg_checker.rb +184 -0
- data/lib/tkextlib/setup.rb +8 -0
- data/lib/tkextlib/tcllib.rb +105 -0
- data/lib/tkextlib/tcllib/autoscroll.rb +158 -0
- data/lib/tkextlib/tcllib/ctext.rb +160 -0
- data/lib/tkextlib/tcllib/cursor.rb +97 -0
- data/lib/tkextlib/tcllib/datefield.rb +57 -0
- data/lib/tkextlib/tcllib/dialog.rb +84 -0
- data/lib/tkextlib/tcllib/getstring.rb +134 -0
- data/lib/tkextlib/tcllib/history.rb +73 -0
- data/lib/tkextlib/tcllib/ico.rb +146 -0
- data/lib/tkextlib/tcllib/ip_entry.rb +75 -0
- data/lib/tkextlib/tcllib/panelframe.rb +78 -0
- data/lib/tkextlib/tcllib/plotchart.rb +1404 -0
- data/lib/tkextlib/tcllib/ruler.rb +65 -0
- data/lib/tkextlib/tcllib/screenruler.rb +68 -0
- data/lib/tkextlib/tcllib/scrollwin.rb +61 -0
- data/lib/tkextlib/tcllib/setup.rb +8 -0
- data/lib/tkextlib/tcllib/style.rb +61 -0
- data/lib/tkextlib/tcllib/superframe.rb +51 -0
- data/lib/tkextlib/tcllib/swaplist.rb +150 -0
- data/lib/tkextlib/tcllib/tablelist.rb +28 -0
- data/lib/tkextlib/tcllib/tablelist_core.rb +1072 -0
- data/lib/tkextlib/tcllib/tablelist_tile.rb +43 -0
- data/lib/tkextlib/tcllib/tkpiechart.rb +314 -0
- data/lib/tkextlib/tcllib/tooltip.rb +104 -0
- data/lib/tkextlib/tcllib/widget.rb +82 -0
- data/lib/tkextlib/tclx.rb +13 -0
- data/lib/tkextlib/tclx/setup.rb +8 -0
- data/lib/tkextlib/tclx/tclx.rb +74 -0
- data/lib/tkextlib/tile.rb +449 -0
- data/lib/tkextlib/tile/dialog.rb +102 -0
- data/lib/tkextlib/tile/setup.rb +8 -0
- data/lib/tkextlib/tile/sizegrip.rb +32 -0
- data/lib/tkextlib/tile/style.rb +336 -0
- data/lib/tkextlib/tile/tbutton.rb +34 -0
- data/lib/tkextlib/tile/tcheckbutton.rb +38 -0
- data/lib/tkextlib/tile/tcombobox.rb +55 -0
- data/lib/tkextlib/tile/tentry.rb +49 -0
- data/lib/tkextlib/tile/tframe.rb +34 -0
- data/lib/tkextlib/tile/tlabel.rb +34 -0
- data/lib/tkextlib/tile/tlabelframe.rb +38 -0
- data/lib/tkextlib/tile/tmenubutton.rb +38 -0
- data/lib/tkextlib/tile/tnotebook.rb +147 -0
- data/lib/tkextlib/tile/tpaned.rb +245 -0
- data/lib/tkextlib/tile/tprogressbar.rb +57 -0
- data/lib/tkextlib/tile/tradiobutton.rb +38 -0
- data/lib/tkextlib/tile/treeview.rb +1306 -0
- data/lib/tkextlib/tile/tscale.rb +56 -0
- data/lib/tkextlib/tile/tscrollbar.rb +63 -0
- data/lib/tkextlib/tile/tseparator.rb +34 -0
- data/lib/tkextlib/tile/tsquare.rb +30 -0
- data/lib/tkextlib/tkDND.rb +18 -0
- data/lib/tkextlib/tkDND/setup.rb +8 -0
- data/lib/tkextlib/tkDND/shape.rb +125 -0
- data/lib/tkextlib/tkDND/tkdnd.rb +182 -0
- data/lib/tkextlib/tkHTML.rb +13 -0
- data/lib/tkextlib/tkHTML/htmlwidget.rb +453 -0
- data/lib/tkextlib/tkHTML/setup.rb +8 -0
- data/lib/tkextlib/tkimg.rb +36 -0
- data/lib/tkextlib/tkimg/bmp.rb +33 -0
- data/lib/tkextlib/tkimg/gif.rb +33 -0
- data/lib/tkextlib/tkimg/ico.rb +33 -0
- data/lib/tkextlib/tkimg/jpeg.rb +33 -0
- data/lib/tkextlib/tkimg/pcx.rb +33 -0
- data/lib/tkextlib/tkimg/pixmap.rb +44 -0
- data/lib/tkextlib/tkimg/png.rb +33 -0
- data/lib/tkextlib/tkimg/ppm.rb +33 -0
- data/lib/tkextlib/tkimg/ps.rb +33 -0
- data/lib/tkextlib/tkimg/setup.rb +8 -0
- data/lib/tkextlib/tkimg/sgi.rb +33 -0
- data/lib/tkextlib/tkimg/sun.rb +33 -0
- data/lib/tkextlib/tkimg/tga.rb +33 -0
- data/lib/tkextlib/tkimg/tiff.rb +33 -0
- data/lib/tkextlib/tkimg/window.rb +33 -0
- data/lib/tkextlib/tkimg/xbm.rb +33 -0
- data/lib/tkextlib/tkimg/xpm.rb +33 -0
- data/lib/tkextlib/tktable.rb +14 -0
- data/lib/tkextlib/tktable/setup.rb +8 -0
- data/lib/tkextlib/tktable/tktable.rb +966 -0
- data/lib/tkextlib/tktrans.rb +14 -0
- data/lib/tkextlib/tktrans/setup.rb +8 -0
- data/lib/tkextlib/tktrans/tktrans.rb +64 -0
- data/lib/tkextlib/treectrl.rb +13 -0
- data/lib/tkextlib/treectrl/setup.rb +8 -0
- data/lib/tkextlib/treectrl/tktreectrl.rb +2522 -0
- data/lib/tkextlib/trofs.rb +13 -0
- data/lib/tkextlib/trofs/setup.rb +8 -0
- data/lib/tkextlib/trofs/trofs.rb +51 -0
- data/lib/tkextlib/version.rb +6 -0
- data/lib/tkextlib/vu.rb +48 -0
- data/lib/tkextlib/vu/bargraph.rb +61 -0
- data/lib/tkextlib/vu/charts.rb +53 -0
- data/lib/tkextlib/vu/dial.rb +102 -0
- data/lib/tkextlib/vu/pie.rb +286 -0
- data/lib/tkextlib/vu/setup.rb +8 -0
- data/lib/tkextlib/vu/spinbox.rb +22 -0
- data/lib/tkextlib/winico.rb +14 -0
- data/lib/tkextlib/winico/setup.rb +8 -0
- data/lib/tkextlib/winico/winico.rb +224 -0
- data/lib/tkfont.rb +4 -0
- data/lib/tkmacpkg.rb +4 -0
- data/lib/tkmenubar.rb +4 -0
- data/lib/tkmngfocus.rb +4 -0
- data/lib/tkpalette.rb +4 -0
- data/lib/tkscrollbox.rb +4 -0
- data/lib/tktext.rb +4 -0
- data/lib/tkvirtevent.rb +4 -0
- data/lib/tkwinpkg.rb +4 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/tk-win_spec.rb +7 -0
- data/tk-win.gemspec +373 -0
- metadata +412 -0
data/lib/tk/xim.rb
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
#
|
2
|
+
# tk/xim.rb : control imput_method
|
3
|
+
#
|
4
|
+
require 'tk'
|
5
|
+
|
6
|
+
module TkXIM
|
7
|
+
include Tk
|
8
|
+
extend Tk
|
9
|
+
|
10
|
+
TkCommandNames = ['imconfigure'.freeze].freeze
|
11
|
+
|
12
|
+
def TkXIM.useinputmethods(value = None, win = nil)
|
13
|
+
if value == None
|
14
|
+
if win
|
15
|
+
bool(tk_call_without_enc('tk', 'useinputmethods',
|
16
|
+
'-displayof', win))
|
17
|
+
else
|
18
|
+
bool(tk_call_without_enc('tk', 'useinputmethods'))
|
19
|
+
end
|
20
|
+
else
|
21
|
+
if win
|
22
|
+
bool(tk_call_without_enc('tk', 'useinputmethods',
|
23
|
+
'-displayof', win, value))
|
24
|
+
else
|
25
|
+
bool(tk_call_without_enc('tk', 'useinputmethods', value))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def TkXIM.useinputmethods_displayof(win, value = None)
|
31
|
+
TkXIM.useinputmethods(value, win)
|
32
|
+
end
|
33
|
+
|
34
|
+
def TkXIM.caret(win, keys=nil)
|
35
|
+
if keys
|
36
|
+
tk_call_without_enc('tk', 'caret', win, *hash_kv(keys))
|
37
|
+
self
|
38
|
+
else
|
39
|
+
lst = tk_split_list(tk_call_without_enc('tk', 'caret', win))
|
40
|
+
info = {}
|
41
|
+
while key = lst.shift
|
42
|
+
info[key[1..-1]] = lst.shift
|
43
|
+
end
|
44
|
+
info
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def TkXIM.configure(win, slot, value=None)
|
49
|
+
begin
|
50
|
+
if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK
|
51
|
+
if slot.kind_of? Hash
|
52
|
+
tk_call('imconfigure', win, *hash_kv(slot))
|
53
|
+
else
|
54
|
+
tk_call('imconfigure', win, "-#{slot}", value)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
rescue
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def TkXIM.configinfo(win, slot=nil)
|
62
|
+
if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
|
63
|
+
begin
|
64
|
+
if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK
|
65
|
+
if slot
|
66
|
+
conf = tk_split_list(tk_call('imconfigure', win, "-#{slot}"))
|
67
|
+
conf[0] = conf[0][1..-1]
|
68
|
+
conf
|
69
|
+
else
|
70
|
+
tk_split_list(tk_call('imconfigure', win)).collect{|conf|
|
71
|
+
conf[0] = conf[0][1..-1]
|
72
|
+
conf
|
73
|
+
}
|
74
|
+
end
|
75
|
+
else
|
76
|
+
[]
|
77
|
+
end
|
78
|
+
rescue
|
79
|
+
[]
|
80
|
+
end
|
81
|
+
else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
|
82
|
+
TkXIM.current_configinfo(win, slot)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
def TkXIM.current_configinfo(win, slot=nil)
|
87
|
+
begin
|
88
|
+
if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK
|
89
|
+
if slot
|
90
|
+
conf = tk_split_list(tk_call('imconfigure', win, "-#{slot}"))
|
91
|
+
{ conf[0][1..-1] => conf[1] }
|
92
|
+
else
|
93
|
+
ret = {}
|
94
|
+
tk_split_list(tk_call('imconfigure', win)).each{|conf|
|
95
|
+
ret[conf[0][1..-1]] = conf[1]
|
96
|
+
}
|
97
|
+
ret
|
98
|
+
end
|
99
|
+
else
|
100
|
+
{}
|
101
|
+
end
|
102
|
+
rescue
|
103
|
+
{}
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def useinputmethods(value=None)
|
108
|
+
TkXIM.useinputmethods(value, self)
|
109
|
+
end
|
110
|
+
|
111
|
+
def caret(keys=nil)
|
112
|
+
TkXIM.caret(self, keys=nil)
|
113
|
+
end
|
114
|
+
|
115
|
+
def imconfigure(slot, value=None)
|
116
|
+
TkXIM.configure(self, slot, value)
|
117
|
+
end
|
118
|
+
|
119
|
+
def imconfiginfo(slot=nil)
|
120
|
+
TkXIM.configinfo(self, slot)
|
121
|
+
end
|
122
|
+
end
|
data/lib/tkafter.rb
ADDED
data/lib/tkbgerror.rb
ADDED
data/lib/tkcanvas.rb
ADDED
data/lib/tkclass.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
#
|
2
|
+
# tkclass.rb - Tk classes
|
3
|
+
# Date: 2000/11/27 09:23:36
|
4
|
+
# by Yukihiro Matsumoto <matz@caelum.co.jp>
|
5
|
+
#
|
6
|
+
# $Id: tkclass.rb 25189 2009-10-02 12:04:37Z akr $
|
7
|
+
|
8
|
+
require "tk"
|
9
|
+
|
10
|
+
TopLevel = TkToplevel
|
11
|
+
Frame = TkFrame
|
12
|
+
Label = TkLabel
|
13
|
+
Button = TkButton
|
14
|
+
Radiobutton = TkRadioButton
|
15
|
+
Checkbutton = TkCheckButton
|
16
|
+
Message = TkMessage
|
17
|
+
Entry = TkEntry
|
18
|
+
Spinbox = TkSpinbox
|
19
|
+
Text = TkText
|
20
|
+
Scale = TkScale
|
21
|
+
Scrollbar = TkScrollbar
|
22
|
+
Listbox = TkListbox
|
23
|
+
Menu = TkMenu
|
24
|
+
Menubutton = TkMenubutton
|
25
|
+
Canvas = TkCanvas
|
26
|
+
Arc = TkcArc
|
27
|
+
Bitmap = TkcBitmap
|
28
|
+
Line = TkcLine
|
29
|
+
Oval = TkcOval
|
30
|
+
Polygon = TkcPolygon
|
31
|
+
Rectangle = TkcRectangle
|
32
|
+
TextItem = TkcText
|
33
|
+
WindowItem = TkcWindow
|
34
|
+
BitmapImage = TkBitmapImage
|
35
|
+
PhotoImage = TkPhotoImage
|
36
|
+
Selection = TkSelection
|
37
|
+
Winfo = TkWinfo
|
38
|
+
Pack = TkPack
|
39
|
+
Grid = TkGrid
|
40
|
+
Place = TkPlace
|
41
|
+
Variable = TkVariable
|
42
|
+
Font = TkFont
|
43
|
+
VirtualEvent = TkVirtualEvent
|
44
|
+
|
45
|
+
def Mainloop
|
46
|
+
Tk.mainloop
|
47
|
+
end
|
data/lib/tkconsole.rb
ADDED
data/lib/tkdialog.rb
ADDED
data/lib/tkentry.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#
|
2
|
+
# ICONS support
|
3
|
+
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
4
|
+
#
|
5
|
+
|
6
|
+
# call setup script for general 'tkextlib' libraries
|
7
|
+
require 'tkextlib/setup.rb'
|
8
|
+
|
9
|
+
# call setup script
|
10
|
+
require 'tkextlib/ICONS/setup.rb'
|
11
|
+
|
12
|
+
# load library
|
13
|
+
require 'tkextlib/ICONS/icons'
|
@@ -0,0 +1,129 @@
|
|
1
|
+
#
|
2
|
+
# tkextlib/ICONS/icons.rb
|
3
|
+
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
4
|
+
#
|
5
|
+
|
6
|
+
require 'tk'
|
7
|
+
|
8
|
+
# call setup script for general 'tkextlib' libraries
|
9
|
+
require 'tkextlib/setup.rb'
|
10
|
+
|
11
|
+
# call setup script
|
12
|
+
require 'tkextlib/ICONS/setup.rb'
|
13
|
+
|
14
|
+
# TkPackage.require('icons', '1.0')
|
15
|
+
TkPackage.require('icons')
|
16
|
+
|
17
|
+
module Tk
|
18
|
+
class ICONS < TkImage
|
19
|
+
extend Tk
|
20
|
+
|
21
|
+
PACKAGE_NAME = 'icons'.freeze
|
22
|
+
def self.package_name
|
23
|
+
PACKAGE_NAME
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.package_version
|
27
|
+
begin
|
28
|
+
TkPackage.require('icons')
|
29
|
+
rescue
|
30
|
+
''
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.create(*args) # icon, icon, ..., ?option=>value, ...?
|
35
|
+
if args[-1].kind_of?(Hash)
|
36
|
+
keys = args.pop
|
37
|
+
icons = simplelist(tk_call('::icons::icons', 'create',
|
38
|
+
*(hash_kv(keys) << (args.flatten))))
|
39
|
+
else
|
40
|
+
icons = simplelist(tk_call('::icons::icons', 'create',
|
41
|
+
args.flatten))
|
42
|
+
end
|
43
|
+
|
44
|
+
icons.collect{|icon| self.new(icon, :without_creating=>true)}
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.delete(*icons) # icon, icon, ...
|
48
|
+
icons = icons.flatten
|
49
|
+
return if icons.empty?
|
50
|
+
icons.map!{|icon|
|
51
|
+
if icon.kind_of?(Tk::ICONS)
|
52
|
+
Tk_IMGTBL.delete(icon.path)
|
53
|
+
icon.name
|
54
|
+
elsif icon.to_s =~ /^::icon::(.*)/
|
55
|
+
name = $1
|
56
|
+
Tk_IMGTBL.delete(icon)
|
57
|
+
name
|
58
|
+
else
|
59
|
+
Tk_IMGTBL.delete("::icon::#{icon}")
|
60
|
+
icon
|
61
|
+
end
|
62
|
+
}
|
63
|
+
tk_call('::icons::icons', 'delete', icons)
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.query(*args) # icon, icon, ..., ?option=>value, ...?
|
67
|
+
if args[-1].kind_of?(Hash)
|
68
|
+
keys = args.pop
|
69
|
+
simplelist(tk_call('::icons::icons', 'query',
|
70
|
+
*(hash_kv(keys) << (args.flatten))))
|
71
|
+
else
|
72
|
+
simplelist(tk_call('::icons::icons', 'query', args.flatten))
|
73
|
+
end . map{|inf| list(inf) }
|
74
|
+
end
|
75
|
+
|
76
|
+
##########################################
|
77
|
+
|
78
|
+
class << self
|
79
|
+
alias _new new
|
80
|
+
|
81
|
+
def new(name, keys=nil)
|
82
|
+
if obj = Tk_IMGTBL["::icon::#{name}"]
|
83
|
+
if keys
|
84
|
+
keys = _symbolkey2str(keys)
|
85
|
+
unless keys.delete('without_creating')
|
86
|
+
tk_call('::icons::icons', 'create', *(hash_kv(keys) << obj.name))
|
87
|
+
end
|
88
|
+
end
|
89
|
+
else
|
90
|
+
obj = _new(name, keys)
|
91
|
+
end
|
92
|
+
obj
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
##########################################
|
97
|
+
|
98
|
+
def initialize(name, keys=nil)
|
99
|
+
if name.kind_of?(String) && name =~ /^::icon::(.+)$/
|
100
|
+
@name = $1
|
101
|
+
@path = name
|
102
|
+
else
|
103
|
+
@name = name.to_s
|
104
|
+
@path = "::icon::#{@name}"
|
105
|
+
end
|
106
|
+
keys = _symbolkey2str(keys)
|
107
|
+
unless keys.delete('without_creating')
|
108
|
+
tk_call('::icons::icons', 'create', *(hash_kv(keys) << @name))
|
109
|
+
end
|
110
|
+
Tk_IMGTBL[@path] = self
|
111
|
+
end
|
112
|
+
|
113
|
+
def name
|
114
|
+
@name
|
115
|
+
end
|
116
|
+
|
117
|
+
def delete
|
118
|
+
Tk_IMGTBL.delete(@path)
|
119
|
+
tk_call('::icons::icons', 'delete', @name)
|
120
|
+
self
|
121
|
+
end
|
122
|
+
|
123
|
+
def query(keys={})
|
124
|
+
list(simplelist(tk_call('::icons::icons', 'query',
|
125
|
+
*(hash_kv(keys) << @name))
|
126
|
+
)[0])
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
#
|
2
|
+
# setup.rb -- setup script before calling TkPackage.require()
|
3
|
+
#
|
4
|
+
# If you need some setup operations (for example, add a library path
|
5
|
+
# to the library search path) before using Tcl/Tk library packages
|
6
|
+
# wrapped by Ruby scripts in this directory, please write the setup
|
7
|
+
# operations in this file.
|
8
|
+
#
|
@@ -0,0 +1,198 @@
|
|
1
|
+
|
2
|
+
[ current support status of Tcl/Tk extensions ]
|
3
|
+
|
4
|
+
*** RELEASE_DATE of the libraries => see 'tkextlib/version.rb' ***
|
5
|
+
|
6
|
+
The following list shows *CURRENT* status when this file was modifyed
|
7
|
+
at last. If you want to add other Tcl/Tk extensions to the planed list
|
8
|
+
(or change its status position), please request them at the ruby-talk,
|
9
|
+
ruby-list, or ruby-dev ML. Although we cannot promise to support your
|
10
|
+
requests, we'll try to do.
|
11
|
+
|
12
|
+
If you want to check that wrapper libraries are ready to use on your
|
13
|
+
environment, please execute 'pkg_checker.rb' with no arguments. The
|
14
|
+
script may give you some hints about that.
|
15
|
+
|
16
|
+
|
17
|
+
***** IMPORTANT NOTE **********************************************
|
18
|
+
|
19
|
+
'support' means that Ruby/Tk's wrapper libraries are released.
|
20
|
+
'not support' does *NOT* mean that the extension doesn't work
|
21
|
+
on Ruby/Tk.
|
22
|
+
|
23
|
+
The version number of each extension means the latest version
|
24
|
+
which is checked its feature. That is, it does NOT means only
|
25
|
+
version of working. Library files maybe include some features
|
26
|
+
which is included in the former version but removed from the
|
27
|
+
latest, and maybe able to support the later version then the
|
28
|
+
shown version.
|
29
|
+
|
30
|
+
Even if the status of the extension is 'not support', you can
|
31
|
+
control the functions/widgets of the extension without wrapper
|
32
|
+
libraries by Tk.tk_call(), Tk.ip_eval(), and so on.
|
33
|
+
|
34
|
+
If you cannot use installed Tcl/Tk extension, please check the
|
35
|
+
followings.
|
36
|
+
|
37
|
+
(1) On your Tcl/Tk, does the extention work?
|
38
|
+
|
39
|
+
(2) Do DLL libraries of the extension exist on DLL load-path?
|
40
|
+
(See also "<ruby archive>/ext/tcltklib/README.ActiveTcl")
|
41
|
+
|
42
|
+
(3) Is the Tcl library directory of the extension included in
|
43
|
+
library search-path of the Tcl interpreter linked Ruby/Tk?
|
44
|
+
|
45
|
+
The check results may request you to do some setup operations
|
46
|
+
before using the extension. If so, then please write the step
|
47
|
+
of setup oprations into the "setup.rb" file in the directory
|
48
|
+
of the wrapper libraries for the extention (It is the wrapper
|
49
|
+
libraries have the standard structure of the libraries in this
|
50
|
+
directory). The "setup" file is required before requiring the
|
51
|
+
Tcl library package (TkPackage.require(<libname>)).
|
52
|
+
|
53
|
+
*******************************************************************
|
54
|
+
|
55
|
+
|
56
|
+
===< support with some examples (may be beta quality) >=======================
|
57
|
+
|
58
|
+
Tcllib 1.11.1
|
59
|
+
Tklib 0.5 http://sourceforge.net/projects/tcllib ==> tcllib
|
60
|
+
( partial support; primary support target is Tklib)
|
61
|
+
|
62
|
+
IWidgets 4.0.2 http://sourceforge.net/projects/incrtcl ==> iwidgets
|
63
|
+
|
64
|
+
BWidget 1.8 [ CVS/Hd(2009-07-02) ]
|
65
|
+
http://sourceforge.net/projects/tcllib ==> bwidget
|
66
|
+
|
67
|
+
TkTable 2.10 http://sourceforge.net/projects/tktable ==> tktable
|
68
|
+
* see also <http://www.korus.hu/~fery/ruby/tktable.rb>
|
69
|
+
written by Ferenc Engard (ferenc@engard.hu)
|
70
|
+
|
71
|
+
Vu widgets 2.3.0 http://sourceforge.net/projects/tktable ==> vu
|
72
|
+
|
73
|
+
TkHTML 2.0 http://www.hwaci.com/sw/tkhtml/ ==> tkHTML
|
74
|
+
|
75
|
+
ICONS 1.0 http://www.satisoft.com/tcltk/icons/ ==> ICONS
|
76
|
+
|
77
|
+
TkImg 1.3 http://sourceforge.net/projects/tkimg ==> tkimg
|
78
|
+
|
79
|
+
|
80
|
+
BLT 2.4z http://sourceforge.net/projects/blt
|
81
|
+
* see also tcltk-ext library on RAA
|
82
|
+
(http://raa.ruby-lang.org/)
|
83
|
+
==> blt
|
84
|
+
|
85
|
+
TkTreeCtrl 2.2.9
|
86
|
+
http://tktreectrl.sourceforge.net/ ==> treectrl
|
87
|
+
|
88
|
+
Tile 0.8.3/8.6b1
|
89
|
+
http://sourceforge.net/projects/tktable ==> tile
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
===< support (may be alpha or beta quality) >=================================
|
94
|
+
|
95
|
+
IncrTcl CVS/Hd(2008-12-15)
|
96
|
+
http://sourceforge.net/projects/incrtcl ==> itcl, itk
|
97
|
+
|
98
|
+
TclX CVS/Hd(2008-12-15)
|
99
|
+
http://sourceforge.net/projects/tclx
|
100
|
+
==> tclx (partial support; infox command and
|
101
|
+
XPG/3 message catalogs only)
|
102
|
+
|
103
|
+
Trofs 0.4.4 http://math.nist.gov/~DPorter/tcltk/trofs/
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
===< possibly available (not tested; alpha quality) >=========================
|
108
|
+
|
109
|
+
winico 0.6
|
110
|
+
http://sourceforge.net/projects/tktable
|
111
|
+
==> winico (win32 only)
|
112
|
+
|
113
|
+
TkTrans latest(2004-10-11)
|
114
|
+
http://www2.cmp.uea.ac.uk/~fuzz/tktrans/default.html
|
115
|
+
==> tktrans (win32 only)
|
116
|
+
|
117
|
+
TkDND 1.0a2 http://sourceforge.net/projects/tkdnd ==> tkDND
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
===< plan to support (alpha quality libraries may be included) >==============
|
122
|
+
|
123
|
+
GraphViz *** http://www.graphviz.org/
|
124
|
+
|
125
|
+
Tkgeomap *** http://tkgeomap.sourceforge.net/index.html
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
===< not determined to supprt or not >========================================
|
130
|
+
|
131
|
+
Tix *** http://tixlibrary.sourceforge.net/
|
132
|
+
* see also tcltk-ext library on RAA
|
133
|
+
(http://raa.ruby-lang.org/)
|
134
|
+
|
135
|
+
TkZinc *** http://www.tkzinc.org/
|
136
|
+
|
137
|
+
Wbc *** http://home.t-online.de/home/csaba.nemethi/
|
138
|
+
|
139
|
+
Mentry *** http://home.t-online.de/home/csaba.nemethi/
|
140
|
+
|
141
|
+
Tablelist *** http://home.t-online.de/home/csaba.nemethi/
|
142
|
+
|
143
|
+
ANIGIF *** http://cardtable.sourceforge.net/tcltk/
|
144
|
+
|
145
|
+
IMG_ROTATE *** http://cardtable.sourceforge.net/tcltk/
|
146
|
+
|
147
|
+
TclVfs *** http://sourceforge.net/projects/tclvfs/
|
148
|
+
|
149
|
+
vfwtcl *** http://sourceforge.net/projects/avicaptcl
|
150
|
+
* Win32 only
|
151
|
+
|
152
|
+
multicast *** http://sourceforge.net/projects/avicaptcl
|
153
|
+
* Win32 only
|
154
|
+
|
155
|
+
XBit *** http://www.geocities.com/~chengye/
|
156
|
+
* current implementation is for Windows only
|
157
|
+
|
158
|
+
QuickTimeTcl *** http://hem.fyristorg.com/matben/qt/
|
159
|
+
* works under Mac OS (8,9,X) or Windows
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
===< may not support (already exist, out of Ruby/Tk scope, and so on) >=======
|
164
|
+
|
165
|
+
TkCon *** http://sourceforge.net/projects/tkcon
|
166
|
+
|
167
|
+
Expect *** http://sourceforge.net/projects/expect
|
168
|
+
|
169
|
+
TclXML *** http://sourceforge.net/projects/tclxml
|
170
|
+
|
171
|
+
TclXSLT *** http://sourceforge.net/projects/tclxml
|
172
|
+
|
173
|
+
TclDOM *** http://sourceforge.net/projects/tclxml
|
174
|
+
|
175
|
+
TclSOAP *** http://sourceforge.net/projects/tclsoap
|
176
|
+
|
177
|
+
Snack *** http://www.speech.kth.se/~kare/snack2.2.tar.gz
|
178
|
+
* use Snack for Ruby
|
179
|
+
(see http://rbsnack.sourceforge.net/)
|
180
|
+
|
181
|
+
Tcom *** http://www.vex.net/~cthuang/tcom/
|
182
|
+
|
183
|
+
tDOM *** http://www.tdom.org
|
184
|
+
|
185
|
+
Mk4tcl *** http://www.equi4.com/metakit/tcl.html
|
186
|
+
|
187
|
+
Memchan *** http://sourceforge.net/projects/memchan
|
188
|
+
|
189
|
+
XOTcl *** http://www.xotcl.org/
|
190
|
+
|
191
|
+
|
192
|
+
===< tool (may not supprt) >==================================================
|
193
|
+
|
194
|
+
tbcload/tclcompiler
|
195
|
+
*** http://www.tcl.tk/software/tclpro/
|
196
|
+
|
197
|
+
|
198
|
+
(End of List)
|