ALBA
albaGUIVMEChooserTree.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUIVMEChooserTree
5 Authors: Paolo Quadrani
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaGUIVMEChooserTree_H__
18#define __albaGUIVMEChooserTree_H__
19
21{
24};
25
26//----------------------------------------------------------------------------
27// Include:
28//----------------------------------------------------------------------------
29#include "albaGUICheckTree.h"
30
31//----------------------------------------------------------------------------
32// Forward refs:
33//----------------------------------------------------------------------------
34class albaVME;
35
36typedef bool (*ValidateCallBackType) (albaVME *);
37
38//----------------------------------------------------------------------------
39// albaGUIVMEChooserTree :
40//----------------------------------------------------------------------------
46{
47public:
48 albaGUIVMEChooserTree (wxWindow *parent, albaGUICheckTree *tree, ValidateCallBackType vme_accept_function = 0, wxWindowID id=-1, bool CloseButton = false, bool HideTitle = false, long style = REPRESENTATION_AS_TREE, bool multiSelect = false, albaVME *subTree=NULL);
50
52 std::vector<albaVME*> GetChoosedNode();
53
55 virtual void OnIconClick(wxTreeItemId item);
56
57protected:
60
62
64
66 void CloneSubTree(albaGUICheckTree *tree, wxTreeItemId *source_item, wxTreeItemId *dest_parent_item);
67
69 void ShowContextualMenu(wxMouseEvent& event);
70
72 virtual void OnSelectionChanged(wxTreeEvent& event);
73
75
78 std::vector<albaVME*> m_CheckedNode;
80
81 DECLARE_EVENT_TABLE()
82};
83#endif
VME_CHOOSER_STYLES
@ REPRESENTATION_AS_TREE
@ REPRESENTATION_AS_ACCEPTABLE_NODE_LIST
bool(* ValidateCallBackType)(albaVME *)
class Name : albaGUICheckTree.
Widget representing the tree that allow the user to choose a VME.
albaVME * m_ChoosedNode
Pointer to the selected node in single selection.
void VmeUpdateIcon(albaVME *vme)
std::vector< albaVME * > m_CheckedNode
Vector of checked node (used in multi-selection)
bool m_MultipleSelection
Flag that manage the single or multi selection of the nodes inside the tree.
std::vector< albaVME * > GetChoosedNode()
Return the choosed node.
albaGUIVMEChooserTree(wxWindow *parent, albaGUICheckTree *tree, ValidateCallBackType vme_accept_function=0, wxWindowID id=-1, bool CloseButton=false, bool HideTitle=false, long style=REPRESENTATION_AS_TREE, bool multiSelect=false, albaVME *subTree=NULL)
void ShowContextualMenu(wxMouseEvent &event)
Called by the Custom-Tree-Event-Handler.
virtual void OnSelectionChanged(wxTreeEvent &event)
respond to Selection Changed
int GetVmeStatus(albaVME *node)
Return the status of the node according to the vme visibility.
ValidateCallBackType m_ValidateFunction
void CloneSubTree(albaGUICheckTree *tree, wxTreeItemId *source_item, wxTreeItemId *dest_parent_item)
clone in tree a subtree of source_item
virtual void OnIconClick(wxTreeItemId item)
Called by the Custom-Tree-Event-Handler - via OnMouseDown.
void InitializeImageList()
Fill the image list considering the visibility vme type, and vme availability.
virtual ~albaGUIVMEChooserTree()
albaVME -
Definition: albaVME.h:150