diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-25 15:13:14 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-25 15:13:14 +0000 |
commit | d0233291bc8a5068e52c69c210e5979e5324b5bc (patch) | |
tree | 7d9459449c33792c63eeb7baa071e76352e0baab /trunk/ext/tk/lib/tk/selection.rb | |
parent | 0dc342de848a642ecce8db697b8fecd83a63e117 (diff) | |
parent | 72eaacaa15256ab95c3b52ea386f88586fb9da40 (diff) |
re-adding tag v1_9_0_4 as an alias of trunk@18848v1_9_0_4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'trunk/ext/tk/lib/tk/selection.rb')
-rw-r--r-- | trunk/ext/tk/lib/tk/selection.rb | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/trunk/ext/tk/lib/tk/selection.rb b/trunk/ext/tk/lib/tk/selection.rb deleted file mode 100644 index 5caa6ef8ef..0000000000 --- a/trunk/ext/tk/lib/tk/selection.rb +++ /dev/null @@ -1,86 +0,0 @@ -# -# tk/selection.rb : control selection -# -require 'tk' - -module TkSelection - include Tk - extend Tk - - TkCommandNames = ['selection'.freeze].freeze - - def self.clear(sel=nil) - if sel - tk_call_without_enc('selection', 'clear', '-selection', sel) - else - tk_call_without_enc('selection', 'clear') - end - end - def self.clear_on_display(win, sel=nil) - if sel - tk_call_without_enc('selection', 'clear', - '-displayof', win, '-selection', sel) - else - tk_call_without_enc('selection', 'clear', '-displayof', win) - end - end - def clear(sel=nil) - TkSelection.clear_on_display(self, sel) - self - end - - def self.get(keys=nil) - #tk_call('selection', 'get', *hash_kv(keys)) - _fromUTF8(tk_call_without_enc('selection', 'get', *hash_kv(keys))) - end - def self.get_on_display(win, keys=nil) - #tk_call('selection', 'get', '-displayof', win, *hash_kv(keys)) - _fromUTF8(tk_call_without_enc('selection', 'get', '-displayof', - win, *hash_kv(keys))) - end - def get(keys=nil) - TkSelection.get_on_display(self, sel) - end - - def self.handle(win, func=Proc.new, keys=nil, &b) - if func.kind_of?(Hash) && keys == nil - keys = func - func = Proc.new(&b) - end - args = ['selection', 'handle'] - args.concat(hash_kv(keys)) - args.concat([win, func]) - tk_call_without_enc(*args) - end - def handle(func=Proc.new, keys=nil, &b) - TkSelection.handle(self, func, keys, &b) - end - - def self.get_owner(sel=nil) - if sel - window(tk_call_without_enc('selection', 'own', '-selection', sel)) - else - window(tk_call_without_enc('selection', 'own')) - end - end - def self.get_owner_on_display(win, sel=nil) - if sel - window(tk_call_without_enc('selection', 'own', - '-displayof', win, '-selection', sel)) - else - window(tk_call_without_enc('selection', 'own', '-displayof', win)) - end - end - def get_owner(sel=nil) - TkSelection.get_owner_on_display(self, sel) - self - end - - def self.set_owner(win, keys=nil) - tk_call_without_enc('selection', 'own', *(hash_kv(keys) << win)) - end - def set_owner(keys=nil) - TkSelection.set_owner(self, keys) - self - end -end |