[lazarus] InterfaceBase public procedures
nc-gaertnma at netcologne.de
Tue Dec 3 14:42:48 EST 2002
On Tue, 3 Dec 2002 20:16:39 +0100
"Vincent Snijders" <vslist at zonnet.nl> wrote:
> > -----Oorspronkelijk bericht-----
> > Van: Mattias Gaertner [mailto:nc-gaertnma at netcologne.de]
> > On Tue, 3 Dec 2002 05:55:13 +0100
> > "Vincent Snijders" <vslist at zonnet.nl> wrote:
> > > If this is done, I see two odd functions:
> > > GetText and UpdateHint.
> > > Can they be replaced by messages like LM_GETTEXT and LM_SETHINT
> > (new), so
> > > that we have a more consistent interface for TInterfaceBase.
> > The UpdateHint procedure is currently not used. So, I don't think that
> > we should add a LM_SETHINT.
> As you probably know UpdateHint is used in:
> Want do you want to do with those functions if we remove UpdateHint?
> Remove them as well?
> > Plz send me a patch.
> What should the patch include? Remove TInterfaceBase.GetText and sending
> LM_GETTEXT from the LCL instead?
> > > Or is the long
> > > term target to have all messages converted to procedures and
> > functions of
> > > the interface object.
> > Yes. That's important for smart linking and IMO it also improves
> > readability.
> > Mattias
> Do you mind if I made the constructor of InterfaceBase virtual and the
> TGTKObject and TWin32Object constructors override? Then I can experiment a
> little with widget set selection on the command line.
I'm not sure if this is needed.
The interface object must be auto created in the initialization section
after the LCL and before any other unit. In order to choose the widget set
at this point, I think, you need a multi-widget interface unit. This
Win32AndGtkInterface.pp will be used in the program instead of the
interface.pp. It should use in its uses section the gtkint and the win32int
and should create the chosen interfaceobject based on the command line.
More information about the Lazarus