1
1
#pragma rtGlobals=3
2
- #pragma version=1.0
2
+ #pragma version=1.3
3
3
#pragma IgorVersion = 6.3.0
4
4
#pragma IndependentModule= CodeBrowserModule
5
5
6
6
#include <Resize Controls>
7
- // This file was created by () byte physics Thomas Braun, [email protected]
8
- // (c) 2013
7
+
8
+ // Copyright (c) 2019, () byte physics [email protected]
9
+ // All rights reserved.
10
+ //
11
+ // This source code is licensed under the BSD 3-Clause license found in the
12
+ // LICENSE file in the root directory of this source tree.
9
13
10
14
Constant panelWidth = 307
11
15
Constant panelHeight = 170
@@ -24,6 +28,7 @@ static StrConstant userDataNiceList = "niceList"
24
28
static StrConstant oneTimeInitUserData = "oneTimeInit"
25
29
26
30
static StrConstant genericError = "_error_"
31
+
27
32
Function /S GetPanel ()
28
33
return panel
29
34
End
@@ -51,14 +56,14 @@ Function createPanel()
51
56
setGlobalStr ( "search" , prefs. search)
52
57
53
58
CodeBrowserPanel ()
54
- ListBox list 1 , win = $ panel, listWave= getDeclWave ()
59
+ ListBox List 1 , win = $ panel, listWave= getDeclWave ()
55
60
#if ( IgorVersion () >= 8.00 )
56
- ListBox list 1 , win = $ panel, helpWave= getHelpWave ()
61
+ ListBox List 1 , win = $ panel, helpWave= getHelpWave ()
57
62
#endif
58
63
59
- PopupMenu popupNamespace , win=$ panel, mode= prefs. panelNameSpace
60
- PopupMenu popupProcedure , win=$ panel, mode= prefs. panelProcedure
61
- ListBox list 1 , win=$ panel, selRow= prefs. panelElement, row= prefs. panelTopElement
64
+ PopupMenu PopupNamespace , win=$ panel, mode= prefs. panelNameSpace
65
+ PopupMenu PopupProcedure , win=$ panel, mode= prefs. panelProcedure
66
+ ListBox List 1 , win=$ panel, selRow= prefs. panelElement, row= prefs. panelTopElement
62
67
63
68
resizeToPackagePrefs ()
64
69
DoUpdate / W=$ panel
69
74
///
70
75
/// Note that all functions act on the current top panel
71
76
Function CodeBrowserPanel ()
72
- SetVariable setProcedureFilter, pos= { 72,33 } , size= { 229,18 } , proc= CodeBrowserModule# SetVarProcedureFilter, title= "filter"
73
- SetVariable setProcedureFilter, limits= { - inf , inf ,0 } , value= root: Packages: CodeBrowser: procFilter, live= 1
74
- SetVariable setProcedureFilter, userdata ( ResizeControlsInfo) = A"!!,EJ!!#=g!!#At!!#<Hz!!#`-A7TLfzzzzzzzzzzzzzz!!#`-A7TLfzz"
75
- SetVariable setProcedureFilter, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:DuaGl<C]S6zzzzzzzzzz"
76
- SetVariable setProcedureFilter, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
77
-
78
- SetVariable setSearch, pos= { 125,81 } , size= { 175.00,18.00 } , proc= CodeBrowserModule# SetVarProcedureSearch, title= "search"
79
- SetVariable setSearch, limits= { - inf , inf ,0 } , value= root: Packages: CodeBrowser: search, live= 1
80
- SetVariable setSearch, userdata ( ResizeControlsInfo) = A"!!,F_!!#?[!!#A>!!#<Hz!!#](Aon#azzzzzzzzzzzzzz!!#o2B4uAezz"
81
- SetVariable setSearch, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:DuaGl<C]S6zzzzzzzzzz"
82
- SetVariable setSearch, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
83
-
84
- CheckBox checkboxSort, pos= { 77,83 } , size= { 36.00,15.00 } , proc= CodeBrowserModule# checkboxSort, title= "sort"
85
- CheckBox checkboxSort, value= 1
86
- CheckBox checkboxSort, userdata ( ResizeControlsInfo) = A"!!,ET!!#?_!!#=s!!#<(z!!#](Aon#azzzzzzzzzzzzzz!!#`-A7TLfzz"
87
- CheckBox checkboxSort, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:DuaGl<C]S6zzzzzzzzzz"
88
- CheckBox checkboxSort, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
89
-
90
- ListBox list1, pos= { 0.00,105.00 } , size= { 300,62 } , proc= CodeBrowserModule# ListBoxProc
91
- ListBox list1, listWave= root: Packages: CodeBrowser: declarations
92
- ListBox list1, selCol= 1, widths= { 4,40 } , keySelectCol= 1
93
- ListBox list1, mode= 5, selRow= 0
94
- ListBox list1, userdata ( ResizeControlsInfo) = A"!!*'\" !!#@6!!#BP!!#?1z!!#](Aon\" Qzzzzzzzzzzzzzz!!#o2B4uAezz"
95
- ListBox list1, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#N3Bk1ct<C]S6zzzzzzzzzz"
96
- ListBox list1, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S7zzzzzzzzzzzzz!!!"
97
-
98
- PopupMenu popupProcedure, pos= { 44,53 } , size= { 257.00,19.00 } , bodyWidth=200, proc= CodeBrowserModule# popupProcedures, title= "Procedure"
99
- PopupMenu popupProcedure, mode=1, popvalue= "<ALL>" , value= # "CodeBrowserModule#generateProcedureList()"
100
- PopupMenu popupProcedure, userdata ( ResizeControlsInfo) = A"!!,D?!!#>b!!#B:J,hm&z!!#`-A7TLfzzzzzzzzzzzzzz!!#`-A7TLfzz"
101
- PopupMenu popupProcedure, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:Du]k<zzzzzzzzzzz"
102
- PopupMenu popupProcedure, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
103
-
104
- PopupMenu popupNamespace, pos= { 36,10 } , size= { 265.00,19.00 } , bodyWidth=200, proc= CodeBrowserModule# popupModules, title= "Namespace"
105
- PopupMenu popupNamespace, userdata ( niceList) = "<ALL>;ProcGlobal;COMPILE;CodeBrowserModule;"
106
- PopupMenu popupNamespace, mode=1, popvalue= "<ALL>" , value= # "CodeBrowserModule#generateModuleList()"
107
- PopupMenu popupNamespace, userdata ( ResizeControlsInfo) = A"!!,Ct!!#;-!!#B>J,hm&z!!#`-A7TLfzzzzzzzzzzzzzz!!#`-A7TLfzz"
108
- PopupMenu popupNamespace, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:Du]k<zzzzzzzzzzz"
109
- PopupMenu popupNamespace, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
77
+ SetVariable SetProcedureFilter, pos= { 72,33 } , size= { 229,18 } , proc= CodeBrowserModule# SetVarProcedureFilter, title= "filter"
78
+ SetVariable SetProcedureFilter, limits= { - inf , inf ,0 } , value= root: Packages: CodeBrowser: procFilter, live= 1
79
+ SetVariable SetProcedureFilter, help= { "Filter procedures matching the specified filter pattern from the selected namespace context." }
80
+ SetVariable SetProcedureFilter, userdata ( ResizeControlsInfo) = A"!!,EJ!!#=g!!#At!!#<Hz!!#`-A7TLfzzzzzzzzzzzzzz!!#`-A7TLfzz"
81
+ SetVariable SetProcedureFilter, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:DuaGl<C]S6zzzzzzzzzz"
82
+ SetVariable SetProcedureFilter, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
83
+
84
+ SetVariable SetSearch, pos= { 125,81 } , size= { 175.00,18.00 } , proc= CodeBrowserModule# SetVarProcedureSearch, title= "search"
85
+ SetVariable SetSearch, limits= { - inf , inf ,0 } , value= root: Packages: CodeBrowser: search, live= 1
86
+ SetVariable SetSearch, help= { "Search for elements in the list below. Search patterns will be automatically appended with leading and trailing wildcards." }
87
+ SetVariable SetSearch, userdata ( ResizeControlsInfo) = A"!!,F_!!#?[!!#A>!!#<Hz!!#](Aon#azzzzzzzzzzzzzz!!#o2B4uAezz"
88
+ SetVariable SetSearch, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:DuaGl<C]S6zzzzzzzzzz"
89
+ SetVariable SetSearch, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
90
+
91
+ CheckBox CheckboxSort, pos= { 77,83 } , size= { 36.00,15.00 } , proc= CodeBrowserModule# CheckboxSort, title= "sort"
92
+ CheckBox CheckboxSort, value= 1
93
+ CheckBox CheckboxSort, help= { "Sort results alphabetically. Uncheck to sort by line number." }
94
+ CheckBox CheckboxSort, userdata ( ResizeControlsInfo) = A"!!,ET!!#?_!!#=s!!#<(z!!#](Aon#azzzzzzzzzzzzzz!!#`-A7TLfzz"
95
+ CheckBox CheckboxSort, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:DuaGl<C]S6zzzzzzzzzz"
96
+ CheckBox CheckboxSort, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
97
+
98
+ ListBox List1, pos= { 0.00,105.00 } , size= { 300,62 } , proc= CodeBrowserModule# ListBoxProc
99
+ ListBox List1, listWave= root: Packages: CodeBrowser: declarations
100
+ ListBox List1, selCol= 1, widths= { 4,40 } , keySelectCol= 1
101
+ ListBox List1, mode= 5, selRow= 0
102
+ ListBox List1, help= { "Elements matching the search pattern in the selected procedure file(s)" }
103
+ ListBox List1, userdata ( ResizeControlsInfo) = A"!!*'\" !!#@6!!#BP!!#?1z!!#](Aon\" Qzzzzzzzzzzzzzz!!#o2B4uAezz"
104
+ ListBox List1, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#N3Bk1ct<C]S6zzzzzzzzzz"
105
+ ListBox List1, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S7zzzzzzzzzzzzz!!!"
106
+
107
+ PopupMenu PopupProcedure, pos= { 44,53 } , size= { 257.00,19.00 } , bodyWidth=200, proc= CodeBrowserModule# popupProcedures, title= "Procedure"
108
+ PopupMenu PopupProcedure, mode=1, popvalue= "<ALL>" , value= # "CodeBrowserModule#generateProcedureList()"
109
+ PopupMenu PopupProcedure, help= { "Display elements for this procedure file. Set to <ALL> to select all procedures from the current list." }
110
+ PopupMenu PopupProcedure, userdata ( ResizeControlsInfo) = A"!!,D?!!#>b!!#B:J,hm&z!!#`-A7TLfzzzzzzzzzzzzzz!!#`-A7TLfzz"
111
+ PopupMenu PopupProcedure, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:Du]k<zzzzzzzzzzz"
112
+ PopupMenu PopupProcedure, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
113
+
114
+ PopupMenu PopupNamespace, pos= { 36,10 } , size= { 265.00,19.00 } , bodyWidth=200, proc= CodeBrowserModule# popupModules, title= "Namespace"
115
+ PopupMenu PopupNamespace, userdata ( niceList) = "<ALL>;ProcGlobal;COMPILE;CodeBrowserModule;"
116
+ PopupMenu PopupNamespace, mode=1, popvalue= "<ALL>" , value= # "CodeBrowserModule#generateModuleList()"
117
+ PopupMenu PopupNamespace, help= { "NameSpace of Independent Module or ProcGlobal context. Set to <ALL> to ignore the Namespace." }
118
+ PopupMenu PopupNamespace, userdata ( ResizeControlsInfo) = A"!!,Ct!!#;-!!#B>J,hm&z!!#`-A7TLfzzzzzzzzzzzzzz!!#`-A7TLfzz"
119
+ PopupMenu PopupNamespace, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#u:Du]k<zzzzzzzzzzz"
120
+ PopupMenu PopupNamespace, userdata ( ResizeControlsInfo) += A"zzz!!#N3Bk1ct<C]S6zzzzzzzzzzzzz!!!"
110
121
111
122
SetWindow kwTopWin, userdata ( ResizeControlsInfo) = A"!!*'\" z!!#BSJ,hqczzzzzzzzzzzzzzzzzzzzz"
112
123
SetWindow kwTopWin, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzzzzzzzzzzzzzzz"
@@ -145,7 +156,7 @@ Function/S generateModuleList()
145
156
string niceList = getModuleList ()
146
157
niceList = AddListItem ( CB_selectAll, niceList)
147
158
148
- PopupMenu popupNamespace , win=$ panel, userData ( $ userDataNiceList) = niceList
159
+ PopupMenu PopupNamespace , win=$ panel, userData ( $ userDataNiceList) = niceList
149
160
150
161
return niceList
151
162
End
@@ -159,7 +170,7 @@ Function/S generateProcedureList()
159
170
niceList = AddListItem ( CB_selectAll, "" )
160
171
161
172
getProcedureList ( procList, niceList)
162
- PopupMenu popupProcedure , win=$ panel, userData ( $ userDataRawList) = procList, userData ( $ userDataNiceList) = niceList
173
+ PopupMenu PopupProcedure , win=$ panel, userData ( $ userDataRawList) = procList, userData ( $ userDataNiceList) = niceList
163
174
164
175
return niceList
165
176
End
@@ -274,22 +285,22 @@ Function/S getCurrentItem([module, procedure, index])
274
285
endif
275
286
276
287
if ( module)
277
- ControlInfo / W=$ panel popupNamespace
288
+ ControlInfo / W=$ panel PopupNamespace
278
289
279
290
if ( V_Value > 0 )
280
291
return S_Value
281
292
endif
282
293
elseif ( index)
283
- ControlInfo / W=$ panel list 1
294
+ ControlInfo / W=$ panel List 1
284
295
285
296
if ( V_Value >= 0 )
286
297
return num2str ( V_Value)
287
298
endif
288
299
elseif ( procedure)
289
- ControlInfo / W=$ panel popupProcedure
300
+ ControlInfo / W=$ panel PopupProcedure
290
301
V_Value -= 1 // 1-based index
291
302
292
- rawList = GetUserData ( panel, "popupProcedure " , userDataRawList)
303
+ rawList = GetUserData ( panel, "PopupProcedure " , userDataRawList)
293
304
if ( V_Value < 0 || V_Value >= ItemsInList ( rawList))
294
305
if ( ItemsInList ( rawList) > 0 )
295
306
// fall back to first item
@@ -357,11 +368,11 @@ Function getCurrentItemAsNumeric([module, procedure, index, indexTop])
357
368
endif
358
369
359
370
if ( module)
360
- ControlInfo / W=$ panel popupNamespace
371
+ ControlInfo / W=$ panel PopupNamespace
361
372
elseif ( procedure)
362
- ControlInfo / W=$ panel popupProcedure
373
+ ControlInfo / W=$ panel PopupProcedure
363
374
elseif ( index || indexTop)
364
- ControlInfo / W=$ panel list 1
375
+ ControlInfo / W=$ panel List 1
365
376
endif
366
377
367
378
if ( V_Value >= 0 )
@@ -390,7 +401,7 @@ Function updatePopup(ctrlName)
390
401
391
402
ControlUpdate / W=$ panel $ ctrlName
392
403
393
- list = GetUserData ( panel, "popupProcedure " , userDataNiceList)
404
+ list = GetUserData ( panel, "PopupProcedure " , userDataNiceList)
394
405
395
406
if ( ItemsInList ( list) == 1 )
396
407
PopupMenu $ ctrlName win=$ panel, disable=2
@@ -425,7 +436,7 @@ Function popupModules(pa) : PopupMenuControl
425
436
break
426
437
endif
427
438
428
- updatePopup ( "popupProcedure " )
439
+ updatePopup ( "PopupProcedure " )
429
440
430
441
if ( updateListBoxHook () == 0 )
431
442
procedure = getCurrentItem ( procedure = 1 )
@@ -463,7 +474,7 @@ Function popupProcedures(pa) : PopupMenuControl
463
474
return 0
464
475
End
465
476
466
- Function checkboxSort ( cba) : CheckBoxControl
477
+ Function CheckboxSort ( cba) : CheckBoxControl
467
478
STRUCT WMCheckboxAction & cba
468
479
469
480
switch ( cba. eventCode)
479
490
480
491
// returns 0 if checkbox is deselected or 1 if it is selected.
481
492
Function returnCheckBoxSort ()
482
- ControlInfo / W=$ panel checkboxSort
493
+ ControlInfo / W=$ panel CheckboxSort
483
494
if ( V_flag == 2 ) // Checkbox found?
484
495
return V_Value
485
496
else
@@ -488,7 +499,7 @@ Function returnCheckBoxSort()
488
499
endif
489
500
End
490
501
491
- /// @brief Action procedure for the SetVariable @c setSearch
502
+ /// @brief Action procedure for the SetVariable @c SetSearch
492
503
Function SetVarProcedureSearch ( sva) : SetVariableControl
493
504
STRUCT WMSetVariableAction & sva
494
505
@@ -507,7 +518,7 @@ Function SetVarProcedureSearch(sva) : SetVariableControl
507
518
return 0
508
519
End
509
520
510
- /// @brief Action procedure for the SetVariable @c setProcedureFilter
521
+ /// @brief Action procedure for the SetVariable @c SetProcedureFilter
511
522
Function SetVarProcedureFilter ( sva) : SetVariableControl
512
523
STRUCT WMSetVariableAction & sva
513
524
@@ -517,7 +528,7 @@ Function SetVarProcedureFilter(sva) : SetVariableControl
517
528
case 3: // Live update
518
529
Variable dval = sva. dval
519
530
String sval = sva. sval
520
- updatePopup ( "popupProcedure " )
531
+ updatePopup ( "PopupProcedure " )
521
532
updateListBoxHook ()
522
533
break
523
534
case -1: // control being killed
@@ -551,10 +562,10 @@ Function listBoxProc(lba) : ListBoxControl
551
562
break
552
563
case 4: // cell selection
553
564
case 5: // cell selection plus shift key
554
- ControlInfo / W=$ panel list 1
565
+ ControlInfo / W=$ panel List 1
555
566
if ( V_selCol == 0 )
556
567
// forcefully deselect column zero if it is selected
557
- ListBox list 1 , win=$ panel, selCol=1
568
+ ListBox List 1 , win=$ panel, selCol=1
558
569
endif
559
570
break
560
571
case 12: // keystroke
0 commit comments