wxWindow *parent,
const wxWindowID id,
const wxPoint& pos, const wxSize& size,
- int image_type,
+ int min_dim,
+ int max_dim,
int number_of_threads)
: wxPanel(parent,id,pos,size),
GimmickView(gimmick),
//Gimmick
mGimmick=gimmick;
+ mSelectionMaxDimension=max_dim;
+ mSelectionMinDimension=min_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,
name<<"'"<<std::endl);
// Create the WxTreeView
WxTreeView* view = new WxTreeView(h,mNotebook,-1);
+
+ view->SetMaxDimension(mSelectionMaxDimension);
+ view->SetMinDimension(mSelectionMinDimension);
// TO DO : TEST THAT A VIEW WITH SAME NAME IS NOT
// ALREADY IN THE MAP
}
//======================================================================
+ /// Returns the selected Image so that it complies with the given parameter(<4D)
+ vtkImageData* WxGimmickView::GetSelectedImage(int dim)
+ {
+ 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"]->GetSelectedImages(s,dim);
+ }
//=================================================
void WxGimmickView::CreateIconList()
}
//=================================================
+ //=================================================
+ void WxGimmickView::SetMessage(const wxString& mess)
+ {
+ wxBusyCursor busy;
+
+ mText->SetLabel(_T("Status: ")+mess);
+ }
+ //=================================================
+
+ //=================================================
+ void WxGimmickView::OnRemove(wxCommandEvent& event)
+ {
+ //TODO Select current tree handler
+ wxBusyCursor busy;
+ GetTreeViewMap()["Local database"]->RemoveSelected(1);
+ }
+ //=================================================
+
//=================================================
/// AddProgress Gimmick callback
void WxGimmickView::OnAddProgress( Gimmick::AddProgress& p)
BEGIN_EVENT_TABLE(WxGimmickView, wxPanel)
EVT_TOOL(TOOL_ADDFILES_ID, WxGimmickView::OnAddFiles)
EVT_TOOL(TOOL_ADDDIR_ID, WxGimmickView::OnAddDir)
- END_EVENT_TABLE()
+ EVT_TOOL(TOOL_REMOVE_ID, WxGimmickView::OnRemove)
+ END_EVENT_TABLE()
//=================================================
} // EO namespace creaImageIO