1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/tk/lib/tk/console.rb
nagai 4c4631c2da * renewal Ruby/Tk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-01 16:09:54 +00:00

29 lines
603 B
Ruby

#
# tk/console.rb : control the console on system without a real console
#
require 'tk'
module TkConsole
include Tk
extend Tk
TkCommandNames = ['console'.freeze].freeze
def self.title(str=None)
tk_call 'console', str
end
def self.hide
tk_call_without_enc('console', 'hide')
end
def self.show
tk_call_without_enc('console', 'show')
end
def self.eval(tcl_script)
#
# supports a Tcl script only
# I have no idea to support a Ruby script seamlessly.
#
_fromUTF8(tk_call_without_enc('console', 'eval',
_get_eval_enc_str(tcl_script)))
end
end