Browse Source

+ Initial import

michael 25 years ago
parent
commit
600e77d024

+ 4 - 1
docs/Makefile

@@ -460,7 +460,10 @@ linuxexamples: examples
 
 #
 # $Log$
-# Revision 1.40  2000-07-11 18:07:26  peter
+# Revision 1.1  2000-07-13 09:10:03  michael
+# + Initial import
+#
+# Revision 1.40  2000/07/11 18:07:26  peter
 #   * fixes for latex2html 0.99b2
 #
 # Revision 1.39  2000/07/09 15:44:15  peter

+ 4 - 1
docs/classchart.ps

@@ -676,7 +676,10 @@ showpage
 
 %
 %   $Log$
-%   Revision 1.16  1999-11-18 21:16:42  michael
+%   Revision 1.1  2000-07-13 09:10:03  michael
+%   + Initial import
+%
+%   Revision 1.16  1999/11/18 21:16:42  michael
 %   + Added /lclonly command and iostreams
 %
 %   Revision 1.15  1999/10/28 20:22:03  michael

+ 4 - 1
docs/heaptrc.tex

@@ -206,7 +206,10 @@ trace.
 
 %
 % $Log$
-% Revision 1.6  2000-07-11 18:07:26  peter
+% Revision 1.1  2000-07-13 09:10:04  michael
+% + Initial import
+%
+% Revision 1.6  2000/07/11 18:07:26  peter
 %   * fixes for latex2html 0.99b2
 %
 % Revision 1.5  2000/05/16 21:07:55  michael

+ 4 - 1
docs/ide.tex

@@ -761,7 +761,10 @@ Undo & \textsc{Alt-Backspace} & \\
 \end{FPCltable}
 %
 %  $Log$
-%  Revision 1.5  2000-03-04 07:47:28  florian
+%  Revision 1.1  2000-07-13 09:10:04  michael
+%  + Initial import
+%
+%  Revision 1.5  2000/03/04 07:47:28  florian
 %    * some corrections and some new stuff
 %
 %  Revision 1.4  2000/03/01 15:39:40  florian

+ 54 - 0
docs/mmouseex/Makefile

@@ -0,0 +1,54 @@
+#######################################################################
+#
+# Makefile to compile all examples and convert them to LaTeX
+# 
+#######################################################################
+
+# Compiler
+PP=ppc386
+
+# Unit directory
+# UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
+
+
+# Any options you wish to pass.
+PPOPTS=
+
+# Script to convert the programs to LaTeX examples which can be included.
+PP2TEX=../pp2tex
+
+# Script to collect all examples in 1 file.
+MAKETEX=make1tex
+
+#######################################################################
+# No need to edit after this line.
+#######################################################################
+
+ifdef UNITDIR
+PPOPTS:=$(PPOPTS) -Up$(UNITDIR);
+endif
+
+.SUFFIXES: .pp .tex
+
+.PHONY: all tex clean
+
+OBJECTS=mouse1 mouse2 mouse3 mouse4 mouse5 mouse6 mouse7 mouse8 mouse9 \
+        mouse10
+
+TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
+
+all : $(OBJECTS)
+
+tex : $(TEXOBJECTS)
+
+onetex : tex
+	$(MAKETEX) $(TEXOBJECTS)
+
+clean : 
+	rm -f *.o *.s $(OBJECTS) $(TEXOBJECTS)
+ 
+$(OBJECTS): %: %.pp
+	$(PP) $(PPOPTS) $*
+
+$(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
+	$(PP2TEX) $*

+ 2 - 0
docs/mmouseex/foot.tex

@@ -0,0 +1,2 @@
+\end{verbatim}
+\end{FPCList}

+ 3 - 0
docs/mmouseex/head.tex

@@ -0,0 +1,3 @@
+\begin{FPCList}
+\item[Example]
+\begin{verbatim}

+ 30 - 0
docs/mmouseex/mouse1.pp

@@ -0,0 +1,30 @@
+Program Mouse1;
+
+{example for InitMouse and MouseFound}
+
+Uses MsMouse;
+
+Begin
+  If MouseFound Then
+    Begin
+     {go into graphics mode 13h}
+      Asm
+        movl $0x013, %eax
+        pushl %ebp
+        int $0x010
+        popl %ebp
+      End;
+      InitMouse;
+      ShowMouse; {otherwise it stays invisible}
+      Writeln('Mouse Found! (press enter to quit)');
+      Readln;
+     {back to text mode}
+      Asm
+        movl $3, %eax
+        pushl %ebp
+        int $0x010
+        popl %ebp
+      End
+    End
+End.
+

+ 28 - 0
docs/mmouseex/mouse10.pp

@@ -0,0 +1,28 @@
+Uses MsMouse, Crt;
+
+Var hor, vert: Longint;
+    x, y: Longint;
+
+Begin
+  If MouseFound Then
+    Begin
+      ClrScr;
+      Writeln('Click any button to quit after you''ve entered a sequence of numbers.');
+      Writeln;
+      Writeln('Horizontal mickey''s per pixel:');
+      Writeln('Vertical mickey''s per pixel:');
+      ShowMouse;
+      Repeat
+        GotoXY(32,3);
+        ClrEol;
+        Readln(hor);
+        GotoXY(30,4);
+        ClrEol;
+        Readln(vert);
+        SetMouseSpeed(hor, vert);
+      Until (GetLastButtonPress(LButton,x,y) <> 0) Or
+            (GetLastButtonPress(RButton,x,y) <> 0) Or
+            (GetLastButtonPress(MButton,x,y) <> 0);
+    End
+End.
+

+ 17 - 0
docs/mmouseex/mouse2.pp

@@ -0,0 +1,17 @@
+{example for ShowMouse and HideMouse}
+
+Uses MsMouse;
+
+Begin
+  ClrScr;
+  If MouseFound Then
+    Begin
+      Writeln('Now you can see the mouse... (press enter to continue)');
+      ShowMouse;
+      Readln;
+      HideMouse;
+      Writeln('And now you can''t... (press enter to quit)');
+      Readln
+    End
+End.
+

+ 47 - 0
docs/mmouseex/mouse3.pp

@@ -0,0 +1,47 @@
+{example for GetMouseState, IsLPressed, IsRPressed and IsMPressed}
+
+Uses MsMouse, Crt;
+
+Var X, Y, State: Longint;
+
+Begin
+  If MouseFound Then
+    Begin
+      ClrScr;
+      ShowMouse;
+      GotoXY(5,24);
+      Write('Left button:');
+      GotoXY(30,24);
+      Write('Right button:');
+      GotoXY(55,24);
+      Write('Middle button:');
+      While KeyPressed do Readkey; {clear keyboard buffer}
+      Repeat
+         GetMouseState(x, y, State);
+         GotoXY(20, 22);
+         Write('X: ',x:5,' (column: ',(x div 8):2,')  Y: ',y:5, ' (row: ',(y div 8):2,')');
+         GotoXY(18, 24); {left button}
+         If (State and LButton) = LButton Then
+{or: "If LPressed Then". If you use this function, no call to GetMouseState
+ is necessary}
+           Write('Down')
+         Else
+           Write('Up  ');
+         GotoXY(44, 24); {right button}
+         If (State and RButton) = RButton Then
+{or: "If RPressed Then"}
+           Write('Down')
+         Else
+           Write('Up  ');
+         GotoXY(70, 24); {middle button}
+         If (State and MButton) = MButton Then
+{or: "If MPressed Then"}
+           Write('Down')
+         Else
+           Write('Up  ')
+      Until KeyPressed;
+      HideMouse;
+      While KeyPressed Do Readkey
+    End
+End.
+

+ 18 - 0
docs/mmouseex/mouse4.pp

@@ -0,0 +1,18 @@
+{example for SetMousePos}
+
+Uses MsMouse, Crt;
+
+Begin
+  If MouseFound Then
+    Begin
+      ShowMouse;
+      While KeyPressed do ReadKey;
+      Repeat
+        SetMousePos(Random(80*8), Random(25*8));
+        delay(100);
+      Until Keypressed;
+      HideMouse;
+      While KeyPressed do ReadKey;
+    End;
+End.
+

+ 73 - 0
docs/mmouseex/mouse5.pp

@@ -0,0 +1,73 @@
+{example for GetLastButtonPress and GetLastButtonRelease}
+
+Uses MsMouse, Crt;
+
+Var x, y, times: Longint;
+    c: Char;
+
+Begin
+  If MouseFound Then
+    Begin
+      ClrScr;
+      ShowMouse;
+      Writeln('Move the mouse and click the buttons (press escape to quit).');
+      Writeln('Press the L-key to see the stats for the left button.');
+      Writeln('Press the R-key to see the stats for the right button.');
+      Writeln('Press the M-key to see the stats for the middle button.');
+      GotoXY(1,19);
+      Write('Since the last call to GetLastButtonPress with this button as parameter, the');
+      GotoXY(1,22);
+      Write('Since the last call to GetLastButtonRelease with this button as parameter, the');
+      Repeat
+        If Keypressed Then
+          Begin
+            c := UpCase(Readkey);
+            Case c Of
+              'L':
+                Begin
+                  GotoXY(1, 20);
+                  ClrEol;
+                  times := GetLastButtonPress(LButton, x, y);
+                  Write('left button has been pressed ',times,
+                          ' times, the last time at (',x,',',y,')');
+                  times := GetLastButtonRelease(LButton, x, y);
+                  GotoXY(1,23);
+                  ClrEol;
+                  Write('left button has been released ',times,
+                          ' times, the last time at (',x,',',y,')')
+                End;
+              'R':
+                Begin
+                  GotoXY(1, 20);
+                  ClrEol;
+                  times := GetLastButtonPress(RButton, x, y);
+                  Writeln('right button has been pressed ',times,
+                          ' times, the last time at (',x,',',y,')');
+                  times := GetLastButtonRelease(RButton, x, y);
+                  GotoXY(1,23);
+                  ClrEol;
+                  Write('right button has been released ',times,
+                          ' times, the last time at (',x,',',y,')')
+                End;
+              'M':
+                Begin
+                  GotoXY(1, 20);
+                  ClrEol;
+                  times := GetLastButtonPress(MButton, x, y);
+                  Writeln('middle button has been pressed ',times,
+                          ' times, the last time at (',x,',',y,')');
+                  times := GetLastButtonRelease(MButton, x, y);
+                  GotoXY(1,23);
+                  ClrEol;
+                  Write('middle button has been released ',times,
+                          ' times, the last time at (',x,',',y,')')
+                End
+            End
+          End;
+      Until (c = #27); {escape}
+      While KeyPressed do ReadKey;
+      GotoXY(1,24);
+      HideMouse
+    End
+End.
+

+ 22 - 0
docs/mmouseex/mouse6.pp

@@ -0,0 +1,22 @@
+{example for SetMouseXRange, SetMouseYRange and SetMouseWindow}
+
+Uses MsMouse, Crt;
+
+Begin
+  If MouseFound Then
+    Begin
+      SetMouseXRange(20*8,50*8);  {charracter width and height = 8 pixels}
+      SetMouseYRange(10*8,15*8);
+
+{the two lines of code have exactly the same effect as
+ SetMouseWindow(20*8,10*8,50*8,15*8)}
+
+      Writeln('Press any key to quit.');
+      ShowMouse;
+      While KeyPressed Do ReadKey;
+      Readkey;
+      While KeyPressed Do ReadKey;
+      HideMouse
+    End
+End.
+

+ 41 - 0
docs/mmouseex/mouse7.pp

@@ -0,0 +1,41 @@
+{example for SetMouseShape}
+
+{warning: no error checking is performed on the input}
+
+{the Ascii value you enter is XOR'ed with the Ascii value of the character
+ on the screen over which you move the cursor. To get a "transparent" cursor,
+ use the Ascii value 0}
+
+Uses MsMouse, Crt;
+
+Var ascii, fc, bc: Byte;
+    x,y: Longint;
+
+Begin
+  If MouseFound Then
+    Begin
+      ClrScr;
+      Writeln('Press any mouse button to quit after you''ve entered a sequence of numbers.');
+      Writeln;
+      Writeln('ASCII value of mouse cursor:');
+      Writeln('Forground color:');
+      Writeln('Background color:');
+      ShowMouse;
+      Repeat
+        GotoXY(30,3);
+        ClrEol;
+        Readln(ascii);
+        GotoXY(18,4);
+        ClrEol;
+        Readln(fc);
+        GotoXY(19,5);
+        ClrEol;
+        Readln(bc);
+        SetMouseShape(fc, bc, ascii)
+      Until (GetLastButtonPress(LButton,x,y) <> 0) Or
+            (GetLastButtonPress(RButton,x,y) <> 0) Or
+            (GetLastButtonPress(MButton,x,y) <> 0);
+      HideMouse
+    End;
+End.
+

+ 29 - 0
docs/mmouseex/mouse8.pp

@@ -0,0 +1,29 @@
+{example for SetMouseAscii}
+
+{warning: no error checking is performed on the input}
+
+Uses MsMouse, Crt;
+
+Var ascii: Byte;
+    x,y: Longint;
+
+Begin
+  If MouseFound Then
+    Begin
+      ClrScr;
+      Writeln('Press any mouse button to quit after you''ve entered an Ascii value.');
+      Writeln;
+      Writeln('ASCII value of mouse cursor:');
+      ShowMouse;
+      Repeat
+        GotoXY(30,3);
+        ClrEol;
+        Readln(ascii);
+        SetMouseAscii(ascii)
+      Until (GetLastButtonPress(LButton,x,y) <> 0) Or
+            (GetLastButtonPress(RButton,x,y) <> 0) Or
+            (GetLastButtonPress(MButton,x,y) <> 0);
+      HideMouse
+    End;
+End.
+

+ 54 - 0
docs/mmouseex/mouse9.pp

@@ -0,0 +1,54 @@
+{example for SetMouseHideWindow}
+
+{warning: when the mouse is moved into the specified region, it is turned off
+ until you call ShowMouse again. However, when you've called ShowMouse,
+ you'll have to call SetMouseHideWindow again to redefine the hide window...
+ It's not our fault, that's the way it's implemented in the mouse driver.
+
+ Below you can find an example of how to define a "permanent" hide region
+ with the cursor showing up again when you move it out of the region
+
+ Note: the mouse functions are zero-based, GotoXY is 1-based}
+
+Uses MsMouse, Crt;
+
+Var x, y, buttons: Longint;
+    MouseOn: Boolean;
+
+Begin
+  If MouseFound Then
+    Begin
+      ClrScr;
+      For y := 1 to 25 Do
+        Begin
+          GotoXY(20,y);
+          Write('|');
+          GotoXY(60,y);
+          Write('|');
+        End;
+      MouseOn := true;
+      GotoXY(30, 24);
+      Writeln('Press any key to quit');
+      ShowMouse;
+      SetMousePos(1,1);
+      While KeyPressed Do Readkey;
+      Repeat
+        GetMouseState(x,y,buttons);
+        If Not(MouseOn) And
+          ((x <= 19*8) or (x >= 59*8)) Then
+          Begin
+            ShowMouse;
+            MouseOn := true
+          End;
+        If MouseOn And (x > 19*8) And (x<59*8) Then
+          Begin
+            SetMouseHideWindow(20*8,0,60*8,25*8);
+            MouseOn := false
+          End;
+      Until KeyPressed;
+      While KeyPressed Do Readkey;
+      HideMouse
+    End
+End.
+
+

+ 4 - 1
docs/packages/html/html.sty

@@ -969,7 +969,10 @@
 % (The listing of Initiales see Changes)
 
 % $Log$
-% Revision 1.2  2000-07-12 07:56:57  michael
+% Revision 1.1  2000-07-13 09:10:19  michael
+% + Initial import
+%
+% Revision 1.2  2000/07/12 07:56:57  michael
 % + Update to work with new latex2html versions
 %
 % Revision 1.38  1999/07/19 13:23:20  RRM

+ 4 - 1
docs/packages/mdwtools/at.dtx

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:18:06  michael
+% Revision 1.1  2000-07-13 09:10:20  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:18:06  michael
 % Initial implementation
 %
 % Revision 1.3  1996/11/19 20:46:55  mdw

+ 4 - 1
docs/packages/mdwtools/cmtt.dtx

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:20  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.1  1996/11/19 20:47:55  mdw

+ 4 - 1
docs/packages/mdwtools/doafter.dtx

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:20  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.2  1996/11/19 20:49:08  mdw

+ 4 - 1
docs/packages/mdwtools/footnote.dtx

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:20  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.13  1997/01/28 19:45:16  mdw

+ 4 - 1
docs/packages/mdwtools/gpl.tex

@@ -11,7 +11,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:20  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.1  1996/11/19 20:51:14  mdw

+ 4 - 1
docs/packages/mdwtools/mdwlist.dtx

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:21  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.1  1996/11/19 20:52:26  mdw

+ 4 - 1
docs/packages/mdwtools/mdwmath.dtx

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:21  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.1  1996/11/19 20:53:21  mdw

+ 4 - 1
docs/packages/mdwtools/mdwtab.dtx

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:21  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.8  1996/12/09 23:20:42  mdw

+ 4 - 1
docs/packages/mdwtools/mdwtools.ins

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:21  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.3  1996/11/19 20:57:26  mdw

+ 4 - 1
docs/packages/mdwtools/mdwtools.tex

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:21  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.4  1996/11/19 20:55:55  mdw

+ 4 - 1
docs/packages/mdwtools/sverb.dtx

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:21  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.3  1996/11/19 21:01:18  mdw

+ 4 - 1
docs/packages/mdwtools/syntax.dtx

@@ -9,7 +9,10 @@
 %----- Revision history -----------------------------------------------------
 %
 % $Log$
-% Revision 1.1  1998-09-21 10:19:01  michael
+% Revision 1.1  2000-07-13 09:10:21  michael
+% + Initial import
+%
+% Revision 1.1  1998/09/21 10:19:01  michael
 % Initial implementation
 %
 % Revision 1.9  1996/11/28 00:19:10  mdw