adafruit / adafruit/Adafruit_CircuitPython_DisplayIO_Layout

`Control` class: Common response function names

Aperta
#19 24 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
13
Fork
16
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia esaminando il contesto della classe Control, l'esempio icon_widget e i riferimenti collegati nell'issue alla gestione degli eventi di PyGUI. Il lavoro è concluso quando la discussione raggiunge un accordo su un piccolo insieme di nomi comuni per le funzioni di risposta al tocco e al mouse e sui loro effetti previsti per il gestore principale degli eventi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
design, embedded-iot
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.