#include <creaImageIOWxTreeView.h>
Public Member Functions | |
WxTreeView (TreeHandler *, GimmickView *, wxWindow *parent, const wxWindowID id) | |
Ctor. | |
virtual | ~WxTreeView () |
Virtual destructor. | |
virtual void | UpdateLevel (int) |
Updates the view of a level given the selected items of upper level. | |
virtual void | RemoveSelected () |
Removes selected nodes on given level. | |
virtual unsigned int | GetLastSelectedLevel () |
Returns the last selected level. | |
void | OnItemSelected (wxListEvent &event) |
Callback for item selection. | |
void | OnItemDeSelected (wxListEvent &event) |
Callback for item deselection. | |
void | OnColClick (wxListEvent &event) |
Callback for column click. | |
void | OnPopupSort (wxCommandEvent &event) |
Callback when the user needs the items sorted. | |
void | OnPopupFilter (wxCommandEvent &event) |
Callback when the user need the items filtered. | |
void | OnLocalCopy (wxCommandEvent &event) |
Callback when the user needs the item copied to the local disk. | |
void | OnEditField (wxCommandEvent &event) |
Callback when the user needs to edit a field. | |
void | OnMouseClick (wxMouseEvent &event) |
Callback on mouse click. | |
void | OnItemMenu (wxListEvent &event) |
Displays a menu for items. | |
void | GetAttributes (std::vector< std::string > &areShown, std::vector< std::string > ¬Shown, int level) |
Gets the attributes that are being shown and the ones that have been blocked on a specific level. | |
void | SetNonVisibleAttributes (const std::vector< std::string > ¬Shown, int level) |
Sets the non visible attributes and refreshes the GUI. | |
void | CreateCtrl (std::vector< std::string > ¬Shown, int nlevel) |
Creates a new listctrl. | |
bool | IsAttributeVisible (const std::string &val, int level) |
Returns true if the attribute passed as a parameter is visible or not. | |
virtual void | ValidateSelectedImages () |
Validates the selected images. | |
Protected Member Functions | |
TreeHandler * | GetTreeHandler () |
GimmickView * | GetGimmickView () |
Private Types | |
typedef std::map < tree::Node *, wxColour > | ColorMap |
The color map. | |
typedef std::pair < tree::Node *, wxColour > | NodeColorPair |
Private Member Functions | |
wxListCtrl * | GetCtrl (int l) |
return the wxListCtrl of one level | |
wxSplitterWindow * | GetSplitter (int l) |
return the wxSplitter of one level | |
int | GetNumberOfLevels () |
Returns the maximum number of levels. | |
const std::vector < tree::Node * > & | GetSelected (int level) |
void | SetSelectedUpToDate (int l, bool v) |
Set the bool SelectedUpToDate for level l. | |
bool | GetSelectedUpToDate (int l) |
Get the bool SelectedUpToDate for level l. | |
void | ValidateSelectedImages (bool isSelection) |
Validates the selected images. | |
void | GetSelectedAsString (std::vector< std::string > &s) |
Gets selected filenames. | |
void | GetFilenamesAsString (const std::vector< tree::Node * > &nodes, std::vector< std::string > &s) |
Gets the filenames of the given nodes and returns them on the given vector. Is recursive. | |
void | GetNodes (std::vector< tree::Node * > &nodes, bool direction) |
Gets the next nodes on the list, be it up(true) or down(false). | |
virtual void | RecursiveUpdateLevel (int) |
void | SetColor (int level, int item) |
Sets the color of a selected item. | |
void | CreateColorPalette () |
Creates the color palette for the first level. | |
void | SelectAll (int level) |
Selects all the elements of a level. | |
void | UnSelectAll (int level) |
UnSelects all the elements of a level. | |
void | OnKeyDown (wxListEvent &event) |
void | SortLevel (int level) |
Sorts the level. | |
Private Attributes | |
std::vector< LevelType > | mLevelList |
The vector of levels : one for each level of the tree. | |
int | mColumnSelected |
Currently Selected Column. | |
long | mLastSelected |
The last selected item on the list (left click). | |
long | mLastRightSelected |
The last selected item on the list (right click). | |
int | mLastRightLevel |
The last selected level (by right click). | |
ColorMap | mColorMap |
std::vector < std::string > | mColorPalette |
Initial color palette. | |
wxMenu * | menu |
wxObject * | senderCtrl |
int | mAscendingID |
int | mDescendingID |
int | mFilterID |
unsigned int | mLastLevel |
wxMenu * | menuItem |
int | mAnonymizingID |
int | mLocalCopyID |
int | mEditFieldID |
bool | mIgnoreSelectedChanged |
Classes | |
struct | LevelType |
Definition at line 23 of file creaImageIOWxTreeView.h.
typedef std::map<tree::Node*,wxColour> creaImageIO::WxTreeView::ColorMap [private] |
typedef std::pair<tree::Node*,wxColour> creaImageIO::WxTreeView::NodeColorPair [private] |
Definition at line 158 of file creaImageIOWxTreeView.h.
creaImageIO::WxTreeView::WxTreeView | ( | TreeHandler * | , | |
GimmickView * | , | |||
wxWindow * | parent, | |||
const wxWindowID | id | |||
) |
Ctor.
virtual creaImageIO::WxTreeView::~WxTreeView | ( | ) | [virtual] |
Virtual destructor.
virtual void creaImageIO::WxTreeView::UpdateLevel | ( | int | ) | [virtual] |
Updates the view of a level given the selected items of upper level.
Reimplemented from creaImageIO::TreeView.
virtual void creaImageIO::WxTreeView::RemoveSelected | ( | ) | [virtual] |
virtual unsigned int creaImageIO::WxTreeView::GetLastSelectedLevel | ( | ) | [inline, virtual] |
Returns the last selected level.
Reimplemented from creaImageIO::TreeView.
Definition at line 40 of file creaImageIOWxTreeView.h.
References mLastLevel.
00040 {return mLastLevel;}
void creaImageIO::WxTreeView::OnItemSelected | ( | wxListEvent & | event | ) |
Callback for item selection.
void creaImageIO::WxTreeView::OnItemDeSelected | ( | wxListEvent & | event | ) |
Callback for item deselection.
void creaImageIO::WxTreeView::OnColClick | ( | wxListEvent & | event | ) |
Callback for column click.
void creaImageIO::WxTreeView::OnPopupSort | ( | wxCommandEvent & | event | ) |
Callback when the user needs the items sorted.
void creaImageIO::WxTreeView::OnPopupFilter | ( | wxCommandEvent & | event | ) |
Callback when the user need the items filtered.
void creaImageIO::WxTreeView::OnLocalCopy | ( | wxCommandEvent & | event | ) |
Callback when the user needs the item copied to the local disk.
void creaImageIO::WxTreeView::OnEditField | ( | wxCommandEvent & | event | ) |
Callback when the user needs to edit a field.
void creaImageIO::WxTreeView::OnMouseClick | ( | wxMouseEvent & | event | ) |
Callback on mouse click.
void creaImageIO::WxTreeView::OnItemMenu | ( | wxListEvent & | event | ) |
Displays a menu for items.
void creaImageIO::WxTreeView::GetAttributes | ( | std::vector< std::string > & | areShown, | |
std::vector< std::string > & | notShown, | |||
int | level | |||
) | [virtual] |
Gets the attributes that are being shown and the ones that have been blocked on a specific level.
Reimplemented from creaImageIO::TreeView.
void creaImageIO::WxTreeView::SetNonVisibleAttributes | ( | const std::vector< std::string > & | notShown, | |
int | level | |||
) | [virtual] |
void creaImageIO::WxTreeView::CreateCtrl | ( | std::vector< std::string > & | notShown, | |
int | nlevel | |||
) | [virtual] |
bool creaImageIO::WxTreeView::IsAttributeVisible | ( | const std::string & | val, | |
int | level | |||
) |
Returns true if the attribute passed as a parameter is visible or not.
wxListCtrl* creaImageIO::WxTreeView::GetCtrl | ( | int | l | ) | [inline, private] |
return the wxListCtrl of one level
Definition at line 110 of file creaImageIOWxTreeView.h.
References mLevelList.
00110 { return mLevelList[l].wxCtrl; }
wxSplitterWindow* creaImageIO::WxTreeView::GetSplitter | ( | int | l | ) | [inline, private] |
return the wxSplitter of one level
Definition at line 112 of file creaImageIOWxTreeView.h.
References mLevelList.
00112 { return mLevelList[l].wxSplitter; }
int creaImageIO::WxTreeView::GetNumberOfLevels | ( | ) | [inline, private, virtual] |
Returns the maximum number of levels.
Reimplemented from creaImageIO::TreeView.
Definition at line 114 of file creaImageIOWxTreeView.h.
References mLevelList.
00114 { return mLevelList.size(); }
const std::vector<tree::Node*>& creaImageIO::WxTreeView::GetSelected | ( | int | level | ) | [private, virtual] |
Gets the user selected data from the level passed as a parameter Updates the vector if necessary
Reimplemented from creaImageIO::TreeView.
void creaImageIO::WxTreeView::SetSelectedUpToDate | ( | int | l, | |
bool | v | |||
) | [inline, private] |
Set the bool SelectedUpToDate for level l.
Definition at line 119 of file creaImageIOWxTreeView.h.
References mLevelList.
00119 { mLevelList[l].SelectedUpToDate = v; }
bool creaImageIO::WxTreeView::GetSelectedUpToDate | ( | int | l | ) | [inline, private] |
Get the bool SelectedUpToDate for level l.
Definition at line 121 of file creaImageIOWxTreeView.h.
References mLevelList.
00121 { return mLevelList[l].SelectedUpToDate; }
void creaImageIO::WxTreeView::ValidateSelectedImages | ( | bool | isSelection | ) | [private] |
Validates the selected images.
void creaImageIO::WxTreeView::GetSelectedAsString | ( | std::vector< std::string > & | s | ) | [private, virtual] |
void creaImageIO::WxTreeView::GetFilenamesAsString | ( | const std::vector< tree::Node * > & | nodes, | |
std::vector< std::string > & | s | |||
) | [private] |
Gets the filenames of the given nodes and returns them on the given vector. Is recursive.
void creaImageIO::WxTreeView::GetNodes | ( | std::vector< tree::Node * > & | nodes, | |
bool | direction | |||
) | [private, virtual] |
Gets the next nodes on the list, be it up(true) or down(false).
Reimplemented from creaImageIO::TreeView.
virtual void creaImageIO::WxTreeView::RecursiveUpdateLevel | ( | int | ) | [private, virtual] |
Updates the view of a level given the selected items of upper level Recursive method
void creaImageIO::WxTreeView::SetColor | ( | int | level, | |
int | item | |||
) | [private] |
Sets the color of a selected item.
void creaImageIO::WxTreeView::CreateColorPalette | ( | ) | [private] |
Creates the color palette for the first level.
void creaImageIO::WxTreeView::SelectAll | ( | int | level | ) | [private] |
Selects all the elements of a level.
void creaImageIO::WxTreeView::UnSelectAll | ( | int | level | ) | [private] |
UnSelects all the elements of a level.
void creaImageIO::WxTreeView::OnKeyDown | ( | wxListEvent & | event | ) | [private] |
void creaImageIO::WxTreeView::SortLevel | ( | int | level | ) | [private] |
Sorts the level.
virtual void creaImageIO::TreeView::ValidateSelectedImages | ( | ) | [inline, virtual, inherited] |
Validates the selected images.
Definition at line 40 of file creaImageIOTreeView.h.
References GimmickError.
00041 { GimmickError("INTERNAL ERROR : TreeView::ValidateSelected not overloaded");}
TreeHandler* creaImageIO::TreeView::GetTreeHandler | ( | ) | [inline, protected, inherited] |
Definition at line 67 of file creaImageIOTreeView.h.
References creaImageIO::TreeView::mTreeHandler.
00067 { return mTreeHandler; }
GimmickView* creaImageIO::TreeView::GetGimmickView | ( | ) | [inline, protected, inherited] |
Definition at line 68 of file creaImageIOTreeView.h.
References creaImageIO::TreeView::mGimmickView.
00068 { return mGimmickView; }
std::vector<LevelType> creaImageIO::WxTreeView::mLevelList [private] |
The vector of levels : one for each level of the tree.
Definition at line 107 of file creaImageIOWxTreeView.h.
Referenced by GetCtrl(), GetNumberOfLevels(), GetSelectedUpToDate(), GetSplitter(), and SetSelectedUpToDate().
int creaImageIO::WxTreeView::mColumnSelected [private] |
long creaImageIO::WxTreeView::mLastSelected [private] |
The last selected item on the list (left click).
Definition at line 149 of file creaImageIOWxTreeView.h.
long creaImageIO::WxTreeView::mLastRightSelected [private] |
The last selected item on the list (right click).
Definition at line 152 of file creaImageIOWxTreeView.h.
int creaImageIO::WxTreeView::mLastRightLevel [private] |
ColorMap creaImageIO::WxTreeView::mColorMap [private] |
Definition at line 159 of file creaImageIOWxTreeView.h.
std::vector<std::string> creaImageIO::WxTreeView::mColorPalette [private] |
wxMenu* creaImageIO::WxTreeView::menu [private] |
Definition at line 163 of file creaImageIOWxTreeView.h.
wxObject* creaImageIO::WxTreeView::senderCtrl [private] |
Definition at line 165 of file creaImageIOWxTreeView.h.
int creaImageIO::WxTreeView::mAscendingID [private] |
Definition at line 166 of file creaImageIOWxTreeView.h.
int creaImageIO::WxTreeView::mDescendingID [private] |
Definition at line 167 of file creaImageIOWxTreeView.h.
int creaImageIO::WxTreeView::mFilterID [private] |
Definition at line 168 of file creaImageIOWxTreeView.h.
unsigned int creaImageIO::WxTreeView::mLastLevel [private] |
wxMenu* creaImageIO::WxTreeView::menuItem [private] |
Definition at line 171 of file creaImageIOWxTreeView.h.
int creaImageIO::WxTreeView::mAnonymizingID [private] |
Definition at line 172 of file creaImageIOWxTreeView.h.
int creaImageIO::WxTreeView::mLocalCopyID [private] |
Definition at line 173 of file creaImageIOWxTreeView.h.
int creaImageIO::WxTreeView::mEditFieldID [private] |
Definition at line 174 of file creaImageIOWxTreeView.h.
bool creaImageIO::WxTreeView::mIgnoreSelectedChanged [private] |
Definition at line 179 of file creaImageIOWxTreeView.h.