X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOWxTreeView.h;h=586eea2b5a8aaba9d4e65b7ffbc13b09de0ed7d5;hb=6ce1377c642f91e9b173b8a5440543eb5320fcd5;hp=a0f6b658d062b032214c81f313bde350f1a98127;hpb=381f766db11094bd9b96f9e948527cbec24f680a;p=creaImageIO.git diff --git a/src2/creaImageIOWxTreeView.h b/src2/creaImageIOWxTreeView.h index a0f6b65..586eea2 100644 --- a/src2/creaImageIOWxTreeView.h +++ b/src2/creaImageIOWxTreeView.h @@ -9,10 +9,25 @@ #include #include //#include - +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 */ @@ -91,8 +106,6 @@ namespace creaImageIO wxListCtrl* wxCtrl; wxSplitterWindow* wxSplitter; std::vector key; - //The vector of not shown attributes - std::vector notShownAtts; // The vector of currently selected nodes of the level std::vector Selected; // True iff the vector Selected is up to date @@ -102,7 +115,8 @@ namespace creaImageIO ///Boolean that defines the direction of the sort ///True is ascending order and false is descending bool SortAscending; - // + //The vector of not shown attributes + std::vector notShownAtts; }; /// The vector of levels : one for each level of the tree std::vector mLevelList; @@ -131,10 +145,6 @@ namespace creaImageIO /// Updates the view of a level given the selected items of upper level /// Recursive method virtual void RecursiveUpdateLevel( int ); - ///Sets the color of a selected item - void SetColor(int level, int item); - ///Creates the color palette for the first level - void CreateColorPalette(); ///Selects all the elements of a level void SelectAll(int level); ///UnSelects all the elements of a level @@ -179,7 +189,6 @@ namespace creaImageIO // or sorting bool mIgnoreSelectedChanged; - DECLARE_EVENT_TABLE() }; // EO class WxTreeView