diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-05 14:00:11 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-05 14:00:11 +0000 |
commit | ea03c3fc2c0bfcf6351c3bce9496fd4607f4594a (patch) | |
tree | 6c121bf51ead591584872b4674497d233f7b37b5 /ext/tk | |
parent | 4dada1c8a20c0fab0e058d7cd934c1c011617049 (diff) |
configure.in, eval.c, signal.c: : add '--with-pthread-ext' option
to fix the pthread trouble on 'tcltklib'
ext/tcltklib/README.1st: add the description of '--with-pthread-ext'
ext/tk/lib/tktext.rb : add TkText#text_copy, text_cut, text_paste to
support Tcl/Tk8.4's tk_textCopy, tk_textCut, tk_textPaste
ext/tk/lib/tk.rb : add TkMenu#set_focus support Tcl/Tk's tk_menuSetFocus
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk')
-rw-r--r-- | ext/tk/lib/tk.rb | 7 | ||||
-rw-r--r-- | ext/tk/lib/tktext.rb | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 9cdd3b918e..e5d1c6f63b 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -4289,6 +4289,10 @@ class TkWindow<TkObject self end + def caret(keys=nil) + TkXIM.caret(path, keys) + end + def destroy super children = [] @@ -5400,6 +5404,9 @@ class TkMenu<TkWindow configure_cmd 'postcommand', cmd self end + def set_focus + tk_call('tk_menuSetFocus', path) + end def tearoffcommand(cmd=Proc.new) configure_cmd 'tearoffcommand', cmd self diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb index 109afad924..8ab57d8065 100644 --- a/ext/tk/lib/tktext.rb +++ b/ext/tk/lib/tktext.rb @@ -284,6 +284,21 @@ class TkText<TkTextWin self end + def text_copy + # Tk8.4 feature + tk_call('tk_textCopy', @path) + end + + def text_cut + # Tk8.4 feature + tk_call('tk_textCut', @path) + end + + def text_paste + # Tk8.4 feature + tk_call('tk_textPaste', @path) + end + def tag_add(tag, index1, index2=None) tk_send 'tag', 'add', tag, index1, index2 self |