IDEIntf: added TPropertyEditorHook.IsSelected

git-svn-id: trunk@37143 -
This commit is contained in:
mattias 2012-05-03 06:44:56 +00:00
parent 70fca72696
commit 6e86b03868

View File

@ -1238,6 +1238,7 @@ type
procedure GetSelection(const ASelection: TPersistentSelectionList);
procedure SetSelection(const ASelection: TPersistentSelectionList);
procedure Unselect(const APersistent: TPersistent);
function IsSelected(const APersistent: TPersistent): boolean;
procedure SelectOnlyThis(const APersistent: TPersistent);
// persistent objects
function GetObject(const Name: ShortString): TPersistent;
@ -5407,6 +5408,20 @@ begin
end;
end;
function TPropertyEditorHook.IsSelected(const APersistent: TPersistent
): boolean;
var
Selection: TPersistentSelectionList;
begin
Selection := TPersistentSelectionList.Create;
try
GetSelection(Selection);
Result:=Selection.IndexOf(APersistent)>=0;
finally
Selection.Free;
end;
end;
procedure TPropertyEditorHook.SelectOnlyThis(const APersistent: TPersistent);
var
NewSelection: TPersistentSelectionList;