Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
19class TGClient;
20
21class TGObject : public TObject {
22
23protected:
24 Handle_t fId; ///< X11/Win32 Window identifier
25 TGClient *fClient; ///< Connection to display server
26
28 {
29 if(this!=&tgo) {
31 fId=tgo.fId;
32 fClient=tgo.fClient;
33 }
34 return *this;
35 }
36
37public:
38 TGObject(): fId(0), fClient(nullptr) { }
39 TGObject(const TGObject& tgo): TObject(tgo), fId(tgo.fId), fClient(tgo.fClient) { }
40 ~TGObject() override;
41 Handle_t GetId() const { return fId; }
42 TGClient *GetClient() const { return fClient; }
43 ULong_t Hash() const override { return (ULong_t) fId >> 0; }
44 Bool_t IsEqual(const TObject *obj) const override;
45 void SaveAs(const char* filename = "", Option_t* option = "") const override;
46
47 ClassDefOverride(TGObject,0) //ROOT GUI base class
48};
49
50#endif
ULongptr_t Handle_t
Generic resource handle.
Definition GuiTypes.h:26
bool Bool_t
Definition RtypesCore.h:63
unsigned long ULong_t
Definition RtypesCore.h:55
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Window client.
Definition TGClient.h:37
This class is the baseclass for all ROOT GUI widgets.
Definition TGObject.h:21
~TGObject() override
TGObject destructor.
Definition TGObject.cxx:44
TGObject(const TGObject &tgo)
Definition TGObject.h:39
TGClient * fClient
Connection to display server.
Definition TGObject.h:25
TGObject & operator=(const TGObject &tgo)
Definition TGObject.h:27
TGObject()
Definition TGObject.h:38
Handle_t GetId() const
Definition TGObject.h:41
TGClient * GetClient() const
Definition TGObject.h:42
ULong_t Hash() const override
Return hash value for this object.
Definition TGObject.h:43
Handle_t fId
X11/Win32 Window identifier.
Definition TGObject.h:24
Bool_t IsEqual(const TObject *obj) const override
Equal comparison (TGObjects are equal if they have the same window identifier).
Definition TGObject.cxx:79
void SaveAs(const char *filename="", Option_t *option="") const override
Write this TGObject to a file using TImage, if filename's extension signals a valid TImage::EImageFil...
Definition TGObject.cxx:55
Mother of all ROOT objects.
Definition TObject.h:41
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition TObject.h:296