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