// @(#)root/fitpanel:$Id$
// Author: David Gonzalez Maline 11/12/2008

/*************************************************************************
 * 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.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TAdvancedGraphicsDialog                                              //
//                                                                      //
// Allows to create advanced graphics from the last fit made in the     //
// fitpanel. This includes the scan graphics, the contour and the       //
// confidence levels.                                                   //
//////////////////////////////////////////////////////////////////////////

#include "TAdvancedGraphicsDialog.h"
#include "TGraph.h"
#include "TAxis.h"
#include "TPad.h"
#include "TColor.h"

#include "Fit/BinData.h"
#include "Math/IParamFunction.h"
#include "TGraphErrors.h"
#include "TGraph2DErrors.h"

#include <sstream>

#include <string>

TAdvancedGraphicsDialog::TAdvancedGraphicsDialog(const TGWindow *p, const TGWindow *main):
   TGTransientFrame(p, main, 10, 10, kVerticalFrame),
   fFitter((TBackCompFitter *) TVirtualFitter::GetFitter())
{
   // Creates the Advanced Graphics Dialog.


   if (!p && !main) {
      MakeZombie();
      return;
   }
   SetCleanup(kDeepCleanup);

   fMainFrame = new TGVerticalFrame(this);

   fTab = new TGTab(fMainFrame, 10, 10);
   fMainFrame->AddFrame(fTab, new TGLayoutHints(kLHintsExpandY | kLHintsExpandX, 5,5,5,0));
   fTab->SetCleanup(kDeepCleanup);
   fTab->Associate(this);

   // Add the first method to the dialog (Contour)
   CreateContourFrame();
   fTab->AddTab("Contour", fContourFrame);

   // Add the second method to the dialog (Scan)
   CreateScanFrame();
   fTab->AddTab("Scan", fScanFrame);

   CreateConfFrame();
   fTab->AddTab("Conf Intervals", fConfFrame);

   TGCompositeFrame * frame = new TGHorizontalFrame(fMainFrame);

   fDraw = new TGTextButton(frame, "&Draw", kAGD_BDRAW);
   fDraw->Associate(this);
   frame->AddFrame(fDraw, new TGLayoutHints(kLHintsCenterY | kLHintsExpandX, 5, 5, 0, 0));

   fClose = new TGTextButton(frame, "&Close", kAGD_BCLOSE);
   fClose->Associate(this);
   frame->AddFrame(fClose, new TGLayoutHints(kLHintsCenterY | kLHintsExpandX, 5, 5, 0, 0));

   UInt_t width = 0, height = 0;
   height = fClose->GetDefaultHeight();
   width  = TMath::Max(width, fClose->GetDefaultWidth());
   frame->Resize((width + 20) * 2, height);

   fMainFrame->AddFrame(frame, new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 0));

   this->AddFrame(fMainFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX,0,0,5,5));

   ConnectSlots();

   SetWindowName("Advanced Drawing Tools");

   // map all widgets and calculate size of dialog
   MapSubwindows();

   width  = GetDefaultWidth();
   height = GetDefaultHeight();

   Resize(width, height);
   MapWindow();

   // position relative to the parent's window
   CenterOnParent();

   // make the message box non-resizable
   SetWMSize(width, height);
   SetWMSizeHints(width, height, width, height, 0, 0);

   SetMWMHints(kMWMDecorAll | kMWMDecorResizeH  | kMWMDecorMaximize |
               kMWMDecorMinimize | kMWMDecorMenu,
               kMWMFuncAll  | kMWMFuncResize    | kMWMFuncMaximize |
               kMWMFuncMinimize,
               kMWMInputModeless);

   // popup dialog and wait till user replies
   gClient->WaitFor(this);
}

//______________________________________________________________________________
void TAdvancedGraphicsDialog::CreateContourFrame()
{
   // Create the frame that contains all the necessary information for
   // the Contour method.

   fContourFrame = new TGVerticalFrame(fTab);
   TGHorizontalFrame* frame = new TGHorizontalFrame(fContourFrame);

   TGLabel* label = new TGLabel(frame, "Number of Points: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   fContourPoints = new TGNumberEntry(frame, 40,
                                5, kAGD_SCANMIN,
                                TGNumberFormat::kNESInteger,
                                TGNumberFormat::kNEAPositive,
                                TGNumberFormat::kNELNoLimits);
   fContourPoints->Resize(130, 20);
   fContourPoints->GetNumberEntry()->SetToolTipText("Sets the number of points used for the contour");
   frame->AddFrame(fContourPoints, new TGLayoutHints(kLHintsNormal, 8, 0, 5, 0));
   fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));

   frame = new TGHorizontalFrame(fContourFrame);
   label = new TGLabel(frame, "Parameter 1: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   fContourPar1 = new TGComboBox(frame, kAGD_CONTPAR1);
   AddParameters(fContourPar1);
   fContourPar1->Resize(130, 20);
   fContourPar1->Associate(this);
   TGListBox *lb = fContourPar1->GetListBox();
   lb->Resize(lb->GetWidth(), 200);
   frame->AddFrame(fContourPar1, new TGLayoutHints(kLHintsNormal, 37, 0, 5, 0));
   fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));

   frame = new TGHorizontalFrame(fContourFrame);

   label = new TGLabel(frame, "Parameter 2: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   fContourPar2 = new TGComboBox(frame, kAGD_CONTPAR2);
   AddParameters(fContourPar2);
   fContourPar2->Select(kAGD_PARCOUNTER+1, kFALSE);
   fContourPar2->Resize(130, 20);
   fContourPar2->Associate(this);
   lb = fContourPar2->GetListBox();
   lb->Resize(lb->GetWidth(), 200);
   frame->AddFrame(fContourPar2, new TGLayoutHints(kLHintsNormal, 37, 0, 5, 0));

   fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));

   frame = new TGHorizontalFrame(fContourFrame);

   label = new TGLabel(frame, "Confidence Level: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   fContourError = new TGNumberEntry(frame, 0.683, 5, kAGD_CONTERR,
                                     TGNumberFormat::kNESRealThree,
                                     TGNumberFormat::kNEANonNegative,
                                     TGNumberFormat::kNELNoLimits);
   fContourError->Resize(130, 20);
   fContourError->GetNumberEntry()->SetToolTipText("Sets the contour confidence level");
   frame->AddFrame(fContourError, new TGLayoutHints(kLHintsNormal, 5, 0, 5, 0));

   fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 5));

   frame = new TGHorizontalFrame(fContourFrame);

   label = new TGLabel(frame, "Fill Colour: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   fContourColor = new TGColorSelect(frame, TColor::Number2Pixel(kYellow - 10), kAGD_CONTCOLOR);
   frame->AddFrame(fContourColor, new TGLayoutHints(kLHintsNormal, 5, 0, 5, 0));

   fContourOver = new TGCheckButton(frame, "Superimpose", kAGD_CONTOVER);
   fContourOver->SetToolTipText("If checked, the new contour will overlap the previous one");
   frame->AddFrame(fContourOver, new TGLayoutHints(kLHintsNormal, 5, 0, 5, 0));

   fContourFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 5));
}

//______________________________________________________________________________
void TAdvancedGraphicsDialog::CreateScanFrame()
{
   // Create the frame that contains all the necessary information for
   // the Scan method.

   fScanFrame = new TGVerticalFrame(fTab);
   TGHorizontalFrame* frame = new TGHorizontalFrame(fScanFrame);

   TGLabel* label = new TGLabel(frame, "Number of Points: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   fScanPoints = new TGNumberEntry(frame, 40,
                                5, kAGD_SCANMIN,
                                TGNumberFormat::kNESInteger,
                                TGNumberFormat::kNEAPositive,
                                TGNumberFormat::kNELNoLimits);
   fScanPoints->Resize(140, 20);
   fScanPoints->GetNumberEntry()->SetToolTipText("Sets the number of points used in the scan");
   frame->AddFrame(fScanPoints, new TGLayoutHints(kLHintsNormal, 0, 0, 5, 0));
   fScanFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));

   frame = new TGHorizontalFrame(fScanFrame);

   label = new TGLabel(frame, "Parameter: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   fScanPar = new TGComboBox(frame, kAGD_SCANPAR);
   AddParameters(fScanPar);
   fScanPar->Resize(140, 20);
   fScanPar->Associate(this);
   TGListBox *lb = fScanPar->GetListBox();
   lb->Resize(lb->GetWidth(), 200);
   frame->AddFrame(fScanPar, new TGLayoutHints(kLHintsNormal, 39, 0, 5, 0));
   fScanFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));

   frame = new TGHorizontalFrame(fScanFrame);
   label = new TGLabel(frame, "Min: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   double val = fFitter->GetParameter( fScanPar->GetSelected() - kAGD_PARCOUNTER );
   double err = fFitter->GetParError( fScanPar->GetSelected() - kAGD_PARCOUNTER );
   fScanMin = new TGNumberEntry(frame, val - 2.*err ,
                                5, kAGD_SCANMIN,
                                TGNumberFormat::kNESRealFour,
                                TGNumberFormat::kNEAAnyNumber,
                                TGNumberFormat::kNELNoLimits);
   fScanMin->Resize(70, 20);
   fScanMin->GetNumberEntry()->SetToolTipText("Sets the minimum parameter value");
   frame->AddFrame(fScanMin, new TGLayoutHints(kLHintsNormal, 2, 0, 5, 0));

   label = new TGLabel(frame, "Max: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 35, 5, 5, 0));
   fScanMax = new TGNumberEntry(frame, val + 2.*err,
                                5, kAGD_SCANMAX,
                                TGNumberFormat::kNESRealFour,
                                TGNumberFormat::kNEAAnyNumber,
                                TGNumberFormat::kNELNoLimits);
   fScanMax->Resize(70, 20);
   fScanMax->GetNumberEntry()->SetToolTipText("Sets the maximum parameter value");
   frame->AddFrame(fScanMax, new TGLayoutHints(kLHintsNormal, 2, 0, 5, 0));
   fScanFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));

}

//______________________________________________________________________________
void TAdvancedGraphicsDialog::CreateConfFrame()
{
   // Create the frame that contains all the necessary information for
   // the Confidence Level  method.

   fConfFrame = new TGVerticalFrame(fTab);
   TGHorizontalFrame* frame = new TGHorizontalFrame(fConfFrame);

   TGLabel* label = new TGLabel(frame, "Confidence Level: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   fConfLevel = new TGNumberEntry(frame, 0.95,
                                  5, kAGD_SCANMIN,
                                  TGNumberFormat::kNESRealTwo,
                                  TGNumberFormat::kNEAPositive,
                                  TGNumberFormat::kNELLimitMinMax,
                                  0, 0.9999);
   fConfLevel->Resize(140, 20);
   fConfLevel->GetNumberEntry()->SetToolTipText("Sets the value of the confidence level");
   frame->AddFrame(fConfLevel, new TGLayoutHints(kLHintsNormal, 0, 0, 5, 0));
   fConfFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));

   frame = new TGHorizontalFrame(fConfFrame);

   label = new TGLabel(frame, "Fill Colour: ");
   frame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 0));

   fConfColor = new TGColorSelect(frame, TColor::Number2Pixel(kYellow - 10), kAGD_CONTCOLOR);
   frame->AddFrame(fConfColor, new TGLayoutHints(kLHintsNormal, 5, 0, 5, 0));

   fConfFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 5));
}

void TAdvancedGraphicsDialog::AddParameters(TGComboBox* comboBox)
{
   // Add all the parameters of the VirtualFitter into a comboBox
   // (helper method)

   for ( Int_t i = 0; i < fFitter->GetNumberTotalParameters(); ++i ) {
      comboBox->AddEntry(fFitter->GetParName(i), kAGD_PARCOUNTER + i);
   }
   comboBox->Select(kAGD_PARCOUNTER, kFALSE);
}

//______________________________________________________________________________
void TAdvancedGraphicsDialog::ConnectSlots()
{
   // Connect the slots (buttons mainly + specific methods)

   // Buttons
   fClose->Connect("Clicked()", "TAdvancedGraphicsDialog", this, "CloseWindow()");
   fDraw->Connect("Clicked()", "TAdvancedGraphicsDialog", this, "DoDraw()");

   // Slots for the Scan method
   fScanPar->Connect("Selected(Int_t)", "TAdvancedGraphicsDialog", this, "DoChangedScanPar(Int_t)");
}

//______________________________________________________________________________
void TAdvancedGraphicsDialog::DoChangedScanPar(Int_t selected)
{
   // Changes the Min and Max default values of the scan method,
   // depending on the selected parameter.

   double val = fFitter->GetParameter( selected - kAGD_PARCOUNTER );
   double err = fFitter->GetParError(  selected - kAGD_PARCOUNTER );
   fScanMin->SetNumber( val -2 * err );
   fScanMax->SetNumber( val +2 * err );
}

//______________________________________________________________________________
void TAdvancedGraphicsDialog::DoDraw()
{
   // Calls the correspoding method, depending on the selected tab.

   if ( fTab->GetCurrent() == 0 ) {
      DrawContour();
   } else if ( fTab->GetCurrent() == 1 ) {
      DrawScan();
   } else if ( fTab->GetCurrent() == 2 ) {
      DrawConfidenceLevels();
   }
}

//______________________________________________________________________________
void TAdvancedGraphicsDialog::DrawContour()
{
   // Generates all necessary data for the Contour method from its
   // tab. Then it call Virtual Fitter to perform it.

   static TGraph * graph = 0;
   std::string options;
   if ( ! (fContourOver->GetState() == kButtonDown) ) {
      if ( graph )
         delete graph;
      options = "ALF";
   } else
      options = "LF";
   graph = new TGraph( static_cast<int>(fContourPoints->GetNumber()) );
   Int_t par1 = fContourPar1->GetSelected() - kAGD_PARCOUNTER;
   Int_t par2 = fContourPar2->GetSelected() - kAGD_PARCOUNTER;
   if ( par1 == par2 ) {
      Error("TAdvancedGraphicsDialog::DrawContour", "Parameters cannot be the same");
      return;
   }
   // contour error is actually the desired confidence level
   Double_t cl = fContourError->GetNumber();
   fFitter->Contour( par1, par2, graph, cl);
   graph->SetFillColor( TColor::GetColor( fContourColor->GetColor() ) );
   graph->GetXaxis()->SetTitle( fFitter->GetParName(par1) );
   graph->GetYaxis()->SetTitle( fFitter->GetParName(par2) );
   graph->Draw( options.c_str() );
   gPad->Update();
}

//______________________________________________________________________________
void TAdvancedGraphicsDialog::DrawScan()
{
   // Generates all necessary data for the Scan method from its
   // tab. Then it call Virtual Fitter to perform it.

   static TGraph * graph = 0;
   if ( graph )
      delete graph;
   graph = new TGraph( static_cast<int>(fScanPoints->GetNumber()) );
   Int_t par = fScanPar->GetSelected() - kAGD_PARCOUNTER;
   fFitter->Scan( par, graph,
                  fScanMin->GetNumber(),
                  fScanMax->GetNumber() );
   graph->SetLineColor(kBlue);
   graph->SetLineWidth(2);
   graph->GetXaxis()->SetTitle(fFitter->GetParName(par) );
   graph->GetYaxis()->SetTitle("FCN" );
   graph->Draw("APL");
   gPad->Update();
}

//______________________________________________________________________________
void TAdvancedGraphicsDialog::DrawConfidenceLevels()
{
   // Generates all necessary data for the Scan method from its
   // tab. Then it call Virtual Fitter to perform it.

   const ROOT::Fit::FitResult& result = fFitter->GetFitResult();
   const ROOT::Fit::FitResult::IModelFunction* function = result.FittedFunction();
   const ROOT::Fit::BinData* data = dynamic_cast<const ROOT::Fit::BinData*>(&(fFitter->GetFitData()));
   if ( !data )
   {
      Error("DrawConfidenceLevels","Unbinned data set cannot draw confidence levels.");
      return;
   }

   if ( !function )
   {
      Error("DrawConfidenceLevels","Fit Function does not exist!");
      return;
   }

   std::vector<Double_t> ci(data->Size());
   result.GetConfidenceIntervals(*data, &ci[0], fConfLevel->GetNumber());

   if ( data->NDim() == 1 )
   {
      TGraphErrors* g = new TGraphErrors(ci.size());
      for (unsigned int i = 0; i < ci.size(); ++i)
      {
         const Double_t *x = data->Coords(i);
         const Double_t y = (*function)(x);
         g->SetPoint(i, *x, y);
         g->SetPointError(i, 0, ci[i]);
      }
      std::ostringstream os;
      os << "Confidence Intervals with " << fConfLevel->GetNumber()
         << " conf. band.";
      g->SetTitle(os.str().c_str());
      g->SetLineColor( TColor::GetColor( fConfColor->GetColor() ));
      g->SetFillColor( TColor::GetColor( fConfColor->GetColor() ));
      g->SetFillStyle(3001);
      g->Draw("C3same");
   } else if ( data->NDim() == 2 )
   {
      TGraph2DErrors* g = new TGraph2DErrors(ci.size());
      for (unsigned int i = 0; i < ci.size(); ++i)
      {
         const Double_t *x = data->Coords(i);
         const Double_t y = (*function)(x);
         g->SetPoint(i, x[0], x[1], y);
         g->SetPointError(i, 0, 0, ci[i]);
      }
      std::ostringstream os;
      os << "Confidence Intervals with " << fConfLevel->GetNumber()
         << " conf. band.";
      g->SetTitle(os.str().c_str());
      g->SetLineColor( TColor::GetColor( fConfColor->GetColor() ));
      g->SetFillColor( TColor::GetColor( fConfColor->GetColor() ));
      g->SetFillStyle(3001);
      g->Draw("C3same");
   }
   gPad->Update();
}

//______________________________________________________________________________
TAdvancedGraphicsDialog::~TAdvancedGraphicsDialog()
{
   // Cleanup dialog.

   Cleanup();
}
 TAdvancedGraphicsDialog.cxx:1
 TAdvancedGraphicsDialog.cxx:2
 TAdvancedGraphicsDialog.cxx:3
 TAdvancedGraphicsDialog.cxx:4
 TAdvancedGraphicsDialog.cxx:5
 TAdvancedGraphicsDialog.cxx:6
 TAdvancedGraphicsDialog.cxx:7
 TAdvancedGraphicsDialog.cxx:8
 TAdvancedGraphicsDialog.cxx:9
 TAdvancedGraphicsDialog.cxx:10
 TAdvancedGraphicsDialog.cxx:11
 TAdvancedGraphicsDialog.cxx:12
 TAdvancedGraphicsDialog.cxx:13
 TAdvancedGraphicsDialog.cxx:14
 TAdvancedGraphicsDialog.cxx:15
 TAdvancedGraphicsDialog.cxx:16
 TAdvancedGraphicsDialog.cxx:17
 TAdvancedGraphicsDialog.cxx:18
 TAdvancedGraphicsDialog.cxx:19
 TAdvancedGraphicsDialog.cxx:20
 TAdvancedGraphicsDialog.cxx:21
 TAdvancedGraphicsDialog.cxx:22
 TAdvancedGraphicsDialog.cxx:23
 TAdvancedGraphicsDialog.cxx:24
 TAdvancedGraphicsDialog.cxx:25
 TAdvancedGraphicsDialog.cxx:26
 TAdvancedGraphicsDialog.cxx:27
 TAdvancedGraphicsDialog.cxx:28
 TAdvancedGraphicsDialog.cxx:29
 TAdvancedGraphicsDialog.cxx:30
 TAdvancedGraphicsDialog.cxx:31
 TAdvancedGraphicsDialog.cxx:32
 TAdvancedGraphicsDialog.cxx:33
 TAdvancedGraphicsDialog.cxx:34
 TAdvancedGraphicsDialog.cxx:35
 TAdvancedGraphicsDialog.cxx:36
 TAdvancedGraphicsDialog.cxx:37
 TAdvancedGraphicsDialog.cxx:38
 TAdvancedGraphicsDialog.cxx:39
 TAdvancedGraphicsDialog.cxx:40
 TAdvancedGraphicsDialog.cxx:41
 TAdvancedGraphicsDialog.cxx:42
 TAdvancedGraphicsDialog.cxx:43
 TAdvancedGraphicsDialog.cxx:44
 TAdvancedGraphicsDialog.cxx:45
 TAdvancedGraphicsDialog.cxx:46
 TAdvancedGraphicsDialog.cxx:47
 TAdvancedGraphicsDialog.cxx:48
 TAdvancedGraphicsDialog.cxx:49
 TAdvancedGraphicsDialog.cxx:50
 TAdvancedGraphicsDialog.cxx:51
 TAdvancedGraphicsDialog.cxx:52
 TAdvancedGraphicsDialog.cxx:53
 TAdvancedGraphicsDialog.cxx:54
 TAdvancedGraphicsDialog.cxx:55
 TAdvancedGraphicsDialog.cxx:56
 TAdvancedGraphicsDialog.cxx:57
 TAdvancedGraphicsDialog.cxx:58
 TAdvancedGraphicsDialog.cxx:59
 TAdvancedGraphicsDialog.cxx:60
 TAdvancedGraphicsDialog.cxx:61
 TAdvancedGraphicsDialog.cxx:62
 TAdvancedGraphicsDialog.cxx:63
 TAdvancedGraphicsDialog.cxx:64
 TAdvancedGraphicsDialog.cxx:65
 TAdvancedGraphicsDialog.cxx:66
 TAdvancedGraphicsDialog.cxx:67
 TAdvancedGraphicsDialog.cxx:68
 TAdvancedGraphicsDialog.cxx:69
 TAdvancedGraphicsDialog.cxx:70
 TAdvancedGraphicsDialog.cxx:71
 TAdvancedGraphicsDialog.cxx:72
 TAdvancedGraphicsDialog.cxx:73
 TAdvancedGraphicsDialog.cxx:74
 TAdvancedGraphicsDialog.cxx:75
 TAdvancedGraphicsDialog.cxx:76
 TAdvancedGraphicsDialog.cxx:77
 TAdvancedGraphicsDialog.cxx:78
 TAdvancedGraphicsDialog.cxx:79
 TAdvancedGraphicsDialog.cxx:80
 TAdvancedGraphicsDialog.cxx:81
 TAdvancedGraphicsDialog.cxx:82
 TAdvancedGraphicsDialog.cxx:83
 TAdvancedGraphicsDialog.cxx:84
 TAdvancedGraphicsDialog.cxx:85
 TAdvancedGraphicsDialog.cxx:86
 TAdvancedGraphicsDialog.cxx:87
 TAdvancedGraphicsDialog.cxx:88
 TAdvancedGraphicsDialog.cxx:89
 TAdvancedGraphicsDialog.cxx:90
 TAdvancedGraphicsDialog.cxx:91
 TAdvancedGraphicsDialog.cxx:92
 TAdvancedGraphicsDialog.cxx:93
 TAdvancedGraphicsDialog.cxx:94
 TAdvancedGraphicsDialog.cxx:95
 TAdvancedGraphicsDialog.cxx:96
 TAdvancedGraphicsDialog.cxx:97
 TAdvancedGraphicsDialog.cxx:98
 TAdvancedGraphicsDialog.cxx:99
 TAdvancedGraphicsDialog.cxx:100
 TAdvancedGraphicsDialog.cxx:101
 TAdvancedGraphicsDialog.cxx:102
 TAdvancedGraphicsDialog.cxx:103
 TAdvancedGraphicsDialog.cxx:104
 TAdvancedGraphicsDialog.cxx:105
 TAdvancedGraphicsDialog.cxx:106
 TAdvancedGraphicsDialog.cxx:107
 TAdvancedGraphicsDialog.cxx:108
 TAdvancedGraphicsDialog.cxx:109
 TAdvancedGraphicsDialog.cxx:110
 TAdvancedGraphicsDialog.cxx:111
 TAdvancedGraphicsDialog.cxx:112
 TAdvancedGraphicsDialog.cxx:113
 TAdvancedGraphicsDialog.cxx:114
 TAdvancedGraphicsDialog.cxx:115
 TAdvancedGraphicsDialog.cxx:116
 TAdvancedGraphicsDialog.cxx:117
 TAdvancedGraphicsDialog.cxx:118
 TAdvancedGraphicsDialog.cxx:119
 TAdvancedGraphicsDialog.cxx:120
 TAdvancedGraphicsDialog.cxx:121
 TAdvancedGraphicsDialog.cxx:122
 TAdvancedGraphicsDialog.cxx:123
 TAdvancedGraphicsDialog.cxx:124
 TAdvancedGraphicsDialog.cxx:125
 TAdvancedGraphicsDialog.cxx:126
 TAdvancedGraphicsDialog.cxx:127
 TAdvancedGraphicsDialog.cxx:128
 TAdvancedGraphicsDialog.cxx:129
 TAdvancedGraphicsDialog.cxx:130
 TAdvancedGraphicsDialog.cxx:131
 TAdvancedGraphicsDialog.cxx:132
 TAdvancedGraphicsDialog.cxx:133
 TAdvancedGraphicsDialog.cxx:134
 TAdvancedGraphicsDialog.cxx:135
 TAdvancedGraphicsDialog.cxx:136
 TAdvancedGraphicsDialog.cxx:137
 TAdvancedGraphicsDialog.cxx:138
 TAdvancedGraphicsDialog.cxx:139
 TAdvancedGraphicsDialog.cxx:140
 TAdvancedGraphicsDialog.cxx:141
 TAdvancedGraphicsDialog.cxx:142
 TAdvancedGraphicsDialog.cxx:143
 TAdvancedGraphicsDialog.cxx:144
 TAdvancedGraphicsDialog.cxx:145
 TAdvancedGraphicsDialog.cxx:146
 TAdvancedGraphicsDialog.cxx:147
 TAdvancedGraphicsDialog.cxx:148
 TAdvancedGraphicsDialog.cxx:149
 TAdvancedGraphicsDialog.cxx:150
 TAdvancedGraphicsDialog.cxx:151
 TAdvancedGraphicsDialog.cxx:152
 TAdvancedGraphicsDialog.cxx:153
 TAdvancedGraphicsDialog.cxx:154
 TAdvancedGraphicsDialog.cxx:155
 TAdvancedGraphicsDialog.cxx:156
 TAdvancedGraphicsDialog.cxx:157
 TAdvancedGraphicsDialog.cxx:158
 TAdvancedGraphicsDialog.cxx:159
 TAdvancedGraphicsDialog.cxx:160
 TAdvancedGraphicsDialog.cxx:161
 TAdvancedGraphicsDialog.cxx:162
 TAdvancedGraphicsDialog.cxx:163
 TAdvancedGraphicsDialog.cxx:164
 TAdvancedGraphicsDialog.cxx:165
 TAdvancedGraphicsDialog.cxx:166
 TAdvancedGraphicsDialog.cxx:167
 TAdvancedGraphicsDialog.cxx:168
 TAdvancedGraphicsDialog.cxx:169
 TAdvancedGraphicsDialog.cxx:170
 TAdvancedGraphicsDialog.cxx:171
 TAdvancedGraphicsDialog.cxx:172
 TAdvancedGraphicsDialog.cxx:173
 TAdvancedGraphicsDialog.cxx:174
 TAdvancedGraphicsDialog.cxx:175
 TAdvancedGraphicsDialog.cxx:176
 TAdvancedGraphicsDialog.cxx:177
 TAdvancedGraphicsDialog.cxx:178
 TAdvancedGraphicsDialog.cxx:179
 TAdvancedGraphicsDialog.cxx:180
 TAdvancedGraphicsDialog.cxx:181
 TAdvancedGraphicsDialog.cxx:182
 TAdvancedGraphicsDialog.cxx:183
 TAdvancedGraphicsDialog.cxx:184
 TAdvancedGraphicsDialog.cxx:185
 TAdvancedGraphicsDialog.cxx:186
 TAdvancedGraphicsDialog.cxx:187
 TAdvancedGraphicsDialog.cxx:188
 TAdvancedGraphicsDialog.cxx:189
 TAdvancedGraphicsDialog.cxx:190
 TAdvancedGraphicsDialog.cxx:191
 TAdvancedGraphicsDialog.cxx:192
 TAdvancedGraphicsDialog.cxx:193
 TAdvancedGraphicsDialog.cxx:194
 TAdvancedGraphicsDialog.cxx:195
 TAdvancedGraphicsDialog.cxx:196
 TAdvancedGraphicsDialog.cxx:197
 TAdvancedGraphicsDialog.cxx:198
 TAdvancedGraphicsDialog.cxx:199
 TAdvancedGraphicsDialog.cxx:200
 TAdvancedGraphicsDialog.cxx:201
 TAdvancedGraphicsDialog.cxx:202
 TAdvancedGraphicsDialog.cxx:203
 TAdvancedGraphicsDialog.cxx:204
 TAdvancedGraphicsDialog.cxx:205
 TAdvancedGraphicsDialog.cxx:206
 TAdvancedGraphicsDialog.cxx:207
 TAdvancedGraphicsDialog.cxx:208
 TAdvancedGraphicsDialog.cxx:209
 TAdvancedGraphicsDialog.cxx:210
 TAdvancedGraphicsDialog.cxx:211
 TAdvancedGraphicsDialog.cxx:212
 TAdvancedGraphicsDialog.cxx:213
 TAdvancedGraphicsDialog.cxx:214
 TAdvancedGraphicsDialog.cxx:215
 TAdvancedGraphicsDialog.cxx:216
 TAdvancedGraphicsDialog.cxx:217
 TAdvancedGraphicsDialog.cxx:218
 TAdvancedGraphicsDialog.cxx:219
 TAdvancedGraphicsDialog.cxx:220
 TAdvancedGraphicsDialog.cxx:221
 TAdvancedGraphicsDialog.cxx:222
 TAdvancedGraphicsDialog.cxx:223
 TAdvancedGraphicsDialog.cxx:224
 TAdvancedGraphicsDialog.cxx:225
 TAdvancedGraphicsDialog.cxx:226
 TAdvancedGraphicsDialog.cxx:227
 TAdvancedGraphicsDialog.cxx:228
 TAdvancedGraphicsDialog.cxx:229
 TAdvancedGraphicsDialog.cxx:230
 TAdvancedGraphicsDialog.cxx:231
 TAdvancedGraphicsDialog.cxx:232
 TAdvancedGraphicsDialog.cxx:233
 TAdvancedGraphicsDialog.cxx:234
 TAdvancedGraphicsDialog.cxx:235
 TAdvancedGraphicsDialog.cxx:236
 TAdvancedGraphicsDialog.cxx:237
 TAdvancedGraphicsDialog.cxx:238
 TAdvancedGraphicsDialog.cxx:239
 TAdvancedGraphicsDialog.cxx:240
 TAdvancedGraphicsDialog.cxx:241
 TAdvancedGraphicsDialog.cxx:242
 TAdvancedGraphicsDialog.cxx:243
 TAdvancedGraphicsDialog.cxx:244
 TAdvancedGraphicsDialog.cxx:245
 TAdvancedGraphicsDialog.cxx:246
 TAdvancedGraphicsDialog.cxx:247
 TAdvancedGraphicsDialog.cxx:248
 TAdvancedGraphicsDialog.cxx:249
 TAdvancedGraphicsDialog.cxx:250
 TAdvancedGraphicsDialog.cxx:251
 TAdvancedGraphicsDialog.cxx:252
 TAdvancedGraphicsDialog.cxx:253
 TAdvancedGraphicsDialog.cxx:254
 TAdvancedGraphicsDialog.cxx:255
 TAdvancedGraphicsDialog.cxx:256
 TAdvancedGraphicsDialog.cxx:257
 TAdvancedGraphicsDialog.cxx:258
 TAdvancedGraphicsDialog.cxx:259
 TAdvancedGraphicsDialog.cxx:260
 TAdvancedGraphicsDialog.cxx:261
 TAdvancedGraphicsDialog.cxx:262
 TAdvancedGraphicsDialog.cxx:263
 TAdvancedGraphicsDialog.cxx:264
 TAdvancedGraphicsDialog.cxx:265
 TAdvancedGraphicsDialog.cxx:266
 TAdvancedGraphicsDialog.cxx:267
 TAdvancedGraphicsDialog.cxx:268
 TAdvancedGraphicsDialog.cxx:269
 TAdvancedGraphicsDialog.cxx:270
 TAdvancedGraphicsDialog.cxx:271
 TAdvancedGraphicsDialog.cxx:272
 TAdvancedGraphicsDialog.cxx:273
 TAdvancedGraphicsDialog.cxx:274
 TAdvancedGraphicsDialog.cxx:275
 TAdvancedGraphicsDialog.cxx:276
 TAdvancedGraphicsDialog.cxx:277
 TAdvancedGraphicsDialog.cxx:278
 TAdvancedGraphicsDialog.cxx:279
 TAdvancedGraphicsDialog.cxx:280
 TAdvancedGraphicsDialog.cxx:281
 TAdvancedGraphicsDialog.cxx:282
 TAdvancedGraphicsDialog.cxx:283
 TAdvancedGraphicsDialog.cxx:284
 TAdvancedGraphicsDialog.cxx:285
 TAdvancedGraphicsDialog.cxx:286
 TAdvancedGraphicsDialog.cxx:287
 TAdvancedGraphicsDialog.cxx:288
 TAdvancedGraphicsDialog.cxx:289
 TAdvancedGraphicsDialog.cxx:290
 TAdvancedGraphicsDialog.cxx:291
 TAdvancedGraphicsDialog.cxx:292
 TAdvancedGraphicsDialog.cxx:293
 TAdvancedGraphicsDialog.cxx:294
 TAdvancedGraphicsDialog.cxx:295
 TAdvancedGraphicsDialog.cxx:296
 TAdvancedGraphicsDialog.cxx:297
 TAdvancedGraphicsDialog.cxx:298
 TAdvancedGraphicsDialog.cxx:299
 TAdvancedGraphicsDialog.cxx:300
 TAdvancedGraphicsDialog.cxx:301
 TAdvancedGraphicsDialog.cxx:302
 TAdvancedGraphicsDialog.cxx:303
 TAdvancedGraphicsDialog.cxx:304
 TAdvancedGraphicsDialog.cxx:305
 TAdvancedGraphicsDialog.cxx:306
 TAdvancedGraphicsDialog.cxx:307
 TAdvancedGraphicsDialog.cxx:308
 TAdvancedGraphicsDialog.cxx:309
 TAdvancedGraphicsDialog.cxx:310
 TAdvancedGraphicsDialog.cxx:311
 TAdvancedGraphicsDialog.cxx:312
 TAdvancedGraphicsDialog.cxx:313
 TAdvancedGraphicsDialog.cxx:314
 TAdvancedGraphicsDialog.cxx:315
 TAdvancedGraphicsDialog.cxx:316
 TAdvancedGraphicsDialog.cxx:317
 TAdvancedGraphicsDialog.cxx:318
 TAdvancedGraphicsDialog.cxx:319
 TAdvancedGraphicsDialog.cxx:320
 TAdvancedGraphicsDialog.cxx:321
 TAdvancedGraphicsDialog.cxx:322
 TAdvancedGraphicsDialog.cxx:323
 TAdvancedGraphicsDialog.cxx:324
 TAdvancedGraphicsDialog.cxx:325
 TAdvancedGraphicsDialog.cxx:326
 TAdvancedGraphicsDialog.cxx:327
 TAdvancedGraphicsDialog.cxx:328
 TAdvancedGraphicsDialog.cxx:329
 TAdvancedGraphicsDialog.cxx:330
 TAdvancedGraphicsDialog.cxx:331
 TAdvancedGraphicsDialog.cxx:332
 TAdvancedGraphicsDialog.cxx:333
 TAdvancedGraphicsDialog.cxx:334
 TAdvancedGraphicsDialog.cxx:335
 TAdvancedGraphicsDialog.cxx:336
 TAdvancedGraphicsDialog.cxx:337
 TAdvancedGraphicsDialog.cxx:338
 TAdvancedGraphicsDialog.cxx:339
 TAdvancedGraphicsDialog.cxx:340
 TAdvancedGraphicsDialog.cxx:341
 TAdvancedGraphicsDialog.cxx:342
 TAdvancedGraphicsDialog.cxx:343
 TAdvancedGraphicsDialog.cxx:344
 TAdvancedGraphicsDialog.cxx:345
 TAdvancedGraphicsDialog.cxx:346
 TAdvancedGraphicsDialog.cxx:347
 TAdvancedGraphicsDialog.cxx:348
 TAdvancedGraphicsDialog.cxx:349
 TAdvancedGraphicsDialog.cxx:350
 TAdvancedGraphicsDialog.cxx:351
 TAdvancedGraphicsDialog.cxx:352
 TAdvancedGraphicsDialog.cxx:353
 TAdvancedGraphicsDialog.cxx:354
 TAdvancedGraphicsDialog.cxx:355
 TAdvancedGraphicsDialog.cxx:356
 TAdvancedGraphicsDialog.cxx:357
 TAdvancedGraphicsDialog.cxx:358
 TAdvancedGraphicsDialog.cxx:359
 TAdvancedGraphicsDialog.cxx:360
 TAdvancedGraphicsDialog.cxx:361
 TAdvancedGraphicsDialog.cxx:362
 TAdvancedGraphicsDialog.cxx:363
 TAdvancedGraphicsDialog.cxx:364
 TAdvancedGraphicsDialog.cxx:365
 TAdvancedGraphicsDialog.cxx:366
 TAdvancedGraphicsDialog.cxx:367
 TAdvancedGraphicsDialog.cxx:368
 TAdvancedGraphicsDialog.cxx:369
 TAdvancedGraphicsDialog.cxx:370
 TAdvancedGraphicsDialog.cxx:371
 TAdvancedGraphicsDialog.cxx:372
 TAdvancedGraphicsDialog.cxx:373
 TAdvancedGraphicsDialog.cxx:374
 TAdvancedGraphicsDialog.cxx:375
 TAdvancedGraphicsDialog.cxx:376
 TAdvancedGraphicsDialog.cxx:377
 TAdvancedGraphicsDialog.cxx:378
 TAdvancedGraphicsDialog.cxx:379
 TAdvancedGraphicsDialog.cxx:380
 TAdvancedGraphicsDialog.cxx:381
 TAdvancedGraphicsDialog.cxx:382
 TAdvancedGraphicsDialog.cxx:383
 TAdvancedGraphicsDialog.cxx:384
 TAdvancedGraphicsDialog.cxx:385
 TAdvancedGraphicsDialog.cxx:386
 TAdvancedGraphicsDialog.cxx:387
 TAdvancedGraphicsDialog.cxx:388
 TAdvancedGraphicsDialog.cxx:389
 TAdvancedGraphicsDialog.cxx:390
 TAdvancedGraphicsDialog.cxx:391
 TAdvancedGraphicsDialog.cxx:392
 TAdvancedGraphicsDialog.cxx:393
 TAdvancedGraphicsDialog.cxx:394
 TAdvancedGraphicsDialog.cxx:395
 TAdvancedGraphicsDialog.cxx:396
 TAdvancedGraphicsDialog.cxx:397
 TAdvancedGraphicsDialog.cxx:398
 TAdvancedGraphicsDialog.cxx:399
 TAdvancedGraphicsDialog.cxx:400
 TAdvancedGraphicsDialog.cxx:401
 TAdvancedGraphicsDialog.cxx:402
 TAdvancedGraphicsDialog.cxx:403
 TAdvancedGraphicsDialog.cxx:404
 TAdvancedGraphicsDialog.cxx:405
 TAdvancedGraphicsDialog.cxx:406
 TAdvancedGraphicsDialog.cxx:407
 TAdvancedGraphicsDialog.cxx:408
 TAdvancedGraphicsDialog.cxx:409
 TAdvancedGraphicsDialog.cxx:410
 TAdvancedGraphicsDialog.cxx:411
 TAdvancedGraphicsDialog.cxx:412
 TAdvancedGraphicsDialog.cxx:413
 TAdvancedGraphicsDialog.cxx:414
 TAdvancedGraphicsDialog.cxx:415
 TAdvancedGraphicsDialog.cxx:416
 TAdvancedGraphicsDialog.cxx:417
 TAdvancedGraphicsDialog.cxx:418
 TAdvancedGraphicsDialog.cxx:419
 TAdvancedGraphicsDialog.cxx:420
 TAdvancedGraphicsDialog.cxx:421
 TAdvancedGraphicsDialog.cxx:422
 TAdvancedGraphicsDialog.cxx:423
 TAdvancedGraphicsDialog.cxx:424
 TAdvancedGraphicsDialog.cxx:425
 TAdvancedGraphicsDialog.cxx:426
 TAdvancedGraphicsDialog.cxx:427
 TAdvancedGraphicsDialog.cxx:428
 TAdvancedGraphicsDialog.cxx:429
 TAdvancedGraphicsDialog.cxx:430
 TAdvancedGraphicsDialog.cxx:431
 TAdvancedGraphicsDialog.cxx:432
 TAdvancedGraphicsDialog.cxx:433
 TAdvancedGraphicsDialog.cxx:434
 TAdvancedGraphicsDialog.cxx:435
 TAdvancedGraphicsDialog.cxx:436
 TAdvancedGraphicsDialog.cxx:437
 TAdvancedGraphicsDialog.cxx:438
 TAdvancedGraphicsDialog.cxx:439
 TAdvancedGraphicsDialog.cxx:440
 TAdvancedGraphicsDialog.cxx:441
 TAdvancedGraphicsDialog.cxx:442
 TAdvancedGraphicsDialog.cxx:443
 TAdvancedGraphicsDialog.cxx:444
 TAdvancedGraphicsDialog.cxx:445
 TAdvancedGraphicsDialog.cxx:446
 TAdvancedGraphicsDialog.cxx:447
 TAdvancedGraphicsDialog.cxx:448
 TAdvancedGraphicsDialog.cxx:449
 TAdvancedGraphicsDialog.cxx:450
 TAdvancedGraphicsDialog.cxx:451
 TAdvancedGraphicsDialog.cxx:452
 TAdvancedGraphicsDialog.cxx:453
 TAdvancedGraphicsDialog.cxx:454
 TAdvancedGraphicsDialog.cxx:455
 TAdvancedGraphicsDialog.cxx:456
 TAdvancedGraphicsDialog.cxx:457
 TAdvancedGraphicsDialog.cxx:458
 TAdvancedGraphicsDialog.cxx:459
 TAdvancedGraphicsDialog.cxx:460
 TAdvancedGraphicsDialog.cxx:461
 TAdvancedGraphicsDialog.cxx:462
 TAdvancedGraphicsDialog.cxx:463
 TAdvancedGraphicsDialog.cxx:464
 TAdvancedGraphicsDialog.cxx:465
 TAdvancedGraphicsDialog.cxx:466
 TAdvancedGraphicsDialog.cxx:467
 TAdvancedGraphicsDialog.cxx:468
 TAdvancedGraphicsDialog.cxx:469