]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOWxTreeView.h
Message for remove patients action
[creaImageIO.git] / src2 / creaImageIOWxTreeView.h
index 126c9410a6aabe86abfa02274f783ad9c7609874..001bf26214a53c261fc6b442bfdaac288c9ce9e5 100644 (file)
@@ -9,10 +9,25 @@
 #include <wx/listctrl.h>
 #include <wx/splitter.h>
 //#include <vector>
-
+const std::string empty_string("");
 namespace creaImageIO
 {
 
+         //=====================================================================
+  /// Data stored by the list items
+  struct ItemData
+  {
+    ItemData() : node(0), id(-1), attr(&empty_string) {}
+    // The corresponding Node
+    tree::Node* node;
+    // The id ?
+    int id;
+    // The pointer on the current attribute string to sort on
+    const std::string* attr;
+    // Was the item previously selected ?
+    // Useful for reselecting the item after sort
+    bool selected;
+  };
   /**
    * \ingroup View
    */
@@ -34,7 +49,7 @@ namespace creaImageIO
       virtual void UpdateLevel( int );
 
       ///Removes selected nodes on given level
-      virtual void RemoveSelected();
+         virtual void RemoveSelected(std::string &i_save);
 
          ///Returns the last selected level
          virtual unsigned int GetLastSelectedLevel(){return mLastLevel;}
@@ -174,12 +189,27 @@ namespace creaImageIO
       // or sorting
       bool mIgnoreSelectedChanged;
 
-
       DECLARE_EVENT_TABLE()
     };
     // EO class WxTreeView
     //=====================================================================
 
+       class RemoveAlertDlg : public wxDialog
+       {
+       public:
+               RemoveAlertDlg(wxWindow *parent, 
+                                              wxString title,    
+                                                  const wxSize& size);
+               ~RemoveAlertDlg();
+
+               bool isChecked();
+
+       private :
+               void onCheck(wxCommandEvent &Event);
+               bool mSave;
+               wxCheckBox *mcheck;
+
+       };
 
 
 } // EO namespace creaImageIO