UML diagrams for Python
Lumpy generates UML diagrams (currently object and class diagrams) from a running Python program. It is similar to a graphical debugger in the sense that it generates a visualization of the state of a running program, but it is different from a debugger in the sense that it tries to generate high-level visualizations that are compliant (at least in spirit) with standard UML.
There are three target audiences for this module: teachers, students and software engineers. Teachers can use Lumpy to generate figures that demonstrate a model of the execution of a Python program. Students can use Lumpy to explore the behavior of the Python interpreter. Software engineers can use Lumpy to extract the structure of existing programs by diagramming the relationships among the classes, including classes defined in libraries and the Python interpreter.
Copyright 2005 Allen B. Downey
This file contains wrapper classes I use with tkinter. It is mostly for my own use; I don’t support it, and it is not very well documented.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses/gpl.html or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Bases: scitools.Lumpy.Thing
the graphical representation of the binding between a key and a value.
Methods
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
draw_key(diag, p, flip, tags) | draw a reference to a previously-drawn key rather |
drawme(diag, pos, flip[, tags]) | |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
rebind(val) | |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
return the bounding box of this object if it is drawn
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
draw a reference to a previously-drawn key rather than drawing the key inside the mapping.
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Instance
a graphical representation of a Class. It inherits from Instance, which controls how a Class appears in an object diagram, and contains a ClassDiagramClass, which controls how the Class appears in a class diagram.
Methods
add_child(child) | when a subclass is created, it notifies its parent |
add_hasa(child[, n]) | increment the number of references we have found |
add_ivar(var) | add to the set of instance variables for this class |
bbox() | the bbox of a Mapping is the bbox of its box item. |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | drawme is the middle part of the way objects are drawn. |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
scan_bindings(cls) | scan the bindings in this Instance, looking for |
scan_val(cls, val) | if we find a reference to an object type, make a note |
set_depth() | compute the maximum depth between this class and |
set_height() | compute the maximum height between this class and |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
when a subclass is created, it notifies its parent classes, who update their list of children
increment the number of references we have found from this class to the given child class
the bbox of a Mapping is the bbox of its box item. This is different from other Things.
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
drawme is the middle part of the way objects are drawn. Thing.draw does some prep work, invokes drawme, and then does some cleanup. draw and drawme are not allowed to modify pos.
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
scan the bindings in this Instance, looking for references to other object types; also, make a note of the names of the instance variables. cls is the Class object this instance belongs to.
if we find a reference to an object type, make a note of the HAS-A relationship. If we find a reference to a container type, scan it for references.
compute the maximum depth between this class and a root class (one with no parents)
compute the maximum height between this class and a leaf class (one with no children)
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Diagram
Methods
add_arrow(arrow) | append a new arrow on the list |
ca(*args, **options) | make a canvas for the diagram |
close() | close the window and exit |
draw() | draw the class diagram, including the classes in self.classes, |
draw_arrows() | draw all the arrows on the list |
draw_classes(classes, pos[, tags]) | draw this list of classes and all their subclasses, |
printfile() | dump the contents of the canvas to the filename in the |
setup() | create the gui for the diagram |
update_arrows([n]) | update up to n arrows (or all of them is n==None) |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
append a new arrow on the list
make a canvas for the diagram
close the window and exit
draw the class diagram, including the classes in self.classes, or if there are none, then all the classes Lumpy has seen.
draw all the arrows on the list
draw this list of classes and all their subclasses, starting at the given position. Return a list of all classes drawn.
dump the contents of the canvas to the filename in the filename entry.
create the gui for the diagram
update up to n arrows (or all of them is n==None)
Bases: scitools.Lumpy.Thing
a graphical representation of a Class as it appears in a Class Diagram (which is different from the way class objects appear in Object Diagrams).
Methods
arrow_head(diag, bbox, tags[, size]) | draw the hollow arrow head that connects this class |
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
draw the hollow arrow head that connects this class to its children.
return the bounding box of this object if it is drawn
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Thing
a contains arrow, which shows a has-a relationship between classes in a class diagram.
Methods
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag) | |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
update() |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
return the bounding box of this object if it is drawn
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools._Gui.GuiCanvas
a Canvas for displaying Diagrams
Methods
add_transform(transform[, index]) | add the given transform at the given index in the |
addtag(*args) | Internal function. |
addtag_above(newtag, tagOrId) | Add tag NEWTAG to all items above TAGORID. |
addtag_all(newtag) | Add tag NEWTAG to all items. |
addtag_below(newtag, tagOrId) | Add tag NEWTAG to all items below TAGORID. |
addtag_closest(newtag, x, y[, halo, start]) | Add tag NEWTAG to item which is closest to pixel at X, Y. |
addtag_enclosed(newtag, x1, y1, x2, y2) | Add tag NEWTAG to all items in the rectangle defined |
addtag_overlapping(newtag, x1, y1, x2, y2) | Add tag NEWTAG to all items which overlap the rectangle |
addtag_withtag(newtag, tagOrId) | Add tag NEWTAG to all items with TAGORID. |
after(ms[, func]) | Call function once after given time. |
after_cancel(id) | Cancel scheduling of function identified with ID. |
after_idle(func, *args) | Call FUNC once if the Tcl main loop has no event to |
arrow(start, end, **options) | draw an arrow: start and end can be a Pos object or |
bbox(item) | compute the bounding box of the given item |
bell([displayof]) | Ring a display’s bell. |
bind([sequence, func, add]) | Bind to this widget at event SEQUENCE a call to function FUNC. |
bind_all([sequence, func, add]) | Bind to all widgets at an event SEQUENCE a call to function FUNC. |
bind_class(className[, sequence, func, add]) | Bind to widgets with bindtag CLASSNAME at event |
bindtags([tagList]) | Set or get the list of bindtags for this widget. |
box(box[, padx, pady]) | draw a rectangle with the given bounding box, expanded |
canvasx(screenx[, gridspacing]) | Return the canvas x coordinate of pixel position SCREENX rounded |
canvasy(screeny[, gridspacing]) | Return the canvas y coordinate of pixel position SCREENY rounded |
cget(key) | Return the resource value for a KEY given as string. |
circle(x, y, r[, fill]) | make a circle with center at (x, y) and radius (r) |
clipboard_append(string, **kw) | Append STRING to the Tk clipboard. |
clipboard_clear(**kw) | Clear the data in the Tk clipboard. |
clipboard_get(**kw) | Retrieve data from the clipboard on window’s display. |
colormodel([value]) | Useless. |
columnconfigure(index[, cnf]) | Configure column INDEX of a grid. |
config([cnf]) | Configure resources of a widget. |
configure([cnf]) | Configure resources of a widget. |
coords(*args) | Return a list of coordinates for the item given in ARGS. |
create_arc(*args, **kw) | Create arc shaped region with coordinates x1,y1,x2,y2. |
create_bitmap(*args, **kw) | Create bitmap with coordinates x1,y1. |
create_image(*args, **kw) | Create image item with coordinates x1,y1. |
create_line(*args, **kw) | Create line with coordinates x1,y1,...,xn,yn. |
create_oval(*args, **kw) | Create oval with coordinates x1,y1,x2,y2. |
create_polygon(*args, **kw) | Create polygon with coordinates x1,y1,...,xn,yn. |
create_rectangle(*args, **kw) | Create rectangle with coordinates x1,y1,x2,y2. |
create_text(*args, **kw) | Create text with coordinates x1,y1. |
create_window(*args, **kw) | Create window with coordinates x1,y1,x2,y2. |
dchars(*args) | Delete characters of text items identified by tag or id in ARGS (possibly |
delete(*args) | Delete items identified by all tag or ids contained in ARGS. |
deletecommand(name) | Internal function. |
destroy() | Destroy this and all descendants widgets. |
dot(pos[, r]) | draw a dot at the given position with radius r |
dtag(*args) | Delete tag or id given as last arguments in ARGS from items |
dump([filename]) | create a PostScipt file with the given name and dump |
event_add(virtual, *sequences) | Bind a virtual event VIRTUAL (of the form <<Name>>) |
event_delete(virtual, *sequences) | Unbind a virtual event VIRTUAL from SEQUENCE. |
event_generate(sequence, **kw) | Generate an event SEQUENCE. Additional |
event_info([virtual]) | Return a list of all virtual events or the information |
find(*args) | Internal function. |
find_above(tagOrId) | Return items above TAGORID. |
find_all() | Return all items. |
find_below(tagOrId) | Return all items below TAGORID. |
find_closest(x, y[, halo, start]) | Return item which is closest to pixel at X, Y. |
find_enclosed(x1, y1, x2, y2) | Return all items in rectangle defined |
find_overlapping(x1, y1, x2, y2) | Return all items which overlap the rectangle |
find_withtag(tagOrId) | Return all items with TAGORID. |
flipx(item) | warning: this works in pixel coordinates |
focus(*args) | Set focus to the first item specified in ARGS. |
focus_displayof() | Return the widget which has currently the focus on the display where this widget is located. |
focus_force() | Direct input focus to this widget even if the application does not have the focus. |
focus_get() | Return the widget which has currently the focus in the application. |
focus_lastfor() | Return the widget which would have the focus if top level |
focus_set() | Direct input focus to this widget. |
forget() | Unmap this widget and do not use it for the packing order. |
getboolean(s) | Return a boolean value for Tcl boolean values true and false given as parameter. |
getdouble | |
getint | |
gettags(*args) | Return tags associated with the first item specified in ARGS. |
getvar([name]) | Return value of Tcl variable NAME. |
grab_current() | Return widget which has currently the grab in this application |
grab_release() | Release grab for this widget if currently set. |
grab_set() | Set grab for this widget. |
grab_set_global() | Set global grab for this widget. |
grab_status() | Return None, “local” or “global” if this widget has |
grid([cnf]) | Position a widget in the parent widget in a grid. |
grid_bbox([column, row, col2, row2]) | Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid. |
grid_columnconfigure(index[, cnf]) | Configure column INDEX of a grid. |
grid_configure([cnf]) | Position a widget in the parent widget in a grid. |
grid_forget() | Unmap this widget. |
grid_info() | Return information about the options |
grid_location(x, y) | Return a tuple of column and row which identify the cell |
grid_propagate([flag]) | Set or get the status for propagation of geometry information. |
grid_remove() | Unmap this widget but remember the grid options. |
grid_rowconfigure(index[, cnf]) | Configure row INDEX of a grid. |
grid_size() | Return a tuple of the number of column and rows in the grid. |
grid_slaves([row, column]) | Return a list of all slaves of this widget |
icursor(*args) | Set cursor at position POS in the item identified by TAGORID. |
image(coord, image, **options) | make an image item with the given image at the given position. |
image_names() | Return a list of all existing image names. |
image_types() | Return a list of all available image types (e.g. |
index(*args) | Return position of cursor as integer in item specified in ARGS. |
info() | Return information about the packing options |
insert(*args) | Insert TEXT in item TAGORID at position POS. ARGS must |
invert(coords) | apply the inverse of each of the transforms, in reverse |
itemcget(tagOrId, option) | Return the resource value for an OPTION for item TAGORID. |
itemconfig(tagOrId[, cnf]) | Configure resources of an item TAGORID. |
itemconfigure(tagOrId[, cnf]) | Configure resources of an item TAGORID. |
keys() | Return a list of all resource names of this widget. |
lift(*args) | Raise an item TAGORID given in ARGS |
line(coords[, fill]) | make a polyline with vertices at each point in (coords) |
location(x, y) | Return a tuple of column and row which identify the cell |
lower(*args) | Lower an item TAGORID given in ARGS |
mainloop([n]) | Call the mainloop of Tk. |
measure(t, **options) | find the bounding box of the list of words by |
move(*args) | Move an item TAGORID given in ARGS. |
nametowidget(name) | Return the Tkinter instance of a widget identified by |
option_add(pattern, value[, priority]) | Set a VALUE (second parameter) for an option |
option_clear() | Clear the option database. |
option_get(name, className) | Return the value for an option NAME for this widget |
option_readfile(fileName[, priority]) | Read file FILENAME into the option database. |
oval(coords[, fill]) | make an oval with bounding box (coords) and fill color (fill) |
pack([cnf]) | Pack a widget in the parent widget. |
pack_configure([cnf]) | Pack a widget in the parent widget. |
pack_forget() | Unmap this widget and do not use it for the packing order. |
pack_info() | Return information about the packing options |
pack_propagate([flag]) | Set or get the status for propagation of geometry information. |
pack_slaves() | Return a list of all slaves of this widget |
place([cnf]) | Place a widget in the parent widget. |
place_configure([cnf]) | Place a widget in the parent widget. |
place_forget() | Unmap this widget. |
place_info() | Return information about the placing options |
place_slaves() | Return a list of all slaves of this widget |
polygon(coords[, fill]) | make a close polygon with vertices at each point in (coords) |
postscript([cnf]) | Print the contents of the canvas to a postscript file. |
propagate([flag]) | Set or get the status for propagation of geometry information. |
quit() | Quit the Tcl interpreter. All widgets will be destroyed. |
rectangle(coords[, fill]) | make an oval with bounding box (coords) and fill color (fill) |
register(func[, subst, needcleanup]) | Return a newly created Tcl function. If this |
rowconfigure(index[, cnf]) | Configure row INDEX of a grid. |
scale(*args) | Scale item TAGORID with XORIGIN, YORIGIN, XSCALE, YSCALE. |
scan_dragto(x, y[, gain]) | Adjust the view of the canvas to GAIN times the |
scan_mark(x, y) | Remember the current X, Y coordinates. |
select_adjust(tagOrId, index) | Adjust the end of the selection near the cursor of an item TAGORID to index. |
select_clear() | Clear the selection if it is in this widget. |
select_from(tagOrId, index) | Set the fixed end of a selection in item TAGORID to INDEX. |
select_item() | Return the item which has the selection. |
select_to(tagOrId, index) | Set the variable end of a selection in item TAGORID to INDEX. |
selection_clear(**kw) | Clear the current X selection. |
selection_get(**kw) | Return the contents of the current X selection. |
selection_handle(command, **kw) | Specify a function COMMAND to call if the X |
selection_own(**kw) | Become owner of X selection. |
selection_own_get(**kw) | Return owner of X selection. |
send(interp, cmd, *args) | Send Tcl command CMD to different interpreter INTERP to be executed. |
setvar([name, value]) | Set Tcl variable NAME to VALUE. |
size() | Return a tuple of the number of column and rows in the grid. |
slaves() | Return a list of all slaves of this widget |
str(pos, text[, dx, dy]) | draw the given text at the given position, with an offset |
tag_bind(tagOrId[, sequence, func, add]) | Bind to all items with TAGORID at event SEQUENCE a call to function FUNC. |
tag_lower(*args) | Lower an item TAGORID given in ARGS |
tag_raise(*args) | Raise an item TAGORID given in ARGS |
tag_unbind(tagOrId, sequence[, funcid]) | Unbind for all items with TAGORID for event SEQUENCE the |
tcoords(item[, coords]) | provides get and set access to item coordinates, |
text(coord[, text, fill]) | make a text item with the given text and fill color. |
tk_bisque() | Change the color scheme to light brown as used in Tk 3.6 and before. |
tk_focusFollowsMouse() | The widget under mouse will get automatically focus. |
tk_focusNext() | Return the next widget in the focus order which follows widget which has currently the focus. |
tk_focusPrev() | Return previous widget in the focus order. |
tk_menuBar(*args) | Do not use. |
tk_setPalette(*args, **kw) | Set a new color scheme for all widget elements. |
tk_strictMotif([boolean]) | Set Tcl internal variable, whether the look and feel |
tkraise(*args) | Raise an item TAGORID given in ARGS |
tmove(tags[, dx, dy]) | move all items with the given tags, with dx and dy |
trans(coords) | apply each of the transforms for this canvas, in order. |
type(tagOrId) | Return the type of the item TAGORID. |
unbind(sequence[, funcid]) | Unbind for this widget for event SEQUENCE the |
unbind_all(sequence) | Unbind for all widgets for event SEQUENCE all functions. |
unbind_class(className, sequence) | Unbind for a all widgets with bindtag CLASSNAME for event SEQUENCE |
update() | Enter event loop until all pending events have been processed by Tcl. |
update_idletasks() | Enter event loop until all idle callbacks have been called. |
wait_variable([name]) | Wait until the variable is modified. |
wait_visibility([window]) | Wait until the visibility of a WIDGET changes |
wait_window([window]) | Wait until a WIDGET is destroyed. |
waitvar([name]) | Wait until the variable is modified. |
winfo_atom(name[, displayof]) | Return integer which represents atom NAME. |
winfo_atomname(id[, displayof]) | Return name of atom with identifier ID. |
winfo_cells() | Return number of cells in the colormap for this widget. |
winfo_children() | Return a list of all widgets which are children of this widget. |
winfo_class() | Return window class name of this widget. |
winfo_colormapfull() | Return true if at the last color request the colormap was full. |
winfo_containing(rootX, rootY[, displayof]) | Return the widget which is at the root coordinates ROOTX, ROOTY. |
winfo_depth() | Return the number of bits per pixel. |
winfo_exists() | Return true if this widget exists. |
winfo_fpixels(number) | Return the number of pixels for the given distance NUMBER |
winfo_geometry() | Return geometry string for this widget in the form “widthxheight+X+Y”. |
winfo_height() | Return height of this widget. |
winfo_id() | Return identifier ID for this widget. |
winfo_interps([displayof]) | Return the name of all Tcl interpreters for this display. |
winfo_ismapped() | Return true if this widget is mapped. |
winfo_manager() | Return the window mananger name for this widget. |
winfo_name() | Return the name of this widget. |
winfo_parent() | Return the name of the parent of this widget. |
winfo_pathname(id[, displayof]) | Return the pathname of the widget given by ID. |
winfo_pixels(number) | Rounded integer value of winfo_fpixels. |
winfo_pointerx() | Return the x coordinate of the pointer on the root window. |
winfo_pointerxy() | Return a tuple of x and y coordinates of the pointer on the root window. |
winfo_pointery() | Return the y coordinate of the pointer on the root window. |
winfo_reqheight() | Return requested height of this widget. |
winfo_reqwidth() | Return requested width of this widget. |
winfo_rgb(color) | Return tuple of decimal values for red, green, blue for |
winfo_rootx() | Return x coordinate of upper left corner of this widget on the |
winfo_rooty() | Return y coordinate of upper left corner of this widget on the |
winfo_screen() | Return the screen name of this widget. |
winfo_screencells() | Return the number of the cells in the colormap of the screen |
winfo_screendepth() | Return the number of bits per pixel of the root window of the |
winfo_screenheight() | Return the number of pixels of the height of the screen of this widget |
winfo_screenmmheight() | Return the number of pixels of the height of the screen of |
winfo_screenmmwidth() | Return the number of pixels of the width of the screen of |
winfo_screenvisual() | Return one of the strings directcolor, grayscale, pseudocolor, |
winfo_screenwidth() | Return the number of pixels of the width of the screen of |
winfo_server() | Return information of the X-Server of the screen of this widget in |
winfo_toplevel() | Return the toplevel widget of this widget. |
winfo_viewable() | Return true if the widget and all its higher ancestors are mapped. |
winfo_visual() | Return one of the strings directcolor, grayscale, pseudocolor, |
winfo_visualid() | Return the X identifier for the visual for this widget. |
winfo_visualsavailable([includeids]) | Return a list of all visuals available for the screen of this widget. |
winfo_vrootheight() | Return the height of the virtual root window associated with this widget in pixels. |
winfo_vrootwidth() | Return the width of the virtual root window associated with this widget in pixel. |
winfo_vrootx() | Return the x offset of the virtual root relative to the root |
winfo_vrooty() | Return the y offset of the virtual root relative to the root |
winfo_width() | Return the width of this widget. |
winfo_x() | Return the x coordinate of the upper left corner of this widget |
winfo_y() | Return the y coordinate of the upper left corner of this widget |
xview(*args) | Query and change the horizontal position of the view. |
xview_moveto(fraction) | Adjusts the view in the window so that FRACTION of the |
xview_scroll(number, what) | Shift the x-view according to NUMBER which is measured in “units” |
yview(*args) | Query and change the vertical position of the view. |
yview_moveto(fraction) | Adjusts the view in the window so that FRACTION of the |
yview_scroll(number, what) | Shift the y-view according to NUMBER which is measured in |
Return the resource value for a KEY given as string.
Return the window path name of this widget.
add the given transform at the given index in the transform list (appending is the default).
Internal function.
Add tag NEWTAG to all items above TAGORID.
Add tag NEWTAG to all items.
Add tag NEWTAG to all items below TAGORID.
Add tag NEWTAG to item which is closest to pixel at X, Y. If several match take the top-most. All items closer than HALO are considered overlapping (all are closests). If START is specified the next below this tag is taken.
Add tag NEWTAG to all items in the rectangle defined by X1,Y1,X2,Y2.
Add tag NEWTAG to all items which overlap the rectangle defined by X1,Y1,X2,Y2.
Add tag NEWTAG to all items with TAGORID.
Call function once after given time.
MS specifies the time in milliseconds. FUNC gives the function which shall be called. Additional parameters are given as parameters to the function call. Return identifier to cancel scheduling with after_cancel.
Cancel scheduling of function identified with ID.
Identifier returned by after or after_idle must be given as first parameter.
Call FUNC once if the Tcl main loop has no event to process.
Return an identifier to cancel the scheduling with after_cancel.
draw an arrow: start and end can be a Pos object or a list of two coordinates
compute the bounding box of the given item (transformed from pixel coordinates to transformed coordinates).
Ring a display’s bell.
Bind to this widget at event SEQUENCE a call to function FUNC.
SEQUENCE is a string of concatenated event patterns. An event pattern is of the form <MODIFIER-MODIFIER-TYPE-DETAIL> where MODIFIER is one of Control, Mod2, M2, Shift, Mod3, M3, Lock, Mod4, M4, Button1, B1, Mod5, M5 Button2, B2, Meta, M, Button3, B3, Alt, Button4, B4, Double, Button5, B5 Triple, Mod1, M1. TYPE is one of Activate, Enter, Map, ButtonPress, Button, Expose, Motion, ButtonRelease FocusIn, MouseWheel, Circulate, FocusOut, Property, Colormap, Gravity Reparent, Configure, KeyPress, Key, Unmap, Deactivate, KeyRelease Visibility, Destroy, Leave and DETAIL is the button number for ButtonPress, ButtonRelease and DETAIL is the Keysym for KeyPress and KeyRelease. Examples are <Control-Button-1> for pressing Control and mouse button 1 or <Alt-A> for pressing A and the Alt key (KeyPress can be omitted). An event pattern can also be a virtual event of the form <<AString>> where AString can be arbitrary. This event can be generated by event_generate. If events are concatenated they must appear shortly after each other.
FUNC will be called if the event sequence occurs with an instance of Event as argument. If the return value of FUNC is “break” no further bound function is invoked.
An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function.
Bind will return an identifier to allow deletion of the bound function with unbind without memory leak.
If FUNC or SEQUENCE is omitted the bound function or list of bound events are returned.
Bind to all widgets at an event SEQUENCE a call to function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
Bind to widgets with bindtag CLASSNAME at event SEQUENCE a call of function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
Set or get the list of bindtags for this widget.
With no argument return the list of all bindtags associated with this widget. With a list of strings as argument the bindtags are set to this list. The bindtags determine in which order events are processed (see bind).
draw a rectangle with the given bounding box, expanded by padx and pady. box can be a Bbox object or a list of two coordinate pairs.
Return the canvas x coordinate of pixel position SCREENX rounded to nearest multiple of GRIDSPACING units.
Return the canvas y coordinate of pixel position SCREENY rounded to nearest multiple of GRIDSPACING units.
Return the resource value for a KEY given as string.
make a circle with center at (x, y) and radius (r)
Append STRING to the Tk clipboard.
A widget specified at the optional displayof keyword argument specifies the target display. The clipboard can be retrieved with selection_get.
Clear the data in the Tk clipboard.
A widget specified for the optional displayof keyword argument specifies the target display.
Retrieve data from the clipboard on window’s display.
The window keyword defaults to the root window of the Tkinter application.
The type keyword specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME. Type defaults to STRING.
This command is equivalent to:
selection_get(CLIPBOARD)
Useless. Not implemented in Tk.
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
Return a list of coordinates for the item given in ARGS.
Create arc shaped region with coordinates x1,y1,x2,y2.
Create bitmap with coordinates x1,y1.
Create image item with coordinates x1,y1.
Create line with coordinates x1,y1,...,xn,yn.
Create oval with coordinates x1,y1,x2,y2.
Create polygon with coordinates x1,y1,...,xn,yn.
Create rectangle with coordinates x1,y1,x2,y2.
Create text with coordinates x1,y1.
Create window with coordinates x1,y1,x2,y2.
Delete characters of text items identified by tag or id in ARGS (possibly several times) from FIRST to LAST character (including).
Delete items identified by all tag or ids contained in ARGS.
Internal function.
Delete the Tcl command provided in NAME.
Destroy this and all descendants widgets.
Delete tag or id given as last arguments in ARGS from items identified by first argument in ARGS.
create a PostScipt file with the given name and dump the contents of the canvas into it.
Bind a virtual event VIRTUAL (of the form <<Name>>) to an event SEQUENCE such that the virtual event is triggered whenever SEQUENCE occurs.
Unbind a virtual event VIRTUAL from SEQUENCE.
Generate an event SEQUENCE. Additional keyword arguments specify parameter of the event (e.g. x, y, rootx, rooty).
Return a list of all virtual events or the information about the SEQUENCE bound to the virtual event VIRTUAL.
Internal function.
Return items above TAGORID.
Return all items.
Return all items below TAGORID.
Return item which is closest to pixel at X, Y. If several match take the top-most. All items closer than HALO are considered overlapping (all are closests). If START is specified the next below this tag is taken.
Return all items in rectangle defined by X1,Y1,X2,Y2.
Return all items which overlap the rectangle defined by X1,Y1,X2,Y2.
Return all items with TAGORID.
warning: this works in pixel coordinates
Set focus to the first item specified in ARGS.
Return the widget which has currently the focus on the display where this widget is located.
Return None if the application does not have the focus.
Direct input focus to this widget even if the application does not have the focus. Use with caution!
Return the widget which has currently the focus in the application.
Use focus_displayof to allow working with several displays. Return None if application does not have the focus.
Return the widget which would have the focus if top level for this widget gets the focus from the window manager.
Direct input focus to this widget.
If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.
Unmap this widget and do not use it for the packing order.
Return a boolean value for Tcl boolean values true and false given as parameter.
alias of float
alias of int
Return tags associated with the first item specified in ARGS.
Return value of Tcl variable NAME.
Return widget which has currently the grab in this application or None.
Release grab for this widget if currently set.
Set grab for this widget.
A grab directs all events to this and descendant widgets in the application.
Set global grab for this widget.
A global grab directs all events to this and descendant widgets on the display. Use with caution - other applications do not get events anymore.
Return None, “local” or “global” if this widget has no, a local or a global grab.
Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see ‘in’ option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this
widget stick to the cell boundary
Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid.
If COLUMN, ROW is given the bounding box applies from the cell with row and column 0 to the specified cell. If COL2 and ROW2 are given the bounding box starts at that cell.
The returned integers specify the offset of the upper left corner in the master widget and the width and height.
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see ‘in’ option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this
widget stick to the cell boundary
Unmap this widget.
Return information about the options for positioning this widget in a grid.
Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given, the current setting will be returned.
Unmap this widget but remember the grid options.
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
Return a tuple of the number of column and rows in the grid.
Return a list of all slaves of this widget in its packing order.
Set cursor at position POS in the item identified by TAGORID. In ARGS TAGORID must be first.
make an image item with the given image at the given position. The default anchor is center.
Return a list of all existing image names.
Return a list of all available image types (e.g. phote bitmap).
Return position of cursor as integer in item specified in ARGS.
Return information about the packing options for this widget.
Insert TEXT in item TAGORID at position POS. ARGS must be TAGORID POS TEXT.
apply the inverse of each of the transforms, in reverse order.
Return the resource value for an OPTION for item TAGORID.
Configure resources of an item TAGORID.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method without arguments.
Configure resources of an item TAGORID.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method without arguments.
Return a list of all resource names of this widget.
Raise an item TAGORID given in ARGS (optional above another item).
make a polyline with vertices at each point in (coords) and pen color (fill).
Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
Lower an item TAGORID given in ARGS (optional below another item).
Call the mainloop of Tk.
find the bounding box of the list of words by drawing them, measuring them, and then deleting them
Move an item TAGORID given in ARGS.
Return the Tkinter instance of a widget identified by its Tcl name NAME.
Set a VALUE (second parameter) for an option PATTERN (first parameter).
An optional third parameter gives the numeric priority (defaults to 80).
Clear the option database.
It will be reloaded if option_add is called.
Return the value for an option NAME for this widget with CLASSNAME.
Values with higher priority override lower values.
Read file FILENAME into the option database.
An optional second parameter gives the numeric priority.
make an oval with bounding box (coords) and fill color (fill)
Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to
given direction
before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see ‘in’ option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.
Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to
given direction
before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see ‘in’ option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.
Unmap this widget and do not use it for the packing order.
Return information about the packing options for this widget.
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
Return a list of all slaves of this widget in its packing order.
Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see ‘in’ option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0
relative to width of master (1.0 is right edge)
anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0
relative to width of master (1.0 is the same width as the master)
Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see ‘in’ option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0
relative to width of master (1.0 is right edge)
anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0
relative to width of master (1.0 is the same width as the master)
Unmap this widget.
Return information about the placing options for this widget.
Return a list of all slaves of this widget in its packing order.
make a close polygon with vertices at each point in (coords) and fill color (fill).
Print the contents of the canvas to a postscript file. Valid options: colormap, colormode, file, fontmap, height, pageanchor, pageheight, pagewidth, pagex, pagey, rotate, witdh, x, y.
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
Quit the Tcl interpreter. All widgets will be destroyed.
make an oval with bounding box (coords) and fill color (fill)
Return a newly created Tcl function. If this function is called, the Python function FUNC will be executed. An optional function SUBST can be given which will be executed before FUNC.
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
Scale item TAGORID with XORIGIN, YORIGIN, XSCALE, YSCALE.
Adjust the view of the canvas to GAIN times the difference between X and Y and the coordinates given in scan_mark.
Remember the current X, Y coordinates.
Adjust the end of the selection near the cursor of an item TAGORID to index.
Clear the selection if it is in this widget.
Set the fixed end of a selection in item TAGORID to INDEX.
Return the item which has the selection.
Set the variable end of a selection in item TAGORID to INDEX.
Clear the current X selection.
Return the contents of the current X selection.
A keyword parameter selection specifies the name of the selection and defaults to PRIMARY. A keyword parameter displayof specifies a widget on the display to use.
Specify a function COMMAND to call if the X selection owned by this widget is queried by another application.
This function must return the contents of the selection. The function will be called with the arguments OFFSET and LENGTH which allows the chunking of very long selections. The following keyword parameters can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
Become owner of X selection.
A keyword parameter selection specifies the name of the selection (default PRIMARY).
Return owner of X selection.
The following keyword parameter can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
Send Tcl command CMD to different interpreter INTERP to be executed.
Set Tcl variable NAME to VALUE.
Return a tuple of the number of column and rows in the grid.
Return a list of all slaves of this widget in its packing order.
draw the given text at the given position, with an offset specified by dx and dy
Bind to all items with TAGORID at event SEQUENCE a call to function FUNC.
An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
Lower an item TAGORID given in ARGS (optional below another item).
Raise an item TAGORID given in ARGS (optional above another item).
Unbind for all items with TAGORID for event SEQUENCE the function identified with FUNCID.
provides get and set access to item coordinates, with coordinate translation in both directions.
make a text item with the given text and fill color. The default anchor is center.
Change the color scheme to light brown as used in Tk 3.6 and before.
The widget under mouse will get automatically focus. Can not be disabled easily.
Return the next widget in the focus order which follows widget which has currently the focus.
The focus order first goes to the next child, then to the children of the child recursively and then to the next sibling which is higher in the stacking order. A widget is omitted if it has the takefocus resource set to 0.
Return previous widget in the focus order. See tk_focusNext for details.
Do not use. Needed in Tk 3.6 and earlier.
Set a new color scheme for all widget elements.
A single color as argument will cause that all colors of Tk widget elements are derived from this. Alternatively several keyword parameters and its associated colors can be given. The following keywords are valid: activeBackground, foreground, selectColor, activeForeground, highlightBackground, selectBackground, background, highlightColor, selectForeground, disabledForeground, insertBackground, troughColor.
Set Tcl internal variable, whether the look and feel should adhere to Motif.
A parameter of 1 means adhere to Motif (e.g. no color change if mouse passes over slider). Returns the set value.
Raise an item TAGORID given in ARGS (optional above another item).
move all items with the given tags, with dx and dy in untransformed coordinates
apply each of the transforms for this canvas, in order.
Return the type of the item TAGORID.
Unbind for this widget for event SEQUENCE the function identified with FUNCID.
Unbind for all widgets for event SEQUENCE all functions.
Unbind for a all widgets with bindtag CLASSNAME for event SEQUENCE all functions.
Enter event loop until all pending events have been processed by Tcl.
Enter event loop until all idle callbacks have been called. This will update the display of windows but not process events caused by the user.
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
Wait until the visibility of a WIDGET changes (e.g. it appears).
If no parameter is given self is used.
Wait until a WIDGET is destroyed.
If no parameter is given self is used.
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
Return integer which represents atom NAME.
Return name of atom with identifier ID.
Return number of cells in the colormap for this widget.
Return a list of all widgets which are children of this widget.
Return window class name of this widget.
Return true if at the last color request the colormap was full.
Return the widget which is at the root coordinates ROOTX, ROOTY.
Return the number of bits per pixel.
Return true if this widget exists.
Return the number of pixels for the given distance NUMBER (e.g. “3c”) as float.
Return geometry string for this widget in the form “widthxheight+X+Y”.
Return height of this widget.
Return identifier ID for this widget.
Return the name of all Tcl interpreters for this display.
Return true if this widget is mapped.
Return the window mananger name for this widget.
Return the name of this widget.
Return the name of the parent of this widget.
Return the pathname of the widget given by ID.
Rounded integer value of winfo_fpixels.
Return the x coordinate of the pointer on the root window.
Return a tuple of x and y coordinates of the pointer on the root window.
Return the y coordinate of the pointer on the root window.
Return requested height of this widget.
Return requested width of this widget.
Return tuple of decimal values for red, green, blue for COLOR in this widget.
Return x coordinate of upper left corner of this widget on the root window.
Return y coordinate of upper left corner of this widget on the root window.
Return the screen name of this widget.
Return the number of the cells in the colormap of the screen of this widget.
Return the number of bits per pixel of the root window of the screen of this widget.
Return the number of pixels of the height of the screen of this widget in pixel.
Return the number of pixels of the height of the screen of this widget in mm.
Return the number of pixels of the width of the screen of this widget in mm.
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the default colormodel of this screen.
Return the number of pixels of the width of the screen of this widget in pixel.
Return information of the X-Server of the screen of this widget in the form “XmajorRminor vendor vendorVersion”.
Return the toplevel widget of this widget.
Return true if the widget and all its higher ancestors are mapped.
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the colormodel of this widget.
Return the X identifier for the visual for this widget.
Return a list of all visuals available for the screen of this widget.
Each item in the list consists of a visual name (see winfo_visual), a depth and if INCLUDEIDS=1 is given also the X identifier.
Return the height of the virtual root window associated with this widget in pixels. If there is no virtual root window return the height of the screen.
Return the width of the virtual root window associated with this widget in pixel. If there is no virtual root window return the width of the screen.
Return the x offset of the virtual root relative to the root window of the screen of this widget.
Return the y offset of the virtual root relative to the root window of the screen of this widget.
Return the width of this widget.
Return the x coordinate of the upper left corner of this widget in the parent.
Return the y coordinate of the upper left corner of this widget in the parent.
Query and change the horizontal position of the view.
Adjusts the view in the window so that FRACTION of the total width of the canvas is off-screen to the left.
Shift the x-view according to NUMBER which is measured in “units” or “pages” (WHAT).
Query and change the vertical position of the view.
Adjusts the view in the window so that FRACTION of the total height of the canvas is off-screen to the top.
Shift the y-view according to NUMBER which is measured in “units” or “pages” (WHAT).
Bases: object
the parent class for ClassDiagram and ObjectDiagram.
Methods
add_arrow(arrow) | append a new arrow on the list |
ca(*args, **options) | make a canvas for the diagram |
close() | close the window and exit |
draw_arrows() | draw all the arrows on the list |
printfile() | dump the contents of the canvas to the filename in the |
setup() | create the gui for the diagram |
update_arrows([n]) | update up to n arrows (or all of them is n==None) |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
Bases: scitools.Lumpy.Thing
the Thing that represents a dot in a diagram
Methods
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
x.__init__(...) initializes x; see help(type(x)) for signature
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
return the bounding box of this object if it is drawn
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Mapping
The graphical representation of a frame, implemented as a list of Bindings
Methods
bbox() | the bbox of a Mapping is the bbox of its box item. |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | drawme is the middle part of the way objects are drawn. |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
scan_bindings(cls) | scan the bindings in this mapping, looking for |
scan_val(cls, val) | if we find a reference to an object type, make a note |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
the bbox of a Mapping is the bbox of its box item. This is different from other Things.
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
drawme is the middle part of the way objects are drawn. Thing.draw does some prep work, invokes drawme, and then does some cleanup. draw and drawme are not allowed to modify pos.
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
scan the bindings in this mapping, looking for references to other object types. cls is the Class of the object that contains this mapping
if we find a reference to an object type, make a note of the HAS-A relationship. If we find a reference to a container type, scan it for references.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Simple
the graphical representation of an index in a Sequence. An Index object does not register with lumpy, so that even in pedantic mode, it is always drawn, and it is never the target of a reference (since it is not really a value at run-time).
Methods
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
return the bounding box of this object if it is drawn
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Mapping
The graphical representation of an object (usually). Anything with a __dict__ is treated as an Instance.
Methods
bbox() | the bbox of a Mapping is the bbox of its box item. |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | drawme is the middle part of the way objects are drawn. |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
scan_bindings(cls) | scan the bindings in this Instance, looking for |
scan_val(cls, val) | if we find a reference to an object type, make a note |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
the bbox of a Mapping is the bbox of its box item. This is different from other Things.
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
drawme is the middle part of the way objects are drawn. Thing.draw does some prep work, invokes drawme, and then does some cleanup. draw and drawme are not allowed to modify pos.
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
scan the bindings in this Instance, looking for references to other object types; also, make a note of the names of the instance variables. cls is the Class object this instance belongs to.
if we find a reference to an object type, make a note of the HAS-A relationship. If we find a reference to a container type, scan it for references.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools._Gui.Gui
the Lumpy object represents the GUI window.
Methods
ScrollableCanvas | |
ScrollableText | |
after(ms[, func]) | Call function once after given time. |
after_cancel(id) | Cancel scheduling of function identified with ID. |
after_idle(func, *args) | Call FUNC once if the Tcl main loop has no event to |
aspect([minNumer, minDenom, maxNumer, maxDenom]) | Instruct the window manager to set the aspect ratio (width/height) |
attributes(*args) | This subcommand returns or sets platform specific attributes |
bbox([column, row, col2, row2]) | Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid. |
bell([displayof]) | Ring a display’s bell. |
bind([sequence, func, add]) | Bind to this widget at event SEQUENCE a call to function FUNC. |
bind_all([sequence, func, add]) | Bind to all widgets at an event SEQUENCE a call to function FUNC. |
bind_class(className[, sequence, func, add]) | Bind to widgets with bindtag CLASSNAME at event |
bindtags([tagList]) | Set or get the list of bindtags for this widget. |
bu(*args, **options) | make a button |
ca(*args, **options) | make a canvas widget. |
cb(*args, **options) | make a checkbutton. |
cget(key) | Return the resource value for a KEY given as string. |
class_diagram([classes]) | create a new object diagram based on the current state. |
client([name]) | Store NAME in WM_CLIENT_MACHINE property of this widget. Return |
clipboard_append(string, **kw) | Append STRING to the Tk clipboard. |
clipboard_clear(**kw) | Clear the data in the Tk clipboard. |
clipboard_get(**kw) | Retrieve data from the clipboard on window’s display. |
colormapwindows(*wlist) | Store list of window names (WLIST) into WM_COLORMAPWINDOWS property |
colormodel([value]) | Useless. |
columnconfigure(index[, cnf]) | Configure column INDEX of a grid. |
colweights(weights) | attach weights to the columns of the current grid. |
command([value]) | Store VALUE in WM_COMMAND property. It is the command |
config([cnf]) | Configure resources of a widget. |
configure([cnf]) | Configure resources of a widget. |
deiconify() | Deiconify this widget. |
deletecommand(name) | Internal function. |
destroy() | Destroy this and all descendants widgets. |
en(*args, **options) | make an entry widget. |
endfr() | end the current frame (and return it) |
endgr() | end the current frame (and return it) |
event_add(virtual, *sequences) | Bind a virtual event VIRTUAL (of the form <<Name>>) |
event_delete(virtual, *sequences) | Unbind a virtual event VIRTUAL from SEQUENCE. |
event_generate(sequence, **kw) | Generate an event SEQUENCE. Additional |
event_info([virtual]) | Return a list of all virtual events or the information |
focus() | Direct input focus to this widget. |
focus_displayof() | Return the widget which has currently the focus on the display where this widget is located. |
focus_force() | Direct input focus to this widget even if the application does not have the focus. |
focus_get() | Return the widget which has currently the focus in the application. |
focus_lastfor() | Return the widget which would have the focus if top level |
focus_set() | Direct input focus to this widget. |
focusmodel([model]) | Set focus model to MODEL. “active” means that this widget will claim |
fr(*args, **options) | make a return a frame. |
geometry([newGeometry]) | Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return |
get_class_list() | return the list of classes that should be drawn in |
getboolean(s) | Return a boolean value for Tcl boolean values true and false given as parameter. |
getdouble | |
getint | |
getvar([name]) | Return value of Tcl variable NAME. |
gr(cols[, cweights, rweights]) | create a frame and switch to grid mode. |
grab_current() | Return widget which has currently the grab in this application |
grab_release() | Release grab for this widget if currently set. |
grab_set() | Set grab for this widget. |
grab_set_global() | Set global grab for this widget. |
grab_status() | Return None, “local” or “global” if this widget has |
grid(widget[, i, j]) | pack the given widget in the current grid. |
grid_bbox([column, row, col2, row2]) | Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid. |
grid_columnconfigure(index[, cnf]) | Configure column INDEX of a grid. |
grid_location(x, y) | Return a tuple of column and row which identify the cell |
grid_propagate([flag]) | Set or get the status for propagation of geometry information. |
grid_rowconfigure(index[, cnf]) | Configure row INDEX of a grid. |
grid_size() | Return a tuple of the number of column and rows in the grid. |
grid_slaves([row, column]) | Return a list of all slaves of this widget |
group([pathName]) | Set the group leader widgets for related widgets to PATHNAME. Return |
iconbitmap([bitmap, default]) | Set bitmap for the iconified widget to BITMAP. Return |
iconify() | Display widget as icon. |
iconmask([bitmap]) | Set mask for the icon bitmap of this widget. |
iconname([newName]) | Set the name of the icon for this widget. |
iconposition([x, y]) | Set the position of the icon of this widget to X and Y. Return |
iconwindow([pathName]) | Set widget PATHNAME to be displayed instead of icon. Return the current |
image_names() | Return a list of all existing image names. |
image_types() | Return a list of all available image types (e.g. |
is_opaque(classobj) | check whether this class is completely opaque |
keys() | Return a list of all resource names of this widget. |
la(*args, **options) | make a label widget. |
lb(*args, **options) | make a listbox. |
lift([aboveThis]) | Raise this widget in the stacking order. |
loadtk() | |
lookup(val) | check to see whether the given value is already represented |
lower([belowThis]) | Lower this widget in the stacking order. |
mainloop([n]) | Call the mainloop of Tk. |
make_reference() | make a reference point by taking a snapshot of the current |
make_reference2() | this extra method call is here so that the reference |
make_stack() | take a snapshot of the current state, subtract away the |
maxsize([width, height]) | Set max WIDTH and HEIGHT for this widget. If the window is gridded |
mb(*args, **options) | make a menubutton |
mi(mb[, label]) | make a menu item |
minsize([width, height]) | Set min WIDTH and HEIGHT for this widget. If the window is gridded |
nametowidget(name) | Return the Tkinter instance of a widget identified by |
object_diagram([obj]) | create a new object diagram based on the current state. |
opaque_class(classobj) | restrict this class to no variables |
opaque_module(modobj) | make all classes defined in this module opaque |
option_add(pattern, value[, priority]) | Set a VALUE (second parameter) for an option |
option_clear() | Clear the option database. |
option_get(name, className) | Return the value for an option NAME for this widget |
option_readfile(fileName[, priority]) | Read file FILENAME into the option database. |
overrideredirect([boolean]) | Instruct the window manager to ignore this widget |
pack_propagate([flag]) | Set or get the status for propagation of geometry information. |
pack_slaves() | Return a list of all slaves of this widget |
place_slaves() | Return a list of all slaves of this widget |
popfr() | end the current frame (and return it) |
positionfrom([who]) | Instruct the window manager that the position of this widget shall |
propagate([flag]) | Set or get the status for propagation of geometry information. |
protocol([name, func]) | Bind function FUNC to command NAME for this widget. |
pushfr(frame) | push a frame onto the frame stack |
quit() | Quit the Tcl interpreter. All widgets will be destroyed. |
rb(*args, **options) | make a radiobutton |
readprofile(baseName, className) | Internal function. |
register(thing, val) | associate a value with the Thing that represents it, |
report_callback_exception(exc, val, tb) | Internal function. |
resizable([width, height]) | Instruct the window manager whether this width can be resized |
restrict_class(classobj[, vars]) | restrict this class so that when it is drawn, only |
rowconfigure(index[, cnf]) | Configure row INDEX of a grid. |
rowweights(weights) | attach weights to the rows of the current grid. |
sb(*args, **options) | make a text scrollbar |
sc(*args, **options) | make a scrollable canvas. |
selection_clear(**kw) | Clear the current X selection. |
selection_get(**kw) | Return the contents of the current X selection. |
selection_handle(command, **kw) | Specify a function COMMAND to call if the X |
selection_own(**kw) | Become owner of X selection. |
selection_own_get(**kw) | Return owner of X selection. |
send(interp, cmd, *args) | Send Tcl command CMD to different interpreter INTERP to be executed. |
setvar([name, value]) | Set Tcl variable NAME to VALUE. |
size() | Return a tuple of the number of column and rows in the grid. |
sizefrom([who]) | Instruct the window manager that the size of this widget shall |
slaves() | Return a list of all slaves of this widget |
st(*args, **options) | make a scrollable text entry |
state([newstate]) | Query or set the state of this widget as one of normal, icon, |
te(*args, **options) | make a text entry |
title([string]) | Set the title of this widget. |
tk_bisque() | Change the color scheme to light brown as used in Tk 3.6 and before. |
tk_focusFollowsMouse() | The widget under mouse will get automatically focus. |
tk_focusNext() | Return the next widget in the focus order which follows widget which has currently the focus. |
tk_focusPrev() | Return previous widget in the focus order. |
tk_menuBar(*args) | Do not use. |
tk_setPalette(*args, **kw) | Set a new color scheme for all widget elements. |
tk_strictMotif([boolean]) | Set Tcl internal variable, whether the look and feel |
tkraise([aboveThis]) | Raise this widget in the stacking order. |
tl(**options) | make a return a top level window. |
transient([master]) | Instruct the window manager that this widget is transient |
transparent_class(classobj) | remove the given type or class from the dictionary, which |
unbind(sequence[, funcid]) | Unbind for this widget for event SEQUENCE the |
unbind_all(sequence) | Unbind for all widgets for event SEQUENCE all functions. |
unbind_class(className, sequence) | Unbind for a all widgets with bindtag CLASSNAME for event SEQUENCE |
update() | Enter event loop until all pending events have been processed by Tcl. |
update_idletasks() | Enter event loop until all idle callbacks have been called. |
wait_variable([name]) | Wait until the variable is modified. |
wait_visibility([window]) | Wait until the visibility of a WIDGET changes |
wait_window([window]) | Wait until a WIDGET is destroyed. |
waitvar([name]) | Wait until the variable is modified. |
widget(constructor, *args, **options) | this is the kernel of the widget constructors. |
winfo_atom(name[, displayof]) | Return integer which represents atom NAME. |
winfo_atomname(id[, displayof]) | Return name of atom with identifier ID. |
winfo_cells() | Return number of cells in the colormap for this widget. |
winfo_children() | Return a list of all widgets which are children of this widget. |
winfo_class() | Return window class name of this widget. |
winfo_colormapfull() | Return true if at the last color request the colormap was full. |
winfo_containing(rootX, rootY[, displayof]) | Return the widget which is at the root coordinates ROOTX, ROOTY. |
winfo_depth() | Return the number of bits per pixel. |
winfo_exists() | Return true if this widget exists. |
winfo_fpixels(number) | Return the number of pixels for the given distance NUMBER |
winfo_geometry() | Return geometry string for this widget in the form “widthxheight+X+Y”. |
winfo_height() | Return height of this widget. |
winfo_id() | Return identifier ID for this widget. |
winfo_interps([displayof]) | Return the name of all Tcl interpreters for this display. |
winfo_ismapped() | Return true if this widget is mapped. |
winfo_manager() | Return the window mananger name for this widget. |
winfo_name() | Return the name of this widget. |
winfo_parent() | Return the name of the parent of this widget. |
winfo_pathname(id[, displayof]) | Return the pathname of the widget given by ID. |
winfo_pixels(number) | Rounded integer value of winfo_fpixels. |
winfo_pointerx() | Return the x coordinate of the pointer on the root window. |
winfo_pointerxy() | Return a tuple of x and y coordinates of the pointer on the root window. |
winfo_pointery() | Return the y coordinate of the pointer on the root window. |
winfo_reqheight() | Return requested height of this widget. |
winfo_reqwidth() | Return requested width of this widget. |
winfo_rgb(color) | Return tuple of decimal values for red, green, blue for |
winfo_rootx() | Return x coordinate of upper left corner of this widget on the |
winfo_rooty() | Return y coordinate of upper left corner of this widget on the |
winfo_screen() | Return the screen name of this widget. |
winfo_screencells() | Return the number of the cells in the colormap of the screen |
winfo_screendepth() | Return the number of bits per pixel of the root window of the |
winfo_screenheight() | Return the number of pixels of the height of the screen of this widget |
winfo_screenmmheight() | Return the number of pixels of the height of the screen of |
winfo_screenmmwidth() | Return the number of pixels of the width of the screen of |
winfo_screenvisual() | Return one of the strings directcolor, grayscale, pseudocolor, |
winfo_screenwidth() | Return the number of pixels of the width of the screen of |
winfo_server() | Return information of the X-Server of the screen of this widget in |
winfo_toplevel() | Return the toplevel widget of this widget. |
winfo_viewable() | Return true if the widget and all its higher ancestors are mapped. |
winfo_visual() | Return one of the strings directcolor, grayscale, pseudocolor, |
winfo_visualid() | Return the X identifier for the visual for this widget. |
winfo_visualsavailable([includeids]) | Return a list of all visuals available for the screen of this widget. |
winfo_vrootheight() | Return the height of the virtual root window associated with this widget in pixels. |
winfo_vrootwidth() | Return the width of the virtual root window associated with this widget in pixel. |
winfo_vrootx() | Return the x offset of the virtual root relative to the root |
winfo_vrooty() | Return the y offset of the virtual root relative to the root |
winfo_width() | Return the width of this widget. |
winfo_x() | Return the x coordinate of the upper left corner of this widget |
winfo_y() | Return the y coordinate of the upper left corner of this widget |
withdraw() | Withdraw this widget from the screen such that it is unmapped and forgotten by the window manager. |
wm_aspect([minNumer, minDenom, maxNumer, ...]) | Instruct the window manager to set the aspect ratio (width/height) |
wm_attributes(*args) | This subcommand returns or sets platform specific attributes |
wm_client([name]) | Store NAME in WM_CLIENT_MACHINE property of this widget. Return |
wm_colormapwindows(*wlist) | Store list of window names (WLIST) into WM_COLORMAPWINDOWS property |
wm_command([value]) | Store VALUE in WM_COMMAND property. It is the command |
wm_deiconify() | Deiconify this widget. |
wm_focusmodel([model]) | Set focus model to MODEL. “active” means that this widget will claim |
wm_frame() | Return identifier for decorative frame of this widget if present. |
wm_geometry([newGeometry]) | Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return |
wm_grid([baseWidth, baseHeight, widthInc, ...]) | Instruct the window manager that this widget shall only be resized on grid boundaries. |
wm_group([pathName]) | Set the group leader widgets for related widgets to PATHNAME. Return |
wm_iconbitmap([bitmap, default]) | Set bitmap for the iconified widget to BITMAP. Return |
wm_iconify() | Display widget as icon. |
wm_iconmask([bitmap]) | Set mask for the icon bitmap of this widget. |
wm_iconname([newName]) | Set the name of the icon for this widget. |
wm_iconposition([x, y]) | Set the position of the icon of this widget to X and Y. Return |
wm_iconwindow([pathName]) | Set widget PATHNAME to be displayed instead of icon. Return the current |
wm_maxsize([width, height]) | Set max WIDTH and HEIGHT for this widget. If the window is gridded |
wm_minsize([width, height]) | Set min WIDTH and HEIGHT for this widget. If the window is gridded |
wm_overrideredirect([boolean]) | Instruct the window manager to ignore this widget |
wm_positionfrom([who]) | Instruct the window manager that the position of this widget shall |
wm_protocol([name, func]) | Bind function FUNC to command NAME for this widget. |
wm_resizable([width, height]) | Instruct the window manager whether this width can be resized |
wm_sizefrom([who]) | Instruct the window manager that the size of this widget shall |
wm_state([newstate]) | Query or set the state of this widget as one of normal, icon, |
wm_title([string]) | Set the title of this widget. |
wm_transient([master]) | Instruct the window manager that this widget is transient |
wm_withdraw() | Withdraw this widget from the screen such that it is unmapped and forgotten by the window manager. |
a compound widget with a grid that contains a canvas and two scrollbars
a scrollable text entry is a compound widget with a frame that contains a text entry on the left and a scrollbar on the right.
Delegate attribute access to the interpreter object
Return the resource value for a KEY given as string.
debug is passed to Gui.__init__; it makes the outlines of the frames visible. If pedantic is false, simple values are replicated, rather than, for example, having all references to 1 refer to the same int object.
Return the window path name of this widget.
Call function once after given time.
MS specifies the time in milliseconds. FUNC gives the function which shall be called. Additional parameters are given as parameters to the function call. Return identifier to cancel scheduling with after_cancel.
Cancel scheduling of function identified with ID.
Identifier returned by after or after_idle must be given as first parameter.
Call FUNC once if the Tcl main loop has no event to process.
Return an identifier to cancel the scheduling with after_cancel.
Instruct the window manager to set the aspect ratio (width/height) of this widget to be between MINNUMER/MINDENOM and MAXNUMER/MAXDENOM. Return a tuple of the actual values if no argument is given.
This subcommand returns or sets platform specific attributes
The first form returns a list of the platform specific flags and their values. The second form returns the value for the specific option. The third form sets one or more of the values. The values are as follows:
On Windows, -disabled gets or sets whether the window is in a disabled state. -toolwindow gets or sets the style of the window to toolwindow (as defined in the MSDN). -topmost gets or sets whether this is a topmost window (displays above all other windows).
On Macintosh, XXXXX
On Unix, there are currently no special attribute values.
Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid.
If COLUMN, ROW is given the bounding box applies from the cell with row and column 0 to the specified cell. If COL2 and ROW2 are given the bounding box starts at that cell.
The returned integers specify the offset of the upper left corner in the master widget and the width and height.
Ring a display’s bell.
Bind to this widget at event SEQUENCE a call to function FUNC.
SEQUENCE is a string of concatenated event patterns. An event pattern is of the form <MODIFIER-MODIFIER-TYPE-DETAIL> where MODIFIER is one of Control, Mod2, M2, Shift, Mod3, M3, Lock, Mod4, M4, Button1, B1, Mod5, M5 Button2, B2, Meta, M, Button3, B3, Alt, Button4, B4, Double, Button5, B5 Triple, Mod1, M1. TYPE is one of Activate, Enter, Map, ButtonPress, Button, Expose, Motion, ButtonRelease FocusIn, MouseWheel, Circulate, FocusOut, Property, Colormap, Gravity Reparent, Configure, KeyPress, Key, Unmap, Deactivate, KeyRelease Visibility, Destroy, Leave and DETAIL is the button number for ButtonPress, ButtonRelease and DETAIL is the Keysym for KeyPress and KeyRelease. Examples are <Control-Button-1> for pressing Control and mouse button 1 or <Alt-A> for pressing A and the Alt key (KeyPress can be omitted). An event pattern can also be a virtual event of the form <<AString>> where AString can be arbitrary. This event can be generated by event_generate. If events are concatenated they must appear shortly after each other.
FUNC will be called if the event sequence occurs with an instance of Event as argument. If the return value of FUNC is “break” no further bound function is invoked.
An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function.
Bind will return an identifier to allow deletion of the bound function with unbind without memory leak.
If FUNC or SEQUENCE is omitted the bound function or list of bound events are returned.
Bind to all widgets at an event SEQUENCE a call to function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
Bind to widgets with bindtag CLASSNAME at event SEQUENCE a call of function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.
Set or get the list of bindtags for this widget.
With no argument return the list of all bindtags associated with this widget. With a list of strings as argument the bindtags are set to this list. The bindtags determine in which order events are processed (see bind).
make a button
make a canvas widget.
make a checkbutton.
Return the resource value for a KEY given as string.
create a new object diagram based on the current state. If a list of classes is provided, only those classes are shown. Otherwise, all classes that Lumpy know about are shown.
Store NAME in WM_CLIENT_MACHINE property of this widget. Return current value.
Append STRING to the Tk clipboard.
A widget specified at the optional displayof keyword argument specifies the target display. The clipboard can be retrieved with selection_get.
Clear the data in the Tk clipboard.
A widget specified for the optional displayof keyword argument specifies the target display.
Retrieve data from the clipboard on window’s display.
The window keyword defaults to the root window of the Tkinter application.
The type keyword specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME. Type defaults to STRING.
This command is equivalent to:
selection_get(CLIPBOARD)
Store list of window names (WLIST) into WM_COLORMAPWINDOWS property of this widget. This list contains windows whose colormaps differ from their parents. Return current list of widgets if WLIST is empty.
Useless. Not implemented in Tk.
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
attach weights to the columns of the current grid. These weights control how the columns in the grid expand when the grid expands. The default weight is 0, which means that the column doesn’t expand. If only one column has a value, it gets all the extra space.
Store VALUE in WM_COMMAND property. It is the command which shall be used to invoke the application. Return current command if VALUE is None.
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
Configure resources of a widget.
The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
Deiconify this widget. If it was never mapped it will not be mapped. On Windows it will raise this widget and give it the focus.
Internal function.
Delete the Tcl command provided in NAME.
Destroy this and all descendants widgets. This will end the application of this Tcl interpreter.
make an entry widget.
end the current frame (and return it)
end the current frame (and return it)
Bind a virtual event VIRTUAL (of the form <<Name>>) to an event SEQUENCE such that the virtual event is triggered whenever SEQUENCE occurs.
Unbind a virtual event VIRTUAL from SEQUENCE.
Generate an event SEQUENCE. Additional keyword arguments specify parameter of the event (e.g. x, y, rootx, rooty).
Return a list of all virtual events or the information about the SEQUENCE bound to the virtual event VIRTUAL.
Direct input focus to this widget.
If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.
Return the widget which has currently the focus on the display where this widget is located.
Return None if the application does not have the focus.
Direct input focus to this widget even if the application does not have the focus. Use with caution!
Return the widget which has currently the focus in the application.
Use focus_displayof to allow working with several displays. Return None if application does not have the focus.
Return the widget which would have the focus if top level for this widget gets the focus from the window manager.
Direct input focus to this widget.
If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.
Set focus model to MODEL. “active” means that this widget will claim the focus itself, “passive” means that the window manager shall give the focus. Return current focus model if MODEL is None.
make a return a frame. As a side effect, the new frame becomes the current frame
Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return current value if None is given.
Return a boolean value for Tcl boolean values true and false given as parameter.
alias of float
alias of int
Return value of Tcl variable NAME.
create a frame and switch to grid mode. cols is the number of columns in the grid (no need to specify the number of rows). cweight and rweight control how the widgets expand if the frame expands (see colweights and rowweights below). options are passed along to the frame
Return widget which has currently the grab in this application or None.
Release grab for this widget if currently set.
Set grab for this widget.
A grab directs all events to this and descendant widgets in the application.
Set global grab for this widget.
A global grab directs all events to this and descendant widgets on the display. Use with caution - other applications do not get events anymore.
Return None, “local” or “global” if this widget has no, a local or a global grab.
pack the given widget in the current grid. By default, the widget is packed in the next available space, but parameters i and j can override.
Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid.
If COLUMN, ROW is given the bounding box applies from the cell with row and column 0 to the specified cell. If COL2 and ROW2 are given the bounding box starts at that cell.
The returned integers specify the offset of the upper left corner in the master widget and the width and height.
Configure column INDEX of a grid.
Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).
Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given, the current setting will be returned.
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
Return a tuple of the number of column and rows in the grid.
Return a list of all slaves of this widget in its packing order.
Set the group leader widgets for related widgets to PATHNAME. Return the group leader of this widget if None is given.
Set bitmap for the iconified widget to BITMAP. Return the bitmap if None is given.
Under Windows, the DEFAULT parameter can be used to set the icon for the widget and any descendents that don’t have an icon set explicitly. DEFAULT can be the relative path to a .ico file (example: root.iconbitmap(default=’myicon.ico’) ). See Tk documentation for more information.
Display widget as icon.
Set mask for the icon bitmap of this widget. Return the mask if None is given.
Set the name of the icon for this widget. Return the name if None is given.
Set the position of the icon of this widget to X and Y. Return a tuple of the current values of X and X if None is given.
Set widget PATHNAME to be displayed instead of icon. Return the current value if None is given.
Return a list of all existing image names.
Return a list of all available image types (e.g. phote bitmap).
check whether this class is completely opaque (restricted to _no_ instance variables)
Return a list of all resource names of this widget.
make a label widget.
make a listbox.
Raise this widget in the stacking order.
check to see whether the given value is already represented by a Thing, and if so, return it.
Lower this widget in the stacking order.
Call the mainloop of Tk.
make a reference point by taking a snapshot of the current state. Subsequent diagrams will be relative to this reference.
this extra method call is here so that the reference and the snapshot we take later have the same number of frames on the stack. UGH.
take a snapshot of the current state, subtract away the frames and variables that existed in the previous reference, then make a Stack.
Set max WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.
make a menubutton
make a menu item
Set min WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.
Return the Tkinter instance of a widget identified by its Tcl name NAME.
create a new object diagram based on the current state. If an object is provided, draw the object. Otherwise, draw the current run-time stack (relative to the last reference).
Set a VALUE (second parameter) for an option PATTERN (first parameter).
An optional third parameter gives the numeric priority (defaults to 80).
Clear the option database.
It will be reloaded if option_add is called.
Return the value for an option NAME for this widget with CLASSNAME.
Values with higher priority override lower values.
Read file FILENAME into the option database.
An optional second parameter gives the numeric priority.
Instruct the window manager to ignore this widget if BOOLEAN is given with 1. Return the current value if None is given.
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
Return a list of all slaves of this widget in its packing order.
Return a list of all slaves of this widget in its packing order.
end the current frame (and return it)
Instruct the window manager that the position of this widget shall be defined by the user if WHO is “user”, and by its own policy if WHO is “program”.
Set or get the status for propagation of geometry information.
A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned.
Bind function FUNC to command NAME for this widget. Return the function bound to NAME if None is given. NAME could be e.g. “WM_SAVE_YOURSELF” or “WM_DELETE_WINDOW”.
push a frame onto the frame stack
Quit the Tcl interpreter. All widgets will be destroyed.
make a radiobutton
Internal function. It reads BASENAME.tcl and CLASSNAME.tcl into the Tcl Interpreter and calls execfile on BASENAME.py and CLASSNAME.py if such a file exists in the home directory.
associate a value with the Thing that represents it, so that we can check later whether we have already created a Thing for a given value.
Internal function. It reports exception on sys.stderr.
Instruct the window manager whether this width can be resized in WIDTH or HEIGHT. Both values are boolean values.
restrict this class so that when it is drawn, only the given vars are shown
Configure row INDEX of a grid.
Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).
attach weights to the rows of the current grid. These weights control how the rows in the grid expand when the grid expands. The default weight is 0, which means that the row doesn’t expand. If only one row has a value, it gets all the extra space.
make a text scrollbar
make a scrollable canvas. The options provided apply to the frame only; if you want to configure the other widgets, you have to do it after invoking st
Clear the current X selection.
Return the contents of the current X selection.
A keyword parameter selection specifies the name of the selection and defaults to PRIMARY. A keyword parameter displayof specifies a widget on the display to use.
Specify a function COMMAND to call if the X selection owned by this widget is queried by another application.
This function must return the contents of the selection. The function will be called with the arguments OFFSET and LENGTH which allows the chunking of very long selections. The following keyword parameters can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
Become owner of X selection.
A keyword parameter selection specifies the name of the selection (default PRIMARY).
Return owner of X selection.
The following keyword parameter can be provided: selection - name of the selection (default PRIMARY), type - type of the selection (e.g. STRING, FILE_NAME).
Send Tcl command CMD to different interpreter INTERP to be executed.
Set Tcl variable NAME to VALUE.
Return a tuple of the number of column and rows in the grid.
Instruct the window manager that the size of this widget shall be defined by the user if WHO is “user”, and by its own policy if WHO is “program”.
Return a list of all slaves of this widget in its packing order.
make a scrollable text entry
Query or set the state of this widget as one of normal, icon, iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only).
make a text entry
Set the title of this widget.
Change the color scheme to light brown as used in Tk 3.6 and before.
The widget under mouse will get automatically focus. Can not be disabled easily.
Return the next widget in the focus order which follows widget which has currently the focus.
The focus order first goes to the next child, then to the children of the child recursively and then to the next sibling which is higher in the stacking order. A widget is omitted if it has the takefocus resource set to 0.
Return previous widget in the focus order. See tk_focusNext for details.
Do not use. Needed in Tk 3.6 and earlier.
Set a new color scheme for all widget elements.
A single color as argument will cause that all colors of Tk widget elements are derived from this. Alternatively several keyword parameters and its associated colors can be given. The following keywords are valid: activeBackground, foreground, selectColor, activeForeground, highlightBackground, selectBackground, background, highlightColor, selectForeground, disabledForeground, insertBackground, troughColor.
Set Tcl internal variable, whether the look and feel should adhere to Motif.
A parameter of 1 means adhere to Motif (e.g. no color change if mouse passes over slider). Returns the set value.
Raise this widget in the stacking order.
make a return a top level window.
Instruct the window manager that this widget is transient with regard to widget MASTER.
remove the given type or class from the dictionary, which means that it’s attributes will be shown. If it is not in the dictionary, raise an exception.
Unbind for this widget for event SEQUENCE the function identified with FUNCID.
Unbind for all widgets for event SEQUENCE all functions.
Unbind for a all widgets with bindtag CLASSNAME for event SEQUENCE all functions.
Enter event loop until all pending events have been processed by Tcl.
Enter event loop until all idle callbacks have been called. This will update the display of windows but not process events caused by the user.
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
Wait until the visibility of a WIDGET changes (e.g. it appears).
If no parameter is given self is used.
Wait until a WIDGET is destroyed.
If no parameter is given self is used.
Wait until the variable is modified.
A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.
this is the kernel of the widget constructors. (constructor) is the function that will be called to build the new widget. (args) is rolled into (options), and then (options) is split into widget options, pack options and grid options
Return integer which represents atom NAME.
Return name of atom with identifier ID.
Return number of cells in the colormap for this widget.
Return a list of all widgets which are children of this widget.
Return window class name of this widget.
Return true if at the last color request the colormap was full.
Return the widget which is at the root coordinates ROOTX, ROOTY.
Return the number of bits per pixel.
Return true if this widget exists.
Return the number of pixels for the given distance NUMBER (e.g. “3c”) as float.
Return geometry string for this widget in the form “widthxheight+X+Y”.
Return height of this widget.
Return identifier ID for this widget.
Return the name of all Tcl interpreters for this display.
Return true if this widget is mapped.
Return the window mananger name for this widget.
Return the name of this widget.
Return the name of the parent of this widget.
Return the pathname of the widget given by ID.
Rounded integer value of winfo_fpixels.
Return the x coordinate of the pointer on the root window.
Return a tuple of x and y coordinates of the pointer on the root window.
Return the y coordinate of the pointer on the root window.
Return requested height of this widget.
Return requested width of this widget.
Return tuple of decimal values for red, green, blue for COLOR in this widget.
Return x coordinate of upper left corner of this widget on the root window.
Return y coordinate of upper left corner of this widget on the root window.
Return the screen name of this widget.
Return the number of the cells in the colormap of the screen of this widget.
Return the number of bits per pixel of the root window of the screen of this widget.
Return the number of pixels of the height of the screen of this widget in pixel.
Return the number of pixels of the height of the screen of this widget in mm.
Return the number of pixels of the width of the screen of this widget in mm.
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the default colormodel of this screen.
Return the number of pixels of the width of the screen of this widget in pixel.
Return information of the X-Server of the screen of this widget in the form “XmajorRminor vendor vendorVersion”.
Return the toplevel widget of this widget.
Return true if the widget and all its higher ancestors are mapped.
Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the colormodel of this widget.
Return the X identifier for the visual for this widget.
Return a list of all visuals available for the screen of this widget.
Each item in the list consists of a visual name (see winfo_visual), a depth and if INCLUDEIDS=1 is given also the X identifier.
Return the height of the virtual root window associated with this widget in pixels. If there is no virtual root window return the height of the screen.
Return the width of the virtual root window associated with this widget in pixel. If there is no virtual root window return the width of the screen.
Return the x offset of the virtual root relative to the root window of the screen of this widget.
Return the y offset of the virtual root relative to the root window of the screen of this widget.
Return the width of this widget.
Return the x coordinate of the upper left corner of this widget in the parent.
Return the y coordinate of the upper left corner of this widget in the parent.
Withdraw this widget from the screen such that it is unmapped and forgotten by the window manager. Re-draw it with wm_deiconify.
Instruct the window manager to set the aspect ratio (width/height) of this widget to be between MINNUMER/MINDENOM and MAXNUMER/MAXDENOM. Return a tuple of the actual values if no argument is given.
This subcommand returns or sets platform specific attributes
The first form returns a list of the platform specific flags and their values. The second form returns the value for the specific option. The third form sets one or more of the values. The values are as follows:
On Windows, -disabled gets or sets whether the window is in a disabled state. -toolwindow gets or sets the style of the window to toolwindow (as defined in the MSDN). -topmost gets or sets whether this is a topmost window (displays above all other windows).
On Macintosh, XXXXX
On Unix, there are currently no special attribute values.
Store NAME in WM_CLIENT_MACHINE property of this widget. Return current value.
Store list of window names (WLIST) into WM_COLORMAPWINDOWS property of this widget. This list contains windows whose colormaps differ from their parents. Return current list of widgets if WLIST is empty.
Store VALUE in WM_COMMAND property. It is the command which shall be used to invoke the application. Return current command if VALUE is None.
Deiconify this widget. If it was never mapped it will not be mapped. On Windows it will raise this widget and give it the focus.
Set focus model to MODEL. “active” means that this widget will claim the focus itself, “passive” means that the window manager shall give the focus. Return current focus model if MODEL is None.
Return identifier for decorative frame of this widget if present.
Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return current value if None is given.
Instruct the window manager that this widget shall only be resized on grid boundaries. WIDTHINC and HEIGHTINC are the width and height of a grid unit in pixels. BASEWIDTH and BASEHEIGHT are the number of grid units requested in Tk_GeometryRequest.
Set the group leader widgets for related widgets to PATHNAME. Return the group leader of this widget if None is given.
Set bitmap for the iconified widget to BITMAP. Return the bitmap if None is given.
Under Windows, the DEFAULT parameter can be used to set the icon for the widget and any descendents that don’t have an icon set explicitly. DEFAULT can be the relative path to a .ico file (example: root.iconbitmap(default=’myicon.ico’) ). See Tk documentation for more information.
Display widget as icon.
Set mask for the icon bitmap of this widget. Return the mask if None is given.
Set the name of the icon for this widget. Return the name if None is given.
Set the position of the icon of this widget to X and Y. Return a tuple of the current values of X and X if None is given.
Set widget PATHNAME to be displayed instead of icon. Return the current value if None is given.
Set max WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.
Set min WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.
Instruct the window manager to ignore this widget if BOOLEAN is given with 1. Return the current value if None is given.
Instruct the window manager that the position of this widget shall be defined by the user if WHO is “user”, and by its own policy if WHO is “program”.
Bind function FUNC to command NAME for this widget. Return the function bound to NAME if None is given. NAME could be e.g. “WM_SAVE_YOURSELF” or “WM_DELETE_WINDOW”.
Instruct the window manager whether this width can be resized in WIDTH or HEIGHT. Both values are boolean values.
Instruct the window manager that the size of this widget shall be defined by the user if WHO is “user”, and by its own policy if WHO is “program”.
Query or set the state of this widget as one of normal, icon, iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only).
Set the title of this widget.
Instruct the window manager that this widget is transient with regard to widget MASTER.
Withdraw this widget from the screen such that it is unmapped and forgotten by the window manager. Re-draw it with wm_deiconify.
Bases: scitools.Lumpy.Thing
the graphical representation of a mapping type (usually a dictionary). Sequence and Instance inherit from Mapping.
Methods
bbox() | the bbox of a Mapping is the bbox of its box item. |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | drawme is the middle part of the way objects are drawn. |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
scan_bindings(cls) | scan the bindings in this mapping, looking for |
scan_val(cls, val) | if we find a reference to an object type, make a note |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
the bbox of a Mapping is the bbox of its box item. This is different from other Things.
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
drawme is the middle part of the way objects are drawn. Thing.draw does some prep work, invokes drawme, and then does some cleanup. draw and drawme are not allowed to modify pos.
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
scan the bindings in this mapping, looking for references to other object types. cls is the Class of the object that contains this mapping
if we find a reference to an object type, make a note of the HAS-A relationship. If we find a reference to a container type, scan it for references.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Diagram
Methods
add_arrow(arrow) | append a new arrow on the list |
ca(*args, **options) | make a canvas for the diagram |
clear() | |
close() | close the window and exit |
draw(thing) | draw the given thing |
draw_arrows() | draw all the arrows on the list |
printfile() | dump the contents of the canvas to the filename in the |
setup() | create the gui for the diagram |
update_arrows([n]) | update up to n arrows (or all of them is n==None) |
update_snapshot(snapshot) |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
append a new arrow on the list
make a canvas for the diagram
close the window and exit
draw all the arrows on the list
dump the contents of the canvas to the filename in the filename entry.
create the gui for the diagram
update up to n arrows (or all of them is n==None)
Bases: scitools.Lumpy.Thing
an inheritance arrow, which shows an is-a relationship between classes in a class diagram.
Methods
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag) | |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
update() |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
return the bounding box of this object if it is drawn
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Thing
a reference arrow, which show a reference in an object diagram
Methods
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag) | |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
update() |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
return the bounding box of this object if it is drawn
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Mapping
the graphical representation of a sequence type (mostly lists and tuples)
Methods
bbox() | the bbox of a Mapping is the bbox of its box item. |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | drawme is the middle part of the way objects are drawn. |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
scan_bindings(cls) | scan the bindings in this mapping, looking for |
scan_val(cls, val) | if we find a reference to an object type, make a note |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
the bbox of a Mapping is the bbox of its box item. This is different from other Things.
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
drawme is the middle part of the way objects are drawn. Thing.draw does some prep work, invokes drawme, and then does some cleanup. draw and drawme are not allowed to modify pos.
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
scan the bindings in this mapping, looking for references to other object types. cls is the Class of the object that contains this mapping
if we find a reference to an object type, make a note of the HAS-A relationship. If we find a reference to a container type, scan it for references.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: scitools.Lumpy.Thing
the graphical representation of a simple value like a number or a string
Methods
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
return the bounding box of this object if it is drawn
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: object
the data structure that represents a frame
Methods
subtract(other) | delete all the keys in other from self |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
Bases: object
the data structure that represents a stack
Methods
clean(ref) | Remove all the variables in the reference stack from self |
spew() | print the frames in this snapshot |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
convert from the format returned by inspect to a list of frames. Drop the last three frames, which are the Lumpy functions object_diagram, make_stack, and Stack.__init__
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
Bases: scitools.Lumpy.Thing
The graphical representation of a stack.
Methods
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
drawme(diag, pos, flip[, tags]) | |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
override __new__ so we can count the number of Things
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
return the bounding box of this object if it is drawn
create bindings for each of the items with the given tags
this callback is invoked when the user clicks on an item
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
return True if the object has been drawn
this callback is invoked when the user drags an item
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
this callback is invoked when the user releases the button
Bases: object
the parent class for objects that have a graphical representation. Each Thing object corresponds to an item or set of items in a diagram. A Thing can only be drawn in one Diagram at a time.
Methods
bbox() | return the bounding box of this object if it is drawn |
bind([tags]) | create bindings for each of the items with the given tags |
down(event) | this callback is invoked when the user clicks on an item |
draw(diag, pos, flip[, tags]) | draw this Thing at the given position on the given |
isdrawn() | return True if the object has been drawn |
motion(event) | this callback is invoked when the user drags an item |
pos() | Compute the nominal position of a Thing by getting the |
set_offset(pos) | the offset attribute keeps track of the offset between |
up(event) | this callback is invoked when the user releases the button |
alias of type
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
x.__init__(...) initializes x; see help(type(x)) for signature
helper for pickle
helper for pickle
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)
draw this Thing at the given position on the given diagram with the given tags (in addition to the specific tag for this thing). flip=1 means draw left to right; flip=-1 means right to left. Return a list of Things that were drawn.
draw and drawme are not allowed to mofify pos
Compute the nominal position of a Thing by getting the current bounding box and adding the offset.
the offset attribute keeps track of the offset between the bounding box of the Thing and its nominal position, so that if the Thing is moved later, we can compute its new nominal position.
return a list of bindings, one for each key-value pair in iterator. The keys are made into Index objects.
return a list of bindings, one for each key-value pair in iterator. The keys are made into Thing objects.
return a tuple with a single element: a tag string with with the given prefix and a unique id as a suffix