home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best of German Only 1
/
romside_best_of_german_only_1.iso
/
wissen
/
dos
/
wgraph
/
entpack.exe
/
WGBSP!.EXE
/
BSP4.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-12-01
|
1KB
|
67 lines
program Beispiel4;
uses GApp,
GDecl,
GViews,
graph;
type TApplication=object(TApp)
procedure SetDesktopFrame(Titel:string);virtual;
procedure SetDesktopBackground; virtual;
end;
PNewDTBgrd=^TNewDTBgrd;
TNewDTBgrd=object(TDsktpBgrd)
procedure Draw;virtual;
end;
var MyProg:TApplication;
{Implementation TApplication}
procedure TApplication.SetDesktopFrame(Titel:string);
var R:TRect;
begin
with Desktop^ do
begin
GetBounds(R);
Frame:=new(PFrame, Init(R,R,Titel,winDouble+winPanel+winMenu));
Frame^.Palette:=Palette1;
List^.InsertItem(Frame);
end;
end;
procedure TApplication.SetDesktopBackground;
var R:TRect;
NBgrd:PNewDTBgrd;
begin
with Desktop^ do
begin
R:=Frame^.Area;
NBgrd:=new(PNewDTBgrd, Init(R));
NBgrd^.Palette[7]:=#14;
NBgrd^.Palette[8]:=#10;
List^.InsertItem(NBgrd);
end;
end;
{Implementation TNewDTBgrd}
procedure TNewDTBgrd.Draw;
begin
with Border do
begin
SetFillStyle(SolidFill,GetPalColor(7));
Bar(A.x,A.y,B.x,A.y+20);
SetFillStyle(HatchFill,GetPalColor(8));
Bar(A.x,A.y+22,B.x,B.y);
end;
end;
begin
MyProg.Init('Beispiel 4');
MyProg.Run;
MyProg.Done;
end.