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/tkconsole.rb
nagai fd46a1da0a process.c : unify indentation
configure.in : add --enable-setreuid option
tcltklib.c : TclTkIp.new accepts 'ip-name' and 'options'
             ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') )
tk.rb      : support arguments of TclTkIp.new
             ( see TkCore::IP_NAME, TkCore::IP_OPTS )
tk*.rb     : preparations for multi-Tk interpreter support


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23 16:07:35 +00:00

28 lines
526 B
Ruby

#
# tkconsole.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 'console', 'hide'
end
def self.show
tk_call 'console', 'show'
end
def self.eval(tcl_script)
#
# supports a Tcl script only
# I have no idea to support a Ruby script seamlessly.
#
tk_call 'console', 'eval', tcl_script
end
end