New CVS organisation with new naming convention
This commit is contained in:
82
bepascal/demos/demo/sources/main.pp
Normal file
82
bepascal/demos/demo/sources/main.pp
Normal file
@@ -0,0 +1,82 @@
|
||||
{ BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
Eric Jourde
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
}
|
||||
|
||||
program Main;
|
||||
|
||||
{$M+}
|
||||
uses
|
||||
beobj, application, message, _beep, roster, SysUtils,
|
||||
archivable, handler, rect, window, view, graphicdefs, dataio,
|
||||
invoker, messenger, Control, Button,stringview,textcontrol,checkbox,
|
||||
main_window;
|
||||
|
||||
type
|
||||
TMonApplication = class(BApplication)
|
||||
public
|
||||
procedure ReadyToRun; override;
|
||||
function QuitRequested : boolean; override;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function TMonApplication.QuitRequested : boolean;
|
||||
begin
|
||||
Result := inherited;
|
||||
be_app.Free;
|
||||
end;
|
||||
|
||||
procedure TMonApplication.ReadyToRun;
|
||||
var
|
||||
Mess : BMessage;
|
||||
begin
|
||||
inherited;
|
||||
Mess := BMessage.Create;
|
||||
try
|
||||
Mess.What := 7777;
|
||||
be_roster.Broadcast(Mess);
|
||||
finally
|
||||
Mess.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
var
|
||||
aRect : BRect;
|
||||
win : TMyWindow;
|
||||
|
||||
begin
|
||||
TMonApplication.Create;
|
||||
try
|
||||
aRect := BRect.Create(20, 20, 740, 500);
|
||||
win := TMyWindow.Create(aRect, 'BP Demo', B_TITLED_WINDOW, B_NOT_RESIZABLE or B_NOT_ZOOMABLE or B_QUIT_ON_WINDOW_CLOSE, B_CURRENT_WORKSPACE);
|
||||
win.Show;
|
||||
be_app.Run;
|
||||
be_app.HideCursor;
|
||||
be_app.ShowCursor;
|
||||
finally
|
||||
aRect.Free;
|
||||
win.Free;
|
||||
end;
|
||||
end.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user