home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
pc
/
0600
/
CCE_0632.ZIP
/
CCE_0632
/
GOBJ_111.ZIP
/
GOBJECTS.111
/
SOURCE
/
HELLO.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-03-03
|
1KB
|
48 lines
program Hello;
{ this is a complete GEM application, which opens a
window to print the 'Hello world' message; things
like iconifications are supported automatically }
uses
Gem,OTypes,OWindows;
type
TMyApplication = object(TApplication)
procedure InitMainWindow; virtual;
end;
PMyWindow = ^TMyWindow;
TMyWindow = object(TWindow)
procedure Paint(var PaintInfo: TPaintStruct); virtual;
end;
var
MyApplication: TMyApplication;
procedure TMyApplication.InitMainWindow;
begin
new(PMyWindow,Init(nil,''));
if (MainWindow=nil) or (ChkError<em_OK) then
Status:=em_InvalidMainWindow
end;
procedure TMyWindow.Paint(var PaintInfo: TPaintStruct);
begin
v_gtext(vdiHandle,Work.X+GP.charWidth,Work.Y+GP.boxHeight,
'Hello, ObjectGEM-world...')
{ this method uses the rectangle list _automatically_ }
end;
begin
MyApplication.Init('HWRL','Hello world');
MyApplication.Run;
MyApplication.Done
end.