Linux Gui Development
Linux Gui Development
Linux Gui Development
Kylix
by Leland Brode
ELB Software
elbrode2@attbi.com
Outline
by Leland Brode
ELB Software
elbrode2@attbi.com
Basic, COBOL, C
Generates Messages
All Text
PowerBuilder
Visual Age
Digitalk, ParcPlace Smalltalk
Forte ( now at Sun)
Visual C++
Borland C++
Borland Delphi
Borland C++Builder
-------------------------Visual Caf - Java
JBuilder - Java
Linux Developement
GNU
Linux Toolkit
GCC
Compiles C, C++, Objective C,
Fortran
Handles Front-ends for Pascal,
Modula-3, Ada
Distributed with Linux
Perl,
Shell scripting
Linux Developement
Qt Class Library
C++
Cross Platform
Qt/Windows
Qt/X11 (Linux, Solaris, HPUX, AIX,
etc)
Qt/Mac
Linux Development
Qt
Class Libray
Event Handlers
Linux Development
Open
Source IDEs
KDevelop www.kdevelop.org
KDE Studio
www.thekompany.com/projects/kdestudio
Code Crusader www.newplanetsoftware.com
VDK Builder vdkbuilder.sourceforge.net
Source-Navigator
sources.redhat.com/sourcenav
Delphi Background
Borlands Delphi =
Pascal, plus
Borlands implementation of OO in
Pascal, plus
GUI IDE, plus
Visual Component Library (VCL)
- encapsulates Windows controls
Delphi
Pascal
http://www.engin.umd.umich.edu/CIS/course.des/cis400/index.html
http://www.emsps.com/oldtools/borpasv.htm
Delphi
GUI
Integrated Development
Environment
Delphi
IDE
project manager
keeps
code editor
code
completion
variables
change variables
breakpoints
step through code
Kylix
Port
of Delphi to Linux
OO Pascal
Delphi IDE
native Linux compiler
Class Library - CLX
Object wrappers for Qt widgets
Delphis
Kylix
Class
Libraries
CLX is to Kylix
VCL is to Delphi, C++Builder
MFC is to Visual C++
Qt is to KDE
GTK is to GNOME
CLX runs on Linux and Windows
Delphi
VCL
Class Library
Kylix
CLX
Class Library
Kylix
Pascal
Language
- .pas file
form - .dfm file
( each form has a .pas file )
Kylix
Pascal
Data types
Language
Arrays
Kylix
Pascal
Language
String dynamic
Concat,
Pointers
Exceptions
Try-except
File IO
function returns value
procedure no return value
Kylix
Pascal
Language - function
Kylix
Pascal
type
TAccount = class
private
fNumber : Cardinal;
fBalance : Currency;
public
procedure WithDraw(Amount : Currency);
end;
TSavingsAccount = class (TAccount)
private
fReturnCheck : Boolean
end;
TCertificateof Deposit = class(TSavingsAccount)
private
fTerm : Cardinal;
end;
Kylix
Pascal
var
CD1, CD2 : TAccount;
begin
CD1 := TCertificateofDeposit.Create;
CD2 := TCertificateofDeposit.Create;
CD1.WithDraw(100.00);
CD1.Free;
CD2.Free;
end;
Kylix
Pascal
type
PersonType = record
LastName : String[10];
FirstName : String[10];
EmployeeNumber : Integer;
end; { Persontype }
MyArrayType = array [1..5] of PersonType;
var
PersonArray : MyArrayType;
begin
PersonArray[1].FirstName := Donald;
PersonArray[1].LastName := Duck;
Kylix
Pascal
var
ButtonArray : array of TButton;
i, Num : integer;
begin
Num :=0;
for i := 0 to Self.ComponentCount 1 do
// Self same as this in C++
if Self.Components[i] is TButton then
begin
Inc(Num);
SetLength(ButtonArray, Num);
ButtonArray[Num-1] := TButton(Components[i]);
end;
end;
Kylix
Pascal
Pascal
var
i : Integer;
begin
i := 1;
C++
int i;
i = 1;
Perl
my $i;
$i = 1;
Language Comparison
Kylix
Pascal
Language Comparison
Pascal
var
i : Integer;
name String[20];
begin
if i = 1 then
begin
name := Leland;
i := i + 1;
end;
end;
C++
int i;
char name[20];
if(i == 1) {
strcpy(name, Leland);
i = i + 1;
}
Perl
my $i;
my $name;
if($i == 1) { $name = Leland;
$i = $i + 1; }
Kylix
Pascal
Language Comparison
Pascal
while i < 100 do Inc(i);
C++
while (i < 100) i++;
Perl
while ($i < 100) { $i++;}
Kylix
Pascal
Language Comparison
Pascal
for i := 0 to 100 do begin
if i = 50 then Break;
end;
C++
for( i = 0; i <= 100; i++)
if( i == 50) break;
Perl
for( $i = 0; $ i <= 100; $i++) {
if( $i == 50) last;
}
Kylix
Qt
Libc
Kylix
GUI
Applications
Database Applications
Console Applications
Web Server Applications
Kylix
Linux
Linux
Multiprocessing apps
Multithreading apps
Kylix
GUI
Form1.Canvas.Brush.Color := clRed;
or
:= RGB(255, 0, 0);
Kylix
Database
Applications
db : TClientDataSet
db.FileName := /xxx/nnn/yyy;
db.Open;
db.Locate(EmpNum, 124433, []);
mystring := db.FieldValues[LastName];
Kylix
Database
Applications
db : TSQLDataSet
db.CommandText := select * from .;
db.Open;
Kylix
Database
Applications
Kylix
Web
Applications
- raw CGI
or
- TWebApplication
|
TCGIApplication
Kylix
Kylix
Versions
Kylix 1, 2, 3 (I am using 2)
Kylix 1, 2 Delphi (Pascal)
Kylix 3 add C++ Builder (C++)
Database objects
Kylix
Technical
Requirements Kylix 2
Kylix
Kylix
Download
http://www.borland.com/products/download
s/download_kylix.html#
Kylix 3 currently available
Kylix 2 ??
Kylix
FreeCLX
Project
available at SourceForge.net
Kylix
Bibliography
Kylix
product
demo