
#include <wx/wx.h>
#include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/tglbtn.h>
#include <wx/choice.h>
#include <wx/button.h>
#include <wx/frame.h>
#include <wx/spinctrl.h>
#include <wx/timer.h>
#include <wx/scrolbar.h>

	#define ID_TIMER1  1500
        #define ID_BEXIT 1001   
        
        #define ID_A1_1 1002
        #define ID_A5_1 1003
        #define ID_A4_1 1004
        #define ID_A3_1 1005
        #define ID_A2_1 1006
        #define ID_A0_1 1007
        #define ID_D13_1 1008
        #define ID_D2_1 1009
        #define ID_D3_1 1010
        #define ID_D4_1 1011
        #define ID_D5_1 1012
        #define ID_D6_1 1013
        #define ID_D7_1 1014
        #define ID_D8_1 1015
        #define ID_D9_1 1016
        #define ID_D10_1 1017
        #define ID_D11_1 1018
        #define ID_D12_1 1019
        #define ID_D11_0 1020
        #define ID_D12_0 1021
        #define ID_A1_0 1022
        #define ID_A5_0 1023
        #define ID_A4_0 1024
        #define ID_A3_0 1025
        #define ID_A2_0 1026
        #define ID_A0_0 1027
        #define ID_D13_0 1028
        #define ID_D2_0 1029
        #define ID_D6_0 1030
        #define ID_D3_0 1031
        #define ID_D4_0 1032
        #define ID_D5_0 1033
        #define ID_D7_0 1034
        #define ID_D8_0 1035
        #define ID_D9_0 1036
        #define ID_D10_0 1037
        #define ID_CHECKBOX2 1038
        #define ID_CHECKBOX11 1039
        #define ID_CHECKBOX10 1040
        #define ID_CHECKBOX9 1041
        #define ID_CHECKBOX8 1042
        #define ID_CHECKBOX7 1043
        #define ID_CHECKBOX6 1044
        #define ID_CHECKBOX5 1045
        #define ID_CHECKBOX4 1046
        #define ID_CHECKBOX3 1047
        #define ID_CHECKBOX14 1048
        #define ID_CHECKBOX15 1049
        #define ID_CHECKBOX18 1050
        #define ID_CHECKBOX17 1051
        #define ID_CHECKBOX16 1052
        #define ID_CHECKBOX13 1053
        #define ID_CHECKBOX12 1054
        #define ID_CHECKBOX1 1055
        #define ID_STATICTEXT1 1056
        #define ID_STATICTEXT2 1057
        #define ID_TEXTCTRL1 1058
        #define ID_STATICBITMAP1 1059
        #define ID_STATICTEXT3 1060
           

class arduwxFrame:public wxFrame {
  public:
    arduwxFrame(wxWindow * parent, wxWindowID id = -1);
    virtual ~ arduwxFrame();

	int SearchPort2(void);
    int openLed(void);
    void analizar(void);

    wxClientDC *dcPantalla;
    wxMemoryDC *dcBuffer;
    wxBitmap *m_bitmap;

  private:
     DECLARE_EVENT_TABLE()
	//(*Handlers(arduwxFrame)
	
void OnTimer1Trigger(wxTimerEvent& event);
		void OnBexitClick(wxCommandEvent& event);
        void OnA0_1Click(wxCommandEvent& event);
        void OnA0_0Click(wxCommandEvent& event);
        void OnA1_1Click(wxCommandEvent& event);
        void OnA1_0Click(wxCommandEvent& event);
        void OnA2_1Click(wxCommandEvent& event);
        void OnA2_0Click(wxCommandEvent& event);
        void OnA3_1Click(wxCommandEvent& event);
        void OnA3_0Click(wxCommandEvent& event);
        void OnA4_1Click(wxCommandEvent& event);
        void OnA4_0Click(wxCommandEvent& event);
        void OnA5_1Click(wxCommandEvent& event);
        void OnA5_0Click(wxCommandEvent& event);
        void OnD13_1Click(wxCommandEvent& event);
        void OnD12_1Click(wxCommandEvent& event);
        void OnD12_0Click(wxCommandEvent& event);
        void OnD13_0Click(wxCommandEvent& event);
        void OnD11_1Click(wxCommandEvent& event);
        void OnD11_0Click(wxCommandEvent& event);
        void OnD10_1Click(wxCommandEvent& event);
        void OnD10_0Click(wxCommandEvent& event);
        void OnD9_1Click(wxCommandEvent& event);
        void OnD9_0Click(wxCommandEvent& event);
        void OnD8_1Click(wxCommandEvent& event);
        void OnD8_0Click(wxCommandEvent& event);
        void OnD7_1Click(wxCommandEvent& event);
        void OnD7_0Click(wxCommandEvent& event);
        void OnD6_1Click(wxCommandEvent& event);
        void OnD6_0Click(wxCommandEvent& event);
        void OnD5_1Click(wxCommandEvent& event);
        void OnD5_0Click(wxCommandEvent& event);
        void OnD4_1Click(wxCommandEvent& event);
        void OnD4_0Click(wxCommandEvent& event);
        void OnD3_1Click(wxCommandEvent& event);
        void OnD3_0Click(wxCommandEvent& event);
        void OnD2_1Click(wxCommandEvent& event);
        void OnD2_0Click(wxCommandEvent& event);
    //*)


    //(*Declarations(arduwxFrame)
		wxTimer Timer1;
		
		wxCheckBox* led4;
        wxCheckBox* led3;
        wxButton* A3_0;
        wxButton* D5_0;
        wxButton* D7_0;
        wxTextCtrl* miPuerto;
        wxCheckBox* ledA5;
        wxButton* A5_0;
        wxCheckBox* led13;
        wxCheckBox* led5;
        wxButton* D11_1;
        wxCheckBox* led2;
        wxCheckBox* ledA0;
        wxButton* A0_0;
        wxCheckBox* ledA2;
        wxButton* A5_1;
        wxButton* D12_1;
        wxButton* D3_1;
        wxButton* A4_1;
        wxStaticText* StaticText1;
        wxButton* A4_0;
        wxButton* D3_0;
        wxButton* D4_1;
        wxButton* Bexit;
        wxStaticText* StaticText3;
        wxButton* D12_0;
        wxButton* D13_0;
        wxButton* D2_0;
        wxCheckBox* led7;
        wxButton* D6_0;
        wxCheckBox* led8;
        wxButton* D4_0;
        wxCheckBox* led10;
        wxButton* A3_1;
        wxButton* D9_1;
        wxButton* A0_1;
        wxCheckBox* ledA1;
        wxButton* D10_0;
        wxCheckBox* led11;
        wxButton* A2_1;
        wxButton* D10_1;
        wxButton* D9_0;
        wxButton* A2_0;
        wxStaticText* StaticText2;
        wxStaticBitmap* StaticBitmap1;
        wxCheckBox* led9;
        wxCheckBox* led6;
        wxButton* A1_0;
        wxButton* D13_1;
        wxButton* D8_0;
        wxButton* D8_1;
        wxCheckBox* led12;
        wxCheckBox* ledA4;
        wxButton* A1_1;
        wxButton* D5_1;
        wxButton* D11_0;
        wxButton* D6_1;
        wxCheckBox* ledA3;
        wxButton* D2_1;
        wxButton* D7_1;
    //*)
};

class MiAplicacion:public wxApp {
  public:
    virtual bool OnInit();
};


bool MiAplicacion::OnInit()
{
    wxInitAllImageHandlers();
    arduwxFrame *Frame = new arduwxFrame(0);
    Frame->Show();
    return true;
}
