creaImageIO::WxTreeView Class Reference
[View]

Abstract class that handles the view of a Tree through its TreeHandler. More...

#include <creaImageIOWxTreeView.h>

Inheritance diagram for creaImageIO::WxTreeView:

Inheritance graph
[legend]
Collaboration diagram for creaImageIO::WxTreeView:

Collaboration graph
[legend]

List of all members.

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 > &notShown, 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 > &notShown, int level)
 Sets the non visible attributes and refreshes the GUI.
void CreateCtrl (std::vector< std::string > &notShown, 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

TreeHandlerGetTreeHandler ()
GimmickViewGetGimmickView ()

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< LevelTypemLevelList
 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


Detailed Description

Abstract class that handles the view of a Tree through its TreeHandler.

Definition at line 23 of file creaImageIOWxTreeView.h.


Member Typedef Documentation

typedef std::map<tree::Node*,wxColour> creaImageIO::WxTreeView::ColorMap [private]

The color map.

Definition at line 157 of file creaImageIOWxTreeView.h.

typedef std::pair<tree::Node*,wxColour> creaImageIO::WxTreeView::NodeColorPair [private]

Definition at line 158 of file creaImageIOWxTreeView.h.


Constructor & Destructor Documentation

creaImageIO::WxTreeView::WxTreeView ( TreeHandler ,
GimmickView ,
wxWindow *  parent,
const wxWindowID  id 
)

Ctor.

virtual creaImageIO::WxTreeView::~WxTreeView (  )  [virtual]

Virtual destructor.


Member Function Documentation

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]

Removes selected nodes on given level.

Reimplemented from creaImageIO::TreeView.

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]

Sets the non visible attributes and refreshes the GUI.

Reimplemented from creaImageIO::TreeView.

void creaImageIO::WxTreeView::CreateCtrl ( std::vector< std::string > &  notShown,
int  nlevel 
) [virtual]

Creates a new listctrl.

Reimplemented from creaImageIO::TreeView.

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]

Gets selected filenames.

Reimplemented from creaImageIO::TreeView.

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; }


Member Data Documentation

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]

Currently Selected Column.

Definition at line 147 of file creaImageIOWxTreeView.h.

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]

The last selected level (by right click).

Definition at line 155 of file creaImageIOWxTreeView.h.

ColorMap creaImageIO::WxTreeView::mColorMap [private]

Definition at line 159 of file creaImageIOWxTreeView.h.

std::vector<std::string> creaImageIO::WxTreeView::mColorPalette [private]

Initial color palette.

Definition at line 161 of file creaImageIOWxTreeView.h.

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]

Definition at line 169 of file creaImageIOWxTreeView.h.

Referenced by GetLastSelectedLevel().

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.


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 10:50:09 2009 for CreaImageIO by  doxygen 1.5.3