+
class TGListTreeItem
-
library: libGui
#include "TGListTree.h"
Display options:
Show inherited
Show non-public

class TGListTreeItem


TGListTree and TGListTreeItem

A list tree is a widget that can contain a number of items
arranged in a tree structure. The items are represented by small
folder icons that can be either open or closed.

The TGListTree is user callable. The TGListTreeItem is a service
class of the list tree.

A list tree can generate the following events:
kC_LISTTREE, kCT_ITEMCLICK, which button, location (y<<16|x).
kC_LISTTREE, kCT_ITEMDBLCLICK, which button, location (y<<16|x).


Function Members (Methods)

public:
TGListTreeItem(TGClient* fClient = gClient, const char* name = 0, const TGPicture* opened = 0, const TGPicture* closed = 0, Bool_t checkbox = kFALSE)
virtual~TGListTreeItem()
voidCheckItem(Bool_t checked = kTRUE)
static TClass*Class()
voidClearColor()
Color_tGetColor() const
TGListTreeItem*GetFirstChild() const
TGListTreeItem*GetNextSibling() const
TGListTreeItem*GetParent() const
TGListTreeItem*GetPrevSibling() const
const char*GetText() const
const char*GetTipText() const
void*GetUserData() const
Bool_tHasCheckBox() const
virtual TClass*IsA() const
Bool_tIsActive() const
Bool_tIsChecked() const
Bool_tIsOpen() const
voidRename(const char* new_name)
voidSavePrimitive(ostream& out, Option_t* option, Int_t n)
voidSetCheckBox(Bool_t on = kTRUE)
voidSetCheckBoxPictures(const TGPicture* checked, const TGPicture* unchecked)
voidSetColor(Color_t color)
voidSetPictures(const TGPicture* opened, const TGPicture* closed)
voidSetTipText(const char* tip)
voidSetUserData(void* userData)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidToggle()
private:
TGListTreeItem(const TGListTreeItem&)
TGListTreeItem&operator=(const TGListTreeItem&)

Data Members

private:
Bool_tfActivetrue if item is active
Bool_tfCheckBoxtrue if checkbox is visible
Bool_tfCheckedtrue if item is checked
const TGPicture*fCheckedPicicon for checked item
TGClient*fClientpointer to TGClient
const TGPicture*fClosedPicicon for closed state
Color_tfColoritem's color
TGListTreeItem*fFirstchildpointer to first child item
Bool_tfHasColortrue if item has assigned color
UInt_tfHeightitem height
TGListTreeItem*fNextsiblingpointer to next sibling
Bool_tfOpentrue if item is open
const TGPicture*fOpenPicicon for open state
TGListTreeItem*fParentpointer to parent
UInt_tfPicWidthwidth of item icon
TGListTreeItem*fPrevsiblingpointer to previous sibling
TStringfTextitem text
TStringfTipTexttooltip text
const TGPicture*fUncheckedPicicon for unchecked item
void*fUserDatapointer to user data structure
Int_tfXtextx position of item text
Int_tfYy position of item
Int_tfYtexty position of item text

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGListTreeItem(TGClient* fClient = gClient, const char* name = 0, const TGPicture* opened = 0, const TGPicture* closed = 0, Bool_t checkbox = kFALSE)
 Create list tree item.
~TGListTreeItem()
 Delete list tree item.
void Rename(const char* new_name)
 Rename a list tree item.
void SetCheckBox(Bool_t on = kTRUE)
 Set a check box on the tree node.
void SetCheckBoxPictures(const TGPicture* checked, const TGPicture* unchecked)
 Change list tree check item icons.
void SetPictures(const TGPicture* opened, const TGPicture* closed)
 Change list tree item icons.
void SavePrimitive(ostream& out, Option_t* option, Int_t n)
 Save a list tree item attributes as a C++ statements on output stream.
TGListTreeItem(const TGListTreeItem& )
TGListTreeItem& operator=(const TGListTreeItem& )
TGListTreeItem * GetParent()
{ return fParent; }
TGListTreeItem * GetFirstChild()
{ return fFirstchild; }
TGListTreeItem * GetPrevSibling()
{ return fPrevsibling; }
TGListTreeItem * GetNextSibling()
{ return fNextsibling; }
Bool_t IsActive()
{ return fActive; }
Bool_t IsOpen()
{ return fOpen; }
const char * GetText()
{ return fText.Data(); }
void SetTipText(const char* tip)
{ fTipText = tip; }
const char * GetTipText()
{ return fTipText.Data(); }
void SetUserData(void* userData)
{ fUserData = userData; }
void * GetUserData()
{ return fUserData; }
Bool_t HasCheckBox()
{ return fCheckBox; }
void CheckItem(Bool_t checked = kTRUE)
{ fChecked = checked; }
void Toggle()
{ fChecked = !fChecked; }
Bool_t IsChecked()
{ return fChecked; }
Color_t GetColor()
{ return fColor; }
void SetColor(Color_t color)
{ fHasColor = true;fColor = color; }
void ClearColor()
{ fHasColor = false; }

Author: Fons Rademakers 25/02/98
Last update: root/gui:$Name: $:$Id: TGListTree.cxx,v 1.60 2007/03/08 11:47:30 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.