38 virtual ~MyMainFrame();
41 void SetStatusText(
const char *txt,
Int_t pi);
47void MyMainFrame::DoDraw()
60 y[i] = 10*
sin(
x[i]+0.2);
61 printf(
" i %i %f %f \n",i,
x[i],
y[i]);
75 c1->GetFrame()->SetFillColor(21);
76 c1->GetFrame()->SetBorderSize(12);
81void MyMainFrame::DoExit()
83 printf(
"Exit application...");
87void MyMainFrame::SetStatusText(
const char *txt,
Int_t pi)
90 fStatusBar->SetText(txt,
pi);
97 const char *text0, *text1, *text3;
100 SetStatusText(text0,0);
102 SetStatusText(text1,1);
104 sprintf(text2,
"%c", (
char) px);
106 sprintf(text2,
"%d,%d", px, py);
107 SetStatusText(text2,2);
109 SetStatusText(text3,3);
117 Int_t wid = fEcan->GetCanvasWindowId();
119 fEcan->AdoptCanvas(myc);
120 myc->
Connect(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
"MyMainFrame",
this,
121 "EventInfo(Int_t,Int_t,Int_t,TObject*)");
126 Int_t parts[] = {45, 15, 10, 30};
128 fStatusBar->SetParts(parts, 4);
129 fStatusBar->Draw3DCorner(
kFALSE);
136 draw->
Connect(
"Clicked()",
"MyMainFrame",
this,
"DoDraw()");
139 exit->
Connect(
"Pressed()",
"MyMainFrame",
this,
"DoExit()");
145 SetWindowName(
"Embedded Canvas Status Info");
149 Resize(GetDefaultSize());
156MyMainFrame::~MyMainFrame()
167 new MyMainFrame(
gClient->GetRoot(), 200, 200);
#define ClassDef(name, id)
R__EXTERN TApplication * gApplication
void Printf(const char *fmt,...)
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void SetTitle(const char *title="")
Change (i.e.
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
TAxis * GetXaxis() const
Get x axis of the graph.
TAxis * GetYaxis() const
Get y axis of the graph.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
virtual const char * GetTitle() const
Returns title of object.
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 constexpr double pi