Module TkcTagAccess
In: tk/canvastag.rb

Methods

&   -@   ^   addtag   bbox   bind   bind_append   bind_remove   bindinfo   cget   configinfo   configure   coords   current_configinfo   dchars   deltag   dtag   find   focus   gettags   icursor   index   insert   itemtype   list   lower   move   raise   scale   select_adjust   select_from   select_to   |  

Included Modules

Public Instance methods

Following operators support logical expressions of canvas tags (for Tk8.3+). If tag1.path is ‘t1’ and tag2.path is ‘t2’, then

     ltag = tag1 & tag2; ltag.path => "(t1)&&(t2)"
     ltag = tag1 | tag2; ltag.path => "(t1)||(t2)"
     ltag = tag1 ^ tag2; ltag.path => "(t1)^(t2)"
     ltag = - tag1;      ltag.path => "!(t1)"

[Source]

     # File tk/canvastag.rb, line 169
169:   def & (tag)
170:     if tag.kind_of? TkObject
171:       TkcTagString.new(@c, '(' + @id + ')&&(' + tag.path + ')')
172:     else
173:       TkcTagString.new(@c, '(' + @id + ')&&(' + tag.to_s + ')')
174:     end
175:   end

[Source]

     # File tk/canvastag.rb, line 193
193:   def -@
194:     TkcTagString.new(@c, '!(' + @id + ')')
195:   end

[Source]

     # File tk/canvastag.rb, line 185
185:   def ^ (tag)
186:     if tag.kind_of? TkObject
187:       TkcTagString.new(@c, '(' + @id + ')^(' + tag.path + ')')
188:     else
189:       TkcTagString.new(@c, '(' + @id + ')^(' + tag.to_s + ')')
190:     end
191:   end

[Source]

    # File tk/canvastag.rb, line 15
15:   def addtag(tag)
16:     @c.addtag(tag, 'withtag', @id)
17:     self
18:   end

[Source]

    # File tk/canvastag.rb, line 20
20:   def bbox
21:     @c.bbox(@id)
22:   end

def bind(seq, cmd=Proc.new, *args)

  @c.itembind(@id, seq, cmd, *args)
  self

end

[Source]

    # File tk/canvastag.rb, line 28
28:   def bind(seq, *args)
29:     # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
30:     if TkComm._callback_entry?(args[0]) || !block_given?
31:       cmd = args.shift
32:     else
33:       cmd = Proc.new
34:     end
35:     @c.itembind(@id, seq, cmd, *args)
36:     self
37:   end

def bind_append(seq, cmd=Proc.new, *args)

  @c.itembind_append(@id, seq, cmd, *args)
  self

end

[Source]

    # File tk/canvastag.rb, line 43
43:   def bind_append(seq, *args)
44:     # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
45:     if TkComm._callback_entry?(args[0]) || !block_given?
46:       cmd = args.shift
47:     else
48:       cmd = Proc.new
49:     end
50:     @c.itembind_append(@id, seq, cmd, *args)
51:     self
52:   end

[Source]

    # File tk/canvastag.rb, line 54
54:   def bind_remove(seq)
55:     @c.itembind_remove(@id, seq)
56:     self
57:   end

[Source]

    # File tk/canvastag.rb, line 59
59:   def bindinfo(seq=nil)
60:     @c.itembindinfo(@id, seq)
61:   end

[Source]

    # File tk/canvastag.rb, line 63
63:   def cget(option)
64:     @c.itemcget(@id, option)
65:   end

def configure(keys)

  @c.itemconfigure @id, keys

end

[Source]

    # File tk/canvastag.rb, line 75
75:   def configinfo(key=nil)
76:     @c.itemconfiginfo(@id, key)
77:   end

[Source]

    # File tk/canvastag.rb, line 67
67:   def configure(key, value=None)
68:     @c.itemconfigure(@id, key, value)
69:     self
70:   end

[Source]

    # File tk/canvastag.rb, line 83
83:   def coords(*args)
84:     @c.coords(@id, *args)
85:   end

[Source]

    # File tk/canvastag.rb, line 79
79:   def current_configinfo(key=nil)
80:     @c.current_itemconfiginfo(@id, key)
81:   end

[Source]

    # File tk/canvastag.rb, line 87
87:   def dchars(first, last=None)
88:     @c.dchars(@id, first, last)
89:     self
90:   end
deltag(tag_to_del=None)

Alias for dtag

[Source]

    # File tk/canvastag.rb, line 92
92:   def dtag(tag_to_del=None)
93:     @c.dtag(@id, tag_to_del)
94:     self
95:   end

[Source]

     # File tk/canvastag.rb, line 98
 98:   def find
 99:     @c.find('withtag', @id)
100:   end

[Source]

     # File tk/canvastag.rb, line 103
103:   def focus
104:     @c.itemfocus(@id)
105:   end

[Source]

     # File tk/canvastag.rb, line 107
107:   def gettags
108:     @c.gettags(@id)
109:   end

[Source]

     # File tk/canvastag.rb, line 111
111:   def icursor(index)
112:     @c.icursor(@id, index)
113:     self
114:   end

[Source]

     # File tk/canvastag.rb, line 116
116:   def index(idx)
117:     @c.index(@id, idx)
118:   end

[Source]

     # File tk/canvastag.rb, line 120
120:   def insert(beforethis, string)
121:     @c.insert(@id, beforethis, string)
122:     self
123:   end

[Source]

     # File tk/canvastag.rb, line 158
158:   def itemtype
159:     @c.itemtype(@id)
160:   end
list()

Alias for find

[Source]

     # File tk/canvastag.rb, line 125
125:   def lower(belowthis=None)
126:     @c.lower(@id, belowthis)
127:     self
128:   end

[Source]

     # File tk/canvastag.rb, line 130
130:   def move(xamount, yamount)
131:     @c.move(@id, xamount, yamount)
132:     self
133:   end

[Source]

     # File tk/canvastag.rb, line 135
135:   def raise(abovethis=None)
136:     @c.raise(@id, abovethis)
137:     self
138:   end

[Source]

     # File tk/canvastag.rb, line 140
140:   def scale(xorigin, yorigin, xscale, yscale)
141:     @c.scale(@id, xorigin, yorigin, xscale, yscale)
142:     self
143:   end

[Source]

     # File tk/canvastag.rb, line 145
145:   def select_adjust(index)
146:     @c.select('adjust', @id, index)
147:     self
148:   end

[Source]

     # File tk/canvastag.rb, line 149
149:   def select_from(index)
150:     @c.select('from', @id, index)
151:     self
152:   end

[Source]

     # File tk/canvastag.rb, line 153
153:   def select_to(index)
154:     @c.select('to', @id, index)
155:     self
156:   end

[Source]

     # File tk/canvastag.rb, line 177
177:   def | (tag)
178:     if tag.kind_of? TkObject
179:       TkcTagString.new(@c, '(' + @id + ')||(' + tag.path + ')')
180:     else
181:       TkcTagString.new(@c, '(' + @id + ')||(' + tag.to_s + ')')
182:     end
183:   end

Search

Google

Ruby API Docs

Links