[lazarus] Thought for multi-platform

Shane Miller SMiller1 at stvgb.org
Thu Jul 1 10:56:22 EDT 1999


In reference to this message, the statement

"Now IntSendMessage is contained in a interface.pp file (or something near that name).  In it all we have is the following:"

is incorrect.  IntSendMessage is defined in the gtkobject class or qtobject class.  Interface.pp is only used to determine which class we will be using....

Sorry for the confusion..

Shane



>>> "Shane Miller" <SMiller1 at stvgb.org> 07/01 9:28 AM >>>
Can I get some opinions on this idea please....

In TForms (for example) in TForms create we can put a function called IntSendMessage (for interface send  message) with parameters of Message (in this case it would be LM_CREATE to create a form), CompStyle (in this case csForm) , and the last parameter will be either a pointer or a handle to the new component.

So TForm.Create would be:

ConstructorTForm.Create(AOwner : TComponent);
Begin
Inherited Create(AOwner);
IntSendMessage(LM_Create, csForm,fComponent);
Left := 0;
Top := 0;
Width := 100
Height := 125;
end;

The resize would be handled like this:

Procedure TForm.SetLeft(Value : Integer);
Begin

IntSendMessage(LM_ResizeLeft,Value,fComponent)

end;

or something like that.

Now IntSendMessage is contained in a interface.pp file (or something near that name).  In it all we have is the following:


ifdefine gtk
 Interfaceobject = class(gtkobject)

ifdefine  qt
 InterfaceObject = class(qtObject

etc...

(the defines aren't perfect pascal...sorry, not sure how to do that exaclty)

then in a gtkint.pp file we have a class called gtkobject that contains the IntSendMessage and in a qtint.pp file we have a qtobject class with the same procedure......

We  could then simply create a new ??int.pp file and add a new define to the interface.pp file when we wanted to expand our platforms....

Don't flame me too badly now.  I've only spent 5 minutes on this. 
Thoughts?

Shane


_________________________________________________________________
     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