[lazarus] Lazarus-project
JOSSE.COLPAERT at student.kuleuven.ac.be
JOSSE.COLPAERT at student.kuleuven.ac.be
Thu Jun 27 06:02:12 EDT 2002
Dear Lazarus team,
Being interested in the Lazarus project, I want to study the source code and
hope to contribute some time myself.
Having started now, I wrote a document about what I already know in order to be
useful to other starters and also in order to ask you for how to proceed. I
attached it in this mail in KWord/HTML format.
Some questions still arise for me:
- What's the status of the LCL itself? Is that stable? Is it exactly Delphi's?
- What parts of Lazarus are developed in Lazarus itself?
Sincerely,
Josse Colpaert
(Mail: Josse.Colpaert at student.kuleuven.ac.be)
Title: lazarus.html
The Lazarus IDE: How the program is being built
1 General ideas
The program uses as the programs in itself the LCL or Lazarus Component Library, which can be seen as the replacement of the VCL or Visual Component Library in Delphi/Kylix. Also, some extra file extensions are necessary: the .lfm-file or Lazarus Form, the .lpr-file or Lazarus Project file, the .lrs or Lazarus Resource file.
2 How the program starts
The program starts from the file lazarus.pp. In that file, you can find between begin and end. how the application starts. In the uses clause you will find the units directly associated with that code. And maybe it's not a bad thing to start explaining what each unit stands for.
uses
{$IFDEF IDE_MEM_CHECK}
MemCheck,
{$ENDIF}
Forms,
Splash,
Main,
MainBar,
MsgView,
FindReplaceDialog,
FindInFilesDlg,
aboutfrm;
Forms is a unit out of the LCL, so can be compared to the Delphi Forms unit. It contains the code to start an application which uses the LCL and contains the classes TForm, TCustomForm, TApplication, TScreen, THintWindow. Application is a variable out of that unit and Application.Initialize will start that application and take control over event-handling and such.
The rest of the units are from Lazarus itself. The Splash unit contains the splashing form with the Lazarus symbol appearing when you start the Lazarus IDE. The other units (except Main/Mainbar) are also for forms and are here to create them within the application.
MainBar contains the TMainIDEBar class and main.pp the TMainIDE class.
The TMainIDE has the following inheritance scheme:
TObject -> TCustomForm -> TForm -> TMainIDEBar -> TMainIDE
I copied the code out of lazarus.pp and wrote some extra comments in it:
begin
Application.Initialize; {Initializes the application as an LCL-application and lets LCL take control}
TMainIde.ParseCmdLineOptions; {TMainIDE from MainIDE, parsing the command-line options}
// Show splashform
SplashForm := TSplashForm.Create(nil);
with SplashForm do begin
Show;
Paint;
end;
Application.ProcessMessages; // process splash paint message
Application.CreateForm(TMainIDE, MainIDE); //MainIDE is a variable out of TMainIDEBar
{$IFDEF IDE_MEM_CHECK}
CheckHeap('TMainIDE created');
{$ENDIF}
{Creating those forms associated with the units}
Application.CreateForm(TMessagesView, MessagesView);//MessagesView will be a variable out of the unit MsgView
Application.CreateForm(TLazFindReplaceDialog, FindReplaceDlg);
Application.CreateForm(TLazFindInFilesDialog, FindInFilesDialog);
SplashForm.StartTimer;
Application.Run;
SplashForm.Free;
writeln('LAZARUS END');
end.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00014.bin
Type: application/octet-stream
Size: 3701 bytes
Desc: "LazarusIDEinternals.doc"
Url : http://localhost/pipermail/lazarus/attachments/20020627/8cbd5076/bin00014.bin
More information about the Lazarus
mailing list