]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOWxGimmickView.cpp
After checking that the event goes up in the hierarchy (in win32 at least)
[creaImageIO.git] / src2 / creaImageIOWxGimmickView.cpp
index cec329ba94ba9d9bc30c8651f121d8255b627930..7594cbef3bcda45fc83ad4ee44106988c3ff7de1 100644 (file)
@@ -63,7 +63,6 @@ namespace creaImageIO
                               const wxPoint& pos, const wxSize& size,
                               int min_dim,
                                   int max_dim,
-                                  int out_dim,
                               int number_of_threads)
     : wxPanel(parent,id,pos,size),
       GimmickView(gimmick),
@@ -102,17 +101,17 @@ namespace creaImageIO
 
        mSelectionMaxDimension=max_dim;
        mSelectionMinDimension=min_dim;
-       mOutputDimension=out_dim;
 
     // Create the views
     CreateTreeViews();
 
     // Bottom panel 
     mBottomPanel = new wxPanel(mSplitter,-1);
-
+       mText = new wxStaticText(mBottomPanel, wxID_ANY, wxT("Status: Welcome to Gimmick!"));
+       
     // Splitting
     int hsize = size.GetHeight();
-    int bottom_minsize = 200;
+    int bottom_minsize = 20;
 
     mSplitter->SetMinimumPaneSize( bottom_minsize );
     mSplitter->SplitHorizontally( mNotebook, mBottomPanel, 
@@ -189,7 +188,6 @@ namespace creaImageIO
        
        view->SetMaxDimension(mSelectionMaxDimension);
        view->SetMinDimension(mSelectionMinDimension);
-       view->SetOutputDimension(mOutputDimension);
 
     // TO DO : TEST THAT A VIEW WITH SAME NAME IS NOT
     // ALREADY IN THE MAP
@@ -200,20 +198,17 @@ namespace creaImageIO
 
   }
   //======================================================================
-  /// Returns the selected Images so that they comply with the given parameter(<4D)
+  /// Returns the selected Image so that it complies with the given parameter(<4D)
   vtkImageData* WxGimmickView::GetSelectedImage(int dim)
   {
-         return NULL;
+         return GetTreeViewMap()["Local database"]->GetSelectedImage(dim);
   }
 
   //======================================================================
   /// Returns the selected Images so that they comply with the given parameter(4D)
   void WxGimmickView::GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
   {
-       
-               //GetTreeViewMap()["Local database"]->GetImageData()
-               //return NULL   ;
-       
+         GetTreeViewMap()["Local database"]->GetSelectedImages(s,dim);
   }
 
   //=================================================
@@ -352,6 +347,15 @@ namespace creaImageIO
   }
   //=================================================
 
+  //=================================================
+  void WxGimmickView::SetMessage(const wxString& mess)
+  {      
+    wxBusyCursor busy;
+    
+    mText->SetLabel(_T("Status: ")+mess);
+   }
+  //=================================================
+
    //=================================================
   void WxGimmickView::OnRemove(wxCommandEvent& event)
   {
@@ -416,7 +420,7 @@ namespace creaImageIO
     EVT_TOOL(TOOL_ADDFILES_ID, WxGimmickView::OnAddFiles)
     EVT_TOOL(TOOL_ADDDIR_ID, WxGimmickView::OnAddDir)
        EVT_TOOL(TOOL_REMOVE_ID, WxGimmickView::OnRemove)
-    END_EVENT_TABLE()
+  END_EVENT_TABLE()
   //=================================================
 
 } // EO namespace creaImageIO