Logo ROOT  
Reference Guide
TGObject.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 27/12/97
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGObject
13 #define ROOT_TGObject
14 
15 
16 #include "TObject.h"
17 #include "GuiTypes.h"
18 
19 class TGClient;
20 
21 
22 class TGObject : public TObject {
23 
24 
25 protected:
26  Handle_t fId; ///< X11/Win32 Window identifier
27  TGClient *fClient; ///< Connection to display server
28 
30  {if(this!=&tgo) { TObject::operator=(tgo); fId=tgo.fId;
31  fClient=tgo.fClient; } return *this; }
32 
33 public:
34  TGObject(): fId(0), fClient(0) { }
35  TGObject(const TGObject& tgo): TObject(tgo), fId(tgo.fId), fClient(tgo.fClient) { }
36  virtual ~TGObject();
37  Handle_t GetId() const { return fId; }
38  TGClient *GetClient() const { return fClient; }
39  ULong_t Hash() const { return (ULong_t) fId >> 0; }
40  Bool_t IsEqual(const TObject *obj) const;
41  virtual void SaveAs(const char* filename = "", Option_t* option = "") const;
42 
43  ClassDef(TGObject,0) //ROOT GUI base class
44 };
45 
46 #endif
TGObject
This class is the baseclass for all ROOT GUI widgets.
Definition: TGObject.h:22
Option_t
const char Option_t
Definition: RtypesCore.h:66
TGObject::TGObject
TGObject(const TGObject &tgo)
Definition: TGObject.h:35
TGObject::TGObject
TGObject()
Definition: TGObject.h:34
TGObject::Hash
ULong_t Hash() const
Return hash value for this object.
Definition: TGObject.h:39
Handle_t
ULongptr_t Handle_t
Generic resource handle.
Definition: GuiTypes.h:26
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:37
TGObject::IsEqual
Bool_t IsEqual(const TObject *obj) const
Equal comparison (TGObjects are equal if they have the same window identifier).
Definition: TGObject.cxx:79
TGObject::operator=
TGObject & operator=(const TGObject &tgo)
Definition: TGObject.h:29
TGObject::fId
Handle_t fId
X11/Win32 Window identifier.
Definition: TGObject.h:26
GuiTypes.h
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TGObject::~TGObject
virtual ~TGObject()
TGObject destructor.
Definition: TGObject.cxx:44
TGObject::GetClient
TGClient * GetClient() const
Definition: TGObject.h:38
TObject::operator=
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition: TObject.h:283
TObject.h
TGObject::fClient
TGClient * fClient
Connection to display server.
Definition: TGObject.h:27
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGObject::SaveAs
virtual void SaveAs(const char *filename="", Option_t *option="") const
Write this TGObject to a file using TImage, if filename's extension signals a valid TImage::EImageFil...
Definition: TGObject.cxx:55
TGClient
Window client.
Definition: TGClient.h:37