54 :
TButton(title,method,x1,y1,x2,y2)
86 snprintf(command,32,
"%s(%d)",action,10*j+i+1);
87 colorpad =
new TGroupButton(
"Color",
"",command,xlow, ylow, xlow+0.9*ws, ylow+0.9*hs);
109 char *params = strchr(method,
'(');
113 char *end = strrchr(params,
')');
119 if (strcmp(method,
"PIXELS")) {
125 auto pad =
gROOT->GetSelectedPad();
131 dy = (pad->AbsPixeltoY(0) - pad->AbsPixeltoY(npixels))/(pl->
GetY2() - pl->
GetY1());
133 obj->
Execute(
"SetTextSize",params);
136 dy = (pad->AbsPixeltoY(0) - pad->AbsPixeltoY(npixels))/(pad->GetY2() - pad->GetY1());
138 obj->
Execute(
"SetTextSize",params);
140 snprintf(params, nmax,
"%d", npixels);
141 obj->
Execute(
"SetTextSizePixels", params);
160 TIter next(
c->GetListOfPrimitives());
180 if (!strcasecmp(
GetName(),
"APPLY")) {
182 if (!strcasecmp(
GetTitle(),
"CLOSE")) {
196 while ((obj = next())) {
197 if (obj ==
this)
continue;
236 out <<
" grbutton->SetBorderSize(" <<
GetBorderSize() <<
");\n";
239 out <<
" grbutton->SetBorderMode(" <<
GetBorderMode() <<
");\n";
241 out <<
" grbutton->Draw();\n";
247 while (
auto obj = next()) {
249 out <<
" grbutton->cd();\n";
250 obj->SavePrimitive(out, next.
GetOption());
254 out <<
" " << ctxt.
GetSaved()->GetName() <<
"->cd();\n";
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char).
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
virtual void SaveTextAttributes(std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1)
void Close(Option_t *option="") override
Close canvas.
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
A canvas specialized to set attributes.
virtual void Apply(const char *action="")
Called when the APPLY button is executed.
TObject * GetRefObject() const
Option_t * GetOption() const
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
Mother of all ROOT objects.
virtual void Execute(const char *method, const char *params, Int_t *error=nullptr)
Execute method on this object with the given parameter string, e.g.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
Short_t GetBorderMode() const override
void SetBorderSize(Short_t bordersize) override
Double_t fWNDC
Width of pad along X in Normalized Coordinates (NDC).
TPad(const TPad &pad)=delete
const char * GetTitle() const override
Returns title of object.
TList * GetListOfPrimitives() const override
Double_t fYlowNDC
Y bottom left corner of pad in NDC [0,1].
void Update() override
Update pad.
Int_t YtoPixel(Double_t y) const override
Convert Y coordinate to pixel.
TVirtualPad * GetMother() const override
void Modified(Bool_t flag=true) override
Mark pad modified Will be repainted when TCanvas::Update() will be called next time.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Short_t GetBorderSize() const override
TCanvas * GetCanvas() const override
Double_t fHNDC
Height of pad along Y in Normalized Coordinates (NDC).
Double_t fXlowNDC
X bottom left corner of pad in NDC [0,1].
TPad * fMother
! pointer to mother of the list
const char * GetName() const override
Returns name of object.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
small helper class to store/restore gPad context in TPad methods