mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 09:19:45 +02:00
* Add IsUniqueGlobalComponentName
This commit is contained in:
parent
6f25cccda9
commit
8f8ce13b41
@ -1462,6 +1462,14 @@ function FindGlobalComponent(const Name: string): TComponent;
|
||||
end;
|
||||
end;
|
||||
|
||||
function IsUniqueGlobalComponentName(const aName: string): Boolean;
|
||||
|
||||
begin
|
||||
if Assigned(IsUniqueGlobalComponentNameProc) then
|
||||
Result:=IsUniqueGlobalComponentNameProc(aName)
|
||||
else
|
||||
Result:=Not Assigned(FindGlobalComponent(aName));
|
||||
end;
|
||||
|
||||
procedure RegisterInitComponentHandler(ComponentClass: TComponentClass; Handler: TInitComponentHandler);
|
||||
Var
|
||||
|
@ -2829,9 +2829,13 @@ procedure RegisterNoIcon(ComponentClasses: array of TComponentClass);
|
||||
procedure RegisterNonActiveX(ComponentClasses: array of TComponentClass;
|
||||
AxRegType: TActiveXRegType);
|
||||
|
||||
Type
|
||||
TIsUniqueGlobalComponentName = function(const Name: string): Boolean;
|
||||
|
||||
var
|
||||
GlobalNameSpace: IReadWriteSync;
|
||||
|
||||
IsUniqueGlobalComponentNameProc: TIsUniqueGlobalComponentName;
|
||||
|
||||
{ Object filing routines }
|
||||
|
||||
type
|
||||
@ -2844,7 +2848,7 @@ type
|
||||
TIntToIdent = function(Int: Longint; var Ident: string): Boolean;
|
||||
TFindGlobalComponent = function(const Name: string): TComponent;
|
||||
TInitComponentHandler = function(Instance: TComponent; RootAncestor : TClass): boolean;
|
||||
|
||||
|
||||
var
|
||||
MainThreadID: TThreadID;
|
||||
|
||||
@ -2858,6 +2862,7 @@ function FindIdentToInt(AIntegerType: Pointer): TIdentToInt;
|
||||
procedure RegisterFindGlobalComponentProc(AFindGlobalComponent: TFindGlobalComponent);
|
||||
procedure UnregisterFindGlobalComponentProc(AFindGlobalComponent: TFindGlobalComponent);
|
||||
function FindGlobalComponent(const Name: string): TComponent;
|
||||
function IsUniqueGlobalComponentName(const aName: string): Boolean;
|
||||
|
||||
function InitInheritedComponent(Instance: TComponent; RootAncestor: TClass): Boolean;
|
||||
function InitComponentRes(const ResName: string; Instance: TComponent): Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user