00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
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
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