33 TRootEmbeddedCanvas *fEcan;
34 TGStatusBar *fStatusBar;
38 ~MyMainFrame()
override;
41 void SetStatusText(
const char *txt,
Int_t pi);
47void MyMainFrame::DoDraw()
61 printf(
" i %i %f %f \n",
i,
x[
i],
y[
i]);
66 gr->SetMarkerColor(4);
67 gr->SetMarkerStyle(21);
68 gr->SetTitle(
"a simple graph");
69 gr->GetXaxis()->SetTitle(
"X title");
70 gr->GetYaxis()->SetTitle(
"Y title");
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 ClassDefOverride(name, id)
R__EXTERN TApplication * gApplication
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize MapSubwindows
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
A composite frame that layout their children in horizontal way.
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
Provides a StatusBar widget.
Yield an action as soon as it is clicked.
ROOT GUI Window base class.
A TGraph is an object made of two arrays X and Y with npoints each.
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.
This class creates a TGCanvas in which a TCanvas is created.
RVec< PromoteType< T > > sin(const RVec< T > &v)