Project

General

Profile

Statistics
| Revision:

vdfsplat / AppSrc / VdfSplat.src @ 60

History | View | Annotate | Download (26.1 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 doDebugRun
167
      String  sApplication
168
      String  sExt
169
      String  sDebugfile
170
      Integer iRuntime
171
      Boolean bOpen
172
      Boolean bExists
173
      Handle  hoDebug
174
      Handle  hoParent
175
      Handle  hoDialog
176
      
177
      Set piDebugfileVersion To 0
178

    
179
      Get psApplication of ghoApplication To sApplication
180
      If (sApplication = "") Begin
181
        Move (oOpenProgramDialog(Self)) To hoDialog
182
       
183
          Get Show_Dialog of hoDialog to bOpen
184
          If bOpen Begin
185
            Get File_Name of hoDialog To sApplication
186
            // Don't tell me when I selected a file, just do it.
187
            //Send Info_Box ("Selected file " + sApplication)
188
          End
189
          Else Send Info_Box "You did not choose a file, nothing to debug."
190
        
191
      End
192
      If (sApplication="") Begin
193
        // Oh still no app? Use our hardcoded path
194
        Procedure_Return
195
      End
196
      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
        Get ReadRuntimeVersion sDebugfile To iRuntime
206
        If (iRuntime=0) Begin
207
          Move False To bExists
208
        End
209
      End
210
        
211
      Get phoDebugger to hoDebug
212
      If (bExists and hoDebug=0) Begin
213
        //
214

    
215
        Get phoDebuggerHost To hoParent
216
        Set piDebugfileVersion To iRuntime
217
        Get Create Of hoParent U_cDebuggerEngine To hoDebug
218
        If (hoDebug) Begin
219
          Send DoCreateEngine of hoDebug
220
        End
221
      End
222
      If (bExists and hoDebug<>0) Begin
223
        
224
        Set psApplication of ghoApplication To sApplication
225
        Set ApplicationFileName of hoDebug To sApplication
226
        // ??
227
        Send DoSetCaptionLabel Of (oVdfDbg(oClientArea(Self))) sApplication
228
        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
        //Send ComPause of hoDebug
242
        //Procedure ComStartProgram String llcmdLine Variant llwebApp Variant llurl
243
        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
        Send ComUpdateViews Of hoDebug
250
      End
251
    End_Procedure
252
    
253
    Procedure doStopDebug
254
      Handle hoDebug
255
      
256
      Get phoDebugger to hoDebug
257
      If (hoDebug) Begin
258
        Send ComStopProgram of hoDebug
259
        Send ComUpdateViews Of hoDebug
260
        Set psApplication of ghoApplication To ""
261
      End
262
    End_Procedure // doStopDebug
263
    
264
    Procedure doDebugPause
265
      Handle hoDebug
266
      
267
      Get phoDebugger to hoDebug
268
      If (hoDebug) Begin
269
        Send ComPause of hoDebug
270
        Send ComUpdateViews Of hoDebug
271
      End
272
    End_Procedure // doDebugPause
273
    
274
    Procedure doDebugContinue
275
      Handle hoDebug
276
      
277
      Get phoDebugger to hoDebug
278
      If (hoDebug) Begin
279
        Send ComContinue of hoDebug
280
        Send ComUpdateViews Of hoDebug
281
      End
282
    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
        Send ComUpdateViews Of hoDebug
291
      End
292
    End_Procedure // doDebugStepOver
293
    
294
    Procedure doDebugStepInto
295
      Handle hoDebug
296
      
297
      Get phoDebugger to hoDebug
298
      If (hoDebug) Begin
299
        Send ComStepInto of hoDebug
300
        Send ComUpdateViews Of hoDebug
301
      End
302
    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
        Send ComUpdateViews Of hoDebug
311
      End
312
    End_Procedure // doDebugStepOut
313
    
314
    Procedure doSetBreakPoint
315
      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
        Get CurrentLine   Of hoEditor To iLine
327
        If (sFileName<>"" and iLine<>0) Begin
328
          Get SetBreakPoint of hoDebugger sFileName (&iLine) To bSuccess
329
          If (bSuccess=false) Begin
330
            Send info_box ("Set breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess))
331
          End
332
          //Send ComSetMarginImages iLine 1
333
        End
334
      End
335
    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
          If (bSuccess=false) Begin
353
            Send info_box ("Removing breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess))
354
          End
355
          //Send ComSetMarginImages iLine 1
356
        End
357
      End
358
    End_Procedure
359
  
360
    //
361
    //Procedure doCreateCallStack
362
    //  Boolean bCreated
363
    //  Handle  hoCallStack
364
    //
365
    //
366
    //  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
    //      Send RegisterComEvents Of hoCallStack
373
    //      //Set ComWindowType Of hoGlobals To 1 // global
374
    //    End
375
    //  End
376
    //End_Procedure // doCreateCallStack
377
    
378
    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
      End
387
      Function_Return bStarted
388
    End_Function // HasProgramStarted
389
    
390
    //
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
      Boolean bPaused
396
      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
        End
406
      End
407
      Function_Return bPaused
408
    End_Function // HasProgramPaused
409
    
410
    //
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
    
429
    
430

    
431
    Object oCommandBarSystem is a cDebugCJCommandBarSystem
432

    
433
        Procedure OnCreateCommandBars
434
            Handle hoOptions
435
            Get OptionsObject to hoOptions
436
            Forward Send OnCreateCommandBars
437
        End_Procedure
438
        
439

    
440
        Object oMenuBar is a cCJMenuBar
441

    
442
            Object oFileMenu is a cCJMenuItem
443
                Set peControlType to xtpControlPopup
444
                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
                  Set psCaption to "Debugger View"
505
                  Set psTooltip to "The debugger main view"
506
                
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

    
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
            End_Object
532

    
533
            Object oNavigateMenu is a cCJMenuItem
534
                Set peControlType to xtpControlPopup
535
                Set psCaption to "&Navigate"
536
                Set psTooltip to "Navigate"
537
                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
                Set psDescription to "Display Current Views and set other display options."
565

    
566
                // These are the static windows items. More will be created in onInitPopup
567
                Object oDisplayOptionsMenu is a cCJMenuItem
568
                    Set peControlType to xtpControlPopup
569
                    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
                Set peControlType to xtpControlPopup
610
                Set psCaption to "&Help"
611
                Set psDescription to "Access Information for learning and using this DataFlex application."
612
                Set psToolTip to "Help"
613

    
614
                Object oHelpMenuItem is a cCJHelpMenuItem
615
                End_Object
616

    
617
                Object oAboutMenuItem is a cCJAboutMenuItem
618
                End_Object
619

    
620
            End_Object
621

    
622
        End_Object
623

    
624
        Object oDebugToolBar is a cCJToolbar
625
            Set psTitle to "Debugging Toolbar"
626

    
627

    
628
            Object oStartDebugButton is a cCJStartDebugMenuItem
629
            End_Object
630

    
631
            Object oStopDebugButton is a cCJStopDebugMenuItem
632
            End_Object
633

    
634
            Object oRestartDebugButton is a cCJRestartDebugMenuItem
635
            End_Object
636

    
637
            Object oDebugPauseButton is a cCJDebugPauseMenuItem
638
            End_Object
639

    
640
            Object oDebugContinueButton is a cCJDebugContinueMenuItem
641
            End_Object
642

    
643
            Object oDebugStepOverButton is a cCJStepOverMenuItem
644
            End_Object
645

    
646
            Object oDebugStepIntoButton is a cCJStepIntoMenuItem
647
            End_Object
648
            
649
            Object oDebugStepOutButton is a cCJStepOutMenuItem
650
            End_Object
651
            
652
            //
653

    
654
            Object oPromptToolItem is a cCJPromptMenuItem
655
                Set pbControlBeginGroup to True
656
            End_Object
657

    
658
        End_Object
659
        
660
        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

    
666
        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
        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
                Set psText To ""
700
            End_Object
701

    
702
            Object oStatusPane2 is a cCJStatusBarPane
703
                Set phoViewPane to Self
704
                Set pbStyleStretch to True
705
                Set psText To ""
706
            End_Object
707

    
708
            Object oStatusPane3 is a cCJStatusBarPane
709
                Set pbStyleStretch to True
710
                Set psText To "testing 888"
711
            End_Object
712
            
713
            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
            Function EditorCurrentLine Returns Integer
728
              Handle  hoEditor
729
              Integer iCount
730
              
731
              Get EditorHandle To hoEditor
732
              If (hoEditor) Begin
733
                Get CurrentLine Of hoEditor To iCount
734
              End
735
              Function_Return iCount
736
            End_Function // EditorCurrentLine
737
            
738
            Function EditorLineCount Returns Integer
739
              Handle  hoEditor
740
              Integer iCount
741
              
742
              Get EditorHandle To hoEditor
743
              If (hoEditor) Begin
744
                Get ComLineCount Of hoEditor To iCount
745
              End
746
              Function_Return iCount
747
            End_Function // EditorLineCount
748
            
749
            Procedure Show_Status_Help String sStatusHelp
750
              Integer iLine
751
              Handle  hoEditor
752
              String  sFileName
753
              
754
              Move "" To sFileName
755
              Get EditorHandle To hoEditor
756
              If (hoEditor) Begin
757
                Get psFileName of hoEditor To sFileName
758
              End
759
              Get EditorCurrentLine To iLine
760
              Set psText Of oStatusPane1 To ("Line: "+trim(iLine))
761
              Set psText Of oStatusPane2 To ("File: "+sFileName)
762
            End_Procedure
763

    
764
        End_Object
765

    
766
    End_Object
767

    
768
    Object oClientArea is a ClientArea
769
        Use StdAbout.pkg
770
        Use ObjectInspector.dg
771
        Use Vdfdbg.vw
772

    
773
        Procedure doActivateObjectInspectorPanel
774
          Send StartObjectInspector
775
        End_Procedure
776

    
777

    
778

    
779
        Procedure Activate_About
780
          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
        End_Procedure
797

    
798
    End_Object
799

    
800
End_Object
801

    
802

    
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
Start_UI