119 fParFix[i]->Connect(
"Toggled(Bool_t)",
"TFunctionParametersDialog",
this,
"DoFix(Bool_t)");
133 (
fParVal[i]->GetNumberEntry())->SetToolTipText(
Form(
"%s",
fFunc->GetParName(i)));
134 (
fParVal[i]->GetNumberEntry())->Connect(
"ReturnPressed()",
"TFunctionParametersDialog",
135 this,
"DoParValue()");
136 fParVal[i]->Connect(
"ValueSet(Long_t)",
"TFunctionParametersDialog",
this,
"DoParValue()");
149 fFunc->GetParName(i)));
159 fParMin[i]->Connect(
"ReturnPressed()",
"TFunctionParametersDialog",
this,
"DoParMinLimit()");
185 fFunc->GetParName(i)));
197 temp =
fParMax[i]->GetNumber();
201 fParMax[i]->Connect(
"ReturnPressed()",
"TFunctionParametersDialog",
this,
"DoParMaxLimit()");
207 fUpdate->SetToolTipText(
"Immediate function redrawing");
209 fUpdate->Connect(
"Toggled(Bool_t)",
"TFunctionParametersDialog",
this,
"HandleButtons(Bool_t)");
216 fReset->SetToolTipText(
"Reset the parameter settings");
218 fReset->Connect(
"Clicked()",
"TFunctionParametersDialog",
this,
"DoReset()");
223 fApply->Connect(
"Clicked()",
"TFunctionParametersDialog",
this,
"DoApply()");
224 fApply->SetToolTipText(
"Apply parameter settings and redraw the function");
228 fOK->SetToolTipText(
"Apply parameter settings, redraw function and close this dialog");
229 fOK->Connect(
"Clicked()",
"TFunctionParametersDialog",
this,
"DoOK()");
233 fCancel->SetToolTipText(
"Close this dialog with no parameter changes");
234 fCancel->Connect(
"Clicked()",
"TFunctionParametersDialog",
this,
"DoCancel()");
252 fParSld[i]->Connect(
"PointerPositionChanged()",
"TFunctionParametersDialog",
254 fParSld[i]->Connect(
"PositionChanged()",
"TFunctionParametersDialog",
296 txt =
"Do you want to apply last parameters' setting?";
332 if (
fParVal[i]->GetNumber() != 0) {
344 fParSld[i]->Disconnect(
"PointerPositionChanged()");
345 fParSld[i]->Disconnect(
"PositionChanged()");
348 }
else if (!
fParMin[i]->IsEnabled()) {
366 }
else if (
fPval[i]) {
375 temp =
fParMax[i]->GetNumber();
386 fParSld[i]->Connect(
"PointerPositionChanged()",
"TFunctionParametersDialog",
388 fParSld[i]->Connect(
"PositionChanged()",
"TFunctionParametersDialog",
466 temp =
fParMax[i]->GetNumber();
474 fParSld[i]->Disconnect(
"PointerPositionChanged()");
475 fParSld[i]->Disconnect(
"PositionChanged()");
481 if (!
fParMax[i]->IsEnabled()) {
489 fParSld[i]->Connect(
"PointerPositionChanged()",
"TFunctionParametersDialog",
491 fParSld[i]->Connect(
"PositionChanged()",
"TFunctionParametersDialog",
521 fFunc->SetParameter(i,
fParSld[i]->GetPointerPosition());
565 fFunc->SetParameter(i,
fParSld[i]->GetPointerPosition());
592 txt =
"The lower parameter bound cannot be bigger then the upper one.";
628 txt =
"The lower parameter bound cannot be bigger then the upper one.";
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
TGCompositeFrame * fContMin
container of min range values
Double_t * fPmax
max limits of patameters range
TGNumberEntryField ** fParMin
min range values
virtual void DoApply()
Slot related to the Preview button.
TGCompositeFrame * fContNam
container of parameter names
TGTextButton * fApply
Apply button.
Double_t * fPerr
original patameters' errors
virtual void DoReset()
Slot related to the Reset button.
virtual void RedrawFunction()
Redraw function graphics.
TGCheckButton ** fParFix
fix setting check buttons
TGNumberEntryField ** fParMax
max range values
TF1 * fFunc
function passed to this dialog
Int_t fNP
number of function parameters
void CloseWindow() override
Close parameters' dialog.
virtual void DoFix(Bool_t on)
Slot related to the Fix check button.
TGTextEntry ** fParNam
parameter names
virtual void DoParMinLimit()
Slot related to the minumum parameter limit settings.
Double_t fRangexmin
min limits of patameters range
TGTextButton * fOK
Cancel button.
TFunctionParametersDialog(const TGWindow *p, const TGWindow *main, TF1 *func, TVirtualPad *pad, Double_t rmin, Double_t rmax)
Create the parameters' dialog of currently selected function 'func'.
virtual void DoOK()
Slot related to the OK button.
Double_t fRXmax
original max range
TGCompositeFrame * fContVal
container of parameter values
Double_t * fPmin
min limits of patameters range
virtual void DoParMaxLimit()
Slot related to the maximum parameter limit settings.
virtual void HandleButtons(Bool_t update)
Handle the button dependent states in this dialog.
TGTripleHSlider ** fParSld
triple sliders
Double_t * fPval
original patameters' values
TGCheckButton * fUpdate
Immediate update check button.
TGTextButton * fCancel
Cancel button.
virtual void DoSlider()
Slot related to the parameters' value settings.
TGCompositeFrame * fContMax
container of max range values
Double_t fRangexmax
max limits of patameters range
Bool_t fHasChanges
kTRUE if function was redrawn;
~TFunctionParametersDialog() override
Destructor.
TGCompositeFrame * fContSld
container of sliders
TGNumberEntry ** fParVal
parameter values
TGTextButton * fReset
Reset button.
TVirtualPad * fFpad
pad where the function is drawn
virtual void DoCancel()
Slot related to the Cancel button.
virtual void DoParValue()
Slot related to the parameter value settings.
TGCompositeFrame * fContFix
container of fix settings
Double_t fRXmin
original min range
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
Int_t GetState(TGFrame *f) const
Get state of sub frame.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
void MapWindow() override
map window
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual void DeleteWindow()
Delete window.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the 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.
TGTransientFrame(const TGTransientFrame &)=delete
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
TripleSlider inherit from DoubleSlider widgets and allow easy selection of a min, max and pointer val...
ROOT GUI Window base class.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void ToUpper()
Change string to upper case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
int main(int argc, char **argv)