62#include "RConfigure.h"
93 fParent (0), fFirstchild(0), fLastchild (0), fPrevsibling(0),
94 fNextsibling(0),fOpen (
kFALSE), fDNDState (0),
95 fY (0), fXtext (0), fYtext(0), fHeight(0)
159 delete dynamic_cast<TObject *
>(obj);
229 gClient->GetPicture(
"unchecked_dis_t.xpm"));
233 gClient->GetPicture(
"unchecked_t.xpm"));
296 ::Warning(
"TGListTreeItem::SetCheckBoxPictures",
"checked picture not specified, defaulting to checked_t");
302 ::Warning(
"TGListTreeItem::SetCheckBoxPictures",
"unchecked picture not specified, defaulting to unchecked_t");
320 ::Warning(
"TGListTreeItem::SetPictures",
"opened picture not specified, defaulting to ofolder_t");
326 ::Warning(
"TGListTreeItem::SetPictures",
"closed picture not specified, defaulting to folder_t");
533 }
else if (state != item->
IsActive()) {
587 if (newpos < 0) newpos = 0;
602 Int_t minxchk = 0, maxxchk = 0;
605 maxxchk = (item->
fXtext - 4);
613 if ((item->
HasCheckBox()) && (
event->fX < maxxchk) &&
614 (
event->fX > minxchk))
624 if ((
event->fX < maxx) && (
event->fX > minx)) {
761 for (
int i = 0; typelist[i] !=
kNone; ++i) {
799 Emit(
"DataDropped(TGListTreeItem*,TDNDData*)", args);
849 if (
dynamic_cast<TObject *
>(obj)) {
879 if (xmpname.
EndsWith(
"_t.xpm__16x16"))
880 xmpname.
ReplaceAll(
"_t.xpm__16x16",
"_s.xpm");
913 if (obj && obj->IsA()->IsTObject()) {
1032 switch((
EKeySym)keysym & ~0x20) {
1064 Emit(
"MouseOver(TGListTreeItem*,UInt_t)", args);
1091 Emit(
"KeyPressed(TGListTreeItem*,UInt_t,UInt_t)", args);
1113 Emit(
"Checked(TObject*,Bool_t)", args);
1126 Emit(
"Clicked(TGListTreeItem*,Int_t)", args);
1141 Emit(
"Clicked(TGListTreeItem*,Int_t,Int_t,Int_t)", args);
1157 Emit(
"Clicked(TGListTreeItem*,Int_t,UInt_t,Int_t,Int_t)", args);
1170 Emit(
"DoubleClicked(TGListTreeItem*,Int_t)", args);
1185 Emit(
"DoubleClicked(TGListTreeItem*,Int_t,Int_t,Int_t)", args);
1214 if (newpos<0) newpos = 0;
1249 if (findy <= 2*height) {
1251 if (newpos<0) newpos = 0;
1278 if (newpos<0) newpos = 0;
1310 if (
y==0)
y = yparent;
1340 if (close || buf.
IsNull())
1342 else if (!buf.
IsNull()) ret = 1;
1378 if (((
Int_t)w < 1) || (w > 32768) || ((
Int_t)
h < 1)) {
1445 if ((old_width !=
fDefw) || (old_height !=
fDefh)) {
1485 Int_t xpic1, ypic1, xbranch, ybranch, xtext, ytext = 0, yline, xc;
1500 if (pic1) xpic2 = xpic1 + pic1->
GetWidth() + 1;
1501 else xpic2 = xpic1 + 1;
1519 ybranch = ypic1 + (
Int_t)(height >> 1);
1520 yline = ypic1 + (
Int_t)(height >> 1);
1536 Int_t ylinep = yline - pos.
fY;
1537 Int_t ybranchp = ybranch - pos.
fY;
1575 *retheight = height;
1895 if ((findy >=
y) && (findy <=
y + (
Int_t)height)) {
1903 if (*finditem)
return -1;
1926 while (item && !finditem) {
1935 if ((findy >=
y) && (findy <=
y + (
Int_t)height))
1958 if ((parent == 0) || (parent && parent->
IsOpen()))
1974 if ((parent == 0) || (parent && parent->
IsOpen()))
1990 item =
AddItem(parent,
string, open, closed, checkbox);
2153 parent =
first->fParent;
2158 if (count <= 1)
return 1;
2163 while (
first->fNextsibling) {
2164 list[count] =
first->fNextsibling;
2172 for (i = 0; i < count; i++) {
2185 fLast = list[count-1];
2279 }
else if (!item &&
fFirst) {
2302 }
else if (!item &&
fFirst) {
2323 if (!path || !*path)
return 0;
2325 const char *p = path, *s;
2329 if (!
gVirtualX->InheritsFrom(
"TGX11")) {
2342 while (*p && *p ==
'/') p++;
2348 strlcpy(dirname, p, 1024);
2350 strlcpy(dirname, p, (s-p)+1);
2355 if (!diritem && dirname[0]) {
2360 if (!s || !s[0])
return diritem;
2367 if (!s || !s[0])
return item;
2402 strlcpy(path, tmppath, 1024);
2404 if (--depth == 0 && item) {
2405 snprintf(tmppath, 1023,
"...%s", path);
2406 strlcpy(path, tmppath, 1024);
2451 const TGGC *selgc =
gClient->GetResourcePool()->GetSelectedGC();
2601 out << std::endl <<
" // list tree" << std::endl;
2602 out <<
" TGListTree *";
2613 out <<
");" << std::endl;
2620 if (option && strstr(option,
"keep_names"))
2621 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
2630 out <<
" const TGPicture *popen; //used for list tree items" << std::endl;
2631 out <<
" const TGPicture *pclose; //used for list tree items" << std::endl;
2635 out <<
" TGListTreeItem *item" <<
n <<
" = " <<
GetName() <<
"->AddItem(";
2638 out <<
" " <<
GetName() <<
"->OpenItem(item" <<
n <<
");" << std::endl;
2640 out <<
" " <<
GetName() <<
"->CloseItem(item" <<
n <<
");" << std::endl;
2643 out <<
" " <<
GetName() <<
"->SetSelected(item" <<
n <<
");" << std::endl;
2662 out <<
" TGListTreeItem *item" <<
n <<
" = " <<
GetName() <<
"->AddItem(";
2677 static const TGPicture *oldopen =
nullptr;
2678 static const TGPicture *oldclose =
nullptr;
2679 static const TGPicture *oldcheck =
nullptr;
2680 static const TGPicture *olduncheck =
nullptr;
2691 out <<
"item" << option <<
",";
2693 text.ReplaceAll(
'\\',
"\\\\");
2694 text.ReplaceAll(
"\"",
"\\\"");
2695 out << quote <<
text << quote;
2696 out <<
");" << std::endl;
2702 out <<
" popen = gClient->GetPicture(" << quote << picname << quote <<
");" << std::endl;
2708 out <<
" pclose = gClient->GetPicture(" << quote << picname << quote <<
");" << std::endl;
2710 out <<
" item" << s.
Data() <<
"->SetPictures(popen, pclose);" << std::endl;
2713 out <<
" const TGPicture *pcheck; //used for checked items" << std::endl;
2717 out <<
" const TGPicture *puncheck; //used for unchecked items" << std::endl;
2720 out <<
" item" << s.
Data() <<
"->CheckItem();" << std::endl;
2725 out <<
" pcheck = gClient->GetPicture(" << quote << picname << quote <<
");" << std::endl;
2731 out <<
" puncheck = gClient->GetPicture(" << quote << picname << quote <<
");" << std::endl;
2733 out <<
" item" << s.
Data() <<
"->SetCheckBoxPictures(pcheck, puncheck);" << std::endl;
2734 out <<
" item" << s.
Data() <<
"->SetCheckBox(kTRUE);" << std::endl;
2737 if (oldcolor !=
fColor) {
2739 out <<
" item" << s.
Data() <<
"->SetColor(" <<
fColor <<
");" << std::endl;
2747 out <<
" item" << s.
Data() <<
"->SetTipText(" << quote
2748 << tiptext << quote <<
");" << std::endl;
2787 parent = current ? current : item;
2833 if (fitem)
return fitem;
2848 if (!checked || !
fFirst)
return;
2865 if (!checked || !item)
return;
const Mask_t kGCBackground
const Mask_t kGCForeground
const Mask_t kGCLineStyle
const Mask_t kGCLineWidth
const Mask_t kButtonPressMask
const Mask_t kGCFillStyle
const Mask_t kAnyModifier
Handle_t Pixmap_t
Pixmap handle.
const Mask_t kKeyPressMask
const Mask_t kPointerMotionMask
const Mask_t kKeyShiftMask
const Mask_t kKeyControlMask
const Mask_t kLeaveWindowMask
Handle_t GContext_t
Graphics context handle.
const Mask_t kButtonReleaseMask
const Mask_t kGCGraphicsExposures
const Mask_t kEnterWindowMask
Handle_t FontStruct_t
Pointer to font structure.
ULong_t Pixel_t
Pixel value.
ULongptr_t Handle_t
Generic resource handle.
include TDocParser_001 C image html pict1_TDocParser_001 png width
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TGDNDManager * gDNDManager
Int_t Compare(const void *item1, const void *item2)
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TSystem * gSystem
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
void Reset() override
Reset buffer object. Resets map and buffer offset.
void WriteObject(const TObject *obj, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
Drag and drop data container.
Atom_t fDataType
Data type description.
Int_t fDataLength
Length of data.
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
TGFrame * GetContainer() const
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
virtual Int_t GetVsbPosition() const
Get position of vertical scrollbar.
TGVScrollBar * GetVScrollbar() const
TGViewPort * GetViewPort() const
virtual void Layout()
Create layout for canvas.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
void FreePicture(const TGPicture *pic)
Free picture resource.
TGCanvas * fCanvas
pointer to canvas
virtual void ClearViewPort()
Clear view port and redraw full content.
const TGWindow * fMsgWindow
window handling container messages
virtual void SetDragPixmap(const TGPicture *pic)
Set drag window pixmaps and hotpoint.
TGCanvas * GetCanvas() const
virtual void DoRedraw()
Redraw content of container in the viewport region.
virtual TGDimension GetPageDimension() const
Returns page dimension.
TGViewPort * fViewPort
container viewport
virtual TGVScrollBar * GetVScrollbar() const
returns pointer to vert. scroll bar
virtual TGPosition GetPagePosition() const
Returns page position.
Bool_t IsDragging() const
Bool_t StartDrag(TGFrame *src, Int_t x_root, Int_t y_root, Window_t grabWin=kNone)
Start dragging.
Bool_t Drag(Int_t x_root, Int_t y_root, Atom_t action, Time_t timestamp)
Process drag event.
static Atom_t GetDNDActionCopy()
Bool_t EndDrag()
End dragging.
Encapsulate fonts used in the GUI system.
void GetFontMetrics(FontMetrics_t *m) const
Get font metrics.
FontStruct_t GetFontStruct() const
Int_t TextWidth(const char *string, Int_t numChars=-1) const
A wrapper function for the more complicated interface of MeasureChars.
FontH_t GetFontHandle() const
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
static Pixel_t GetWhitePixel()
Get white pixel value.
UInt_t fHeight
frame height
static Pixel_t fgDefaultSelectedBackground
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
virtual Pixel_t GetBackground() const
void SetDNDTarget(Bool_t onoff)
static Pixel_t fgWhitePixel
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Pixel_t fBackground
frame background color
static Pixel_t fgBlackPixel
Encapsulate a graphics context used in the low level graphics.
Pixel_t GetForeground() const
void SetDashOffset(Int_t v)
Patterned/dashed line offset.
void SetDashList(const char v[], Int_t len)
Set dash pattern. First use SetDashOffset() if not 0.
TString fTipText
tooltip text
Bool_t fHasColor
true if item has assigned color
virtual const char * GetTipText() const
virtual Bool_t IsChecked() const
virtual Bool_t HasCheckedChild(Bool_t first=kFALSE)
Add all child items of 'item' into the list 'checked'.
virtual void SetPictures(const TGPicture *opened, const TGPicture *closed)
Change list tree item icons.
const TGPicture * fCheckedPic
icon for checked item
virtual Bool_t HasUnCheckedChild(Bool_t first=kFALSE)
Add all child items of 'item' into the list 'checked'.
const TGPicture * fClosedPic
icon for closed state
Bool_t fActive
true if item is active
virtual void SavePrimitive(std::ostream &out, Option_t *option, Int_t n)
Save a list tree item attributes as a C++ statements on output stream.
virtual Pixel_t GetActiveColor() const
Return color for marking items that are active or selected.
Color_t fColor
item's color
Bool_t fOwnsData
true if user data has to be deleted
virtual void SetCheckBox(Bool_t on=kTRUE)
Set a check box on the tree node.
virtual void CheckChildren(TGListTreeItem *item, Bool_t state)
Set all child items of 'item' checked if state=kTRUE; unchecked if state=kFALSE.
const TGPicture * fUncheckedPic
icon for unchecked item
virtual void UpdateState()
Update the state of the node 'item' according to the children states.
Bool_t fCheckBox
true if checkbox is visible
virtual void SetCheckBoxPictures(const TGPicture *checked, const TGPicture *unchecked)
Change list tree check item icons.
void * fUserData
pointer to user data structure
Bool_t fChecked
true if item is checked
virtual Bool_t HasCheckBox() const
TGListTreeItemStd(const TGListTreeItemStd &)=delete
virtual void CheckItem(Bool_t checked=kTRUE)
const TGPicture * fOpenPic
icon for open state
virtual const char * GetText() const
virtual void CheckAllChildren(Bool_t state=kTRUE)
Set all child items of this one checked if state=kTRUE, unchecked if state=kFALSE.
virtual ~TGListTreeItemStd()
Delete list tree item.
TGListTreeItem * GetFirstChild() const
void Rename(const char *new_name)
virtual void SetCheckBoxPictures(const TGPicture *, const TGPicture *)
virtual Bool_t IsActive() const =0
virtual const char * GetText() const =0
virtual void CheckAllChildren(Bool_t=kTRUE)
TGListTreeItem * fLastchild
pointer to last child item
TGListTreeItem * fFirstchild
pointer to first child item
TGListTreeItem * GetNextSibling() const
virtual void CheckItem(Bool_t=kTRUE)=0
TGListTreeItem * fParent
pointer to parent
TGListTreeItem * fPrevsibling
pointer to previous sibling
Bool_t IsDNDTarget() const
Bool_t IsDNDSource() const
virtual Bool_t HasCheckedChild(Bool_t=kFALSE)
TGClient * fClient
pointer to TGClient
TGListTreeItem * GetParent() const
virtual void SavePrimitive(std::ostream &, Option_t *, Int_t)
TGListTreeItem(const TGListTreeItem &)=delete
virtual Bool_t HasUnCheckedChild(Bool_t=kFALSE)
virtual void SetTipText(const char *)
virtual void SetActive(Bool_t)
virtual Int_t GetTextLength() const =0
virtual const TGPicture * GetCheckBoxPicture() const =0
Int_t fDNDState
EDNDFlags.
virtual Bool_t IsOpen() const
TGListTreeItem * GetPrevSibling() const
virtual Color_t GetColor() const =0
virtual UInt_t GetPicWidth() const
Return width of item's icon.
virtual Bool_t IsChecked() const =0
virtual const TGPicture * GetPicture() const =0
virtual void SetOpen(Bool_t o)
virtual Pixel_t GetActiveColor() const =0
virtual void SetCheckBox(Bool_t=kTRUE)
virtual Bool_t HasCheckBox() const =0
virtual void UpdateState()
virtual Bool_t HasColor() const =0
virtual void * GetUserData() const =0
virtual void SetUserData(void *, Bool_t=kFALSE)
virtual const char * GetTipText() const =0
TGListTreeItem * fNextsibling
pointer to next sibling
virtual Int_t GetTipTextLength() const =0
A list tree is a widget that can contain a number of items arranged in a tree structure.
static const TGPicture * GetOpenPic()
Returns the icon used by items in open state.
UInt_t fLastEventState
modifier state of the last keyboard event
void Clicked(TGFrame *, Int_t)
Emit Clicked() signal.
GContext_t fColorGC
drawing context for main item color
void PageUp(Bool_t select=kFALSE)
Move content one page up.
TGListTreeItem * FindItemByObj(TGListTreeItem *item, void *ptr)
Find item with fUserData == ptr.
TGListTreeItem * fSelected
pointer to selected item in list
Int_t SortSiblings(TGListTreeItem *item)
Sort siblings of item.
GContext_t fLineGC
dashed line drawing context
static const TGPicture * GetUncheckedPic()
Returns the icon used for unchecked checkbox.
void RemoveReference(TGListTreeItem *item)
This function removes the specified item from the linked list.
UInt_t fDefw
default list width
void LineUp(Bool_t select=kFALSE)
Move content one item-size up.
static Pixel_t fgGrayPixel
void ClearHighlighted()
Un highlight items.
void PDeleteChildren(TGListTreeItem *item)
Recursively delete all children of an item.
void InsertChildren(TGListTreeItem *parent, TGListTreeItem *item)
Insert a list of ALREADY LINKED children into another list.
Atom_t HandleDNDEnter(Atom_t *typelist)
Handle drag enter events.
ECheckMode fCheckMode
how to propagate check properties through the tree
static const TGPicture * GetClosedPic()
Returns the icon used by items in closed state.
virtual Bool_t HandleButton(Event_t *event)
Handle button events in the list tree.
void Home(Bool_t select=kFALSE)
Move content to the top.
void UnselectAll(Bool_t draw)
Unselect all items.
Bool_t fDisableOpen
disable branch opening on double-clicks
virtual void Layout()
Layout container entries.
void InsertChild(TGListTreeItem *parent, TGListTreeItem *item)
Insert child in list.
void ToggleItem(TGListTreeItem *item)
Toggle check button state of the node 'item'.
GContext_t fDrawGC
icon drawing context
virtual ~TGListTree()
Delete list tree widget.
void RenameItem(TGListTreeItem *item, const char *string)
Rename item in list tree.
GContext_t fHighlightGC
highlighted icon drawing context
void LineDown(Bool_t select=kFALSE)
Move content one item-size down.
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
Int_t DeleteChildren(TGListTreeItem *item)
Delete children of item from list.
TGListTreeItem * FindItem(Int_t findy)
Find item at postion findy.
TGListTreeItem * fBelowMouse
pointer to item below mouses cursor
Int_t FontHeight()
Returns height of currently used font.
TGListTreeItem * fLast
pointer to last item in list
Int_t ReparentChildren(TGListTreeItem *item, TGListTreeItem *newparent)
Make newparent the new parent of the children of item.
void CheckItem(TGListTreeItem *item, Bool_t check=kTRUE)
Set check button state for the node 'item'.
Int_t DrawChildren(Handle_t id, TGListTreeItem *item, Int_t x, Int_t y, Int_t xroot)
Draw children of item in list tree.
Int_t fExposeBottom
bottom y position of visible region
static const TGGC & GetLineGC()
Return graphics context in use for line drawing.
void CheckAllChildren(TGListTreeItem *item, Bool_t state)
Check all child items of 'item' and 'item' itself according to the state value: kTRUE means check all...
static TGGC * fgHighlightGC
static const TGPicture * GetCheckedPic()
Returns the icon used for checked checkbox.
TDNDData fDNDData
Drag and Drop data.
Atom_t HandleDNDPosition(Int_t x, Int_t y, Atom_t action, Int_t xroot, Int_t yroot)
Handle dragging position events.
void SetCheckBox(TGListTreeItem *item, Bool_t on=kTRUE)
Set check button state for the node 'item'.
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
virtual void DrawActive(Handle_t id, TGListTreeItem *item)
Draw active item with its active color.
Pixel_t fGrayPixel
gray draw color
Int_t Reparent(TGListTreeItem *item, TGListTreeItem *newparent)
Make newparent the new parent of item.
void GetChecked(TList *checked)
Add all checked list tree items of this list tree into the list 'checked'.
Int_t RecursiveDeleteItem(TGListTreeItem *item, void *userData)
Delete item with fUserData == ptr.
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
Int_t TextWidth(const char *c)
Returns text width relative to currently used font.
void DrawItem(Handle_t id, TGListTreeItem *item, Int_t x, Int_t y, Int_t *xroot, UInt_t *retwidth, UInt_t *retheight)
Draw list tree item.
TGListTreeItem * fDropItem
item on which DND is over
void SetToolTipText(const char *text, Int_t x, Int_t y, Long_t delayms)
Set tool tip text associated with this item.
TGListTreeItem * fTipItem
item for which tooltip is set
Int_t FontAscent()
Returns ascent of currently used font.
void End(Bool_t select=kFALSE)
Move content to the bottom.
static const TGGC & GetColorGC()
Return graphics context for highlighted frame background.
virtual void Checked(TObject *obj, Bool_t check)
Emit Checked() signal.
static const TGGC & GetDrawGC()
Return default graphics context in use.
void HighlightChildren(TGListTreeItem *item, Bool_t state, Bool_t draw)
Highlight item children.
virtual void DataDropped(TGListTreeItem *item, TDNDData *data)
Emit DataDropped() signal.
Int_t fHspacing
horizontal spacing between items
static const TGPicture * fgClosedPic
icon for closed item
Int_t DeleteItem(TGListTreeItem *item)
Delete item from list tree.
static const TGPicture * fgUncheckedPic
icon for unchecked item
Int_t fMargin
number of pixels margin from left side
static const TGGC & GetHighlightGC()
Return graphics context for highlighted frame background.
UInt_t fDefh
default list height
void GetCheckedChildren(TList *checked, TGListTreeItem *item)
Add all child items of 'item' into the list 'checked'.
static const TGPicture * fgCheckedPic
icon for checked item
TGListTreeItem * GetFirstItem() const
Bool_t HandleDNDLeave()
Handle drag leave events.
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
void SaveChildren(std::ostream &out, TGListTreeItem *item, Int_t &n)
Save child items as a C++ statements on output stream out.
static const TGGC & GetActiveGC()
Return default graphics context in use.
Bool_t fEventHandled
flag used from user code to bypass standard event handling
TGListTree(const TGListTree &)=delete
Int_t SortChildren(TGListTreeItem *item)
Sort children of item.
static const TGPicture * fgOpenPic
icon for open item
EColorMarkupMode fColorMode
if/how to render item's main color
Atom_t * fDNDTypeList
handles DND types
Int_t Sort(TGListTreeItem *item)
Sort items starting with item.
void KeyPressed(TGFrame *, UInt_t, UInt_t)
Signal emitted when keyboard key pressed.
Bool_t fAutoCheckBoxPic
change check box picture if parent and children have diffrent state
void DrawNode(Handle_t id, TGListTreeItem *item, Int_t x, Int_t y)
Draw node (little + in box).
TGListTreeItem * fFirst
pointer to first item in list
void Search(Bool_t close=kTRUE)
Invokes search dialog. Looks for item with the entered name.
TBufferFile * fBuf
buffer used for Drag and Drop
TGToolTip * fTip
tooltip shown when moving over list items
virtual Bool_t HandleKey(Event_t *event)
The key press event handler converts a key press to some line editor action.
void DrawItemName(Handle_t id, TGListTreeItem *item)
Draw name of list tree item.
Bool_t fUserControlled
let user decides what is the behaviour on events
TGListTreeItem * fCurrent
pointer to current item in list
virtual void UpdateChecked(TGListTreeItem *item, Bool_t redraw=kFALSE)
Update the state of the node 'item' according to the children states.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event.
Int_t SearchChildren(TGListTreeItem *item, Int_t y, Int_t findy, TGListTreeItem **finditem)
Search child item.
virtual void MouseOver(TGListTreeItem *entry)
Signal emitted when pointer is over entry.
void HighlightItem(TGListTreeItem *item)
Highlight item.
Int_t fExposeTop
top y postion of visible region
TGListTreeItem * FindSiblingByName(TGListTreeItem *item, const char *name)
Find sibling of item by name.
TGListTreeItem * FindItemByPathname(const char *path)
Find item by pathname.
void ReturnPressed(TGFrame *)
Signal emitted when Return/Enter key pressed.
void AdjustPosition()
Move content to position of highlighted/activated frame.
Int_t fVspacing
vertical spacing between items
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a list tree widget as a C++ statements on output stream out.
FontStruct_t fFont
font used to draw item text
TGListTreeItem * FindChildByData(TGListTreeItem *item, void *userData)
Find child of item by userData.
void CloseItem(TGListTreeItem *item)
Close item in list tree (i.e. hide child items).
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
Redraw list tree.
void PDeleteItem(TGListTreeItem *item)
Delete given item.
virtual Bool_t HandleDoubleClick(Event_t *event)
Handle double click event in the list tree (only for kButton1).
void SetToolTipItem(TGListTreeItem *item, const char *string)
Set tooltip text for this item.
Bool_t HandleDNDDrop(TDNDData *data)
Handle drop events.
void DoubleClicked(TGFrame *, Int_t)
Emit DoubleClicked() signal.
Int_t fIndent
number of pixels indentation
virtual void DrawOutline(Handle_t id, TGListTreeItem *item, Pixel_t col=0xbbbbbb, Bool_t clear=kFALSE)
Draw a outline of color 'col' around an item.
Bool_t fAutoTips
assume item->fUserData is TObject and use GetTitle() for tip text
TGListTreeItem * FindSiblingByData(TGListTreeItem *item, void *userData)
Find sibling of item by userData.
static const TGFont * fgDefaultFont
GContext_t fActiveGC
activated (selected) drawing context
void PageDown(Bool_t select=kFALSE)
Move content one page down.
static Pixel_t GetGrayPixel()
Return gray draw color in use.
void GetPathnameFromItem(TGListTreeItem *item, char *path, Int_t depth=0)
Get pathname from item.
void Draw(Handle_t id, Int_t yevent, Int_t hevent)
Draw list tree widget.
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
const char * GetName() const
Returns name of object.
void Draw(Option_t *="")
Default Draw method for all objects.
Pixmap_t GetPicture() const
ROOT GUI Window base class.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
const TGWindow * fParent
Parent window.
@ kEditDisableBtnEnable
window can handle mouse button events
@ kEditDisableGrab
window grab cannot be edited
@ kEditDisable
disable edit of this window
const TGWindow * GetParent() const
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
UInt_t fEditDisabled
flags used for "guibuilding"
virtual void Add(TObject *obj)
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetName() const
Returns name of object.
Collectable string class.
Mother of all ROOT objects.
virtual const char * GetTitle() const
Returns title of object.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual TList * GetVolumes(Option_t *) const
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual const char * WorkingDirectory()
Return working directory.
Short_t Max(Short_t a, Short_t b)
Short_t Min(Short_t a, Short_t b)
Graphics context structure.
ULong_t fBackground
background pixel
Int_t fLineWidth
line width
Mask_t fMask
bit mask specifying which fields are valid
Int_t fLineStyle
kLineSolid, kLineOnOffDash, kLineDoubleDash
Bool_t fGraphicsExposures
boolean, should exposures be generated
ULong_t fForeground
foreground pixel
Int_t fFillStyle
kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled
FontH_t fFont
default text font for text operations