00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013
00014 #ifndef _RECORD_CH_CONTROL_H_
00015 #define _RECORD_CH_CONTROL_H_
00016
00017 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
00018 #pragma interface "record_ch_control.h"
00019 #endif
00020
00025
00026 #include "wx/tglbtn.h"
00027 #include "wx/spinctrl.h"
00029
00030 #include "generic_board.h"
00031
00036
00037 class wxToggleButton;
00038 class wxSpinCtrl;
00040
00045
00046 #define ID_RECORD_CH_DIALOG 10015
00047 #define SYMBOL_RECORDCHCONTROL_STYLE 0
00048 #define SYMBOL_RECORDCHCONTROL_TITLE _("RecordChControl")
00049 #define SYMBOL_RECORDCHCONTROL_IDNAME ID_RECORD_CH_DIALOG
00050 #define SYMBOL_RECORDCHCONTROL_SIZE wxSize(400, 300)
00051 #define SYMBOL_RECORDCHCONTROL_POSITION wxDefaultPosition
00052 #define ID_TOGGLEBUTTON 10001
00053 #define ID_RATE_DIVIDER_SPINCTRL 10017
00054 #define ID_FORMAT_CHOICE 10032
00055
00056
00061 #ifndef wxCLOSE_BOX
00062 #define wxCLOSE_BOX 0x1000
00063 #endif
00064
00069 class RecordChControl: public wxPanel
00070 {
00071 DECLARE_DYNAMIC_CLASS( RecordChControl )
00072 DECLARE_EVENT_TABLE()
00073
00074 public:
00076 RecordChControl( );
00077 RecordChControl( wxWindow* parent, wxWindowID id = SYMBOL_RECORDCHCONTROL_IDNAME, const wxPoint& pos = SYMBOL_RECORDCHCONTROL_POSITION, const wxSize& size = SYMBOL_RECORDCHCONTROL_SIZE, long style = SYMBOL_RECORDCHCONTROL_STYLE );
00078
00080 bool Create( wxWindow* parent, wxWindowID id = SYMBOL_RECORDCHCONTROL_IDNAME, const wxPoint& pos = SYMBOL_RECORDCHCONTROL_POSITION, const wxSize& size = SYMBOL_RECORDCHCONTROL_SIZE, long style = SYMBOL_RECORDCHCONTROL_STYLE );
00081
00083 void CreateControls();
00084
00086
00088 void OnTogglebuttonClick( wxCommandEvent& event );
00089
00091 void OnRateDividerSpinctrlUpdated( wxSpinEvent& event );
00092
00094 void OnFormatChoiceSelected( wxCommandEvent& event );
00095
00097 void OnRateDividerSpinctrlTextUpdated( wxCommandEvent& event );
00098
00100
00102 wxBitmap GetBitmapResource( const wxString& name );
00103
00105 wxIcon GetIconResource( const wxString& name );
00107
00109 static bool ShowToolTips();
00110
00112 wxStaticBox* m_main_sizer_text;
00113 wxToggleButton* m_ch_enable_control;
00114 wxSpinCtrl* m_ch_rate_divider_control;
00115 wxChoice* m_format_control;
00117
00118 bool SetupBoard( GenericBoard* p_board, int ch_index, int ch_count, bool is_virtual);
00119 bool UpdateControls( void);
00120 void UpdateRateDivider( int value);
00121 private:
00122 bool m_is_virtual;
00123
00124 GenericBoard* m_p_board;
00125 GenericBoardChannel* m_p_board_channel;
00126 int m_ch_index;
00127 int m_ch_count;
00128
00129 };
00130
00131 #endif
00132