X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOWxTreeView.h;h=a0f6b658d062b032214c81f313bde350f1a98127;hb=381f766db11094bd9b96f9e948527cbec24f680a;hp=9d8c34afdbc9de07c6b4f4e29c01d77420835bd3;hpb=9b19229069b38b9b14563f427554fa7c8fd9ac6f;p=creaImageIO.git diff --git a/src2/creaImageIOWxTreeView.h b/src2/creaImageIOWxTreeView.h index 9d8c34a..a0f6b65 100644 --- a/src2/creaImageIOWxTreeView.h +++ b/src2/creaImageIOWxTreeView.h @@ -54,14 +54,29 @@ namespace creaImageIO ///Callback when the user need the items filtered void OnPopupFilter(wxCommandEvent& event); - ///Callback when the user need the items filtered + ///Callback when the user needs the item copied to the local disk void OnLocalCopy(wxCommandEvent& event); + + ///Callback when the user needs to edit a field + void OnEditField(wxCommandEvent& event); ///Callback on mouse click void OnMouseClick(wxMouseEvent& event); - // Display a menu for items + /// Displays a menu for items void OnItemMenu(wxListEvent &event); + + /// Gets the attributes that are being shown and the ones that have been blocked on a specific level + void GetAttributes(std::vector& areShown, std::vector& notShown, int level); + + ///Sets the non visible attributes and refreshes the GUI + void SetNonVisibleAttributes(const std::vector& notShown, int level); + + ///Creates a new listctrl + void CreateCtrl(std::vector& notShown, int nlevel); + + ///Returns true if the attribute passed as a parameter is visible or not + bool IsAttributeVisible(const std::string& val, int level); /// Actual processing of item selection/deselection /// Called by OnItemSelected and OnItemDeSelected @@ -76,6 +91,8 @@ 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 @@ -107,9 +124,9 @@ namespace creaImageIO void ValidateSelectedImages(bool isSelection); ///Gets selected filenames void GetSelectedAsString(std::vector&s); - ///Gets the filenames of the given nodes and returns them on the given vector. Is recursive. + ///Gets the filenames of the given nodes and returns them on the given vector. Is recursive. void GetFilenamesAsString(const std::vector& nodes, std::vector&s); - /// Gets the next nodes on the list, be it up(true) or down(false). + /// Gets the next nodes on the list, be it up(true) or down(false). void GetNodes(std::vector& nodes, bool direction); /// Updates the view of a level given the selected items of upper level /// Recursive method @@ -129,8 +146,14 @@ namespace creaImageIO /// Currently Selected Column int mColumnSelected; - ///The last selected item on the list + ///The last selected item on the list (left click) long mLastSelected; + + ///The last selected item on the list (right click) + long mLastRightSelected; + + ///The last selected level (by right click) + int mLastRightLevel; ///The color map typedef std::map ColorMap; typedef std::pair NodeColorPair; @@ -149,6 +172,8 @@ namespace creaImageIO wxMenu* menuItem; int mAnonymizingID; int mLocalCopyID; + int mEditFieldID; + // If set to true then OnSelectedChanged returns immediately. // Used to do avoid useless process during multiple selections // or sorting