Project

General

Profile

Statistics
| Revision:

vdfsplat / AppSrc / VdfSplat.src @ 60

History | View | Annotate | Download (26.1 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 60 wil
        Send DoStartDebug
229
      End
230
    End_Procedure // doDebugRun
231
232
    Procedure DoStartDebug
233
      String  sApplication
234
      Integer iRuntime
235
      Handle  hoDebug
236
237
      Get phoDebugger to hoDebug
238
      If (hoDebug<>0) Begin
239
        Get psApplication Of ghoApplication To sApplication
240
        Get piDebugfileVersion To iRuntime
241 7 wil
        //Send ComPause of hoDebug
242
        //Procedure ComStartProgram String llcmdLine Variant llwebApp Variant llurl
243 16 wil
        If (iRuntime<181) Begin
244
          Send ComStartProgram of hoDebug sApplication false ""
245
        End
246
        Else Begin                         // noheap or heap? that's' the question.
247
          Send ComStartProgram181 of hoDebug sApplication True false ""
248
        End
249 22 wil
        Send ComUpdateViews Of hoDebug
250
      End
251 60 wil
    End_Procedure
252 7 wil
253
    Procedure doStopDebug
254
      Handle hoDebug
255
256
      Get phoDebugger to hoDebug
257
      If (hoDebug) Begin
258
        Send ComStopProgram of hoDebug
259 20 wil
        Send ComUpdateViews Of hoDebug
260 35 wil
        Set psApplication of ghoApplication To ""
261 20 wil
      End
262 7 wil
    End_Procedure // doStopDebug
263
264 2 wil
    Procedure doDebugPause
265
      Handle hoDebug
266
267
      Get phoDebugger to hoDebug
268
      If (hoDebug) Begin
269
        Send ComPause of hoDebug
270 22 wil
        Send ComUpdateViews Of hoDebug
271
      End
272
    End_Procedure // doDebugPause
273 2 wil
274
    Procedure doDebugContinue
275
      Handle hoDebug
276
277
      Get phoDebugger to hoDebug
278
      If (hoDebug) Begin
279
        Send ComContinue of hoDebug
280 22 wil
        Send ComUpdateViews Of hoDebug
281
      End
282 2 wil
    End_Procedure // doDebugContinue
283
284
    Procedure doDebugStepOver
285
      Handle hoDebug
286
287
      Get phoDebugger to hoDebug
288
      If (hoDebug) Begin
289
        Send ComStepOver of hoDebug
290 22 wil
        Send ComUpdateViews Of hoDebug
291
      End
292
    End_Procedure // doDebugStepOver
293 7 wil
294
    Procedure doDebugStepInto
295
      Handle hoDebug
296
297
      Get phoDebugger to hoDebug
298
      If (hoDebug) Begin
299
        Send ComStepInto of hoDebug
300 22 wil
        Send ComUpdateViews Of hoDebug
301
      End
302 7 wil
    End_Procedure // doDebugStepInto
303
304
    Procedure doDebugStepOut
305
      Handle hoDebug
306
307
      Get phoDebugger to hoDebug
308
      If (hoDebug) Begin
309
        Send ComStepOut of hoDebug
310 22 wil
        Send ComUpdateViews Of hoDebug
311
      End
312 7 wil
    End_Procedure // doDebugStepOut
313 12 wil
314 20 wil
    Procedure doSetBreakPoint
315 12 wil
      Integer iLine
316
      String  sFileName
317
      Boolean bSuccess
318
      Handle  hoDebugger
319
      Handle  hoEditor
320
321
      Get phoDebugger to hoDebugger
322
      Get phoEditor   To hoEditor
323
      If (hoDebugger<>0 and hoEditor<>0) begin
324
325
        Get psFileName    Of hoEditor To sFileName
326 20 wil
        Get CurrentLine   Of hoEditor To iLine
327 12 wil
        If (sFileName<>"" and iLine<>0) Begin
328 20 wil
          Get SetBreakPoint of hoDebugger sFileName (&iLine) To bSuccess
329 37 wil
          If (bSuccess=false) Begin
330
            Send info_box ("Set breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess))
331
          End
332 20 wil
          //Send ComSetMarginImages iLine 1
333
        End
334 12 wil
      End
335 20 wil
    End_Procedure
336
337
    Procedure doRemoveBreakPoint
338
      Integer iLine
339
      String  sFileName
340
      Boolean bSuccess
341
      Handle  hoDebugger
342
      Handle  hoEditor
343
344
      Get phoDebugger to hoDebugger
345
      Get phoEditor   To hoEditor
346
      If (hoDebugger<>0 and hoEditor<>0) begin
347
348
        Get psFileName    Of hoEditor To sFileName
349
        Get CurrentLine   Of hoEditor To iLine
350
        If (sFileName<>"" and iLine<>0) Begin
351
          Get RemoveBreakPoint of hoDebugger sFileName (&iLine) To bSuccess
352 37 wil
          If (bSuccess=false) Begin
353
            Send info_box ("Removing breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess))
354
          End
355 20 wil
          //Send ComSetMarginImages iLine 1
356
        End
357
      End
358
    End_Procedure
359 2 wil
360 8 wil
    //
361
    //Procedure doCreateCallStack
362
    //  Boolean bCreated
363
    //  Handle  hoCallStack
364
    //
365 22 wil
    //
366 8 wil
    //  Get phoCallStack To hoCallStack
367
    //  If (hoCallStack) Begin
368
    //    Send CreateComObject of hoCallStack
369
    //    Get IsComObjectCreated Of hoCallStack To bCreated
370
    //    Showln "callstack [" bCreated "]"
371
    //    If (bCreated) Begin
372 22 wil
    //      Send RegisterComEvents Of hoCallStack
373 8 wil
    //      //Set ComWindowType Of hoGlobals To 1 // global
374 22 wil
    //    End
375 8 wil
    //  End
376
    //End_Procedure // doCreateCallStack
377 2 wil
378 7 wil
    Function HasProgramStarted Returns Boolean
379
      Boolean bStarted
380
      Handle  hoDebugger
381
382
      Move False To bStarted
383
      Get phoDebugger To hoDebugger
384
      If (hoDebugger) Begin
385
        Get pbProgramStarted of hoDebugger To bStarted
386 22 wil
      End
387 7 wil
      Function_Return bStarted
388 22 wil
    End_Function // HasProgramStarted
389 2 wil
390 7 wil
    //
391
    // A program can only be paused after it has started
392
    // This is used as an indication that we can step through the source
393
    //
394
    Function HasProgramPaused Returns Boolean
395 22 wil
      Boolean bPaused
396 7 wil
      Boolean bStarted
397
      Handle  hoDebugger
398
399
      Move False To bPaused
400
      Get HasProgramStarted To bStarted
401
      If (bStarted) Begin
402
        Get phoDebugger To hoDebugger
403
        If (hoDebugger) Begin
404
          Get pbProgramPaused of hoDebugger to bPaused
405 22 wil
        End
406
      End
407 7 wil
      Function_Return bPaused
408 22 wil
    End_Function // HasProgramPaused
409 7 wil
410 37 wil
    //
411
    // A breakpoint can only be removed if we have existing breakpoints
412
    //
413
    Function HasBreakpoints Returns Boolean
414
      Boolean bHasBreakPoints
415
      Boolean bStarted
416
      Handle  hoDebugger
417
418
      Move False To bHasBreakPoints
419
      Get HasProgramStarted To bStarted
420
      If (bStarted) Begin
421
        Get phoDebugger To hoDebugger
422
        If (hoDebugger) Begin
423
          Get HasBreakPoints of hoDebugger to bHasBreakPoints
424
        End
425
      End
426
      Function_Return bHasBreakPoints
427
    End_Function // HasBreakPoints
428 7 wil
429 37 wil
430 2 wil
431 7 wil
    Object oCommandBarSystem is a cDebugCJCommandBarSystem
432 2 wil
433
        Procedure OnCreateCommandBars
434
            Handle hoOptions
435
            Get OptionsObject to hoOptions
436
            Forward Send OnCreateCommandBars
437
        End_Procedure
438 7 wil
439 2 wil
440
        Object oMenuBar is a cCJMenuBar
441
442
            Object oFileMenu is a cCJMenuItem
443 22 wil
                Set peControlType to xtpControlPopup
444 2 wil
                Set psCaption   to "&File"
445
                Set psDescription to "Find, Save, Delete, Clear information or quit this application."
446
                Set psCategory to "Menus"
447
448
                Object oClearMenuItem is a cCJClearMenuItem
449
                    Set pbAddToDesignerMenu to True
450
                End_Object
451
452
                Object oClearAllMenu is a cCJClearAllMenuItem
453
                    Set pbAddToDesignerMenu to True
454
                End_Object
455
456
                Object oPromptMenuItem is a cCJPromptMenuItem
457
                    Set pbAddToDesignerMenu to True
458
                    Set pbControlBeginGroup to True
459
                End_Object
460
461
                Object oCJDebugPauseMenuItem is a cCJDebugPauseMenuItem
462
                    Set pbAddToDesignerMenu to True
463
                    Set pbControlBeginGroup to True
464
                End_Object
465
466
                Object oFindNextMenu is a cCJFindNextMenuItem
467
                    Set pbAddToDesignerMenu to True
468
                End_Object
469
470
                Object oFindPreviousMenu is a cCJFindPreviousMenuItem
471
                    Set pbAddToDesignerMenu to True
472
                End_Object
473
474
                Object oFindFirstMenu is a cCJFindFirstMenuItem
475
                    Set pbAddToDesignerMenu to True
476
                End_Object
477
478
                Object oFindLastMenu is a cCJFindLastMenuItem
479
                    Set pbAddToDesignerMenu to True
480
                End_Object
481
482
                Object oSaveMenuItem is a cCJSaveMenuItem
483
                    Set pbAddToDesignerMenu to True
484
                    Set pbControlBeginGroup to True
485
                End_Object
486
487
                Object oDeleteMenuItem is a cCJDeleteMenuItem
488
                    Set pbAddToDesignerMenu to True
489
                End_Object
490
491
                Object oExitMenu is a cCJExitMenuItem
492
                    Set pbControlBeginGroup to True
493
                End_Object
494
495
            End_Object
496
497
            Object oViewMenu is a cCJMenuItem
498
                Set peControlType to xtpControlPopup
499
                Set psCaption to "&View"
500
                Set psToolTip to "View"
501
                Set psDescription to "Available Views"
502
503
                Object ooVdfdbgMenuItem is a cCJMenuItem
504 7 wil
                  Set psCaption to "Debugger View"
505
                  Set psTooltip to "The debugger main view"
506 2 wil
507
                  Procedure OnExecute Variant vCommandBarControl
508
                    Handle hoClient
509
                    Get Client_Id to hoClient
510
                    Send Activate_oVdfdbg of hoClient
511
                  End_Procedure
512
                End_Object
513 24 wil
514
                Object oObjectInspectorMenuItem is a cCJMenuItem
515
                  Set psCaption to "Object Inspector     Ctrl+L"
516
                  Set psTooltip to "Inspect the objects in the running program"
517
518
                  Procedure OnExecute Variant vCommandBarControl
519
                    Handle hoClient
520
                    Get Client_Id to hoClient
521
                    Send doActivateObjectInspectorPanel of hoClient
522
                  End_Procedure
523
524
                  Function IsEnabled Returns Boolean
525
                    Boolean bPaused
526
527
                    Get HasProgramPaused To bPaused
528
                    Function_Return bPaused
529
                  End_Function
530
                End_Object
531 2 wil
            End_Object
532
533
            Object oNavigateMenu is a cCJMenuItem
534 22 wil
                Set peControlType to xtpControlPopup
535
                Set psCaption to "&Navigate"
536
                Set psTooltip to "Navigate"
537 2 wil
                Set psDescription to "Move to different areas of the application"
538
539
                Object oNextAreaMenu is a cCJNextAreaMenu
540
                End_Object
541
542
                Object oPriorAreaMenu is a cCJPriorAreaMenu
543
                End_Object
544
545
                Object oNextViewMenu is a cCJNextViewMenu
546
                End_Object
547
548
                Object oPriorViewMenu is a cCJPriorViewMenu
549
                End_Object
550
551
                Object oPromptMenu is a cCJPromptMenuItem
552
                    Set pbControlBeginGroup to True
553
                End_Object
554
555
                Object oZoomMenu is a cCJZoomMenuItem
556
                End_Object
557
558
            End_Object
559
560
            Object oWindowMenu is a cCJMDIWindowsMenuItem
561
                Set peControlType to xtpControlPopup
562
                Set psCaption to "&Window"
563
                Set psToolTip to "Window"
564 22 wil
                Set psDescription to "Display Current Views and set other display options."
565 2 wil
566 22 wil
                // These are the static windows items. More will be created in onInitPopup
567 2 wil
                Object oDisplayOptionsMenu is a cCJMenuItem
568 22 wil
                    Set peControlType to xtpControlPopup
569 2 wil
                    Set psCaption to "&Display Options"
570
                    Set psToolTip to "Display Options"
571
                    Set psDescription to "Set display options"
572
573
                    Object oStatusbarMenu is a cCJStatusbarMenuItem
574
                    End_Object
575
576
                    Object oAutoArrangeIconsMenu is a cCJAutoArrangeIconsMenuItem
577
                    End_Object
578
579
                    Object oRestoreMenusMenu is a cCJRestoreMenusMenuItem
580
                        Set pbControlBeginGroup to True
581
                    End_Object
582
583
                End_Object
584
585
                Object oCascadeMenu is a cCJCascadeMenuItem
586
                    Set pbControlBeginGroup to True
587
                End_Object
588
589
                Object oHorizTile is a cCJTileHorizontally
590
                End_Object
591
592
                Object oVertTile is a cCJTileVertically
593
                End_Object
594
595
                Object oMinimizeMenuItem is a cCJMinimizeWindowsMenuItem
596
                    Set pbControlBeginGroup to True
597
                End_Object
598
599
                Object oRestoreMenuItem is a cCJRestoreWindowsMenuItem
600
                End_Object
601
602
                Object oArrangeIconsMenuItem is a cCJAutoArrangeIconsMenuItem
603
                    Set pbControlBeginGroup to True
604
                End_Object
605
606
            End_Object
607
608
            Object oHelpMenu is a cCJMenuItem
609 22 wil
                Set peControlType to xtpControlPopup
610 2 wil
                Set psCaption to "&Help"
611
                Set psDescription to "Access Information for learning and using this DataFlex application."
612
                Set psToolTip to "Help"
613
614 22 wil
                Object oHelpMenuItem is a cCJHelpMenuItem
615 2 wil
                End_Object
616
617
                Object oAboutMenuItem is a cCJAboutMenuItem
618
                End_Object
619
620
            End_Object
621
622
        End_Object
623
624 7 wil
        Object oDebugToolBar is a cCJToolbar
625
            Set psTitle to "Debugging Toolbar"
626 2 wil
627 7 wil
628
            Object oStartDebugButton is a cCJStartDebugMenuItem
629 2 wil
            End_Object
630
631 7 wil
            Object oStopDebugButton is a cCJStopDebugMenuItem
632 2 wil
            End_Object
633
634 60 wil
            Object oRestartDebugButton is a cCJRestartDebugMenuItem
635
            End_Object
636
637 2 wil
            Object oDebugPauseButton is a cCJDebugPauseMenuItem
638
            End_Object
639
640 7 wil
            Object oDebugContinueButton is a cCJDebugContinueMenuItem
641
            End_Object
642
643 2 wil
            Object oDebugStepOverButton is a cCJStepOverMenuItem
644
            End_Object
645
646 7 wil
            Object oDebugStepIntoButton is a cCJStepIntoMenuItem
647 2 wil
            End_Object
648 7 wil
649
            Object oDebugStepOutButton is a cCJStepOutMenuItem
650
            End_Object
651
652 22 wil
            //
653 2 wil
654
            Object oPromptToolItem is a cCJPromptMenuItem
655
                Set pbControlBeginGroup to True
656
            End_Object
657
658
        End_Object
659 27 wil
660 24 wil
        Object oFileToolbar is a cCJToolbar
661
            Set psTitle To "Open Source Toolbar"
662
            Object oFileOpen is a cCJOpenFileMenuItem
663
            End_Object
664
        End_Object
665 2 wil
666 21 wil
        Object oBreakPointToolBar is a cCJToolbar
667
            Set psTitle to "Breakpoint Toolbar"
668
669
            Object oAddBreakpointButton is a cCJAddBreakpointMenuItem
670
            End_Object
671
672
            Object oRemoveBreakpointButton is a cCJRemoveBreakpointMenuItem
673
            End_Object
674
        End_Object
675
676 2 wil
        Object oEditToolBar is a cCJToolbar
677
            Set psTitle to "Edit Toolbar"
678
679
            Object oCutToolbarItem is a cCJCutMenuItem
680
            End_Object
681
682
            Object oCopyToolbarItem is a cCJCopyMenuItem
683
            End_Object
684
685
            Object oPasteToolbarItem is a cCJPasteMenuItem
686
            End_Object
687
688
            Object oDeleteEditToolbarItem is a cCJDeleteEditMenuItem
689
                Set pbControlBeginGroup to True
690
            End_Object
691
692
        End_Object
693
694
        Object oStatusBar is a cCJStatusBar
695
696
            Object oStatusPane1 is a cCJStatusBarPane
697
                Set piID to sbpIDIdlePane
698
                Set pbStyleStretch to True
699 24 wil
                Set psText To ""
700 2 wil
            End_Object
701
702
            Object oStatusPane2 is a cCJStatusBarPane
703
                Set phoViewPane to Self
704
                Set pbStyleStretch to True
705 24 wil
                Set psText To ""
706 2 wil
            End_Object
707 7 wil
708
            Object oStatusPane3 is a cCJStatusBarPane
709
                Set pbStyleStretch to True
710
                Set psText To "testing 888"
711
            End_Object
712 27 wil
713 38 wil
            Function EditorHandle Returns Handle
714
              Handle  hoEditor
715
              Boolean bIsCreated
716
717
              Get phoEditor To hoEditor
718
              If (hoEditor) Begin
719
                Get IsComObjectCreated Of hoEditor To bIsCreated
720
                If (bIsCreated=false) Begin
721
                  Move 0 To hoEditor
722
                End
723
              End
724
              Function_Return hoEditor
725
            End_Function
726
727 24 wil
            Function EditorCurrentLine Returns Integer
728
              Handle  hoEditor
729
              Integer iCount
730
731 38 wil
              Get EditorHandle To hoEditor
732 24 wil
              If (hoEditor) Begin
733
                Get CurrentLine Of hoEditor To iCount
734
              End
735
              Function_Return iCount
736
            End_Function // EditorCurrentLine
737 4 wil
738
            Function EditorLineCount Returns Integer
739
              Handle  hoEditor
740
              Integer iCount
741
742 38 wil
              Get EditorHandle To hoEditor
743 4 wil
              If (hoEditor) Begin
744
                Get ComLineCount Of hoEditor To iCount
745
              End
746
              Function_Return iCount
747 22 wil
            End_Function // EditorLineCount
748 24 wil
749
            Procedure Show_Status_Help String sStatusHelp
750
              Integer iLine
751 38 wil
              Handle  hoEditor
752
              String  sFileName
753 24 wil
754 38 wil
              Move "" To sFileName
755
              Get EditorHandle To hoEditor
756
              If (hoEditor) Begin
757
                Get psFileName of hoEditor To sFileName
758
              End
759 24 wil
              Get EditorCurrentLine To iLine
760
              Set psText Of oStatusPane1 To ("Line: "+trim(iLine))
761 38 wil
              Set psText Of oStatusPane2 To ("File: "+sFileName)
762 24 wil
            End_Procedure
763 2 wil
764
        End_Object
765
766
    End_Object
767
768
    Object oClientArea is a ClientArea
769
        Use StdAbout.pkg
770 40 wil
        Use ObjectInspector.dg
771 7 wil
        Use Vdfdbg.vw
772 2 wil
773 24 wil
        Procedure doActivateObjectInspectorPanel
774 53 wil
          Send StartObjectInspector
775 24 wil
        End_Procedure
776
777 37 wil
778
779 2 wil
        Procedure Activate_About
780 37 wil
          String sTitle sCopyright sVersion sBitmap sAuthor
781
782
          //    string sVal sVal2 sVal3
783
          //    move (SysConf(sysconf_os_name)) to sVal
784
          //    send Info_box sVal "Os Name"
785
          //    move (SysConf(sysconf_os_short_name)) to sVal2
786
          //    send Info_box sVal2 "os short name"
787
          //    move (SysConf(sysconf_os_major_rev)) to sVal3
788
          //    send Info_Box sVal3 "os major revision"
789
          //    //
790
          Move "VdfSplat" to sTitle
791
          Move "Alfa 1" to sVersion
792
          Move "Copyright 2015, GPL v2, Antwise Solutions" to sCopyright
793
          Move "Author: Wil van Antwerpen"  to sAuthor
794
          Move "Debugger.bmp/t" to sBitMap
795
          Send DoAbout sTitle sVersion sCopyright sAuthor sBitMap
796 2 wil
        End_Procedure
797
798
    End_Object
799
800
End_Object
801
802 35 wil
803
Procedure StartDebugging
804
  String sApplication
805
  Handle hoClient
806
807
  Get Client_Id Of oMain To hoClient
808
  If (hoClient) Begin
809
    Send Activate_oVdfdbg of hoClient
810
    Get psApplication of ghoApplication to sApplication
811
    If (sApplication<>"") Begin
812
      Send doDebugRun of hoClient
813
    End
814
  End
815
End_Procedure
816
817
Send StartDebugging
818 2 wil
Start_UI