In Files

  • tk/lib/multi-tk.rb
  • tk/lib/tk.rb
  • tk/lib/tk/bindtag.rb
  • tk/lib/tk/canvas.rb
  • tk/lib/tk/canvastag.rb
  • tk/lib/tk/console.rb
  • tk/lib/tk/encodedstr.rb
  • tk/lib/tk/event.rb
  • tk/lib/tk/font.rb
  • tk/lib/tk/image.rb
  • tk/lib/tk/menu.rb
  • tk/lib/tk/msgcat.rb
  • tk/lib/tk/namespace.rb
  • tk/lib/tk/optiondb.rb
  • tk/lib/tk/root.rb
  • tk/lib/tk/text.rb
  • tk/lib/tk/textmark.rb
  • tk/lib/tk/texttag.rb
  • tk/lib/tk/timer.rb
  • tk/lib/tk/tk_mac.rb
  • tk/lib/tk/variable.rb
  • tk/lib/tk/virtevent.rb
  • tk/lib/tkextlib/blt.rb
  • tk/lib/tkextlib/blt/bitmap.rb
  • tk/lib/tkextlib/blt/component.rb
  • tk/lib/tkextlib/blt/tabset.rb
  • tk/lib/tkextlib/blt/tree.rb
  • tk/lib/tkextlib/blt/treeview.rb
  • tk/lib/tkextlib/blt/vector.rb
  • tk/lib/tkextlib/blt/watch.rb
  • tk/lib/tkextlib/bwidget/buttonbox.rb
  • tk/lib/tkextlib/bwidget/combobox.rb
  • tk/lib/tkextlib/bwidget/dialog.rb
  • tk/lib/tkextlib/bwidget/labelframe.rb
  • tk/lib/tkextlib/bwidget/listbox.rb
  • tk/lib/tkextlib/bwidget/mainframe.rb
  • tk/lib/tkextlib/bwidget/notebook.rb
  • tk/lib/tkextlib/bwidget/pagesmanager.rb
  • tk/lib/tkextlib/bwidget/panedwindow.rb
  • tk/lib/tkextlib/bwidget/panelframe.rb
  • tk/lib/tkextlib/bwidget/scrollableframe.rb
  • tk/lib/tkextlib/bwidget/scrolledwindow.rb
  • tk/lib/tkextlib/bwidget/statusbar.rb
  • tk/lib/tkextlib/bwidget/titleframe.rb
  • tk/lib/tkextlib/bwidget/tree.rb
  • tk/lib/tkextlib/bwidget/widget.rb
  • tk/lib/tkextlib/itcl/incr_tcl.rb
  • tk/lib/tkextlib/itk/incr_tk.rb
  • tk/lib/tkextlib/iwidgets/scrolledtext.rb
  • tk/lib/tkextlib/tcllib/ico.rb
  • tk/lib/tkextlib/tcllib/plotchart.rb
  • tk/lib/tkextlib/tcllib/toolbar.rb
  • tk/lib/tkextlib/tile.rb
  • tk/lib/tkextlib/tile/style.rb
  • tk/lib/tkextlib/tile/treeview.rb
  • tk/lib/tkextlib/tkHTML/htmlwidget.rb
  • tk/lib/tkextlib/tktable/tktable.rb
  • tk/lib/tkextlib/treectrl/tktreectrl.rb
  • tk/lib/tkextlib/vu/pie.rb
  • tk/lib/tkextlib/winico/winico.rb

Class/Module Index [+]

Quicksearch

TkCore

start Tk which depends on MultiTkIp

Constants

EventFlag
INTERP

#<RDoc::Comment:0x000000014053c0>


#<RDoc::Comment:0x00000001d45480>


#<RDoc::Comment:0x00000001d15bb8>


#<RDoc::Comment:0x00000001b79110>


#<RDoc::Comment:0x0000000137d380>


#<RDoc::Comment:0x00000000d01678>


#<RDoc::Comment:0x00000001447d10>


#<RDoc::Comment:0x00000001bb75c8>


#<RDoc::Comment:0x000000014d2028>


#<RDoc::Comment:0x0000000101c3d0>


#<RDoc::Comment:0x00000001cb5538>


#<RDoc::Comment:0x00000001cd55b8>


#<RDoc::Comment:0x00000001d598b8>


#<RDoc::Comment:0x00000001ac3b80>


#<RDoc::Comment:0x000000019dc000>


#<RDoc::Comment:0x000000018f3fd0>

INTERP_MUTEX
INTERP_ROOT_CHECK
INTERP_THREAD
INTERP_THREAD_STATUS
RUN_EVENTLOOP_ON_MAIN_THREAD

*** KNOWN BUG ***

Main event loop thread of TkAqua (> Tk8.4.9) must be the main
application thread. So, ruby1.9 users must call Tk.mainloop on
the main application thread.

*** ADD (2009/05/10) ***

In some cases (I don't know the description of conditions),
TkAqua 8.4.7 has a same kind of hang-up trouble.
So, if 8.4.7 or later, set RUN_EVENTLOOP_ON_MAIN_THREAD to true.
When you want to control this mode, please call the following
(set true/false as you want) before "require 'tk'".
----------------------------------------------------------
module TkCore; RUN_EVENTLOOP_ON_MAIN_THREAD = true; end
----------------------------------------------------------

*** ADD (2010/07/05) ***

The value of TclTkLib::WINDOWING_SYSTEM is defined at compiling.
If it is inconsistent with linked DLL, please call the following
before "require 'tk'".
----------------------------------------------------------
require 'tcltklib'
module TclTkLib
  remove_const :WINDOWING_SYSTEM
  WINDOWING_SYSTEM = 'x11' # or 'aqua'
end
----------------------------------------------------------
WIDGET_DESTROY_HOOK
WITH_ENCODING
WITH_RUBY_VM

Public Class Methods

callback(*arg) click to toggle source
 
               # File tk/lib/tk.rb, line 1601
def TkCore.callback(*arg)
  begin
    if TkCore::INTERP.tk_cmd_tbl.kind_of?(Hash)
      #TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
      normal_ret = false
      ret = catch(:IRB_EXIT) do  # IRB hack
        retval = TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg)
        normal_ret = true
        retval
      end
      unless normal_ret
        # catch IRB_EXIT
        exit(ret)
      end
      ret
    end
  rescue SystemExit=>e
    exit(e.status)
  rescue Interrupt=>e
    fail(e)
  rescue Exception => e
    begin
      msg = _toUTF8(e.class.inspect) + ': ' +
            _toUTF8(e.message) + "\n" +
            "\n---< backtrace of Ruby side >-----\n" +
            _toUTF8(e.backtrace.join("\n")) +
            "\n---< backtrace of Tk side >-------"
      if TkCore::WITH_ENCODING
        msg.force_encoding('utf-8')
      else
        msg.instance_variable_set(:@encoding, 'utf-8')
      end
    rescue Exception
      msg = e.class.inspect + ': ' + e.message + "\n" +
            "\n---< backtrace of Ruby side >-----\n" +
            e.backtrace.join("\n") +
            "\n---< backtrace of Tk side >-------"
    end
    # TkCore::INTERP._set_global_var('errorInfo', msg)
    # fail(e)
    fail(e, msg)
  end
end
            
inspect() click to toggle source
 
               # File tk/lib/tk.rb, line 1391
def inspect
  sprintf("#<Class(TkCallbackEntry):%0x>", self.__id__)
end
            
Also aliased as: to_s
new(ip, cmd) click to toggle source
 
               # File tk/lib/tk.rb, line 1397
def initialize(ip, cmd)
  @ip = ip
  @cmd = cmd
end
            
to_s() click to toggle source
Alias for: inspect

Public Instance Methods

call(*args) click to toggle source
 
               # File tk/lib/tk.rb, line 1402
def call(*args)
  @ip.cb_eval(@cmd, *args)
end
            
callback_break() click to toggle source
 
               # File tk/lib/tk.rb, line 1589
def callback_break
  fail TkCallbackBreak, "Tk callback returns 'break' status"
end
            
callback_continue() click to toggle source
 
               # File tk/lib/tk.rb, line 1593
def callback_continue
  fail TkCallbackContinue, "Tk callback returns 'continue' status"
end
            
callback_return() click to toggle source
 
               # File tk/lib/tk.rb, line 1597
def callback_return
  fail TkCallbackReturn, "Tk callback returns 'return' status"
end
            
inspect() click to toggle source
 
               # File tk/lib/tk.rb, line 1405
def inspect
  sprintf("#<cb_entry:%0x>", self.__id__)
end
            
Also aliased as: to_s
to_s() click to toggle source
Alias for: inspect

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.