Logo ROOT   6.18/05
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#include "TGFrame.h"
24
25
26class TF1;
27class TGNumberEntry;
28class TGTextEntry;
29class TGCheckButton;
30class TGTextButton;
31class TGTripleHSlider;
33class TVirtualPad;
34
35
37
38protected:
39 TF1 *fFunc; // function passed to this dialog
40 TVirtualPad *fFpad; // pad where the function is drawn
41 Int_t fNP; // number of function parameters
42 Double_t *fPmin; // min limits of patameters range
43 Double_t *fPmax; // max limits of patameters range
44 Double_t *fPval; // original patameters' values
45 Double_t *fPerr; // original patameters' errors
46 Double_t fRangexmin; // min limits of patameters range
47 Double_t fRangexmax; // max limits of patameters range
48 Double_t fRXmin; // original min range
49 Double_t fRXmax; // original max range
50 TGCompositeFrame *fContNam; // container of parameter names
51 TGCompositeFrame *fContVal; // container of parameter values
52 TGCompositeFrame *fContFix; // container of fix settings
53 TGCompositeFrame *fContSld; // container of sliders
54 TGCompositeFrame *fContMin; // container of min range values
55 TGCompositeFrame *fContMax; // container of max range values
56 TGTextEntry **fParNam; // parameter names
57 TGCheckButton **fParFix; // fix setting check buttons
58 TGNumberEntry **fParVal; // parameter values
59 TGNumberEntryField **fParMin; // min range values
60 TGNumberEntryField **fParMax; // max range values
61 TGTripleHSlider **fParSld; // triple sliders
62 TGCheckButton *fUpdate; // Immediate update check button
63 TGTextButton *fApply; // Apply button
64 TGTextButton *fReset; // Reset button
65 TGTextButton *fOK; // Cancel button
66 TGTextButton *fCancel; // Cancel button
67 Bool_t fHasChanges; // kTRUE if function was redrawn;
68 Bool_t fImmediateDraw; // kTRUE if function is updated on run-time
69
70public:
72 TF1 *func, TVirtualPad *pad,
73 Double_t rmin, Double_t rmax);
75
76 virtual void CloseWindow();
77 virtual void DoApply();
78 virtual void DoCancel();
79 virtual void DoFix(Bool_t on);
80 virtual void DoOK();
81 virtual void DoParMaxLimit();
82 virtual void DoParMinLimit();
83 virtual void DoParValue();
84 virtual void DoReset();
85 virtual void DoSlider();
86 virtual void HandleButtons(Bool_t update);
87 virtual void RedrawFunction();
88
89 ClassDef(TFunctionParametersDialog, 0) // Function parameters dialog
90};
91
92#endif
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
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
#define ClassDef(name, id)
Definition: Rtypes.h:326
1-Dim function class
Definition: TF1.h:211
virtual void DoApply()
Slot related to the Preview button.
virtual void DoReset()
Slot related to the Reset button.
virtual void CloseWindow()
Close parameters' dialog.
virtual void RedrawFunction()
Redraw function graphics.
virtual ~TFunctionParametersDialog()
Destructor.
virtual void DoFix(Bool_t on)
Slot related to the Fix check button.
virtual void DoParMinLimit()
Slot related to the minumum 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'.
virtual void DoOK()
Slot related to the OK button.
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.
virtual void DoSlider()
Slot related to the parameters' value settings.
virtual void DoCancel()
Slot related to the Cancel button.
virtual void DoParValue()
Slot related to the parameter value settings.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:50
int main(int argc, char **argv)