1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/tcltklib/tcltklib.c (ip_init): set root-win title to "ruby" when

the running script is '-e one-liner' or '-' (stdin).
* ext/tcltklib/extconf.rb: add find_library("#{lib}#{ver}",..) for stub libs
* ext/tk/lib/tk/textmark.rb: TkTextMarkCurrent and TkTextMarkAnchor
  have a wrong parent class.
* ext/tk/lib/tk/dialog.rb: rename TkDialog2 --> TkDialogObj and
  TkWarning2 --> TkWarningObj (old names are changed to alias names)
* ext/tk/lib/tk/dialog.rb: bug fix of treatment of 'prev_command'
  option and hashes for configuration
* ext/tk/lib/tk/dialog.rb: add TkDialogObj#name to return the button name
* ext/tk/lib/tk/radiobutton.rb: rename enbugged method value() ==> get_value()
  and value=(val) ==> set_value(val).
* ext/tk/lib/tk/menu.rb: add TkMenu.new_menuspec
* ext/tk/lib/tk/menu.rb: add alias (TkMenuButton = TkMenubutton,
  TkOptionMenuButton = TkOptionMenubutton)
* ext/tk/lib/tk/event.rb: new method aliases (same as option keys of
  event_generate) for Event object
* ext/tk/lib/tk/font.rb: configinfo returns proper types of values
* ext/tk/lib/tk.rb: bind methods accept subst_args + block
* ext/tk/lib/tk/canvas.rb: ditto
* ext/tk/lib/tk/canvastag.rb: ditto
* ext/tk/lib/tk/frame.rb: ditto
* ext/tk/lib/tk/text.rb: ditto
* ext/tk/lib/tk/texttag.rb: ditto
* ext/tk/lib/tk/toplevel.rb: ditto
* ext/tk/lib/tkextlib/*: ditto and bug fix


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2004-12-08 18:14:15 +00:00
parent 642e10156c
commit b9bdee95f1
25 changed files with 688 additions and 118 deletions

View file

@ -1,3 +1,52 @@
Thu Dec 9 03:08:36 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tcltklib/tcltklib.c (ip_init): set root-win title to "ruby" when
the running script is '-e one-liner' or '-' (stdin).
* ext/tcltklib/extconf.rb: add find_library("#{lib}#{ver}",..) for
stub libs
* ext/tk/lib/tk/textmark.rb: TkTextMarkCurrent and TkTextMarkAnchor
have a wrong parent class.
* ext/tk/lib/tk/dialog.rb: rename TkDialog2 --> TkDialogObj and
TkWarning2 --> TkWarningObj (old names are changed to alias names)
* ext/tk/lib/tk/dialog.rb: bug fix of treatment of 'prev_command'
option and hashes for configuration
* ext/tk/lib/tk/dialog.rb: add TkDialogObj#name to return the
button name
* ext/tk/lib/tk/radiobutton.rb: rename enbugged method value() ==>
get_value() and value=(val) ==> set_value(val).
* ext/tk/lib/tk/menu.rb: add TkMenu.new_menuspec
* ext/tk/lib/tk/menu.rb: add alias (TkMenuButton = TkMenubutton,
TkOptionMenuButton = TkOptionMenubutton)
* ext/tk/lib/tk/event.rb: new method aliases (same as option keys of
event_generate) for Event object
* ext/tk/lib/tk/font.rb: configinfo returns proper types of values
* ext/tk/lib/tk.rb: bind methods accept subst_args + block
* ext/tk/lib/tk/canvas.rb: ditto
* ext/tk/lib/tk/canvastag.rb: ditto
* ext/tk/lib/tk/frame.rb: ditto
* ext/tk/lib/tk/text.rb: ditto
* ext/tk/lib/tk/texttag.rb: ditto
* ext/tk/lib/tk/toplevel.rb: ditto
* ext/tk/lib/tkextlib/*: ditto and bug fix
Wed Dec 8 23:54:29 2004 Dave Thomas <dave@pragprog.com> Wed Dec 8 23:54:29 2004 Dave Thomas <dave@pragprog.com>
* lib/rdoc/generators/template/html/html.rb (RDoc::Page): Typo * lib/rdoc/generators/template/html/html.rb (RDoc::Page): Typo

View file

@ -41,7 +41,9 @@ def find_tcl(tcllib, stubs)
true true
else else
%w[8.5 8.4 8.3 8.2 8.1 8.0 7.6].find { |ver| %w[8.5 8.4 8.3 8.2 8.1 8.0 7.6].find { |ver|
find_library("tcl#{ver}", func, *paths) or find_library("#{lib}#{ver}", func, *paths) or
find_library("#{lib}#{ver.delete('.')}", func, *paths) or
find_library("tcl#{ver}", func, *paths) or
find_library("tcl#{ver.delete('.')}", func, *paths) find_library("tcl#{ver.delete('.')}", func, *paths)
} }
end end
@ -62,7 +64,9 @@ def find_tk(tklib, stubs)
true true
else else
%w[8.5 8.4 8.3 8.2 8.1 8.0 4.2].find { |ver| %w[8.5 8.4 8.3 8.2 8.1 8.0 4.2].find { |ver|
find_library("tk#{ver}", func, *paths) or find_library("#{lib}#{ver}", func, *paths) or
find_library("#{lib}#{ver.delete('.')}", func, *paths) or
find_library("tk#{ver}", func, *paths) or
find_library("tk#{ver.delete('.')}", func, *paths) find_library("tk#{ver.delete('.')}", func, *paths)
} }
end end

View file

@ -3461,8 +3461,14 @@ ip_init(argc, argv, self)
case 1: case 1:
/* argv0 */ /* argv0 */
if (!NIL_P(argv0)) { if (!NIL_P(argv0)) {
/* Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), 0); */ if (strncmp(StringValuePtr(argv0), "-e", 3) == 0
Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), TCL_GLOBAL_ONLY); || strncmp(StringValuePtr(argv0), "-", 2) == 0) {
Tcl_SetVar(ptr->ip, "argv0", "ruby", TCL_GLOBAL_ONLY);
} else {
/* Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), 0); */
Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0),
TCL_GLOBAL_ONLY);
}
} }
case 0: case 0:
/* no args */ /* no args */

View file

@ -901,12 +901,30 @@ module TkComm
:_bind_append_for_event_class, :_bind_remove_for_event_class, :_bind_append_for_event_class, :_bind_remove_for_event_class,
:_bindinfo_for_event_class :_bindinfo_for_event_class
def bind(tagOrClass, context, cmd=Proc.new, *args) #def bind(tagOrClass, context, cmd=Proc.new, *args)
# _bind(["bind", tagOrClass], context, cmd, *args)
# tagOrClass
#end
def bind(tagOrClass, context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind(["bind", tagOrClass], context, cmd, *args) _bind(["bind", tagOrClass], context, cmd, *args)
tagOrClass tagOrClass
end end
def bind_append(tagOrClass, context, cmd=Proc.new, *args) #def bind_append(tagOrClass, context, cmd=Proc.new, *args)
# _bind_append(["bind", tagOrClass], context, cmd, *args)
# tagOrClass
#end
def bind_append(tagOrClass, context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append(["bind", tagOrClass], context, cmd, *args) _bind_append(["bind", tagOrClass], context, cmd, *args)
tagOrClass tagOrClass
end end
@ -920,12 +938,30 @@ module TkComm
_bindinfo(['bind', tagOrClass], context) _bindinfo(['bind', tagOrClass], context)
end end
def bind_all(context, cmd=Proc.new, *args) #def bind_all(context, cmd=Proc.new, *args)
# _bind(['bind', 'all'], context, cmd, *args)
# TkBindTag::ALL
#end
def bind_all(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind(['bind', 'all'], context, cmd, *args) _bind(['bind', 'all'], context, cmd, *args)
TkBindTag::ALL TkBindTag::ALL
end end
def bind_append_all(context, cmd=Proc.new, *args) #def bind_append_all(context, cmd=Proc.new, *args)
# _bind_append(['bind', 'all'], context, cmd, *args)
# TkBindTag::ALL
#end
def bind_append_all(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append(['bind', 'all'], context, cmd, *args) _bind_append(['bind', 'all'], context, cmd, *args)
TkBindTag::ALL TkBindTag::ALL
end end
@ -2067,11 +2103,27 @@ end
module TkBindCore module TkBindCore
def bind(context, cmd=Proc.new, *args) #def bind(context, cmd=Proc.new, *args)
# Tk.bind(self, context, cmd, *args)
#end
def bind(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
Tk.bind(self, context, cmd, *args) Tk.bind(self, context, cmd, *args)
end end
def bind_append(context, cmd=Proc.new, *args) #def bind_append(context, cmd=Proc.new, *args)
# Tk.bind_append(self, context, cmd, *args)
#end
def bind_append(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
Tk.bind_append(self, context, cmd, *args) Tk.bind_append(self, context, cmd, *args)
end end

View file

@ -94,12 +94,30 @@ class TkCanvas<TkWindow
*tags.collect{|t| tagid(t)})) *tags.collect{|t| tagid(t)}))
end end
def itembind(tag, context, cmd=Proc.new, *args) #def itembind(tag, context, cmd=Proc.new, *args)
# _bind([path, "bind", tagid(tag)], context, cmd, *args)
# self
#end
def itembind(tag, context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind([path, "bind", tagid(tag)], context, cmd, *args) _bind([path, "bind", tagid(tag)], context, cmd, *args)
self self
end end
def itembind_append(tag, context, cmd=Proc.new, *args) #def itembind_append(tag, context, cmd=Proc.new, *args)
# _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
# self
#end
def itembind_append(tag, context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append([path, "bind", tagid(tag)], context, cmd, *args) _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
self self
end end

View file

@ -21,12 +21,30 @@ module TkcTagAccess
@c.bbox(@id) @c.bbox(@id)
end end
def bind(seq, cmd=Proc.new, *args) #def bind(seq, cmd=Proc.new, *args)
# @c.itembind(@id, seq, cmd, *args)
# self
#end
def bind(seq, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
@c.itembind(@id, seq, cmd, *args) @c.itembind(@id, seq, cmd, *args)
self self
end end
def bind_append(seq, cmd=Proc.new, *args) #def bind_append(seq, cmd=Proc.new, *args)
# @c.itembind_append(@id, seq, cmd, *args)
# self
#end
def bind_append(seq, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
@c.itembind_append(@id, seq, cmd, *args) @c.itembind_append(@id, seq, cmd, *args)
self self
end end

View file

@ -3,7 +3,7 @@
# #
require 'tk' require 'tk'
class TkDialog2 < TkWindow class TkDialogObj < TkWindow
extend Tk extend Tk
TkCommandNames = ['tk_dialog'.freeze].freeze TkCommandNames = ['tk_dialog'.freeze].freeze
@ -23,7 +23,9 @@ class TkDialog2 < TkWindow
c.delete('command'); c.delete(:command) c.delete('command'); c.delete(:command)
# @config << Kernel.format("%s.button%s configure %s; ", # @config << Kernel.format("%s.button%s configure %s; ",
# @path, i, hash_kv(c).join(' ')) # @path, i, hash_kv(c).join(' '))
@config << @path+'.button'+i.to_s+'configure '+hash_kv(c).join(' ')+'; ' # @config << @path+'.button'+i.to_s+' configure '+hash_kv(c).join(' ')+'; '
@config << @path+'.button'+i.to_s+' configure '+
array2tk_list(hash_kv(c))+'; '
} }
case configs case configs
when Proc when Proc
@ -74,7 +76,7 @@ class TkDialog2 < TkWindow
#@config = "puts [winfo children .w0000];" #@config = "puts [winfo children .w0000];"
@config = "" @config = ""
@command = nil @command = prev_command
if keys.kind_of? Hash if keys.kind_of? Hash
@title = keys['title'] if keys.key? 'title' @title = keys['title'] if keys.key? 'title'
@ -84,7 +86,7 @@ class TkDialog2 < TkWindow
@default_button = keys['default'] if keys.key? 'default' @default_button = keys['default'] if keys.key? 'default'
@buttons = keys['buttons'] if keys.key? 'buttons' @buttons = keys['buttons'] if keys.key? 'buttons'
@command = keys['prev_command'] @command = keys['prev_command'] if keys.key? 'prev_command'
@message_config = keys['message_config'] if keys.key? 'message_config' @message_config = keys['message_config'] if keys.key? 'message_config'
@msgframe_config = keys['msgframe_config'] if keys.key? 'msgframe_config' @msgframe_config = keys['msgframe_config'] if keys.key? 'msgframe_config'
@ -121,36 +123,44 @@ class TkDialog2 < TkWindow
if @message_config.kind_of? Hash if @message_config.kind_of? Hash
# @config << Kernel.format("%s.msg configure %s;", # @config << Kernel.format("%s.msg configure %s;",
# @path, hash_kv(@message_config).join(' ')) # @path, hash_kv(@message_config).join(' '))
@config << @path+'.msg configure '+hash_kv(@message_config).join(' ')+';' # @config << @path+'.msg configure '+hash_kv(@message_config).join(' ')+';'
@config << @path+'.msg configure '+
array2tk_list(hash_kv(@message_config))+';'
end end
if @msgframe_config.kind_of? Hash if @msgframe_config.kind_of? Hash
# @config << Kernel.format("%s.top configure %s;", # @config << Kernel.format("%s.top configure %s;",
# @path, hash_kv(@msgframe_config).join(' ')) # @path, hash_kv(@msgframe_config).join(' '))
@config << @path+'.top configure '+hash_kv(@msgframe_config).join(' ')+';' # @config << @path+'.top configure '+hash_kv(@msgframe_config).join(' ')+';'
@config << @path+'.top configure '+
array2tk_list(hash_kv(@msgframe_config))+';'
end end
if @btnframe_config.kind_of? Hash if @btnframe_config.kind_of? Hash
# @config << Kernel.format("%s.bot configure %s;", # @config << Kernel.format("%s.bot configure %s;",
# @path, hash_kv(@btnframe_config).join(' ')) # @path, hash_kv(@btnframe_config).join(' '))
@config << @path+'.bot configure '+hash_kv(@btnframe_config).join(' ')+';' # @config << @path+'.bot configure '+hash_kv(@btnframe_config).join(' ')+';'
@config << @path+'.bot configure '+
array2tk_list(hash_kv(@btnframe_config))+';'
end end
if @bitmap_config.kind_of? Hash if @bitmap_config.kind_of? Hash
# @config << Kernel.format("%s.bitmap configure %s;", # @config << Kernel.format("%s.bitmap configure %s;",
# @path, hash_kv(@bitmap_config).join(' ')) # @path, hash_kv(@bitmap_config).join(' '))
@config << @path+'.bitmap configure '+hash_kv(@bitmap_config).join(' ')+';' # @config << @path+'.bitmap configure '+hash_kv(@bitmap_config).join(' ')+';'
@config << @path+'.bitmap configure '+
array2tk_list(hash_kv(@bitmap_config))+';'
end end
_set_button_config(@button_configs) if @button_configs _set_button_config(@button_configs) if @button_configs
if @command.kind_of? Proc
@command.call(self)
end
end end
private :create_self private :create_self
def show def show
if @command.kind_of? Proc
@command.call(self)
end
if @default_button.kind_of? String if @default_button.kind_of? String
default_button = @buttons.index(@default_button) default_button = @buttons.index(@default_button)
else else
@ -174,6 +184,10 @@ class TkDialog2 < TkWindow
# @var.value.to_i # @var.value.to_i
@val @val
end end
def name
@buttons[@val]
end
###################################################### ######################################################
# # # #
# these methods must be overridden for each dialog # # these methods must be overridden for each dialog #
@ -223,13 +237,17 @@ class TkDialog2 < TkWindow
# returns nil or a Hash {option=>value, ...} for the button frame # returns nil or a Hash {option=>value, ...} for the button frame
return nil return nil
end end
def prev_command
# returns nil or a Proc
return nil
end
end end
TkDialog2 = TkDialogObj
# #
# TkDialog : with showing at initialize # TkDialog : with showing at initialize
# #
class TkDialog < TkDialog2 class TkDialog < TkDialogObj
def self.show(*args) def self.show(*args)
self.new(*args) self.new(*args)
end end
@ -244,7 +262,7 @@ end
# #
# dialog for warning # dialog for warning
# #
class TkWarning2 < TkDialog2 class TkWarningObj < TkDialogObj
def initialize(parent = nil, mes = nil) def initialize(parent = nil, mes = nil)
if !mes if !mes
if parent.kind_of? TkWindow if parent.kind_of? TkWindow
@ -281,8 +299,9 @@ class TkWarning2 < TkDialog2
return "OK"; return "OK";
end end
end end
TkWarning2 = TkWarningObj
class TkWarning < TkWarning2 class TkWarning < TkWarningObj
def self.show(*args) def self.show(*args)
self.new(*args) self.new(*args)
end end

View file

@ -130,6 +130,15 @@ module TkEvent
# [] # []
#end #end
alias button num
alias delta wheel_delta
alias root rootwin_id
alias rootx x_root
alias root_x x_root
alias rooty y_root
alias root_y y_root
alias sendevent send_event
end end
############################################### ###############################################

View file

@ -20,6 +20,17 @@ class TkFont
Tk_FontUseTBL.clear Tk_FontUseTBL.clear
} }
# option_type : default => string
OptionType = Hash.new(?s)
OptionType['size'] = ?n
OptionType['pointadjust'] = ?n
OptionType['underline'] = ?b
OptionType['overstrike'] = ?b
# metric_type : default => num_or_str
MetricType = Hash.new(?n)
MetricType['fixed'] = ?b
# set default font # set default font
case Tk::TK_VERSION case Tk::TK_VERSION
when /^4\.*/ when /^4\.*/
@ -112,6 +123,8 @@ class TkFont
case type case type
when 'kanji', 'latin', 'ascii' when 'kanji', 'latin', 'ascii'
@type = type @type = type
when :kanji, :latin, :ascii
@type = type.to_s
else else
fail ArgumentError, "unknown type '#{type}'" fail ArgumentError, "unknown type '#{type}'"
end end
@ -637,7 +650,7 @@ class TkFont
begin begin
actual_core(@latinfont).each{|key,val| latinkeys[key] = val} actual_core(@latinfont).each{|key,val| latinkeys[key] = val}
rescue rescue
latinkeys {} latinkeys = {}
end end
if latinkeys != {} if latinkeys != {}
tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys)) tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))
@ -648,7 +661,7 @@ class TkFont
begin begin
actual_core(@kanjifont).each{|key,val| kanjikeys[key] = val} actual_core(@kanjifont).each{|key,val| kanjikeys[key] = val}
rescue rescue
kanjikeys {} kanjikeys = {}
end end
if kanjikeys != {} if kanjikeys != {}
tk_call('font', 'configure', @compoundfont, *hash_kv(kanjikeys)) tk_call('font', 'configure', @compoundfont, *hash_kv(kanjikeys))
@ -662,23 +675,41 @@ class TkFont
def actual_core_tk4x(font, window=nil, option=nil) def actual_core_tk4x(font, window=nil, option=nil)
# dummy # dummy
if option if option == 'pointadjust' || option == :pointadjust
"" 1.0
elsif option
case OptionType[option.to_s]
when ?n
0
when ?b
false
else
''
end
else else
[['family',[]], ['size',[]], ['weight',[]], ['slant',[]], [['family',''], ['size',0], ['weight',''], ['slant',''],
['underline',[]], ['overstrike',[]], ['charset',[]], ['underline',false], ['overstrike',false], ['charset',''],
['pointadjust',[]]] ['pointadjust',0]]
end end
end end
def actual_core_tk8x(font, window=nil, option=nil) def actual_core_tk8x(font, window=nil, option=nil)
if option == 'compound' if option == 'compound' || option == :compound
"" ""
elsif option elsif option
if window if window
tk_call('font', 'actual', font, "-displayof", window, "-#{option}") val = tk_call('font', 'actual', font,
"-displayof", window, "-#{option}")
else else
tk_call('font', 'actual', font, "-#{option}") val = tk_call('font', 'actual', font, "-#{option}")
end
case OptionType[option.to_s]
when ?n
num_or_str(val)
when ?b
bool(val)
else
val
end end
else else
l = tk_split_simplelist(if window l = tk_split_simplelist(if window
@ -692,7 +723,16 @@ class TkFont
if key == '-compound' if key == '-compound'
l.shift l.shift
else else
r.push [key[1..-1], l.shift] key = key[1..-1]
val = l.shift
case OptionType[key]
when ?n
r.push [key, num_or_str(val)]
when ?b
r.push [key, bool(val)]
else
r.push [key, val]
end
end end
end end
r r
@ -707,12 +747,21 @@ class TkFont
def configinfo_core_tk4x(font, option=nil) def configinfo_core_tk4x(font, option=nil)
# dummy # dummy
if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
if option if option == 'pointadjust' || option == :pointadjust
"" 1.0
elsif option
case OptionType[option.to_s]
when ?n
0
when ?b
false
else
''
end
else else
[['family',[]], ['size',[]], ['weight',[]], ['slant',[]], [['family',''], ['size',0], ['weight',''], ['slant',''],
['underline',[]], ['overstrike',[]], ['charset',[]], ['underline',false], ['overstrike',false], ['charset',''],
['pointadjust',[]]] ['pointadjust',1.0]]
end end
else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
current_configinfo_core_tk4x(font, option) current_configinfo_core_tk4x(font, option)
@ -721,10 +770,18 @@ class TkFont
def current_configinfo_core_tk4x(font, option=nil) def current_configinfo_core_tk4x(font, option=nil)
if option if option
"" case OptionType[option.to_s]
when ?n
0
when ?b
false
else
''
end
else else
{'family'=>'', 'size'=>'', 'weight'=>'', 'slant'=>'', {'family'=>'', 'size'=>0, 'weight'=>'', 'slant'=>'',
'underline'=>'', 'overstrike'=>'', 'charset'=>'', 'pointadjust'=>''} 'underline'=>false, 'overstrike'=>false,
'charset'=>false, 'pointadjust'=>1.0}
end end
end end
@ -797,10 +854,18 @@ class TkFont
def configinfo_core_tk8x(font, option=nil) def configinfo_core_tk8x(font, option=nil)
if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY
if option == 'compound' if option == 'compound' || option == :compound
"" ""
elsif option elsif option
tk_call('font', 'configure', font, "-#{option}") val = tk_call('font', 'configure', font, "-#{option}")
case OptionType[option.to_s]
when ?n
num_or_str(val)
when ?b
bool(val)
else
val
end
else else
l = tk_split_simplelist(tk_call('font', 'configure', font)) l = tk_split_simplelist(tk_call('font', 'configure', font))
r = [] r = []
@ -808,7 +873,16 @@ class TkFont
if key == '-compound' if key == '-compound'
l.shift l.shift
else else
r.push [key[1..-1], l.shift] key = key[1..-1]
val = l.shift
case OptionType[key]
when ?n
r.push [key, num_or_str(val)]
when ?b
r.push [key, bool(val)]
else
r.push [key, val]
end
end end
end end
r r
@ -822,7 +896,15 @@ class TkFont
if option == 'compound' if option == 'compound'
"" ""
elsif option elsif option
tk_call('font', 'configure', font, "-#{option}") val = tk_call('font', 'configure', font, "-#{option}")
case OptionType[option.to_s]
when ?n
num_or_str(val)
when ?b
bool(val)
else
val
end
else else
l = tk_split_simplelist(tk_call('font', 'configure', font)) l = tk_split_simplelist(tk_call('font', 'configure', font))
r = {} r = {}
@ -830,7 +912,16 @@ class TkFont
if key == '-compound' if key == '-compound'
l.shift l.shift
else else
r[key[1..-1]] = l.shift key = key[1..-1]
val = l.shift
case OptionType[key]
when ?n
r.push [key, num_or_str(val)]
when ?b
r.push [key, bool(val)]
else
r.push [key, val]
end
end end
end end
r r
@ -958,7 +1049,7 @@ class TkFont
begin begin
actual_core(@latinfont).each{|key,val| latinkeys[key] = val} actual_core(@latinfont).each{|key,val| latinkeys[key] = val}
rescue rescue
latinkeys {} latinkeys = {}
end end
if latinkeys != {} if latinkeys != {}
tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys)) tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))
@ -981,7 +1072,7 @@ class TkFont
begin begin
actual_core(@latinfont).each{|key,val| latinkeys[key] = val} actual_core(@latinfont).each{|key,val| latinkeys[key] = val}
rescue rescue
latinkeys {} latinkeys = {}
end end
if latinkeys != {} if latinkeys != {}
tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys)) tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys))

View file

@ -92,18 +92,18 @@ class TkFrame<TkWindow
self.database_class.name self.database_class.name
end end
def self.bind(*args) def self.bind(*args, &b)
if self == WidgetClassNames[WidgetClassName] || self.name == '' if self == WidgetClassNames[WidgetClassName] || self.name == ''
super(*args) super(*args, &b)
else else
TkDatabaseClass.new(self.name).bind(*args) TkDatabaseClass.new(self.name).bind(*args, &b)
end end
end end
def self.bind_append(*args) def self.bind_append(*args, &b)
if self == WidgetClassNames[WidgetClassName] || self.name == '' if self == WidgetClassNames[WidgetClassName] || self.name == ''
super(*args) super(*args, &b)
else else
TkDatabaseClass.new(self.name).bind_append(*args) TkDatabaseClass.new(self.name).bind_append(*args, &b)
end end
end end
def self.bind_remove(*args) def self.bind_remove(*args)

View file

@ -3,6 +3,7 @@
# #
require 'tk' require 'tk'
require 'tk/itemconfig' require 'tk/itemconfig'
require 'tk/menuspec'
module TkMenuEntryConfig module TkMenuEntryConfig
include TkItemConfigMethod include TkItemConfigMethod
@ -33,6 +34,7 @@ end
class TkMenu<TkWindow class TkMenu<TkWindow
include TkMenuEntryConfig include TkMenuEntryConfig
extend TkMenuSpec
TkCommandNames = ['menu'.freeze].freeze TkCommandNames = ['menu'.freeze].freeze
WidgetClassName = 'Menu'.freeze WidgetClassName = 'Menu'.freeze
@ -47,6 +49,24 @@ class TkMenu<TkWindow
#end #end
#private :create_self #private :create_self
def self.new_menuspec(menu_spec, parent = nil, tearoff = false, keys = nil)
if parent.kind_of?(Hash)
keys = _symbolkey2str(parent)
parent = keys.delete('parent')
tearoff = keys.delete('tearoff')
elsif tearoff.kind_of?(Hash)
keys = _symbolkey2str(tearoff)
tearoff = keys.delete('tearoff')
elsif keys
keys = _symbolkey2str(keys)
else
keys = {}
end
widgetname = keys.delete('widgetname')
_create_menu(parent, menu_spec, widgetname, tearoff, keys)
end
def tagid(id) def tagid(id)
#id.to_s #id.to_s
_get_eval_string(id) _get_eval_string(id)
@ -389,6 +409,7 @@ class TkMenubutton<TkLabel
end end
private :create_self private :create_self
end end
TkMenuButton = TkMenubutton
class TkOptionMenubutton<TkMenubutton class TkOptionMenubutton<TkMenubutton
@ -509,3 +530,4 @@ class TkOptionMenubutton<TkMenubutton
@menu.current_entryconfiginfo(index, key) @menu.current_entryconfiginfo(index, key)
end end
end end
TkOptionMenuButton = TkOptionMenubutton

View file

@ -29,7 +29,7 @@ class TkRadioButton<TkButton
configure 'variable', tk_trace_variable(v) configure 'variable', tk_trace_variable(v)
end end
def value def get_value
var = tk_send_without_enc('cget', '-variable') var = tk_send_without_enc('cget', '-variable')
if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS
_fromUTF8(INTERP._get_global_var(var)) _fromUTF8(INTERP._get_global_var(var))
@ -38,7 +38,7 @@ class TkRadioButton<TkButton
end end
end end
def value=(val) def set_value(val)
var = tk_send_without_enc('cget', '-variable') var = tk_send_without_enc('cget', '-variable')
if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS
_fromUTF8(INTERP._set_global_var(var, _get_eval_string(val, true))) _fromUTF8(INTERP._set_global_var(var, _get_eval_string(val, true)))

View file

@ -519,12 +519,30 @@ class TkText<TkTextWin
alias deltag tag_delete alias deltag tag_delete
alias delete_tag tag_delete alias delete_tag tag_delete
def tag_bind(tag, seq, cmd=Proc.new, *args) #def tag_bind(tag, seq, cmd=Proc.new, *args)
# _bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
# self
#end
def tag_bind(tag, seq, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind([@path, 'tag', 'bind', tag], seq, cmd, *args) _bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
self self
end end
def tag_bind_append(tag, seq, cmd=Proc.new, *args) #def tag_bind_append(tag, seq, cmd=Proc.new, *args)
# _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
# self
#end
def tag_bind_append(tag, seq, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args) _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
self self
end end

View file

@ -122,13 +122,13 @@ class TkTextMarkInsert<TkTextNamedMark
end end
end end
class TkTextMarkCurrent<TkTextMark class TkTextMarkCurrent<TkTextNamedMark
def self.new(parent,*args) def self.new(parent,*args)
super(parent, 'current', *args) super(parent, 'current', *args)
end end
end end
class TkTextMarkAnchor<TkTextMark class TkTextMarkAnchor<TkTextNamedMark
def self.new(parent,*args) def self.new(parent,*args)
super(parent, 'anchor', *args) super(parent, 'anchor', *args)
end end

View file

@ -162,12 +162,30 @@ class TkTextTag<TkObject
@t.current_tag_configinfo @id, key @t.current_tag_configinfo @id, key
end end
def bind(seq, cmd=Proc.new, *args) #def bind(seq, cmd=Proc.new, *args)
# _bind([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
# self
#end
def bind(seq, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind([@t.path, 'tag', 'bind', @id], seq, cmd, *args) _bind([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
self self
end end
def bind_append(seq, cmd=Proc.new, *args) #def bind_append(seq, cmd=Proc.new, *args)
# _bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
# self
#end
def bind_append(seq, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, *args) _bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
self self
end end

View file

@ -201,18 +201,18 @@ class TkToplevel<TkWindow
self.database_class.name self.database_class.name
end end
def self.bind(*args) def self.bind(*args, &b)
if self == WidgetClassNames[WidgetClassName] || self.name == '' if self == WidgetClassNames[WidgetClassName] || self.name == ''
super(*args) super(*args, &b)
else else
TkDatabaseClass.new(self.name).bind(*args) TkDatabaseClass.new(self.name).bind(*args, &b)
end end
end end
def self.bind_append(*args) def self.bind_append(*args, &b)
if self == WidgetClassNames[WidgetClassName] || self.name == '' if self == WidgetClassNames[WidgetClassName] || self.name == ''
super(*args) super(*args, &b)
else else
TkDatabaseClass.new(self.name).bind_append(*args) TkDatabaseClass.new(self.name).bind_append(*args, &b)
end end
end end
def self.bind_remove(*args) def self.bind_remove(*args)

View file

@ -23,13 +23,31 @@ class Tk::BWidget::LabelEntry
WidgetClassName = 'LabelEntry'.freeze WidgetClassName = 'LabelEntry'.freeze
WidgetClassNames[WidgetClassName] = self WidgetClassNames[WidgetClassName] = self
def entrybind(*args) #def entrybind(*args)
_bind([path, 'bind'], *args) # _bind([path, 'bind'], *args)
# self
#end
def entrybind(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind([path, 'bind'], context, cmd, *args)
self self
end end
def entrybind_append(*args) #def entrybind_append(*args)
_bind_append([path, 'bind'], *args) # _bind_append([path, 'bind'], *args)
# self
#end
def entrybind_append(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append([path, 'bind'], context, cmd, *args)
self self
end end

View file

@ -44,13 +44,33 @@ class Tk::BWidget::ListBox
end end
end end
def imagebind(*args) #def imagebind(*args)
_bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args) # _bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
# self
#end
def imagebind(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_for_event_class(Event_for_Items, [path, 'bindImage'],
context, cmd, *args)
self self
end end
def imagebind_append(*args) #def imagebind_append(*args)
_bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args) # _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
# self
#end
def imagebind_append(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append_for_event_class(Event_for_Items, [path, 'bindImage'],
context, cmd, *args)
self self
end end
@ -63,13 +83,33 @@ class Tk::BWidget::ListBox
_bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args) _bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
end end
def textbind(*args) #def textbind(*args)
_bind_for_event_class(Event_for_Items, [path, 'bindText'], *args) # _bind_for_event_class(Event_for_Items, [path, 'bindText'], *args)
# self
#end
def textbind(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_for_event_class(Event_for_Items, [path, 'bindText'],
context, cmd, *args)
self self
end end
def textbind_append(*args) #def textbind_append(*args)
_bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args) # _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args)
# self
#end
def textbind_append(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append_for_event_class(Event_for_Items, [path, 'bindText'],
context, cmd, *args)
self self
end end

View file

@ -41,13 +41,33 @@ class Tk::BWidget::NoteBook
end end
end end
def tabbind(*args) #def tabbind(*args)
_bind_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args) # _bind_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args)
# self
#end
def tabbind(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_for_event_class(Event_for_Tabs, [path, 'bindtabs'],
context, cmd, *args)
self self
end end
def tabbind_append(*args) #def tabbind_append(*args)
_bind_append_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args) # _bind_append_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args)
# self
#end
def tabbind_append(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append_for_event_class(Event_for_Tabs, [path, 'bindtabs'],
context, cmd, *args)
self self
end end
@ -105,9 +125,13 @@ class Tk::BWidget::NoteBook
list(tk_send('pages', first, last)) list(tk_send('pages', first, last))
end end
def raise(page=None) def raise(page=nil)
tk_send('raise', page) if page
self tk_send('raise', page)
self
else
tk_send('raise')
end
end end
def see(page) def see(page)

View file

@ -22,13 +22,31 @@ class Tk::BWidget::SpinBox
WidgetClassName = 'SpinBox'.freeze WidgetClassName = 'SpinBox'.freeze
WidgetClassNames[WidgetClassName] = self WidgetClassNames[WidgetClassName] = self
def entrybind(*args) #def entrybind(*args)
_bind([path, 'bind'], *args) # _bind([path, 'bind'], *args)
# self
#end
def entrybind(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind([path, 'bind'], context, cmd, *args)
self self
end end
def entrybind_append(*args) #def entrybind_append(*args)
_bind_append([path, 'bind'], *args) # _bind_append([path, 'bind'], *args)
# self
#end
def entrybind_append(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append([path, 'bind'], context, cmd, *args)
self self
end end

View file

@ -41,13 +41,33 @@ class Tk::BWidget::Tree
end end
end end
def imagebind(*args) #def imagebind(*args)
_bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args) # _bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
# self
#end
def imagebind(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_for_event_class(Event_for_Items, [path, 'bindImage'],
context, cmd, *args)
self self
end end
def imagebind_append(*args) #def imagebind_append(*args)
_bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args) # _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
# self
#end
def imagebind_append(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append_for_event_class(Event_for_Items, [path, 'bindImage'],
context, cmd, *args)
self self
end end
@ -60,13 +80,33 @@ class Tk::BWidget::Tree
_bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args) _bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
end end
def textbind(*args) #def textbind(*args)
_bind_for_event_class(Event_for_Items, [path, 'bindText'], *args) # _bind_for_event_class(Event_for_Items, [path, 'bindText'], *args)
# self
#end
def textbind(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_for_event_class(Event_for_Items, [path, 'bindText'],
context, cmd, *args)
self self
end end
def textbind_append(*args) #def textbind_append(*args)
_bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args) # _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args)
# self
#end
def textbind_append(context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append_for_event_class(Event_for_Items, [path, 'bindText'],
context, cmd, *args)
self self
end end

View file

@ -330,7 +330,18 @@ module Tk
end end
end end
def bind(*args) #def bind(*args)
# unless @widget
# begin
# @widget = window(tk_call(@master, 'component', @component))
# @path = @widget.path
# rescue
# fail RuntimeError, 'component is not assigned to a widget'
# end
# end
# @widget.bind(*args)
#end
def bind(context, *args)
unless @widget unless @widget
begin begin
@widget = window(tk_call(@master, 'component', @component)) @widget = window(tk_call(@master, 'component', @component))
@ -339,10 +350,26 @@ module Tk
fail RuntimeError, 'component is not assigned to a widget' fail RuntimeError, 'component is not assigned to a widget'
end end
end end
@widget.bind(*args) if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
@widget.bind(context, cmd, *args)
end end
def bind_append(*args) #def bind_append(*args)
# unless @widget
# begin
# @widget = window(tk_call(@master, 'component', @component))
# @path = @widget.path
# rescue
# fail RuntimeError, 'component is not assigned to a widget'
# end
# end
# @widget.bind_append(*args)
#end
def bind_append(context, *args)
unless @widget unless @widget
begin begin
@widget = window(tk_call(@master, 'component', @component)) @widget = window(tk_call(@master, 'component', @component))
@ -351,7 +378,12 @@ module Tk
fail RuntimeError, 'component is not assigned to a widget' fail RuntimeError, 'component is not assigned to a widget'
end end
end end
@widget.bind_append(*args) if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
@widget.bind_append(context, cmd, *args)
end end
def bind_remove(*args) def bind_remove(*args)

View file

@ -97,12 +97,30 @@ class Tk::Iwidgets::Scrolledcanvas
*tags.collect{|t| tagid(t)})) *tags.collect{|t| tagid(t)}))
end end
def itembind(tag, context, cmd=Proc.new, *args) #def itembind(tag, context, cmd=Proc.new, *args)
# _bind([path, "bind", tagid(tag)], context, cmd, *args)
# self
#end
def itembind(tag, context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind([path, "bind", tagid(tag)], context, cmd, *args) _bind([path, "bind", tagid(tag)], context, cmd, *args)
self self
end end
def itembind_append(tag, context, cmd=Proc.new, *args) #def itembind_append(tag, context, cmd=Proc.new, *args)
# _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
# self
#end
def itembind_append(tag, context, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind_append([path, "bind", tagid(tag)], context, cmd, *args) _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
self self
end end

View file

@ -75,7 +75,28 @@ module Tk
end end
end end
def dnd_bindtarget(type, event, cmd=Proc.new, prior=50, *args) #def dnd_bindtarget(type, event, cmd=Proc.new, prior=50, *args)
# event = tk_event_sequence(event)
# if prior.kind_of?(Numeric)
# tk_call('dnd', 'bindtarget', @path, type, event,
# install_bind_for_event_class(DND_Subst, cmd, *args),
# prior)
# else
# tk_call('dnd', 'bindtarget', @path, type, event,
# install_bind_for_event_class(DND_Subst, cmd, prior, *args))
# end
# self
#end
def dnd_bindtarget(type, event, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
prior = 50
prior = args.shift unless args.empty?
event = tk_event_sequence(event) event = tk_event_sequence(event)
if prior.kind_of?(Numeric) if prior.kind_of?(Numeric)
tk_call('dnd', 'bindtarget', @path, type, event, tk_call('dnd', 'bindtarget', @path, type, event,
@ -101,8 +122,20 @@ module Tk
end end
end end
def dnd_bindsource(type, cmd=Proc.new, prior=None) #def dnd_bindsource(type, cmd=Proc.new, prior=None)
tk_call('dnd', 'bindsource', @path, type, cmd, prior) # tk_call('dnd', 'bindsource', @path, type, cmd, prior)
# self
#end
def dnd_bindsource(type, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
args = [None] if args.empty
tk_call('dnd', 'bindsource', @path, type, cmd, *args)
self self
end end

View file

@ -743,16 +743,39 @@ class Tk::TreeCtrl
marquee_visible() marquee_visible()
end end
def notify_bind(obj, event, cmd=Proc.new, *args) #def notify_bind(obj, event, cmd=Proc.new, *args)
# _bind([@path, 'notify', 'bind', obj], event, cmd, *args)
# self
#end
def notify_bind(obj, event, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind([@path, 'notify', 'bind', obj], event, cmd, *args) _bind([@path, 'notify', 'bind', obj], event, cmd, *args)
self self
end end
def notify_bind_append(obj, event, cmd=Proc.new, *args) #def notify_bind_append(obj, event, cmd=Proc.new, *args)
# _bind([@path, 'notify', 'bind', obj], event, cmd, *args)
# self
#end
def notify_bind_append(obj, event, *args)
if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
cmd = args.shift
else
cmd = Proc.new
end
_bind([@path, 'notify', 'bind', obj], event, cmd, *args) _bind([@path, 'notify', 'bind', obj], event, cmd, *args)
self self
end end
def notify_bindremove(obj, event)
_bind_remove([@path, 'notify', 'bind', obj], event)
self
end
def notify_bindinfo(obj, event=nil) def notify_bindinfo(obj, event=nil)
_bindinfo([@path, 'notify', 'bind', obj], event) _bindinfo([@path, 'notify', 'bind', obj], event)
end end