Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TPad.h
Go to the documentation of this file.
1// @(#)root/gpad:$Id$
2// Author: Rene Brun 12/12/94
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TPad
13#define ROOT_TPad
14
15#include "TVirtualPad.h"
16#include "TAttBBox2D.h"
17#include <vector>
18#include <string>
19#include <map>
20#include <memory>
21
24class TBrowser;
25class TBox;
26class TLegend;
27class TArrow;
28class TPoint;
29class TWebCanvas;
31
32class TPad : public TVirtualPad, public TAttBBox2D {
33
34friend class TWebCanvas;
35
36private:
37 TObject *fTip{nullptr}; ///<! tool tip associated with box
38 std::unique_ptr<TInteractive> fInteractive; ///<! current interactive object
39 std::map<std::string,std::unique_ptr<TPadDrawOperation>> fDrawOper, fDrawOperXor; ///<! map of draw operations performed outside of normal paint
40
41protected:
42 Double_t fX1; ///< X of lower X coordinate
43 Double_t fY1; ///< Y of lower Y coordinate
44 Double_t fX2; ///< X of upper X coordinate
45 Double_t fY2; ///< Y of upper Y coordinate
46
47 Double_t fXtoAbsPixelk; ///< Conversion coefficient for X World to absolute pixel
48 Double_t fXtoPixelk; ///< Conversion coefficient for X World to pixel
49 Double_t fXtoPixel; ///< xpixel = fXtoPixelk + fXtoPixel*xworld
50 Double_t fYtoAbsPixelk; ///< Conversion coefficient for Y World to absolute pixel
51 Double_t fYtoPixelk; ///< Conversion coefficient for Y World to pixel
52 Double_t fYtoPixel; ///< ypixel = fYtoPixelk + fYtoPixel*yworld
53
54 Double_t fUtoAbsPixelk; ///< Conversion coefficient for U NDC to absolute pixel
55 Double_t fUtoPixelk; ///< Conversion coefficient for U NDC to pixel
56 Double_t fUtoPixel; ///< xpixel = fUtoPixelk + fUtoPixel*undc
57 Double_t fVtoAbsPixelk; ///< Conversion coefficient for V NDC to absolute pixel
58 Double_t fVtoPixelk; ///< Conversion coefficient for V NDC to pixel
59 Double_t fVtoPixel; ///< ypixel = fVtoPixelk + fVtoPixel*vndc
60
61 Double_t fAbsPixeltoXk; ///< Conversion coefficient for absolute pixel to X World
62 Double_t fPixeltoXk; ///< Conversion coefficient for pixel to X World
63 Double_t fPixeltoX; ///< xworld = fPixeltoXk + fPixeltoX*xpixel
64 Double_t fAbsPixeltoYk; ///< Conversion coefficient for absolute pixel to Y World
65 Double_t fPixeltoYk; ///< Conversion coefficient for pixel to Y World
66 Double_t fPixeltoY; ///< yworld = fPixeltoYk + fPixeltoY*ypixel
67
68 Double_t fXlowNDC; ///< X bottom left corner of pad in NDC [0,1]
69 Double_t fYlowNDC; ///< Y bottom left corner of pad in NDC [0,1]
72 Double_t fWNDC; ///< Width of pad along X in Normalized Coordinates (NDC)
73 Double_t fHNDC; ///< Height of pad along Y in Normalized Coordinates (NDC)
74
75 Double_t fAbsXlowNDC; ///< Absolute X top left corner of pad in NDC [0,1]
76 Double_t fAbsYlowNDC; ///< Absolute Y top left corner of pad in NDC [0,1]
77 Double_t fAbsWNDC; ///< Absolute Width of pad along X in NDC
78 Double_t fAbsHNDC; ///< Absolute Height of pad along Y in NDC
79
80 Double_t fUxmin; ///< Minimum value on the X axis
81 Double_t fUymin; ///< Minimum value on the Y axis
82 Double_t fUxmax; ///< Maximum value on the X axis
83 Double_t fUymax; ///< Maximum value on the Y axis
84
85 Double_t fTheta; ///< theta angle to view as lego/surface
86 Double_t fPhi; ///< phi angle to view as lego/surface
87
88 Double_t fAspectRatio; ///< ratio of w/h in case of fixed ratio
89
90 Int_t fPixmapID; ///<! Off-screen pixmap identifier
91 Int_t fGLDevice; ///<! OpenGL off-screen pixmap identifier
94 Int_t fNumber; ///< pad number identifier
95 Int_t fTickx; ///< Set to 1 if tick marks along X
96 Int_t fTicky; ///< Set to 1 if tick marks along Y
97 Int_t fLogx; ///< (=0 if X linear scale, =1 if log scale)
98 Int_t fLogy; ///< (=0 if Y linear scale, =1 if log scale)
99 Int_t fLogz; ///< (=0 if Z linear scale, =1 if log scale)
100 Int_t fPadPaint; ///< Set to 1 while painting the pad
101 Int_t fCrosshair; ///< Crosshair type (0 if no crosshair requested)
102 Int_t fCrosshairPos; ///< Position of crosshair
103 Short_t fBorderSize; ///< pad bordersize in pixels
104 Short_t fBorderMode; ///< Bordermode (-1=down, 0 = no border, 1=up)
105 Bool_t fModified; ///< Set to true when pad is modified
106 Bool_t fGridx; ///< Set to true if grid along X
107 Bool_t fGridy; ///< Set to true if grid along Y
108 Bool_t fAbsCoord; ///< Use absolute coordinates
109 Bool_t fEditable; ///< True if canvas is editable
110 Bool_t fFixedAspectRatio; ///< True if fixed aspect ratio
111 TPad *fMother{nullptr}; ///<! pointer to mother of the list
112 TCanvas *fCanvas{nullptr}; ///<! Pointer to mother canvas
113 TList *fPrimitives{nullptr};///<->List of primitives (subpads)
114 TList *fExecs{nullptr}; ///< List of commands to be executed when a pad event occurs
115 TString fName; ///< Pad name
116 TString fTitle; ///< Pad title
117 TFrame *fFrame{nullptr}; ///<! Pointer to 2-D frame (if one exists)
118 TView *fView{nullptr}; ///<! Pointer to 3-D view (if one exists)
119 TObject *fPadPointer{nullptr};///<! free pointer
120 TObject *fPadView3D{nullptr};///<! 3D View of this TPad
121 static Int_t fgMaxPickDistance; ///< Maximum Pick Distance
122 Int_t fNumPaletteColor; ///< Number of objects with an automatic color
123 Int_t fNextPaletteColor; ///< Next automatic color
124 std::vector<Bool_t> fCollideGrid;///<! Grid used to find empty space when adding a box (Legend) in a pad
125 Int_t fCGnx; ///<! Size of the collide grid along x
126 Int_t fCGny; ///<! Size of the collide grid along y
127
128 // 3D Viewer support
129 TVirtualViewer3D *fViewer3D{nullptr};///<! Current 3D viewer
130
132 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
133 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
134 virtual void HideToolTip(Int_t event);
135 void PaintBorder(Color_t color, Bool_t tops);
136 void PaintBorderPS(Double_t xl,Double_t yl,Double_t xt,Double_t yt,Int_t bmode,Int_t bsize,Int_t dark,Int_t light) override;
137 void PaintDate();
138 void PaintOperations(Bool_t withXor = kFALSE);
139 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
140 void SetBatch(Bool_t batch=kTRUE) override;
141
142 TInteractive *Interactive(TObject *obj = nullptr, TInteractive *init = nullptr) override;
143
144private:
145 TPad(const TPad &pad) = delete;
146 TPad &operator=(const TPad &rhs) = delete;
147
148 void CopyBackgroundPixmaps(TPad *stop, Int_t x, Int_t y);
149 void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode);
150
152 void FillCollideGrid(TObject *o);
158
159public:
160 // TPad status bits
161 enum {
162 kFraming = BIT(6), ///< Frame is requested
163 kHori = BIT(9), ///< Pad is horizontal
164 kClipFrame = BIT(10), ///< Clip on frame
165 kPrintingPS = BIT(11), ///< PS Printing
166 kCannotMove = BIT(12), ///< Fixed position
167 kClearAfterCR = BIT(14) ///< Clear after CR
168 };
169
170 TPad();
171 TPad(const char *name, const char *title, Double_t xlow,
172 Double_t ylow, Double_t xup, Double_t yup,
173 Color_t color=-1, Short_t bordersize=-1, Short_t bordermode=-2);
174 ~TPad() override;
175 void AbsCoordinates(Bool_t set) override { fAbsCoord = set; }
178 void AbsPixeltoXY(Double_t xpixel, Double_t ypixel, Double_t &x, Double_t &y) override;
179 void Add(TObject *obj, Option_t *opt = "", Bool_t modified = kTRUE) override;
180 void AddFirst(TObject *obj, Option_t *opt = "", Bool_t modified = kTRUE) override;
181 void AddExec(const char *name, const char *command) override;
182 virtual void AutoExec();
183 void Browse(TBrowser *b) override;
184 TLegend *BuildLegend(Double_t x1=0.3, Double_t y1=0.21, Double_t x2=0.3, Double_t y2=0.21, const char *title="", Option_t *option = "") override; // *MENU*
185 TVirtualPad *cd(Int_t subpadnumber=0) override; // *MENU*
186 void Clear(Option_t *option="") override;
187 virtual Int_t Clip(Float_t *x, Float_t *y, Float_t xclipl, Float_t yclipb, Float_t xclipr, Float_t yclipt);
188 Int_t Clip(Double_t *x, Double_t *y, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt) override;
189 virtual Int_t ClippingCode(Double_t x, Double_t y, Double_t xcl1, Double_t ycl1, Double_t xcl2, Double_t ycl2);
190 virtual Int_t ClipPolygon(Int_t n, Double_t *x, Double_t *y, Int_t nn, Double_t *xc, Double_t *yc, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt);
191 void Close(Option_t *option="") override;
192 virtual void Closed() { Emit("Closed()"); } // *SIGNAL*
193 void CopyPixmap() override;
194 void CopyPixmaps() override;
195 void DeleteExec(const char *name) override;
196 void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override; // *MENU*
197 void DivideRatios(Int_t nrows, Int_t ncolumns, const std::vector<double>& widthRatios={}, const std::vector<double>& heightRatios={}, const double canvasTopMargin=0., const double canvasLeftMargin=0.);
198 virtual void DivideSquare(Int_t n, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0);
199 void Draw(Option_t *option="") override;
200 void DrawClassObject(const TObject *obj, Option_t *option="") override;
201 static void DrawColorTable();
202 virtual void DrawCrosshair();
203 TH1F *DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="") override;
204 void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxis *axis) override;
205 void FeedbackMode(Bool_t set) override;
206 TObject *FindObject(const char *name) const override;
207 TObject *FindObject(const TObject *obj) const override;
208 void UseCurrentStyle() override; // *MENU*
209 Short_t GetBorderMode() const override { return fBorderMode;}
210 Short_t GetBorderSize() const override { return fBorderSize;}
211 Int_t GetCrosshair() const;
212 Int_t GetCanvasID() const override;
213 TCanvasImp *GetCanvasImp() const override;
214 Int_t GetDoubleBuffer() const override;
215 TFrame *GetFrame() override;
216 Int_t GetEvent() const override;
217 Int_t GetEventX() const override;
218 Int_t GetEventY() const override;
219 Color_t GetHighLightColor() const override;
220 void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override;
222 void GetPadPar(Double_t &xlow, Double_t &ylow, Double_t &xup, Double_t &yup) override;
223 Double_t GetXlowNDC() const override { return fXlowNDC; }
224 Double_t GetYlowNDC() const override { return fYlowNDC; }
225 /// Get width of pad along X in Normalized Coordinates (NDC)
226 Double_t GetWNDC() const override { return fWNDC; }
227 /// Get height of pad along Y in Normalized Coordinates (NDC)
228 Double_t GetHNDC() const override { return fHNDC; }
229 UInt_t GetWw() const override;
230 UInt_t GetWh() const override;
231 UInt_t GetPadWidth() const override;
232 UInt_t GetPadHeight() const override;
233 Double_t GetAbsXlowNDC() const override { return fAbsXlowNDC; }
234 Double_t GetAbsYlowNDC() const override { return fAbsYlowNDC; }
235 Double_t GetAbsWNDC() const override { return fAbsWNDC; }
236 Double_t GetAbsHNDC() const override { return fAbsHNDC; }
237 Double_t GetAspectRatio() const override { return fAspectRatio; }
238 Double_t GetPhi() const override { return fPhi; }
239 Double_t GetTheta() const override { return fTheta; }
240 ///Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decades.
241 Double_t GetUxmin() const override { return fUxmin; }
242 ///Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decades.
243 Double_t GetUymin() const override { return fUymin; }
244 ///Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decades.
245 Double_t GetUxmax() const override { return fUxmax; }
246 ///Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decades.
247 Double_t GetUymax() const override { return fUymax; }
248 Bool_t GetGridx() const override { return fGridx; }
249 Bool_t GetGridy() const override { return fGridy; }
250 Int_t GetNumber() const override { return fNumber; }
251 Int_t GetTickx() const override { return fTickx; }
252 Int_t GetTicky() const override { return fTicky; }
253 Double_t GetX1() const override { return fX1; }
254 Double_t GetX2() const override { return fX2; }
255 Double_t GetY1() const override { return fY1; }
256 Double_t GetY2() const override { return fY2; }
257 static Int_t GetMaxPickDistance();
258 TList *GetListOfPrimitives() const override { return fPrimitives; }
259 TList *GetListOfExecs() const override { return fExecs; }
260 TObject *GetPrimitive(const char *name) const override; //obsolete, use FindObject instead
261 TObject *GetSelected() const override;
262 TVirtualPad *GetPad(Int_t subpadnumber) const override;
263 TObject *GetPadPointer() const override { return fPadPointer; }
264 TVirtualPad *GetPadSave() const override;
265 TVirtualPad *GetSelectedPad() const override;
266 Int_t GetGLDevice() override;
267 TView *GetView() const override { return fView; }
268 TObject *GetView3D() const override { return fPadView3D; }// Return 3D View of this TPad
269 Int_t GetLogx() const override { return fLogx; }
270 Int_t GetLogy() const override { return fLogy; }
271 Int_t GetLogz() const override { return fLogz; }
272 TVirtualPad *GetMother() const override { return fMother; }
273 const char *GetName() const override { return fName.Data(); }
274 const char *GetTitle() const override { return fTitle.Data(); }
275 TCanvas *GetCanvas() const override { return fCanvas; }
276 TVirtualPad *GetVirtCanvas() const override;
277 TVirtualPadPainter *GetPainter() override;
278 Int_t GetPadPaint() const override { return fPadPaint; }
279 Int_t GetPixmapID() const override { return fPixmapID; }
280 ULong_t Hash() const override { return fName.Hash(); }
281 Bool_t HasCrosshair() const override;
282 void HighLight(Color_t col=kRed, Bool_t set=kTRUE) override;
283 Bool_t HasFixedAspectRatio() const override { return fFixedAspectRatio; }
284 Bool_t IsBatch() const override;
285 Bool_t IsEditable() const override { return fEditable; }
286 Bool_t IsFolder() const override { return kTRUE; }
287 Bool_t IsModified() const override { return fModified; }
288 Int_t IsAnyNeedRepaint() const;
289 Bool_t IsRetained() const override;
290 Bool_t IsVertical() const override { return !TestBit(kHori); }
291 Bool_t IsWeb() const override;
292 void ls(Option_t *option="") const override;
293 void Modified(Bool_t flag=true) override; // *SIGNAL*
294 void ModifiedUpdate() override;
295 Bool_t OpaqueMoving() const override;
296 Bool_t OpaqueResizing() const override;
297 Double_t PadtoX(Double_t x) const override;
298 Double_t PadtoY(Double_t y) const override;
299 void Paint(Option_t *option="") override;
301 void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override; // Obsolete
302 void PaintFillArea(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
303 void PaintFillAreaNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
304 void PaintFillAreaHatches(Int_t n, Double_t *x, Double_t *y, Int_t FillStyle);
305 void PaintHatches(Double_t dy, Double_t angle, Int_t nn, Double_t *xx, Double_t *yy);
308 void PaintLineNDC(Double_t u1, Double_t v1,Double_t u2, Double_t v2) override;
309 void PaintLine3D(Float_t *p1, Float_t *p2) override;
310 void PaintLine3D(Double_t *p1, Double_t *p2) override;
311 void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override;
312 void PaintPolyLine(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
313 void PaintPolyLine3D(Int_t n, Double_t *p) override;
314 void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
315 void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override;
316 void PaintPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
317 void PaintSegments(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
318 void PaintSegmentsNDC(Int_t n, Double_t *u, Double_t *v) override;
319 void PaintMarker3D(Double_t x, Double_t y, Double_t z) override;
320 void PaintModified() override;
321 void PaintText(Double_t x, Double_t y, const char *text) override;
322 void PaintText(Double_t x, Double_t y, const wchar_t *text) override;
323 void PaintTextNDC(Double_t u, Double_t v, const char *text) override;
324 void PaintTextNDC(Double_t u, Double_t v, const wchar_t *text) override;
325 void PaintTextUrl(Double_t x, Double_t y, const char *text, const char *url) override;
326 virtual TPad *Pick(Int_t px, Int_t py, TObjLink *&pickobj);
327 Double_t PixeltoX(Double_t px) override;
328 Double_t PixeltoY(Double_t py) override;
329 void PixeltoXY(Double_t xpixel, Double_t ypixel, Double_t &x, Double_t &y) override;
330 void Pop() override; // *MENU*
331 void Print(const char *filename="") const override;
332 void Print(const char *filename, Option_t *option) override;
333 void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override; // *MENU* *ARGS={x1=>fX1,y1=>fY1,x2=>fX2,y2=>fY2}
334 virtual void RangeChanged() { Emit("RangeChanged()"); } // *SIGNAL*
336 void RecursiveRemove(TObject *obj) override;
337 TObject *Remove(TObject *obj, Bool_t modified = kTRUE) override;
338 void RedrawAxis(Option_t *option="") override;
339 void ResetView3D(TObject *view=nullptr) override { fPadView3D=view; }
340 void ResizePad(Option_t *option="") override;
341 virtual void Resized() { Emit("Resized()"); } // *SIGNAL*
342 void SaveAs(const char *filename="",Option_t *option="") const override; // *MENU*
343 void SetBorderMode(Short_t bordermode) override { fBorderMode = bordermode; Modified(); } // *MENU*
344 void SetBorderSize(Short_t bordersize) override { fBorderSize = bordersize; Modified(); } // *MENU*
345 void SetCanvas(TCanvas *c) override { fCanvas = c; }
346 void SetCanvasSize(UInt_t ww, UInt_t wh) override;
347 void SetCrosshair(Int_t crhair=1) override; // *TOGGLE*
348 void SetCursor(ECursor cursor) override;
349 void SetDoubleBuffer(Int_t mode=1) override;
350 void SetDrawOption(Option_t * = "") override {}
351 void SetEditable(Bool_t mode=kTRUE) override; // *TOGGLE*
352 void SetFixedAspectRatio(Bool_t fixed = kTRUE) override; // *TOGGLE*
353 void SetGrid(Int_t valuex = 1, Int_t valuey = 1) override { fGridx = valuex; fGridy = valuey; Modified(); }
354 void SetGridx(Int_t value = 1) override { fGridx = value; Modified(); } // *TOGGLE*
355 void SetGridy(Int_t value = 1) override { fGridy = value; Modified(); } // *TOGGLE*
356 void SetFillStyle(Style_t fstyle) override;
357 void SetLogx(Int_t value = 1) override; // *TOGGLE*
358 void SetLogy(Int_t value = 1) override; // *TOGGLE*
359 void SetLogz(Int_t value = 1) override; // *TOGGLE*
360 virtual void SetNumber(Int_t number) { fNumber = number; }
361 void SetPad(const char *name, const char *title,
362 Double_t xlow, Double_t ylow, Double_t xup,
363 Double_t yup, Color_t color=35,
364 Short_t bordersize=5, Short_t bordermode=-1) override;
365 void SetPad(Double_t xlow, Double_t ylow, Double_t xup, Double_t yup) override;
366 void SetAttFillPS(Color_t color, Style_t style) override;
367 void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth) override;
368 void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize) override;
369 void SetAttTextPS(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize) override;
370 static void SetMaxPickDistance(Int_t maxPick=5);
371 void SetName(const char *name) override { fName = name; } // *MENU*
372 void SetSelected(TObject *obj) override;
373 void SetTicks(Int_t valuex = 1, Int_t valuey = 1) override { fTickx = valuex; fTicky = valuey; Modified(); }
374 void SetTickx(Int_t value = 1) override { fTickx = value; Modified(); } // *TOGGLE*
375 void SetTicky(Int_t value = 1) override { fTicky = value; Modified(); } // *TOGGLE*
376 void SetTitle(const char *title="") override { fTitle = title; }
377 void SetTheta(Double_t theta=30) override { fTheta = theta; Modified(); }
378 void SetPhi(Double_t phi=30) override { fPhi = phi; Modified(); }
379 void SetToolTipText(const char *text, Long_t delayms = 1000) override;
380 void SetVertical(Bool_t vert=kTRUE) override;
381 void SetView(TView *view = nullptr) override;
382 void SetViewer3D(TVirtualViewer3D *viewer3d) override { fViewer3D = viewer3d; }
383
384 virtual void SetGLDevice(Int_t dev) {fGLDevice = dev;}
385 void SetCopyGLDevice(Bool_t copy) override { fCopyGLDevice = copy; }
386
387 void ShowGuidelines(TObject *object, const Int_t event, const char mode = 'i', const bool cling = true) override;
388 void Update() override;
389 void UpdateAsync() override;
390
391 Int_t UtoAbsPixel(Double_t u) const override;
392 Int_t VtoAbsPixel(Double_t v) const override;
393 Int_t UtoPixel(Double_t u) const override;
394 Int_t VtoPixel(Double_t v) const override;
395 TObject *WaitPrimitive(const char *pname="", const char *emode="") override;
396 Int_t XtoAbsPixel(Double_t x) const override;
397 Int_t YtoAbsPixel(Double_t y) const override;
398 Int_t HtoAbsPixel(Double_t y1, Double_t y2) const override;
399 Int_t WtoAbsPixel(Double_t x1, Double_t x2) const override;
400 Double_t XtoPad(Double_t x) const override;
401 Double_t YtoPad(Double_t y) const override;
402 Int_t XtoPixel(Double_t x) const override;
403 Int_t YtoPixel(Double_t y) const override;
404 void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const override;
405 void XYtoAbsPixel(Double_t x, Double_t y, Double_t &xpixel, Double_t &ypixel) const override;
406 void XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const override;
407 void XYtoPixel(Double_t x, Double_t y, Double_t &xpixel, Double_t &ypixel) const override;
408
409 TObject *CreateToolTip(const TBox *b, const char *text, Long_t delayms) override;
410 void DeleteToolTip(TObject *tip) override;
411 void ResetToolTip(TObject *tip) override;
412 void CloseToolTip(TObject *tip) override;
413
414 Int_t IncrementPaletteColor(Int_t i, const TString &opt) override;
415 Int_t NextPaletteColor() override;
416
417 void DrawCollideGrid();
418 Bool_t PlaceBox(TObject *o, Double_t w, Double_t h, Double_t &xl, Double_t &yb, Option_t* option = "lb") override;
419
420 virtual void x3d(Option_t *type=""); // Depreciated
421
422 TVirtualViewer3D *GetViewer3D(Option_t * type = "") override;
423 Bool_t HasViewer3D() const override { return fViewer3D != nullptr; }
424 void ReleaseViewer3D(Option_t * type = "") override;
425
426 Rectangle_t GetBBox() override;
427 TPoint GetBBoxCenter() override;
428 void SetBBoxCenter(const TPoint &p) override;
429 void SetBBoxCenterX(const Int_t x) override;
430 void SetBBoxCenterY(const Int_t y) override;
431 void SetBBoxX1(const Int_t x) override;
432 void SetBBoxX2(const Int_t x) override;
433 void SetBBoxY1(const Int_t y) override;
434 void SetBBoxY2(const Int_t y) override;
435
436 virtual void RecordPave(const TObject *obj); // *SIGNAL*
437 virtual void RecordLatex(const TObject *obj); // *SIGNAL*
438 virtual void EventPave() { Emit("EventPave()"); } // *SIGNAL*
439 virtual void StartEditing() { Emit("StartEditing()"); } // *SIGNAL*
440
441 ClassDefOverride(TPad,13) //A Graphics pad
442};
443
444#endif
445
ECursor
Definition GuiTypes.h:373
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
cudaEvent_t event
short Style_t
Style number (short)
Definition RtypesCore.h:97
bool Bool_t
Boolean (0=false, 1=true) (bool)
Definition RtypesCore.h:78
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:60
short Color_t
Color number (short)
Definition RtypesCore.h:100
float Size_t
Attribute size (float)
Definition RtypesCore.h:104
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
Definition RtypesCore.h:70
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
Definition RtypesCore.h:69
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:61
short Width_t
Line width (short)
Definition RtypesCore.h:99
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:72
short Short_t
Signed Short integer 2 bytes (short)
Definition RtypesCore.h:54
constexpr Bool_t kFALSE
Definition RtypesCore.h:109
double Double_t
Double 8 bytes.
Definition RtypesCore.h:74
constexpr Bool_t kTRUE
Definition RtypesCore.h:108
const char Option_t
Option string (const char)
Definition RtypesCore.h:81
#define BIT(n)
Definition Rtypes.h:90
@ kRed
Definition Rtypes.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:347
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t cursor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetDoubleBuffer
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t SetFillStyle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetCursor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t style
Option_t Option_t TPoint TPoint const char text
Option_t Option_t TPoint TPoint const char y1
char name[80]
Definition TGX11.cxx:142
float xmin
float ymin
float xmax
float ymax
Draw all kinds of Arrows.
Definition TArrow.h:29
Abstract base class for elements drawn in the editor.
Definition TAttBBox2D.h:19
Class to manage histogram axis.
Definition TAxis.h:32
Create a Box.
Definition TBox.h:22
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition TCanvasImp.h:31
The Canvas class.
Definition TCanvas.h:23
Define a Frame.
Definition TFrame.h:19
1-D histogram with a float per channel (see TH1 documentation)
Definition TH1.h:878
This class displays a legend box (TPaveText) containing several legend entries.
Definition TLegend.h:23
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:42
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:204
The most important graphics class in the ROOT system.
Definition TPad.h:32
void SetGridx(Int_t value=1) override
Definition TPad.h:354
Short_t GetBorderMode() const override
Definition TPad.h:209
Bool_t OpaqueMoving() const override
Is pad moving in opaque mode ?
Definition TPad.cxx:2755
void SetBorderSize(Short_t bordersize) override
Definition TPad.h:344
void PaintTextNDC(Double_t u, Double_t v, const char *text) override
Paint text in CurrentPad NDC coordinates.
Definition TPad.cxx:4610
Int_t GetTicky() const override
Definition TPad.h:252
virtual Int_t Clip(Float_t *x, Float_t *y, Float_t xclipl, Float_t yclipb, Float_t xclipr, Float_t yclipt)
Clipping routine: Cohen Sutherland algorithm.
Definition TPad.cxx:834
virtual void HideToolTip(Int_t event)
Hide tool tip depending on the event type.
Definition TPad.cxx:2700
Double_t fAbsYlowNDC
Absolute Y top left corner of pad in NDC [0,1].
Definition TPad.h:76
std::map< std::string, std::unique_ptr< TPadDrawOperation > > fDrawOper
Definition TPad.h:39
Double_t fXtoAbsPixelk
Conversion coefficient for X World to absolute pixel.
Definition TPad.h:47
void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize) override
Set postscript marker attributes.
Definition TPad.cxx:6154
virtual void DivideSquare(Int_t n, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
"n" is the total number of sub-pads.
Definition TPad.cxx:1555
void AbsCoordinates(Bool_t set) override
Definition TPad.h:175
Bool_t IsBatch() const override
Is pad in batch mode ?
Definition TPad.cxx:2732
Double_t GetUymax() const override
Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition TPad.h:247
void AddExec(const char *name, const char *command) override
Add a new TExec object to the list of Execs.
Definition TPad.cxx:564
void SetViewer3D(TVirtualViewer3D *viewer3d) override
Definition TPad.h:382
Double_t fWNDC
Width of pad along X in Normalized Coordinates (NDC)
Definition TPad.h:72
void SetName(const char *name) override
Definition TPad.h:371
Int_t NextPaletteColor() override
Get the next autocolor in the pad.
Definition TPad.cxx:3020
Int_t VtoPixel(Double_t v) const override
Convert Y NDC to pixel.
Definition TPad.cxx:7412
void PaintBorder(Color_t color, Bool_t tops)
Paint the pad border.
Definition TPad.cxx:3564
Double_t GetPhi() const override
Definition TPad.h:238
std::map< std::string, std::unique_ptr< TPadDrawOperation > > fDrawOperXor
! map of draw operations performed outside of normal paint
Definition TPad.h:39
Bool_t IsEditable() const override
Definition TPad.h:285
void FillCollideGrid(TObject *o)
Initialise the grid used to find empty space when adding a box (Legend) in a pad.
Definition TPad.cxx:3036
void SetView(TView *view=nullptr) override
Set the current TView. Delete previous view if view=0.
Definition TPad.cxx:6119
TVirtualViewer3D * GetViewer3D(Option_t *type="") override
Create/obtain handle to 3D viewer.
Definition TPad.cxx:7076
Double_t fPixeltoYk
Conversion coefficient for pixel to Y World.
Definition TPad.h:65
void PaintHatches(Double_t dy, Double_t angle, Int_t nn, Double_t *xx, Double_t *yy)
This routine draw hatches inclined with the angle "angle" and spaced of "dy" in normalized device coo...
Definition TPad.cxx:4051
void PaintLine3D(Float_t *p1, Float_t *p2) override
Paint 3-D line in the CurrentPad.
Definition TPad.cxx:4232
static Int_t fgMaxPickDistance
Maximum Pick Distance.
Definition TPad.h:121
void ResizePad(Option_t *option="") override
Compute pad conversion coefficients.
Definition TPad.cxx:5607
void PaintMarker3D(Double_t x, Double_t y, Double_t z) override
Paint 3-D marker in the CurrentPad.
Definition TPad.cxx:4268
void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
Paint polymarker in CurrentPad World coordinates.
Definition TPad.cxx:4445
void SetGrid(Int_t valuex=1, Int_t valuey=1) override
Definition TPad.h:353
Double_t fPhi
phi angle to view as lego/surface
Definition TPad.h:86
Double_t GetAspectRatio() const override
Definition TPad.h:237
void DestroyExternalViewer3D()
Double_t fPixeltoY
yworld = fPixeltoYk + fPixeltoY*ypixel
Definition TPad.h:66
virtual void RecordLatex(const TObject *obj)
Emit RecordLatex() signal.
Definition TPad.cxx:7179
Double_t fAbsXlowNDC
Absolute X top left corner of pad in NDC [0,1].
Definition TPad.h:75
TList * GetListOfExecs() const override
Definition TPad.h:259
void SetTickx(Int_t value=1) override
Definition TPad.h:374
Double_t fVtoPixelk
Conversion coefficient for V NDC to pixel.
Definition TPad.h:58
Bool_t fGridx
Set to true if grid along X.
Definition TPad.h:106
TObject * fPadView3D
! 3D View of this TPad
Definition TPad.h:120
void SetTitle(const char *title="") override
Definition TPad.h:376
Double_t GetUxmax() const override
Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition TPad.h:245
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
Definition TPad.cxx:1361
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitives in this pad on the C++ source file out.
Definition TPad.cxx:5822
void CopyBackgroundPixmaps(TPad *stop, Int_t x, Int_t y)
Copy pixmaps of pads laying below pad "stop" into pad "stop".
Definition TPad.cxx:3893
virtual void StartEditing()
Definition TPad.h:439
Double_t fXtoPixel
xpixel = fXtoPixelk + fXtoPixel*xworld
Definition TPad.h:49
TList * fExecs
List of commands to be executed when a pad event occurs.
Definition TPad.h:114
Double_t PadtoY(Double_t y) const override
Convert y from pad to Y.
Definition TPad.cxx:3453
Int_t fTickx
Set to 1 if tick marks along X.
Definition TPad.h:95
void PaintOperations(Bool_t withXor=kFALSE)
Perform buffered paint operations Used for interactivity functionality immediately after normal paint...
Definition TPad.cxx:3795
void SetBBoxY1(const Int_t y) override
Set top of BoundingBox to a value (resize in y direction on top)
Definition TPad.cxx:7288
Int_t fTicky
Set to 1 if tick marks along Y.
Definition TPad.h:96
Int_t GetPixmapID() const override
Definition TPad.h:279
TPad(const TPad &pad)=delete
Bool_t GetGridx() const override
Definition TPad.h:248
Double_t fX2
X of upper X coordinate.
Definition TPad.h:44
Bool_t PlaceBox(TObject *o, Double_t w, Double_t h, Double_t &xl, Double_t &yb, Option_t *option="lb") override
Place a box in NDC space.
Definition TPad.cxx:3105
void SetLogz(Int_t value=1) override
Set Lin/Log scale for Z.
Definition TPad.cxx:6035
Bool_t fEmbeddedGL
!
Definition TPad.h:93
Int_t UtoAbsPixel(Double_t u) const override
Convert X NDC to absolute pixel.
Definition TPad.cxx:7420
void Browse(TBrowser *b) override
Browse pad.
Definition TPad.cxx:587
Int_t XtoPixel(Double_t x) const override
Convert X coordinate to pixel.
Definition TPad.cxx:7444
void SetAttFillPS(Color_t color, Style_t style) override
Set postscript fill area attributes.
Definition TPad.cxx:6130
Int_t fCGnx
! Size of the collide grid along x
Definition TPad.h:125
void SetBBoxCenterY(const Int_t y) override
Set Y coordinate of the center of the Pad.
Definition TPad.cxx:7252
Double_t fPixeltoX
xworld = fPixeltoXk + fPixeltoX*xpixel
Definition TPad.h:63
~TPad() override
Pad destructor.
Definition TPad.cxx:445
Bool_t fCopyGLDevice
!
Definition TPad.h:92
Double_t fYtoPixel
ypixel = fYtoPixelk + fYtoPixel*yworld
Definition TPad.h:52
Double_t GetY2() const override
Definition TPad.h:256
void DeleteToolTip(TObject *tip) override
Delete tool tip object.
Definition TPad.cxx:7026
void Close(Option_t *option="") override
Delete all primitives in pad and pad itself.
Definition TPad.cxx:1147
void AbsPixeltoXY(Double_t xpixel, Double_t ypixel, Double_t &x, Double_t &y) override
Convert absolute pixel into X/Y coordinates.
Definition TPad.cxx:7322
Int_t GetNumber() const override
Definition TPad.h:250
Double_t fAbsWNDC
Absolute Width of pad along X in NDC.
Definition TPad.h:77
TObject * Remove(TObject *obj, Bool_t modified=kTRUE) override
Remove object from list of primitives When.
Definition TPad.cxx:5390
UInt_t GetWw() const override
Get canvas width.
Definition TPad.cxx:2656
void PaintModified() override
Traverse pad hierarchy and (re)paint only modified pads.
Definition TPad.cxx:3699
void SetEditable(Bool_t mode=kTRUE) override
Set pad editable yes/no If a pad is not editable:
Definition TPad.cxx:5979
const char * GetTitle() const override
Returns title of object.
Definition TPad.h:274
void PaintDate()
Paint the current date and time if the option Date is set on via gStyle->SetOptDate() Paint the curre...
Definition TPad.cxx:3637
static void SetMaxPickDistance(Int_t maxPick=5)
static function to set the maximum Pick Distance fgMaxPickDistance This parameter is used in TPad::Pi...
Definition TPad.cxx:6605
void PixeltoXY(Double_t xpixel, Double_t ypixel, Double_t &x, Double_t &y) override
Convert pixel to X/Y coordinates.
Definition TPad.cxx:7350
void SetBBoxX2(const Int_t x) override
Set right hand side of BoundingBox to a value (resize in x direction on right)
Definition TPad.cxx:7277
void SetBBoxX1(const Int_t x) override
Set lefthandside of BoundingBox to a value (resize in x direction on left)
Definition TPad.cxx:7264
virtual Int_t ClippingCode(Double_t x, Double_t y, Double_t xcl1, Double_t ycl1, Double_t xcl2, Double_t ycl2)
Compute the endpoint codes for TPad::Clip.
Definition TPad.cxx:967
Double_t GetUymin() const override
Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition TPad.h:243
Double_t fX1
X of lower X coordinate.
Definition TPad.h:42
TList * GetListOfPrimitives() const override
Definition TPad.h:258
Double_t AbsPixeltoY(Double_t py) override
Definition TPad.h:177
TObject * GetPadPointer() const override
Definition TPad.h:263
TH1F * DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="") override
Draw an empty pad frame with X and Y axis.
Definition TPad.cxx:1898
Double_t fVtoPixel
ypixel = fVtoPixelk + fVtoPixel*vndc
Definition TPad.h:59
TCanvasImp * GetCanvasImp() const override
Get canvas implementation pointer if any.
Definition TPad.cxx:2557
Int_t GetEvent() const override
Get Event.
Definition TPad.cxx:2565
TObject * GetView3D() const override
Definition TPad.h:268
Double_t PadtoX(Double_t x) const override
Convert x from pad to X.
Definition TPad.cxx:3444
TInteractive * Interactive(TObject *obj=nullptr, TInteractive *init=nullptr) override
Internal method to create, provide or delete TInteractive instance It is allowed the only instance of...
Definition TPad.cxx:2985
virtual void DrawCrosshair()
Function called to draw a crosshair in the canvas.
Definition TPad.cxx:1819
Double_t YtoPad(Double_t y) const override
Convert y from Y to pad.
Definition TPad.cxx:3474
virtual void RangeChanged()
Definition TPad.h:334
Double_t fUymin
Minimum value on the Y axis.
Definition TPad.h:81
void SetPad(const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=35, Short_t bordersize=5, Short_t bordermode=-1) override
Set all pad parameters.
Definition TPad.cxx:6095
Int_t GetCanvasID() const override
Get canvas identifier.
Definition TPad.cxx:2549
Int_t fLogz
(=0 if Z linear scale, =1 if log scale)
Definition TPad.h:99
Int_t HtoAbsPixel(Double_t y1, Double_t y2) const override
Convert a vertical distance [y1,y2] to pixel.
Definition TPad.cxx:7460
void XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const override
Convert X/Y into pixel coordinates - integer.
Definition TPad.cxx:7386
Double_t fYtoPixelk
Conversion coefficient for Y World to pixel.
Definition TPad.h:51
void UpdateAsync() override
Asynchronous pad update.
Definition TPad.cxx:2823
TPad()
Pad default constructor.
Definition TPad.cxx:198
void UseCurrentStyle() override
Force a copy of current style for all objects in pad.
Definition TPad.cxx:6852
static Int_t GetMaxPickDistance()
Static function (see also TPad::SetMaxPickDistance)
Definition TPad.cxx:2613
Int_t VtoAbsPixel(Double_t v) const override
Convert Y NDC to absolute pixel.
Definition TPad.cxx:7428
void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Set world coordinate system for the pad.
Definition TPad.cxx:5314
virtual void EventPave()
Definition TPad.h:438
Double_t fUtoPixelk
Conversion coefficient for U NDC to pixel.
Definition TPad.h:55
void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const override
Convert X/Y into absolute pixel coordinates - integer.
Definition TPad.cxx:7359
Double_t fPixeltoXk
Conversion coefficient for pixel to X World.
Definition TPad.h:62
Bool_t IsModified() const override
Definition TPad.h:287
Double_t fY1
Y of lower Y coordinate.
Definition TPad.h:43
Int_t GetEventY() const override
Get Y event.
Definition TPad.cxx:2581
Int_t fGLDevice
! OpenGL off-screen pixmap identifier
Definition TPad.h:91
Double_t fYlowNDC
Y bottom left corner of pad in NDC [0,1].
Definition TPad.h:69
TObject * WaitPrimitive(const char *pname="", const char *emode="") override
Loop and sleep until a primitive with name=pname is found in the pad.
Definition TPad.cxx:6972
TPad & operator=(const TPad &rhs)=delete
void SetAttTextPS(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize) override
Set postscript text attributes.
Definition TPad.cxx:6166
Bool_t fModified
Set to true when pad is modified.
Definition TPad.h:105
Double_t PixeltoY(Double_t py) override
Convert pixel to Y coordinate.
Definition TPad.cxx:7341
TLegend * BuildLegend(Double_t x1=0.3, Double_t y1=0.21, Double_t x2=0.3, Double_t y2=0.21, const char *title="", Option_t *option="") override
Build a legend from the graphical objects in the pad.
Definition TPad.cxx:619
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Definition TPad.cxx:4646
void Update() override
Update pad.
Definition TPad.cxx:2811
virtual void SetNumber(Int_t number)
Definition TPad.h:360
Int_t fNumber
pad number identifier
Definition TPad.h:94
void PaintFillAreaNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
Paint fill area in CurrentPad NDC coordinates.
Definition TPad.cxx:3974
void SetPhi(Double_t phi=30) override
Definition TPad.h:378
Double_t fAbsPixeltoXk
Conversion coefficient for absolute pixel to X World.
Definition TPad.h:61
void Clear(Option_t *option="") override
Delete all pad primitives.
Definition TPad.cxx:786
Int_t YtoPixel(Double_t y) const override
Convert Y coordinate to pixel.
Definition TPad.cxx:7481
Int_t GetTickx() const override
Definition TPad.h:251
void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Paint line in CurrentPad World coordinates.
Definition TPad.cxx:4197
Int_t GetGLDevice() override
Get GL device.
Definition TPad.cxx:7163
Double_t fAspectRatio
ratio of w/h in case of fixed ratio
Definition TPad.h:88
virtual void RecordPave(const TObject *obj)
Emit RecordPave() signal.
Definition TPad.cxx:7171
void PaintBorderPS(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t bmode, Int_t bsize, Int_t dark, Int_t light) override
Paint a frame border with Postscript - no longer used.
Definition TPad.cxx:3627
Double_t fUymax
Maximum value on the Y axis.
Definition TPad.h:83
void SetLogy(Int_t value=1) override
Set Lin/Log scale for Y.
Definition TPad.cxx:6024
virtual Int_t ClipPolygon(Int_t n, Double_t *x, Double_t *y, Int_t nn, Double_t *xc, Double_t *yc, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt)
Clip polygon using the Sutherland-Hodgman algorithm.
Definition TPad.cxx:1016
void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxis *axis) override
Execute action corresponding to one event for a TAxis object (called by TAxis::ExecuteEvent....
Definition TPad.cxx:2255
void HighLight(Color_t col=kRed, Bool_t set=kTRUE) override
Highlight pad.
Definition TPad.cxx:2931
Double_t AbsPixeltoX(Double_t px) override
Definition TPad.h:176
void SetBatch(Bool_t batch=kTRUE) override
Set pad in batch mode.
Definition TPad.cxx:2771
TCanvas * fCanvas
! Pointer to mother canvas
Definition TPad.h:112
TVirtualPad * GetMother() const override
Definition TPad.h:272
TVirtualViewer3D * fViewer3D
! Current 3D viewer
Definition TPad.h:129
virtual void x3d(Option_t *type="")
Deprecated: use TPad::GetViewer3D() instead.
Definition TPad.cxx:7058
Bool_t HasCrosshair() const override
Return kTRUE if the crosshair has been activated (via SetCrosshair).
Definition TPad.cxx:6567
Bool_t IsRetained() const override
Is pad retained ?
Definition TPad.cxx:2740
Bool_t Collide(Int_t i, Int_t j, Int_t w, Int_t h)
Check if a box of size w and h collide some primitives in the pad at position i,j.
Definition TPad.cxx:3081
Int_t GetPadPaint() const override
Definition TPad.h:278
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a box.
Definition TPad.cxx:1257
Bool_t fFixedAspectRatio
True if fixed aspect ratio.
Definition TPad.h:110
void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
Definition TPad.cxx:3912
void Modified(Bool_t flag=true) override
Mark pad modified Will be repainted when TCanvas::Update() will be called next time.
Definition TPad.cxx:7313
void RecursiveRemove(TObject *obj) override
Recursively remove object from a pad and its sub-pads.
Definition TPad.cxx:5372
void DivideRatios(Int_t nrows, Int_t ncolumns, const std::vector< double > &widthRatios={}, const std::vector< double > &heightRatios={}, const double canvasTopMargin=0., const double canvasLeftMargin=0.)
Divide the canvas according to ratios.
Definition TPad.cxx:1460
Bool_t HasFixedAspectRatio() const override
Definition TPad.h:283
void CloseToolTip(TObject *tip) override
Hide tool tip.
Definition TPad.cxx:7048
Double_t GetUxmin() const override
Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decad...
Definition TPad.h:241
void SetToolTipText(const char *text, Long_t delayms=1000) override
Set tool tip text associated with this pad.
Definition TPad.cxx:6615
void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
Paint polyline in CurrentPad World coordinates.
Definition TPad.cxx:4294
Int_t WtoAbsPixel(Double_t x1, Double_t x2) const override
Convert a horizontal distance [x1,x2] to pixel.
Definition TPad.cxx:7470
void ls(Option_t *option="") const override
List all primitives in pad.
Definition TPad.cxx:2967
TView * GetView() const override
Definition TPad.h:267
void ModifiedUpdate() override
Short cut to call Modified() and Update() in a single call.
Definition TPad.cxx:3432
Double_t fVtoAbsPixelk
Conversion coefficient for V NDC to absolute pixel.
Definition TPad.h:57
UInt_t GetPadHeight() const override
Get pad height.
Definition TPad.cxx:2681
TVirtualPad * GetPadSave() const override
Get save pad.
Definition TPad.cxx:2639
void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth) override
Set postscript line attributes.
Definition TPad.cxx:6142
virtual void Resized()
Definition TPad.h:341
Bool_t IsFolder() const override
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition TPad.h:286
TVirtualPad * GetVirtCanvas() const override
Get virtual canvas.
Definition TPad.cxx:2589
void DeleteExec(const char *name) override
Remove TExec name from the list of Execs.
Definition TPad.cxx:1241
void PaintSegments(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
Paint N individual segments Provided arrays should have 2*n elements IMPORTANT! Provided arrays can b...
Definition TPad.cxx:4516
void FeedbackMode(Bool_t set) override
Switch feedback mode for the canvas Only for internal use when implementing special painters.
Definition TPad.cxx:2500
Bool_t HasViewer3D() const override
Definition TPad.h:423
UInt_t GetPadWidth() const override
Get pad width.
Definition TPad.cxx:2664
void SetCanvas(TCanvas *c) override
Definition TPad.h:345
void PaintSegmentsNDC(Int_t n, Double_t *u, Double_t *v) override
Paint N individual segments in NDC coordinates Provided arrays should have 2*n elements IMPORTANT!...
Definition TPad.cxx:4557
TString fTitle
Pad title.
Definition TPad.h:116
void CopyPixmaps() override
Copy the sub-pixmaps of the pad to the canvas.
Definition TPad.cxx:1222
void CopyPixmap() override
Copy the pixmap of the pad to the canvas.
Definition TPad.cxx:1206
Double_t GetY1() const override
Definition TPad.h:255
Int_t UtoPixel(Double_t u) const override
Convert X NDC to pixel.
Definition TPad.cxx:7404
TPoint GetBBoxCenter() override
Return the center of the Pad as TPoint in pixels.
Definition TPad.cxx:7213
void FillCollideGridTFrame(TObject *o)
Definition TPad.cxx:3236
Bool_t GetGridy() const override
Definition TPad.h:249
void LineNotFree(Int_t x1, Int_t x2, Int_t y1, Int_t y2)
Mark as "not free" the cells along a line.
Definition TPad.cxx:3176
Double_t fAbsHNDC
Absolute Height of pad along Y in NDC.
Definition TPad.h:78
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition TPad.cxx:2004
void SetDrawOption(Option_t *="") override
Set drawing option for object.
Definition TPad.h:350
TObject * fTip
! tool tip associated with box
Definition TPad.h:37
void SetCanvasSize(UInt_t ww, UInt_t wh) override
Set canvas size.
Definition TPad.cxx:2779
Int_t GetLogz() const override
Definition TPad.h:271
virtual void AutoExec()
Execute the list of Execs when a pad event occurs.
Definition TPad.cxx:574
Bool_t fAbsCoord
Use absolute coordinates.
Definition TPad.h:108
Int_t fNumPaletteColor
Number of objects with an automatic color.
Definition TPad.h:122
Int_t fCrosshairPos
Position of crosshair.
Definition TPad.h:102
void FillCollideGridTGraph(TObject *o)
Definition TPad.cxx:3262
void SetFixedAspectRatio(Bool_t fixed=kTRUE) override
Fix pad aspect ratio to current value if fixed is true.
Definition TPad.cxx:5955
Short_t GetBorderSize() const override
Definition TPad.h:210
void RedrawAxis(Option_t *option="") override
Redraw the frame axis.
Definition TPad.cxx:5433
void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode)
Draw Arrows to indicated equal distances of Objects with given BBoxes.
Definition TPad.cxx:6191
Int_t fLogx
(=0 if X linear scale, =1 if log scale)
Definition TPad.h:97
Double_t GetAbsWNDC() const override
Definition TPad.h:235
Int_t YtoAbsPixel(Double_t y) const override
Convert Y coordinate to absolute pixel.
Definition TPad.cxx:7452
Double_t fUtoPixel
xpixel = fUtoPixelk + fUtoPixel*undc
Definition TPad.h:56
Int_t fCrosshair
Crosshair type (0 if no crosshair requested)
Definition TPad.h:101
void PaintFillAreaHatches(Int_t n, Double_t *x, Double_t *y, Int_t FillStyle)
This function paints hatched fill area according to the FillStyle value The convention for the Hatch ...
Definition TPad.cxx:4017
void RangeAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) override
Set axis coordinate system for the pad.
Definition TPad.cxx:5352
@ kCannotMove
Fixed position.
Definition TPad.h:166
@ kClearAfterCR
Clear after CR.
Definition TPad.h:167
@ kHori
Pad is horizontal.
Definition TPad.h:163
@ kClipFrame
Clip on frame.
Definition TPad.h:164
@ kPrintingPS
PS Printing.
Definition TPad.h:165
@ kFraming
Frame is requested.
Definition TPad.h:162
Double_t fUtoAbsPixelk
Conversion coefficient for U NDC to absolute pixel.
Definition TPad.h:54
void ResetToolTip(TObject *tip) override
Reset tool tip, i.e.
Definition TPad.cxx:7037
Double_t GetTheta() const override
Definition TPad.h:239
TList * fPrimitives
->List of primitives (subpads)
Definition TPad.h:113
UInt_t GetWh() const override
Get canvas height.
Definition TPad.cxx:2648
TCanvas * GetCanvas() const override
Definition TPad.h:275
Short_t fBorderSize
pad bordersize in pixels
Definition TPad.h:103
void Add(TObject *obj, Option_t *opt="", Bool_t modified=kTRUE) override
Add an object to list of primitives with specified draw option When.
Definition TPad.cxx:484
void SetGridy(Int_t value=1) override
Definition TPad.h:355
TView * fView
! Pointer to 3-D view (if one exists)
Definition TPad.h:118
Rectangle_t GetBBox() override
Return the bounding Box of the Pad.
Definition TPad.cxx:7196
virtual void SetGLDevice(Int_t dev)
Definition TPad.h:384
void Paint(Option_t *option="") override
Paint all primitives in pad.
Definition TPad.cxx:3486
void FillCollideGridTBox(TObject *o)
Definition TPad.cxx:3219
Double_t fTheta
theta angle to view as lego/surface
Definition TPad.h:85
void DrawCollideGrid()
This method draws the collide grid on top of the canvas.
Definition TPad.cxx:3375
TString fName
Pad name.
Definition TPad.h:115
void SetVertical(Bool_t vert=kTRUE) override
Set pad vertical (default) or horizontal.
Definition TPad.cxx:6629
void FillCollideGridTH1(TObject *o)
Definition TPad.cxx:3293
void GetPadPar(Double_t &xlow, Double_t &ylow, Double_t &xup, Double_t &yup) override
Return lower and upper bounds of the pad in NDC coordinates.
Definition TPad.cxx:2897
void PaintText(Double_t x, Double_t y, const char *text) override
Paint text in CurrentPad World coordinates.
Definition TPad.cxx:4571
Int_t fPadPaint
Set to 1 while painting the pad.
Definition TPad.h:100
static void DrawColorTable()
Static function to Display Color Table in a pad.
Definition TPad.cxx:1943
Double_t GetXlowNDC() const override
Definition TPad.h:223
void SaveAs(const char *filename="", Option_t *option="") const override
Save the pad content in a file.
Definition TPad.cxx:5767
Int_t fPixmapID
! Off-screen pixmap identifier
Definition TPad.h:90
Bool_t fEditable
True if canvas is editable.
Definition TPad.h:109
Double_t GetYlowNDC() const override
Definition TPad.h:224
TObject * FindObject(const char *name) const override
Search if object named name is inside this pad or in pads inside this pad.
Definition TPad.cxx:2511
Color_t GetHighLightColor() const override
Get highlight color.
Definition TPad.cxx:2605
Bool_t OpaqueResizing() const override
Is pad resizing in opaque mode ?
Definition TPad.cxx:2763
Double_t fXUpNDC
Definition TPad.h:70
void ResetView3D(TObject *view=nullptr) override
Definition TPad.h:339
std::vector< Bool_t > fCollideGrid
! Grid used to find empty space when adding a box (Legend) in a pad
Definition TPad.h:124
Int_t IsAnyNeedRepaint() const
Check if pad or any subpads need to be repaint Returns flag with following mask: 1 - some pad is modi...
Definition TPad.cxx:2713
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
Definition TPad.cxx:757
Int_t GetLogy() const override
Definition TPad.h:270
void PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2) override
Paint line in normalized coordinates.
Definition TPad.cxx:4219
void Print(const char *filename="") const override
This method is equivalent to SaveAs("filename"). See TPad::SaveAs for details.
Definition TPad.cxx:4787
Int_t GetEventX() const override
Get X event.
Definition TPad.cxx:2573
TFrame * GetFrame() override
Get frame.
Definition TPad.cxx:2831
Double_t fYUpNDC
Definition TPad.h:71
Double_t fYtoAbsPixelk
Conversion coefficient for Y World to absolute pixel.
Definition TPad.h:50
Double_t fXtoPixelk
Conversion coefficient for X World to pixel.
Definition TPad.h:48
Int_t fLogy
(=0 if Y linear scale, =1 if log scale)
Definition TPad.h:98
TFrame * fFrame
! Pointer to 2-D frame (if one exists)
Definition TPad.h:117
TVirtualPadPainter * GetPainter() override
Get pad painter from TCanvas.
Definition TPad.cxx:7187
virtual void Closed()
Definition TPad.h:192
Double_t fHNDC
Height of pad along Y in Normalized Coordinates (NDC)
Definition TPad.h:73
void ShowGuidelines(TObject *object, const Int_t event, const char mode='i', const bool cling=true) override
Shows lines to indicate if a TAttBBox2D object is aligned to the center or to another object,...
Definition TPad.cxx:6275
Int_t GetCrosshair() const
Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.
Definition TPad.cxx:6576
void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) override
Return pad axis coordinates range.
Definition TPad.cxx:2919
void SetBorderMode(Short_t bordermode) override
Definition TPad.h:343
void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="") override
Paint box in CurrentPad World coordinates.
Definition TPad.cxx:3841
void DrawClassObject(const TObject *obj, Option_t *option="") override
Draw class inheritance tree of the class to which obj belongs.
Definition TPad.cxx:1617
Int_t fCGny
! Size of the collide grid along y
Definition TPad.h:126
Double_t fXlowNDC
X bottom left corner of pad in NDC [0,1].
Definition TPad.h:68
TObject * GetPrimitive(const char *name) const override
Get primitive.
Definition TPad.cxx:2859
Double_t fUxmin
Minimum value on the X axis.
Definition TPad.h:80
Double_t GetAbsHNDC() const override
Definition TPad.h:236
void SetTicks(Int_t valuex=1, Int_t valuey=1) override
Definition TPad.h:373
Int_t GetDoubleBuffer() const override
Get doublebuffer mode - 1 by default.
Definition TPad.cxx:2597
std::unique_ptr< TInteractive > fInteractive
! current interactive object
Definition TPad.h:38
void SetBBoxCenter(const TPoint &p) override
Set center of the Pad.
Definition TPad.cxx:7228
Bool_t IsWeb() const override
Is web ?
Definition TPad.cxx:2747
void SetSelected(TObject *obj) override
Set selected.
Definition TPad.cxx:2803
TObject * GetSelected() const override
Get selected.
Definition TPad.cxx:2621
void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override
Return pad world coordinates range.
Definition TPad.cxx:2908
Double_t PixeltoX(Double_t px) override
Convert pixel to X coordinate.
Definition TPad.cxx:7332
void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
Paint polyline in CurrentPad NDC coordinates.
Definition TPad.cxx:4409
Bool_t IsVertical() const override
Definition TPad.h:290
void PaintPadFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) override
Paint histogram/graph frame.
Definition TPad.cxx:3680
Double_t GetAbsYlowNDC() const override
Definition TPad.h:234
Double_t fUxmax
Maximum value on the X axis.
Definition TPad.h:82
void AddFirst(TObject *obj, Option_t *opt="", Bool_t modified=kTRUE) override
Add an object as first in list of primitives with specified draw option When.
Definition TPad.cxx:505
void SetTicky(Int_t value=1) override
Definition TPad.h:375
Double_t fY2
Y of upper Y coordinate.
Definition TPad.h:45
void PaintTextUrl(Double_t x, Double_t y, const char *text, const char *url) override
Paint text with URL in CurrentPad World coordinates.
Definition TPad.cxx:4597
Double_t fAbsPixeltoYk
Conversion coefficient for absolute pixel to Y World.
Definition TPad.h:64
TVirtualPad * GetSelectedPad() const override
Get selected pad.
Definition TPad.cxx:2630
void PaintPolyLine3D(Int_t n, Double_t *p) override
Paint 3-D polyline in the CurrentPad.
Definition TPad.cxx:4429
TVirtualPad * GetPad(Int_t subpadnumber) const override
Get a pointer to subpadnumber of this pad.
Definition TPad.cxx:2876
Short_t fBorderMode
Bordermode (-1=down, 0 = no border, 1=up)
Definition TPad.h:104
void SetLogx(Int_t value=1) override
Set Lin/Log scale for X.
Definition TPad.cxx:6010
void ReleaseViewer3D(Option_t *type="") override
Release current (external) viewer.
Definition TPad.cxx:7147
void SetCrosshair(Int_t crhair=1) override
Set crosshair active/inactive.
Definition TPad.cxx:6589
Int_t fNextPaletteColor
Next automatic color.
Definition TPad.h:123
void SetBBoxCenterX(const Int_t x) override
Set X coordinate of the center of the Pad.
Definition TPad.cxx:7241
Int_t GetLogx() const override
Definition TPad.h:269
void SetCopyGLDevice(Bool_t copy) override
Definition TPad.h:385
TObject * fPadPointer
! free pointer
Definition TPad.h:119
Double_t GetX2() const override
Definition TPad.h:254
TObject * CreateToolTip(const TBox *b, const char *text, Long_t delayms) override
Create a tool tip and return its pointer.
Definition TPad.cxx:7016
Double_t GetWNDC() const override
Get width of pad along X in Normalized Coordinates (NDC)
Definition TPad.h:226
void Pop() override
Pop pad to the top of the stack.
Definition TPad.cxx:4765
Double_t GetAbsXlowNDC() const override
Definition TPad.h:233
Int_t IncrementPaletteColor(Int_t i, const TString &opt) override
Increment (i==1) or set (i>1) the number of autocolor in the pad.
Definition TPad.cxx:3003
ULong_t Hash() const override
Return hash value for this object.
Definition TPad.h:280
Double_t GetX1() const override
Definition TPad.h:253
Double_t GetHNDC() const override
Get height of pad along Y in Normalized Coordinates (NDC)
Definition TPad.h:228
TPad * fMother
! pointer to mother of the list
Definition TPad.h:111
void SetTheta(Double_t theta=30) override
Definition TPad.h:377
const char * GetName() const override
Returns name of object.
Definition TPad.h:273
Int_t XtoAbsPixel(Double_t x) const override
Convert X coordinate to absolute pixel.
Definition TPad.cxx:7436
Bool_t fGridy
Set to true if grid along Y.
Definition TPad.h:107
void SetBBoxY2(const Int_t y) override
Set bottom of BoundingBox to a value (resize in y direction on bottom)
Definition TPad.cxx:7300
Double_t XtoPad(Double_t x) const override
Convert x from X to pad.
Definition TPad.cxx:3462
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition TQObject.h:164
Basic string class.
Definition TString.h:137
const char * Data() const
Definition TString.h:385
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
Definition TString.cxx:685
See TView3D.
Definition TView.h:25
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
Helper class to store interactive parameters for individual objects Should be used via MakeInteractiv...
Definition TVirtualPad.h:72
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:53
Abstract 3D shapes viewer.
Basic TCanvasImp ABI implementation for Web-based Graphics Provides painting of main ROOT classes in ...
Definition TWebCanvas.h:35
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Rectangle structure (maps to the X11 XRectangle structure)
Definition GuiTypes.h:362
th1 Draw()