Project

General

Profile

Statistics
| Revision:

vdfsplat / AppSrc / cDebugCJMenuItemClasses.pkg @ 67

History | View | Annotate | Download (18.5 KB)

1
//TH-Header
2
//*****************************************************************************************
3
// Copyright (c)  2013 Antwise Solutions
4
// All rights reserved.
5
//
6
// $FileName    : cDebugCJMenuItemClasses.pkg
7
// $ProjectName : Vdf Splat Debugger
8
// $Authors     : Wil van Antwerpen
9
// $Created     : 12.15.2013  02:28
10
// $Type        : GPLv2
11
//
12
// Contents:
13
//
14
//*****************************************************************************************
15
//TH-RevisionStart
16
//TH-RevisionEnd
17

    
18
Use cCJCommandBarSystem.pkg
19
Use LanguageText.pkg
20

    
21
// Sub-class for all Date entry menu items
22

    
23
{ OverrideProperty=psCategory InitialValue=C_$CategoryDEO}
24
{ OverrideProperty=pbActiveUpdate InitialValue=True }
25
{ ClassType=Abstract }
26
Class cCJDebugMenuItem is a cCJMenuItem
27
    
28
    Procedure Construct_Object
29
        Forward Send Construct_Object
30
        Set psCategory to C_$CategoryDEO
31
        Set pbActiveUpdate to True
32
    End_Procedure
33

    
34
    // This just redirects to cCJCommandBarsSystem object
35
    // returns information about the Focus object. If it returns True its a DEO. If a DEO the
36
    // server, hasRecord, changed and hasindex info will all be returned by ref.
37
    // If false, these are all unchanged.
38
    Function DEOInformation Handle ByRef hoServer Boolean ByRef bHasRecord Boolean ByRef bChanged Boolean ByRef bHasIndex Returns Boolean
39
        Handle hoCommandBars
40
        Boolean bISDeo
41
        Get CommandBarSystemObject to hoCommandBars // must exist or a programming bug
42
        //Get DEOInformation of hoCommandBars (&hoServer) (&bHasRecord) (&bChanged) (&bHasIndex) to bIsDEO
43
        MOve true to bISDeo
44
        Function_Return bISDeo
45
    End_Function
46

    
47
End_Class
48

    
49
// use by all navigate DEOs.
50

    
51
{ OverrideProperty=psCategory InitialValue=C_$CategoryNavigate}
52
{ ClassType=Abstract }
53
Class cCJDebugNavigateMenuItem is a cCJDebugMenuItem
54
    Procedure Construct_Object
55
        Forward Send Construct_Object
56
        Set psCategory to C_$CategoryNavigate
57
    End_Procedure
58
    
59
    Function IsEnabled Returns Boolean
60
        Boolean bIsDEO bHasRecord bChanged bEnabled bHasIndex
61
        Handle hoServer
62
        //
63
        //Get DEOInformation (&hoServer) (&bHasRecord) (&bChanged) (&bHasIndex) to bIsDeo
64
        move true to bisdeo
65
        Function_Return (bIsDEO)
66
    End_Function
67
         
68
End_Class
69

    
70
//{ OverrideProperty=psCaption InitialValue=C_$CaptionClear }
71
//{ OverrideProperty=psToolTip InitialValue=C_$ToolTipClear }
72
//{ OverrideProperty=psDescription InitialValue=C_$DescClear }
73
//{ OverrideProperty=psImage InitialValue="ActionClear.ico" }
74
//{ OverrideProperty=psShortcut InitialValue="F5" }
75
//
76
//Class cCJClearMenuItem is a cCJDeoMenuItem
77
//
78
//    Procedure Construct_Object
79
//        Forward Send Construct_Object
80
//        Set psCaption   to C_$CaptionClear
81
//        Set psToolTip to C_$ToolTipClear
82
//        Set psDescription to C_$DescClear
83
//        Set psImage to "ActionClear.ico"
84
//        Set psShortcut to "F5"
85
//    End_Procedure
86
//
87
//
88
//    Procedure OnExecute Variant vCommandBarControl
89
//        Send Request_Clear of (focus(Self))
90
//    End_Procedure
91
//
92
//    Function IsEnabled Returns Boolean
93
//        Boolean bIsDEO bHasRecord bChanged bEnabled bHasIndex
94
//        Handle hoServer
95
//        Get DEOInformation (&hoServer) (&bHasRecord) (&bChanged) (&bHasIndex) to bIsDeo
96
//        Function_Return (bIsDEO and hoServer and (bChanged or bHasRecord))
97
//    End_Function
98
//
99
//End_Class
100

    
101
//{ OverrideProperty=psCaption InitialValue=C_$CaptionSave}
102
//{ OverrideProperty=psToolTip InitialValue=C_$ToolTipSave}
103
//{ OverrideProperty=psDescription InitialValue=C_$DescSave }
104
//{ OverrideProperty=psImage InitialValue="ActionSaveRecord.ico" }
105
//{ OverrideProperty=psShortcut InitialValue="F2" }
106
//
107
//Class cCJSaveMenuItem is a cCJDeoMenuItem
108
//
109
//    Procedure Construct_Object
110
//        Forward Send Construct_Object
111
//        Set psCaption   to C_$CaptionSave
112
//        Set psToolTip to C_$ToolTipSave
113
//        Set psDescription to C_$DescSave
114
//        Set psImage to "ActionSaveRecord.ico"
115
//        Set psShortcut to "F2"
116
//    End_Procedure
117
//
118
//
119
//    Procedure OnExecute Variant vCommandBarControl
120
//        Send Request_save of (focus(Self))
121
//    End_Procedure
122
//
123
//    Function IsEnabled Returns Boolean
124
//        Boolean bIsDEO bHasRecord bChanged bEnabled bHasIndex
125
//        Handle hoServer
126
//        Get DEOInformation (&hoServer) (&bHasRecord) (&bChanged) (&bHasIndex) to bIsDeo
127
//        Function_Return (bIsDEO and hoServer and bChanged)
128
//    End_Function
129
//
130
//End_Class
131

    
132
Define CS_CaptionStartDebug For "Start debug"
133
Define CS_TooltipStartDebug For "Start debug"
134
Define CS_DescStartDebug    For "Start debug"
135
  
136
{ OverrideProperty=psCaption InitialValue=CS_CaptionStartDebug}
137
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipStartDebug}
138
{ OverrideProperty=psDescription InitialValue=CS_DescStartDebug}
139
{ OverrideProperty=psImage InitialValue="run_exc.ico" }
140

    
141
Class cCJStartDebugMenuItem is a cCJDebugMenuItem
142
    
143
    Procedure Construct_Object
144
        Forward Send Construct_Object
145
        Set psCaption       To CS_CaptionStartDebug
146
        Set psToolTip       To CS_ToolTipStartDebug
147
        Set psDescription   To CS_DescStartDebug
148
        Set psImage         To "run_exc.ico"
149
        //Set psImageDisabled To "run_excd.ico"
150
        Set piShortcutKey   To xtpKey_None VK_F5
151
        
152
    End_Procedure
153

    
154
    Procedure OnExecute Variant vCommandBarControl
155
       Send doDebugRun
156
    End_Procedure
157
    
158
    Function IsEnabled Returns Boolean
159
      Boolean bStarted
160
      Get HasProgramStarted To bStarted
161
      Function_Return (bStarted=false)
162
    End_Function
163
         
164
End_Class // cCJStartDebugMenuItem
165

    
166
Define CS_CaptionStopDebug For "Stop debug"
167
Define CS_TooltipStopDebug For "Stop debug"
168
Define CS_DescStopDebug    For "Stop debug"
169
  
170
{ OverrideProperty=psCaption InitialValue=CS_CaptionStopDebug}
171
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipStopDebug}
172
{ OverrideProperty=psDescription InitialValue=CS_DescStopDebug}
173
{ OverrideProperty=psImage InitialValue="terminate_co.ico" }
174

    
175
Class cCJStopDebugMenuItem is a cCJDebugMenuItem
176
    
177
    Procedure Construct_Object
178
        Forward Send Construct_Object
179
        Set psCaption       To CS_CaptionStopDebug
180
        Set psToolTip       To CS_ToolTipStopDebug
181
        Set psDescription   To CS_DescStopDebug
182
        Set psImage         To "terminate_co.ico"
183
        //Set psImageDisabled To "terminate_cod.ico"
184
        Set piShortcutKey   To xtpKey_Shift VK_F5
185
        
186
    End_Procedure
187

    
188
    Procedure OnExecute Variant vCommandBarControl
189
       Send doStopDebug
190
    End_Procedure
191
    
192
    Function IsEnabled Returns Boolean
193
      Boolean bStarted
194
      
195
      Get HasProgramStarted To bStarted
196
      Function_Return bStarted
197
    End_Function
198
         
199
End_Class // cCJStopDebugMenuItem
200

    
201
Define CS_CaptionRestartDebug For "Restart debug"
202
Define CS_TooltipRestartDebug For "Restart debug"
203
Define CS_DescRestartDebug    For "Restart debug"
204
  
205
{ OverrideProperty=psCaption InitialValue=CS_CaptionRestartDebug}
206
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipRestartDebug}
207
{ OverrideProperty=psDescription InitialValue=CS_DescRestartDebug}
208
{ OverrideProperty=psImage InitialValue="restart_co.ico" }
209

    
210
Class cCJRestartDebugMenuItem is a cCJDebugMenuItem
211
    
212
    Procedure Construct_Object
213
        Forward Send Construct_Object
214
        Set psCaption       To CS_CaptionRestartDebug
215
        Set psToolTip       To CS_ToolTipRestartDebug
216
        Set psDescription   To CS_DescRestartDebug
217
        Set psImage         To "restart_co.ico"
218
        //Set psImageDisabled To "run_excd.ico"
219
        Set piShortcutKey   To xtpKey_Ctrl VK_F5
220
    End_Procedure
221

    
222
    Procedure OnExecute Variant vCommandBarControl
223
       Send doRestartDebug
224
    End_Procedure
225
    
226
    Function IsEnabled Returns Boolean
227
      Boolean bStarted
228
      Get HasProgramStarted To bStarted
229
      Function_Return bStarted
230
    End_Function
231
         
232
End_Class // cCJRestartDebugMenuItem
233

    
234

    
235
Define CS_CaptionDebugPause For "Debug Pause"
236
Define CS_TooltipDebugPause For "Debug Pause"
237
Define CS_DescDebugPause    For "Debug Pause"
238
  
239
{ OverrideProperty=psCaption InitialValue=CS_CaptionDebugPause}
240
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipDebugPause}
241
{ OverrideProperty=psDescription InitialValue=CS_DescDebugPause}
242
{ OverrideProperty=psImage InitialValue="suspend_co.ico" }
243

    
244
Class cCJDebugPauseMenuItem is a cCJDebugMenuItem
245
    
246
    Procedure Construct_Object
247
        Forward Send Construct_Object
248
        Set psCaption       To CS_CaptionDebugPause
249
        Set psToolTip       To CS_ToolTipDebugPause
250
        Set psDescription   To CS_DescDebugPause
251
        Set psImage         To "suspend_co.ico"
252
        //Set psImageDisabled To "suspend_cod.ico"
253
        Set piShortcutKey   To xtpKey_None VK_F3
254
    End_Procedure
255

    
256
    Procedure OnExecute Variant vCommandBarControl
257
       Send doDebugPause
258
    End_Procedure
259
    
260
    
261
    Function IsEnabled Returns Boolean
262
      Boolean bStarted
263
      Boolean bPaused
264
      
265
      Get HasProgramStarted To bStarted
266
      Get HasProgramPaused  To bPaused
267
      Function_Return (bStarted and bPaused=false)
268
    End_Function
269
         
270
End_Class
271

    
272
Define CS_CaptionDebugContinue For "Debug Continue"
273
Define CS_TooltipDebugContinue For "Debug Continue"
274
Define CS_DescDebugContinue    For "Debug Continue"
275
  
276
{ OverrideProperty=psCaption InitialValue=CS_CaptionDebugContinue}
277
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipDebugContinue}
278
{ OverrideProperty=psDescription InitialValue=CS_DescDebugContinue}
279
{ OverrideProperty=psImage InitialValue="resume_co.ico" }
280

    
281
Class cCJDebugContinueMenuItem is a cCJDebugMenuItem
282
    
283
    Procedure Construct_Object
284
        Forward Send Construct_Object
285
        Set psCaption       To CS_CaptionDebugContinue
286
        Set psToolTip       To CS_ToolTipDebugContinue
287
        Set psDescription   To CS_DescDebugContinue
288
        Set psImage         To "resume_co.ico"
289
        //Set psImageDisabled To "resume_cod.ico"
290
        Set piShortcutKey   To xtpKey_None VK_F5
291
    End_Procedure
292

    
293
    Procedure OnExecute Variant vCommandBarControl
294
       Send doDebugContinue
295
    End_Procedure
296
    
297
    
298
    Function IsEnabled Returns Boolean
299
      Boolean bPaused
300
      
301
      Get HasProgramPaused To bPaused
302
      Function_Return bPaused
303
    End_Function
304
         
305
End_Class // cCJDebugContinueMenuItem
306

    
307
Define CS_CaptionStepOver   For "Step Over"
308
Define CS_TooltipStepOver   For "Step Over"
309
Define CS_DescStepOver      For "Step Over"
310

    
311
{ OverrideProperty=psCaption InitialValue=CS_CaptionStepOver}
312
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipStepOver}
313
{ OverrideProperty=psDescription InitialValue=CS_DescStepOver }
314
{ OverrideProperty=psImage InitialValue="stepover_co.ico" }
315
Class cCJStepOverMenuItem is a cCJDebugMenuItem
316
    
317
    Procedure Construct_Object
318
        Forward Send Construct_Object
319
        Set psCaption       To CS_CaptionStepOver
320
        Set psToolTip       To CS_ToolTipStepOver
321
        Set psDescription   To CS_DescStepOver
322
        Set psImage         To "stepover_co.ico"
323
        //Set psImageDisabled To "stepover_cod.ico"
324
        Set piShortcutKey   To xtpKey_None VK_F10
325
    End_Procedure
326

    
327
    Procedure OnExecute Variant vCommandBarControl
328
        Send doDebugStepOver
329
    End_Procedure
330
    
331
    
332
    Function IsEnabled Returns Boolean
333
      Boolean bPaused
334
      
335
      Get HasProgramPaused To bPaused
336
      Function_Return bPaused
337
    End_Function
338
    
339
End_Class
340

    
341
Define CS_CaptionStepInto   For "Step Into"
342
Define CS_TooltipStepInto   For "Step Into"
343
Define CS_DescStepInto      For "Step Into"
344

    
345
{ OverrideProperty=psCaption InitialValue=CS_CaptionStepInto}
346
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipStepInto}
347
{ OverrideProperty=psDescription InitialValue=CS_DescStepInto }
348
{ OverrideProperty=psImage InitialValue="stepinto_co.ico" }
349
Class cCJStepIntoMenuItem is a cCJDebugMenuItem
350
    
351
    Procedure Construct_Object
352
        Forward Send Construct_Object
353
        Set psCaption       To CS_CaptionStepInto
354
        Set psToolTip       To CS_ToolTipStepInto
355
        Set psDescription   To CS_DescStepInto
356
        Set psImage         To "stepinto_co.ico"
357
        //Set psImageDisabled To "stepinto_cod.ico"
358
        Set piShortcutKey   To xtpKey_None VK_F11
359
    End_Procedure
360

    
361
    Procedure OnExecute Variant vCommandBarControl
362
        Send doDebugStepInto
363
    End_Procedure
364
    
365
    
366
    Function IsEnabled Returns Boolean
367
      Boolean bPaused
368
      
369
      Get HasProgramPaused To bPaused
370
      Function_Return bPaused
371
    End_Function
372
    
373
End_Class // cCJStepIntoMenuItem
374

    
375
Define CS_CaptionStepOut   For "Step Out"
376
Define CS_TooltipStepOut   For "Step Out"
377
Define CS_DescStepOut      For "Step Out"
378

    
379
{ OverrideProperty=psCaption InitialValue=CS_CaptionStepOut}
380
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipStepOut}
381
{ OverrideProperty=psDescription InitialValue=CS_DescStepOut }
382
{ OverrideProperty=psImage InitialValue="stepreturn_co.ico" }
383
Class cCJStepOutMenuItem is a cCJDebugMenuItem
384
    
385
    Procedure Construct_Object
386
        Forward Send Construct_Object
387
        Set psCaption       To CS_CaptionStepOut
388
        Set psToolTip       To CS_ToolTipStepOut
389
        Set psDescription   To CS_DescStepOut
390
        Set psImage         To "stepreturn_co.ico"
391
        //Set psImageDisabled To "stepreturn_cod.ico"
392
        Set piShortcutKey   To xtpKey_None VK_F12
393
    End_Procedure
394

    
395
    Procedure OnExecute Variant vCommandBarControl
396
        Send doDebugStepOut
397
    End_Procedure
398
    
399
    Function IsEnabled Returns Boolean
400
      Boolean bPaused
401
      
402
      Get HasProgramPaused To bPaused
403
      Function_Return bPaused
404
    End_Function
405
    
406
End_Class // cCJStepOutMenuItem
407

    
408

    
409

    
410
Define CS_CaptionAddBreakpoint   For "Add Breakpoint"
411
Define CS_TooltipAddBreakpoint   For "Add Breakpoint"
412
Define CS_DescAddBreakpoint      For "Add Breakpoint"
413

    
414
{ OverrideProperty=psCaption InitialValue=CS_CaptionAddBreakpoint}
415
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipAddBreakpoint}
416
{ OverrideProperty=psDescription InitialValue=CS_DescAddBreakpoint }
417
{ OverrideProperty=psImage InitialValue="brkp_obj.ico" }
418
Class cCJAddBreakpointMenuItem is a cCJDebugMenuItem
419
    
420
    Procedure Construct_Object
421
        Forward Send Construct_Object
422
        Set psCaption       To CS_CaptionAddBreakpoint
423
        Set psToolTip       To CS_ToolTipAddBreakpoint
424
        Set psDescription   To CS_DescAddBreakpoint
425
        Set psImage         To "brkp_obj.ico"
426
        //Set psImageDisabled To "brkpd_obj.ico"
427
        Set piShortcutKey   To xtpKey_None VK_F9
428
    End_Procedure
429

    
430
    Procedure OnExecute Variant vCommandBarControl
431
        Send doSetBreakPoint
432
    End_Procedure
433
    
434
    Function IsEnabled Returns Boolean
435
      Handle hoDebugger
436
      Get phoDebugger to hoDebugger
437
      Function_Return (hoDebugger<>0)
438
    End_Function
439
    
440
End_Class // cCJAddBreakpointMenuItem
441

    
442

    
443

    
444
Define CS_CaptionRemoveBreakpoint   For "Remove Breakpoint"
445
Define CS_TooltipRemoveBreakpoint   For "Remove Breakpoint"
446
Define CS_DescRemoveBreakpoint      For "Remove Breakpoint"
447

    
448
{ OverrideProperty=psCaption InitialValue=CS_CaptionRemoveBreakpoint}
449
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipRemoveBreakpoint}
450
{ OverrideProperty=psDescription InitialValue=CS_DescRemoveBreakpoint }
451
{ OverrideProperty=psImage InitialValue="skip_brkp.ico" }
452
Class cCJRemoveBreakpointMenuItem is a cCJDebugMenuItem
453
    
454
    Procedure Construct_Object
455
        Forward Send Construct_Object
456
        Set psCaption       To CS_CaptionRemoveBreakpoint
457
        Set psToolTip       To CS_ToolTipRemoveBreakpoint
458
        Set psDescription   To CS_DescRemoveBreakpoint
459
        Set psImage         To "skip_brkp.ico"
460
        //Set psImageDisabled To "brkpd_obj.ico"
461
        //Set piShortcutKey   To xtpKey_None VK_F9
462
    End_Procedure
463

    
464
    Procedure OnExecute Variant vCommandBarControl
465
        Send doRemoveBreakPoint
466
    End_Procedure
467
    
468
    Function IsEnabled Returns Boolean
469
      Boolean bHasBreakPoints
470
      
471
      Get HasBreakpoints To bHasBreakPoints
472
      Function_Return bHasBreakpoints
473
    End_Function
474
    
475
End_Class // cCJRemoveBreakpointMenuItem
476

    
477

    
478
Define CS_CaptionImportBreakpoints   For "Import Breakpoints"
479
Define CS_TooltipImportBreakpoints   For "Import Breakpoints"
480
Define CS_DescImportBreakpoints      For "Import Breakpoints"
481

    
482
{ OverrideProperty=psCaption InitialValue=CS_CaptionImportBreakpoints}
483
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipImportBreakpoints}
484
{ OverrideProperty=psDescription InitialValue=CS_DescImportBreakpoints }
485
{ OverrideProperty=psImage InitialValue="import_brkpts.ico" }
486
Class cCJImportBreakpointsMenuItem is a cCJDebugMenuItem
487
    
488
    Procedure Construct_Object
489
        Forward Send Construct_Object
490
        Set psCaption       To CS_CaptionImportBreakpoints
491
        Set psToolTip       To CS_ToolTipImportBreakpoints
492
        Set psDescription   To CS_DescImportBreakpoints
493
        Set psImage         To "import_brkpts.ico"
494
        //Set psImageDisabled To "brkpd_obj.ico"
495
        //Set piShortcutKey   To xtpKey_None VK_F9
496
    End_Procedure
497

    
498
    Procedure OnExecute Variant vCommandBarControl
499
        //Send doDebugStepOut
500
    End_Procedure
501
    
502
    Function IsEnabled Returns Boolean
503
      Boolean bPaused
504
      
505
      Get HasProgramPaused To bPaused
506
      Function_Return bPaused
507
    End_Function
508
    
509
End_Class // cCJImportBreakpointsMenuItem
510

    
511

    
512

    
513

    
514
Define CS_CaptionOpenFile   For "Open file"
515
Define CS_TooltipOpenFile   For "Open Source file"
516
Define CS_DescOpenFile      For "Open Source file"
517

    
518
{ OverrideProperty=psCaption InitialValue=CS_CaptionOpenFile}
519
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipOpenFile}
520
{ OverrideProperty=psDescription InitialValue=CS_DescOpenFile }
521
{ OverrideProperty=psImage InitialValue="ActionOpen.ico" }
522
Class cCJOpenFileMenuItem is a cCJDebugMenuItem
523
    
524
    Procedure Construct_Object
525
        Forward Send Construct_Object
526
        Set psCaption       To CS_CaptionOpenFile
527
        Set psToolTip       To CS_ToolTipOpenFile
528
        Set psDescription   To CS_DescOpenFile
529
        Set psImage         To "ActionOpen.ico"
530
    End_Procedure
531

    
532
    Procedure OnExecute Variant vCommandBarControl
533
        Send doOpenFile
534
    End_Procedure
535
    
536
    Function IsEnabled Returns Boolean
537
      Handle hoDebugger
538
      Get phoDebugger to hoDebugger
539
      Function_Return (hoDebugger<>0)
540
    End_Function
541
    
542
End_Class // cCJOpenFileMenuItem