Project

General

Profile

Backport #8319 ยป 295.patch

zzak (zzak _), 04/24/2013 01:59 PM

View differences:

ext/tk/sample/demos-en/text.rb
end
}
7. Resize the window. This widget has been configured with the "setGrid"
8. Resize the window. This widget has been configured with the "setGrid"
option on, so that if you resize the window it will always resize to an
even number of characters high and wide. Also, if you make the window
narrow you can see that long lines automatically wrap around onto
-
ext/tk/sample/demos-en/tree.rb
path = tree.get(node, :fullpath)
tree.delete(tree.children(node))
Dir.glob("#{path}/*").sort.each{|f|
type = File.ftype(f)
type = File.ftype(f) rescue nil
id = tree.insert(node, :end,
:text=>File.basename(f), :values=>[f, type]).id
if type == 'directory'
ext/tk/sample/demos-en/widget
end
}
}
Tk.update
Tk.update rescue nil
end
# invoke --
......
cursor = txt.cget('cursor')
txt.cursor('watch')
Tk.update
Tk.update rescue nil
# eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding)
# Tk.update
eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb')
......
no_launcher = true if ARGV.size > 0
else
# show the root widget to make it lower then demo windows
Tk.update
Tk.update rescue nil
end
ARGV.each{|cmd|
if cmd =~ /(.*).rb/
-
ext/tk/lib/tk/canvas.rb
# create a canvas item without creating a TkcItem object
def create(type, *args)
type = TkcItem.type2class(type.to_s) unless type.kind_of?(TkcItem)
if TkcItem.type2class(type.to_s)
type = TkcItem.type2class(type.to_s)
elsif type.kind_of?(Class) and type.ancestors.member?(TkcItem)
else
raise "type must a TkcItem class, or a string in CItemTypeToClass"
end
type.create(self, *args)
end
    (1-1/1)