Ignore:
Timestamp:
Feb 21, 2017 1:03:50 PM (6 years ago)
Author:
srkline
Message:

minor changes to prefix functions with "V_" to avoid conflicts with non-VSANS functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Test_RAW_Panel.ipf

    r1023 r1024  
    3333// -- add a procedure to define the global variables for pos, counts, QxQy, etc. 
    3434// 
    35 Proc UpdateDisplayInformation(type) 
     35Proc V_UpdateDisplayInformation(type) 
    3636        String type  
    3737         
     
    5151         
    5252        // fake a click on all three tabs - to populate the data 
    53         FakeTabClick(2) 
    54         FakeTabClick(1) 
    55         FakeTabClick(0) 
    56  
    57         LogLinDisplayPref()             // resets the display depending on the preference state 
     53        V_FakeTabClick(2) 
     54        V_FakeTabClick(1) 
     55        V_FakeTabClick(0) 
     56 
     57        V_LogLinDisplayPref()           // resets the display depending on the preference state 
    5858         
    5959        // either clear the status, or fake a click 
    6060//      root:Packages:NIST:VSANS:Globals:gStatusText = "status info box" 
    6161 
    62         FakeStatusButtonClick() 
     62        V_FakeStatusButtonClick() 
    6363 
    6464         
     
    7272end 
    7373 
    74 Function LogLinDisplayPref() 
     74Function V_LogLinDisplayPref() 
    7575 
    7676        // get the state of the log/lin button, and make sure preferences are obeyed 
     
    8484                STRUCT WMButtonAction ba 
    8585                ba.eventCode = 2                //fake mouse click 
    86                 LogLinButtonProc(ba) 
     86                V_LogLinButtonProc(ba) 
    8787        endif 
    8888         
     
    151151 
    152152 
    153         TabControl tab0,pos={13,41},size={572,617},proc=VDataTabProc,tabLabel(0)="Front" 
     153        TabControl tab0,pos={13,41},size={572,617},proc=V_DataTabProc,tabLabel(0)="Front" 
    154154        TabControl tab0,tabLabel(1)="Middle",tabLabel(2)="Back",value= 2,focusRing=0 
    155155 
    156156// on the side   
    157         Button button_status,pos={607,146},size={70,20},proc=StatusButtonProc,title="Status" 
    158         Button button_IvsQ,pos={689,113},size={70,20},proc=IvsQPanelButtonProc,title="I vs. Q" 
    159         Button button_file_m,pos={619,55},size={50,20},proc=File_minus_ButtonProc,title="File <" 
    160         Button button_file_p,pos={679,55},size={50,20},proc=File_plus_ButtonProc,title="File >" 
    161         Button button_log,pos={689,146},size={70,20},proc=LogLinButtonProc,title="isLin",userData="0" 
    162         Button button_tab_p,pos={648,81},size={50,20},proc=Tab_p_ButtonProc,title="Tab >" 
    163         Button button_isolate,pos={606,114},size={70,20},proc=IsolateButtonProc,title="Isolate" 
    164         Button button_toWork,pos={770,113},size={70,20},proc=ToWorkFileButtonProc,title="to WORK" 
     157        Button button_status,pos={607,146},size={70,20},proc=V_StatusButtonProc,title="Status" 
     158        Button button_IvsQ,pos={689,113},size={70,20},proc=V_IvsQPanelButtonProc,title="I vs. Q" 
     159        Button button_file_m,pos={619,55},size={50,20},proc=V_File_minus_ButtonProc,title="File <" 
     160        Button button_file_p,pos={679,55},size={50,20},proc=V_File_plus_ButtonProc,title="File >" 
     161        Button button_log,pos={689,146},size={70,20},proc=V_LogLinButtonProc,title="isLin",userData="0" 
     162        Button button_tab_p,pos={648,81},size={50,20},proc=V_Tab_p_ButtonProc,title="Tab >" 
     163        Button button_isolate,pos={606,114},size={70,20},proc=V_IsolateButtonProc,title="Isolate" 
     164        Button button_toWork,pos={770,113},size={70,20},proc=V_ToWorkFileButtonProc,title="to WORK" 
    165165 
    166166        TitleBox title_file,pos={606,178},size={76,20},variable= root:Packages:NIST:VSANS:Globals:gLastLoadedFile 
     
    168168        TitleBox title_status,pos={606,240},size={200,200},variable= root:Packages:NIST:VSANS:Globals:gStatusText 
    169169         
    170         Button button_tagFile,pos={603,412},size={70,20},proc=TagFileButtonProc,title="Tag File" 
     170        Button button_tagFile,pos={603,412},size={70,20},proc=V_TagFileButtonProc,title="Tag File" 
    171171        Button button_tagFile,disable=2 
    172         Button button_saveIQ,pos={720,412},size={70,20},proc=SaveIQ_ButtonProc,title="Save I(Q)" 
    173         Button button_BeamCtr,pos={603,450},size={70,20},proc=BeamCtrButtonProc,title="Beam Ctr" 
    174         Button button_SpreadPanels,pos={603,488},size={100,20},proc=SpreadPanelButtonProc,title="Spread Panels" 
    175         Button button_RestorePanels,pos={603,526},size={100,20},proc=RestorePanelButtonProc,title="Restore Panels" 
     172        Button button_saveIQ,pos={720,412},size={70,20},proc=V_SaveIQ_ButtonProc,title="Save I(Q)" 
     173        Button button_BeamCtr,pos={603,450},size={70,20},proc=V_BeamCtrButtonProc,title="Beam Ctr" 
     174        Button button_SpreadPanels,pos={603,488},size={100,20},proc=V_SpreadPanelButtonProc,title="Spread Panels" 
     175        Button button_RestorePanels,pos={603,526},size={100,20},proc=V_RestorePanelButtonProc,title="Restore Panels" 
    176176 
    177177 
    178178// on the tabs, always visible 
    179179        TitleBox title_xy,pos={24,71},size={76,20},variable= root:Packages:NIST:VSANS:Globals:gLastLoadedFile 
    180         Slider slider_hi,pos={558,224},size={16,80},proc=HiMapSliderProc 
     180        Slider slider_hi,pos={558,224},size={16,80},proc=V_HiMapSliderProc 
    181181        Slider slider_hi,limits={0,1,0},value= 1,ticks= 0 
    182         Slider slider_lo,pos={558,315},size={16,80},proc=LowMapSliderProc 
     182        Slider slider_lo,pos={558,315},size={16,80},proc=V_LowMapSliderProc 
    183183        Slider slider_lo,limits={0,1,0},value= 0,ticks= 0 
    184184 
     
    445445// 
    446446// 
    447 Function VDataTabProc(tca) : TabControl 
     447Function V_DataTabProc(tca) : TabControl 
    448448        STRUCT WMTabControlAction &tca 
    449449 
     
    648648 
    649649// fake restore panels button click 
    650 Function FakeRestorePanelsButtonClick() 
     650Function V_FakeRestorePanelsButtonClick() 
    651651 
    652652        STRUCT WMButtonAction ba 
    653653        ba.eventCode = 2 
    654         RestorePanelButtonProc(ba) 
     654        V_RestorePanelButtonProc(ba) 
    655655         
    656656        return(0) 
     
    659659 
    660660// fake status button click 
    661 Function FakeStatusButtonClick() 
     661Function V_FakeStatusButtonClick() 
    662662 
    663663        STRUCT WMButtonAction ba 
    664664        ba.eventCode = 2 
    665         StatusButtonProc(ba) 
     665        V_StatusButtonProc(ba) 
    666666         
    667667        return(0) 
     
    669669 
    670670// fake click on each tab to populate the data 
    671 Function FakeTabClick(tab) 
     671Function V_FakeTabClick(tab) 
    672672        Variable tab 
    673673         
     
    676676        tca.eventCode = 2               //fake mouse up 
    677677        tca.tab = tab 
    678         VDataTabProc(tca) 
     678        V_DataTabProc(tca) 
    679679         
    680680        TabControl tab0,win=VSANS_Data,value= tab               //select the proper tab 
     
    686686// move one file number back 
    687687// 
    688 Function File_minus_ButtonProc(ba) : ButtonControl 
     688Function V_File_minus_ButtonProc(ba) : ButtonControl 
    689689        STRUCT WMButtonAction &ba 
    690690 
     
    706706// move one file number forward 
    707707// 
    708 Function File_plus_ButtonProc(ba) : ButtonControl 
     708Function V_File_plus_ButtonProc(ba) : ButtonControl 
    709709        STRUCT WMButtonAction &ba 
    710710 
     
    726726// only goes one direction 
    727727// 
    728 Function Tab_p_ButtonProc(ba) : ButtonControl 
     728Function V_Tab_p_ButtonProc(ba) : ButtonControl 
    729729        STRUCT WMButtonAction &ba 
    730730 
     
    738738                                V_Value = 0             //reset to 0 
    739739                        endif 
    740                         FakeTabClick(V_Value) 
     740                        V_FakeTabClick(V_Value) 
    741741 
    742742// update the status when the tab is clicked                     
    743743                        STRUCT WMButtonAction sa 
    744744                        sa.eventCode = 2 
    745                         StatusButtonProc(sa) 
     745                        V_StatusButtonProc(sa) 
    746746 
    747747                        break 
     
    762762// - like being able to turn corrections on/off and view with different axes (pix, mm, Q) 
    763763// 
    764 Function IsolateButtonProc(ba) : ButtonControl 
     764Function V_IsolateButtonProc(ba) : ButtonControl 
    765765        STRUCT WMButtonAction &ba 
    766766 
     
    784784// -- if the data type is not RAW, can I Copy Folder instead? 
    785785// 
    786 Function ToWorkFileButtonProc(ba) : ButtonControl 
     786Function V_ToWorkFileButtonProc(ba) : ButtonControl 
    787787        STRUCT WMButtonAction &ba 
    788788 
     
    791791                        // click code here 
    792792                        //Convert_to_Workfile(newtype, doadd) // a proc 
    793                         Execute "Convert_to_Workfile()" 
     793                        Execute "V_Convert_to_Workfile()" 
    794794 
    795795                        break 
     
    809809// -- currently just the graph, no controls 
    810810// -- this re-bins the data every time by calling V_QBinAllPanels(folderStr) 
    811 Function IvsQPanelButtonProc(ba) : ButtonControl 
     811Function V_IvsQPanelButtonProc(ba) : ButtonControl 
    812812        STRUCT WMButtonAction &ba 
    813813 
     
    831831// - lots to decide here about what is the important stuff to display. There's a lot more information for VSANS 
    832832// 
    833 Function StatusButtonProc(ba) : ButtonControl 
     833Function V_StatusButtonProc(ba) : ButtonControl 
    834834        STRUCT WMButtonAction &ba 
    835835 
     
    890890// toggle the (z) value of the display log/lin 
    891891// 
    892 Function LogLinButtonProc(ba) : ButtonControl 
     892Function V_LogLinButtonProc(ba) : ButtonControl 
    893893        STRUCT WMButtonAction &ba 
    894894 
     
    957957// like their intent, or other values that reduction will need, kind of like a "quick patch" 
    958958// with limited functionality (since full function would be a nightmare!)  
    959 Function TagFileButtonProc(ba) : ButtonControl 
    960         STRUCT WMButtonAction &ba 
    961  
    962         switch( ba.eventCode ) 
    963                 case 2: // mouse up 
    964                         // click code here 
    965                         DoAlert 0, "TagFileButtonProc(ba) unfinished - thes may be used to 'tag' a file as scatter, trans, emp, bkg, etc." 
     959Function V_TagFileButtonProc(ba) : ButtonControl 
     960        STRUCT WMButtonAction &ba 
     961 
     962        switch( ba.eventCode ) 
     963                case 2: // mouse up 
     964                        // click code here 
     965                        DoAlert 0, "TagFileButtonProc(ba) unfinished - this may be used to 'tag' a file as scatter, trans, emp, bkg, etc." 
    966966                         
    967967                                 
     
    979979// -- maybe allow save of single panels? 
    980980// -- any other options? 
    981 Function SaveIQ_ButtonProc(ba) : ButtonControl 
     981Function V_SaveIQ_ButtonProc(ba) : ButtonControl 
    982982        STRUCT WMButtonAction &ba 
    983983 
     
    10001000//link this to the beam center finding panel 
    10011001// 
    1002 Function BeamCtrButtonProc(ba) : ButtonControl 
     1002Function V_BeamCtrButtonProc(ba) : ButtonControl 
    10031003        STRUCT WMButtonAction &ba 
    10041004 
     
    10191019// this "spreads" the display of panels to a nominal separation for easier viewing 
    10201020// 
    1021 Function SpreadPanelButtonProc(ba) : ButtonControl 
     1021Function V_SpreadPanelButtonProc(ba) : ButtonControl 
    10221022        STRUCT WMButtonAction &ba 
    10231023 
     
    10391039// this "restores" the display of panels to their actual position based on the apparent beam center 
    10401040// 
    1041 Function RestorePanelButtonProc(ba) : ButtonControl 
     1041Function V_RestorePanelButtonProc(ba) : ButtonControl 
    10421042        STRUCT WMButtonAction &ba 
    10431043 
     
    10611061// -- see Buttons.ipf for the old SANS implementation 
    10621062// 
    1063 Function HiMapSliderProc(sa) : SliderControl 
     1063Function V_HiMapSliderProc(sa) : SliderControl 
    10641064        STRUCT WMSliderAction &sa 
    10651065 
     
    10711071                                Variable curval = sa.curval 
    10721072                                ControlInfo tab0 
    1073                                 FakeTabClick(V_Value) 
     1073                                V_FakeTabClick(V_Value) 
    10741074                                 
    10751075//                              ControlInfo slider_lo 
     
    10881088// -- see Buttons.ipf for the old SANS implementation 
    10891089// 
    1090 Function LowMapSliderProc(sa) : SliderControl 
     1090Function V_LowMapSliderProc(sa) : SliderControl 
    10911091        STRUCT WMSliderAction &sa 
    10921092 
     
    10981098                                Variable curval = sa.curval 
    10991099                                ControlInfo tab0 
    1100                                 FakeTabClick(V_Value) 
     1100                                V_FakeTabClick(V_Value) 
    11011101 
    11021102//                              ControlInfo slider_hi 
Note: See TracChangeset for help on using the changeset viewer.