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
21class TBrowser;
22class TBox;
23class TLegend;
24class TArrow;
25class TPoint;
26class TWebCanvas;
27
28class TPad : public TVirtualPad, public TAttBBox2D {
29
30friend class TWebCanvas;
31
32private:
33 TObject *fTip{nullptr}; ///<! tool tip associated with box
34
35protected:
36 Double_t fX1; ///< X of lower X coordinate
37 Double_t fY1; ///< Y of lower Y coordinate
38 Double_t fX2; ///< X of upper X coordinate
39 Double_t fY2; ///< Y of upper Y coordinate
40
41 Double_t fXtoAbsPixelk; ///< Conversion coefficient for X World to absolute pixel
42 Double_t fXtoPixelk; ///< Conversion coefficient for X World to pixel
43 Double_t fXtoPixel; ///< xpixel = fXtoPixelk + fXtoPixel*xworld
44 Double_t fYtoAbsPixelk; ///< Conversion coefficient for Y World to absolute pixel
45 Double_t fYtoPixelk; ///< Conversion coefficient for Y World to pixel
46 Double_t fYtoPixel; ///< ypixel = fYtoPixelk + fYtoPixel*yworld
47
48 Double_t fUtoAbsPixelk; ///< Conversion coefficient for U NDC to absolute pixel
49 Double_t fUtoPixelk; ///< Conversion coefficient for U NDC to pixel
50 Double_t fUtoPixel; ///< xpixel = fUtoPixelk + fUtoPixel*undc
51 Double_t fVtoAbsPixelk; ///< Conversion coefficient for V NDC to absolute pixel
52 Double_t fVtoPixelk; ///< Conversion coefficient for V NDC to pixel
53 Double_t fVtoPixel; ///< ypixel = fVtoPixelk + fVtoPixel*vndc
54
55 Double_t fAbsPixeltoXk; ///< Conversion coefficient for absolute pixel to X World
56 Double_t fPixeltoXk; ///< Conversion coefficient for pixel to X World
57 Double_t fPixeltoX; ///< xworld = fPixeltoXk + fPixeltoX*xpixel
58 Double_t fAbsPixeltoYk; ///< Conversion coefficient for absolute pixel to Y World
59 Double_t fPixeltoYk; ///< Conversion coefficient for pixel to Y World
60 Double_t fPixeltoY; ///< yworld = fPixeltoYk + fPixeltoY*ypixel
61
62 Double_t fXlowNDC; ///< X bottom left corner of pad in NDC [0,1]
63 Double_t fYlowNDC; ///< Y bottom left corner of pad in NDC [0,1]
66 Double_t fWNDC; ///< Width of pad along X in Normalized Coordinates (NDC)
67 Double_t fHNDC; ///< Height of pad along Y in Normalized Coordinates (NDC)
68
69 Double_t fAbsXlowNDC; ///< Absolute X top left corner of pad in NDC [0,1]
70 Double_t fAbsYlowNDC; ///< Absolute Y top left corner of pad in NDC [0,1]
71 Double_t fAbsWNDC; ///< Absolute Width of pad along X in NDC
72 Double_t fAbsHNDC; ///< Absolute Height of pad along Y in NDC
73
74 Double_t fUxmin; ///< Minimum value on the X axis
75 Double_t fUymin; ///< Minimum value on the Y axis
76 Double_t fUxmax; ///< Maximum value on the X axis
77 Double_t fUymax; ///< Maximum value on the Y axis
78
79 Double_t fTheta; ///< theta angle to view as lego/surface
80 Double_t fPhi; ///< phi angle to view as lego/surface
81
82 Double_t fAspectRatio; ///< ratio of w/h in case of fixed ratio
83
84 Int_t fPixmapID; ///<! Off-screen pixmap identifier
85 Int_t fGLDevice; ///<! OpenGL off-screen pixmap identifier
88 Int_t fNumber; ///< pad number identifier
89 Int_t fTickx; ///< Set to 1 if tick marks along X
90 Int_t fTicky; ///< Set to 1 if tick marks along Y
91 Int_t fLogx; ///< (=0 if X linear scale, =1 if log scale)
92 Int_t fLogy; ///< (=0 if Y linear scale, =1 if log scale)
93 Int_t fLogz; ///< (=0 if Z linear scale, =1 if log scale)
94 Int_t fPadPaint; ///< Set to 1 while painting the pad
95 Int_t fCrosshair; ///< Crosshair type (0 if no crosshair requested)
96 Int_t fCrosshairPos; ///< Position of crosshair
97 Short_t fBorderSize; ///< pad bordersize in pixels
98 Short_t fBorderMode; ///< Bordermode (-1=down, 0 = no border, 1=up)
99 Bool_t fModified; ///< Set to true when pad is modified
100 Bool_t fGridx; ///< Set to true if grid along X
101 Bool_t fGridy; ///< Set to true if grid along Y
102 Bool_t fAbsCoord; ///< Use absolute coordinates
103 Bool_t fEditable; ///< True if canvas is editable
104 Bool_t fFixedAspectRatio; ///< True if fixed aspect ratio
105 TPad *fMother{nullptr}; ///<! pointer to mother of the list
106 TCanvas *fCanvas{nullptr}; ///<! Pointer to mother canvas
107 TList *fPrimitives{nullptr};///<->List of primitives (subpads)
108 TList *fExecs{nullptr}; ///< List of commands to be executed when a pad event occurs
109 TString fName; ///< Pad name
110 TString fTitle; ///< Pad title
111 TFrame *fFrame{nullptr}; ///<! Pointer to 2-D frame (if one exists)
112 TView *fView{nullptr}; ///<! Pointer to 3-D view (if one exists)
113 TObject *fPadPointer{nullptr};///<! free pointer
114 TObject *fPadView3D{nullptr};///<! 3D View of this TPad
115 static Int_t fgMaxPickDistance; ///< Maximum Pick Distance
116 Int_t fNumPaletteColor; ///< Number of objects with an automatic color
117 Int_t fNextPaletteColor; ///< Next automatic color
118 std::vector<Bool_t> fCollideGrid;///<! Grid used to find empty space when adding a box (Legend) in a pad
119 Int_t fCGnx; ///<! Size of the collide grid along x
120 Int_t fCGny; ///<! Size of the collide grid along y
121
122 // 3D Viewer support
123 TVirtualViewer3D *fViewer3D{nullptr};///<! Current 3D viewer
124
126 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
127 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
128 virtual void HideToolTip(Int_t event);
129 void PaintBorder(Color_t color, Bool_t tops);
130 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;
131 void PaintDate();
132 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
133 void SetBatch(Bool_t batch=kTRUE) override;
134
135private:
136 TPad(const TPad &pad) = delete;
137 TPad &operator=(const TPad &rhs) = delete;
138
140 void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y);
141 void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode);
142
144 void FillCollideGrid(TObject *o);
150
151public:
152 // TPad status bits
153 enum {
154 kFraming = BIT(6), ///< Frame is requested
155 kHori = BIT(9), ///< Pad is horizontal
156 kClipFrame = BIT(10), ///< Clip on frame
157 kPrintingPS = BIT(11), ///< PS Printing
158 kCannotMove = BIT(12), ///< Fixed position
159 kClearAfterCR = BIT(14) ///< Clear after CR
160 };
161
162 TPad();
163 TPad(const char *name, const char *title, Double_t xlow,
164 Double_t ylow, Double_t xup, Double_t yup,
165 Color_t color=-1, Short_t bordersize=-1, Short_t bordermode=-2);
166 virtual ~TPad();
167 void AbsCoordinates(Bool_t set) override { fAbsCoord = set; }
168 Double_t AbsPixeltoX(Int_t px) override { return fAbsPixeltoXk + px*fPixeltoX; }
169 Double_t AbsPixeltoY(Int_t py) override { return fAbsPixeltoYk + py*fPixeltoY; }
170 virtual void AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y);
171 void AddExec(const char *name, const char *command) override;
172 virtual void AutoExec();
173 void Browse(TBrowser *b) override;
174 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*
175 TVirtualPad *cd(Int_t subpadnumber=0) override; // *MENU*
176 void Clear(Option_t *option="") override;
177 virtual Int_t Clip(Float_t *x, Float_t *y, Float_t xclipl, Float_t yclipb, Float_t xclipr, Float_t yclipt);
178 Int_t Clip(Double_t *x, Double_t *y, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt) override;
179 virtual Int_t ClippingCode(Double_t x, Double_t y, Double_t xcl1, Double_t ycl1, Double_t xcl2, Double_t ycl2);
180 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);
181 void Close(Option_t *option="") override;
182 virtual void Closed() { Emit("Closed()"); } // *SIGNAL*
183 void CopyPixmap() override;
184 void CopyPixmaps() override;
185 void DeleteExec(const char *name) override;
186 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*
187 virtual void DivideSquare(Int_t n, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0);
188 void Draw(Option_t *option="") override;
189 void DrawClassObject(const TObject *obj, Option_t *option="") override;
190 static void DrawColorTable();
191 virtual void DrawCrosshair();
192 TH1F *DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="") override;
193 void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxis *axis) override;
194 TObject *FindObject(const char *name) const override;
195 TObject *FindObject(const TObject *obj) const override;
196 void UseCurrentStyle() override; // *MENU*
197 Short_t GetBorderMode() const override { return fBorderMode;}
198 Short_t GetBorderSize() const override { return fBorderSize;}
199 Int_t GetCrosshair() const;
200 Int_t GetCanvasID() const override;
201 TCanvasImp *GetCanvasImp() const override;
202 TFrame *GetFrame() override;
203 Int_t GetEvent() const override;
204 Int_t GetEventX() const override;
205 Int_t GetEventY() const override;
206 Color_t GetHighLightColor() const override;
207 void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override;
209 void GetPadPar(Double_t &xlow, Double_t &ylow, Double_t &xup, Double_t &yup) override;
210 Double_t GetXlowNDC() const override { return fXlowNDC; }
211 Double_t GetYlowNDC() const override { return fYlowNDC; }
212 /// Get width of pad along X in Normalized Coordinates (NDC)
213 Double_t GetWNDC() const override { return fWNDC; }
214 /// Get height of pad along Y in Normalized Coordinates (NDC)
215 Double_t GetHNDC() const override { return fHNDC; }
216 UInt_t GetWw() const override;
217 UInt_t GetWh() const override;
218 Double_t GetAbsXlowNDC() const override { return fAbsXlowNDC; }
219 Double_t GetAbsYlowNDC() const override { return fAbsYlowNDC; }
220 Double_t GetAbsWNDC() const override { return fAbsWNDC; }
221 Double_t GetAbsHNDC() const override { return fAbsHNDC; }
222 Double_t GetAspectRatio() const override { return fAspectRatio; }
223 Double_t GetPhi() const override { return fPhi; }
224 Double_t GetTheta() const override { return fTheta; }
225 ///Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decades.
226 Double_t GetUxmin() const override { return fUxmin; }
227 ///Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decades.
228 Double_t GetUymin() const override { return fUymin; }
229 ///Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decades.
230 Double_t GetUxmax() const override { return fUxmax; }
231 ///Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decades.
232 Double_t GetUymax() const override { return fUymax; }
233 Bool_t GetGridx() const override { return fGridx; }
234 Bool_t GetGridy() const override { return fGridy; }
235 Int_t GetNumber() const override { return fNumber; }
236 Int_t GetTickx() const override { return fTickx; }
237 Int_t GetTicky() const override { return fTicky; }
238 Double_t GetX1() const override { return fX1; }
239 Double_t GetX2() const override { return fX2; }
240 Double_t GetY1() const override { return fY1; }
241 Double_t GetY2() const override { return fY2; }
242 static Int_t GetMaxPickDistance();
243 TList *GetListOfPrimitives() const override { return fPrimitives; }
244 TList *GetListOfExecs() const override { return fExecs; }
245 TObject *GetPrimitive(const char *name) const override; //obsolete, use FindObject instead
246 TObject *GetSelected() const override;
247 TVirtualPad *GetPad(Int_t subpadnumber) const override;
248 TObject *GetPadPointer() const override { return fPadPointer; }
249 TVirtualPad *GetPadSave() const override;
250 TVirtualPad *GetSelectedPad() const override;
251 Int_t GetGLDevice() override;
252 TView *GetView() const override { return fView; }
253 TObject *GetView3D() const override { return fPadView3D; }// Return 3D View of this TPad
254 Int_t GetLogx() const override { return fLogx; }
255 Int_t GetLogy() const override { return fLogy; }
256 Int_t GetLogz() const override { return fLogz; }
257 TVirtualPad *GetMother() const override { return fMother; }
258 const char *GetName() const override { return fName.Data(); }
259 const char *GetTitle() const override { return fTitle.Data(); }
260 TCanvas *GetCanvas() const override { return fCanvas; }
261 TVirtualPad *GetVirtCanvas() const override;
262 TVirtualPadPainter *GetPainter() override;
263 Int_t GetPadPaint() const override { return fPadPaint; }
264 Int_t GetPixmapID() const override { return fPixmapID; }
265 ULong_t Hash() const override { return fName.Hash(); }
266 Bool_t HasCrosshair() const override;
267 void HighLight(Color_t col=kRed, Bool_t set=kTRUE) override;
268 Bool_t HasFixedAspectRatio() const override { return fFixedAspectRatio; }
269 Bool_t IsBatch() const override;
270 virtual Bool_t IsEditable() const override { return fEditable; }
271 Bool_t IsFolder() const override { return kTRUE; }
272 Bool_t IsModified() const override { return fModified; }
273 Bool_t IsRetained() const override;
274 Bool_t IsVertical() const override { return !TestBit(kHori); }
275 void ls(Option_t *option="") const override;
276 void Modified(Bool_t flag=1) override; // *SIGNAL*
277 Bool_t OpaqueMoving() const override;
278 Bool_t OpaqueResizing() const override;
279 Double_t PadtoX(Double_t x) const override;
280 Double_t PadtoY(Double_t y) const override;
281 void Paint(Option_t *option="") override;
283 void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override; // Obsolete
284 void PaintFillArea(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
285 void PaintFillAreaNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
286 void PaintFillAreaHatches(Int_t n, Double_t *x, Double_t *y, Int_t FillStyle);
287 void PaintHatches(Double_t dy, Double_t angle, Int_t nn, Double_t *xx, Double_t *yy);
290 void PaintLineNDC(Double_t u1, Double_t v1,Double_t u2, Double_t v2) override;
291 void PaintLine3D(Float_t *p1, Float_t *p2) override;
292 void PaintLine3D(Double_t *p1, Double_t *p2) override;
293 void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override;
294 void PaintPolyLine(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
295 void PaintPolyLine3D(Int_t n, Double_t *p) override;
296 void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
297 void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override;
298 void PaintPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override;
299 void PaintModified() override;
300 void PaintText(Double_t x, Double_t y, const char *text) override;
301 void PaintText(Double_t x, Double_t y, const wchar_t *text) override;
302 void PaintTextNDC(Double_t u, Double_t v, const char *text) override;
303 void PaintTextNDC(Double_t u, Double_t v, const wchar_t *text) override;
304 virtual TPad *Pick(Int_t px, Int_t py, TObjLink *&pickobj);
305 Double_t PixeltoX(Int_t px) override;
306 Double_t PixeltoY(Int_t py) override;
307 virtual void PixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y);
308 void Pop() override; // *MENU*
309 void Print(const char *filename="") const override;
310 void Print(const char *filename, Option_t *option) override;
311 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}
312 virtual void RangeChanged() { Emit("RangeChanged()"); } // *SIGNAL*
314 void RecursiveRemove(TObject *obj) override;
315 void RedrawAxis(Option_t *option="") override;
316 void ResetView3D(TObject *view=nullptr) override { fPadView3D=view; }
317 void ResizePad(Option_t *option="") override;
318 virtual void Resized() { Emit("Resized()"); } // *SIGNAL*
319 void SaveAs(const char *filename="",Option_t *option="") const override; // *MENU*
320 void SetBorderMode(Short_t bordermode) override { fBorderMode = bordermode; Modified(); } // *MENU*
321 void SetBorderSize(Short_t bordersize) override { fBorderSize = bordersize; Modified(); } // *MENU*
322 void SetCanvas(TCanvas *c) override { fCanvas = c; }
323 void SetCanvasSize(UInt_t ww, UInt_t wh) override;
324 void SetCrosshair(Int_t crhair=1) override; // *TOGGLE*
325 void SetCursor(ECursor cursor) override;
326 void SetDoubleBuffer(Int_t mode=1) override;
327 void SetDrawOption(Option_t *option="") override;
328 void SetEditable(Bool_t mode=kTRUE) override; // *TOGGLE*
329 void SetFixedAspectRatio(Bool_t fixed = kTRUE) override; // *TOGGLE*
330 void SetGrid(Int_t valuex = 1, Int_t valuey = 1) override { fGridx = valuex; fGridy = valuey; Modified(); }
331 void SetGridx(Int_t value = 1) override { fGridx = value; Modified(); } // *TOGGLE*
332 void SetGridy(Int_t value = 1) override { fGridy = value; Modified(); } // *TOGGLE*
333 void SetFillStyle(Style_t fstyle) override;
334 void SetLogx(Int_t value = 1) override; // *TOGGLE*
335 void SetLogy(Int_t value = 1) override; // *TOGGLE*
336 void SetLogz(Int_t value = 1) override; // *TOGGLE*
337 virtual void SetNumber(Int_t number) { fNumber = number; }
338 void SetPad(const char *name, const char *title,
339 Double_t xlow, Double_t ylow, Double_t xup,
340 Double_t yup, Color_t color=35,
341 Short_t bordersize=5, Short_t bordermode=-1) override;
342 void SetPad(Double_t xlow, Double_t ylow, Double_t xup, Double_t yup) override;
343 void SetAttFillPS(Color_t color, Style_t style) override;
344 void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth) override;
345 void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize) override;
346 void SetAttTextPS(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize) override;
347 static void SetMaxPickDistance(Int_t maxPick=5);
348 void SetName(const char *name) override { fName = name; } // *MENU*
349 void SetSelected(TObject *obj) override;
350 void SetTicks(Int_t valuex = 1, Int_t valuey = 1) override { fTickx = valuex; fTicky = valuey; Modified(); }
351 void SetTickx(Int_t value = 1) override { fTickx = value; Modified(); } // *TOGGLE*
352 void SetTicky(Int_t value = 1) override { fTicky = value; Modified(); } // *TOGGLE*
353 void SetTitle(const char *title="") override { fTitle = title; }
354 void SetTheta(Double_t theta=30) override { fTheta = theta; Modified(); }
355 void SetPhi(Double_t phi=30) override { fPhi = phi; Modified(); }
356 void SetToolTipText(const char *text, Long_t delayms = 1000) override;
357 void SetVertical(Bool_t vert=kTRUE) override;
358 void SetView(TView *view = nullptr) override;
359 void SetViewer3D(TVirtualViewer3D *viewer3d) override { fViewer3D = viewer3d; }
360
361 virtual void SetGLDevice(Int_t dev) {fGLDevice = dev;}
362 void SetCopyGLDevice(Bool_t copy) override { fCopyGLDevice = copy; }
363
364 void ShowGuidelines(TObject *object, const Int_t event, const char mode = 'i', const bool cling = true) override;
365 void Update() override;
366 Int_t UtoAbsPixel(Double_t u) const override { return Int_t(fUtoAbsPixelk + u*fUtoPixel); }
367 Int_t VtoAbsPixel(Double_t v) const override { return Int_t(fVtoAbsPixelk + v*fVtoPixel); }
368 Int_t UtoPixel(Double_t u) const override;
369 Int_t VtoPixel(Double_t v) const override;
370 TObject *WaitPrimitive(const char *pname="", const char *emode="") override;
371 Int_t XtoAbsPixel(Double_t x) const override;
372 Int_t YtoAbsPixel(Double_t y) const override;
373 Double_t XtoPad(Double_t x) const override;
374 Double_t YtoPad(Double_t y) const override;
375 Int_t XtoPixel(Double_t x) const override;
376 Int_t YtoPixel(Double_t y) const override;
377 virtual void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const;
378 virtual void XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const;
379
380 TObject *CreateToolTip(const TBox *b, const char *text, Long_t delayms) override;
381 void DeleteToolTip(TObject *tip) override;
382 void ResetToolTip(TObject *tip) override;
383 void CloseToolTip(TObject *tip) override;
384
385 Int_t IncrementPaletteColor(Int_t i, TString opt) override;
386 Int_t NextPaletteColor() override;
387
388 void DrawCollideGrid();
389 Bool_t PlaceBox(TObject *o, Double_t w, Double_t h, Double_t &xl, Double_t &yb, Option_t* option = "lb") override;
390
391 virtual void x3d(Option_t *type=""); // Depreciated
392
393 TVirtualViewer3D *GetViewer3D(Option_t * type = "") override;
394 Bool_t HasViewer3D() const override { return fViewer3D != nullptr; }
395 void ReleaseViewer3D(Option_t * type = "") override;
396
397 Rectangle_t GetBBox() override;
398 TPoint GetBBoxCenter() override;
399 void SetBBoxCenter(const TPoint &p) override;
400 void SetBBoxCenterX(const Int_t x) override;
401 void SetBBoxCenterY(const Int_t y) override;
402 void SetBBoxX1(const Int_t x) override;
403 void SetBBoxX2(const Int_t x) override;
404 void SetBBoxY1(const Int_t y) override;
405 void SetBBoxY2(const Int_t y) override;
406
407 virtual void RecordPave(const TObject *obj); // *SIGNAL*
408 virtual void RecordLatex(const TObject *obj); // *SIGNAL*
409 virtual void EventPave() { Emit("EventPave()"); } // *SIGNAL*
410 virtual void StartEditing() { Emit("StartEditing()"); } // *SIGNAL*
411
412 ClassDefOverride(TPad,13) //A Graphics pad
413};
414
415
416//______________________________________________________________________________
417inline void TPad::Modified(Bool_t flag)
418{
419 if (!fModified && flag) Emit("Modified()");
420 fModified = flag;
421}
422
423
424//______________________________________________________________________________
425inline void TPad::AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
426{
427 x = AbsPixeltoX(xpixel);
428 y = AbsPixeltoY(ypixel);
429}
430
431
432//______________________________________________________________________________
434{
435 if (fAbsCoord) return fAbsPixeltoXk + px*fPixeltoX;
436 else return fPixeltoXk + px*fPixeltoX;
437}
438
439
440//______________________________________________________________________________
442{
443 if (fAbsCoord) return fAbsPixeltoYk + py*fPixeltoY;
444 else return fPixeltoYk + py*fPixeltoY;
445}
446
447
448//______________________________________________________________________________
449inline void TPad::PixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
450{
451 x = PixeltoX(xpixel);
452 y = PixeltoY(ypixel);
453}
454
455
456//______________________________________________________________________________
458{
459 Double_t val;
460 if (fAbsCoord) val = fUtoAbsPixelk + u*fUtoPixel;
461 else val = u*fUtoPixel;
462 if (val < -kMaxPixel) return -kMaxPixel;
463 if (val > kMaxPixel) return kMaxPixel;
464 return Int_t(val);
465}
466
467
468//______________________________________________________________________________
470{
471 Double_t val;
472 if (fAbsCoord) val = fVtoAbsPixelk + v*fVtoPixel;
473 else val = fVtoPixelk + v*fVtoPixel;
474 if (val < -kMaxPixel) return -kMaxPixel;
475 if (val > kMaxPixel) return kMaxPixel;
476 return Int_t(val);
477}
478
479
480//______________________________________________________________________________
482{
484 if (val < -kMaxPixel) return -kMaxPixel;
485 if (val > kMaxPixel) return kMaxPixel;
486 return Int_t(val);
487}
488
489
490//______________________________________________________________________________
492{
493 Double_t val;
494 if (fAbsCoord) val = fXtoAbsPixelk + x*fXtoPixel;
495 else val = fXtoPixelk + x*fXtoPixel;
496 if (val < -kMaxPixel) return -kMaxPixel;
497 if (val > kMaxPixel) return kMaxPixel;
498 return Int_t(val);
499}
500
501
502//______________________________________________________________________________
504{
506 if (val < -kMaxPixel) return -kMaxPixel;
507 if (val > kMaxPixel) return kMaxPixel;
508 return Int_t(val);
509}
510
511
512//______________________________________________________________________________
514{
515 Double_t val;
516 if (fAbsCoord) val = fYtoAbsPixelk + y*fYtoPixel;
517 else val = fYtoPixelk + y*fYtoPixel;
518 if (val < -kMaxPixel) return -kMaxPixel;
519 if (val > kMaxPixel) return kMaxPixel;
520 return Int_t(val);
521}
522
523
524//______________________________________________________________________________
525inline void TPad::XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
526{
527 xpixel = XtoAbsPixel(x);
528 ypixel = YtoAbsPixel(y);
529}
530
531
532//______________________________________________________________________________
533inline void TPad::XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
534{
535 xpixel = XtoPixel(x);
536 ypixel = YtoPixel(y);
537}
538
539
540//______________________________________________________________________________
542{ }
543
544#endif
545
ECursor
Definition GuiTypes.h:372
const Int_t kMaxPixel
Max value for an int.
Definition GuiTypes.h:369
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
short Style_t
Definition RtypesCore.h:89
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:92
float Size_t
Definition RtypesCore.h:96
long Long_t
Definition RtypesCore.h:54
unsigned int UInt_t
Definition RtypesCore.h:46
short Width_t
Definition RtypesCore.h:91
float Float_t
Definition RtypesCore.h:57
short Short_t
Definition RtypesCore.h:39
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
unsigned long ULong_t
Definition RtypesCore.h:55
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:85
@ kRed
Definition Rtypes.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
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:110
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:30
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:30
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:577
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:41
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:201
The most important graphics class in the ROOT system.
Definition TPad.h:28
void SetGridx(Int_t value=1) override
Definition TPad.h:331
Short_t GetBorderMode() const override
Definition TPad.h:197
Bool_t OpaqueMoving() const override
Is pad moving in opaque mode ?
Definition TPad.cxx:2767
void SetBorderSize(Short_t bordersize) override
Definition TPad.h:321
void PaintTextNDC(Double_t u, Double_t v, const char *text) override
Paint text in CurrentPad NDC coordinates.
Definition TPad.cxx:4477
Int_t GetTicky() const override
Definition TPad.h:237
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:672
virtual void HideToolTip(Int_t event)
Hide tool tip depending on the event type.
Definition TPad.cxx:2742
Double_t fAbsYlowNDC
Absolute Y top left corner of pad in NDC [0,1].
Definition TPad.h:70
Double_t fXtoAbsPixelk
Conversion coefficient for X World to absolute pixel.
Definition TPad.h:41
void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize) override
Set postscript marker attributes.
Definition TPad.cxx:6061
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:1245
void AbsCoordinates(Bool_t set) override
Definition TPad.h:167
Double_t AbsPixeltoY(Int_t py) override
Definition TPad.h:169
Bool_t IsBatch() const override
Is pad in batch mode ?
Definition TPad.cxx:2751
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:232
void AddExec(const char *name, const char *command) override
Add a new TExec object to the list of Execs.
Definition TPad.cxx:445
void SetViewer3D(TVirtualViewer3D *viewer3d) override
Definition TPad.h:359
Double_t fWNDC
Width of pad along X in Normalized Coordinates (NDC)
Definition TPad.h:66
void SetName(const char *name) override
Definition TPad.h:348
Int_t NextPaletteColor() override
Get the next autocolor in the pad.
Definition TPad.cxx:2994
Int_t VtoPixel(Double_t v) const override
Definition TPad.h:469
void PaintBorder(Color_t color, Bool_t tops)
Paint the pad border.
Definition TPad.cxx:3508
Double_t GetPhi() const override
Definition TPad.h:223
void FillCollideGrid(TObject *o)
Initialise the grid used to find empty space when adding a box (Legend) in a pad.
Definition TPad.cxx:3010
void SetView(TView *view=nullptr) override
Set the current TView. Delete previous view if view=0.
Definition TPad.cxx:6029
TVirtualViewer3D * GetViewer3D(Option_t *type="") override
Create/obtain handle to 3D viewer.
Definition TPad.cxx:6981
Double_t fPixeltoYk
Conversion coefficient for pixel to Y World.
Definition TPad.h:59
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:4025
void PaintLine3D(Float_t *p1, Float_t *p2) override
Paint 3-D line in the CurrentPad.
Definition TPad.cxx:4220
static Int_t fgMaxPickDistance
Maximum Pick Distance.
Definition TPad.h:115
void ResizePad(Option_t *option="") override
Compute pad conversion coefficients.
Definition TPad.cxx:5471
void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
Paint polymarker in CurrentPad World coordinates.
Definition TPad.cxx:4389
void SetGrid(Int_t valuex=1, Int_t valuey=1) override
Definition TPad.h:330
Double_t fPhi
phi angle to view as lego/surface
Definition TPad.h:80
Double_t GetAspectRatio() const override
Definition TPad.h:222
void DestroyExternalViewer3D()
Double_t fPixeltoY
yworld = fPixeltoYk + fPixeltoY*ypixel
Definition TPad.h:60
virtual void RecordLatex(const TObject *obj)
Emit RecordLatex() signal.
Definition TPad.cxx:7085
Double_t fAbsXlowNDC
Absolute X top left corner of pad in NDC [0,1].
Definition TPad.h:69
TList * GetListOfExecs() const override
Definition TPad.h:244
void SetTickx(Int_t value=1) override
Definition TPad.h:351
Double_t fVtoPixelk
Conversion coefficient for V NDC to pixel.
Definition TPad.h:52
Bool_t fGridx
Set to true if grid along X.
Definition TPad.h:100
TObject * fPadView3D
! 3D View of this TPad
Definition TPad.h:114
void SetTitle(const char *title="") override
Definition TPad.h:353
void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y)
Copy pixmaps of pads laying below pad "stop" into pad "stop".
Definition TPad.cxx:3854
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:230
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:1153
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitives in this pad on the C++ source file out.
Definition TPad.cxx:5694
virtual void StartEditing()
Definition TPad.h:410
Double_t fXtoPixel
xpixel = fXtoPixelk + fXtoPixel*xworld
Definition TPad.h:43
TList * fExecs
List of commands to be executed when a pad event occurs.
Definition TPad.h:108
Double_t PadtoY(Double_t y) const override
Convert y from pad to Y.
Definition TPad.cxx:3415
Int_t fTickx
Set to 1 if tick marks along X.
Definition TPad.h:89
void SetBBoxY1(const Int_t y) override
Set top of BoundingBox to a value (resize in y direction on top)
Definition TPad.cxx:7179
Int_t fTicky
Set to 1 if tick marks along Y.
Definition TPad.h:90
Int_t GetPixmapID() const override
Definition TPad.h:264
virtual void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
Definition TPad.h:525
TPad(const TPad &pad)=delete
Bool_t GetGridx() const override
Definition TPad.h:233
Double_t fX2
X of upper X coordinate.
Definition TPad.h:38
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:3079
void SetLogz(Int_t value=1) override
Set Lin/Log scale for Z.
Definition TPad.cxx:5945
Bool_t fEmbeddedGL
!
Definition TPad.h:87
Int_t UtoAbsPixel(Double_t u) const override
Definition TPad.h:366
void Browse(TBrowser *b) override
Browse pad.
Definition TPad.cxx:470
Int_t XtoPixel(Double_t x) const override
Definition TPad.h:491
void SetAttFillPS(Color_t color, Style_t style) override
Set postscript fill area attributes.
Definition TPad.cxx:6038
Int_t fCGnx
! Size of the collide grid along x
Definition TPad.h:119
void SetBBoxCenterY(const Int_t y) override
Set Y coordinate of the center of the Pad.
Definition TPad.cxx:7149
Double_t fPixeltoX
xworld = fPixeltoXk + fPixeltoX*xpixel
Definition TPad.h:57
void CopyBackgroundPixmap(Int_t x, Int_t y)
Copy pixmap of this pad as background of the current pad.
Definition TPad.cxx:3872
Bool_t fCopyGLDevice
!
Definition TPad.h:86
Double_t fYtoPixel
ypixel = fYtoPixelk + fYtoPixel*yworld
Definition TPad.h:46
Double_t GetY2() const override
Definition TPad.h:241
void DeleteToolTip(TObject *tip) override
Delete tool tip object.
Definition TPad.cxx:6931
void Close(Option_t *option="") override
Delete all primitives in pad and pad itself.
Definition TPad.cxx:974
Int_t GetNumber() const override
Definition TPad.h:235
Double_t fAbsWNDC
Absolute Width of pad along X in NDC.
Definition TPad.h:71
UInt_t GetWw() const override
Get Ww.
Definition TPad.cxx:2732
void PaintModified() override
Traverse pad hierarchy and (re)paint only modified pads.
Definition TPad.cxx:3676
void SetEditable(Bool_t mode=kTRUE) override
Set pad editable yes/no If a pad is not editable:
Definition TPad.cxx:5889
const char * GetTitle() const override
Returns title of object.
Definition TPad.h:259
void PaintDate()
Paint the current date and time if the option Date is set on via gStyle->SetOptDate() Paint the curre...
Definition TPad.cxx:3614
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:6514
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:7170
void SetBBoxX1(const Int_t x) override
Set lefthandside of BoundingBox to a value (resize in x direction on left)
Definition TPad.cxx:7159
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:805
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:228
Double_t fX1
X of lower X coordinate.
Definition TPad.h:36
TList * GetListOfPrimitives() const override
Definition TPad.h:243
TObject * GetPadPointer() const override
Definition TPad.h:248
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:1577
Double_t fVtoPixel
ypixel = fVtoPixelk + fVtoPixel*vndc
Definition TPad.h:53
TCanvasImp * GetCanvasImp() const override
Get canvas implementation pointer if any.
Definition TPad.cxx:2641
Int_t GetEvent() const override
Get Event.
Definition TPad.cxx:2649
TObject * GetView3D() const override
Definition TPad.h:253
Double_t PadtoX(Double_t x) const override
Convert x from pad to X.
Definition TPad.cxx:3406
virtual void PixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
Definition TPad.h:449
virtual void DrawCrosshair()
Function called to draw a crosshair in the canvas.
Definition TPad.cxx:1504
Double_t YtoPad(Double_t y) const override
Convert y from Y to pad.
Definition TPad.cxx:3436
virtual void RangeChanged()
Definition TPad.h:312
Double_t fUymin
Minimum value on the Y axis.
Definition TPad.h:75
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:6005
Int_t GetCanvasID() const override
Get canvas identifier.
Definition TPad.cxx:2633
Int_t fLogz
(=0 if Z linear scale, =1 if log scale)
Definition TPad.h:93
Double_t fYtoPixelk
Conversion coefficient for Y World to pixel.
Definition TPad.h:45
TPad()
Pad default constructor.
Definition TPad.cxx:132
Double_t AbsPixeltoX(Int_t px) override
Definition TPad.h:168
void UseCurrentStyle() override
Force a copy of current style for all objects in pad.
Definition TPad.cxx:6758
static Int_t GetMaxPickDistance()
Static function (see also TPad::SetMaxPickDistance)
Definition TPad.cxx:2689
Int_t VtoAbsPixel(Double_t v) const override
Definition TPad.h:367
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:5193
virtual void EventPave()
Definition TPad.h:409
Double_t fUtoPixelk
Conversion coefficient for U NDC to pixel.
Definition TPad.h:49
Double_t fPixeltoXk
Conversion coefficient for pixel to X World.
Definition TPad.h:56
Bool_t IsModified() const override
Definition TPad.h:272
Double_t fY1
Y of lower Y coordinate.
Definition TPad.h:37
Int_t GetEventY() const override
Get Y event.
Definition TPad.cxx:2665
Int_t fGLDevice
! OpenGL off-screen pixmap identifier
Definition TPad.h:85
Double_t fYlowNDC
Y bottom left corner of pad in NDC [0,1].
Definition TPad.h:63
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:6878
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:6073
Bool_t fModified
Set to true when pad is modified.
Definition TPad.h:99
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:502
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Definition TPad.cxx:4521
void Update() override
Update pad.
Definition TPad.cxx:2823
virtual void SetNumber(Int_t number)
Definition TPad.h:337
Int_t fNumber
pad number identifier
Definition TPad.h:88
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:3929
Double_t PixeltoX(Int_t px) override
Definition TPad.h:433
void SetPhi(Double_t phi=30) override
Definition TPad.h:355
Double_t fAbsPixeltoXk
Conversion coefficient for absolute pixel to X World.
Definition TPad.h:55
void Clear(Option_t *option="") override
Delete all pad primitives.
Definition TPad.cxx:626
Int_t YtoPixel(Double_t y) const override
Definition TPad.h:513
Int_t GetTickx() const override
Definition TPad.h:236
void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Paint line in CurrentPad World coordinates.
Definition TPad.cxx:4177
Int_t GetGLDevice() override
Get GL device.
Definition TPad.cxx:7069
Double_t fAspectRatio
ratio of w/h in case of fixed ratio
Definition TPad.h:82
virtual void RecordPave(const TObject *obj)
Emit RecordPave() signal.
Definition TPad.cxx:7077
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.
Definition TPad.cxx:3604
Double_t fUymax
Maximum value on the Y axis.
Definition TPad.h:77
void Modified(Bool_t flag=1) override
Definition TPad.h:417
void SetLogy(Int_t value=1) override
Set Lin/Log scale for Y.
Definition TPad.cxx:5934
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:854
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:2260
void HighLight(Color_t col=kRed, Bool_t set=kTRUE) override
Highlight pad.
Definition TPad.cxx:2931
void SetBatch(Bool_t batch=kTRUE) override
Set pad in batch mode.
Definition TPad.cxx:2783
TCanvas * fCanvas
! Pointer to mother canvas
Definition TPad.h:106
TVirtualPad * GetMother() const override
Definition TPad.h:257
TVirtualViewer3D * fViewer3D
! Current 3D viewer
Definition TPad.h:123
virtual void x3d(Option_t *type="")
Deprecated: use TPad::GetViewer3D() instead.
Definition TPad.cxx:6963
Bool_t HasCrosshair() const override
Return kTRUE if the crosshair has been activated (via SetCrosshair).
Definition TPad.cxx:6476
Bool_t IsRetained() const override
Is pad retained ?
Definition TPad.cxx:2759
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:3055
Int_t GetPadPaint() const override
Definition TPad.h:263
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a box.
Definition TPad.cxx:1078
Bool_t fFixedAspectRatio
True if fixed aspect ratio.
Definition TPad.h:104
void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
Definition TPad.cxx:3881
void RecursiveRemove(TObject *obj) override
Recursively remove object from a pad and its sub-pads.
Definition TPad.cxx:5251
Bool_t HasFixedAspectRatio() const override
Definition TPad.h:268
void CloseToolTip(TObject *tip) override
Hide tool tip.
Definition TPad.cxx:6953
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:226
void SetToolTipText(const char *text, Long_t delayms=1000) override
Set tool tip text associated with this pad.
Definition TPad.cxx:6524
void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
Paint polyline in CurrentPad World coordinates.
Definition TPad.cxx:4256
void ls(Option_t *option="") const override
List all primitives in pad.
Definition TPad.cxx:2966
virtual ~TPad()
Pad destructor.
Definition TPad.cxx:379
TView * GetView() const override
Definition TPad.h:252
Double_t fVtoAbsPixelk
Conversion coefficient for V NDC to absolute pixel.
Definition TPad.h:51
TVirtualPad * GetPadSave() const override
Get save pad.
Definition TPad.cxx:2715
void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth) override
Set postscript line attributes.
Definition TPad.cxx:6049
virtual void Resized()
Definition TPad.h:318
Bool_t IsFolder() const override
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition TPad.h:271
TVirtualPad * GetVirtCanvas() const override
Get virtual canvas.
Definition TPad.cxx:2673
void DeleteExec(const char *name) override
Remove TExec name from the list of Execs.
Definition TPad.cxx:1062
Bool_t HasViewer3D() const override
Definition TPad.h:394
void SetCanvas(TCanvas *c) override
Definition TPad.h:322
TString fTitle
Pad title.
Definition TPad.h:110
void CopyPixmaps() override
Copy the sub-pixmaps of the pad to the canvas.
Definition TPad.cxx:1047
void CopyPixmap() override
Copy the pixmap of the pad to the canvas.
Definition TPad.cxx:1033
Double_t GetY1() const override
Definition TPad.h:240
Int_t UtoPixel(Double_t u) const override
Definition TPad.h:457
TPoint GetBBoxCenter() override
Return the center of the Pad as TPoint in pixels.
Definition TPad.cxx:7116
void FillCollideGridTFrame(TObject *o)
Definition TPad.cxx:3210
Bool_t GetGridy() const override
Definition TPad.h:234
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:3150
virtual void AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
Definition TPad.h:425
Double_t fAbsHNDC
Absolute Height of pad along Y in NDC.
Definition TPad.h:72
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition TPad.cxx:1685
TObject * fTip
! tool tip associated with box
Definition TPad.h:33
void SetCanvasSize(UInt_t ww, UInt_t wh) override
Set canvas size.
Definition TPad.cxx:2791
Int_t GetLogz() const override
Definition TPad.h:256
virtual void XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
Definition TPad.h:533
virtual void AutoExec()
Execute the list of Execs when a pad event occurs.
Definition TPad.cxx:455
Bool_t fAbsCoord
Use absolute coordinates.
Definition TPad.h:102
Int_t fNumPaletteColor
Number of objects with an automatic color.
Definition TPad.h:116
Int_t fCrosshairPos
Position of crosshair.
Definition TPad.h:96
void FillCollideGridTGraph(TObject *o)
Definition TPad.cxx:3236
void SetFixedAspectRatio(Bool_t fixed=kTRUE) override
Fix pad aspect ratio to current value if fixed is true.
Definition TPad.cxx:5865
Short_t GetBorderSize() const override
Definition TPad.h:198
void RedrawAxis(Option_t *option="") override
Redraw the frame axis.
Definition TPad.cxx:5297
void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode)
Draw Arrows to indicated equal distances of Objects with given BBoxes.
Definition TPad.cxx:6100
Int_t fLogx
(=0 if X linear scale, =1 if log scale)
Definition TPad.h:91
Double_t GetAbsWNDC() const override
Definition TPad.h:220
Int_t YtoAbsPixel(Double_t y) const override
Definition TPad.h:503
Double_t fUtoPixel
xpixel = fUtoPixelk + fUtoPixel*undc
Definition TPad.h:50
Int_t fCrosshair
Crosshair type (0 if no crosshair requested)
Definition TPad.h:95
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:3972
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:5231
@ kCannotMove
Fixed position.
Definition TPad.h:158
@ kClearAfterCR
Clear after CR.
Definition TPad.h:159
@ kHori
Pad is horizontal.
Definition TPad.h:155
@ kClipFrame
Clip on frame.
Definition TPad.h:156
@ kPrintingPS
PS Printing.
Definition TPad.h:157
@ kFraming
Frame is requested.
Definition TPad.h:154
Double_t fUtoAbsPixelk
Conversion coefficient for U NDC to absolute pixel.
Definition TPad.h:48
void ResetToolTip(TObject *tip) override
Reset tool tip, i.e.
Definition TPad.cxx:6942
Double_t GetTheta() const override
Definition TPad.h:224
TList * fPrimitives
->List of primitives (subpads)
Definition TPad.h:107
UInt_t GetWh() const override
Get Wh.
Definition TPad.cxx:2724
TCanvas * GetCanvas() const override
Definition TPad.h:260
Short_t fBorderSize
pad bordersize in pixels
Definition TPad.h:97
void SetGridy(Int_t value=1) override
Definition TPad.h:332
TView * fView
! Pointer to 3-D view (if one exists)
Definition TPad.h:112
Rectangle_t GetBBox() override
Return the bounding Box of the Pad.
Definition TPad.cxx:7102
virtual void SetGLDevice(Int_t dev)
Definition TPad.h:361
void Paint(Option_t *option="") override
Paint all primitives in pad.
Definition TPad.cxx:3448
void FillCollideGridTBox(TObject *o)
Definition TPad.cxx:3193
Double_t fTheta
theta angle to view as lego/surface
Definition TPad.h:79
void DrawCollideGrid()
This method draws the collide grid on top of the canvas.
Definition TPad.cxx:3349
TString fName
Pad name.
Definition TPad.h:109
void SetVertical(Bool_t vert=kTRUE) override
Set pad vertical (default) or horizontal.
Definition TPad.cxx:6538
void FillCollideGridTH1(TObject *o)
Definition TPad.cxx:3267
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:4451
Int_t fPadPaint
Set to 1 while painting the pad.
Definition TPad.h:94
static void DrawColorTable()
Static function to Display Color Table in a pad.
Definition TPad.cxx:1622
Double_t GetXlowNDC() const override
Definition TPad.h:210
void SaveAs(const char *filename="", Option_t *option="") const override
Save the pad content in a file.
Definition TPad.cxx:5631
Int_t fPixmapID
! Off-screen pixmap identifier
Definition TPad.h:84
Bool_t fEditable
True if canvas is editable.
Definition TPad.h:103
Double_t GetYlowNDC() const override
Definition TPad.h:211
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:2595
Color_t GetHighLightColor() const override
Get highlight color.
Definition TPad.cxx:2681
Bool_t OpaqueResizing() const override
Is pad resizing in opaque mode ?
Definition TPad.cxx:2775
Double_t fXUpNDC
Definition TPad.h:64
void ResetView3D(TObject *view=nullptr) override
Definition TPad.h:316
void SetDrawOption(Option_t *option="") override
Set drawing option for object.
Definition TPad.h:541
std::vector< Bool_t > fCollideGrid
! Grid used to find empty space when adding a box (Legend) in a pad
Definition TPad.h:118
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
Definition TPad.cxx:597
Int_t GetLogy() const override
Definition TPad.h:255
void PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2) override
Paint line in normalized coordinates.
Definition TPad.cxx:4200
Double_t PixeltoY(Int_t py) override
Definition TPad.h:441
void Print(const char *filename="") const override
This method is equivalent to SaveAs("filename"). See TPad::SaveAs for details.
Definition TPad.cxx:4660
Int_t GetEventX() const override
Get X event.
Definition TPad.cxx:2657
TFrame * GetFrame() override
Get frame.
Definition TPad.cxx:2831
Double_t fYUpNDC
Definition TPad.h:65
Double_t fYtoAbsPixelk
Conversion coefficient for Y World to absolute pixel.
Definition TPad.h:44
Double_t fXtoPixelk
Conversion coefficient for X World to pixel.
Definition TPad.h:42
Int_t fLogy
(=0 if Y linear scale, =1 if log scale)
Definition TPad.h:92
TFrame * fFrame
! Pointer to 2-D frame (if one exists)
Definition TPad.h:111
TVirtualPadPainter * GetPainter() override
Get pad painter from TCanvas.
Definition TPad.cxx:7093
virtual void Closed()
Definition TPad.h:182
Double_t fHNDC
Height of pad along Y in Normalized Coordinates (NDC)
Definition TPad.h:67
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:6184
virtual Bool_t IsEditable() const override
Definition TPad.h:270
Int_t GetCrosshair() const
Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.
Definition TPad.cxx:6485
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:320
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:3760
void DrawClassObject(const TObject *obj, Option_t *option="") override
Draw class inheritance tree of the class to which obj belongs.
Definition TPad.cxx:1302
Int_t fCGny
! Size of the collide grid along y
Definition TPad.h:120
Double_t fXlowNDC
X bottom left corner of pad in NDC [0,1].
Definition TPad.h:62
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:74
Double_t GetAbsHNDC() const override
Definition TPad.h:221
void SetTicks(Int_t valuex=1, Int_t valuey=1) override
Definition TPad.h:350
void SetBBoxCenter(const TPoint &p) override
Set center of the Pad.
Definition TPad.cxx:7130
void SetSelected(TObject *obj) override
Set selected.
Definition TPad.cxx:2815
TObject * GetSelected() const override
Get selected.
Definition TPad.cxx:2697
void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override
Return pad world coordinates range.
Definition TPad.cxx:2908
void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
Paint polyline in CurrentPad NDC coordinates.
Definition TPad.cxx:4354
Bool_t IsVertical() const override
Definition TPad.h:274
Int_t IncrementPaletteColor(Int_t i, TString opt) override
Increment (i==1) or set (i>1) the number of autocolor in the pad.
Definition TPad.cxx:2980
void PaintPadFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) override
Paint histogram/graph frame.
Definition TPad.cxx:3657
Double_t GetAbsYlowNDC() const override
Definition TPad.h:219
Double_t fUxmax
Maximum value on the X axis.
Definition TPad.h:76
void SetTicky(Int_t value=1) override
Definition TPad.h:352
Double_t fY2
Y of upper Y coordinate.
Definition TPad.h:39
Double_t fAbsPixeltoYk
Conversion coefficient for absolute pixel to Y World.
Definition TPad.h:58
TVirtualPad * GetSelectedPad() const override
Get selected pad.
Definition TPad.cxx:2706
void PaintPolyLine3D(Int_t n, Double_t *p) override
Paint 3-D polyline in the CurrentPad.
Definition TPad.cxx:4375
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:98
void SetLogx(Int_t value=1) override
Set Lin/Log scale for X.
Definition TPad.cxx:5920
void ReleaseViewer3D(Option_t *type="") override
Release current (external) viewer.
Definition TPad.cxx:7053
void SetCrosshair(Int_t crhair=1) override
Set crosshair active/inactive.
Definition TPad.cxx:6498
Int_t fNextPaletteColor
Next automatic color.
Definition TPad.h:117
void SetBBoxCenterX(const Int_t x) override
Set X coordinate of the center of the Pad.
Definition TPad.cxx:7140
Int_t GetLogx() const override
Definition TPad.h:254
void SetCopyGLDevice(Bool_t copy) override
Definition TPad.h:362
TObject * fPadPointer
! free pointer
Definition TPad.h:113
Double_t GetX2() const override
Definition TPad.h:239
TObject * CreateToolTip(const TBox *b, const char *text, Long_t delayms) override
Create a tool tip and return its pointer.
Definition TPad.cxx:6921
Double_t GetWNDC() const override
Get width of pad along X in Normalized Coordinates (NDC)
Definition TPad.h:213
void Pop() override
Pop pad to the top of the stack.
Definition TPad.cxx:4640
Double_t GetAbsXlowNDC() const override
Definition TPad.h:218
ULong_t Hash() const override
Return hash value for this object.
Definition TPad.h:265
Double_t GetX1() const override
Definition TPad.h:238
Double_t GetHNDC() const override
Get height of pad along Y in Normalized Coordinates (NDC)
Definition TPad.h:215
TPad * fMother
! pointer to mother of the list
Definition TPad.h:105
void SetTheta(Double_t theta=30) override
Definition TPad.h:354
const char * GetName() const override
Returns name of object.
Definition TPad.h:258
Int_t XtoAbsPixel(Double_t x) const override
Definition TPad.h:481
Bool_t fGridy
Set to true if grid along Y.
Definition TPad.h:101
void SetBBoxY2(const Int_t y) override
Set bottom of BoundingBox to a value (resize in y direction on bottom)
Definition TPad.cxx:7189
Double_t XtoPad(Double_t x) const override
Convert x from X to pad.
Definition TPad.cxx:3424
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition TQObject.h:164
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:380
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
Definition TString.cxx:670
See TView3D.
Definition TView.h:25
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51
Abstract 3D shapes viewer.
Basic TCanvasImp ABI implementation for Web-based GUI Provides painting of main ROOT6 classes in web ...
Definition TWebCanvas.h:34
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:361
th1 Draw()