# File tk/lib/tk/toplevel.rb, line 232 def self.bind(*args, &b) if self == WidgetClassNames[WidgetClassName] || self.name == '' super(*args, &b) else TkDatabaseClass.new(self.name).bind(*args, &b) end end
# File tk/lib/tk/toplevel.rb, line 239 def self.bind_append(*args, &b) if self == WidgetClassNames[WidgetClassName] || self.name == '' super(*args, &b) else TkDatabaseClass.new(self.name).bind_append(*args, &b) end end
# File tk/lib/tk/toplevel.rb, line 246 def self.bind_remove(*args) if self == WidgetClassNames[WidgetClassName] || self.name == '' super(*args) else TkDatabaseClass.new(self.name).bind_remove(*args) end end
# File tk/lib/tk/toplevel.rb, line 253 def self.bindinfo(*args) if self == WidgetClassNames[WidgetClassName] || self.name == '' super(*args) else TkDatabaseClass.new(self.name).bindinfo(*args) end end
# File tk/lib/tk/toplevel.rb, line 221 def self.database_class if self == WidgetClassNames[WidgetClassName] || self.name == '' self else TkDatabaseClass.new(self.name) end end
# File tk/lib/tk/toplevel.rb, line 228 def self.database_classname self.database_class.name end
# File tk/lib/tk/toplevel.rb, line 99 def initialize(parent=nil, screen=nil, classname=nil, keys=nil) my_class_name = nil if self.class < WidgetClassNames[WidgetClassName] my_class_name = self.class.name my_class_name = nil if my_class_name == '' end if parent.kind_of? Hash keys = _symbolkey2str(parent) if keys.key?('classname') keys['class'] = keys.delete('classname') end @classname = keys['class'] @colormap = keys['colormap'] @container = keys['container'] @screen = keys['screen'] @use = keys['use'] @visual = keys['visual'] if !@classname && my_class_name keys['class'] = @classname = my_class_name end if @classname.kind_of? TkBindTag @db_class = @classname keys['class'] = @classname = @classname.id elsif @classname @db_class = TkDatabaseClass.new(@classname) keys['class'] = @classname else @db_class = self.class @classname = @db_class::WidgetClassName end keys, cmds = _wm_command_option_chk(keys) super(keys) cmds.each{|k,v| if v.kind_of? Array self.__send__(k,*v) else self.__send__(k,v) end } return end if screen.kind_of? Hash keys = screen else @screen = screen if classname.kind_of? Hash keys = classname else @classname = classname end end if keys.kind_of? Hash keys = _symbolkey2str(keys) if keys.key?('classname') keys['class'] = keys.delete('classname') end @classname = keys['class'] unless @classname @colormap = keys['colormap'] @container = keys['container'] @screen = keys['screen'] unless @screen @use = keys['use'] @visual = keys['visual'] else keys = {} end if !@classname && my_class_name keys['class'] = @classname = my_class_name end if @classname.kind_of? TkBindTag @db_class = @classname keys['class'] = @classname = @classname.id elsif @classname @db_class = TkDatabaseClass.new(@classname) keys['class'] = @classname else @db_class = self.class @classname = @db_class::WidgetClassName end keys, cmds = _wm_command_option_chk(keys) super(parent, keys) cmds.each{|k,v| if v.kind_of? Array self.send(k,*v) else self.send(k,v) end } end
def create_self(keys)
if keys and keys != None tk_call_without_enc('toplevel', @path, *hash_kv(keys, true)) else tk_call_without_enc('toplevel', @path) end
end private :create_self
# File tk/lib/tk/toplevel.rb, line 198 def specific_class @classname end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.