Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-12

InterfaceBase public procedures

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Mattias Gaertner: On Tue, 3 Dec 2002 05:55:13 +0100 I think so. Done. The UpdateHint procedure is currently…
Show quoted text 21 lines
> -----Oorspronkelijk bericht----- > Van: Mattias Gaertner > On Tue, 3 Dec 2002 05:55:13 +0100 > "Vincent Snijders" 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: TWinControl.CMShowHintChanged TWinControl.SetHint Want do you want to do with those functions if we remove UpdateHint? Remove them as well?

Yep.

> Plz send me a patch. What should the patch include? Remove TInterfaceBase.GetText and sending LM_GETTEXT from the LCL instead?

Yes.

Show quoted text 14 lines
> > 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.

Mattias

Reply by email

Vincent Snijders

InterfaceBase has the following public procedures and function which are not called from LCL:

SetCallBack
RemoveCallBack
RecreateWnd

Can they be removed from TInterfaceBase? Can they be moved to protected or private scope in the TGTKobject and TWin32Object Class?

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. Or is the long term target to have all messages converted to procedures and functions of the interface object.

Regards,
Vincent Snijders.

Reply by email

Mattias Gaertner
to Vincent Snijders
Show quoted text 9 lines
InterfaceBase has the following public procedures and function which are not called from LCL: SetCallBack RemoveCallBack RecreateWnd Can they be removed from TInterfaceBase? Can they be moved to protected or private scope in the TGTKobject and TWin32Object Class?

I think so. Done.

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.
Plz send me a patch.

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

Reply by email

Vincent Snijders
to Mattias Gaertner
Show quoted text 13 lines
-----Oorspronkelijk bericht----- Van: Mattias Gaertner On Tue, 3 Dec 2002 05:55:13 +0100 "Vincent Snijders" 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:
TWinControl.CMShowHintChanged
TWinControl.SetHint

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?

Show quoted text 12 lines
> 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.

Vincent.

Reply by email

Marc Weustink
to Vincent Snijders: InterfaceBase has the following public procedures and function which are not called from…

A bit late reaction :)

Mattias Gaertner wrote 32 lines
On Tue, 3 Dec 2002 05:55:13 +0100 "Vincent Snijders" wrote: > InterfaceBase has the following public procedures and function which are > not called from LCL: > > SetCallBack > RemoveCallBack > RecreateWnd > > Can they be removed from TInterfaceBase? Can they be moved to protected or > private scope in the TGTKobject and TWin32Object Class? I think so. Done. > 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. Plz send me a patch. > 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.

That was indeed the idea when GetText was introduced

Marc

Reply by email