mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 02:59:15 +02:00
IDE: use IDEIntf for OI AutoShow
git-svn-id: trunk@25610 -
This commit is contained in:
parent
0f9569efc0
commit
ea295a4244
17
ide/main.pp
17
ide/main.pp
@ -427,6 +427,7 @@ type
|
|||||||
procedure OIOnShowOptions(Sender: TObject);
|
procedure OIOnShowOptions(Sender: TObject);
|
||||||
procedure OIOnViewRestricted(Sender: TObject);
|
procedure OIOnViewRestricted(Sender: TObject);
|
||||||
procedure OIOnDestroy(Sender: TObject);
|
procedure OIOnDestroy(Sender: TObject);
|
||||||
|
procedure OIOnAutoShow(Sender: TObject);
|
||||||
procedure OIRemainingKeyDown(Sender: TObject; var Key: Word;
|
procedure OIRemainingKeyDown(Sender: TObject; var Key: Word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
procedure OIOnAddToFavourites(Sender: TObject);
|
procedure OIOnAddToFavourites(Sender: TObject);
|
||||||
@ -1529,6 +1530,11 @@ begin
|
|||||||
ObjectInspector1:=nil;
|
ObjectInspector1:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainIDE.OIOnAutoShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IDEWindowCreators.ShowForm(Sender as TObjectInspectorDlg,false);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.OIRemainingKeyDown(Sender: TObject; var Key: Word;
|
procedure TMainIDE.OIRemainingKeyDown(Sender: TObject; var Key: Word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
@ -1935,8 +1941,9 @@ begin
|
|||||||
ObjectInspector1.OnSelectionChange:=@OIOnSelectionChange;
|
ObjectInspector1.OnSelectionChange:=@OIOnSelectionChange;
|
||||||
ObjectInspector1.OnPropertyHint:=@OIOnPropertyHint;
|
ObjectInspector1.OnPropertyHint:=@OIOnPropertyHint;
|
||||||
ObjectInspector1.OnDestroy:=@OIOnDestroy;
|
ObjectInspector1.OnDestroy:=@OIOnDestroy;
|
||||||
|
ObjectInspector1.OnAutoShow:=@OIOnAutoShow;
|
||||||
ObjectInspector1.PropertyEditorHook:=GlobalDesignHook;
|
ObjectInspector1.PropertyEditorHook:=GlobalDesignHook;
|
||||||
IDEWindowCreators.Add(ObjectInspector1.Name,nil,'0','125','230','80%',
|
IDEWindowCreators.Add(ObjectInspector1.Name,nil,'0','150','230','50%',
|
||||||
NonModalIDEWindowNames[nmiwSourceNoteBookName],alLeft);
|
NonModalIDEWindowNames[nmiwSourceNoteBookName],alLeft);
|
||||||
MakeIDEWindowDockable(ObjectInspector1);
|
MakeIDEWindowDockable(ObjectInspector1);
|
||||||
|
|
||||||
@ -2188,21 +2195,21 @@ procedure TMainIDE.SetupIDEWindowsLayout;
|
|||||||
begin
|
begin
|
||||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwCodeExplorerName],
|
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwCodeExplorerName],
|
||||||
@CreateIDEWindow,
|
@CreateIDEWindow,
|
||||||
'72%','130','170','70%',NonModalIDEWindowNames[nmiwSourceNoteBookName],alRight);
|
'72%','130','170','60%',NonModalIDEWindowNames[nmiwSourceNoteBookName],alRight);
|
||||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwMessagesViewName],
|
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwMessagesViewName],
|
||||||
@CreateIDEWindow,
|
@CreateIDEWindow,
|
||||||
'230','75%','70%','100',NonModalIDEWindowNames[nmiwSourceNoteBookName],alBottom);
|
'230','65%','70%','100',NonModalIDEWindowNames[nmiwSourceNoteBookName],alBottom);
|
||||||
|
|
||||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwUnitDependenciesName],
|
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwUnitDependenciesName],
|
||||||
@CreateIDEWindow,'200','200','','');
|
@CreateIDEWindow,'200','200','','');
|
||||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwFPDocEditorName],
|
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwFPDocEditorName],
|
||||||
@CreateIDEWindow,'250','75%','70%','120');
|
@CreateIDEWindow,'250','75%','60%','120');
|
||||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwClipbrdHistoryName],
|
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwClipbrdHistoryName],
|
||||||
@CreateIDEWindow,'250','200','','');
|
@CreateIDEWindow,'250','200','','');
|
||||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwProjectInspector],
|
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwProjectInspector],
|
||||||
@CreateIDEWindow,'200','150','300','400');
|
@CreateIDEWindow,'200','150','300','400');
|
||||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwSearchResultsViewName],
|
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwSearchResultsViewName],
|
||||||
@CreateIDEWindow,'250','250','70%','300');
|
@CreateIDEWindow,'250','250','60%','300');
|
||||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwAnchorEditor],
|
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwAnchorEditor],
|
||||||
@CreateIDEWindow,'250','250','','');
|
@CreateIDEWindow,'250','250','','');
|
||||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwCodeBrowser],
|
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwCodeBrowser],
|
||||||
|
@ -689,6 +689,7 @@ type
|
|||||||
procedure DoZOrderItemClick(Sender: TObject);
|
procedure DoZOrderItemClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
FInSelection: Boolean;
|
FInSelection: Boolean;
|
||||||
|
FOnAutoShow: TNotifyEvent;
|
||||||
protected
|
protected
|
||||||
function PersistentToString(APersistent: TPersistent): string;
|
function PersistentToString(APersistent: TPersistent): string;
|
||||||
procedure AddPersistentToList(APersistent: TPersistent; List: TStrings);
|
procedure AddPersistentToList(APersistent: TPersistent; List: TStrings);
|
||||||
@ -771,6 +772,7 @@ type
|
|||||||
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
|
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
|
||||||
property OnFindDeclarationOfProperty: TNotifyEvent
|
property OnFindDeclarationOfProperty: TNotifyEvent
|
||||||
read FOnFindDeclarationOfProperty write FOnFindDeclarationOfProperty;
|
read FOnFindDeclarationOfProperty write FOnFindDeclarationOfProperty;
|
||||||
|
property OnAutoShow: TNotifyEvent read FOnAutoShow write FOnAutoShow;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -4190,6 +4192,9 @@ begin
|
|||||||
GridControl[Page].Selection := FSelection;
|
GridControl[Page].Selection := FSelection;
|
||||||
RefreshComponentTreeSelection;
|
RefreshComponentTreeSelection;
|
||||||
if (not Visible) and AutoShow and (FSelection.Count > 0) then
|
if (not Visible) and AutoShow and (FSelection.Count > 0) then
|
||||||
|
if Assigned(OnAutoShow) then
|
||||||
|
OnAutoShow(Self)
|
||||||
|
else
|
||||||
Visible := True;
|
Visible := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user