mirror of https://gitlab.com/basile.b/dexed.git
#42, added event allowing to add a brkp during debugging
This commit is contained in:
parent
7eab8308cf
commit
bc7169d1d8
|
@ -16,6 +16,10 @@ type
|
||||||
|
|
||||||
TCESynMemo = class;
|
TCESynMemo = class;
|
||||||
|
|
||||||
|
// breakpoint added if not removed
|
||||||
|
TBreakPointModifyEvent = procedure(sender: TCESynMemo; line: integer;
|
||||||
|
removed: boolean) of object;
|
||||||
|
|
||||||
// Simple THintWindow descendant allowing the font size to be in sync with the editor.
|
// Simple THintWindow descendant allowing the font size to be in sync with the editor.
|
||||||
TCEEditorHintWindow = class(THintWindow)
|
TCEEditorHintWindow = class(THintWindow)
|
||||||
public
|
public
|
||||||
|
@ -107,6 +111,7 @@ type
|
||||||
fTxtHighlighter: TSynTxtSyn;
|
fTxtHighlighter: TSynTxtSyn;
|
||||||
fImages: TImageList;
|
fImages: TImageList;
|
||||||
fBreakPoints: TFPList;
|
fBreakPoints: TFPList;
|
||||||
|
fBreakpointEvent: TBreakPointModifyEvent;
|
||||||
function getMouseFileBytePos: Integer;
|
function getMouseFileBytePos: Integer;
|
||||||
procedure changeNotify(Sender: TObject);
|
procedure changeNotify(Sender: TObject);
|
||||||
procedure identifierToD2Syn;
|
procedure identifierToD2Syn;
|
||||||
|
@ -160,7 +165,8 @@ type
|
||||||
procedure saveTempFile;
|
procedure saveTempFile;
|
||||||
//
|
//
|
||||||
function breakPointsCount: integer;
|
function breakPointsCount: integer;
|
||||||
function BreakPointLine(index: integer): integer;
|
function breakPointLine(index: integer): integer;
|
||||||
|
property onBreakpointModify: TBreakPointModifyEvent read fBreakpointEvent write fBreakpointEvent;
|
||||||
//
|
//
|
||||||
property Identifier: string read fIdentifier;
|
property Identifier: string read fIdentifier;
|
||||||
property fileName: string read fFilename;
|
property fileName: string read fFilename;
|
||||||
|
@ -1021,6 +1027,8 @@ begin
|
||||||
{$WARNINGS OFF}
|
{$WARNINGS OFF}
|
||||||
fBreakPoints.Add(pointer(line));
|
fBreakPoints.Add(pointer(line));
|
||||||
{$WARNINGS ON}
|
{$WARNINGS ON}
|
||||||
|
if assigned(fBreakpointEvent) then
|
||||||
|
fBreakpointEvent(self, line, false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCESynMemo.removeBreakPoint(line: integer);
|
procedure TCESynMemo.removeBreakPoint(line: integer);
|
||||||
|
@ -1032,6 +1040,8 @@ begin
|
||||||
{$WARNINGS OFF}
|
{$WARNINGS OFF}
|
||||||
fBreakPoints.Remove(pointer(line));
|
fBreakPoints.Remove(pointer(line));
|
||||||
{$WARNINGS ON}
|
{$WARNINGS ON}
|
||||||
|
if assigned(fBreakpointEvent) then
|
||||||
|
fBreakpointEvent(self, line, true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCESynMemo.findBreakPoint(line: integer): boolean;
|
function TCESynMemo.findBreakPoint(line: integer): boolean;
|
||||||
|
|
Loading…
Reference in New Issue