1 #include <creaImageIOWxGimmickReaderDialog.h>
2 #include <creaImageIOSystem.h>
3 #include <creaImageIOGimmick.h>
15 WxGimmickReaderDialog::WxGimmickReaderDialog(wxWindow *parent,
17 const std::string i_namedescp,
18 const std::string i_namedb,
24 int output_dim, // never used ?!? // JPR
41 GimmickDebugMessage(1,"WxGimmickReaderDialog::WxGimmickReaderDialog"
43 wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
47 mGimmick = boost::shared_ptr<Gimmick>(new Gimmick());
48 mGimmick->Initialize(i_namedescp,i_namedb);
50 mView = new WxGimmickView(mGimmick,
59 // Connect the AddProgress callback
60 mView->ConnectValidationObserver
61 ( boost::bind( &WxGimmickReaderDialog::OnValid , this, _1 ) );
63 catch (crea::Exception e)
69 topsizer->Add( mView,1,wxGROW,0);
71 wxSizer* bsizer = this->CreateSeparatedButtonSizer(wxOK|wxCANCEL);
72 /*mOkButton = new wxButton(this, wxID_OK, _T("OK"), wxPoint(170,50));
73 mCancelButton = new wxButton(this, wxID_CANCEL, _T("CANCEL"), wxPoint(210,50));
74 */ mOkButton = (wxButton*)FindWindowById(GetAffirmativeId(), this);
75 mCancelButton = (wxButton*)FindWindowById(GetEscapeId(), this);
77 mOkButton->Enable(false);
79 topsizer->Add(mOkButton, 0, wxGROW);
80 topsizer->Add(mCancelButton, 0, wxGROW);
81 topsizer->Add ( bsizer, 0, wxGROW );
89 WxGimmickReaderDialog::~WxGimmickReaderDialog()
91 GimmickDebugMessage(1,"WxGimmickReaderDialog::~WxGimmickReaderDialog"
103 ///Callback method on a selection
104 void WxGimmickReaderDialog::OnValid(bool t)
106 mOkButton->Enable(t);
109 //================================================================
110 //BEGIN_EVENT_TABLE(WxGimmickReaderDialog, wxDialog)
112 //================================================================
114 } // EO namespace creaImageIO