Skip to content

Commit bffcf7e

Browse files
committed
changes
1 parent 9bd75f0 commit bffcf7e

File tree

4 files changed

+467
-0
lines changed

4 files changed

+467
-0
lines changed

Packages/MIES/MIES_Utilities_GUI.ipf

+18
Original file line numberDiff line numberDiff line change
@@ -749,3 +749,21 @@ Function RemoveAllDrawLayers(string win)
749749
SetDrawLayer/W=$win/K UserAxes
750750
endif
751751
End
752+
753+
Function/S GetUnusedWindowName(string baseName)
754+
755+
variable i
756+
string wName
757+
758+
if(!WindowExists(baseName))
759+
return baseName
760+
endif
761+
762+
for(;;)
763+
wName = baseName + num2istr(i)
764+
if(!WindowExists(wName))
765+
return wName
766+
endif
767+
i += 1
768+
endfor
769+
End

Packages/MIES/MIES_WaveDataFolderGetters.ipf

+134
Original file line numberDiff line numberDiff line change
@@ -8934,3 +8934,137 @@ threadsafe Function/WAVE GetTPAnalysisDataWave()
89348934

89358935
return tpData
89368936
End
8937+
8938+
/// @name Waveref Browser
8939+
///@{
8940+
8941+
/// @brief Returns string path to Waveref Browser home data folder
8942+
///
8943+
/// UTF_NOINSTRUMENTATION
8944+
Function/S GetWaverefBrowserHomeStr()
8945+
8946+
return "root:Packages:WaverefBrowser"
8947+
End
8948+
8949+
/// @brief Returns reference to Waveref Browser home data folder
8950+
///
8951+
/// UTF_NOINSTRUMENTATION
8952+
Function/DF GetWaverefBRowserHomeDF()
8953+
8954+
return createDFWithAllParents(GetWaverefBrowserHomeStr())
8955+
End
8956+
8957+
Function/WAVE GetWaverefBRowserListWave()
8958+
8959+
variable version = 1
8960+
string name = "listWave"
8961+
8962+
DFREF dfr = GetWaverefBRowserHomeDF()
8963+
8964+
WAVE/Z/T/SDFR=dfr wv = $name
8965+
8966+
if(ExistsWithCorrectLayoutVersion(wv, version))
8967+
return wv
8968+
endif
8969+
8970+
if(WaveExists(wv))
8971+
// upgrade here
8972+
else
8973+
Make/T/N=(0) dfr:$name/WAVE=wv
8974+
endif
8975+
8976+
return wv
8977+
End
8978+
8979+
Function/WAVE GetWaverefBRowserSelectionWave()
8980+
8981+
variable version = 1
8982+
string name = "selectionWave"
8983+
8984+
DFREF dfr = GetWaverefBRowserHomeDF()
8985+
8986+
WAVE/Z/SDFR=dfr wv = $name
8987+
8988+
if(ExistsWithCorrectLayoutVersion(wv, version))
8989+
return wv
8990+
endif
8991+
8992+
if(WaveExists(wv))
8993+
// upgrade here
8994+
else
8995+
Make/N=(0, 1, 3) dfr:$name/WAVE=wv
8996+
endif
8997+
8998+
SetDimLabel LAYERS, 1, $LISTBOX_LAYER_FOREGROUND, wv
8999+
SetDimLabel LAYERS, 2, $LISTBOX_LAYER_BACKGROUND, wv
9000+
9001+
return wv
9002+
End
9003+
9004+
Function/WAVE GetWaverefBRowserColorWave()
9005+
9006+
variable version = 1
9007+
string name = "colorWave"
9008+
9009+
DFREF dfr = GetWaverefBRowserHomeDF()
9010+
9011+
WAVE/Z/U/W/SDFR=dfr wv = $name
9012+
9013+
if(ExistsWithCorrectLayoutVersion(wv, version))
9014+
return wv
9015+
endif
9016+
9017+
if(WaveExists(wv))
9018+
// upgrade here
9019+
else
9020+
Make/W/U/N=(5, 3) dfr:$name/WAVE=wv
9021+
endif
9022+
9023+
SetDimLabel COLS, 0, R, wv
9024+
SetDimLabel COLS, 1, G, wv
9025+
SetDimLabel COLS, 2, B, wv
9026+
9027+
wv[1][%R] = 255
9028+
wv[1][%G] = 255
9029+
wv[1][%B] = 229
9030+
9031+
wv[2][%R] = 229
9032+
wv[2][%G] = 255
9033+
wv[2][%B] = 229
9034+
9035+
wv[3][%R] = 255
9036+
wv[3][%G] = 229
9037+
wv[3][%B] = 229
9038+
9039+
wv[4][%R] = 229
9040+
wv[4][%G] = 255
9041+
wv[4][%B] = 255
9042+
9043+
wv = wv << 8
9044+
9045+
return wv
9046+
End
9047+
9048+
Function/WAVE GetWaverefBRowserReferenceWave()
9049+
9050+
variable version = 1
9051+
string name = "referenceWave"
9052+
9053+
DFREF dfr = GetWaverefBRowserHomeDF()
9054+
9055+
WAVE/Z/WAVE/SDFR=dfr wv = $name
9056+
9057+
if(ExistsWithCorrectLayoutVersion(wv, version))
9058+
return wv
9059+
endif
9060+
9061+
if(WaveExists(wv))
9062+
// upgrade here
9063+
else
9064+
Make/WAVE/N=(0) dfr:$name/WAVE=wv
9065+
endif
9066+
9067+
return wv
9068+
End
9069+
9070+
///@}

0 commit comments

Comments
 (0)