Interfacce grafiche in Python - Agentgroup
Interfacce grafiche in Python - Agentgroup
Interfacce grafiche in Python - Agentgroup
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Paradigma ad eventi<br />
<br />
La realizzazione di una <strong>in</strong>terfaccia grafica ben si<br />
sposa con il paradigma di programmazione ad<br />
eventi<br />
<br />
Si def<strong>in</strong>iscono eventi le azioni possibili su un<br />
widget<br />
<br />
Pressione di bottone, spostamento della f<strong>in</strong>estra<br />
<br />
A ciascun evento può essere associata una<br />
funzione (handler, callback) che verrà <strong>in</strong>vocata al<br />
verificarsi dell'evento<br />
L'applicazione<br />
<br />
def<strong>in</strong>isce i widget<br />
<br />
associa i callback agli eventi<br />
<br />
esegue un ciclo <strong>in</strong>f<strong>in</strong>ito (ma<strong>in</strong> loop) <strong>in</strong> attesa degli<br />
eventi<br />
L<strong>in</strong>guaggi d<strong>in</strong>amici – A.A. 2010/2011<br />
6