63#include "RConfigure.h"
94 fParent (0), fFirstchild(0), fLastchild (0), fPrevsibling(0),
95 fNextsibling(0),fOpen (
kFALSE), fDNDState (0),
96 fY (0), fXtext (0), fYtext(0), fHeight(0)
106 return (
pic) ?
pic->GetWidth() : 0;
160 delete dynamic_cast<TObject *
>(obj);
184 if (
item->IsChecked()) {
187 if (
item->GetFirstChild()) {
188 if (
item->GetFirstChild()->HasCheckedChild())
207 if (!
item->IsChecked()) {
210 if (
item->GetFirstChild()) {
211 if (
item->GetFirstChild()->HasUnCheckedChild())
230 gClient->GetPicture(
"unchecked_dis_t.xpm"));
234 gClient->GetPicture(
"unchecked_t.xpm"));
265 if (!
item->IsChecked())
268 if (
item->IsChecked())
271 if (
item->GetFirstChild()) {
297 ::Warning(
"TGListTreeItem::SetCheckBoxPictures",
"checked picture not specified, defaulting to checked_t");
303 ::Warning(
"TGListTreeItem::SetCheckBoxPictures",
"unchecked picture not specified, defaulting to unchecked_t");
321 ::Warning(
"TGListTreeItem::SetPictures",
"opened picture not specified, defaulting to ofolder_t");
327 ::Warning(
"TGListTreeItem::SetPictures",
"closed picture not specified, defaulting to folder_t");
534 }
else if (state !=
item->IsActive()) {
535 item->SetActive(state);
548 if (
item->fFirstchild)
604 if (
item->HasCheckBox() &&
item->GetCheckBoxPicture()) {
614 if ((
item->HasCheckBox()) && (
event->fX <
maxxchk) &&
739 if (
item->IsDNDTarget()) {
800 Emit(
"DataDropped(TGListTreeItem*,TDNDData*)", args);
830 if (
item->HasCheckBox() &&
item->GetCheckBoxPicture()) {
831 if ((event->
fX < (
item->fXtext - 4) &&
832 (event->
fX > (
item->fXtext - (
Int_t)
item->GetCheckBoxPicture()->GetWidth()))))
848 if (
item->GetUserData()) {
850 if (
dynamic_cast<TObject *
>(obj)) {
854 if (str.BeginsWith(
"file://")) {
876 if (
item->GetPicture()) {
878 if (
xmpname.EndsWith(
"_t.xpm"))
879 xmpname.ReplaceAll(
"_t.xpm",
"_s.xpm");
880 if (
xmpname.EndsWith(
"_t.xpm__16x16"))
881 xmpname.ReplaceAll(
"_t.xpm__16x16",
"_s.xpm");
905 if (
item->GetTipTextLength() > 0) {
914 if (obj && obj->
IsA()->IsTObject()) {
985 if (
item->HasCheckBox()) {
1065 Emit(
"MouseOver(TGListTreeItem*,UInt_t)", args);
1092 Emit(
"KeyPressed(TGListTreeItem*,UInt_t,UInt_t)", args);
1114 Emit(
"Checked(TObject*,Bool_t)", args);
1127 Emit(
"Clicked(TGListTreeItem*,Int_t)", args);
1142 Emit(
"Clicked(TGListTreeItem*,Int_t,Int_t,Int_t)", args);
1158 Emit(
"Clicked(TGListTreeItem*,Int_t,UInt_t,Int_t,Int_t)", args);
1171 Emit(
"DoubleClicked(TGListTreeItem*,Int_t)", args);
1186 Emit(
"DoubleClicked(TGListTreeItem*,Int_t,Int_t,Int_t)", args);
1341 if (close || buf.
IsNull())
1357 buf =
srch->fBuffer;
1437 if (
item->fFirstchild &&
item->IsOpen()) {
1471 if ((
item->fFirstchild) && (
item->IsOpen())) {
1547 if (
item->fNextsibling) {
1556 if (
p->fNextsibling) {
1564 if (
item->IsOpen() &&
item->fFirstchild) {
1625 item->GetText(),
item->GetTextLength());
1636 if (
item->IsActive()) {
1645 item->GetText(),
item->GetTextLength());
1677 if (
item->fFirstchild) {
1681 if (!
item->IsOpen())
1725 if (
item->fPrevsibling) {
1726 item->fPrevsibling->fNextsibling =
item->fNextsibling;
1729 item->fParent->fFirstchild =
item->fNextsibling;
1734 if (
item->fNextsibling) {
1735 item->fNextsibling->fPrevsibling =
item->fPrevsibling;
1738 item->fParent->fLastchild =
item->fPrevsibling;
1786 item->fFirstchild =
item->fLastchild = 0;
1796 item->fParent = parent;
1797 item->fNextsibling =
item->fPrevsibling = 0;
1810 item->fPrevsibling = i;
1827 item->fPrevsibling = i;
1833 if (
item->HasCheckBox())
1852 next =
item->fNextsibling;
1862 item->fNextsibling = next;
1867 while (
item->fNextsibling) {
1868 item->fParent = parent;
1902 if (
item->fFirstchild &&
item->IsOpen()) {
1940 if ((
item->fFirstchild) && (
item->IsOpen())) {
1959 if ((parent == 0) || (parent && parent->
IsOpen()))
1975 if ((parent == 0) || (parent && parent->
IsOpen()))
2004 item->Rename(
string);
2058 if (
item->GetUserData() == ptr) {
2061 if (
item->IsOpen() &&
item->fFirstchild) {
2078 item->SetTipText(
string);
2121 if (
item->fFirstchild) {
2122 first =
item->fFirstchild;
2123 item->fFirstchild = 0;
2158 while (
item->fNextsibling)
item =
item->fNextsibling, count++;
2159 if (count <= 1)
return 1;
2172 list[0]->fPrevsibling = 0;
2173 for (i = 0; i < count; i++) {
2175 list[i]->fNextsibling = list[i + 1];
2177 list[i]->fPrevsibling = list[i - 1];
2179 list[count - 1]->fNextsibling = 0;
2186 fLast = list[count-1];
2212 first =
item->fFirstchild;
2235 while (
item->fPrevsibling) {
2257 while (
item->fPrevsibling) {
2324 if (!path || !*path)
return 0;
2326 const char *
p = path, *s;
2330 if (!
gVirtualX->InheritsFrom(
"TGX11")) {
2343 while (*
p && *
p ==
'/')
p++;
2361 if (!s || !s[0])
return diritem;
2368 if (!s || !s[0])
return item;
2454 gcv.fForeground =
selgc->GetForeground();
2503 fgLineGC->SetDashList(
"\x1\x1", 2);
2603 out <<
"\n // list tree\n";
2604 out <<
" TGListTree *" <<
GetName() <<
" = new TGListTree(";
2613 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
2649 if (
item->fFirstchild)
2667 out <<
" const TGPicture *pic_litem_open = nullptr, *pic_litem_close = nullptr, *pic_litem_check = nullptr, "
2668 "*pic_litem_uncheck = nullptr;\n";
2677 out <<
" pic_litem_open = gClient->GetPicture(\"" <<
picname.ReplaceSpecialCppChars() <<
"\");\n";
2683 out <<
" pic_litem_close = gClient->GetPicture(\"" <<
picname.ReplaceSpecialCppChars() <<
"\");\n";
2688 << (
fClosedPic ?
"pic_litem_close" :
"nullptr");
2694 out <<
" " <<
var_name <<
"->CheckItem();\n";
2699 out <<
" pic_litem_check = gClient->GetPicture(\"" <<
picname.ReplaceSpecialCppChars() <<
"\");\n";
2705 out <<
" pic_litem_uncheck = gClient->GetPicture(\"" <<
picname.ReplaceSpecialCppChars() <<
"\");\n";
2707 out <<
" " <<
var_name <<
"->SetCheckBoxPictures(" << (
fCheckedPic ?
"pic_litem_check" :
"nullptr") <<
", "
2708 << (
fUncheckedPic ?
"pic_litem_uncheck" :
"nullptr") <<
");\n";
2752 current =
item->GetFirstChild();
2753 parent = current ? current :
item;
2794 if (
item->GetUserData() == ptr)
2797 if (
item->fFirstchild) {
2814 if (!checked || !
fFirst)
return;
2831 if (!checked || !
item)
return;
2834 if (
item->IsChecked()) {
2837 if (
item->GetFirstChild()) {
2851 item->CheckAllChildren(state);
const Mask_t kGCBackground
const Mask_t kGCForeground
const Mask_t kGCLineStyle
const Mask_t kGCLineWidth
Handle_t Pixmap_t
Pixmap handle.
const Mask_t kButtonPressMask
const Mask_t kGCFillStyle
const Mask_t kAnyModifier
const Mask_t kKeyPressMask
Handle_t GContext_t
Graphics context handle.
const Mask_t kPointerMotionMask
const Mask_t kKeyShiftMask
const Mask_t kKeyControlMask
const Mask_t kLeaveWindowMask
const Mask_t kButtonReleaseMask
const Mask_t kGCGraphicsExposures
const Mask_t kEnterWindowMask
ULong_t Pixel_t
Pixel value.
ULongptr_t Handle_t
Generic resource handle.
Handle_t FontStruct_t
Pointer to font structure.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t child
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t Atom_t typelist
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char text
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
void Layout() override
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
void DoRedraw() override
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.
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.
UInt_t fHeight
frame height
static Pixel_t fgDefaultSelectedBackground
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
TString SaveCtorArgs(std::ostream &out, UInt_t dflt_options=kChildFrame, Bool_t check_white_pixel=kFALSE)
Return options and custom color as constructor args Used in the SavePrimitive methods,...
virtual Pixel_t GetBackground() const
void SetDNDTarget(Bool_t onoff)
static Pixel_t fgWhitePixel
Pixel_t fBackground
frame background color
static Pixel_t fgBlackPixel
Encapsulate a graphics context used in the low level graphics.
TString fTipText
tooltip text
const char * GetTipText() const override
Bool_t fHasColor
true if item has assigned color
void CheckItem(Bool_t checked=kTRUE) override
void SetCheckBox(Bool_t on=kTRUE) override
Set a check box on the tree node.
void CheckAllChildren(Bool_t state=kTRUE) override
Set all child items of this one checked if state=kTRUE, unchecked if state=kFALSE.
void SetPictures(const TGPicture *opened, const TGPicture *closed) override
Change list tree item icons.
const TGPicture * fCheckedPic
icon for checked item
const TGPicture * fClosedPic
icon for closed state
const char * GetText() const override
Bool_t IsChecked() const override
Bool_t fActive
true if item is active
Color_t fColor
item's color
Bool_t fOwnsData
true if user data has to be deleted
Pixel_t GetActiveColor() const override
Return color for marking items that are active or selected.
Bool_t HasCheckBox() const override
const TGPicture * fUncheckedPic
icon for unchecked item
Bool_t HasCheckedChild(Bool_t first=kFALSE) override
Add all child items of 'item' into the list 'checked'.
Bool_t fCheckBox
true if checkbox is visible
void CheckChildren(TGListTreeItem *item, Bool_t state) override
Set all child items of 'item' checked if state=kTRUE; unchecked if state=kFALSE.
void * fUserData
pointer to user data structure
void SetCheckBoxPictures(const TGPicture *checked, const TGPicture *unchecked) override
Change list tree check item icons.
Bool_t fChecked
true if item is checked
Bool_t HasUnCheckedChild(Bool_t first=kFALSE) override
Add all child items of 'item' into the list 'checked'.
TGListTreeItemStd(const TGListTreeItemStd &)=delete
void UpdateState() override
Update the state of the node 'item' according to the children states.
const TGPicture * fOpenPic
icon for open state
~TGListTreeItemStd() override
Delete list tree item.
TString SaveTreeItem(std::ostream &out, const char *treevarname, const char *parent_var_name) override
Save a list tree item attributes as a C++ statements on output stream.
TGListTreeItem * GetFirstChild() const
virtual void SetCheckBoxPictures(const TGPicture *, const TGPicture *)
virtual const char * GetText() const =0
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
virtual Bool_t HasCheckedChild(Bool_t=kFALSE)
TGClient * fClient
pointer to TGClient
TGListTreeItem * GetParent() const
virtual TString SaveTreeItem(std::ostream &, const char *, const char *)
TGListTreeItem(const TGListTreeItem &)=delete
virtual Bool_t HasUnCheckedChild(Bool_t=kFALSE)
virtual void SetActive(Bool_t)
Int_t fDNDState
EDNDFlags.
virtual Bool_t IsOpen() const
virtual UInt_t GetPicWidth() const
Return width of item's icon.
virtual Bool_t IsChecked() const =0
virtual const TGPicture * GetPicture() const =0
virtual Bool_t HasCheckBox() const =0
TGListTreeItem * fNextsibling
pointer to next sibling
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
GContext_t fColorGC
drawing context for main item color
Bool_t HandleButton(Event_t *event) override
Handle button events in the list tree.
TGListTreeItem * FindItemByObj(TGListTreeItem *item, void *ptr)
Find item with fUserData == ptr.
Bool_t HandleKey(Event_t *event) override
The key press event handler converts a key press to some line editor action.
TGListTreeItem * fSelected
pointer to selected item in list
Bool_t HandleDNDLeave() override
Handle drag leave events.
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 Clicked(TGFrame *, Int_t) override
Emit Clicked() signal.
void RemoveReference(TGListTreeItem *item)
This function removes the specified item from the linked list.
UInt_t fDefw
default list width
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.
ECheckMode fCheckMode
how to propagate check properties through the tree
static const TGPicture * GetClosedPic()
Returns the icon used by items in closed state.
void UnselectAll(Bool_t draw)
Unselect all items.
Bool_t fDisableOpen
disable branch opening on double-clicks
Bool_t HandleCrossing(Event_t *event) override
Handle mouse crossing event.
Atom_t HandleDNDEnter(Atom_t *typelist) override
Handle drag enter events.
void InsertChild(TGListTreeItem *parent, TGListTreeItem *item)
Insert child in list.
void Search(Bool_t close=kTRUE) override
Invokes search dialog. Looks for item with the entered name.
void ToggleItem(TGListTreeItem *item)
Toggle check button state of the node 'item'.
GContext_t fDrawGC
icon drawing context
void PageUp(Bool_t select=kFALSE) override
Move content one page up.
void RenameItem(TGListTreeItem *item, const char *string)
Rename item in list tree.
GContext_t fHighlightGC
highlighted icon drawing context
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
void KeyPressed(TGFrame *, UInt_t, UInt_t) override
Signal emitted when keyboard key pressed.
Int_t DeleteChildren(TGListTreeItem *item)
Delete children of item from list.
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion event.
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.
void ReturnPressed(TGFrame *) override
Signal emitted when Return/Enter key pressed.
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.
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).
void Layout() override
Layout container entries.
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.
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.
void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h) override
Redraw list tree.
TGListTreeItem * fTipItem
item for which tooltip is set
Int_t FontAscent()
Returns ascent of currently used font.
Bool_t HandleDoubleClick(Event_t *event) override
Handle double click event in the list tree (only for kButton1).
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'.
void DoubleClicked(TGFrame *, Int_t) override
Emit DoubleClicked() signal.
static const TGPicture * fgCheckedPic
icon for checked item
void End(Bool_t select=kFALSE) override
Move content to the bottom.
TGListTreeItem * GetFirstItem() const
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a list tree widget 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.
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 AdjustPosition() override
Move content to position of highlighted/activated frame.
TBufferFile * fBuf
buffer used for Drag and Drop
Bool_t HandleDNDDrop(TDNDData *data) override
Handle drop events.
TGToolTip * fTip
tooltip shown when moving over list items
void DrawItemName(Handle_t id, TGListTreeItem *item)
Draw name of list tree item.
~TGListTree() override
Delete list tree widget.
void SaveChildren(std::ostream &out, const char *parent_var_name, TGListTreeItem *item)
Save child items as a C++ statements on output stream out.
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.
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 Home(Bool_t select=kFALSE) override
Move content to the top.
void LineUp(Bool_t select=kFALSE) override
Move content one item-size up.
Int_t fVspacing
vertical spacing between items
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.
void PDeleteItem(TGListTreeItem *item)
Delete given item.
void SetToolTipItem(TGListTreeItem *item, const char *string)
Set tooltip text for this item.
void PageDown(Bool_t select=kFALSE) override
Move content one page down.
Atom_t HandleDNDPosition(Int_t x, Int_t y, Atom_t action, Int_t xroot, Int_t yroot) override
Handle dragging position events.
void LineDown(Bool_t select=kFALSE) override
Move content one item-size down.
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
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.
ROOT GUI Window base class.
const TGWindow * fParent
Parent window.
@ kEditDisableBtnEnable
window can handle mouse button events
@ kEditDisableGrab
window grab cannot be edited
@ kEditDisable
disable edit of this window
virtual void SetWindowName(const char *name=nullptr)
Set window name.
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
UInt_t fEditDisabled
flags used for "guibuilding"
void Add(TObject *obj) override
The TNamed class is the base class for all named ROOT classes.
Collectable string class.
Mother of all ROOT objects.
virtual const char * GetTitle() const
Returns title of object.
virtual TClass * IsA() const
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
const char * Data() 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)
Returns the largest of a and b.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
EGEventType fType
of event (see EGEventType)
Int_t fY
pointer x, y coordinates in event window
UInt_t fState
key or button mask
Int_t fYRoot
coordinates relative to root
Time_t fTime
time event event occurred in ms
UInt_t fCode
key or button code
Graphics context structure.