This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author markroseman
Recipients kbk, markroseman, roger.serwy, terry.reedy
Date 2015-09-08.23:03:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441753399.73.0.466397630291.issue25036@psf.upfronthosting.co.za>
In-reply-to
Content
A necessary prerequisite of tabbed windows, editor and shell in same window etc. as per #24826, is that editors stop thinking they are in their own toplevel window.

The attached component.patch is unfortunately long, but this was necessary due to the highly inter-related nature of the changes. It results in no functionality changes to IDLE at this point, just a reorganization.

In summary, WindowList.ListedToplevel was abstracted into a more general Container, which will later be expanded to do more than just a simple toplevel (though that is all it is now). EditorWindow (and friends) no longer call window operations like wm_title themselves, but go through a Container API.

At the same time, a new Component base class was created, which EditorWindow and several others now inherit from. Components get inserted into Containers of course, and the base class ensures certain things the Container needs are present. (The Component also can respond to callbacks from other Components sent via the file list; this approach is used in the patch in #25031 for configuration changes).

Finally, what remained of WindowList (effectively a simplified WindowList class, but not ListedTopLevel) was folded into FileList.

In terms of understanding and/or reviewing this patch, I'd recommend the following:
  1. start with container.py
  2. then component.py
  3. then a simple example of how it's applied, ClassBrowser.py
  4. a slightly more verbose, but equally simple example, Debugger.py
  5. FileList.py (mostly comes from WindowList, but note how used by container.py
  6. then EditorWindow.py
History
Date User Action Args
2015-09-08 23:03:24markrosemansetrecipients: + markroseman, terry.reedy, kbk, roger.serwy
2015-09-08 23:03:19markrosemansetmessageid: <1441753399.73.0.466397630291.issue25036@psf.upfronthosting.co.za>
2015-09-08 23:03:19markrosemanlinkissue25036 messages
2015-09-08 23:03:19markrosemancreate