Logo ROOT   6.08/07
Reference Guide
TFunctionParametersDialog.h
Go to the documentation of this file.
1 // @(#)root/ged:$Id$
2 // Author: Ilka Antcheva 08/05/06
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TFunctionParametersDialog
13 #define ROOT_TFunctionParametersDialog
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TFunctionParametersDialog //
18 // //
19 // This class is used for function parameter settings. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TGFrame
24 #include "TGFrame.h"
25 #endif
26 
27 
28 class TF1;
29 class TGNumberEntry;
30 class TGTextEntry;
31 class TGCheckButton;
32 class TGTextButton;
33 class TGTripleHSlider;
34 class TGNumberEntryField;
35 class TVirtualPad;
36 
37 
39 
40 protected:
41  TF1 *fFunc; // function passed to this dialog
42  TVirtualPad *fFpad; // pad where the function is drawn
43  Int_t fNP; // number of function parameters
44  Double_t *fPmin; // min limits of patameters range
45  Double_t *fPmax; // max limits of patameters range
46  Double_t *fPval; // original patameters' values
47  Double_t *fPerr; // original patameters' errors
48  Double_t fRangexmin; // min limits of patameters range
49  Double_t fRangexmax; // max limits of patameters range
50  Double_t fRXmin; // original min range
51  Double_t fRXmax; // original max range
52  TGCompositeFrame *fContNam; // container of parameter names
53  TGCompositeFrame *fContVal; // container of parameter values
54  TGCompositeFrame *fContFix; // container of fix settings
55  TGCompositeFrame *fContSld; // container of sliders
56  TGCompositeFrame *fContMin; // container of min range values
57  TGCompositeFrame *fContMax; // container of max range values
58  TGTextEntry **fParNam; // parameter names
59  TGCheckButton **fParFix; // fix setting check buttons
60  TGNumberEntry **fParVal; // parameter values
61  TGNumberEntryField **fParMin; // min range values
62  TGNumberEntryField **fParMax; // max range values
63  TGTripleHSlider **fParSld; // triple sliders
64  TGCheckButton *fUpdate; // Immediate update check button
65  TGTextButton *fApply; // Apply button
66  TGTextButton *fReset; // Reset button
67  TGTextButton *fOK; // Cancel button
68  TGTextButton *fCancel; // Cancel button
69  Bool_t fHasChanges; // kTRUE if function was redrawn;
70  Bool_t fImmediateDraw; // kTRUE if function is updated on run-time
71 
72 public:
74  TF1 *func, TVirtualPad *pad,
75  Double_t rmin, Double_t rmax);
77 
78  virtual void CloseWindow();
79  virtual void DoApply();
80  virtual void DoCancel();
81  virtual void DoFix(Bool_t on);
82  virtual void DoOK();
83  virtual void DoParMaxLimit();
84  virtual void DoParMinLimit();
85  virtual void DoParValue();
86  virtual void DoReset();
87  virtual void DoSlider();
88  virtual void HandleButtons(Bool_t update);
89  virtual void RedrawFunction();
90 
91  ClassDef(TFunctionParametersDialog, 0) // Function parameters dialog
92 };
93 
94 #endif
virtual ~TFunctionParametersDialog()
Destructor.
virtual void DoOK()
Slot related to the OK button.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void DoParMaxLimit()
Slot related to the maximum parameter limit settings.
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'.
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void RedrawFunction()
Redraw function graphics.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
virtual void DoApply()
Slot related to the Preview button.
virtual void DoParValue()
Slot related to the parameter value settings.
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
virtual void DoCancel()
Slot related to the Cancel button.
double Double_t
Definition: RtypesCore.h:55
double func(double *x, double *p)
Definition: stressTF1.cxx:213
virtual void DoParMinLimit()
Slot related to the minumum parameter limit settings.
virtual void DoReset()
Slot related to the Reset button.
1-Dim function class
Definition: TF1.h:149
virtual void CloseWindow()
Close parameters' dialog.
virtual void HandleButtons(Bool_t update)
Handle the button dependent states in this dialog.
virtual void DoSlider()
Slot related to the parameters' value settings.
virtual void DoFix(Bool_t on)
Slot related to the Fix check button.
int main(int argc, char **argv)