TODO items for PLIB as of Version 0.6.1

:Author:        Peter A. Donis
:Last Updated:  13 December 2009

Planned Features
----------------

- Add Python 3.0 version (will be found on PyPI as
  the ``plib3`` package).

- Add Cocoa (Mac OS X GUI framework) to the list of
  toolkits supported by ``plib.gui``.

- ``PTCPServer`` needs to have a more robust method of
  determining where its log file resides (perhaps
  use the ``logging`` module in the standard library?).

- Automate the linking of target event handlers to
  controls defined by specs from ``specs.py`` (the
  spec can't take them directly because they have to
  be bound methods so you need self to get them).

- Add image and movie display widgets to ``plib.gui``.

- Add an HTML browser widget to ``plib.gui``.

- Need a built-in way to add new constants to
  ``plib.gui.defs`` and adjust the variables in
  ``plib.gui.common`` appropriately (the current
  incantations needed are in ``scrips-edit.py`` and
  are too hackish).

- Is tri-state check box support really needed? Or
  can it be factored out into a separate class
  (``PTriStateCheckBox``)?

- Add center/right justify options to ``PTextLabel``
  (maybe also vertical alignment options).

- Add color capability to widgets other than the table
  widget.

- Add color support for the GTK toolkit.

- Fix bugs due to various idiosyncrasies in the list
  view controls for each toolkit. (Presently none of
  them fully conform to the desired behavior, mainly
  because the toolkit methods don't seem to do what they
  say they do.)

- The status bar "custom widgets" may be too much;
  may only need to allow more text fields after the
  first, with some way of getting/setting the text.
  Also, add an example program that demonstrates the
  status bar functionality.

- Need to add some real bonus functionality to the
  KDE GUI support (otherwise there's no point to having it
  in addition to Qt). For example: add an 'About KDE'
  action that is only present when using KDE. (BTW, also
  need to figure out why the program icon displays in the
  system menu corner of the KDE About dialog instead of
  in the main dialog area--huh?)

- Add a ``WEB`` (or ``WWW``) GUI toolkit that allows the
  same declarative method of specifying a GUI to be used
  in web applications.

- Publish and enforce standard interfaces for widget events
  (each toolkit does them a bit differently, need to hide
  this under a common layer).

- Add standard config file for GUI programs to store things
  like last window size and position, etc.; subclass from
  ``PIniFile`` and have standard ``PPrefsDialog`` to match,
  all accessible when you use ``PMainWindow``.

- Make sure that coverage is complete for common widget
  methods.

- Enforce consistent ordering of base classes for widgets.

- Enforce consistent handling of class and instance variables
  (e.g., the ``_parent`` variable should be set in the same
  place for all widgets)--this applies particularly to the
  GTK toolkit (lots of cruft in there).

- Find a way to have the actual GUI widgets (from the chosen
  toolkit) take their docstrings from the base widgets (which
  define the API).

- When Python adds the capability, have the ``ModuleProxy``
  class provide a ``__dir__`` method (or whatever the final
  mechanism is) so that it can provide more information about
  what attributes are available.

- Is there a way to refactor the ``PLIB.XML`` sub-package so
  that DTD generation is an overlay that can be imported only
  when it is needed?

- Enforce common conventions for method and attribute names.

- Continue to add tests. Also, possibly make ``plib.test``
  importable as a package (currently when I try this it breaks
  the automatic inclusion of doctest test files, so that needs
  to be figured out first).

Bug/Workaround Fixes
--------------------

- The Qt 4 panel doesn't appear to automatically size itself
  to its sub-widget(s).

- The tab key doesn't move between controls in wx and Gtk.

- Read-only widgets are still in the tab order in Qt/KDE
  (disabled widgets aren't, but the point of read-only widgets
  is to not have user input but look normal, not greyed out).

- The GTK top/main window sizes itself too small when sizing
  to client.

- The wxWidgets top/main window doesn't set its minimum client
  area per the client widget (i.e., resizing by the user can
  resize the top window smaller than its client).

- The wxWidgets "stock" item behavior seems inconsistent;
  the stock item doesn't always override a custom caption
  and image for menu and toolbar items, even though it
  should based on comparison with the corresponding GTK
  code.

- The wxWidgets tab widget is firing a tab changed
  event on shutdown, after the status bar has been
  deleted (causes exception in ``pxmlview.py``--currently
  a hack is being used to mask this).

- The wxWidgets tree/list view spaces lines differently
  for the 2nd tab than the 1st in ``pxmlview.py``.

- The GTK message dialog doesn't work correctly
  with OK/Cancel buttons; both buttons appear to
  return the "OK" response.

- The GTK file open/save dialogs won't open; need
  bug fix (parent window of dialog seems incorrect).

- The current GUI layout code does not support setting
  different margins for top/bottom vs. left/right sides
  of a panel; this is because there is no easy way to
  do this in GTK. As a result, currently if margins are
  not set all around, buttons and combos in GTK will
  expand to the edge of their containing panel, which is
  usually not what is wanted. The only workarounds are
  to use margins on all sides (meaning a little extra
  spacing at the edges of panels that contain buttons
  and combos) or to enclose each individual button and
  combo in its own panel (which is messy).

- The GTK table widget is much too crude. If I can figure
  out workarounds for the quirks of wxWidgets when using
  GTK under the hood, this issue will probably be what
  drives me to drop direct GTK support in ``PLIB.GUI``.
