]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOWxTreeView.h
_T
[creaImageIO.git] / src2 / creaImageIOWxTreeView.h
index 126c9410a6aabe86abfa02274f783ad9c7609874..586eea2b5a8aaba9d4e65b7ffbc13b09de0ed7d5 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
    */
@@ -174,7 +189,6 @@ namespace creaImageIO
       // or sorting
       bool mIgnoreSelectedChanged;
 
-
       DECLARE_EVENT_TABLE()
     };
     // EO class WxTreeView