151 fClickSelectedPad = 0;
161 const char *defcanvas =
gROOT->GetDefCanvasName();
165 if (lc->FindObject(defcanvas)) {
166 Int_t n = lc->GetSize()+1;
167 while (lc->FindObject(
Form(
"%s_n%d",defcanvas,
n)))
n++;
172 Constructor(cdef, cdef, 1);
280 static Int_t ww = 500;
281 static Int_t wh = 500;
282 arr[1] =
this; arr[2] = (
void*)
name; arr[3] = (
void*)title; arr[4] =&ww; arr[5] = &wh;
298 Warning(
"Constructor",
"Deleting canvas with same name: %s",
name);
301 if (
gROOT->IsBatch()) {
317 if (form < 1 || form > 5) form = 1;
382 arr[1] =
this; arr[2] = (
void*)
name; arr[3] = (
void*)title; arr[4] =&ww; arr[5] = &wh;
397 Warning(
"Constructor",
"Deleting canvas with same name: %s",
name);
400 if (
gROOT->IsBatch()) {
444 :
TPad(), fDoubleBuffer(0)
467 arr[1] =
this; arr[2] = (
void*)
name; arr[3] = (
void*)title;
468 arr[4] = &wtopx; arr[5] = &wtopy; arr[6] = &ww; arr[7] = &wh;
483 Warning(
"Constructor",
"Deleting canvas with same name: %s",
name);
486 if (
gROOT->IsBatch()) {
590 }
else if (
IsWeb()) {
619 gROOT->GetListOfCanvases()->Add(
this);
735 while ((obj=next())) {
775 if (padsave) cansave = (
TCanvas*)
gPad->GetCanvas();
779 if ((!
gROOT->IsLineProcessing()) && (!
gVirtualX->IsCmdThread())) {
802 gROOT->GetListOfCanvases()->Remove(
this);
808 if (cansave ==
this) {
853 if (old) {
gROOT->GetListOfCanvases()->Remove(old);
delete old;}
863 if (
gROOT->IsBatch()) {
890 newCanvas->
Draw(option);
907 if (pad ==
this) pad = selpad;
908 if (padsav == 0 || pad == 0 || pad ==
this) {
939 while ((obj=next())) {
941 clone = obj->
Clone();
947 if (padsav) padsav->
cd();
959 const Int_t kTMAX=256;
960 static char atext[kTMAX];
973 snprintf(atext, kTMAX,
"%c", (
char) px);
975 snprintf(atext, kTMAX,
"%d,%d", px, py);
981 xaxis = ((
TH1*)selected)->GetXaxis();
983 xaxis = ((
TGraph*)selected)->GetXaxis();
985 xaxis = (
TAxis*)selected;
998 if (lnF - idF == 21) {
999 time_format = time_format(idF+2, lnF);
1097 if (
gROOT->GetEditorMode()) {
1145 if (padsav && padsav->
GetCanvas() ==
this) {
1155 if (padsav) padsav->
cd();
1163 if ((!
gROOT->IsLineProcessing()) && (!
gVirtualX->IsCmdThread())) {
1164 gInterpreter->Execute(
this, IsA(),
"UseCurrentStyle",
"");
1227 pad =
Pick(px, py, prevSelObj);
1269 pad =
Pick(px, py, prevSelObj);
1336 pad =
Pick(px, py, prevSelObj);
1353 while ((tc = (
TCanvas *)next()))
1380 pad =
Pick(px, py, prevSelObj);
1413 pad =
Pick(px, py, prevSelObj);
1430 pad =
Pick(px, py, prevSelObj);
1465 std::cout <<
"Canvas Name=" <<
GetName()<<
" Title="<<
GetTitle()<<
" Option="<<option<<std::endl;
1476 const char *defcanvas =
gROOT->GetDefCanvasName();
1479 auto lc = (
TList*)
gROOT->GetListOfCanvases();
1480 if (lc->FindObject(defcanvas)) {
1481 Int_t n = lc->GetSize() + 1;
1482 cdef =
new char[strlen(defcanvas)+15];
1484 strlcpy(cdef,
Form(
"%s_n%d", defcanvas,
n++),strlen(defcanvas)+15);
1485 }
while (lc->FindObject(cdef));
1491 ::Info(
"TCanvas::MakeDefCanvas",
" created default TCanvas with name %s",cdef);
1571 Emit(
"Picked(TPad*,TObject*,Int_t)", args);
1591 Emit(
"Highlighted(TVirtualPad*,TObject*,Int_t,Int_t)", args);
1603 Connect(
"Highlighted(TVirtualPad*,TObject*,Int_t,Int_t)", 0, 0, slot);
1617 Emit(
"Selected(TVirtualPad*,TObject*,Int_t)", args);
1632 Emit(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)", args);
1642 if ((!
gROOT->IsLineProcessing()) && (!
gVirtualX->IsCmdThread())) {
1676 nww =
fCw; nwh = twh;
1688 nww =
fCw; nwh = twh;
1710 if (padsav) padsav->
cd();
1745 out<<
" gStyle->SetOptFit(1);"<<std::endl;
1748 out<<
" gStyle->SetOptStat(0);"<<std::endl;
1751 out<<
" gStyle->SetOptTitle(0);"<<std::endl;
1753 if (
gROOT->GetEditHistograms()) {
1754 out<<
" gROOT->SetEditHistograms();"<<std::endl;
1757 out<<
" "<<
GetName()<<
"->ToggleEventStatus();"<<std::endl;
1760 out<<
" "<<
GetName()<<
"->ToggleToolTips();"<<std::endl;
1763 out<<
" "<<
GetName()<<
"->ToggleToolBar();"<<std::endl;
1768 out<<
" "<<
GetName()<<
"->SetHighLightColor(ci);" << std::endl;
1791 while((cl = (
TClass*)next())) {
1797 Int_t lenfile = strlen(filename);
1800 const char *cname =
GetName();
1805 fname = (
char*)filename;
1806 out.open(fname, std::ios::out);
1808 Int_t nch = strlen(cname);
1810 strlcpy(lcname,cname,10);
1811 for (
Int_t k=1;k<=nch;k++) {
if (lcname[nch-k] ==
' ') lcname[nch-k] = 0;}
1812 if (lcname[0] == 0) {invalid =
kTRUE; strlcpy(lcname,
"c1",10); nch = 2;}
1815 fname =
new char[nch+3];
1816 strlcpy(fname,cname,nch+3);
1817 strncat(fname,
".C",3);
1818 out.open(fname, std::ios::out);
1821 Error(
"SaveSource",
"Cannot open file: %s",fname);
1822 if (!lenfile)
delete [] fname;
1828 out.precision(precision);
1836 Error(
"SaveSource",
"Cannot open TCanvas");
1861 if (!
first.IsDigit()) out <<
"void " << mname(
s,p-
s) <<
"()" << std::endl;
1863 out <<
"{"<<std::endl;
1864 out <<
"//=========Macro generated from canvas: "<<
GetName()<<
"/"<<
GetTitle()<<std::endl;
1865 out <<
"//========= ("<<t.
AsString()<<
") by ROOT version "<<
gROOT->GetVersion()<<std::endl;
1868 out <<std::endl<<
" gStyle->SetCanvasPreferGL(kTRUE);"<<std::endl<<std::endl;
1873 <<quote<<
", "<<quote<<
GetTitle()<<quote<<
","<<w<<
","<<
h<<
");"<<std::endl;
1876 out<<
" TCanvas *"<<cname<<
" = new TCanvas("<<quote<<
GetName()<<quote<<
", "<<quote<<
GetTitle()
1879 out<<
",-"<<topx<<
","<<topy<<
","<<w<<
","<<
h<<
");"<<std::endl;
1881 out<<
","<<topx<<
","<<topy<<
","<<w<<
","<<
h<<
");"<<std::endl;
1885 out<<
" gStyle->SetOptFit(1);"<<std::endl;
1888 out<<
" gStyle->SetOptStat(0);"<<std::endl;
1891 out<<
" gStyle->SetOptTitle(0);"<<std::endl;
1893 if (
gROOT->GetEditHistograms()) {
1894 out<<
" gROOT->SetEditHistograms();"<<std::endl;
1897 out<<
" "<<
GetName()<<
"->ToggleEventStatus();"<<std::endl;
1900 out<<
" "<<
GetName()<<
"->ToggleToolTips();"<<std::endl;
1905 out<<
" "<<
GetName()<<
"->SetHighLightColor(ci);" << std::endl;
1915 out<<
" "<<
GetName()<<
"->SetSelected("<<
GetName()<<
");"<<std::endl;
1917 out<<
" "<<
GetName()<<
"->ToggleToolBar();"<<std::endl;
1921 out <<
"}"<<std::endl;
1923 Info(
"SaveSource",
"C++ Macro file: %s has been generated", fname);
1927 while((cl = (
TClass*)next())) {
1930 if (!lenfile)
delete [] fname;
1999 Error(
"SetAspectRatio",
"cannot fix aspect ratio, height of canvas is 0");
2025 const char *defcanvas =
gROOT->GetDefCanvasName();
2027 auto lc = (
TList*)
gROOT->GetListOfCanvases();
2028 if (lc->FindObject(defcanvas)) {
2029 cdef =
Form(
"%s_n%d",defcanvas,lc->GetSize()+1);
2031 cdef =
Form(
"%s",defcanvas);
2082 Double_t ratio2 = xlength2/ylength2;
2091 }
else if (axis==2) {
2095 Error(
"SetRealAspectRatio",
"axis value %d is neither 1 (resize along x-axis) nor 2 (resize along y-axis).",axis);
2117 ratio2 = xlength2/ylength2;
2123 Error(
"SetRealAspectRatio",
"Resizing failed.");
2181 if (
b.IsReading()) {
2185 if (
v>7)
b.ClassBegin(TCanvas::IsA());
2186 if (
v>7)
b.ClassMember(
"TPad");
2194 while ((colold = (
TColor*)next())) {
2206 if (!colcur)
return;
2212 if (currentpalette) {
2213 TIter nextpal(currentpalette);
2221 delete currentpalette;
2228 if (
v>7)
b.ClassMember(
"fDISPLAY",
"TString");
2230 if (
v>7)
b.ClassMember(
"fDoubleBuffer",
"Int_t");
2232 if (
v>7)
b.ClassMember(
"fRetained",
"Bool_t");
2234 if (
v>7)
b.ClassMember(
"fXsizeUser",
"Size_t");
2236 if (
v>7)
b.ClassMember(
"fYsizeUser",
"Size_t");
2238 if (
v>7)
b.ClassMember(
"fXsizeReal",
"Size_t");
2240 if (
v>7)
b.ClassMember(
"fYsizeReal",
"Size_t");
2243 if (
v>7)
b.ClassMember(
"fWindowTopX",
"Int_t");
2245 if (
v>7)
b.ClassMember(
"fWindowTopY",
"Int_t");
2248 if (
v>7)
b.ClassMember(
"fWindowWidth",
"UInt_t");
2250 if (
v>7)
b.ClassMember(
"fWindowHeight",
"UInt_t");
2253 if (
v>7)
b.ClassMember(
"fCw",
"UInt_t");
2255 if (
v>7)
b.ClassMember(
"fCh",
"UInt_t");
2261 if (
v>7)
b.ClassMember(
"fCatt",
"TAttCanvas");
2264 if (
v>7)
b.ClassMember(
"kMoveOpaque",
"Bool_t");
2266 if (
v>7)
b.ClassMember(
"kResizeOpaque",
"Bool_t");
2268 if (
v>7)
b.ClassMember(
"fHighLightColor",
"Color_t");
2270 if (
v>7)
b.ClassMember(
"fBatch",
"Bool_t");
2273 if (
v>7)
b.ClassMember(
"kShowEventStatus",
"Bool_t");
2277 if (
v>7)
b.ClassMember(
"kAutoExec",
"Bool_t");
2280 if (
v>7)
b.ClassMember(
"kMenuBar",
"Bool_t");
2283 if (
v>7)
b.ClassEnd(TCanvas::IsA());
2284 b.CheckByteCount(R__s, R__c, TCanvas::IsA());
2301 CurrentColorPalette->
SetName(
"CurrentColorPalette");
2302 for (
Int_t i=0; i<palsize; i++) CurrentColorPalette->
Add(
gROOT->GetColor(pal[i]));
2306 R__c =
b.WriteVersion(TCanvas::IsA(),
kTRUE);
2307 b.ClassBegin(TCanvas::IsA());
2308 b.ClassMember(
"TPad");
2311 if (CurrentColorPalette) {
fPrimitives->
Remove(CurrentColorPalette);
delete CurrentColorPalette; }
2312 b.ClassMember(
"fDISPLAY",
"TString");
2314 b.ClassMember(
"fDoubleBuffer",
"Int_t");
2316 b.ClassMember(
"fRetained",
"Bool_t");
2318 b.ClassMember(
"fXsizeUser",
"Size_t");
2320 b.ClassMember(
"fYsizeUser",
"Size_t");
2322 b.ClassMember(
"fXsizeReal",
"Size_t");
2324 b.ClassMember(
"fYsizeReal",
"Size_t");
2330 b.ClassMember(
"fWindowTopX",
"Int_t");
2332 b.ClassMember(
"fWindowTopY",
"Int_t");
2334 b.ClassMember(
"fWindowWidth",
"UInt_t");
2336 b.ClassMember(
"fWindowHeight",
"UInt_t");
2338 b.ClassMember(
"fCw",
"UInt_t");
2340 b.ClassMember(
"fCh",
"UInt_t");
2342 b.ClassMember(
"fCatt",
"TAttCanvas");
2344 b.ClassMember(
"kMoveOpaque",
"Bool_t");
2346 b.ClassMember(
"kResizeOpaque",
"Bool_t");
2348 b.ClassMember(
"fHighLightColor",
"Color_t");
2350 b.ClassMember(
"fBatch",
"Bool_t");
2352 b.ClassMember(
"kShowEventStatus",
"Bool_t");
2354 b.ClassMember(
"kAutoExec",
"Bool_t");
2356 b.ClassMember(
"kMenuBar",
"Bool_t");
2358 b.ClassEnd(TCanvas::IsA());
2359 b.SetByteCount(R__c,
kTRUE);
2423 gPad->GetGLDevice() != -1);
2427 static_cast<TCanvas*
>(TheCanvas)->Update();
2439 static const union CastFromFuncToVoidPtr_t {
2441 void (*fFuncPtr)(
void*);
2443 } castFromFuncToVoidPtr;
2448 arr[2] = castFromFuncToVoidPtr.fVoidPtr;
2449 if ((*
gThreadXAR)(
"CUPD", 3, arr, 0))
return;
2526 Error(
"CreatePainter",
"GL Painter creation failed! Will use default!");
static const double x2[5]
static const double x1[5]
static RooMathCoreReg dummy
R__EXTERN TApplication * gApplication
void ROOT_TCanvas_Update(void *TheCanvas)
static TCanvasInit gCanvasInit
const Size_t kDefaultCanvasSize
R__EXTERN TGuiFactory * gBatchGuiFactory
R__EXTERN TGuiFactory * gGuiFactory
R__EXTERN TVirtualMutex * gROOTMutex
char * Form(const char *fmt,...)
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TStyle * gStyle
typedef void((*Func_t)())
#define R__LOCKGUARD(mutex)
R__EXTERN TVirtualPS * gVirtualPS
R__EXTERN Int_t(* gThreadXAR)(const char *xact, Int_t nb, void **ar, Int_t *iret)
void InitializeGraphics()
Initialize the graphics environment.
static void CreateApplication()
Static function used to create a default application environment.
static void NeedGraphicsLibs()
Static method.
Array of integers (32 bits per element).
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
Manages default Pad attributes.
virtual void SetBottomMargin(Float_t bottommargin)
Set Pad bottom margin in fraction of the pad height.
virtual void SetLeftMargin(Float_t leftmargin)
Set Pad left margin in fraction of the pad width.
virtual void Copy(TAttPad &attpad) const
copy function
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
Class to manage histogram axis.
virtual Bool_t GetTimeDisplay() const
virtual const char * GetTimeFormat() const
Using a TBrowser one can browse all ROOT objects.
Buffer base class used for serializing objects.
virtual Int_t InitWindow()
virtual void SetWindowTitle(const char *newTitle)
virtual TVirtualPadPainter * CreatePadPainter()
virtual void ShowToolBar(Bool_t show=kTRUE)
virtual void ShowMenuBar(Bool_t show=kTRUE)
virtual void ShowEditor(Bool_t show=kTRUE)
virtual Bool_t PerformUpdate()
virtual void ShowStatusBar(Bool_t show=kTRUE)
virtual void ShowToolTips(Bool_t show=kTRUE)
virtual void SetStatusText(const char *text=0, Int_t partidx=0)
virtual UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
virtual void SetCanvasSize(UInt_t w, UInt_t h)
void Init()
Initialize the TCanvas members. Called by all constructors.
UInt_t fCw
Width of the canvas along X (pixels)
void EmbedInto(Int_t winid, Int_t ww, Int_t wh)
Embedded a canvas into a TRootEmbeddedCanvas.
void SetWindowSize(UInt_t ww, UInt_t wh)
static void SetFolder(Bool_t isfolder=kTRUE)
If isfolder=kTRUE, the canvas can be browsed like a folder by default a canvas is not browsable.
UInt_t GetWindowHeight() const
virtual void EditorBar()
Get editor bar.
static TCanvas * MakeDefCanvas()
Static function to build a default canvas.
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the curre...
Size_t fYsizeReal
Current size of canvas along Y in CM.
UInt_t GetWh() const
Get Wh.
void Constructor()
Canvas default constructor.
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
void SetCanvasSize(UInt_t ww, UInt_t wh)
Set Width and Height of canvas to ww and wh respectively.
Int_t fWindowTopX
Top X position of window (in pixels)
virtual void ToggleToolTips()
Toggle tooltip display.
virtual void Draw(Option_t *option="")
Draw a canvas.
Int_t GetWindowTopX()
Returns current top x position of window on screen.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void ToggleEventStatus()
Toggle event statusbar.
virtual void SetName(const char *name="")
Set canvas name. In case name is an empty string, a default name is set.
void Destructor()
Actual canvas destructor.
virtual void SetDoubleBuffer(Int_t mode=1)
Set Double Buffer On/Off.
void Clear(Option_t *option="")
Remove all primitives from the canvas.
virtual void SetFixedAspectRatio(Bool_t fixed=kTRUE)
Fix canvas aspect ratio to current value if fixed is true.
void DeleteCanvasPainter()
assert on IsBatch() == false?
TPad * fPadSave
! Pointer to saved pad in HandleInput
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Bool_t fBatch
! True when in batchmode
Bool_t fUseGL
! True when rendering is with GL
Int_t fEventX
! Last X mouse position in canvas
TCanvas(const TCanvas &canvas)
virtual void Paint(Option_t *option="")
Paint canvas.
Size_t fXsizeReal
Current size of canvas along X in CM.
Bool_t HasMenuBar() const
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
virtual void HighlightConnect(const char *slot)
This is "simplification" for function TCanvas::Connect with Highlighted signal for specific slot.
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Color_t GetHighLightColor() const
Get highlight color.
Bool_t GetShowToolBar() const
void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selected)
Report name and title of primitive below the cursor.
UInt_t fWindowWidth
Width of window (including borders, etc.)
TVirtualPadPainter * fPainter
! Canvas (pad) painter.
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this canvas A new canvas is created that is a clone of this canvas.
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
TPad * fClickSelectedPad
! Pad containing currently click-selected object
void SetSelected(TObject *obj)
Set selected canvas.
Bool_t fUpdating
! True when Updating the canvas
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
Color_t fHighLightColor
Highlight color of active pad.
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0)
Set the canvas scale in centimeters.
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Emit ProcessedEvent() signal.
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
Bool_t IsFolder() const
Is folder ?
Bool_t IsBatch() const
Is pad in batch mode ?
Size_t fXsizeUser
User specified size of canvas along X in CM.
Int_t fEventY
! Last Y mouse position in canvas
virtual void ls(Option_t *option="") const
List all pads.
UInt_t fWindowHeight
Height of window (including menubar, borders, etc.)
Int_t GetWindowTopY()
Returns current top y position of window on screen.
TObject * fClickSelected
! Currently click-selected object
TPad * fSelectedPad
! Pad containing currently selected object
virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event)
Emit Selected() signal.
virtual void Update()
Update canvas pad buffers.
Int_t fSelectedX
! X of selected object
virtual void ToggleEditor()
Toggle editor.
virtual void Picked(TPad *selpad, TObject *selected, Int_t event)
Emit Picked() signal.
TObject * fSelected
! Currently selected object
TVirtualPad * GetSelectedPad() const
void UseCurrentStyle()
Force a copy of current style for all objects in canvas.
void SetTitle(const char *title="")
Set canvas title.
Bool_t GetShowToolTips() const
Int_t fCanvasID
! Canvas identifier
void SetGrayscale(Bool_t set=kTRUE)
Set whether this canvas should be painted in grayscale, and re-paint it if necessary.
virtual void SetCursor(ECursor cursor)
Set cursor.
UInt_t fCh
Height of the canvas along Y (pixels)
TContextMenu * fContextMenu
! Context menu pointer
TAttCanvas fCatt
Canvas attributes.
UInt_t GetWindowWidth() const
Bool_t fRetained
Retain structure flag.
void DisconnectWidget()
Used by friend class TCanvasImp.
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
UInt_t GetWw() const
Get Ww.
void Build()
Build a canvas. Called by all constructors.
virtual void Closed()
Emit Closed signal.
void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitives in this canvas in C++ macro file with GUI.
Int_t fWindowTopY
Top Y position of window (in pixels)
void Close(Option_t *option="")
Close canvas.
void CopyPixmaps()
Copy the canvas pixmap of the pad to the canvas.
void RunAutoExec()
Execute the list of TExecs in the current pad.
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
TCanvasImp * fCanvasImp
! Window system specific canvas implementation
virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y)
Emit Highlighted() signal.
void Flush()
Flush canvas buffers.
Size_t fYsizeUser
User specified size of canvas along Y in CM.
Int_t fDoubleBuffer
Double buffer flag (0=off, 1=on)
virtual void Browse(TBrowser *b)
Browse.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
void CreatePainter()
Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpaint...
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
virtual ~TCanvas()
Canvas destructor.
static Bool_t fgIsFolder
Indicates if canvas can be browsed as a folder.
TString fDISPLAY
Name of destination screen.
bool SetRealAspectRatio(const Int_t axis=1)
Function to resize a canvas so that the plot inside is shown in real aspect ratio.
Int_t fEvent
! Type of current or last handled event
Bool_t GetShowEventStatus() const
TString fSelectedOpt
! Drawing option of selected object
Int_t fSelectedY
! Y of selected object
Bool_t fDrawn
! Set to True when the Draw method is called
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
virtual void ToggleToolBar()
Toggle toolbar.
virtual TObject * DrawClonePad()
Draw a clone of this canvas into the current pad In an interactive session, select the destination/cu...
void SetBatch(Bool_t batch=kTRUE)
Toggle batch mode.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static ENewType IsCallingNew()
Static method returning the defConstructor flag passed to TClass::New().
void SetName(const char *name)
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
The color creation and management class.
virtual void SetRGB(Float_t r, Float_t g, Float_t b)
Initialize this color and its associated colors.
static const TArrayI & GetPalette()
Static function returning the current active palette.
static void SaveColor(std::ostream &out, Int_t ci)
Save a color with index > 228 as a C++ statement(s) on output stream out.
static Bool_t DefinedColors()
Static function returning kTRUE if some new colors have been defined after initialisation or since th...
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
UInt_t Convert(Bool_t toGMT=kFALSE) const
Convert fDatime from TDatime format to the standard time_t format.
const char * AsString() const
Return the date & time as a string (ctime() format).
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual TCanvasImp * CreateCanvasImp(TCanvas *c, const char *title, UInt_t width, UInt_t height)
Create a batch version of TCanvasImp.
Option_t * GetOption() const
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntries() const
Return the number of objects in array (i.e.
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
virtual Option_t * GetOption() const
Mother of all ROOT objects.
virtual void Clear(Option_t *="")
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
@ kNotDeleted
object has not been deleted
R__ALWAYS_INLINE Bool_t IsOnHeap() const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to an event at (px,py).
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual const char * GetTitle() const
Returns title of object.
virtual void Pop()
Pop on object drawn in a pad to the top of the display list.
@ kNoContextMenu
if object does not want context menu
@ kMustCleanup
if object destructor must call RecursiveRemove()
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Implement TVirtualPadPainter which abstracts painting operations.
The most important graphics class in the ROOT system.
void HighLight(Color_t col=kRed, Bool_t set=kTRUE)
Highlight pad.
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.
void PaintBorder(Color_t color, Bool_t tops)
Paint the pad border.
virtual void SetGridx(Int_t value=1)
virtual void Close(Option_t *option="")
Delete all primitives in pad and pad itself.
virtual void CopyPixmaps()
Copy the sub-pixmaps of the pad to the canvas.
Double_t fX2
X of upper X coordinate.
virtual void SetGridy(Int_t value=1)
virtual void SetLogx(Int_t value=1)
Set Lin/Log scale for X.
virtual void ls(Option_t *option="") const
List all primitives in pad.
virtual Color_t GetHighLightColor() const
Get highlight color.
Double_t fX1
X of lower X coordinate.
virtual void SetTicks(Int_t valuex=1, Int_t valuey=1)
virtual void CopyPixmap()
Copy the pixmap of the pad to the canvas.
Double_t fY1
Y of lower Y coordinate.
Int_t fGLDevice
! OpenGL off-screen pixmap identifier
const char * GetTitle() const
Returns title of object.
const char * GetName() const
Returns name of object.
virtual 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)
Set all pad parameters.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Double_t fAspectRatio
ratio of w/h in case of fixed ratio
TCanvas * fCanvas
! Pointer to mother canvas
void Clear(Option_t *option="")
Delete all pad primitives.
Bool_t fFixedAspectRatio
True if fixed aspect ratio.
virtual void UseCurrentStyle()
Force a copy of current style for all objects in pad.
virtual void SetTickx(Int_t value=1)
virtual void SetBorderMode(Short_t bordermode)
virtual void PaintModified()
Traverse pad hierarchy and (re)paint only modified pads.
void Modified(Bool_t flag=1)
virtual void Paint(Option_t *option="")
Paint all primitives in pad.
virtual TCanvas * GetCanvas() const
TList * fPrimitives
->List of primitives (subpads)
Short_t fBorderSize
pad bordersize in pixels
virtual void Update()
Update pad.
virtual Short_t GetBorderMode() const
TList * GetListOfPrimitives() const
Int_t fPixmapID
! Off-screen pixmap identifier
virtual Short_t GetBorderSize() const
virtual void SetTicky(Int_t value=1)
virtual void ResizePad(Option_t *option="")
Compute pad conversion coefficients.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitives in this pad on the C++ source file out.
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
virtual void SetLogz(Int_t value=1)
Set Lin/Log scale for Z.
Double_t fY2
Y of upper Y coordinate.
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Set world coordinate system for the pad.
Short_t fBorderMode
Bordermode (-1=down, 0 = no border, 1=up)
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
virtual void SetFillStyle(Style_t fstyle)
Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.
TPad * fMother
! pointer to mother of the list
virtual void SetBorderSize(Short_t bordersize)
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
void ToLower()
Change string to lower-case.
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Double_t GetTimeOffset() const
Int_t GetOptTitle() const
void SetCanvasBorderSize(Width_t size=1)
Float_t GetScreenFactor() const
Int_t GetPadTickX() const
void SetCanvasColor(Color_t color=19)
Float_t GetPadRightMargin() const
void SetCanvasBorderMode(Int_t mode=1)
void SetPalette(Int_t ncolors=kBird, Int_t *colors=0, Float_t alpha=1.)
See TColor::SetPalette.
Int_t GetCanvasDefH() const
Int_t GetCanvasDefX() const
Bool_t GetPadGridY() const
Float_t GetPadLeftMargin() const
Bool_t GetCanvasPreferGL() const
Int_t GetCanvasDefY() const
Bool_t GetPadGridX() const
Int_t GetPadTickY() const
Color_t GetCanvasColor() const
Float_t GetPadBottomMargin() const
Int_t GetCanvasDefW() const
Int_t GetCanvasBorderMode() const
Width_t GetCanvasBorderSize() const
Float_t GetPadTopMargin() const
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
virtual void LockPainter()
Empty definition.
static TVirtualPadPainter * PadPainter(Option_t *opt="")
Create a pad painter of specified type.
virtual void SelectDrawable(Int_t device)=0
virtual void InitPainter()
Empty definition.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
static constexpr double s
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.