csOwnedChildsSelectable inverted and renamed to csOwnedChildsNotSelectable

git-svn-id: trunk@22852 -
This commit is contained in:
mattias 2009-11-28 15:18:27 +00:00
parent 8ca12569f2
commit 0d6aff22e1
6 changed files with 8 additions and 31 deletions

View File

@ -1496,8 +1496,8 @@ end;
constructor TCustomSynEdit.Create(AOwner: TComponent); constructor TCustomSynEdit.Create(AOwner: TComponent);
begin begin
inherited Create(AOwner); inherited Create(AOwner);
SetAncestor(True); // temp until tframe does this
SetInline(True); SetInline(True);
ControlStyle:=ControlStyle+[csOwnedChildsNotSelectable];
FBeautifier := SynDefaultBeautifier; FBeautifier := SynDefaultBeautifier;

View File

@ -437,7 +437,7 @@ begin
// search in childs // search in childs
if not ((Control<>nil) if not ((Control<>nil)
and (csInline in Control.ComponentState) and (csInline in Control.ComponentState)
and (not (csOwnedChildsSelectable in Control.ControlStyle))) then and (csOwnedChildsNotSelectable in Control.ControlStyle)) then
begin begin
{$IFDEF VerboseDesignerSelect} {$IFDEF VerboseDesignerSelect}
DebugLn(['TComponentSearch.Gather search in childs of ',DbgSName(Child)]); DebugLn(['TComponentSearch.Gather search in childs of ',DbgSName(Child)]);
@ -1634,7 +1634,7 @@ begin
if Result=Form then exit; if Result=Form then exit;
if (Result.Owner is TControl) then begin if (Result.Owner is TControl) then begin
OwnerControl:=TControl(Result.Owner); OwnerControl:=TControl(Result.Owner);
if csOwnedChildsSelectable in OwnerControl.ControlStyle then if (not (csOwnedChildsNotSelectable in OwnerControl.ControlStyle)) then
exit; exit;
Result:=GetDesignControl(OwnerControl); Result:=GetDesignControl(OwnerControl);
end else begin end else begin

View File

@ -144,7 +144,7 @@ begin
else else
Root := AComponent.Owner; Root := AComponent.Owner;
if not ((Root is TControl) if not ((Root is TControl)
and (not (csOwnedChildsSelectable in TControl(Root).ControlStyle))) and (csOwnedChildsNotSelectable in TControl(Root).ControlStyle))
then then
TComponentAccessor(AComponent).GetChildren(@Walk, Root); TComponentAccessor(AComponent).GetChildren(@Walk, Root);
FNode := OldNode; FNode := OldNode;
@ -466,11 +466,7 @@ var
var var
OldExpanded: TTreeNodeExpandedState; OldExpanded: TTreeNodeExpandedState;
NewNode: TTreeNode;
i: Integer;
AComponent: TComponent;
RootNode: TTreeNode; RootNode: TTreeNode;
AVLNode: TAvgLvlTreeNode;
Candidate: TComponentCandidate; Candidate: TComponentCandidate;
begin begin
BeginUpdate; BeginUpdate;
@ -500,26 +496,7 @@ begin
if RootObject is TComponent then if RootObject is TComponent then
begin begin
AddCandidates(RootComponent); AddCandidates(RootComponent);
AddChildren(RootComponent,RootNode);
for i := 0 to RootComponent.ComponentCount - 1 do
begin
AComponent := RootComponent.Components[i];
AVLNode := Candidates.FindKey(AComponent,
TListSortCompare(@ComparePersistentWithComponentCandidate));
Candidate := TComponentCandidate(AVLNode.Data);
if Candidate.Added or
AComponent.HasParent and
(AComponent.GetParentComponent <> nil) and
(AComponent.GetParentComponent <> RootComponent) then
Continue;
Candidate.Added := True;
NewNode := Items.AddChild(RootNode, CreateNodeCaption(AComponent));
NewNode.Data := AComponent;
NewNode.ImageIndex := GetImageFor(AComponent);
NewNode.SelectedIndex := NewNode.ImageIndex;
NewNode.MultiSelected := Selection.IndexOf(AComponent) >= 0;
AddChildren(AComponent, NewNode);
end;
end; end;
finally finally
Candidates.FreeAndClear; Candidates.FreeAndClear;

View File

@ -1657,7 +1657,7 @@ begin
if csInline in Child.ComponentState then begin if csInline in Child.ComponentState then begin
if scfWithoutInlineChilds in Flags then exit; if scfWithoutInlineChilds in Flags then exit;
if (Child is TControl) if (Child is TControl)
and (not (csOwnedChildsSelectable in TControl(Child).ControlStyle)) then and (csOwnedChildsNotSelectable in TControl(Child).ControlStyle) then
exit; exit;
Root:=Child; Root:=Child;
end; end;

View File

@ -414,7 +414,7 @@ constructor TCustomButtonPanel.Create(AOwner: TComponent);
begin begin
inherited Create(AOwner); inherited Create(AOwner);
ControlStyle := ControlStyle + [csOwnedChildsSelectable]; ControlStyle := ControlStyle + [csOwnedChildsNotSelectable];
Align := alBottom; Align := alBottom;
BevelInner := bvNone; BevelInner := bvNone;

View File

@ -214,7 +214,7 @@ type
csHasDefaultAction, // control implements useful ExecuteDefaultAction csHasDefaultAction, // control implements useful ExecuteDefaultAction
csHasCancelAction, // control implements useful ExecuteCancelAction csHasCancelAction, // control implements useful ExecuteCancelAction
csNoDesignSelectable, // control can not be selected at design time csNoDesignSelectable, // control can not be selected at design time
csOwnedChildsSelectable // child controls owned by this control are selectable in the designer csOwnedChildsNotSelectable // child controls owned by this control are NOT selectable in the designer
); );
TControlStyle = set of TControlStyleType; TControlStyle = set of TControlStyleType;