Project

General

Profile

Statistics
| Revision:

vdfsplat / AppSrc / VdfSplat.src @ 58

History | View | Annotate | Download (26.4 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 ComPause of hoDebug
229
        //Procedure ComStartProgram String llcmdLine Variant llwebApp Variant llurl
230
        If (iRuntime<181) Begin
231
          Send ComStartProgram of hoDebug sApplication false ""
232
        End
233
        Else Begin                         // noheap or heap? that's' the question.
234
          Send ComStartProgram181 of hoDebug sApplication True false ""
235
        End
236
        Send ComUpdateViews Of hoDebug
237
      End
238
    End_Procedure // doDebugRun
239
    
240
    Procedure doStopDebug
241
      Handle hoDebug
242
      
243
      Get phoDebugger to hoDebug
244
      If (hoDebug) Begin
245
        Send ComStopProgram of hoDebug
246
        Send ComUpdateViews Of hoDebug
247
        Set psApplication of ghoApplication To ""
248
      End
249
    End_Procedure // doStopDebug
250
    
251
    Procedure doDebugPause
252
      Handle hoDebug
253
      
254
      Get phoDebugger to hoDebug
255
      If (hoDebug) Begin
256
        Send ComPause of hoDebug
257
        Send ComUpdateViews Of hoDebug
258
      End
259
    End_Procedure // doDebugPause
260
    
261
    Procedure doDebugContinue
262
      Handle hoDebug
263
      
264
      Get phoDebugger to hoDebug
265
      If (hoDebug) Begin
266
        Send ComContinue of hoDebug
267
        Send ComUpdateViews Of hoDebug
268
      End
269
    End_Procedure // doDebugContinue
270
    
271
    Procedure doDebugStepOver
272
      Handle hoDebug
273
      
274
      Get phoDebugger to hoDebug
275
      If (hoDebug) Begin
276
        Send ComStepOver of hoDebug
277
        Send ComUpdateViews Of hoDebug
278
      End
279
    End_Procedure // doDebugStepOver
280
    
281
    Procedure doDebugStepInto
282
      Handle hoDebug
283
      
284
      Get phoDebugger to hoDebug
285
      If (hoDebug) Begin
286
        Send ComStepInto of hoDebug
287
        Send ComUpdateViews Of hoDebug
288
      End
289
    End_Procedure // doDebugStepInto
290
    
291
    Procedure doDebugStepOut
292
      Handle hoDebug
293
      
294
      Get phoDebugger to hoDebug
295
      If (hoDebug) Begin
296
        Send ComStepOut of hoDebug
297
        Send ComUpdateViews Of hoDebug
298
      End
299
    End_Procedure // doDebugStepOut
300
    
301
    Procedure doSetBreakPoint
302
      Integer iLine
303
      String  sFileName
304
      Boolean bSuccess
305
      Handle  hoDebugger
306
      Handle  hoEditor
307
      
308
      Get phoDebugger to hoDebugger
309
      Get phoEditor   To hoEditor
310
      If (hoDebugger<>0 and hoEditor<>0) begin
311
        
312
        Get psFileName    Of hoEditor To sFileName
313
        Get CurrentLine   Of hoEditor To iLine
314
        If (sFileName<>"" and iLine<>0) Begin
315
          Get SetBreakPoint of hoDebugger sFileName (&iLine) To bSuccess
316
          If (bSuccess=false) Begin
317
            Send info_box ("Set breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess))
318
          End
319
          //Send ComSetMarginImages iLine 1
320
        End
321
      End
322
    End_Procedure
323
    
324
    Procedure doRemoveBreakPoint
325
      Integer iLine
326
      String  sFileName
327
      Boolean bSuccess
328
      Handle  hoDebugger
329
      Handle  hoEditor
330
      
331
      Get phoDebugger to hoDebugger
332
      Get phoEditor   To hoEditor
333
      If (hoDebugger<>0 and hoEditor<>0) begin
334
        
335
        Get psFileName    Of hoEditor To sFileName
336
        Get CurrentLine   Of hoEditor To iLine
337
        If (sFileName<>"" and iLine<>0) Begin
338
          Get RemoveBreakPoint of hoDebugger sFileName (&iLine) To bSuccess
339
          If (bSuccess=false) Begin
340
            Send info_box ("Removing breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess))
341
          End
342
          //Send ComSetMarginImages iLine 1
343
        End
344
      End
345
    End_Procedure
346
  
347
    //
348
    //Procedure doCreateCallStack
349
    //  Boolean bCreated
350
    //  Handle  hoCallStack
351
    //
352
    //
353
    //  Get phoCallStack To hoCallStack
354
    //  If (hoCallStack) Begin
355
    //    Send CreateComObject of hoCallStack
356
    //    Get IsComObjectCreated Of hoCallStack To bCreated
357
    //    Showln "callstack [" bCreated "]"
358
    //    If (bCreated) Begin
359
    //      Send RegisterComEvents Of hoCallStack
360
    //      //Set ComWindowType Of hoGlobals To 1 // global
361
    //    End
362
    //  End
363
    //End_Procedure // doCreateCallStack
364
    
365
    Function HasProgramStarted Returns Boolean
366
      Boolean bStarted
367
      Handle  hoDebugger
368
      
369
      Move False To bStarted
370
      Get phoDebugger To hoDebugger
371
      If (hoDebugger) Begin
372
        Get pbProgramStarted of hoDebugger To bStarted
373
      End
374
      Function_Return bStarted
375
    End_Function // HasProgramStarted
376
    
377
    //
378
    // A program can only be paused after it has started
379
    // This is used as an indication that we can step through the source
380
    //
381
    Function HasProgramPaused Returns Boolean
382
      Boolean bPaused
383
      Boolean bStarted
384
      Handle  hoDebugger
385
      
386
      Move False To bPaused
387
      Get HasProgramStarted To bStarted
388
      If (bStarted) Begin
389
        Get phoDebugger To hoDebugger
390
        If (hoDebugger) Begin
391
          Get pbProgramPaused of hoDebugger to bPaused
392
        End
393
      End
394
      Function_Return bPaused
395
    End_Function // HasProgramPaused
396
    
397
    //
398
    // A breakpoint can only be removed if we have existing breakpoints
399
    //
400
    Function HasBreakpoints Returns Boolean
401
      Boolean bHasBreakPoints
402
      Boolean bStarted
403
      Handle  hoDebugger
404
      
405
      Move False To bHasBreakPoints
406
      Get HasProgramStarted To bStarted
407
      If (bStarted) Begin
408
        Get phoDebugger To hoDebugger
409
        If (hoDebugger) Begin
410
          Get HasBreakPoints of hoDebugger to bHasBreakPoints
411
        End
412
      End
413
      Function_Return bHasBreakPoints
414
    End_Function // HasBreakPoints
415
    
416
    
417

    
418
    Object oCommandBarSystem is a cDebugCJCommandBarSystem
419

    
420
        Procedure OnCreateCommandBars
421
            Handle hoOptions
422
            Get OptionsObject to hoOptions
423
            Forward Send OnCreateCommandBars
424
        End_Procedure
425
        
426

    
427
        Object oMenuBar is a cCJMenuBar
428

    
429
            Object oFileMenu is a cCJMenuItem
430
                Set peControlType to xtpControlPopup
431
                Set psCaption   to "&File"
432
                Set psDescription to "Find, Save, Delete, Clear information or quit this application."
433
                Set psCategory to "Menus"
434

    
435
                Object oClearMenuItem is a cCJClearMenuItem
436
                    Set pbAddToDesignerMenu to True
437
                End_Object
438

    
439
                Object oClearAllMenu is a cCJClearAllMenuItem
440
                    Set pbAddToDesignerMenu to True
441
                End_Object
442

    
443
                Object oPromptMenuItem is a cCJPromptMenuItem
444
                    Set pbAddToDesignerMenu to True
445
                    Set pbControlBeginGroup to True
446
                End_Object
447

    
448
                Object oCJDebugPauseMenuItem is a cCJDebugPauseMenuItem
449
                    Set pbAddToDesignerMenu to True
450
                    Set pbControlBeginGroup to True
451
                End_Object
452

    
453
                Object oFindNextMenu is a cCJFindNextMenuItem
454
                    Set pbAddToDesignerMenu to True
455
                End_Object
456

    
457
                Object oFindPreviousMenu is a cCJFindPreviousMenuItem
458
                    Set pbAddToDesignerMenu to True
459
                End_Object
460

    
461
                Object oFindFirstMenu is a cCJFindFirstMenuItem
462
                    Set pbAddToDesignerMenu to True
463
                End_Object
464

    
465
                Object oFindLastMenu is a cCJFindLastMenuItem
466
                    Set pbAddToDesignerMenu to True
467
                End_Object
468

    
469
                Object oSaveMenuItem is a cCJSaveMenuItem
470
                    Set pbAddToDesignerMenu to True
471
                    Set pbControlBeginGroup to True
472
                End_Object
473

    
474
                Object oDeleteMenuItem is a cCJDeleteMenuItem
475
                    Set pbAddToDesignerMenu to True
476
                End_Object
477

    
478
                Object oExitMenu is a cCJExitMenuItem
479
                    Set pbControlBeginGroup to True
480
                End_Object
481

    
482
            End_Object
483

    
484
            Object oViewMenu is a cCJMenuItem
485
                Set peControlType to xtpControlPopup
486
                Set psCaption to "&View"
487
                Set psToolTip to "View"
488
                Set psDescription to "Available Views"
489

    
490
                Object ooVdfdbgMenuItem is a cCJMenuItem
491
                  Set psCaption to "Debugger View"
492
                  Set psTooltip to "The debugger main view"
493
                
494
                  Procedure OnExecute Variant vCommandBarControl
495
                    Handle hoClient
496
                    Get Client_Id to hoClient
497
                    Send Activate_oVdfdbg of hoClient
498
                  End_Procedure
499
                End_Object
500

    
501
                Object oObjectInspectorMenuItem is a cCJMenuItem
502
                  Set psCaption to "Object Inspector     Ctrl+L"
503
                  Set psTooltip to "Inspect the objects in the running program"
504
                
505
                  Procedure OnExecute Variant vCommandBarControl
506
                    Handle hoClient
507
                    Get Client_Id to hoClient
508
                    Send doActivateObjectInspectorPanel of hoClient
509
                  End_Procedure
510
                  
511
                  Function IsEnabled Returns Boolean
512
                    Boolean bPaused
513
                    
514
                    Get HasProgramPaused To bPaused
515
                    Function_Return bPaused
516
                  End_Function
517
                End_Object
518
            End_Object
519

    
520
            Object oNavigateMenu is a cCJMenuItem
521
                Set peControlType to xtpControlPopup
522
                Set psCaption to "&Navigate"
523
                Set psTooltip to "Navigate"
524
                Set psDescription to "Move to different areas of the application"
525

    
526
                Object oNextAreaMenu is a cCJNextAreaMenu
527
                End_Object
528

    
529
                Object oPriorAreaMenu is a cCJPriorAreaMenu
530
                End_Object
531

    
532
                Object oNextViewMenu is a cCJNextViewMenu
533
                End_Object
534

    
535
                Object oPriorViewMenu is a cCJPriorViewMenu
536
                End_Object
537

    
538
                Object oPromptMenu is a cCJPromptMenuItem
539
                    Set pbControlBeginGroup to True
540
                End_Object
541

    
542
                Object oZoomMenu is a cCJZoomMenuItem
543
                End_Object
544

    
545
            End_Object
546

    
547
            Object oWindowMenu is a cCJMDIWindowsMenuItem
548
                Set peControlType to xtpControlPopup
549
                Set psCaption to "&Window"
550
                Set psToolTip to "Window"
551
                Set psDescription to "Display Current Views and set other display options."
552

    
553
                // These are the static windows items. More will be created in onInitPopup
554
                Object oDisplayOptionsMenu is a cCJMenuItem
555
                    Set peControlType to xtpControlPopup
556
                    Set psCaption to "&Display Options"
557
                    Set psToolTip to "Display Options"
558
                    Set psDescription to "Set display options"
559

    
560
                    Object oStatusbarMenu is a cCJStatusbarMenuItem
561
                    End_Object
562

    
563
                    Object oAutoArrangeIconsMenu is a cCJAutoArrangeIconsMenuItem
564
                    End_Object
565

    
566
                    Object oRestoreMenusMenu is a cCJRestoreMenusMenuItem
567
                        Set pbControlBeginGroup to True
568
                    End_Object
569

    
570
                End_Object
571

    
572
                Object oCascadeMenu is a cCJCascadeMenuItem
573
                    Set pbControlBeginGroup to True
574
                End_Object
575

    
576
                Object oHorizTile is a cCJTileHorizontally
577
                End_Object
578

    
579
                Object oVertTile is a cCJTileVertically
580
                End_Object
581

    
582
                Object oMinimizeMenuItem is a cCJMinimizeWindowsMenuItem
583
                    Set pbControlBeginGroup to True
584
                End_Object
585

    
586
                Object oRestoreMenuItem is a cCJRestoreWindowsMenuItem
587
                End_Object
588

    
589
                Object oArrangeIconsMenuItem is a cCJAutoArrangeIconsMenuItem
590
                    Set pbControlBeginGroup to True
591
                End_Object
592

    
593
            End_Object
594

    
595
            Object oHelpMenu is a cCJMenuItem
596
                Set peControlType to xtpControlPopup
597
                Set psCaption to "&Help"
598
                Set psDescription to "Access Information for learning and using this DataFlex application."
599
                Set psToolTip to "Help"
600

    
601
                Object oHelpMenuItem is a cCJHelpMenuItem
602
                End_Object
603

    
604
                Object oAboutMenuItem is a cCJAboutMenuItem
605
                End_Object
606

    
607
            End_Object
608

    
609
        End_Object
610

    
611
        Object oDebugToolBar is a cCJToolbar
612
            Set psTitle to "Debugging Toolbar"
613

    
614

    
615
            Object oStartDebugButton is a cCJStartDebugMenuItem
616
            End_Object
617

    
618
            Object oStopDebugButton is a cCJStopDebugMenuItem
619
            End_Object
620

    
621
            Object oDebugPauseButton is a cCJDebugPauseMenuItem
622
            End_Object
623

    
624
            Object oDebugContinueButton is a cCJDebugContinueMenuItem
625
            End_Object
626

    
627
            Object oDebugStepOverButton is a cCJStepOverMenuItem
628
            End_Object
629

    
630
            Object oDebugStepIntoButton is a cCJStepIntoMenuItem
631
            End_Object
632
            
633
            Object oDebugStepOutButton is a cCJStepOutMenuItem
634
            End_Object
635
            
636
            //
637

    
638
            Object oPromptToolItem is a cCJPromptMenuItem
639
                Set pbControlBeginGroup to True
640
            End_Object
641

    
642
        End_Object
643
        
644
        Object oFileToolbar is a cCJToolbar
645
            Set psTitle To "Open Source Toolbar"
646
            Object oFileOpen is a cCJOpenFileMenuItem
647
            End_Object
648
        End_Object
649

    
650
        Object oBreakPointToolBar is a cCJToolbar
651
            Set psTitle to "Breakpoint Toolbar"
652

    
653
            Object oAddBreakpointButton is a cCJAddBreakpointMenuItem
654
            End_Object
655
            
656
            Object oRemoveBreakpointButton is a cCJRemoveBreakpointMenuItem
657
            End_Object
658
        End_Object
659

    
660
        Object oFileToolBar is a cCJToolbar
661
            Set psTitle to "Data Entry Toolbar"
662

    
663
            Object oClearToolItem is a cCJClearMenuItem
664
                Set peControlStyle to xtpButtonIconAndCaption
665
            End_Object
666

    
667
            Object oClearAllToolItem2 is a cCJClearAllMenuItem
668
                Set peControlStyle to xtpButtonIconAndCaption
669
            End_Object
670

    
671
            Object oSaveToolItem is a cCJSaveMenuItem
672
                Set peControlStyle to xtpButtonIconAndCaption
673
                Set pbControlBeginGroup to True
674
            End_Object
675

    
676
            Object oDeleteToolItem is a cCJDeleteMenuItem
677
                Set peControlStyle to xtpButtonIconAndCaption
678
            End_Object
679

    
680
        End_Object
681

    
682
        Object oEditToolBar is a cCJToolbar
683
            Set psTitle to "Edit Toolbar"
684

    
685
            Object oCutToolbarItem is a cCJCutMenuItem
686
            End_Object
687

    
688
            Object oCopyToolbarItem is a cCJCopyMenuItem
689
            End_Object
690

    
691
            Object oPasteToolbarItem is a cCJPasteMenuItem
692
            End_Object
693

    
694
            Object oDeleteEditToolbarItem is a cCJDeleteEditMenuItem
695
                Set pbControlBeginGroup to True
696
            End_Object
697

    
698
        End_Object
699

    
700
        Object oStatusBar is a cCJStatusBar
701

    
702
            Object oStatusPane1 is a cCJStatusBarPane
703
                Set piID to sbpIDIdlePane
704
                Set pbStyleStretch to True
705
                Set psText To ""
706
            End_Object
707

    
708
            Object oStatusPane2 is a cCJStatusBarPane
709
                Set phoViewPane to Self
710
                Set pbStyleStretch to True
711
                Set psText To ""
712
            End_Object
713

    
714
            Object oStatusPane3 is a cCJStatusBarPane
715
                Set pbStyleStretch to True
716
                Set psText To "testing 888"
717
            End_Object
718
            
719
            Function EditorHandle Returns Handle
720
              Handle  hoEditor
721
              Boolean bIsCreated
722
              
723
              Get phoEditor To hoEditor
724
              If (hoEditor) Begin
725
                Get IsComObjectCreated Of hoEditor To bIsCreated
726
                If (bIsCreated=false) Begin
727
                  Move 0 To hoEditor
728
                End
729
              End
730
              Function_Return hoEditor
731
            End_Function
732
            
733
            Function EditorCurrentLine Returns Integer
734
              Handle  hoEditor
735
              Integer iCount
736
              
737
              Get EditorHandle To hoEditor
738
              If (hoEditor) Begin
739
                Get CurrentLine Of hoEditor To iCount
740
              End
741
              Function_Return iCount
742
            End_Function // EditorCurrentLine
743
            
744
            Function EditorLineCount Returns Integer
745
              Handle  hoEditor
746
              Integer iCount
747
              
748
              Get EditorHandle To hoEditor
749
              If (hoEditor) Begin
750
                Get ComLineCount Of hoEditor To iCount
751
              End
752
              Function_Return iCount
753
            End_Function // EditorLineCount
754
            
755
            Procedure Show_Status_Help String sStatusHelp
756
              Integer iLine
757
              Handle  hoEditor
758
              String  sFileName
759
              
760
              Move "" To sFileName
761
              Get EditorHandle To hoEditor
762
              If (hoEditor) Begin
763
                Get psFileName of hoEditor To sFileName
764
              End
765
              Get EditorCurrentLine To iLine
766
              Set psText Of oStatusPane1 To ("Line: "+trim(iLine))
767
              Set psText Of oStatusPane2 To ("File: "+sFileName)
768
            End_Procedure
769

    
770
        End_Object
771

    
772
    End_Object
773

    
774
    Object oClientArea is a ClientArea
775
        Use StdAbout.pkg
776
        Use ObjectInspector.dg
777
        Use Vdfdbg.vw
778

    
779
        Procedure doActivateObjectInspectorPanel
780
          Send StartObjectInspector
781
        End_Procedure
782

    
783

    
784

    
785
        Procedure Activate_About
786
          String sTitle sCopyright sVersion sBitmap sAuthor
787

    
788
          //    string sVal sVal2 sVal3
789
          //    move (SysConf(sysconf_os_name)) to sVal
790
          //    send Info_box sVal "Os Name"
791
          //    move (SysConf(sysconf_os_short_name)) to sVal2
792
          //    send Info_box sVal2 "os short name"
793
          //    move (SysConf(sysconf_os_major_rev)) to sVal3
794
          //    send Info_Box sVal3 "os major revision"
795
          //    //
796
          Move "VdfSplat" to sTitle
797
          Move "Alfa 1" to sVersion
798
          Move "Copyright 2015, GPL v2, Antwise Solutions" to sCopyright
799
          Move "Author: Wil van Antwerpen"  to sAuthor
800
          Move "Debugger.bmp/t" to sBitMap
801
          Send DoAbout sTitle sVersion sCopyright sAuthor sBitMap
802
        End_Procedure
803

    
804
    End_Object
805

    
806
End_Object
807

    
808

    
809
Procedure StartDebugging
810
  String sApplication
811
  Handle hoClient
812
  
813
  Get Client_Id Of oMain To hoClient
814
  If (hoClient) Begin
815
    Send Activate_oVdfdbg of hoClient
816
    Get psApplication of ghoApplication to sApplication
817
    If (sApplication<>"") Begin
818
      Send doDebugRun of hoClient
819
    End
820
  End
821
End_Procedure
822

    
823
Send StartDebugging
824
Start_UI