]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOWxGimmickReaderDialog.cpp
No newline at end of file
[creaImageIO.git] / src2 / creaImageIOWxGimmickReaderDialog.cpp
index 2bf166168c26db24dc3fc102043e84c04d713b05..e7cd5b8a94691fc5fbc9388afa7ff387b23d7d63 100644 (file)
@@ -11,6 +11,7 @@ namespace creaImageIO
                                               const wxSize& size,
                                               int min_dim,
                                                   int max_dim,
+                                                  int output_dim,
                                               int threads)
  :   wxDialog( parent, 
                  id, 
@@ -35,7 +36,7 @@ namespace creaImageIO
       
       mGimmick = new Gimmick();
       mGimmick->Initialize();
-     
+    
       
       mView = new WxGimmickView(mGimmick,
                                this,
@@ -46,6 +47,9 @@ namespace creaImageIO
                                max_dim,
                                threads);
       mView->Initialize();
+          // Connect the AddProgress callback
+      mView->ConnectValidationObserver
+      ( boost::bind( &WxGimmickReaderDialog::OnValid , this, _1 ) );
     }
     catch (crea::Exception e)
     {
@@ -74,21 +78,28 @@ namespace creaImageIO
                        <<std::endl);
     if (mView) 
       {
-       delete mView;
+               delete mView;
       }
     if (mGimmick) 
       {
        mGimmick->Finalize();
        delete mGimmick;
       }
+
+  }
+
+  ///Callback method on a selection
+  void WxGimmickReaderDialog::OnValid(bool t)
+  {
+    mOkButton->Enable(t);
   }
 
 
-  
+
   //================================================================
-  BEGIN_EVENT_TABLE(WxGimmickReaderDialog, wxDialog)
-        
-  END_EVENT_TABLE()
+  //BEGIN_EVENT_TABLE(WxGimmickReaderDialog, wxDialog)
+  //END_EVENT_TABLE()
   //================================================================