Logo ROOT  
Reference Guide
TStructNodeProperty.h
Go to the documentation of this file.
1 // @(#)root/gviz3d:$Id$
2 // Author: Tomasz Sosnicki 18/09/09
3 
4 /************************************************************************
5 * Copyright (C) 1995-2009, 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_TStructNodeProperty
13 #define ROOT_TStructNodeProperty
14 
15 #include <TNamed.h>
16 #include <TColor.h>
17 #include <TGColorSelect.h>
18 
19 class TStructNodeProperty : public TNamed {
20 
21 private:
22  TColor fColor; // Color of a class
23 
24 public:
25  TStructNodeProperty(const char * name, Int_t color);
26  TStructNodeProperty(const char * name, Pixel_t pixel);
28 
29  TColor GetColor() const;
30  Pixel_t GetPixel() const;
31  void SetColor(const TColor & color);
32  void SetColor(Pixel_t pixel);
33  void SetColor(Int_t color);
34  Int_t Compare(const TObject* obj) const;
35  Bool_t IsSortable() const;
36 
37  ClassDef(TStructNodeProperty, 1); // Class with nodes color property
38 };
39 
40 #endif
TStructNodeProperty::SetColor
void SetColor(const TColor &color)
Sets the color to "color".
Definition: TStructNodeProperty.cxx:136
TStructNodeProperty::fColor
TColor fColor
Definition: TStructNodeProperty.h:22
Pixel_t
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
TStructNodeProperty::IsSortable
Bool_t IsSortable() const
Retruns true, because we have overrided method Compare.
Definition: TStructNodeProperty.cxx:128
TNamed.h
TColor.h
bool
TColor
The color creation and management class.
Definition: TColor.h:19
TStructNodeProperty::GetPixel
Pixel_t GetPixel() const
Return color in Pixel_t format.
Definition: TStructNodeProperty.cxx:120
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TStructNodeProperty::GetColor
TColor GetColor() const
Returns color of class.
Definition: TStructNodeProperty.cxx:112
TStructNodeProperty
Definition: TStructNodeProperty.h:19
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TStructNodeProperty::TStructNodeProperty
TStructNodeProperty(const char *name, Int_t color)
Contructs a TStructNodeProperty with p as parent window for class "name" with color "color".
Definition: TStructNodeProperty.cxx:32
TGColorSelect.h
TStructNodeProperty::Compare
Int_t Compare(const TObject *obj) const
Overrided method. Compare two objects of TStructNodeProperty class.
Definition: TStructNodeProperty.cxx:57
TStructNodeProperty::~TStructNodeProperty
~TStructNodeProperty()
Destructor.
Definition: TStructNodeProperty.cxx:50
int