IDEIntf: Change TComponentPropertyEditor back to original behavior so it lists all components from all forms.

git-svn-id: trunk@42886 -
This commit is contained in:
juha 2013-09-19 18:59:22 +00:00
parent a4a4e4c791
commit 0a0a90e99b

View File

@ -620,12 +620,12 @@ type
procedure SetValue(const NewValue: ansistring); override; procedure SetValue(const NewValue: ansistring); override;
end; end;
{ TComponentPropertyEditor { TComponentOneFormPropertyEditor
The default editor for TComponents. It allows the user to set the value of this An editor for TComponents. It allows the user to set the value of this
property to point to a component in the same form that is type compatible property to point to a component in the same form that is type compatible
with the property being edited (e.g. the ActiveControl property). } with the property being edited (e.g. the ActiveControl property). }
TComponentPropertyEditor = class(TPersistentPropertyEditor) TComponentOneFormPropertyEditor = class(TPersistentPropertyEditor)
private private
fIgnoreClass: TControlClass; fIgnoreClass: TControlClass;
public public
@ -635,17 +635,17 @@ type
{ TCoolBarControlPropertyEditor } { TCoolBarControlPropertyEditor }
TCoolBarControlPropertyEditor = class(TComponentPropertyEditor) TCoolBarControlPropertyEditor = class(TComponentOneFormPropertyEditor)
public public
constructor Create(Hook: TPropertyEditorHook; APropCount: Integer); override; constructor Create(Hook: TPropertyEditorHook; APropCount: Integer); override;
end; end;
{ TComponentAllPropertyEditor { TComponentPropertyEditor
The default editor for TComponents. It allows the user to set the value of this The default editor for TComponents. It allows the user to set the value of
property to point to a component in any form in the project (?) that is this property to point to a component in any form in the project that is
type compatible with the property being edited. } type compatible with the property being edited. }
TComponentAllPropertyEditor = class(TPersistentPropertyEditor) TComponentPropertyEditor = class(TPersistentPropertyEditor)
protected protected
function GetComponentReference: TComponent; virtual; function GetComponentReference: TComponent; virtual;
public public
@ -658,7 +658,7 @@ type
a component on the form (or via form linking) that is type compatible a component on the form (or via form linking) that is type compatible
with the property being edited. } with the property being edited. }
TInterfacePropertyEditor = class(TComponentAllPropertyEditor) TInterfacePropertyEditor = class(TComponentPropertyEditor)
private private
protected protected
function GetComponent(const AInterface: IInterface): TComponent; function GetComponent(const AInterface: IInterface): TComponent;
@ -672,7 +672,7 @@ type
{ TNoteBookActiveControlPropertyEditor } { TNoteBookActiveControlPropertyEditor }
TNoteBookActiveControlPropertyEditor = class(TComponentAllPropertyEditor) TNoteBookActiveControlPropertyEditor = class(TComponentPropertyEditor)
protected protected
function CheckNewValue(APersistent: TPersistent): boolean; override; function CheckNewValue(APersistent: TPersistent): boolean; override;
public public
@ -4342,9 +4342,9 @@ begin
end; end;
end; end;
{ TComponentPropertyEditor } { TComponentOneFormPropertyEditor }
function TComponentPropertyEditor.AllEqual: Boolean; function TComponentOneFormPropertyEditor.AllEqual: Boolean;
var var
AComponent: TComponent; AComponent: TComponent;
begin begin
@ -4355,7 +4355,7 @@ begin
Result:=csDesigning in AComponent.ComponentState; Result:=csDesigning in AComponent.ComponentState;
end; end;
procedure TComponentPropertyEditor.GetValues(Proc: TGetStrProc); procedure TComponentOneFormPropertyEditor.GetValues(Proc: TGetStrProc);
procedure TraverseComponents(Root: TComponent); procedure TraverseComponents(Root: TComponent);
var var
@ -4380,14 +4380,14 @@ begin
fIgnoreClass := TCustomCoolBar; fIgnoreClass := TCustomCoolBar;
end; end;
{ TComponentAllPropertyEditor } { TComponentPropertyEditor }
function TComponentAllPropertyEditor.GetComponentReference: TComponent; function TComponentPropertyEditor.GetComponentReference: TComponent;
begin begin
Result := TComponent(GetObjectValue); Result := TComponent(GetObjectValue);
end; end;
function TComponentAllPropertyEditor.AllEqual: Boolean; function TComponentPropertyEditor.AllEqual: Boolean;
var var
AComponent: TComponent; AComponent: TComponent;
begin begin
@ -6693,8 +6693,8 @@ begin
// nil,'',TTimePropertyEditor); // nil,'',TTimePropertyEditor);
RegisterPropertyEditor(TypeInfo(TDateTime), nil, '', TDateTimePropertyEditor); RegisterPropertyEditor(TypeInfo(TDateTime), nil, '', TDateTimePropertyEditor);
RegisterPropertyEditor(TypeInfo(TCursor), nil, '', TCursorPropertyEditor); RegisterPropertyEditor(TypeInfo(TCursor), nil, '', TCursorPropertyEditor);
RegisterPropertyEditor(TypeInfo(TComponent), nil, '', TComponentAllPropertyEditor); RegisterPropertyEditor(TypeInfo(TComponent), nil, '', TComponentPropertyEditor);
RegisterPropertyEditor(TypeInfo(TComponent), nil, 'ActiveControl', TComponentPropertyEditor); RegisterPropertyEditor(TypeInfo(TComponent), nil, 'ActiveControl', TComponentOneFormPropertyEditor);
RegisterPropertyEditor(TypeInfo(TControl), TCoolBand, 'Control', TCoolBarControlPropertyEditor); RegisterPropertyEditor(TypeInfo(TControl), TCoolBand, 'Control', TCoolBarControlPropertyEditor);
RegisterPropertyEditor(TypeInfo(TCollection), nil, '', TCollectionPropertyEditor); RegisterPropertyEditor(TypeInfo(TCollection), nil, '', TCollectionPropertyEditor);
RegisterPropertyEditor(TypeInfo(AnsiString), TFileDialog, 'Filter', TFileDlgFilterProperty); RegisterPropertyEditor(TypeInfo(AnsiString), TFileDialog, 'Filter', TFileDlgFilterProperty);