ext/tk/lib/tkmngfocus.rb


DEFINITIONS

This source file includes following functions.


   1  #
   2  #   tkmngfocus.rb : methods for Tcl/Tk standard library 'focus.tcl'
   3  #                     1998/07/16 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
   4  #
   5  require 'tk'
   6  
   7  module TkManageFocus
   8    extend Tk
   9  
  10    def TkManageFocus.followsMouse
  11      tk_call 'tk_focusFollowsMouse'
  12    end
  13  
  14    def TkManageFocus.next(window)
  15      tk_call 'tk_focusNext', window
  16    end
  17    def focusNext
  18      TkManageFocus.next(self)
  19    end
  20  
  21    def TkManageFocus.prev(window)
  22      tk_call 'tk_focusPrev', window
  23    end
  24    def focusPrev
  25      TkManageFocus.prev(self)
  26    end
  27  end