From 3514110b89bee5c37e308b4ca887e66dfe841456 Mon Sep 17 00:00:00 2001 From: nagai Date: Mon, 11 Oct 2004 04:51:21 +0000 Subject: * ext/tk/lib/tk/*: untabify git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tkextlib/tcllib/autoscroll.rb | 72 ++++++++++++++++---------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'ext/tk/lib/tkextlib/tcllib/autoscroll.rb') diff --git a/ext/tk/lib/tkextlib/tcllib/autoscroll.rb b/ext/tk/lib/tkextlib/tcllib/autoscroll.rb index d0cb2812cb..34e34046c6 100644 --- a/ext/tk/lib/tkextlib/tcllib/autoscroll.rb +++ b/ext/tk/lib/tkextlib/tcllib/autoscroll.rb @@ -32,23 +32,23 @@ module Tk module Tcllib module Autoscroll def self.package_version - begin - TkPackage.require('autoscroll') - rescue - '' - end + begin + TkPackage.require('autoscroll') + rescue + '' + end end def self.not_available - fail RuntimeError, "'tkextlib/tcllib/autoscroll' extension is not available on your current environment." + fail RuntimeError, "'tkextlib/tcllib/autoscroll' extension is not available on your current environment." end def self.autoscroll(win) - Tk::Tcllib::Autoscroll.not_available + Tk::Tcllib::Autoscroll.not_available end def self.unautoscroll(win) - Tk::Tcllib::Autoscroll.not_available + Tk::Tcllib::Autoscroll.not_available end end end @@ -59,44 +59,44 @@ module Tk def autoscroll(mode = nil) case mode when :x, 'x' - if @xscrollbar - Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar) - end + if @xscrollbar + Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar) + end when :y, 'y' - if @yscrollbar - Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar) - end + if @yscrollbar + Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar) + end when nil, :both, 'both' - if @xscrollbar - Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar) - end - if @yscrollbar - Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar) - end + if @xscrollbar + Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar) + end + if @yscrollbar + Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar) + end else - fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected" + fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected" end self end def unautoscroll(mode = nil) case mode when :x, 'x' - if @xscrollbar - Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar) - end + if @xscrollbar + Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar) + end when :y, 'y' - if @yscrollbar - Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar) - end + if @yscrollbar + Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar) + end when nil, :both, 'both' - if @xscrollbar - Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar) - end - if @yscrollbar - Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar) - end + if @xscrollbar + Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar) + end + if @yscrollbar + Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar) + end else - fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected" + fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected" end self end @@ -130,11 +130,11 @@ module Tk module Autoscroll def self.autoscroll(win) - tk_call_without_enc('::autoscroll::autoscroll', win.path) + tk_call_without_enc('::autoscroll::autoscroll', win.path) end def self.unautoscroll(win) - tk_call_without_enc('::autoscroll::unautoscroll', win.path) + tk_call_without_enc('::autoscroll::unautoscroll', win.path) end end end -- cgit v1.2.3