Warning, file /include/root/TH1Editor.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TH1Editor
0013 #define ROOT_TH1Editor
0014
0015
0016 #include "TGedFrame.h"
0017
0018
0019 class TH1;
0020 class TGComboBox;
0021 class TGNumberEntry;
0022 class TGCheckButton;
0023 class TGButtonGroup;
0024 class TGHButtonGroup;
0025 class TString;
0026 class TGRadioButton;
0027 class TGDoubleHSlider;
0028 class TGHSlider;
0029 class TGTextEntry;
0030 class TGNumberEntryField;
0031 class TGTextButton;
0032
0033 class TH1Editor : public TGedFrame {
0034
0035 protected:
0036 TH1 *fHist;
0037 Bool_t fSameOpt;
0038 TGCompositeFrame *fBin;
0039 Int_t fTitlePrec;
0040 TGTextEntry *fTitle;
0041 TGHButtonGroup *fDimGroup;
0042 TGRadioButton *fDim;
0043 TGRadioButton *fDim0;
0044 TGLayoutHints *fDimlh;
0045 TGLayoutHints *fDim0lh;
0046 TGComboBox *fTypeCombo;
0047 TGComboBox *fCoordsCombo;
0048 TGComboBox *fErrorCombo;
0049 TGCheckButton *fHistOnOff;
0050 TGCheckButton *fAddMarker;
0051 TGCheckButton *fAddB;
0052 TGCheckButton *fAddBar;
0053 TGCheckButton *fAdd;
0054 TGCheckButton *fMakeHBar;
0055 TGCheckButton *fAddSimple;
0056 TGNumberEntry *fBarWidth;
0057 TGNumberEntry *fBarOffset;
0058 TGComboBox *fAddCombo;
0059 TGComboBox *fPercentCombo;
0060 TGCompositeFrame *f3;
0061 TGCompositeFrame *f6;
0062 TGCompositeFrame *f7;
0063 TGCompositeFrame *f8;
0064 TGCompositeFrame *f9;
0065 TGCompositeFrame *f10;
0066 TGCompositeFrame *f11;
0067 TGCompositeFrame *f12;
0068 TGCompositeFrame *f15;
0069 TGCompositeFrame *fBinCont;
0070 TGCompositeFrame *fBinCont1;
0071 TGHSlider *fBinSlider;
0072 TGHSlider *fBinSlider1;
0073 TGNumberEntryField *fBinNumberEntry;
0074 TGNumberEntryField *fBinNumberEntry1;
0075 TGHSlider *fBinOffsetSld;
0076 TGNumberEntryField *fOffsetNumberEntry;
0077 TGDoubleHSlider *fSlider;
0078 TGNumberEntryField *fSldMin;
0079 TGNumberEntryField *fSldMax;
0080 TGCheckButton *fDelaydraw;
0081 TGTextButton *fApply;
0082 TGTextButton *fCancel;
0083
0084 static TGComboBox *BuildHistTypeComboBox(TGFrame *parent, Int_t id);
0085 static TGComboBox *BuildHistCoordsComboBox(TGFrame *parent, Int_t id);
0086 static TGComboBox *BuildHistErrorComboBox(TGFrame *parent, Int_t id);
0087 static TGComboBox *BuildHistAddComboBox(TGFrame *parent, Int_t id);
0088 static TGComboBox *BuildPercentComboBox(TGFrame *parent, Int_t id);
0089
0090 virtual void ConnectSignals2Slots();
0091 void CreateBinTab();
0092
0093
0094 private:
0095 Bool_t fMake;
0096 Bool_t fMakeB;
0097 Int_t fPx1old,
0098 fPy1old,
0099 fPx2old,
0100 fPy2old;
0101 Float_t fP1NDCold[3],
0102 fP2NDCold[3],
0103 fP3NDCold[3],
0104 fP4NDCold[3];
0105 Float_t fP1old[3],
0106 fP2old[3],
0107 fP3old[3],
0108 fP4old[3],
0109 fP5old[3],
0110 fP6old[3],
0111 fP7old[3],
0112 fP8old[3];
0113 TH1 *fBinHist;
0114 Double_t fOldOffset;
0115
0116 TString GetHistTypeLabel();
0117 TString GetHistCoordsLabel();
0118 TString GetHistErrorLabel();
0119 TString GetHistAddLabel();
0120 void ChangeErrorCombo(Int_t i);
0121
0122
0123 public:
0124 TH1Editor(const TGWindow *p = nullptr,
0125 Int_t width = 140, Int_t height = 30,
0126 UInt_t options = kChildFrame,
0127 Pixel_t back = GetDefaultFrameBackground());
0128 ~TH1Editor() override;
0129
0130 Bool_t AcceptModel(TObject* model) override;
0131 void SetModel(TObject* obj) override;
0132
0133 virtual void DoTitle(const char *text);
0134 virtual void DoAddMarker(Bool_t on);
0135 virtual void DoAddBar(Bool_t);
0136 virtual void DoAddB(Bool_t);
0137 virtual void DoAddSimple(Bool_t on);
0138 virtual void DoHistSimple();
0139 virtual void DoHistComplex();
0140 virtual void DoHistChanges();
0141 virtual void DoHistView();
0142 virtual void DoBarOffset();
0143 virtual void DoBarWidth();
0144 virtual void DoPercent();
0145 virtual void DoHBar(Bool_t on);
0146 virtual void DoSliderMoved();
0147 virtual void DoSliderPressed();
0148 virtual void DoSliderReleased();
0149 virtual void DoAxisRange();
0150 virtual void DoBinMoved(Int_t number);
0151 virtual void DoBinReleased();
0152 virtual void DoBinPressed();
0153 virtual void DoBinLabel();
0154 virtual void DoBinReleased1();
0155 virtual void DoBinMoved1();
0156 virtual void DoBinLabel1();
0157 virtual void DoOffsetMoved(Int_t num);
0158 virtual void DoOffsetReleased();
0159 virtual void DoOffsetPressed();
0160 virtual void DoBinOffset();
0161 virtual void DoApply();
0162 virtual void DoCancel();
0163 virtual void PaintBox3D(Float_t *p1, Float_t *p2,Float_t *p3, Float_t *p4);
0164 Int_t* Dividers(Int_t n);
0165 void RecursiveRemove(TObject* obj) override;
0166
0167
0168 ClassDefOverride(TH1Editor,0)
0169 };
0170
0171 #endif