ROOT logo
// @(#)root/ged:$Id: TFunctionParametersDialog.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Ilka Antcheva 08/05/06

/*************************************************************************
 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TFunctionParametersDialog
#define ROOT_TFunctionParametersDialog

//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TFunctionParametersDialog                                           //
//                                                                      //
//  This class is used for function parameter settings.                 //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif


class TF1;
class TGNumberEntry;
class TGTextEntry;
class TGCheckButton;
class TGTextButton;
class TGTripleHSlider;
class TGNumberEntryField;
class TVirtualPad;


class TFunctionParametersDialog : public TGTransientFrame {

protected:
   TF1                 *fFunc;            // function passed to this dialog
   TVirtualPad         *fFpad;            // pad where the function is drawn
   Int_t                fNP;              // number of function parameters
   Double_t            *fPmin;            // min limits of patameters range
   Double_t            *fPmax;            // max limits of patameters range
   Double_t            *fPval;            // original patameters' values
   Double_t            *fPerr;            // original patameters' errors
   Double_t             fRangexmin;       // min limits of patameters range
   Double_t             fRangexmax;       // max limits of patameters range
   Double_t             fRXmin;           // original min range
   Double_t             fRXmax;           // original max range
   TGCompositeFrame    *fContNam;         // container of parameter names
   TGCompositeFrame    *fContVal;         // container of parameter values
   TGCompositeFrame    *fContFix;         // container of fix settings
   TGCompositeFrame    *fContSld;         // container of sliders
   TGCompositeFrame    *fContMin;         // container of min range values
   TGCompositeFrame    *fContMax;         // container of max range values
   TGTextEntry         **fParNam;         // parameter names
   TGCheckButton       **fParFix;         // fix setting check buttons
   TGNumberEntry       **fParVal;         // parameter values
   TGNumberEntryField  **fParMin;         // min range values
   TGNumberEntryField  **fParMax;         // max range values
   TGTripleHSlider     **fParSld;         // triple sliders
   TGCheckButton       *fUpdate;          // Immediate update check button
   TGTextButton        *fApply;           // Apply button
   TGTextButton        *fReset;           // Reset button
   TGTextButton        *fOK;              // Cancel button
   TGTextButton        *fCancel;          // Cancel button
   Bool_t              fHasChanges;       // kTRUE if function was redrawn;
   Bool_t              fImmediateDraw;    // kTRUE if function is updated on run-time

public:
   TFunctionParametersDialog(const TGWindow *p, const TGWindow *main,
                             TF1 *func, TVirtualPad *pad,
                             Double_t rmin, Double_t rmax);
   virtual ~TFunctionParametersDialog();

   virtual void  CloseWindow();
   virtual void  DoApply();
   virtual void  DoCancel();
   virtual void  DoFix(Bool_t on);
   virtual void  DoOK();
   virtual void  DoParMaxLimit();
   virtual void  DoParMinLimit();
   virtual void  DoParValue();
   virtual void  DoReset();
   virtual void  DoSlider();
   virtual void  HandleButtons(Bool_t update);
   virtual void  RedrawFunction();

   ClassDef(TFunctionParametersDialog, 0)  // Function parameters dialog
};

#endif
 TFunctionParametersDialog.h:1
 TFunctionParametersDialog.h:2
 TFunctionParametersDialog.h:3
 TFunctionParametersDialog.h:4
 TFunctionParametersDialog.h:5
 TFunctionParametersDialog.h:6
 TFunctionParametersDialog.h:7
 TFunctionParametersDialog.h:8
 TFunctionParametersDialog.h:9
 TFunctionParametersDialog.h:10
 TFunctionParametersDialog.h:11
 TFunctionParametersDialog.h:12
 TFunctionParametersDialog.h:13
 TFunctionParametersDialog.h:14
 TFunctionParametersDialog.h:15
 TFunctionParametersDialog.h:16
 TFunctionParametersDialog.h:17
 TFunctionParametersDialog.h:18
 TFunctionParametersDialog.h:19
 TFunctionParametersDialog.h:20
 TFunctionParametersDialog.h:21
 TFunctionParametersDialog.h:22
 TFunctionParametersDialog.h:23
 TFunctionParametersDialog.h:24
 TFunctionParametersDialog.h:25
 TFunctionParametersDialog.h:26
 TFunctionParametersDialog.h:27
 TFunctionParametersDialog.h:28
 TFunctionParametersDialog.h:29
 TFunctionParametersDialog.h:30
 TFunctionParametersDialog.h:31
 TFunctionParametersDialog.h:32
 TFunctionParametersDialog.h:33
 TFunctionParametersDialog.h:34
 TFunctionParametersDialog.h:35
 TFunctionParametersDialog.h:36
 TFunctionParametersDialog.h:37
 TFunctionParametersDialog.h:38
 TFunctionParametersDialog.h:39
 TFunctionParametersDialog.h:40
 TFunctionParametersDialog.h:41
 TFunctionParametersDialog.h:42
 TFunctionParametersDialog.h:43
 TFunctionParametersDialog.h:44
 TFunctionParametersDialog.h:45
 TFunctionParametersDialog.h:46
 TFunctionParametersDialog.h:47
 TFunctionParametersDialog.h:48
 TFunctionParametersDialog.h:49
 TFunctionParametersDialog.h:50
 TFunctionParametersDialog.h:51
 TFunctionParametersDialog.h:52
 TFunctionParametersDialog.h:53
 TFunctionParametersDialog.h:54
 TFunctionParametersDialog.h:55
 TFunctionParametersDialog.h:56
 TFunctionParametersDialog.h:57
 TFunctionParametersDialog.h:58
 TFunctionParametersDialog.h:59
 TFunctionParametersDialog.h:60
 TFunctionParametersDialog.h:61
 TFunctionParametersDialog.h:62
 TFunctionParametersDialog.h:63
 TFunctionParametersDialog.h:64
 TFunctionParametersDialog.h:65
 TFunctionParametersDialog.h:66
 TFunctionParametersDialog.h:67
 TFunctionParametersDialog.h:68
 TFunctionParametersDialog.h:69
 TFunctionParametersDialog.h:70
 TFunctionParametersDialog.h:71
 TFunctionParametersDialog.h:72
 TFunctionParametersDialog.h:73
 TFunctionParametersDialog.h:74
 TFunctionParametersDialog.h:75
 TFunctionParametersDialog.h:76
 TFunctionParametersDialog.h:77
 TFunctionParametersDialog.h:78
 TFunctionParametersDialog.h:79
 TFunctionParametersDialog.h:80
 TFunctionParametersDialog.h:81
 TFunctionParametersDialog.h:82
 TFunctionParametersDialog.h:83
 TFunctionParametersDialog.h:84
 TFunctionParametersDialog.h:85
 TFunctionParametersDialog.h:86
 TFunctionParametersDialog.h:87
 TFunctionParametersDialog.h:88
 TFunctionParametersDialog.h:89
 TFunctionParametersDialog.h:90
 TFunctionParametersDialog.h:91
 TFunctionParametersDialog.h:92
 TFunctionParametersDialog.h:93
 TFunctionParametersDialog.h:94