X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOWxGimmickReaderDialog.cpp;h=bdf1f6687c34e65ccc308f1042d2e6eb7a652c81;hb=75a36cc2a5936be131f570520d4cc2f74bd0c548;hp=b2e38b5cb4e530942917329eb18bb1df080fcc51;hpb=b818afb24157d3474ecb598a98d92667745a6aa3;p=creaImageIO.git diff --git a/src2/creaImageIOWxGimmickReaderDialog.cpp b/src2/creaImageIOWxGimmickReaderDialog.cpp index b2e38b5..bdf1f66 100644 --- a/src2/creaImageIOWxGimmickReaderDialog.cpp +++ b/src2/creaImageIOWxGimmickReaderDialog.cpp @@ -5,19 +5,23 @@ #define new DEBUG_NEW #endif +#ifdef _RELWITHDEBINFO +#define new DEBUG_NEW +#endif + namespace creaImageIO { // CTor WxGimmickReaderDialog::WxGimmickReaderDialog(wxWindow *parent, wxWindowID id, - const std::string i_namedescp , - const std::string i_namedb , + const std::string i_namedescp, + const std::string i_namedb, wxString title, const wxPoint& pos, const wxSize& size, - int min_dim, + int min_dim, int max_dim, - int output_dim, + int output_dim, // never used ?!? // JPR int threads) : wxDialog( parent, id, @@ -25,25 +29,24 @@ namespace creaImageIO pos, size, wxRESIZE_BORDER | - wxSYSTEM_MENU | - wxCLOSE_BOX | - wxMAXIMIZE_BOX | - wxMINIMIZE_BOX | + wxSYSTEM_MENU | + wxCLOSE_BOX | + wxMAXIMIZE_BOX | + wxMINIMIZE_BOX | wxCAPTION ), - // mGimmick(0), + // mGimmick(0), mView(0) { GimmickDebugMessage(1,"WxGimmickReaderDialog::WxGimmickReaderDialog" <(new Gimmick()); + + mGimmick = boost::shared_ptr(new Gimmick()); mGimmick->Initialize(i_namedescp,i_namedb); - - + mView = new WxGimmickView(mGimmick, this, TVID, @@ -55,7 +58,7 @@ namespace creaImageIO mView->Initialize(); // Connect the AddProgress callback mView->ConnectValidationObserver - ( boost::bind( &WxGimmickReaderDialog::OnValid , this, _1 ) ); + ( boost::bind( &WxGimmickReaderDialog::OnValid , this, _1 ) ); } catch (crea::Exception e) { @@ -65,15 +68,20 @@ namespace creaImageIO topsizer->Add( mView,1,wxGROW,0); - wxSizer* bsizer = CreateSeparatedButtonSizer(wxOK|wxCANCEL); - mOkButton = (wxButton*)FindWindowById(GetAffirmativeId(), this); - mCancelButton = (wxButton*)FindWindowById(GetEscapeId(), this); - + wxSizer* bsizer = this->CreateSeparatedButtonSizer(wxOK|wxCANCEL); + /*mOkButton = new wxButton(this, wxID_OK, _T("OK"), wxPoint(170,50)); + mCancelButton = new wxButton(this, wxID_CANCEL, _T("CANCEL"), wxPoint(210,50)); + */ mOkButton = (wxButton*)FindWindowById(GetAffirmativeId(), this); + mCancelButton = (wxButton*)FindWindowById(GetEscapeId(), this); + mOkButton->Enable(false); - topsizer->Add ( bsizer, 0, wxGROW ); +topsizer->Add(mOkButton, 0, wxGROW); +topsizer->Add(mCancelButton, 0, wxGROW); + topsizer->Add ( bsizer, 0, wxGROW ); SetSizer( topsizer ); + Layout(); } @@ -84,13 +92,11 @@ namespace creaImageIO <Finalize(); - //delete mGimmick; + mGimmick->Finalize(); } } @@ -99,13 +105,11 @@ namespace creaImageIO { mOkButton->Enable(t); } - + //================================================================ //BEGIN_EVENT_TABLE(WxGimmickReaderDialog, wxDialog) //END_EVENT_TABLE() //================================================================ - } // EO namespace creaImageIO -