00001 // @(#)root/ged:$Id: TPieEditor.h 31945 2009-12-21 19:03:21Z rdm $ 00002 // Author: Guido Volpi 04/10/2007 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TPieEditor 00013 #define ROOT_TPieEditor 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TPieEditor // 00018 // // 00019 // Editor for changing pie-chart attributes. // 00020 // // 00021 ////////////////////////////////////////////////////////////////////////// 00022 00023 #ifndef ROOT_TGedFrame 00024 #include "TGedFrame.h" 00025 #endif 00026 00027 class TPie; 00028 class TGButtonGroup; 00029 class TGTextEntry; 00030 class TGCheckButton; 00031 class TGRadioButton; 00032 class TGNumberEntry; 00033 class TGColorSelect; 00034 class TGFontTypeComboBox; 00035 class TGComboBox; 00036 00037 class TPieEditor : public TGedFrame { 00038 00039 protected: 00040 char fDrawShape; // Shape of the Graph (simple, smooth, bar) 00041 TGTextEntry *fTitle; // Contains the title of the graph 00042 Int_t fTitlePrec; // font precision level 00043 TPie *fPie; // Pie object 00044 TGButtonGroup *fgr; // Group the Radiobuttons: 00045 TGRadioButton *fLblDirH; // Draw slice's labels horizontal 00046 TGRadioButton *fLblDirR; // Draw slice's labels radial to the piechart 00047 TGRadioButton *fLblDirT; // Draw slice's labels tangential to the piechart's circle 00048 TGLayoutHints *fShape1lh; // layout-hints for fShape1 00049 TGCheckButton *fOutlineOnOff; // set piechart outline visible/unvisible 00050 TGCheckButton *fIs3D; // set if is enabled the pseudo-3d mode 00051 TGNumberEntry *f3DHeight; // set the 3D tickness 00052 TGNumberEntry *f3DAngle; // set the pseudo 3D angle 00053 TGColorSelect *fColorSelect; // font color selector 00054 TGFontTypeComboBox *fTypeCombo; // font style 00055 TGComboBox *fSizeCombo; // font size 00056 00057 virtual void ConnectSignals2Slots(); 00058 00059 static TGComboBox* BuildFontSizeComboBox(TGFrame*, Int_t); 00060 00061 public: 00062 TPieEditor(const TGWindow *p = 0, 00063 Int_t width = 140, Int_t height = 30, 00064 UInt_t options = kChildFrame, 00065 Pixel_t back = GetDefaultFrameBackground()); 00066 virtual ~TPieEditor(); 00067 virtual void SetModel(TObject* ); 00068 virtual void ActivateBaseClassEditors(TClass*); 00069 00070 // slots related to graph attributes 00071 virtual void DoShape(); 00072 virtual void DoMarkerOnOff(Bool_t on); 00073 virtual void DoTitle(const char *text); 00074 virtual void DoGraphLineWidth(); 00075 virtual void DoChange3DAngle(); 00076 virtual void DoTextChange(); 00077 00078 ClassDef(TPieEditor,0) // piechart editor 00079 }; 00080 #endif