#ifndef ROOT_TH1Editor
#define ROOT_TH1Editor
#ifndef ROOT_TGedFrame
#include "TGedFrame.h"
#endif
class TH1;
class TGComboBox;
class TGNumberEntry;
class TGCheckButton;
class TGButtonGroup;
class TGHButtonGroup;
class TString;
class TGRadioButton;
class TGDoubleHSlider;
class TGHSlider;
class TGTextEntry;
class TGNumberEntryField;
class TGTextButton;
class TH1Editor : public TGedFrame {
protected:
TH1 *fHist;
Bool_t fSameOpt;
TGCompositeFrame *fBin;
Int_t fTitlePrec;
TGTextEntry *fTitle;
TGHButtonGroup *fDimGroup;
TGRadioButton *fDim;
TGRadioButton *fDim0;
TGLayoutHints *fDimlh;
TGLayoutHints *fDim0lh;
TGComboBox *fTypeCombo;
TGComboBox *fCoordsCombo;
TGComboBox *fErrorCombo;
TGCheckButton *fHistOnOff;
TGCheckButton *fAddMarker;
TGCheckButton *fAddB;
TGCheckButton *fAddBar;
TGCheckButton *fAdd;
TGCheckButton *fMakeHBar;
TGCheckButton *fAddSimple;
TGNumberEntry *fBarWidth;
TGNumberEntry *fBarOffset;
TGComboBox *fAddCombo;
TGComboBox *fPercentCombo;
TGCompositeFrame *f3;
TGCompositeFrame *f6;
TGCompositeFrame *f7;
TGCompositeFrame *f8;
TGCompositeFrame *f9;
TGCompositeFrame *f10;
TGCompositeFrame *f11;
TGCompositeFrame *f12;
TGCompositeFrame *f15;
TGCompositeFrame *fBinCont;
TGCompositeFrame *fBinCont1;
TGHSlider *fBinSlider;
TGHSlider *fBinSlider1;
TGNumberEntryField *fBinNumberEntry;
TGNumberEntryField *fBinNumberEntry1;
TGHSlider *fBinOffsetSld;
TGNumberEntryField *fOffsetNumberEntry;
TGDoubleHSlider *fSlider;
TGNumberEntryField *fSldMin;
TGNumberEntryField *fSldMax;
TGCheckButton *fDelaydraw;
TGTextButton *fApply;
TGTextButton *fCancel;
static TGComboBox *BuildHistTypeComboBox(TGFrame *parent, Int_t id);
static TGComboBox *BuildHistCoordsComboBox(TGFrame *parent, Int_t id);
static TGComboBox *BuildHistErrorComboBox(TGFrame *parent, Int_t id);
static TGComboBox *BuildHistAddComboBox(TGFrame *parent, Int_t id);
static TGComboBox *BuildPercentComboBox(TGFrame *parent, Int_t id);
virtual void ConnectSignals2Slots();
void CreateBinTab();
private:
Bool_t fMake;
Bool_t fMakeB;
Int_t fPx1old,
fPy1old,
fPx2old,
fPy2old;
Float_t fP1NDCold[3],
fP2NDCold[3],
fP3NDCold[3],
fP4NDCold[3];
Float_t fP1old[3],
fP2old[3],
fP3old[3],
fP4old[3],
fP5old[3],
fP6old[3],
fP7old[3],
fP8old[3];
TH1 *fBinHist;
Double_t fOldOffset;
TString GetHistTypeLabel();
TString GetHistCoordsLabel();
TString GetHistErrorLabel();
TString GetHistAddLabel();
void ChangeErrorCombo(Int_t i);
public:
TH1Editor(const TGWindow *p = 0,
Int_t width = 140, Int_t height = 30,
UInt_t options = kChildFrame,
Pixel_t back = GetDefaultFrameBackground());
virtual ~TH1Editor();
virtual Bool_t AcceptModel(TObject* model);
virtual void SetModel(TObject* obj);
virtual void DoTitle(const char *text);
virtual void DoAddMarker(Bool_t on);
virtual void DoAddBar(Bool_t);
virtual void DoAddB(Bool_t);
virtual void DoAddSimple(Bool_t on);
virtual void DoHistSimple();
virtual void DoHistComplex();
virtual void DoHistChanges();
virtual void DoHistView();
virtual void DoBarOffset();
virtual void DoBarWidth();
virtual void DoPercent();
virtual void DoHBar(Bool_t on);
virtual void DoSliderMoved();
virtual void DoSliderPressed();
virtual void DoSliderReleased();
virtual void DoAxisRange();
virtual void DoBinMoved(Int_t number);
virtual void DoBinReleased();
virtual void DoBinPressed();
virtual void DoBinLabel();
virtual void DoBinReleased1();
virtual void DoBinMoved1();
virtual void DoBinLabel1();
virtual void DoOffsetMoved(Int_t num);
virtual void DoOffsetReleased();
virtual void DoOffsetPressed();
virtual void DoBinOffset();
virtual void DoApply();
virtual void DoCancel();
virtual void PaintBox3D(Float_t *p1, Float_t *p2,Float_t *p3, Float_t *p4);
Int_t* Dividers(Int_t n);
virtual void RecursiveRemove(TObject* obj);
ClassDef(TH1Editor,0)
};
#endif