Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 09:33:40

0001 // @(#)root/gui:$Id$
0002 // Author: Fons Rademakers   25/02/98
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGListTree
0013 #define ROOT_TGListTree
0014 
0015 
0016 #include "TGCanvas.h"
0017 #include "TGWidget.h"
0018 #include "TGDNDManager.h"
0019 
0020 class TGPicture;
0021 class TGToolTip;
0022 class TGCanvas;
0023 class TList;
0024 class TBufferFile;
0025 
0026 class TGListTreeItem
0027 {
0028    friend class TGListTree;
0029 
0030 private:
0031    TGListTreeItem(const TGListTreeItem&) = delete;
0032    TGListTreeItem& operator=(const TGListTreeItem&) = delete;
0033 
0034 protected:
0035    TGClient        *fClient;       ///< pointer to TGClient
0036    TGListTreeItem  *fParent;       ///< pointer to parent
0037    TGListTreeItem  *fFirstchild;   ///< pointer to first child item
0038    TGListTreeItem  *fLastchild;    ///< pointer to last child item
0039    TGListTreeItem  *fPrevsibling;  ///< pointer to previous sibling
0040    TGListTreeItem  *fNextsibling;  ///< pointer to next sibling
0041 
0042    Bool_t           fOpen;         ///< true if item is open
0043 
0044    Int_t            fDNDState;     ///< EDNDFlags
0045 
0046    ///@{
0047    ///@name State managed by TGListTree during drawing.
0048    Int_t            fY;            // y position of item
0049    Int_t            fXtext;        // x position of item text
0050    Int_t            fYtext;        // y position of item text
0051    UInt_t           fHeight;       // item height
0052    ///@}
0053 
0054    virtual TString SaveTreeItem(std::ostream &, const char *, const char *) { return ""; }
0055 
0056 public:
0057    TGListTreeItem(TGClient *client = gClient);
0058    virtual ~TGListTreeItem() {}
0059 
0060    TGListTreeItem *GetParent()      const { return fParent; }
0061    TGListTreeItem *GetFirstChild()  const { return fFirstchild; }
0062    TGListTreeItem *GetLastChild()   const { return fLastchild;  }
0063    TGListTreeItem *GetPrevSibling() const { return fPrevsibling; }
0064    TGListTreeItem *GetNextSibling() const { return fNextsibling; }
0065 
0066    virtual Bool_t          IsOpen()    const { return fOpen; }
0067    virtual void            SetOpen(Bool_t o) { fOpen = o; }
0068 
0069    virtual Bool_t          IsActive() const = 0;
0070    virtual Pixel_t         GetActiveColor() const = 0;
0071    virtual void            SetActive(Bool_t) {}
0072 
0073    void                    Rename(const char* new_name) { SetText(new_name); }
0074    virtual const char     *GetText() const = 0;
0075    virtual Int_t           GetTextLength() const = 0;
0076    virtual const char     *GetTipText() const = 0;
0077    virtual Int_t           GetTipTextLength() const = 0;
0078    virtual void            SetText(const char *) {}
0079    virtual void            SetTipText(const char *) {}
0080 
0081    virtual void            SetUserData(void *, Bool_t=kFALSE) {}
0082    virtual void           *GetUserData() const = 0;
0083 
0084    virtual const TGPicture*GetPicture() const = 0;
0085    virtual void            SetPictures(const TGPicture*, const TGPicture*) {}
0086    virtual const TGPicture*GetCheckBoxPicture() const = 0;
0087    virtual void            SetCheckBoxPictures(const TGPicture*, const TGPicture*) {}
0088    virtual UInt_t          GetPicWidth() const;
0089 
0090    virtual void            SetCheckBox(Bool_t=kTRUE) {}
0091    virtual Bool_t          HasCheckBox() const = 0;
0092    virtual void            CheckItem(Bool_t=kTRUE) = 0;
0093    virtual void            Toggle() { SetCheckBox( ! IsChecked()); }
0094    virtual Bool_t          IsChecked() const = 0;
0095 
0096    // Propagation of checked-state form children to parents.
0097    virtual void            CheckAllChildren(Bool_t=kTRUE) {}
0098    virtual void            CheckChildren(TGListTreeItem*, Bool_t) {}
0099    virtual Bool_t          HasCheckedChild(Bool_t=kFALSE)   { return kTRUE; } // !!!!
0100    virtual Bool_t          HasUnCheckedChild(Bool_t=kFALSE) { return kTRUE; } // !!!!
0101    virtual void            UpdateState() {}
0102 
0103    // Item coloration (underline + minibox)
0104    virtual Bool_t          HasColor() const = 0;
0105    virtual Color_t         GetColor() const = 0;
0106    virtual void            SetColor(Color_t) {}
0107    virtual void            ClearColor() {}
0108 
0109    // Drag and drop.
0110    void            SetDNDSource(Bool_t onoff)
0111                    { if (onoff) fDNDState |= kIsDNDSource; else fDNDState &= ~kIsDNDSource; }
0112    void            SetDNDTarget(Bool_t onoff)
0113                    { if (onoff) fDNDState |= kIsDNDTarget; else fDNDState &= ~kIsDNDTarget; }
0114    Bool_t          IsDNDSource() const { return fDNDState & kIsDNDSource; }
0115    Bool_t          IsDNDTarget() const { return fDNDState & kIsDNDTarget; }
0116 
0117    // Allow handling by the items themselves ... NOT USED in TGListTree yet !!!!
0118    virtual Bool_t  HandlesDragAndDrop() const { return kFALSE; }
0119    virtual void    HandleDrag() {}
0120    virtual void    HandleDrop() {}
0121 
0122    ClassDef(TGListTreeItem,0)  // Abstract base-class for items that go into a TGListTree container.
0123 };
0124 
0125 
0126 class TGListTreeItemStd : public TGListTreeItem
0127 {
0128 private:
0129    Bool_t           fActive;       ///< true if item is active
0130    Bool_t           fCheckBox;     ///< true if checkbox is visible
0131    Bool_t           fChecked;      ///< true if item is checked
0132    Bool_t           fOwnsData;     ///< true if user data has to be deleted
0133    TString          fText;         ///< item text
0134    TString          fTipText;      ///< tooltip text
0135    const TGPicture *fOpenPic;      ///< icon for open state
0136    const TGPicture *fClosedPic;    ///< icon for closed state
0137    const TGPicture *fCheckedPic;   ///< icon for checked item
0138    const TGPicture *fUncheckedPic; ///< icon for unchecked item
0139    void            *fUserData;     ///< pointer to user data structure
0140 
0141    Bool_t           fHasColor;     ///< true if item has assigned color
0142    Color_t          fColor;        ///< item's color
0143 
0144    TGListTreeItemStd(const TGListTreeItemStd&) = delete;
0145    TGListTreeItemStd& operator=(const TGListTreeItemStd&) = delete;
0146 
0147 protected:
0148 
0149    TString         SaveTreeItem(std::ostream &out, const char *treevarname, const char *parent_var_name) override;
0150 
0151 public:
0152    TGListTreeItemStd(TGClient *fClient = gClient, const char *name = nullptr,
0153                      const TGPicture *opened = nullptr, const TGPicture *closed = nullptr,
0154                      Bool_t checkbox = kFALSE);
0155    ~TGListTreeItemStd() override;
0156 
0157    Pixel_t         GetActiveColor() const override;
0158    Bool_t          IsActive() const override { return fActive; }
0159    void            SetActive(Bool_t a) override { fActive = a; }
0160 
0161    const char     *GetText() const override { return fText.Data(); }
0162    Int_t           GetTextLength() const override { return fText.Length(); }
0163    const char     *GetTipText() const override { return fTipText.Data(); }
0164    Int_t           GetTipTextLength() const override { return fTipText.Length(); }
0165    void            SetText(const char *text) override { fText = text; }
0166    void            SetTipText(const char *tip) override { fTipText = tip; }
0167 
0168    void            SetUserData(void *userData, Bool_t own = kFALSE) override { fUserData = userData; fOwnsData=own; }
0169    void           *GetUserData() const override { return fUserData; }
0170 
0171    const TGPicture *GetPicture() const override { return fOpen ? fOpenPic : fClosedPic; }
0172    const TGPicture *GetCheckBoxPicture() const override { return fCheckBox ? (fChecked ? fCheckedPic : fUncheckedPic) : nullptr; }
0173    void            SetPictures(const TGPicture *opened, const TGPicture *closed) override;
0174    void            SetCheckBoxPictures(const TGPicture *checked, const TGPicture *unchecked) override;
0175 
0176    void            SetCheckBox(Bool_t on = kTRUE) override;
0177    Bool_t          HasCheckBox() const override { return fCheckBox; }
0178    void            CheckItem(Bool_t checked = kTRUE) override { fChecked = checked; }
0179    void            Toggle() override { fChecked = !fChecked; }
0180    Bool_t          IsChecked() const override { return fChecked; }
0181 
0182    void            CheckAllChildren(Bool_t state = kTRUE) override;
0183    void            CheckChildren(TGListTreeItem *item, Bool_t state) override;
0184    Bool_t          HasCheckedChild(Bool_t first=kFALSE) override;
0185    Bool_t          HasUnCheckedChild(Bool_t first=kFALSE) override;
0186    void            UpdateState() override;
0187 
0188    Bool_t          HasColor() const override { return fHasColor; }
0189    Color_t         GetColor() const override { return fColor; }
0190    void            SetColor(Color_t color) override { fHasColor = true;fColor = color; }
0191    void            ClearColor() override { fHasColor = false; }
0192 
0193    ClassDefOverride(TGListTreeItemStd,0)  //Item that goes into a TGListTree container
0194 };
0195 
0196 
0197 class TGListTree : public TGContainer {
0198 
0199 public:
0200    //---- color markup mode of tree items
0201    enum EColorMarkupMode {
0202       kDefault        = 0,
0203       kColorUnderline = BIT(0),
0204       kColorBox       = BIT(1)
0205    };
0206    enum ECheckMode {
0207       kSimple    = BIT(2),
0208       kRecursive = BIT(3)
0209    };
0210 
0211 protected:
0212    TGListTreeItem  *fFirst;          ///< pointer to first item in list
0213    TGListTreeItem  *fLast;           ///< pointer to last item in list
0214    TGListTreeItem  *fSelected;       ///< pointer to selected item in list
0215    TGListTreeItem  *fCurrent;        ///< pointer to current item in list
0216    TGListTreeItem  *fBelowMouse;     ///< pointer to item below mouses cursor
0217    Int_t            fHspacing;       ///< horizontal spacing between items
0218    Int_t            fVspacing;       ///< vertical spacing between items
0219    Int_t            fIndent;         ///< number of pixels indentation
0220    Int_t            fMargin;         ///< number of pixels margin from left side
0221    Pixel_t          fGrayPixel;      ///< gray draw color
0222    GContext_t       fActiveGC;       ///< activated (selected) drawing context
0223    GContext_t       fDrawGC;         ///< icon drawing context
0224    GContext_t       fLineGC;         ///< dashed line drawing context
0225    GContext_t       fHighlightGC;    ///< highlighted icon drawing context
0226    FontStruct_t     fFont;           ///< font used to draw item text
0227    UInt_t           fDefw;           ///< default list width
0228    UInt_t           fDefh;           ///< default list height
0229    Int_t            fExposeTop;      ///< top y postion of visible region
0230    Int_t            fExposeBottom;   ///< bottom y position of visible region
0231    TGToolTip       *fTip;            ///< tooltip shown when moving over list items
0232    TGListTreeItem  *fTipItem;        ///< item for which tooltip is set
0233    TBufferFile     *fBuf;            ///< buffer used for Drag and Drop
0234    TDNDData         fDNDData;        ///< Drag and Drop data
0235    Atom_t          *fDNDTypeList;    ///< handles DND types
0236    TGListTreeItem  *fDropItem;       ///< item on which DND is over
0237    Bool_t           fAutoTips;       ///< assume item->fUserData is TObject and use GetTitle() for tip text
0238    Bool_t           fAutoCheckBoxPic;///< change check box picture if parent and children have diffrent state
0239    Bool_t           fDisableOpen;    ///< disable branch opening on double-clicks
0240    Bool_t           fUserControlled; ///< let user decides what is the behaviour on events
0241    Bool_t           fEventHandled;   ///< flag used from user code to bypass standard event handling
0242    UInt_t           fLastEventState; ///< modifier state of the last keyboard event
0243 
0244    EColorMarkupMode fColorMode;      ///< if/how to render item's main color
0245    ECheckMode       fCheckMode;      ///< how to propagate check properties through the tree
0246    GContext_t       fColorGC;        ///< drawing context for main item color
0247 
0248    static Pixel_t          fgGrayPixel;
0249    static const TGFont    *fgDefaultFont;
0250    static TGGC            *fgActiveGC;
0251    static TGGC            *fgDrawGC;
0252    static TGGC            *fgLineGC;
0253    static TGGC            *fgHighlightGC;
0254    static TGGC            *fgColorGC;
0255    static const TGPicture *fgOpenPic;       ///< icon for open item
0256    static const TGPicture *fgClosedPic;     ///< icon for closed item
0257    static const TGPicture *fgCheckedPic;    ///< icon for checked item
0258    static const TGPicture *fgUncheckedPic;  ///< icon for unchecked item
0259 
0260    static Pixel_t       GetGrayPixel();
0261    static FontStruct_t  GetDefaultFontStruct();
0262    static const TGGC   &GetActiveGC();
0263    static const TGGC   &GetDrawGC();
0264    static const TGGC   &GetLineGC();
0265    static const TGGC   &GetHighlightGC();
0266    static const TGGC   &GetColorGC();
0267 
0268    void  Draw(Handle_t id, Int_t yevent, Int_t hevent);
0269    void  Draw(Option_t * ="") override { MayNotUse("Draw(Option_t*)"); }
0270    Int_t DrawChildren(Handle_t id, TGListTreeItem *item, Int_t x, Int_t y, Int_t xroot);
0271    void  DrawItem(Handle_t id, TGListTreeItem *item, Int_t x, Int_t y, Int_t *xroot,
0272                   UInt_t *retwidth, UInt_t *retheight);
0273    void  DrawItemName(Handle_t id, TGListTreeItem *item);
0274    void  DrawNode(Handle_t id, TGListTreeItem *item, Int_t x, Int_t y);
0275    virtual void UpdateChecked(TGListTreeItem *item, Bool_t redraw = kFALSE);
0276 
0277    void  SaveChildren(std::ostream &out, const char *parent_var_name, TGListTreeItem *item);
0278    void  RemoveReference(TGListTreeItem *item);
0279    void  PDeleteItem(TGListTreeItem *item);
0280    void  PDeleteChildren(TGListTreeItem *item);
0281    void  InsertChild(TGListTreeItem *parent, TGListTreeItem *item);
0282    void  InsertChildren(TGListTreeItem *parent, TGListTreeItem *item);
0283    Int_t SearchChildren(TGListTreeItem *item, Int_t y, Int_t findy,
0284                         TGListTreeItem **finditem);
0285    TGListTreeItem *FindItem(Int_t findy);
0286    void *FindItem(const TString& name,
0287                   Bool_t direction = kTRUE,
0288                   Bool_t caseSensitive = kTRUE,
0289                   Bool_t beginWith = kFALSE) override
0290       { return TGContainer::FindItem(name, direction, caseSensitive, beginWith); }
0291 
0292    void Layout() override {}
0293 
0294    void OnMouseOver(TGFrame*) override { }
0295    void CurrentChanged(Int_t /*x*/, Int_t /*y*/) override { }
0296    void CurrentChanged(TGFrame *) override { }
0297    void ReturnPressed(TGFrame*) override { }
0298    void Clicked(TGFrame *, Int_t /*btn*/) override { }
0299    void Clicked(TGFrame *, Int_t /*btn*/, Int_t /*x*/, Int_t /*y*/) override { }
0300    void DoubleClicked(TGFrame *, Int_t /*btn*/) override { }
0301    void DoubleClicked(TGFrame *, Int_t /*btn*/, Int_t /*x*/, Int_t /*y*/) override { }
0302    void KeyPressed(TGFrame *, UInt_t /*keysym*/, UInt_t /*mask*/) override { }
0303 
0304 private:
0305    TGListTree(const TGListTree&) = delete;
0306    TGListTree& operator=(const TGListTree&) = delete;
0307 
0308 public:
0309    TGListTree(TGWindow *p = nullptr, UInt_t w = 1, UInt_t h = 1,
0310               UInt_t options = 0, Pixel_t back = GetWhitePixel());
0311    TGListTree(TGCanvas *p, UInt_t options, Pixel_t back = GetWhitePixel());
0312 
0313    ~TGListTree() override;
0314 
0315    Bool_t HandleButton(Event_t *event) override;
0316    Bool_t HandleDoubleClick(Event_t *event) override;
0317    Bool_t HandleCrossing(Event_t *event) override;
0318    Bool_t HandleMotion(Event_t *event) override;
0319    Bool_t HandleKey(Event_t *event) override;
0320 
0321    virtual void SetCanvas(TGCanvas *canvas) { fCanvas = canvas; }
0322    void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h) override;
0323 
0324    virtual void DrawOutline(Handle_t id, TGListTreeItem *item, Pixel_t col=0xbbbbbb,
0325                             Bool_t clear=kFALSE);
0326    virtual void DrawActive(Handle_t id, TGListTreeItem *item);
0327 
0328    TGDimension GetDefaultSize() const override
0329       { return TGDimension(fDefw, fDefh); }
0330 
0331    void            AddItem(TGListTreeItem *parent, TGListTreeItem *item);
0332    TGListTreeItem *AddItem(TGListTreeItem *parent, const char *string,
0333                            const TGPicture *open = nullptr,
0334                            const TGPicture *closed = nullptr,
0335                            Bool_t checkbox = kFALSE);
0336    TGListTreeItem *AddItem(TGListTreeItem *parent, const char *string,
0337                            void *userData, const TGPicture *open = nullptr,
0338                            const TGPicture *closed = nullptr,
0339                            Bool_t checkbox = kFALSE);
0340    void  RenameItem(TGListTreeItem *item, const char *string);
0341    Int_t DeleteItem(TGListTreeItem *item);
0342    void  OpenItem(TGListTreeItem *item);
0343    void  CloseItem(TGListTreeItem *item);
0344    void  CheckItem(TGListTreeItem *item, Bool_t check = kTRUE);
0345    void  SetCheckBox(TGListTreeItem *item, Bool_t on = kTRUE);
0346    void  ToggleItem(TGListTreeItem *item);
0347    Int_t RecursiveDeleteItem(TGListTreeItem *item, void *userData);
0348 
0349    Int_t DeleteChildren(TGListTreeItem *item);
0350    Int_t Reparent(TGListTreeItem *item, TGListTreeItem *newparent);
0351    Int_t ReparentChildren(TGListTreeItem *item, TGListTreeItem *newparent);
0352    void  SetToolTipItem(TGListTreeItem *item, const char *string);
0353    void  SetAutoTips(Bool_t on = kTRUE) { fAutoTips = on; }
0354    void  SetAutoCheckBoxPic(Bool_t on) { fAutoCheckBoxPic = on; }
0355    void  SetSelected(TGListTreeItem *item) { fSelected = item; }
0356    void  AdjustPosition(TGListTreeItem *item);
0357    void  AdjustPosition() override { TGContainer::AdjustPosition(); }
0358 
0359    // overwrite TGContainer's methods
0360    void Home(Bool_t select = kFALSE) override;
0361    void End(Bool_t select = kFALSE) override;
0362    void PageUp(Bool_t select = kFALSE) override;
0363    void PageDown(Bool_t select = kFALSE) override;
0364    void LineUp(Bool_t select = kFALSE) override;
0365    void LineDown(Bool_t select = kFALSE) override;
0366    void Search(Bool_t close = kTRUE) override;
0367 
0368    Int_t Sort(TGListTreeItem *item);
0369    Int_t SortSiblings(TGListTreeItem *item);
0370    Int_t SortChildren(TGListTreeItem *item);
0371    void  HighlightItem(TGListTreeItem *item);
0372    void  ClearHighlighted();
0373    void  GetPathnameFromItem(TGListTreeItem *item, char *path, Int_t depth = 0);
0374    void  UnselectAll(Bool_t draw);
0375    void  SetToolTipText(const char *text, Int_t x, Int_t y, Long_t delayms);
0376    void  HighlightItem(TGListTreeItem *item, Bool_t state, Bool_t draw);
0377    void  HighlightChildren(TGListTreeItem *item, Bool_t state, Bool_t draw);
0378    void  DisableOpen(Bool_t disable = kTRUE) { fDisableOpen = disable;}
0379    void  GetChecked(TList *checked);
0380    void  GetCheckedChildren(TList *checked, TGListTreeItem *item);
0381    void  CheckAllChildren(TGListTreeItem *item, Bool_t state);
0382 
0383    TGListTreeItem *GetFirstItem()  const { return fFirst; }
0384    TGListTreeItem *GetSelected()   const { return fSelected; }
0385    TGListTreeItem *GetCurrent()    const { return fCurrent; }
0386    TGListTreeItem *GetBelowMouse() const { return fBelowMouse; }
0387    TGListTreeItem *FindSiblingByName(TGListTreeItem *item, const char *name);
0388    TGListTreeItem *FindSiblingByData(TGListTreeItem *item, void *userData);
0389    TGListTreeItem *FindChildByName(TGListTreeItem *item, const char *name);
0390    TGListTreeItem *FindChildByData(TGListTreeItem *item, void *userData);
0391    TGListTreeItem *FindItemByPathname(const char *path);
0392    TGListTreeItem *FindItemByObj(TGListTreeItem *item, void *ptr);
0393 
0394    void  AddItem(const char *string) { AddItem(fSelected, string); } //*MENU*
0395    void  AddRoot(const char *string) { AddItem(nullptr, string); } //*MENU*
0396    Int_t DeleteSelected() { return fSelected ? DeleteItem(fSelected) : 0; } //*MENU*
0397    void  RenameSelected(const char *string) { if (fSelected) RenameItem(fSelected, string); } //*MENU*
0398 
0399    virtual void MouseOver(TGListTreeItem *entry);  //*SIGNAL*
0400    virtual void MouseOver(TGListTreeItem *entry, UInt_t mask);  //*SIGNAL*
0401    virtual void KeyPressed(TGListTreeItem *entry, UInt_t keysym, UInt_t mask);  //*SIGNAL*
0402    virtual void ReturnPressed(TGListTreeItem *entry);  //*SIGNAL*
0403    virtual void Clicked(TGListTreeItem *entry, Int_t btn);  //*SIGNAL*
0404    virtual void Clicked(TGListTreeItem *entry, Int_t btn, Int_t x, Int_t y);  //*SIGNAL*
0405    virtual void Clicked(TGListTreeItem *entry, Int_t btn, UInt_t mask, Int_t x, Int_t y);  //*SIGNAL*
0406    virtual void DoubleClicked(TGListTreeItem *entry, Int_t btn);  //*SIGNAL*
0407    virtual void DoubleClicked(TGListTreeItem *entry, Int_t btn, Int_t x, Int_t y);  //*SIGNAL*
0408    virtual void Checked(TObject *obj, Bool_t check);  //*SIGNAL*
0409    virtual void DataDropped(TGListTreeItem *item, TDNDData *data);  //*SIGNAL*
0410 
0411    // Utility functions
0412    Int_t        FontHeight();
0413    Int_t        FontAscent();
0414    Int_t        TextWidth(const char *c);
0415 
0416    static const TGPicture *GetOpenPic();
0417    static const TGPicture *GetClosedPic();
0418    static const TGPicture *GetCheckedPic();
0419    static const TGPicture *GetUncheckedPic();
0420 
0421    // User control
0422    void         SetUserControl(Bool_t ctrl=kTRUE) { fUserControlled = ctrl; }
0423    Bool_t       HasUserControl() const { return fUserControlled; }
0424    void         SetEventHandled(Bool_t eh=kTRUE) { fEventHandled = eh; }
0425    Bool_t       IsEventHandled() const { return fEventHandled; }
0426 
0427    Bool_t   HandleDNDDrop(TDNDData *data) override;
0428    Atom_t   HandleDNDPosition(Int_t x, Int_t y, Atom_t action,
0429                               Int_t xroot, Int_t yroot) override;
0430    Atom_t   HandleDNDEnter(Atom_t * typelist) override;
0431    Bool_t   HandleDNDLeave() override;
0432 
0433    TDNDData *GetDNDData(Atom_t) override { return &fDNDData; }
0434 
0435    EColorMarkupMode GetColorMode() const { return fColorMode; }
0436    void SetColorMode(EColorMarkupMode colorMode) { fColorMode = colorMode; }
0437 
0438    ECheckMode GetCheckMode() const { return fCheckMode; }
0439    void SetCheckMode(ECheckMode mode) { fCheckMode = mode; }
0440 
0441    void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0442 
0443    ClassDefOverride(TGListTree,0)  //Show items in a tree structured list
0444 };
0445 
0446 #endif