vdfsplat / AppSrc / VdfSplat.src @ 59
History | View | Annotate | Download (26.4 KB)
1 | 8 | wil | //TH-Header |
---|---|---|---|
2 | //***************************************************************************************** |
||
3 | // Copyright (c) 2013 Antwise Solutions |
||
4 | // All rights reserved. |
||
5 | // |
||
6 | // $FileName : VdfSplat.src |
||
7 | 22 | wil | // $ProjectName : Splat ! Vdf Debugger |
8 | 8 | wil | // $Authors : Wil van Antwerpen |
9 | // $Created : 12.14.2013 23:42 |
||
10 | // $Type : GPLv2 |
||
11 | // |
||
12 | // Contents: |
||
13 | // |
||
14 | //***************************************************************************************** |
||
15 | //TH-RevisionStart |
||
16 | //TH-RevisionEnd |
||
17 | |||
18 | 22 | wil | Use DFAllEnt.pkg |
19 | 49 | wil | Use cToolTipController.pkg |
20 | 7 | wil | Use cDebugCJCommandBarSystem.pkg |
21 | 10 | wil | Use vWin32fh.pkg |
22 | Use seq_chnl.pkg |
||
23 | 35 | wil | Use cSplatApplication.pkg |
24 | 43 | wil | Use cSplatPanel.pkg |
25 | 2 | wil | |
26 | Object oHtmlHelp is a cHtmlHelp |
||
27 | End_Object |
||
28 | |||
29 | 35 | wil | Object oApplication is a cSplatApplication |
30 | 2 | wil | Set peHelpType to htHtmlHelp |
31 | 46 | wil | |
32 | 31 | wil | Set psAutoOpenWorkspace to "" // We're not using data files, the exe has to be completely self contained. |
33 | 2 | wil | End_Object |
34 | |||
35 | 49 | wil | Object oToolTipController is a cToolTipController |
36 | Move Self to ghoToolTipController |
||
37 | End_Object |
||
38 | |||
39 | 2 | wil | Use oEditContextMenu.pkg |
40 | Use oDEOEditContextMenu.pkg |
||
41 | |||
42 | 37 | wil | #IF (1=0) |
43 | // This imagelist is a dummy, it is only used to have the Studio recognize |
||
44 | // which bitmaps are used in the application so that a "Scan Bitmaps" will always |
||
45 | // include the bitmaps as embedded resource. The imagelist itself is not used. |
||
46 | Object ImageContainer is a cImageList32 |
||
47 | Set piMaxImages to 10 |
||
48 | Procedure OnCreate |
||
49 | Integer iImage |
||
50 | Get AddImage "Debugger.bmp/t" to iImage |
||
51 | End_Procedure |
||
52 | End_Object |
||
53 | #ENDIF |
||
54 | |||
55 | 43 | wil | Object oMain is a cSplatPanel |
56 | 2 | wil | Set Label to "VdfSplat" |
57 | Set Location to 4 3 |
||
58 | 22 | wil | Set Size to 300 450 |
59 | 2 | wil | |
60 | 8 | wil | // Make sure it can be used here already |
61 | Use cDebuggerEngine.pkg |
||
62 | |||
63 | 7 | wil | |
64 | Object oOpenProgramDialog is an OpenDialog |
||
65 | Set Filter_String to 'Visual DataFlex Executables|*.exe' |
||
66 | Set Initial_Folder to 'C:\Program Files\Visual DataFlex' |
||
67 | // Set MultiSelect_State To False |
||
68 | Set NoChangeDir_State To True // don't touch my current folder |
||
69 | Set CreatePrompt_State To False |
||
70 | Set HideReadOnly_State To True |
||
71 | Set Filter_Index to 2 |
||
72 | 22 | wil | End_Object |
73 | 25 | wil | |
74 | Object oOpenSourceFileDialog is an OpenDialog |
||
75 | Set Filter_String to 'Visual DataFlex source|*.*' |
||
76 | // Set Initial_Folder to 'C:\Program Files\Visual DataFlex' |
||
77 | // Set MultiSelect_State To False |
||
78 | Set NoChangeDir_State To True // don't touch my current folder |
||
79 | Set CreatePrompt_State To False |
||
80 | Set HideReadOnly_State To True |
||
81 | Set Filter_Index to 2 |
||
82 | End_Object |
||
83 | 2 | wil | |
84 | 10 | wil | Procedure Warning_Box String sMessage String sCaption |
85 | Integer eResponse |
||
86 | |||
87 | Get Message_Box sMessage sCaption MB_OK MB_ICONWARNING to eResponse |
||
88 | 22 | wil | End_Procedure // Warning_Box |
89 | 10 | wil | |
90 | Procedure Fishy_Box String sMessage String sDebugfile |
||
91 | Send Warning_Box ("Sorry but the debug file for the executable you choose\n\n"+; |
||
92 | sDebugfile+"\ndoesn't look like it is valid.\n\n"+sMessage+"\n\nPlease try again.") ; |
||
93 | "VdfSplat thinks this is fishy" |
||
94 | 22 | wil | End_Procedure // Fishy_Box |
95 | 10 | wil | |
96 | // |
||
97 | // Reads the runtime version of the .dbg file passed. |
||
98 | 22 | wil | // The file must exist. |
99 | 10 | wil | // |
100 | Function ReadRuntimeVersion String sDebugFile Returns Integer |
||
101 | Integer iRuntime |
||
102 | 22 | wil | Integer iChIn |
103 | 10 | wil | Integer iFileSize |
104 | Integer iVdfMax |
||
105 | Integer iVdfMin |
||
106 | String sBinary |
||
107 | |||
108 | 22 | wil | Move 0 To iRuntime |
109 | 10 | wil | Get vWin32_APIFileSize sDebugFile to iFileSize |
110 | If (iFileSize > 40000) Begin |
||
111 | |||
112 | 22 | wil | Get Seq_Open_Input_Channel sDebugfile to iChIn |
113 | 10 | wil | Direct_Input channel iChIn ("binary:" + sDebugfile) |
114 | Read_Block channel iChIn sBinary 50 |
||
115 | Send Seq_Close_Channel iChIn |
||
116 | If (Left(sBinary,4)="VDFB") Begin |
||
117 | Move (Ascii(Mid(sBinary,1,5))) To iVdfMax |
||
118 | Move (Ascii(Mid(sBinary,1,9))) To iVdfMin |
||
119 | 16 | wil | If ((iVdfMax>2 and iVdfMax < 26) and (iVdfMin<5)) Begin |
120 | 10 | wil | Move ((iVdfMax*10)+iVdfMin) To iRuntime |
121 | End |
||
122 | Else Begin |
||
123 | Send Fishy_Box ("The debug file suggests this is VDF version"*trim(iVdfMax)+"."+trim(iVdfMin)+"\nNot very likely that.") sDebugfile |
||
124 | 22 | wil | End |
125 | 10 | wil | End |
126 | Else Begin |
||
127 | Send Fishy_Box "The debug file signature is not correct." sDebugfile |
||
128 | End |
||
129 | End |
||
130 | Else Begin |
||
131 | Send Fishy_Box "It is wayyy too small." sDebugfile |
||
132 | 22 | wil | End |
133 | 10 | wil | Function_Return iRuntime |
134 | 22 | wil | End_Function // ReadRuntimeVersion |
135 | 10 | wil | |
136 | 24 | wil | Procedure doOpenFile |
137 | 27 | wil | Handle hoDebug |
138 | 25 | wil | Handle hoEditor |
139 | Handle hoDialog |
||
140 | Boolean bOpen |
||
141 | Boolean bIsValid |
||
142 | String sFileName |
||
143 | 24 | wil | |
144 | Get phoDebugger to hoDebug |
||
145 | If (hoDebug) Begin |
||
146 | 25 | wil | Move (oOpenSourceFileDialog(Self)) To hoDialog |
147 | |||
148 | Get Show_Dialog of hoDialog to bOpen |
||
149 | If bOpen Begin |
||
150 | Get File_Name of hoDialog To sFileName |
||
151 | Get ComIsValidSourceFile of hoDebug sFileName To bIsValid |
||
152 | If (bIsValid) Begin |
||
153 | Get phoEditor to hoEditor |
||
154 | If (hoEditor) Begin |
||
155 | Send DoOpenSourceFile of hoEditor sFileName |
||
156 | End |
||
157 | End |
||
158 | Else Begin |
||
159 | Send Info_Box "source file is not part of selected program we are currently debugging." |
||
160 | End |
||
161 | End |
||
162 | |||
163 | 24 | wil | End |
164 | End_Procedure // doOpenFile |
||
165 | |||
166 | 7 | wil | Procedure doDebugRun |
167 | 22 | wil | String sApplication |
168 | 10 | wil | String sExt |
169 | String sDebugfile |
||
170 | Integer iRuntime |
||
171 | 22 | wil | Boolean bOpen |
172 | 10 | wil | Boolean bExists |
173 | 8 | wil | Handle hoDebug |
174 | 22 | wil | Handle hoParent |
175 | 7 | wil | Handle hoDialog |
176 | 10 | wil | |
177 | Set piDebugfileVersion To 0 |
||
178 | 8 | wil | |
179 | 35 | wil | Get psApplication of ghoApplication To sApplication |
180 | 22 | wil | If (sApplication = "") Begin |
181 | 10 | wil | Move (oOpenProgramDialog(Self)) To hoDialog |
182 | |||
183 | Get Show_Dialog of hoDialog to bOpen |
||
184 | If bOpen Begin |
||
185 | 17 | wil | Get File_Name of hoDialog To sApplication |
186 | 22 | wil | // Don't tell me when I selected a file, just do it. |
187 | //Send Info_Box ("Selected file " + sApplication) |
||
188 | 10 | wil | End |
189 | 35 | wil | Else Send Info_Box "You did not choose a file, nothing to debug." |
190 | 10 | wil | |
191 | 22 | wil | End |
192 | 10 | wil | If (sApplication="") Begin |
193 | // Oh still no app? Use our hardcoded path |
||
194 | 35 | wil | Procedure_Return |
195 | 22 | wil | End |
196 | 10 | wil | Get ParseFileExtension sApplication To sExt |
197 | Move (Replace("."+sExt,sApplication,".dbg")) To sDebugfile |
||
198 | Get vFilePathExists sDebugfile to bExists |
||
199 | If (bExists=false) Begin |
||
200 | Send Warning_Box ("Sorry but for the executable chosing the corresponding debug file\n"+; |
||
201 | sDebugfile+"\ncould not be located.\n\nPlease select again.") ; |
||
202 | "VdfSplat can't do that" |
||
203 | End |
||
204 | Else Begin |
||
205 | 22 | wil | Get ReadRuntimeVersion sDebugfile To iRuntime |
206 | 10 | wil | If (iRuntime=0) Begin |
207 | Move False To bExists |
||
208 | End |
||
209 | 22 | wil | End |
210 | 23 | wil | |
211 | 7 | wil | Get phoDebugger to hoDebug |
212 | 10 | wil | If (bExists and hoDebug=0) Begin |
213 | 20 | wil | // |
214 | |||
215 | Get phoDebuggerHost To hoParent |
||
216 | 10 | wil | Set piDebugfileVersion To iRuntime |
217 | 8 | wil | Get Create Of hoParent U_cDebuggerEngine To hoDebug |
218 | If (hoDebug) Begin |
||
219 | Send DoCreateEngine of hoDebug |
||
220 | 20 | wil | End |
221 | End |
||
222 | 10 | wil | If (bExists and hoDebug<>0) Begin |
223 | |||
224 | 35 | wil | Set psApplication of ghoApplication To sApplication |
225 | 20 | wil | Set ApplicationFileName of hoDebug To sApplication |
226 | 38 | wil | // ?? |
227 | Send DoSetCaptionLabel Of (oVdfDbg(oClientArea(Self))) sApplication |
||
228 | 7 | wil | //Send ComPause of hoDebug |
229 | //Procedure ComStartProgram String llcmdLine Variant llwebApp Variant llurl |
||
230 | 16 | wil | If (iRuntime<181) Begin |
231 | Send ComStartProgram of hoDebug sApplication false "" |
||
232 | End |
||
233 | Else Begin // noheap or heap? that's' the question. |
||
234 | Send ComStartProgram181 of hoDebug sApplication True false "" |
||
235 | End |
||
236 | 22 | wil | Send ComUpdateViews Of hoDebug |
237 | End |
||
238 | 7 | wil | End_Procedure // doDebugRun |
239 | |||
240 | Procedure doStopDebug |
||
241 | Handle hoDebug |
||
242 | |||
243 | Get phoDebugger to hoDebug |
||
244 | If (hoDebug) Begin |
||
245 | Send ComStopProgram of hoDebug |
||
246 | 20 | wil | Send ComUpdateViews Of hoDebug |
247 | 35 | wil | Set psApplication of ghoApplication To "" |
248 | 20 | wil | End |
249 | 7 | wil | End_Procedure // doStopDebug |
250 | |||
251 | 2 | wil | Procedure doDebugPause |
252 | Handle hoDebug |
||
253 | |||
254 | Get phoDebugger to hoDebug |
||
255 | If (hoDebug) Begin |
||
256 | Send ComPause of hoDebug |
||
257 | 22 | wil | Send ComUpdateViews Of hoDebug |
258 | End |
||
259 | End_Procedure // doDebugPause |
||
260 | 2 | wil | |
261 | Procedure doDebugContinue |
||
262 | Handle hoDebug |
||
263 | |||
264 | Get phoDebugger to hoDebug |
||
265 | If (hoDebug) Begin |
||
266 | Send ComContinue of hoDebug |
||
267 | 22 | wil | Send ComUpdateViews Of hoDebug |
268 | End |
||
269 | 2 | wil | End_Procedure // doDebugContinue |
270 | |||
271 | Procedure doDebugStepOver |
||
272 | Handle hoDebug |
||
273 | |||
274 | Get phoDebugger to hoDebug |
||
275 | If (hoDebug) Begin |
||
276 | Send ComStepOver of hoDebug |
||
277 | 22 | wil | Send ComUpdateViews Of hoDebug |
278 | End |
||
279 | End_Procedure // doDebugStepOver |
||
280 | 7 | wil | |
281 | Procedure doDebugStepInto |
||
282 | Handle hoDebug |
||
283 | |||
284 | Get phoDebugger to hoDebug |
||
285 | If (hoDebug) Begin |
||
286 | Send ComStepInto of hoDebug |
||
287 | 22 | wil | Send ComUpdateViews Of hoDebug |
288 | End |
||
289 | 7 | wil | End_Procedure // doDebugStepInto |
290 | |||
291 | Procedure doDebugStepOut |
||
292 | Handle hoDebug |
||
293 | |||
294 | Get phoDebugger to hoDebug |
||
295 | If (hoDebug) Begin |
||
296 | Send ComStepOut of hoDebug |
||
297 | 22 | wil | Send ComUpdateViews Of hoDebug |
298 | End |
||
299 | 7 | wil | End_Procedure // doDebugStepOut |
300 | 12 | wil | |
301 | 20 | wil | Procedure doSetBreakPoint |
302 | 12 | wil | Integer iLine |
303 | String sFileName |
||
304 | Boolean bSuccess |
||
305 | Handle hoDebugger |
||
306 | Handle hoEditor |
||
307 | |||
308 | Get phoDebugger to hoDebugger |
||
309 | Get phoEditor To hoEditor |
||
310 | If (hoDebugger<>0 and hoEditor<>0) begin |
||
311 | |||
312 | Get psFileName Of hoEditor To sFileName |
||
313 | 20 | wil | Get CurrentLine Of hoEditor To iLine |
314 | 12 | wil | If (sFileName<>"" and iLine<>0) Begin |
315 | 20 | wil | Get SetBreakPoint of hoDebugger sFileName (&iLine) To bSuccess |
316 | 37 | wil | If (bSuccess=false) Begin |
317 | Send info_box ("Set breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess)) |
||
318 | End |
||
319 | 20 | wil | //Send ComSetMarginImages iLine 1 |
320 | End |
||
321 | 12 | wil | End |
322 | 20 | wil | End_Procedure |
323 | |||
324 | Procedure doRemoveBreakPoint |
||
325 | Integer iLine |
||
326 | String sFileName |
||
327 | Boolean bSuccess |
||
328 | Handle hoDebugger |
||
329 | Handle hoEditor |
||
330 | |||
331 | Get phoDebugger to hoDebugger |
||
332 | Get phoEditor To hoEditor |
||
333 | If (hoDebugger<>0 and hoEditor<>0) begin |
||
334 | |||
335 | Get psFileName Of hoEditor To sFileName |
||
336 | Get CurrentLine Of hoEditor To iLine |
||
337 | If (sFileName<>"" and iLine<>0) Begin |
||
338 | Get RemoveBreakPoint of hoDebugger sFileName (&iLine) To bSuccess |
||
339 | 37 | wil | If (bSuccess=false) Begin |
340 | Send info_box ("Removing breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess)) |
||
341 | End |
||
342 | 20 | wil | //Send ComSetMarginImages iLine 1 |
343 | End |
||
344 | End |
||
345 | End_Procedure |
||
346 | 2 | wil | |
347 | 8 | wil | // |
348 | //Procedure doCreateCallStack |
||
349 | // Boolean bCreated |
||
350 | // Handle hoCallStack |
||
351 | // |
||
352 | 22 | wil | // |
353 | 8 | wil | // Get phoCallStack To hoCallStack |
354 | // If (hoCallStack) Begin |
||
355 | // Send CreateComObject of hoCallStack |
||
356 | // Get IsComObjectCreated Of hoCallStack To bCreated |
||
357 | // Showln "callstack [" bCreated "]" |
||
358 | // If (bCreated) Begin |
||
359 | 22 | wil | // Send RegisterComEvents Of hoCallStack |
360 | 8 | wil | // //Set ComWindowType Of hoGlobals To 1 // global |
361 | 22 | wil | // End |
362 | 8 | wil | // End |
363 | //End_Procedure // doCreateCallStack |
||
364 | 2 | wil | |
365 | 7 | wil | Function HasProgramStarted Returns Boolean |
366 | Boolean bStarted |
||
367 | Handle hoDebugger |
||
368 | |||
369 | Move False To bStarted |
||
370 | Get phoDebugger To hoDebugger |
||
371 | If (hoDebugger) Begin |
||
372 | Get pbProgramStarted of hoDebugger To bStarted |
||
373 | 22 | wil | End |
374 | 7 | wil | Function_Return bStarted |
375 | 22 | wil | End_Function // HasProgramStarted |
376 | 2 | wil | |
377 | 7 | wil | // |
378 | // A program can only be paused after it has started |
||
379 | // This is used as an indication that we can step through the source |
||
380 | // |
||
381 | Function HasProgramPaused Returns Boolean |
||
382 | 22 | wil | Boolean bPaused |
383 | 7 | wil | Boolean bStarted |
384 | Handle hoDebugger |
||
385 | |||
386 | Move False To bPaused |
||
387 | Get HasProgramStarted To bStarted |
||
388 | If (bStarted) Begin |
||
389 | Get phoDebugger To hoDebugger |
||
390 | If (hoDebugger) Begin |
||
391 | Get pbProgramPaused of hoDebugger to bPaused |
||
392 | 22 | wil | End |
393 | End |
||
394 | 7 | wil | Function_Return bPaused |
395 | 22 | wil | End_Function // HasProgramPaused |
396 | 7 | wil | |
397 | 37 | wil | // |
398 | // A breakpoint can only be removed if we have existing breakpoints |
||
399 | // |
||
400 | Function HasBreakpoints Returns Boolean |
||
401 | Boolean bHasBreakPoints |
||
402 | Boolean bStarted |
||
403 | Handle hoDebugger |
||
404 | |||
405 | Move False To bHasBreakPoints |
||
406 | Get HasProgramStarted To bStarted |
||
407 | If (bStarted) Begin |
||
408 | Get phoDebugger To hoDebugger |
||
409 | If (hoDebugger) Begin |
||
410 | Get HasBreakPoints of hoDebugger to bHasBreakPoints |
||
411 | End |
||
412 | End |
||
413 | Function_Return bHasBreakPoints |
||
414 | End_Function // HasBreakPoints |
||
415 | 7 | wil | |
416 | 37 | wil | |
417 | 2 | wil | |
418 | 7 | wil | Object oCommandBarSystem is a cDebugCJCommandBarSystem |
419 | 2 | wil | |
420 | Procedure OnCreateCommandBars |
||
421 | Handle hoOptions |
||
422 | Get OptionsObject to hoOptions |
||
423 | Forward Send OnCreateCommandBars |
||
424 | End_Procedure |
||
425 | 7 | wil | |
426 | 2 | wil | |
427 | Object oMenuBar is a cCJMenuBar |
||
428 | |||
429 | Object oFileMenu is a cCJMenuItem |
||
430 | 22 | wil | Set peControlType to xtpControlPopup |
431 | 2 | wil | Set psCaption to "&File" |
432 | Set psDescription to "Find, Save, Delete, Clear information or quit this application." |
||
433 | Set psCategory to "Menus" |
||
434 | |||
435 | Object oClearMenuItem is a cCJClearMenuItem |
||
436 | Set pbAddToDesignerMenu to True |
||
437 | End_Object |
||
438 | |||
439 | Object oClearAllMenu is a cCJClearAllMenuItem |
||
440 | Set pbAddToDesignerMenu to True |
||
441 | End_Object |
||
442 | |||
443 | Object oPromptMenuItem is a cCJPromptMenuItem |
||
444 | Set pbAddToDesignerMenu to True |
||
445 | Set pbControlBeginGroup to True |
||
446 | End_Object |
||
447 | |||
448 | Object oCJDebugPauseMenuItem is a cCJDebugPauseMenuItem |
||
449 | Set pbAddToDesignerMenu to True |
||
450 | Set pbControlBeginGroup to True |
||
451 | End_Object |
||
452 | |||
453 | Object oFindNextMenu is a cCJFindNextMenuItem |
||
454 | Set pbAddToDesignerMenu to True |
||
455 | End_Object |
||
456 | |||
457 | Object oFindPreviousMenu is a cCJFindPreviousMenuItem |
||
458 | Set pbAddToDesignerMenu to True |
||
459 | End_Object |
||
460 | |||
461 | Object oFindFirstMenu is a cCJFindFirstMenuItem |
||
462 | Set pbAddToDesignerMenu to True |
||
463 | End_Object |
||
464 | |||
465 | Object oFindLastMenu is a cCJFindLastMenuItem |
||
466 | Set pbAddToDesignerMenu to True |
||
467 | End_Object |
||
468 | |||
469 | Object oSaveMenuItem is a cCJSaveMenuItem |
||
470 | Set pbAddToDesignerMenu to True |
||
471 | Set pbControlBeginGroup to True |
||
472 | End_Object |
||
473 | |||
474 | Object oDeleteMenuItem is a cCJDeleteMenuItem |
||
475 | Set pbAddToDesignerMenu to True |
||
476 | End_Object |
||
477 | |||
478 | Object oExitMenu is a cCJExitMenuItem |
||
479 | Set pbControlBeginGroup to True |
||
480 | End_Object |
||
481 | |||
482 | End_Object |
||
483 | |||
484 | Object oViewMenu is a cCJMenuItem |
||
485 | Set peControlType to xtpControlPopup |
||
486 | Set psCaption to "&View" |
||
487 | Set psToolTip to "View" |
||
488 | Set psDescription to "Available Views" |
||
489 | |||
490 | Object ooVdfdbgMenuItem is a cCJMenuItem |
||
491 | 7 | wil | Set psCaption to "Debugger View" |
492 | Set psTooltip to "The debugger main view" |
||
493 | 2 | wil | |
494 | Procedure OnExecute Variant vCommandBarControl |
||
495 | Handle hoClient |
||
496 | Get Client_Id to hoClient |
||
497 | Send Activate_oVdfdbg of hoClient |
||
498 | End_Procedure |
||
499 | End_Object |
||
500 | 24 | wil | |
501 | Object oObjectInspectorMenuItem is a cCJMenuItem |
||
502 | Set psCaption to "Object Inspector Ctrl+L" |
||
503 | Set psTooltip to "Inspect the objects in the running program" |
||
504 | |||
505 | Procedure OnExecute Variant vCommandBarControl |
||
506 | Handle hoClient |
||
507 | Get Client_Id to hoClient |
||
508 | Send doActivateObjectInspectorPanel of hoClient |
||
509 | End_Procedure |
||
510 | |||
511 | Function IsEnabled Returns Boolean |
||
512 | Boolean bPaused |
||
513 | |||
514 | Get HasProgramPaused To bPaused |
||
515 | Function_Return bPaused |
||
516 | End_Function |
||
517 | End_Object |
||
518 | 2 | wil | End_Object |
519 | |||
520 | Object oNavigateMenu is a cCJMenuItem |
||
521 | 22 | wil | Set peControlType to xtpControlPopup |
522 | Set psCaption to "&Navigate" |
||
523 | Set psTooltip to "Navigate" |
||
524 | 2 | wil | Set psDescription to "Move to different areas of the application" |
525 | |||
526 | Object oNextAreaMenu is a cCJNextAreaMenu |
||
527 | End_Object |
||
528 | |||
529 | Object oPriorAreaMenu is a cCJPriorAreaMenu |
||
530 | End_Object |
||
531 | |||
532 | Object oNextViewMenu is a cCJNextViewMenu |
||
533 | End_Object |
||
534 | |||
535 | Object oPriorViewMenu is a cCJPriorViewMenu |
||
536 | End_Object |
||
537 | |||
538 | Object oPromptMenu is a cCJPromptMenuItem |
||
539 | Set pbControlBeginGroup to True |
||
540 | End_Object |
||
541 | |||
542 | Object oZoomMenu is a cCJZoomMenuItem |
||
543 | End_Object |
||
544 | |||
545 | End_Object |
||
546 | |||
547 | Object oWindowMenu is a cCJMDIWindowsMenuItem |
||
548 | Set peControlType to xtpControlPopup |
||
549 | Set psCaption to "&Window" |
||
550 | Set psToolTip to "Window" |
||
551 | 22 | wil | Set psDescription to "Display Current Views and set other display options." |
552 | 2 | wil | |
553 | 22 | wil | // These are the static windows items. More will be created in onInitPopup |
554 | 2 | wil | Object oDisplayOptionsMenu is a cCJMenuItem |
555 | 22 | wil | Set peControlType to xtpControlPopup |
556 | 2 | wil | Set psCaption to "&Display Options" |
557 | Set psToolTip to "Display Options" |
||
558 | Set psDescription to "Set display options" |
||
559 | |||
560 | Object oStatusbarMenu is a cCJStatusbarMenuItem |
||
561 | End_Object |
||
562 | |||
563 | Object oAutoArrangeIconsMenu is a cCJAutoArrangeIconsMenuItem |
||
564 | End_Object |
||
565 | |||
566 | Object oRestoreMenusMenu is a cCJRestoreMenusMenuItem |
||
567 | Set pbControlBeginGroup to True |
||
568 | End_Object |
||
569 | |||
570 | End_Object |
||
571 | |||
572 | Object oCascadeMenu is a cCJCascadeMenuItem |
||
573 | Set pbControlBeginGroup to True |
||
574 | End_Object |
||
575 | |||
576 | Object oHorizTile is a cCJTileHorizontally |
||
577 | End_Object |
||
578 | |||
579 | Object oVertTile is a cCJTileVertically |
||
580 | End_Object |
||
581 | |||
582 | Object oMinimizeMenuItem is a cCJMinimizeWindowsMenuItem |
||
583 | Set pbControlBeginGroup to True |
||
584 | End_Object |
||
585 | |||
586 | Object oRestoreMenuItem is a cCJRestoreWindowsMenuItem |
||
587 | End_Object |
||
588 | |||
589 | Object oArrangeIconsMenuItem is a cCJAutoArrangeIconsMenuItem |
||
590 | Set pbControlBeginGroup to True |
||
591 | End_Object |
||
592 | |||
593 | End_Object |
||
594 | |||
595 | Object oHelpMenu is a cCJMenuItem |
||
596 | 22 | wil | Set peControlType to xtpControlPopup |
597 | 2 | wil | Set psCaption to "&Help" |
598 | Set psDescription to "Access Information for learning and using this DataFlex application." |
||
599 | Set psToolTip to "Help" |
||
600 | |||
601 | 22 | wil | Object oHelpMenuItem is a cCJHelpMenuItem |
602 | 2 | wil | End_Object |
603 | |||
604 | Object oAboutMenuItem is a cCJAboutMenuItem |
||
605 | End_Object |
||
606 | |||
607 | End_Object |
||
608 | |||
609 | End_Object |
||
610 | |||
611 | 7 | wil | Object oDebugToolBar is a cCJToolbar |
612 | Set psTitle to "Debugging Toolbar" |
||
613 | 2 | wil | |
614 | 7 | wil | |
615 | Object oStartDebugButton is a cCJStartDebugMenuItem |
||
616 | 2 | wil | End_Object |
617 | |||
618 | 7 | wil | Object oStopDebugButton is a cCJStopDebugMenuItem |
619 | 2 | wil | End_Object |
620 | |||
621 | Object oDebugPauseButton is a cCJDebugPauseMenuItem |
||
622 | End_Object |
||
623 | |||
624 | 7 | wil | Object oDebugContinueButton is a cCJDebugContinueMenuItem |
625 | End_Object |
||
626 | |||
627 | 2 | wil | Object oDebugStepOverButton is a cCJStepOverMenuItem |
628 | End_Object |
||
629 | |||
630 | 7 | wil | Object oDebugStepIntoButton is a cCJStepIntoMenuItem |
631 | 2 | wil | End_Object |
632 | 7 | wil | |
633 | Object oDebugStepOutButton is a cCJStepOutMenuItem |
||
634 | End_Object |
||
635 | |||
636 | 22 | wil | // |
637 | 2 | wil | |
638 | Object oPromptToolItem is a cCJPromptMenuItem |
||
639 | Set pbControlBeginGroup to True |
||
640 | End_Object |
||
641 | |||
642 | End_Object |
||
643 | 27 | wil | |
644 | 24 | wil | Object oFileToolbar is a cCJToolbar |
645 | Set psTitle To "Open Source Toolbar" |
||
646 | Object oFileOpen is a cCJOpenFileMenuItem |
||
647 | End_Object |
||
648 | End_Object |
||
649 | 2 | wil | |
650 | 21 | wil | Object oBreakPointToolBar is a cCJToolbar |
651 | Set psTitle to "Breakpoint Toolbar" |
||
652 | |||
653 | Object oAddBreakpointButton is a cCJAddBreakpointMenuItem |
||
654 | End_Object |
||
655 | |||
656 | Object oRemoveBreakpointButton is a cCJRemoveBreakpointMenuItem |
||
657 | End_Object |
||
658 | End_Object |
||
659 | |||
660 | 2 | wil | Object oFileToolBar is a cCJToolbar |
661 | Set psTitle to "Data Entry Toolbar" |
||
662 | |||
663 | Object oClearToolItem is a cCJClearMenuItem |
||
664 | Set peControlStyle to xtpButtonIconAndCaption |
||
665 | End_Object |
||
666 | |||
667 | Object oClearAllToolItem2 is a cCJClearAllMenuItem |
||
668 | Set peControlStyle to xtpButtonIconAndCaption |
||
669 | End_Object |
||
670 | |||
671 | Object oSaveToolItem is a cCJSaveMenuItem |
||
672 | Set peControlStyle to xtpButtonIconAndCaption |
||
673 | Set pbControlBeginGroup to True |
||
674 | End_Object |
||
675 | |||
676 | Object oDeleteToolItem is a cCJDeleteMenuItem |
||
677 | Set peControlStyle to xtpButtonIconAndCaption |
||
678 | End_Object |
||
679 | |||
680 | End_Object |
||
681 | |||
682 | Object oEditToolBar is a cCJToolbar |
||
683 | Set psTitle to "Edit Toolbar" |
||
684 | |||
685 | Object oCutToolbarItem is a cCJCutMenuItem |
||
686 | End_Object |
||
687 | |||
688 | Object oCopyToolbarItem is a cCJCopyMenuItem |
||
689 | End_Object |
||
690 | |||
691 | Object oPasteToolbarItem is a cCJPasteMenuItem |
||
692 | End_Object |
||
693 | |||
694 | Object oDeleteEditToolbarItem is a cCJDeleteEditMenuItem |
||
695 | Set pbControlBeginGroup to True |
||
696 | End_Object |
||
697 | |||
698 | End_Object |
||
699 | |||
700 | Object oStatusBar is a cCJStatusBar |
||
701 | |||
702 | Object oStatusPane1 is a cCJStatusBarPane |
||
703 | Set piID to sbpIDIdlePane |
||
704 | Set pbStyleStretch to True |
||
705 | 24 | wil | Set psText To "" |
706 | 2 | wil | End_Object |
707 | |||
708 | Object oStatusPane2 is a cCJStatusBarPane |
||
709 | Set phoViewPane to Self |
||
710 | Set pbStyleStretch to True |
||
711 | 24 | wil | Set psText To "" |
712 | 2 | wil | End_Object |
713 | 7 | wil | |
714 | Object oStatusPane3 is a cCJStatusBarPane |
||
715 | Set pbStyleStretch to True |
||
716 | Set psText To "testing 888" |
||
717 | End_Object |
||
718 | 27 | wil | |
719 | 38 | wil | Function EditorHandle Returns Handle |
720 | Handle hoEditor |
||
721 | Boolean bIsCreated |
||
722 | |||
723 | Get phoEditor To hoEditor |
||
724 | If (hoEditor) Begin |
||
725 | Get IsComObjectCreated Of hoEditor To bIsCreated |
||
726 | If (bIsCreated=false) Begin |
||
727 | Move 0 To hoEditor |
||
728 | End |
||
729 | End |
||
730 | Function_Return hoEditor |
||
731 | End_Function |
||
732 | |||
733 | 24 | wil | Function EditorCurrentLine Returns Integer |
734 | Handle hoEditor |
||
735 | Integer iCount |
||
736 | |||
737 | 38 | wil | Get EditorHandle To hoEditor |
738 | 24 | wil | If (hoEditor) Begin |
739 | Get CurrentLine Of hoEditor To iCount |
||
740 | End |
||
741 | Function_Return iCount |
||
742 | End_Function // EditorCurrentLine |
||
743 | 4 | wil | |
744 | Function EditorLineCount Returns Integer |
||
745 | Handle hoEditor |
||
746 | Integer iCount |
||
747 | |||
748 | 38 | wil | Get EditorHandle To hoEditor |
749 | 4 | wil | If (hoEditor) Begin |
750 | Get ComLineCount Of hoEditor To iCount |
||
751 | End |
||
752 | Function_Return iCount |
||
753 | 22 | wil | End_Function // EditorLineCount |
754 | 24 | wil | |
755 | Procedure Show_Status_Help String sStatusHelp |
||
756 | Integer iLine |
||
757 | 38 | wil | Handle hoEditor |
758 | String sFileName |
||
759 | 24 | wil | |
760 | 38 | wil | Move "" To sFileName |
761 | Get EditorHandle To hoEditor |
||
762 | If (hoEditor) Begin |
||
763 | Get psFileName of hoEditor To sFileName |
||
764 | End |
||
765 | 24 | wil | Get EditorCurrentLine To iLine |
766 | Set psText Of oStatusPane1 To ("Line: "+trim(iLine)) |
||
767 | 38 | wil | Set psText Of oStatusPane2 To ("File: "+sFileName) |
768 | 24 | wil | End_Procedure |
769 | 2 | wil | |
770 | End_Object |
||
771 | |||
772 | End_Object |
||
773 | |||
774 | Object oClientArea is a ClientArea |
||
775 | Use StdAbout.pkg |
||
776 | 40 | wil | Use ObjectInspector.dg |
777 | 7 | wil | Use Vdfdbg.vw |
778 | 2 | wil | |
779 | 24 | wil | Procedure doActivateObjectInspectorPanel |
780 | 53 | wil | Send StartObjectInspector |
781 | 24 | wil | End_Procedure |
782 | |||
783 | 37 | wil | |
784 | |||
785 | 2 | wil | Procedure Activate_About |
786 | 37 | wil | String sTitle sCopyright sVersion sBitmap sAuthor |
787 | |||
788 | // string sVal sVal2 sVal3 |
||
789 | // move (SysConf(sysconf_os_name)) to sVal |
||
790 | // send Info_box sVal "Os Name" |
||
791 | // move (SysConf(sysconf_os_short_name)) to sVal2 |
||
792 | // send Info_box sVal2 "os short name" |
||
793 | // move (SysConf(sysconf_os_major_rev)) to sVal3 |
||
794 | // send Info_Box sVal3 "os major revision" |
||
795 | // // |
||
796 | Move "VdfSplat" to sTitle |
||
797 | Move "Alfa 1" to sVersion |
||
798 | Move "Copyright 2015, GPL v2, Antwise Solutions" to sCopyright |
||
799 | Move "Author: Wil van Antwerpen" to sAuthor |
||
800 | Move "Debugger.bmp/t" to sBitMap |
||
801 | Send DoAbout sTitle sVersion sCopyright sAuthor sBitMap |
||
802 | 2 | wil | End_Procedure |
803 | |||
804 | End_Object |
||
805 | |||
806 | End_Object |
||
807 | |||
808 | 35 | wil | |
809 | Procedure StartDebugging |
||
810 | String sApplication |
||
811 | Handle hoClient |
||
812 | |||
813 | Get Client_Id Of oMain To hoClient |
||
814 | If (hoClient) Begin |
||
815 | Send Activate_oVdfdbg of hoClient |
||
816 | Get psApplication of ghoApplication to sApplication |
||
817 | If (sApplication<>"") Begin |
||
818 | Send doDebugRun of hoClient |
||
819 | End |
||
820 | End |
||
821 | End_Procedure |
||
822 | |||
823 | Send StartDebugging |
||
824 | 2 | wil | Start_UI |