source: sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MainPanel.ipf @ 1242

Last change on this file since 1242 was 1242, checked in by srkline, 3 years ago

updating the IgorVersion? pragma to v7.0 for all files to be consistent.

  • Property svn:executable set to *
File size: 18.5 KB
RevLine 
[971]1#pragma rtGlobals=1             // Use modern global access method.
[1242]2#pragma IgorVersion = 7.00
[971]3
4
5//*********************
6//
7//draws main panel of buttons for all data reduction operations
8//panel can't be killed (without really trying)
9// V_initialize() from the VSANS menu will redraw the panel
10//panel simply dispatches to previously written procedures (not functions)
11//
12// **function names are really self-explanatory...see the called function for the real details
13//
14//**********************
15
16
[1050]17//
[971]18//
[1050]19// x- update this to be VSANS-specific, eliminating junk that is SANS only or VAX-specific
[971]20//
21
22
[1050]23//
24// x- decide whether to automatically read in the mask, or not (NO)
25// x- there could be a default mask, or look for the mask that is speficied in the
[994]26// next file that is read in from the path
[1091]27Proc V_PickPath_MainButtonProc(ctrlName) : ButtonControl
[971]28        String ctrlName
29       
[979]30        V_PickPath()
[971]31        // read in DEFAULT.MASK, if it exists, otherwise, do nothing
32        //
[979]33//      PathInfo catPathName
34//      if(V_flag==1)
35//              String str = S_Path + "DEFAULT.MASK"
36//              Variable refnum
37//              Open/R/Z=1 refnum as str
38//              if(strlen(S_filename) != 0)
39//                      Close refnum            //file can be found OK
40//                      ReadMCID_MASK(str)
41//              else
42//                      // file not found, close just in case
43//                      Close/A
44//              endif
45//      endif
[971]46End
47
[1091]48Proc V_DrawMask_MainButtonProc(ctrlName) : ButtonControl
[971]49        String ctrlName
50       
[1024]51        V_Edit_a_Mask()
[971]52End
53
[976]54
[994]55//
[976]56// this will only load the data into RAW, overwriting whatever is there. no copy is put in rawVSANS
57//
[1091]58Proc V_DisplayMainButtonProc(ctrlName) : ButtonControl
[971]59        String ctrlName
60
[994]61        Variable err=   V_LoadHDF5Data("","RAW")                        // load the data
[982]62//      Print "Load err = "+num2str(err)
[971]63        if(!err)
[972]64                String hdfDF = root:file_name                   // last file loaded, may not be the safest way to pass
[976]65                String folder = StringFromList(0,hdfDF,".")
[975]66               
67                // this (in SANS) just passes directly to fRawWindowHook()
[1025]68                V_UpdateDisplayInformation("RAW")               // plot the data in whatever folder type
69                               
[1012]70                // set the global to display ONLY if the load was called from here, not from the
71                // other routines that load data (to read in values)
72                root:Packages:NIST:VSANS:Globals:gLastLoadedFile = root:file_name
73               
[971]74        endif
75End
76
[1091]77Proc V_PatchMainButtonProc(ctrlName) : ButtonControl
[971]78        String ctrlName
79
[1002]80        V_PatchFiles()
[971]81End
82
[1091]83Proc V_Patch_XY_MainButtonProc(ctrlName) : ButtonControl
[1041]84        String ctrlName
85
86        V_PatchDet_xyCenters_Panel()
87End
88
[1091]89Proc V_Patch_DeadTime_MainButtonProc(ctrlName) : ButtonControl
[1041]90        String ctrlName
91
92        V_PatchDetectorDeadtimePanel()
93End
94
[1091]95Proc V_Patch_Calib_MainButtonProc(ctrlName) : ButtonControl
[1041]96        String ctrlName
97
98        V_PatchDetectorCalibrationPanel()
99End
100
101
[1091]102Proc V_TransMainButtonProc(ctrlName) : ButtonControl
[971]103        String ctrlName
104
[1033]105         V_InitTransmissionPanel()
[971]106End
107
[1091]108Proc V_BuildProtocol_MainButtonProc(ctrlName) : ButtonControl
[971]109        String ctrlName
110
[1025]111        V_ReductionProtocolPanel()
[971]112End
113
[1091]114Proc V_ReduceAFile_MainButtonProc(ctrlName) : ButtonControl
[971]115        String ctrlName
116
[1073]117        V_ReductionProtocolPanel()
118//      ReduceAFile()
[971]119End
120
[1091]121Proc V_ReduceMultiple_MainButtonProc(ctrlName) : ButtonControl
[971]122        String ctrlName
123
[1040]124        V_ReduceMultipleFiles()
[971]125End
126
[1091]127Proc V_Plot1D_MainButtonProc(ctrlName) : ButtonControl
[971]128        String ctrlName
129
130        //LoadOneDData()
131        Show_Plot_Manager()
132End
133
[1091]134Proc V_Sort1D_MainButtonProc(ctrlName) : ButtonControl
[971]135        String ctrlName
136
[1039]137//      ShowNSORTPanel()
[1041]138       
[971]139End
140
[1091]141Proc V_Combine1D_MainButtonProc(ctrlName) : ButtonControl
[971]142        String ctrlName
143
[1041]144//      ShowCombinePanel()
145        V_CombineDataGraph()
[971]146End
147
148
[1091]149Proc V_Fit1D_MainButtonProc(ctrlName) : ButtonControl
[971]150        String ctrlName
151
[1086]152        DoAlert 0, "This function has not been updated for VSANS yet..."
153
154//      OpenFITPanel()
[971]155End
156
[1091]157//Proc V_FitRPA_MainButtonProc(ctrlName) : ButtonControl
[984]158//      String ctrlName
159//
160//      OpenFITRPAPanel()
161//End
[971]162
[1091]163Proc V_Subtract1D_MainButtonProc(ctrlName) : ButtonControl
[971]164        String ctrlName
165
166        OpenSubtract1DPanel()
167End
168
[1091]169Proc V_Arithmetic1D_MainButtonProc(ctrlName) : ButtonControl
[971]170        String ctrlName
171
[1086]172        DoAlert 0, "This function has not been updated for VSANS yet..."
173
174//      MakeDAPanel()
[971]175End
176
[1091]177Proc V_DisplayInterm_MainButtonProc(ctrlName) : ButtonControl
[971]178        String ctrlName
179
[981]180        V_ChangeDisplay()
[971]181End
182
[1050]183//
184// - fill in with a proper reader that will display the mask(s)
[1091]185Proc V_ReadMask_MainButtonProc(ctrlName) : ButtonControl
[971]186        String ctrlName
187
[1024]188        DoAlert 0, "Loading MASK data"
189        V_LoadMASKData()
[971]190End
191
[1091]192Proc V_Draw3D_MainButtonProc(ctrlName) : ButtonControl
[971]193        String ctrlName
194
[1095]195//      DoAlert 0, "This function has not been updated for VSANS yet..."
196        DoAlert 0, "Right-click on the image and select '3D Surface from data'"
[1086]197
198//      Plot3DSurface()
199       
[971]200End
201
[1002]202////on Misc Ops tab, generates a notebook
[1091]203//Proc V_CatShort_MainButtonProc(ctrlName) : ButtonControl
[1002]204//      String ctrlName
205//
206//      BuildCatShortNotebook()
207//End
[971]208
209//button is labeled "File Catalog"
[1091]210Proc V_CatVShort_MainButtonProc(ctrlName) : ButtonControl
[971]211        String ctrlName
212
[1002]213        V_BuildCatVeryShortTable()
[971]214End
215
[1091]216Proc V_CatSort_MainButtonProc(ctrlName) : ButtonControl
[1002]217        String ctrlName
218       
[1024]219        V_Catalog_Sort()
[1002]220End
221
[1091]222Proc V_ShowCatShort_MainButtonProc(ctrlName) : ButtonControl
[971]223        String ctrlName
224
225        ShowCATWindow()
226End
227
[1091]228Proc V_ShowSchematic_MainButtonProc(ctrlName) : ButtonControl
[971]229        String ctrlName
230       
231        if(root:myGlobals:isDemoVersion == 1)
232                //      comment out in DEMO_MODIFIED version, and show the alert
233                DoAlert 0,"This operation is not available in the Demo version of IGOR"
234        else
235                ShowSchematic()
236        endif
237End
238
[1091]239Proc V_ShowAvePanel_MainButtonProc(ctrlName) : ButtonControl
[971]240        String ctrlName
241
242        ShowAveragePanel()
243End
244
[1091]245Proc V_HelpMainButtonProc(ctrlName) : ButtonControl
[971]246        String ctrlName
[1203]247        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation"
[971]248        if(V_flag !=0)
[1203]249                DoAlert 0,"The VSANS Data Reduction Help file could not be found"
[971]250        endif
251End
252
[1091]253Proc V_ShowTilePanel_MainButtonProc(ctrlName) : ButtonControl
[971]254        String ctrlName
255       
256        if(root:myGlobals:isDemoVersion == 1)
257                //      comment out in DEMO_MODIFIED version, and show the alert
258                DoAlert 0,"This operation is not available in the Demo version of IGOR"
259        else
260                Show_Tile_2D_Panel()
261        endif
262End
263
[1091]264Proc V_NonLinTubes_MainButtonProc(ctrlName) : ButtonControl
[971]265        String ctrlName
266
[1048]267        V_TubeCoefPanel()
[971]268End
269
[1091]270Proc V_CopyWork_MainButtonProc(ctrlName) : ButtonControl
[971]271        String ctrlName
272
[1024]273        V_CopyWorkFolder()              //will put up missing param dialog
[971]274End
275
[1091]276Proc V_PRODIV_MainButtonProc(ctrlName) : ButtonControl
[971]277        String ctrlName
278
[1085]279        DoWindow/F DIV_Setup_Panel
280        if(V_flag == 0)
281                DIV_Setup_Panel()
282        endif
283       
284        DoWindow/F VSANS_DIVPanels
285        if(V_flag == 0)
286                V_Display_DIV_Panels() 
287        endif
[971]288End
289
290
[1091]291Proc V_WorkMath_MainButtonProc(ctrlName) : ButtonControl
[971]292        String ctrlName
293
294        Show_WorkMath_Panel()
295End
296
[1091]297//Proc V_TISANE_MainButtonProc(ctrlName) : ButtonControl
[971]298//      String ctrlName
299//     
300//      if(exists("Show_TISANE_Panel")==0)
301//              // procedure file was not loaded
302//              DoAlert 0,"This operation is not available in this set of macros"
303//      else
304//              Show_TISANE_Panel()
305//      endif
306//     
307//End
308
[1091]309Proc V_Event_MainButtonProc(ctrlName) : ButtonControl
[971]310        String ctrlName
311       
[1045]312        if(exists("V_Show_Event_Panel")==0)
[971]313                // procedure file was not loaded
[1042]314                DoAlert 0,"Only test procedures exist. See V_VSANS_Event_Testing.ipf"
[971]315        else
[1045]316                V_Show_Event_Panel()
[971]317        endif
318       
319End
320
[1101]321Proc V_Event_MultReduceButtonProc(ctrlName) : ButtonControl
322        String ctrlName
323       
324                V_ReduceEventFilesPanel()
325       
326End
327
[1091]328Proc V_Raw2ASCII_MainButtonProc(ctrlName) : ButtonControl
[971]329        String ctrlName
330
331        Export_RAW_Ascii_Panel()
332End
333
[1091]334Proc V_RealTime_MainButtonProc(ctrlName) : ButtonControl
[971]335        String ctrlName
336
[1029]337        if(exists("V_Init_RT")==0)
[971]338                // procedure file was not loaded
339                DoAlert 0,"This operation is not available in this set of macros"
340        else
[1091]341                V_Show_RealTime_Panel()
[971]342        endif
343End
344
[1091]345Proc V_RTReduce_MainButtonProc(ctrlName) : ButtonControl
[1029]346        String ctrlName
347
348        V_ShowOnlineReductionPanel()
349End
350
[1091]351Proc V_Preferences_MainButtonProc(ctrlName) : ButtonControl
[971]352        String ctrlName
353
[973]354        Show_VSANSPreferences_Panel()
[971]355End
356
[1019]357
[1091]358Proc V_DataTree_MainButtonProc(ctrlName) : ButtonControl
[1019]359        String ctrlName
360
361        V_ShowDataFolderTree()
362End
363
[971]364////////////////////////////////////////////////
365//************* NEW version of Main control Panel *****************
366//
367// button management for the different tabs is handled by consistent
368// naming of each button with its tab number as documented below
369// then MainTabProc() can enable/disable the appropriate buttons for the
370// tab that is displayed
371//
372// panel must be killed and redrawn for new buttons to appear
373//
374Window Main_VSANS_Panel()
375        PauseUpdate; Silent 1           // building window...
[1131]376        NewPanel /W=(500,60,924,320) /K=2 as "VSANS Reduction Controls" + " " + num2str(kVSANSVersion)
[979]377        ModifyPanel cbRGB=(49694,61514,27679)
[971]378        ModifyPanel fixedSize=1
379//////
380//on main portion of panel
[1091]381        Button MainButtonA,pos={8,8},size={80,20},title="Pick Path",proc=V_PickPath_MainButtonProc
[1086]382        Button MainButtonA,help={"Pick the local data folder that contains the VSANS data"}
[1091]383        Button MainButtonB,pos={100,8},size={90,20},proc=V_CatVShort_MainButtonProc,title="File Catalog"
[971]384        Button MainButtonB,help={"This will generate a condensed CATalog table of all files in a specified local folder"}
[1091]385        Button MainButtonC,pos={250,8},size={50,20},proc=V_HelpMainButtonProc,title="Help"
[971]386        Button MainButtonC,help={"Display the help file"}
[1091]387        Button MainButtonD,pos={320,8},size={80,20},proc=V_SR_OpenTracTicketPage,title="Feedback"
[971]388        Button MainButtonD,help={"Submit bug reports or feature requests"}
389       
[1091]390        TabControl MainTab,pos={7,49},size={410,202},tabLabel(0)="Raw Data",proc=V_MainTabProc
[971]391        TabControl MainTab,tabLabel(1)="Reduction",tabLabel(2)="1-D Ops",tabLabel(3)="2-D Ops",tabLabel(4)="Misc Ops"
392        TabControl MainTab,value=0
393        //
[972]394        TabControl MainTab labelBack=(47748,57192,54093)
[971]395       
396//on tab(0) - Raw Data - initially visible
[1091]397        Button MainButton_0a,pos={15,90},size={130,20},proc=V_DisplayMainButtonProc,title="Display Raw Data"
[971]398        Button MainButton_0a,help={"Display will load and plot a single 2-D raw data file"}
[1091]399        Button MainButton_0b,pos={15,120},size={70,20},proc=V_PatchMainButtonProc,title="Patch"
[971]400        Button MainButton_0b,help={"Patch will update incorrect information in raw data headers"}
[1091]401        Button MainButton_0c,pos={15,150},size={110,20},proc=V_TransMainButtonProc,title="Transmission"
[1086]402        Button MainButton_0c,help={"Shows the panel which allows calculation of sample transmissions and patching values into raw data headers"}
[1091]403        Button MainButton_0d,pos={15,180},size={130,20},proc=V_RealTime_MainButtonProc,title="RealTime Display"
[971]404        Button MainButton_0d,help={"Shows the panel for control of the RealTime data display. Only used during data collection"}
[1091]405        Button MainButton_0e,pos={15,210},size={130,20},proc=V_CatSort_MainButtonProc,title="Sort Catalog"
[1002]406        Button MainButton_0e,help={"Sort the Data Catalog, courtesy of ANSTO"}
[1091]407        Button MainButton_0f,pos={300,90},size={90,20},proc=V_DataTree_MainButtonProc,title="Data Tree"
[1019]408        Button MainButton_0f,help={"Show the header and data tree"}
[1091]409        Button MainButton_0g,pos={170,180},size={110,20},proc=V_RTReduce_MainButtonProc,title="RT Reduction"
[1029]410        Button MainButton_0g,help={"Reduce live (incomplete) data files during acquisition"}
[1091]411        Button MainButton_0h,pos={170,90},size={90,20},proc=V_Patch_XY_MainButtonProc,title="Patch XY"
[1086]412        Button MainButton_0h,help={"Easy patching of XY beam center to multiple files"}
[1091]413        Button MainButton_0i,pos={170,120},size={110,20},proc=V_Patch_DeadTime_MainButtonProc,title="Patch DeadTime"
[1086]414        Button MainButton_0i,help={"Easy patching of dead time tables to multiple files"}
[1091]415        Button MainButton_0j,pos={170,150},size={90,20},proc=V_Patch_Calib_MainButtonProc,title="Patch Calib"
[1086]416        Button MainButton_0j,help={"Easy patching of nonlinear calibration tables to multiple files"}
[971]417
418//on tab(1) - Reduction
[1091]419        Button MainButton_1a,pos={15,90},size={110,20},proc=V_BuildProtocol_MainButtonProc,title="Build Protocol"
[971]420        Button MainButton_1a,help={"Shows a panel where the CATalog window is used as input for creating a protocol. Can also be used for standard reductions"}
[1091]421//      Button MainButton_1b,pos={15,120},size={110,20},proc=V_ReduceAFile_MainButtonProc,title="Reduce a File"
[1086]422//      Button MainButton_1b,help={"Presents a questionnare for creating a reduction protocol, then reduces a single file"}
[1091]423        Button MainButton_1c,pos={15,150},size={160,20},proc=V_ReduceMultiple_MainButtonProc,title="Reduce Multiple Files"
[971]424        Button MainButton_1c,help={"Use for reducing multiple raw datasets after protocol(s) have been created"}
[1091]425//      Button MainButton_1d,pos={15,180},size={110,20},proc=V_ShowCatShort_MainButtonProc,title="Show CAT Table"
[1029]426//      Button MainButton_1d,help={"This button will bring the CATalog window to the front, if it exists"}
[971]427        Button MainButton_1a,disable=1
[1086]428//      Button MainButton_1b,disable=1
[971]429        Button MainButton_1c,disable=1
[1029]430//      Button MainButton_1d,disable=1
[971]431
432//on tab(2) - 1-D operations
[1091]433        Button MainButton_2a,pos={15,90},size={60,20},proc=V_Plot1D_MainButtonProc,title="Plot"
[971]434        Button MainButton_2a,help={"Loads and plots a 1-D dataset in the format expected by \"FIT\""}
[1091]435//      Button MainButton_2b,pos={15,120},size={60,20},proc=V_Sort1D_MainButtonProc,title="Sort"
[1041]436//      Button MainButton_2b,help={"Sorts and combines 2 or 3 separate 1-D datasets into a single file. Use \"Plot\" button to import 1-D data files"}
[1091]437        Button MainButton_2c,pos={15,150},size={60,20},proc=V_Fit1D_MainButtonProc,title="FIT"
[971]438        Button MainButton_2c,help={"Shows panel for performing a variety of linearized fits to 1-D data files. Use \"Plot\" button to import 1-D data files"}
[1091]439//      Button MainButton_2d,pos={15,180},size={60,20},proc=V_FITRPA_MainButtonProc,title="FIT/RPA"
[984]440//      Button MainButton_2d,help={"Shows panel for performing a fit to a polymer standard."}
[1091]441//      Button MainButton_2e,pos={120,90},size={90,20},proc=V_Subtract1D_MainButtonProc,title="Subtract 1D"
[971]442//      Button MainButton_2e,help={"Shows panel for subtracting two 1-D data sets"}
[1091]443        Button MainButton_2e,pos={120,90},size={110,20},proc=V_Arithmetic1D_MainButtonProc,title="1D Arithmetic"
[971]444        Button MainButton_2e,help={"Shows panel for doing arithmetic on 1D data sets"}
[1091]445        Button MainButton_2f,pos={120,120},size={130,20},proc=V_Combine1D_MainButtonProc,title="Combine 1D Files"
[1086]446        Button MainButton_2f,help={"Shows panel for selecting points to trim before combining files"}
[971]447        Button MainButton_2a,disable=1
[1041]448//      Button MainButton_2b,disable=1
[971]449        Button MainButton_2c,disable=1
[984]450//      Button MainButton_2d,disable=1
[971]451        Button MainButton_2e,disable=1
452        Button MainButton_2f,disable=1
453
454
455
456//on tab(3) - 2-D Operations
[1091]457        Button MainButton_3a,pos={15,90},size={90,20},proc=V_DisplayInterm_MainButtonProc,title="Display 2D"
[971]458        Button MainButton_3a,help={"Display will plot a 2-D work data file that has previously been created during data reduction"}
[1091]459        Button MainButton_3b,pos={15,120},size={90,20},title="Draw Mask",proc=V_DrawMask_MainButtonProc
[971]460        Button MainButton_3b,help={"Draw a mask file and save it."}
[1091]461        Button MainButton_3c,pos={15,150},size={90,20},proc=V_ReadMask_MainButtonProc,title="Read Mask"
[1086]462        Button MainButton_3c,help={"Reads a mask file into the proper work folder"}
[1091]463//      Button MainButton_3d,pos={15,180},size={100,20},title="Tile RAW 2D",proc=V_ShowTilePanel_MainButtonProc
[1041]464//      Button MainButton_3d,help={"Adds selected RAW data files to a layout."}
[1091]465        Button MainButton_3e,pos={150,90},size={100,20},title="Copy Work",proc=V_CopyWork_MainButtonProc
[971]466        Button MainButton_3e,help={"Copies WORK data from specified folder to destination folder."}
[1091]467//      Button MainButton_3f,pos={150,120},size={110,20},title="WorkFile Math",proc=V_WorkMath_MainButtonProc
[1041]468//      Button MainButton_3f,help={"Perfom simple math operations on workfile data"}
[1101]469        Button MainButton_3g,pos={150,150},size={100,20},title="Event Data",proc=V_Event_MainButtonProc
[1086]470        Button MainButton_3g,help={"Manipulate VSANS Event Mode data"}
[1101]471        Button MainButton_3h,pos={150,180},size={140,20},title="Event Reduction",proc=V_Event_MultReduceButtonProc
472        Button MainButton_3h,help={"Reduce VSANS Event Mode data"}
473               
[971]474       
475        Button MainButton_3a,disable=1
476        Button MainButton_3b,disable=1
477        Button MainButton_3c,disable=1
[1041]478//      Button MainButton_3d,disable=1
[971]479        Button MainButton_3e,disable=1
[1041]480//      Button MainButton_3f,disable=1
[971]481        Button MainButton_3g,disable=1
[1101]482        Button MainButton_3h,disable=1
[971]483
484//on tab(4) - Miscellaneous operations
[1091]485        Button MainButton_4a,pos={15,90},size={80,20},proc=V_Draw3D_MainButtonProc,title="3D Display"
[971]486        Button MainButton_4a,help={"Plots a 3-D surface of the selected file type"}
[1091]487//      Button MainButton_4b,pos={15,120},size={120,20},proc=V_ShowSchematic_MainButtonProc,title="Show Schematic"
[1041]488//      Button MainButton_4b,help={"Use this to show a schematic of the data reduction process for a selected sample file and reduction protocol"}
[1091]489//      Button MainButton_4c,pos={15,150},size={80,20},proc=V_ShowAvePanel_MainButtonProc,title="Average"
[1041]490//      Button MainButton_4c,help={"Shows a panel for interactive selection of the 1-D averaging step"}
[1091]491//      Button MainButton_4d,pos={15,180},size={110,20},proc=V_CatShort_MainButtonProc,title="CAT/Notebook"
[1002]492//      Button MainButton_4d,help={"This will generate a CATalog notebook of all files in a specified local folder"}
[1091]493        Button MainButton_4e,pos={180,90},size={130,20},proc=V_NonLinTubes_MainButtonProc,title="Fit NonLinear Tubes"
[1048]494        Button MainButton_4e,help={""}
[1091]495        Button MainButton_4f,pos={180,120},size={130,20},proc=V_PRODIV_MainButtonProc,title="Make DIV file"
[1086]496        Button MainButton_4f,help={"Displays panels and outlines the steps for generating a detector sensitivity file"}
[1091]497//      Button MainButton_4g,pos={180,150},size={130,20},proc=V_Raw2ASCII_MainButtonProc,title="RAW ASCII Export"
[1041]498//      Button MainButton_4g,help={"Exports selected RAW (2D) data file(s) as ASCII, either as pixel values or I(Qx,Qy)"}
[1091]499        Button MainButton_4h,pos={180,180},size={130,20},proc=V_Preferences_MainButtonProc,title="Preferences"
[971]500        Button MainButton_4h,help={"Sets user preferences for selected parameters"}
501       
502        Button MainButton_4a,disable=1
[1041]503//      Button MainButton_4b,disable=1
504//      Button MainButton_4c,disable=1
[1019]505//      Button MainButton_4d,disable=1
[1048]506        Button MainButton_4e,disable=1
[971]507        Button MainButton_4f,disable=1
[1041]508//      Button MainButton_4g,disable=1
[971]509        Button MainButton_4h,disable=1
510//     
511EndMacro
512
513// function to control the drawing of buttons in the TabControl on the main panel
514// Naming scheme for the buttons MUST be strictly adhered to... else buttons will
515// appear in odd places...
516// all buttons are named MainButton_NA where N is the tab number and A is the letter denoting
517// the button's position on that particular tab.
518// in this way, buttons will always be drawn correctly..
519//
[1091]520Function V_MainTabProc(name,tab)
[971]521        String name
522        Variable tab
523       
524//      Print "name,number",name,tab
525        String ctrlList = ControlNameList("",";"),item="",nameStr=""
526        Variable num = ItemsinList(ctrlList,";"),ii,onTab
527        for(ii=0;ii<num;ii+=1)
528                //items all start w/"MainButton_"
529                item=StringFromList(ii, ctrlList ,";")
530                nameStr=item[0,10]
531                if(cmpstr(nameStr,"MainButton_")==0)
532                        onTab = str2num(item[11])
533                        Button $item,disable=(tab!=onTab)
534                endif
535        endfor
536End
537
538//
[1091]539Function V_SR_OpenTracTicketPage(ctrlName)
[971]540        String ctrlName
541        DoAlert 1,"Your web browser will open to a page where you can submit your bug report or feature request. OK?"
542        if(V_flag==1)
543                BrowseURL "http://danse.chem.utk.edu/trac/newticket"
544        endif
545End
546
Note: See TracBrowser for help on using the repository browser.