We are glad to announce that the first public beta version of the
Gecko-Delphi Framework version 1
has been released. It�s designed for development of cross-platform
applications. This library enables to
create easily applications of any level of difficulty in Windows and Linux.
The idea consists in using XML to describe the user�s interface and this
procedure increases the speed
with which applications are developed several times as compared to classical
methods.
The library is based on the most powerful engine GRE (Gecko Runtime
Environment) produced by the company
Mozilla Foundation. The comprehensive description of this technology can be
found on our Internet site -
http://www.kamasoftware.com, but the example given below shows the easy way
of creating applications
on Gecko-Delphi Framework. The sample has only one form.

1. Create a new Delphi class of the future form. Let�s name this class
TmainForm:
  TMainForm = class(TnsForm)
  private
  protected
    procedure OnButtonClick(Sender: TObject; const Element :
InsElementHelper;
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
  public
    constructor Create(AOwner : TComponent); override;
  end;

var From1 : TMainForm;

implementation

{ TMainForm }
procedure TMainForm.OnButtonClick(Sender: TObject; const Element :
InsElementHelper;
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  if Element.IsA('hello-button') then
    ShowMessage('Hello, World!');
end;


constructor TMainForm.Create(AOwner : TComponent);
begin
  Inherited;
  OnClick := OnButtonClick;
end;


2. Create XUL document for the new form. By default the name of the file
with a XUL document
must have the name of the class of the form and the extension .xul
(in our case it is TMailForm.xul) and it must be placed in the catalogue
where the executable file is.
You can change that behaviour and load data from resources.

<?xml version="1.0"?>
<window
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
        title="Hello World!" Width="500" height="300">
    <vbox flex="1">
          <label value="Hello, World!"/>
          <button id="hello-button" label="Click Me"/>
    </vbox>
</window>

3. Initialize class Application and create a new form:

  Application.Initialize(GRE_INSTALL_PATH);
  Application.CreateForm(TMainForm, Form1);
  Application.Run;

The first line Application.Initialize takes as a parameter the full way to
the
directory where GRE (Gecko Runtime Environment) is set up.

Application Hello, World is ready. Now you can build it and launch for work.
You can download the beta version of Gecko-Delphi Framework by this link:
http://www.kamasoftware.com/download.php

Thank you very much for your time and good luck.

Best regards, KAMA Software Team


_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to