Logo ROOT   6.12/07
Reference Guide
TGraphEditor.h
Go to the documentation of this file.
1 // @(#)root/ged:$Id$
2 // Author: Carsten Hof 28/07/04
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2002, 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_TGraphEditor
13 #define ROOT_TGraphEditor
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TGraphEditor //
18 // //
19 // Editor for changing Graph attributes. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TGedFrame.h"
24 
25 class TGraph;
26 class TGButtonGroup;
27 class TGTextEntry;
28 class TGCheckButton;
29 class TGRadioButton;
31 
32 class TGraphEditor : public TGedFrame {
33 
34 protected:
35  char fDrawShape; // Shape of the Graph (simple, smooth, bar)
36  TGTextEntry *fTitle; // Contains the title of the graph
37  Int_t fTitlePrec; // font precision level
38  TGraph *fGraph; // Graph object
39  TGButtonGroup *fgr; // Group the Radiobuttons:
40  TGRadioButton *fShape; // just draw unconnected points
41  TGRadioButton *fShape0; // set smooth graph curve
42  TGRadioButton *fShape1; // set simple poly-line between every graph point
43  TGRadioButton *fShape2; // set graph draw mode to bar chart
44  TGRadioButton *fShape3; // set graph draw mode to fill area
45  TGLayoutHints *fShape1lh; // layout-hints for fShape1
46  TGCheckButton *fMarkerOnOff; // set Marker visible/unvisible
47  TGLineWidthComboBox *fWidthCombo; // Exclusion zone width
48  TGCheckButton *fExSide; // set the exclusion zone side
49 
50  virtual void ConnectSignals2Slots();
51 
52 public:
53  TGraphEditor(const TGWindow *p = 0,
54  Int_t width = 140, Int_t height = 30,
55  UInt_t options = kChildFrame,
57  virtual ~TGraphEditor();
58  virtual void SetModel(TObject* obj);
59 
60  // slots related to graph attributes
61  virtual void DoShape();
62  virtual void DoMarkerOnOff(Bool_t on);
63  virtual void DoTitle(const char *text);
64  virtual void DoGraphLineWidth();
65 
66  ClassDef(TGraphEditor,0) // graph editor
67 };
68 #endif
69 
TGRadioButton * fShape0
Definition: TGraphEditor.h:41
virtual void DoGraphLineWidth()
TGLineWidthComboBox * fWidthCombo
Definition: TGraphEditor.h:47
TGButtonGroup * fgr
Definition: TGraphEditor.h:39
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGLayoutHints * fShape1lh
Definition: TGraphEditor.h:45
virtual void DoShape()
TGCheckButton * fMarkerOnOff
Definition: TGraphEditor.h:46
virtual ~TGraphEditor()
#define ClassDef(name, id)
Definition: Rtypes.h:320
ULong_t Pixel_t
Definition: GuiTypes.h:39
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
TGraph * fGraph
Definition: TGraphEditor.h:38
virtual void ConnectSignals2Slots()
TGraphEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
TGRadioButton * fShape2
Definition: TGraphEditor.h:43
virtual void DoMarkerOnOff(Bool_t on)
TGRadioButton * fShape1
Definition: TGraphEditor.h:42
TGTextEntry * fTitle
Definition: TGraphEditor.h:36
unsigned int UInt_t
Definition: RtypesCore.h:42
TGRadioButton * fShape
Definition: TGraphEditor.h:40
TGRadioButton * fShape3
Definition: TGraphEditor.h:44
Int_t fTitlePrec
Definition: TGraphEditor.h:37
TText * text
virtual void SetModel(TObject *obj)
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void DoTitle(const char *text)
A Graph is a graphics object made of two arrays X and Y with npoints each.
Definition: TGraph.h:41
TGCheckButton * fExSide
Definition: TGraphEditor.h:48