// @(#)root/eve:$Id$
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007

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

#include "TEveRGBAPaletteEditor.h"
#include "TEveRGBAPalette.h"
#include "TEveGValuators.h"

#include "TVirtualPad.h"
#include "TColor.h"

#include "TGLabel.h"
#include "TGButton.h"
#include "TGComboBox.h"
#include "TGColorSelect.h"
#include "TGSlider.h"
#include "TGDoubleSlider.h"

//______________________________________________________________________________
//
// Sub-editor for TEveRGBAPalette class.

ClassImp(TEveRGBAPaletteSubEditor)

//______________________________________________________________________________
TEveRGBAPaletteSubEditor::TEveRGBAPaletteSubEditor(const TGWindow* p) :
   TGVerticalFrame(p),

   fM(0),

   fUnderflowAction (0),
   fUnderColor      (0),
   fOverflowAction  (0),
   fOverColor       (0),

   fMinMax(0), fOldMin(0), fOldMax(0),

   fInterpolate(0),
   fShowDefValue(0),
   fDefaultColor(0),
   fFixColorRange(0)
{
   // Constructor.

   // Int_t labelW = 42;

   {
      TGHorizontalFrame* f = new TGHorizontalFrame(this);

      fInterpolate = new TGCheckButton(f, "Interpolate");
      f->AddFrame(fInterpolate, new TGLayoutHints(kLHintsLeft, 3, 1, 1, 0));
      fInterpolate->Connect("Toggled(Bool_t)",
                            "TEveRGBAPaletteSubEditor", this, "DoInterpolate()");

      AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 0));
   }

   {
      TGHorizontalFrame* f = new TGHorizontalFrame(this);

      fShowDefValue = new TGCheckButton(f, "Show default value");
      f->AddFrame(fShowDefValue, new TGLayoutHints(kLHintsLeft, 3, 1, 1, 0));
      fShowDefValue->Connect("Toggled(Bool_t)",
                             "TEveRGBAPaletteSubEditor", this, "DoShowDefValue()");

      fDefaultColor = new TGColorSelect(f, 0, -1);
      f->AddFrame(fDefaultColor, new TGLayoutHints(kLHintsLeft|kLHintsTop, 0, 0, 0, 0));
      fDefaultColor->Connect("ColorSelected(Pixel_t)",
                             "TEveRGBAPaletteSubEditor", this, "DoDefaultColor(Pixel_t)");

      AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 2, 0));
   }

   {
      TGHorizontalFrame* f = new TGHorizontalFrame(this);

      fFixColorRange = new TGCheckButton(f, "Fix color range");
      f->AddFrame(fFixColorRange, new TGLayoutHints(kLHintsLeft, 3, 1, 0, 0));
      fFixColorRange->Connect("Toggled(Bool_t)",
                              "TEveRGBAPaletteSubEditor", this, "DoFixColorRange()");

      AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 0, 2));
   }

   { // Underflow
      TGHorizontalFrame* f = new TGHorizontalFrame(this);
      TGLabel* lab = new TGLabel(f, "Underflow:");
      f->AddFrame(lab, new TGLayoutHints(kLHintsLeft|kLHintsBottom, 1, 15, 1, 2));
      fUnderflowAction = new TGComboBox(f);
      fUnderflowAction->AddEntry("Cut", 0);
      fUnderflowAction->AddEntry("Mark", 1);
      fUnderflowAction->AddEntry("Clip", 2);
      fUnderflowAction->AddEntry("Wrap", 3);
      TGListBox* lb = fUnderflowAction->GetListBox();
      lb->Resize(lb->GetWidth(), 4*16);
      fUnderflowAction->Resize(59, 20);
      fUnderflowAction->Connect("Selected(Int_t)", "TEveRGBAPaletteSubEditor", this,
                                "DoUnderflowAction(Int_t)");
      f->AddFrame(fUnderflowAction, new TGLayoutHints(kLHintsLeft, 1, 2, 1, 1));

      fUnderColor = new TGColorSelect(f, 0, -1);
      f->AddFrame(fUnderColor, new TGLayoutHints(kLHintsLeft|kLHintsTop, 1, 1, 0, 2));
      fUnderColor->Connect("ColorSelected(Pixel_t)",
                           "TEveRGBAPaletteSubEditor", this, "DoUnderColor(Pixel_t)");

      AddFrame(f);
   }

   { // Overflow
      TGHorizontalFrame* f = new TGHorizontalFrame(this);
      TGLabel* lab = new TGLabel(f, "Overflow:");
      f->AddFrame(lab, new TGLayoutHints(kLHintsLeft|kLHintsBottom, 1, 20, 1, 2));
      fOverflowAction = new TGComboBox(f);
      fOverflowAction->AddEntry("Cut", 0);
      fOverflowAction->AddEntry("Mark", 1);
      fOverflowAction->AddEntry("Clip", 2);
      fOverflowAction->AddEntry("Wrap", 3);
      TGListBox* lb = fOverflowAction->GetListBox();
      lb->Resize(lb->GetWidth(), 4*16);
      fOverflowAction->Resize(59, 20);
      fOverflowAction->Connect("Selected(Int_t)", "TEveRGBAPaletteSubEditor", this,
                               "DoOverflowAction(Int_t)");
      f->AddFrame(fOverflowAction, new TGLayoutHints(kLHintsLeft, 1, 2, 1, 1));

      fOverColor = new TGColorSelect(f, 0, -1);
      f->AddFrame(fOverColor, new TGLayoutHints(kLHintsLeft|kLHintsTop, 1, 1, 0, 2));
      fOverColor->Connect("ColorSelected(Pixel_t)",
                          "TEveRGBAPaletteSubEditor", this, "DoOverColor(Pixel_t)");

      AddFrame(f);
   }

   fMinMax = new TEveGDoubleValuator(this,"Main range:", 130, 0);
   fMinMax->SetNELength(5);
   fMinMax->SetLabelWidth(74);
   fMinMax->Build();
   fMinMax->GetSlider()->SetWidth(190);
   fMinMax->SetLimits(0, 1023, TGNumberFormat::kNESInteger);
   fMinMax->Connect("ValueSet()",
                    "TEveRGBAPaletteSubEditor", this, "DoMinMax()");
   AddFrame(fMinMax, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
}

/******************************************************************************/

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::SetModel(TEveRGBAPalette* p)
{
   // Set model object.

   fM = p;

   if (fM->fUIDoubleRep)
   {
      fMinMax->SetValues(fM->IntToDouble(fM->fMinVal), fM->IntToDouble(fM->fMaxVal));
      Double_t ll = fM->IntToDouble(fM->fLowLimit);
      Double_t hl = fM->IntToDouble(fM->fHighLimit);
      Int_t   mgk = TMath::Min(3, TMath::Max(0, 3 - TMath::Nint(TMath::Log10(hl-ll))));
      fMinMax->SetLimits(ll, hl, (TGNumberFormat::EStyle)(TGNumberFormat::kNESInteger + mgk));
      fOldMin = fMinMax->GetMin();
      fOldMax = fMinMax->GetMax();
   }
   else
   {
      fMinMax->SetValues(fM->fMinVal, fM->fMaxVal);
      fMinMax->SetLimits(fM->fLowLimit, fM->fHighLimit, TGNumberFormat::kNESInteger);
   }

   fInterpolate  ->SetState(fM->fInterpolate ? kButtonDown : kButtonUp);
   fShowDefValue ->SetState(fM->fShowDefValue ? kButtonDown : kButtonUp);
   fDefaultColor ->SetColor(TColor::Number2Pixel(fM->GetDefaultColor()), kFALSE);
   fFixColorRange->SetState(fM->fFixColorRange ? kButtonDown : kButtonUp);

   fUnderColor->SetColor(TColor::Number2Pixel(fM->GetUnderColor()), kFALSE);
   fOverColor ->SetColor(TColor::Number2Pixel(fM->GetOverColor()), kFALSE);

   fUnderflowAction->Select(fM->fUnderflowAction, kFALSE);
   fOverflowAction ->Select(fM->fOverflowAction, kFALSE);
}

/******************************************************************************/

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::Changed()
{
   // Emit "Changed()" signal.

   Emit("Changed()");
}

/******************************************************************************/

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::DoMinMax()
{
   // Slot for MinMax.

   if (fM->fUIDoubleRep)
   {
      Double_t min = fMinMax->GetMin();
      if (min != fOldMin && fM->DoubleToInt(min) == fM->fMinVal)
      {
         if (min < fOldMin)
            min = fM->IntToDouble(fM->fMinVal - 1);
         else
            min = fM->IntToDouble(fM->fMinVal + 1);
      }
      Double_t max = fMinMax->GetMax();
      if (max != fOldMax && fM->DoubleToInt(max) == fM->fMaxVal)
      {
         if (max < fOldMax)
            max = fM->IntToDouble(fM->fMaxVal - 1);
         else
            max = fM->IntToDouble(fM->fMaxVal + 1);
      }
      fM->SetMinMax(fM->DoubleToInt(min), fM->DoubleToInt(max));
   }
   else
   {
      fM->SetMinMax((Int_t) fMinMax->GetMin(), (Int_t) fMinMax->GetMax());
   }

   Changed();
   fM->MinMaxValChanged();
}

/******************************************************************************/

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::DoInterpolate()
{
   // Slot for Interpolate.

   fM->SetInterpolate(fInterpolate->IsOn());
   Changed();
}

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::DoShowDefValue()
{
   // Slot for ShowDefValue.

   fM->SetShowDefValue(fShowDefValue->IsOn());
   Changed();
}

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::DoDefaultColor(Pixel_t color)
{
   // Slot for DefaultColor.

   fM->SetDefaultColorPixel(color);
   Changed();
}

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::DoFixColorRange()
{
   // Slot for FixColorRange.

   fM->SetFixColorRange(fFixColorRange->IsOn());
   Changed();
}

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::DoUnderColor(Pixel_t color)
{
   // Slot for UnderColor.

   fM->SetUnderColorPixel(color);
   Changed();
}

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::DoOverColor(Pixel_t color)
{
   // Slot for OverColor.

   fM->SetOverColorPixel(color);
   Changed();
}

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::DoUnderflowAction(Int_t mode)
{
   // Slot for UnderflowAction.

   fM->SetUnderflowAction(mode);
   Changed();
}

//______________________________________________________________________________
void TEveRGBAPaletteSubEditor::DoOverflowAction(Int_t mode)
{
   // Slot for OverflowAction.

   fM->SetOverflowAction(mode);
   Changed();
}


//______________________________________________________________________________
//
// Editor for TEveRGBAPalette class.

ClassImp(TEveRGBAPaletteEditor)

//______________________________________________________________________________
TEveRGBAPaletteEditor::TEveRGBAPaletteEditor(const TGWindow *p, Int_t width, Int_t height,
                                             UInt_t options, Pixel_t back) :
   TGedFrame(p, width, height, options | kVerticalFrame, back),
   fM (0),
   fSE(0)
{
   // Constructor.

   MakeTitle("TEveRGBAPalette");

   fSE = new TEveRGBAPaletteSubEditor(this);
   AddFrame(fSE, new TGLayoutHints(kLHintsTop, 2, 0, 2, 2));
   fSE->Connect("Changed()", "TEveRGBAPaletteEditor", this, "Update()");
}

/******************************************************************************/

//______________________________________________________________________________
void TEveRGBAPaletteEditor::SetModel(TObject* obj)
{
   // Set model object.

   fM = dynamic_cast<TEveRGBAPalette*>(obj);
   fSE->SetModel(fM);
}
 TEveRGBAPaletteEditor.cxx:1
 TEveRGBAPaletteEditor.cxx:2
 TEveRGBAPaletteEditor.cxx:3
 TEveRGBAPaletteEditor.cxx:4
 TEveRGBAPaletteEditor.cxx:5
 TEveRGBAPaletteEditor.cxx:6
 TEveRGBAPaletteEditor.cxx:7
 TEveRGBAPaletteEditor.cxx:8
 TEveRGBAPaletteEditor.cxx:9
 TEveRGBAPaletteEditor.cxx:10
 TEveRGBAPaletteEditor.cxx:11
 TEveRGBAPaletteEditor.cxx:12
 TEveRGBAPaletteEditor.cxx:13
 TEveRGBAPaletteEditor.cxx:14
 TEveRGBAPaletteEditor.cxx:15
 TEveRGBAPaletteEditor.cxx:16
 TEveRGBAPaletteEditor.cxx:17
 TEveRGBAPaletteEditor.cxx:18
 TEveRGBAPaletteEditor.cxx:19
 TEveRGBAPaletteEditor.cxx:20
 TEveRGBAPaletteEditor.cxx:21
 TEveRGBAPaletteEditor.cxx:22
 TEveRGBAPaletteEditor.cxx:23
 TEveRGBAPaletteEditor.cxx:24
 TEveRGBAPaletteEditor.cxx:25
 TEveRGBAPaletteEditor.cxx:26
 TEveRGBAPaletteEditor.cxx:27
 TEveRGBAPaletteEditor.cxx:28
 TEveRGBAPaletteEditor.cxx:29
 TEveRGBAPaletteEditor.cxx:30
 TEveRGBAPaletteEditor.cxx:31
 TEveRGBAPaletteEditor.cxx:32
 TEveRGBAPaletteEditor.cxx:33
 TEveRGBAPaletteEditor.cxx:34
 TEveRGBAPaletteEditor.cxx:35
 TEveRGBAPaletteEditor.cxx:36
 TEveRGBAPaletteEditor.cxx:37
 TEveRGBAPaletteEditor.cxx:38
 TEveRGBAPaletteEditor.cxx:39
 TEveRGBAPaletteEditor.cxx:40
 TEveRGBAPaletteEditor.cxx:41
 TEveRGBAPaletteEditor.cxx:42
 TEveRGBAPaletteEditor.cxx:43
 TEveRGBAPaletteEditor.cxx:44
 TEveRGBAPaletteEditor.cxx:45
 TEveRGBAPaletteEditor.cxx:46
 TEveRGBAPaletteEditor.cxx:47
 TEveRGBAPaletteEditor.cxx:48
 TEveRGBAPaletteEditor.cxx:49
 TEveRGBAPaletteEditor.cxx:50
 TEveRGBAPaletteEditor.cxx:51
 TEveRGBAPaletteEditor.cxx:52
 TEveRGBAPaletteEditor.cxx:53
 TEveRGBAPaletteEditor.cxx:54
 TEveRGBAPaletteEditor.cxx:55
 TEveRGBAPaletteEditor.cxx:56
 TEveRGBAPaletteEditor.cxx:57
 TEveRGBAPaletteEditor.cxx:58
 TEveRGBAPaletteEditor.cxx:59
 TEveRGBAPaletteEditor.cxx:60
 TEveRGBAPaletteEditor.cxx:61
 TEveRGBAPaletteEditor.cxx:62
 TEveRGBAPaletteEditor.cxx:63
 TEveRGBAPaletteEditor.cxx:64
 TEveRGBAPaletteEditor.cxx:65
 TEveRGBAPaletteEditor.cxx:66
 TEveRGBAPaletteEditor.cxx:67
 TEveRGBAPaletteEditor.cxx:68
 TEveRGBAPaletteEditor.cxx:69
 TEveRGBAPaletteEditor.cxx:70
 TEveRGBAPaletteEditor.cxx:71
 TEveRGBAPaletteEditor.cxx:72
 TEveRGBAPaletteEditor.cxx:73
 TEveRGBAPaletteEditor.cxx:74
 TEveRGBAPaletteEditor.cxx:75
 TEveRGBAPaletteEditor.cxx:76
 TEveRGBAPaletteEditor.cxx:77
 TEveRGBAPaletteEditor.cxx:78
 TEveRGBAPaletteEditor.cxx:79
 TEveRGBAPaletteEditor.cxx:80
 TEveRGBAPaletteEditor.cxx:81
 TEveRGBAPaletteEditor.cxx:82
 TEveRGBAPaletteEditor.cxx:83
 TEveRGBAPaletteEditor.cxx:84
 TEveRGBAPaletteEditor.cxx:85
 TEveRGBAPaletteEditor.cxx:86
 TEveRGBAPaletteEditor.cxx:87
 TEveRGBAPaletteEditor.cxx:88
 TEveRGBAPaletteEditor.cxx:89
 TEveRGBAPaletteEditor.cxx:90
 TEveRGBAPaletteEditor.cxx:91
 TEveRGBAPaletteEditor.cxx:92
 TEveRGBAPaletteEditor.cxx:93
 TEveRGBAPaletteEditor.cxx:94
 TEveRGBAPaletteEditor.cxx:95
 TEveRGBAPaletteEditor.cxx:96
 TEveRGBAPaletteEditor.cxx:97
 TEveRGBAPaletteEditor.cxx:98
 TEveRGBAPaletteEditor.cxx:99
 TEveRGBAPaletteEditor.cxx:100
 TEveRGBAPaletteEditor.cxx:101
 TEveRGBAPaletteEditor.cxx:102
 TEveRGBAPaletteEditor.cxx:103
 TEveRGBAPaletteEditor.cxx:104
 TEveRGBAPaletteEditor.cxx:105
 TEveRGBAPaletteEditor.cxx:106
 TEveRGBAPaletteEditor.cxx:107
 TEveRGBAPaletteEditor.cxx:108
 TEveRGBAPaletteEditor.cxx:109
 TEveRGBAPaletteEditor.cxx:110
 TEveRGBAPaletteEditor.cxx:111
 TEveRGBAPaletteEditor.cxx:112
 TEveRGBAPaletteEditor.cxx:113
 TEveRGBAPaletteEditor.cxx:114
 TEveRGBAPaletteEditor.cxx:115
 TEveRGBAPaletteEditor.cxx:116
 TEveRGBAPaletteEditor.cxx:117
 TEveRGBAPaletteEditor.cxx:118
 TEveRGBAPaletteEditor.cxx:119
 TEveRGBAPaletteEditor.cxx:120
 TEveRGBAPaletteEditor.cxx:121
 TEveRGBAPaletteEditor.cxx:122
 TEveRGBAPaletteEditor.cxx:123
 TEveRGBAPaletteEditor.cxx:124
 TEveRGBAPaletteEditor.cxx:125
 TEveRGBAPaletteEditor.cxx:126
 TEveRGBAPaletteEditor.cxx:127
 TEveRGBAPaletteEditor.cxx:128
 TEveRGBAPaletteEditor.cxx:129
 TEveRGBAPaletteEditor.cxx:130
 TEveRGBAPaletteEditor.cxx:131
 TEveRGBAPaletteEditor.cxx:132
 TEveRGBAPaletteEditor.cxx:133
 TEveRGBAPaletteEditor.cxx:134
 TEveRGBAPaletteEditor.cxx:135
 TEveRGBAPaletteEditor.cxx:136
 TEveRGBAPaletteEditor.cxx:137
 TEveRGBAPaletteEditor.cxx:138
 TEveRGBAPaletteEditor.cxx:139
 TEveRGBAPaletteEditor.cxx:140
 TEveRGBAPaletteEditor.cxx:141
 TEveRGBAPaletteEditor.cxx:142
 TEveRGBAPaletteEditor.cxx:143
 TEveRGBAPaletteEditor.cxx:144
 TEveRGBAPaletteEditor.cxx:145
 TEveRGBAPaletteEditor.cxx:146
 TEveRGBAPaletteEditor.cxx:147
 TEveRGBAPaletteEditor.cxx:148
 TEveRGBAPaletteEditor.cxx:149
 TEveRGBAPaletteEditor.cxx:150
 TEveRGBAPaletteEditor.cxx:151
 TEveRGBAPaletteEditor.cxx:152
 TEveRGBAPaletteEditor.cxx:153
 TEveRGBAPaletteEditor.cxx:154
 TEveRGBAPaletteEditor.cxx:155
 TEveRGBAPaletteEditor.cxx:156
 TEveRGBAPaletteEditor.cxx:157
 TEveRGBAPaletteEditor.cxx:158
 TEveRGBAPaletteEditor.cxx:159
 TEveRGBAPaletteEditor.cxx:160
 TEveRGBAPaletteEditor.cxx:161
 TEveRGBAPaletteEditor.cxx:162
 TEveRGBAPaletteEditor.cxx:163
 TEveRGBAPaletteEditor.cxx:164
 TEveRGBAPaletteEditor.cxx:165
 TEveRGBAPaletteEditor.cxx:166
 TEveRGBAPaletteEditor.cxx:167
 TEveRGBAPaletteEditor.cxx:168
 TEveRGBAPaletteEditor.cxx:169
 TEveRGBAPaletteEditor.cxx:170
 TEveRGBAPaletteEditor.cxx:171
 TEveRGBAPaletteEditor.cxx:172
 TEveRGBAPaletteEditor.cxx:173
 TEveRGBAPaletteEditor.cxx:174
 TEveRGBAPaletteEditor.cxx:175
 TEveRGBAPaletteEditor.cxx:176
 TEveRGBAPaletteEditor.cxx:177
 TEveRGBAPaletteEditor.cxx:178
 TEveRGBAPaletteEditor.cxx:179
 TEveRGBAPaletteEditor.cxx:180
 TEveRGBAPaletteEditor.cxx:181
 TEveRGBAPaletteEditor.cxx:182
 TEveRGBAPaletteEditor.cxx:183
 TEveRGBAPaletteEditor.cxx:184
 TEveRGBAPaletteEditor.cxx:185
 TEveRGBAPaletteEditor.cxx:186
 TEveRGBAPaletteEditor.cxx:187
 TEveRGBAPaletteEditor.cxx:188
 TEveRGBAPaletteEditor.cxx:189
 TEveRGBAPaletteEditor.cxx:190
 TEveRGBAPaletteEditor.cxx:191
 TEveRGBAPaletteEditor.cxx:192
 TEveRGBAPaletteEditor.cxx:193
 TEveRGBAPaletteEditor.cxx:194
 TEveRGBAPaletteEditor.cxx:195
 TEveRGBAPaletteEditor.cxx:196
 TEveRGBAPaletteEditor.cxx:197
 TEveRGBAPaletteEditor.cxx:198
 TEveRGBAPaletteEditor.cxx:199
 TEveRGBAPaletteEditor.cxx:200
 TEveRGBAPaletteEditor.cxx:201
 TEveRGBAPaletteEditor.cxx:202
 TEveRGBAPaletteEditor.cxx:203
 TEveRGBAPaletteEditor.cxx:204
 TEveRGBAPaletteEditor.cxx:205
 TEveRGBAPaletteEditor.cxx:206
 TEveRGBAPaletteEditor.cxx:207
 TEveRGBAPaletteEditor.cxx:208
 TEveRGBAPaletteEditor.cxx:209
 TEveRGBAPaletteEditor.cxx:210
 TEveRGBAPaletteEditor.cxx:211
 TEveRGBAPaletteEditor.cxx:212
 TEveRGBAPaletteEditor.cxx:213
 TEveRGBAPaletteEditor.cxx:214
 TEveRGBAPaletteEditor.cxx:215
 TEveRGBAPaletteEditor.cxx:216
 TEveRGBAPaletteEditor.cxx:217
 TEveRGBAPaletteEditor.cxx:218
 TEveRGBAPaletteEditor.cxx:219
 TEveRGBAPaletteEditor.cxx:220
 TEveRGBAPaletteEditor.cxx:221
 TEveRGBAPaletteEditor.cxx:222
 TEveRGBAPaletteEditor.cxx:223
 TEveRGBAPaletteEditor.cxx:224
 TEveRGBAPaletteEditor.cxx:225
 TEveRGBAPaletteEditor.cxx:226
 TEveRGBAPaletteEditor.cxx:227
 TEveRGBAPaletteEditor.cxx:228
 TEveRGBAPaletteEditor.cxx:229
 TEveRGBAPaletteEditor.cxx:230
 TEveRGBAPaletteEditor.cxx:231
 TEveRGBAPaletteEditor.cxx:232
 TEveRGBAPaletteEditor.cxx:233
 TEveRGBAPaletteEditor.cxx:234
 TEveRGBAPaletteEditor.cxx:235
 TEveRGBAPaletteEditor.cxx:236
 TEveRGBAPaletteEditor.cxx:237
 TEveRGBAPaletteEditor.cxx:238
 TEveRGBAPaletteEditor.cxx:239
 TEveRGBAPaletteEditor.cxx:240
 TEveRGBAPaletteEditor.cxx:241
 TEveRGBAPaletteEditor.cxx:242
 TEveRGBAPaletteEditor.cxx:243
 TEveRGBAPaletteEditor.cxx:244
 TEveRGBAPaletteEditor.cxx:245
 TEveRGBAPaletteEditor.cxx:246
 TEveRGBAPaletteEditor.cxx:247
 TEveRGBAPaletteEditor.cxx:248
 TEveRGBAPaletteEditor.cxx:249
 TEveRGBAPaletteEditor.cxx:250
 TEveRGBAPaletteEditor.cxx:251
 TEveRGBAPaletteEditor.cxx:252
 TEveRGBAPaletteEditor.cxx:253
 TEveRGBAPaletteEditor.cxx:254
 TEveRGBAPaletteEditor.cxx:255
 TEveRGBAPaletteEditor.cxx:256
 TEveRGBAPaletteEditor.cxx:257
 TEveRGBAPaletteEditor.cxx:258
 TEveRGBAPaletteEditor.cxx:259
 TEveRGBAPaletteEditor.cxx:260
 TEveRGBAPaletteEditor.cxx:261
 TEveRGBAPaletteEditor.cxx:262
 TEveRGBAPaletteEditor.cxx:263
 TEveRGBAPaletteEditor.cxx:264
 TEveRGBAPaletteEditor.cxx:265
 TEveRGBAPaletteEditor.cxx:266
 TEveRGBAPaletteEditor.cxx:267
 TEveRGBAPaletteEditor.cxx:268
 TEveRGBAPaletteEditor.cxx:269
 TEveRGBAPaletteEditor.cxx:270
 TEveRGBAPaletteEditor.cxx:271
 TEveRGBAPaletteEditor.cxx:272
 TEveRGBAPaletteEditor.cxx:273
 TEveRGBAPaletteEditor.cxx:274
 TEveRGBAPaletteEditor.cxx:275
 TEveRGBAPaletteEditor.cxx:276
 TEveRGBAPaletteEditor.cxx:277
 TEveRGBAPaletteEditor.cxx:278
 TEveRGBAPaletteEditor.cxx:279
 TEveRGBAPaletteEditor.cxx:280
 TEveRGBAPaletteEditor.cxx:281
 TEveRGBAPaletteEditor.cxx:282
 TEveRGBAPaletteEditor.cxx:283
 TEveRGBAPaletteEditor.cxx:284
 TEveRGBAPaletteEditor.cxx:285
 TEveRGBAPaletteEditor.cxx:286
 TEveRGBAPaletteEditor.cxx:287
 TEveRGBAPaletteEditor.cxx:288
 TEveRGBAPaletteEditor.cxx:289
 TEveRGBAPaletteEditor.cxx:290
 TEveRGBAPaletteEditor.cxx:291
 TEveRGBAPaletteEditor.cxx:292
 TEveRGBAPaletteEditor.cxx:293
 TEveRGBAPaletteEditor.cxx:294
 TEveRGBAPaletteEditor.cxx:295
 TEveRGBAPaletteEditor.cxx:296
 TEveRGBAPaletteEditor.cxx:297
 TEveRGBAPaletteEditor.cxx:298
 TEveRGBAPaletteEditor.cxx:299
 TEveRGBAPaletteEditor.cxx:300
 TEveRGBAPaletteEditor.cxx:301
 TEveRGBAPaletteEditor.cxx:302
 TEveRGBAPaletteEditor.cxx:303
 TEveRGBAPaletteEditor.cxx:304
 TEveRGBAPaletteEditor.cxx:305
 TEveRGBAPaletteEditor.cxx:306
 TEveRGBAPaletteEditor.cxx:307
 TEveRGBAPaletteEditor.cxx:308
 TEveRGBAPaletteEditor.cxx:309
 TEveRGBAPaletteEditor.cxx:310
 TEveRGBAPaletteEditor.cxx:311
 TEveRGBAPaletteEditor.cxx:312
 TEveRGBAPaletteEditor.cxx:313
 TEveRGBAPaletteEditor.cxx:314
 TEveRGBAPaletteEditor.cxx:315
 TEveRGBAPaletteEditor.cxx:316
 TEveRGBAPaletteEditor.cxx:317
 TEveRGBAPaletteEditor.cxx:318
 TEveRGBAPaletteEditor.cxx:319
 TEveRGBAPaletteEditor.cxx:320
 TEveRGBAPaletteEditor.cxx:321
 TEveRGBAPaletteEditor.cxx:322
 TEveRGBAPaletteEditor.cxx:323
 TEveRGBAPaletteEditor.cxx:324
 TEveRGBAPaletteEditor.cxx:325
 TEveRGBAPaletteEditor.cxx:326
 TEveRGBAPaletteEditor.cxx:327
 TEveRGBAPaletteEditor.cxx:328
 TEveRGBAPaletteEditor.cxx:329
 TEveRGBAPaletteEditor.cxx:330
 TEveRGBAPaletteEditor.cxx:331
 TEveRGBAPaletteEditor.cxx:332
 TEveRGBAPaletteEditor.cxx:333
 TEveRGBAPaletteEditor.cxx:334
 TEveRGBAPaletteEditor.cxx:335
 TEveRGBAPaletteEditor.cxx:336
 TEveRGBAPaletteEditor.cxx:337
 TEveRGBAPaletteEditor.cxx:338
 TEveRGBAPaletteEditor.cxx:339
 TEveRGBAPaletteEditor.cxx:340