mirror of
https://git.sr.ht/~rabbits/macintosh_cookbook
synced 2025-01-16 03:30:16 +00:00
28 lines
427 B
ObjectPascal
28 lines
427 B
ObjectPascal
program ExampleGui1;
|
|
|
|
var
|
|
w: WindowPtr; {A window to draw in}
|
|
r: Rect; {The bounding box of the window}
|
|
|
|
procedure WindowInit;
|
|
begin
|
|
SetRect(r, 50, 50, 300, 100);
|
|
w := NewWindow(nil, r, '', true, zoomDocProc, WindowPtr(-1), false, 0);
|
|
SetPort(w);
|
|
end;
|
|
|
|
procedure MainLoop;
|
|
begin
|
|
TextSize(24);
|
|
MoveTo(20, 20);
|
|
DrawString('Hello world!');
|
|
repeat
|
|
until button;
|
|
end;
|
|
|
|
begin
|
|
|
|
WindowInit;
|
|
MainLoop;
|
|
|
|
end. |