#ifndef ROOT_TH2Editor
#define ROOT_TH2Editor
#ifndef ROOT_TGedFrame
#include "TGedFrame.h"
#endif
class TH2;
class TGComboBox;
class TGLabel;
class TGTextEntry;
class TGCheckButton;
class TString;
class TGDoubleHSlider;
class TGHSlider;
class TGNumberEntry;
class TGHButtonGroup;
class TGRadioButton;
class TGNumberEntryField;
class TGColorSelect;
class TGedPatternSelect;
class TGTextButton;
class TH2Editor : public TGedFrame {
protected:
TH2 *fHist;
TGCompositeFrame *fBin;
TGCompositeFrame *fFit;
TGTextEntry *fTitle;
TGComboBox *fTypeCombo;
TGComboBox *fCoordsCombo;
TGComboBox *fContCombo;
TGLabel *fColContLbl;
TGLabel *fColContLbl1;
Int_t fTitlePrec;
TGHButtonGroup *fDimGroup;
TGRadioButton *fDim;
TGRadioButton *fDim0;
TGLayoutHints *fDimlh;
TGLayoutHints *fDim0lh;
TGCompositeFrame *f6;
TGCompositeFrame *f9;
TGCompositeFrame *f12;
TGCompositeFrame *f13;
TGCompositeFrame *f38;
TGCheckButton *fAddError;
TGCheckButton *fAddPalette;
TGCheckButton *fAddPalette1;
TGCheckButton *fAddArr;
TGCheckButton *fAddBox;
TGCheckButton *fAddScat;
TGCheckButton *fAddCol;
TGCheckButton *fAddFB;
TGCheckButton *fAddBB;
TGCheckButton *fAddText;
TGNumberEntry *fContLevels;
TGNumberEntry *fContLevels1;
TGNumberEntry *fBarWidth;
TGNumberEntry *fBarOffset;
TGCompositeFrame *fBinXCont;
TGHSlider *fBinXSlider;
TGNumberEntryField *fBinXNumberEntry;
TGHSlider *fBinYSlider;
TGNumberEntryField *fBinYNumberEntry;
TGTextButton *fApply;
TGTextButton *fCancel;
TGCompositeFrame *fBinXCont1;
TGHSlider *fBinXSlider1;
TGNumberEntryField *fBinXNumberEntry1;
TGNumberEntryField *fXOffsetNumberEntry;
TGHSlider *fXBinOffsetSld;
TGCompositeFrame *fBinYCont1;
TGHSlider *fBinYSlider1;
TGNumberEntryField *fBinYNumberEntry1;
TGNumberEntryField *fYOffsetNumberEntry;
TGHSlider *fYBinOffsetSld;
TGDoubleHSlider *fSliderX;
TGNumberEntryField *fSldXMin;
TGNumberEntryField *fSldXMax;
TGDoubleHSlider *fSliderY;
TGNumberEntryField *fSldYMin;
TGNumberEntryField *fSldYMax;
TGCheckButton *fDelaydraw;
TGColorSelect *fFrameColor;
TGedPatternSelect *fFramePattern;
TString fCutString;
static TGComboBox *BuildHistTypeComboBox(TGFrame *parent, Int_t id);
static TGComboBox *BuildHistCoordsComboBox(TGFrame *parent, Int_t id);
static TGComboBox *BuildHistContComboBox(TGFrame* parent, Int_t id);
virtual void ConnectSignals2Slots();
void CreateBinTab();
private:
void PaintBox3D(Float_t *p1, Float_t *p2,Float_t *p3, Float_t *p4);
TString GetHistTypeLabel();
TString GetHistCoordsLabel();
TString GetHistContLabel();
TString GetHistAdditiveLabel();
TString GetCutOptionString();
Int_t fPx1old,
fPy1old,
fPx2old,
fPy2old;
Float_t fP1oldx[3],
fP2oldx[3],
fP3oldx[3],
fP4oldx[3],
fP5oldx[3],
fP6oldx[3],
fP7oldx[3],
fP8oldx[3];
Float_t fP1oldy[3],
fP2oldy[3],
fP3oldy[3],
fP4oldy[3],
fP5oldy[3],
fP6oldy[3],
fP7oldy[3],
fP8oldy[3];
TH2 *fBinHist;
Double_t fOldXOffset;
Double_t fOldYOffset;
public:
TH2Editor(const TGWindow *p = 0,
Int_t width = 140, Int_t height = 30,
UInt_t options = kChildFrame,
Pixel_t back = GetDefaultFrameBackground());
virtual ~TH2Editor();
virtual Bool_t AcceptModel(TObject* model);
virtual void SetModel(TObject* obj);
virtual void ActivateBaseClassEditors(TClass* cl);
virtual void DoTitle(const char *text);
virtual void DoHistView();
virtual void DoHistSimple();
virtual void DoHistComplex();
virtual void DoHistChanges();
virtual void DoAddArr(Bool_t on);
virtual void DoAddBox(Bool_t on);
virtual void DoAddCol(Bool_t on);
virtual void DoAddScat(Bool_t on);
virtual void DoAddText(Bool_t on);
virtual void DoAddError(Bool_t on);
virtual void DoAddPalette(Bool_t on);
virtual void DoAddFB();
virtual void DoAddBB();
virtual void DoContLevel();
virtual void DoContLevel1();
virtual void DoBarWidth();
virtual void DoBarOffset();
virtual void DoBinPressed();
virtual void DoBinMoved();
virtual void DoBinReleased();
virtual void DoBinLabel();
virtual void DoApply();
virtual void DoCancel();
virtual void DoBinReleased1();
virtual void DoBinMoved1();
virtual void DoBinLabel1();
virtual void DoOffsetMoved();
virtual void DoOffsetReleased();
virtual void DoOffsetPressed();
virtual void DoBinOffset();
virtual void DoSliderXMoved();
virtual void DoSliderXPressed();
virtual void DoSliderXReleased();
virtual void DoXAxisRange();
virtual void DoSliderYMoved();
virtual void DoSliderYPressed();
virtual void DoSliderYReleased();
virtual void DoYAxisRange();
virtual void DoFillColor(Pixel_t);
virtual void DoFillPattern(Style_t);
Int_t* Dividers(Int_t n);
ClassDef(TH2Editor,0)
};
#endif