75 x0 =
gPad->AbsPixeltoX(px);
78 y0 =
gPad->AbsPixeltoY(py);
84 xold =
gPad->AbsPixeltoX(px);
85 yold =
gPad->AbsPixeltoY(py);
126 x1 =
gPad->AbsPixeltoX(px);
127 y1 =
gPad->AbsPixeltoY(py);
142 gROOT->SetEditorMode();
157 static Int_t pxold, pyold;
158 static Int_t px0, py0;
164 x0 =
gPad->AbsPixeltoX(px);
165 y0 =
gPad->AbsPixeltoY(py);
167 pxold = px; pyold = py;
176 x1 =
gPad->AbsPixeltoX(pxold);
177 y1 =
gPad->AbsPixeltoY(pyold);
256 gROOT->SetEditorMode();
271 static Int_t px1old, py1old, px2old, py2old;
272 static Int_t px1, py1, px2, py2, pxl, pyl, pxt, pyt;
280 while ((obj = next())) {
291 px1 =
gPad->XtoAbsPixel(
gPad->GetX1());
292 py1 =
gPad->YtoAbsPixel(
gPad->GetY1());
293 px2 =
gPad->XtoAbsPixel(
gPad->GetX2());
294 py2 =
gPad->YtoAbsPixel(
gPad->GetY2());
295 px1old = px; py1old = py;
331 gROOT->SetEditorMode();
332 if (xup <= xlow || yup <= ylow)
return;
334 if (newpad->IsZombie())
break;
337 auto canvas =
gPad->GetCanvas();
372 gROOT->SetEditorMode();
384 }
else if (isprint(py)) {
396 x0 =
gPad->AbsPixeltoX(px);
397 y0 =
gPad->AbsPixeltoY(py);
401 xold =
gPad->AbsPixeltoX(px);
402 yold =
gPad->AbsPixeltoY(py);
404 xp0 =
gPad->PadtoX(x0);
405 xp1 =
gPad->PadtoX(xold);
406 yp0 =
gPad->PadtoY(y0);
407 yp1 =
gPad->PadtoY(yold);
558 gROOT->SetEditorMode();
571 static Int_t pxnew, pynew, pxold, pyold, dp;
573 static Int_t npoints = 0;
584 gPad->PadtoY(
gPad->AbsPixeltoY(pynew)));
587 xnew =
gPad->PadtoX(
gPad->AbsPixeltoX(pxnew));
588 ynew =
gPad->PadtoY(
gPad->AbsPixeltoY(pynew));
590 pxold =
gPad->XtoAbsPixel(xold);
591 pyold =
gPad->YtoAbsPixel(yold);
605 gROOT->SetEditorMode();
616 gPad->PadtoY(
gPad->AbsPixeltoY(pynew)));
634 gROOT->SetEditorMode();
644 gPad->PadtoY(
gPad->AbsPixeltoY(pynew)));
705 auto &parent = *
gPad;
708 if (inter && !parent.FindObject(inter->fLatex)) {
709 parent.FreeInteractive(&parent);
723 parent.Modified(
kTRUE);
724 gROOT->SetEditorMode();
727 parent.FreeInteractive(&parent);
729 if (inter->PressBackspace()) {
730 parent.Modified(
kTRUE);
733 }
else if (isprint(py)) {
734 inter->AppendChar((
char)py);
735 parent.Modified(
kTRUE);
744 inter->FinishEditing();
746 parent.Modified(
kTRUE);
747 gROOT->SetEditorMode();
750 parent.FreeInteractive(&parent);
754 Double_t x = parent.PadtoX(parent.AbsPixeltoX(px));
755 Double_t y = parent.PadtoY(parent.AbsPixeltoY(py));
759 parent.GetCanvas()->Selected(&parent, marker,
kButton1Down);
761 gROOT->SetEditorMode();
763 ((
TPad *)&parent)->StartEditing();
768 parent.Modified(
kTRUE);
770 gROOT->SetEditorMode(
"Editor");
double Double_t
Double 8 bytes.
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char y1
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
Draw all kinds of Arrows.
static Option_t * GetDefaultOption()
Get default option.
void Draw(Option_t *option="") override
Draw this arrow with its current attributes.
static Float_t GetDefaultArrowSize()
Get default arrow size.
void Draw(Option_t *option="") override
Draw this box with its current attributes.
virtual void SetY2(Double_t y2)
virtual void SetX1(Double_t x1)
virtual void SetX2(Double_t x2)
virtual void SetY1(Double_t y1)
static void Pave(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new pavetext in gPad.
static TPavesText * fgPavesText
static TCurlyLine * fgCLine
static void Line(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new line/arrow in this gPad.
static TEllipse * fgEllipse
static void PolyLine(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new PolyLine in gPad.
static void Text(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new TLatex at the cursor position in gPad.
virtual ~TCreatePrimitives()
TCreatePrimitives destructor.
static void Ellipse(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new arc/ellipse in this gPad.
static TCurlyArc * fgCArc
static TGraph * fgPolyLine
static TPaveText * fgPaveText
static TPaveLabel * fgPaveLabel
TCreatePrimitives()
TCreatePrimitives default constructor.
static void Pad(Int_t event, Int_t px, Int_t py, Int_t)
Create a new pad in gPad.
static TDiamond * fgDiamond
Implements curly or wavy arcs used to draw Feynman diagrams.
virtual void SetRadius(Double_t radius)
Set Curly Arc radius.
static Double_t GetDefaultWaveLength()
Get default wave length.
static Double_t GetDefaultAmplitude()
Get default wave amplitude.
Implements curly or wavy polylines used to draw Feynman diagrams.
virtual void SetStartPoint(Double_t x1, Double_t y1)
Set start point.
static Double_t GetDefaultWaveLength()
Get default wave length.
static Double_t GetDefaultAmplitude()
Get default amplitude.
virtual void SetEndPoint(Double_t x2, Double_t y2)
Set end point.
void Draw(Option_t *option="") override
Draw this diamond with its current attributes.
virtual void SetR1(Double_t r1)
virtual void SetX1(Double_t x1)
void Draw(Option_t *option="") override
Draw this ellipse with its current attributes.
virtual void SetY1(Double_t y1)
virtual void SetR2(Double_t r2)
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
@ kClipFrame
Clip to the frame boundary.
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
virtual void Set(Int_t n)
Set number of points in the graph Existing coordinates are preserved New coordinates above fNpoints a...
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
Get x and y values for point number i.
To draw Mathematical Formula.
Use the TLine constructor to create a simple line.
virtual void SetY2(Double_t y2)
virtual void SetX2(Double_t x2)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetTitle() const override
Returns title of object.
Mother of all ROOT objects.
virtual void Delete(Option_t *option="")
Delete this object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The most important graphics class in the ROOT system.
A Pave (see TPave) with a text centered in the Pave.
virtual void SetLabel(const char *label)
void Draw(Option_t *option="") override
Draw this pavelabel with its current attributes.
const char * GetTitle() const override
Returns title of object.
A Pave (see TPave) with text, lines or/and boxes inside.
void Draw(Option_t *option="") override
Draw this pavetext with its current attributes.
A TBox with a bordersize and a shadow option.
void SetX2(Double_t x2) override
Set the X2 value.
void Draw(Option_t *option="") override
Draw this pave with its current attributes.
void SetX1(Double_t x1) override
Set the X1 value.
void SetY1(Double_t y1) override
Set the Y1 value.
void SetY2(Double_t y2) override
Set the Y2 value.
A PaveText (see TPaveText) with several stacked paves.
void Draw(Option_t *option="") override
Draw this pavestext with its current attributes.
void Draw(Option_t *option="") override
Draw this polyline with its current attributes.
TString & Insert(Ssiz_t pos, const char *s)
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
const char * Data() const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Color_t GetPadColor() const
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Internal class implementing tlatex editing.
TTextEditInteractive(TLatex *ltx)
Helper class to store interactive parameters for individual objects Should be used via MakeInteractiv...
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.