mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 23:49:36 +02:00
MG: component editors can now add menuitems to the designer popupmenu
git-svn-id: trunk@3273 -
This commit is contained in:
parent
443c0e5ae2
commit
c191a0955a
@ -416,12 +416,13 @@ end;
|
||||
function TComponentEditor.GetVerb(Index: Integer): string;
|
||||
begin
|
||||
// Intended for descendents to implement
|
||||
Result:='';
|
||||
Result:=ClassName+IntToStr(Index);
|
||||
end;
|
||||
|
||||
procedure TComponentEditor.ExecuteVerb(Index: Integer);
|
||||
begin
|
||||
// Intended for descendents to implement
|
||||
writeln(Classname+'.ExecuteVerb: ',Index);
|
||||
end;
|
||||
|
||||
procedure TComponentEditor.Copy;
|
||||
|
@ -1494,7 +1494,6 @@ end;
|
||||
function TControlSelection.OnlyNonVisualComponentsSelected: boolean;
|
||||
var i: integer;
|
||||
begin
|
||||
writeln('TControlSelection.OnlyNonVisualComponentsSelected ',cssOnlyNonVisualNeedsUpdate in FStates,' ',FOnlyNonVisualComponentsSelected);
|
||||
if cssOnlyNonVisualNeedsUpdate in FStates then begin
|
||||
Result:=true;
|
||||
for i:=0 to FControls.Count-1 do
|
||||
@ -1508,7 +1507,6 @@ end;
|
||||
function TControlSelection.OnlyVisualComponentsSelected: boolean;
|
||||
var i: integer;
|
||||
begin
|
||||
writeln('TControlSelection.OnlyVisualComponentsSelected ',cssOnlyVisualNeedsUpdate in FStates,' ',FOnlyVisualComponentsSelected);
|
||||
if cssOnlyVisualNeedsUpdate in FStates then begin
|
||||
Result:=true;
|
||||
for i:=0 to FControls.Count-1 do
|
||||
|
@ -260,14 +260,18 @@ var
|
||||
OwnerForm: TCustomForm;
|
||||
begin
|
||||
if FDesigner=nil then begin
|
||||
OwnerForm:=TCustomForm(Component.Owner);
|
||||
if OwnerForm=nil then begin
|
||||
raise Exception.Create('TComponentInterface.GetDesigner: '
|
||||
+Component.Name+' Owner=nil');
|
||||
end;
|
||||
if not (OwnerForm is TCustomForm) then begin
|
||||
raise Exception.Create('TComponentInterface.GetDesigner: '
|
||||
+Component.Name+' OwnerForm='+OwnerForm.ClassName);
|
||||
if (Component is TCustomForm) and (TCustomForm(Component).Parent=nil) then
|
||||
OwnerForm:=TCustomForm(Component)
|
||||
else begin
|
||||
OwnerForm:=TCustomForm(Component.Owner);
|
||||
if OwnerForm=nil then begin
|
||||
raise Exception.Create('TComponentInterface.GetDesigner: '
|
||||
+Component.Name+' Owner=nil');
|
||||
end;
|
||||
if not (OwnerForm is TCustomForm) then begin
|
||||
raise Exception.Create('TComponentInterface.GetDesigner: '
|
||||
+Component.Name+' OwnerForm='+OwnerForm.ClassName);
|
||||
end;
|
||||
end;
|
||||
FDesigner:=TComponentEditorDesigner(OwnerForm.Designer);
|
||||
if FDesigner=nil then begin
|
||||
|
Loading…
Reference in New Issue
Block a user