Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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
52  TGFontTypeComboBox *fTypeCombo; // font style
53  TGComboBox *fSizeCombo; // font size
54 
55  virtual void ConnectSignals2Slots();
56 
57  static TGComboBox* BuildFontSizeComboBox(TGFrame*, Int_t);
58 
59 public:
60  TPieEditor(const TGWindow *p = 0,
61  Int_t width = 140, Int_t height = 30,
62  UInt_t options = kChildFrame,
63  Pixel_t back = GetDefaultFrameBackground());
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