/[james]/archive/bootedit/BootEdit/Basic/DragEnd
ViewVC logotype

Contents of /archive/bootedit/BootEdit/Basic/DragEnd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25 - (show annotations) (download)
Thu Mar 13 12:54:50 2003 UTC (21 years, 8 months ago) by james
File size: 2067 byte(s)
Initial import.

1 REM > BootEditCode:DragEnd
2
3 DEF FNDragEnd
4 LOCAL List%, YPos%, Item%, File$, In%, Out%, Line$, Move%, Pos%, Done%
5
6 List% = FNHeap_Find(0, "BootList")
7 IF !List% = 0 THEN =0
8
9 SYS"Wimp_GetPointerInfo",, B%
10
11 IF B%!12 = FNObject_Hand(0, "BootPane", 0) THEN
12
13 IF (Boot_Editing% = 2) OR (Boot_Editing% = 4) THEN VDU7: =0
14 IF Boot_Editing% = 1 THEN File$ = "PreDesktop" ELSE File$ = "Desktop"
15
16 SYS"Wimp_GetWindowState",, B% + 12
17 YPos% = (-(B%!04 + (B%!36 - B%!28)) / List_High%) + 0.5
18
19 In% = OPENIN(Boot_Path$ + ".Choices.Boot." + File$)
20 Out% = OPENOUT("<Wimp$ScrapDir>.BootEdit")
21
22 FOR Item% = 1 TO !List%
23
24 IF Item% - 1 = YPos% THEN
25 Pos% = PTR#In%
26 PTR#In% = 0
27
28 FOR Move% = 1 TO !List%
29
30 REPEAT
31 Line$ = GET$#In%
32 UNTIL LEFT$(Line$, 6) = "|Start"
33
34 IF !(List% + 4 + 80 * (Move% - 1) + 00) AND 1 THEN
35 BPUT#Out%, Line$
36 REPEAT
37 Line$ = GET$#In%
38 BPUT#Out%, Line$
39 UNTIL Line$ = "|End"
40 ENDIF
41
42 NEXT
43
44 Done% = TRUE
45
46 PTR#In% = Pos%
47 ENDIF
48
49 REPEAT
50 Line$ = GET$#In%
51 UNTIL LEFT$(Line$, 6) = "|Start"
52
53 IF (!(List% + 4 + 80 * (Item% - 1) + 00) AND 1) = 0 THEN
54 BPUT#Out%, Line$
55 REPEAT
56 Line$ = GET$#In%
57 BPUT#Out%, Line$
58 UNTIL Line$ = "|End"
59 ENDIF
60
61 NEXT
62
63 IF NOT Done% THEN
64 PTR#In% = 0
65
66 FOR Move% = 1 TO !List%
67
68 REPEAT
69 Line$ = GET$#In%
70 UNTIL LEFT$(Line$, 6) = "|Start"
71
72 IF !(List% + 4 + 80 * (Move% - 1) + 00) AND 1 THEN
73 BPUT#Out%, Line$
74 REPEAT
75 Line$ = GET$#In%
76 BPUT#Out%, Line$
77 UNTIL Line$ = "|End"
78 ENDIF
79
80 NEXT
81
82 ENDIF
83
84 CLOSE#In%
85 CLOSE#Out%
86
87 OSCLI"Copy <Wimp$ScrapDir>.BootEdit " + Boot_Path$ + ".Choices.Boot." + File$ + " ~CDFL~V"
88 IF File$ = "PreDesktop" THEN
89 OSCLI"SetType " + Boot_Path$ + ".Choices.Boot." + File$ + " FEB"
90 ELSE
91 OSCLI"SetType " + Boot_Path$ + ".Choices.Boot." + File$ + " FEA"
92 ENDIF
93
94 PROCBoot_Scan
95
96 ELSE
97
98 VDU 7
99
100 ENDIF
101
102 =0

  ViewVC Help
Powered by ViewVC 1.1.26