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 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGObject //
19 // //
20 // This class is the baseclass for all ROOT GUI widgets. //
21 // The ROOT GUI components emulate the Win95 look and feel and the code //
22 // is based on the XClass'95 code (see Copyleft in source). //
23 // //
24 //////////////////////////////////////////////////////////////////////////
25 
26 #include "TObject.h"
27 #include "GuiTypes.h"
28 
29 class TGClient;
30 
31 
32 class TGObject : public TObject {
33 
34 
35 protected:
36  Handle_t fId; // X11/Win32 Window identifier
37  TGClient *fClient; // Connection to display server
38 
40  {if(this!=&tgo) { TObject::operator=(tgo); fId=tgo.fId;
41  fClient=tgo.fClient; } return *this; }
42 
43 public:
44  TGObject(): fId(0), fClient(0) { }
45  TGObject(const TGObject& tgo): TObject(tgo), fId(tgo.fId), fClient(tgo.fClient) { }
46  virtual ~TGObject();
47  Handle_t GetId() const { return fId; }
48  TGClient *GetClient() const { return fClient; }
49  ULong_t Hash() const { return (ULong_t) fId >> 0; }
50  Bool_t IsEqual(const TObject *obj) const;
51  virtual void SaveAs(const char* filename = "", Option_t* option = "") const;
52 
53  ClassDef(TGObject,0) //ROOT GUI base class
54 };
55 
56 #endif
TGObject
Definition: TGObject.h:32
TGObject::TGObject
TGObject(const TGObject &tgo)
Definition: TGObject.h:45
TGObject::TGObject
TGObject()
Definition: TGObject.h:44
TGObject::Hash
ULong_t Hash() const
Return hash value for this object.
Definition: TGObject.h:49
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:47
TGObject::IsEqual
Bool_t IsEqual(const TObject *obj) const
Equal comparison (TGObjects are equal if they have the same window identifier).
Definition: TGObject.cxx:78
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TGObject::operator=
TGObject & operator=(const TGObject &tgo)
Definition: TGObject.h:39
TGObject::fId
Handle_t fId
Definition: TGObject.h:36
GuiTypes.h
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TGObject::~TGObject
virtual ~TGObject()
TGObject destructor.
Definition: TGObject.cxx:43
TGObject::GetClient
TGClient * GetClient() const
Definition: TGObject.h:48
TObject::operator=
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition: TObject.h:268
TObject.h
TGObject::fClient
TGClient * fClient
Definition: TGObject.h:37
TObject
Definition: TObject.h:37
Handle_t
ULong_t Handle_t
Definition: GuiTypes.h:25
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:54
TGClient
Definition: TGClient.h:46