mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-21 07:19:40 +01:00
+ With DebugUndo added 3 menu items
"Dump Undo" "Undo All" and "Redo All"
for Undo checks
This commit is contained in:
parent
3d6cb6a789
commit
ca57b504b0
@ -192,6 +192,10 @@ const
|
|||||||
cmDeleteBreakpoint = 2402;
|
cmDeleteBreakpoint = 2402;
|
||||||
cmToggleBreakpoint = 2403;
|
cmToggleBreakpoint = 2403;
|
||||||
|
|
||||||
|
cmDumpUndo = 2500;
|
||||||
|
cmUndoAll = 2501;
|
||||||
|
cmRedoAll = 2502;
|
||||||
|
|
||||||
{ Help constants }
|
{ Help constants }
|
||||||
hcSourceWindow = 8000;
|
hcSourceWindow = 8000;
|
||||||
hcHelpWindow = 8001;
|
hcHelpWindow = 8001;
|
||||||
@ -361,7 +365,12 @@ implementation
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.28 1999-10-14 10:23:44 pierre
|
Revision 1.29 1999-10-27 12:10:42 pierre
|
||||||
|
+ With DebugUndo added 3 menu items
|
||||||
|
"Dump Undo" "Undo All" and "Redo All"
|
||||||
|
for Undo checks
|
||||||
|
|
||||||
|
Revision 1.28 1999/10/14 10:23:44 pierre
|
||||||
ClockView Black on Gray by default
|
ClockView Black on Gray by default
|
||||||
|
|
||||||
Revision 1.27 1999/09/13 16:24:43 peter
|
Revision 1.27 1999/09/13 16:24:43 peter
|
||||||
|
|||||||
@ -237,6 +237,11 @@ begin
|
|||||||
NewSubMenu('~E~dit',hcEditMenu, NewMenu(
|
NewSubMenu('~E~dit',hcEditMenu, NewMenu(
|
||||||
NewItem('~U~ndo','Alt+BkSp', kbAltBack, cmUndo, hcUndo,
|
NewItem('~U~ndo','Alt+BkSp', kbAltBack, cmUndo, hcUndo,
|
||||||
NewItem('~R~edo','', kbNoKey, cmRedo, hcRedo,
|
NewItem('~R~edo','', kbNoKey, cmRedo, hcRedo,
|
||||||
|
{$ifdef DebugUndo}
|
||||||
|
NewItem('~D~ump Undo','', kbNoKey, cmDumpUndo, hcUndo,
|
||||||
|
NewItem('U~n~do All','', kbNoKey, cmUndoAll, hcUndo,
|
||||||
|
NewItem('R~e~do All','', kbNoKey, cmRedoAll, hcRedo,
|
||||||
|
{$endif DebugUndo}
|
||||||
NewLine(
|
NewLine(
|
||||||
NewItem('Cu~t~','Shift+Del', kbShiftDel, cmCut, hcCut,
|
NewItem('Cu~t~','Shift+Del', kbShiftDel, cmCut, hcCut,
|
||||||
NewItem('~C~opy','Ctrl+Ins', kbCtrlIns, cmCopy, hcCut,
|
NewItem('~C~opy','Ctrl+Ins', kbCtrlIns, cmCopy, hcCut,
|
||||||
@ -244,7 +249,9 @@ begin
|
|||||||
NewItem('C~l~ear','Ctrl+Del', kbCtrlDel, cmClear, hcClear,
|
NewItem('C~l~ear','Ctrl+Del', kbCtrlDel, cmClear, hcClear,
|
||||||
NewLine(
|
NewLine(
|
||||||
NewItem('~S~how clipboard','', kbNoKey, cmShowClipboard, hcShowClipboard,
|
NewItem('~S~how clipboard','', kbNoKey, cmShowClipboard, hcShowClipboard,
|
||||||
WinPMI)))))))))),
|
WinPMI))))))
|
||||||
|
{$ifdef DebugUndo}))){$endif DebugUndo}
|
||||||
|
)))),
|
||||||
NewSubMenu('~S~earch',hcSearchMenu, NewMenu(
|
NewSubMenu('~S~earch',hcSearchMenu, NewMenu(
|
||||||
NewItem('~F~ind...','', kbNoKey, cmFind, hcFind,
|
NewItem('~F~ind...','', kbNoKey, cmFind, hcFind,
|
||||||
NewItem('~R~eplace...','', kbNoKey, cmReplace, hcReplace,
|
NewItem('~R~eplace...','', kbNoKey, cmReplace, hcReplace,
|
||||||
@ -847,7 +854,12 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.41 1999-09-22 16:21:41 pierre
|
Revision 1.42 1999-10-27 12:10:42 pierre
|
||||||
|
+ With DebugUndo added 3 menu items
|
||||||
|
"Dump Undo" "Undo All" and "Redo All"
|
||||||
|
for Undo checks
|
||||||
|
|
||||||
|
Revision 1.41 1999/09/22 16:21:41 pierre
|
||||||
* Use ShrinkPas for RecentFiles
|
* Use ShrinkPas for RecentFiles
|
||||||
|
|
||||||
Revision 1.40 1999/09/22 13:04:31 pierre
|
Revision 1.40 1999/09/22 13:04:31 pierre
|
||||||
|
|||||||
@ -115,6 +115,11 @@ type
|
|||||||
function GetSpecSymbol(SpecClass: TSpecSymbolClass; Index: integer): string; virtual;
|
function GetSpecSymbol(SpecClass: TSpecSymbolClass; Index: integer): string; virtual;
|
||||||
{$endif}
|
{$endif}
|
||||||
procedure HandleEvent(var Event: TEvent); virtual;
|
procedure HandleEvent(var Event: TEvent); virtual;
|
||||||
|
{$ifdef DebugUndo}
|
||||||
|
procedure DumpUndo;
|
||||||
|
procedure UndoAll;
|
||||||
|
procedure RedoAll;
|
||||||
|
{$endif DebugUndo}
|
||||||
function GetLocalMenu: PMenu; virtual;
|
function GetLocalMenu: PMenu; virtual;
|
||||||
function GetCommandTarget: PView; virtual;
|
function GetCommandTarget: PView; virtual;
|
||||||
function CreateLocalMenuView(var Bounds: TRect; M: PMenu): PMenuPopup; virtual;
|
function CreateLocalMenuView(var Bounds: TRect; M: PMenu): PMenuPopup; virtual;
|
||||||
@ -807,6 +812,46 @@ begin
|
|||||||
CreateLocalMenuView:=MV;
|
CreateLocalMenuView:=MV;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifdef DebugUndo}
|
||||||
|
procedure TSourceEditor.DumpUndo;
|
||||||
|
var
|
||||||
|
i : sw_integer;
|
||||||
|
begin
|
||||||
|
ClearToolMessages;
|
||||||
|
AddToolCommand('UndoList Dump');
|
||||||
|
for i:=0 to UndoList^.count-1 do
|
||||||
|
with UndoList^.At(i)^ do
|
||||||
|
begin
|
||||||
|
AddToolMessage('',ActionString[action]+' '+IntToStr(StartPos.X)+':'+IntToStr(StartPos.Y)+
|
||||||
|
' '+IntToStr(EndPos.X)+':'+IntToStr(EndPos.Y)+' "'+GetStr(Text)+'"',0,0);
|
||||||
|
end;
|
||||||
|
if RedoList^.count>0 then
|
||||||
|
AddToolCommand('RedoList Dump');
|
||||||
|
for i:=0 to RedoList^.count-1 do
|
||||||
|
with RedoList^.At(i)^ do
|
||||||
|
begin
|
||||||
|
AddToolMessage('',ActionString[action]+' '+IntToStr(StartPos.X)+':'+IntToStr(StartPos.Y)+
|
||||||
|
' '+IntToStr(EndPos.X)+':'+IntToStr(EndPos.Y)+' "'+GetStr(Text)+'"',0,0);
|
||||||
|
end;
|
||||||
|
UpdateToolMessages;
|
||||||
|
if Assigned(MessagesWindow) then
|
||||||
|
MessagesWindow^.Focus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSourceEditor.UndoAll;
|
||||||
|
begin
|
||||||
|
While UndoList^.count>0 do
|
||||||
|
Undo;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSourceEditor.RedoAll;
|
||||||
|
begin
|
||||||
|
While RedoList^.count>0 do
|
||||||
|
Redo;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{$endif DebugUndo}
|
||||||
|
|
||||||
procedure TSourceEditor.HandleEvent(var Event: TEvent);
|
procedure TSourceEditor.HandleEvent(var Event: TEvent);
|
||||||
var DontClear: boolean;
|
var DontClear: boolean;
|
||||||
S: string;
|
S: string;
|
||||||
@ -817,6 +862,11 @@ begin
|
|||||||
begin
|
begin
|
||||||
DontClear:=false;
|
DontClear:=false;
|
||||||
case Event.Command of
|
case Event.Command of
|
||||||
|
{$ifdef DebugUndo}
|
||||||
|
cmDumpUndo : DumpUndo;
|
||||||
|
cmUndoAll : UndoAll;
|
||||||
|
cmRedoAll : RedoAll;
|
||||||
|
{$endif DebugUndo}
|
||||||
cmBrowseAtCursor:
|
cmBrowseAtCursor:
|
||||||
begin
|
begin
|
||||||
S:=LowerCaseStr(GetEditorCurWord(@Self));
|
S:=LowerCaseStr(GetEditorCurWord(@Self));
|
||||||
@ -2779,7 +2829,12 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.43 1999-10-25 16:55:13 pierre
|
Revision 1.44 1999-10-27 12:10:42 pierre
|
||||||
|
+ With DebugUndo added 3 menu items
|
||||||
|
"Dump Undo" "Undo All" and "Redo All"
|
||||||
|
for Undo checks
|
||||||
|
|
||||||
|
Revision 1.43 1999/10/25 16:55:13 pierre
|
||||||
* adapted to a small weditor change
|
* adapted to a small weditor change
|
||||||
|
|
||||||
Revision 1.42 1999/09/16 14:34:59 pierre
|
Revision 1.42 1999/09/16 14:34:59 pierre
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user