00001 // @(#)root/ged:$Id: TFunctionParametersDialog.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: Ilka Antcheva 08/05/06 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TFunctionParametersDialog 00013 #define ROOT_TFunctionParametersDialog 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TFunctionParametersDialog // 00018 // // 00019 // This class is used for function parameter settings. // 00020 // // 00021 ////////////////////////////////////////////////////////////////////////// 00022 00023 #ifndef ROOT_TGFrame 00024 #include "TGFrame.h" 00025 #endif 00026 00027 00028 class TF1; 00029 class TGNumberEntry; 00030 class TGTextEntry; 00031 class TGCheckButton; 00032 class TGTextButton; 00033 class TGTripleHSlider; 00034 class TGNumberEntryField; 00035 class TVirtualPad; 00036 00037 00038 class TFunctionParametersDialog : public TGTransientFrame { 00039 00040 protected: 00041 TF1 *fFunc; // function passed to this dialog 00042 TVirtualPad *fFpad; // pad where the function is drawn 00043 Int_t fNP; // number of function parameters 00044 Double_t *fPmin; // min limits of patameters range 00045 Double_t *fPmax; // max limits of patameters range 00046 Double_t *fPval; // original patameters' values 00047 Double_t *fPerr; // original patameters' errors 00048 Double_t fRangexmin; // min limits of patameters range 00049 Double_t fRangexmax; // max limits of patameters range 00050 Double_t fRXmin; // original min range 00051 Double_t fRXmax; // original max range 00052 TGCompositeFrame *fContNam; // container of parameter names 00053 TGCompositeFrame *fContVal; // container of parameter values 00054 TGCompositeFrame *fContFix; // container of fix settings 00055 TGCompositeFrame *fContSld; // container of sliders 00056 TGCompositeFrame *fContMin; // container of min range values 00057 TGCompositeFrame *fContMax; // container of max range values 00058 TGTextEntry **fParNam; // parameter names 00059 TGCheckButton **fParFix; // fix setting check buttons 00060 TGNumberEntry **fParVal; // parameter values 00061 TGNumberEntryField **fParMin; // min range values 00062 TGNumberEntryField **fParMax; // max range values 00063 TGTripleHSlider **fParSld; // triple sliders 00064 TGCheckButton *fUpdate; // Immediate update check button 00065 TGTextButton *fApply; // Apply button 00066 TGTextButton *fReset; // Reset button 00067 TGTextButton *fOK; // Cancel button 00068 TGTextButton *fCancel; // Cancel button 00069 Bool_t fHasChanges; // kTRUE if function was redrawn; 00070 Bool_t fImmediateDraw; // kTRUE if function is updated on run-time 00071 00072 public: 00073 TFunctionParametersDialog(const TGWindow *p, const TGWindow *main, 00074 TF1 *func, TVirtualPad *pad, 00075 Double_t rmin, Double_t rmax); 00076 virtual ~TFunctionParametersDialog(); 00077 00078 virtual void CloseWindow(); 00079 virtual void DoApply(); 00080 virtual void DoCancel(); 00081 virtual void DoFix(Bool_t on); 00082 virtual void DoOK(); 00083 virtual void DoParMaxLimit(); 00084 virtual void DoParMinLimit(); 00085 virtual void DoParValue(); 00086 virtual void DoReset(); 00087 virtual void DoSlider(); 00088 virtual void HandleButtons(Bool_t update); 00089 virtual void RedrawFunction(); 00090 00091 ClassDef(TFunctionParametersDialog, 0) // Function parameters dialog 00092 }; 00093 00094 #endif