[lazarus] Lazarus QT Engine snapshot
Baeseman, Cliff
Cliff.Baeseman at greenheck.com
Thu Oct 21 09:59:26 EDT 1999
I added scroll bars and edit box last night. I am just going to add a few
more things and port the pascal code to a new qtobject.pp. I will then have
to build compile and install script for the liblazqt.01.so shared lib. I
also have to go in and document the messaging system. I also started
documenting the engine internals and the messaging methods.ie.what should be
passed and what is returned since it runs totally on pointers.
Cliff
-----Original Message-----
From: Shane Miller [mailto:SMiller1 at stvgb.org]
Sent: Thursday, October 21, 1999 8:23 AM
To: lazarus at miraclec.com
Subject: Re: [lazarus] Lazarus QT Engine snapshot
Looks good Cliff.
Shane
>>> "Cliff Baeseman" <vbman at pcpros.net> 10/20/99 11:23PM >>>
Hi everyone here is a snapshot of a form and button generated by FPC code
and the Lazarus QT Engine...
I finalized the engine design and am now going after adding all widgets.
Events are now working just fine. Here is the test app code... This should
plug right into the LCL stuff without changing much of anyting except the
QTObject will just pass the messages straight to the LCL QT Engine
program Test;
{$ objfpc}
uses
testlib, sysutils;
{ button callback event handler }
procedure CallMe(myint: integer);cdecl;
begin
if EVENT_CLICK then
writeln('Click Event Sent By the button');
end;
var
WindowTitle : pchar;
ButtonLabel : pchar;
WindowName : pchar;
begin
ButtonLabel := 'Lazarus QT Engine';
WindowName := 'window1';
WindowTitle := 'Lazarus QT Application Engine';
{ initialize engine }
IntSendMessage(MSG_CREATE_APPLICATION,'',nil,0);
{ create window and button }
IntSendMessage(MSG_CREATE_WINDOW,'window1',nil,0);
IntSendMessage(MSG_CREATE_BUTTON_WITH_LABEL,'button1',ButtonLabel,0);
{ reparent the button to the window }
IntSendMessage(MSG_WIDGET_SET_PARENT,'button1',WindowName,0);
{ set window height and width }
IntSendMessage(MSG_WIDGET_SET_HEIGHT,'window1',pinteger(400),0);
IntSendMessage(MSG_WIDGET_SET_WIDTH,'window1',pinteger(400),0);
{ set the button height and width }
IntSendMessage(MSG_WIDGET_SET_HEIGHT,'button1',pinteger(200),0);
IntSendMessage(MSG_WIDGET_SET_WIDTH,'button1',pinteger(200),0);
{ set window caption }
IntSendMessage(MSG_SET_WIDGET_CAPTION,'window1',WindowTitle,0);
{ show button and window }
IntSendMessage(MSG_WIDGET_SHOW,'window1',nil,0);
IntSendMessage(MSG_WIDGET_SHOW,'button1',nil,0);
{ set the main window to be the main widget controls destruction }
IntSendMessage(MSG_APPLICATION_SET_MAIN_WIDGET,'window1',nil,0);
{ attach a event callback procedure to the button }
AttachEventHandler('button1', at CallMe);
{ pass control to engine main run loop }
IntSendMessage(MSG_RUN_MAIN_LOOP,'',nil,0);
end.
cya back to the code...
Cliff
_________________________________________________________________
To unsubscribe: mail lazarus-request at miraclec.com with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus
More information about the Lazarus
mailing list