diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
commit | 287a34ae0dfc23e4158f67cb7783d239f202c368 (patch) | |
tree | 5e35d5b41aae961b37cf6632f60c42f51c7aa775 /ext/tk/lib/tkextlib/tcllib | |
parent | 9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff) |
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tkextlib/tcllib')
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/autoscroll.rb | 24 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/ctext.rb | 10 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/cursor.rb | 14 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/datefield.rb | 12 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/dialog.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/getstring.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/ico.rb | 14 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/ip_entry.rb | 4 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/panelframe.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/plotchart.rb | 104 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/ruler.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/screenruler.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/scrollwin.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/setup.rb | 4 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/superframe.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/swaplist.rb | 8 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/tablelist_core.rb | 24 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/tkpiechart.rb | 22 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/tcllib/tooltip.rb | 2 |
19 files changed, 128 insertions, 128 deletions
diff --git a/ext/tk/lib/tkextlib/tcllib/autoscroll.rb b/ext/tk/lib/tkextlib/tcllib/autoscroll.rb index 7db3c2e2b7..2def59bf73 100644 --- a/ext/tk/lib/tkextlib/tcllib/autoscroll.rb +++ b/ext/tk/lib/tkextlib/tcllib/autoscroll.rb @@ -7,20 +7,20 @@ # # (The following is the original description of the library.) # -# This package allows scrollbars to be mapped and unmapped as needed -# depending on the size and content of the scrollbars scrolled widget. -# The scrollbar must be managed by either pack or grid, other geometry +# This package allows scrollbars to be mapped and unmapped as needed +# depending on the size and content of the scrollbars scrolled widget. +# The scrollbar must be managed by either pack or grid, other geometry # managers are not supported. # -# When managed by pack, any geometry changes made in the scrollbars parent -# between the time a scrollbar is unmapped, and when it is mapped will be -# lost. It is an error to destroy any of the scrollbars siblings while the -# scrollbar is unmapped. When managed by grid, if anything becomes gridded -# in the same row and column the scrollbar occupied it will be replaced by +# When managed by pack, any geometry changes made in the scrollbars parent +# between the time a scrollbar is unmapped, and when it is mapped will be +# lost. It is an error to destroy any of the scrollbars siblings while the +# scrollbar is unmapped. When managed by grid, if anything becomes gridded +# in the same row and column the scrollbar occupied it will be replaced by # the scrollbar when remapped. # -# This package may be used on any scrollbar-like widget as long as it -# supports the set subcommand in the same style as scrollbar. If the set +# This package may be used on any scrollbar-like widget as long as it +# supports the set subcommand in the same style as scrollbar. If the set # subcommand is not used then this package will have no effect. # @@ -110,14 +110,14 @@ end class Tk::Scrollbar def autoscroll - # Arranges for the already existing scrollbar to be mapped + # Arranges for the already existing scrollbar to be mapped # and unmapped as needed. #tk_call_without_enc('::autoscroll::autoscroll', @path) Tk::Tcllib::Autoscroll.autoscroll(self) self end def unautoscroll - # Returns the scrollbar to its original static state. + # Returns the scrollbar to its original static state. #tk_call_without_enc('::autoscroll::unautoscroll', @path) Tk::Tcllib::Autoscroll.unautoscroll(self) self diff --git a/ext/tk/lib/tkextlib/tcllib/ctext.rb b/ext/tk/lib/tkextlib/tcllib/ctext.rb index 9014037f3d..21d6438b48 100644 --- a/ext/tk/lib/tkextlib/tcllib/ctext.rb +++ b/ext/tk/lib/tkextlib/tcllib/ctext.rb @@ -39,7 +39,7 @@ class Tk::Tcllib::CText def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) @@ -48,7 +48,7 @@ class Tk::Tcllib::CText private :create_self def __strval_optkeys - super() << 'linemapfg' << 'linemapbg' << + super() << 'linemapfg' << 'linemapbg' << 'linemap_select_fg' << 'linemap_select_bg' end private :__strval_optkeys @@ -96,19 +96,19 @@ class Tk::Tcllib::CText end def add_highlight_class_for_special_chars(klass, col, *chrs) - tk_call('ctext::addHighlightClassForSpecialChars', + tk_call('ctext::addHighlightClassForSpecialChars', @path, klass, col, chrs.join('')) self end def add_highlight_class_for_regexp(klass, col, tcl_regexp) - tk_call('ctext::addHighlightClassForRegexp', + tk_call('ctext::addHighlightClassForRegexp', @path, klass, col, tcl_regexp) self end def add_highlight_class_with_only_char_start(klass, col, chr) - tk_call('ctext::addHighlightClassWithOnlyCharStart', + tk_call('ctext::addHighlightClassWithOnlyCharStart', @path, klass, col, chr) self end diff --git a/ext/tk/lib/tkextlib/tcllib/cursor.rb b/ext/tk/lib/tkextlib/tcllib/cursor.rb index 9bb828e8dd..5c47f9709b 100644 --- a/ext/tk/lib/tkextlib/tcllib/cursor.rb +++ b/ext/tk/lib/tkextlib/tcllib/cursor.rb @@ -44,8 +44,8 @@ module Tk end def self.cursor_display(parent=None) - # Pops up a dialog with a listbox containing all the cursor names. - # Selecting a cursor name will display it in that dialog. + # Pops up a dialog with a listbox containing all the cursor names. + # Selecting a cursor name will display it in that dialog. # This is simply for viewing any available cursors on the platform . #tk_call_without_enc('::cursor::display', parent) Tk::Tcllib::Cursor.cursor_display(parent) @@ -54,15 +54,15 @@ end class TkWindow def cursor_propagate(cursor) - # Sets the cursor for self and all its descendants to cursor. + # Sets the cursor for self and all its descendants to cursor. #tk_call_without_enc('::cursor::propagate', @path, cursor) Tk::Tcllib::Cursor.cursor_propagate(self, cursor) end def cursor_restore(cursor = None) - # Restore the original or previously set cursor for self and all its - # descendants. If cursor is specified, that will be used if on any - # widget that did not have a preset cursor (set by a previous call - # to TkWindow#cursor_propagate). + # Restore the original or previously set cursor for self and all its + # descendants. If cursor is specified, that will be used if on any + # widget that did not have a preset cursor (set by a previous call + # to TkWindow#cursor_propagate). #tk_call_without_enc('::cursor::restore', @path, cursor) Tk::Tcllib::Cursor.cursor_restore(self, cursor) end diff --git a/ext/tk/lib/tkextlib/tcllib/datefield.rb b/ext/tk/lib/tkextlib/tcllib/datefield.rb index 2244dd7a9a..4c2eae741e 100644 --- a/ext/tk/lib/tkextlib/tcllib/datefield.rb +++ b/ext/tk/lib/tkextlib/tcllib/datefield.rb @@ -7,12 +7,12 @@ # # (The following is the original description of the library.) # -# The datefield package provides the datefield widget which is an enhanced -# text entry widget for the purpose of date entry. Only valid dates of the +# The datefield package provides the datefield widget which is an enhanced +# text entry widget for the purpose of date entry. Only valid dates of the # form MM/DD/YYYY can be entered. -# -# The datefield widget is, in fact, just an entry widget with specialized -# bindings. This means all the command and options for an entry widget apply +# +# The datefield widget is, in fact, just an entry widget with specialized +# bindings. This means all the command and options for an entry widget apply # equally here. require 'tk' @@ -47,7 +47,7 @@ class Tk::Tcllib::Datefield def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) diff --git a/ext/tk/lib/tkextlib/tcllib/dialog.rb b/ext/tk/lib/tkextlib/tcllib/dialog.rb index 825621b5a1..86a0ef2269 100644 --- a/ext/tk/lib/tkextlib/tcllib/dialog.rb +++ b/ext/tk/lib/tkextlib/tcllib/dialog.rb @@ -41,7 +41,7 @@ class Tk::Tcllib::Widget::Dialog def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) diff --git a/ext/tk/lib/tkextlib/tcllib/getstring.rb b/ext/tk/lib/tkextlib/tcllib/getstring.rb index fc5d8b26d9..ab45c9b1ea 100644 --- a/ext/tk/lib/tkextlib/tcllib/getstring.rb +++ b/ext/tk/lib/tkextlib/tcllib/getstring.rb @@ -74,7 +74,7 @@ class Tk::Tcllib::GetString_Dialog def show @variable.value = '' - @status = bool(tk_call(self.class::TkCommandNames[0], + @status = bool(tk_call(self.class::TkCommandNames[0], @path, @variable, @text, *hash_kv(@keys))) end alias display show diff --git a/ext/tk/lib/tkextlib/tcllib/ico.rb b/ext/tk/lib/tkextlib/tcllib/ico.rb index 8c92926a4c..538f7b5408 100644 --- a/ext/tk/lib/tkextlib/tcllib/ico.rb +++ b/ext/tk/lib/tkextlib/tcllib/ico.rb @@ -50,23 +50,23 @@ class Tk::Tcllib::ICO def self.get_data(file, index, keys={}) keys['format'] = 'data' - tk_split_list(tk_call_without_enc('::ico::getIcon', file, index, + tk_split_list(tk_call_without_enc('::ico::getIcon', file, index, *hash_kv(keys, true))) end def self.write(file, index, depth, data, keys=nil) - tk_call_without_enc('::ico::writeIcon', file, index, depth, data, + tk_call_without_enc('::ico::writeIcon', file, index, depth, data, *hash_kv(keys, true)) end def self.copy(from_file, from_index, to_file, to_index, keys=nil) - tk_call_without_enc('::ico::copyIcon', - from_file, from_index, to_file, to_index, + tk_call_without_enc('::ico::copyIcon', + from_file, from_index, to_file, to_index, *hash_kv(keys, true)) end def self.exe_to_ico(exe_file, ico_file, keys=nil) - tk_call_without_enc('::ico::copyIcon', exe_file, ico_file, + tk_call_without_enc('::ico::copyIcon', exe_file, ico_file, *hash_kv(keys, true)) end @@ -76,7 +76,7 @@ class Tk::Tcllib::ICO def self.transparent_color(image, color) if image.kind_of?(Array) - tk_split_list(tk_call_without_enc('::ico::transparentColor', + tk_split_list(tk_call_without_enc('::ico::transparentColor', image, color)) else tk_call_without_enc('::ico::transparentColor', image, color) @@ -99,7 +99,7 @@ class Tk::Tcllib::ICO Tk_Image_ID[1].succ! } end - tk_call_without_enc('::ico::getIcon', file, index, '-name', @path, + tk_call_without_enc('::ico::getIcon', file, index, '-name', @path, '-format', 'image', *hash_kv(keys, true)) Tk_IMGTBL[@path] = self end diff --git a/ext/tk/lib/tkextlib/tcllib/ip_entry.rb b/ext/tk/lib/tkextlib/tcllib/ip_entry.rb index c4b8240c04..a8a33f1cad 100644 --- a/ext/tk/lib/tkextlib/tcllib/ip_entry.rb +++ b/ext/tk/lib/tkextlib/tcllib/ip_entry.rb @@ -7,7 +7,7 @@ # # (The following is the original description of the library.) # -# This package provides a widget for the entering of a IP address. +# This package provides a widget for the entering of a IP address. # It guarantees a valid address at all times. require 'tk' @@ -43,7 +43,7 @@ class Tk::Tcllib::IP_Entry def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) diff --git a/ext/tk/lib/tkextlib/tcllib/panelframe.rb b/ext/tk/lib/tkextlib/tcllib/panelframe.rb index 2a4562e779..9086ad78d2 100644 --- a/ext/tk/lib/tkextlib/tcllib/panelframe.rb +++ b/ext/tk/lib/tkextlib/tcllib/panelframe.rb @@ -37,7 +37,7 @@ class Tk::Tcllib::Widget::PanelFrame def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) diff --git a/ext/tk/lib/tkextlib/tcllib/plotchart.rb b/ext/tk/lib/tkextlib/tcllib/plotchart.rb index 06ab20f3e6..25a574efbc 100644 --- a/ext/tk/lib/tkextlib/tcllib/plotchart.rb +++ b/ext/tk/lib/tkextlib/tcllib/plotchart.rb @@ -7,10 +7,10 @@ # # (The following is the original description of the library.) # -# Plotchart is a Tcl-only package that focuses on the easy creation of -# xy-plots, barcharts and other common types of graphical presentations. -# The emphasis is on ease of use, rather than flexibility. The procedures -# that create a plot use the entire canvas window, making the layout of the +# Plotchart is a Tcl-only package that focuses on the easy creation of +# xy-plots, barcharts and other common types of graphical presentations. +# The emphasis is on ease of use, rather than flexibility. The procedures +# that create a plot use the entire canvas window, making the layout of the # plot completely automatic. # # This results in the creation of an xy-plot in, say, ten lines of code: @@ -32,27 +32,27 @@ # $s title "Data series" # -------------------------------------------------------------------- # -# A drawback of the package might be that it does not do any data management. -# So if the canvas that holds the plot is to be resized, the whole plot must -# be redrawn. The advantage, though, is that it offers a number of plot and +# A drawback of the package might be that it does not do any data management. +# So if the canvas that holds the plot is to be resized, the whole plot must +# be redrawn. The advantage, though, is that it offers a number of plot and # chart types: # # * XY-plots like the one shown above with any number of data series. -# * Stripcharts, a kind of XY-plots where the horizontal axis is adjusted -# automatically. The result is a kind of sliding window on the data +# * Stripcharts, a kind of XY-plots where the horizontal axis is adjusted +# automatically. The result is a kind of sliding window on the data # series. # * Polar plots, where the coordinates are polar instead of cartesian. -# * Isometric plots, where the scale of the coordinates in the two -# directions is always the same, i.e. a circle in world coordinates +# * Isometric plots, where the scale of the coordinates in the two +# directions is always the same, i.e. a circle in world coordinates # appears as a circle on the screen. -# You can zoom in and out, as well as pan with these plots (Note: this -# works best if no axes are drawn, the zooming and panning routines do -# not distinguish the axes), using the mouse buttons with the control +# You can zoom in and out, as well as pan with these plots (Note: this +# works best if no axes are drawn, the zooming and panning routines do +# not distinguish the axes), using the mouse buttons with the control # key and the arrow keys with the control key. # * Piecharts, with automatic scaling to indicate the proportions. -# * Barcharts, with either vertical or horizontal bars, stacked bars or +# * Barcharts, with either vertical or horizontal bars, stacked bars or # bars side by side. -# * Timecharts, where bars indicate a time period and milestones or other +# * Timecharts, where bars indicate a time period and milestones or other # important moments in time are represented by triangles. # * 3D plots (both for displaying surfaces and 3D bars) # @@ -91,13 +91,13 @@ module Tk::Tcllib::Plotchart end def self.world_coordinates(w, *args) # args := xmin, ymin, xmax, ymax - tk_call_without_enc('::Plotchart::worldCoordinates', + tk_call_without_enc('::Plotchart::worldCoordinates', w.path, *(args.flatten)) end - def self.world_3D_coordinates(w, *args) + def self.world_3D_coordinates(w, *args) # args := xmin, ymin, zmin, xmax, ymax, zmax - tk_call_without_enc('::Plotchart::world3DCoordinates', + tk_call_without_enc('::Plotchart::world3DCoordinates', w.path, *(args.flatten)) end @@ -157,7 +157,7 @@ module Tk::Tcllib::Plotchart if key.kind_of?(Hash) tk_call_without_enc(@chart, 'xconfig', *hash_kv(key, true)) else - tk_call_without_enc(@chart, 'xconfig', + tk_call_without_enc(@chart, 'xconfig', "-#{key}", _get_eval_enc_str(value)) end self @@ -167,7 +167,7 @@ module Tk::Tcllib::Plotchart if key.kind_of?(Hash) tk_call_without_enc(@chart, 'yconfig', *hash_kv(key, true)) else - tk_call_without_enc(@chart, 'yconfig', + tk_call_without_enc(@chart, 'yconfig', "-#{key}", _get_eval_enc_str(value)) end self @@ -180,14 +180,14 @@ module Tk::Tcllib::Plotchart end def world_coordinates(*args) # args := xmin, ymin, xmax, ymax - tk_call_without_enc('::Plotchart::worldCoordinates', + tk_call_without_enc('::Plotchart::worldCoordinates', @path, *(args.flatten)) self end - def world_3D_coordinates(*args) + def world_3D_coordinates(*args) # args := xmin, ymin, zmin, xmax, ymax, zmax - tk_call_without_enc('::Plotchart::world3DCoordinates', + tk_call_without_enc('::Plotchart::world3DCoordinates', @path, *(args.flatten)) self end @@ -229,7 +229,7 @@ module Tk::Tcllib::Plotchart include ChartMethod TkCommandNames = [ - 'canvas'.freeze, + 'canvas'.freeze, '::Plotchart::createXYPlot'.freeze ].freeze @@ -259,7 +259,7 @@ module Tk::Tcllib::Plotchart def _create_chart p self.class::TkCommandNames[1] if $DEBUG - tk_call_without_enc(self.class::TkCommandNames[1], @path, + tk_call_without_enc(self.class::TkCommandNames[1], @path, array2tk_list(@xaxis), array2tk_list(@yaxis)) end private :_create_chart @@ -324,7 +324,7 @@ module Tk::Tcllib::Plotchart if key.kind_of?(Hash) tk_call_without_enc(@chart, 'dataconfig', series, *hash_kv(key, true)) else - tk_call_without_enc(@chart, 'dataconfig', series, + tk_call_without_enc(@chart, 'dataconfig', series, "-#{key}", _get_eval_enc_str(value)) end end @@ -333,7 +333,7 @@ module Tk::Tcllib::Plotchart ############################ class Stripchart < XYPlot TkCommandNames = [ - 'canvas'.freeze, + 'canvas'.freeze, '::Plotchart::createStripchart'.freeze ].freeze end @@ -343,7 +343,7 @@ module Tk::Tcllib::Plotchart include ChartMethod TkCommandNames = [ - 'canvas'.freeze, + 'canvas'.freeze, '::Plotchart::createPolarplot'.freeze ].freeze @@ -370,7 +370,7 @@ module Tk::Tcllib::Plotchart def _create_chart p self.class::TkCommandNames[1] if $DEBUG - tk_call_without_enc(self.class::TkCommandNames[1], @path, + tk_call_without_enc(self.class::TkCommandNames[1], @path, array2tk_list(@radius_data)) end private :_create_chart @@ -382,7 +382,7 @@ module Tk::Tcllib::Plotchart end def plot(series, radius, angle) - tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(series), + tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(series), radius, angle) self end @@ -391,7 +391,7 @@ module Tk::Tcllib::Plotchart if key.kind_of?(Hash) tk_call_without_enc(@chart, 'dataconfig', series, *hash_kv(key, true)) else - tk_call_without_enc(@chart, 'dataconfig', series, + tk_call_without_enc(@chart, 'dataconfig', series, "-#{key}", _get_eval_enc_str(value)) end end @@ -403,7 +403,7 @@ module Tk::Tcllib::Plotchart include ChartMethod TkCommandNames = [ - 'canvas'.freeze, + 'canvas'.freeze, '::Plotchart::createIsometricPlot'.freeze ].freeze @@ -446,8 +446,8 @@ module Tk::Tcllib::Plotchart def _create_chart p self.class::TkCommandNames[1] if $DEBUG - tk_call_without_enc(self.class::TkCommandNames[1], @path, - array2tk_list(@xaxis), array2tk_list(@yaxis), + tk_call_without_enc(self.class::TkCommandNames[1], @path, + array2tk_list(@xaxis), array2tk_list(@yaxis), @stepsize) end private :_create_chart @@ -483,7 +483,7 @@ module Tk::Tcllib::Plotchart include ChartMethod TkCommandNames = [ - 'canvas'.freeze, + 'canvas'.freeze, '::Plotchart::create3DPlot'.freeze ].freeze @@ -516,9 +516,9 @@ module Tk::Tcllib::Plotchart def _create_chart p self.class::TkCommandNames[1] if $DEBUG - tk_call_without_enc(self.class::TkCommandNames[1], @path, - array2tk_list(@xaxis), - array2tk_list(@yaxis), + tk_call_without_enc(self.class::TkCommandNames[1], @path, + array2tk_list(@xaxis), + array2tk_list(@yaxis), array2tk_list(@zaxis)) end private :_create_chart @@ -542,10 +542,10 @@ module Tk::Tcllib::Plotchart end def plot_data(dat) - # dat has to be provided as a 2 level array. - # 1st level contains rows, drawn in y-direction, - # and each row is an array whose elements are drawn in x-direction, - # for the columns. + # dat has to be provided as a 2 level array. + # 1st level contains rows, drawn in y-direction, + # and each row is an array whose elements are drawn in x-direction, + # for the columns. tk_call_without_enc(@chart, 'plotdata', dat) self end @@ -565,7 +565,7 @@ module Tk::Tcllib::Plotchart include ChartMethod TkCommandNames = [ - 'canvas'.freeze, + 'canvas'.freeze, '::Plotchart::createPiechart'.freeze ].freeze @@ -596,11 +596,11 @@ module Tk::Tcllib::Plotchart include ChartMethod TkCommandNames = [ - 'canvas'.freeze, + 'canvas'.freeze, '::Plotchart::createBarchart'.freeze ].freeze - def initialize(*args) + def initialize(*args) # args := ([parent,] xlabels, ylabels [, series] [, keys]) # xlabels, ylabels := labels | axis ( depend on normal or horizontal ) # labels := Array of [label, label, ...] @@ -642,8 +642,8 @@ module Tk::Tcllib::Plotchart def _create_chart p self.class::TkCommandNames[1] if $DEBUG - tk_call_without_enc(self.class::TkCommandNames[1], @path, - array2tk_list(@xlabels), array2tk_list(@ylabels), + tk_call_without_enc(self.class::TkCommandNames[1], @path, + array2tk_list(@xlabels), array2tk_list(@ylabels), @series_size) end private :_create_chart @@ -672,7 +672,7 @@ module Tk::Tcllib::Plotchart ############################ class HorizontalBarchart < Barchart TkCommandNames = [ - 'canvas'.freeze, + 'canvas'.freeze, '::Plotchart::createHorizontalBarchart'.freeze ].freeze end @@ -717,7 +717,7 @@ module Tk::Tcllib::Plotchart def _create_chart p self.class::TkCommandNames[1] if $DEBUG - tk_call_without_enc(self.class::TkCommandNames[1], @path, + tk_call_without_enc(self.class::TkCommandNames[1], @path, @time_begin, @time_end, @items) end private :_create_chart @@ -790,13 +790,13 @@ module Tk::Tcllib::Plotchart def _create_chart p self.class::TkCommandNames[1] if $DEBUG - tk_call_without_enc(self.class::TkCommandNames[1], @path, + tk_call_without_enc(self.class::TkCommandNames[1], @path, @time_begin, @time_end, @items, @text_width) end private :_create_chart def task(txt, time_begin, time_end, completed=0.0) - list(tk_call_without_enc(@chart, 'task', txt, time_begin, time_end, + list(tk_call_without_enc(@chart, 'task', txt, time_begin, time_end, completed)).collect!{|id| TkcItem.id2obj(self, id) } diff --git a/ext/tk/lib/tkextlib/tcllib/ruler.rb b/ext/tk/lib/tkextlib/tcllib/ruler.rb index 88ffb2c912..d22dafa053 100644 --- a/ext/tk/lib/tkextlib/tcllib/ruler.rb +++ b/ext/tk/lib/tkextlib/tcllib/ruler.rb @@ -46,7 +46,7 @@ class Tk::Tcllib::Widget::Ruler def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) diff --git a/ext/tk/lib/tkextlib/tcllib/screenruler.rb b/ext/tk/lib/tkextlib/tcllib/screenruler.rb index 1b4067e2f0..75fa36b66d 100644 --- a/ext/tk/lib/tkextlib/tcllib/screenruler.rb +++ b/ext/tk/lib/tkextlib/tcllib/screenruler.rb @@ -47,7 +47,7 @@ class Tk::Tcllib::Widget::ScreenRuler def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) diff --git a/ext/tk/lib/tkextlib/tcllib/scrollwin.rb b/ext/tk/lib/tkextlib/tcllib/scrollwin.rb index 717728e34a..c9f6062fef 100644 --- a/ext/tk/lib/tkextlib/tcllib/scrollwin.rb +++ b/ext/tk/lib/tkextlib/tcllib/scrollwin.rb @@ -42,7 +42,7 @@ class Tk::Tcllib::Widget::ScrolledWindow def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) diff --git a/ext/tk/lib/tkextlib/tcllib/setup.rb b/ext/tk/lib/tkextlib/tcllib/setup.rb index ce0f0bd4d4..ee406c6ca0 100644 --- a/ext/tk/lib/tkextlib/tcllib/setup.rb +++ b/ext/tk/lib/tkextlib/tcllib/setup.rb @@ -2,7 +2,7 @@ # setup.rb -- setup script before calling TkPackage.require() # # If you need some setup operations (for example, add a library path -# to the library search path) before using Tcl/Tk library packages -# wrapped by Ruby scripts in this directory, please write the setup +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup # operations in this file. # diff --git a/ext/tk/lib/tkextlib/tcllib/superframe.rb b/ext/tk/lib/tkextlib/tcllib/superframe.rb index 35da37efbf..adc9c4adbd 100644 --- a/ext/tk/lib/tkextlib/tcllib/superframe.rb +++ b/ext/tk/lib/tkextlib/tcllib/superframe.rb @@ -37,7 +37,7 @@ class Tk::Tcllib::Widget::SuperFrame def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) diff --git a/ext/tk/lib/tkextlib/tcllib/swaplist.rb b/ext/tk/lib/tkextlib/tcllib/swaplist.rb index 1c813e36da..bb4c71cd5f 100644 --- a/ext/tk/lib/tkextlib/tcllib/swaplist.rb +++ b/ext/tk/lib/tkextlib/tcllib/swaplist.rb @@ -44,7 +44,7 @@ class Tk::Tcllib::Swaplist_Dialog self.show(*args) end - def initialize(*args) + def initialize(*args) # args = (parent=nil, complete_list=[], selected_list=[], keys=nil) keys = args.pop if keys.kind_of?(Hash) @@ -74,9 +74,9 @@ class Tk::Tcllib::Swaplist_Dialog def show @variable.value = '' - @status = bool(tk_call(self.class::TkCommandNames[0], - @path, @variable, - @complete_list, @selected_list, + @status = bool(tk_call(self.class::TkCommandNames[0], + @path, @variable, + @complete_list, @selected_list, *hash_kv(@keys))) end alias display show diff --git a/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb b/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb index d7a6c97210..c99f62f2dc 100644 --- a/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb +++ b/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb @@ -4,7 +4,7 @@ # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # # * Part of tcllib extension -# * This file is required by 'tkextlib/tcllib/tablelist.rb' or +# * This file is required by 'tkextlib/tcllib/tablelist.rb' or # 'tkextlib/tcllib/tablelist_tile.rb'. # @@ -54,7 +54,7 @@ module Tk::Tcllib::TablelistItemConfig elsif idx =~ /([^,]+),([^,]+)/ row = $1, column = $2 [num_or_str(row), num_or_str(column)] - else + else num_or_str(idx) end end @@ -144,7 +144,7 @@ class Tk::Tcllib::Tablelist def create_self(keys) if keys and keys != None - tk_call_without_enc(self.class::TkCommandNames[0], @path, + tk_call_without_enc(self.class::TkCommandNames[0], @path, *hash_kv(keys, true)) else tk_call_without_enc(self.class::TkCommandNames[0], @path) @@ -166,8 +166,8 @@ class Tk::Tcllib::Tablelist def __boolval_optkeys super() + [ - 'forceeditendcommand', 'movablecolumns', 'movablerows', - 'protecttitlecolumns', 'resizablecolumns', + 'forceeditendcommand', 'movablecolumns', 'movablerows', + 'protecttitlecolumns', 'resizablecolumns', 'showarrow', 'showlabels', 'showseparators' ] end @@ -194,7 +194,7 @@ class Tk::Tcllib::Tablelist # The method is used to convert a ruby's object to a opt-value. # When set the value of the option "key", "proc.call(value)" is called. # That is, "-#{key} #{proc.call(value)}". - super().update('stretch'=>proc{|v| + super().update('stretch'=>proc{|v| (v.kind_of?(Array))? v.collect{|e| _to_idx(e)}: v }) end @@ -218,7 +218,7 @@ class Tk::Tcllib::Tablelist def __item_boolval_optkeys(id) super(id) + [ - 'editable', 'hide', 'resizable', 'showarrow', 'stretchable', + 'editable', 'hide', 'resizable', 'showarrow', 'stretchable', ] end private :__item_boolval_optkeys @@ -249,7 +249,7 @@ class Tk::Tcllib::Tablelist tk_send('activatecell', _to_idx(index)) self end - alias activatecell activate_cell + alias activatecell activate_cell def get_attrib(name=nil) if name && name != None @@ -280,7 +280,7 @@ class Tk::Tcllib::Tablelist TkBindTag.new_by_name(tk_send('bodytag')) end - def cancel_editing + def cancel_editing tk_send('cancelediting') self end @@ -338,7 +338,7 @@ class Tk::Tcllib::Tablelist idx = _from_idx(tk_send('containingcell', x, y)) if idx.kind_of?(Array) [ - ((idx[0].kind_of?(Fixnum) && idx[0] < 0)? nil: idx[0]), + ((idx[0].kind_of?(Fixnum) && idx[0] < 0)? nil: idx[0]), ((idx[1].kind_of?(Fixnum) && idx[1] < 0)? nil: idx[1]) ] else @@ -698,7 +698,7 @@ class << Tk::Tcllib::Tablelist ############################################################ - # with the BWidget package + # with the BWidget package def addBWidgetEntry(name=None) Tk.tk_call('::tablelist::addBWidgetEntry', name) end @@ -713,7 +713,7 @@ class << Tk::Tcllib::Tablelist ############################################################ - # with the Iwidgets ([incr Widgets]) package + # with the Iwidgets ([incr Widgets]) package def addIncrEntryfield(name=None) Tk.tk_call('::tablelist::addIncrEntry', name) end diff --git a/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb b/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb index b366e0198b..2f6e4b44fc 100644 --- a/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb +++ b/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb @@ -52,7 +52,7 @@ module Tk::Tcllib::Tkpiechart private :__config_cmd def __configinfo_struct - {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil, + {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil, :default_value=>1, :current_value=>2} end private :__configinfo_struct @@ -63,7 +63,7 @@ module Tk::Tcllib::Tkpiechart private :__boolval_optkeys def __strval_optkeys - super() << 'bordercolor' << 'textbackground' << + super() << 'bordercolor' << 'textbackground' << 'widestvaluetext' << 'title' end private :__strval_optkeys @@ -90,7 +90,7 @@ module Tk::Tcllib::Tkpiechart def create_self(x, y, width, height, keys=None) if keys and keys != None - @tag_key = tk_call_without_enc('::stooop::new', 'pie', + @tag_key = tk_call_without_enc('::stooop::new', 'pie', @c, x, y, *hash_kv(keys, true)) else @tag_key = tk_call_without_enc('::stooop::new', 'pie', @c, x, y) @@ -148,7 +148,7 @@ module Tk::Tcllib::Tkpiechart end def selected_slices - tk_split_simplelist(tk_call_without_enc('pie::selectedSlices', + tk_split_simplelist(tk_call_without_enc('pie::selectedSlices', @tag_key)).collect{|slice| @slice_tbl[slice] || Slice.new(:no_create, self, slice) } @@ -212,7 +212,7 @@ module Tk::Tcllib::Tkpiechart end def size(share, disp=None) - tk_call_without_enc('pie::sizeSlice', + tk_call_without_enc('pie::sizeSlice', @pie.tag_key, @tag_key, share, disp) self end @@ -236,7 +236,7 @@ module Tk::Tcllib::Tkpiechart def create_self(keys=None) if keys and keys != None - @tag_key = tk_call_without_enc('::stooop::new', 'pieBoxLabeler', + @tag_key = tk_call_without_enc('::stooop::new', 'pieBoxLabeler', *hash_kv(keys, true)) else @tag_key = tk_call_without_enc('::stooop::new', 'pieBoxLabeler') @@ -268,8 +268,8 @@ module Tk::Tcllib::Tkpiechart def create_self(keys=None) if keys and keys != None - @tag_key = tk_call_without_enc('::stooop::new', - 'piePeripheralLabeler', + @tag_key = tk_call_without_enc('::stooop::new', + 'piePeripheralLabeler', *hash_kv(keys, true)) else @tag_key = tk_call_without_enc('::stooop::new', 'piePeripheralLabeler') @@ -296,11 +296,11 @@ module Tk::Tcllib::Tkpiechart def create_self(x, y, keys=None) if keys and keys != None - @tag_key = tk_call_without_enc('::stooop::new', 'canvasLabel', - @c, x, y, width, height, + @tag_key = tk_call_without_enc('::stooop::new', 'canvasLabel', + @c, x, y, width, height, *hash_kv(keys, true)) else - @tag_key = tk_call_without_enc('::stooop::new', 'canvasLabel', + @tag_key = tk_call_without_enc('::stooop::new', 'canvasLabel', @c, x, y, width, height) end diff --git a/ext/tk/lib/tkextlib/tcllib/tooltip.rb b/ext/tk/lib/tkextlib/tcllib/tooltip.rb index 4301b39fd3..73b7df0c22 100644 --- a/ext/tk/lib/tkextlib/tcllib/tooltip.rb +++ b/ext/tk/lib/tkextlib/tcllib/tooltip.rb @@ -3,7 +3,7 @@ # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # # * Part of tcllib extension -# * Provides tooltips, a small text message that is displayed when the +# * Provides tooltips, a small text message that is displayed when the # mouse hovers over a widget. # |