library: libGui #include "TGListTree.h" |
TGListTree
class description - header file - source file - inheritance tree (.pdf)
protected:
TGListTree(const TGListTree&)
virtual void Clicked(TGFrame*, Int_t)
virtual void Clicked(TGFrame*, Int_t, Int_t, Int_t)
virtual void CurrentChanged(Int_t, Int_t)
virtual void CurrentChanged(TGFrame*)
virtual void DoRedraw()
virtual void DoubleClicked(TGFrame*, Int_t)
virtual void DoubleClicked(TGFrame*, Int_t, Int_t, Int_t)
void Draw(Int_t yevent, Int_t hevent)
virtual void Draw(Option_t* = "")
Int_t DrawChildren(TGListTreeItem* item, Int_t x, Int_t y, Int_t xroot)
void DrawItem(TGListTreeItem* item, Int_t x, Int_t y, Int_t* xroot, UInt_t* retwidth, UInt_t* retheight)
void DrawItemName(TGListTreeItem* item)
void DrawNode(TGListTreeItem* item, Int_t x, Int_t y)
TGListTreeItem* FindItem(Int_t findy)
virtual void* FindItem(const TString& name, Bool_t direction = kTRUE, Bool_t caseSensitive = kTRUE, Bool_t beginWith = kFALSE)
static const TGGC& GetColorGC()
static FontStruct_t GetDefaultFontStruct()
static const TGGC& GetDrawGC()
static Pixel_t GetGrayPixel()
static const TGGC& GetHighlightGC()
static const TGGC& GetLineGC()
void InsertChild(TGListTreeItem* parent, TGListTreeItem* item)
void InsertChildren(TGListTreeItem* parent, TGListTreeItem* item)
virtual void KeyPressed(TGFrame*, UInt_t, UInt_t)
virtual void Layout()
virtual void OnMouseOver(TGFrame*)
TGListTree& operator=(const TGListTree&)
void PDeleteChildren(TGListTreeItem* item)
void RemoveReference(TGListTreeItem* item)
virtual void ReturnPressed(TGFrame*)
void SaveChildren(ostream& out, TGListTreeItem* item, Int_t& n)
Int_t SearchChildren(TGListTreeItem* item, Int_t y, Int_t findy, TGListTreeItem** finditem)
void UpdateChecked(TGListTreeItem* item, Bool_t redraw = kFALSE)
public:
TGListTree(TGWindow* p = 0, UInt_t w = 1, UInt_t h = 1, UInt_t options = 0, Pixel_t back = GetWhitePixel())
TGListTree(TGCanvas* p, UInt_t options, Pixel_t back = GetWhitePixel())
virtual ~TGListTree()
TGListTreeItem* AddItem(TGListTreeItem* parent, const char* string, const TGPicture* open = 0, const TGPicture* closed = 0, Bool_t checkbox = kFALSE)
TGListTreeItem* AddItem(TGListTreeItem* parent, const char* string, void* userData, const TGPicture* open = 0, const TGPicture* closed = 0, Bool_t checkbox = kFALSE)
void AddItem(const char* string)
void AddRoot(const char* string)
void AdjustPosition(TGListTreeItem* item)
virtual void AdjustPosition()
virtual void Checked(TObject* obj, Bool_t check)
void CheckItem(TGListTreeItem* item, Bool_t check = kTRUE)
static TClass* Class()
void ClearHighlighted()
virtual void Clicked(TGListTreeItem* entry, Int_t btn)
virtual void Clicked(TGListTreeItem* entry, Int_t btn, Int_t x, Int_t y)
void CloseItem(TGListTreeItem* item)
Int_t DeleteChildren(TGListTreeItem* item)
Int_t DeleteItem(TGListTreeItem* item)
Int_t DeleteSelected()
void DisableOpen(Bool_t disable = kTRUE)
virtual void DoubleClicked(TGListTreeItem* entry, Int_t btn)
virtual void DoubleClicked(TGListTreeItem* entry, Int_t btn, Int_t x, Int_t y)
virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
virtual void End(Bool_t select = kFALSE)
TGListTreeItem* FindChildByData(TGListTreeItem* item, void* userData)
TGListTreeItem* FindChildByName(TGListTreeItem* item, const char* name)
TGListTreeItem* FindItemByObj(TGListTreeItem* item, void* ptr)
TGListTreeItem* FindItemByPathname(const char* path)
TGListTreeItem* FindSiblingByData(TGListTreeItem* item, void* userData)
TGListTreeItem* FindSiblingByName(TGListTreeItem* item, const char* name)
TGListTree::EColorMarkupMode GetColorMode() const
virtual TGDimension GetDefaultSize() const
TGListTreeItem* GetFirstItem() const
void GetPathnameFromItem(TGListTreeItem* item, char* path, Int_t depth = 0)
TGListTreeItem* GetSelected() const
virtual Bool_t HandleButton(Event_t* event)
virtual Bool_t HandleCrossing(Event_t* event)
virtual Bool_t HandleDoubleClick(Event_t* event)
virtual Bool_t HandleExpose(Event_t* event)
virtual Bool_t HandleKey(Event_t* event)
virtual Bool_t HandleMotion(Event_t* event)
void HighlightChildren(TGListTreeItem* item, Bool_t state, Bool_t draw)
void HighlightItem(TGListTreeItem* item)
void HighlightItem(TGListTreeItem* item, Bool_t state, Bool_t draw)
virtual void Home(Bool_t select = kFALSE)
virtual TClass* IsA() const
virtual void KeyPressed(TGListTreeItem* entry, UInt_t keysym, UInt_t mask)
virtual void LineDown(Bool_t select = kFALSE)
virtual void LineUp(Bool_t select = kFALSE)
virtual void OnMouseOver(TGListTreeItem* entry)
void OpenItem(TGListTreeItem* item)
virtual void PageDown(Bool_t select = kFALSE)
virtual void PageUp(Bool_t select = kFALSE)
Int_t RecursiveDeleteItem(TGListTreeItem* item, void* userData)
void RenameItem(TGListTreeItem* item, const char* string)
void RenameSelected(const char* string)
Int_t Reparent(TGListTreeItem* item, TGListTreeItem* newparent)
Int_t ReparentChildren(TGListTreeItem* item, TGListTreeItem* newparent)
virtual void ReturnPressed(TGListTreeItem* entry)
virtual void SavePrimitive(ostream& out, Option_t* option = "")
virtual void Search(Bool_t close = kTRUE)
void SetAutoTips(Bool_t on = kTRUE)
virtual void SetCanvas(TGCanvas* canvas)
void SetCheckBox(TGListTreeItem* item, Bool_t on = kTRUE)
void SetColorMode(TGListTree::EColorMarkupMode colorMode)
void SetSelected(TGListTreeItem* item)
void SetToolTipItem(TGListTreeItem* item, const char* string)
void SetToolTipText(const char* text, Int_t x, Int_t y, Long_t delayms)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
Int_t Sort(TGListTreeItem* item)
Int_t SortChildren(TGListTreeItem* item)
Int_t SortSiblings(TGListTreeItem* item)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
void ToggleItem(TGListTreeItem* item)
void UnselectAll(Bool_t draw)
protected:
TGListTreeItem* fFirst pointer to first item in list
TGListTreeItem* fSelected pointer to selected item in list
Int_t fHspacing horizontal spacing between items
Int_t fVspacing vertical spacing between items
Int_t fIndent number of pixels indentation
Int_t fMargin number of pixels margin from left side
Int_t fLastY last used y position
Pixel_t fGrayPixel gray draw color
GContext_t fDrawGC icon drawing context
GContext_t fLineGC dashed line drawing context
GContext_t fHighlightGC highlighted icon drawing context
FontStruct_t fFont font used to draw item text
UInt_t fDefw default list width
UInt_t fDefh default list height
Int_t fExposeTop top y postion of visible region
Int_t fExposeBottom bottom y position of visible region
TGToolTip* fTip tooltip shown when moving over list items
TGListTreeItem* fTipItem item for which tooltip is set
Bool_t fAutoTips assume item->fUserData is TObject and use GetTitle() for tip text
Bool_t fDisableOpen disable branch opening on double-clicks
TGListTree::EColorMarkupMode fColorMode if/how to render item's main color
GContext_t fColorGC drawing context for main item color
static Pixel_t fgGrayPixel
static const TGFont* fgDefaultFont
static TGGC* fgDrawGC
static TGGC* fgLineGC
static TGGC* fgHighlightGC
static TGGC* fgColorGC
public:
static const TGListTree::EColorMarkupMode kDefault
static const TGListTree::EColorMarkupMode kColorUnderline
static const TGListTree::EColorMarkupMode kColorBox
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).
void SetToolTipText(const char *text, Int_t x, Int_t y, Long_t delayms)
Set tool tip text associated with this item. The delay is in
milliseconds (minimum 250). To remove tool tip call method with
delayms = 0. To change delayms you first have to call this method
with delayms=0.
void RemoveReference(TGListTreeItem *item)
This function removes the specified item from the linked list.
It does not do anything with the data contained in the item, though.
TGListTreeItem * FindItemByPathname(const char *path)
Find item by pathname. Pathname is in the form of /xx/yy/zz. If zz
in path /xx/yy is found it returns item, 0 otherwise.
const TGGC & GetLineGC()
Return graphics context in use for line drawing.
const TGGC & GetColorGC()
Return graphics context for highlighted frame background.
Author: Fons Rademakers 25/02/98
Last update: root/gui:$Name: $:$Id: TGListTree.cxx,v 1.57 2006/07/09 05:27:54 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
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.