www.pudn.com > source.zip > demo.cpp
/* wxWindows includes */ #include#ifndef WX_PRECOMP #include #endif #include #include "gaborutil.h" #include "randomc.h" #include "gui.h" /* Event table */ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_BUTTON(ID_DOIT_BUTTON, MyFrame::OnDoit) EVT_BUTTON(ID_LOAD_BUTTON, MyFrame::OnOpen) EVT_BUTTON(ID_SAVE_BUTTON, MyFrame::OnSave) EVT_BUTTON(ID_SAVE_BUTTON2, MyFrame::OnSave2) EVT_BUTTON(ID_SAVE_BUTTON3, MyFrame::OnSave3) EVT_BUTTON(ID_SAVE_BUTTON4, MyFrame::OnSave4) EVT_BUTTON(ID_CLEAR_BUTTON, MyFrame::OnClear) EVT_BUTTON(ID_SAME_BUTTON, MyFrame::OnSame) EVT_BUTTON(ID_LUV_BUTTON, MyFrame::OnLuv) EVT_BUTTON(ID_GSELECT_BUTTON, MyFrame::OnG_Select) EVT_BUTTON(ID_GDESELECT_BUTTON, MyFrame::OnG_Deselect) EVT_BUTTON(ID_CL, MyFrame::OnCL) EVT_BUTTON(ID_TL, MyFrame::OnTL) EVT_BUTTON(ID_XL, MyFrame::OnXL) EVT_TEXT(ID_MAXPIXEL, MyFrame::OnMaxPix) EVT_TEXT(ID_MAXPERCENT, MyFrame::OnPercent) EVT_BUTTON(ID_GABOR_BUTTON, MyFrame::OnGabor) EVT_BUTTON(ID_FILTER_BUTTON, MyFrame::OnFilter) EVT_BUTTON(ID_FILTERED_BUTTON, MyFrame::OnFiltered) EVT_BUTTON(ID_G_FEATURE, MyFrame::OnGFeature) EVT_BUTTON(ID_LEFT_BUTTON, MyFrame::OnLeft) EVT_BUTTON(ID_RIGHT_BUTTON, MyFrame::OnRight) EVT_CHOICE(ID_CHOICE, MyFrame::OnChoice) EVT_CHOICE(IM_CHOICE, MyFrame::ImChoice) EVT_CHOICE(GAB_CHOICE, MyFrame::GabChoice) EVT_CHOICE(SEL_CHOICE, MyFrame::SelChoice) EVT_TEXT(ID_REGIONS, MyFrame::OnRegions) EVT_TEXT(ID_REGIONS2, MyFrame::OnRegions2) EVT_BUTTON(ID_SELECTREGION_BUTTON, MyFrame::OnSelectRegion) EVT_PAINT(MyFrame::OnPaint) END_EVENT_TABLE() BEGIN_EVENT_TABLE(MyScrolledWindow, wxScrolledWindow) EVT_LEFT_DOWN(MyScrolledWindow::OnLeftDown) EVT_MOTION(MyScrolledWindow::OnMouseMotion) END_EVENT_TABLE() IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { MyFrame *frame = new MyFrame( "demo", wxPoint(0,0), wxSize(900,675) ); frame->Show( TRUE ); SetTopWindow( frame ); return TRUE; }