mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-29 19:17:29 +01:00
Sparta form designer: Rename Forms -> normForms to avoid name clash with LCL unit. Formatting.
git-svn-id: trunk@55617 -
This commit is contained in:
parent
8ec33b5670
commit
ead7577fef
@ -187,8 +187,8 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
Forms: Classes.TList; // normal forms
|
normForms: Classes.TList; // normal forms
|
||||||
dsgForms: Classes.TList; // design forms
|
dsgnForms: Classes.TList; // design forms
|
||||||
{$IFDEF USE_GENERICS_COLLECTIONS}
|
{$IFDEF USE_GENERICS_COLLECTIONS}
|
||||||
SourceEditorWindows: TObjectDictionary<TSourceEditorWindowInterface, TSourceEditorWindowData>;
|
SourceEditorWindows: TObjectDictionary<TSourceEditorWindowInterface, TSourceEditorWindowData>;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -214,7 +214,7 @@ uses
|
|||||||
//var
|
//var
|
||||||
// f: TDesignFormData;
|
// f: TDesignFormData;
|
||||||
//begin
|
//begin
|
||||||
// for Pointer(f) in dsgForms do
|
// for Pointer(f) in dsgnForms do
|
||||||
// with f as IDesignedForm do
|
// with f as IDesignedForm do
|
||||||
// if Form.Designer = ADesigner then
|
// if Form.Designer = ADesigner then
|
||||||
// Exit(Form);
|
// Exit(Form);
|
||||||
@ -233,7 +233,7 @@ uses
|
|||||||
//var
|
//var
|
||||||
// f: TDesignFormData;
|
// f: TDesignFormData;
|
||||||
//begin
|
//begin
|
||||||
// for Pointer(f) in dsgForms do
|
// for Pointer(f) in dsgnForms do
|
||||||
// ShowWindow(f.Form.Form.Handle, SW_HIDE);
|
// ShowWindow(f.Form.Form.Handle, SW_HIDE);
|
||||||
//end;
|
//end;
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ end;
|
|||||||
function AbsoluteFindModulePageControl(ASrcEditor: TSourceEditorInterface): TModulePageControl;
|
function AbsoluteFindModulePageControl(ASrcEditor: TSourceEditorInterface): TModulePageControl;
|
||||||
var
|
var
|
||||||
LSEWD: TSourceEditorWindowData;
|
LSEWD: TSourceEditorWindowData;
|
||||||
{$IFNDEF USE_GENERICS_COLLECTIONS}
|
{$IFnDEF USE_GENERICS_COLLECTIONS}
|
||||||
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
@ -309,7 +309,7 @@ begin
|
|||||||
if ADesigner = nil then
|
if ADesigner = nil then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
for p in dsgForms do
|
for p in dsgnForms do
|
||||||
begin
|
begin
|
||||||
fi := f.FForm;
|
fi := f.FForm;
|
||||||
with fi do
|
with fi do
|
||||||
@ -326,7 +326,7 @@ procedure RefreshAllSourceWindowsModulePageControl;
|
|||||||
var
|
var
|
||||||
LWindow: TSourceEditorWindowInterface;
|
LWindow: TSourceEditorWindowInterface;
|
||||||
LPageCtrl: TModulePageControl;
|
LPageCtrl: TModulePageControl;
|
||||||
{$IFNDEF USE_GENERICS_COLLECTIONS}
|
{$IFnDEF USE_GENERICS_COLLECTIONS}
|
||||||
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
@ -387,7 +387,7 @@ begin
|
|||||||
if AForm = nil then
|
if AForm = nil then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
for Pointer(f) in dsgForms do
|
for Pointer(f) in dsgnForms do
|
||||||
with f as IDesignedForm do
|
with f as IDesignedForm do
|
||||||
if (Form = AForm) then
|
if (Form = AForm) then
|
||||||
Exit(f);
|
Exit(f);
|
||||||
@ -397,7 +397,7 @@ function FindDesignFormData(AModulePageCtrl: TModulePageControl): TDesignFormDat
|
|||||||
var
|
var
|
||||||
LSourceWindow: TSourceEditorWindowInterface;
|
LSourceWindow: TSourceEditorWindowInterface;
|
||||||
LSourceEditor: TSourceEditorInterface;
|
LSourceEditor: TSourceEditorInterface;
|
||||||
{$IFNDEF USE_GENERICS_COLLECTIONS}
|
{$IFnDEF USE_GENERICS_COLLECTIONS}
|
||||||
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
@ -889,7 +889,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
LFormData := TDesignFormData.Create(Form);
|
LFormData := TDesignFormData.Create(Form);
|
||||||
LFormData.FHiding:=True;
|
LFormData.FHiding:=True;
|
||||||
dsgForms.Add(LFormData);
|
dsgnForms.Add(LFormData);
|
||||||
|
|
||||||
LSourceEditor := FindSourceEditorForDesigner(Form.Designer);
|
LSourceEditor := FindSourceEditorForDesigner(Form.Designer);
|
||||||
|
|
||||||
@ -928,7 +928,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Form.AddHandlerOnChangeBounds(GlobalSNOnChangeBounds);
|
Form.AddHandlerOnChangeBounds(GlobalSNOnChangeBounds);
|
||||||
//Form.PopupMode := pmExplicit; // (on-del)
|
//Form.PopupMode := pmExplicit; // (on-del)
|
||||||
Forms.Add(Form); // (on-del)
|
normForms.Add(Form); // (on-del)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -944,7 +944,7 @@ var
|
|||||||
LSEWD: TSourceEditorWindowData;
|
LSEWD: TSourceEditorWindowData;
|
||||||
mpc: TModulePageControl;
|
mpc: TModulePageControl;
|
||||||
LFormData: TDesignFormData;
|
LFormData: TDesignFormData;
|
||||||
{$IFNDEF USE_GENERICS_COLLECTIONS}
|
{$IFnDEF USE_GENERICS_COLLECTIONS}
|
||||||
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
||||||
LIterator2: THashmap<TSourceEditorInterface, TModulePageControl, THash_TObject>.TIterator;
|
LIterator2: THashmap<TSourceEditorInterface, TModulePageControl, THash_TObject>.TIterator;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -953,7 +953,7 @@ begin
|
|||||||
Application.ProcessMessages; // For TFrame - System Error. Code: 1400. Invalid window handle.
|
Application.ProcessMessages; // For TFrame - System Error. Code: 1400. Invalid window handle.
|
||||||
|
|
||||||
LFormData := FindDesignFormData(Form);
|
LFormData := FindDesignFormData(Form);
|
||||||
dsgForms.Remove(LFormData);
|
dsgnForms.Remove(LFormData);
|
||||||
|
|
||||||
{$IFDEF USE_GENERICS_COLLECTIONS}
|
{$IFDEF USE_GENERICS_COLLECTIONS}
|
||||||
for LSEWD in SourceEditorWindows.Values do
|
for LSEWD in SourceEditorWindows.Values do
|
||||||
@ -1031,7 +1031,7 @@ var
|
|||||||
p: Pointer;
|
p: Pointer;
|
||||||
f: TDesignFormData absolute p;
|
f: TDesignFormData absolute p;
|
||||||
begin
|
begin
|
||||||
for p in dsgForms do
|
for p in dsgnForms do
|
||||||
if f.FForm.LastActiveSourceWindow = Sender then
|
if f.FForm.LastActiveSourceWindow = Sender then
|
||||||
f.FForm.LastActiveSourceWindow := nil;
|
f.FForm.LastActiveSourceWindow := nil;
|
||||||
{$IFDEF USE_GENERICS_COLLECTIONS}
|
{$IFDEF USE_GENERICS_COLLECTIONS}
|
||||||
@ -1107,7 +1107,7 @@ class procedure TSpartaMainIDE.EditorActivated(Sender: TObject);
|
|||||||
var
|
var
|
||||||
LDesigner: TIDesigner;
|
LDesigner: TIDesigner;
|
||||||
LSourceEditor: TSourceEditorInterface;
|
LSourceEditor: TSourceEditorInterface;
|
||||||
{$IFNDEF USE_GENERICS_COLLECTIONS}
|
{$IFnDEF USE_GENERICS_COLLECTIONS}
|
||||||
LIterator: THashmap<TSourceEditorInterface, TModulePageControl, THash_TObject>.TIterator;
|
LIterator: THashmap<TSourceEditorInterface, TModulePageControl, THash_TObject>.TIterator;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -1461,7 +1461,7 @@ end;
|
|||||||
class procedure TSpartaMainIDE.GlobalOnChangeBounds(Sender: TObject);
|
class procedure TSpartaMainIDE.GlobalOnChangeBounds(Sender: TObject);
|
||||||
var
|
var
|
||||||
sewd: TSourceEditorWindowData;
|
sewd: TSourceEditorWindowData;
|
||||||
{$IFNDEF USE_GENERICS_COLLECTIONS}
|
{$IFnDEF USE_GENERICS_COLLECTIONS}
|
||||||
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
@ -1552,7 +1552,7 @@ var
|
|||||||
LPageCtrl, p: TModulePageControl;
|
LPageCtrl, p: TModulePageControl;
|
||||||
w: TSourceEditorWindowInterface;
|
w: TSourceEditorWindowInterface;
|
||||||
e: TSourceEditorInterface;
|
e: TSourceEditorInterface;
|
||||||
{$IFNDEF USE_GENERICS_COLLECTIONS}
|
{$IFnDEF USE_GENERICS_COLLECTIONS}
|
||||||
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
@ -1702,7 +1702,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFNDEF USE_GENERICS_COLLECTIONS}
|
{$IFnDEF USE_GENERICS_COLLECTIONS}
|
||||||
class procedure FreeSourceEditorWindowsValues;
|
class procedure FreeSourceEditorWindowsValues;
|
||||||
var
|
var
|
||||||
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
LIterator: THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.TIterator;
|
||||||
@ -1720,19 +1720,20 @@ end;
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
dsgForms := Classes.TList.Create;
|
dsgnForms := Classes.TList.Create;
|
||||||
{$IFDEF USE_GENERICS_COLLECTIONS}
|
{$IFDEF USE_GENERICS_COLLECTIONS}
|
||||||
SourceEditorWindows := TObjectDictionary<TSourceEditorWindowInterface, TSourceEditorWindowData>.Create([doOwnsValues]);
|
SourceEditorWindows := TObjectDictionary<TSourceEditorWindowInterface, TSourceEditorWindowData>.Create([doOwnsValues]);
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
SourceEditorWindows := THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.Create();
|
SourceEditorWindows := THashmap<TSourceEditorWindowInterface, TSourceEditorWindowData, THash_TObject>.Create();
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Forms := Classes.TList.Create;
|
normForms := Classes.TList.Create;
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
Forms.Free;
|
normForms.Free;
|
||||||
{$IFNDEF USE_GENERICS_COLLECTIONS}
|
{$IFnDEF USE_GENERICS_COLLECTIONS}
|
||||||
FreeSourceEditorWindowsValues;
|
FreeSourceEditorWindowsValues;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
SourceEditorWindows.Free;
|
SourceEditorWindows.Free;
|
||||||
FreeAndNil(dsgForms);
|
FreeAndNil(dsgnForms);
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user