//----------------------------------------------------//
// MWT C++ Application Source File                    //
//      created by WideStudio Application Builder     //
//----------------------------------------------------//
#include <WScom.h>
#include <WSDappDev.h>

//--- OBJECT includes ---//
#include <WSCmainWindow.h>
#include <WSCvtimer.h>
#include <WSCvdrawingArea.h>
#include <WSCoption.h>
#include <WSCvlabel.h>
#include <WSCvbtn.h>

//--- OBJECT instance variable ---//
WSCmainWindow* demo_main = NULL;
WSCvtimer* demvtim_001 = NULL;
WSCvdrawingArea* demvdra_000 = NULL;
WSCoption* demopti_003 = NULL;
WSCoption* demopti_005 = NULL;
WSCvlabel* demvlab_000 = NULL;
WSCvbtn* demvbtn_001 = NULL;

//--- OBJECT src ---//

WSCbase* _create_win_demo_main(){


  demo_main = new  WSCmainWindow(NULL,"demo_main");
      demo_main->initialize();
  demo_main->setPropertyV(WSNname,"demo_main");
  demo_main->setPropertyV(WSNtitleString,"JPEG Camera Receiver");
  demo_main->setPropertyV(WSNx,(short)670);
  demo_main->setPropertyV(WSNwidth,(unsigned short)340);
  demo_main->setPropertyV(WSNheight,(unsigned short)340);
  demo_main->setPropertyV(WSNforeColor,"#000000");
  demo_main->setPropertyV(WSNbackColor,"#dce8ff");
  demo_main->setPropertyV(WSNtopShadowColor,"#dbffef");
  demo_main->setPropertyV(WSNbottomShadowColor,"#c6d7f1");
  demo_main->setPropertyV(WSNshadowType,(char)-1);
  demo_main->setPropertyV(WSNvis,(WSCbool)1);
  demo_main->setPropertyV(WSNgradation,(unsigned char)5);
    extern void demo_init(WSCbase*);
    demo_main->addProcedureV("new_ep1","demo_init",demo_init,0);

  demvtim_001 = new  WSCvtimer(demo_main,"demvtim_001");
      demvtim_001->initialize();
  demvtim_001->setPropertyV(WSNinterval,(unsigned long)20);
  demvtim_001->setPropertyV(WSNname,"demvtim_001");
  demvtim_001->setPropertyV(WSNvis,(WSCbool)1);
  demvtim_001->setPropertyV(WSNx,(short)96);
  demvtim_001->setPropertyV(WSNy,(short)286);
  demvtim_001->setPropertyV(WSNwidth,(unsigned short)80);
    extern void demo_timer(WSCbase*);
    demvtim_001->addProcedureV("new_ep3","demo_timer",demo_timer,2);

  demvdra_000 = new  WSCvdrawingArea(demo_main,"demvdra_000");
      demvdra_000->initialize();
  demvdra_000->setPropertyV(WSNusePixmap,(WSCbool)1);
  demvdra_000->setPropertyV(WSNname,"demvdra_000");
  demvdra_000->setPropertyV(WSNvis,(WSCbool)1);
  demvdra_000->setPropertyV(WSNx,(short)10);
  demvdra_000->setPropertyV(WSNy,(short)50);
  demvdra_000->setPropertyV(WSNwidth,(unsigned short)320);
  demvdra_000->setPropertyV(WSNheight,(unsigned short)240);
  demvdra_000->setPropertyV(WSNforeColor,"#ffffff");
    extern void demo_drawimage(WSCbase*);
    demvdra_000->addProcedureV("new_ep5","demo_drawimage",demo_drawimage,9);

  demopti_003 = new  WSCoption(demo_main,"demopti_003");
      demopti_003->initialize();
  demopti_003->setPropertyV(WSNmenuItems,"COM1:1:ep_com_port,COM2:2:ep_com_port,COM3:3:ep_com_port,COM4:4:ep_com_port,COM5:5:ep_com_port,COM6:6:ep_com_port,COM7:7:ep_com_port,COM8:8:ep_com_port,COM9:9:ep_com_port,COM10:10:ep_com_port,COM11:11:ep_com_port,COM12:12:ep_com_port,COM13:13:ep_com_port,COM14:14:ep_com_port,COM15:15:ep_com_port,COM16:16:ep_com_port,COM17:17:ep_com_port,COM18:18:ep_com_port");
  demopti_003->setPropertyV(WSNvalue,(long)1);
  demopti_003->setPropertyV(WSNbackColor,"#c8c8c8");
  demopti_003->setPropertyV(WSNtopShadowColor,"#f0f0f0");
  demopti_003->setPropertyV(WSNbottomShadowColor,"#a0a0a0");
  demopti_003->setPropertyV(WSNlabelString,"COM1");
  demopti_003->setPropertyV(WSNfont,(unsigned char)0);
  demopti_003->setPropertyV(WSNname,"demopti_003");
  demopti_003->setPropertyV(WSNvis,(WSCbool)1);
  demopti_003->setPropertyV(WSNx,(short)10);
  demopti_003->setPropertyV(WSNy,(short)10);
  demopti_003->setPropertyV(WSNwidth,(unsigned short)90);
    extern void demo_com_open(WSCbase*);
    demopti_003->addProcedureV("ep_com_port","demo_com_open",demo_com_open,2);

  demopti_005 = new  WSCoption(demo_main,"demopti_005");
      demopti_005->initialize();
  demopti_005->setPropertyV(WSNmenuItems,"9600:9600:ep_com_port,19200:19200:ep_com_port,38400:38400:ep_com_port,115200:115200:ep_com_port");
  demopti_005->setPropertyV(WSNvalue,(long)38400);
  demopti_005->setPropertyV(WSNbackColor,"#c8c8c8");
  demopti_005->setPropertyV(WSNtopShadowColor,"#f0f0f0");
  demopti_005->setPropertyV(WSNbottomShadowColor,"#a0a0a0");
  demopti_005->setPropertyV(WSNlabelString,"38400");
  demopti_005->setPropertyV(WSNfont,(unsigned char)0);
  demopti_005->setPropertyV(WSNname,"demopti_005");
  demopti_005->setPropertyV(WSNvis,(WSCbool)1);
  demopti_005->setPropertyV(WSNx,(short)110);
  demopti_005->setPropertyV(WSNy,(short)10);
  demopti_005->setPropertyV(WSNwidth,(unsigned short)90);
    extern void demo_com_open(WSCbase*);
    demopti_005->addProcedureV("ep_com_port","demo_com_open",demo_com_open,2);

  demvlab_000 = new  WSCvlabel(demo_main,"demvlab_000");
      demvlab_000->initialize();
  demvlab_000->setPropertyV(WSNbackColor,"#f0f0f0");
  demvlab_000->setPropertyV(WSNtopShadowColor,"#ffffff");
  demvlab_000->setPropertyV(WSNbottomShadowColor,"#c8c8c8");
  demvlab_000->setPropertyV(WSNlabelString,"Initialize");
  demvlab_000->setPropertyV(WSNalignmentH,(unsigned char)0);
  demvlab_000->setPropertyV(WSNfont,(unsigned char)1);
  demvlab_000->setPropertyV(WSNname,"demvlab_000");
  demvlab_000->setPropertyV(WSNvis,(WSCbool)1);
  demvlab_000->setPropertyV(WSNx,(short)9);
  demvlab_000->setPropertyV(WSNy,(short)300);
  demvlab_000->setPropertyV(WSNwidth,(unsigned short)321);

  demvbtn_001 = new  WSCvbtn(demo_main,"demvbtn_001");
      demvbtn_001->initialize();
  demvbtn_001->setPropertyV(WSNlabelString,"RESET");
  demvbtn_001->setPropertyV(WSNname,"demvbtn_001");
  demvbtn_001->setPropertyV(WSNvis,(WSCbool)1);
  demvbtn_001->setPropertyV(WSNx,(short)260);
  demvbtn_001->setPropertyV(WSNy,(short)10);
  demvbtn_001->setPropertyV(WSNwidth,(unsigned short)70);
    extern void demo_com_reset(WSCbase*);
    demvbtn_001->addProcedureV("new_ep_reset","demo_com_reset",demo_com_reset,2);

   demo_main->setVisible(True);
   return demo_main;
}

//--- end of src ---//
