Modified WS class hierarchy on registration

git-svn-id: trunk@5440 -
This commit is contained in:
marc 2004-05-01 16:50:57 +00:00
parent 4a730f7f7c
commit 8e511b5c1e
28 changed files with 586 additions and 572 deletions

View File

@ -60,6 +60,7 @@ type
private private
protected protected
public public
class function CreateHandle(const AComponent: TComponent; const AParams: TCreateParams): THandle; override;
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override; class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
class procedure SetText(const AWinControl: TWinControl; const AText: String); override; class procedure SetText(const AWinControl: TWinControl; const AText: String); override;
end; end;
@ -161,6 +162,13 @@ end;
{ TGtkWSBitBtn } { TGtkWSBitBtn }
function TGtkWSBitBtn.CreateHandle(const AComponent: TComponent; const AParams: TCreateParams): THandle;
begin
// TODO
// for now, use default
Result := TWSBitBtn.CreateHandle(AComponent, AParams);
end;
function TGtkWSBitBtn.GetText(const AWinControl: TWinControl; var AText: String): Boolean; function TGtkWSBitBtn.GetText(const AWinControl: TWinControl; var AText: String): Boolean;
begin begin
// The button text is static, so let the LCL fallback to FCaption // The button text is static, so let the LCL fallback to FCaption

View File

@ -8,51 +8,56 @@ IMPORTANT
Derivation and inheritance of classes is different then one Derivation and inheritance of classes is different then one
might be used to. It wil be explained by the following might be used to. It wil be explained by the following
example. examples.
Suppose the following LCL class hierarchy: Suppose the following LCL class hierarchy:
TLCLComponent TLCLComponent
| |
v
TControl TControl
| |
v
TWinControl TWinControl
the corresponding WS skeleton would be the corresponding WS skeleton would be
TWSLCLComponent TWSLCLComponent
| |
v
TWSControl TWSControl
| |
v
TWSWinControl TWSWinControl
When method X of TWSControl gets implemented by When method X of TWSControl gets implemented by
widgetset Q the hierarchy looks like widgetset Q the hierarchy looks like
TWSLCLComponent TWSLCLComponent
| |
v TWSControl.X --> TQWSControl.X
TWSControl --> TQWSControl.X
| |
v
TWSWinControl TWSWinControl
When the same method X is required in TWSWinControl Calling TWSWinControl.X doesn't call TQWSControl.X since
inheritance doesnt work since TWSWinControl.X calls it's parent is TWSControl. This problem is solved by
TWSControl.X modifying the class hierarchy at runtime.
The following can be done to get around this: When a ComponentClass is registered by RegisterWSComponent,
*) try to move the LCL functionality to the lowest the class is copied and the vmt entries are adjusted so
class that the hierarchy looks like:
*) Implement TQWSWinControl.X by simply calling
TQWSControl.X
*) Implement the functionality of TQWSControl.X TWSLCLComponent
in the TQWidgetSet and call it from both |
TQWSControl.X and TQWSWinControl.X TWSControl.X --> TQWSControl.X
|
TWSWinControl
In this case, calling TWSWinControl.X will call the overriden
TQWSControl.X. The only thing which doesn't get handled is the
inherited statement. Suppose there is also a TQWSWinControl.X
which implements a few extra steps. In a normal situation one
would have called "inherited". The call to inherited is
resolved at compiletime and would in this example to a call to
TWSControl.X. That is not what we want.
To get around this, call the parent yourself:
TWSWinControlClass(ClassParent).X

View File

@ -25,11 +25,22 @@ unit WSActnList;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,21 +49,14 @@ uses
WSLCLClasses; WSLCLClasses;
type type
{ TWSCustomActionList } { TWSCustomActionList }
TWSCustomActionList = class(TWSLCLComponent) TWSCustomActionList = class(TWSLCLComponent)
private
protected
public
end; end;
{ TWSActionList } { TWSActionList }
TWSActionList = class(TWSCustomActionList) TWSActionList = class(TWSCustomActionList)
private
protected
public
end; end;
@ -60,8 +64,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSArrow;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,13 +49,9 @@ uses
WSLCLClasses, WSControls; WSLCLClasses, WSControls;
type type
{ TWSArrow } { TWSArrow }
TWSArrow = class(TWSCustomControl) TWSArrow = class(TWSCustomControl)
private
protected
public
end; end;
@ -52,8 +59,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSButtons;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,29 +49,19 @@ uses
WSLCLClasses, WSStdCtrls, WSControls; WSLCLClasses, WSStdCtrls, WSControls;
type type
{ TWSButton } { TWSButton }
TWSButton = class(TWSButtonControl) TWSButton = class(TWSButtonControl)
private
protected
public
end; end;
{ TWSBitBtn } { TWSBitBtn }
TWSBitBtn = class(TWSButton) TWSBitBtn = class(TWSButton)
private
protected
public
end; end;
{ TWSSpeedButton } { TWSSpeedButton }
TWSSpeedButton = class(TWSGraphicControl) TWSSpeedButton = class(TWSGraphicControl)
private
protected
public
end; end;
@ -68,8 +69,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSCalendar;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,13 +49,9 @@ uses
WSLCLClasses, WSControls; WSLCLClasses, WSControls;
type type
{ TWSCalendar } { TWSCalendar }
TWSCalendar = class(TWSWinControl) TWSCalendar = class(TWSWinControl)
private
protected
public
end; end;
@ -52,8 +59,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSCheckLst;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,13 +49,9 @@ uses
WSLCLClasses, WSStdCtrls; WSLCLClasses, WSStdCtrls;
type type
{ TWSCheckListBox } { TWSCheckListBox }
TWSCheckListBox = class(TWSCustomListBox) TWSCheckListBox = class(TWSCustomListBox)
private
protected
public
end; end;
@ -52,8 +59,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSCListBox;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,13 +49,9 @@ uses
WSLCLClasses, WSStdCtrls; WSLCLClasses, WSStdCtrls;
type type
{ TWSCListBox } { TWSCListBox }
TWSCListBox = class(TWSCustomListBox) TWSCListBox = class(TWSCustomListBox)
private
protected
public
end; end;
@ -52,8 +59,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSComCtrls;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -39,109 +50,69 @@ uses
WSToolwin; WSToolwin;
type type
{ TWSStatusBar } { TWSStatusBar }
TWSStatusBar = class(TWSWinControl) TWSStatusBar = class(TWSWinControl)
private
protected
public
end; end;
{ TWSTabSheet } { TWSTabSheet }
TWSTabSheet = class(TWSCustomPage) TWSTabSheet = class(TWSCustomPage)
private
protected
public
end; end;
{ TWSPageControl } { TWSPageControl }
TWSPageControl = class(TWSCustomNotebook) TWSPageControl = class(TWSCustomNotebook)
private
protected
public
end; end;
{ TWSCustomListView } { TWSCustomListView }
TWSCustomListView = class(TWSWinControl) TWSCustomListView = class(TWSWinControl)
private
protected
public
end; end;
{ TWSListView } { TWSListView }
TWSListView = class(TWSCustomListView) TWSListView = class(TWSCustomListView)
private
protected
public
end; end;
{ TWSProgressBar } { TWSProgressBar }
TWSProgressBar = class(TWSWinControl) TWSProgressBar = class(TWSWinControl)
private
protected
public
end; end;
{ TWSCustomUpDown } { TWSCustomUpDown }
TWSCustomUpDown = class(TWSCustomControl) TWSCustomUpDown = class(TWSCustomControl)
private
protected
public
end; end;
{ TWSUpDown } { TWSUpDown }
TWSUpDown = class(TWSCustomUpDown) TWSUpDown = class(TWSCustomUpDown)
private
protected
public
end; end;
{ TWSToolButton } { TWSToolButton }
TWSToolButton = class(TWSCustomControl) TWSToolButton = class(TWSCustomControl)
private
protected
public
end; end;
{ TWSToolBar } { TWSToolBar }
TWSToolBar = class(TWSToolWindow) TWSToolBar = class(TWSToolWindow)
private
protected
public
end; end;
{ TWSTrackBar } { TWSTrackBar }
TWSTrackBar = class(TWSWinControl) TWSTrackBar = class(TWSWinControl)
private
protected
public
end; end;
{ TWSCustomTreeView } { TWSCustomTreeView }
TWSCustomTreeView = class(TWSCustomControl) TWSCustomTreeView = class(TWSCustomControl)
private
protected
public
end; end;
{ TWSTreeView } { TWSTreeView }
TWSTreeView = class(TWSCustomTreeView) TWSTreeView = class(TWSCustomTreeView)
private
protected
public
end; end;
@ -149,8 +120,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSControls;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,21 +49,14 @@ uses
WSLCLClasses, WSImgList; WSLCLClasses, WSImgList;
type type
{ TWSDragImageList } { TWSDragImageList }
TWSDragImageList = class(TWSCustomImageList) TWSDragImageList = class(TWSCustomImageList)
private
protected
public
end; end;
{ TWSControl } { TWSControl }
TWSControl = class(TWSLCLComponent) TWSControl = class(TWSLCLComponent)
private
protected
public
class procedure SetCursor(const AControl: TControl; const ACursor: TCursor); virtual; class procedure SetCursor(const AControl: TControl; const ACursor: TCursor); virtual;
end; end;
@ -61,9 +65,6 @@ type
{ TWSWinControl } { TWSWinControl }
TWSWinControl = class(TWSControl) TWSWinControl = class(TWSControl)
private
protected
public
class function HasText(const AWinControl: TWinControl): Boolean; virtual; class function HasText(const AWinControl: TWinControl): Boolean; virtual;
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; virtual; class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; virtual;
class function GetTextLen(const AWinControl: TWinControl; var ALength: Integer): Boolean; virtual; class function GetTextLen(const AWinControl: TWinControl; var ALength: Integer): Boolean; virtual;
@ -75,25 +76,16 @@ type
{ TWSGraphicControl } { TWSGraphicControl }
TWSGraphicControl = class(TWSControl) TWSGraphicControl = class(TWSControl)
private
protected
public
end; end;
{ TWSCustomControl } { TWSCustomControl }
TWSCustomControl = class(TWSWinControl) TWSCustomControl = class(TWSWinControl)
private
protected
public
end; end;
{ TWSImageList } { TWSImageList }
TWSImageList = class(TWSDragImageList) TWSImageList = class(TWSDragImageList)
private
protected
public
end; end;
@ -141,8 +133,6 @@ end;
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSDbCtrls;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -39,109 +50,69 @@ uses
WSCalendar, WSButtons; WSCalendar, WSButtons;
type type
{ TWSDBEdit } { TWSDBEdit }
TWSDBEdit = class(TWSCustomMaskEdit) TWSDBEdit = class(TWSCustomMaskEdit)
private
protected
public
end; end;
{ TWSDBText } { TWSDBText }
TWSDBText = class(TWSLabel) TWSDBText = class(TWSLabel)
private
protected
public
end; end;
{ TWSDBListBox } { TWSDBListBox }
TWSDBListBox = class(TWSCustomListBox) TWSDBListBox = class(TWSCustomListBox)
private
protected
public
end; end;
{ TWSDBRadioGroup } { TWSDBRadioGroup }
TWSDBRadioGroup = class(TWSCustomRadioGroup) TWSDBRadioGroup = class(TWSCustomRadioGroup)
private
protected
public
end; end;
{ TWSDBCheckBox } { TWSDBCheckBox }
TWSDBCheckBox = class(TWSCustomCheckBox) TWSDBCheckBox = class(TWSCustomCheckBox)
private
protected
public
end; end;
{ TWSDBComboBox } { TWSDBComboBox }
TWSDBComboBox = class(TWSCustomComboBox) TWSDBComboBox = class(TWSCustomComboBox)
private
protected
public
end; end;
{ TWSDBMemo } { TWSDBMemo }
TWSDBMemo = class(TWSCustomMemo) TWSDBMemo = class(TWSCustomMemo)
private
protected
public
end; end;
{ TWSDBGroupBox } { TWSDBGroupBox }
TWSDBGroupBox = class(TWSCustomGroupBox) TWSDBGroupBox = class(TWSCustomGroupBox)
private
protected
public
end; end;
{ TWSDBImage } { TWSDBImage }
TWSDBImage = class(TWSCustomImage) TWSDBImage = class(TWSCustomImage)
private
protected
public
end; end;
{ TWSDBCalendar } { TWSDBCalendar }
TWSDBCalendar = class(TWSCalendar) TWSDBCalendar = class(TWSCalendar)
private
protected
public
end; end;
{ TWSDBCustomNavigator } { TWSDBCustomNavigator }
TWSDBCustomNavigator = class(TWSCustomPanel) TWSDBCustomNavigator = class(TWSCustomPanel)
private
protected
public
end; end;
{ TWSDBNavButton } { TWSDBNavButton }
TWSDBNavButton = class(TWSSpeedButton) TWSDBNavButton = class(TWSSpeedButton)
private
protected
public
end; end;
{ TWSDBNavigator } { TWSDBNavigator }
TWSDBNavigator = class(TWSDBCustomNavigator) TWSDBNavigator = class(TWSDBCustomNavigator)
private
protected
public
end; end;
@ -149,8 +120,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSDBGrids;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,21 +49,14 @@ uses
WSLCLClasses, WSGrids; WSLCLClasses, WSGrids;
type type
{ TWSCustomDbGrid } { TWSCustomDbGrid }
TWSCustomDbGrid = class(TWSCustomGrid) TWSCustomDbGrid = class(TWSCustomGrid)
private
protected
public
end; end;
{ TWSdbGrid } { TWSdbGrid }
TWSdbGrid = class(TWSCustomDbGrid) TWSdbGrid = class(TWSCustomDbGrid)
private
protected
public
end; end;
@ -60,8 +64,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSDialogs;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,69 +49,44 @@ uses
WSLCLClasses, WSControls; WSLCLClasses, WSControls;
type type
{ TWSCommonDialog } { TWSCommonDialog }
TWSCommonDialog = class(TWSLCLComponent) TWSCommonDialog = class(TWSLCLComponent)
private
protected
public
end; end;
{ TWSFileDialog } { TWSFileDialog }
TWSFileDialog = class(TWSCommonDialog) TWSFileDialog = class(TWSCommonDialog)
private
protected
public
end; end;
{ TWSOpenDialog } { TWSOpenDialog }
TWSOpenDialog = class(TWSFileDialog) TWSOpenDialog = class(TWSFileDialog)
private
protected
public
end; end;
{ TWSSaveDialog } { TWSSaveDialog }
TWSSaveDialog = class(TWSOpenDialog) TWSSaveDialog = class(TWSOpenDialog)
private
protected
public
end; end;
{ TWSSelectDirectoryDialog } { TWSSelectDirectoryDialog }
TWSSelectDirectoryDialog = class(TWSOpenDialog) TWSSelectDirectoryDialog = class(TWSOpenDialog)
private
protected
public
end; end;
{ TWSColorDialog } { TWSColorDialog }
TWSColorDialog = class(TWSCommonDialog) TWSColorDialog = class(TWSCommonDialog)
private
protected
public
end; end;
{ TWSColorButton } { TWSColorButton }
TWSColorButton = class(TWSGraphicControl) TWSColorButton = class(TWSGraphicControl)
private
protected
public
end; end;
{ TWSFontDialog } { TWSFontDialog }
TWSFontDialog = class(TWSCommonDialog) TWSFontDialog = class(TWSCommonDialog)
private
protected
public
end; end;
@ -108,8 +94,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSDirSel;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,13 +49,9 @@ uses
WSLCLClasses, WSForms; WSLCLClasses, WSForms;
type type
{ TWSDirSelDlg } { TWSDirSelDlg }
TWSDirSelDlg = class(TWSForm) TWSDirSelDlg = class(TWSForm)
private
protected
public
end; end;
@ -52,8 +59,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSEditBtn;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,53 +49,34 @@ uses
WSLCLClasses, WSStdCtrls; WSLCLClasses, WSStdCtrls;
type type
{ TWSCustomEditButton } { TWSCustomEditButton }
TWSCustomEditButton = class(TWSEdit) TWSCustomEditButton = class(TWSEdit)
private
protected
public
end; end;
{ TWSEditButton } { TWSEditButton }
TWSEditButton = class(TWSCustomEditButton) TWSEditButton = class(TWSCustomEditButton)
private
protected
public
end; end;
{ TWSFileNameEdit } { TWSFileNameEdit }
TWSFileNameEdit = class(TWSCustomEditButton) TWSFileNameEdit = class(TWSCustomEditButton)
private
protected
public
end; end;
{ TWSDirectoryEdit } { TWSDirectoryEdit }
TWSDirectoryEdit = class(TWSCustomEditButton) TWSDirectoryEdit = class(TWSCustomEditButton)
private
protected
public
end; end;
{ TWSDateEdit } { TWSDateEdit }
TWSDateEdit = class(TWSCustomEditButton) TWSDateEdit = class(TWSCustomEditButton)
private
protected
public
end; end;
{ TWSCalcEdit } { TWSCalcEdit }
TWSCalcEdit = class(TWSCustomEditButton) TWSCalcEdit = class(TWSCustomEditButton)
private
protected
public
end; end;
@ -92,8 +84,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSExtCtrls;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,165 +49,104 @@ uses
WSLCLClasses, WSControls, WSStdCtrls; WSLCLClasses, WSControls, WSStdCtrls;
type type
{ TWSCustomPage } { TWSCustomPage }
TWSCustomPage = class(TWSWinControl) TWSCustomPage = class(TWSWinControl)
private
protected
public
end; end;
{ TWSCustomNotebook } { TWSCustomNotebook }
TWSCustomNotebook = class(TWSWinControl) TWSCustomNotebook = class(TWSWinControl)
private
protected
public
end; end;
{ TWSPage } { TWSPage }
TWSPage = class(TWSCustomPage) TWSPage = class(TWSCustomPage)
private
protected
public
end; end;
{ TWSNotebook } { TWSNotebook }
TWSNotebook = class(TWSCustomNotebook) TWSNotebook = class(TWSCustomNotebook)
private
protected
public
end; end;
{ TWSShape } { TWSShape }
TWSShape = class(TWSGraphicControl) TWSShape = class(TWSGraphicControl)
private
protected
public
end; end;
{ TWSCustomSplitter } { TWSCustomSplitter }
TWSCustomSplitter = class(TWSCustomControl) TWSCustomSplitter = class(TWSCustomControl)
private
protected
public
end; end;
{ TWSSplitter } { TWSSplitter }
TWSSplitter = class(TWSCustomSplitter) TWSSplitter = class(TWSCustomSplitter)
private
protected
public
end; end;
{ TWSPaintBox } { TWSPaintBox }
TWSPaintBox = class(TWSGraphicControl) TWSPaintBox = class(TWSGraphicControl)
private
protected
public
end; end;
{ TWSCustomImage } { TWSCustomImage }
TWSCustomImage = class(TWSGraphicControl) TWSCustomImage = class(TWSGraphicControl)
private
protected
public
end; end;
{ TWSImage } { TWSImage }
TWSImage = class(TWSCustomImage) TWSImage = class(TWSCustomImage)
private
protected
public
end; end;
{ TWSBevel } { TWSBevel }
TWSBevel = class(TWSGraphicControl) TWSBevel = class(TWSGraphicControl)
private
protected
public
end; end;
{ TWSCustomRadioGroup } { TWSCustomRadioGroup }
TWSCustomRadioGroup = class(TWSCustomGroupBox) TWSCustomRadioGroup = class(TWSCustomGroupBox)
private
protected
public
end; end;
{ TWSRadioGroup } { TWSRadioGroup }
TWSRadioGroup = class(TWSCustomRadioGroup) TWSRadioGroup = class(TWSCustomRadioGroup)
private
protected
public
end; end;
{ TWSCustomCheckGroup } { TWSCustomCheckGroup }
TWSCustomCheckGroup = class(TWSCustomGroupBox) TWSCustomCheckGroup = class(TWSCustomGroupBox)
private
protected
public
end; end;
{ TWSCheckGroup } { TWSCheckGroup }
TWSCheckGroup = class(TWSCustomCheckGroup) TWSCheckGroup = class(TWSCustomCheckGroup)
private
protected
public
end; end;
{ TWSBoundLabel } { TWSBoundLabel }
TWSBoundLabel = class(TWSCustomLabel) TWSBoundLabel = class(TWSCustomLabel)
private
protected
public
end; end;
{ TWSCustomLabeledEdit } { TWSCustomLabeledEdit }
TWSCustomLabeledEdit = class(TWSCustomEdit) TWSCustomLabeledEdit = class(TWSCustomEdit)
private
protected
public
end; end;
{ TWSLabeledEdit } { TWSLabeledEdit }
TWSLabeledEdit = class(TWSCustomLabeledEdit) TWSLabeledEdit = class(TWSCustomLabeledEdit)
private
protected
public
end; end;
{ TWSCustomPanel } { TWSCustomPanel }
TWSCustomPanel = class(TWSCustomControl) TWSCustomPanel = class(TWSCustomControl)
private
protected
public
end; end;
{ TWSPanel } { TWSPanel }
TWSPanel = class(TWSCustomPanel) TWSPanel = class(TWSCustomPanel)
private
protected
public
end; end;
@ -204,8 +154,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSExtDlgs;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,69 +49,44 @@ uses
WSLCLClasses, WSControls, WSDialogs, WSForms; WSLCLClasses, WSControls, WSDialogs, WSForms;
type type
{ TWSPreviewFileControl } { TWSPreviewFileControl }
TWSPreviewFileControl = class(TWSWinControl) TWSPreviewFileControl = class(TWSWinControl)
private
protected
public
end; end;
{ TWSPreviewFileDialog } { TWSPreviewFileDialog }
TWSPreviewFileDialog = class(TWSOpenDialog) TWSPreviewFileDialog = class(TWSOpenDialog)
private
protected
public
end; end;
{ TWSOpenPictureDialog } { TWSOpenPictureDialog }
TWSOpenPictureDialog = class(TWSPreviewFileDialog) TWSOpenPictureDialog = class(TWSPreviewFileDialog)
private
protected
public
end; end;
{ TWSSavePictureDialog } { TWSSavePictureDialog }
TWSSavePictureDialog = class(TWSOpenPictureDialog) TWSSavePictureDialog = class(TWSOpenPictureDialog)
private
protected
public
end; end;
{ TWSCalculatorDialog } { TWSCalculatorDialog }
TWSCalculatorDialog = class(TWSCommonDialog) TWSCalculatorDialog = class(TWSCommonDialog)
private
protected
public
end; end;
{ TWSCalculatorForm } { TWSCalculatorForm }
TWSCalculatorForm = class(TWSForm) TWSCalculatorForm = class(TWSForm)
private
protected
public
end; end;
{ TWSCalendarDialogForm } { TWSCalendarDialogForm }
TWSCalendarDialogForm = class(TWSForm) TWSCalendarDialogForm = class(TWSForm)
private
protected
public
end; end;
{ TWSCalendarDialog } { TWSCalendarDialog }
TWSCalendarDialog = class(TWSCommonDialog) TWSCalendarDialog = class(TWSCommonDialog)
private
protected
public
end; end;
@ -108,8 +94,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSFileCtrl;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,21 +49,14 @@ uses
WSLCLClasses, WSStdCtrls; WSLCLClasses, WSStdCtrls;
type type
{ TWSCustomFileListBox } { TWSCustomFileListBox }
TWSCustomFileListBox = class(TWSCustomListBox) TWSCustomFileListBox = class(TWSCustomListBox)
private
protected
public
end; end;
{ TWSFileListBox } { TWSFileListBox }
TWSFileListBox = class(TWSCustomFileListBox) TWSFileListBox = class(TWSCustomFileListBox)
private
protected
public
end; end;
@ -60,8 +64,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSForms;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,77 +49,49 @@ uses
WSLCLClasses, WSControls; WSLCLClasses, WSControls;
type type
{ TWSScrollingWinControl } { TWSScrollingWinControl }
TWSScrollingWinControl = class(TWSWinControl) TWSScrollingWinControl = class(TWSWinControl)
private
protected
public
end; end;
{ TWSScrollBox } { TWSScrollBox }
TWSScrollBox = class(TWSScrollingWinControl) TWSScrollBox = class(TWSScrollingWinControl)
private
protected
public
end; end;
{ TWSCustomFrame } { TWSCustomFrame }
TWSCustomFrame = class(TWSScrollingWinControl) TWSCustomFrame = class(TWSScrollingWinControl)
private
protected
public
end; end;
{ TWSFrame } { TWSFrame }
TWSFrame = class(TWSCustomFrame) TWSFrame = class(TWSCustomFrame)
private
protected
public
end; end;
{ TWSCustomForm } { TWSCustomForm }
TWSCustomForm = class(TWSScrollingWinControl) TWSCustomForm = class(TWSScrollingWinControl)
private
protected
public
end; end;
{ TWSForm } { TWSForm }
TWSForm = class(TWSCustomForm) TWSForm = class(TWSCustomForm)
private
protected
public
end; end;
{ TWSHintWindow } { TWSHintWindow }
TWSHintWindow = class(TWSCustomForm) TWSHintWindow = class(TWSCustomForm)
private
protected
public
end; end;
{ TWSScreen } { TWSScreen }
TWSScreen = class(TWSLCLComponent) TWSScreen = class(TWSLCLComponent)
private
protected
public
end; end;
{ TWSApplicationProperties } { TWSApplicationProperties }
TWSApplicationProperties = class(TWSLCLComponent) TWSApplicationProperties = class(TWSLCLComponent)
private
protected
public
end; end;
@ -116,8 +99,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSGrids;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,37 +49,24 @@ uses
WSLCLClasses, WSMaskEdit, WSControls; WSLCLClasses, WSMaskEdit, WSControls;
type type
{ TWSStringCellEditor } { TWSStringCellEditor }
TWSStringCellEditor = class(TWSCustomMaskEdit) TWSStringCellEditor = class(TWSCustomMaskEdit)
private
protected
public
end; end;
{ TWSCustomGrid } { TWSCustomGrid }
TWSCustomGrid = class(TWSCustomControl) TWSCustomGrid = class(TWSCustomControl)
private
protected
public
end; end;
{ TWSDrawGrid } { TWSDrawGrid }
TWSDrawGrid = class(TWSCustomGrid) TWSDrawGrid = class(TWSCustomGrid)
private
protected
public
end; end;
{ TWSStringGrid } { TWSStringGrid }
TWSStringGrid = class(TWSDrawGrid) TWSStringGrid = class(TWSDrawGrid)
private
protected
public
end; end;
@ -76,8 +74,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSImgList;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,13 +49,9 @@ uses
WSLCLClasses; WSLCLClasses;
type type
{ TWSCustomImageList } { TWSCustomImageList }
TWSCustomImageList = class(TWSLCLComponent) TWSCustomImageList = class(TWSLCLComponent)
private
protected
public
end; end;
@ -52,8 +59,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -24,22 +24,35 @@ unit WSLCLClasses;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface {.$DEFINE VerboseWSRegistration}
interface
////////////////////////////////////////////////////
// I M P O R T A N T
////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses uses
Classes, LCLType, InterfaceBase; Classes, LCLType, InterfaceBase;
type type
{ TWSLCLComponent } { TWSLCLComponent }
{$M+}
TWSLCLComponent = class(TObject) TWSLCLComponent = class(TObject)
private
protected
public
class function CreateHandle(const AComponent: TComponent; class function CreateHandle(const AComponent: TComponent;
const AParams: TCreateParams): THandle; virtual; const AParams: TCreateParams): THandle; virtual;
end; end;
{$M-}
TWSLCLComponentClass = class of TWSLCLComponent; TWSLCLComponentClass = class of TWSLCLComponent;
@ -71,11 +84,19 @@ type
LCLClass: TComponentClass; LCLClass: TComponentClass;
WSClass: TWSLCLComponentClass; WSClass: TWSLCLComponentClass;
VClass: Pointer; VClass: Pointer;
VClassName: ShortString;
Parent: PClassNode; Parent: PClassNode;
Child: PClassNode; Child: PClassNode;
Sibling: PClassNode; Sibling: PClassNode;
end; end;
const
// To my knowledge there is no way to tell the size of the
// VMT of a given class.
// Assume we have no more than 100 virtual entries
VIRTUAL_VMT_COUNT = 100;
VIRTUAL_VMT_SIZE = vmtMethodStart + VIRTUAL_VMT_COUNT * SizeOf(Pointer);
var var
MComponentIndex: TStringList; MComponentIndex: TStringList;
MWSRegisterIndex: TStringList; MWSRegisterIndex: TStringList;
@ -95,17 +116,30 @@ begin
if idx <> -1 if idx <> -1
then begin then begin
Node := PClassNode(MWSRegisterIndex.Objects[idx]); Node := PClassNode(MWSRegisterIndex.Objects[idx]);
Result := Node^.WSClass; Result := TWSLCLComponentClass(Node^.VClass);
Exit; Exit;
end; end;
cls := cls.ClassParent; cls := cls.ClassParent;
end; end;
end; end;
type
TMethodNameTable = packed record
Count: DWord;
Entries: packed array[0..0] of packed record
Name: PShortstring;
Addr: Pointer;
end;
end;
PMethodNameTable = ^TMethodNameTable;
TPointerArray = packed array[0..0] of Pointer;
PPointerArray = ^TPointerArray;
procedure RegisterWSComponent(const AComponent: TComponentClass; procedure RegisterWSComponent(const AComponent: TComponentClass;
const AWSComponent: TWSLCLComponentClass); const AWSComponent: TWSLCLComponentClass);
function FindNode(const AClass: TClass): PClassNode; function GetNode(const AClass: TClass): PClassNode;
var var
idx: Integer; idx: Integer;
Name: String; Name: String;
@ -125,8 +159,9 @@ procedure RegisterWSComponent(const AComponent: TComponentClass;
Result^.LCLClass := TComponentClass(AClass); Result^.LCLClass := TComponentClass(AClass);
Result^.WSClass := nil; Result^.WSClass := nil;
Result^.VClass := nil; Result^.VClass := nil;
Result^.VClassName := '';
Result^.Child := nil; Result^.Child := nil;
Result^.Parent := FindNode(AClass.ClassParent); Result^.Parent := GetNode(AClass.ClassParent);
if Result^.Parent = nil if Result^.Parent = nil
then begin then begin
Result^.Sibling := nil; Result^.Sibling := nil;
@ -142,32 +177,180 @@ procedure RegisterWSComponent(const AComponent: TComponentClass;
end; end;
end; end;
function FindParentWSClassNode(const ANode: PClassNode): PClassNode;
begin
Result := ANode^.Parent;
while Result <> nil do
begin
if Result^.WSClass <> nil then Exit;
Result := Result^.Parent;
end;
Result := nil;
end;
function FindCommonAncestor(const AClass1, AClass2: TClass): TClass;
begin
Result := AClass1;
if AClass2.InheritsFrom(Result)
then Exit;
Result := AClass2;
while Result <> nil do
begin
if AClass1.InheritsFrom(Result)
then Exit;
Result := Result.ClassParent;
end;
Result := nil;
end;
procedure CreateVClass(const ANode: PClassNode);
var
ParentWSNode: PClassNode;
CommonClass: TClass;
Vvmt, Cvmt, Pvmt: PPointerArray;
Cmnt: PMethodNameTable;
SearchAddr: Pointer;
n, idx: Integer;
Processed: array[0..VIRTUAL_VMT_COUNT-1] of Boolean;
{$IFDEF VerboseWSRegistration}
Indent: String;
{$ENDIF}
begin
if ANode^.VClass = nil
then ANode^.VClass := GetMem(VIRTUAL_VMT_SIZE);
// Initially copy the WSClass
// Tricky part, the source may get beyond read mem limit
Move(Pointer(ANode^.WSClass)^, ANode^.VClass^, VIRTUAL_VMT_SIZE);
// Try to find the common ancestor
ParentWSNode := FindParentWSClassNode(ANode);
if ParentWSNode = nil then Exit; // nothing to do
{$IFDEF VerboseWSRegistration}
WriteLN('Virtual parent: ', ParentWSNode^.WSClass.ClassName);
{$ENDIF}
CommonClass := FindCommonAncestor(ANode^.WSClass, ParentWSNode^.WSClass);
{$IFDEF VerboseWSRegistration}
WriteLN('Common: ', CommonClass.ClassName);
Indent := '';
{$ENDIF}
Vvmt := ANode^.VClass + vmtMethodStart;
Pvmt := ParentWSNode^.VClass + vmtMethodStart;
FillChar(Processed[0], SizeOf(Processed), 0);
while CommonClass <> nil do
begin
Cmnt := PPointer(Pointer(CommonClass) + vmtMethodTable)^;
if Cmnt <> nil
then begin
{$IFDEF VerboseWSRegistration}
WriteLN(Indent, '*', CommonClass.Classname, ' method count: ', Cmnt^.Count);
Indent := Indent + ' ';
{$ENDIF}
Cvmt := Pointer(CommonClass) + vmtMethodStart;
Assert(Cmnt^.Count < VIRTUAL_VMT_COUNT, 'MethodTable count is larger that assumed VIRTUAL_VMT_COUNT');
// Loop though the VMT to see what is overridden
for n := 0 to Cmnt^.Count - 1 do
begin
{$IFDEF VerboseWSRegistration}
WriteLN(Indent, 'Search: ', Cmnt^.Entries[n].Name^);
{$ENDIF}
SearchAddr := Cmnt^.Entries[n].Addr;
for idx := 0 to VIRTUAL_VMT_COUNT - 1 do
begin
if Cvmt^[idx] = SearchAddr
then begin
{$IFDEF VerboseWSRegistration}
WriteLN(Indent, 'Found at index: ', idx);
{$ENDIF}
if Processed[idx]
then begin
{$IFDEF VerboseWSRegistration}
WriteLN(Indent, 'Procesed -> skipping');
{$ENDIF}
Break;
end;
Processed[idx] := True;
if (Vvmt^[idx] = SearchAddr) //original
and (Pvmt^[idx] <> SearchAddr) //overridden by parent
then begin
{$IFDEF VerboseWSRegistration}
WriteLN(Indent, Format('Updating %p -> %p', [Vvmt^[idx], Pvmt^[idx]]));
{$ENDIF}
Vvmt^[idx] := Pvmt^[idx];
end;
Break;
end;
if idx = VIRTUAL_VMT_COUNT - 1
then begin
WriteLN('[WARNING] VMT entry "', Cmnt^.Entries[n].Name^, '" not found in "', CommonClass.ClassName, '"');
Break;
end;
end;
end;
end;
CommonClass := Commonclass.ClassParent;
end;
// Adjust classname
ANode^.VClassName := '(V)' + ANode^.WSClass.ClassName;
PPointer(ANode^.VClass + vmtClassName)^ := @ANode^.VClassName;
// Adjust classparent
PPointer(ANode^.VClass + vmtParent)^ := PPointer(Pointer(ParentWSNode^.WSClass) + vmtParent)^;
// Delete methodtable entry
PPointer(ANode^.VClass + vmtMethodTable)^ := nil;
end;
procedure UpdateChildren(const ANode: PClassNode);
var
Node: PClassNode;
begin
Node := ANode^.Child;
while Node <> nil do
begin
if Node^.WSClass <> nil
then begin
{$IFDEF VerboseWSRegistration}
WriteLN('Update VClass for: ', Node^.WSClass.ClassName);
{$ENDIF}
CreateVClass(Node);
end;
UpdateChildren(Node);
Node := Node^.Sibling;
end;
end;
var var
Node: PClassNode; Node: PClassNode;
begin begin
Node := FindNode(AComponent); Node := GetNode(AComponent);
if Node = nil then Exit; if Node = nil then Exit;
if Node^.WSClass = nil if Node^.WSClass = nil
then MWSRegisterIndex.AddObject(AComponent.ClassName, TObject(Node)); then MWSRegisterIndex.AddObject(AComponent.ClassName, TObject(Node));
Node^.WSClass := AWSComponent; Node^.WSClass := AWSComponent;
{$IFDEF VerboseWSRegistration}
WriteLN('Create VClass for: ', Node^.WSClass.ClassName);
{$ENDIF}
CreateVClass(Node);
// Since child classes may depend on us, recreate them
UpdateChildren(Node);
end; end;
procedure FreeRegistration; procedure DoInitialization;
var
Node: PClassNode;
begin begin
while (MComponentIndex.Count>0) do begin
Node := PClassNode(MComponentIndex.Objects[MComponentIndex.Count-1]);
Dispose(Node);
MComponentIndex.Delete(MComponentIndex.Count-1);
end;
FreeAndNil(MComponentIndex);
FreeAndNil(MWSRegisterIndex);
end;
initialization
MComponentIndex := TStringList.Create; MComponentIndex := TStringList.Create;
MComponentIndex.Sorted := True; MComponentIndex.Sorted := True;
MComponentIndex.Duplicates := dupError; MComponentIndex.Duplicates := dupError;
@ -175,8 +358,28 @@ initialization
MWSRegisterIndex := TStringList.Create; MWSRegisterIndex := TStringList.Create;
MWSRegisterIndex.Sorted := True; MWSRegisterIndex.Sorted := True;
MWSRegisterIndex.Duplicates := dupError; MWSRegisterIndex.Duplicates := dupError;
end;
procedure DoFinalization;
var
n: Integer;
Node: PClassNode;
begin
for n := 0 to MComponentIndex.Count - 1 do
begin
Node := PClassNode(MComponentIndex.Objects[n]);
if Node^.VClass <> nil
then Freemem(Node^.VClass);
Dispose(Node);
end;
FreeAndNil(MComponentIndex);
FreeAndNil(MWSRegisterIndex);
end;
initialization
DoInitialization;
finalization finalization
FreeRegistration; DoFinalization;
end. end.

View File

@ -25,11 +25,22 @@ unit WSMaskEdit;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,21 +49,14 @@ uses
WSLCLClasses, WSStdCtrls; WSLCLClasses, WSStdCtrls;
type type
{ TWSCustomMaskEdit } { TWSCustomMaskEdit }
TWSCustomMaskEdit = class(TWSCustomEdit) TWSCustomMaskEdit = class(TWSCustomEdit)
private
protected
public
end; end;
{ TWSMaskEdit } { TWSMaskEdit }
TWSMaskEdit = class(TWSCustomMaskEdit) TWSMaskEdit = class(TWSCustomMaskEdit)
private
protected
public
end; end;
@ -60,8 +64,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSMenus;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,37 +49,24 @@ uses
WSLCLClasses; WSLCLClasses;
type type
{ TWSMenuItem } { TWSMenuItem }
TWSMenuItem = class(TWSLCLComponent) TWSMenuItem = class(TWSLCLComponent)
private
protected
public
end; end;
{ TWSMenu } { TWSMenu }
TWSMenu = class(TWSLCLComponent) TWSMenu = class(TWSLCLComponent)
private
protected
public
end; end;
{ TWSMainMenu } { TWSMainMenu }
TWSMainMenu = class(TWSMenu) TWSMainMenu = class(TWSMenu)
private
protected
public
end; end;
{ TWSPopupMenu } { TWSPopupMenu }
TWSPopupMenu = class(TWSMenu) TWSPopupMenu = class(TWSMenu)
private
protected
public
end; end;
@ -76,8 +74,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSPairSplitter;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,29 +49,19 @@ uses
WSLCLClasses, WSControls; WSLCLClasses, WSControls;
type type
{ TWSPairSplitterSide } { TWSPairSplitterSide }
TWSPairSplitterSide = class(TWSWinControl) TWSPairSplitterSide = class(TWSWinControl)
private
protected
public
end; end;
{ TWSCustomPairSplitter } { TWSCustomPairSplitter }
TWSCustomPairSplitter = class(TWSWinControl) TWSCustomPairSplitter = class(TWSWinControl)
private
protected
public
end; end;
{ TWSPairSplitter } { TWSPairSplitter }
TWSPairSplitter = class(TWSCustomPairSplitter) TWSPairSplitter = class(TWSCustomPairSplitter)
private
protected
public
end; end;
@ -68,8 +69,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSSpin;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,21 +49,14 @@ uses
WSLCLClasses, WSControls; WSLCLClasses, WSControls;
type type
{ TWSCustomSpinEdit } { TWSCustomSpinEdit }
TWSCustomSpinEdit = class(TWSWinControl) TWSCustomSpinEdit = class(TWSWinControl)
private
protected
public
end; end;
{ TWSSpinEdit } { TWSSpinEdit }
TWSSpinEdit = class(TWSCustomSpinEdit) TWSSpinEdit = class(TWSCustomSpinEdit)
private
protected
public
end; end;
@ -60,8 +64,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSStdCtrls;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,165 +49,104 @@ uses
WSLCLClasses, WSControls; WSLCLClasses, WSControls;
type type
{ TWSScrollBar } { TWSScrollBar }
TWSScrollBar = class(TWSWinControl) TWSScrollBar = class(TWSWinControl)
private
protected
public
end; end;
{ TWSCustomGroupBox } { TWSCustomGroupBox }
TWSCustomGroupBox = class(TWSCustomControl) TWSCustomGroupBox = class(TWSCustomControl)
private
protected
public
end; end;
{ TWSGroupBox } { TWSGroupBox }
TWSGroupBox = class(TWSCustomGroupBox) TWSGroupBox = class(TWSCustomGroupBox)
private
protected
public
end; end;
{ TWSCustomComboBox } { TWSCustomComboBox }
TWSCustomComboBox = class(TWSWinControl) TWSCustomComboBox = class(TWSWinControl)
private
protected
public
end; end;
{ TWSComboBox } { TWSComboBox }
TWSComboBox = class(TWSCustomComboBox) TWSComboBox = class(TWSCustomComboBox)
private
protected
public
end; end;
{ TWSCustomListBox } { TWSCustomListBox }
TWSCustomListBox = class(TWSWinControl) TWSCustomListBox = class(TWSWinControl)
private
protected
public
end; end;
{ TWSListBox } { TWSListBox }
TWSListBox = class(TWSCustomListBox) TWSListBox = class(TWSCustomListBox)
private
protected
public
end; end;
{ TWSCustomEdit } { TWSCustomEdit }
TWSCustomEdit = class(TWSWinControl) TWSCustomEdit = class(TWSWinControl)
private
protected
public
end; end;
{ TWSCustomMemo } { TWSCustomMemo }
TWSCustomMemo = class(TWSCustomEdit) TWSCustomMemo = class(TWSCustomEdit)
private
protected
public
end; end;
{ TWSEdit } { TWSEdit }
TWSEdit = class(TWSCustomEdit) TWSEdit = class(TWSCustomEdit)
private
protected
public
end; end;
{ TWSMemo } { TWSMemo }
TWSMemo = class(TWSCustomMemo) TWSMemo = class(TWSCustomMemo)
private
protected
public
end; end;
{ TWSCustomLabel } { TWSCustomLabel }
TWSCustomLabel = class(TWSWinControl) TWSCustomLabel = class(TWSWinControl)
private
protected
public
end; end;
{ TWSLabel } { TWSLabel }
TWSLabel = class(TWSCustomLabel) TWSLabel = class(TWSCustomLabel)
private
protected
public
end; end;
{ TWSButtonControl } { TWSButtonControl }
TWSButtonControl = class(TWSWinControl) TWSButtonControl = class(TWSWinControl)
private
protected
public
end; end;
{ TWSCustomCheckBox } { TWSCustomCheckBox }
TWSCustomCheckBox = class(TWSButtonControl) TWSCustomCheckBox = class(TWSButtonControl)
private
protected
public
end; end;
{ TWSCheckBox } { TWSCheckBox }
TWSCheckBox = class(TWSCustomCheckBox) TWSCheckBox = class(TWSCustomCheckBox)
private
protected
public
end; end;
{ TWSToggleBox } { TWSToggleBox }
TWSToggleBox = class(TWSCustomCheckBox) TWSToggleBox = class(TWSCustomCheckBox)
private
protected
public
end; end;
{ TWSRadioButton } { TWSRadioButton }
TWSRadioButton = class(TWSCustomCheckBox) TWSRadioButton = class(TWSCustomCheckBox)
private
protected
public
end; end;
{ TWSCustomStaticText } { TWSCustomStaticText }
TWSCustomStaticText = class(TWSCustomControl) TWSCustomStaticText = class(TWSCustomControl)
private
protected
public
end; end;
{ TWSStaticText } { TWSStaticText }
TWSStaticText = class(TWSCustomStaticText) TWSStaticText = class(TWSCustomStaticText)
private
protected
public
end; end;
@ -204,8 +154,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something

View File

@ -25,11 +25,22 @@ unit WSToolwin;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// I M P O R T A N T // I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// 1) Only class methods allowed
// 2) Class methods have to be published and virtual
// 3) To get as little as posible circles, the uses
// clause should contain only those LCL units
// needed for registration. WSxxx units are OK
// 4) To improve speed, register only classes in the
// initialization section which actually
// implement something
// 5) To enable your XXX widgetset units, look at
// the uses clause of the XXXintf.pp
////////////////////////////////////////////////////
uses
////////////////////////////////////////////////////
// To get as little as posible circles, // To get as little as posible circles,
// uncomment only when needed for registration // uncomment only when needed for registration
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -38,13 +49,9 @@ uses
WSLCLClasses, WSControls; WSLCLClasses, WSControls;
type type
{ TWSToolWindow } { TWSToolWindow }
TWSToolWindow = class(TWSCustomControl) TWSToolWindow = class(TWSCustomControl)
private
protected
public
end; end;
@ -52,8 +59,6 @@ implementation
initialization initialization
////////////////////////////////////////////////////
// I M P O R T A N T
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// To improve speed, register only classes // To improve speed, register only classes
// which actually implement something // which actually implement something