summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkextlib/tcllib/autoscroll.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/tcllib/autoscroll.rb')
-rw-r--r--ext/tk/lib/tkextlib/tcllib/autoscroll.rb72
1 files changed, 36 insertions, 36 deletions
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