summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkextlib/blt/component.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/blt/component.rb')
-rw-r--r--ext/tk/lib/tkextlib/blt/component.rb92
1 files changed, 46 insertions, 46 deletions
diff --git a/ext/tk/lib/tkextlib/blt/component.rb b/ext/tk/lib/tkextlib/blt/component.rb
index b2005b2f2b..74cbcb56ae 100644
--- a/ext/tk/lib/tkextlib/blt/component.rb
+++ b/ext/tk/lib/tkextlib/blt/component.rb
@@ -22,15 +22,15 @@ module Tk::BLT
private :__item_numstrval_optkeys
def __item_boolval_optkeys(id)
- ['hide', 'under', 'descending', 'logscale', 'loose', 'showticks',
- 'titlealternate', 'scalesymbols', 'minor', 'raised',
+ ['hide', 'under', 'descending', 'logscale', 'loose', 'showticks',
+ 'titlealternate', 'scalesymbols', 'minor', 'raised',
'center', 'decoration', 'landscape', 'maxpect']
end
private :__item_boolval_optkeys
def __item_strval_optkeys(id)
- ['text', 'label', 'limits', 'title',
- 'show', 'file', 'maskdata', 'maskfile',
+ ['text', 'label', 'limits', 'title',
+ 'show', 'file', 'maskdata', 'maskfile',
'color', 'titlecolor', 'fill', 'outline', 'offdash']
end
private :__item_strval_optkeys
@@ -94,7 +94,7 @@ module Tk::BLT
value = None
slot = _symbolkey2str(slot)
if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
+ slot['command'] = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
@@ -103,7 +103,7 @@ module Tk::BLT
slot = args.pop
if slot == :command || slot == 'command'
cmd = value
- value = proc{|w, tick|
+ value = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
@@ -520,7 +520,7 @@ module Tk::BLT
def name
@axis
end
-
+
def transform(val)
@chart.axis_transform(@id, val)
end
@@ -1221,7 +1221,7 @@ module Tk::BLT
fail RuntimeError, "#{self} is an abstract class"
end
args, fontkeys = _parse_create_args(keys)
- idnum = tk_call_without_enc(chart.path, 'marker', 'create',
+ idnum = tk_call_without_enc(chart.path, 'marker', 'create',
self::MarkerTypeName, *args)
chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
idnum.to_i # 'item id' is an integer number
@@ -1229,7 +1229,7 @@ module Tk::BLT
def self.create_type(chart, type, keys={})
args, fontkeys = _parse_create_args(keys)
- idnum = tk_call_without_enc(chart.path, 'marker', 'create',
+ idnum = tk_call_without_enc(chart.path, 'marker', 'create',
type, *args)
chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
id = idnum.to_i # 'item id' is an integer number
@@ -1486,7 +1486,7 @@ module Tk::BLT
list(tk_send('axis', 'limits', tagid(id)))
end
def axis_names(*pats)
- simplelist(tk_send('axis', 'names',
+ simplelist(tk_send('axis', 'names',
*(pats.collect{|pat| tagid(pat)}))).collect{|axis|
Tk::BLT::PlotComponent::Axis.id2obj(self, axis)
}
@@ -1500,11 +1500,11 @@ module Tk::BLT
end
def axis_use(id, target=nil)
if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('axis', 'use',
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
+ tk_send('axis', 'use',
tagid(id), tagid(target)))
else
- Tk::BLT::PlotComponent::Axis.id2obj(self,
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
tk_send('axis', 'use', tagid(id)))
end
end
@@ -1544,10 +1544,10 @@ module Tk::BLT
def element_closest(x, y, var, *args)
if args[-1].kind_of?(Hash)
keys = args.pop
- bool(tk_send('element', 'closest', x, y, var,
+ bool(tk_send('element', 'closest', x, y, var,
*(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
else
- bool(tk_send('element', 'closest', x, y, var,
+ bool(tk_send('element', 'closest', x, y, var,
*(args.collect{|id| tagid(id)})))
end
end
@@ -1563,7 +1563,7 @@ module Tk::BLT
bool(tk_send('element', 'exists', tagid(id)))
end
def element_names(*pats)
- simplelist(tk_send('element', 'names',
+ simplelist(tk_send('element', 'names',
*(pats.collect{|pat| tagid(pat)}))).collect{|elem|
Tk::BLT::PlotComponent::Element.id2obj(self, elem)
}
@@ -1601,10 +1601,10 @@ module Tk::BLT
def bar_closest(x, y, var, *args)
if args[-1].kind_of?(Hash)
keys = args.pop
- bool(tk_send('bar', 'closest', x, y, var,
+ bool(tk_send('bar', 'closest', x, y, var,
*(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
else
- bool(tk_send('bar', 'closest', x, y, var,
+ bool(tk_send('bar', 'closest', x, y, var,
*(args.collect{|id| tagid(id)})))
end
end
@@ -1620,7 +1620,7 @@ module Tk::BLT
bool(tk_send('bar', 'exists', tagid(id)))
end
def bar_names(*pats)
- simplelist(tk_send('bar', 'names',
+ simplelist(tk_send('bar', 'names',
*(pats.collect{|pat| tagid(pat)}))).collect{|elem|
Tk::BLT::PlotComponent::Element.id2obj(self, elem)
}
@@ -1658,10 +1658,10 @@ module Tk::BLT
def line_closest(x, y, var, *args)
if args[-1].kind_of?(Hash)
keys = args.pop
- bool(tk_send('line', 'closest', x, y, var,
+ bool(tk_send('line', 'closest', x, y, var,
*(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
else
- bool(tk_send('line', 'closest', x, y, var,
+ bool(tk_send('line', 'closest', x, y, var,
*(args.collect{|id| tagid(id)})))
end
end
@@ -1677,7 +1677,7 @@ module Tk::BLT
bool(tk_send('line', 'exists', tagid(id)))
end
def line_names(*pats)
- simplelist(tk_send('line', 'names',
+ simplelist(tk_send('line', 'names',
*(pats.collect{|pat| tagid(pat)}))).collect{|elem|
Tk::BLT::PlotComponent::Element.id2obj(self, elem)
}
@@ -1723,7 +1723,7 @@ module Tk::BLT
keys.delete('without_creating')
end
- legend = self.class.new(parent, :without_creating=>true,
+ legend = self.class.new(parent, :without_creating=>true,
:widgetname=>widgetname)
class << legend
def __destroy_hook__
@@ -1740,24 +1740,24 @@ module Tk::BLT
end
def legend_activate(*pats)
- list(tk_send('legend', 'activate',
+ list(tk_send('legend', 'activate',
*(pats.collect{|pat| tagid(pat)}))).collect{|elem|
Tk::BLT::PlotComponent::Element.id2obj(self, elem)
}
end
def legend_deactivate(*pats)
- list(tk_send('legend', 'deactivate',
+ list(tk_send('legend', 'deactivate',
*(pats.collect{|pat| tagid(pat)}))).collect{|elem|
Tk::BLT::PlotComponent::Element.id2obj(self, elem)
}
end
def legend_get(pos, y=nil)
if y
- Tk::BLT::PlotComponent::Element.id2obj(self,
- tk_send('legend', 'get',
+ Tk::BLT::PlotComponent::Element.id2obj(self,
+ tk_send('legend', 'get',
_at(pos, y)))
else
- Tk::BLT::PlotComponent::Element.id2obj(self,
+ Tk::BLT::PlotComponent::Element.id2obj(self,
tk_send('legend', 'get', pos))
end
end
@@ -1773,7 +1773,7 @@ module Tk::BLT
self
end
def pen_names(*pats)
- simplelist(tk_send('pen', 'names',
+ simplelist(tk_send('pen', 'names',
*(pats.collect{|pat| tagid(pat)}))).collect{|pen|
Tk::BLT::PlotComponent::Pen.id2obj(self, pen)
}
@@ -1843,7 +1843,7 @@ module Tk::BLT
bool(tk_send('marker', 'exists', tagid(id)))
end
def marker_names(*pats)
- simplelist(tk_send('marker', 'names',
+ simplelist(tk_send('marker', 'names',
*(pats.collect{|pat| tagid(pat)}))).collect{|id|
Tk::BLT::PlotComponent::Marker.id2obj(self, id)
}
@@ -1864,13 +1864,13 @@ module Tk::BLT
if slot.kind_of?(Hash)
slot = _symbolkey2str(slot)
if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
+ slot['command'] = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
elsif slot == :command || slot == 'command'
cmd = value
- value = proc{|w, tick|
+ value = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
@@ -1918,8 +1918,8 @@ module Tk::BLT
end
def xaxis_use(target=nil)
if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('xaxis', 'use',
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
+ tk_send('xaxis', 'use',
tagid(target)))
else
Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('xaxis', 'use'))
@@ -1936,13 +1936,13 @@ module Tk::BLT
if slot.kind_of?(Hash)
slot = _symbolkey2str(slot)
if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
+ slot['command'] = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
elsif slot == :command || slot == 'command'
cmd = value
- value = proc{|w, tick|
+ value = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
@@ -1990,8 +1990,8 @@ module Tk::BLT
end
def x2axis_use(target=nil)
if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('x2axis', 'use',
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
+ tk_send('x2axis', 'use',
tagid(target)))
else
Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('x2axis', 'use'))
@@ -2008,13 +2008,13 @@ module Tk::BLT
if slot.kind_of?(Hash)
slot = _symbolkey2str(slot)
if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
+ slot['command'] = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
elsif slot == :command || slot == 'command'
cmd = value
- value = proc{|w, tick|
+ value = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
@@ -2062,8 +2062,8 @@ module Tk::BLT
end
def yaxis_use(target=nil)
if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('yaxis', 'use',
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
+ tk_send('yaxis', 'use',
tagid(target)))
else
Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('yaxis', 'use'))
@@ -2080,13 +2080,13 @@ module Tk::BLT
if slot.kind_of?(Hash)
slot = _symbolkey2str(slot)
if cmd = slot.delete('command')
- slot['command'] = proc{|w, tick|
+ slot['command'] = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
elsif slot == :command || slot == 'command'
cmd = value
- value = proc{|w, tick|
+ value = proc{|w, tick|
cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
}
end
@@ -2134,8 +2134,8 @@ module Tk::BLT
end
def y2axis_use(target=nil)
if target
- Tk::BLT::PlotComponent::Axis.id2obj(self,
- tk_send('y2axis', 'use',
+ Tk::BLT::PlotComponent::Axis.id2obj(self,
+ tk_send('y2axis', 'use',
tagid(target)))
else
Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('y2axis', 'use'))