11#pragma rtGlobals=3
2- #pragma version=1.0
2+ #pragma version=1.3
33#pragma IgorVersion = 6.3.0
44#pragma IndependentModule= CodeBrowserModule
55
66#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.
913
1014Constant panelWidth = 307
1115Constant panelHeight = 170
@@ -24,6 +28,7 @@ static StrConstant userDataNiceList = "niceList"
2428static StrConstant oneTimeInitUserData = "oneTimeInit"
2529
2630static StrConstant genericError = "_error_"
31+
2732Function /S GetPanel ()
2833 return panel
2934End
@@ -51,14 +56,14 @@ Function createPanel()
5156 setGlobalStr ( "search" , prefs. search)
5257
5358 CodeBrowserPanel ()
54- ListBox list 1 , win = $ panel, listWave= getDeclWave ()
59+ ListBox List 1 , win = $ panel, listWave= getDeclWave ()
5560#if ( IgorVersion () >= 8.00 )
56- ListBox list 1 , win = $ panel, helpWave= getHelpWave ()
61+ ListBox List 1 , win = $ panel, helpWave= getHelpWave ()
5762#endif
5863
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
6267
6368 resizeToPackagePrefs ()
6469 DoUpdate / W=$ panel
6974///
7075/// Note that all functions act on the current top panel
7176Function 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!!!"
110121
111122 SetWindow kwTopWin, userdata ( ResizeControlsInfo) = A"!!*'\" z!!#BSJ,hqczzzzzzzzzzzzzzzzzzzzz"
112123 SetWindow kwTopWin, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzzzzzzzzzzzzzzz"
@@ -145,7 +156,7 @@ Function/S generateModuleList()
145156 string niceList = getModuleList ()
146157 niceList = AddListItem ( CB_selectAll, niceList)
147158
148- PopupMenu popupNamespace , win=$ panel, userData ( $ userDataNiceList) = niceList
159+ PopupMenu PopupNamespace , win=$ panel, userData ( $ userDataNiceList) = niceList
149160
150161 return niceList
151162End
@@ -159,7 +170,7 @@ Function/S generateProcedureList()
159170 niceList = AddListItem ( CB_selectAll, "" )
160171
161172 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
163174
164175 return niceList
165176End
@@ -274,22 +285,22 @@ Function/S getCurrentItem([module, procedure, index])
274285 endif
275286
276287 if ( module)
277- ControlInfo / W=$ panel popupNamespace
288+ ControlInfo / W=$ panel PopupNamespace
278289
279290 if ( V_Value > 0 )
280291 return S_Value
281292 endif
282293 elseif ( index)
283- ControlInfo / W=$ panel list 1
294+ ControlInfo / W=$ panel List 1
284295
285296 if ( V_Value >= 0 )
286297 return num2str ( V_Value)
287298 endif
288299 elseif ( procedure)
289- ControlInfo / W=$ panel popupProcedure
300+ ControlInfo / W=$ panel PopupProcedure
290301 V_Value -= 1 // 1-based index
291302
292- rawList = GetUserData ( panel, "popupProcedure " , userDataRawList)
303+ rawList = GetUserData ( panel, "PopupProcedure " , userDataRawList)
293304 if ( V_Value < 0 || V_Value >= ItemsInList ( rawList))
294305 if ( ItemsInList ( rawList) > 0 )
295306 // fall back to first item
@@ -357,11 +368,11 @@ Function getCurrentItemAsNumeric([module, procedure, index, indexTop])
357368 endif
358369
359370 if ( module)
360- ControlInfo / W=$ panel popupNamespace
371+ ControlInfo / W=$ panel PopupNamespace
361372 elseif ( procedure)
362- ControlInfo / W=$ panel popupProcedure
373+ ControlInfo / W=$ panel PopupProcedure
363374 elseif ( index || indexTop)
364- ControlInfo / W=$ panel list 1
375+ ControlInfo / W=$ panel List 1
365376 endif
366377
367378 if ( V_Value >= 0 )
@@ -390,7 +401,7 @@ Function updatePopup(ctrlName)
390401
391402 ControlUpdate / W=$ panel $ ctrlName
392403
393- list = GetUserData ( panel, "popupProcedure " , userDataNiceList)
404+ list = GetUserData ( panel, "PopupProcedure " , userDataNiceList)
394405
395406 if ( ItemsInList ( list) == 1 )
396407 PopupMenu $ ctrlName win=$ panel, disable=2
@@ -425,7 +436,7 @@ Function popupModules(pa) : PopupMenuControl
425436 break
426437 endif
427438
428- updatePopup ( "popupProcedure " )
439+ updatePopup ( "PopupProcedure " )
429440
430441 if ( updateListBoxHook () == 0 )
431442 procedure = getCurrentItem ( procedure = 1 )
@@ -463,7 +474,7 @@ Function popupProcedures(pa) : PopupMenuControl
463474 return 0
464475End
465476
466- Function checkboxSort ( cba) : CheckBoxControl
477+ Function CheckboxSort ( cba) : CheckBoxControl
467478 STRUCT WMCheckboxAction & cba
468479
469480 switch ( cba. eventCode)
479490
480491// returns 0 if checkbox is deselected or 1 if it is selected.
481492Function returnCheckBoxSort ()
482- ControlInfo / W=$ panel checkboxSort
493+ ControlInfo / W=$ panel CheckboxSort
483494 if ( V_flag == 2 ) // Checkbox found?
484495 return V_Value
485496 else
@@ -488,7 +499,7 @@ Function returnCheckBoxSort()
488499 endif
489500End
490501
491- /// @brief Action procedure for the SetVariable @c setSearch
502+ /// @brief Action procedure for the SetVariable @c SetSearch
492503Function SetVarProcedureSearch ( sva) : SetVariableControl
493504 STRUCT WMSetVariableAction & sva
494505
@@ -507,7 +518,7 @@ Function SetVarProcedureSearch(sva) : SetVariableControl
507518 return 0
508519End
509520
510- /// @brief Action procedure for the SetVariable @c setProcedureFilter
521+ /// @brief Action procedure for the SetVariable @c SetProcedureFilter
511522Function SetVarProcedureFilter ( sva) : SetVariableControl
512523 STRUCT WMSetVariableAction & sva
513524
@@ -517,7 +528,7 @@ Function SetVarProcedureFilter(sva) : SetVariableControl
517528 case 3: // Live update
518529 Variable dval = sva. dval
519530 String sval = sva. sval
520- updatePopup ( "popupProcedure " )
531+ updatePopup ( "PopupProcedure " )
521532 updateListBoxHook ()
522533 break
523534 case -1: // control being killed
@@ -551,10 +562,10 @@ Function listBoxProc(lba) : ListBoxControl
551562 break
552563 case 4: // cell selection
553564 case 5: // cell selection plus shift key
554- ControlInfo / W=$ panel list 1
565+ ControlInfo / W=$ panel List 1
555566 if ( V_selCol == 0 )
556567 // forcefully deselect column zero if it is selected
557- ListBox list 1 , win=$ panel, selCol=1
568+ ListBox List 1 , win=$ panel, selCol=1
558569 endif
559570 break
560571 case 12: // keystroke
0 commit comments