53 fTitle->SetToolTipText(
Form(
"Function expression or predefined name"));
59 fDrawMode->SetToolTipText(
"Immediate function redrawing");
68 fSetPars->SetToolTipText(
"Open a dialog for parameter(s) settings");
84 fNXpoints->GetNumberEntry()->SetToolTipText(
"Points along x-axis (4-100 000)");
125 fNXpoints->Connect(
"ValueSet(Long_t)",
"TF1Editor",
this,
"DoXPoints()");
126 (
fNXpoints->GetNumberEntry())->Connect(
"ReturnPressed()",
"TF1Editor",
127 this,
"DoXPoints()");
128 fSetPars->Connect(
"Clicked()",
"TF1Editor",
this,
"DoParameterSettings()");
129 fSliderX->Connect(
"Pressed()",
"TF1Editor",
this,
"DoSliderXPressed()");
130 fSliderX->Connect(
"Released()",
"TF1Editor",
this,
"DoSliderXReleased()");
131 fSliderX->Connect(
"PositionChanged()",
"TF1Editor",
this,
"DoSliderXMoved()");
148 const char *
text =
fF1->GetTitle();
162 TAxis *
x =
fF1->GetHistogram()->GetXaxis();
164 Int_t nxbinmin =
x->GetFirst();
165 Int_t nxbinmax =
x->GetLast();
168 fSldMinX->SetNumber(
x->GetBinLowEdge(nxbinmin));
169 fSldMaxX->SetNumber(
x->GetBinUpEdge(nxbinmax));
195 fF1->GetRange(rmin, rmax);
202 fF1->SetRange(rmin, rmax);
215 TAxis *
x =
fF1->GetHistogram()->GetXaxis();
226 fSldMinX->SetNumber(
x->GetBinLowEdge(
x->GetFirst()));
227 fSldMaxX->SetNumber(
x->GetBinUpEdge(
x->GetLast()));
236 fSldMinX->SetNumber(
x->GetBinLowEdge(
x->GetFirst()));
237 fSldMaxX->SetNumber(
x->GetBinUpEdge(
x->GetLast()));
254 TAxis *
x =
fF1->GetHistogram()->GetXaxis();
263 fSldMinX->SetNumber(
x->GetBinLowEdge(
x->GetFirst()));
264 fSldMaxX->SetNumber(
x->GetBinUpEdge(
x->GetLast()));
281 TAxis *
x =
fF1->GetHistogram()->GetXaxis();
290 fSldMinX->SetNumber(
x->GetBinLowEdge(
x->GetFirst()));
291 fSldMaxX->SetNumber(
x->GetBinUpEdge(
x->GetLast()));
305 TAxis *
x =
fF1->GetHistogram()->GetXaxis();
316 Int_t nxbinmin =
x->GetFirst();
317 Int_t nxbinmax =
x->GetLast();
ULong_t Pixel_t
Pixel value.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char text
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
int main(int argc, char *argv[])
Class to manage histogram axis.
TClass instances represent classes, structs and namespaces in the ROOT type system.
GUI for TF1 attributes and parameters.
TGCheckButton * fDrawMode
immediate function redraw (if selected)
virtual void DoXRange()
Slot connected to min/max settings of the slider range.
virtual void DoParameterSettings()
Slot connected to the function parameter(s) settings.
virtual void DoSliderXReleased()
Slot connected to the x-Slider.
void ActivateBaseClassEditors(TClass *cl) override
Exclude TAttFillEditor from this interface.
TF1Editor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
virtual void DoXPoints()
Slot connected to the number of points setting.
virtual void DoSliderXMoved()
Slot connected to the x-Slider range for function redrawing.
TGLabel * fParLabel
label for number of parameters
virtual void DoSliderXPressed()
Slot connected to the x-Slider.
Int_t fNP
number of function parameters
TGNumberEntryField * fSldMinX
contains minimum value of x-axis
TGDoubleHSlider * fSliderX
slider to set x-axis range
TGNumberEntry * fNXpoints
number of points along x-axis
~TF1Editor() override
Destructor of TF1 editor.
void SetModel(TObject *obj) override
Pick up the function parameters and options.
TF1 * fF1
selected TF1 object
TGNumberEntryField * fSldMaxX
contains maximum value of x-axis
TGTextButton * fSetPars
open 'Set Parameters' dialog
TGTextEntry * fTitle
function title
virtual void ConnectSignals2Slots()
Connect signals to slots.
This class is used for function parameter settings.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
TGCompositeFrame(const TGCompositeFrame &)=delete
Dragging the slider will generate the event:
This class handles GUI labels.
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
TGNumberEntry is a number entry input widget with up/down buttons.
TGClient * fClient
Connection to display server.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
ROOT GUI Window base class.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
TGedEditor * fGedEditor
manager of this frame
TGedFrame(const TGedFrame &)=delete
Bool_t fInit
init flag for setting signals/slots
virtual void MakeTitle(const char *title)
Create attribute frame title.
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Bool_t fAvoidSignal
flag for executing slots
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void ToUpper()
Change string to upper case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
small helper class to store/restore gPad context in TPad methods