tk_as_gem 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +22 -0
- data/Rakefile +11 -0
- data/VERSION +1 -0
- data/ext/ChangeLog.tkextlib +935 -0
- data/ext/MANUAL_tcltklib.eng +469 -0
- data/ext/MANUAL_tcltklib.eucj +579 -0
- data/ext/README.1st +19 -0
- data/ext/README.ActiveTcl +49 -0
- data/ext/README.fork +34 -0
- data/ext/README.macosx-aqua +67 -0
- data/ext/README.tcltklib +85 -0
- data/ext/depend +2 -0
- data/ext/extconf.rb +451 -0
- data/ext/lib/README +30 -0
- data/ext/lib/multi-tk.rb +3491 -0
- data/ext/lib/remote-tk.rb +530 -0
- data/ext/lib/tcltk.rb +367 -0
- data/ext/lib/tk.rb +5584 -0
- data/ext/lib/tk/after.rb +6 -0
- data/ext/lib/tk/autoload.rb +414 -0
- data/ext/lib/tk/bgerror.rb +29 -0
- data/ext/lib/tk/bindtag.rb +138 -0
- data/ext/lib/tk/button.rb +30 -0
- data/ext/lib/tk/canvas.rb +789 -0
- data/ext/lib/tk/canvastag.rb +434 -0
- data/ext/lib/tk/checkbutton.rb +30 -0
- data/ext/lib/tk/clipboard.rb +75 -0
- data/ext/lib/tk/clock.rb +71 -0
- data/ext/lib/tk/composite.rb +458 -0
- data/ext/lib/tk/console.rb +52 -0
- data/ext/lib/tk/dialog.rb +326 -0
- data/ext/lib/tk/encodedstr.rb +187 -0
- data/ext/lib/tk/entry.rb +119 -0
- data/ext/lib/tk/event.rb +542 -0
- data/ext/lib/tk/font.rb +2344 -0
- data/ext/lib/tk/frame.rb +131 -0
- data/ext/lib/tk/grid.rb +279 -0
- data/ext/lib/tk/image.rb +275 -0
- data/ext/lib/tk/itemconfig.rb +1215 -0
- data/ext/lib/tk/itemfont.rb +327 -0
- data/ext/lib/tk/kinput.rb +71 -0
- data/ext/lib/tk/label.rb +21 -0
- data/ext/lib/tk/labelframe.rb +29 -0
- data/ext/lib/tk/listbox.rb +282 -0
- data/ext/lib/tk/macpkg.rb +78 -0
- data/ext/lib/tk/menu.rb +681 -0
- data/ext/lib/tk/menubar.rb +131 -0
- data/ext/lib/tk/menuspec.rb +275 -0
- data/ext/lib/tk/message.rb +22 -0
- data/ext/lib/tk/mngfocus.rb +33 -0
- data/ext/lib/tk/msgcat.rb +296 -0
- data/ext/lib/tk/namespace.rb +551 -0
- data/ext/lib/tk/optiondb.rb +377 -0
- data/ext/lib/tk/optionobj.rb +212 -0
- data/ext/lib/tk/pack.rb +107 -0
- data/ext/lib/tk/package.rb +143 -0
- data/ext/lib/tk/palette.rb +55 -0
- data/ext/lib/tk/panedwindow.rb +258 -0
- data/ext/lib/tk/place.rb +128 -0
- data/ext/lib/tk/radiobutton.rb +71 -0
- data/ext/lib/tk/root.rb +95 -0
- data/ext/lib/tk/scale.rb +111 -0
- data/ext/lib/tk/scrollable.rb +82 -0
- data/ext/lib/tk/scrollbar.rb +177 -0
- data/ext/lib/tk/scrollbox.rb +39 -0
- data/ext/lib/tk/selection.rb +86 -0
- data/ext/lib/tk/spinbox.rb +119 -0
- data/ext/lib/tk/tagfont.rb +43 -0
- data/ext/lib/tk/text.rb +1596 -0
- data/ext/lib/tk/textimage.rb +88 -0
- data/ext/lib/tk/textmark.rb +204 -0
- data/ext/lib/tk/texttag.rb +318 -0
- data/ext/lib/tk/textwindow.rb +154 -0
- data/ext/lib/tk/timer.rb +669 -0
- data/ext/lib/tk/toplevel.rb +262 -0
- data/ext/lib/tk/ttk_selector.rb +76 -0
- data/ext/lib/tk/txtwin_abst.rb +39 -0
- data/ext/lib/tk/validation.rb +397 -0
- data/ext/lib/tk/variable.rb +1765 -0
- data/ext/lib/tk/virtevent.rb +139 -0
- data/ext/lib/tk/winfo.rb +392 -0
- data/ext/lib/tk/winpkg.rb +153 -0
- data/ext/lib/tk/wm.rb +552 -0
- data/ext/lib/tk/xim.rb +122 -0
- data/ext/lib/tkafter.rb +4 -0
- data/ext/lib/tkbgerror.rb +4 -0
- data/ext/lib/tkcanvas.rb +4 -0
- data/ext/lib/tkclass.rb +47 -0
- data/ext/lib/tkconsole.rb +4 -0
- data/ext/lib/tkdialog.rb +4 -0
- data/ext/lib/tkentry.rb +4 -0
- data/ext/lib/tkextlib/ICONS.rb +13 -0
- data/ext/lib/tkextlib/ICONS/icons.rb +129 -0
- data/ext/lib/tkextlib/ICONS/setup.rb +8 -0
- data/ext/lib/tkextlib/SUPPORT_STATUS +196 -0
- data/ext/lib/tkextlib/blt.rb +187 -0
- data/ext/lib/tkextlib/blt/barchart.rb +79 -0
- data/ext/lib/tkextlib/blt/bitmap.rb +112 -0
- data/ext/lib/tkextlib/blt/busy.rb +82 -0
- data/ext/lib/tkextlib/blt/component.rb +2145 -0
- data/ext/lib/tkextlib/blt/container.rb +28 -0
- data/ext/lib/tkextlib/blt/cutbuffer.rb +23 -0
- data/ext/lib/tkextlib/blt/dragdrop.rb +268 -0
- data/ext/lib/tkextlib/blt/eps.rb +32 -0
- data/ext/lib/tkextlib/blt/graph.rb +67 -0
- data/ext/lib/tkextlib/blt/htext.rb +111 -0
- data/ext/lib/tkextlib/blt/setup.rb +8 -0
- data/ext/lib/tkextlib/blt/spline.rb +23 -0
- data/ext/lib/tkextlib/blt/stripchart.rb +74 -0
- data/ext/lib/tkextlib/blt/table.rb +399 -0
- data/ext/lib/tkextlib/blt/tabnotebook.rb +110 -0
- data/ext/lib/tkextlib/blt/tabset.rb +500 -0
- data/ext/lib/tkextlib/blt/ted.rb +65 -0
- data/ext/lib/tkextlib/blt/tile.rb +21 -0
- data/ext/lib/tkextlib/blt/tile/button.rb +16 -0
- data/ext/lib/tkextlib/blt/tile/checkbutton.rb +17 -0
- data/ext/lib/tkextlib/blt/tile/frame.rb +16 -0
- data/ext/lib/tkextlib/blt/tile/label.rb +16 -0
- data/ext/lib/tkextlib/blt/tile/radiobutton.rb +17 -0
- data/ext/lib/tkextlib/blt/tile/scrollbar.rb +16 -0
- data/ext/lib/tkextlib/blt/tile/toplevel.rb +16 -0
- data/ext/lib/tkextlib/blt/tree.rb +1058 -0
- data/ext/lib/tkextlib/blt/treeview.rb +1272 -0
- data/ext/lib/tkextlib/blt/unix_dnd.rb +135 -0
- data/ext/lib/tkextlib/blt/vector.rb +256 -0
- data/ext/lib/tkextlib/blt/watch.rb +175 -0
- data/ext/lib/tkextlib/blt/win_printer.rb +61 -0
- data/ext/lib/tkextlib/blt/winop.rb +107 -0
- data/ext/lib/tkextlib/bwidget.rb +151 -0
- data/ext/lib/tkextlib/bwidget/arrowbutton.rb +21 -0
- data/ext/lib/tkextlib/bwidget/bitmap.rb +21 -0
- data/ext/lib/tkextlib/bwidget/button.rb +31 -0
- data/ext/lib/tkextlib/bwidget/buttonbox.rb +90 -0
- data/ext/lib/tkextlib/bwidget/combobox.rb +51 -0
- data/ext/lib/tkextlib/bwidget/dialog.rb +182 -0
- data/ext/lib/tkextlib/bwidget/dragsite.rb +31 -0
- data/ext/lib/tkextlib/bwidget/dropsite.rb +39 -0
- data/ext/lib/tkextlib/bwidget/dynamichelp.rb +63 -0
- data/ext/lib/tkextlib/bwidget/entry.rb +43 -0
- data/ext/lib/tkextlib/bwidget/label.rb +41 -0
- data/ext/lib/tkextlib/bwidget/labelentry.rb +80 -0
- data/ext/lib/tkextlib/bwidget/labelframe.rb +52 -0
- data/ext/lib/tkextlib/bwidget/listbox.rb +358 -0
- data/ext/lib/tkextlib/bwidget/mainframe.rb +128 -0
- data/ext/lib/tkextlib/bwidget/messagedlg.rb +192 -0
- data/ext/lib/tkextlib/bwidget/notebook.rb +166 -0
- data/ext/lib/tkextlib/bwidget/pagesmanager.rb +73 -0
- data/ext/lib/tkextlib/bwidget/panedwindow.rb +37 -0
- data/ext/lib/tkextlib/bwidget/panelframe.rb +57 -0
- data/ext/lib/tkextlib/bwidget/passwddlg.rb +44 -0
- data/ext/lib/tkextlib/bwidget/progressbar.rb +20 -0
- data/ext/lib/tkextlib/bwidget/progressdlg.rb +58 -0
- data/ext/lib/tkextlib/bwidget/scrollableframe.rb +40 -0
- data/ext/lib/tkextlib/bwidget/scrolledwindow.rb +38 -0
- data/ext/lib/tkextlib/bwidget/scrollview.rb +25 -0
- data/ext/lib/tkextlib/bwidget/selectcolor.rb +73 -0
- data/ext/lib/tkextlib/bwidget/selectfont.rb +86 -0
- data/ext/lib/tkextlib/bwidget/separator.rb +20 -0
- data/ext/lib/tkextlib/bwidget/setup.rb +8 -0
- data/ext/lib/tkextlib/bwidget/spinbox.rb +98 -0
- data/ext/lib/tkextlib/bwidget/statusbar.rb +52 -0
- data/ext/lib/tkextlib/bwidget/titleframe.rb +33 -0
- data/ext/lib/tkextlib/bwidget/tree.rb +453 -0
- data/ext/lib/tkextlib/bwidget/widget.rb +129 -0
- data/ext/lib/tkextlib/itcl.rb +13 -0
- data/ext/lib/tkextlib/itcl/incr_tcl.rb +178 -0
- data/ext/lib/tkextlib/itcl/setup.rb +13 -0
- data/ext/lib/tkextlib/itk.rb +13 -0
- data/ext/lib/tkextlib/itk/incr_tk.rb +446 -0
- data/ext/lib/tkextlib/itk/setup.rb +13 -0
- data/ext/lib/tkextlib/iwidgets.rb +94 -0
- data/ext/lib/tkextlib/iwidgets/buttonbox.rb +120 -0
- data/ext/lib/tkextlib/iwidgets/calendar.rb +125 -0
- data/ext/lib/tkextlib/iwidgets/canvasprintbox.rb +53 -0
- data/ext/lib/tkextlib/iwidgets/canvasprintdialog.rb +38 -0
- data/ext/lib/tkextlib/iwidgets/checkbox.rb +129 -0
- data/ext/lib/tkextlib/iwidgets/combobox.rb +104 -0
- data/ext/lib/tkextlib/iwidgets/dateentry.rb +20 -0
- data/ext/lib/tkextlib/iwidgets/datefield.rb +58 -0
- data/ext/lib/tkextlib/iwidgets/dialog.rb +20 -0
- data/ext/lib/tkextlib/iwidgets/dialogshell.rb +120 -0
- data/ext/lib/tkextlib/iwidgets/disjointlistbox.rb +50 -0
- data/ext/lib/tkextlib/iwidgets/entryfield.rb +185 -0
- data/ext/lib/tkextlib/iwidgets/extbutton.rb +40 -0
- data/ext/lib/tkextlib/iwidgets/extfileselectionbox.rb +46 -0
- data/ext/lib/tkextlib/iwidgets/extfileselectiondialog.rb +33 -0
- data/ext/lib/tkextlib/iwidgets/feedback.rb +35 -0
- data/ext/lib/tkextlib/iwidgets/fileselectionbox.rb +46 -0
- data/ext/lib/tkextlib/iwidgets/fileselectiondialog.rb +33 -0
- data/ext/lib/tkextlib/iwidgets/finddialog.rb +42 -0
- data/ext/lib/tkextlib/iwidgets/hierarchy.rb +365 -0
- data/ext/lib/tkextlib/iwidgets/hyperhelp.rb +50 -0
- data/ext/lib/tkextlib/iwidgets/labeledframe.rb +39 -0
- data/ext/lib/tkextlib/iwidgets/labeledwidget.rb +45 -0
- data/ext/lib/tkextlib/iwidgets/mainwindow.rb +67 -0
- data/ext/lib/tkextlib/iwidgets/menubar.rb +211 -0
- data/ext/lib/tkextlib/iwidgets/messagebox.rb +92 -0
- data/ext/lib/tkextlib/iwidgets/messagedialog.rb +20 -0
- data/ext/lib/tkextlib/iwidgets/notebook.rb +174 -0
- data/ext/lib/tkextlib/iwidgets/optionmenu.rb +92 -0
- data/ext/lib/tkextlib/iwidgets/panedwindow.rb +133 -0
- data/ext/lib/tkextlib/iwidgets/promptdialog.rb +131 -0
- data/ext/lib/tkextlib/iwidgets/pushbutton.rb +35 -0
- data/ext/lib/tkextlib/iwidgets/radiobox.rb +120 -0
- data/ext/lib/tkextlib/iwidgets/scopedobject.rb +24 -0
- data/ext/lib/tkextlib/iwidgets/scrolledcanvas.rb +353 -0
- data/ext/lib/tkextlib/iwidgets/scrolledframe.rb +59 -0
- data/ext/lib/tkextlib/iwidgets/scrolledhtml.rb +58 -0
- data/ext/lib/tkextlib/iwidgets/scrolledlistbox.rb +207 -0
- data/ext/lib/tkextlib/iwidgets/scrolledtext.rb +564 -0
- data/ext/lib/tkextlib/iwidgets/scrolledwidget.rb +20 -0
- data/ext/lib/tkextlib/iwidgets/selectionbox.rb +102 -0
- data/ext/lib/tkextlib/iwidgets/selectiondialog.rb +92 -0
- data/ext/lib/tkextlib/iwidgets/setup.rb +8 -0
- data/ext/lib/tkextlib/iwidgets/shell.rb +38 -0
- data/ext/lib/tkextlib/iwidgets/spindate.rb +48 -0
- data/ext/lib/tkextlib/iwidgets/spinint.rb +30 -0
- data/ext/lib/tkextlib/iwidgets/spinner.rb +169 -0
- data/ext/lib/tkextlib/iwidgets/spintime.rb +48 -0
- data/ext/lib/tkextlib/iwidgets/tabnotebook.rb +180 -0
- data/ext/lib/tkextlib/iwidgets/tabset.rb +144 -0
- data/ext/lib/tkextlib/iwidgets/timeentry.rb +25 -0
- data/ext/lib/tkextlib/iwidgets/timefield.rb +58 -0
- data/ext/lib/tkextlib/iwidgets/toolbar.rb +112 -0
- data/ext/lib/tkextlib/iwidgets/watch.rb +56 -0
- data/ext/lib/tkextlib/pkg_checker.rb +184 -0
- data/ext/lib/tkextlib/setup.rb +8 -0
- data/ext/lib/tkextlib/tcllib.rb +90 -0
- data/ext/lib/tkextlib/tcllib/README +135 -0
- data/ext/lib/tkextlib/tcllib/autoscroll.rb +158 -0
- data/ext/lib/tkextlib/tcllib/ctext.rb +160 -0
- data/ext/lib/tkextlib/tcllib/cursor.rb +97 -0
- data/ext/lib/tkextlib/tcllib/datefield.rb +57 -0
- data/ext/lib/tkextlib/tcllib/dialog.rb +84 -0
- data/ext/lib/tkextlib/tcllib/getstring.rb +134 -0
- data/ext/lib/tkextlib/tcllib/history.rb +73 -0
- data/ext/lib/tkextlib/tcllib/ico.rb +116 -0
- data/ext/lib/tkextlib/tcllib/ip_entry.rb +66 -0
- data/ext/lib/tkextlib/tcllib/panelframe.rb +72 -0
- data/ext/lib/tkextlib/tcllib/plotchart.rb +886 -0
- data/ext/lib/tkextlib/tcllib/ruler.rb +65 -0
- data/ext/lib/tkextlib/tcllib/screenruler.rb +68 -0
- data/ext/lib/tkextlib/tcllib/scrollwin.rb +61 -0
- data/ext/lib/tkextlib/tcllib/setup.rb +8 -0
- data/ext/lib/tkextlib/tcllib/style.rb +61 -0
- data/ext/lib/tkextlib/tcllib/superframe.rb +51 -0
- data/ext/lib/tkextlib/tcllib/swaplist.rb +150 -0
- data/ext/lib/tkextlib/tcllib/tablelist.rb +27 -0
- data/ext/lib/tkextlib/tcllib/tablelist_core.rb +782 -0
- data/ext/lib/tkextlib/tcllib/tablelist_tile.rb +25 -0
- data/ext/lib/tkextlib/tcllib/tkpiechart.rb +314 -0
- data/ext/lib/tkextlib/tcllib/tooltip.rb +95 -0
- data/ext/lib/tkextlib/tcllib/widget.rb +48 -0
- data/ext/lib/tkextlib/tclx.rb +13 -0
- data/ext/lib/tkextlib/tclx/setup.rb +8 -0
- data/ext/lib/tkextlib/tclx/tclx.rb +74 -0
- data/ext/lib/tkextlib/tile.rb +419 -0
- data/ext/lib/tkextlib/tile/dialog.rb +96 -0
- data/ext/lib/tkextlib/tile/setup.rb +8 -0
- data/ext/lib/tkextlib/tile/sizegrip.rb +29 -0
- data/ext/lib/tkextlib/tile/style.rb +316 -0
- data/ext/lib/tkextlib/tile/tbutton.rb +33 -0
- data/ext/lib/tkextlib/tile/tcheckbutton.rb +36 -0
- data/ext/lib/tkextlib/tile/tcombobox.rb +54 -0
- data/ext/lib/tkextlib/tile/tentry.rb +48 -0
- data/ext/lib/tkextlib/tile/tframe.rb +33 -0
- data/ext/lib/tkextlib/tile/tlabel.rb +33 -0
- data/ext/lib/tkextlib/tile/tlabelframe.rb +36 -0
- data/ext/lib/tkextlib/tile/tmenubutton.rb +36 -0
- data/ext/lib/tkextlib/tile/tnotebook.rb +139 -0
- data/ext/lib/tkextlib/tile/tpaned.rb +231 -0
- data/ext/lib/tkextlib/tile/tprogressbar.rb +56 -0
- data/ext/lib/tkextlib/tile/tradiobutton.rb +36 -0
- data/ext/lib/tkextlib/tile/treeview.rb +1239 -0
- data/ext/lib/tkextlib/tile/tscale.rb +53 -0
- data/ext/lib/tkextlib/tile/tscrollbar.rb +54 -0
- data/ext/lib/tkextlib/tile/tseparator.rb +33 -0
- data/ext/lib/tkextlib/tile/tsquare.rb +30 -0
- data/ext/lib/tkextlib/tkDND.rb +18 -0
- data/ext/lib/tkextlib/tkDND/setup.rb +8 -0
- data/ext/lib/tkextlib/tkDND/shape.rb +125 -0
- data/ext/lib/tkextlib/tkDND/tkdnd.rb +182 -0
- data/ext/lib/tkextlib/tkHTML.rb +13 -0
- data/ext/lib/tkextlib/tkHTML/htmlwidget.rb +453 -0
- data/ext/lib/tkextlib/tkHTML/setup.rb +8 -0
- data/ext/lib/tkextlib/tkimg.rb +36 -0
- data/ext/lib/tkextlib/tkimg/README +26 -0
- data/ext/lib/tkextlib/tkimg/bmp.rb +33 -0
- data/ext/lib/tkextlib/tkimg/gif.rb +33 -0
- data/ext/lib/tkextlib/tkimg/ico.rb +33 -0
- data/ext/lib/tkextlib/tkimg/jpeg.rb +33 -0
- data/ext/lib/tkextlib/tkimg/pcx.rb +33 -0
- data/ext/lib/tkextlib/tkimg/pixmap.rb +44 -0
- data/ext/lib/tkextlib/tkimg/png.rb +33 -0
- data/ext/lib/tkextlib/tkimg/ppm.rb +33 -0
- data/ext/lib/tkextlib/tkimg/ps.rb +33 -0
- data/ext/lib/tkextlib/tkimg/setup.rb +8 -0
- data/ext/lib/tkextlib/tkimg/sgi.rb +33 -0
- data/ext/lib/tkextlib/tkimg/sun.rb +33 -0
- data/ext/lib/tkextlib/tkimg/tga.rb +33 -0
- data/ext/lib/tkextlib/tkimg/tiff.rb +33 -0
- data/ext/lib/tkextlib/tkimg/window.rb +33 -0
- data/ext/lib/tkextlib/tkimg/xbm.rb +33 -0
- data/ext/lib/tkextlib/tkimg/xpm.rb +33 -0
- data/ext/lib/tkextlib/tktable.rb +14 -0
- data/ext/lib/tkextlib/tktable/setup.rb +8 -0
- data/ext/lib/tkextlib/tktable/tktable.rb +957 -0
- data/ext/lib/tkextlib/tktrans.rb +14 -0
- data/ext/lib/tkextlib/tktrans/setup.rb +8 -0
- data/ext/lib/tkextlib/tktrans/tktrans.rb +64 -0
- data/ext/lib/tkextlib/treectrl.rb +13 -0
- data/ext/lib/tkextlib/treectrl/setup.rb +8 -0
- data/ext/lib/tkextlib/treectrl/tktreectrl.rb +2461 -0
- data/ext/lib/tkextlib/trofs.rb +13 -0
- data/ext/lib/tkextlib/trofs/setup.rb +8 -0
- data/ext/lib/tkextlib/trofs/trofs.rb +51 -0
- data/ext/lib/tkextlib/version.rb +6 -0
- data/ext/lib/tkextlib/vu.rb +48 -0
- data/ext/lib/tkextlib/vu/bargraph.rb +61 -0
- data/ext/lib/tkextlib/vu/charts.rb +53 -0
- data/ext/lib/tkextlib/vu/dial.rb +102 -0
- data/ext/lib/tkextlib/vu/pie.rb +282 -0
- data/ext/lib/tkextlib/vu/setup.rb +8 -0
- data/ext/lib/tkextlib/vu/spinbox.rb +22 -0
- data/ext/lib/tkextlib/winico.rb +14 -0
- data/ext/lib/tkextlib/winico/setup.rb +8 -0
- data/ext/lib/tkextlib/winico/winico.rb +224 -0
- data/ext/lib/tkfont.rb +4 -0
- data/ext/lib/tkmacpkg.rb +4 -0
- data/ext/lib/tkmenubar.rb +4 -0
- data/ext/lib/tkmngfocus.rb +4 -0
- data/ext/lib/tkpalette.rb +4 -0
- data/ext/lib/tkscrollbox.rb +4 -0
- data/ext/lib/tktext.rb +4 -0
- data/ext/lib/tkvirtevent.rb +4 -0
- data/ext/lib/tkwinpkg.rb +4 -0
- data/ext/old-README.tcltklib.eucj +159 -0
- data/ext/stubs.c +531 -0
- data/ext/stubs.h +33 -0
- data/ext/tcltklib.c +10155 -0
- data/ext/tkutil/.cvsignore +3 -0
- data/ext/tkutil/depend +1 -0
- data/ext/tkutil/extconf.rb +14 -0
- data/ext/tkutil/tkutil.c +1789 -0
- metadata +418 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
#
|
2
|
+
# tkextlib/blt/tabnotebook.rb
|
3
|
+
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
4
|
+
#
|
5
|
+
|
6
|
+
require 'tk'
|
7
|
+
require 'tkextlib/blt.rb'
|
8
|
+
require 'tkextlib/blt/tabset.rb'
|
9
|
+
|
10
|
+
module Tk::BLT
|
11
|
+
class Tabnotebook < Tabset
|
12
|
+
TkCommandNames = ['::blt::tabnotebook'.freeze].freeze
|
13
|
+
WidgetClassName = 'Tabnotebook'.freeze
|
14
|
+
WidgetClassNames[WidgetClassName] = self
|
15
|
+
|
16
|
+
class Tab < Tk::BLT::Tabset::Tab
|
17
|
+
def self.new(parent, pos=nil, name=nil, keys={})
|
18
|
+
if pos.kind_of?(Hash)
|
19
|
+
keys = pos
|
20
|
+
name = nil
|
21
|
+
pos = nil
|
22
|
+
end
|
23
|
+
if name.kind_of?(Hash)
|
24
|
+
keys = name
|
25
|
+
name = nil
|
26
|
+
end
|
27
|
+
obj = nil
|
28
|
+
TabID_TBL.mutex.synchronize{
|
29
|
+
if name && TabID_TBL[parent.path] && TabID_TBL[parent.path][name]
|
30
|
+
obj = TabID_TBL[parent.path][name]
|
31
|
+
if pos
|
32
|
+
if pos.to_s == 'end'
|
33
|
+
obj.move_after('end')
|
34
|
+
else
|
35
|
+
obj.move_before(pos)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
obj.configure if keys && ! keys.empty?
|
39
|
+
else
|
40
|
+
(obj = self.allocate).instance_eval{
|
41
|
+
initialize(parent, pos, name, keys)
|
42
|
+
TabID_TBL[@tpath] = {} unless TabID_TBL[@tpath]
|
43
|
+
TabID_TBL[@tpath][@id] = self
|
44
|
+
}
|
45
|
+
end
|
46
|
+
}
|
47
|
+
obj
|
48
|
+
end
|
49
|
+
|
50
|
+
def initialize(parent, pos, name, keys)
|
51
|
+
@t = parent
|
52
|
+
@tpath = parent.path
|
53
|
+
if name
|
54
|
+
@path = @id = name
|
55
|
+
unless (list(tk_call(@tpath, 'tab', 'names', @id)).empty?)
|
56
|
+
if pos
|
57
|
+
idx = tk_call(@tpath, 'index', @id)
|
58
|
+
if pos.to_s == 'end'
|
59
|
+
tk_call(@tpath, 'move', idx, 'after', 'end')
|
60
|
+
else
|
61
|
+
tk_call(@tpath, 'move', idx, 'before', pos)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
tk_call(@tpath, 'tab', 'configure', @id, keys)
|
65
|
+
else
|
66
|
+
fail ArgumentError, "can't find tab \"#{@id}\" in #{@t}"
|
67
|
+
end
|
68
|
+
else
|
69
|
+
pos = 'end' unless pos
|
70
|
+
@path = @id = tk_call(@tpath, 'insert', pos, keys)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
#######################################
|
76
|
+
|
77
|
+
def get_tab(index)
|
78
|
+
if (idx = tk_send_without_enc('id', tagindex(index))).empty?
|
79
|
+
nil
|
80
|
+
else
|
81
|
+
Tk::BLT::Tabset::Tab.id2obj(self, idx)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
alias get_id get_tab
|
85
|
+
|
86
|
+
def get_tabobj(index)
|
87
|
+
if (idx = tk_send_without_enc('id', tagindex(index))).empty?
|
88
|
+
nil
|
89
|
+
else
|
90
|
+
Tk::BLT::Tabnotebook::Tab.new(self, nil, idx)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
alias index_name index
|
95
|
+
|
96
|
+
def insert(pos=nil, keys={})
|
97
|
+
if pos.kind_of?(Hash)
|
98
|
+
keys = pos
|
99
|
+
pos = nil
|
100
|
+
end
|
101
|
+
pos = 'end' if pos.nil?
|
102
|
+
Tk::BLT::Tabnotebook::Tab.new(self, nil,
|
103
|
+
tk_send('insert', tagindex(pos), keys))
|
104
|
+
|
105
|
+
end
|
106
|
+
undef :insert_tabs
|
107
|
+
|
108
|
+
undef :tab_pageheight, :tab_pagewidth
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,500 @@
|
|
1
|
+
#
|
2
|
+
# tkextlib/blt/tabset.rb
|
3
|
+
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
4
|
+
#
|
5
|
+
|
6
|
+
require 'tk'
|
7
|
+
require 'tkextlib/blt.rb'
|
8
|
+
|
9
|
+
module Tk::BLT
|
10
|
+
class Tabset < TkWindow
|
11
|
+
class Tab < TkObject
|
12
|
+
include TkTreatItemFont
|
13
|
+
|
14
|
+
TabID_TBL = TkCore::INTERP.create_table
|
15
|
+
|
16
|
+
(TabsetTab_ID = ['blt_tabset_tab'.freeze, '00000'.taint]).instance_eval{
|
17
|
+
@mutex = Mutex.new
|
18
|
+
def mutex; @mutex; end
|
19
|
+
freeze
|
20
|
+
}
|
21
|
+
|
22
|
+
TkCore::INTERP.init_ip_env{
|
23
|
+
TabID_TBL.mutex.synchronize{ TabID_TBL.clear }
|
24
|
+
}
|
25
|
+
|
26
|
+
def self.id2obj(tabset, id)
|
27
|
+
tpath = tabset.path
|
28
|
+
TabID_TBL.mutex.synchronize{
|
29
|
+
if TabID_TBL[tpath]
|
30
|
+
TabID_TBL[tpath][id]? TabID_TBL[tpath][id]: id
|
31
|
+
else
|
32
|
+
id
|
33
|
+
end
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.new(parent, pos=nil, name=nil, keys={})
|
38
|
+
if pos.kind_of?(Hash)
|
39
|
+
keys = pos
|
40
|
+
name = nil
|
41
|
+
pos = nil
|
42
|
+
end
|
43
|
+
if name.kind_of?(Hash)
|
44
|
+
keys = name
|
45
|
+
name = nil
|
46
|
+
end
|
47
|
+
obj = nil
|
48
|
+
TabID_TBL.mutex.synchronize{
|
49
|
+
if name && TabID_TBL[parent.path] && TabID_TBL[parent.path][name]
|
50
|
+
obj = TabID_TBL[parent.path][name]
|
51
|
+
if pos
|
52
|
+
if pos.to_s == 'end'
|
53
|
+
obj.move_after('end')
|
54
|
+
else
|
55
|
+
obj.move_before(pos)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
obj.configure if keys && ! keys.empty?
|
59
|
+
else
|
60
|
+
(obj = self.allocate).instance_eval{
|
61
|
+
initialize(parent, pos, name, keys)
|
62
|
+
TabID_TBL[@tpath] = {} unless TabID_TBL[@tpath]
|
63
|
+
TabID_TBL[@tpath][@id] = self
|
64
|
+
}
|
65
|
+
end
|
66
|
+
}
|
67
|
+
obj
|
68
|
+
end
|
69
|
+
|
70
|
+
def initialize(parent, pos, name, keys)
|
71
|
+
@t = parent
|
72
|
+
@tpath = parent.path
|
73
|
+
if name
|
74
|
+
@path = @id = name
|
75
|
+
unless (list(tk_call(@tpath, 'tab', 'names', @id)).empty?)
|
76
|
+
if pos
|
77
|
+
idx = tk_call(@tpath, 'index', '-name', @id)
|
78
|
+
if pos.to_s == 'end'
|
79
|
+
tk_call(@tpath, 'move', idx, 'after', 'end')
|
80
|
+
else
|
81
|
+
tk_call(@tpath, 'move', idx, 'before', pos)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
tk_call(@tpath, 'tab', 'configure', @id, keys)
|
85
|
+
else
|
86
|
+
pos = 'end' unless pos
|
87
|
+
tk_call(@tpath, 'insert', pos, @id, keys)
|
88
|
+
end
|
89
|
+
else
|
90
|
+
pos = 'end' unless pos
|
91
|
+
TabsetTab_ID.mutex.synchronize{
|
92
|
+
@path = @id = TabsetTab_ID.join(TkCore::INTERP._ip_id_)
|
93
|
+
TabsetTab_ID[1].succ!
|
94
|
+
}
|
95
|
+
tk_call(@tpath, 'insert', pos, @id, keys)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
#def bind(context, cmd=Proc.new, *args)
|
100
|
+
# @t.tab_bind(@id, context, cmd, *args)
|
101
|
+
# self
|
102
|
+
#end
|
103
|
+
def bind(context, *args)
|
104
|
+
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
105
|
+
if TkComm._callback_entry?(args[0]) || !block_given?
|
106
|
+
cmd = args.shift
|
107
|
+
else
|
108
|
+
cmd = Proc.new
|
109
|
+
end
|
110
|
+
@t.tab_bind(@id, context, cmd, *args)
|
111
|
+
self
|
112
|
+
end
|
113
|
+
#def bind_append(context, cmd=Proc.new, *args)
|
114
|
+
# @t.tab_bind_append(@id, context, cmd, *args)
|
115
|
+
# self
|
116
|
+
#end
|
117
|
+
def bind_append(context, *args)
|
118
|
+
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
119
|
+
if TkComm._callback_entry?(args[0]) || !block_given?
|
120
|
+
cmd = args.shift
|
121
|
+
else
|
122
|
+
cmd = Proc.new
|
123
|
+
end
|
124
|
+
@t.tab_bind_append(@id, context, cmd, *args)
|
125
|
+
self
|
126
|
+
end
|
127
|
+
def bind_remove(context)
|
128
|
+
@t.tab_bind_remove(@id, context)
|
129
|
+
self
|
130
|
+
end
|
131
|
+
def bindinfo(context=nil)
|
132
|
+
@t.tab_bindinfo(@id, context)
|
133
|
+
end
|
134
|
+
|
135
|
+
def cget(*args)
|
136
|
+
@t.tab_cget(@id, *args)
|
137
|
+
end
|
138
|
+
def cget_strict(*args)
|
139
|
+
@t.tab_cget_strict(@id, *args)
|
140
|
+
end
|
141
|
+
def configure(*args)
|
142
|
+
@t.tab_configure(@id, *args)
|
143
|
+
end
|
144
|
+
def configinfo(*args)
|
145
|
+
@t.tab_configinfo(@id, *args)
|
146
|
+
end
|
147
|
+
def current_configinfo(*args)
|
148
|
+
@t.current_tab_configinfo(@id, *args)
|
149
|
+
end
|
150
|
+
|
151
|
+
def delete()
|
152
|
+
@t.delete(@id)
|
153
|
+
TabID_TBL.mutex.synchronize{
|
154
|
+
TabID_TBL[@tpath].delete(@id)
|
155
|
+
}
|
156
|
+
self
|
157
|
+
end
|
158
|
+
|
159
|
+
def get_name()
|
160
|
+
@id.dup
|
161
|
+
end
|
162
|
+
|
163
|
+
def focus()
|
164
|
+
@t.focus(self.index)
|
165
|
+
end
|
166
|
+
|
167
|
+
def index()
|
168
|
+
@t.index_name(@id)
|
169
|
+
end
|
170
|
+
|
171
|
+
def invoke()
|
172
|
+
@t.invoke(self.index)
|
173
|
+
end
|
174
|
+
|
175
|
+
def move_before(idx)
|
176
|
+
@t.move_before(self.index, idx)
|
177
|
+
end
|
178
|
+
def move_after(idx)
|
179
|
+
@t.move_after(self.index, idx)
|
180
|
+
end
|
181
|
+
|
182
|
+
def perforation_highlight(mode)
|
183
|
+
@t.perforation_highlight(self.index, mode)
|
184
|
+
end
|
185
|
+
def perforation_invoke()
|
186
|
+
@t.perforation_invoke(self.index)
|
187
|
+
end
|
188
|
+
|
189
|
+
def see()
|
190
|
+
@t.see(self.index)
|
191
|
+
end
|
192
|
+
|
193
|
+
def tearoff(name=None)
|
194
|
+
@t.tab_tearoff(self.index, *args)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
########################################
|
199
|
+
|
200
|
+
class NamedTab < Tab
|
201
|
+
def self.new(parent, name)
|
202
|
+
super(parent, nil, name, {})
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
########################################
|
207
|
+
|
208
|
+
include X_Scrollable
|
209
|
+
include TkItemConfigMethod
|
210
|
+
|
211
|
+
TkCommandNames = ['::blt::tabset'.freeze].freeze
|
212
|
+
WidgetClassName = 'Tabset'.freeze
|
213
|
+
WidgetClassNames[WidgetClassName] = self
|
214
|
+
|
215
|
+
def __destroy_hook__
|
216
|
+
Tk::BLT::Tabset::Tab::TabID_TBL.mutex.synchronize{
|
217
|
+
Tk::BLT::Tabset::Tab::TabID_TBL.delete(@path)
|
218
|
+
}
|
219
|
+
end
|
220
|
+
|
221
|
+
########################################
|
222
|
+
|
223
|
+
def __boolval_optkeys
|
224
|
+
super() << 'samewidth' << 'tearoff'
|
225
|
+
end
|
226
|
+
private :__strval_optkeys
|
227
|
+
|
228
|
+
def __strval_optkeys
|
229
|
+
super() << 'tabbackground' << 'tabforeground'
|
230
|
+
end
|
231
|
+
private :__strval_optkeys
|
232
|
+
|
233
|
+
def __item_cget_cmd(id)
|
234
|
+
[self.path, 'tab', 'cget', id]
|
235
|
+
end
|
236
|
+
private :__item_cget_cmd
|
237
|
+
|
238
|
+
def __item_config_cmd(id)
|
239
|
+
[self.path, 'tab', 'configure', id]
|
240
|
+
end
|
241
|
+
private :__item_config_cmd
|
242
|
+
|
243
|
+
def __item_pathname(tagOrId)
|
244
|
+
if tagOrId.kind_of?(Tk::BLT::Tabset::Tab)
|
245
|
+
self.path + ';' + tagOrId.id.to_s
|
246
|
+
else
|
247
|
+
self.path + ';' + tagOrId.to_s
|
248
|
+
end
|
249
|
+
end
|
250
|
+
private :__item_pathname
|
251
|
+
|
252
|
+
alias tab_cget itemcget
|
253
|
+
alias tab_cget_strict itemcget_strict
|
254
|
+
alias tab_configure itemconfigure
|
255
|
+
alias tab_configinfo itemconfiginfo
|
256
|
+
alias current_tab_configinfo current_itemconfiginfo
|
257
|
+
|
258
|
+
def __item_strval_optkeys(id)
|
259
|
+
super(id) << 'shadow'
|
260
|
+
end
|
261
|
+
private :__item_strval_optkeys
|
262
|
+
|
263
|
+
def tagid(tab)
|
264
|
+
if tab.kind_of?(Tk::BLT::Tabset::Tab)
|
265
|
+
tab.id
|
266
|
+
else
|
267
|
+
tab
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
def tagindex(tab)
|
272
|
+
if tab.kind_of?(Tk::BLT::Tabset::Tab)
|
273
|
+
tab.index
|
274
|
+
else
|
275
|
+
tab
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
########################################
|
280
|
+
|
281
|
+
def activate(index)
|
282
|
+
tk_send('activate', tagindex(index))
|
283
|
+
self
|
284
|
+
end
|
285
|
+
alias highlight activate
|
286
|
+
|
287
|
+
#def tabbind(tag, context, cmd=Proc.new, *args)
|
288
|
+
# _bind([path, "bind", tagid(tag)], context, cmd, *args)
|
289
|
+
# self
|
290
|
+
#end
|
291
|
+
def tabbind(tag, context, *args)
|
292
|
+
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
293
|
+
if TkComm._callback_entry?(args[0]) || !block_given?
|
294
|
+
cmd = args.shift
|
295
|
+
else
|
296
|
+
cmd = Proc.new
|
297
|
+
end
|
298
|
+
_bind([path, "bind", tagid(tag)], context, cmd, *args)
|
299
|
+
self
|
300
|
+
end
|
301
|
+
#def tabbind_append(tag, context, cmd=Proc.new, *args)
|
302
|
+
# _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
|
303
|
+
# self
|
304
|
+
#end
|
305
|
+
def tabbind_append(tag, context, *args)
|
306
|
+
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
307
|
+
if TkComm._callback_entry?(args[0]) || !block_given?
|
308
|
+
cmd = args.shift
|
309
|
+
else
|
310
|
+
cmd = Proc.new
|
311
|
+
end
|
312
|
+
_bind_append([path, "bind", tagid(tag)], context, cmd, *args)
|
313
|
+
self
|
314
|
+
end
|
315
|
+
def tabbind_remove(tag, context)
|
316
|
+
_bind_remove([path, "bind", tagid(tag)], context)
|
317
|
+
self
|
318
|
+
end
|
319
|
+
def tabbindinfo(tag, context=nil)
|
320
|
+
_bindinfo([path, "bind", tagid(tag)], context)
|
321
|
+
end
|
322
|
+
|
323
|
+
def delete(first, last=None)
|
324
|
+
tk_send('delete', tagindex(first), tagindex(last))
|
325
|
+
if first.kind_of?(Tk::BLT::Tabset::Tab)
|
326
|
+
TabID_TBL.mutex.synchronize{
|
327
|
+
TabID_TBL[@path].delete(first.id)
|
328
|
+
}
|
329
|
+
end
|
330
|
+
# middle tabs of the range are unknown
|
331
|
+
if last.kind_of?(Tk::BLT::Tabset::Tab)
|
332
|
+
TabID_TBL.mutex.synchronize{
|
333
|
+
TabID_TBL[@path].delete(last.id)
|
334
|
+
}
|
335
|
+
end
|
336
|
+
self
|
337
|
+
end
|
338
|
+
|
339
|
+
def focus(index)
|
340
|
+
tk_send('focus', tagindex(index))
|
341
|
+
self
|
342
|
+
end
|
343
|
+
|
344
|
+
def get_tab(index)
|
345
|
+
if (idx = tk_send_without_enc('get', tagindex(index))).empty?
|
346
|
+
nil
|
347
|
+
else
|
348
|
+
Tk::BLT::Tabset::Tab.id2obj(self, idx)
|
349
|
+
end
|
350
|
+
end
|
351
|
+
def get_tabobj(index)
|
352
|
+
if (idx = tk_send_without_enc('get', tagindex(index))).empty?
|
353
|
+
nil
|
354
|
+
else
|
355
|
+
Tk::BLT::Tabset::Tab.new(self, nil, name, {})
|
356
|
+
end
|
357
|
+
end
|
358
|
+
|
359
|
+
def index(str)
|
360
|
+
num_or_str(tk_send('index', str))
|
361
|
+
end
|
362
|
+
def index_name(tab)
|
363
|
+
num_or_str(tk_send('index', '-name', tagid(tab)))
|
364
|
+
end
|
365
|
+
|
366
|
+
def insert(pos, tab, keys={})
|
367
|
+
pos = 'end' if pos.nil?
|
368
|
+
Tk::BLT::Tabset::Tab.new(self, tagindex(pos), tagid(tab), keys)
|
369
|
+
end
|
370
|
+
def insert_tabs(pos, *tabs)
|
371
|
+
pos = 'end' if pos.nil?
|
372
|
+
if tabs[-1].kind_of?(Hash)
|
373
|
+
keys = tabs.pop
|
374
|
+
else
|
375
|
+
keys = {}
|
376
|
+
end
|
377
|
+
fail ArgumentError, 'no tabs is given' if tabs.empty?
|
378
|
+
tabs.map!{|tab| tagid(tab)}
|
379
|
+
tk_send('insert', tagindex(pos), *(tabs + [keys]))
|
380
|
+
tabs.collect{|tab| Tk::BLT::Tabset::Tab.new(self, nil, tagid(tab))}
|
381
|
+
end
|
382
|
+
|
383
|
+
def invoke(index)
|
384
|
+
tk_send('invoke', tagindex(index))
|
385
|
+
end
|
386
|
+
|
387
|
+
def move_before(index, base_idx)
|
388
|
+
tk_send('move', tagindex(index), 'before', tagindex(base_idx))
|
389
|
+
self
|
390
|
+
end
|
391
|
+
def move_after(index, base_idx)
|
392
|
+
tk_send('move', tagindex(index), 'after', tagindex(base_idx))
|
393
|
+
self
|
394
|
+
end
|
395
|
+
|
396
|
+
def nearest(x, y)
|
397
|
+
Tk::BLT::Tabset::Tab.id2obj(self, num_or_str(tk_send_without_enc('nearest', x, y)))
|
398
|
+
end
|
399
|
+
|
400
|
+
def perforation_activate(mode)
|
401
|
+
tk_send('perforation', 'activate', mode)
|
402
|
+
self
|
403
|
+
end
|
404
|
+
def perforation_highlight(index, *args)
|
405
|
+
if args.empty?
|
406
|
+
# index --> mode
|
407
|
+
tk_send('perforation', 'highlight', index)
|
408
|
+
elsif args.size == 1
|
409
|
+
# args[0] --> mode
|
410
|
+
tk_send('perforation', 'highlight', tagindex(index), args[0])
|
411
|
+
else # Error: call to get Tcl's error message
|
412
|
+
tk_send('perforation', 'highlight', tagindex(index), *args)
|
413
|
+
end
|
414
|
+
self
|
415
|
+
end
|
416
|
+
def perforation_invoke(index=nil)
|
417
|
+
if index
|
418
|
+
tk_send('perforation', 'invoke', tagindex(index))
|
419
|
+
else
|
420
|
+
tk_send('perforation', 'invoke')
|
421
|
+
end
|
422
|
+
end
|
423
|
+
|
424
|
+
def scan_mark(x, y)
|
425
|
+
tk_send_without_enc('scan', 'mark', x, y)
|
426
|
+
self
|
427
|
+
end
|
428
|
+
def scan_dragto(x, y)
|
429
|
+
tk_send_without_enc('scan', 'dragto', x, y)
|
430
|
+
self
|
431
|
+
end
|
432
|
+
|
433
|
+
def see(index)
|
434
|
+
tk_send('see', tagindex(index))
|
435
|
+
self
|
436
|
+
end
|
437
|
+
|
438
|
+
def size()
|
439
|
+
number(tk_send_without_enc('size'))
|
440
|
+
end
|
441
|
+
|
442
|
+
def select(index)
|
443
|
+
tk_send('select', tagindex(index))
|
444
|
+
self
|
445
|
+
end
|
446
|
+
|
447
|
+
def tab_dockall
|
448
|
+
tk_send('tab', 'dockall')
|
449
|
+
self
|
450
|
+
end
|
451
|
+
|
452
|
+
def tab_names(pat=None)
|
453
|
+
simplelist(tk_send('tab', 'names', pat)).collect{|name|
|
454
|
+
Tk::BLT::Tabset::Tab.id2obj(self, name)
|
455
|
+
}
|
456
|
+
end
|
457
|
+
|
458
|
+
def tab_objs(pat=None)
|
459
|
+
simplelist(tk_send('tab', 'names', pat)).collect{|name|
|
460
|
+
Tk::BLT::Tabset::Tab.new(self, nil, name, {})
|
461
|
+
}
|
462
|
+
end
|
463
|
+
|
464
|
+
def tab_ids(pat=None)
|
465
|
+
simplelist(tk_send('tab', 'names', pat))
|
466
|
+
end
|
467
|
+
|
468
|
+
def tab_pageheight
|
469
|
+
number(tk_send('tab', 'pageheight'))
|
470
|
+
end
|
471
|
+
|
472
|
+
def tab_pagewidth
|
473
|
+
number(tk_send('tab', 'pagewidth'))
|
474
|
+
end
|
475
|
+
|
476
|
+
def tab_tearoff(index, parent=None)
|
477
|
+
window(tk_send('tab', 'tearoff', tagindex(index), parent))
|
478
|
+
end
|
479
|
+
|
480
|
+
def xscrollcommand(cmd=Proc.new)
|
481
|
+
configure_cmd 'scrollcommand', cmd
|
482
|
+
self
|
483
|
+
end
|
484
|
+
alias scrollcommand xscrollcommand
|
485
|
+
|
486
|
+
def xview(*index)
|
487
|
+
if index.empty?
|
488
|
+
list(tk_send_without_enc('view'))
|
489
|
+
else
|
490
|
+
tk_send_without_enc('view', *index)
|
491
|
+
self
|
492
|
+
end
|
493
|
+
end
|
494
|
+
alias view xview
|
495
|
+
alias view_moveto xview_moveto
|
496
|
+
alias view_scroll xview_scroll
|
497
|
+
|
498
|
+
alias scrollbar xscrollbar
|
499
|
+
end
|
500
|
+
end
|