Project

General

Profile

Statistics
| Revision:

vdfsplat / AppSrc / cDebugCJMenuItemClasses.pkg @ 56

History | View | Annotate | Download (17.4 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

    
202
Define CS_CaptionDebugPause For "Debug Pause"
203
Define CS_TooltipDebugPause For "Debug Pause"
204
Define CS_DescDebugPause    For "Debug Pause"
205
  
206
{ OverrideProperty=psCaption InitialValue=CS_CaptionDebugPause}
207
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipDebugPause}
208
{ OverrideProperty=psDescription InitialValue=CS_DescDebugPause}
209
{ OverrideProperty=psImage InitialValue="suspend_co.ico" }
210

    
211
Class cCJDebugPauseMenuItem is a cCJDebugMenuItem
212
    
213
    Procedure Construct_Object
214
        Forward Send Construct_Object
215
        Set psCaption       To CS_CaptionDebugPause
216
        Set psToolTip       To CS_ToolTipDebugPause
217
        Set psDescription   To CS_DescDebugPause
218
        Set psImage         To "suspend_co.ico"
219
        //Set psImageDisabled To "suspend_cod.ico"
220
        Set piShortcutKey   To xtpKey_None VK_F3
221
    End_Procedure
222

    
223
    Procedure OnExecute Variant vCommandBarControl
224
       Send doDebugPause
225
    End_Procedure
226
    
227
    
228
    Function IsEnabled Returns Boolean
229
      Boolean bStarted
230
      Boolean bPaused
231
      
232
      Get HasProgramStarted To bStarted
233
      Get HasProgramPaused  To bPaused
234
      Function_Return (bStarted and bPaused=false)
235
    End_Function
236
         
237
End_Class
238

    
239
Define CS_CaptionDebugContinue For "Debug Continue"
240
Define CS_TooltipDebugContinue For "Debug Continue"
241
Define CS_DescDebugContinue    For "Debug Continue"
242
  
243
{ OverrideProperty=psCaption InitialValue=CS_CaptionDebugContinue}
244
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipDebugContinue}
245
{ OverrideProperty=psDescription InitialValue=CS_DescDebugContinue}
246
{ OverrideProperty=psImage InitialValue="resume_co.ico" }
247

    
248
Class cCJDebugContinueMenuItem is a cCJDebugMenuItem
249
    
250
    Procedure Construct_Object
251
        Forward Send Construct_Object
252
        Set psCaption       To CS_CaptionDebugContinue
253
        Set psToolTip       To CS_ToolTipDebugContinue
254
        Set psDescription   To CS_DescDebugContinue
255
        Set psImage         To "resume_co.ico"
256
        //Set psImageDisabled To "resume_cod.ico"
257
        Set piShortcutKey   To xtpKey_None VK_F5
258
    End_Procedure
259

    
260
    Procedure OnExecute Variant vCommandBarControl
261
       Send doDebugContinue
262
    End_Procedure
263
    
264
    
265
    Function IsEnabled Returns Boolean
266
      Boolean bPaused
267
      
268
      Get HasProgramPaused To bPaused
269
      Function_Return bPaused
270
    End_Function
271
         
272
End_Class // cCJDebugContinueMenuItem
273

    
274
Define CS_CaptionStepOver   For "Step Over"
275
Define CS_TooltipStepOver   For "Step Over"
276
Define CS_DescStepOver      For "Step Over"
277

    
278
{ OverrideProperty=psCaption InitialValue=CS_CaptionStepOver}
279
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipStepOver}
280
{ OverrideProperty=psDescription InitialValue=CS_DescStepOver }
281
{ OverrideProperty=psImage InitialValue="stepover_co.ico" }
282
Class cCJStepOverMenuItem is a cCJDebugMenuItem
283
    
284
    Procedure Construct_Object
285
        Forward Send Construct_Object
286
        Set psCaption       To CS_CaptionStepOver
287
        Set psToolTip       To CS_ToolTipStepOver
288
        Set psDescription   To CS_DescStepOver
289
        Set psImage         To "stepover_co.ico"
290
        //Set psImageDisabled To "stepover_cod.ico"
291
        Set piShortcutKey   To xtpKey_None VK_F10
292
    End_Procedure
293

    
294
    Procedure OnExecute Variant vCommandBarControl
295
        Send doDebugStepOver
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
307

    
308
Define CS_CaptionStepInto   For "Step Into"
309
Define CS_TooltipStepInto   For "Step Into"
310
Define CS_DescStepInto      For "Step Into"
311

    
312
{ OverrideProperty=psCaption InitialValue=CS_CaptionStepInto}
313
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipStepInto}
314
{ OverrideProperty=psDescription InitialValue=CS_DescStepInto }
315
{ OverrideProperty=psImage InitialValue="stepinto_co.ico" }
316
Class cCJStepIntoMenuItem is a cCJDebugMenuItem
317
    
318
    Procedure Construct_Object
319
        Forward Send Construct_Object
320
        Set psCaption       To CS_CaptionStepInto
321
        Set psToolTip       To CS_ToolTipStepInto
322
        Set psDescription   To CS_DescStepInto
323
        Set psImage         To "stepinto_co.ico"
324
        //Set psImageDisabled To "stepinto_cod.ico"
325
        Set piShortcutKey   To xtpKey_None VK_F11
326
    End_Procedure
327

    
328
    Procedure OnExecute Variant vCommandBarControl
329
        Send doDebugStepInto
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 // cCJStepIntoMenuItem
341

    
342
Define CS_CaptionStepOut   For "Step Out"
343
Define CS_TooltipStepOut   For "Step Out"
344
Define CS_DescStepOut      For "Step Out"
345

    
346
{ OverrideProperty=psCaption InitialValue=CS_CaptionStepOut}
347
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipStepOut}
348
{ OverrideProperty=psDescription InitialValue=CS_DescStepOut }
349
{ OverrideProperty=psImage InitialValue="stepreturn_co.ico" }
350
Class cCJStepOutMenuItem is a cCJDebugMenuItem
351
    
352
    Procedure Construct_Object
353
        Forward Send Construct_Object
354
        Set psCaption       To CS_CaptionStepOut
355
        Set psToolTip       To CS_ToolTipStepOut
356
        Set psDescription   To CS_DescStepOut
357
        Set psImage         To "stepreturn_co.ico"
358
        //Set psImageDisabled To "stepreturn_cod.ico"
359
        Set piShortcutKey   To xtpKey_None VK_F12
360
    End_Procedure
361

    
362
    Procedure OnExecute Variant vCommandBarControl
363
        Send doDebugStepOut
364
    End_Procedure
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 // cCJStepOutMenuItem
374

    
375

    
376

    
377
Define CS_CaptionAddBreakpoint   For "Add Breakpoint"
378
Define CS_TooltipAddBreakpoint   For "Add Breakpoint"
379
Define CS_DescAddBreakpoint      For "Add Breakpoint"
380

    
381
{ OverrideProperty=psCaption InitialValue=CS_CaptionAddBreakpoint}
382
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipAddBreakpoint}
383
{ OverrideProperty=psDescription InitialValue=CS_DescAddBreakpoint }
384
{ OverrideProperty=psImage InitialValue="brkp_obj.ico" }
385
Class cCJAddBreakpointMenuItem is a cCJDebugMenuItem
386
    
387
    Procedure Construct_Object
388
        Forward Send Construct_Object
389
        Set psCaption       To CS_CaptionAddBreakpoint
390
        Set psToolTip       To CS_ToolTipAddBreakpoint
391
        Set psDescription   To CS_DescAddBreakpoint
392
        Set psImage         To "brkp_obj.ico"
393
        //Set psImageDisabled To "brkpd_obj.ico"
394
        Set piShortcutKey   To xtpKey_None VK_F9
395
    End_Procedure
396

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

    
410

    
411

    
412
Define CS_CaptionRemoveBreakpoint   For "Remove Breakpoint"
413
Define CS_TooltipRemoveBreakpoint   For "Remove Breakpoint"
414
Define CS_DescRemoveBreakpoint      For "Remove Breakpoint"
415

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

    
432
    Procedure OnExecute Variant vCommandBarControl
433
        Send doRemoveBreakPoint
434
    End_Procedure
435
    
436
    Function IsEnabled Returns Boolean
437
      Boolean bHasBreakPoints
438
      
439
      Get HasBreakpoints To bHasBreakPoints
440
      Function_Return bHasBreakpoints
441
    End_Function
442
    
443
End_Class // cCJRemoveBreakpointMenuItem
444

    
445

    
446
Define CS_CaptionImportBreakpoints   For "Import Breakpoints"
447
Define CS_TooltipImportBreakpoints   For "Import Breakpoints"
448
Define CS_DescImportBreakpoints      For "Import Breakpoints"
449

    
450
{ OverrideProperty=psCaption InitialValue=CS_CaptionImportBreakpoints}
451
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipImportBreakpoints}
452
{ OverrideProperty=psDescription InitialValue=CS_DescImportBreakpoints }
453
{ OverrideProperty=psImage InitialValue="import_brkpts.ico" }
454
Class cCJImportBreakpointsMenuItem is a cCJDebugMenuItem
455
    
456
    Procedure Construct_Object
457
        Forward Send Construct_Object
458
        Set psCaption       To CS_CaptionImportBreakpoints
459
        Set psToolTip       To CS_ToolTipImportBreakpoints
460
        Set psDescription   To CS_DescImportBreakpoints
461
        Set psImage         To "import_brkpts.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 doDebugStepOut
468
    End_Procedure
469
    
470
    Function IsEnabled Returns Boolean
471
      Boolean bPaused
472
      
473
      Get HasProgramPaused To bPaused
474
      Function_Return bPaused
475
    End_Function
476
    
477
End_Class // cCJImportBreakpointsMenuItem
478

    
479

    
480

    
481

    
482
Define CS_CaptionOpenFile   For "Open file"
483
Define CS_TooltipOpenFile   For "Open Source file"
484
Define CS_DescOpenFile      For "Open Source file"
485

    
486
{ OverrideProperty=psCaption InitialValue=CS_CaptionOpenFile}
487
{ OverrideProperty=psToolTip InitialValue=CS_ToolTipOpenFile}
488
{ OverrideProperty=psDescription InitialValue=CS_DescOpenFile }
489
{ OverrideProperty=psImage InitialValue="ActionOpen.ico" }
490
Class cCJOpenFileMenuItem is a cCJDebugMenuItem
491
    
492
    Procedure Construct_Object
493
        Forward Send Construct_Object
494
        Set psCaption       To CS_CaptionOpenFile
495
        Set psToolTip       To CS_ToolTipOpenFile
496
        Set psDescription   To CS_DescOpenFile
497
        Set psImage         To "ActionOpen.ico"
498
    End_Procedure
499

    
500
    Procedure OnExecute Variant vCommandBarControl
501
        Send doOpenFile
502
    End_Procedure
503
    
504
    Function IsEnabled Returns Boolean
505
      Boolean bPaused
506
      // always allow to open source files.
507
      //Get HasProgramPaused To bPaused
508
      Function_Return True //bPaused
509
    End_Function
510
    
511
End_Class // cCJOpenFileMenuItem