diff options
Diffstat (limited to 'ext/tk/lib/tkconsole.rb')
-rw-r--r-- | ext/tk/lib/tkconsole.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/tk/lib/tkconsole.rb b/ext/tk/lib/tkconsole.rb new file mode 100644 index 0000000000..0129501bee --- /dev/null +++ b/ext/tk/lib/tkconsole.rb @@ -0,0 +1,26 @@ +# +# tkconsole.rb : control the console on system without a real console +# +require 'tk' + +module TkConsole + include Tk + extend Tk + + 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 |