ROOT  6.06/09
Reference Guide
TPieEditor.h
Go to the documentation of this file.
1 // @(#)root/ged:$Id$
2 // Author: Guido Volpi 04/10/2007
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_TPieEditor
13 #define ROOT_TPieEditor
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TPieEditor //
18 // //
19 // Editor for changing pie-chart attributes. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TGedFrame
24 #include "TGedFrame.h"
25 #endif
26 
27 class TPie;
28 class TGButtonGroup;
29 class TGTextEntry;
30 class TGCheckButton;
31 class TGRadioButton;
32 class TGNumberEntry;
33 class TGColorSelect;
34 class TGFontTypeComboBox;
35 class TGComboBox;
36 
37 class TPieEditor : public TGedFrame {
38 
39 protected:
40  char fDrawShape; // Shape of the Graph (simple, smooth, bar)
41  TGTextEntry *fTitle; // Contains the title of the graph
42  Int_t fTitlePrec; // font precision level
43  TPie *fPie; // Pie object
44  TGButtonGroup *fgr; // Group the Radiobuttons:
45  TGRadioButton *fLblDirH; // Draw slice's labels horizontal
46  TGRadioButton *fLblDirR; // Draw slice's labels radial to the piechart
47  TGRadioButton *fLblDirT; // Draw slice's labels tangential to the piechart's circle
48  TGLayoutHints *fShape1lh; // layout-hints for fShape1
49  TGCheckButton *fOutlineOnOff; // set piechart outline visible/unvisible
50  TGCheckButton *fIs3D; // set if is enabled the pseudo-3d mode
51  TGNumberEntry *f3DHeight; // set the 3D tickness
52  TGNumberEntry *f3DAngle; // set the pseudo 3D angle
53  TGColorSelect *fColorSelect; // font color selector
55  TGComboBox *fSizeCombo; // font size
56 
57  virtual void ConnectSignals2Slots();
58 
60 
61 public:
62  TPieEditor(const TGWindow *p = 0,
63  Int_t width = 140, Int_t height = 30,
64  UInt_t options = kChildFrame,
66  virtual ~TPieEditor();
67  virtual void SetModel(TObject* );
68  virtual void ActivateBaseClassEditors(TClass*);
69 
70  // slots related to graph attributes
71  virtual void DoShape();
72  virtual void DoMarkerOnOff(Bool_t on);
73  virtual void DoTitle(const char *text);
74  virtual void DoGraphLineWidth();
75  virtual void DoChange3DAngle();
76  virtual void DoTextChange();
77 
78  ClassDef(TPieEditor,0) // piechart editor
79 };
80 #endif
TPie * fPie
Definition: TPieEditor.h:43
virtual ~TPieEditor()
Destructor of pie editor.
Definition: TPieEditor.cxx:141
Int_t fTitlePrec
Definition: TPieEditor.h:42
virtual void DoMarkerOnOff(Bool_t on)
Slot for setting markers as visible/invisible.
Definition: TPieEditor.cxx:317
virtual void ConnectSignals2Slots()
Connect signals to slots.
Definition: TPieEditor.cxx:149
TGRadioButton * fLblDirT
Definition: TPieEditor.h:47
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGFontTypeComboBox * fTypeCombo
Definition: TPieEditor.h:54
virtual void DoShape()
Slot connected to the draw options.
Definition: TPieEditor.cxx:289
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
virtual void DoTextChange()
Change text.
Definition: TPieEditor.cxx:371
TGNumberEntry * f3DAngle
Definition: TPieEditor.h:52
TGCheckButton * fOutlineOnOff
Definition: TPieEditor.h:49
ClassDef(TGedFrame, 0)
TGNumberEntry * f3DHeight
Definition: TPieEditor.h:51
TGButtonGroup * fgr
Definition: TPieEditor.h:44
virtual void SetModel(TObject *)
Pick up the used values of graph attributes.
Definition: TPieEditor.cxx:181
TGRadioButton * fLblDirR
Definition: TPieEditor.h:46
virtual void ActivateBaseClassEditors(TClass *)
Exclude TAttTextEditor from this interface.
Definition: TPieEditor.cxx:170
TGLayoutHints * fShape1lh
Definition: TPieEditor.h:48
unsigned int UInt_t
Definition: RtypesCore.h:42
char fDrawShape
Definition: TPieEditor.h:40
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
virtual void DoTitle(const char *text)
Slot for setting the graph title.
Definition: TPieEditor.cxx:278
TGCheckButton * fIs3D
Definition: TPieEditor.h:50
TText * text
virtual void DoGraphLineWidth()
Slot connected to the graph line width.
Definition: TPieEditor.cxx:351
Draw a Pie Chart,.
Definition: TPie.h:31
TGRadioButton * fLblDirH
Definition: TPieEditor.h:45
Mother of all ROOT objects.
Definition: TObject.h:58
TGComboBox * fSizeCombo
Definition: TPieEditor.h:55
TGTextEntry * fTitle
Definition: TPieEditor.h:41
TPieEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor of graph editor.
Definition: TPieEditor.cxx:65
static TGComboBox * BuildFontSizeComboBox(TGFrame *, Int_t)
Create text size combo box.
Definition: TPieEditor.cxx:408
TGColorSelect * fColorSelect
Definition: TPieEditor.h:53
virtual void DoChange3DAngle()
Slot for setting the 3D angle.
Definition: TPieEditor.cxx:336