Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:03

0001 // @(#)root/gui:$Id$
0002 // Author: Fons Rademakers   27/12/97
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, 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_TGObject
0013 #define ROOT_TGObject
0014 
0015 
0016 #include "TObject.h"
0017 #include "GuiTypes.h"
0018 
0019 class TGClient;
0020 
0021 class TGObject : public TObject {
0022 
0023 protected:
0024    Handle_t    fId;                  ///< X11/Win32 Window identifier
0025    TGClient   *fClient;              ///< Connection to display server
0026 
0027    TGObject &operator=(const TGObject& tgo)
0028    {
0029       if(this!=&tgo) {
0030          TObject::operator=(tgo);
0031          fId=tgo.fId;
0032          fClient=tgo.fClient;
0033       }
0034       return *this;
0035    }
0036 
0037 public:
0038    TGObject(): fId(0), fClient(nullptr) { }
0039    TGObject(const TGObject& tgo): TObject(tgo), fId(tgo.fId), fClient(tgo.fClient) { }
0040    ~TGObject() override;
0041    Handle_t  GetId() const { return fId; }
0042    TGClient *GetClient() const { return fClient; }
0043    ULong_t   Hash() const override { return (ULong_t) fId >> 0; }
0044    Bool_t    IsEqual(const TObject *obj) const override;
0045    void SaveAs(const char* filename = "", Option_t* option = "") const override;
0046 
0047    ClassDefOverride(TGObject,0)  //ROOT GUI base class
0048 };
0049 
0050 #endif