Metadata-Version: 2.4
Name: wxutils
Version: 0.3.6
Summary: utilities and conveniences for wxPython
Author-email: Matthew Newville <matt.newville@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/newville/wxutils
Project-URL: Documentation, https://github.com/newville/wxutils
Project-URL: Tracker, https://github.com/newville/wxutils/issues
Keywords: wxPython
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: wxPython>=4.1.0
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: doc
Requires-Dist: Sphinx; extra == "doc"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: coverage; extra == "test"
Provides-Extra: all
Requires-Dist: wxutils[dev,doc,test]; extra == "all"
Dynamic: license-file

wxutils
=======

wxutils provides wxPython utilities and convenience functions.  The wxutils
library is a small collection of functions and classes, and is by no means
comprehensive.

The aim is to simplify code, reduce boiler-plate, make wxPython coding a
bit more python-like, and prevent repeating code across several projects.

The largest share of classes in wxutils are simplified versions of wxPython
widgets with limited but common attributes and patterns.  For example::

   btn = wxutils.Button(parent, label, action=action, **kws)

binds a callback function (the "action") to a wx.Button, corresponding to::

   b = wx.Button(parent, label=label, **kws)
   if callable(action):
       parent.Bind(wx.EVT_BUTTON, action, b)

Yes, this can be viewed as merely a convenience, and not completely
general.  But it is a remarkably common pattern (at least in my code),
replaces 3 lines with 1, and hides the ugliest parts of wxPython.

There are several similar convenience widgets, including Check, Choice, and
SimpleText (a simplified variant of StaticText), MenuItem, Font, HLine,
OkCancel, HyperText.

In addition, there are more complex widgets, such as

* ``FloatCtrl`` a wx.TextCrtl that allows numerical input only. Precision,
  upper bound, and lower bound can be set, and a callback can be bound to
  the control.

* ``NumericCombo`` wx.ComboBox with a FloatCtrl

* ``EditableListBox`` a list box with a built-in popup menu to arrange order of
  the items with "move up/down, to top, to bottom"

* ``YesNo`` a wx.Choice of only 'No' and 'Yes'

* ``GridPanel`` a combined GridBagSizer and Panel that simplifies adding
  widgets to a GridBagSizer.

* ``FileOpen``, ``FileSave`` wrappers (supporting wildcards) to FileDialog.

And some other miscellaneous stuff as well.  Yeah, it's sort of a motley collection.
