mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 23:19:29 +02:00
Allow query of LCLWidgetTypeName without LCL. Turn BuildLCLWidgetType into const and fix comment.
This commit is contained in:
parent
40e7dd7854
commit
b0a3e49dc0
@ -19,6 +19,9 @@ unit LazVersion;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
type
|
||||||
|
TLCLWidgetTypeNameEvent = function(): string;
|
||||||
|
|
||||||
const
|
const
|
||||||
laz_major = 2;
|
laz_major = 2;
|
||||||
laz_minor = 3;
|
laz_minor = 3;
|
||||||
@ -27,7 +30,20 @@ const
|
|||||||
laz_fullversion = ((laz_major * 100 + laz_minor) * 100 + laz_release) * 100 + laz_patch;
|
laz_fullversion = ((laz_major * 100 + laz_minor) * 100 + laz_release) * 100 + laz_patch;
|
||||||
laz_version = '2.3.0.0';
|
laz_version = '2.3.0.0';
|
||||||
|
|
||||||
|
var
|
||||||
|
OnLCLWidgetTypeName: TLCLWidgetTypeNameEvent; // Set by LCL
|
||||||
|
|
||||||
|
function GetLCLWidgetTypeName: string;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
function GetLCLWidgetTypeName: string;
|
||||||
|
begin
|
||||||
|
if Assigned(OnLCLWidgetTypeName) then
|
||||||
|
Result := OnLCLWidgetTypeName()
|
||||||
|
else
|
||||||
|
Result := '';
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -38,13 +38,12 @@ unit Compiler;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, contnrs, strutils,
|
Classes, SysUtils, Contnrs, StrUtils,
|
||||||
|
{$IF FPC_FULLVERSION >= 30200}System.{$ENDIF}UITypes,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
FPCAdds, LazUTF8, LazFileUtils, LazUtilities, LazLoggerBase,
|
FPCAdds, LazUTF8, LazFileUtils, LazUtilities, LazLoggerBase,
|
||||||
// Codetools
|
// Codetools
|
||||||
DefineTemplates, LinkScanner, CodeToolManager, TransferMacros,
|
DefineTemplates, LinkScanner, CodeToolManager, TransferMacros,
|
||||||
// LCL
|
|
||||||
Forms, Controls,
|
|
||||||
// BuildIntf
|
// BuildIntf
|
||||||
IDEExternToolIntf,
|
IDEExternToolIntf,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
|
@ -44,11 +44,9 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, Laz_AVL_Tree,
|
Classes, SysUtils, Laz_AVL_Tree,
|
||||||
{$IF FPC_FULLVERSION >= 30200}System.{$ENDIF}UITypes,
|
{$IF FPC_FULLVERSION >= 30200}System.{$ENDIF}UITypes,
|
||||||
// LCL
|
|
||||||
InterfaceBase,
|
|
||||||
// LazUtils
|
// LazUtils
|
||||||
FileUtil, LazFileUtils, LazUTF8, Laz2_XMLCfg, Laz2_DOM, LazUtilities, LazTracer,
|
FileUtil, LazFileUtils, LazUTF8, Laz2_XMLCfg, Laz2_DOM, LazUtilities, LazTracer,
|
||||||
LazStringUtils, FPCAdds,
|
LazStringUtils, FPCAdds, LazVersion,
|
||||||
// CodeTools
|
// CodeTools
|
||||||
FileProcs, DefineTemplates, CodeToolsCfgScript, CodeToolManager,
|
FileProcs, DefineTemplates, CodeToolsCfgScript, CodeToolManager,
|
||||||
KeywordFuncLists, BasicCodeTools, LinkScanner,
|
KeywordFuncLists, BasicCodeTools, LinkScanner,
|
||||||
@ -57,10 +55,9 @@ uses
|
|||||||
// IDEIntf
|
// IDEIntf
|
||||||
SrcEditorIntf,
|
SrcEditorIntf,
|
||||||
// IdeConfig
|
// IdeConfig
|
||||||
LazConf, EnvironmentOpts, SearchPathProcs, IdeXmlConfigProcs,
|
LazConf, EnvironmentOpts, SearchPathProcs, IdeXmlConfigProcs, TransferMacros,
|
||||||
// IDE
|
// IDE
|
||||||
LazarusIDEStrConsts, IDEProcs, TransferMacros, etFPCMsgParser,
|
LazarusIDEStrConsts, IDEProcs, etFPCMsgParser, ModeMatrixOpts, CompOptsModes;
|
||||||
IDECmdLine, ModeMatrixOpts, CompOptsModes;
|
|
||||||
|
|
||||||
const
|
const
|
||||||
DefaultCompilerPath = '$(CompPath)';
|
DefaultCompilerPath = '$(CompPath)';
|
||||||
|
@ -31,7 +31,7 @@ uses
|
|||||||
// LCL
|
// LCL
|
||||||
LCLProc, LCLType, LMessages, LCLPlatformDef, IntfGraphics, Themes,
|
LCLProc, LCLType, LMessages, LCLPlatformDef, IntfGraphics, Themes,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazUTF8, IntegerList, LazUtilities, LazLoggerBase, GraphType, GraphMath;
|
LazUTF8, IntegerList, LazUtilities, LazLoggerBase, GraphType, GraphMath, LazVersion;
|
||||||
|
|
||||||
type
|
type
|
||||||
PEventHandler = type Pointer;
|
PEventHandler = type Pointer;
|
||||||
@ -217,12 +217,6 @@ var
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{function GetDefaultLCLWidgetType: TLCLPlatform;
|
|
||||||
begin
|
|
||||||
Assert(Assigned(WidgetSet), 'GetDefaultLCLWidgetType: WidgetSet is not assigned.');
|
|
||||||
if WidgetSet.LCLPlatform<>lpNoGUI then
|
|
||||||
Result:=WidgetSet.LCLPlatform
|
|
||||||
end; }
|
|
||||||
function GetDefaultLCLWidgetType: TLCLPlatform;
|
function GetDefaultLCLWidgetType: TLCLPlatform;
|
||||||
begin
|
begin
|
||||||
if (WidgetSet<>nil) and (WidgetSet.LCLPlatform<>lpNoGUI) then
|
if (WidgetSet<>nil) and (WidgetSet.LCLPlatform<>lpNoGUI) then
|
||||||
@ -345,4 +339,7 @@ end;
|
|||||||
{$I intfbasewinapi.inc}
|
{$I intfbasewinapi.inc}
|
||||||
{$I intfbaselcl.inc}
|
{$I intfbaselcl.inc}
|
||||||
|
|
||||||
|
initialization
|
||||||
|
LazVersion.OnLCLWidgetTypeName := @GetLCLWidgetTypeName;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -78,8 +78,7 @@ const
|
|||||||
'MUI'
|
'MUI'
|
||||||
);
|
);
|
||||||
|
|
||||||
var
|
// Used by GetDefaultLCLWidgetType
|
||||||
// set by lazbuild.lpr and used by GetDefaultLCLWidgetType
|
|
||||||
BuildLCLWidgetType: TLCLPlatform =
|
BuildLCLWidgetType: TLCLPlatform =
|
||||||
{$IFDEF MSWindows}{$DEFINE WidgetSetDefined}
|
{$IFDEF MSWindows}{$DEFINE WidgetSetDefined}
|
||||||
lpWin32;
|
lpWin32;
|
||||||
|
Loading…
Reference in New Issue
Block a user