GuiTree Class Reference

#include <GuiTree.h>

Inheritance diagram for GuiTree:
GuiBase

List of all members.

Public Member Functions

 GuiTree (TGWindow &parent, UInt_t options=kHorizontalFrame)
virtual ~GuiTree ()
GuiTreeEntryAddEntry (GuiTreeEntry *parent, const char *label)
virtual void Clicked (TGListTreeItem *item, Int_t btn)
virtual void DoubleClicked (TGListTreeItem *item, Int_t btn)
virtual void OnMouseOver (TGListTreeItem *entry)
void DeleteAllItems ()

Private Member Functions

 GuiTree (const GuiTree &rhs)
GuiTreeoperator= (const GuiTree &rhs)
TGListTreeItem * AddItem (TGListTreeItem *parent, const char *string, const TGPicture *open=0, const TGPicture *closed=0)
TGListTreeItem * AddItem (TGListTreeItem *parent, const char *string, void *userData, const TGPicture *open=0, const TGPicture *closed=0)
void OnMouseOver (TGFrame *)
void Clicked (TGListTreeItem *, int, int, int)
void Clicked (TGFrame *, int, int, int)
void Clicked (TGFrame *, int)
void Clicked (TGListTreeItem *, Int_t, UInt_t, Int_t, Int_t)
void DoubleClicked (TGListTreeItem *, int, int, int)
void DoubleClicked (TGFrame *, int, int, int)
void DoubleClicked (TGFrame *, int)

Detailed Description

Definition at line 51 of file GuiTree.h.


Constructor & Destructor Documentation

GuiTree::GuiTree ( TGWindow &  parent,
UInt_t  options = kHorizontalFrame 
)

Definition at line 20 of file GuiTree.cxx.

References GuiBase::SetLayoutHints().

00021     : TGListTree(&parent,10,10,options)
00022 {
00023     this->SetLayoutHints(kLHintsExpandX|kLHintsExpandY);
00024     this->Associate(&parent);
00025 }

GuiTree::~GuiTree (  )  [virtual]

Definition at line 26 of file GuiTree.cxx.

00027 {
00028 }

GuiTree::GuiTree ( const GuiTree rhs  )  [private]

Member Function Documentation

GuiTreeEntry * GuiTree::AddEntry ( GuiTreeEntry parent,
const char *  label 
)

Definition at line 30 of file GuiTree.cxx.

Referenced by MCTree::AddSimSnarl(), and fill_tree().

00031 {
00032 
00033     GuiTreeEntry *entry;
00034 
00035     const TGPicture* open   = fClient->GetPicture("ofolder_t.xpm");
00036     const TGPicture* closed = fClient->GetPicture("folder_t.xpm");
00037 
00038     entry = new GuiTreeEntry(fClient, label, open, closed);
00039     this->TGListTree::InsertChild(parent, entry);
00040 
00041     return entry;
00042 }

TGListTreeItem* GuiTree::AddItem ( TGListTreeItem *  parent,
const char *  string,
void *  userData,
const TGPicture *  open = 0,
const TGPicture *  closed = 0 
) [private]
TGListTreeItem* GuiTree::AddItem ( TGListTreeItem *  parent,
const char *  string,
const TGPicture *  open = 0,
const TGPicture *  closed = 0 
) [private]
void GuiTree::Clicked ( TGListTreeItem *  ,
Int_t  ,
UInt_t  ,
Int_t  ,
Int_t   
) [inline, private]

Definition at line 93 of file GuiTree.h.

00093 {}

void GuiTree::Clicked ( TGFrame *  ,
int   
) [inline, private]

Definition at line 91 of file GuiTree.h.

00091 {}

void GuiTree::Clicked ( TGFrame *  ,
int  ,
int  ,
int   
) [inline, private]

Definition at line 90 of file GuiTree.h.

00090 {}

void GuiTree::Clicked ( TGListTreeItem *  ,
int  ,
int  ,
int   
) [inline, private]

Definition at line 89 of file GuiTree.h.

00089 {}

void GuiTree::Clicked ( TGListTreeItem *  item,
Int_t  btn 
) [virtual]

Definition at line 45 of file GuiTree.cxx.

References GuiTreeEntry::clicked.

00046 {
00047     this->TGListTree::Clicked(item,btn);
00048 
00049     GuiTreeEntry* entry = dynamic_cast<GuiTreeEntry*>(item);
00050     if (!entry) return;
00051     entry->clicked.emit();
00052 }

void GuiTree::DeleteAllItems (  ) 

Definition at line 86 of file GuiTree.cxx.

Referenced by main(), and MCTree::Update().

00087 {
00088     TGListTreeItem* item;
00089     while ( (item = this->GetFirstItem()) ) {
00090         this->DeleteChildren(item);
00091         this->DeleteItem(item);
00092         
00093     }
00094     fClient->NeedRedraw(this);
00095 }

void GuiTree::DoubleClicked ( TGFrame *  ,
int   
) [inline, private]

Definition at line 97 of file GuiTree.h.

00097 {}

void GuiTree::DoubleClicked ( TGFrame *  ,
int  ,
int  ,
int   
) [inline, private]

Definition at line 96 of file GuiTree.h.

00096 {}

void GuiTree::DoubleClicked ( TGListTreeItem *  ,
int  ,
int  ,
int   
) [inline, private]

Definition at line 95 of file GuiTree.h.

00095 {}

void GuiTree::DoubleClicked ( TGListTreeItem *  item,
Int_t  btn 
) [virtual]

Definition at line 53 of file GuiTree.cxx.

00054 {
00055     this->TGListTree::DoubleClicked(item,btn);
00056 
00057     cerr << "Double clicked, item is " 
00058          << (item->IsOpen() ? "open" : "closed") << endl;
00059 
00060     fClient->NeedRedraw(this);
00061     return;
00062 
00063     if (item->IsOpen()) {
00064         this->TGListTree::CloseItem(item);
00065     }
00066     else {
00067         this->TGListTree::OpenItem(item);
00068     }
00069     cerr << "           now item is " 
00070          << (item->IsOpen() ? "open" : "closed") << endl;
00071 
00072 }

void GuiTree::OnMouseOver ( TGFrame *   )  [inline, private]

Definition at line 88 of file GuiTree.h.

00088 {}

void GuiTree::OnMouseOver ( TGListTreeItem *  entry  )  [virtual]

Definition at line 73 of file GuiTree.cxx.

References GuiTreeEntry::on_mouse_over.

00074 {
00075 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,19,01)
00076     this->TGListTree::MouseOver(item);
00077 #else
00078     this->TGListTree::OnMouseOver(item);
00079 #endif
00080 
00081     GuiTreeEntry* entry = dynamic_cast<GuiTreeEntry*>(item);
00082     if (!entry) return;
00083     entry->on_mouse_over.emit();
00084 }

GuiTree& GuiTree::operator= ( const GuiTree rhs  )  [private]

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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1