All geometry manager methods that apply to a master widget instead of
to a slave widget have been moved to the Misc class, which is
inherited by all of Tk(), Toplevel() and Widget(). They have been
renamed to have their geometry manager name as a prefix,
e.g. pack_propagate(); the short names can still be used where
ambiguities are resolved so that pack has priority over place has
priority over grid (since this was the old rule).
Also, the method definitions in the Pack, Place and Grid classes now
all have their respective geometry manager name as a prefix
(e.g. pack_configure); the shorter names are aliases defined through
assignment.
A similar renaming has been done for all config() methods found
elsewhere; these have been renamed to configure() with config being
the alias (instead of the other way around). (This may not make much
of a difference but the official Tk command name is now 'configure'
and it may help in debugging tracebacks.)
Finally, a new base class BaseWidget has been introduced, which
implements the methods common between Widget and Toplevel (the
difference between those two classes is that Toplevel has a different
__init__() but also that Toplevel doesn't inherit from Pack, Place or
Grid.
was all that the method set anyway). Removed calls to the
constructor. This reduces the number of Python function calls
per widget construction by one, for every widget construction.
not exist. All 8 uses of tkinter are replaced with _tkinter. Still
create a variable tkinter though, because that is used by other
modules importing Tkinter (e.g. tkinter.createfilehandler()).
Also added a comment to the 'import _tkinter' line saying that if this
fails, Python is not configured correctly.
to Frame(w, cnf={"class": "classname"}). I think this is the only
widget other than Toplevel that needs to be concerned about setting
the widget's class (-class must be the first option on the Tcl
widget creation command).
Tk 4.2. The new winfo options supported are: mananger, pointerx,
pointerxy, pointery, server, viewable, visualid, visualsavailable.
Also fixed bugs in winfo_colormapfull() and winfo_containing().
selection interface, handle the -displayof option intelligently in
many places. Added "wm colormapwindows" and "winfo colormapfull"
support. Removed "focus default" and "focus none" method: these are
not in Tk 4.X.
* Setup.in: moreButtons Tk extension support (again).
* mklibapp: $1 is now the path to the Tk extension source
directory. The default is /usr/local/src/tcl.
* kill.py: Don't use the exec Tcl command.
* Tkinter.py
(Misc.bind_all): Bug fix; extra graves.
(Misc.tk_strictMotif): Return the value.
(mainloop, getint, getdouble, getboolean): New functions.
(_cnfmerge): Flatten cnfs.
Wed Jun 29 22:01:17 1994 Steen Lumholt (lumholt@login.dkuug.dk)
* Tkinter.py:
(Tk.destroy): master is always None; so don't del. Found by
Tommy Burnette, solution from Guido van Rossum.
(Misc.selection_get): Missing return. Found by Richard Neitzel.
(Misc._options, Widget.config, Canvas._create): If cnf is a tuple
or list then merge the contents. Suggested by Matthew Conway.
* README: Doc fix.
* Dialog.py: tk_dialog wrapper widget.
* Tkinter.py: (Widget) Code moved from __init__ to _setup.
Sat Jun 25 00:27:24 1994 Steen Lumholt (lumholt@login.dkuug.dk)
* Tkinter.py (Misc): selection_own and selection_own_get methods.
(Misc.winfo_toplevel): Return widget.
* kill.py: New demo.
* Tkinter.py: tk_menuBar method moved from Menu class to
Misc class.
(Scrollbar.get): Bug fix; self._getints not self.tk.getints.
Fri Jun 24 17:42:16 1994 Steen Lumholt (lumholt@login.dkuug.dk)
* Tkinter.py
(Variable, StringVar, IntVar, BooleanVar): New classes.
* mklibapp: New shell script.
* Setup.in: moreButtons Tk extension support.
* tkintermodule.c (Tkapp_New): Remove #ifdef WITH_APPINIT.
* appinit.c (Tcl_AppInit): New file and function.
* Tkinter.py:
(Button): Dummy args in tk_* methods.
(Studbutton, Tributton): New widget by <tnb2d@cs.virginia.edu>;
morebuttons extension.
Thu Jun 23 22:22:43 1994 Steen Lumholt (lumholt@login.dkuug.dk)
* tkintermodule.c (FileHandler): Make arg a tuple; bug found
by <tnb2d@cs.virginia.edu>. Call the Python file handler
function with (file, mask) argument. Fix a few of my refcnt bugs.
(Misc.after): arrange to call deletecommand after it is called.
(Canvas.itemconfig): generalized to support all forms.
(Canvas.find): returns a list of integers instead of strings.
* Tkinter.py (Canvas._create): call _flatten earlier.
Renamed tkerror to _tkerror, default_root to _default_root.
(_substitute, _subst_prefix): move back into class Misc; added
widget Event attribute.
Added functions that return widgets or widget lists:
winfo_children; focus_get; grab_current.
(Pack.slaves, Place.slaves): return Widget objects instead of
pathnames.
Renamed __del__() to destroy() (because of circular refs, __del__
won't ever be called).
Added some names with explicit _set: focus_set, focus_default_set,
grab_set.
Added focus_default_none.
(Misc._getints): use tk.splitlist() instead of tk.split(), return
None if string empty.