mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 21:06:03 +02:00
git-svn-id: trunk@26288 -
This commit is contained in:
parent
62a5ba14a3
commit
b2a4b4cfda
@ -4346,6 +4346,7 @@ end;
|
|||||||
procedure TFPASCIIChart.HandleEvent(var Event: TEvent);
|
procedure TFPASCIIChart.HandleEvent(var Event: TEvent);
|
||||||
var W: PSourceWindow;
|
var W: PSourceWindow;
|
||||||
begin
|
begin
|
||||||
|
writeln(stderr,'all what=',event.what,' cmd=', event.command);
|
||||||
case Event.What of
|
case Event.What of
|
||||||
evKeyDown :
|
evKeyDown :
|
||||||
case Event.KeyCode of
|
case Event.KeyCode of
|
||||||
@ -4356,6 +4357,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
evCommand :
|
evCommand :
|
||||||
|
begin
|
||||||
|
writeln(stderr,'fpascii what=',event.what, ' cmd=', event.command, ' ',cmtransfer,' ',cmsearchwindow);
|
||||||
|
if Event.Command=(AsciiTableCommandBase+1) then // variable
|
||||||
|
begin
|
||||||
|
W:=FirstEditorWindow;
|
||||||
|
if Assigned(W) and Assigned(Report) then
|
||||||
|
Message(W,evCommand,cmAddChar,Event.InfoPtr);
|
||||||
|
ClearEvent(Event);
|
||||||
|
end
|
||||||
|
else
|
||||||
case Event.Command of
|
case Event.Command of
|
||||||
cmTransfer :
|
cmTransfer :
|
||||||
begin
|
begin
|
||||||
@ -4364,10 +4375,12 @@ begin
|
|||||||
Message(W,evCommand,cmAddChar,pointer(ptrint(ord(Report^.AsciiChar))));
|
Message(W,evCommand,cmAddChar,pointer(ptrint(ord(Report^.AsciiChar))));
|
||||||
ClearEvent(Event);
|
ClearEvent(Event);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
cmSearchWindow+1..cmSearchWindow+99 :
|
cmSearchWindow+1..cmSearchWindow+99 :
|
||||||
if (Event.Command-cmSearchWindow=Number) then
|
if (Event.Command-cmSearchWindow=Number) then
|
||||||
ClearEvent(Event);
|
ClearEvent(Event);
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
inherited HandleEvent(Event);
|
inherited HandleEvent(Event);
|
||||||
end;
|
end;
|
||||||
|
@ -171,7 +171,7 @@ var
|
|||||||
CurrentPos : TPoint;
|
CurrentPos : TPoint;
|
||||||
Handled : boolean;
|
Handled : boolean;
|
||||||
|
|
||||||
procedure SetTo(xpos, ypos : sw_integer);
|
procedure SetTo(xpos, ypos : sw_integer;press:integer);
|
||||||
var
|
var
|
||||||
newchar : ptrint;
|
newchar : ptrint;
|
||||||
begin
|
begin
|
||||||
@ -180,6 +180,10 @@ var
|
|||||||
SetCursor(xpos,ypos);
|
SetCursor(xpos,ypos);
|
||||||
Message(Owner,evCommand,AsciiTableCommandBase,
|
Message(Owner,evCommand,AsciiTableCommandBase,
|
||||||
pointer(newchar));
|
pointer(newchar));
|
||||||
|
if press>0 then
|
||||||
|
begin
|
||||||
|
Message(Owner,evCommand,AsciiTableCommandBase+press,pointer(newchar));
|
||||||
|
end;
|
||||||
DrawCurPos(true);
|
DrawCurPos(true);
|
||||||
ClearEvent(Event);
|
ClearEvent(Event);
|
||||||
end;
|
end;
|
||||||
@ -191,7 +195,7 @@ begin
|
|||||||
If MouseInView(Event.Where) then
|
If MouseInView(Event.Where) then
|
||||||
begin
|
begin
|
||||||
MakeLocal(Event.Where, CurrentPos);
|
MakeLocal(Event.Where, CurrentPos);
|
||||||
SetTo(CurrentPos.X, CurrentPos.Y);
|
SetTo(CurrentPos.X, CurrentPos.Y,1);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -200,15 +204,16 @@ begin
|
|||||||
Handled:=true;
|
Handled:=true;
|
||||||
case Event.Keycode of
|
case Event.Keycode of
|
||||||
kbUp : if Cursor.Y>0 then
|
kbUp : if Cursor.Y>0 then
|
||||||
SetTo(Cursor.X,Cursor.Y-1);
|
SetTo(Cursor.X,Cursor.Y-1,0);
|
||||||
kbDown : if Cursor.Y<Size.Y-1 then
|
kbDown : if Cursor.Y<Size.Y-1 then
|
||||||
SetTo(Cursor.X,Cursor.Y+1);
|
SetTo(Cursor.X,Cursor.Y+1,0);
|
||||||
kbLeft : if Cursor.X>0 then
|
kbLeft : if Cursor.X>0 then
|
||||||
SetTo(Cursor.X-1,Cursor.Y);
|
SetTo(Cursor.X-1,Cursor.Y,0);
|
||||||
kbRight: if Cursor.X<Size.X-1 then
|
kbRight: if Cursor.X<Size.X-1 then
|
||||||
SetTo(Cursor.X+1,Cursor.Y);
|
SetTo(Cursor.X+1,Cursor.Y,0);
|
||||||
kbHome : SetTo(0,0);
|
kbHome : SetTo(0,0,0);
|
||||||
kbEnd : SetTo(Size.X-1,Size.Y-1);
|
kbEnd : SetTo(Size.X-1,Size.Y-1,0);
|
||||||
|
kbEnter: SetTo(Cursor.X,Cursor.Y,1);
|
||||||
else
|
else
|
||||||
Handled:=false;
|
Handled:=false;
|
||||||
end;
|
end;
|
||||||
@ -301,6 +306,7 @@ end;
|
|||||||
|
|
||||||
procedure TASCIIChart.HandleEvent(var Event:TEvent);
|
procedure TASCIIChart.HandleEvent(var Event:TEvent);
|
||||||
begin
|
begin
|
||||||
|
writeln(stderr,'ascii cmd',event.what, ' ', event.command);
|
||||||
if (Event.what=evCommand) and
|
if (Event.what=evCommand) and
|
||||||
(Event.Command = AsciiTableCommandBase) then
|
(Event.Command = AsciiTableCommandBase) then
|
||||||
begin
|
begin
|
||||||
|
@ -1491,8 +1491,8 @@ begin
|
|||||||
Inc(R.A.Y,3); Inc(R.B.Y,3);
|
Inc(R.A.Y,3); Inc(R.B.Y,3);
|
||||||
if AOptions and fdHelpButton <> 0 then
|
if AOptions and fdHelpButton <> 0 then
|
||||||
begin
|
begin
|
||||||
Insert(New(PButton, Init(R,slHelp,cmHelp, bfNormal)));
|
//Insert(New(PButton, Init(R,slHelp,cmHelp, bfNormal)));
|
||||||
Inc(R.A.Y,3); Inc(R.B.Y,3);
|
//Inc(R.A.Y,3); Inc(R.B.Y,3);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
R.Assign(1,16,48,18);
|
R.Assign(1,16,48,18);
|
||||||
@ -2005,8 +2005,8 @@ begin
|
|||||||
Insert(New(PButton, Init(R,slRevert, cmRevert, bfNormal)));
|
Insert(New(PButton, Init(R,slRevert, cmRevert, bfNormal)));
|
||||||
if AOptions and cdHelpButton <> 0 then
|
if AOptions and cdHelpButton <> 0 then
|
||||||
begin
|
begin
|
||||||
Inc(R.A.Y,3); Inc(R.B.Y,3);
|
//Inc(R.A.Y,3); Inc(R.B.Y,3);
|
||||||
Insert(New(PButton, Init(R,slHelp, cmHelp, bfNormal)));
|
//Insert(New(PButton, Init(R,slHelp, cmHelp, bfNormal)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if AOptions and cdNoLoadDir = 0 then SetUpDialog;
|
if AOptions and cdNoLoadDir = 0 then SetUpDialog;
|
||||||
|
Loading…
Reference in New Issue
Block a user