home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 17
/
CD_ASCQ_17_101194.iso
/
dos
/
prg
/
mos
/
exemples
/
txt_src
/
buttons.pas
next >
Wrap
Pascal/Delphi Source File
|
1994-09-11
|
4KB
|
82 lines
{╔══════════════════════════════════════════════════════════════════════════╗
║ EXEMPLE D'UTILISATION DES FONCTIONS DE L'INTERFACE TEXTE ║
╠══════════════════════════════════════════════════════════════════════════╣
║ GESTION DES BOUTONS POUSSOIRS ║
╠══════════════════════════════════════════════════════════════════════════╣
║ Coded by Zuul as BouFFtou as Cheveau Frédéric. ║
║ Programmé à l'IUT de Montpellier sur Turbo Pascal V7.00. ║
║ Contact us on 36.14 RTEL1 - Bal "BouFFtou" or Bal "ICF". ║
╚══════════════════════════════════════════════════════════════════════════╝}
{$M 64000,0,365520} {*Stack and Heap*}
Program EXEMPLE;
Uses Crt,
ZUUL_MSE, {*Unités Nécessaires*}
ZUUL_SWA,
ZUUL_TOO,
ZUUL_COL,
ZUUL_GAD;
{╔═══════════════════════════════════════════════════════════════════════════╗
║ PROCEDURE PRINCIPALE ║
╚═══════════════════════════════════════════════════════════════════════════╝}
Procedure MAIN;
Var X0,Y0:Word; {*Save Pos Curseur for Resto*}
Flg_Esc:Boolean; {*Flag de sortie de la boucle*}
B0,B1,B2,B3,B4:But; {*Définition des Boutons*}
B5,B6,B7,B8,B9:But;
Begin
X0:=WhereX; Y0:=WhereY; {*Capture Position du Curseur*}
TextAttr:=143; {*Couleur de Fond Ecran*}
Box(1,1,80,25,False,False,False); {*Cls Screen*}
TextAttr:=120; {*Couleur de Fond Ecran*}
Box(20,2,60,4,True,False,False); {*Titre Ecran*}
Gotoxy(31,3); Writeln('GESTION DES BOUTONS');
Flg_Esc:=False; {*Flag de Sortie a False*}
BUTTON(5,2,15,7,128,B0,' EXIT '); {*Définition des Boutons*}
BUTTON(10,7,15,7,128,B1,' BOUTON GAUCHE ');
BUTTON(10,9,15,7,128,B2,' BOUTON CENTRE ');
BUTTON(10,11,15,7,128,B3,' BOUTON DROIT ');
BUTTON(10,22,15,7,128,B4,' LA TAILLE DU BOUTON PEUT ETRE TRES GRANDE, LA PREUVE... ');
BUTTON(40,7,11,7,128,B5,' LA COULEUR EST MODIFIABLE ');
BUTTON(40,9,15,3,128,B6,' LE FOND L''EST AUSSI ');
BUTTON(10,13,15,3,128,B7,' BOUTON SENSITIF 1 ');
BUTTON(10,15,15,3,128,B8,' BOUTON SENSITIF 2 ');
BUTTON(40,15,15,7,128,B9,' INACTIF ');
Repeat {*Boucle Principale*}
If GADMSG(B0,1)=True Then Flg_Esc:=True; {*Test Message Buttons*}
If GADMSG(B1,1)=True Then Writeln(#7);
If GADMSG(B2,2)=True Then Writeln(#7);
If GADMSG(B3,3)=True Then Writeln(#7);
If GADMSG(B4,1)=True Then Writeln(#7);
If GADMSG(B5,1)=True Then Writeln(#7);
If GADMSG(B6,1)=True Then Writeln(#7);
If GADMSG(B7,0)=True Then Writeln(#7);
If GADMSG(B8,10)=True Then Writeln(#7);
Until Flg_Esc=True; {*Test si Sortie = Ok*}
Gotoxy(X0,Y0); TC(7); BGC(0); {*Restore Couleurs*}
End;
{╔═══════════════════════════════════════════════════════════════════════════╗
║ PROGRAMME PRINCIPAL ║
╚═══════════════════════════════════════════════════════════════════════════╝}
Begin
CopyPage(0,3); {*Save Page écran*}
CursOff; {*Cache le Curseur*}
ShowMouse; {*Affiche la Souris*}
ExtendedCols; {*Passe en Couleurs Etendues*}
MAIN; {*Procedure Principale*}
NormalCols; {*Passe en Couleurs Normales*}
HideMouse; {*Planque la Souris*}
CursOn; {*Affiche le Curseur*}
CopyPage(3,0); {*Restore Page écran*}
End.