forked from gphilippot/purebasic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ToolbarManagement.pb
699 lines (572 loc) · 27 KB
/
ToolbarManagement.pb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
;--------------------------------------------------------------------------------------------
; Copyright (c) Fantaisie Software. All rights reserved.
; Dual licensed under the GPL and Fantaisie Software licenses.
; See LICENSE and LICENSE-FANTAISIE in the project root for license information.
;--------------------------------------------------------------------------------------------
CompilerIf #SpiderBasic
#NB_ToolbarMenuItems = 98-24 ; menu items specified in the datasection
CompilerElse
#NB_ToolbarMenuItems = 98 ; menu items specified in the datasection
CompilerEndIf
;#NB_InternalIcons = 45
#NB_StandardButtons = 14
Global Dim ToolbarMenuID.l(#NB_ToolbarMenuItems)
Global Dim ToolbarMenuName$(#NB_ToolbarMenuItems)
Global Dim ToolbarMenuIcon(#NB_ToolbarMenuItems)
Global Dim StandardButton.l(#NB_StandardButtons)
Global Dim StandardButtonName$(#NB_StandardButtons)
Procedure InitToolbar()
; read the possible menu items
;
Restore ToolbarMenuItems
For i = 1 To #NB_ToolbarMenuItems
Read.l ToolbarMenuID(i)
Read.s ToolbarMenuName$(i)
Next i
; read the standard buttons
;
Restore StandardIconNames
For i = 1 To #NB_StandardButtons
Read.s StandardButtonName$(i)
Read.l StandardButton(i)
Next i
; For the "Space" option, we have an empty png file in the images.pak
; (also for missing icons)
;
CatchPackedImage(#IMAGE_ToolBar_Space, ?General_Images, 5)
CatchPackedImage(#IMAGE_ToolBar_Missing, ?General_Images, 6)
; read the default toolbar set
;
Restore ToolbarPureBasic
Read.l ToolbarItemCount
For i = 1 To ToolbarItemCount
Read.s Toolbar(i)\Name$
Read.s Toolbar(i)\Action$
Next i
EndProcedure
Procedure ToolbarMenuImage(MenuItem)
Image = 0
For i = 1 To #NB_ToolbarMenuItems
If MenuItem = ToolbarMenuID(i) And ToolbarMenuIcon(i)
Image = ImageID(ToolbarMenuIcon(i))
Break
EndIf
Next i
ProcedureReturn Image
EndProcedure
Procedure CreateIDEToolBar()
*MainToolbar = CreateToolBar(#TOOLBAR, WindowID(#WINDOW_Main))
If *MainToolbar
NbSpaceButtons = 0
For i = 1 To ToolbarItemCount
If Toolbar(i)\Name$ = "Separator"
ToolBarSeparator()
ElseIf Toolbar(i)\Name$ = "Space"
NbSpaceButtons + 1
ToolBarImageButton(#MENU_FirstUnused+NbSpaceButtons, ImageID(#IMAGE_Toolbar_Space))
DisableToolBarButton(#TOOLBAR, #MENU_FirstUnused+NbSpaceButtons, 1)
Else
MenuID = -1
Flag = 0
ToolTip$ = ""
If Left(Toolbar(i)\Action$, 4) = "Menu"
For a = 1 To #NB_ToolbarMenuItems
If Toolbar(i)\Action$ = ToolbarMenuName$(a)
MenuID = ToolbarMenuID(a)
ToolTip$ = Language("MenuItem", Right(ToolbarMenuName$(a), Len(ToolbarMenuName$(a))-5))
Break
EndIf
Next a
ElseIf Left(Toolbar(i)\Action$, 4) = "Tool"
ForEach ToolsList()
If Toolbar(i)\Action$ = "Tool:" + ToolsList()\MenuItemName$
MenuID = #MENU_AddTools_Start+ListIndex(ToolsList())
ToolTip$ = Right(Toolbar(i)\Action$, Len(Toolbar(i)\Action$)-5)
EndIf
Next ToolsList()
EndIf
If Toolbar(i)\Action$ = "Menu:VisualDesigner" And VisualDesigner$ = ""
MenuID = -1
ElseIf Toolbar(i)\Action$ = "Menu:Debugger"
Flag = 1 ;#PB_Toolbar_Toggle
EndIf
If MenuID <> -1
If Left(Toolbar(i)\Name$, 8) = "External"
Toolbar(i)\Image = LoadImage(#PB_Any, Right(Toolbar(i)\Name$, Len(Toolbar(i)\Name$)-9))
If Toolbar(i)\Image
ToolBarImageButton(MenuID, ImageID(Toolbar(i)\Image), Flag)
Found = 1
Else
MessageRequester(#ProductName$,Language("Misc","ToolbarError")+":"+#NewLine+Right(Toolbar(i)\Name$, Len(Toolbar(i)\Name$)-9), #FLAG_Error)
Found = 0
EndIf
Else
; check for standard button
;
Found = 0
For a = 1 To #NB_StandardButtons
If Toolbar(i)\Name$ = StandardButtonName$(a)
ToolBarStandardButton(MenuID, StandardButton(a), Flag)
Found = 1
Break
EndIf
Next a
; check for menu icon
;
If Found = 0
For a = 1 To #NB_ToolbarMenuItems
If Toolbar(i)\Name$ = ToolbarMenuName$(a) And ToolbarMenuIcon(a)
ToolBarImageButton(MenuID, ImageID(ToolbarMenuIcon(a)), Flag)
Found = 1
Break
EndIf
Next a
EndIf
If Found = 0
ToolBarImageButton(MenuID, ImageID(#IMAGE_ToolBar_Missing), Flag)
EndIf
EndIf
If Found
ToolBarToolTip(#TOOLBAR, MenuID, RemoveString(ToolTip$, "&"))
EndIf
EndIf
EndIf
Next i
If *ActiveSource
SetToolBarButtonState(#TOOLBAR, #MENU_Debugger, *ActiveSource\Debugger)
EndIf
If CompilerReady = 0
DisableToolBarButton (#TOOLBAR, #MENU_CompileRun, 1)
DisableToolBarButton (#TOOLBAR, #MENU_SyntaxCheck, 1)
EndIf
UpdateToolbarView()
EndIf
ProcedureReturn *MainToolbar
EndProcedure
Procedure FreeIDEToolbar()
If IsToolBar(#TOOLBAR)
FreeToolBar(#TOOLBAR)
For i = 1 To ToolbarItemCount
If IsImage(Toolbar(i)\Image)
FreeImage(Toolbar(i)\Image)
EndIf
Toolbar(i)\Image = 0
Next i
EndIf
EndProcedure
; Convert the pre-4.40 naming scheme for the menu icons
; to the new Theme compatible names
;
Procedure.s ConvertToolbarIconName(OldName$)
If Left(OldName$, 9) = "Internal:"
Select Right(OldName$, Len(OldName$)-9)
Case "CompileAndRun" : ProcedureReturn "Menu:Compile"
Case "CompilerOptions" : ProcedureReturn "Menu:CompilerOptions"
Case "CompileToExe" : ProcedureReturn "Menu:CreateEXE"
Case "DebugBreakPoint" : ProcedureReturn "Menu:BreakPoint"
Case "DebugContinue" : ProcedureReturn "Menu:Run"
Case "DebugKill" : ProcedureReturn "Menu:Kill"
Case "DebugMemoryViewer" : ProcedureReturn "Menu:Memory"
Case "DebugOnOff" : ProcedureReturn "Menu:Debugger"
Case "DebugOutput" : ProcedureReturn "Menu:DebugOutput"
Case "DebugStep" : ProcedureReturn "Menu:Step"
Case "DebugStepNumber" : ProcedureReturn "Menu:StepX"
Case "DebugStepOut" : ProcedureReturn "Menu:StepOut"
Case "DebugStepOver" : ProcedureReturn "Menu:StepOver"
Case "DebugStop" : ProcedureReturn "Menu:Stop"
Case "DebugVariables" : ProcedureReturn "Menu:VariableList"
Case "DebugWatchList" : ProcedureReturn "Menu:WatchList"
Case "DisplayHelp" : ProcedureReturn "Menu:Help"
Case "EditAddBookmark" : ProcedureReturn "Menu:AddMarker"
Case "EditCopy" : ProcedureReturn "Menu:Copy"
Case "EditCut" : ProcedureReturn "Menu:Cut"
Case "EditFind" : ProcedureReturn "Menu:FindNext"
Case "EditFindAndReplace" : ProcedureReturn "Menu:Find"
Case "EditFindInFiles" : ProcedureReturn "Menu:FindInFiles"
Case "EditGoToBookmark" : ProcedureReturn "Menu:JumpToMarker"
Case "EditGoToLineNumber" : ProcedureReturn "Menu:Goto"
Case "EditInsertComment" : ProcedureReturn "Menu:InsertComment"
Case "EditPaste" : ProcedureReturn "Menu:Paste"
Case "EditRedo" : ProcedureReturn "Menu:Redo"
Case "EditRemoveComment" : ProcedureReturn "Menu:RemoveComment"
Case "EditUndo" : ProcedureReturn "Menu:Undo"
Case "FileClose" : ProcedureReturn "Menu:Close"
Case "FileNew" : ProcedureReturn "Menu:New"
Case "FileOpen" : ProcedureReturn "Menu:Open"
Case "FilePreferences" : ProcedureReturn "Menu:Preferences"
Case "FileSave" : ProcedureReturn "Menu:Save"
Case "FileSortSources" : ProcedureReturn "Menu:SortSources"
Case "StartVisualDesigner" : ProcedureReturn "Menu:VisualDesigner"
Case "ToolsAsciiTable" : ProcedureReturn "Menu:AsciiTable"
Case "ToolsColorPicker" : ProcedureReturn "Menu:ColorPicker"
Case "ToolsExplorer" : ProcedureReturn "Menu:Explorer"
Case "ToolsFileViewer" : ProcedureReturn "Menu:FileViewer"
Case "ToolsProcedureBrowser": ProcedureReturn "Menu:ProcedureBrowser"
Case "ToolsStructureViewer" : ProcedureReturn "Menu:StructureViewer"
Case "ToolsVariableViewer" : ProcedureReturn "Menu:VariableViewer"
Default
ProcedureReturn OldName$
EndSelect
Else
ProcedureReturn OldName$
EndIf
EndProcedure
Procedure UpdatePrefsToolbarList()
For i = 1 To PreferenceToolbarCount
Select StringField(PreferenceToolbar(i)\Name$, 1, ":")
Case "Separator"
Text$ = Language("Preferences","Separator")
Case "Space"
Text$ = Language("Preferences","Space")
Case "Standard"
Text$ = Language("Preferences","StandardButton") + ": " + StringField(PreferenceToolbar(i)\Name$, 2, ":")
Case "Menu"
Text$ = Language("Preferences","ThemeIcon") + ": " + StringField(PreferenceToolbar(i)\Name$, 2, ":")
Case "External"
Text$ = Language("Preferences","ExternalIcon") + ": " + StringField(PreferenceToolbar(i)\Name$, 2, ":")
Default: Text$ = ""
EndSelect
SetGadgetItemText(#GADGET_Preferences_ToolbarList, i-1, Text$, 0)
If Left(PreferenceToolbar(i)\Action$, 4) = "Menu"
Text$ = Language("Preferences","ActionMenu") + ": " + RemoveString(Language("MenuItem", Right(PreferenceToolbar(i)\Action$, Len(PreferenceToolbar(i)\Action$)-5)), "&")
ElseIf Left(PreferenceToolbar(i)\Action$, 4) = "Tool"
Text$ = Language("Preferences","ActionTool") + ": " + Right(PreferenceToolbar(i)\Action$, Len(PreferenceToolbar(i)\Action$)-5)
Else
Text$ = ""
EndIf
SetGadgetItemText(#GADGET_Preferences_ToolbarList, i-1, Text$, 1)
Next i
EndProcedure
Procedure UpdatePrefsToolbarItem(FirstCall=#False)
Static SelectedItem
; StartFlickerFix(#WINDOW_Preferences) ; - Don't use it as it makes the whole window flicker on XP (quite interesting huh ?)
; check if the selection in the main list has changed
; or if it is the first call after preferences opened
;
If GetGadgetState(#GADGET_Preferences_ToolbarList) <> SelectedItem Or FirstCall
SelectedItem = GetGadgetState(#GADGET_Preferences_ToolbarList)
If SelectedItem = -1
SetGadgetState(#GADGET_Preferences_ToolbarIconType, 0)
Else
DisableGadget(#GADGET_Preferences_ToolbarIconType, 0)
Select StringField(PreferenceToolbar(SelectedItem+1)\Name$, 1, ":")
Case "Separator"
SetGadgetState(#GADGET_Preferences_ToolbarIconType, 0)
ToolbarPreferenceMode = 0
Case "Space"
SetGadgetState(#GADGET_Preferences_ToolbarIconType, 1)
ToolbarPreferenceMode = 0
Case "Standard"
SetGadgetState(#GADGET_Preferences_ToolbarIconType, 2)
ClearGadgetItems(#GADGET_Preferences_ToolbarIconList)
index = 0
For i = 1 To #NB_StandardButtons
AddGadgetItem(#GADGET_Preferences_ToolbarIconList, -1, Right(StandardButtonName$(i), Len(StandardButtonName$(i))-9))
If PreferenceToolbar(SelectedItem+1)\Name$ = StandardButtonName$(i)
index = i-1
EndIf
Next i
SetGadgetState(#GADGET_Preferences_ToolbarIconList, index)
ToolbarPreferenceMode = 1
Case "Menu"
SetGadgetState(#GADGET_Preferences_ToolbarIconType, 3)
ClearGadgetItems(#GADGET_Preferences_ToolbarIconList)
index = 0
For i = 1 To #NB_ToolbarMenuItems
AddGadgetItem(#GADGET_Preferences_ToolbarIconList, -1, StringField(ToolbarMenuName$(i), 2, ":"))
If PreferenceToolbar(SelectedItem+1)\Name$ = ToolbarMenuName$(i)
index = i-1
EndIf
Next i
SetGadgetState(#GADGET_Preferences_ToolbarIconList, index)
ToolbarPreferenceMode = 2
Case "External"
SetGadgetState(#GADGET_Preferences_ToolbarIconType, 4)
SetGadgetText(#GADGET_Preferences_ToolbarIconName, Right(PreferenceToolbar(SelectedItem+1)\Name$, Len(PreferenceToolbar(SelectedItem+1)\Name$)-9))
ToolbarPreferenceMode = 3
EndSelect
Select Left(PreferenceToolbar(SelectedItem+1)\Action$, 4)
Case "Menu"
ClearGadgetItems(#GADGET_Preferences_ToolbarActionList)
index = 0
For i = 1 To #NB_ToolbarMenuItems
AddGadgetItem(#GADGET_Preferences_ToolbarActionList, -1, RemoveString(Language("MenuItem", Right(ToolbarMenuName$(i), Len(ToolbarMenuName$(i))-5)), "&"))
If PreferenceToolbar(SelectedItem+1)\Action$ = ToolbarMenuName$(i)
index = i-1
EndIf
Next i
SetGadgetState(#GADGET_Preferences_ToolbarActionList, index)
SetGadgetState(#GADGET_Preferences_ToolbarActionType, 0)
ToolbarPreferenceAction = 1
Case "Tool"
ClearGadgetItems(#GADGET_Preferences_ToolbarActionList)
index = 0
ForEach ToolsList()
AddGadgetItem(#GADGET_Preferences_ToolbarActionList, -1, ToolsList()\MenuItemName$)
If PreferenceToolbar(SelectedItem+1)\Action$ = "Tool:"+ToolsList()\MenuItemName$
index = i
EndIf
i + 1
Next ToolsList()
SetGadgetState(#GADGET_Preferences_ToolbarActionList, index)
SetGadgetState(#GADGET_Preferences_ToolbarActionType, 1)
ToolbarPreferenceAction = 2
EndSelect
EndIf
EndIf
; enable/disable the settings gadgets according to the settings
;
Select GetGadgetState(#GADGET_Preferences_ToolbarIconType)
Case 0 ; Separator
HideGadget(#GADGET_Preferences_ToolbarIconList, 0)
HideGadget(#GADGET_Preferences_ToolbarIconName, 1)
HideGadget(#GADGET_Preferences_ToolbarOpenIcon, 1)
DisableGadget(#GADGET_Preferences_ToolbarIconList, 1)
DisableGadget(#GADGET_Preferences_ToolbarActionType, 1)
DisableGadget(#GADGET_Preferences_ToolbarActionList, 1)
ToolbarPreferenceMode = 0
Case 1 ; Space
HideGadget(#GADGET_Preferences_ToolbarIconList, 0)
HideGadget(#GADGET_Preferences_ToolbarIconName, 1)
HideGadget(#GADGET_Preferences_ToolbarOpenIcon, 1)
DisableGadget(#GADGET_Preferences_ToolbarIconList, 1)
DisableGadget(#GADGET_Preferences_ToolbarActionType, 1)
DisableGadget(#GADGET_Preferences_ToolbarActionList, 1)
ToolbarPreferenceMode = 0
Case 2 ; Standard
If ToolbarPreferenceMode <> 1
ClearGadgetItems(#GADGET_Preferences_ToolbarIconList)
For i = 1 To #NB_StandardButtons
AddGadgetItem(#GADGET_Preferences_ToolbarIconList, -1, Right(StandardButtonName$(i), Len(StandardButtonName$(i))-9))
Next i
SetGadgetState(#GADGET_Preferences_ToolbarIconList, 0)
ToolbarPreferenceMode = 1
EndIf
HideGadget(#GADGET_Preferences_ToolbarIconList, 0)
HideGadget(#GADGET_Preferences_ToolbarIconName, 1)
HideGadget(#GADGET_Preferences_ToolbarOpenIcon, 1)
DisableGadget(#GADGET_Preferences_ToolbarIconList, 0)
DisableGadget(#GADGET_Preferences_ToolbarActionType, 0)
DisableGadget(#GADGET_Preferences_ToolbarActionList, 0)
Case 3 ; Internal
If ToolbarPreferenceMode <> 2
ClearGadgetItems(#GADGET_Preferences_ToolbarIconList)
For i = 1 To #NB_ToolbarMenuItems
AddGadgetItem(#GADGET_Preferences_ToolbarIconList, -1, StringField(ToolbarMenuName$(i), 2, ":"))
Next i
SetGadgetState(#GADGET_Preferences_ToolbarIconList, 0)
ToolbarPreferenceMode = 2
EndIf
HideGadget(#GADGET_Preferences_ToolbarIconList, 0)
HideGadget(#GADGET_Preferences_ToolbarIconName, 1)
HideGadget(#GADGET_Preferences_ToolbarOpenIcon, 1)
DisableGadget(#GADGET_Preferences_ToolbarIconList, 0)
DisableGadget(#GADGET_Preferences_ToolbarActionType, 0)
DisableGadget(#GADGET_Preferences_ToolbarActionList, 0)
Case 4 ; external
HideGadget(#GADGET_Preferences_ToolbarIconList, 1)
HideGadget(#GADGET_Preferences_ToolbarIconName, 0)
HideGadget(#GADGET_Preferences_ToolbarOpenIcon, 0)
DisableGadget(#GADGET_Preferences_ToolbarIconName, 0)
DisableGadget(#GADGET_Preferences_ToolbarOpenIcon, 0)
DisableGadget(#GADGET_Preferences_ToolbarActionType, 0)
DisableGadget(#GADGET_Preferences_ToolbarActionList, 0)
ToolbarPreferenceMode = 3
EndSelect
Select GetGadgetState(#GADGET_Preferences_ToolbarActionType)
Case 0 ; menu
If ToolbarPreferenceAction <> 1
ClearGadgetItems(#GADGET_Preferences_ToolbarActionList)
For i = 1 To #NB_ToolbarMenuItems
AddGadgetItem(#GADGET_Preferences_ToolbarActionList, -1, RemoveString(Language("MenuItem", Right(ToolbarMenuName$(i), Len(ToolbarMenuName$(i))-5)), "&"))
Next i
SetGadgetState(#GADGET_Preferences_ToolbarActionList, 0)
ToolbarPreferenceAction = 1
EndIf
Case 1 ; tool
If ToolbarPreferenceAction <> 2
ClearGadgetItems(#GADGET_Preferences_ToolbarActionList)
ForEach ToolsList()
AddGadgetItem(#GADGET_Preferences_ToolbarActionList, -1, ToolsList()\MenuItemName$)
Next ToolsList()
SetGadgetState(#GADGET_Preferences_ToolbarActionList, 0)
ToolbarPreferenceAction = 2
EndIf
EndSelect
EndProcedure
DataSection
; this list specifies all menu items that can have a toolbar button and the name
; for them in the Preferences. The preference name also references the
; images in the Theme.prefs (if they are present)
;
; Do not forget to update the count on top of this file when adding things!
;
;- ToolbarMenuItems
ToolbarMenuItems:
Data.l #MENU_New: Data$ "Menu:New"
Data.l #MENU_Open: Data$ "Menu:Open"
Data.l #MENU_Save: Data$ "Menu:Save"
Data.l #MENU_SaveAs: Data$ "Menu:SaveAs"
Data.l #MENU_SaveAll: Data$ "Menu:SaveAll"
Data.l #MENU_Reload: Data$ "Menu:Reload"
Data.l #MENU_Close: Data$ "Menu:Close"
Data.l #MENU_CloseAll: Data$ "Menu:CloseAll"
Data.l #MENU_DiffCurrent: Data$ "Menu:DiffCurrent"
Data.l #MENU_EncodingPlain: Data$ "Menu:EncodingPlain"
Data.l #MENU_EncodingUtf8: Data$ "Menu:EncodingUtf8"
Data.l #MENU_NewlineWindows: Data$ "Menu:NewlineWindows"
Data.l #MENU_NewlineLinux: Data$ "Menu:NewlineLinux"
Data.l #MENU_NewlineMacOS: Data$ "Menu:NewlineMacOS"
;Data.l #MENU_SortSources: Data$ "Menu:SortSources"
Data.l #MENU_Preference: Data$ "Menu:Preferences"
Data.l #MENU_History: Data$ "Menu:EditHistory"
Data.l #MENU_Exit: Data$ "Menu:Quit"
Data.l #MENU_Undo: Data$ "Menu:Undo"
Data.l #MENU_Redo: Data$ "Menu:Redo"
Data.l #MENU_Cut: Data$ "Menu:Cut"
Data.l #MENU_Copy: Data$ "Menu:Copy"
Data.l #MENU_Paste: Data$ "Menu:Paste"
Data.l #MENU_CommentSelection: Data$ "Menu:InsertComment"
Data.l #MENU_UnCommentSelection: Data$ "Menu:RemoveComment"
Data.l #MENU_AutoIndent: Data$ "Menu:AutoIndent"
Data.l #MENU_SelectAll: Data$ "Menu:SelectAll"
Data.l #MENU_Goto: Data$ "Menu:Goto"
Data.l #MENU_JumpToKeyword: Data$ "Menu:JumpToKeyword"
Data.l #MENU_LastViewedLine: Data$ "Menu:LastViewedLine"
Data.l #MENU_ToggleThisFold: Data$ "Menu:ToggleThisFold"
Data.l #MENU_ToggleFolds: Data$ "Menu:ToggleFolds"
Data.l #MENU_AddMarker: Data$ "Menu:AddMarker"
Data.l #MENU_JumpToMarker: Data$ "Menu:JumpToMarker"
Data.l #MENU_ClearMarkers: Data$ "Menu:ClearMarkers"
Data.l #MENU_Find: Data$ "Menu:Find"
Data.l #MENU_FindNext: Data$ "Menu:FindNext"
Data.l #MENU_FindPrevious: Data$ "Menu:FindPrevious"
Data.l #MENU_FindInFiles: Data$ "Menu:FindInFiles"
Data.l #MENU_NewProject: Data$ "Menu:NewProject"
Data.l #MENU_OpenProject: Data$ "Menu:OpenProject"
Data.l #MENU_CloseProject: Data$ "Menu:CloseProject"
Data.l #MENU_ProjectOptions: Data$ "Menu:ProjectOptions"
Data.l #MENU_AddProjectFile: Data$ "Menu:AddProjectFile"
Data.l #MENU_RemoveProjectFile: Data$ "Menu:RemoveProjectFile"
; Data.l #MENU_BackupManager: Data$ "Menu:BackupManager"
; Data.l #MENU_MakeBackup: Data$ "Menu:MakeBackup"
; Data.l #MENU_TodoList: Data$ "Menu:TodoList"
Data.l #MENU_OpenProjectFolder: Data$ "Menu:OpenProjectFolder"
Data.l #MENU_NewForm: Data$ "Menu:NewForm"
Data.l #MENU_FormSwitch: Data$ "Menu:FormSwitch"
Data.l #MENU_Duplicate: Data$ "Menu:FormDuplicate"
Data.l #MENU_FormImageManager: Data$ "Menu:FormImageManager"
Data.l #MENU_CompileRun: Data$ "Menu:Compile"
Data.l #MENU_RunExe: Data$ "Menu:RunExe"
Data.l #MENU_SyntaxCheck: Data$ "Menu:SyntaxCheck"
Data.l #MENU_DebuggerCompile: Data$ "Menu:DebuggerCompile"
Data.l #MENU_NoDebuggerCompile: Data$ "Menu:NoDebuggerCompile"
Data.l #MENU_RestartCompiler: Data$ "Menu:RestartCompiler"
Data.l #MENU_CompilerOption: Data$ "Menu:CompilerOptions"
CompilerIf Not #SpiderBasic
Data.l #MENU_CreateExecutable: Data$ "Menu:CreateEXE"
CompilerEndIf
Data.l #MENU_BuildAllTargets: Data$ "Menu:BuildAllTargets"
Data.l #MENU_Debugger: Data$ "Menu:Debugger"
CompilerIf Not #SpiderBasic
Data.l #MENU_Stop: Data$ "Menu:Stop"
Data.l #MENU_Run: Data$ "Menu:Run"
Data.l #MENU_Step: Data$ "Menu:Step"
Data.l #MENU_StepX: Data$ "Menu:StepX"
Data.l #MENU_StepOver: Data$ "Menu:StepOver"
Data.l #MENU_StepOut: Data$ "Menu:StepOut"
Data.l #MENU_Kill: Data$ "Menu:Kill"
Data.l #MENU_BreakPoint: Data$ "Menu:BreakPoint"
Data.l #MENU_BreakClear: Data$ "Menu:BreakClear"
Data.l #MENU_DataBreakPoints: Data$ "Menu:DataBreakPoints"
Data.l #MENU_ShowLog: Data$ "Menu:ShowLog"
Data.l #MENU_ClearLog: Data$ "Menu:ClearLog"
Data.l #MENU_CopyLog: Data$ "Menu:CopyLog"
Data.l #MENU_ClearErrorMarks: Data$ "Menu:ClearErrorMarks"
Data.l #MENU_DebugOutput: Data$ "Menu:DebugOutput"
Data.l #MENU_Watchlist: Data$ "Menu:WatchList"
Data.l #MENU_VariableList: Data$ "Menu:VariableList"
Data.l #MENU_Profiler: Data$ "Menu:Profiler"
Data.l #MENU_History: Data$ "Menu:History"
Data.l #MENU_Memory: Data$ "Menu:Memory"
Data.l #MENU_LibraryViewer: Data$ "Menu:LibraryViewer"
Data.l #MENU_DebugAsm: Data$ "Menu:DebugAsm"
Data.l #MENU_Purifier: Data$ "Menu:Purifier"
CompilerEndIf
Data.l #MENU_VisualDesigner: Data$ "Menu:VisualDesigner"
Data.l #MENU_StructureViewer: Data$ "Menu:StructureViewer"
Data.l #MENU_FileViewer: Data$ "Menu:FileViewer"
Data.l #MENU_VariableViewer: Data$ "Menu:VariableViewer"
Data.l #MENU_ColorPicker: Data$ "Menu:ColorPicker"
Data.l #MENU_AsciiTable: Data$ "Menu:AsciiTable"
Data.l #MENU_Explorer: Data$ "Menu:Explorer"
Data.l #MENU_ProcedureBrowser: Data$ "Menu:ProcedureBrowser"
Data.l #MENU_Issues: Data$ "Menu:Issues"
Data.l #MENU_ProjectPanel: Data$ "Menu:ProjectPanel"
Data.l #MENU_Templates: Data$ "Menu:Templates"
Data.l #MENU_Diff: Data$ "Menu:Diff"
Data.l #MENU_AddTools: Data$ "Menu:AddTools"
Data.l #MENU_Help: Data$ "Menu:Help"
Data.l #MENU_UpdateCheck: Data$ "Menu:UpdateCheck"
Data.l #MENU_About: Data$ "Menu:About"
; this specifies the layout of the 'classic' toolbar
;
;- ToolBarClassic
ToolBarClassic:
Data.l 12 ; item count
Data$ "Standard:New", "Menu:New" ; button name, menu action
Data$ "Standard:Open", "Menu:Open"
Data$ "Standard:Save", "Menu:Save"
Data$ "Separator", ""
Data$ "Standard:Delete", "Menu:Close"
Data$ "Separator", ""
Data$ "Standard:Cut", "Menu:Cut"
Data$ "Standard:Copy", "Menu:Copy"
Data$ "Standard:Paste", "Menu:Paste"
Data$ "Separator", ""
Data$ "Standard:Redo", "Menu:Compile"
; this specifies the new toolbar layout
;
;- ToolbarPureBasic
ToolbarPureBasic:
Data.l 24 ; item count
Data$ "Menu:New", "Menu:New"
Data$ "Menu:Open", "Menu:Open"
Data$ "Menu:Save", "Menu:Save"
Data$ "Separator", ""
Data$ "Menu:Close", "Menu:Close"
Data$ "Separator", ""
Data$ "Menu:Cut", "Menu:Cut"
Data$ "Menu:Copy", "Menu:Copy"
Data$ "Menu:Paste", "Menu:Paste"
Data$ "Separator", ""
Data$ "Menu:Undo", "Menu:Undo"
Data$ "Menu:Redo", "Menu:Redo"
Data$ "Separator", ""
Data$ "Menu:Compile", "Menu:Compile"
Data$ "Menu:CompilerOptions","Menu:CompilerOptions"
Data$ "Separator", ""
Data$ "Menu:Debugger", "Menu:Debugger"
Data$ "Menu:Stop", "Menu:Stop"
Data$ "Menu:Run", "Menu:Run"
Data$ "Menu:Step", "Menu:Step"
Data$ "Menu:StepOver", "Menu:StepOver"
Data$ "Menu:StepOut", "Menu:StepOut"
Data$ "Menu:Kill", "Menu:Kill"
;- StandardIconNames
StandardIconNames:
Data$ "Standard:New": Data.l #PB_ToolBarIcon_New
Data$ "Standard:Open": Data.l #PB_ToolBarIcon_Open
Data$ "Standard:Save": Data.l #PB_ToolBarIcon_Save
Data$ "Standard:Print": Data.l #PB_ToolBarIcon_Print
Data$ "Standard:Find": Data.l #PB_ToolBarIcon_Find
Data$ "Standard:Replace": Data.l #PB_ToolBarIcon_Replace
Data$ "Standard:Cut": Data.l #PB_ToolBarIcon_Cut
Data$ "Standard:Copy": Data.l #PB_ToolBarIcon_Copy
Data$ "Standard:Paste": Data.l #PB_ToolBarIcon_Paste
Data$ "Standard:Undo": Data.l #PB_ToolBarIcon_Undo
Data$ "Standard:Redo": Data.l #PB_ToolBarIcon_Redo
Data$ "Standard:Delete": Data.l #PB_ToolBarIcon_Delete
Data$ "Standard:Properties":Data.l #PB_ToolBarIcon_Properties
Data$ "Standard:Help": Data.l #PB_ToolBarIcon_Help
EndDataSection