common_ch_control.h

Go to the documentation of this file.
00001 
00002 // Name:        common_ch_control.h
00003 // Purpose:     
00004 // Author:      NDA
00005 // Modified by: 
00006 // Created:     04/04/2006 14:30:53
00007 // RCS-ID:      
00008 // Copyright:   CAEN S.p.A All rights reserved.
00009 // Licence:     
00011 
00012 // Generated by DialogBlocks (unregistered), 04/04/2006 14:30:53
00013 
00014 #ifndef _COMMON_CH_CONTROL_H_
00015 #define _COMMON_CH_CONTROL_H_
00016 
00017 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
00018 #pragma interface "common_ch_control.h"
00019 #endif
00020 
00025 
00026 #include "wx/tglbtn.h"
00027 #include "wx/spinbutt.h"
00029 
00030 #include "generic_board.h"
00031 #include "physical_board_channel.h"
00032 #include "common_ch_control_base.h"
00033 
00038 
00039 class wxToggleButton;
00040 class wxSpinButton;
00042 
00047 
00048 #define ID_COMMON_CH_DIALOG 10030
00049 #define SYMBOL_COMMONCHCONTROL_STYLE 0
00050 #define SYMBOL_COMMONCHCONTROL_TITLE _("CommonChControl")
00051 #define SYMBOL_COMMONCHCONTROL_IDNAME ID_COMMON_CH_DIALOG
00052 #define SYMBOL_COMMONCHCONTROL_SIZE wxDefaultSize
00053 #define SYMBOL_COMMONCHCONTROL_POSITION wxDefaultPosition
00054 #define ID_ENABLE_TOGGLEBUTTON 10000
00055 #define ID_BUTTON 10002
00056 #define ID_SPINBUTTON 10003
00057 
00058 
00063 #ifndef wxCLOSE_BOX
00064 #define wxCLOSE_BOX 0x1000
00065 #endif
00066 
00071 class CommonChControl: public CommonChControlBase
00072 {    
00073     DECLARE_DYNAMIC_CLASS( CommonChControl )
00074     DECLARE_EVENT_TABLE()
00075 
00076 public:
00078     CommonChControl( );
00079     CommonChControl( wxWindow* parent, wxWindowID id = SYMBOL_COMMONCHCONTROL_IDNAME, const wxPoint& pos = SYMBOL_COMMONCHCONTROL_POSITION, const wxSize& size = SYMBOL_COMMONCHCONTROL_SIZE, long style = SYMBOL_COMMONCHCONTROL_STYLE );
00080 
00082     bool Create( wxWindow* parent, wxWindowID id = SYMBOL_COMMONCHCONTROL_IDNAME, const wxPoint& pos = SYMBOL_COMMONCHCONTROL_POSITION, const wxSize& size = SYMBOL_COMMONCHCONTROL_SIZE, long style = SYMBOL_COMMONCHCONTROL_STYLE );
00083 
00085     void CreateControls();
00086 
00088 
00090     void OnEnableTogglebuttonClick( wxCommandEvent& event );
00091 
00093     void OnButtonClick( wxCommandEvent& event );
00094 
00096     void OnSpinbuttonUpdated( wxSpinEvent& event );
00097 
00099 
00101 
00103     wxBitmap GetBitmapResource( const wxString& name );
00104 
00106     wxIcon GetIconResource( const wxString& name );
00108 
00110     static bool ShowToolTips();
00111 
00113     wxStaticBox* m_main_sizer_text;
00114     wxToggleButton* m_ch_enable_control;
00115     wxButton* m_ch_DAC_reset_control;
00116     wxSpinButton* m_ch_DAC_control;
00117     wxStaticText* m_medium_value_control;
00118     wxStaticText* m_overload_control;
00120 
00121         bool SetupBoard( GenericBoard* p_board, int ch_index, int ch_count);
00122         bool UpdateControls( );
00123         void SetEnable( bool enable);
00124         void SetMediumLabel( double value);
00125         void SetOverloadBackground( const wxColor& color);
00126 private: 
00127         // Generic Board pointer
00128         GenericBoard* m_p_board;
00129         PhysicalBoardChannel* m_p_board_channel;
00130         int m_ch_index;
00131         int m_ch_count;
00132         void UpdateDAC( void);
00133 
00134 };
00135 
00136 #endif
00137     // _COMMON_CH_CONTROL_H_

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