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 / BSP8.PAS < prev    next >
Pascal/Delphi Source File  |  1992-12-01  |  2KB  |  99 lines

  1. program Beispiel8;
  2.  
  3. uses GApp,
  4.      GDecl,
  5.      GViews,
  6.      GText,
  7.      GHelp,
  8.      Graph;
  9.  
  10.  
  11. const cmNew    = 101;   cmRestore   = 201;
  12.       cmLoad   = 102;   cmCut       = 202;
  13.       cmSave   = 103;   cmCopy      = 203;
  14.       cmPrint  = 104;   cmMove      = 204;
  15.       cmErase  = 105;   cmTurn      = 204;
  16.  
  17.       cmMagni  = 301;   cmRoman     = 401;
  18.       cmGrid   = 302;   cmScript    = 402;
  19.       cmPencel = 303;   cmTimes     = 403;
  20.       cmBrush  = 304;   cmNormal    = 404;
  21.                         cmBold      = 405;
  22.                         cmItalic    = 406;
  23.                         cmUnderline = 407;
  24.  
  25.  
  26.  
  27. type TApplication=object(TApp)
  28.        procedure SetDesktopFrame(Titel:string);virtual;
  29.        procedure SetDesktopBackground; virtual;
  30.        procedure InitMenuBar; virtual;
  31.      end;
  32.  
  33.      PNewDTBgrd=^TNewDTBgrd;
  34.      TNewDTBgrd=object(TDsktpBgrd)
  35.        procedure Draw;virtual;
  36.      end;
  37.  
  38. var MyProg:TApplication;
  39.  
  40. {Implementation TApplication}
  41.  
  42. procedure TApplication.SetDesktopFrame(Titel:string);
  43. var R:TRect;
  44. begin
  45.   with Desktop^ do
  46.    begin
  47.      GetBounds(R);
  48.      Frame:=new(PFrame, Init(R,R,Titel,winDouble+winPanel+winMenu));
  49.      Frame^.Palette:=Palette1;
  50.      List^.InsertItem(Frame);
  51.    end;
  52. end;
  53.  
  54. procedure TApplication.SetDesktopBackground;
  55. var R:TRect;
  56.     NBgrd:PNewDTBgrd;
  57. begin
  58.   with Desktop^ do
  59.    begin
  60.      R:=Frame^.Area;
  61.      NBgrd:=new(PNewDTBgrd, Init(R));
  62.      NBgrd^.Palette[7]:=#14;
  63.      NBgrd^.Palette[8]:=#7;
  64.      List^.InsertItem(NBgrd);
  65.    end;
  66. end;
  67.  
  68. procedure TApplication.InitMenuBar;
  69. begin
  70.   SetFont(Thin16);
  71.   SetOnlineHelp('Help.hlp');
  72.   Sprache:=Englisch;
  73.   Palette[1]:=#14;
  74.   Palette[5]:=#14;
  75.   Palette[4]:=#4;
  76.   Palette[12]:=#4;
  77.   LoadMenu('BSP8.MNU');
  78. end;
  79.  
  80.  
  81. {Implementation TNewDTBgrd}
  82.  
  83. procedure TNewDTBgrd.Draw;
  84. begin
  85.   with Border do
  86.    begin
  87.      SetFillStyle(SolidFill,GetPalColor(7));
  88.      Bar(A.x,A.y,B.x,A.y+20);
  89.      SetFillStyle(SolidFill,GetPalColor(8));
  90.      Bar(A.x,A.y+22,B.x,B.y);
  91.    end;
  92. end;
  93.  
  94.  
  95. begin
  96.   MyProg.Init('Beispiel 8');
  97.   MyProg.Run;
  98.   MyProg.Done;
  99. end.