X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src2%2FcreaImageIOWxGimmickReaderDialog.cpp;h=82c728d8f15d596a812c086e3b217c0a411be1ec;hb=011c2f926836abae60e9a525f819f9a66f03fac1;hp=7fe2b411dda7479f0b5c3ec4205aa29459b46e13;hpb=6af4831637e7dbc737fc8a42ae1395ee94658103;p=creaImageIO.git diff --git a/src2/creaImageIOWxGimmickReaderDialog.cpp b/src2/creaImageIOWxGimmickReaderDialog.cpp index 7fe2b41..82c728d 100644 --- a/src2/creaImageIOWxGimmickReaderDialog.cpp +++ b/src2/creaImageIOWxGimmickReaderDialog.cpp @@ -5,43 +5,48 @@ #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 output_dim, // never used ?!? // JPR int threads) - : wxDialog( parent, + : wxDialog( parent, id, title, 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,13 +92,11 @@ namespace creaImageIO <Finalize(); - //delete mGimmick; + mGimmick->Finalize(); } } @@ -97,13 +105,11 @@ namespace creaImageIO { mOkButton->Enable(t); } - + //================================================================ //BEGIN_EVENT_TABLE(WxGimmickReaderDialog, wxDialog) //END_EVENT_TABLE() //================================================================ - } // EO namespace creaImageIO -