uses
  objects,
  iodrv,
  controls,
  grctrls,
  PCDrv,
  PCMCus,
  fonts,
  Foss16;

var
  R  : TRect;
  ap : PApplication;
  pg : PPage;
  st : PStaticText;
  bt : PButton;

begin
  ap := new( PApplication, init(
          new( PInputDriver, init(
            new( PPCKeybDriver, init ),
            new( PPCMouseDriver, init )
          )),
          new( PVgaMonoDriver, init( 640, 480 )),
          nil
        ));
  ap^.Customize( ccApplication );
  ap^.SetFont( fidSS16 );

    R.Assign( 0, 0, 320, 240 );
    pg := new( PPage, Init( R ));
    pg^.Customize( ccPage );

      R.Assign( 1, 1, 319, 18 );
      st := new( PStaticText , init( R, 'Ahoj' ));
      st^.Customize( ccStaticText );
      pg^.Insert( st );

      R.Assign( 120, 100, 200, 120 );
      bt := new( PButton, init( R, 'Stiskni', 0, 0 ));
      bt^.Customize( ccButton );
      pg^.Insert( bt );

    ap^.Insert( pg );

  ap^.Run;
  dispose( ap, done );
end.