La lecture à portée de main
Description
Informations
Publié par | Herif |
Nombre de lectures | 271 |
Langue | Français |
Extrait
Partie 4
Programmation
événementielle
Stéphanie Jean-Daubias
INFO
Stephanie.Jean-Daubias@liris.univ-lyon1.fr
http://liris.cnrs.fr/stephanie.jean-daubias/
L3
SJD - LIRIS - UCBL : IHM - L3 infoPlan du cours
Programmation événementielle
Introduction
o Delphi
o Propriétés
o Composants
o Événements
PLAN o Exemple de programme
2
SJD - LIRIS - UCBL : IHM - L3 infoIHM : introduction – conception – éléments des IHM – progr. événementielle – web – handicap – évaluation
Dialogues directifs
o Logique o Exemples : DOS, shell
Nom du client ? UNIX> DupontTraitement 1
o ImplémentationAdresse ?
> 3 rue des platanes
Traitement 2 Dupont, 3 rue des platanes
Confirmer ? (o/n)
> s
Veuillez entrer'o' ou'n', svp.Traitement 3
>
// Traitement 1
Afficher "Nom du client ? :"
Attendre Nom
Effectuer traitement sur Nom
... 3
SJD - LIRIS - UCBL : IHM - L3 infoIHM : introduction – conception – éléments des IHM – progr. événementielle – web – handicap – évaluation
Dialogues réactifs
o Logique o Exemples : Windows,
MacOS
o ImplémentationProposer choix
Proposer choix Répéter
Attendre Choix
Si Choix=Choix 1 Alors
Exécuter Traitement 1
Attendre choix Si Choix=Choix 2 Alors
Exécuter Traitement 2
Fin Répéterchoix 1 choix 2
Traitement 1 Traitement 2
4
SJD - LIRIS - UCBL : IHM - L3 infoIHM : introduction – conception – éléments des IHM – progr. événementielle – web – handicap – évaluation
Événements
o Exemples : Windowso Logique
o Implémentation
Répéter
Effectuer tâches système
Entretenir curseur
Ok Cancel Si événement alors
Récupérer événement suivant
Distribuer événement
Fin Répéter
ProcédureSaisie
Distribuer événement =
ProcédureOk Si événement 1 alors traitement 1
Si événement 2 alors traitement 2
...ProcédureCancel
5
SJD - LIRIS - UCBL : IHM - L3 infoIHM : introduction – conception – éléments des IHM – progr. événementielle – web – handicap – évaluation
File d’événements
o Rôle
gérer l’arrivée et l’exécution des événements
Ok Cancel
6
SJD - LIRIS - UCBL : IHM - L3 infoPlan du cours
Programmation événementielle
Introduction
Delphi
o Propriétés
o Composants
o Événements
PLAN o Exemple de programme
7
SJD - LIRIS - UCBL : IHM - L3 infoIHM : introduction – conception – éléments des IHM – progr. événementielle – web – handicap – évaluation
Delphi
o Environnement de développement rapide d’applications
o Pascal
o Programmation orientée objet
oation visuelle
o Programmation événementielle
8
SJD - LIRIS - UCBL : IHM - L3 infoIHM : introduction – conception – éléments des IHM – progr. événementielle – web – handicap – évaluation
L’environnement Delphi
Menus
Barres d’outils
Inspecteur d’objets :
- Événements
- Propriétés
ouvrir une unité du projet
ouvrir une fiche du projet
passer de la fiche à l'unité
associée
9Éditeur de code Fiche Palette de composantsSJD - LIRIS - UCBL : IHM - L3 infoIHM : introduction – conception – éléments des IHM – progr. événementielle – web – handicap – évaluation
Les fichiers Delphi
o .DPR Fichier projet
Delphi PRoject
fichier projet Unité 1 Fiche 1
o .PAS
Unité 2 PAScal
unités
o .DFM
Delphi ForM
fiches
o .~???
copies des fichiers
10
SJD - LIRIS - UCBL : IHM - L3 info