Project

General

Profile

Statistics
| Revision:

vdfsplat / AppSrc / cDebugCJMenuItemClasses.pkg @ 60

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="run_exc.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 "term_restart.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 doStopDebug
224
       Send doStartDebug
225
    End_Procedure
226
    
227
    Function IsEnabled Returns Boolean
228
      Boolean bStarted
229
      Get HasProgramStarted To bStarted
230
      Function_Return bStarted
231
    End_Function
232
         
233
End_Class // cCJRestartDebugMenuItem
234

    
235

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
409

    
410

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

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

    
431
    Procedure OnExecute Variant vCommandBarControl
432
        Send doSetBreakPoint
433
    End_Procedure
434
    
435
    //Function IsEnabled Returns Boolean
436
    //  Boolean bPaused
437
    //
438
    //  Get HasProgramPaused To bPaused
439
    //  Function_Return bPaused
440
    //End_Function
441
    
442
End_Class // cCJAddBreakpointMenuItem
443

    
444

    
445

    
446
Define CS_CaptionRemoveBreakpoint   For "Remove Breakpoint"
447
Define CS_TooltipRemoveBreakpoint   For "Remove Breakpoint"
448
Define CS_DescRemoveBreakpoint      For "Remove Breakpoint"
449

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

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

    
479

    
480
Define CS_CaptionImportBreakpoints   For "Import Breakpoints"
481
Define CS_TooltipImportBreakpoints   For "Import Breakpoints"
482
Define CS_DescImportBreakpoints      For "Import Breakpoints"
483

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

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

    
513

    
514

    
515

    
516
Define CS_CaptionOpenFile   For "Open file"
517
Define CS_TooltipOpenFile   For "Open Source file"
518
Define CS_DescOpenFile      For "Open Source file"
519

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

    
534
    Procedure OnExecute Variant vCommandBarControl
535
        Send doOpenFile
536
    End_Procedure
537
    
538
    Function IsEnabled Returns Boolean
539
      Boolean bPaused
540
      // always allow to open source files.
541
      //Get HasProgramPaused To bPaused
542
      Function_Return True //bPaused
543
    End_Function
544
    
545
End_Class // cCJOpenFileMenuItem