Ignore:
Timestamp:
Dec 3, 2012 3:31:37 PM (10 years ago)
Author:
srkline
Message:

adding buttons on the Event Panel for adjusting events and making custom bins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/EventModeProcessing.ipf

    r881 r882  
    169169        Button button5,pos={175,147},size={140,20},proc=ExportSlicesButtonProc,title="Export Slices as VAX" 
    170170        Button button6,pos={378,13},size={40,20},proc=EventModeHelpButtonProc,title="?" 
     171 
     172        Button button7,pos={175+155,122},size={140,20},proc=AdjustEventDataButtonProc,title="Adjust Events" 
     173        Button button8,pos={175+155,147},size={140,20},proc=CustomBinButtonProc,title="Custom Bins" 
    171174         
    172175        Button button1,pos = {10,50}, size={150,20},title="Process Data",fSize=12 
     
    201204        SetActiveSubwindow ## 
    202205EndMacro 
     206 
     207 
     208Function AdjustEventDataButtonProc(ba) : ButtonControl 
     209        STRUCT WMButtonAction &ba 
     210 
     211        switch( ba.eventCode ) 
     212                case 2: // mouse up 
     213                        // click code here 
     214                        Execute "EventCorrectionPanel()" 
     215                        // 
     216                        break 
     217                case -1: // control being killed 
     218                        break 
     219        endswitch 
     220 
     221        return 0 
     222End 
     223 
     224Function CustomBinButtonProc(ba) : ButtonControl 
     225        STRUCT WMButtonAction &ba 
     226 
     227        switch( ba.eventCode ) 
     228                case 2: // mouse up 
     229                        // click code here 
     230                        Execute "Show_CustomBinPanel()" 
     231                        // 
     232                        break 
     233                case -1: // control being killed 
     234                        break 
     235        endswitch 
     236 
     237        return 0 
     238End 
     239Show_CustomBinPanel() 
     240 
    203241 
    204242Function ShowEventDataButtonProc(ba) : ButtonControl 
     
    16371675                ModifyGraph msize=1 
    16381676//              SetAxis/A=2 left                        //only autoscale the visible data (based on the bottom limits) 
    1639 //              SetAxis bottom 0,1500 
     1677                SetAxis bottom 0,1500 
    16401678                ErrorBars rescaledTime OFF  
    16411679                Label left "\\Z14Time (seconds)" 
     
    18651903////////////// Post-processing of the event mode data 
    18661904 
    1867 Macro EventCorrectionPanel() 
     1905Proc EventCorrectionPanel() 
    18681906 
    18691907        PauseUpdate; Silent 1           // building window... 
     
    21432181// trying to draw the panel 
    21442182// 
    2145 Macro Show_CustomBinPanel() 
     2183Proc Show_CustomBinPanel() 
    21462184        DoWindow/F CustomBinPanel 
    21472185        if(V_flag ==0) 
Note: See TracChangeset for help on using the changeset viewer.