mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 05:39:18 +02:00
Source Editor: New events semWindowShow and semWindowHide. r49388 from free-sparta branch by Maciej Izak.
git-svn-id: trunk@49535 -
This commit is contained in:
parent
091dff42fb
commit
295e472a3a
@ -218,6 +218,8 @@ type
|
||||
semWindowDestroy, // Called after removal of a Window
|
||||
semWindowActivate, // Window is now ActiveSourceWindow (does not vave to be focused)
|
||||
semWindowFocused, // The window became the active win of the application
|
||||
semWindowShow, // Called after a Window is shown
|
||||
semWindowHide, // Called after a Window is hidden
|
||||
semEditorCreate, // Called after a new editor was created and added to list
|
||||
semEditorDestroy, // Called when an Editor is destroyed / after it is removed fron the list of editors
|
||||
semEditorActivate, // Editor is ActiveEditor
|
||||
|
@ -688,7 +688,7 @@ type
|
||||
procedure EditorChanged(Sender: TObject);
|
||||
procedure DoClose(var CloseAction: TCloseAction); override;
|
||||
procedure DoShow; override;
|
||||
|
||||
procedure DoHide; override;
|
||||
protected
|
||||
function GetActiveCompletionPlugin: TSourceEditorCompletionPlugin; override;
|
||||
function GetCompletionPlugins(Index: integer): TSourceEditorCompletionPlugin; override;
|
||||
@ -865,6 +865,8 @@ type
|
||||
function GetUniqueSourceEditors(Index: integer): TSourceEditorInterface; override;
|
||||
function GetMarklingProducers(Index: integer): TSourceMarklingProducer; override;
|
||||
procedure SyncMessageWnd(Sender: TObject);
|
||||
procedure DoWindowShow(AWindow: TSourceNotebook);
|
||||
procedure DoWindowHide(AWindow: TSourceNotebook);
|
||||
public
|
||||
procedure BeginAutoFocusLock;
|
||||
procedure EndAutoFocusLock;
|
||||
@ -6731,6 +6733,15 @@ begin
|
||||
// statusbar was not updated when visible=false, update now
|
||||
if snUpdateStatusBarNeeded in States then
|
||||
UpdateStatusBar;
|
||||
if Assigned(Manager) and (Parent <> nil) then
|
||||
Manager.DoWindowShow(Self);
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.DoHide;
|
||||
begin
|
||||
inherited DoHide;
|
||||
if Assigned(Manager) and (Parent <> nil) then
|
||||
Manager.DoWindowHide(Self);
|
||||
end;
|
||||
|
||||
function TSourceNotebook.IndexOfEditorInShareWith(AnOtherEditor: TSourceEditor): Integer;
|
||||
@ -8818,6 +8829,16 @@ begin
|
||||
Result:=TSourceMarklingProducer(fProducers[Index]);
|
||||
end;
|
||||
|
||||
procedure TSourceEditorManagerBase.DoWindowShow(AWindow: TSourceNotebook);
|
||||
begin
|
||||
FChangeNotifyLists[semWindowShow].CallNotifyEvents(AWindow);
|
||||
end;
|
||||
|
||||
procedure TSourceEditorManagerBase.DoWindowHide(AWindow: TSourceNotebook);
|
||||
begin
|
||||
FChangeNotifyLists[semWindowHide].CallNotifyEvents(AWindow);
|
||||
end;
|
||||
|
||||
procedure TSourceEditorManagerBase.SyncMessageWnd(Sender: TObject);
|
||||
begin
|
||||
MessagesView.MessagesFrame1.ApplyMultiSrcChanges(Sender as TETMultiSrcChanges);
|
||||
|
Loading…
Reference in New Issue
Block a user