Difference between revisions of "Talk:LCL Internals"

From Lazarus wiki
Jump to navigationJump to search
Line 7: Line 7:
 
== Some remarks ==
 
== Some remarks ==
  
TQtWidgetSet = Class(TWidgetSet):
+
*TQtWidgetSet = Class(TWidgetSet):
 
In the example of the declaration for TQtWidgetSet, the following functions might be removed in the future:
 
In the example of the declaration for TQtWidgetSet, the following functions might be removed in the future:
 
   procedure SetDesigning(AComponent: TComponent); override;
 
   procedure SetDesigning(AComponent: TComponent); override;
Line 14: Line 14:
 
   function DestroyTimer(TimerHandle: integer): boolean; override;
 
   function DestroyTimer(TimerHandle: integer): boolean; override;
  
TQtWSWinControl.ShowHide:
+
*TQtWSWinControl.ShowHide:
 
Please add the next line as first for every TxxxWSyyy.SomeProcUsingAWincontrolHandle
 
Please add the next line as first for every TxxxWSyyy.SomeProcUsingAWincontrolHandle
 
   if not WSCheckHandleAllocated(AWincontrol, 'SomeProcUsingAWincontrolHandle')
 
   if not WSCheckHandleAllocated(AWincontrol, 'SomeProcUsingAWincontrolHandle')
 
   then Exit;
 
   then Exit;
  
 +
*TQtWidgetSet.ShowWindow:
 +
Functions like this might move to corntol implementation itself -> TxxxWSControl.Show
  
TQtWidgetSet.ShowWindow:
+
*gtkwstrayicon.pas
Functions like this might move to corntol implementation itself -> TxxxWSControl.Show
+
If needed, someone may want to link a provate internal class to a WSwidget, like:
 +
  RegisterWSComponent(TCustomTrayIcon, TGtkWSTrayIcon, TGtkWSTrayIconPrivate)
 +
This private class can have its own (true) inheritence, and it will propagate to all "derived" TxxxWSyyy classes
  
 
--[[User:Marc|Marc]] 10:39, 12 October 2006 (CEST)
 
--[[User:Marc|Marc]] 10:39, 12 October 2006 (CEST)

Revision as of 09:43, 12 October 2006

The trayintf.pas unit is not too well explained. If I read this document correctly, it is suposed to be the counterpart of the interfaces unit from the LCL. In this case, I don't think it is necessary to have such a unit, since the registering of the TWSXXXTrayIcon class does all that is needed. (I am not completely sure though) Vincent 19:34, 22 Dec 2005 (CET)

We can change it then. The example is suposed to be very simple and show how the LCL chooses different widgets without IFDEFS. Any work on it will help. --Sekelsenmat 20:37, 22 Dec 2005 (CET)
On the LCL all those files would be used. wstrayicon would even be on a extra /widgetset/ directory. --Sekelsenmat 14:19, 26 Dec 2005 (CET)

Some remarks

  • TQtWidgetSet = Class(TWidgetSet):

In the example of the declaration for TQtWidgetSet, the following functions might be removed in the future:

 procedure SetDesigning(AComponent: TComponent); override;
 function CreateComponent(Sender : TObject): THandle; override; // deprecated
 function CreateTimer(Interval: integer; TimerFunc: TFNTimerProc): integer; override;
 function DestroyTimer(TimerHandle: integer): boolean; override;
  • TQtWSWinControl.ShowHide:

Please add the next line as first for every TxxxWSyyy.SomeProcUsingAWincontrolHandle

 if not WSCheckHandleAllocated(AWincontrol, 'SomeProcUsingAWincontrolHandle')
 then Exit;
  • TQtWidgetSet.ShowWindow:

Functions like this might move to corntol implementation itself -> TxxxWSControl.Show

  • gtkwstrayicon.pas

If needed, someone may want to link a provate internal class to a WSwidget, like:

 RegisterWSComponent(TCustomTrayIcon, TGtkWSTrayIcon, TGtkWSTrayIconPrivate)

This private class can have its own (true) inheritence, and it will propagate to all "derived" TxxxWSyyy classes

--Marc 10:39, 12 October 2006 (CEST)