_REF
Window package: provide a window + a touch display
For windowing system, we try to use the best windowing system available for your system. Actually, theses libraries are handled :
- PyGame (wrapper around SDL)
- GLUT (last solution, really buggy :/)
Bases: pymt.event.EventDispatcher
BaseWindow is a abstract window widget, for any window implementation.
Warning
The parameters are not working in normal case. Because at import, PyMT create a default OpenGL window, to add the ability to use OpenGL directives, texture creation.. before creating MTWindow. If you don’t like this behavior, you can include before the very first import of PyMT
import os
os.environ['PYMT_SHADOW'] = '0'
from pymt import *
This will forbid PyMT to create the default window !
| Parameters : |
|
|---|---|
| Styles : |
|
Add a widget on window
Called at __init__ time to applied css attribute in current class.
Clear the window with background color
Close the window
Will create the main window and configure it
Dispatch all events from windows
Draw the window background
Compatibility for MouseTouch, drawing a little red circle around under each mouse touches.
Flip between buffers
Event called when the window is closed
Event called when window we are drawing window. This function are cleaning the buffer with bg-color css, and call children drawing + show fps timer on demand
Flip between buffers (event)
Event called when a key is down (same arguments as on_keyboard)
Event called when a key is up (same arguments as on_keyboard)
Event called when keyboard is in action
Warning
Some providers can skip scancode or unicode !!
Event called when mouse is in action (press/release)
Event called when mouse is moving, with buttons pressed
Event called when mouse is moving, with buttons pressed
Event called when the window is resized
Event called when a touch is down
Event called when a touch move
Event called when a touch up
Event called when window are update the widget tree. (Usually before on_draw call.)
Called when css want to be reloaded from scratch
Remove a widget from window
Toggle fullscreen on window
Get/set the wallpaper (must be a valid filename)
Get/set the wallpaper position (can be one of”norepeat”, “center”, “repeat”, “scale”, “strech”)
Bases: pymt.ui.widgets.widget.MTWidget
MTDisplay is a widget that draw a circle under every touch on window.
| Parameters : |
|
|---|---|
| Styles : |
|
Draw a circle under every touches