Warning, file /include/root/TAxis3D.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_TAxis3D
0013 #define ROOT_TAxis3D
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TAxis.h"
0025
0026 class TF1;
0027 class TBrowser;
0028 class TGaxis;
0029 class TVirtualPad;
0030 class TView;
0031 class TAxis3D : public TNamed {
0032
0033 private:
0034 Int_t AxisChoice(Option_t *axis) const;
0035 void Build();
0036
0037 protected:
0038 TAxis fAxis[3];
0039 TString fOption;
0040 static const char *fgRulerName;
0041 TAxis *fSelected;
0042 Bool_t fZoomMode;
0043 Bool_t fStickyZoom;
0044
0045 void Copy(TObject &hnew) const override;
0046 void InitSet();
0047 Bool_t SwitchZoom();
0048
0049 public:
0050 TAxis3D();
0051 TAxis3D(Option_t *option);
0052 TAxis3D(const TAxis3D &axis);
0053 ~TAxis3D() override{}
0054
0055 void Browse(TBrowser *b) override;
0056
0057 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0058 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0059
0060 Bool_t & StickyZoom(){return fStickyZoom;}
0061 Bool_t & Zoom(){return fZoomMode;}
0062
0063 virtual Int_t GetNdivisions(Option_t *axis="X") const;
0064 virtual Color_t GetAxisColor(Option_t *axis="X") const;
0065 virtual Color_t GetLabelColor(Option_t *axis="X") const;
0066 virtual Style_t GetLabelFont(Option_t *axis="X") const;
0067 virtual Float_t GetLabelOffset(Option_t *axis="X") const;
0068 virtual Float_t GetLabelSize(Option_t *axis="X") const;
0069 static TAxis3D *GetPadAxis(TVirtualPad *pad=nullptr);
0070 virtual Float_t GetTitleOffset(Option_t *axis="X") const;
0071 virtual Float_t GetTickLength(Option_t *axis="X") const;
0072
0073 virtual void GetCenter(Axis_t *center) {fAxis[0].GetCenter(center);}
0074
0075 virtual void GetLowEdge(Axis_t *edge) {fAxis[0].GetLowEdge(edge);}
0076
0077 char *GetObjectInfo(Int_t px, Int_t py) const override;
0078
0079 Option_t *GetOption() const override {return fOption.Data();}
0080
0081 virtual TAxis *GetXaxis() {return &fAxis[0];}
0082 virtual TAxis *GetYaxis() {return &fAxis[1];}
0083 virtual TAxis *GetZaxis() {return &fAxis[2];}
0084 Bool_t IsFolder() const override { return kTRUE;}
0085 void Paint(Option_t *option="") override;
0086 void PaintAxis(TGaxis *axis, Float_t ang);
0087 static Double_t *PixeltoXYZ(Double_t px, Double_t py, Double_t *point3D, TView *view = nullptr);
0088 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0089
0090 virtual void SetAxisColor(Color_t color=1, Option_t *axis="*");
0091 virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="*");
0092
0093 virtual void SetLabelColor(Color_t color=1, Option_t *axis="*");
0094 virtual void SetLabelFont(Style_t font=62, Option_t *axis="*");
0095 virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="*");
0096 virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="*");
0097
0098 virtual void SetNdivisions(Int_t n=510, Option_t *axis="*");
0099 virtual void SetOption(Option_t *option=" ") {fOption = option;}
0100 virtual void SetTickLength(Float_t length=0.02, Option_t *axis="*");
0101 virtual void SetTitleOffset(Float_t offset=1, Option_t *axis="*");
0102 virtual void SetXTitle(const char *title) {fAxis[0].SetTitle(title);}
0103 virtual void SetYTitle(const char *title) {fAxis[1].SetTitle(title);}
0104 virtual void SetZTitle(const char *title) {fAxis[2].SetTitle(title);}
0105 static TAxis3D *ToggleRulers(TVirtualPad *pad = nullptr);
0106 static TAxis3D *ToggleZoom(TVirtualPad *pad = nullptr);
0107 void UseCurrentStyle() override;
0108
0109 ClassDefOverride(TAxis3D,1)
0110 };
0111
0112
0113 inline Bool_t TAxis3D::SwitchZoom(){Bool_t s = fZoomMode; fZoomMode = !fZoomMode; return s;}
0114
0115 #endif