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