mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* ext/tk/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/trunk@9448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									d6837060be
								
							
						
					
					
						commit
						3dd3b2136b
					
				
					 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/tk/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>
 | 
			
		||||
 | 
			
		||||
	* ext/extmk.rb, lib/mkmf.rb (with_config): support --with-extension
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
 | 
			
		||||
	* ext/tk/lib/tkextlib/tktable/tktable.rb: border_* instance methods
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -172,10 +172,11 @@ def pthread_check()
 | 
			
		|||
** PTHREAD SUPPORT CHECK WARNING: 
 | 
			
		||||
**
 | 
			
		||||
**   We cannot check the consistency of pthread support between Ruby 
 | 
			
		||||
**   and Tcl/Tk library on your environment (do coss-compile?). If the 
 | 
			
		||||
**   consistency is not kept, some memory troubles (e.g. "Hang-up" or 
 | 
			
		||||
**   "Segmentation Fault") may bother you. We strongly recommend you to 
 | 
			
		||||
**   check the consistency by your own hand.
 | 
			
		||||
**   and the Tcl/Tk library in your environment (are you perhaps
 | 
			
		||||
**   cross-compiling?). If pthread support for these 2 packages is
 | 
			
		||||
**   inconsistent you may find you get errors when running Ruby/Tk
 | 
			
		||||
**   (e.g. hangs or segmentation faults).  We strongly recommend
 | 
			
		||||
**   you to check the consistency manually.
 | 
			
		||||
**
 | 
			
		||||
*****************************************************************************
 | 
			
		||||
')
 | 
			
		||||
| 
						 | 
				
			
			@ -215,17 +216,17 @@ EOF
 | 
			
		|||
**
 | 
			
		||||
** PTHREAD SUPPORT MODE WARNING: 
 | 
			
		||||
**
 | 
			
		||||
**   Ruby is compiled with --enable-pthread, but your Tcl/Tk libraries
 | 
			
		||||
**   seems to be compiled without "pthread support". Although You can 
 | 
			
		||||
**   create tcltklib library, this combination may cause memory trouble 
 | 
			
		||||
**   (e.g. "Hang-up" or "Segmentation Fault"). If you have no reason you
 | 
			
		||||
**   must have to keep current pthread support status, we recommend you 
 | 
			
		||||
**   to make both or neither libraries to support pthread.
 | 
			
		||||
**   Ruby is compiled with --enable-pthread, but your Tcl/Tk library
 | 
			
		||||
**   seems to be compiled without pthread support. Although you can
 | 
			
		||||
**   create the tcltklib library, this combination may cause errors
 | 
			
		||||
**   (e.g. hangs or segmentation faults). If you have no reason to
 | 
			
		||||
**   keep the current pthread support status, we recommend you reconfigure
 | 
			
		||||
**   and recompile the libraries so that both or neither support pthreads.
 | 
			
		||||
**
 | 
			
		||||
**   If you want change the status of pthread support, please recompile 
 | 
			
		||||
**   Ruby without "--enable-pthread" configure option or recompile Tcl/Tk 
 | 
			
		||||
**   with "--enable-threads" configure option (if your Tcl/Tk is later 
 | 
			
		||||
**   than  or equal to Tcl/Tk8.1).
 | 
			
		||||
**   than or equal to Tcl/Tk 8.1).
 | 
			
		||||
**
 | 
			
		||||
*****************************************************************************
 | 
			
		||||
')
 | 
			
		||||
| 
						 | 
				
			
			@ -247,16 +248,16 @@ EOF
 | 
			
		|||
      puts(%Q'\
 | 
			
		||||
*****************************************************************************
 | 
			
		||||
**
 | 
			
		||||
** PTHREAD SUPPORT MODE ERRROR: 
 | 
			
		||||
** PTHREAD SUPPORT MODE ERROR: 
 | 
			
		||||
**
 | 
			
		||||
**   Ruby is not compiled with --enable-pthread, but your Tcl/Tk 
 | 
			
		||||
**   libararies seems to be compiled with "pthread support". This 
 | 
			
		||||
**   combination possibly cause "Hang-up" or "Segmentation Fault" 
 | 
			
		||||
**   frequently when Ruby/Tk is working. We NEVER recommend you to 
 | 
			
		||||
**   create the library under such combination of pthread support. 
 | 
			
		||||
**   library seems to be compiled with pthread support. This
 | 
			
		||||
**   combination may cause frequent hang or segmentation fault
 | 
			
		||||
**   errors when Ruby/Tk is working. We recommend that you NEVER
 | 
			
		||||
**   create the library with such a combination of pthread support.
 | 
			
		||||
**
 | 
			
		||||
**   Please recompile Ruby with "--enable-pthread" configure option 
 | 
			
		||||
**   or recompile Tcl/Tk with "--disable-threads" configure option.
 | 
			
		||||
**   Please recompile Ruby with the "--enable-pthread" configure option
 | 
			
		||||
**   or recompile Tcl/Tk with the "--disable-threads" configure option.
 | 
			
		||||
**
 | 
			
		||||
*****************************************************************************
 | 
			
		||||
')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2696,12 +2696,18 @@ module TkConfigMethod
 | 
			
		|||
  private :__numstrval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    []
 | 
			
		||||
    ['exportselection', 'jump', 'setgrid', 'takefocus']
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_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
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -4437,7 +4443,7 @@ end
 | 
			
		|||
#Tk.freeze
 | 
			
		||||
 | 
			
		||||
module Tk
 | 
			
		||||
  RELEASE_DATE = '2005-09-17'.freeze
 | 
			
		||||
  RELEASE_DATE = '2005-10-23'.freeze
 | 
			
		||||
 | 
			
		||||
  autoload :AUTO_PATH,        'tk/variable'
 | 
			
		||||
  autoload :TCL_PACKAGE_PATH, 'tk/variable'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,11 +11,25 @@ require 'tk/scrollable'
 | 
			
		|||
module TkCanvasItemConfig
 | 
			
		||||
  include TkItemConfigMethod
 | 
			
		||||
 | 
			
		||||
  def __item_strval_optkeys(id)
 | 
			
		||||
    # maybe need to override
 | 
			
		||||
    super(id) + [
 | 
			
		||||
      'fill', 'activefill', 'disabledfill', 
 | 
			
		||||
      'outline', 'activeoutline', 'disabledoutline'
 | 
			
		||||
    ]
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_methodcall_optkeys(id)
 | 
			
		||||
    {'coords'=>'coords'}
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_methodcall_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_val2ruby_optkeys(id)  # { key=>proc, ... }
 | 
			
		||||
    super(id).update('window'=>proc{|i, v| window(v)})
 | 
			
		||||
  end
 | 
			
		||||
  private :__val2ruby_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_pathname(tagOrId)
 | 
			
		||||
    if tagOrId.kind_of?(TkcItem) || tagOrId.kind_of?(TkcTag)
 | 
			
		||||
      self.path + ';' + tagOrId.id.to_s
 | 
			
		||||
| 
						 | 
				
			
			@ -47,6 +61,16 @@ class TkCanvas<TkWindow
 | 
			
		|||
  #end
 | 
			
		||||
  #private :create_self
 | 
			
		||||
 | 
			
		||||
  def __numval_optkeys
 | 
			
		||||
    super() + ['closeenough']
 | 
			
		||||
  end
 | 
			
		||||
  private :__numval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() + ['confine']
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tag)
 | 
			
		||||
    if tag.kind_of?(TkcItem) || tag.kind_of?(TkcTag)
 | 
			
		||||
      tag.id
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,6 +21,11 @@ class TkEntry<TkLabel
 | 
			
		|||
  #end
 | 
			
		||||
  #private :create_self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() + ['show', 'disabledbackground', 'readonlybackground']
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def bbox(index)
 | 
			
		||||
    list(tk_send_without_enc('bbox', index))
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,6 +30,11 @@ class TkFrame<TkWindow
 | 
			
		|||
#  end
 | 
			
		||||
#################
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'container'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def initialize(parent=nil, keys=nil)
 | 
			
		||||
    my_class_name = nil
 | 
			
		||||
    if self.class < WidgetClassNames[self.class::WidgetClassName]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -96,6 +96,11 @@ class TkImage<TkObject
 | 
			
		|||
end
 | 
			
		||||
 | 
			
		||||
class TkBitmapImage<TkImage
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() + ['maskdata', 'maskfile']
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def initialize(*args)
 | 
			
		||||
    @type = 'bitmap'
 | 
			
		||||
    super(*args)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,13 +19,19 @@ module TkItemConfigOptkeys
 | 
			
		|||
  private :__item_numstrval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_boolval_optkeys(id)
 | 
			
		||||
    []
 | 
			
		||||
    ['exportselection', 'jump', 'setgrid', 'takefocus']
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_strval_optkeys(id)
 | 
			
		||||
    # maybe need to override
 | 
			
		||||
    ['text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile']
 | 
			
		||||
    [
 | 
			
		||||
      'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile', 
 | 
			
		||||
      'activebackground', 'activeforeground', 'background', 
 | 
			
		||||
      'disabledforeground', 'disabledbackground', 'foreground', 
 | 
			
		||||
      'highlightbackground', 'highlightcolor', 'insertbackground', 
 | 
			
		||||
      'selectbackground', 'selectforeground', 'troughcolor'
 | 
			
		||||
    ]
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,5 +16,10 @@ class TkLabelFrame<TkFrame
 | 
			
		|||
  #  end
 | 
			
		||||
  #end
 | 
			
		||||
  #private :create_self
 | 
			
		||||
 | 
			
		||||
  def __val2ruby_optkeys  # { key=>proc, ... }
 | 
			
		||||
    super().update('labelwidget'=>proc{|v| window(v)})
 | 
			
		||||
  end
 | 
			
		||||
  private :__val2ruby_optkeys
 | 
			
		||||
end
 | 
			
		||||
TkLabelframe = TkLabelFrame
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,6 +32,11 @@ class TkListbox<TkTextWin
 | 
			
		|||
  #end
 | 
			
		||||
  #private :create_self
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'listvariable'
 | 
			
		||||
  end
 | 
			
		||||
  private :__tkvariable_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(id)
 | 
			
		||||
    #id.to_s
 | 
			
		||||
    _get_eval_string(id)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,11 +18,21 @@ module TkMenuEntryConfig
 | 
			
		|||
  end
 | 
			
		||||
  private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_strval_optkeys(id)
 | 
			
		||||
    super(id) << 'selectcolor'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_listval_optkeys(id)
 | 
			
		||||
    []
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_listval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_val2ruby_optkeys(id)  # { key=>proc, ... }
 | 
			
		||||
    super(id).update('menu'=>proc{|i, v| window(v)})
 | 
			
		||||
  end
 | 
			
		||||
  private :__val2ruby_optkeys
 | 
			
		||||
 | 
			
		||||
  alias entrycget itemcget
 | 
			
		||||
  alias entryconfigure itemconfigure
 | 
			
		||||
  alias entryconfiginfo itemconfiginfo
 | 
			
		||||
| 
						 | 
				
			
			@ -49,6 +59,16 @@ class TkMenu<TkWindow
 | 
			
		|||
  #end
 | 
			
		||||
  #private :create_self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'selectcolor' << 'title'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'tearoff'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def self.new_menuspec(menu_spec, parent = nil, tearoff = false, keys = nil)
 | 
			
		||||
    if parent.kind_of?(Hash)
 | 
			
		||||
      keys = _symbolkey2str(parent)
 | 
			
		||||
| 
						 | 
				
			
			@ -411,6 +431,12 @@ class TkMenubutton<TkLabel
 | 
			
		|||
    end
 | 
			
		||||
  end
 | 
			
		||||
  private :create_self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'indicatoron'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
end
 | 
			
		||||
TkMenuButton = TkMenubutton
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,16 @@ class TkRadioButton<TkButton
 | 
			
		|||
  #end
 | 
			
		||||
  #private :create_self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'indicatoron'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'selectcolor'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __ruby2val_optkeys  # { key=>proc, ... }
 | 
			
		||||
    {
 | 
			
		||||
      'variable'=>proc{|v| tk_trace_variable(v)}  # for backward compatibility
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,6 +24,11 @@ class TkScale<TkWindow
 | 
			
		|||
  end
 | 
			
		||||
  private :create_self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'label'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def _wrap_command_arg(cmd)
 | 
			
		||||
    proc{|val|
 | 
			
		||||
      if val.kind_of?(String)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,6 +64,21 @@ class TkSpinbox<TkEntry
 | 
			
		|||
  #end
 | 
			
		||||
  #private :create_self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'wrap'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'buttonbackground' << 'format'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __listval_optkeys
 | 
			
		||||
    super() << 'values'
 | 
			
		||||
  end
 | 
			
		||||
  private :__listval_optkeys
 | 
			
		||||
 | 
			
		||||
  def identify(x, y)
 | 
			
		||||
    tk_send_without_enc('identify', x, y)
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -187,6 +187,11 @@ class TkText<TkTextWin
 | 
			
		|||
  end
 | 
			
		||||
  private :create_self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'inactiveseletcionbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def self.at(x, y)
 | 
			
		||||
    TkText::IndexString.at(x, y)
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,6 +45,21 @@ class TkToplevel<TkWindow
 | 
			
		|||
#  end
 | 
			
		||||
#################
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'container'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'screen'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __val2ruby_optkeys  # { key=>proc, ... }
 | 
			
		||||
    super().update('menu'=>proc{|v| window(v)})
 | 
			
		||||
  end
 | 
			
		||||
  private :__val2ruby_optkeys
 | 
			
		||||
 | 
			
		||||
  def __methodcall_optkeys  # { key=>method, ... }
 | 
			
		||||
    TOPLEVEL_METHODCALL_OPTKEYS
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
 | 
			
		||||
  [ 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
 | 
			
		||||
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) >=======================
 | 
			
		||||
 | 
			
		||||
Tcllib       1.7     http://sf.net/projects/tcllib
 | 
			
		||||
Tcllib       1.8     http://sf.net/projects/tcllib
 | 
			
		||||
                       ==> tcllib  (partial support; Tklib part only)
 | 
			
		||||
 | 
			
		||||
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>
 | 
			
		||||
                                    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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -75,15 +75,16 @@ ICONS        1.0     http://www.satisoft.com/tcltk/icons/        ==> ICONS
 | 
			
		|||
TkImg        1.3     http://sf.net/projects/tkimg                ==> tkimg
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
BLT          2.4z   http://sourceforge.net/projects/blt
 | 
			
		||||
BLT          2.4z    http://sourceforge.net/projects/blt
 | 
			
		||||
                        * see also tcltk-ext library on RAA 
 | 
			
		||||
                                (http://raa.ruby-lang.org/)
 | 
			
		||||
                      ==> blt
 | 
			
		||||
 | 
			
		||||
TkTreeCtrl   CVS/Hd(2005-03-25)
 | 
			
		||||
                    http://tktreectrl.sourceforge.net/           ==> treectrl
 | 
			
		||||
                     http://tktreectrl.sourceforge.net/          ==> treectrl
 | 
			
		||||
 | 
			
		||||
Tile         0.7.2   http://tktable.sourceforge.net/tile/        ==> tile
 | 
			
		||||
 | 
			
		||||
Tile         0.6     http://tktable.sourceforge.net/tile/        ==> tile
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===< support (may be alpha or beta quality) >=================================
 | 
			
		||||
| 
						 | 
				
			
			@ -96,97 +97,99 @@ TclX         CVS/Hd(2005-02-07)
 | 
			
		|||
                       ==> tclx (partial support; infox command and 
 | 
			
		||||
                                                   XPG/3 message catalogs only)
 | 
			
		||||
 | 
			
		||||
Trofs        0.4.3   http://math.nist.gov/~DPorter/tcltk/trofs/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===< possibly available (not tested; alpha quality) >=========================
 | 
			
		||||
 | 
			
		||||
winico       CVS/Hd(2004-11-02)
 | 
			
		||||
                    http://tktable.sourceforge.net
 | 
			
		||||
                      ==> winico (win32 only)
 | 
			
		||||
winico       0.6
 | 
			
		||||
                     http://tktable.sourceforge.net
 | 
			
		||||
                       ==> winico (win32 only)
 | 
			
		||||
 | 
			
		||||
TkTrans      latest(2004-10-11)
 | 
			
		||||
                    http://www2.cmp.uea.ac.uk/~fuzz/tktrans/default.html
 | 
			
		||||
                      ==>  tktrans (win32 only)
 | 
			
		||||
                     http://www2.cmp.uea.ac.uk/~fuzz/tktrans/default.html
 | 
			
		||||
                       ==>  tktrans (win32 only)
 | 
			
		||||
 | 
			
		||||
TkDND        1.0a2  http://sourceforge.net/projects/tkdnd       ==> tkDND
 | 
			
		||||
TkDND        1.0a2   http://sourceforge.net/projects/tkdnd       ==> tkDND
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===< plan to support (alpha quality libraries may be included) >==============
 | 
			
		||||
 | 
			
		||||
GraphViz     ***    http://www.graphviz.org/
 | 
			
		||||
GraphViz     ***     http://www.graphviz.org/
 | 
			
		||||
 | 
			
		||||
Tkgeomap     ***    http://tkgeomap.sourceforge.net/index.html
 | 
			
		||||
Tkgeomap     ***     http://tkgeomap.sourceforge.net/index.html
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===< not determined to supprt or not >========================================
 | 
			
		||||
 | 
			
		||||
Tix          ***    http://tixlibrary.sourceforge.net/
 | 
			
		||||
Tix          ***     http://tixlibrary.sourceforge.net/
 | 
			
		||||
                        * see also tcltk-ext library on RAA 
 | 
			
		||||
                                (http://raa.ruby-lang.org/)
 | 
			
		||||
 | 
			
		||||
TkZinc       ***    http://www.tkzinc.org/
 | 
			
		||||
TkZinc       ***     http://www.tkzinc.org/
 | 
			
		||||
 | 
			
		||||
Wbc          ***    http://home.t-online.de/home/csaba.nemethi/
 | 
			
		||||
Wbc          ***     http://home.t-online.de/home/csaba.nemethi/
 | 
			
		||||
 | 
			
		||||
Mentry       ***    http://home.t-online.de/home/csaba.nemethi/
 | 
			
		||||
Mentry       ***     http://home.t-online.de/home/csaba.nemethi/
 | 
			
		||||
 | 
			
		||||
Tablelist    ***    http://home.t-online.de/home/csaba.nemethi/
 | 
			
		||||
Tablelist    ***     http://home.t-online.de/home/csaba.nemethi/
 | 
			
		||||
 | 
			
		||||
ANIGIF       ***    http://cardtable.sourceforge.net/tcltk/
 | 
			
		||||
ANIGIF       ***     http://cardtable.sourceforge.net/tcltk/
 | 
			
		||||
 | 
			
		||||
IMG_ROTATE   ***    http://cardtable.sourceforge.net/tcltk/
 | 
			
		||||
IMG_ROTATE   ***     http://cardtable.sourceforge.net/tcltk/
 | 
			
		||||
 | 
			
		||||
TclVfs       ***    http://sourceforge.net/projects/tclvfs/
 | 
			
		||||
TclVfs       ***     http://sourceforge.net/projects/tclvfs/
 | 
			
		||||
 | 
			
		||||
vfwtcl       ***    http://sourceforge.net/projects/avicaptcl
 | 
			
		||||
vfwtcl       ***     http://sourceforge.net/projects/avicaptcl
 | 
			
		||||
                        * Win32 only
 | 
			
		||||
 | 
			
		||||
multicast    ***    http://sourceforge.net/projects/avicaptcl
 | 
			
		||||
multicast    ***     http://sourceforge.net/projects/avicaptcl
 | 
			
		||||
                        * Win32 only
 | 
			
		||||
 | 
			
		||||
XBit         ***    http://www.geocities.com/~chengye/
 | 
			
		||||
XBit         ***     http://www.geocities.com/~chengye/
 | 
			
		||||
                        * current implementation is for Windows only
 | 
			
		||||
 | 
			
		||||
QuickTimeTcl ***    http://hem.fyristorg.com/matben/qt/
 | 
			
		||||
QuickTimeTcl ***     http://hem.fyristorg.com/matben/qt/
 | 
			
		||||
                        * works under Mac OS (8,9,X) or Windows
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===< may not support (already exist, out of Ruby/Tk scope, and so on) >=======
 | 
			
		||||
 | 
			
		||||
TkCon        ***    http://sf.net/projects/tkcon
 | 
			
		||||
TkCon        ***     http://sf.net/projects/tkcon
 | 
			
		||||
 | 
			
		||||
Expect       ***    http://sf.net/projects/expect
 | 
			
		||||
Expect       ***     http://sf.net/projects/expect
 | 
			
		||||
 | 
			
		||||
TclXML       ***    http://sf.net/projects/tclxml
 | 
			
		||||
TclXML       ***     http://sf.net/projects/tclxml
 | 
			
		||||
 | 
			
		||||
TclXSLT      ***    http://sf.net/projects/tclxml
 | 
			
		||||
TclXSLT      ***     http://sf.net/projects/tclxml
 | 
			
		||||
 | 
			
		||||
TclDOM       ***    http://sf.net/projects/tclxml
 | 
			
		||||
TclDOM       ***     http://sf.net/projects/tclxml
 | 
			
		||||
 | 
			
		||||
TclSOAP      ***    http://sf.net/projects/tclsoap
 | 
			
		||||
TclSOAP      ***     http://sf.net/projects/tclsoap
 | 
			
		||||
 | 
			
		||||
Snack        ***    http://www.speech.kth.se/~kare/snack2.2.tar.gz
 | 
			
		||||
Snack        ***     http://www.speech.kth.se/~kare/snack2.2.tar.gz
 | 
			
		||||
                        * use Snack for Ruby 
 | 
			
		||||
                              (see http://rbsnack.sourceforge.net/)
 | 
			
		||||
 | 
			
		||||
Tcom         ***    http://www.vex.net/~cthuang/tcom/
 | 
			
		||||
Tcom         ***     http://www.vex.net/~cthuang/tcom/
 | 
			
		||||
 | 
			
		||||
tDOM         ***    http://www.tdom.org
 | 
			
		||||
tDOM         ***     http://www.tdom.org
 | 
			
		||||
 | 
			
		||||
Mk4tcl       ***    http://www.equi4.com/metakit/tcl.html
 | 
			
		||||
Mk4tcl       ***     http://www.equi4.com/metakit/tcl.html
 | 
			
		||||
 | 
			
		||||
Memchan      ***    http://memchan.sourceforge.net/
 | 
			
		||||
Memchan      ***     http://memchan.sourceforge.net/
 | 
			
		||||
 | 
			
		||||
XOTcl        ***    http://www.xotcl.org/
 | 
			
		||||
XOTcl        ***     http://www.xotcl.org/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
===< tool (may not supprt) >==================================================
 | 
			
		||||
 | 
			
		||||
tbcload/tclcompiler 
 | 
			
		||||
             ***    http://www.tcl.tk/software/tclpro/
 | 
			
		||||
             ***     http://www.tcl.tk/software/tclpro/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(End of List)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,12 +17,13 @@ module Tk::BLT
 | 
			
		|||
    include GraphCommand
 | 
			
		||||
 | 
			
		||||
    def __boolval_optkeys
 | 
			
		||||
      ['bufferelements', 'invertxy']
 | 
			
		||||
      ['bufferelements', 'buffergraph', 'invertxy']
 | 
			
		||||
    end
 | 
			
		||||
    private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
    def __strval_optkeys
 | 
			
		||||
      ['text', 'label', 'title', 'file']
 | 
			
		||||
      ['text', 'label', 'title', 'file', 
 | 
			
		||||
        'background', 'plotbackground']
 | 
			
		||||
    end
 | 
			
		||||
    private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,8 @@ module Tk::BLT
 | 
			
		|||
 | 
			
		||||
      def __item_strval_optkeys(id)
 | 
			
		||||
        ['text', 'label', 'limits', 'title', 
 | 
			
		||||
          'show', 'file', 'maskdata', 'maskfile']
 | 
			
		||||
          'show', 'file', 'maskdata', 'maskfile', 
 | 
			
		||||
          'color', 'titlecolor', 'fill', 'outline', 'offdash']
 | 
			
		||||
      end
 | 
			
		||||
      private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -40,7 +41,7 @@ module Tk::BLT
 | 
			
		|||
      private :__item_listval_optkeys
 | 
			
		||||
 | 
			
		||||
      def __item_numlistval_optkeys(id)
 | 
			
		||||
        ['dashes']
 | 
			
		||||
        ['dashes', 'majorticks', 'minorticks']
 | 
			
		||||
      end
 | 
			
		||||
      private :__item_numlistval_optkeys
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,6 +13,11 @@ module Tk::BLT
 | 
			
		|||
    WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'name'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def find_command(pat)
 | 
			
		||||
    list(tk_send_without_enc(tk_call(self.path, 'find', '-command', pat)))
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -39,6 +39,21 @@ module Tk::BLT
 | 
			
		|||
      end
 | 
			
		||||
      private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
      def __item_boolval_optkeys(id)
 | 
			
		||||
        super(id) << 'selftarget'
 | 
			
		||||
      end
 | 
			
		||||
      private :__item_boolval_optkeys
 | 
			
		||||
 | 
			
		||||
      def __item_listval_optkeys(id)
 | 
			
		||||
        super(id) << 'send'
 | 
			
		||||
      end
 | 
			
		||||
      private :__item_listval_optkeys
 | 
			
		||||
 | 
			
		||||
      def __item_strval_optkeys(id)
 | 
			
		||||
        super(id) << 'rejectbg' << 'rejectfg' << 'tokenbg'
 | 
			
		||||
      end
 | 
			
		||||
      private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
      undef itemcget
 | 
			
		||||
      private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,3 +13,20 @@ module Tk::BLT
 | 
			
		|||
    CItemTypeToClass[CItemTypeName] = self
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
    def __strval_optkeys
 | 
			
		||||
      ['text', 'label', 'title', 'file']
 | 
			
		||||
      ['text', 'label', 'title', 'file', 'plotbackground']
 | 
			
		||||
    end
 | 
			
		||||
    private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,6 +26,11 @@ module Tk::BLT
 | 
			
		|||
    alias window_configuinfo itemconfiginfo
 | 
			
		||||
    alias current_window_configuinfo current_itemconfiginfo
 | 
			
		||||
 | 
			
		||||
    def __strval_optkeys
 | 
			
		||||
      super() << 'filename'
 | 
			
		||||
    end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
    def append(win, keys={})
 | 
			
		||||
      tk_send('append', _epath(win), keys)
 | 
			
		||||
      self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,8 @@ module Tk::BLT
 | 
			
		|||
    private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
    def __strval_optkeys
 | 
			
		||||
      ['text', 'label', 'title', 'file']
 | 
			
		||||
      ['text', 'label', 'title', 'file', 
 | 
			
		||||
        'background', 'plotbackground']
 | 
			
		||||
    end
 | 
			
		||||
    private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -140,6 +140,11 @@ class << Tk::BLT::Table
 | 
			
		|||
  private :__itemcget, :__itemconfigure
 | 
			
		||||
  private :__itemconfiginfo, :__current_itemconfiginfo
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'propagate'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tag)
 | 
			
		||||
    if tag.kind_of?(Array)
 | 
			
		||||
      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)
 | 
			
		||||
      [self.path, 'tab', 'cget', id]
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			@ -213,6 +223,11 @@ module Tk::BLT
 | 
			
		|||
    alias tab_configinfo itemconfiginfo
 | 
			
		||||
    alias current_tab_configinfo current_itemconfiginfo
 | 
			
		||||
 | 
			
		||||
    def __item_strval_optkeys(id)
 | 
			
		||||
      super(id) << 'shadow'
 | 
			
		||||
    end
 | 
			
		||||
    private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
    def tagid(tab)
 | 
			
		||||
      if tab.kind_of?(Tk::BLT::Tabset::Tab)
 | 
			
		||||
        tab.id
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,6 +44,19 @@ module Tk::BLT::Treeview::ConfigMethod
 | 
			
		|||
  end
 | 
			
		||||
  private :__item_boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_strval_optkeys(id)
 | 
			
		||||
    case id
 | 
			
		||||
    when Array
 | 
			
		||||
      # id := [ 'column', name ]
 | 
			
		||||
      super() << 'titleforeground' << 'titleshadow'
 | 
			
		||||
    when 'sort'
 | 
			
		||||
      ['decreasing']
 | 
			
		||||
    else
 | 
			
		||||
      []
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_listval_optkeys(id)
 | 
			
		||||
    case id
 | 
			
		||||
    when 'entry'
 | 
			
		||||
| 
						 | 
				
			
			@ -197,11 +210,16 @@ class Tk::BLT::Treeview
 | 
			
		|||
  ########################
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    ['autocreate', 'exportselection', 'flat', 'hideroot', 
 | 
			
		||||
    ['autocreate', 'allowduplicates', 'exportselection', 'flat', 'hideroot', 
 | 
			
		||||
      'newtags', 'showtitles', 'sortselection']
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() + ['focusforeground', 'linecolor', 'separator', 'trim']
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  ########################
 | 
			
		||||
 | 
			
		||||
  class OpenCloseCommand < TkValidateCommand
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,6 +19,11 @@ class Tk::BWidget::Button
 | 
			
		|||
  WidgetClassName = 'Button'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'helptext'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'helpvar'
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,6 +21,11 @@ class Tk::BWidget::ButtonBox
 | 
			
		|||
 | 
			
		||||
  include TkItemConfigMethod
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'homogeneous'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tagOrId)
 | 
			
		||||
    if tagOrId.kind_of?(Tk::BWidget::Button)
 | 
			
		||||
      name = tagOrId[:name]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,6 +22,16 @@ class Tk::BWidget::Dialog
 | 
			
		|||
 | 
			
		||||
  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)
 | 
			
		||||
    @relative = ''
 | 
			
		||||
    if parent.kind_of?(Hash)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,6 +21,11 @@ module Tk::BWidget::DynamicHelp
 | 
			
		|||
    'DynamicHelp::configure'
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'topbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def self.__cget_cmd
 | 
			
		||||
    ['DynamicHelp::configure']
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,6 +21,16 @@ class Tk::BWidget::Entry
 | 
			
		|||
  WidgetClassName = 'Entry'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'helptext' << 'insertbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'dragenabled' << 'dropenabled' << 'editable'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'helpvar'
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,6 +19,16 @@ class Tk::BWidget::Label
 | 
			
		|||
  WidgetClassName = 'Label'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'helptext'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'dragenabled' << 'dropenabled'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'helpvar'
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,11 +23,21 @@ class Tk::BWidget::LabelEntry
 | 
			
		|||
  WidgetClassName = 'LabelEntry'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'helptext' << 'insertbackground' << 'entryfg' << 'entrybg'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'helpvar'
 | 
			
		||||
  end
 | 
			
		||||
  private :__tkvariable_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'labelfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  #def entrybind(*args)
 | 
			
		||||
  #  _bind([path, 'bind'], *args)
 | 
			
		||||
  #  self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,6 +6,7 @@
 | 
			
		|||
require 'tk'
 | 
			
		||||
require 'tk/frame'
 | 
			
		||||
require 'tkextlib/bwidget.rb'
 | 
			
		||||
require 'tkextlib/bwidget/label'
 | 
			
		||||
 | 
			
		||||
module Tk
 | 
			
		||||
  module BWidget
 | 
			
		||||
| 
						 | 
				
			
			@ -19,6 +20,16 @@ class Tk::BWidget::LabelFrame
 | 
			
		|||
  WidgetClassName = 'LabelFrame'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'helptext'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'dragenabled' << 'dropenabled'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'helpvar'
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,6 +35,11 @@ class Tk::BWidget::ListBox
 | 
			
		|||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'autofocus' << 'dragenabled' << 'dropenabled' << 'selectfill'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tag)
 | 
			
		||||
    if tag.kind_of?(Tk::BWidget::ListBox::Item)
 | 
			
		||||
      tag.id
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,11 +20,25 @@ class Tk::BWidget::MainFrame
 | 
			
		|||
  WidgetClassName = 'MainFrame'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'progressfg'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'progressvar'
 | 
			
		||||
  end
 | 
			
		||||
  private :__tkvariable_optkeys
 | 
			
		||||
 | 
			
		||||
  def __val2ruby_optkeys  # { key=>proc, ... }
 | 
			
		||||
    # The method is used to convert a opt-value to a ruby's object.
 | 
			
		||||
    # When get the value of the option "key", "proc.call(value)" is called.
 | 
			
		||||
    {
 | 
			
		||||
      'menu'=>proc{|v| simplelist(v).collect!{|elem| simplelist(v)}}
 | 
			
		||||
    }
 | 
			
		||||
  end
 | 
			
		||||
  private :__val2ruby_optkeys
 | 
			
		||||
 | 
			
		||||
  def add_indicator(keys={}, &b)
 | 
			
		||||
    win = window(tk_send('addindicator', *hash_kv(keys)))
 | 
			
		||||
    win.instance_eval(&b) if b
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,6 +5,7 @@
 | 
			
		|||
 | 
			
		||||
require 'tk'
 | 
			
		||||
require 'tkextlib/bwidget.rb'
 | 
			
		||||
require 'tkextlib/bwidget/dialog.rb'
 | 
			
		||||
 | 
			
		||||
module Tk
 | 
			
		||||
  module BWidget
 | 
			
		||||
| 
						 | 
				
			
			@ -43,6 +44,16 @@ class Tk::BWidget::MessageDlg
 | 
			
		|||
  end
 | 
			
		||||
  private :create_self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'message' << 'title'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __listval_optkeys
 | 
			
		||||
    super() << 'buttons'
 | 
			
		||||
  end
 | 
			
		||||
  private :__listval_optkeys
 | 
			
		||||
 | 
			
		||||
  def cget(slot)
 | 
			
		||||
    slot = slot.to_s
 | 
			
		||||
    if slot == 'relative'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,6 +29,11 @@ class Tk::BWidget::NoteBook
 | 
			
		|||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'homogeneous'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(id)
 | 
			
		||||
    if id.kind_of?(TkWindow)
 | 
			
		||||
      #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
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'loginhelptext' << 'loginlabel' << 'logintext' << 
 | 
			
		||||
      'passwdlabel' << 'passwdtext'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'passwdeditable' << 'homogeneous'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'loginhelpvar' << 'logintextvariable' << 
 | 
			
		||||
      'passwdhelpvar' << 'passwdtextvariable'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,4 +17,9 @@ class Tk::BWidget::ScrollView
 | 
			
		|||
  TkCommandNames = ['ScrollView'.freeze].freeze
 | 
			
		||||
  WidgetClassName = 'ScrollView'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'fill'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,9 +25,15 @@ class Tk::BWidget::SelectFont
 | 
			
		|||
  WidgetClassName = 'SelectFont'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'sampletext' <<  'title'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    [] # without fontobj operation
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  def create
 | 
			
		||||
    tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,6 +22,21 @@ class Tk::BWidget::SpinBox
 | 
			
		|||
  WidgetClassName = 'SpinBox'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'helptext' << 'insertbackground' << 'entryfg' << 'entrybg'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'dragenabled' << 'dropenabled' << 'editable'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __listval_optkeys
 | 
			
		||||
    super() << 'values'
 | 
			
		||||
  end
 | 
			
		||||
  private :__listval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'helpvar'
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										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
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'crossfill' << 'linesfill'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'dragenabled' << 'dropenabled' << 
 | 
			
		||||
      'redraw' << 'selectfill' << 'showlines'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'helpvar'
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -115,6 +115,11 @@ module Tk
 | 
			
		|||
 | 
			
		||||
      include Wm
 | 
			
		||||
      include TkMenuSpec
 | 
			
		||||
 | 
			
		||||
      def __strval_optkeys
 | 
			
		||||
        super() << 'title'
 | 
			
		||||
      end
 | 
			
		||||
      private :__strval_optkeys
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    ############################
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,6 +32,11 @@ class Tk::Iwidgets::Buttonbox
 | 
			
		|||
  end
 | 
			
		||||
  private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_boolval_optkeys(id)
 | 
			
		||||
    super(id) << 'defaultring'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tagOrId)
 | 
			
		||||
    if tagOrId.kind_of?(Tk::Itk::Component)
 | 
			
		||||
      tagOrId.name
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,24 @@ class Tk::Iwidgets::Calendar
 | 
			
		|||
  WidgetClassName = 'Calendar'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() + [
 | 
			
		||||
      'buttonforeground', 'outline', 'selectcolor', 
 | 
			
		||||
      'weekdaybackground', 'weekendbackground'
 | 
			
		||||
    ]
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __listval_optkeys
 | 
			
		||||
    super() << 'days'
 | 
			
		||||
  end
 | 
			
		||||
  private :__listval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() + ['currentdatefont', 'datefont', 'dayfont', 'titlefont']
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  ####################################
 | 
			
		||||
 | 
			
		||||
  include Tk::ValidateConfigure
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,16 @@ class Tk::Iwidgets::Canvasprintbox
 | 
			
		|||
  WidgetClassName = 'Canvasprintbox'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'filename'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'stretch'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def get_output
 | 
			
		||||
    tk_call(@path, 'getoutput')
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,6 +32,11 @@ class Tk::Iwidgets::Checkbox
 | 
			
		|||
  end
 | 
			
		||||
  private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_boolval_optkeys(id)
 | 
			
		||||
    super(id) << 'defaultring'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tagOrId)
 | 
			
		||||
    if tagOrId.kind_of?(Tk::Itk::Component)
 | 
			
		||||
      tagOrId.name
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,11 @@ class Tk::Iwidgets::Combobox
 | 
			
		|||
  WidgetClassName = 'Combobox'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'completion' << 'dropdown' << 'editable' << 'unique'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def clear(component=None)
 | 
			
		||||
    tk_call(@path, 'clear', component)
 | 
			
		||||
    self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,21 @@ class Tk::Iwidgets::Datefield
 | 
			
		|||
  WidgetClassName = 'Datefield'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'gmt'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'textbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'textfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  def get_string
 | 
			
		||||
    tk_call(@path, 'get', '-string')
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,6 +32,11 @@ class Tk::Iwidgets::Dialogshell
 | 
			
		|||
  end
 | 
			
		||||
  private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_boolval_optkeys(id)
 | 
			
		||||
    super(id) << 'defaultring'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tagOrId)
 | 
			
		||||
    if tagOrId.kind_of?(Tk::Itk::Component)
 | 
			
		||||
      tagOrId.name
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,11 @@ class Tk::Iwidgets::Disjointlistbox
 | 
			
		|||
  WidgetClassName = 'Disjointlistbox'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'lhslabeltext' << 'rhslabeltext' << 'lhsbuttonlabel' << 'rhsbuttonlabel'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def set_lhs(*items)
 | 
			
		||||
    tk_call(@path, 'setlhs', items)
 | 
			
		||||
    self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,11 @@ class Tk::Iwidgets::Entryfield
 | 
			
		|||
  WidgetClassName = 'Entryfield'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'textfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  ####################################
 | 
			
		||||
 | 
			
		||||
  include Tk::ValidateConfigure
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,16 @@ class Tk::Iwidgets::Extbutton
 | 
			
		|||
  WidgetClassName = 'Extbutton'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'bitmapforeground' << 'ringbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'defaultring'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def invoke
 | 
			
		||||
    tk_call(@path, 'invoke')
 | 
			
		||||
    self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,19 @@ class Tk::Iwidgets::Extfileselectionbox
 | 
			
		|||
  WidgetClassName = 'Extfileselectionbox'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() + [
 | 
			
		||||
      'dirslabel', 'fileslabel', 'filterlabel', 'mask', 'nomatchstring', 
 | 
			
		||||
      'selectionlabel'
 | 
			
		||||
    ]
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() + ['dirson', 'fileson', 'filteron', 'selectionon']
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def child_site
 | 
			
		||||
    window(tk_call(@path, 'childsite'))
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,11 @@ class Tk::Iwidgets::Feedback
 | 
			
		|||
  WidgetClassName = 'Feedback'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'barcolor'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def reset
 | 
			
		||||
    tk_call(@path, 'reset')
 | 
			
		||||
    self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,19 @@ class Tk::Iwidgets::Fileselectionbox
 | 
			
		|||
  WidgetClassName = 'Fileselectionbox'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() + [
 | 
			
		||||
      'directory', 'dirslabel', 'fileslabel', 'filterlabel', 'mask', 
 | 
			
		||||
      'nomatchstring', 'selectionlabel'
 | 
			
		||||
    ]
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() + ['dirson', 'fileson', 'filteron', 'selectionon']
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def child_site
 | 
			
		||||
    window(tk_call(@path, 'childsite'))
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,19 @@ class Tk::Iwidgets::Finddialog
 | 
			
		|||
  WidgetClassName = 'Finddialog'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() + [
 | 
			
		||||
      'patternbackground', 'patternforeground', 
 | 
			
		||||
      'searchbackground', 'searchforeground'
 | 
			
		||||
    ]
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __val2ruby_optkeys  # { key=>proc, ... }
 | 
			
		||||
    super().update('textwidget'=>proc{|v| window(v)})
 | 
			
		||||
  end
 | 
			
		||||
  private :__val2ruby_optkeys
 | 
			
		||||
 | 
			
		||||
  def clear
 | 
			
		||||
    tk_call(@path, 'clear')
 | 
			
		||||
    self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
    tk_call(@path, 'clear')
 | 
			
		||||
    self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,16 @@ class Tk::Iwidgets::Hyperhelp
 | 
			
		|||
  WidgetClassName = 'Hyperhelp'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'helpdir'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __listval_optkeys
 | 
			
		||||
    super() << 'topics'
 | 
			
		||||
  end
 | 
			
		||||
  private :__listval_optkeys
 | 
			
		||||
 | 
			
		||||
  def show_topic(topic)
 | 
			
		||||
    tk_call(@path, 'showtopic', topic)
 | 
			
		||||
    self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,11 +18,21 @@ class Tk::Iwidgets::Labeledframe
 | 
			
		|||
  WidgetClassName = 'Labeledframe'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'labeltext'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'labelvariable'
 | 
			
		||||
  end
 | 
			
		||||
  private :__tkvariable_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'labelfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  def child_site
 | 
			
		||||
    window(tk_call(@path, 'childsite'))
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,11 +20,21 @@ class Tk::Iwidgets::Labeledwidget
 | 
			
		|||
  WidgetClassName = 'Labeledwidget'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'labeltext'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'labelvariable'
 | 
			
		||||
  end
 | 
			
		||||
  private :__tkvariable_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'labelfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  def self.alignlabels(*wins)
 | 
			
		||||
    tk_call('::iwidgets::Labeledwidget::alignlabels', *wins)
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,21 @@ class Tk::Iwidgets::Mainwindow
 | 
			
		|||
  WidgetClassName = 'Mainwindow'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'helpline' << 'statusline'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'menubarbackground' << 'menubarforeground' << 'toolbarforeground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'menubarfont' << 'toolbarfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  def child_site
 | 
			
		||||
    window(tk_call(@path, 'childsite'))
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,11 @@ class Tk::Iwidgets::Menubar
 | 
			
		|||
  WidgetClassName = 'Menubar'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'menubuttons'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'helpvariable'
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			@ -37,6 +42,16 @@ class Tk::Iwidgets::Menubar
 | 
			
		|||
  end
 | 
			
		||||
  private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_strval_optkeys(id)
 | 
			
		||||
    super(id) << 'selectcolor'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __item_tkvariable_optkeys(id)
 | 
			
		||||
    super(id) << 'helpstr'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_tkvariable_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tagOrId)
 | 
			
		||||
    if tagOrId.kind_of?(Tk::Itk::Component)
 | 
			
		||||
      tagOrId.name
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,6 +41,11 @@ class Tk::Iwidgets::Messagebox
 | 
			
		|||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def __item_boolval_optkeys(id)
 | 
			
		||||
    super(id) << 'bell' << 'show'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  alias typecget itemcget
 | 
			
		||||
  alias typeconfigure itemconfigure
 | 
			
		||||
  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={})
 | 
			
		||||
    if tag.kind_of?(Hash)
 | 
			
		||||
      keys = tag
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,12 +23,12 @@ class Tk::Iwidgets::Notebook
 | 
			
		|||
  include TkItemConfigMethod
 | 
			
		||||
 | 
			
		||||
  def __item_cget_cmd(id)
 | 
			
		||||
    [self.path, 'tabcget', id]
 | 
			
		||||
    [self.path, 'pagecget', id]
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_cget_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_config_cmd(id)
 | 
			
		||||
    [self.path, 'tabconfigure', id]
 | 
			
		||||
    [self.path, 'pageconfigure', id]
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -51,6 +51,11 @@ class Tk::Iwidgets::Notebook
 | 
			
		|||
 | 
			
		||||
  ####################################
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'auto'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def add(keys={})
 | 
			
		||||
    window(tk_call(@path, 'add', *hash_kv(keys)))
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,11 @@ class Tk::Iwidgets::Optionmenu
 | 
			
		|||
  WidgetClassName = 'Optionmenu'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'cyclicon'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def delete(first, last=nil)
 | 
			
		||||
    if last
 | 
			
		||||
      tk_call(@path, 'delete', first, last)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,6 +51,11 @@ class Tk::Iwidgets::Panedwindow
 | 
			
		|||
 | 
			
		||||
  ####################################
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'showhandle'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def add(tag=nil, keys={})
 | 
			
		||||
    if tag.kind_of?(Hash)
 | 
			
		||||
      keys = tag
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,11 @@ class Tk::Iwidgets::Pushbutton
 | 
			
		|||
  WidgetClassName = 'Pushbutton'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'defaultring'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def invoke
 | 
			
		||||
    tk_call_without_enc(@path, 'invoke')
 | 
			
		||||
    self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,6 +32,11 @@ class Tk::Iwidgets::Radiobox
 | 
			
		|||
  end
 | 
			
		||||
  private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_boolval_optkeys(id)
 | 
			
		||||
    super(id) << 'defaultring'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tagOrId)
 | 
			
		||||
    if tagOrId.kind_of?(Tk::Itk::Component)
 | 
			
		||||
      tagOrId.name
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
    super(*args)
 | 
			
		||||
    @canvas = component_widget('canvas')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,21 @@ class Tk::Iwidgets::Scrolledhtml
 | 
			
		|||
  WidgetClassName = 'Scrolledhtml'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'update'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'fontname' << 'link' << 'alink' << 'textbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'fixedfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  def import(href)
 | 
			
		||||
    tk_call(@path, 'import', href)
 | 
			
		||||
    self
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,11 +19,21 @@ class Tk::Iwidgets::Scrolledlistbox
 | 
			
		|||
  WidgetClassName = 'Scrolledlistbox'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'textbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __tkvariable_optkeys
 | 
			
		||||
    super() << 'listvariable'
 | 
			
		||||
  end
 | 
			
		||||
  private :__tkvariable_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'textfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  ################################
 | 
			
		||||
 | 
			
		||||
  def initialize(*args)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,6 +19,16 @@ class Tk::Iwidgets::Scrolledtext
 | 
			
		|||
  WidgetClassName = 'Scrolledtext'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'textbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'textfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  ################################
 | 
			
		||||
 | 
			
		||||
  def initialize(*args)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,16 @@ class Tk::Iwidgets::Selectionbox
 | 
			
		|||
  WidgetClassName = 'Selectionbox'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'itemson' << 'selectionon'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'itemslabel' << 'selectionlabel'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def child_site
 | 
			
		||||
    window(tk_call(@path, 'childsite'))
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,16 @@ class Tk::Iwidgets::Spindate
 | 
			
		|||
  WidgetClassName = 'Spindate'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'dayon' << 'monthon' << 'yearon'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'daylabel' << 'monthformat' << 'monthlabel' << 'yearlabel'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def get_string
 | 
			
		||||
    tk_call(@path, 'get', '-string')
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,4 +17,14 @@ class Tk::Iwidgets::Spinint
 | 
			
		|||
  TkCommandNames = ['::iwidgets::spinint'.freeze].freeze
 | 
			
		||||
  WidgetClassName = 'Spinint'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'wrap'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __numlistval_optkeys
 | 
			
		||||
    super() << 'range'
 | 
			
		||||
  end
 | 
			
		||||
  private :__numlistval_optkeys
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,16 @@ class Tk::Iwidgets::Spintime
 | 
			
		|||
  WidgetClassName = 'Spintime'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'houron' << 'militaryon' << 'minutelabel' << 'secondlabel'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'hourlabel' << 'minuteon' << 'secondon'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def get_string
 | 
			
		||||
    tk_call(@path, 'get', '-string')
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,15 +23,20 @@ class Tk::Iwidgets::Tabnotebook
 | 
			
		|||
  include TkItemConfigMethod
 | 
			
		||||
 | 
			
		||||
  def __item_cget_cmd(id)
 | 
			
		||||
    [self.path, 'tabcget', id]
 | 
			
		||||
    [self.path, 'pagecget', id]
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_cget_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_config_cmd(id)
 | 
			
		||||
    [self.path, 'tabconfigure', id]
 | 
			
		||||
    [self.path, 'pageconfigure', id]
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_strval_optkeys(id)
 | 
			
		||||
    super(id) << 'tabbackground' << 'tabforeground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tagOrId)
 | 
			
		||||
    if tagOrId.kind_of?(Tk::Itk::Component)
 | 
			
		||||
      tagOrId.name
 | 
			
		||||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
    super(*args)
 | 
			
		||||
    @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={})
 | 
			
		||||
    window(tk_call(@path, 'add', *hash_kv(keys)))
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,4 +17,9 @@ class Tk::Iwidgets::Timeentry
 | 
			
		|||
  TkCommandNames = ['::iwidgets::timeentry'.freeze].freeze
 | 
			
		||||
  WidgetClassName = 'Timeentry'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'closetext'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,21 @@ class Tk::Iwidgets::Timefield
 | 
			
		|||
  WidgetClassName = 'Timefield'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'gmt'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'textbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __font_optkeys
 | 
			
		||||
    super() << 'textfont'
 | 
			
		||||
  end
 | 
			
		||||
  private :__font_optkeys
 | 
			
		||||
 | 
			
		||||
  def get_string
 | 
			
		||||
    tk_call(@path, 'get', '-string')
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,6 +37,11 @@ class Tk::Iwidgets::Toolbar
 | 
			
		|||
  end
 | 
			
		||||
  private :__item_config_cmd
 | 
			
		||||
 | 
			
		||||
  def __item_strval_optkeys(id)
 | 
			
		||||
    super(id) << 'helpstr' << 'balloonstr'
 | 
			
		||||
  end
 | 
			
		||||
  private :__item_strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def tagid(tagOrId)
 | 
			
		||||
    if tagOrId.kind_of?(Tk::Itk::Component)
 | 
			
		||||
      tagOrId.name
 | 
			
		||||
| 
						 | 
				
			
			@ -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={})
 | 
			
		||||
    if tag.kind_of?(Hash)
 | 
			
		||||
      keys = tag
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,17 @@ class Tk::Iwidgets::Watch
 | 
			
		|||
  WidgetClassName = 'Watch'.freeze
 | 
			
		||||
  WidgetClassNames[WidgetClassName] = self
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'showampm'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'clockcolor' << 'hourcolor' << 'minutecolor' << 
 | 
			
		||||
      'pivotcolor' << 'secondcolor' << 'tickcolor'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def get_string
 | 
			
		||||
    tk_call(@path, 'get', '-string')
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,24 +43,45 @@ module Tk
 | 
			
		|||
    TkComm::TkExtlibAutoloadModule.unshift(self)
 | 
			
		||||
 | 
			
		||||
    # 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
 | 
			
		||||
    autoload :Datefield,  'tkextlib/tcllib/datefield'
 | 
			
		||||
    autoload :DateField,  'tkextlib/tcllib/datefield'
 | 
			
		||||
    autoload :Datefield,          'tkextlib/tcllib/datefield'
 | 
			
		||||
    autoload :DateField,          'tkextlib/tcllib/datefield'
 | 
			
		||||
 | 
			
		||||
    # package:: ico
 | 
			
		||||
    autoload :ICO,        'tkextlib/tcllib/ico'
 | 
			
		||||
    autoload :ICO,                'tkextlib/tcllib/ico'
 | 
			
		||||
 | 
			
		||||
    # package:: ipentry
 | 
			
		||||
    autoload :IP_Entry,   'tkextlib/tcllib/ip_entry'
 | 
			
		||||
    autoload :IPEntry,    'tkextlib/tcllib/ip_entry'
 | 
			
		||||
    autoload :IP_Entry,           'tkextlib/tcllib/ip_entry'
 | 
			
		||||
    autoload :IPEntry,            'tkextlib/tcllib/ip_entry'
 | 
			
		||||
 | 
			
		||||
    # package:: swaplist
 | 
			
		||||
    autoload :Swaplist_Dialog,    'tkextlib/tcllib/swaplist'
 | 
			
		||||
 | 
			
		||||
    # 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
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -125,6 +125,7 @@ class TkScrollbar
 | 
			
		|||
end
 | 
			
		||||
 | 
			
		||||
# TkPackage.require('autoscroll', '1.0')
 | 
			
		||||
# TkPackage.require('autoscroll', '1.1')
 | 
			
		||||
TkPackage.require('autoscroll')
 | 
			
		||||
 | 
			
		||||
module Tk
 | 
			
		||||
| 
						 | 
				
			
			@ -142,7 +143,16 @@ module Tk
 | 
			
		|||
      def self.unautoscroll(win)
 | 
			
		||||
        tk_call_without_enc('::autoscroll::unautoscroll', win.path)
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      def self.wrap
 | 
			
		||||
        # v1.1
 | 
			
		||||
        tk_call_without_enc('::autoscroll::wrap')
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      def self.unwrap
 | 
			
		||||
        # v1.1
 | 
			
		||||
        tk_call_without_enc('::autoscroll::unwrap')
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,6 +47,17 @@ class Tk::Tcllib::CText
 | 
			
		|||
  end
 | 
			
		||||
  private :create_self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'linemapfg' << 'linemapbg' << 
 | 
			
		||||
      'linemap_select_fg' << 'linemap_select_bg'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def __boolval_optkeys
 | 
			
		||||
    super() << 'highlight' << 'linemap_markable'
 | 
			
		||||
  end
 | 
			
		||||
  private :__boolval_optkeys
 | 
			
		||||
 | 
			
		||||
  def append(*args)
 | 
			
		||||
    tk_send('append', *args)
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										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
 | 
			
		||||
  private :create_self
 | 
			
		||||
 | 
			
		||||
  def __strval_optkeys
 | 
			
		||||
    super() << 'fg' << 'bg' << 'insertbackground'
 | 
			
		||||
  end
 | 
			
		||||
  private :__strval_optkeys
 | 
			
		||||
 | 
			
		||||
  def complete?
 | 
			
		||||
    bool(tk_send_without_enc('complete'))
 | 
			
		||||
  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'
 | 
			
		||||
 | 
			
		||||
# TkPackage.require('Plotchart', '0.9')
 | 
			
		||||
# TkPackage.require('Plotchart', '1.1')
 | 
			
		||||
TkPackage.require('Plotchart')
 | 
			
		||||
 | 
			
		||||
module Tk
 | 
			
		||||
| 
						 | 
				
			
			@ -272,6 +273,51 @@ module Tk::Tcllib::Plotchart
 | 
			
		|||
      self
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def contourlines(xcrd, ycrd, vals, clss=None)
 | 
			
		||||
      xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array)
 | 
			
		||||
      ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array)
 | 
			
		||||
      vals = array2tk_list(vals) if vals.kind_of?(Array)
 | 
			
		||||
      clss = array2tk_list(clss) if clss.kind_of?(Array)
 | 
			
		||||
 | 
			
		||||
      tk_call_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)
 | 
			
		||||
      if key.kind_of?(Hash)
 | 
			
		||||
        tk_call_without_enc(@chart, 'dataconfig', series, *hash_kv(key, true))
 | 
			
		||||
| 
						 | 
				
			
			@ -479,6 +525,13 @@ module Tk::Tcllib::Plotchart
 | 
			
		|||
      self
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def plot_funcont(conts, cmd=Proc.new)
 | 
			
		||||
      conts = array2tk_list(conts) if conts.kind_of?(Array)
 | 
			
		||||
      Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd)} $x $y}")
 | 
			
		||||
      tk_call_without_enc(@chart, 'plotfuncont', "#{@path}_#{@chart}", conts)
 | 
			
		||||
      self
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def grid_size(nxcells, nycells)
 | 
			
		||||
      tk_call_without_enc(@chart, 'gridsize', nxcells, nycells)
 | 
			
		||||
      self
 | 
			
		||||
| 
						 | 
				
			
			@ -633,7 +686,7 @@ module Tk::Tcllib::Plotchart
 | 
			
		|||
      # 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?(Array)
 | 
			
		||||
      if args[0].kind_of?(String)
 | 
			
		||||
        @time_begin = args.shift
 | 
			
		||||
        @time_end   = args.shift
 | 
			
		||||
        @items      = args.shift
 | 
			
		||||
| 
						 | 
				
			
			@ -679,6 +732,105 @@ module Tk::Tcllib::Plotchart
 | 
			
		|||
    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
 | 
			
		||||
    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