X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOWxGimmickReaderDialog.cpp;h=bdf1f6687c34e65ccc308f1042d2e6eb7a652c81;hb=75a36cc2a5936be131f570520d4cc2f74bd0c548;hp=933a72312d11b5a1a185835d6fa0a74de39dbce1;hpb=415955d46ea550c344aa4d2215b8a790e348eb72;p=creaImageIO.git diff --git a/src2/creaImageIOWxGimmickReaderDialog.cpp b/src2/creaImageIOWxGimmickReaderDialog.cpp index 933a723..bdf1f66 100644 --- a/src2/creaImageIOWxGimmickReaderDialog.cpp +++ b/src2/creaImageIOWxGimmickReaderDialog.cpp @@ -5,17 +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, wxString title, const wxPoint& pos, const wxSize& size, int min_dim, - int max_dim, - int output_dim, + int max_dim, + int output_dim, // never used ?!? // JPR int threads) : wxDialog( parent, id, @@ -23,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->Initialize(); - - + + mGimmick = boost::shared_ptr(new Gimmick()); + mGimmick->Initialize(i_namedescp,i_namedb); + mView = new WxGimmickView(mGimmick, this, TVID, @@ -53,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) { @@ -63,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(); } @@ -82,16 +92,12 @@ namespace creaImageIO <Finalize(); - //mGimmick->Finalize(); -// delete mGimmick; + mGimmick->Finalize(); } - } ///Callback method on a selection @@ -100,15 +106,10 @@ namespace creaImageIO mOkButton->Enable(t); } - - - //================================================================ //BEGIN_EVENT_TABLE(WxGimmickReaderDialog, wxDialog) //END_EVENT_TABLE() //================================================================ - } // EO namespace creaImageIO -