mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
* ext/tcltklib/extconf.rb: improbe messages [ruby-core:06325].
* ext/tk/lib/tk.rb, ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/entry.rb, ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb, ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb, ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/menu.rb, ext/tk/lib/tk/radiobutton.rb, ext/tk/lib/tk/scale.rb, ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb, ext/tk/lib/tk/toplevel.rb: improve conversion of option values. * ext/tk/lib/tkextlib/*: ditto. * ext/tk/lib/tkextlib/*: update to support ActiveTcl8.4.11.2. * ext/tk/lib/tkextlib/trofs/*: support Trofs 0.4.3. * ext/tk/lib/tkextlib/tile/*: support Tile 0.7.2. * ext/tk/lib/tkextlib/vu/*: support vu 2.3.0. * ext/tk/lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2e4c479a6b
commit
a3d7c3b809
127 changed files with 3454 additions and 107 deletions
24
ChangeLog
24
ChangeLog
|
@ -1,3 +1,27 @@
|
||||||
|
Sun Oct 23 07:11:11 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tcltklib/extconf.rb: improbe messages [ruby-core:06325].
|
||||||
|
|
||||||
|
* ext/tk/lib/tk.rb, ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/entry.rb,
|
||||||
|
ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb,
|
||||||
|
ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb,
|
||||||
|
ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/menu.rb,
|
||||||
|
ext/tk/lib/tk/radiobutton.rb, ext/tk/lib/tk/scale.rb,
|
||||||
|
ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb,
|
||||||
|
ext/tk/lib/tk/toplevel.rb: improve conversion of option values.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/*: ditto.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/*: update to support ActiveTcl8.4.11.2.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/trofs/*: support Trofs 0.4.3.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/tile/*: support Tile 0.7.2.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/vu/*: support vu 2.3.0.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3).
|
||||||
|
|
||||||
Sat Oct 22 23:54:07 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Oct 22 23:54:07 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/extmk.rb, lib/mkmf.rb (with_config): support --with-extension
|
* ext/extmk.rb, lib/mkmf.rb (with_config): support --with-extension
|
||||||
|
|
|
@ -172,10 +172,11 @@ def pthread_check()
|
||||||
** PTHREAD SUPPORT CHECK WARNING:
|
** PTHREAD SUPPORT CHECK WARNING:
|
||||||
**
|
**
|
||||||
** We cannot check the consistency of pthread support between Ruby
|
** We cannot check the consistency of pthread support between Ruby
|
||||||
** and Tcl/Tk library on your environment (do coss-compile?). If the
|
** and the Tcl/Tk library in your environment (are you perhaps
|
||||||
** consistency is not kept, some memory troubles (e.g. "Hang-up" or
|
** cross-compiling?). If pthread support for these 2 packages is
|
||||||
** "Segmentation Fault") may bother you. We strongly recommend you to
|
** inconsistent you may find you get errors when running Ruby/Tk
|
||||||
** check the consistency by your own hand.
|
** (e.g. hangs or segmentation faults). We strongly recommend
|
||||||
|
** you to check the consistency manually.
|
||||||
**
|
**
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
')
|
')
|
||||||
|
@ -215,17 +216,17 @@ EOF
|
||||||
**
|
**
|
||||||
** PTHREAD SUPPORT MODE WARNING:
|
** PTHREAD SUPPORT MODE WARNING:
|
||||||
**
|
**
|
||||||
** Ruby is compiled with --enable-pthread, but your Tcl/Tk libraries
|
** Ruby is compiled with --enable-pthread, but your Tcl/Tk library
|
||||||
** seems to be compiled without "pthread support". Although You can
|
** seems to be compiled without pthread support. Although you can
|
||||||
** create tcltklib library, this combination may cause memory trouble
|
** create the tcltklib library, this combination may cause errors
|
||||||
** (e.g. "Hang-up" or "Segmentation Fault"). If you have no reason you
|
** (e.g. hangs or segmentation faults). If you have no reason to
|
||||||
** must have to keep current pthread support status, we recommend you
|
** keep the current pthread support status, we recommend you reconfigure
|
||||||
** to make both or neither libraries to support pthread.
|
** and recompile the libraries so that both or neither support pthreads.
|
||||||
**
|
**
|
||||||
** If you want change the status of pthread support, please recompile
|
** If you want change the status of pthread support, please recompile
|
||||||
** Ruby without "--enable-pthread" configure option or recompile Tcl/Tk
|
** Ruby without "--enable-pthread" configure option or recompile Tcl/Tk
|
||||||
** with "--enable-threads" configure option (if your Tcl/Tk is later
|
** with "--enable-threads" configure option (if your Tcl/Tk is later
|
||||||
** than or equal to Tcl/Tk8.1).
|
** than or equal to Tcl/Tk 8.1).
|
||||||
**
|
**
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
')
|
')
|
||||||
|
@ -247,16 +248,16 @@ EOF
|
||||||
puts(%Q'\
|
puts(%Q'\
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
**
|
**
|
||||||
** PTHREAD SUPPORT MODE ERRROR:
|
** PTHREAD SUPPORT MODE ERROR:
|
||||||
**
|
**
|
||||||
** Ruby is not compiled with --enable-pthread, but your Tcl/Tk
|
** Ruby is not compiled with --enable-pthread, but your Tcl/Tk
|
||||||
** libararies seems to be compiled with "pthread support". This
|
** library seems to be compiled with pthread support. This
|
||||||
** combination possibly cause "Hang-up" or "Segmentation Fault"
|
** combination may cause frequent hang or segmentation fault
|
||||||
** frequently when Ruby/Tk is working. We NEVER recommend you to
|
** errors when Ruby/Tk is working. We recommend that you NEVER
|
||||||
** create the library under such combination of pthread support.
|
** create the library with such a combination of pthread support.
|
||||||
**
|
**
|
||||||
** Please recompile Ruby with "--enable-pthread" configure option
|
** Please recompile Ruby with the "--enable-pthread" configure option
|
||||||
** or recompile Tcl/Tk with "--disable-threads" configure option.
|
** or recompile Tcl/Tk with the "--disable-threads" configure option.
|
||||||
**
|
**
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
')
|
')
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
|
2005-10-23 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/*: update to support ActiveTcl8.4.11.2
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/trofs/*: support Trofs 0.4.3
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/tile/*: support Tile 0.7.2
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/vu/*: support vu 2.3.0
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3)
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/*: improve conversion of option values
|
||||||
|
|
||||||
2005-10-04 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
2005-10-04 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* ext/tk/lib/tkextlib/tktable/tktable.rb: border_* instance methods
|
* ext/tk/lib/tkextlib/tktable/tktable.rb: border_* instance methods
|
||||||
|
|
|
@ -2696,12 +2696,18 @@ module TkConfigMethod
|
||||||
private :__numstrval_optkeys
|
private :__numstrval_optkeys
|
||||||
|
|
||||||
def __boolval_optkeys
|
def __boolval_optkeys
|
||||||
[]
|
['exportselection', 'jump', 'setgrid', 'takefocus']
|
||||||
end
|
end
|
||||||
private :__boolval_optkeys
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def __strval_optkeys
|
def __strval_optkeys
|
||||||
['text', 'label', 'show', 'data', 'file']
|
[
|
||||||
|
'text', 'label', 'show', 'data', 'file',
|
||||||
|
'activebackground', 'activeforeground', 'background',
|
||||||
|
'disabledforeground', 'disabledbackground', 'foreground',
|
||||||
|
'highlightbackground', 'highlightcolor', 'insertbackground',
|
||||||
|
'selectbackground', 'selectforeground', 'troughcolor'
|
||||||
|
]
|
||||||
end
|
end
|
||||||
private :__strval_optkeys
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
@ -4437,7 +4443,7 @@ end
|
||||||
#Tk.freeze
|
#Tk.freeze
|
||||||
|
|
||||||
module Tk
|
module Tk
|
||||||
RELEASE_DATE = '2005-09-17'.freeze
|
RELEASE_DATE = '2005-10-23'.freeze
|
||||||
|
|
||||||
autoload :AUTO_PATH, 'tk/variable'
|
autoload :AUTO_PATH, 'tk/variable'
|
||||||
autoload :TCL_PACKAGE_PATH, 'tk/variable'
|
autoload :TCL_PACKAGE_PATH, 'tk/variable'
|
||||||
|
|
|
@ -11,11 +11,25 @@ require 'tk/scrollable'
|
||||||
module TkCanvasItemConfig
|
module TkCanvasItemConfig
|
||||||
include TkItemConfigMethod
|
include TkItemConfigMethod
|
||||||
|
|
||||||
|
def __item_strval_optkeys(id)
|
||||||
|
# maybe need to override
|
||||||
|
super(id) + [
|
||||||
|
'fill', 'activefill', 'disabledfill',
|
||||||
|
'outline', 'activeoutline', 'disabledoutline'
|
||||||
|
]
|
||||||
|
end
|
||||||
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
def __item_methodcall_optkeys(id)
|
def __item_methodcall_optkeys(id)
|
||||||
{'coords'=>'coords'}
|
{'coords'=>'coords'}
|
||||||
end
|
end
|
||||||
private :__item_methodcall_optkeys
|
private :__item_methodcall_optkeys
|
||||||
|
|
||||||
|
def __item_val2ruby_optkeys(id) # { key=>proc, ... }
|
||||||
|
super(id).update('window'=>proc{|i, v| window(v)})
|
||||||
|
end
|
||||||
|
private :__val2ruby_optkeys
|
||||||
|
|
||||||
def __item_pathname(tagOrId)
|
def __item_pathname(tagOrId)
|
||||||
if tagOrId.kind_of?(TkcItem) || tagOrId.kind_of?(TkcTag)
|
if tagOrId.kind_of?(TkcItem) || tagOrId.kind_of?(TkcTag)
|
||||||
self.path + ';' + tagOrId.id.to_s
|
self.path + ';' + tagOrId.id.to_s
|
||||||
|
@ -47,6 +61,16 @@ class TkCanvas<TkWindow
|
||||||
#end
|
#end
|
||||||
#private :create_self
|
#private :create_self
|
||||||
|
|
||||||
|
def __numval_optkeys
|
||||||
|
super() + ['closeenough']
|
||||||
|
end
|
||||||
|
private :__numval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() + ['confine']
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def tagid(tag)
|
def tagid(tag)
|
||||||
if tag.kind_of?(TkcItem) || tag.kind_of?(TkcTag)
|
if tag.kind_of?(TkcItem) || tag.kind_of?(TkcTag)
|
||||||
tag.id
|
tag.id
|
||||||
|
|
|
@ -21,6 +21,11 @@ class TkEntry<TkLabel
|
||||||
#end
|
#end
|
||||||
#private :create_self
|
#private :create_self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() + ['show', 'disabledbackground', 'readonlybackground']
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def bbox(index)
|
def bbox(index)
|
||||||
list(tk_send_without_enc('bbox', index))
|
list(tk_send_without_enc('bbox', index))
|
||||||
end
|
end
|
||||||
|
|
|
@ -30,6 +30,11 @@ class TkFrame<TkWindow
|
||||||
# end
|
# end
|
||||||
#################
|
#################
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'container'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def initialize(parent=nil, keys=nil)
|
def initialize(parent=nil, keys=nil)
|
||||||
my_class_name = nil
|
my_class_name = nil
|
||||||
if self.class < WidgetClassNames[self.class::WidgetClassName]
|
if self.class < WidgetClassNames[self.class::WidgetClassName]
|
||||||
|
|
|
@ -96,6 +96,11 @@ class TkImage<TkObject
|
||||||
end
|
end
|
||||||
|
|
||||||
class TkBitmapImage<TkImage
|
class TkBitmapImage<TkImage
|
||||||
|
def __strval_optkeys
|
||||||
|
super() + ['maskdata', 'maskfile']
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
@type = 'bitmap'
|
@type = 'bitmap'
|
||||||
super(*args)
|
super(*args)
|
||||||
|
|
|
@ -19,13 +19,19 @@ module TkItemConfigOptkeys
|
||||||
private :__item_numstrval_optkeys
|
private :__item_numstrval_optkeys
|
||||||
|
|
||||||
def __item_boolval_optkeys(id)
|
def __item_boolval_optkeys(id)
|
||||||
[]
|
['exportselection', 'jump', 'setgrid', 'takefocus']
|
||||||
end
|
end
|
||||||
private :__item_boolval_optkeys
|
private :__item_boolval_optkeys
|
||||||
|
|
||||||
def __item_strval_optkeys(id)
|
def __item_strval_optkeys(id)
|
||||||
# maybe need to override
|
# maybe need to override
|
||||||
['text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile']
|
[
|
||||||
|
'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile',
|
||||||
|
'activebackground', 'activeforeground', 'background',
|
||||||
|
'disabledforeground', 'disabledbackground', 'foreground',
|
||||||
|
'highlightbackground', 'highlightcolor', 'insertbackground',
|
||||||
|
'selectbackground', 'selectforeground', 'troughcolor'
|
||||||
|
]
|
||||||
end
|
end
|
||||||
private :__item_strval_optkeys
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
|
|
|
@ -16,5 +16,10 @@ class TkLabelFrame<TkFrame
|
||||||
# end
|
# end
|
||||||
#end
|
#end
|
||||||
#private :create_self
|
#private :create_self
|
||||||
|
|
||||||
|
def __val2ruby_optkeys # { key=>proc, ... }
|
||||||
|
super().update('labelwidget'=>proc{|v| window(v)})
|
||||||
|
end
|
||||||
|
private :__val2ruby_optkeys
|
||||||
end
|
end
|
||||||
TkLabelframe = TkLabelFrame
|
TkLabelframe = TkLabelFrame
|
||||||
|
|
|
@ -32,6 +32,11 @@ class TkListbox<TkTextWin
|
||||||
#end
|
#end
|
||||||
#private :create_self
|
#private :create_self
|
||||||
|
|
||||||
|
def __tkvariable_optkeys
|
||||||
|
super() << 'listvariable'
|
||||||
|
end
|
||||||
|
private :__tkvariable_optkeys
|
||||||
|
|
||||||
def tagid(id)
|
def tagid(id)
|
||||||
#id.to_s
|
#id.to_s
|
||||||
_get_eval_string(id)
|
_get_eval_string(id)
|
||||||
|
|
|
@ -18,11 +18,21 @@ module TkMenuEntryConfig
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
def __item_strval_optkeys(id)
|
||||||
|
super(id) << 'selectcolor'
|
||||||
|
end
|
||||||
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
def __item_listval_optkeys(id)
|
def __item_listval_optkeys(id)
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
private :__item_listval_optkeys
|
private :__item_listval_optkeys
|
||||||
|
|
||||||
|
def __item_val2ruby_optkeys(id) # { key=>proc, ... }
|
||||||
|
super(id).update('menu'=>proc{|i, v| window(v)})
|
||||||
|
end
|
||||||
|
private :__val2ruby_optkeys
|
||||||
|
|
||||||
alias entrycget itemcget
|
alias entrycget itemcget
|
||||||
alias entryconfigure itemconfigure
|
alias entryconfigure itemconfigure
|
||||||
alias entryconfiginfo itemconfiginfo
|
alias entryconfiginfo itemconfiginfo
|
||||||
|
@ -49,6 +59,16 @@ class TkMenu<TkWindow
|
||||||
#end
|
#end
|
||||||
#private :create_self
|
#private :create_self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'selectcolor' << 'title'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'tearoff'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def self.new_menuspec(menu_spec, parent = nil, tearoff = false, keys = nil)
|
def self.new_menuspec(menu_spec, parent = nil, tearoff = false, keys = nil)
|
||||||
if parent.kind_of?(Hash)
|
if parent.kind_of?(Hash)
|
||||||
keys = _symbolkey2str(parent)
|
keys = _symbolkey2str(parent)
|
||||||
|
@ -411,6 +431,12 @@ class TkMenubutton<TkLabel
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
private :create_self
|
private :create_self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'indicatoron'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
end
|
end
|
||||||
TkMenuButton = TkMenubutton
|
TkMenuButton = TkMenubutton
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,16 @@ class TkRadioButton<TkButton
|
||||||
#end
|
#end
|
||||||
#private :create_self
|
#private :create_self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'indicatoron'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'selectcolor'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __ruby2val_optkeys # { key=>proc, ... }
|
def __ruby2val_optkeys # { key=>proc, ... }
|
||||||
{
|
{
|
||||||
'variable'=>proc{|v| tk_trace_variable(v)} # for backward compatibility
|
'variable'=>proc{|v| tk_trace_variable(v)} # for backward compatibility
|
||||||
|
|
|
@ -24,6 +24,11 @@ class TkScale<TkWindow
|
||||||
end
|
end
|
||||||
private :create_self
|
private :create_self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'label'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def _wrap_command_arg(cmd)
|
def _wrap_command_arg(cmd)
|
||||||
proc{|val|
|
proc{|val|
|
||||||
if val.kind_of?(String)
|
if val.kind_of?(String)
|
||||||
|
|
|
@ -64,6 +64,21 @@ class TkSpinbox<TkEntry
|
||||||
#end
|
#end
|
||||||
#private :create_self
|
#private :create_self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'wrap'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'buttonbackground' << 'format'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __listval_optkeys
|
||||||
|
super() << 'values'
|
||||||
|
end
|
||||||
|
private :__listval_optkeys
|
||||||
|
|
||||||
def identify(x, y)
|
def identify(x, y)
|
||||||
tk_send_without_enc('identify', x, y)
|
tk_send_without_enc('identify', x, y)
|
||||||
end
|
end
|
||||||
|
|
|
@ -187,6 +187,11 @@ class TkText<TkTextWin
|
||||||
end
|
end
|
||||||
private :create_self
|
private :create_self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'inactiveseletcionbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def self.at(x, y)
|
def self.at(x, y)
|
||||||
TkText::IndexString.at(x, y)
|
TkText::IndexString.at(x, y)
|
||||||
end
|
end
|
||||||
|
|
|
@ -45,6 +45,21 @@ class TkToplevel<TkWindow
|
||||||
# end
|
# end
|
||||||
#################
|
#################
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'container'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'screen'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __val2ruby_optkeys # { key=>proc, ... }
|
||||||
|
super().update('menu'=>proc{|v| window(v)})
|
||||||
|
end
|
||||||
|
private :__val2ruby_optkeys
|
||||||
|
|
||||||
def __methodcall_optkeys # { key=>method, ... }
|
def __methodcall_optkeys # { key=>method, ... }
|
||||||
TOPLEVEL_METHODCALL_OPTKEYS
|
TOPLEVEL_METHODCALL_OPTKEYS
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
[ current support status of Tcl/Tk extensions ]
|
[ current support status of Tcl/Tk extensions ]
|
||||||
|
|
||||||
*******<<< RELEASE_DATE of the libraries : 2005/10/04 >>>*******
|
*******<<< RELEASE_DATE of the libraries : 2005/10/23 >>>*******
|
||||||
|
|
||||||
The following list shows *CURRENT* status when this file was modifyed
|
The following list shows *CURRENT* status when this file was modifyed
|
||||||
at last. If you want to add other Tcl/Tk extensions to the planed list
|
at last. If you want to add other Tcl/Tk extensions to the planed list
|
||||||
|
@ -55,7 +55,7 @@ script may give you some hints about that.
|
||||||
|
|
||||||
===< support with some examples (may be beta quality) >=======================
|
===< support with some examples (may be beta quality) >=======================
|
||||||
|
|
||||||
Tcllib 1.7 http://sf.net/projects/tcllib
|
Tcllib 1.8 http://sf.net/projects/tcllib
|
||||||
==> tcllib (partial support; Tklib part only)
|
==> tcllib (partial support; Tklib part only)
|
||||||
|
|
||||||
IWidgets 4.0.2 http://sf.net/projects/incrTcl ==> iwidgets
|
IWidgets 4.0.2 http://sf.net/projects/incrTcl ==> iwidgets
|
||||||
|
@ -66,7 +66,7 @@ TkTable 2.9 http://sf.net/projects/tktable ==> tktable
|
||||||
* see also <http://www.korus.hu/~fery/ruby/tktable.rb>
|
* see also <http://www.korus.hu/~fery/ruby/tktable.rb>
|
||||||
written by Ferenc Engard (ferenc@engard.hu)
|
written by Ferenc Engard (ferenc@engard.hu)
|
||||||
|
|
||||||
vu 2.1.0 http://tktable.sourceforge.net ==> vu
|
vu 2.3.0 http://tktable.sourceforge.net ==> vu
|
||||||
|
|
||||||
TkHTML 2.0 http://www.hwaci.com/sw/tkhtml/index.html ==> tkHTML
|
TkHTML 2.0 http://www.hwaci.com/sw/tkhtml/index.html ==> tkHTML
|
||||||
|
|
||||||
|
@ -83,7 +83,8 @@ BLT 2.4z http://sourceforge.net/projects/blt
|
||||||
TkTreeCtrl CVS/Hd(2005-03-25)
|
TkTreeCtrl CVS/Hd(2005-03-25)
|
||||||
http://tktreectrl.sourceforge.net/ ==> treectrl
|
http://tktreectrl.sourceforge.net/ ==> treectrl
|
||||||
|
|
||||||
Tile 0.6 http://tktable.sourceforge.net/tile/ ==> tile
|
Tile 0.7.2 http://tktable.sourceforge.net/tile/ ==> tile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
===< support (may be alpha or beta quality) >=================================
|
===< support (may be alpha or beta quality) >=================================
|
||||||
|
@ -96,11 +97,13 @@ TclX CVS/Hd(2005-02-07)
|
||||||
==> tclx (partial support; infox command and
|
==> tclx (partial support; infox command and
|
||||||
XPG/3 message catalogs only)
|
XPG/3 message catalogs only)
|
||||||
|
|
||||||
|
Trofs 0.4.3 http://math.nist.gov/~DPorter/tcltk/trofs/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
===< possibly available (not tested; alpha quality) >=========================
|
===< possibly available (not tested; alpha quality) >=========================
|
||||||
|
|
||||||
winico CVS/Hd(2004-11-02)
|
winico 0.6
|
||||||
http://tktable.sourceforge.net
|
http://tktable.sourceforge.net
|
||||||
==> winico (win32 only)
|
==> winico (win32 only)
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,13 @@ module Tk::BLT
|
||||||
include GraphCommand
|
include GraphCommand
|
||||||
|
|
||||||
def __boolval_optkeys
|
def __boolval_optkeys
|
||||||
['bufferelements', 'invertxy']
|
['bufferelements', 'buffergraph', 'invertxy']
|
||||||
end
|
end
|
||||||
private :__boolval_optkeys
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def __strval_optkeys
|
def __strval_optkeys
|
||||||
['text', 'label', 'title', 'file']
|
['text', 'label', 'title', 'file',
|
||||||
|
'background', 'plotbackground']
|
||||||
end
|
end
|
||||||
private :__strval_optkeys
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,8 @@ module Tk::BLT
|
||||||
|
|
||||||
def __item_strval_optkeys(id)
|
def __item_strval_optkeys(id)
|
||||||
['text', 'label', 'limits', 'title',
|
['text', 'label', 'limits', 'title',
|
||||||
'show', 'file', 'maskdata', 'maskfile']
|
'show', 'file', 'maskdata', 'maskfile',
|
||||||
|
'color', 'titlecolor', 'fill', 'outline', 'offdash']
|
||||||
end
|
end
|
||||||
private :__item_strval_optkeys
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
|
@ -40,7 +41,7 @@ module Tk::BLT
|
||||||
private :__item_listval_optkeys
|
private :__item_listval_optkeys
|
||||||
|
|
||||||
def __item_numlistval_optkeys(id)
|
def __item_numlistval_optkeys(id)
|
||||||
['dashes']
|
['dashes', 'majorticks', 'minorticks']
|
||||||
end
|
end
|
||||||
private :__item_numlistval_optkeys
|
private :__item_numlistval_optkeys
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,11 @@ module Tk::BLT
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'name'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def find_command(pat)
|
def find_command(pat)
|
||||||
list(tk_send_without_enc(tk_call(self.path, 'find', '-command', pat)))
|
list(tk_send_without_enc(tk_call(self.path, 'find', '-command', pat)))
|
||||||
end
|
end
|
||||||
|
|
|
@ -39,6 +39,21 @@ module Tk::BLT
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
def __item_boolval_optkeys(id)
|
||||||
|
super(id) << 'selftarget'
|
||||||
|
end
|
||||||
|
private :__item_boolval_optkeys
|
||||||
|
|
||||||
|
def __item_listval_optkeys(id)
|
||||||
|
super(id) << 'send'
|
||||||
|
end
|
||||||
|
private :__item_listval_optkeys
|
||||||
|
|
||||||
|
def __item_strval_optkeys(id)
|
||||||
|
super(id) << 'rejectbg' << 'rejectfg' << 'tokenbg'
|
||||||
|
end
|
||||||
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
undef itemcget
|
undef itemcget
|
||||||
private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
|
private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
|
||||||
|
|
||||||
|
|
|
@ -13,3 +13,20 @@ module Tk::BLT
|
||||||
CItemTypeToClass[CItemTypeName] = self
|
CItemTypeToClass[CItemTypeName] = self
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class TkCanvas
|
||||||
|
alias __BLT_EPS_item_strval_optkeys __item_strval_optkeys
|
||||||
|
def __item_strval_optkeys(id)
|
||||||
|
__BLT_EPS_item_strval_optkeys(id) + [
|
||||||
|
'shadowcolor', 'title', 'titlecolor'
|
||||||
|
]
|
||||||
|
end
|
||||||
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
|
alias __BLT_EPS_item_boolval_optkeys __item_boolval_optkeys
|
||||||
|
def __item_boolval_optkeys(id)
|
||||||
|
__BLT_EPS_item_boolval_optkeys(id) + ['showimage']
|
||||||
|
end
|
||||||
|
private :__item_boolval_optkeys
|
||||||
|
end
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ module Tk::BLT
|
||||||
private :__boolval_optkeys
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def __strval_optkeys
|
def __strval_optkeys
|
||||||
['text', 'label', 'title', 'file']
|
['text', 'label', 'title', 'file', 'plotbackground']
|
||||||
end
|
end
|
||||||
private :__strval_optkeys
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,11 @@ module Tk::BLT
|
||||||
alias window_configuinfo itemconfiginfo
|
alias window_configuinfo itemconfiginfo
|
||||||
alias current_window_configuinfo current_itemconfiginfo
|
alias current_window_configuinfo current_itemconfiginfo
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'filename'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def append(win, keys={})
|
def append(win, keys={})
|
||||||
tk_send('append', _epath(win), keys)
|
tk_send('append', _epath(win), keys)
|
||||||
self
|
self
|
||||||
|
|
|
@ -22,7 +22,8 @@ module Tk::BLT
|
||||||
private :__boolval_optkeys
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def __strval_optkeys
|
def __strval_optkeys
|
||||||
['text', 'label', 'title', 'file']
|
['text', 'label', 'title', 'file',
|
||||||
|
'background', 'plotbackground']
|
||||||
end
|
end
|
||||||
private :__strval_optkeys
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,11 @@ class << Tk::BLT::Table
|
||||||
private :__itemcget, :__itemconfigure
|
private :__itemcget, :__itemconfigure
|
||||||
private :__itemconfiginfo, :__current_itemconfiginfo
|
private :__itemconfiginfo, :__current_itemconfiginfo
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'propagate'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def tagid(tag)
|
def tagid(tag)
|
||||||
if tag.kind_of?(Array)
|
if tag.kind_of?(Array)
|
||||||
case tag[0]
|
case tag[0]
|
||||||
|
|
|
@ -189,6 +189,16 @@ module Tk::BLT
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'samewidth' << 'tearoff'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'tabbackground' << 'tabforeground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __item_cget_cmd(id)
|
def __item_cget_cmd(id)
|
||||||
[self.path, 'tab', 'cget', id]
|
[self.path, 'tab', 'cget', id]
|
||||||
end
|
end
|
||||||
|
@ -213,6 +223,11 @@ module Tk::BLT
|
||||||
alias tab_configinfo itemconfiginfo
|
alias tab_configinfo itemconfiginfo
|
||||||
alias current_tab_configinfo current_itemconfiginfo
|
alias current_tab_configinfo current_itemconfiginfo
|
||||||
|
|
||||||
|
def __item_strval_optkeys(id)
|
||||||
|
super(id) << 'shadow'
|
||||||
|
end
|
||||||
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
def tagid(tab)
|
def tagid(tab)
|
||||||
if tab.kind_of?(Tk::BLT::Tabset::Tab)
|
if tab.kind_of?(Tk::BLT::Tabset::Tab)
|
||||||
tab.id
|
tab.id
|
||||||
|
|
|
@ -44,6 +44,19 @@ module Tk::BLT::Treeview::ConfigMethod
|
||||||
end
|
end
|
||||||
private :__item_boolval_optkeys
|
private :__item_boolval_optkeys
|
||||||
|
|
||||||
|
def __item_strval_optkeys(id)
|
||||||
|
case id
|
||||||
|
when Array
|
||||||
|
# id := [ 'column', name ]
|
||||||
|
super() << 'titleforeground' << 'titleshadow'
|
||||||
|
when 'sort'
|
||||||
|
['decreasing']
|
||||||
|
else
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
def __item_listval_optkeys(id)
|
def __item_listval_optkeys(id)
|
||||||
case id
|
case id
|
||||||
when 'entry'
|
when 'entry'
|
||||||
|
@ -197,11 +210,16 @@ class Tk::BLT::Treeview
|
||||||
########################
|
########################
|
||||||
|
|
||||||
def __boolval_optkeys
|
def __boolval_optkeys
|
||||||
['autocreate', 'exportselection', 'flat', 'hideroot',
|
['autocreate', 'allowduplicates', 'exportselection', 'flat', 'hideroot',
|
||||||
'newtags', 'showtitles', 'sortselection']
|
'newtags', 'showtitles', 'sortselection']
|
||||||
end
|
end
|
||||||
private :__boolval_optkeys
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() + ['focusforeground', 'linecolor', 'separator', 'trim']
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
|
||||||
class OpenCloseCommand < TkValidateCommand
|
class OpenCloseCommand < TkValidateCommand
|
||||||
|
|
|
@ -19,6 +19,11 @@ class Tk::BWidget::Button
|
||||||
WidgetClassName = 'Button'.freeze
|
WidgetClassName = 'Button'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'helptext'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'helpvar'
|
super() << 'helpvar'
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,6 +21,11 @@ class Tk::BWidget::ButtonBox
|
||||||
|
|
||||||
include TkItemConfigMethod
|
include TkItemConfigMethod
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'homogeneous'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def tagid(tagOrId)
|
def tagid(tagOrId)
|
||||||
if tagOrId.kind_of?(Tk::BWidget::Button)
|
if tagOrId.kind_of?(Tk::BWidget::Button)
|
||||||
name = tagOrId[:name]
|
name = tagOrId[:name]
|
||||||
|
|
|
@ -22,6 +22,16 @@ class Tk::BWidget::Dialog
|
||||||
|
|
||||||
include TkItemConfigMethod
|
include TkItemConfigMethod
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'title'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'transient' << 'homogeneous'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def initialize(parent=nil, keys=nil)
|
def initialize(parent=nil, keys=nil)
|
||||||
@relative = ''
|
@relative = ''
|
||||||
if parent.kind_of?(Hash)
|
if parent.kind_of?(Hash)
|
||||||
|
|
|
@ -21,6 +21,11 @@ module Tk::BWidget::DynamicHelp
|
||||||
'DynamicHelp::configure'
|
'DynamicHelp::configure'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'topbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def self.__cget_cmd
|
def self.__cget_cmd
|
||||||
['DynamicHelp::configure']
|
['DynamicHelp::configure']
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,6 +21,16 @@ class Tk::BWidget::Entry
|
||||||
WidgetClassName = 'Entry'.freeze
|
WidgetClassName = 'Entry'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'helptext' << 'insertbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'dragenabled' << 'dropenabled' << 'editable'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'helpvar'
|
super() << 'helpvar'
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,6 +19,16 @@ class Tk::BWidget::Label
|
||||||
WidgetClassName = 'Label'.freeze
|
WidgetClassName = 'Label'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'helptext'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'dragenabled' << 'dropenabled'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'helpvar'
|
super() << 'helpvar'
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,11 +23,21 @@ class Tk::BWidget::LabelEntry
|
||||||
WidgetClassName = 'LabelEntry'.freeze
|
WidgetClassName = 'LabelEntry'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'helptext' << 'insertbackground' << 'entryfg' << 'entrybg'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'helpvar'
|
super() << 'helpvar'
|
||||||
end
|
end
|
||||||
private :__tkvariable_optkeys
|
private :__tkvariable_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'labelfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
#def entrybind(*args)
|
#def entrybind(*args)
|
||||||
# _bind([path, 'bind'], *args)
|
# _bind([path, 'bind'], *args)
|
||||||
# self
|
# self
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
require 'tk'
|
require 'tk'
|
||||||
require 'tk/frame'
|
require 'tk/frame'
|
||||||
require 'tkextlib/bwidget.rb'
|
require 'tkextlib/bwidget.rb'
|
||||||
|
require 'tkextlib/bwidget/label'
|
||||||
|
|
||||||
module Tk
|
module Tk
|
||||||
module BWidget
|
module BWidget
|
||||||
|
@ -19,6 +20,16 @@ class Tk::BWidget::LabelFrame
|
||||||
WidgetClassName = 'LabelFrame'.freeze
|
WidgetClassName = 'LabelFrame'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'helptext'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'dragenabled' << 'dropenabled'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'helpvar'
|
super() << 'helpvar'
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,6 +35,11 @@ class Tk::BWidget::ListBox
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'autofocus' << 'dragenabled' << 'dropenabled' << 'selectfill'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def tagid(tag)
|
def tagid(tag)
|
||||||
if tag.kind_of?(Tk::BWidget::ListBox::Item)
|
if tag.kind_of?(Tk::BWidget::ListBox::Item)
|
||||||
tag.id
|
tag.id
|
||||||
|
|
|
@ -20,11 +20,25 @@ class Tk::BWidget::MainFrame
|
||||||
WidgetClassName = 'MainFrame'.freeze
|
WidgetClassName = 'MainFrame'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'progressfg'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'progressvar'
|
super() << 'progressvar'
|
||||||
end
|
end
|
||||||
private :__tkvariable_optkeys
|
private :__tkvariable_optkeys
|
||||||
|
|
||||||
|
def __val2ruby_optkeys # { key=>proc, ... }
|
||||||
|
# The method is used to convert a opt-value to a ruby's object.
|
||||||
|
# When get the value of the option "key", "proc.call(value)" is called.
|
||||||
|
{
|
||||||
|
'menu'=>proc{|v| simplelist(v).collect!{|elem| simplelist(v)}}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
private :__val2ruby_optkeys
|
||||||
|
|
||||||
def add_indicator(keys={}, &b)
|
def add_indicator(keys={}, &b)
|
||||||
win = window(tk_send('addindicator', *hash_kv(keys)))
|
win = window(tk_send('addindicator', *hash_kv(keys)))
|
||||||
win.instance_eval(&b) if b
|
win.instance_eval(&b) if b
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
require 'tk'
|
require 'tk'
|
||||||
require 'tkextlib/bwidget.rb'
|
require 'tkextlib/bwidget.rb'
|
||||||
|
require 'tkextlib/bwidget/dialog.rb'
|
||||||
|
|
||||||
module Tk
|
module Tk
|
||||||
module BWidget
|
module BWidget
|
||||||
|
@ -43,6 +44,16 @@ class Tk::BWidget::MessageDlg
|
||||||
end
|
end
|
||||||
private :create_self
|
private :create_self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'message' << 'title'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __listval_optkeys
|
||||||
|
super() << 'buttons'
|
||||||
|
end
|
||||||
|
private :__listval_optkeys
|
||||||
|
|
||||||
def cget(slot)
|
def cget(slot)
|
||||||
slot = slot.to_s
|
slot = slot.to_s
|
||||||
if slot == 'relative'
|
if slot == 'relative'
|
||||||
|
|
|
@ -29,6 +29,11 @@ class Tk::BWidget::NoteBook
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'homogeneous'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def tagid(id)
|
def tagid(id)
|
||||||
if id.kind_of?(TkWindow)
|
if id.kind_of?(TkWindow)
|
||||||
#id.path
|
#id.path
|
||||||
|
|
51
ext/tk/lib/tkextlib/bwidget/panelframe.rb
Normal file
51
ext/tk/lib/tkextlib/bwidget/panelframe.rb
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
#
|
||||||
|
# tkextlib/bwidget/panelframe.rb
|
||||||
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||||
|
#
|
||||||
|
|
||||||
|
require 'tk'
|
||||||
|
require 'tk/frame'
|
||||||
|
require 'tkextlib/bwidget.rb'
|
||||||
|
|
||||||
|
module Tk
|
||||||
|
module BWidget
|
||||||
|
class PanelFrame < TkWindow
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Tk::BWidget::PanelFrame
|
||||||
|
TkCommandNames = ['PanelFrame'.freeze].freeze
|
||||||
|
WidgetClassName = 'PanelFrame'.freeze
|
||||||
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() + ['panelforeground', 'panelbackground']
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def add(win, keys={})
|
||||||
|
tk_send('add', win, keys)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def delete(*wins)
|
||||||
|
tk_send('delete', *wins)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_frame(&b)
|
||||||
|
win = window(tk_send_without_enc('getframe'))
|
||||||
|
win.instance_eval(&b) if b
|
||||||
|
win
|
||||||
|
end
|
||||||
|
|
||||||
|
def items
|
||||||
|
list(tk_send('items'))
|
||||||
|
end
|
||||||
|
|
||||||
|
def remove(*wins)
|
||||||
|
tk_send('remove', *wins)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
end
|
|
@ -19,6 +19,17 @@ class Tk::BWidget::PasswdDlg
|
||||||
WidgetClassName = 'PasswdDlg'.freeze
|
WidgetClassName = 'PasswdDlg'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'loginhelptext' << 'loginlabel' << 'logintext' <<
|
||||||
|
'passwdlabel' << 'passwdtext'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'passwdeditable' << 'homogeneous'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'loginhelpvar' << 'logintextvariable' <<
|
super() << 'loginhelpvar' << 'logintextvariable' <<
|
||||||
'passwdhelpvar' << 'passwdtextvariable'
|
'passwdhelpvar' << 'passwdtextvariable'
|
||||||
|
|
|
@ -17,4 +17,9 @@ class Tk::BWidget::ScrollView
|
||||||
TkCommandNames = ['ScrollView'.freeze].freeze
|
TkCommandNames = ['ScrollView'.freeze].freeze
|
||||||
WidgetClassName = 'ScrollView'.freeze
|
WidgetClassName = 'ScrollView'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'fill'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,9 +25,15 @@ class Tk::BWidget::SelectFont
|
||||||
WidgetClassName = 'SelectFont'.freeze
|
WidgetClassName = 'SelectFont'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'sampletext' << 'title'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __font_optkeys
|
def __font_optkeys
|
||||||
[] # without fontobj operation
|
[] # without fontobj operation
|
||||||
end
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
def create
|
def create
|
||||||
tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys))
|
tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys))
|
||||||
|
|
|
@ -22,6 +22,21 @@ class Tk::BWidget::SpinBox
|
||||||
WidgetClassName = 'SpinBox'.freeze
|
WidgetClassName = 'SpinBox'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'helptext' << 'insertbackground' << 'entryfg' << 'entrybg'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'dragenabled' << 'dropenabled' << 'editable'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __listval_optkeys
|
||||||
|
super() << 'values'
|
||||||
|
end
|
||||||
|
private :__listval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'helpvar'
|
super() << 'helpvar'
|
||||||
end
|
end
|
||||||
|
|
46
ext/tk/lib/tkextlib/bwidget/statusbar.rb
Normal file
46
ext/tk/lib/tkextlib/bwidget/statusbar.rb
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
#
|
||||||
|
# tkextlib/bwidget/statusbar.rb
|
||||||
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||||
|
#
|
||||||
|
|
||||||
|
require 'tk'
|
||||||
|
require 'tk/frame'
|
||||||
|
require 'tkextlib/bwidget.rb'
|
||||||
|
|
||||||
|
module Tk
|
||||||
|
module BWidget
|
||||||
|
class StatusBar < TkWindow
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Tk::BWidget::StatusBar
|
||||||
|
TkCommandNames = ['StatusBar'.freeze].freeze
|
||||||
|
WidgetClassName = 'StatusBar'.freeze
|
||||||
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'showresize'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def add(win, keys={})
|
||||||
|
tk_send('add', win, keys)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def delete(*wins)
|
||||||
|
tk_send('delete', *wins)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_frame(&b)
|
||||||
|
win = window(tk_send_without_enc('getframe'))
|
||||||
|
win.instance_eval(&b) if b
|
||||||
|
win
|
||||||
|
end
|
||||||
|
|
||||||
|
def items
|
||||||
|
list(tk_send('items'))
|
||||||
|
end
|
||||||
|
end
|
|
@ -32,6 +32,17 @@ class Tk::BWidget::Tree
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'crossfill' << 'linesfill'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'dragenabled' << 'dropenabled' <<
|
||||||
|
'redraw' << 'selectfill' << 'showlines'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'helpvar'
|
super() << 'helpvar'
|
||||||
end
|
end
|
||||||
|
|
|
@ -115,6 +115,11 @@ module Tk
|
||||||
|
|
||||||
include Wm
|
include Wm
|
||||||
include TkMenuSpec
|
include TkMenuSpec
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'title'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
end
|
end
|
||||||
|
|
||||||
############################
|
############################
|
||||||
|
|
|
@ -32,6 +32,11 @@ class Tk::Iwidgets::Buttonbox
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
def __item_boolval_optkeys(id)
|
||||||
|
super(id) << 'defaultring'
|
||||||
|
end
|
||||||
|
private :__item_boolval_optkeys
|
||||||
|
|
||||||
def tagid(tagOrId)
|
def tagid(tagOrId)
|
||||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||||
tagOrId.name
|
tagOrId.name
|
||||||
|
|
|
@ -18,6 +18,24 @@ class Tk::Iwidgets::Calendar
|
||||||
WidgetClassName = 'Calendar'.freeze
|
WidgetClassName = 'Calendar'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() + [
|
||||||
|
'buttonforeground', 'outline', 'selectcolor',
|
||||||
|
'weekdaybackground', 'weekendbackground'
|
||||||
|
]
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __listval_optkeys
|
||||||
|
super() << 'days'
|
||||||
|
end
|
||||||
|
private :__listval_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() + ['currentdatefont', 'datefont', 'dayfont', 'titlefont']
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
include Tk::ValidateConfigure
|
include Tk::ValidateConfigure
|
||||||
|
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Canvasprintbox
|
||||||
WidgetClassName = 'Canvasprintbox'.freeze
|
WidgetClassName = 'Canvasprintbox'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'filename'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'stretch'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def get_output
|
def get_output
|
||||||
tk_call(@path, 'getoutput')
|
tk_call(@path, 'getoutput')
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,6 +32,11 @@ class Tk::Iwidgets::Checkbox
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
def __item_boolval_optkeys(id)
|
||||||
|
super(id) << 'defaultring'
|
||||||
|
end
|
||||||
|
private :__item_boolval_optkeys
|
||||||
|
|
||||||
def tagid(tagOrId)
|
def tagid(tagOrId)
|
||||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||||
tagOrId.name
|
tagOrId.name
|
||||||
|
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Combobox
|
||||||
WidgetClassName = 'Combobox'.freeze
|
WidgetClassName = 'Combobox'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'completion' << 'dropdown' << 'editable' << 'unique'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def clear(component=None)
|
def clear(component=None)
|
||||||
tk_call(@path, 'clear', component)
|
tk_call(@path, 'clear', component)
|
||||||
self
|
self
|
||||||
|
|
|
@ -18,6 +18,21 @@ class Tk::Iwidgets::Datefield
|
||||||
WidgetClassName = 'Datefield'.freeze
|
WidgetClassName = 'Datefield'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'gmt'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'textbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'textfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
def get_string
|
def get_string
|
||||||
tk_call(@path, 'get', '-string')
|
tk_call(@path, 'get', '-string')
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,6 +32,11 @@ class Tk::Iwidgets::Dialogshell
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
def __item_boolval_optkeys(id)
|
||||||
|
super(id) << 'defaultring'
|
||||||
|
end
|
||||||
|
private :__item_boolval_optkeys
|
||||||
|
|
||||||
def tagid(tagOrId)
|
def tagid(tagOrId)
|
||||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||||
tagOrId.name
|
tagOrId.name
|
||||||
|
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Disjointlistbox
|
||||||
WidgetClassName = 'Disjointlistbox'.freeze
|
WidgetClassName = 'Disjointlistbox'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'lhslabeltext' << 'rhslabeltext' << 'lhsbuttonlabel' << 'rhsbuttonlabel'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def set_lhs(*items)
|
def set_lhs(*items)
|
||||||
tk_call(@path, 'setlhs', items)
|
tk_call(@path, 'setlhs', items)
|
||||||
self
|
self
|
||||||
|
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Entryfield
|
||||||
WidgetClassName = 'Entryfield'.freeze
|
WidgetClassName = 'Entryfield'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'textfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
include Tk::ValidateConfigure
|
include Tk::ValidateConfigure
|
||||||
|
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Extbutton
|
||||||
WidgetClassName = 'Extbutton'.freeze
|
WidgetClassName = 'Extbutton'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'bitmapforeground' << 'ringbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'defaultring'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def invoke
|
def invoke
|
||||||
tk_call(@path, 'invoke')
|
tk_call(@path, 'invoke')
|
||||||
self
|
self
|
||||||
|
|
|
@ -18,6 +18,19 @@ class Tk::Iwidgets::Extfileselectionbox
|
||||||
WidgetClassName = 'Extfileselectionbox'.freeze
|
WidgetClassName = 'Extfileselectionbox'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() + [
|
||||||
|
'dirslabel', 'fileslabel', 'filterlabel', 'mask', 'nomatchstring',
|
||||||
|
'selectionlabel'
|
||||||
|
]
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() + ['dirson', 'fileson', 'filteron', 'selectionon']
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def child_site
|
def child_site
|
||||||
window(tk_call(@path, 'childsite'))
|
window(tk_call(@path, 'childsite'))
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Feedback
|
||||||
WidgetClassName = 'Feedback'.freeze
|
WidgetClassName = 'Feedback'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'barcolor'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def reset
|
def reset
|
||||||
tk_call(@path, 'reset')
|
tk_call(@path, 'reset')
|
||||||
self
|
self
|
||||||
|
|
|
@ -18,6 +18,19 @@ class Tk::Iwidgets::Fileselectionbox
|
||||||
WidgetClassName = 'Fileselectionbox'.freeze
|
WidgetClassName = 'Fileselectionbox'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() + [
|
||||||
|
'directory', 'dirslabel', 'fileslabel', 'filterlabel', 'mask',
|
||||||
|
'nomatchstring', 'selectionlabel'
|
||||||
|
]
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() + ['dirson', 'fileson', 'filteron', 'selectionon']
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def child_site
|
def child_site
|
||||||
window(tk_call(@path, 'childsite'))
|
window(tk_call(@path, 'childsite'))
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,19 @@ class Tk::Iwidgets::Finddialog
|
||||||
WidgetClassName = 'Finddialog'.freeze
|
WidgetClassName = 'Finddialog'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() + [
|
||||||
|
'patternbackground', 'patternforeground',
|
||||||
|
'searchbackground', 'searchforeground'
|
||||||
|
]
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __val2ruby_optkeys # { key=>proc, ... }
|
||||||
|
super().update('textwidget'=>proc{|v| window(v)})
|
||||||
|
end
|
||||||
|
private :__val2ruby_optkeys
|
||||||
|
|
||||||
def clear
|
def clear
|
||||||
tk_call(@path, 'clear')
|
tk_call(@path, 'clear')
|
||||||
self
|
self
|
||||||
|
|
|
@ -101,6 +101,21 @@ class Tk::Iwidgets::Hierarchy
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'alwaysquery' << 'expanded' << 'filter'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'markbackground' << 'markforeground' << 'textbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'textfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
def clear
|
def clear
|
||||||
tk_call(@path, 'clear')
|
tk_call(@path, 'clear')
|
||||||
self
|
self
|
||||||
|
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Hyperhelp
|
||||||
WidgetClassName = 'Hyperhelp'.freeze
|
WidgetClassName = 'Hyperhelp'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'helpdir'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __listval_optkeys
|
||||||
|
super() << 'topics'
|
||||||
|
end
|
||||||
|
private :__listval_optkeys
|
||||||
|
|
||||||
def show_topic(topic)
|
def show_topic(topic)
|
||||||
tk_call(@path, 'showtopic', topic)
|
tk_call(@path, 'showtopic', topic)
|
||||||
self
|
self
|
||||||
|
|
|
@ -18,11 +18,21 @@ class Tk::Iwidgets::Labeledframe
|
||||||
WidgetClassName = 'Labeledframe'.freeze
|
WidgetClassName = 'Labeledframe'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'labeltext'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'labelvariable'
|
super() << 'labelvariable'
|
||||||
end
|
end
|
||||||
private :__tkvariable_optkeys
|
private :__tkvariable_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'labelfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
def child_site
|
def child_site
|
||||||
window(tk_call(@path, 'childsite'))
|
window(tk_call(@path, 'childsite'))
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,11 +20,21 @@ class Tk::Iwidgets::Labeledwidget
|
||||||
WidgetClassName = 'Labeledwidget'.freeze
|
WidgetClassName = 'Labeledwidget'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'labeltext'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'labelvariable'
|
super() << 'labelvariable'
|
||||||
end
|
end
|
||||||
private :__tkvariable_optkeys
|
private :__tkvariable_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'labelfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
def self.alignlabels(*wins)
|
def self.alignlabels(*wins)
|
||||||
tk_call('::iwidgets::Labeledwidget::alignlabels', *wins)
|
tk_call('::iwidgets::Labeledwidget::alignlabels', *wins)
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,21 @@ class Tk::Iwidgets::Mainwindow
|
||||||
WidgetClassName = 'Mainwindow'.freeze
|
WidgetClassName = 'Mainwindow'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'helpline' << 'statusline'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'menubarbackground' << 'menubarforeground' << 'toolbarforeground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'menubarfont' << 'toolbarfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
def child_site
|
def child_site
|
||||||
window(tk_call(@path, 'childsite'))
|
window(tk_call(@path, 'childsite'))
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Menubar
|
||||||
WidgetClassName = 'Menubar'.freeze
|
WidgetClassName = 'Menubar'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'menubuttons'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'helpvariable'
|
super() << 'helpvariable'
|
||||||
end
|
end
|
||||||
|
@ -37,6 +42,16 @@ class Tk::Iwidgets::Menubar
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
def __item_strval_optkeys(id)
|
||||||
|
super(id) << 'selectcolor'
|
||||||
|
end
|
||||||
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
|
def __item_tkvariable_optkeys(id)
|
||||||
|
super(id) << 'helpstr'
|
||||||
|
end
|
||||||
|
private :__item_tkvariable_optkeys
|
||||||
|
|
||||||
def tagid(tagOrId)
|
def tagid(tagOrId)
|
||||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||||
tagOrId.name
|
tagOrId.name
|
||||||
|
|
|
@ -41,6 +41,11 @@ class Tk::Iwidgets::Messagebox
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def __item_boolval_optkeys(id)
|
||||||
|
super(id) << 'bell' << 'show'
|
||||||
|
end
|
||||||
|
private :__item_boolval_optkeys
|
||||||
|
|
||||||
alias typecget itemcget
|
alias typecget itemcget
|
||||||
alias typeconfigure itemconfigure
|
alias typeconfigure itemconfigure
|
||||||
alias typeconfiginfo itemconfiginfo
|
alias typeconfiginfo itemconfiginfo
|
||||||
|
@ -51,6 +56,11 @@ class Tk::Iwidgets::Messagebox
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'filename' << 'savedir'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def type_add(tag=nil, keys={})
|
def type_add(tag=nil, keys={})
|
||||||
if tag.kind_of?(Hash)
|
if tag.kind_of?(Hash)
|
||||||
keys = tag
|
keys = tag
|
||||||
|
|
|
@ -23,12 +23,12 @@ class Tk::Iwidgets::Notebook
|
||||||
include TkItemConfigMethod
|
include TkItemConfigMethod
|
||||||
|
|
||||||
def __item_cget_cmd(id)
|
def __item_cget_cmd(id)
|
||||||
[self.path, 'tabcget', id]
|
[self.path, 'pagecget', id]
|
||||||
end
|
end
|
||||||
private :__item_cget_cmd
|
private :__item_cget_cmd
|
||||||
|
|
||||||
def __item_config_cmd(id)
|
def __item_config_cmd(id)
|
||||||
[self.path, 'tabconfigure', id]
|
[self.path, 'pageconfigure', id]
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
@ -51,6 +51,11 @@ class Tk::Iwidgets::Notebook
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'auto'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def add(keys={})
|
def add(keys={})
|
||||||
window(tk_call(@path, 'add', *hash_kv(keys)))
|
window(tk_call(@path, 'add', *hash_kv(keys)))
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Optionmenu
|
||||||
WidgetClassName = 'Optionmenu'.freeze
|
WidgetClassName = 'Optionmenu'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'cyclicon'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def delete(first, last=nil)
|
def delete(first, last=nil)
|
||||||
if last
|
if last
|
||||||
tk_call(@path, 'delete', first, last)
|
tk_call(@path, 'delete', first, last)
|
||||||
|
|
|
@ -51,6 +51,11 @@ class Tk::Iwidgets::Panedwindow
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'showhandle'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def add(tag=nil, keys={})
|
def add(tag=nil, keys={})
|
||||||
if tag.kind_of?(Hash)
|
if tag.kind_of?(Hash)
|
||||||
keys = tag
|
keys = tag
|
||||||
|
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Pushbutton
|
||||||
WidgetClassName = 'Pushbutton'.freeze
|
WidgetClassName = 'Pushbutton'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'defaultring'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def invoke
|
def invoke
|
||||||
tk_call_without_enc(@path, 'invoke')
|
tk_call_without_enc(@path, 'invoke')
|
||||||
self
|
self
|
||||||
|
|
|
@ -32,6 +32,11 @@ class Tk::Iwidgets::Radiobox
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
def __item_boolval_optkeys(id)
|
||||||
|
super(id) << 'defaultring'
|
||||||
|
end
|
||||||
|
private :__item_boolval_optkeys
|
||||||
|
|
||||||
def tagid(tagOrId)
|
def tagid(tagOrId)
|
||||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||||
tagOrId.name
|
tagOrId.name
|
||||||
|
|
|
@ -21,6 +21,16 @@ class Tk::Iwidgets::Scrolledcanvas
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'autoresize'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'textbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
super(*args)
|
super(*args)
|
||||||
@canvas = component_widget('canvas')
|
@canvas = component_widget('canvas')
|
||||||
|
|
|
@ -18,6 +18,21 @@ class Tk::Iwidgets::Scrolledhtml
|
||||||
WidgetClassName = 'Scrolledhtml'.freeze
|
WidgetClassName = 'Scrolledhtml'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'update'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'fontname' << 'link' << 'alink' << 'textbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'fixedfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
def import(href)
|
def import(href)
|
||||||
tk_call(@path, 'import', href)
|
tk_call(@path, 'import', href)
|
||||||
self
|
self
|
||||||
|
|
|
@ -19,11 +19,21 @@ class Tk::Iwidgets::Scrolledlistbox
|
||||||
WidgetClassName = 'Scrolledlistbox'.freeze
|
WidgetClassName = 'Scrolledlistbox'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'textbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def __tkvariable_optkeys
|
def __tkvariable_optkeys
|
||||||
super() << 'listvariable'
|
super() << 'listvariable'
|
||||||
end
|
end
|
||||||
private :__tkvariable_optkeys
|
private :__tkvariable_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'textfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
|
|
|
@ -19,6 +19,16 @@ class Tk::Iwidgets::Scrolledtext
|
||||||
WidgetClassName = 'Scrolledtext'.freeze
|
WidgetClassName = 'Scrolledtext'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'textbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'textfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
|
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Selectionbox
|
||||||
WidgetClassName = 'Selectionbox'.freeze
|
WidgetClassName = 'Selectionbox'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'itemson' << 'selectionon'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'itemslabel' << 'selectionlabel'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def child_site
|
def child_site
|
||||||
window(tk_call(@path, 'childsite'))
|
window(tk_call(@path, 'childsite'))
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Spindate
|
||||||
WidgetClassName = 'Spindate'.freeze
|
WidgetClassName = 'Spindate'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'dayon' << 'monthon' << 'yearon'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'daylabel' << 'monthformat' << 'monthlabel' << 'yearlabel'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def get_string
|
def get_string
|
||||||
tk_call(@path, 'get', '-string')
|
tk_call(@path, 'get', '-string')
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,4 +17,14 @@ class Tk::Iwidgets::Spinint
|
||||||
TkCommandNames = ['::iwidgets::spinint'.freeze].freeze
|
TkCommandNames = ['::iwidgets::spinint'.freeze].freeze
|
||||||
WidgetClassName = 'Spinint'.freeze
|
WidgetClassName = 'Spinint'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'wrap'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __numlistval_optkeys
|
||||||
|
super() << 'range'
|
||||||
|
end
|
||||||
|
private :__numlistval_optkeys
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Spintime
|
||||||
WidgetClassName = 'Spintime'.freeze
|
WidgetClassName = 'Spintime'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'houron' << 'militaryon' << 'minutelabel' << 'secondlabel'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'hourlabel' << 'minuteon' << 'secondon'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def get_string
|
def get_string
|
||||||
tk_call(@path, 'get', '-string')
|
tk_call(@path, 'get', '-string')
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,15 +23,20 @@ class Tk::Iwidgets::Tabnotebook
|
||||||
include TkItemConfigMethod
|
include TkItemConfigMethod
|
||||||
|
|
||||||
def __item_cget_cmd(id)
|
def __item_cget_cmd(id)
|
||||||
[self.path, 'tabcget', id]
|
[self.path, 'pagecget', id]
|
||||||
end
|
end
|
||||||
private :__item_cget_cmd
|
private :__item_cget_cmd
|
||||||
|
|
||||||
def __item_config_cmd(id)
|
def __item_config_cmd(id)
|
||||||
[self.path, 'tabconfigure', id]
|
[self.path, 'pageconfigure', id]
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
def __item_strval_optkeys(id)
|
||||||
|
super(id) << 'tabbackground' << 'tabforeground'
|
||||||
|
end
|
||||||
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
def tagid(tagOrId)
|
def tagid(tagOrId)
|
||||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||||
tagOrId.name
|
tagOrId.name
|
||||||
|
@ -51,6 +56,16 @@ class Tk::Iwidgets::Tabnotebook
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'auto' << 'equaltabs' << 'raiseselect' << 'tabborders'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'backdrop' << 'tabbackground' << 'tabforeground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
super(*args)
|
super(*args)
|
||||||
@tabset = self.component_widget('tabset')
|
@tabset = self.component_widget('tabset')
|
||||||
|
|
|
@ -51,6 +51,16 @@ class Tk::Iwidgets::Tabset
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'equaltabs' << 'raiseselect' << 'tabborders'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'backdrop'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def add(keys={})
|
def add(keys={})
|
||||||
window(tk_call(@path, 'add', *hash_kv(keys)))
|
window(tk_call(@path, 'add', *hash_kv(keys)))
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,4 +17,9 @@ class Tk::Iwidgets::Timeentry
|
||||||
TkCommandNames = ['::iwidgets::timeentry'.freeze].freeze
|
TkCommandNames = ['::iwidgets::timeentry'.freeze].freeze
|
||||||
WidgetClassName = 'Timeentry'.freeze
|
WidgetClassName = 'Timeentry'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'closetext'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,21 @@ class Tk::Iwidgets::Timefield
|
||||||
WidgetClassName = 'Timefield'.freeze
|
WidgetClassName = 'Timefield'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'gmt'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'textbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'textfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
def get_string
|
def get_string
|
||||||
tk_call(@path, 'get', '-string')
|
tk_call(@path, 'get', '-string')
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,6 +37,11 @@ class Tk::Iwidgets::Toolbar
|
||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
|
def __item_strval_optkeys(id)
|
||||||
|
super(id) << 'helpstr' << 'balloonstr'
|
||||||
|
end
|
||||||
|
private :__item_strval_optkeys
|
||||||
|
|
||||||
def tagid(tagOrId)
|
def tagid(tagOrId)
|
||||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||||
tagOrId.name
|
tagOrId.name
|
||||||
|
@ -48,6 +53,21 @@ class Tk::Iwidgets::Toolbar
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'balloonbackground' << 'balloonforeground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __tkvariable_optkeys
|
||||||
|
super() << 'helpvariable'
|
||||||
|
end
|
||||||
|
private :__tkvariable_optkeys
|
||||||
|
|
||||||
|
def __font_optkeys
|
||||||
|
super() << 'balloonfont'
|
||||||
|
end
|
||||||
|
private :__font_optkeys
|
||||||
|
|
||||||
def add(type, tag=nil, keys={})
|
def add(type, tag=nil, keys={})
|
||||||
if tag.kind_of?(Hash)
|
if tag.kind_of?(Hash)
|
||||||
keys = tag
|
keys = tag
|
||||||
|
|
|
@ -18,6 +18,17 @@ class Tk::Iwidgets::Watch
|
||||||
WidgetClassName = 'Watch'.freeze
|
WidgetClassName = 'Watch'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'showampm'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'clockcolor' << 'hourcolor' << 'minutecolor' <<
|
||||||
|
'pivotcolor' << 'secondcolor' << 'tickcolor'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def get_string
|
def get_string
|
||||||
tk_call(@path, 'get', '-string')
|
tk_call(@path, 'get', '-string')
|
||||||
end
|
end
|
||||||
|
|
|
@ -45,6 +45,12 @@ module Tk
|
||||||
# package:: ctext
|
# package:: ctext
|
||||||
autoload :CText, 'tkextlib/tcllib/ctext'
|
autoload :CText, 'tkextlib/tcllib/ctext'
|
||||||
|
|
||||||
|
# package:: getstring
|
||||||
|
autoload :GetString_Dialog, 'tkextlib/tcllib/getstring'
|
||||||
|
|
||||||
|
# package:: history
|
||||||
|
autoload :History, 'tkextlib/tcllib/history'
|
||||||
|
|
||||||
# package:: datefield
|
# package:: datefield
|
||||||
autoload :Datefield, 'tkextlib/tcllib/datefield'
|
autoload :Datefield, 'tkextlib/tcllib/datefield'
|
||||||
autoload :DateField, 'tkextlib/tcllib/datefield'
|
autoload :DateField, 'tkextlib/tcllib/datefield'
|
||||||
|
@ -56,11 +62,26 @@ module Tk
|
||||||
autoload :IP_Entry, 'tkextlib/tcllib/ip_entry'
|
autoload :IP_Entry, 'tkextlib/tcllib/ip_entry'
|
||||||
autoload :IPEntry, 'tkextlib/tcllib/ip_entry'
|
autoload :IPEntry, 'tkextlib/tcllib/ip_entry'
|
||||||
|
|
||||||
|
# package:: swaplist
|
||||||
|
autoload :Swaplist_Dialog, 'tkextlib/tcllib/swaplist'
|
||||||
|
|
||||||
# package:: Plotchart
|
# package:: Plotchart
|
||||||
autoload :Plotchart, 'tkextlib/tcllib/plotchart'
|
autoload :Plotchart, 'tkextlib/tcllib/plotchart'
|
||||||
|
|
||||||
|
# package:: tablelist
|
||||||
|
autoload :Tablelist, 'tkextlib/tcllib/tablelist'
|
||||||
|
autoload :TableList, 'tkextlib/tcllib/tablelist'
|
||||||
|
autoload :Tablelist_Tile, 'tkextlib/tcllib/tablelist_tile'
|
||||||
|
autoload :TableList_Tile, 'tkextlib/tcllib/tablelist_tile'
|
||||||
|
|
||||||
# package:: tkpiechart
|
# package:: tkpiechart
|
||||||
autoload :Tkpiechart, 'tkextlib/tcllib/tkpiechart'
|
autoload :Tkpiechart, 'tkextlib/tcllib/tkpiechart'
|
||||||
|
|
||||||
|
# package:: tooltip
|
||||||
|
autoload :Tooltip, 'tkextlib/tcllib/tooltip'
|
||||||
|
|
||||||
|
# package:: widget
|
||||||
|
autoload :Wdiget, 'tkextlib/tcllib/widget'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,7 @@ class TkScrollbar
|
||||||
end
|
end
|
||||||
|
|
||||||
# TkPackage.require('autoscroll', '1.0')
|
# TkPackage.require('autoscroll', '1.0')
|
||||||
|
# TkPackage.require('autoscroll', '1.1')
|
||||||
TkPackage.require('autoscroll')
|
TkPackage.require('autoscroll')
|
||||||
|
|
||||||
module Tk
|
module Tk
|
||||||
|
@ -142,7 +143,16 @@ module Tk
|
||||||
def self.unautoscroll(win)
|
def self.unautoscroll(win)
|
||||||
tk_call_without_enc('::autoscroll::unautoscroll', win.path)
|
tk_call_without_enc('::autoscroll::unautoscroll', win.path)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.wrap
|
||||||
|
# v1.1
|
||||||
|
tk_call_without_enc('::autoscroll::wrap')
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.unwrap
|
||||||
|
# v1.1
|
||||||
|
tk_call_without_enc('::autoscroll::unwrap')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,17 @@ class Tk::Tcllib::CText
|
||||||
end
|
end
|
||||||
private :create_self
|
private :create_self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'linemapfg' << 'linemapbg' <<
|
||||||
|
'linemap_select_fg' << 'linemap_select_bg'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
super() << 'highlight' << 'linemap_markable'
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
def append(*args)
|
def append(*args)
|
||||||
tk_send('append', *args)
|
tk_send('append', *args)
|
||||||
end
|
end
|
||||||
|
|
84
ext/tk/lib/tkextlib/tcllib/dialog.rb
Normal file
84
ext/tk/lib/tkextlib/tcllib/dialog.rb
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
#
|
||||||
|
# tkextlib/tcllib/dialog.rb
|
||||||
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||||
|
#
|
||||||
|
# * Part of tcllib extension
|
||||||
|
# * Generic dialog widget (themed)
|
||||||
|
#
|
||||||
|
|
||||||
|
require 'tk'
|
||||||
|
require 'tkextlib/tcllib.rb'
|
||||||
|
|
||||||
|
# TkPackage.require('widget::dialog', '1.2')
|
||||||
|
TkPackage.require('widget::dialog')
|
||||||
|
|
||||||
|
module Tk::Tcllib
|
||||||
|
module Widget
|
||||||
|
class Dialog < TkWindow
|
||||||
|
PACKAGE_NAME = 'widget::dialog'.freeze
|
||||||
|
def self.package_name
|
||||||
|
PACKAGE_NAME
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.package_version
|
||||||
|
begin
|
||||||
|
TkPackage.require('widget::dialog')
|
||||||
|
rescue
|
||||||
|
''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Tk::Tcllib::Widget::Dialog
|
||||||
|
TkCommandNames = ['::widget::dialog'.freeze].freeze
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
['separator', 'synchronous', 'transient']
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def create_self(keys)
|
||||||
|
if keys and keys != None
|
||||||
|
tk_call_without_enc(self.class::TkCommandNames[0], @path,
|
||||||
|
*hash_kv(keys, true))
|
||||||
|
else
|
||||||
|
tk_call_without_enc(self.class::TkCommandNames[0], @path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
private :create_self
|
||||||
|
|
||||||
|
def add(what, *args)
|
||||||
|
window(tk_send('add', *args))
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_frame
|
||||||
|
window(tk_send('getframe'))
|
||||||
|
end
|
||||||
|
|
||||||
|
def set_widget(widget)
|
||||||
|
tk_send('setwidget', widget)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def display
|
||||||
|
tk_send('display')
|
||||||
|
self
|
||||||
|
end
|
||||||
|
alias show display
|
||||||
|
|
||||||
|
def cancel
|
||||||
|
tk_send('cancel')
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def close(reason = None)
|
||||||
|
tk_send('close', reason)
|
||||||
|
end
|
||||||
|
|
||||||
|
def withdraw
|
||||||
|
tk_send('withdraw')
|
||||||
|
self
|
||||||
|
end
|
||||||
|
end
|
131
ext/tk/lib/tkextlib/tcllib/getstring.rb
Normal file
131
ext/tk/lib/tkextlib/tcllib/getstring.rb
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
#
|
||||||
|
# tkextlib/tcllib/getstring.rb
|
||||||
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||||
|
#
|
||||||
|
# * Part of tcllib extension
|
||||||
|
# * A dialog which consists of an Entry, OK, and Cancel buttons.
|
||||||
|
#
|
||||||
|
|
||||||
|
require 'tk'
|
||||||
|
require 'tk/entry'
|
||||||
|
require 'tkextlib/tcllib.rb'
|
||||||
|
|
||||||
|
# TkPackage.require('getstring', '0.1')
|
||||||
|
TkPackage.require('getstring')
|
||||||
|
|
||||||
|
module Tk::Tcllib
|
||||||
|
class GetString_Dialog < TkWindow
|
||||||
|
PACKAGE_NAME = 'getstring'.freeze
|
||||||
|
def self.package_name
|
||||||
|
PACKAGE_NAME
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.package_version
|
||||||
|
begin
|
||||||
|
TkPackage.require('getstring')
|
||||||
|
rescue
|
||||||
|
''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
class Tk::Tcllib::GetString_Dialog
|
||||||
|
TkCommandNames = ['::getstring::tk_getString'.freeze].freeze
|
||||||
|
WidgetClassName = 'TkSDialog'.freeze
|
||||||
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def self.show(*args)
|
||||||
|
dialog = self.new(*args)
|
||||||
|
dialog.show
|
||||||
|
[dialog.status, dialog.value]
|
||||||
|
end
|
||||||
|
def self.display(*args)
|
||||||
|
self.show(*args)
|
||||||
|
end
|
||||||
|
|
||||||
|
def initialize(*args) # args = (parent=nil, text='', keys=nil)
|
||||||
|
keys = args.pop
|
||||||
|
if keys.kind_of?(Hash)
|
||||||
|
text = args.pop
|
||||||
|
@keys = _symbolkey2str(keys)
|
||||||
|
args.push(keys)
|
||||||
|
else
|
||||||
|
text = keys
|
||||||
|
@keys = {}
|
||||||
|
end
|
||||||
|
if text
|
||||||
|
@text = text.dup
|
||||||
|
else
|
||||||
|
@text = ''
|
||||||
|
end
|
||||||
|
|
||||||
|
@variable = TkVariable.new
|
||||||
|
@status = nil
|
||||||
|
|
||||||
|
super(*args)
|
||||||
|
end
|
||||||
|
|
||||||
|
def create_self(keys)
|
||||||
|
# dummy
|
||||||
|
end
|
||||||
|
private :create_self
|
||||||
|
|
||||||
|
def show
|
||||||
|
@variable.value = ''
|
||||||
|
@status = bool(tk_call(self.class::TkCommandNames[0],
|
||||||
|
@path, @variable, @text, *hash_kv(@keys)))
|
||||||
|
end
|
||||||
|
alias display show
|
||||||
|
|
||||||
|
def status
|
||||||
|
@status
|
||||||
|
end
|
||||||
|
|
||||||
|
def value
|
||||||
|
@variable.value
|
||||||
|
end
|
||||||
|
|
||||||
|
def cget(slot)
|
||||||
|
slot = slot.to_s
|
||||||
|
if slot == 'text'
|
||||||
|
@text
|
||||||
|
else
|
||||||
|
@keys[slot]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def configure(slot, value=None)
|
||||||
|
if slot.kind_of?(Hash)
|
||||||
|
slot.each{|k, v| configure(k, v)}
|
||||||
|
else
|
||||||
|
slot = slot.to_s
|
||||||
|
value = _symbolkey2str(value) if value.kind_of?(Hash)
|
||||||
|
if value && value != None
|
||||||
|
if slot == 'text'
|
||||||
|
@text = value.to_s
|
||||||
|
else
|
||||||
|
@keys[slot] = value
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if slot == 'text'
|
||||||
|
@text = ''
|
||||||
|
else
|
||||||
|
@keys.delete(slot)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def configinfo(slot = nil)
|
||||||
|
if slot
|
||||||
|
slot = slot.to_s
|
||||||
|
[ slot, nil, nil, nil, ( (slot == 'text')? @text: @keys[slot] ) ]
|
||||||
|
else
|
||||||
|
@keys.collect{|k, v| [ k, nil, nil, nil, v ] } \
|
||||||
|
<< [ 'text', nil, nil, nil, @text ]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
73
ext/tk/lib/tkextlib/tcllib/history.rb
Normal file
73
ext/tk/lib/tkextlib/tcllib/history.rb
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
#
|
||||||
|
# tkextlib/tcllib/history.rb
|
||||||
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||||
|
#
|
||||||
|
# * Part of tcllib extension
|
||||||
|
# * Provides a history for Entry widgets
|
||||||
|
#
|
||||||
|
|
||||||
|
require 'tk'
|
||||||
|
require 'tk/entry'
|
||||||
|
require 'tkextlib/tcllib.rb'
|
||||||
|
|
||||||
|
# TkPackage.require('history', '0.1')
|
||||||
|
TkPackage.require('history')
|
||||||
|
|
||||||
|
module Tk::Tcllib
|
||||||
|
module History
|
||||||
|
PACKAGE_NAME = 'history'.freeze
|
||||||
|
def self.package_name
|
||||||
|
PACKAGE_NAME
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.package_version
|
||||||
|
begin
|
||||||
|
TkPackage.require('history')
|
||||||
|
rescue
|
||||||
|
''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
module Tk::Tcllib::History
|
||||||
|
extend TkCore
|
||||||
|
|
||||||
|
def self.init(entry, length=None)
|
||||||
|
tk_call_without_enc('::history::init', entry.path, length)
|
||||||
|
entry.extend(self) # add methods to treat history to the entry widget
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.remove(entry)
|
||||||
|
tk_call_without_enc('::history::remove', entry.path)
|
||||||
|
entry
|
||||||
|
end
|
||||||
|
|
||||||
|
def history_remove
|
||||||
|
tk_call_without_enc('::history::remove', @path)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def history_add(text)
|
||||||
|
tk_call('::history::add', @path, text)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def history_get
|
||||||
|
simplelist(tk_call_without_enc('::history::get', @path))
|
||||||
|
end
|
||||||
|
|
||||||
|
def history_clear
|
||||||
|
tk_call_without_enc('::history::clear', @path)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def history_configure(opt, value)
|
||||||
|
tk_call('::history::configure', @path, opt, value)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def history_configinfo(opt)
|
||||||
|
tk_call('::history::configure', @path, opt)
|
||||||
|
end
|
||||||
|
end
|
|
@ -51,6 +51,11 @@ class Tk::Tcllib::IP_Entry
|
||||||
end
|
end
|
||||||
private :create_self
|
private :create_self
|
||||||
|
|
||||||
|
def __strval_optkeys
|
||||||
|
super() << 'fg' << 'bg' << 'insertbackground'
|
||||||
|
end
|
||||||
|
private :__strval_optkeys
|
||||||
|
|
||||||
def complete?
|
def complete?
|
||||||
bool(tk_send_without_enc('complete'))
|
bool(tk_send_without_enc('complete'))
|
||||||
end
|
end
|
||||||
|
|
72
ext/tk/lib/tkextlib/tcllib/panelframe.rb
Normal file
72
ext/tk/lib/tkextlib/tcllib/panelframe.rb
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
#
|
||||||
|
# tkextlib/tcllib/panelframe.rb
|
||||||
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||||
|
#
|
||||||
|
# * Part of tcllib extension
|
||||||
|
# * Create PanelFrame widgets.
|
||||||
|
#
|
||||||
|
|
||||||
|
require 'tk'
|
||||||
|
require 'tkextlib/tcllib.rb'
|
||||||
|
|
||||||
|
# TkPackage.require('widget::panelframe', '1.0')
|
||||||
|
TkPackage.require('widget::panelframe')
|
||||||
|
|
||||||
|
module Tk::Tcllib
|
||||||
|
module Widget
|
||||||
|
class PanelFrame < TkWindow
|
||||||
|
PACKAGE_NAME = 'widget::panelframe'.freeze
|
||||||
|
def self.package_name
|
||||||
|
PACKAGE_NAME
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.package_version
|
||||||
|
begin
|
||||||
|
TkPackage.require('widget::panelframe')
|
||||||
|
rescue
|
||||||
|
''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Panelframe = PanelFrame
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Tk::Tcllib::Widget::PanelFrame
|
||||||
|
TkCommandNames = ['::widget::panelframe'.freeze].freeze
|
||||||
|
|
||||||
|
def create_self(keys)
|
||||||
|
if keys and keys != None
|
||||||
|
tk_call_without_enc(self.class::TkCommandNames[0], @path,
|
||||||
|
*hash_kv(keys, true))
|
||||||
|
else
|
||||||
|
tk_call_without_enc(self.class::TkCommandNames[0], @path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
private :create_self
|
||||||
|
|
||||||
|
def add(what, *args)
|
||||||
|
window(tk_send('add', *args))
|
||||||
|
end
|
||||||
|
|
||||||
|
#def get_frame
|
||||||
|
# window(tk_send('getframe'))
|
||||||
|
#end
|
||||||
|
|
||||||
|
def set_widget(widget)
|
||||||
|
tk_send('setwidget', widget)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def remove(*wins)
|
||||||
|
tk_send('remove', *wins)
|
||||||
|
end
|
||||||
|
def remove_destroy(*wins)
|
||||||
|
tk_send('remove', '-destroy', *wins)
|
||||||
|
end
|
||||||
|
alias delete remove_destroy
|
||||||
|
|
||||||
|
def items
|
||||||
|
simplelist(tk_send('items')).collect!{|w| window(w)}
|
||||||
|
end
|
||||||
|
end
|
|
@ -61,6 +61,7 @@ require 'tk'
|
||||||
require 'tkextlib/tcllib.rb'
|
require 'tkextlib/tcllib.rb'
|
||||||
|
|
||||||
# TkPackage.require('Plotchart', '0.9')
|
# TkPackage.require('Plotchart', '0.9')
|
||||||
|
# TkPackage.require('Plotchart', '1.1')
|
||||||
TkPackage.require('Plotchart')
|
TkPackage.require('Plotchart')
|
||||||
|
|
||||||
module Tk
|
module Tk
|
||||||
|
@ -272,6 +273,51 @@ module Tk::Tcllib::Plotchart
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def contourlines(xcrd, ycrd, vals, clss=None)
|
||||||
|
xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array)
|
||||||
|
ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array)
|
||||||
|
vals = array2tk_list(vals) if vals.kind_of?(Array)
|
||||||
|
clss = array2tk_list(clss) if clss.kind_of?(Array)
|
||||||
|
|
||||||
|
tk_call_without_enc(@chart, 'contourlines', xcrd, ycrd, vals, clss)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def contourfill(xcrd, ycrd, vals, klasses=None)
|
||||||
|
xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array)
|
||||||
|
ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array)
|
||||||
|
vals = array2tk_list(vals) if vals.kind_of?(Array)
|
||||||
|
clss = array2tk_list(clss) if clss.kind_of?(Array)
|
||||||
|
|
||||||
|
tk_call_without_enc(@chart, 'contourfill', xcrd, ycrd, vals, clss)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def contourbox(xcrd, ycrd, vals, klasses=None)
|
||||||
|
xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array)
|
||||||
|
ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array)
|
||||||
|
vals = array2tk_list(vals) if vals.kind_of?(Array)
|
||||||
|
clss = array2tk_list(clss) if clss.kind_of?(Array)
|
||||||
|
|
||||||
|
tk_call_without_enc(@chart, 'contourbox', xcrd, ycrd, vals, clss)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def color_map(colors)
|
||||||
|
colors = array2tk_list(colors) if colors.kind_of?(Array)
|
||||||
|
|
||||||
|
tk_call_without_enc(@chart, 'colorMap', colors)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def grid_cells(xcrd, ycrd)
|
||||||
|
xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array)
|
||||||
|
ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array)
|
||||||
|
|
||||||
|
tk_call_without_enc(@chart, 'grid', xcrd, ycrd)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
def dataconfig(series, key, value=None)
|
def dataconfig(series, key, value=None)
|
||||||
if key.kind_of?(Hash)
|
if key.kind_of?(Hash)
|
||||||
tk_call_without_enc(@chart, 'dataconfig', series, *hash_kv(key, true))
|
tk_call_without_enc(@chart, 'dataconfig', series, *hash_kv(key, true))
|
||||||
|
@ -479,6 +525,13 @@ module Tk::Tcllib::Plotchart
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def plot_funcont(conts, cmd=Proc.new)
|
||||||
|
conts = array2tk_list(conts) if conts.kind_of?(Array)
|
||||||
|
Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd)} $x $y}")
|
||||||
|
tk_call_without_enc(@chart, 'plotfuncont', "#{@path}_#{@chart}", conts)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
def grid_size(nxcells, nycells)
|
def grid_size(nxcells, nycells)
|
||||||
tk_call_without_enc(@chart, 'gridsize', nxcells, nycells)
|
tk_call_without_enc(@chart, 'gridsize', nxcells, nycells)
|
||||||
self
|
self
|
||||||
|
@ -633,7 +686,7 @@ module Tk::Tcllib::Plotchart
|
||||||
# time_end := String of time format (e.g. "1 january 2004")
|
# time_end := String of time format (e.g. "1 january 2004")
|
||||||
# items := Expected/maximum number of items
|
# items := Expected/maximum number of items
|
||||||
# ( This determines the vertical spacing. )
|
# ( This determines the vertical spacing. )
|
||||||
if args[0].kind_of?(Array)
|
if args[0].kind_of?(String)
|
||||||
@time_begin = args.shift
|
@time_begin = args.shift
|
||||||
@time_end = args.shift
|
@time_end = args.shift
|
||||||
@items = args.shift
|
@items = args.shift
|
||||||
|
@ -679,6 +732,105 @@ module Tk::Tcllib::Plotchart
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
############################
|
||||||
|
class Gnattchart < TkCanvas
|
||||||
|
include ChartMethod
|
||||||
|
|
||||||
|
TkCommandNames = [
|
||||||
|
'canvas'.freeze,
|
||||||
|
'::Plotchart::createGnattchart'.freeze
|
||||||
|
].freeze
|
||||||
|
|
||||||
|
def initialize(*args)
|
||||||
|
# args := ([parent,] time_begin, time_end, items [, text_width] [, keys])
|
||||||
|
# time_begin := String of time format (e.g. "1 january 2004")
|
||||||
|
# time_end := String of time format (e.g. "1 january 2004")
|
||||||
|
# items := Expected/maximum number of items
|
||||||
|
# ( This determines the vertical spacing. )
|
||||||
|
if args[0].kind_of?(String)
|
||||||
|
@time_begin = args.shift
|
||||||
|
@time_end = args.shift
|
||||||
|
@items = args.shift
|
||||||
|
|
||||||
|
if args[0].kind_of?(Fixnum)
|
||||||
|
@text_width = args.shift
|
||||||
|
else
|
||||||
|
@text_width = None
|
||||||
|
end
|
||||||
|
|
||||||
|
super(*args) # create canvas widget
|
||||||
|
else
|
||||||
|
parent = args.shift
|
||||||
|
|
||||||
|
@time_begin = args.shift
|
||||||
|
@time_end = args.shift
|
||||||
|
@items = args.shift
|
||||||
|
|
||||||
|
if args[0].kind_of?(Fixnum)
|
||||||
|
@text_width = args.shift
|
||||||
|
else
|
||||||
|
@text_width = None
|
||||||
|
end
|
||||||
|
|
||||||
|
if parent.kind_of?(TkCanvas)
|
||||||
|
@path = parent.path
|
||||||
|
else
|
||||||
|
super(parent, *args) # create canvas widget
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@chart = _create_chart
|
||||||
|
end
|
||||||
|
|
||||||
|
def _create_chart
|
||||||
|
p self.class::TkCommandNames[1] if $DEBUG
|
||||||
|
tk_call_without_enc(self.class::TkCommandNames[1], @path,
|
||||||
|
@time_begin, @time_end, @items, @text_width)
|
||||||
|
end
|
||||||
|
private :_create_chart
|
||||||
|
|
||||||
|
def task(txt, time_begin, time_end, completed=0.0)
|
||||||
|
list(tk_call_without_enc(@chart, 'task', txt, time_begin, time_end,
|
||||||
|
completed)).collect!{|id|
|
||||||
|
TkcItem.id2obj(self, id)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
def milestone(txt, time, col=None)
|
||||||
|
tk_call_without_enc(@chart, 'milestone', txt, time, col)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def vertline(txt, time)
|
||||||
|
tk_call_without_enc(@chart, 'vertline', txt, time)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def connect(from_task, to_task)
|
||||||
|
from_task = array2tk_list(from_task) if from_task.kind_of?(Array)
|
||||||
|
to_task = array2tk_list(to_task) if to_task.kind_of?(Array)
|
||||||
|
|
||||||
|
tk_call_without_enc(@chart, 'connect', from_task, to_task)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def summary(txt, tasks)
|
||||||
|
tasks = array2tk_list(tasks) if tasks.kind_of?(Array)
|
||||||
|
tk_call_without_enc(@chart, 'summary', tasks)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def color_of_part(keyword, newcolor)
|
||||||
|
tk_call_without_enc(@chart, 'color', keyword, newcolor)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def font_of_part(keyword, newfont)
|
||||||
|
tk_call_without_enc(@chart, 'font', keyword, newfont)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
############################
|
############################
|
||||||
class PlotSeries < TkObject
|
class PlotSeries < TkObject
|
||||||
SeriesID_TBL = TkCore::INTERP.create_table
|
SeriesID_TBL = TkCore::INTERP.create_table
|
||||||
|
|
65
ext/tk/lib/tkextlib/tcllib/ruler.rb
Normal file
65
ext/tk/lib/tkextlib/tcllib/ruler.rb
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
#
|
||||||
|
# tkextlib/tcllib/ruler.rb
|
||||||
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||||
|
#
|
||||||
|
# * Part of tcllib extension
|
||||||
|
# * ruler widget
|
||||||
|
#
|
||||||
|
|
||||||
|
require 'tk'
|
||||||
|
require 'tkextlib/tcllib.rb'
|
||||||
|
|
||||||
|
# TkPackage.require('widget::ruler', '1.0')
|
||||||
|
TkPackage.require('widget::ruler')
|
||||||
|
|
||||||
|
module Tk::Tcllib
|
||||||
|
module Widget
|
||||||
|
class Ruler < TkWindow
|
||||||
|
PACKAGE_NAME = 'widget::ruler'.freeze
|
||||||
|
def self.package_name
|
||||||
|
PACKAGE_NAME
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.package_version
|
||||||
|
begin
|
||||||
|
TkPackage.require('widget::ruler')
|
||||||
|
rescue
|
||||||
|
''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Tk::Tcllib::Widget::Ruler
|
||||||
|
TkCommandNames = ['::widget::ruler'.freeze].freeze
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
['showvalues', 'outline', 'grid']
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __numlistval_optkeys
|
||||||
|
['interval', 'sizes']
|
||||||
|
end
|
||||||
|
private :__numlistval_optkeys
|
||||||
|
|
||||||
|
def create_self(keys)
|
||||||
|
if keys and keys != None
|
||||||
|
tk_call_without_enc(self.class::TkCommandNames[0], @path,
|
||||||
|
*hash_kv(keys, true))
|
||||||
|
else
|
||||||
|
tk_call_without_enc(self.class::TkCommandNames[0], @path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
private :create_self
|
||||||
|
|
||||||
|
def redraw
|
||||||
|
tk_send('redraw')
|
||||||
|
self
|
||||||
|
end
|
||||||
|
|
||||||
|
def shade(org, dest, frac)
|
||||||
|
tk_send('shade', org, dest, frac)
|
||||||
|
end
|
||||||
|
end
|
68
ext/tk/lib/tkextlib/tcllib/screenruler.rb
Normal file
68
ext/tk/lib/tkextlib/tcllib/screenruler.rb
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
#
|
||||||
|
# tkextlib/tcllib/screenruler.rb
|
||||||
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||||
|
#
|
||||||
|
# * Part of tcllib extension
|
||||||
|
# * screenruler dialog
|
||||||
|
#
|
||||||
|
|
||||||
|
require 'tk'
|
||||||
|
require 'tkextlib/tcllib.rb'
|
||||||
|
|
||||||
|
# TkPackage.require('widget::screenruler', '1.1')
|
||||||
|
TkPackage.require('widget::screenruler')
|
||||||
|
|
||||||
|
module Tk::Tcllib
|
||||||
|
module Widget
|
||||||
|
class ScreenRuler < TkWindow
|
||||||
|
PACKAGE_NAME = 'widget::ruler'.freeze
|
||||||
|
def self.package_name
|
||||||
|
PACKAGE_NAME
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.package_version
|
||||||
|
begin
|
||||||
|
TkPackage.require('widget::screenruler')
|
||||||
|
rescue
|
||||||
|
''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Screenruler = ScreenRuler
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Tk::Tcllib::Widget::ScreenRuler
|
||||||
|
TkCommandNames = ['::widget::screenruler'.freeze].freeze
|
||||||
|
|
||||||
|
def __boolval_optkeys
|
||||||
|
['topmost', 'reflect']
|
||||||
|
end
|
||||||
|
private :__boolval_optkeys
|
||||||
|
|
||||||
|
def __numlistval_optkeys
|
||||||
|
['alpha']
|
||||||
|
end
|
||||||
|
private :__numlistval_optkeys
|
||||||
|
|
||||||
|
def create_self(keys)
|
||||||
|
if keys and keys != None
|
||||||
|
tk_call_without_enc(self.class::TkCommandNames[0], @path,
|
||||||
|
*hash_kv(keys, true))
|
||||||
|
else
|
||||||
|
tk_call_without_enc(self.class::TkCommandNames[0], @path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
private :create_self
|
||||||
|
|
||||||
|
def display
|
||||||
|
tk_send('display')
|
||||||
|
self
|
||||||
|
end
|
||||||
|
alias show display
|
||||||
|
|
||||||
|
def hide
|
||||||
|
tk_send('hide')
|
||||||
|
self
|
||||||
|
end
|
||||||
|
end
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue