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 | 34933a63140256304caa6f1009098b26127a36c2 (patch) | |
| tree | 6c121bf51ead591584872b4674497d233f7b37b5 /ext/tk | |
| parent | f717db5fc8c0f087832baa1b11056938d68f702c (diff) | |
| download | ruby-34933a63140256304caa6f1009098b26127a36c2.tar.gz ruby-34933a63140256304caa6f1009098b26127a36c2.tar.xz ruby-34933a63140256304caa6f1009098b26127a36c2.zip | |
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: http://svn.ruby-lang.org/repos/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 9cdd3b918..e5d1c6f63 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 109afad92..8ab57d806 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 |
