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

Contents of /archive/bootedit/BootEdit/Basic/Click

Parent Directory Parent Directory | Revision Log Revision Log


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

1 REM > BootEditCode:Click
2
3 DEF FNClick_IBar_2
4 PROCMenu_IconBar("IBar")
5 =0
6
7 DEF FNClick_IBar_4
8 IF Boot_Loaded% THEN
9 PROCWind_OpenC("Main")
10 PROCWind_SetFocus("Main")
11 ELSE
12 ERROR Erro_Info%, "%DropBootHere"
13 ENDIF
14 =1
15
16 DEF FNClick_IBar_1
17 =FNClick_IBar_4
18
19 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
20
21 DEF FNClick_Main_Help
22 PROCWimp_SupplyHelp
23 =1
24
25 DEF FNClick_Main_Boot
26 PROCBoot_Scan
27 PROCWind_OpenC("Boot")
28 PROCWind_SetFocus("Boot")
29 IF Z% = 1 THEN PROCWind_Close("Main")
30 =1
31
32 DEF FNClick_Main_Resources
33 OSCLI("Filer_OpenDir " + Boot_Path$ + ".Resources")
34 =1
35
36 DEF FNClick_Main_Library
37 OSCLI("Filer_OpenDir " + Boot_Path$ + ".Library")
38 =1
39
40 DEF FNClick_Main_Utils
41 OSCLI("Filer_OpenDir " + Boot_Path$ + ".Utils")
42 =1
43
44 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
45
46 DEF FNClick_Boot_Help
47 =FNClick_Main_Help
48
49 DEF FNClick_Boot_PreDesktop
50 PROCBoot_Scan
51 =1
52
53 DEF FNClick_Boot_PreDesk
54 PROCBoot_Scan
55 =1
56
57 DEF FNClick_Boot_Desktop
58 PROCBoot_Scan
59 =1
60
61 DEF FNClick_Boot_Tasks
62 PROCBoot_Scan
63 =1
64
65 DEF FNClick_Boot_Add
66 IF Boot_Editing% = 1 OR Boot_Editing% = 3 THEN
67 PROCWind_SetText("Add", "Title", "")
68 PROCMenu_Window("Add")
69 ELSE
70 ERROR Erro_Info%, "%ToAdd"
71 ENDIF
72 =1
73
74 DEF FNClick_Boot_Remove
75 PROCMenu_Window("Remove")
76 PROCWind_SetFocus("Remove")
77 =1
78
79 DEF FNClick_Boot_Edit
80 CASE Boot_Editing% OF
81 WHEN 1: PROCBoot_Edit("PreDesktop", 0)
82 WHEN 3: PROCBoot_Edit("Desktop", 0)
83 ENDCASE
84 =1
85
86 DEF FNClick_Boot_Open
87 CASE Boot_Editing% OF
88 WHEN 2: OSCLI "Filer_OpenDir " + Boot_Path$ + ".Choices.Boot.PreDesk"
89 WHEN 4: OSCLI "Filer_OpenDir " + Boot_Path$ + ".Choices.Boot.Tasks"
90 ENDCASE
91 =1
92
93 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
94
95 DEF FNClick_BootPane
96 LOCAL List%, YPos%, Numb%
97
98 List% = FNHeap_Find(0, "BootList")
99 IF !List% = 0 THEN =0
100
101 SYS"Wimp_GetWindowState",, B% + 12
102 YPos% = (-(Y% + (B%!36 - B%!28)) / List_High%) + 1
103 IF YPos% > !List% THEN =0
104
105 CASE TRUE OF
106
107 WHEN Z% > 255
108 REM click
109
110 IF Z% = 256 THEN
111
112 !(List% + 4 + 80 * (YPos% - 1)) = !(List% + 4 + 80 * (YPos% - 1)) EOR 1
113 SYS"Wimp_ForceRedraw", W%, 0, -(YPos% * List_High%), 65536, -((YPos% - 1) * List_High%)
114
115 ELSE
116
117 IF (!(List% + 4 + 80 * (YPos% - 1)) AND 1) = 0 THEN
118
119 FOR Item% = 1 TO !List%
120 IF (!(List% + 4 + 80 * (Item% - 1)) AND 1) AND (Item% <> YPos%) THEN
121 !(List% + 4 + 80 * (Item% - 1)) = !(List% + 4 + 80 * (Item% - 1)) AND NOT(1)
122 SYS"Wimp_ForceRedraw", W%, 0, -(Item% * List_High%), 65536, -((Item% - 1) * List_High%)
123 ENDIF
124 NEXT
125
126 !(List% + 4 + 80 * (YPos% - 1)) = !(List% + 4 + 80 * (YPos% - 1)) OR 1
127 SYS"Wimp_ForceRedraw", W%, 0, -(YPos% * List_High%), 65536, -((YPos% - 1) * List_High%)
128 ENDIF
129
130 ENDIF
131
132 FOR Item% = 1 TO !List%
133 IF (!(List% + 4 + 80 * (Item% - 1)) AND 1) THEN Numb% += 1
134 NEXT
135
136 PROCWind_IconGrey("Boot", "Remove", -(Numb% = 0))
137 PROCWind_IconGrey("Boot", "Edit", -((Numb% <> 1) OR (Boot_Editing% = 2) OR (Boot_Editing% = 4)))
138
139 WHEN Z% > 15
140 REM drag
141
142 FOR Item% = 1 TO !List%
143 IF (!(List% + 4 + 80 * (Item% - 1)) AND 1) THEN Numb% += 1
144 NEXT
145
146 B%!400 = X% - 18
147 B%!404 = Y% - 18
148 B%!408 = X% + 18
149 B%!412 = Y% + 18
150 IF Numb% = 1 THEN
151 SYS"DragASprite_Start", %1000101, 1, List% + 4 + 80 * (YPos% - 1) + 05, B% + 400
152 ELSE
153 SYS"DragASprite_Start", %1000101, 1, "multifile", B% + 400
154 ENDIF
155
156 WHEN Z% = 2
157 REM menu
158
159 PROCMenu_Show("Boot", X% - 64, Y%)
160
161 OTHERWISE
162 REM double-click
163
164 CASE Boot_Editing% OF
165 WHEN 1: PROCBoot_Edit("PreDesktop", YPos%)
166 WHEN 2: OSCLI("Filer_Run " + Boot_Path$ + ".Choices.Boot.PreDesk." + $(List% + 4 + 80 * (YPos% - 1) + 20))
167 WHEN 3: PROCBoot_Edit("Desktop", YPos%)
168 WHEN 4: OSCLI("Filer_Run " + Boot_Path$ + ".Choices.Boot.Tasks." + $(List% + 4 + 80 * (YPos% - 1) + 20))
169 ENDCASE
170
171 ENDCASE
172 =1
173
174 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
175
176 DEF FNClick_Add_Cancel
177 SYS"Wimp_CreateMenu",, -1
178 =1
179
180 DEF FNClick_Add_OK
181 LOCAL File%, File$
182
183 IF FNWind_GetText("Add", "Title") = "" THEN ERROR Erro_Warn%, "%NoTitle"
184
185 IF Boot_Editing% = 1 THEN File$ = "PreDesktop" ELSE File$ = "Desktop"
186
187 File% = OPENOUT("Pipe:$." + File$)
188 BPUT#File%, "|Start " + FNWind_GetText("Add", "Title")
189 BPUT#File%, ""
190 BPUT#File%, "|End"
191 CLOSE#File%
192 REM IF File$ = "PreDesktop" THEN
193 REM OSCLI"SetType Pipe:$." + File$ + " FEB"
194 REM ELSE
195 REM OSCLI"SetType Pipe:$." + File$ + " FEA"
196 REM ENDIF
197 OSCLI"SetType Pipe:$." + File$ + " FFF"
198 OSCLI"Filer_Run Pipe:$." + File$
199
200 =FNClick_Add_Cancel
201
202 REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
203
204 DEF FNClick_Remove_Cancel
205 =FNClick_Add_Cancel
206
207 DEF FNClick_Remove_Remove
208 CASE Boot_Editing% OF
209 WHEN 1: PROCBoot_Remove("PreDesktop")
210 WHEN 2: PROCBoot_Delete("PreDesk")
211 WHEN 3: PROCBoot_Remove("Desktop")
212 WHEN 4: PROCBoot_Delete("Tasks")
213 ENDCASE
214 =FNClick_Add_Cancel

  ViewVC Help
Powered by ViewVC 1.1.26