[lazarus] Major modifications added to CVS

Michael A. Hess mhess at miraclec.com
Mon Jul 19 08:57:30 EDT 1999


Michael Van Canneyt wrote:
> 
> What I meant whas that you could implement it like
> 
> Procedure  TControl.SetLeft (Value : Integer);
> 
> begin
>   SetBounds(Value,FTop,FRight,FBottom);
>   FLeft:=Value;
> end;
> 
> This way the code is reduced to a minimum. In the event GTK changes,
> or you go to a new toolkit, You only have to adjust SetBounds.

I understand what you mean but don't forget that none of this code is
gtk specific. It doesn't have ANY gtk code in it. The above SetLeft or
SetBounds calls something like

  InterfaceObject.IntSendMessage2(LM_SetSize, Self, @R);

It sends a LM_SetSize message to the interface object which is whatever
API is attached to it. The only thing that needs to be changed if the
API changes or even if gtk changes is the call in the gtkint.pp unit and
all the class libraries will then work correctly.

We could have half a dozen different class library routines modify size,
captions, colors, etc. etc. etc. and only the modifications for the API
only need to be made in one place, the gtkint.pp unit.

The way we are writing it absolutely none of the class library will need
to be edited to use a different API.

-- 
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com






More information about the Lazarus mailing list