diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-14 15:59:18 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-14 15:59:18 +0000 |
commit | 72113d58cd2fc62b3f4ef3d2eb6cec37393532a4 (patch) | |
tree | 534843caaea28f1171378c1ac5bea0184ed04054 /ruby_2_2/ext/tk/lib/tkextlib/blt/htext.rb | |
parent | 1a74fa4b04da04bd2bb33103dd3cf431438df38e (diff) | |
parent | 02b8978ff10b05304dbb46d73b49a2cf3a87cb92 (diff) |
add tag v2_2_9v2_2_9
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v2_2_9@61259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby_2_2/ext/tk/lib/tkextlib/blt/htext.rb')
-rw-r--r-- | ruby_2_2/ext/tk/lib/tkextlib/blt/htext.rb | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/ruby_2_2/ext/tk/lib/tkextlib/blt/htext.rb b/ruby_2_2/ext/tk/lib/tkextlib/blt/htext.rb deleted file mode 100644 index 878bd9982d..0000000000 --- a/ruby_2_2/ext/tk/lib/tkextlib/blt/htext.rb +++ /dev/null @@ -1,112 +0,0 @@ -# -# tkextlib/blt/htext.rb -# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) -# - -require 'tk' -require 'tk/itemconfig.rb' -require 'tkextlib/blt.rb' - -module Tk::BLT - class Htext<TkWindow - Htext_Var = TkVarAccess.new_hash('htext') - Htext_Widget = TkVarAccess.new('htext(widget)', :window) - Htext_File = TkVarAccess.new('htext(file)') - Htext_Line = TkVarAccess.new('htext(line)') - - include TkItemConfigMethod - include Scrollable - - TkCommandNames = ['::blt::htext'.freeze].freeze - WidgetClassName = 'Htext'.freeze - WidgetClassNames[WidgetClassName] ||= self - - alias window_cget_tkstring itemcget_tkstring - alias window_cget itemcget - alias window_cget_strict itemcget_strict - alias window_configure itemconfigure - alias window_configuinfo itemconfiginfo - alias current_window_configuinfo current_itemconfiginfo - - def __strval_optkeys - super() << 'filename' - end - private :__strval_optkeys - - def append(win, keys={}) - tk_send('append', _epath(win), keys) - self - end - - def goto_line(idx) - tk_send_without_enc('gotoline', idx) - self - end - def current_line - number(tk_send_without_enc('gotoline')) - end - - def index(str) - number(tk_send('index', str)) - end - - def line_pos(str) - tk_send('linepos', str) - end - - def range(from=None, to=None) - tk_send_without_enc('range', from, to) - end - - def scan_mark(pos) - tk_send_without_enc('scan', 'mark', pos) - self - end - - def scan_dragto(pos) - tk_send_without_enc('scan', 'dragto', pos) - self - end - - def search(pat, from=None, to=None) - num = number(tk_send('search', pat, from, to)) - (num < 0)? nil: num - end - - def selection_adjust(index) - tk_send_without_enc('selection', 'adjust', index) - self - end - def selection_clear() - tk_send_without_enc('selection', 'clear') - self - end - def selection_from(index) - tk_send_without_enc('selection', 'from', index) - self - end - def selection_line(index) - tk_send_without_enc('selection', 'line', index) - self - end - def selection_present() - bool(tk_send_without_enc('selection', 'present')) - end - def selection_range(first, last) - tk_send_without_enc('selection', 'range', first, last) - self - end - def selection_to(index) - tk_send_without_enc('selection', 'to', index) - self - end - def selection_word(index) - tk_send_without_enc('selection', 'word', index) - self - end - - def windows(pat=None) - list(tk_send('windows', pat)) - end - end -end |