view_ch_control.h

Go to the documentation of this file.
00001 
00002 // Name:        view_ch_control.h
00003 // Purpose:     
00004 // Author:      NDA
00005 // Modified by: 
00006 // Created:     06/04/2006 10:37:55
00007 // RCS-ID:      
00008 // Copyright:   CAEN S.p.A All rights reserved.
00009 // Licence:     
00011 
00012 // Generated by DialogBlocks (unregistered), 06/04/2006 10:37:55
00013 
00014 #ifndef _VIEW_CH_CONTROL_H_
00015 #define _VIEW_CH_CONTROL_H_
00016 
00017 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
00018 #pragma interface "view_ch_control.h"
00019 #endif
00020 
00025 
00026 #include "wx/tglbtn.h"
00027 #include "wx/spinctrl.h"
00028 #include "wx/spinbutt.h"
00030 
00031 #include "generic_board.h"
00032 
00037 
00038 class wxToggleButton;
00039 class wxSpinCtrl;
00040 class wxSpinButton;
00042 
00047 
00048 #define ID_DIALOG 10027
00049 #define SYMBOL_VIEWCHCONTROL_STYLE 0
00050 #define SYMBOL_VIEWCHCONTROL_TITLE _("ViewChControl")
00051 #define SYMBOL_VIEWCHCONTROL_IDNAME ID_DIALOG
00052 #define SYMBOL_VIEWCHCONTROL_SIZE wxSize(400, 300)
00053 #define SYMBOL_VIEWCHCONTROL_POSITION wxDefaultPosition
00054 #define ID_VIEW_ENABLE_TOGGLEBUTTON 10002
00055 #define ID_COLOR_PANEL 10029
00056 #define ID_CHOOSE_COLOR_BUTTON 10028
00057 #define ID_LINE_WIDTH_SPINCTRL 10031
00058 #define ID_OFFSET_Y_RESET_BUTTON 10035
00059 #define ID_SPINBUTTON1 10034
00060 #define ID_VOLT_PER_DIV_SPINCTRL 10001
00061 
00062 
00067 #ifndef wxCLOSE_BOX
00068 #define wxCLOSE_BOX 0x1000
00069 #endif
00070 
00075 class ViewChControl: public wxPanel
00076 {    
00077     DECLARE_DYNAMIC_CLASS( ViewChControl )
00078     DECLARE_EVENT_TABLE()
00079 
00080 public:
00082     ViewChControl( );
00083     ViewChControl( wxWindow* parent, wxWindowID id = SYMBOL_VIEWCHCONTROL_IDNAME, const wxPoint& pos = SYMBOL_VIEWCHCONTROL_POSITION, const wxSize& size = SYMBOL_VIEWCHCONTROL_SIZE, long style = SYMBOL_VIEWCHCONTROL_STYLE );
00084 
00086     bool Create( wxWindow* parent, wxWindowID id = SYMBOL_VIEWCHCONTROL_IDNAME, const wxPoint& pos = SYMBOL_VIEWCHCONTROL_POSITION, const wxSize& size = SYMBOL_VIEWCHCONTROL_SIZE, long style = SYMBOL_VIEWCHCONTROL_STYLE );
00087 
00089     void CreateControls();
00090 
00092 
00094     void OnViewEnableTogglebuttonClick( wxCommandEvent& event );
00095 
00097     void OnChooseColorButtonClick( wxCommandEvent& event );
00098 
00100     void OnLineWidthSpinctrlUpdated( wxSpinEvent& event );
00101 
00102 
00104     void OnOffsetYResetButtonClick( wxCommandEvent& event );
00105 
00107     void OnSpinbutton1Updated( wxSpinEvent& event );
00108 
00110     void OnVoltPerDivSpinctrlUpdated( wxSpinEvent& event );
00111 
00113     void OnLineWidthSpinctrlTextUpdated( wxCommandEvent& event );
00114     void OnVoltPerDivSpinctrlTextUpdated( wxCommandEvent& event );
00115 
00117 
00119     wxBitmap GetBitmapResource( const wxString& name );
00120 
00122     wxIcon GetIconResource( const wxString& name );
00124 
00126     static bool ShowToolTips();
00127 
00129     wxStaticBox* m_main_sizer_text;
00130     wxToggleButton* m_view_enable_control;
00131     wxPanel* m_color_control;
00132     wxSpinCtrl* m_line_width_control;
00133     wxButton* m_ch_offset_reset_control;
00134     wxSpinButton* m_ch_offset_control;
00135     wxSpinCtrl* m_ch_volt_per_div_control;
00137 
00138         bool SetupBoard( GenericBoard* p_board, int ch_index, int ch_count, int m_scope_index, bool is_virtual);
00139         bool UpdateControls( );
00140 private: 
00141         // Generic Board pointer
00142         GenericBoard* m_p_board;
00143         GenericBoardChannel* m_p_board_channel;
00144         int m_ch_index;
00145         int m_ch_count;
00146         int m_scope_index;
00147         bool m_is_virtual;
00148 protected:
00149         void UpdateLinePen( void);
00150         void UpdateLineWidth( int value);
00151         void UpdateOffset( void);
00152         void UpdateVoltPerDiv( int value);
00153 };
00154 
00155 #endif
00156     // _VIEW_CH_CONTROL_H_

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