ROOT logo
// @(#)root/gui:$Id: TGObject.h 27658 2009-02-28 05:34:57Z pcanal $
// Author: Fons Rademakers   27/12/97

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGObject
#define ROOT_TGObject


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGObject                                                             //
//                                                                      //
// This class is the baseclass for all ROOT GUI widgets.                //
// The ROOT GUI components emulate the Win95 look and feel and the code //
// is based on the XClass'95 code (see Copyleft in source).             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_GuiTypes
#include "GuiTypes.h"
#endif

class TGClient;


class TGObject : public TObject {


protected:
   Handle_t    fId;                  // X11/Win32 Window identifier
   TGClient   *fClient;              // Connection to display server

   TGObject& operator=(const TGObject& tgo)
     {if(this!=&tgo) { TObject::operator=(tgo); fId=tgo.fId;
     fClient=tgo.fClient; } return *this; }

public:
   TGObject(): fId(0), fClient(0) { }
   TGObject(const TGObject& tgo): TObject(tgo), fId(tgo.fId), fClient(tgo.fClient) { }
   virtual ~TGObject() { }

   Handle_t  GetId() const { return fId; }
   TGClient *GetClient() const { return fClient; }
   ULong_t   Hash() const { return (ULong_t) fId >> 0; }
   Bool_t    IsEqual(const TObject *obj) const { return fId == ((const TGObject *) obj)->fId; }
   virtual void SaveAs(const char* filename = "", Option_t* option = "") const;

   ClassDef(TGObject,0)  //ROOT GUI base class
};

#endif
 TGObject.h:1
 TGObject.h:2
 TGObject.h:3
 TGObject.h:4
 TGObject.h:5
 TGObject.h:6
 TGObject.h:7
 TGObject.h:8
 TGObject.h:9
 TGObject.h:10
 TGObject.h:11
 TGObject.h:12
 TGObject.h:13
 TGObject.h:14
 TGObject.h:15
 TGObject.h:16
 TGObject.h:17
 TGObject.h:18
 TGObject.h:19
 TGObject.h:20
 TGObject.h:21
 TGObject.h:22
 TGObject.h:23
 TGObject.h:24
 TGObject.h:25
 TGObject.h:26
 TGObject.h:27
 TGObject.h:28
 TGObject.h:29
 TGObject.h:30
 TGObject.h:31
 TGObject.h:32
 TGObject.h:33
 TGObject.h:34
 TGObject.h:35
 TGObject.h:36
 TGObject.h:37
 TGObject.h:38
 TGObject.h:39
 TGObject.h:40
 TGObject.h:41
 TGObject.h:42
 TGObject.h:43
 TGObject.h:44
 TGObject.h:45
 TGObject.h:46
 TGObject.h:47
 TGObject.h:48
 TGObject.h:49
 TGObject.h:50
 TGObject.h:51
 TGObject.h:52
 TGObject.h:53
 TGObject.h:54
 TGObject.h:55
 TGObject.h:56
 TGObject.h:57
 TGObject.h:58
 TGObject.h:59
 TGObject.h:60
 TGObject.h:61