mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/lib/tk/*: untabify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
05f5928c9d
commit
3514110b89
296 changed files with 13591 additions and 13558 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue