examples/DS401_Slave_Gui/main.h
changeset 385 fff25f16c923
parent 316 75691a663ec1
equal deleted inserted replaced
384:83793fc7ce48 385:fff25f16c923
     8 #include <wx/listbox.h>
     8 #include <wx/listbox.h>
     9 #include <wx/gauge.h>
     9 #include <wx/gauge.h>
    10 #include <wx/spinctrl.h>
    10 #include <wx/spinctrl.h>
    11 #include <wx/notebook.h>
    11 #include <wx/notebook.h>
    12 
    12 
    13 class MyApp : public wxApp {
    13 class MyApp:public wxApp
       
    14 {
    14 public:
    15 public:
    15  virtual bool OnInit();
    16   virtual bool OnInit ();
    16 };
    17 };
    17 
    18 
    18 class MyFrame : public wxFrame {
    19 class MyFrame:public wxFrame
       
    20 {
    19 public:
    21 public:
    20 
    22 
    21  wxNotebook 	*book;
    23   wxNotebook * book;
    22  wxButton		*stop;
    24   wxButton *stop;
    23  wxButton		*start;
    25   wxButton *start;
    24  wxTextCtrl		*busname;
    26   wxTextCtrl *busname;
    25  wxSpinCtrl		*inst1;
    27   wxSpinCtrl *inst1;
    26  wxSpinCtrl		*inst2;
    28   wxSpinCtrl *inst2;
    27  wxSpinCtrl		*inst3;
    29   wxSpinCtrl *inst3;
    28  wxSpinCtrl		*inst4;
    30   wxSpinCtrl *inst4;
    29  wxSpinCtrl		*inst5;
    31   wxSpinCtrl *inst5;
    30  wxSpinCtrl		*inst6;
    32   wxSpinCtrl *inst6;
    31  wxSpinCtrl		*inst7;
    33   wxSpinCtrl *inst7;
    32  wxSpinCtrl		*inst8;
    34   wxSpinCtrl *inst8;
    33  wxTextCtrl		*drivername;
    35   wxTextCtrl *drivername;
    34  wxSpinCtrl		*node_id;
    36   wxSpinCtrl *node_id;
    35  wxToggleButton	*inbt1;
    37   wxToggleButton *inbt1;
    36  wxToggleButton	*inbt2;
    38   wxToggleButton *inbt2;
    37  wxToggleButton	*inbt3;
    39   wxToggleButton *inbt3;
    38  wxToggleButton	*inbt4;
    40   wxToggleButton *inbt4;
    39  wxToggleButton	*inbt5;
    41   wxToggleButton *inbt5;
    40  wxToggleButton	*inbt6;
    42   wxToggleButton *inbt6;
    41  wxToggleButton	*inbt7;
    43   wxToggleButton *inbt7;
    42  wxToggleButton	*inbt8;
    44   wxToggleButton *inbt8;
    43  wxSlider		*ins1;
    45   wxSlider *ins1;
    44  wxSlider		*ins2;
    46   wxSlider *ins2;
    45  wxSlider		*ins3;
    47   wxSlider *ins3;
    46  wxSlider		*ins4;
    48   wxSlider *ins4;
    47  wxSlider		*ins5;
    49   wxSlider *ins5;
    48  wxSlider		*ins6;
    50   wxSlider *ins6;
    49  wxSlider		*ins7;
    51   wxSlider *ins7;
    50  wxSlider		*ins8;
    52   wxSlider *ins8;
    51  wxToggleButton	*outbt1;
    53   wxToggleButton *outbt1;
    52  wxToggleButton	*outbt2;
    54   wxToggleButton *outbt2;
    53  wxToggleButton	*outbt3;
    55   wxToggleButton *outbt3;
    54  wxToggleButton	*outbt4;
    56   wxToggleButton *outbt4;
    55  wxToggleButton	*outbt5;
    57   wxToggleButton *outbt5;
    56  wxToggleButton	*outbt6;
    58   wxToggleButton *outbt6;
    57  wxToggleButton	*outbt7;
    59   wxToggleButton *outbt7;
    58  wxToggleButton	*outbt8;
    60   wxToggleButton *outbt8;
    59  wxGauge		*outs1;
    61   wxGauge *outs1;
    60  wxGauge		*outs2;
    62   wxGauge *outs2;
    61  wxGauge		*outs3;
    63   wxGauge *outs3;
    62  wxGauge		*outs4;
    64   wxGauge *outs4;
    63  wxStaticText	*outst1;
    65   wxStaticText *outst1;
    64  wxStaticText	*outst2;
    66   wxStaticText *outst2;
    65  wxStaticText	*outst3;
    67   wxStaticText *outst3;
    66  wxStaticText	*outst4;
    68   wxStaticText *outst4;
    67  wxSlider		*echelle;
    69   wxSlider *echelle;
    68  wxPanel		*mygraphpan;
    70   wxPanel *mygraphpan;
    69  wxPanel		*mylegpan;
    71   wxPanel *mylegpan;
    70  wxListBox		*inlist;
    72   wxListBox *inlist;
    71  wxArrayInt		in;
    73   wxArrayInt in;
    72  wxTimer		m_timer;
    74   wxTimer m_timer;
    73  
    75 
    74  MyFrame(const wxString& title);
    76     MyFrame (const wxString & title);
    75  
    77 
    76  void OnListBoxDoubleClick( wxCommandEvent &event );
    78   void OnListBoxDoubleClick (wxCommandEvent & event);
    77  void OnInbt1(wxCommandEvent& event);
    79   void OnInbt1 (wxCommandEvent & event);
    78  void OnInbt2(wxCommandEvent& event);
    80   void OnInbt2 (wxCommandEvent & event);
    79  void OnInbt3(wxCommandEvent& event);
    81   void OnInbt3 (wxCommandEvent & event);
    80  void OnInbt4(wxCommandEvent& event);
    82   void OnInbt4 (wxCommandEvent & event);
    81  void OnInbt5(wxCommandEvent& event);
    83   void OnInbt5 (wxCommandEvent & event);
    82  void OnInbt6(wxCommandEvent& event);
    84   void OnInbt6 (wxCommandEvent & event);
    83  void OnInbt7(wxCommandEvent& event);
    85   void OnInbt7 (wxCommandEvent & event);
    84  void OnInbt8(wxCommandEvent& event);
    86   void OnInbt8 (wxCommandEvent & event);
    85  void OnQuit(wxCommandEvent& event);
    87   void OnQuit (wxCommandEvent & event);
    86  void OnAdd(wxCommandEvent& event);
    88   void OnAdd (wxCommandEvent & event);
    87  void OnRemove(wxCommandEvent& event);
    89   void OnRemove (wxCommandEvent & event);
    88  void OnAbout(wxCommandEvent& event);
    90   void OnAbout (wxCommandEvent & event);
    89  void OnStart(wxCommandEvent& WXUNUSED(event));
    91   void OnStart (wxCommandEvent & WXUNUSED (event));
    90  void Start();
    92   void Start ();
    91  void OnStop(wxCommandEvent& WXUNUSED(event));
    93   void OnStop (wxCommandEvent & WXUNUSED (event));
    92  void OnFreqBoxClick(wxCommandEvent& WXUNUSED(event));
    94   void OnFreqBoxClick (wxCommandEvent & WXUNUSED (event));
    93  void OnLoad(wxCommandEvent& WXUNUSED(event));
    95   void OnLoad (wxCommandEvent & WXUNUSED (event));
    94  void OnPaint(wxPaintEvent& WXUNUSED(event));
    96   void OnPaint (wxPaintEvent & WXUNUSED (event));
    95  void OnIns1(wxScrollEvent &event);
    97   void OnIns1 (wxScrollEvent & event);
    96  void OnIns2(wxScrollEvent &event);
    98   void OnIns2 (wxScrollEvent & event);
    97  void OnIns3(wxScrollEvent &event);
    99   void OnIns3 (wxScrollEvent & event);
    98  void OnIns4(wxScrollEvent &event);
   100   void OnIns4 (wxScrollEvent & event);
    99  void OnIns5(wxScrollEvent &event);
   101   void OnIns5 (wxScrollEvent & event);
   100  void OnIns6(wxScrollEvent &event);
   102   void OnIns6 (wxScrollEvent & event);
   101  void OnIns7(wxScrollEvent &event);
   103   void OnIns7 (wxScrollEvent & event);
   102  void OnIns8(wxScrollEvent &event);
   104   void OnIns8 (wxScrollEvent & event);
   103  void OnInst1( wxSpinEvent &ev );
   105   void OnInst1 (wxSpinEvent & ev);
   104  void OnInst2( wxSpinEvent &ev );
   106   void OnInst2 (wxSpinEvent & ev);
   105  void OnInst3( wxSpinEvent &ev );
   107   void OnInst3 (wxSpinEvent & ev);
   106  void OnInst4( wxSpinEvent &ev );
   108   void OnInst4 (wxSpinEvent & ev);
   107  void OnInst5( wxSpinEvent &ev );
   109   void OnInst5 (wxSpinEvent & ev);
   108  void OnInst6( wxSpinEvent &ev );
   110   void OnInst6 (wxSpinEvent & ev);
   109  void OnInst7( wxSpinEvent &ev );
   111   void OnInst7 (wxSpinEvent & ev);
   110  void OnInst8( wxSpinEvent &ev );
   112   void OnInst8 (wxSpinEvent & ev);
   111  void Paint();
   113   void Paint ();
   112  void OnTimer(wxTimerEvent& event);
   114   void OnTimer (wxTimerEvent & event);
   113 private:
   115 private:
   114  DECLARE_EVENT_TABLE()
   116   DECLARE_EVENT_TABLE ()};
   115 };
       
   116 
   117 
   117 void actu(void);
   118 void actu (void);
   118 void actu_output(void);
   119 void actu_output (void);
   119 
   120 
   120 
   121 
   121 #endif /*MAIN_H_*/
   122 #endif /*MAIN_H_ */