Category : Pascal Source Code
Archive   : BROWSE.ZIP
Filename : BROWSERM.INC

 
Output of file : BROWSERM.INC contained in archive : BROWSE.ZIP


procedure debug(S : string);
{-Testing procedure for debugging code}
var
W : WindowPtr;
Ch : char;
begin { debug }
if MakeWindow(W, 1, 20, 80, 25, true, true, true,
White + _Black, Red + _Black, LtRed + _Black,
'Debugging window') then
if DisplayWindow(W) then
begin
FastCenter(S, 2, White + Blink + _Black);
FastCenter('Press any key to continue', 3, LtGray + _Black);
Ch := ReadKey;
DisposeWindow(EraseTopWIndow);
if Ch = ^C then Halt(1);
end;
end; { debug }





procedure EnableBrowseMouse;
{-Enable mouse control of Browse lists}
begin
if MouseInstalled then
begin
BrowseKeyPtr := @TpMouse.ReadKeyOrButton;
EnableEventHandling;
BrowseMouseEnabled := true;
end;
end;

procedure DisableBrowseMouse;
{-Disable mouse control of Browse lists}
begin
if BrowseMouseEnabled then
begin
BrowseKeyPtr := @BrowseReadKey;
DisableEventHandling;
BrowseMouseEnabled := false;
end;
end;



{$IFDEF UseTpMouse}
procedure DrawMouseMarks(W : WindowPtr);
{-Draw the mouse scroll marks in the frame}
begin
with WindowP(W)^, Draw do begin
FastWrite(MouseUpMark, YL1, XH1, Fattr);
FastWrite(MouseDnMark, YH1, XH1, Fattr);
end;
end;

procedure MouseDefaultXY(X, Y, CurX, CurY : Byte);
{-Move mouse to absolute X,Y if it is outside of mouse window,
else assure mouse remains unmoved}
begin
{Move mouse cursor only if mouse is outside window}
if ((CurX <= MouseXLo) or (CurX > MouseXHi) or
(CurY <= MouseYLo) or (CurY > MouseYHi)) then
MouseGoToXY(X-MouseXLo, Y-MouseYLo)
else
MouseGoToXY(CurX-MouseXLo, CurY-MouseYLo);
end;




{$ENDIF}



  3 Responses to “Category : Pascal Source Code
Archive   : BROWSE.ZIP
Filename : BROWSERM.INC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/