X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=appli%2FTestWxGimmickDialog%2Fmain.cxx;h=b0ad1da522ff609659b88967b8d3afc0680b2356;hb=29cfc2f238ce7c522d3c878e032982d3a52d1044;hp=63b001ccc2345b5f17d3e91d6b3d17af19bf3cb2;hpb=684add23b4f64cb3c6e39e12a4af20d2c2500df6;p=creaImageIO.git diff --git a/appli/TestWxGimmickDialog/main.cxx b/appli/TestWxGimmickDialog/main.cxx index 63b001c..b0ad1da 100644 --- a/appli/TestWxGimmickDialog/main.cxx +++ b/appli/TestWxGimmickDialog/main.cxx @@ -2,6 +2,8 @@ #include #include +#include + class myApp : public wxApp { public: @@ -11,20 +13,7 @@ public: IMPLEMENT_APP(myApp); -#if defined(_WIN32) - -// How to have a Console and wxWidgets -// http://www.wxwidgets.org/wiki/index.php/MSVC_Setup_Guide -// In Visual C++ 6 (7 should be similar), to create an application that is both a console application -// (cout's to the console are visible) and has a wxWidgets GUI, -// you need to use the linker option "/subsystem:console" and the following code: -int main(int argc, char* argv[]) -{ - return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL); -} - -#endif // defined(_WIN32) - +CREA_WXMAIN_WITH_CONSOLE bool myApp::OnInit( ) { @@ -35,14 +24,16 @@ bool myApp::OnInit( ) #endif wxInitAllImageHandlers(); + int image_type = GIMMICK_3D_IMAGE_SELECTION; int threads = 1; creaImageIO::WxGimmickDialog w(0, - -1, - _T("WxGimmickDialog test"), - wxDefaultPosition, - wxSize(1200,800), - threads); + -1, + _T("WxGimmickDialog test"), + wxDefaultPosition, + wxSize(1200,800), + image_type, + threads); w.ShowModal(); if (w.GetReturnCode() == wxID_OK) @@ -50,13 +41,19 @@ bool myApp::OnInit( ) std::cout << "$$$$ main : user clicked 'OK' $$$$"< s; - w.GetSelectedImages(s); + w.GetSelectedFiles(s); std::vector::iterator i; for (i=s.begin();i!=s.end();++i) { std::cout << *i << std::endl; } std::cout << "$$$$ "< images; + w.GetSelectedImages(images); + crea::VtkBasicSlicer(images.front()); + images.front()->Delete(); + } else if (w.GetReturnCode() == wxID_CANCEL) {