1 #include <creaImageIOSystem.h>
3 #include <creaImageIOWxGimmickDialog.h>
5 class myApp : public wxApp
9 int OnExit() { return true; }
16 // How to have a Console and wxWidgets
17 // http://www.wxwidgets.org/wiki/index.php/MSVC_Setup_Guide
18 // In Visual C++ 6 (7 should be similar), to create an application that is both a console application
19 // (cout's to the console are visible) and has a wxWidgets GUI,
20 // you need to use the linker option "/subsystem:console" and the following code:
21 int main(int argc, char* argv[])
23 return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
26 #endif // defined(_WIN32)
33 //See http://www.wxwindows.org/faqgtk.htm#locale
34 setlocale(LC_NUMERIC, "C");
36 wxInitAllImageHandlers();
40 creaImageIO::WxGimmickDialog w(0,
42 _T("WxGimmickDialog test"),
48 if (w.GetReturnCode() == wxID_OK)
50 std::cout << "$$$$ main : user clicked 'OK' $$$$"<<std::endl;
51 std::cout << "$$$$ selected files : "<<std::endl;
52 std::vector<std::string> s;
53 w.GetSelectedImages(s);
54 std::vector<std::string>::iterator i;
55 for (i=s.begin();i!=s.end();++i)
57 std::cout << *i << std::endl;
59 std::cout << "$$$$ "<<std::endl;
61 else if (w.GetReturnCode() == wxID_CANCEL)
63 std::cout << "$$$$ main : user clicked 'CANCEL' $$$$"<<std::endl;
67 std::cout << "$$$$ main : dialog ended without return code ! $$$$"
72 // std::cout << "$$$$ main : deleting dialog"<<std::endl;
74 std::cout << "$$$$$$$$$$$$$$$$$$$$ main ended "<<std::endl;