home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
dos
/
tegl_ii
/
intro
/
exevent1.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-04
|
2KB
|
89 lines
{$F+} { -- far code model is required for any functions that }
{ -- are to be used as Event Handlers }
Uses
dos,
tgraph,
virtmem,
teglfont,
fastgrph,
TEGLIntr,
TEGLICON,
TEGLUnit,
TEGLMain,
TEGLMenu,
SenseMs,
DebugUnt;
VAR
om1, om2 : OptionMPtr;
FUNCTION GetMsSense(FS:imagestkptr; Ms: msclickptr) : WORD;
BEGIN
SetMouseSense(fs^.x,fs^.y);
GetMsSense := 1;
END;
{-- This event will open up a frame and display a message. Then }
{-- it returns leaving the frame displayed. Since no event has }
{-- been defined to close this frame then it will stay up, there }
{-- is no way to get rid of it. }
FUNCTION InfoOption(FS:imagestkptr; Ms: MsClickPtr) : WORD;
VAR
x,y,x1,y1 : WORD;
IFS : ImageStkPtr;
BEGIN
Hidemouse;
x := 200;
y := 120;
x1 := x+340;
y1 := y+100;
PushImage(x,y,x1,y1);
IFS := StackPtr;
SetColor(White);
ShadowBox(x,y,x1,y1);
SetColor(Black);
OutTEGLtextxy(x+5,y+5,'TEGL Windows Toolkit II');
OutTEGLtextxy(x+5,y+5+TEGLCharHeight,
'Jan 1,1990, Program Written by Richard Tom');
ShowMouse;
InfoOption := 1;
END;
BEGIN
EasyTEGL;
om1 := CreateOptionMenu(@Font14);
DefineOptions(om1,' ~O~pen ', true, NilUnitProc);
DefineOptions(om1,' ~I~nfo...',true, InfoOption);
DefineOptions(om1,'-', false,NilUnitProc);
DefineOptions(om1,' ~Q~uit ', true, Quit);
om2 := CreateOptionMenu(@Font14);
DefineOptions(om2,' ~M~emory ',true,ShowCoordinates);
DefineOptions(om2,' ~M~ouse Sensitivity ',true,GetMsSense);
CreateBarMenu(0,0,getmaxx);
OutBarOption(' ~F~ile ',om1);
OutBarOption(' ~U~tility ',om2);
{ -- control is then passed to the supervisor }
TEGLSupervisor;
END.