From ec7c457451fb589e258fb749e03d2ca3916bc2ce Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 17 Mar 2004 13:23:34 +0000 Subject: [PATCH] added new lcl/widgetset dir to codetools defines git-svn-id: trunk@5316 - --- components/codetools/definetemplates.pas | 14 +++++++++----- lcl/lclclasses.pp | 6 +++--- lcl/widgetset/wslclclasses.pp | 24 +++++++++++++----------- lcl/widgetset/wstoolwin.pp | 6 +++--- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index bd8287c9b4..53d4695ab0 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -3567,6 +3567,9 @@ begin Format(ctsIncludeDirectoriesPlusDirs,['include']), ExternalMacroStart+'IncPath', 'include',da_Define)); + DirTempl.AddChild(TDefineTemplate.Create('LCL path addition', + Format(ctsAddsDirToSourcePath,['widgetset']), + ExternalMacroStart+'SrcPath',d('widgetset;'+SrcPath),da_Define)); MainDir.AddChild(DirTempl); // /lcl/units @@ -3578,7 +3581,7 @@ begin begin SplitLazarusCPUOSWidgetCombo(Lazarus_CPU_OS_Widget_Combinations[i], CurCPU,CurOS,CurWidgetSet); - // /lcl/units/TargetCPU + // /lcl/units/ LCLUnitsCPUDir:=LCLUnitsDir.FindChildByName(CurCPU); if LCLUnitsCPUDir=nil then begin LCLUnitsCPUDir:=TDefineTemplate.Create(CurCPU, @@ -3586,7 +3589,7 @@ begin '',CurCPU,da_Directory); LCLUnitsDir.AddChild(LCLUnitsCPUDir); end; - // /lcl/units/TargetCPU/TargetOS + // /lcl/units// // these directories contain the output of the LCL (excluding the interfaces) LCLUnitsCPUOSDir:=LCLUnitsCPUDir.FindChildByName(CurOS); if LCLUnitsCPUOSDir=nil then begin @@ -3595,14 +3598,14 @@ begin '',CurOS,da_Directory); LCLUnitsCPUDir.AddChild(LCLUnitsCPUOSDir); - ExtraSrcPath:='../../..'; + ExtraSrcPath:='../../..;../../../widgetset'; if CurOS<>'win32' then ExtraSrcPath:=ExtraSrcPath+';../../../nonwin32'; LCLUnitsCPUOSDir.AddChild(TDefineTemplate.Create('CompiledSrcPath', ctsSrcPathForCompiledUnits,CompiledSrcPathMacroName, d(ExtraSrcPath),da_Define)); end; - // /lcl/units/TargetCPU/TargetOS/WidgetSet + // /lcl/units/// // these directories contain the output of the LCL interfaces LCLUnitsCPUOSWidgetSetDir:=LCLUnitsCPUOSDir.FindChildByName(CurWidgetSet); if LCLUnitsCPUOSWidgetSetDir=nil then begin @@ -3626,7 +3629,8 @@ begin // add lcl to the source path of all widget set directories SubDirTempl.AddChild(TDefineTemplate.Create('LCL Path', Format(ctsAddsDirToSourcePath,['lcl']),ExternalMacroStart+'SrcPath', - LazarusSrcDir+d('/lcl;')+SrcPath,da_DefineRecurse)); + LazarusSrcDir+d('/lcl;')+LazarusSrcDir+d('/lcl/widgetset;')+SrcPath, + da_DefineRecurse)); DirTempl.AddChild(SubDirTempl); // /lcl/interfaces/gtk diff --git a/lcl/lclclasses.pp b/lcl/lclclasses.pp index 3c444ae5b4..7dafe402d8 100644 --- a/lcl/lclclasses.pp +++ b/lcl/lclclasses.pp @@ -20,14 +20,14 @@ * * ***************************************************************************** } -unit lclclasses; +unit LCLClasses; -{$mode objfpc}{H+} +{$mode objfpc}{$H+} interface uses - classes, wslclclasses; + Classes, WSLCLClasses; type diff --git a/lcl/widgetset/wslclclasses.pp b/lcl/widgetset/wslclclasses.pp index 049a01ce73..4351289320 100644 --- a/lcl/widgetset/wslclclasses.pp +++ b/lcl/widgetset/wslclclasses.pp @@ -20,28 +20,28 @@ * * ***************************************************************************** } -unit wslclclasses; +unit WSLCLClasses; -{$mode objfpc}{H+} +{$mode objfpc}{$H+} interface uses - classes; + Classes; type { TWSLCLComponent } - TWSLCLComponentClass = class of TWSLCLComponent; TWSLCLComponent = class(TObject) - private - protected - public end; - + + TWSLCLComponentClass = class of TWSLCLComponent; + + function FindWSComponentClass(const AComponent: TComponentClass): TWSLCLComponentClass; -procedure RegisterWSComponent(const AComponent: TComponentClass; const AWSComponent: TWSLCLComponentClass); +procedure RegisterWSComponent(const AComponent: TComponentClass; + const AWSComponent: TWSLCLComponentClass); implementation @@ -51,7 +51,8 @@ uses var MWSComponentList: TStringList; -function FindWSComponentClass(const AComponent: TComponentClass): TWSLCLComponentClass; +function FindWSComponentClass( + const AComponent: TComponentClass): TWSLCLComponentClass; var idx: Integer; cls: TClass; @@ -70,7 +71,8 @@ begin end; end; -procedure RegisterWSComponent(const AComponent: TComponentClass; const AWSComponent: TWSLCLComponentClass); +procedure RegisterWSComponent(const AComponent: TComponentClass; + const AWSComponent: TWSLCLComponentClass); var idx: Integer; Name: String; diff --git a/lcl/widgetset/wstoolwin.pp b/lcl/widgetset/wstoolwin.pp index 0094781017..f38a23388c 100644 --- a/lcl/widgetset/wstoolwin.pp +++ b/lcl/widgetset/wstoolwin.pp @@ -20,9 +20,9 @@ * * ***************************************************************************** } -unit wstoolwin; +unit WSToolWin; -{$mode objfpc}{H+} +{$mode objfpc}{$H+} interface @@ -30,7 +30,7 @@ uses //////////////////////////////////////////////////// // I M P O R T A N T //////////////////////////////////////////////////// -// To get as litle as posible circles, +// To get as little as posible circles, // Uncomment only when needed for registration //////////////////////////////////////////////////// // toolwin,