adafruit / adafruit/Adafruit_CircuitPython_DisplayIO_Layout
`Control` class: Common response function names
- Vorherrschende Sprache
- Python
- Sterne
- 13
- Forks
- 16
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
With the advent of new widgets such as `icon_widget`, a clear need has arisen for common function naming schemes for the `Control` class. The objective is so that the main event handler can use a common approach for calling multiple widgets to respond to various input events.
Of course, widgets aren't required to conform to any pre-defined response functions, but it will likely make it easier to write a Main loop event handler if widgets have the same function naming and a common expected effect.
----------
Here's one example. Looking at the [PyGUI](https://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/version/Doc/index.html), it defines responses to [four mouse events](https://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/version/Doc/event_handling.html):
- mouse down
- mouse up
- mouse drag (button is pressed)
- mouse move (button is not pressed)
----------
**This issue is raised to gather suggestions for the basic response functions to use in the `Control` class.**
Let's discuss a few basic functions that make sense in a touch environment on small microcontroller screens. The objective is not to collect 100% of cases, but to capture the few things that would be most used, and then grow from there.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit der Durchsicht des Kontexts der Klasse Control, des Beispiels icon_widget und der im Issue verlinkten Referenzen zur Ereignisbehandlung von PyGUI. Die Arbeit ist abgeschlossen, wenn die Diskussion eine Einigung über eine kleine Gruppe gemeinsamer Namen für Touch- und Mausreaktionsfunktionen sowie deren erwartete Auswirkungen auf den Hauptereignis-Handler erreicht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- design, embedded-iot
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100