toolgui
Modular event-driven GUI system for quickly building tools with Python and pyimgui.
Installation
pip install toolgui
Usage
Window
Create a window that can be opened from the menu bar.
import imgui
import toolgui
@toolgui.window("Example/Hello World")
def hello_example():
imgui.text("Hello!")
toolgui.set_app_name("Hello World Example")
toolgui.start_toolgui_app()
Settings
Persist state across sessions. Data is saved to the toolgui.ini file.
import imgui
import toolgui
@toolgui.settings("Number Picker")
class Settings:
my_number = 0
@toolgui.window("Example/Number Picker")
def number_picker():
Settings.my_number = imgui.input_int("My Number", Settings.my_number, 1)[1]
toolgui.set_app_name("Number Picker Example")
toolgui.start_toolgui_app()
Menu Item
Call a static function from the menu bar.
@toolgui.menu_item("Example/Reset")
def reset():
Settings.my_number = 0
Events
Event functions are executed by toolgui with these decorators.
Application Start
Executed when the application starts.
@toolgui.on_app_start()
def on_app_start():
print("Application started")
Application Quit
Executed when the application quits.
@toolgui.on_app_quit()
def on_app_quit():
print("Application quit")
Update
Executed every frame.
@toolgui.on_update()
def on_update():
# do_something()
Release files for toolgui 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toolgui-0.0.10.tar.gz | 94.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| toolgui-0.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 187.7 kB
Release files / toolgui-0.0.10.tar.gz
| Download URL | toolgui-0.0.10.tar.gz |
|---|---|
| Size | 94.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2b7999f28181be2ab71d50c0bca4c5ba8aefb99de3902532bb2a27df764626a
|
|
BLAKE2b-256 checksum How to use checksums |
df8fc4a3be7c9918dd4e103e4cd70c75c9865544b8b10308b6021c9af862bd71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.9
|
Release files / toolgui-0.0.10-py3-none-any.whl
| Download URL | toolgui-0.0.10-py3-none-any.whl |
|---|---|
| Size | 93.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c26171fe4b346a30828e1c7ee565553fc547020794f96ae7d593760861a20e0e
|
|
BLAKE2b-256 checksum How to use checksums |
07bd49d870f333f11c1708b161c8fa8e909c76f2eaa179ea0a4bab9e7958090d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.9
|