Home » Archimedes archive » Acorn User » AU 1998-09.adf » Features » DesktopPD/Director/!Director/Menus/System/FrontBack

DesktopPD/Director/!Director/Menus/System/FrontBack

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1998-09.adf » Features
Filename: DesktopPD/Director/!Director/Menus/System/FrontBack
Read OK:
File size: 04CE bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM >Director:Menus.System.FrontBack
   20REM This little program moves the window pointed to by
   30REM Director$Window to the top of the window stack, if its partly
   40REM covered by another window. If its uncovered, then its moved
   50REM to the back.
   70REM Its main use is meant for DirectorFilter:
   80REM DirectorFilter "Front Back" * "Dynamic:/Director:Menus.System.FrontBack" -select -alt
   90REM , which intercepts all alt+select clicks and calls FrontBack
  100REM
  110REM LEN Bernhard Ege
  120REM   bmeg93@kom.auc.dk
  130REM   http://www-i8.auc.dk/~bmeg93/
  140
  150buffer_size%=256
  160DIM buffer% buffer_size%
  170DIM buf% 36
  180
  190window%=EVAL(FNread("Director$Window"))
  200
  210SYS"Wimp_Initialise",200,&4b534154,"FrontBack" TO taskhandle%
  220buf%!0=window%
  230SYS"XWimp_GetWindowState",,buf% TO ;flags%
  240IF (flags% AND NOT 1) AND window%>=0 THEN
  250  IF (buf%!32 AND 2^17)=&20000 THEN
  260    REM at top, move to back
  270    !(buf%+28)=-2
  280    SYS"Wimp_SendMessage",2,buf%,window%
  290  ELSE
  300    REM covered, move to top
  310    !(buf%+28)=-1
  320    SYS"Wimp_SendMessage",2,buf%,window%
  330  ENDIF
  340ENDIF
  350SYS"Wimp_CloseDown",taskhandle%,&4b534154
  360END
  370
  380DEF FNread(a$)
  390  ?buffer%=13
  400  SYS "XOS_ReadVarVal",a$,buffer%,buffer_size%,0,3 TO ,,read%
  410  buffer%?read%=13
  420=$buffer%

&� >Director:Menus.System.FrontBack
8� This little program moves the window pointed to by
C� Director$Window to the top of the window stack, if its partly
(A� covered by another window. If its uncovered, then its moved
2� to the back.
F/� Its main use is meant for DirectorFilter:
P[� DirectorFilter "Front Back" * "Dynamic:/Director:Menus.System.FrontBack" -select -alt
ZB� , which intercepts all alt+select clicks and calls FrontBack
d�
n� � Bernhard Ege
x�   bmeg93@kom.auc.dk
�%�   http://www-i8.auc.dk/~bmeg93/
�
�buffer_size%=256
�� buffer% buffer_size%
�
� buf% 36
�
�'window%=�(�read("Director$Window"))
�
�?ș"Wimp_Initialise",200,&4b534154,"FrontBack" � taskhandle%
�buf%!0=window%
�,ș"XWimp_GetWindowState",,buf% � ;flags%
�#� (flags% � � 1) � window%>=0 �
�!  � (buf%!32 � 2^17)=&20000 �
    � at top, move to back
    !(buf%+28)=-2
+    ș"Wimp_SendMessage",2,buf%,window%
"  �
,    � covered, move to top
6    !(buf%+28)=-1
@+    ș"Wimp_SendMessage",2,buf%,window%
J  �
T�
^,ș"Wimp_CloseDown",taskhandle%,&4b534154
h�
r
|� �read(a$)
�  ?buffer%=13
�?  ș "XOS_ReadVarVal",a$,buffer%,buffer_size%,0,3 � ,,read%
�  buffer%?read%=13
�
=$buffer%
�
00000000  0d 00 0a 26 f4 20 3e 44  69 72 65 63 74 6f 72 3a  |...&. >Director:|
00000010  4d 65 6e 75 73 2e 53 79  73 74 65 6d 2e 46 72 6f  |Menus.System.Fro|
00000020  6e 74 42 61 63 6b 0d 00  14 38 f4 20 54 68 69 73  |ntBack...8. This|
00000030  20 6c 69 74 74 6c 65 20  70 72 6f 67 72 61 6d 20  | little program |
00000040  6d 6f 76 65 73 20 74 68  65 20 77 69 6e 64 6f 77  |moves the window|
00000050  20 70 6f 69 6e 74 65 64  20 74 6f 20 62 79 0d 00  | pointed to by..|
00000060  1e 43 f4 20 44 69 72 65  63 74 6f 72 24 57 69 6e  |.C. Director$Win|
00000070  64 6f 77 20 74 6f 20 74  68 65 20 74 6f 70 20 6f  |dow to the top o|
00000080  66 20 74 68 65 20 77 69  6e 64 6f 77 20 73 74 61  |f the window sta|
00000090  63 6b 2c 20 69 66 20 69  74 73 20 70 61 72 74 6c  |ck, if its partl|
000000a0  79 0d 00 28 41 f4 20 63  6f 76 65 72 65 64 20 62  |y..(A. covered b|
000000b0  79 20 61 6e 6f 74 68 65  72 20 77 69 6e 64 6f 77  |y another window|
000000c0  2e 20 49 66 20 69 74 73  20 75 6e 63 6f 76 65 72  |. If its uncover|
000000d0  65 64 2c 20 74 68 65 6e  20 69 74 73 20 6d 6f 76  |ed, then its mov|
000000e0  65 64 0d 00 32 12 f4 20  74 6f 20 74 68 65 20 62  |ed..2.. to the b|
000000f0  61 63 6b 2e 0d 00 46 2f  f4 20 49 74 73 20 6d 61  |ack...F/. Its ma|
00000100  69 6e 20 75 73 65 20 69  73 20 6d 65 61 6e 74 20  |in use is meant |
00000110  66 6f 72 20 44 69 72 65  63 74 6f 72 46 69 6c 74  |for DirectorFilt|
00000120  65 72 3a 0d 00 50 5b f4  20 44 69 72 65 63 74 6f  |er:..P[. Directo|
00000130  72 46 69 6c 74 65 72 20  22 46 72 6f 6e 74 20 42  |rFilter "Front B|
00000140  61 63 6b 22 20 2a 20 22  44 79 6e 61 6d 69 63 3a  |ack" * "Dynamic:|
00000150  2f 44 69 72 65 63 74 6f  72 3a 4d 65 6e 75 73 2e  |/Director:Menus.|
00000160  53 79 73 74 65 6d 2e 46  72 6f 6e 74 42 61 63 6b  |System.FrontBack|
00000170  22 20 2d 73 65 6c 65 63  74 20 2d 61 6c 74 0d 00  |" -select -alt..|
00000180  5a 42 f4 20 2c 20 77 68  69 63 68 20 69 6e 74 65  |ZB. , which inte|
00000190  72 63 65 70 74 73 20 61  6c 6c 20 61 6c 74 2b 73  |rcepts all alt+s|
000001a0  65 6c 65 63 74 20 63 6c  69 63 6b 73 20 61 6e 64  |elect clicks and|
000001b0  20 63 61 6c 6c 73 20 46  72 6f 6e 74 42 61 63 6b  | calls FrontBack|
000001c0  0d 00 64 05 f4 0d 00 6e  14 f4 20 a9 20 42 65 72  |..d....n.. . Ber|
000001d0  6e 68 61 72 64 20 45 67  65 0d 00 78 19 f4 20 20  |nhard Ege..x..  |
000001e0  20 62 6d 65 67 39 33 40  6b 6f 6d 2e 61 75 63 2e  | bmeg93@kom.auc.|
000001f0  64 6b 0d 00 82 25 f4 20  20 20 68 74 74 70 3a 2f  |dk...%.   http:/|
00000200  2f 77 77 77 2d 69 38 2e  61 75 63 2e 64 6b 2f 7e  |/www-i8.auc.dk/~|
00000210  62 6d 65 67 39 33 2f 0d  00 8c 04 0d 00 96 14 62  |bmeg93/........b|
00000220  75 66 66 65 72 5f 73 69  7a 65 25 3d 32 35 36 0d  |uffer_size%=256.|
00000230  00 a0 1a de 20 62 75 66  66 65 72 25 20 62 75 66  |.... buffer% buf|
00000240  66 65 72 5f 73 69 7a 65  25 0d 00 aa 0d de 20 62  |fer_size%..... b|
00000250  75 66 25 20 33 36 0d 00  b4 04 0d 00 be 27 77 69  |uf% 36.......'wi|
00000260  6e 64 6f 77 25 3d a0 28  a4 72 65 61 64 28 22 44  |ndow%=.(.read("D|
00000270  69 72 65 63 74 6f 72 24  57 69 6e 64 6f 77 22 29  |irector$Window")|
00000280  29 0d 00 c8 04 0d 00 d2  3f c8 99 22 57 69 6d 70  |).......?.."Wimp|
00000290  5f 49 6e 69 74 69 61 6c  69 73 65 22 2c 32 30 30  |_Initialise",200|
000002a0  2c 26 34 62 35 33 34 31  35 34 2c 22 46 72 6f 6e  |,&4b534154,"Fron|
000002b0  74 42 61 63 6b 22 20 b8  20 74 61 73 6b 68 61 6e  |tBack" . taskhan|
000002c0  64 6c 65 25 0d 00 dc 12  62 75 66 25 21 30 3d 77  |dle%....buf%!0=w|
000002d0  69 6e 64 6f 77 25 0d 00  e6 2c c8 99 22 58 57 69  |indow%...,.."XWi|
000002e0  6d 70 5f 47 65 74 57 69  6e 64 6f 77 53 74 61 74  |mp_GetWindowStat|
000002f0  65 22 2c 2c 62 75 66 25  20 b8 20 3b 66 6c 61 67  |e",,buf% . ;flag|
00000300  73 25 0d 00 f0 23 e7 20  28 66 6c 61 67 73 25 20  |s%...#. (flags% |
00000310  80 20 ac 20 31 29 20 80  20 77 69 6e 64 6f 77 25  |. . 1) . window%|
00000320  3e 3d 30 20 8c 0d 00 fa  21 20 20 e7 20 28 62 75  |>=0 ....!  . (bu|
00000330  66 25 21 33 32 20 80 20  32 5e 31 37 29 3d 26 32  |f%!32 . 2^17)=&2|
00000340  30 30 30 30 20 8c 0d 01  04 1e 20 20 20 20 f4 20  |0000 .....    . |
00000350  61 74 20 74 6f 70 2c 20  6d 6f 76 65 20 74 6f 20  |at top, move to |
00000360  62 61 63 6b 0d 01 0e 15  20 20 20 20 21 28 62 75  |back....    !(bu|
00000370  66 25 2b 32 38 29 3d 2d  32 0d 01 18 2b 20 20 20  |f%+28)=-2...+   |
00000380  20 c8 99 22 57 69 6d 70  5f 53 65 6e 64 4d 65 73  | .."Wimp_SendMes|
00000390  73 61 67 65 22 2c 32 2c  62 75 66 25 2c 77 69 6e  |sage",2,buf%,win|
000003a0  64 6f 77 25 0d 01 22 07  20 20 cc 0d 01 2c 1e 20  |dow%..".  ...,. |
000003b0  20 20 20 f4 20 63 6f 76  65 72 65 64 2c 20 6d 6f  |   . covered, mo|
000003c0  76 65 20 74 6f 20 74 6f  70 0d 01 36 15 20 20 20  |ve to top..6.   |
000003d0  20 21 28 62 75 66 25 2b  32 38 29 3d 2d 31 0d 01  | !(buf%+28)=-1..|
000003e0  40 2b 20 20 20 20 c8 99  22 57 69 6d 70 5f 53 65  |@+    .."Wimp_Se|
000003f0  6e 64 4d 65 73 73 61 67  65 22 2c 32 2c 62 75 66  |ndMessage",2,buf|
00000400  25 2c 77 69 6e 64 6f 77  25 0d 01 4a 07 20 20 cd  |%,window%..J.  .|
00000410  0d 01 54 05 cd 0d 01 5e  2c c8 99 22 57 69 6d 70  |..T....^,.."Wimp|
00000420  5f 43 6c 6f 73 65 44 6f  77 6e 22 2c 74 61 73 6b  |_CloseDown",task|
00000430  68 61 6e 64 6c 65 25 2c  26 34 62 35 33 34 31 35  |handle%,&4b53415|
00000440  34 0d 01 68 05 e0 0d 01  72 04 0d 01 7c 0f dd 20  |4..h....r...|.. |
00000450  a4 72 65 61 64 28 61 24  29 0d 01 86 11 20 20 3f  |.read(a$)....  ?|
00000460  62 75 66 66 65 72 25 3d  31 33 0d 01 90 3f 20 20  |buffer%=13...?  |
00000470  c8 99 20 22 58 4f 53 5f  52 65 61 64 56 61 72 56  |.. "XOS_ReadVarV|
00000480  61 6c 22 2c 61 24 2c 62  75 66 66 65 72 25 2c 62  |al",a$,buffer%,b|
00000490  75 66 66 65 72 5f 73 69  7a 65 25 2c 30 2c 33 20  |uffer_size%,0,3 |
000004a0  b8 20 2c 2c 72 65 61 64  25 0d 01 9a 16 20 20 62  |. ,,read%....  b|
000004b0  75 66 66 65 72 25 3f 72  65 61 64 25 3d 31 33 0d  |uffer%?read%=13.|
000004c0  01 a4 0d 3d 24 62 75 66  66 65 72 25 0d ff        |...=$buffer%..|
000004ce