Metadata-Version: 2.4
Name: m45wxcontrols
Version: 0.3.0
Summary: Custom control wrappers for wxPython by M45Development.
Project-URL: Homepage, https://m45.dev
Project-URL: Source, https://github.com/schulle4u/m45wxcontrols
Project-URL: Issues, https://github.com/schulle4u/m45wxcontrols/issues
Project-URL: Documentation, https://schulle4u.github.io/m45wxcontrols/
Author-email: Steffen Schultz <steffenschultz@mailbox.org>
Maintainer-email: Steffen Schultz <steffenschultz@mailbox.org>
License: MIT
License-File: LICENSE
Keywords: a11y,accessibility,dataview,listbook,listctrl,screen-reader,spinctrldouble,wxpython,wxwidgets
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.10
Requires-Dist: wxpython>=4.2.0
Description-Content-Type: text/markdown

# M45wxControls
Custom control wrappers for wxPython by M45Development.

This package contains custom wrappers for existing wxPython controls, primarily to work around GUI limitations and solve accessibility issues. As these modules were built for my own projects, the supported features are likely to be incomplete. However, feel free to open an issue or contribute missing features as a pull request. 

## Installation

Until official PyPI packages are available, Grab the latest whl from the releases page and install it into your project environment. Then import one of the provided controls, e.g.: 

```
from m45wxcontrols import AccessibleSpinCtrl, CustomTextEntryDialog, UniversalListCtrl
```

## Controls

Below is an overview of all the control wrappers currently available. The full API documentation can be found in the 'docs' folder. 

### AccessibleListbook
Accessible `wx.Listbook`-style control using wx.ListBox for page selection.

The category list is a plain `wx.ListBox`, which is easier to use with screen readers on platforms where `wx.ListCtrl` accessibility is limited. Pages are ordinary `wx.Window` instances that are shown when their matching list entry is selected.

The following arguments are available: 

* `parent`: Parent wx window.
* `id`: Window id.
* `pos`: Initial position.
* `size`: Initial size.
* `style`: `wx.Panel` style flags.
* `name`: Control name.
* `list_width`: Width of the category list in pixels.

### AccessibleSpinCtrl
An accessible floating-point spin control composed of wx widgets. Can be used as a more accessible alternative to `wx.SpinCtrlDouble`.

The control exposes a labeled text field as the primary interaction point and keeps a wx.SpinButton in sync for mouse users. Arrow keys on the text field adjust the value directly, which makes the widget easier to use with screen readers. 

The following arguments are available: 

* `parent`: Parent wx window that owns the child controls.
* `label_text`: Label shown next to the text field and used as its accessible name.
* `initial_val`: Initial numeric value displayed in the control.
* `min_val`: Minimum allowed value.
* `max_val`: Maximum allowed value.
* `inc`: Increment used by the spin button and Up/Down arrow keys.

### CustomTextEntryDialog
Text entry dialog with custom button labels.

The dialog mirrors the simple wx.TextEntryDialog workflow while allowing callers to provide custom OK and Cancel labels.

The following arguments are available: 

* `parent`: Parent window (MainFrame)
* `message`: text input message
* `caption`: text input caption
* `default_value`: optional default value
* `ok_label`: optional OK button label (default: `&OK`)
* `cancel_label`: optional cancel button label (default: `&Cancel`)

### UniversalListCtrl
Cross-platform list wrapper with optional checkbox support.

`wx.ListCtrl` is used on Windows, while `wx.dataview.DataViewListCtrl` is used on Linux and macOS for better accessibility. The wrapper normalizes list operations used by applications so callers do not need to branch on the active control type.

The following arguments are available: 

* `parent`: Parent wx window.
* `size`: Initial control size (default: `wx.DefaultSize`).
* `style`: wx style flags applied to the underlying list control (default: `wx.LC_REPORT | wx.BORDER_SUNKEN`).
* `checkboxes`: Whether rows should support checked/unchecked state (default: False).
* `force_dataview`: Force DataViewListCtrl even on platforms that would normally use wx.ListCtrl (default: False).

## License

MIT License - See LICENSE file for details

## Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

