trigger_ch_control.h

Go to the documentation of this file.
00001 
00002 // Name:        trigger_ch_control.h
00003 // Purpose:     
00004 // Author:      NDA
00005 // Modified by: 
00006 // Created:     05/04/2006 15:38:26
00007 // RCS-ID:      
00008 // Copyright:   CAEN S.p.A All rights reserved.
00009 // Licence:     
00011 
00012 // Generated by DialogBlocks (unregistered), 05/04/2006 15:38:26
00013 
00014 #ifndef _TRIGGER_CH_CONTROL_H_
00015 #define _TRIGGER_CH_CONTROL_H_
00016 
00017 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
00018 #pragma interface "trigger_ch_control.h"
00019 #endif
00020 
00025 
00026 #include "wx/spinctrl.h"
00028 
00029 #include "generic_board.h"
00030 #include "physical_board_channel.h"
00035 
00036 class wxSpinCtrl;
00038 
00043 
00044 #define ID_TRIGGER_CH_DIALOG 10015
00045 #define SYMBOL_TRIGGERCHCONTROL_STYLE 0
00046 #define SYMBOL_TRIGGERCHCONTROL_TITLE _("TriggerChControl")
00047 #define SYMBOL_TRIGGERCHCONTROL_IDNAME ID_TRIGGER_CH_DIALOG
00048 #define SYMBOL_TRIGGERCHCONTROL_SIZE wxSize(400, 300)
00049 #define SYMBOL_TRIGGERCHCONTROL_POSITION wxDefaultPosition
00050 #define ID_THRESHOLD_SPINCTRL 10017
00051 #define ID_THR_SAMPLES_SPINCTRL 10018
00052 
00053 
00058 #ifndef wxCLOSE_BOX
00059 #define wxCLOSE_BOX 0x1000
00060 #endif
00061 
00066 class TriggerChControl: public wxPanel
00067 {    
00068     DECLARE_DYNAMIC_CLASS( TriggerChControl )
00069     DECLARE_EVENT_TABLE()
00070 
00071 public:
00073     TriggerChControl( );
00074     TriggerChControl( wxWindow* parent, wxWindowID id = SYMBOL_TRIGGERCHCONTROL_IDNAME, const wxPoint& pos = SYMBOL_TRIGGERCHCONTROL_POSITION, const wxSize& size = SYMBOL_TRIGGERCHCONTROL_SIZE, long style = SYMBOL_TRIGGERCHCONTROL_STYLE );
00075 
00077     bool Create( wxWindow* parent, wxWindowID id = SYMBOL_TRIGGERCHCONTROL_IDNAME, const wxPoint& pos = SYMBOL_TRIGGERCHCONTROL_POSITION, const wxSize& size = SYMBOL_TRIGGERCHCONTROL_SIZE, long style = SYMBOL_TRIGGERCHCONTROL_STYLE );
00078 
00080     void CreateControls();
00081 
00083 
00085     void OnThresholdSpinctrlUpdated( wxSpinEvent& event );
00086 
00088     void OnThrSamplesSpinctrlUpdated( wxSpinEvent& event );
00089 
00091     void OnThresholdSpinctrlTextUpdated( wxCommandEvent& event );
00092     void OnThrSamplesSpinctrlTextUpdated( wxCommandEvent& event );
00093 
00095 
00097     wxBitmap GetBitmapResource( const wxString& name );
00098 
00100     wxIcon GetIconResource( const wxString& name );
00102 
00104     static bool ShowToolTips();
00105 
00107     wxStaticBox* m_main_sizer_text;
00108     wxSpinCtrl* m_ch_threshold_control;
00109     wxSpinCtrl* m_thr_sample_control;
00111 
00112         bool SetupBoard( GenericBoard* p_board, int ch_index, int ch_count);
00113         bool UpdateControls( );
00114 private: 
00115         // Generic Board pointer
00116         GenericBoard* m_p_board;
00117         PhysicalBoardChannel* m_p_board_channel;
00118         int m_ch_index;
00119         int m_ch_count;
00120         void UpdateThreshold( int value);
00121         void UpdateThrSamples( int value);
00122 };
00123 
00124 #endif
00125     // _TRIGGER_CH_CONTROL_H_

Generated on Mon Mar 19 17:14:08 2007 for CAENScope by  doxygen 1.4.6-NO