mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 20:09:10 +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
|
semWindowDestroy, // Called after removal of a Window
|
||||||
semWindowActivate, // Window is now ActiveSourceWindow (does not vave to be focused)
|
semWindowActivate, // Window is now ActiveSourceWindow (does not vave to be focused)
|
||||||
semWindowFocused, // The window became the active win of the application
|
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
|
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
|
semEditorDestroy, // Called when an Editor is destroyed / after it is removed fron the list of editors
|
||||||
semEditorActivate, // Editor is ActiveEditor
|
semEditorActivate, // Editor is ActiveEditor
|
||||||
|
@ -688,7 +688,7 @@ type
|
|||||||
procedure EditorChanged(Sender: TObject);
|
procedure EditorChanged(Sender: TObject);
|
||||||
procedure DoClose(var CloseAction: TCloseAction); override;
|
procedure DoClose(var CloseAction: TCloseAction); override;
|
||||||
procedure DoShow; override;
|
procedure DoShow; override;
|
||||||
|
procedure DoHide; override;
|
||||||
protected
|
protected
|
||||||
function GetActiveCompletionPlugin: TSourceEditorCompletionPlugin; override;
|
function GetActiveCompletionPlugin: TSourceEditorCompletionPlugin; override;
|
||||||
function GetCompletionPlugins(Index: integer): TSourceEditorCompletionPlugin; override;
|
function GetCompletionPlugins(Index: integer): TSourceEditorCompletionPlugin; override;
|
||||||
@ -865,6 +865,8 @@ type
|
|||||||
function GetUniqueSourceEditors(Index: integer): TSourceEditorInterface; override;
|
function GetUniqueSourceEditors(Index: integer): TSourceEditorInterface; override;
|
||||||
function GetMarklingProducers(Index: integer): TSourceMarklingProducer; override;
|
function GetMarklingProducers(Index: integer): TSourceMarklingProducer; override;
|
||||||
procedure SyncMessageWnd(Sender: TObject);
|
procedure SyncMessageWnd(Sender: TObject);
|
||||||
|
procedure DoWindowShow(AWindow: TSourceNotebook);
|
||||||
|
procedure DoWindowHide(AWindow: TSourceNotebook);
|
||||||
public
|
public
|
||||||
procedure BeginAutoFocusLock;
|
procedure BeginAutoFocusLock;
|
||||||
procedure EndAutoFocusLock;
|
procedure EndAutoFocusLock;
|
||||||
@ -6731,6 +6733,15 @@ begin
|
|||||||
// statusbar was not updated when visible=false, update now
|
// statusbar was not updated when visible=false, update now
|
||||||
if snUpdateStatusBarNeeded in States then
|
if snUpdateStatusBarNeeded in States then
|
||||||
UpdateStatusBar;
|
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;
|
end;
|
||||||
|
|
||||||
function TSourceNotebook.IndexOfEditorInShareWith(AnOtherEditor: TSourceEditor): Integer;
|
function TSourceNotebook.IndexOfEditorInShareWith(AnOtherEditor: TSourceEditor): Integer;
|
||||||
@ -8818,6 +8829,16 @@ begin
|
|||||||
Result:=TSourceMarklingProducer(fProducers[Index]);
|
Result:=TSourceMarklingProducer(fProducers[Index]);
|
||||||
end;
|
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);
|
procedure TSourceEditorManagerBase.SyncMessageWnd(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
MessagesView.MessagesFrame1.ApplyMultiSrcChanges(Sender as TETMultiSrcChanges);
|
MessagesView.MessagesFrame1.ApplyMultiSrcChanges(Sender as TETMultiSrcChanges);
|
||||||
|
Loading…
Reference in New Issue
Block a user