From 548b5143db2c3d701520671ef1413cf3c39fcedf Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 12 Jun 2000 07:48:31 +0000 Subject: 2000-06-12 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/extmk.rb.in | 4 +- ext/tk/lib/tk.rb | 205 +++++++++++++++++++++++++++++++++++++++++++++++-- ext/tk/lib/tkcanvas.rb | 107 ++++++++++++++++++++++---- ext/tk/lib/tkentry.rb | 8 ++ ext/tk/lib/tkfont.rb | 14 ++-- 5 files changed, 304 insertions(+), 34 deletions(-) (limited to 'ext') diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 44232da7a1..c97f86a687 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -425,10 +425,12 @@ all: $(DLLIB) clean:; @$(RM) *.#{$OBJEXT} *.so *.sl *.#{$LIBEXT} $(DLLIB) @$(RM) *.ilk *.exp *.pdb *.bak + +distclean: clean @$(RM) Makefile extconf.h conftest.* @$(RM) core ruby$(EXEEXT) *~ -realclean: clean +realclean: distclean EOS mfile.printf <val}) + else + tk_call 'itemconfigure', index, "-#{key}", val + end + end + end + + def itemconfiginfo(index, key=nil) + if key + conf = tk_split_list(tk_send('itemconfigure',index,"-#{key}")) + conf[0] = conf[0][1..-1] + conf + else + tk_split_list(tk_send('itemconfigure', index)).collect{|conf| + conf[0] = conf[0][1..-1] + conf + } + end + end end module TkTreatMenuEntryFont @@ -2397,6 +2490,9 @@ class TkMenu@variable, + 'label'=>value, 'value'=>value) + end + def index(index) + @menu.index(index) + end + def invoke(index) + @menu.invoke(index) + end + def insert(index, value) + @menu.add(index, 'radiobutton', 'variable'=>@variable, + 'label'=>value, 'value'=>value) + end + def delete(index, last=None) + @menu.delete(index, last) + end + def yposition(index) + @menu.yposition(index) + end + def menucget(index, key) + @menu.cget(index, key) + end + def menuconfigure(index, key, val=None) + @menu.configure(index, key, val) + end + def menuconfiginfo(index, key=nil) + @menu.configinfo(index, key) + end + def entrycget(index, key) + @menu.entrycget(index, key) + end + def entryconfigure(index, key, val=None) + @menu.entryconfigure(index, key, val) + end + def entryconfiginfo(index, key=nil) + @menu.entryconfiginfo(index, key) + end +end + module TkComposite include Tk extend Tk diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb index 914bfe01e3..5f4bdadaee 100644 --- a/ext/tk/lib/tkcanvas.rb +++ b/ext/tk/lib/tkcanvas.rb @@ -217,7 +217,7 @@ class TkCanvas "(t1)&&(t2)" + # ltag = tag1 | tag2; ltag.path => "(t1)||(t2)" + # ltag = tag1 ^ tag2; ltag.path => "(t1)^(t2)" + # ltag = - tag1; ltag.path => "!(t1)" + def & (tag) + if tag.kind_of? TkObject + TkcTagString.new(@c, '(' + @id + ')&&(' + tag.path + ')') + else + TkcTagString.new(@c, '(' + @id + ')&&(' + tag.to_s + ')') + end + end + + def | (tag) + if tag.kind_of? TkObject + TkcTagString.new(@c, '(' + @id + ')||(' + tag.path + ')') + else + TkcTagString.new(@c, '(' + @id + ')||(' + tag.to_s + ')') + end + end + + def ^ (tag) + if tag.kind_of? TkObject + TkcTagString.new(@c, '(' + @id + ')^(' + tag.path + ')') + else + TkcTagString.new(@c, '(' + @id + ')^(' + tag.to_s + ')') + end + end + + def -@ + TkcTagString.new(@c, '!(' + @id + ')') + end end class TkcTag