mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-25 10:48:23 +02:00
DockedFormEditor: Preparing for SyncCodeAndForm
git-svn-id: trunk@65001 -
This commit is contained in:
parent
7b18690162
commit
0a2e80cbc4
@ -227,9 +227,11 @@ type
|
|||||||
protected
|
protected
|
||||||
function GetActiveCompletionPlugin: TSourceEditorCompletionPlugin; virtual; abstract;
|
function GetActiveCompletionPlugin: TSourceEditorCompletionPlugin; virtual; abstract;
|
||||||
function GetActiveEditor: TSourceEditorInterface; virtual; abstract;
|
function GetActiveEditor: TSourceEditorInterface; virtual; abstract;
|
||||||
|
function GetBaseCaption: String; virtual; abstract;
|
||||||
function GetCompletionPlugins(Index: integer): TSourceEditorCompletionPlugin; virtual; abstract;
|
function GetCompletionPlugins(Index: integer): TSourceEditorCompletionPlugin; virtual; abstract;
|
||||||
function GetItems(Index: integer): TSourceEditorInterface; virtual; abstract;
|
function GetItems(Index: integer): TSourceEditorInterface; virtual; abstract;
|
||||||
procedure SetActiveEditor(const AValue: TSourceEditorInterface); virtual; abstract;
|
procedure SetActiveEditor(const AValue: TSourceEditorInterface); virtual; abstract;
|
||||||
|
procedure SetBaseCaption(AValue: String); virtual; abstract;
|
||||||
function GetWindowID: Integer; virtual; abstract;
|
function GetWindowID: Integer; virtual; abstract;
|
||||||
public
|
public
|
||||||
procedure IncUpdateLock; virtual; abstract;
|
procedure IncUpdateLock; virtual; abstract;
|
||||||
@ -245,6 +247,7 @@ type
|
|||||||
// Editor Page Caption update
|
// Editor Page Caption update
|
||||||
procedure AddUpdateEditorPageCaptionHandler(AEvent: TNotifyEvent; const AsLast: Boolean = True); virtual; abstract;
|
procedure AddUpdateEditorPageCaptionHandler(AEvent: TNotifyEvent; const AsLast: Boolean = True); virtual; abstract;
|
||||||
procedure RemoveUpdateEditorPageCaptionHandler(AEvent: TNotifyEvent); virtual; abstract;
|
procedure RemoveUpdateEditorPageCaptionHandler(AEvent: TNotifyEvent); virtual; abstract;
|
||||||
|
property BaseCaption: String read GetBaseCaption write SetBaseCaption;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TSemChangeReason = (
|
TSemChangeReason = (
|
||||||
|
@ -749,6 +749,7 @@ type
|
|||||||
function GetWindowID: Integer; override;
|
function GetWindowID: Integer; override;
|
||||||
protected
|
protected
|
||||||
function GetActiveCompletionPlugin: TSourceEditorCompletionPlugin; override;
|
function GetActiveCompletionPlugin: TSourceEditorCompletionPlugin; override;
|
||||||
|
function GetBaseCaption: String; override;
|
||||||
function GetCompletionPlugins(Index: integer): TSourceEditorCompletionPlugin; override;
|
function GetCompletionPlugins(Index: integer): TSourceEditorCompletionPlugin; override;
|
||||||
|
|
||||||
procedure EditorMouseMove(Sender: TObject; {%H-}Shift: TShiftstate;
|
procedure EditorMouseMove(Sender: TObject; {%H-}Shift: TShiftstate;
|
||||||
@ -798,6 +799,7 @@ type
|
|||||||
|
|
||||||
function GetActiveEditor: TSourceEditorInterface; override;
|
function GetActiveEditor: TSourceEditorInterface; override;
|
||||||
procedure SetActiveEditor(const AValue: TSourceEditorInterface); override;
|
procedure SetActiveEditor(const AValue: TSourceEditorInterface); override;
|
||||||
|
procedure SetBaseCaption(AValue: String); override;
|
||||||
function GetItems(Index: integer): TSourceEditorInterface; override;
|
function GetItems(Index: integer): TSourceEditorInterface; override;
|
||||||
function GetEditors(Index:integer): TSourceEditor;
|
function GetEditors(Index:integer): TSourceEditor;
|
||||||
|
|
||||||
@ -6485,10 +6487,10 @@ begin
|
|||||||
Name := NonModalIDEWindowNames[nmiwSourceNoteBook];
|
Name := NonModalIDEWindowNames[nmiwSourceNoteBook];
|
||||||
|
|
||||||
if AWindowID > 0 then
|
if AWindowID > 0 then
|
||||||
FBaseCaption := locWndSrcEditor + ' (' + IntToStr(AWindowID+1) + ')'
|
BaseCaption := locWndSrcEditor + ' (' + IntToStr(AWindowID+1) + ')'
|
||||||
else
|
else
|
||||||
FBaseCaption := locWndSrcEditor;
|
BaseCaption := locWndSrcEditor;
|
||||||
Caption := FBaseCaption;
|
Caption := BaseCaption;
|
||||||
KeyPreview := true;
|
KeyPreview := true;
|
||||||
FProcessingCommand := false;
|
FProcessingCommand := false;
|
||||||
|
|
||||||
@ -7409,6 +7411,11 @@ begin
|
|||||||
Result := Manager.ActiveCompletionPlugin;
|
Result := Manager.ActiveCompletionPlugin;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TSourceNotebook.GetBaseCaption: String;
|
||||||
|
begin
|
||||||
|
Result := FBaseCaption;
|
||||||
|
end;
|
||||||
|
|
||||||
function TSourceNotebook.GetCompletionPlugins(Index: integer
|
function TSourceNotebook.GetCompletionPlugins(Index: integer
|
||||||
): TSourceEditorCompletionPlugin;
|
): TSourceEditorCompletionPlugin;
|
||||||
begin
|
begin
|
||||||
@ -7549,12 +7556,17 @@ begin
|
|||||||
if EditorOpts.ShowFileNameInCaption then
|
if EditorOpts.ShowFileNameInCaption then
|
||||||
begin
|
begin
|
||||||
if ActiveEditor<>nil then
|
if ActiveEditor<>nil then
|
||||||
Caption := FBaseCaption+' - '+ActiveEditor.FileName
|
Caption := BaseCaption+' - '+ActiveEditor.FileName
|
||||||
else
|
else
|
||||||
Caption := FBaseCaption;
|
Caption := BaseCaption;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSourceNotebook.SetBaseCaption(AValue: String);
|
||||||
|
begin
|
||||||
|
FBaseCaption := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSourceNotebook.CheckCurrentCodeBufferChanged;
|
procedure TSourceNotebook.CheckCurrentCodeBufferChanged;
|
||||||
var
|
var
|
||||||
SrcEdit: TSourceEditor;
|
SrcEdit: TSourceEditor;
|
||||||
@ -7676,11 +7688,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
if (PageCount = 1) and (EditorOpts.HideSingleTabInWindow) then begin
|
if (PageCount = 1) and (EditorOpts.HideSingleTabInWindow) then begin
|
||||||
if not EditorOpts.ShowFileNameInCaption then
|
if not EditorOpts.ShowFileNameInCaption then
|
||||||
Caption := FBaseCaption + ': ' + NotebookPages[0];
|
Caption := BaseCaption + ': ' + NotebookPages[0];
|
||||||
FNotebook.ShowTabs := False;
|
FNotebook.ShowTabs := False;
|
||||||
end else begin
|
end else begin
|
||||||
if not EditorOpts.ShowFileNameInCaption then
|
if not EditorOpts.ShowFileNameInCaption then
|
||||||
Caption := FBaseCaption;
|
Caption := BaseCaption;
|
||||||
FNotebook.ShowTabs := (Manager=nil) or Manager.ShowTabs;
|
FNotebook.ShowTabs := (Manager=nil) or Manager.ShowTabs;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user