Metadata-Version: 2.1
Name: tkutils
Version: 0.1.2
Summary: Python tkinter utilities.
Home-page: http://frederic.zinelli.gitlab.io/tkutils/
License: FreeBSD
Author: Frédéric Zinelli
Author-email: frederic.zinelli@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: Pillow (>=9.3.0,<10.0.0)
Project-URL: Repository, https://gitlab.com/frederic.zinelli/tkutils
Description-Content-Type: text/markdown

# Welcome to TkUtils

`tkutils` is a package offering some additional logic and syntactic sugar when using tkinter.
The main goal is to fill some gaps of tkinter, which might make it very annoying to use.

Online version of the help documentation: http://frederic.zinelli.gitlab.io/tkutils/



## Features


### Additional logic: two-way binding with [`Binder`](http://frederic.zinelli.gitlab.io/tkutils/binder/binder_overview/)

The [`Binder`](http://frederic.zinelli.gitlab.io/tkutils/binder/binder_overview/) class is an utility to setup a transparent two-way
binding reactivity between widgets and underlying object properties from the model/logic layer
of the application.

Several advantages come with this:

* Changes of bound properties in the model layer are automatically cascading in the GUI as well.
* The model layer of the application becomes (finally) totally independent from the presentation
  layer. This means it becomes very easy to build and test the model layer, without the need to
  think about its integration with `tkinter` itself.



### Syntactic sugar


#### [`GridLayout`](http://frederic.zinelli.gitlab.io/tkutils/grid_layout/grid_layout/)

A grid layout manager which is abstracting away all the naughty `widget.grid(...)` calls and
rows/columns grid configuration. Positioning widgets in the grid and controlling their "spanning"
becomes very easy, without extra typing.


#### [`MenuBuilder`](http://frederic.zinelli.gitlab.io/tkutils/menu_builder/menu_builder/)

A helper to build menus and to abstract away all the technicalities when declaring menu cascades
options and are making their basic `tkinter` declarations very tedious and unclear.

With the [`MenuBuilder`](http://frederic.zinelli.gitlab.io/tkutils/menu_builder/menu_builder/), the actual Menu hierarchy becomes very
obvious: "what you see is what you get".


#### [`Event`](http://frederic.zinelli.gitlab.io/tkutils/event/)

An utility to build event strings with autocompletion/IDE suggestions support.


#### [`KeySym`](http://frederic.zinelli.gitlab.io/tkutils/key_sym/)

An utility to get all keysym informations with autocompletion/IDE suggestions (providing string,
keycode and keysym_num values).


#### [`images`](http://frederic.zinelli.gitlab.io/tkutils/images/images/)

Various factories related to images to:

* Simplify and reduce the syntaxes/typing needed,
* Handle file conversions automatically,
* Register automatically the image object on the host for the user (to avoid garbage collection).




## Requirements

- python 3.8+
- Pillow



## Installation

* Through PyPi:

```bash
pip install tkutils
```

* Using an archive file (with the appropriate version number):

```bash
pip install tkutils.1.0.2.tar.gz
```

* Cloning the [GitLab repository](https://gitlab.com/frederic.zinelli/tkutils).


