Home | History | Annotate | Download | only in lib-tk

Lines Matching refs:item

519         """Create an invisible polygon item on canvas self.cv)
549 """Create an invisible line item on canvas self.cv)
577 def _delete(self, item):
578 """Delete graphics item from canvas.
579 If item is"all" delete all graphics items.
581 self.cv.delete(item)
614 Return text item and x-coord of right bottom corner
620 item = self.cv.create_text(x-1, -y, text = txt, anchor = anchor[align],
622 x0, y0, x1, y1 = self.cv.bbox(item)
624 return item, x1-1
629 def _onclick(self, item, fun, num=1, add=None):
636 self.cv.tag_unbind(item, "<Button-%s>" % num)
642 self.cv.tag_bind(item, "<Button-%s>" % num, eventfun, add)
644 def _onrelease(self, item, fun, num=1, add=None):
654 self.cv.tag_unbind(item, "<Button%s-ButtonRelease>" % num)
660 self.cv.tag_bind(item, "<Button%s-ButtonRelease>" % num,
663 def _ondrag(self, item, fun, num=1, add=None):
673 self.cv.tag_unbind(item, "<Button%s-Motion>" % num)
682 self.cv.tag_bind(item, "<Button%s-Motion>" % num, eventfun, add)
727 """Create and return image item on canvas.
731 def _drawimage(self, item, (x, y), image):
732 """Configure image item as to draw image object
735 self.cv.coords(item, (x * self.xscale, -y * self.yscale))
736 self.cv.itemconfig(item, image=image)
738 def _setbgpic(self, item, image):
739 """Configure image item as to draw image object
740 at center of canvas. Set item to the first item
742 any other item ."""
743 self.cv.itemconfig(item, image=image)
744 self.cv.tag_lower(item)
746 def _type(self, item):
748 type of item.
750 return self.cv.type(item)
752 def _pointlist(self, item):
753 """returns list of coordinate-pairs of points of item
760 cl = self.cv.coords(item)
769 for item in items:
770 coordinates = self.cv.coords(item)
777 self.cv.coords(item, *newcoordlist)
887 def push(self, item):
891 self.buffer[self.ptr] = item
893 self.buffer[self.ptr].append(item)
896 item = self.buffer[self.ptr]
897 if item is None:
902 return (item)
2404 for item in self._item:
2405 screen._delete(item)
2412 self._item = [screen._createpoly() for item in
2523 for item in self.items:
2524 self.screen._delete(item)
2651 q.turtle._item = [screen._createpoly() for item in
2831 for item
2834 screen._drawpoly(item, poly, fill=self._cc(fc),
2845 for item in titem:
2846 screen._drawpoly(item, ((0, 0), (0, 0), (0, 0)), "", "")
2897 item = screen._createpoly()
2898 stitem.append(item)
2902 for item, (poly, fc, oc) in zip(stitem, tshape):
2905 screen._drawpoly(item, poly, fill=self._cc(fc),
2923 item = ("stamp", stampid)
2925 if item not in buf.buffer:
2927 index = buf.buffer.index(item)
2928 buf.buffer.remove(item)
2972 for item in toDelete:
2973 self._clearstamp(item)
3113 """Closes current line item and starts a new one.
3244 item = self.screen._dot(self._position, size, color)
3245 #print "dot:", size, color, "item:", item
3246 self.items.append(item)
3248 self.undobuffer.push(("dot", item))
3269 item, end = self.screen._write(self._position, txt, align, font,
3271 self.items.append(item)
3273 self.undobuffer.push(("wri", item))
3496 item = data[0]
3497 self.screen._delete(item)
3498 self.items.remove(item)
3500 item = data[0]
3501 self.screen._drawpoly(item, ((0, 0),(0, 0),(0, 0)),
3504 item = data[0]
3506 self.screen._delete(item)
3507 self.items.remove(item)
3531 item = self.undobuffer.pop()
3532 action = item[0]
3533 data = item[1:]
3536 item = data.pop()
3537 self._undo(item[0], item[1:])