Logo ROOT   6.14/05
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 #include "TGedFrame.h"
24 
25 class TPie;
26 class TGButtonGroup;
27 class TGTextEntry;
28 class TGCheckButton;
29 class TGRadioButton;
30 class TGNumberEntry;
31 class TGColorSelect;
32 class TGFontTypeComboBox;
33 class TGComboBox;
34 
35 class TPieEditor : public TGedFrame {
36 
37 protected:
38  char fDrawShape; // Shape of the Graph (simple, smooth, bar)
39  TGTextEntry *fTitle; // Contains the title of the graph
40  Int_t fTitlePrec; // font precision level
41  TPie *fPie; // Pie object
42  TGButtonGroup *fgr; // Group the Radiobuttons:
43  TGRadioButton *fLblDirH; // Draw slice's labels horizontal
44  TGRadioButton *fLblDirR; // Draw slice's labels radial to the piechart
45  TGRadioButton *fLblDirT; // Draw slice's labels tangential to the piechart's circle
46  TGLayoutHints *fShape1lh; // layout-hints for fShape1
47  TGCheckButton *fOutlineOnOff; // set piechart outline visible/unvisible
48  TGCheckButton *fIs3D; // set if is enabled the pseudo-3d mode
49  TGNumberEntry *f3DHeight; // set the 3D tickness
50  TGNumberEntry *f3DAngle; // set the pseudo 3D angle
51  TGColorSelect *fColorSelect; // font color selector
53  TGComboBox *fSizeCombo; // font size
54 
55  virtual void ConnectSignals2Slots();
56 
58 
59 public:
60  TPieEditor(const TGWindow *p = 0,
61  Int_t width = 140, Int_t height = 30,
62  UInt_t options = kChildFrame,
64  virtual ~TPieEditor();
65  virtual void SetModel(TObject* );
66  virtual void ActivateBaseClassEditors(TClass*);
67 
68  // slots related to graph attributes
69  virtual void DoShape();
70  virtual void DoMarkerOnOff(Bool_t on);
71  virtual void DoTitle(const char *text);
72  virtual void DoGraphLineWidth();
73  virtual void DoChange3DAngle();
74  virtual void DoTextChange();
75 
76  ClassDef(TPieEditor,0) // piechart editor
77 };
78 #endif
TPie * fPie
Definition: TPieEditor.h:41
virtual ~TPieEditor()
Destructor of pie editor.
Definition: TPieEditor.cxx:141
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
Int_t fTitlePrec
Definition: TPieEditor.h:40
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:45
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGFontTypeComboBox * fTypeCombo
Definition: TPieEditor.h:52
virtual void DoShape()
Slot connected to the draw options.
Definition: TPieEditor.cxx:289
#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
virtual void DoTextChange()
Change text.
Definition: TPieEditor.cxx:371
TGNumberEntry * f3DAngle
Definition: TPieEditor.h:50
TGCheckButton * fOutlineOnOff
Definition: TPieEditor.h:47
TGNumberEntry * f3DHeight
Definition: TPieEditor.h:49
TGButtonGroup * fgr
Definition: TPieEditor.h:42
virtual void SetModel(TObject *)
Pick up the used values of graph attributes.
Definition: TPieEditor.cxx:181
TGRadioButton * fLblDirR
Definition: TPieEditor.h:44
virtual void ActivateBaseClassEditors(TClass *)
Exclude TAttTextEditor from this interface.
Definition: TPieEditor.cxx:170
TGLayoutHints * fShape1lh
Definition: TPieEditor.h:46
unsigned int UInt_t
Definition: RtypesCore.h:42
char fDrawShape
Definition: TPieEditor.h:38
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
virtual void DoTitle(const char *text)
Slot for setting the graph title.
Definition: TPieEditor.cxx:278
TGCheckButton * fIs3D
Definition: TPieEditor.h:48
TText * text
virtual void DoGraphLineWidth()
Slot connected to the graph line width.
Definition: TPieEditor.cxx:351
Draw a Pie Chart,.
Definition: TPie.h:23
TGRadioButton * fLblDirH
Definition: TPieEditor.h:43
Mother of all ROOT objects.
Definition: TObject.h:37
TGComboBox * fSizeCombo
Definition: TPieEditor.h:53
TGTextEntry * fTitle
Definition: TPieEditor.h:39
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:51
virtual void DoChange3DAngle()
Slot for setting the 3D angle.
Definition: TPieEditor.cxx:336