ALBA
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
albaGUITree Class Reference

#include <albaGUITree.h>

Inheritance diagram for albaGUITree:
Inheritance graph
[legend]
Collaboration diagram for albaGUITree:
Collaboration graph
[legend]

Classes

class  albaGUITreeTableElement
 

Public Member Functions

 albaGUITree (wxWindow *parent, wxWindowID id=-1, bool CloseButton=false, bool HideTitle=false)
 
virtual ~albaGUITree ()
 
void Reset ()
 
bool AddNode (long long node_id, long long parent_id, wxString label, bool expanded, int icon=0)
 
bool DeleteNode (long long node_id)
 
bool SetNodeLabel (long long node_id, wxString label)
 
wxString GetNodeLabel (long long node_id)
 
bool NodeHasChildren (long long node_id)
 
long long GetNodeParent (long long node_id)
 
bool SetNodeParent (long long node_id, long long parent_id)
 
bool SetNodeIcon (long long node_id, int icon)
 
int GetNodeIcon (long long node_id)
 
bool SelectNode (long long node_id)
 
void SetImageList (wxImageList *img)
 
void SortChildren (long long node_id=0)
 
void SetAutoSort (bool enable)
 
bool GetAutoSort ()
 
void CollapseNode (long long node_id)
 
void ExpandNode (long long node_id)
 
bool IsNodeExpanded (long long node_id)
 
void SetListener (albaObserver *listener)
 
wxTreeItemId ItemFromNode (long long node_id)
 
long long NodeFromItem (wxTreeItemId &item)
 
void SetTreeStyle (long style)
 
long GetTreeStyle ()
 
bool NodeExist (long long node_id)
 
- Public Member Functions inherited from albaGUINamedPanel
 albaGUINamedPanel (wxWindow *parent, wxWindowID id=-1, bool CloseButton=false, bool HideTitle=false)
 
virtual ~albaGUINamedPanel ()
 
void Add (wxWindow *window, int option=0, int flag=wxEXPAND, int border=0)
 
void Add (wxSizer *sizer, int option=0, int flag=wxEXPAND, int border=0)
 
bool Remove (wxWindow *window)
 
bool Remove (wxSizer *sizer)
 
void SetTitle (wxString label)
 
void SetTitleColor (wxColour *color=NULL)
 
wxBoxSizer * GetTopSizer ()
 
wxPanel * GetTopPanel ()
 
- Public Member Functions inherited from albaGUIPanel
 albaGUIPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel")
 

Protected Member Functions

virtual void OnSelectionChanged (wxTreeEvent &event)
 
void OnSize (wxSizeEvent &event)
 
void DeleteNode2 (long long node_id)
 
void SetNodeParent2 (long long node_id, long long parent_id)
 
int CheckIconId (int icon)
 
bool IsRootHidden ()
 

Protected Attributes

bool m_PreventNotify
 
bool m_Autosort
 
long long m_NodeRoot
 
albaTreeCtrlm_NodeTree
 
wxImageList * m_NodeImages
 
wxHashTable * m_NodeTable
 
albaObserverm_Listener
 
- Protected Attributes inherited from albaGUINamedPanel
wxPanel * m_Top
 
albaGUILabm_Label
 
wxBoxSizer * m_Sizer
 
wxBoxSizer * m_TopSizer
 
albaGUINamedPanelm_NextPanel
 
wxColour m_Color
 

Additional Inherited Members

- Public Attributes inherited from albaGUIPanel
albaGUIPanelm_NextPanel
 

Detailed Description

Definition at line 145 of file albaGUITree.h.

Constructor & Destructor Documentation

◆ albaGUITree()

albaGUITree::albaGUITree ( wxWindow *  parent,
wxWindowID  id = -1,
bool  CloseButton = false,
bool  HideTitle = false 
)

◆ ~albaGUITree()

virtual albaGUITree::~albaGUITree ( )
virtual

Member Function Documentation

◆ Reset()

void albaGUITree::Reset ( )

Clears all items in the tree.

◆ AddNode()

bool albaGUITree::AddNode ( long long  node_id,
long long  parent_id,
wxString  label,
bool  expanded,
int  icon = 0 
)

Create a new tree item with the specified parent,label and icon.

Set parent = 0 to create the root. 0 is not a valid node_id.

◆ DeleteNode()

bool albaGUITree::DeleteNode ( long long  node_id)

Delete the specified node, and its subtree.

◆ SetNodeLabel()

bool albaGUITree::SetNodeLabel ( long long  node_id,
wxString  label 
)

Set the label for the node.

◆ GetNodeLabel()

wxString albaGUITree::GetNodeLabel ( long long  node_id)

Get the label for the node.

Add by Mucci 19/09/2007

◆ NodeHasChildren()

bool albaGUITree::NodeHasChildren ( long long  node_id)

Check if the node has children.

Add by Mucci 19/09/2007

◆ GetNodeParent()

long long albaGUITree::GetNodeParent ( long long  node_id)

Return the parent id of the node.

Add by Mucci 19/09/2007

◆ SetNodeParent()

bool albaGUITree::SetNodeParent ( long long  node_id,
long long  parent_id 
)

Move a node, and its subtree.

◆ SetNodeIcon()

bool albaGUITree::SetNodeIcon ( long long  node_id,
int  icon 
)

Set the icon for the node.

◆ GetNodeIcon()

int albaGUITree::GetNodeIcon ( long long  node_id)

Return the icon index for the node 'node_id'.

◆ SelectNode()

bool albaGUITree::SelectNode ( long long  node_id)

Select the node.

◆ SetImageList()

void albaGUITree::SetImageList ( wxImageList *  img)

Set the images to be used for the nodes.

Must be set before adding any node. The default ImageList provide 4 icons : -1 gray dot -2 red dot -3 blue dot -4 yellow dot

◆ SortChildren()

void albaGUITree::SortChildren ( long long  node_id = 0)

Sort the children of node_id.

(not the subtree) give node_id = 0 to specify the root.

◆ SetAutoSort()

void albaGUITree::SetAutoSort ( bool  enable)
inline

if autosort is on - the tree is always kept sorted

Definition at line 201 of file albaGUITree.h.

◆ GetAutoSort()

bool albaGUITree::GetAutoSort ( )
inline

Get the autosort flag.

Definition at line 204 of file albaGUITree.h.

◆ CollapseNode()

void albaGUITree::CollapseNode ( long long  node_id)

collapse the children of node_id

◆ ExpandNode()

void albaGUITree::ExpandNode ( long long  node_id)

expand the children of node_id

◆ IsNodeExpanded()

bool albaGUITree::IsNodeExpanded ( long long  node_id)

◆ SetListener()

void albaGUITree::SetListener ( albaObserver listener)
inline

Set the Listener that will receive event-notification, the Listener can be changed any time

Definition at line 215 of file albaGUITree.h.

◆ ItemFromNode()

wxTreeItemId albaGUITree::ItemFromNode ( long long  node_id)

Return the node item from node id.

◆ NodeFromItem()

long long albaGUITree::NodeFromItem ( wxTreeItemId &  item)

Return node id from node item.

◆ SetTreeStyle()

void albaGUITree::SetTreeStyle ( long  style)
inline

Definition at line 223 of file albaGUITree.h.

◆ GetTreeStyle()

long albaGUITree::GetTreeStyle ( )
inline

Definition at line 224 of file albaGUITree.h.

◆ NodeExist()

bool albaGUITree::NodeExist ( long long  node_id)

Return true if node exist.

◆ OnSelectionChanged()

virtual void albaGUITree::OnSelectionChanged ( wxTreeEvent &  event)
protectedvirtual

Private function that notify the Listener of node selection and deselection.

Reimplemented in albaGUIVMEChooserTree, and albaGUICheckTree.

◆ OnSize()

void albaGUITree::OnSize ( wxSizeEvent &  event)
protected

When tree is used on a wxNotebook m_NodeTree must be called on Sizing .

◆ DeleteNode2()

void albaGUITree::DeleteNode2 ( long long  node_id)
protected

Delete recursively a node and its subtree.

◆ SetNodeParent2()

void albaGUITree::SetNodeParent2 ( long long  node_id,
long long  parent_id 
)
protected

Move a node, and its subtree.

◆ CheckIconId()

int albaGUITree::CheckIconId ( int  icon)
protected

Check that id is a valid index in the imagelist - return the (eventually clamped) value.

◆ IsRootHidden()

bool albaGUITree::IsRootHidden ( )
inlineprotected

Definition at line 245 of file albaGUITree.h.

Member Data Documentation

◆ m_PreventNotify

bool albaGUITree::m_PreventNotify
protected

Definition at line 247 of file albaGUITree.h.

◆ m_Autosort

bool albaGUITree::m_Autosort
protected

Definition at line 248 of file albaGUITree.h.

◆ m_NodeRoot

long long albaGUITree::m_NodeRoot
protected

Definition at line 249 of file albaGUITree.h.

◆ m_NodeTree

albaTreeCtrl* albaGUITree::m_NodeTree
protected

Definition at line 250 of file albaGUITree.h.

Referenced by albaGUICheckTree::GetTree().

◆ m_NodeImages

wxImageList* albaGUITree::m_NodeImages
protected

Definition at line 251 of file albaGUITree.h.

◆ m_NodeTable

wxHashTable* albaGUITree::m_NodeTable
protected

Definition at line 252 of file albaGUITree.h.

◆ m_Listener

albaObserver* albaGUITree::m_Listener
protected

Definition at line 253 of file albaGUITree.h.


The documentation for this class was generated from the following file: