// @(#)root/guibuilder:$Id$
// Author: Valeriy Onuchin   12/09/04

/*************************************************************************
 * Copyright (C) 1995-2004, 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 "TGuiBldHintsEditor.h"
#include "TGuiBldHintsButton.h"
#include "TGNumberEntry.h"
#include "TGuiBldEditor.h"
#include "TGLabel.h"
#include "TG3DLine.h"
#include "TGuiBldNameFrame.h"
#include "TGuiBldGeometryFrame.h"
#include "TRootGuiBuilder.h"
#include "TGTableLayout.h"

//_____________________________________________________________________________
//
// TGuiBldHintsEditor
//
// Editor of widget's layout hints used by the ROOT GUI builder.
//_____________________________________________________________________________

ClassImp(TGuiBldHintsEditor)

////////////////////////////////////////////////////////////////////////////////
class TGuiBldHintsManager : public TGVerticalFrame {

public:
   TGuiBldEditor  *fEditor;
   TGNumberEntry  *fColumns;
   TGNumberEntry  *fRows;
   TGuiBldHintsEditor *fHints;
   TGMatrixLayout *fMatrix;

   UInt_t  fPadTop;      // save values
   UInt_t  fPadBottom;   //
   UInt_t  fPadLeft;     //
   UInt_t  fPadRight;    //

public:
   TGuiBldHintsManager(const TGWindow *p, TGuiBldEditor *editor, TGuiBldHintsEditor *hints);
   virtual ~TGuiBldHintsManager() { }
   void ChangeSelected(TGFrame *frame);
};

//______________________________________________________________________________
TGuiBldHintsManager::TGuiBldHintsManager(const TGWindow *p, TGuiBldEditor *e,
                                          TGuiBldHintsEditor *hints) :
                     TGVerticalFrame(p, 1, 1), fEditor(e), fHints(hints)
{
   // Constructor.

   fEditDisabled = kEditDisable;
   SetCleanup(kDeepCleanup);
   fRows = 0;
   fColumns = 0;

   //-----check button to layout subframes was moved to HintsEditor to be generalized ------

   // "Matrix layout" group frame
   TGGroupFrame *fGroupFrame4066 = new TGGroupFrame(this, "Matrix layout");
   TGHorizontalFrame *f = new TGHorizontalFrame(fGroupFrame4066);

   f->AddFrame(new TGLabel(f," Cols "), new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));
   fColumns = new TGNumberEntry(f,0.0,4,-1,(TGNumberFormat::EStyle)5);
   f->AddFrame(fColumns, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));

   f->AddFrame(new TGLabel(f," Rows "), new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));
   fRows = new TGNumberEntry(f,0.0,4,-1,(TGNumberFormat::EStyle)5);
   f->AddFrame(fRows, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));

   fGroupFrame4066->AddFrame(f, new TGLayoutHints(kLHintsExpandX | kLHintsCenterY, 2, 2, 2, 2));

   TGTextButton *fAppButton = new TGTextButton(fGroupFrame4066, " Apply ");
   fGroupFrame4066->AddFrame(fAppButton, new TGLayoutHints(kLHintsExpandX | kLHintsCenterY, 5, 5, 2, 2));

   AddFrame(fGroupFrame4066, new TGLayoutHints(kLHintsTop | kLHintsExpandX));

   fAppButton->Connect("Clicked()", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
   //fRows->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
   //fColumns->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
   fRows->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
   fColumns->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
   fRows->SetLimits(TGNumberFormat::kNELLimitMin, 1);
   fColumns->SetLimits(TGNumberFormat::kNELLimitMin, 1);

   fPadTop = 2;
   fPadBottom = 2;
   fPadLeft = 2;
   fPadRight = 2;

   MapSubwindows();
   Resize();
   MapWindow();
}

//______________________________________________________________________________
void TGuiBldHintsManager::ChangeSelected(TGFrame *frame)
{
   // action whne selcted/grabbed frame was changed

   fMatrix = 0;

   if (!frame) {
      UnmapWindow();
      fHints->fLayButton->SetEnabled(kFALSE);
      fHints->fLayButton->SetDown(kFALSE);
      fRows->SetNumber(0);
      fColumns->SetNumber(0);
      return;
   }

   Bool_t enable = frame->InheritsFrom(TGCompositeFrame::Class()) &&
                   !(frame->GetEditDisabled() & kEditDisableLayout);

   if (!enable) {
      UnmapWindow();
      fHints->fLayButton->SetEnabled(kFALSE);
      fHints->fLayButton->SetDown(kFALSE);
      fRows->SetNumber(0);
      fColumns->SetNumber(0);
   } else {
      TGCompositeFrame *comp = (TGCompositeFrame*)frame;
      TGLayoutManager *lm = comp->GetLayoutManager();

      if (!lm) {
         return;
      }
      Int_t n = comp->GetList()->GetEntries();

      MapWindow();
      fHints->fLayButton->SetEnabled(kTRUE);
      fHints->fLayButton->SetDown(kFALSE);

      if (lm->IsA() == TGVerticalLayout::Class()) {
         fRows->SetNumber(n);
         fColumns->SetNumber(1);
      } else if (lm->IsA() == TGHorizontalLayout::Class()) {
         fColumns->SetNumber(n);
         fRows->SetNumber(1);
      } else if (lm->IsA() == TGMatrixLayout::Class()) {
         fMatrix = (TGMatrixLayout*)lm;

         fColumns->SetNumber(fMatrix->fColumns);
         fRows->SetNumber(fMatrix->fRows);
      }
   }
   DoRedraw();
}

///////////////////////////////////////////////////////////////////////////////
//______________________________________________________________________________
TGuiBldHintsEditor::TGuiBldHintsEditor(const TGWindow *p, TGuiBldEditor *e) :
                     TGVerticalFrame(p, 1, 1), fEditor(e)
{
   // ctor.

   SetCleanup(kDeepCleanup);

   fBuilder = (TRootGuiBuilder*)TRootGuiBuilder::Instance();

   TGVerticalFrame *frame3 = new TGVerticalFrame(this,262,18,kVerticalFrame);

   // horizontal frame - layout subframes (token from matrix layout)
   TGHorizontalFrame *framez399 = new TGHorizontalFrame(frame3,123,40,kHorizontalFrame);
   fLayButton = new TGCheckButton(framez399,"");
   framez399->AddFrame(fLayButton, new TGLayoutHints(kLHintsLeft | kLHintsTop,0,1,2,2));
   TGLabel *framez401 = new TGLabel(framez399,"Layout subframes");
   framez399->AddFrame(framez401, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop,1,1,2,2));

   frame3->AddFrame(framez399, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop,1,1,1,1));

   fLayButton->Connect("Toggled(Bool_t)", "TGuiBldHintsEditor", this, "LayoutSubframes(Bool_t)");

   //--------layout hints in new layout---------------------------------------

   // "Padding" group frame
   fPaddingFrame = new TGGroupFrame(frame3, "Padding");
   fPaddingFrame->SetLayoutManager(new TGTableLayout(fPaddingFrame, 2, 4));
   
   fPaddingFrame->AddFrame(new TGLabel(fPaddingFrame,"Top "), 
                           new TGTableLayoutHints(0, 1, 0, 1, 
                           kLHintsRight | kLHintsCenterY, 0, 2, 2, 2));
   fPadTop = new TGNumberEntry(fPaddingFrame,0.0,4,-1,(TGNumberFormat::EStyle) 5);
   fPaddingFrame->AddFrame(fPadTop, new TGTableLayoutHints(1, 2, 0, 1,
                           kLHintsLeft | kLHintsCenterY, 0, 0, 2, 2));

   fPaddingFrame->AddFrame(new TGLabel(fPaddingFrame," Left "),
                           new TGTableLayoutHints(2, 3, 0, 1, 
                           kLHintsRight | kLHintsCenterY, 2, 2, 2, 2));
   fPadLeft = new TGNumberEntry(fPaddingFrame,0.0,4,-1,(TGNumberFormat::EStyle) 5);
   fPaddingFrame->AddFrame(fPadLeft, new TGTableLayoutHints(3, 4, 0, 1,
                           kLHintsLeft | kLHintsCenterY, 0, 0, 2, 2));

   fPaddingFrame->AddFrame(new TGLabel(fPaddingFrame,"Bottom "),
                           new TGTableLayoutHints(0, 1, 1, 2, 
                           kLHintsRight | kLHintsCenterY, 0, 2, 2, 2));
   fPadBottom = new TGNumberEntry(fPaddingFrame,0.0,4,-1,(TGNumberFormat::EStyle) 5);
   fPaddingFrame->AddFrame(fPadBottom, new TGTableLayoutHints(1, 2, 1, 2,
                           kLHintsLeft | kLHintsCenterY, 0, 0, 2, 2));

   fPaddingFrame->AddFrame(new TGLabel(fPaddingFrame," Right "),
                           new TGTableLayoutHints(2, 3, 1, 2, 
                           kLHintsRight | kLHintsCenterY, 2, 2, 2, 2));
   fPadRight = new TGNumberEntry(fPaddingFrame,0.0,4,-1,(TGNumberFormat::EStyle) 5);
   fPaddingFrame->AddFrame(fPadRight, new TGTableLayoutHints(3, 4, 1, 2,
                           kLHintsLeft | kLHintsCenterY, 0, 0, 2, 2));

   frame3->AddFrame(fPaddingFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 2, 2));

   // "Layout" group frame
   fHintsFrame = new TGGroupFrame(frame3,"Layout");

   fHintsFrame->SetLayoutManager(new TGTableLayout(fHintsFrame, 4, 2));

   fCbTop = new TGCheckButton(fHintsFrame, "Top");
   fHintsFrame->AddFrame(fCbTop, new TGTableLayoutHints(0, 1, 0, 1,
                         kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));

   fCbBottom = new TGCheckButton(fHintsFrame, "Bottom");
   fHintsFrame->AddFrame(fCbBottom, new TGTableLayoutHints(0, 1, 1, 2,
                         kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));

   fCbLeft = new TGCheckButton(fHintsFrame, "Left");
   fHintsFrame->AddFrame(fCbLeft, new TGTableLayoutHints(0, 1, 2, 3,
                         kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));

   fCbRight = new TGCheckButton(fHintsFrame, "Right");
   fHintsFrame->AddFrame(fCbRight, new TGTableLayoutHints(0, 1, 3, 4,
                         kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));

   fCbCenterX = new TGCheckButton(fHintsFrame, "Center in X");
   fHintsFrame->AddFrame(fCbCenterX, new TGTableLayoutHints(1, 2, 0, 1,
                         kLHintsLeft | kLHintsCenterY, 9, 2, 2, 2));

   fCbCenterY = new TGCheckButton(fHintsFrame, "Center in Y");
   fHintsFrame->AddFrame(fCbCenterY, new TGTableLayoutHints(1, 2, 1, 2,
                         kLHintsLeft | kLHintsCenterY, 9, 2, 2, 2));

   fCbExpandX = new TGCheckButton(fHintsFrame, "Expand in X");
   fHintsFrame->AddFrame(fCbExpandX, new TGTableLayoutHints(1, 2, 2, 3,
                         kLHintsLeft | kLHintsCenterY, 9, 2, 2, 2));

   fCbExpandY = new TGCheckButton(fHintsFrame, "Expand in Y");
   fHintsFrame->AddFrame(fCbExpandY, new TGTableLayoutHints(1, 2, 3, 4,
                         kLHintsLeft | kLHintsCenterY, 9, 2, 2, 2));

   frame3->AddFrame(fHintsFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 2, 2));

   fHintsManager = new TGuiBldHintsManager(frame3, e, this);
   frame3->AddFrame(fHintsManager, new TGLayoutHints(kLHintsBottom | kLHintsExpandX,2,2,2,2));
   fHintsManager->UnmapWindow();
   AddFrame(frame3);

   SetEditDisabled(1);
   Resize();
   MapSubwindows();
   MapWindow();

   fCbTop->Connect("Clicked()", "TGButton", fCbBottom, "SetDown(=kFALSE)");
   fCbBottom->Connect("Clicked()",  "TGButton", fCbTop, "SetDown(=kFALSE)");
   fCbRight->Connect("Clicked()",  "TGButton", fCbLeft, "SetDown(=kFALSE)");
   fCbLeft->Connect("Clicked()",  "TGButton", fCbRight, "SetDown(=kFALSE)");

   fCbTop->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
   fCbBottom->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
   fCbRight->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
   fCbLeft->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
   fCbExpandX->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
   fCbCenterX->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
   fCbExpandY->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
   fCbCenterY->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");

   fPadTop->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", this, "UpdateState()");
   fPadLeft->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", this, "UpdateState()");
   fPadRight->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", this, "UpdateState()");
   fPadBottom->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", this, "UpdateState()");

   fPadTop->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", this, "UpdateState()");
   fPadLeft->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", this, "UpdateState()");
   fPadRight->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", this, "UpdateState()");
   fPadBottom->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", this, "UpdateState()");
}


//______________________________________________________________________________
void  TGuiBldHintsEditor::ChangeSelected(TGFrame *frame)
{
   // Change selected

   if (!frame) {
      return;
   }
   TGFrameElement *fe = frame->GetFrameElement();

   if (!fe) {
      return;
   }

   fHintsManager->ChangeSelected(frame);

   ULong_t lh = fe->fLayout->GetLayoutHints();

   fCbCenterX->SetEnabled(kTRUE);
   fCbCenterY->SetEnabled(kTRUE);
   fCbExpandX->SetEnabled(!(frame->GetEditDisabled() & kEditDisableWidth));
   fCbExpandY->SetEnabled(!(frame->GetEditDisabled() & kEditDisableHeight));
   fClient->NeedRedraw(fCbExpandX);
   fClient->NeedRedraw(fCbExpandY);

   fCbTop->SetEnabled(kTRUE);
   fCbRight->SetEnabled(kTRUE);
   fCbLeft->SetEnabled(kTRUE);
   fCbBottom->SetEnabled(kTRUE);

   fCbCenterX->SetDown(lh & kLHintsCenterX);
   fCbCenterY->SetDown(lh & kLHintsCenterY);
   fCbExpandX->SetDown(lh & kLHintsExpandX);
   fCbExpandY->SetDown(lh & kLHintsExpandY);

   fCbTop->SetDown(lh & kLHintsTop);
   fCbRight->SetDown(lh & kLHintsRight);
   fCbLeft->SetDown(lh & kLHintsLeft);
   fCbBottom->SetDown(lh & kLHintsBottom);

   fPadTop->SetIntNumber(fe->fLayout->GetPadTop());
   fPadLeft->SetIntNumber(fe->fLayout->GetPadLeft());
   fPadRight->SetIntNumber(fe->fLayout->GetPadRight());
   fPadBottom->SetIntNumber(fe->fLayout->GetPadBottom());
}

//______________________________________________________________________________
void TGuiBldHintsEditor::UpdateState()
{
   // Update state

   TGFrame *frame = fEditor->GetSelected();

   if (!frame) {
      return;
   }

   TGFrameElement *fe = frame->GetFrameElement();

   if (!fe) {
      return;
   }

   if (fLayButton->IsDown() &&
       ((gTQSender == fPadTop) || (gTQSender == fPadBottom) ||
       (gTQSender == fPadLeft) || (gTQSender == fPadRight))) {
      SetMatrixSep();
      return;
   }

   ULong_t lh = fe->fLayout->GetLayoutHints();

   if (fCbCenterX->IsDown()) {
      lh |= kLHintsCenterX;
   } else {
      lh &= ~kLHintsCenterX;
   }

   if (fCbCenterY->IsDown()) {
      lh |= kLHintsCenterY;
   } else {
      lh &= ~kLHintsCenterY;
   }

   if (fCbExpandX->IsDown()) {
      lh |= kLHintsExpandX;
   } else {
      lh &= ~kLHintsExpandX;
   }

   if (fCbExpandY->IsDown()) {
      lh |= kLHintsExpandY;
   } else {
      lh &= ~kLHintsExpandY;
   }

   if (fCbTop->IsDown()) {
      lh |= kLHintsTop;
      lh &= ~kLHintsBottom;
   } else {
      lh &= ~kLHintsTop;
   }

   if (fCbBottom->IsDown()) {
      lh |= kLHintsBottom;
      lh &= ~kLHintsTop;
   } else {
      lh &= ~kLHintsBottom;
   }

   if (fCbRight->IsDown()) {
      lh |= kLHintsRight;
      lh &= ~kLHintsLeft;
   } else {
      lh &= ~kLHintsRight;
   }

   if (fCbLeft->IsDown()) {
      lh |= kLHintsLeft;
      lh &= ~kLHintsRight;
   } else {
      lh &= ~kLHintsLeft;
   }

   if (fPadLeft->GetIntNumber() >=0) {
     fe->fLayout->SetPadLeft(fPadLeft->GetIntNumber());
   }
   if (fPadRight->GetIntNumber() >=0) {
     fe->fLayout->SetPadRight(fPadRight->GetIntNumber());
   }
   if (fPadTop->GetIntNumber() >=0) {
     fe->fLayout->SetPadTop(fPadTop->GetIntNumber());
   }
   if (fPadBottom->GetIntNumber() >=0) {
     fe->fLayout->SetPadBottom(fPadBottom->GetIntNumber());
   }

   if (fe->fLayout->References() > 1) {
      TGLayoutHints *lh2 = new TGLayoutHints(*fe->fLayout);
      fe->fLayout->RemoveReference();
      lh2->AddReference();
      fe->fLayout = lh2;
   } else {
      fe->fLayout->SetLayoutHints(lh);
   }

   fEditor->UpdateSelected(frame);
}

//______________________________________________________________________________
void TGuiBldHintsEditor::SetPosition()
{
   // Set the position of selected frame when adjusted by the right panel input.

   if (!fEditor) {
      return;
   }
   TGFrame *frame = fEditor->GetSelected();

   if (!frame) {
      //fNameFrame->Reset();
      return;
   }

   if ((fEditor->GetXPos() >= 0) && (fEditor->GetYPos() >= 0)) {
      frame->MoveResize(fEditor->GetXPos(), fEditor->GetYPos(),
                        frame->GetWidth(), frame->GetHeight());
      fClient->NeedRedraw(frame, kTRUE);
      TGWindow *root = (TGWindow*)fClient->GetRoot();
      fClient->NeedRedraw(root, kTRUE);
      if (fBuilder) {
         fClient->NeedRedraw(fBuilder, kTRUE);
      }
   } else {
      fEditor->SetYPos(frame->GetY());
      fEditor->SetXPos(frame->GetX());
   }
}


//______________________________________________________________________________
void TGuiBldHintsEditor::LayoutSubframes(Bool_t on)
{
   // Layout subframes.

   if (!fEditor) {
      return;
   }
   TGFrame *frame = fEditor->GetSelected();

   if (!frame) {
      //fNameFrame->Reset();
      return;
   }

   TGFrameElement *fe = frame->GetFrameElement();

   if (!fe) {
      //fNameFrame->Reset();
      return;
   }

   Bool_t enable = frame->InheritsFrom(TGCompositeFrame::Class()) &&
                   !(frame->GetEditDisabled() & kEditDisableLayout);

   if (!on) {
      fPadTop->SetIntNumber(fHintsManager->fPadTop);
      fPadBottom->SetIntNumber(fHintsManager->fPadBottom);
      fPadLeft->SetIntNumber(fHintsManager->fPadLeft);
      fPadRight->SetIntNumber(fHintsManager->fPadRight);

      ChangeSelected(frame);
      return;
   }
   if (!enable) {
      return;
   }

   TGCompositeFrame *comp = (TGCompositeFrame*)frame;
   fHintsManager->fRows->SetState(kTRUE);
   fHintsManager->fColumns->SetState(kTRUE);
   comp->SetLayoutBroken(kFALSE);

   if (!fHintsManager->fMatrix) {
      if (!(frame->GetParent()->GetEditDisabled() & kEditDisableLayout)) {
         //comp->Resize();
         comp->Layout();
      } else {
         if (comp->GetLayoutManager()) {
            comp->GetLayoutManager()->Layout();
         } else {
            comp->Layout();
         }
      }
      return;
   }

   MatrixLayout();

}

//______________________________________________________________________________
void TGuiBldHintsEditor::SetMatrixSep()
{
   // Set matrix layout separator.

   TGFrame *frame = fEditor->GetSelected();

   if (!frame) {
      //fNameFrame->Reset();
      return;
   }

   TGFrameElement *fe = frame->GetFrameElement();

   if (!fe) {
      //fNameFrame->Reset();
      return;
   }

   Bool_t enable = frame->InheritsFrom(TGCompositeFrame::Class()) &&
                   !(frame->GetEditDisabled() & kEditDisableLayout) &&
                    ((TGCompositeFrame*)frame)->GetLayoutManager() &&
                    ((TGCompositeFrame*)frame)->GetLayoutManager()->InheritsFrom(TGMatrixLayout::Class());

   if (!enable) {
      return;
   }

   TGNumberEntry *ne = (TGNumberEntry*)gTQSender;
   UInt_t sep = ne->GetIntNumber();

   fPadTop->SetIntNumber(sep);
   fPadLeft->SetIntNumber(sep);
   fPadRight->SetIntNumber(sep);
   fPadBottom->SetIntNumber(sep);
   fLayButton->SetDown(kTRUE);

   fHintsManager->fMatrix->fSep = sep;
   frame->SetLayoutBroken(kFALSE);

   if (!(frame->GetParent()->GetEditDisabled() & kEditDisableLayout)) {
      frame->Resize();
   } else {
      fHintsManager->fMatrix->Layout();
   }
   fClient->NeedRedraw(frame, kTRUE);
}

//______________________________________________________________________________
void TGuiBldHintsEditor::MatrixLayout()
{
   // Apply matrix layout.

   TGFrame *frame = fEditor->GetSelected();

   if (!frame) {
      //fNameFrame->Reset();
      return;
   }

   TGFrameElement *fe = frame->GetFrameElement();

   if (!fe) {
      //fNameFrame->Reset();
      return;
   }

   Bool_t enable = frame->InheritsFrom(TGCompositeFrame::Class()) &&
                   !(frame->GetEditDisabled() & kEditDisableLayout);

   if (!enable) {
      return;
   }

   TGCompositeFrame *comp = (TGCompositeFrame*)frame;

   UInt_t rows = fHintsManager->fRows->GetIntNumber();
   UInt_t cols = fHintsManager->fColumns->GetIntNumber();
   UInt_t sep = fPadTop->GetIntNumber();

   fCbCenterX->SetEnabled(kFALSE);
   fCbCenterY->SetEnabled(kFALSE);
   fCbExpandX->SetEnabled(kFALSE);
   fCbExpandY->SetEnabled(kFALSE);

   fCbTop->SetEnabled(kFALSE);
   fCbRight->SetEnabled(kFALSE);
   fCbLeft->SetEnabled(kFALSE);
   fCbBottom->SetEnabled(kFALSE);

   fHintsManager->fPadTop = fPadTop->GetIntNumber();
   fHintsManager->fPadBottom = fPadBottom->GetIntNumber();
   fHintsManager->fPadLeft = fPadLeft->GetIntNumber();
   fHintsManager->fPadRight = fPadRight->GetIntNumber();

   fPadTop->SetIntNumber(sep);
   fPadLeft->SetIntNumber(sep);
   fPadRight->SetIntNumber(sep);
   fPadBottom->SetIntNumber(sep);

   fHintsManager->fRows->SetState(kTRUE);
   fHintsManager->fColumns->SetState(kTRUE);

   comp->SetLayoutBroken(kFALSE);

   fHintsManager->fMatrix = new TGMatrixLayout(comp, rows, cols, sep, 0);
   comp->SetLayoutManager(fHintsManager->fMatrix);

   if (!(comp->GetParent()->GetEditDisabled() & kEditDisableLayout)) {
      comp->Layout(); //resize?
   } else {
      fHintsManager->fMatrix->Layout();
   }
   fClient->NeedRedraw(comp, kTRUE);
}
 TGuiBldHintsEditor.cxx:1
 TGuiBldHintsEditor.cxx:2
 TGuiBldHintsEditor.cxx:3
 TGuiBldHintsEditor.cxx:4
 TGuiBldHintsEditor.cxx:5
 TGuiBldHintsEditor.cxx:6
 TGuiBldHintsEditor.cxx:7
 TGuiBldHintsEditor.cxx:8
 TGuiBldHintsEditor.cxx:9
 TGuiBldHintsEditor.cxx:10
 TGuiBldHintsEditor.cxx:11
 TGuiBldHintsEditor.cxx:12
 TGuiBldHintsEditor.cxx:13
 TGuiBldHintsEditor.cxx:14
 TGuiBldHintsEditor.cxx:15
 TGuiBldHintsEditor.cxx:16
 TGuiBldHintsEditor.cxx:17
 TGuiBldHintsEditor.cxx:18
 TGuiBldHintsEditor.cxx:19
 TGuiBldHintsEditor.cxx:20
 TGuiBldHintsEditor.cxx:21
 TGuiBldHintsEditor.cxx:22
 TGuiBldHintsEditor.cxx:23
 TGuiBldHintsEditor.cxx:24
 TGuiBldHintsEditor.cxx:25
 TGuiBldHintsEditor.cxx:26
 TGuiBldHintsEditor.cxx:27
 TGuiBldHintsEditor.cxx:28
 TGuiBldHintsEditor.cxx:29
 TGuiBldHintsEditor.cxx:30
 TGuiBldHintsEditor.cxx:31
 TGuiBldHintsEditor.cxx:32
 TGuiBldHintsEditor.cxx:33
 TGuiBldHintsEditor.cxx:34
 TGuiBldHintsEditor.cxx:35
 TGuiBldHintsEditor.cxx:36
 TGuiBldHintsEditor.cxx:37
 TGuiBldHintsEditor.cxx:38
 TGuiBldHintsEditor.cxx:39
 TGuiBldHintsEditor.cxx:40
 TGuiBldHintsEditor.cxx:41
 TGuiBldHintsEditor.cxx:42
 TGuiBldHintsEditor.cxx:43
 TGuiBldHintsEditor.cxx:44
 TGuiBldHintsEditor.cxx:45
 TGuiBldHintsEditor.cxx:46
 TGuiBldHintsEditor.cxx:47
 TGuiBldHintsEditor.cxx:48
 TGuiBldHintsEditor.cxx:49
 TGuiBldHintsEditor.cxx:50
 TGuiBldHintsEditor.cxx:51
 TGuiBldHintsEditor.cxx:52
 TGuiBldHintsEditor.cxx:53
 TGuiBldHintsEditor.cxx:54
 TGuiBldHintsEditor.cxx:55
 TGuiBldHintsEditor.cxx:56
 TGuiBldHintsEditor.cxx:57
 TGuiBldHintsEditor.cxx:58
 TGuiBldHintsEditor.cxx:59
 TGuiBldHintsEditor.cxx:60
 TGuiBldHintsEditor.cxx:61
 TGuiBldHintsEditor.cxx:62
 TGuiBldHintsEditor.cxx:63
 TGuiBldHintsEditor.cxx:64
 TGuiBldHintsEditor.cxx:65
 TGuiBldHintsEditor.cxx:66
 TGuiBldHintsEditor.cxx:67
 TGuiBldHintsEditor.cxx:68
 TGuiBldHintsEditor.cxx:69
 TGuiBldHintsEditor.cxx:70
 TGuiBldHintsEditor.cxx:71
 TGuiBldHintsEditor.cxx:72
 TGuiBldHintsEditor.cxx:73
 TGuiBldHintsEditor.cxx:74
 TGuiBldHintsEditor.cxx:75
 TGuiBldHintsEditor.cxx:76
 TGuiBldHintsEditor.cxx:77
 TGuiBldHintsEditor.cxx:78
 TGuiBldHintsEditor.cxx:79
 TGuiBldHintsEditor.cxx:80
 TGuiBldHintsEditor.cxx:81
 TGuiBldHintsEditor.cxx:82
 TGuiBldHintsEditor.cxx:83
 TGuiBldHintsEditor.cxx:84
 TGuiBldHintsEditor.cxx:85
 TGuiBldHintsEditor.cxx:86
 TGuiBldHintsEditor.cxx:87
 TGuiBldHintsEditor.cxx:88
 TGuiBldHintsEditor.cxx:89
 TGuiBldHintsEditor.cxx:90
 TGuiBldHintsEditor.cxx:91
 TGuiBldHintsEditor.cxx:92
 TGuiBldHintsEditor.cxx:93
 TGuiBldHintsEditor.cxx:94
 TGuiBldHintsEditor.cxx:95
 TGuiBldHintsEditor.cxx:96
 TGuiBldHintsEditor.cxx:97
 TGuiBldHintsEditor.cxx:98
 TGuiBldHintsEditor.cxx:99
 TGuiBldHintsEditor.cxx:100
 TGuiBldHintsEditor.cxx:101
 TGuiBldHintsEditor.cxx:102
 TGuiBldHintsEditor.cxx:103
 TGuiBldHintsEditor.cxx:104
 TGuiBldHintsEditor.cxx:105
 TGuiBldHintsEditor.cxx:106
 TGuiBldHintsEditor.cxx:107
 TGuiBldHintsEditor.cxx:108
 TGuiBldHintsEditor.cxx:109
 TGuiBldHintsEditor.cxx:110
 TGuiBldHintsEditor.cxx:111
 TGuiBldHintsEditor.cxx:112
 TGuiBldHintsEditor.cxx:113
 TGuiBldHintsEditor.cxx:114
 TGuiBldHintsEditor.cxx:115
 TGuiBldHintsEditor.cxx:116
 TGuiBldHintsEditor.cxx:117
 TGuiBldHintsEditor.cxx:118
 TGuiBldHintsEditor.cxx:119
 TGuiBldHintsEditor.cxx:120
 TGuiBldHintsEditor.cxx:121
 TGuiBldHintsEditor.cxx:122
 TGuiBldHintsEditor.cxx:123
 TGuiBldHintsEditor.cxx:124
 TGuiBldHintsEditor.cxx:125
 TGuiBldHintsEditor.cxx:126
 TGuiBldHintsEditor.cxx:127
 TGuiBldHintsEditor.cxx:128
 TGuiBldHintsEditor.cxx:129
 TGuiBldHintsEditor.cxx:130
 TGuiBldHintsEditor.cxx:131
 TGuiBldHintsEditor.cxx:132
 TGuiBldHintsEditor.cxx:133
 TGuiBldHintsEditor.cxx:134
 TGuiBldHintsEditor.cxx:135
 TGuiBldHintsEditor.cxx:136
 TGuiBldHintsEditor.cxx:137
 TGuiBldHintsEditor.cxx:138
 TGuiBldHintsEditor.cxx:139
 TGuiBldHintsEditor.cxx:140
 TGuiBldHintsEditor.cxx:141
 TGuiBldHintsEditor.cxx:142
 TGuiBldHintsEditor.cxx:143
 TGuiBldHintsEditor.cxx:144
 TGuiBldHintsEditor.cxx:145
 TGuiBldHintsEditor.cxx:146
 TGuiBldHintsEditor.cxx:147
 TGuiBldHintsEditor.cxx:148
 TGuiBldHintsEditor.cxx:149
 TGuiBldHintsEditor.cxx:150
 TGuiBldHintsEditor.cxx:151
 TGuiBldHintsEditor.cxx:152
 TGuiBldHintsEditor.cxx:153
 TGuiBldHintsEditor.cxx:154
 TGuiBldHintsEditor.cxx:155
 TGuiBldHintsEditor.cxx:156
 TGuiBldHintsEditor.cxx:157
 TGuiBldHintsEditor.cxx:158
 TGuiBldHintsEditor.cxx:159
 TGuiBldHintsEditor.cxx:160
 TGuiBldHintsEditor.cxx:161
 TGuiBldHintsEditor.cxx:162
 TGuiBldHintsEditor.cxx:163
 TGuiBldHintsEditor.cxx:164
 TGuiBldHintsEditor.cxx:165
 TGuiBldHintsEditor.cxx:166
 TGuiBldHintsEditor.cxx:167
 TGuiBldHintsEditor.cxx:168
 TGuiBldHintsEditor.cxx:169
 TGuiBldHintsEditor.cxx:170
 TGuiBldHintsEditor.cxx:171
 TGuiBldHintsEditor.cxx:172
 TGuiBldHintsEditor.cxx:173
 TGuiBldHintsEditor.cxx:174
 TGuiBldHintsEditor.cxx:175
 TGuiBldHintsEditor.cxx:176
 TGuiBldHintsEditor.cxx:177
 TGuiBldHintsEditor.cxx:178
 TGuiBldHintsEditor.cxx:179
 TGuiBldHintsEditor.cxx:180
 TGuiBldHintsEditor.cxx:181
 TGuiBldHintsEditor.cxx:182
 TGuiBldHintsEditor.cxx:183
 TGuiBldHintsEditor.cxx:184
 TGuiBldHintsEditor.cxx:185
 TGuiBldHintsEditor.cxx:186
 TGuiBldHintsEditor.cxx:187
 TGuiBldHintsEditor.cxx:188
 TGuiBldHintsEditor.cxx:189
 TGuiBldHintsEditor.cxx:190
 TGuiBldHintsEditor.cxx:191
 TGuiBldHintsEditor.cxx:192
 TGuiBldHintsEditor.cxx:193
 TGuiBldHintsEditor.cxx:194
 TGuiBldHintsEditor.cxx:195
 TGuiBldHintsEditor.cxx:196
 TGuiBldHintsEditor.cxx:197
 TGuiBldHintsEditor.cxx:198
 TGuiBldHintsEditor.cxx:199
 TGuiBldHintsEditor.cxx:200
 TGuiBldHintsEditor.cxx:201
 TGuiBldHintsEditor.cxx:202
 TGuiBldHintsEditor.cxx:203
 TGuiBldHintsEditor.cxx:204
 TGuiBldHintsEditor.cxx:205
 TGuiBldHintsEditor.cxx:206
 TGuiBldHintsEditor.cxx:207
 TGuiBldHintsEditor.cxx:208
 TGuiBldHintsEditor.cxx:209
 TGuiBldHintsEditor.cxx:210
 TGuiBldHintsEditor.cxx:211
 TGuiBldHintsEditor.cxx:212
 TGuiBldHintsEditor.cxx:213
 TGuiBldHintsEditor.cxx:214
 TGuiBldHintsEditor.cxx:215
 TGuiBldHintsEditor.cxx:216
 TGuiBldHintsEditor.cxx:217
 TGuiBldHintsEditor.cxx:218
 TGuiBldHintsEditor.cxx:219
 TGuiBldHintsEditor.cxx:220
 TGuiBldHintsEditor.cxx:221
 TGuiBldHintsEditor.cxx:222
 TGuiBldHintsEditor.cxx:223
 TGuiBldHintsEditor.cxx:224
 TGuiBldHintsEditor.cxx:225
 TGuiBldHintsEditor.cxx:226
 TGuiBldHintsEditor.cxx:227
 TGuiBldHintsEditor.cxx:228
 TGuiBldHintsEditor.cxx:229
 TGuiBldHintsEditor.cxx:230
 TGuiBldHintsEditor.cxx:231
 TGuiBldHintsEditor.cxx:232
 TGuiBldHintsEditor.cxx:233
 TGuiBldHintsEditor.cxx:234
 TGuiBldHintsEditor.cxx:235
 TGuiBldHintsEditor.cxx:236
 TGuiBldHintsEditor.cxx:237
 TGuiBldHintsEditor.cxx:238
 TGuiBldHintsEditor.cxx:239
 TGuiBldHintsEditor.cxx:240
 TGuiBldHintsEditor.cxx:241
 TGuiBldHintsEditor.cxx:242
 TGuiBldHintsEditor.cxx:243
 TGuiBldHintsEditor.cxx:244
 TGuiBldHintsEditor.cxx:245
 TGuiBldHintsEditor.cxx:246
 TGuiBldHintsEditor.cxx:247
 TGuiBldHintsEditor.cxx:248
 TGuiBldHintsEditor.cxx:249
 TGuiBldHintsEditor.cxx:250
 TGuiBldHintsEditor.cxx:251
 TGuiBldHintsEditor.cxx:252
 TGuiBldHintsEditor.cxx:253
 TGuiBldHintsEditor.cxx:254
 TGuiBldHintsEditor.cxx:255
 TGuiBldHintsEditor.cxx:256
 TGuiBldHintsEditor.cxx:257
 TGuiBldHintsEditor.cxx:258
 TGuiBldHintsEditor.cxx:259
 TGuiBldHintsEditor.cxx:260
 TGuiBldHintsEditor.cxx:261
 TGuiBldHintsEditor.cxx:262
 TGuiBldHintsEditor.cxx:263
 TGuiBldHintsEditor.cxx:264
 TGuiBldHintsEditor.cxx:265
 TGuiBldHintsEditor.cxx:266
 TGuiBldHintsEditor.cxx:267
 TGuiBldHintsEditor.cxx:268
 TGuiBldHintsEditor.cxx:269
 TGuiBldHintsEditor.cxx:270
 TGuiBldHintsEditor.cxx:271
 TGuiBldHintsEditor.cxx:272
 TGuiBldHintsEditor.cxx:273
 TGuiBldHintsEditor.cxx:274
 TGuiBldHintsEditor.cxx:275
 TGuiBldHintsEditor.cxx:276
 TGuiBldHintsEditor.cxx:277
 TGuiBldHintsEditor.cxx:278
 TGuiBldHintsEditor.cxx:279
 TGuiBldHintsEditor.cxx:280
 TGuiBldHintsEditor.cxx:281
 TGuiBldHintsEditor.cxx:282
 TGuiBldHintsEditor.cxx:283
 TGuiBldHintsEditor.cxx:284
 TGuiBldHintsEditor.cxx:285
 TGuiBldHintsEditor.cxx:286
 TGuiBldHintsEditor.cxx:287
 TGuiBldHintsEditor.cxx:288
 TGuiBldHintsEditor.cxx:289
 TGuiBldHintsEditor.cxx:290
 TGuiBldHintsEditor.cxx:291
 TGuiBldHintsEditor.cxx:292
 TGuiBldHintsEditor.cxx:293
 TGuiBldHintsEditor.cxx:294
 TGuiBldHintsEditor.cxx:295
 TGuiBldHintsEditor.cxx:296
 TGuiBldHintsEditor.cxx:297
 TGuiBldHintsEditor.cxx:298
 TGuiBldHintsEditor.cxx:299
 TGuiBldHintsEditor.cxx:300
 TGuiBldHintsEditor.cxx:301
 TGuiBldHintsEditor.cxx:302
 TGuiBldHintsEditor.cxx:303
 TGuiBldHintsEditor.cxx:304
 TGuiBldHintsEditor.cxx:305
 TGuiBldHintsEditor.cxx:306
 TGuiBldHintsEditor.cxx:307
 TGuiBldHintsEditor.cxx:308
 TGuiBldHintsEditor.cxx:309
 TGuiBldHintsEditor.cxx:310
 TGuiBldHintsEditor.cxx:311
 TGuiBldHintsEditor.cxx:312
 TGuiBldHintsEditor.cxx:313
 TGuiBldHintsEditor.cxx:314
 TGuiBldHintsEditor.cxx:315
 TGuiBldHintsEditor.cxx:316
 TGuiBldHintsEditor.cxx:317
 TGuiBldHintsEditor.cxx:318
 TGuiBldHintsEditor.cxx:319
 TGuiBldHintsEditor.cxx:320
 TGuiBldHintsEditor.cxx:321
 TGuiBldHintsEditor.cxx:322
 TGuiBldHintsEditor.cxx:323
 TGuiBldHintsEditor.cxx:324
 TGuiBldHintsEditor.cxx:325
 TGuiBldHintsEditor.cxx:326
 TGuiBldHintsEditor.cxx:327
 TGuiBldHintsEditor.cxx:328
 TGuiBldHintsEditor.cxx:329
 TGuiBldHintsEditor.cxx:330
 TGuiBldHintsEditor.cxx:331
 TGuiBldHintsEditor.cxx:332
 TGuiBldHintsEditor.cxx:333
 TGuiBldHintsEditor.cxx:334
 TGuiBldHintsEditor.cxx:335
 TGuiBldHintsEditor.cxx:336
 TGuiBldHintsEditor.cxx:337
 TGuiBldHintsEditor.cxx:338
 TGuiBldHintsEditor.cxx:339
 TGuiBldHintsEditor.cxx:340
 TGuiBldHintsEditor.cxx:341
 TGuiBldHintsEditor.cxx:342
 TGuiBldHintsEditor.cxx:343
 TGuiBldHintsEditor.cxx:344
 TGuiBldHintsEditor.cxx:345
 TGuiBldHintsEditor.cxx:346
 TGuiBldHintsEditor.cxx:347
 TGuiBldHintsEditor.cxx:348
 TGuiBldHintsEditor.cxx:349
 TGuiBldHintsEditor.cxx:350
 TGuiBldHintsEditor.cxx:351
 TGuiBldHintsEditor.cxx:352
 TGuiBldHintsEditor.cxx:353
 TGuiBldHintsEditor.cxx:354
 TGuiBldHintsEditor.cxx:355
 TGuiBldHintsEditor.cxx:356
 TGuiBldHintsEditor.cxx:357
 TGuiBldHintsEditor.cxx:358
 TGuiBldHintsEditor.cxx:359
 TGuiBldHintsEditor.cxx:360
 TGuiBldHintsEditor.cxx:361
 TGuiBldHintsEditor.cxx:362
 TGuiBldHintsEditor.cxx:363
 TGuiBldHintsEditor.cxx:364
 TGuiBldHintsEditor.cxx:365
 TGuiBldHintsEditor.cxx:366
 TGuiBldHintsEditor.cxx:367
 TGuiBldHintsEditor.cxx:368
 TGuiBldHintsEditor.cxx:369
 TGuiBldHintsEditor.cxx:370
 TGuiBldHintsEditor.cxx:371
 TGuiBldHintsEditor.cxx:372
 TGuiBldHintsEditor.cxx:373
 TGuiBldHintsEditor.cxx:374
 TGuiBldHintsEditor.cxx:375
 TGuiBldHintsEditor.cxx:376
 TGuiBldHintsEditor.cxx:377
 TGuiBldHintsEditor.cxx:378
 TGuiBldHintsEditor.cxx:379
 TGuiBldHintsEditor.cxx:380
 TGuiBldHintsEditor.cxx:381
 TGuiBldHintsEditor.cxx:382
 TGuiBldHintsEditor.cxx:383
 TGuiBldHintsEditor.cxx:384
 TGuiBldHintsEditor.cxx:385
 TGuiBldHintsEditor.cxx:386
 TGuiBldHintsEditor.cxx:387
 TGuiBldHintsEditor.cxx:388
 TGuiBldHintsEditor.cxx:389
 TGuiBldHintsEditor.cxx:390
 TGuiBldHintsEditor.cxx:391
 TGuiBldHintsEditor.cxx:392
 TGuiBldHintsEditor.cxx:393
 TGuiBldHintsEditor.cxx:394
 TGuiBldHintsEditor.cxx:395
 TGuiBldHintsEditor.cxx:396
 TGuiBldHintsEditor.cxx:397
 TGuiBldHintsEditor.cxx:398
 TGuiBldHintsEditor.cxx:399
 TGuiBldHintsEditor.cxx:400
 TGuiBldHintsEditor.cxx:401
 TGuiBldHintsEditor.cxx:402
 TGuiBldHintsEditor.cxx:403
 TGuiBldHintsEditor.cxx:404
 TGuiBldHintsEditor.cxx:405
 TGuiBldHintsEditor.cxx:406
 TGuiBldHintsEditor.cxx:407
 TGuiBldHintsEditor.cxx:408
 TGuiBldHintsEditor.cxx:409
 TGuiBldHintsEditor.cxx:410
 TGuiBldHintsEditor.cxx:411
 TGuiBldHintsEditor.cxx:412
 TGuiBldHintsEditor.cxx:413
 TGuiBldHintsEditor.cxx:414
 TGuiBldHintsEditor.cxx:415
 TGuiBldHintsEditor.cxx:416
 TGuiBldHintsEditor.cxx:417
 TGuiBldHintsEditor.cxx:418
 TGuiBldHintsEditor.cxx:419
 TGuiBldHintsEditor.cxx:420
 TGuiBldHintsEditor.cxx:421
 TGuiBldHintsEditor.cxx:422
 TGuiBldHintsEditor.cxx:423
 TGuiBldHintsEditor.cxx:424
 TGuiBldHintsEditor.cxx:425
 TGuiBldHintsEditor.cxx:426
 TGuiBldHintsEditor.cxx:427
 TGuiBldHintsEditor.cxx:428
 TGuiBldHintsEditor.cxx:429
 TGuiBldHintsEditor.cxx:430
 TGuiBldHintsEditor.cxx:431
 TGuiBldHintsEditor.cxx:432
 TGuiBldHintsEditor.cxx:433
 TGuiBldHintsEditor.cxx:434
 TGuiBldHintsEditor.cxx:435
 TGuiBldHintsEditor.cxx:436
 TGuiBldHintsEditor.cxx:437
 TGuiBldHintsEditor.cxx:438
 TGuiBldHintsEditor.cxx:439
 TGuiBldHintsEditor.cxx:440
 TGuiBldHintsEditor.cxx:441
 TGuiBldHintsEditor.cxx:442
 TGuiBldHintsEditor.cxx:443
 TGuiBldHintsEditor.cxx:444
 TGuiBldHintsEditor.cxx:445
 TGuiBldHintsEditor.cxx:446
 TGuiBldHintsEditor.cxx:447
 TGuiBldHintsEditor.cxx:448
 TGuiBldHintsEditor.cxx:449
 TGuiBldHintsEditor.cxx:450
 TGuiBldHintsEditor.cxx:451
 TGuiBldHintsEditor.cxx:452
 TGuiBldHintsEditor.cxx:453
 TGuiBldHintsEditor.cxx:454
 TGuiBldHintsEditor.cxx:455
 TGuiBldHintsEditor.cxx:456
 TGuiBldHintsEditor.cxx:457
 TGuiBldHintsEditor.cxx:458
 TGuiBldHintsEditor.cxx:459
 TGuiBldHintsEditor.cxx:460
 TGuiBldHintsEditor.cxx:461
 TGuiBldHintsEditor.cxx:462
 TGuiBldHintsEditor.cxx:463
 TGuiBldHintsEditor.cxx:464
 TGuiBldHintsEditor.cxx:465
 TGuiBldHintsEditor.cxx:466
 TGuiBldHintsEditor.cxx:467
 TGuiBldHintsEditor.cxx:468
 TGuiBldHintsEditor.cxx:469
 TGuiBldHintsEditor.cxx:470
 TGuiBldHintsEditor.cxx:471
 TGuiBldHintsEditor.cxx:472
 TGuiBldHintsEditor.cxx:473
 TGuiBldHintsEditor.cxx:474
 TGuiBldHintsEditor.cxx:475
 TGuiBldHintsEditor.cxx:476
 TGuiBldHintsEditor.cxx:477
 TGuiBldHintsEditor.cxx:478
 TGuiBldHintsEditor.cxx:479
 TGuiBldHintsEditor.cxx:480
 TGuiBldHintsEditor.cxx:481
 TGuiBldHintsEditor.cxx:482
 TGuiBldHintsEditor.cxx:483
 TGuiBldHintsEditor.cxx:484
 TGuiBldHintsEditor.cxx:485
 TGuiBldHintsEditor.cxx:486
 TGuiBldHintsEditor.cxx:487
 TGuiBldHintsEditor.cxx:488
 TGuiBldHintsEditor.cxx:489
 TGuiBldHintsEditor.cxx:490
 TGuiBldHintsEditor.cxx:491
 TGuiBldHintsEditor.cxx:492
 TGuiBldHintsEditor.cxx:493
 TGuiBldHintsEditor.cxx:494
 TGuiBldHintsEditor.cxx:495
 TGuiBldHintsEditor.cxx:496
 TGuiBldHintsEditor.cxx:497
 TGuiBldHintsEditor.cxx:498
 TGuiBldHintsEditor.cxx:499
 TGuiBldHintsEditor.cxx:500
 TGuiBldHintsEditor.cxx:501
 TGuiBldHintsEditor.cxx:502
 TGuiBldHintsEditor.cxx:503
 TGuiBldHintsEditor.cxx:504
 TGuiBldHintsEditor.cxx:505
 TGuiBldHintsEditor.cxx:506
 TGuiBldHintsEditor.cxx:507
 TGuiBldHintsEditor.cxx:508
 TGuiBldHintsEditor.cxx:509
 TGuiBldHintsEditor.cxx:510
 TGuiBldHintsEditor.cxx:511
 TGuiBldHintsEditor.cxx:512
 TGuiBldHintsEditor.cxx:513
 TGuiBldHintsEditor.cxx:514
 TGuiBldHintsEditor.cxx:515
 TGuiBldHintsEditor.cxx:516
 TGuiBldHintsEditor.cxx:517
 TGuiBldHintsEditor.cxx:518
 TGuiBldHintsEditor.cxx:519
 TGuiBldHintsEditor.cxx:520
 TGuiBldHintsEditor.cxx:521
 TGuiBldHintsEditor.cxx:522
 TGuiBldHintsEditor.cxx:523
 TGuiBldHintsEditor.cxx:524
 TGuiBldHintsEditor.cxx:525
 TGuiBldHintsEditor.cxx:526
 TGuiBldHintsEditor.cxx:527
 TGuiBldHintsEditor.cxx:528
 TGuiBldHintsEditor.cxx:529
 TGuiBldHintsEditor.cxx:530
 TGuiBldHintsEditor.cxx:531
 TGuiBldHintsEditor.cxx:532
 TGuiBldHintsEditor.cxx:533
 TGuiBldHintsEditor.cxx:534
 TGuiBldHintsEditor.cxx:535
 TGuiBldHintsEditor.cxx:536
 TGuiBldHintsEditor.cxx:537
 TGuiBldHintsEditor.cxx:538
 TGuiBldHintsEditor.cxx:539
 TGuiBldHintsEditor.cxx:540
 TGuiBldHintsEditor.cxx:541
 TGuiBldHintsEditor.cxx:542
 TGuiBldHintsEditor.cxx:543
 TGuiBldHintsEditor.cxx:544
 TGuiBldHintsEditor.cxx:545
 TGuiBldHintsEditor.cxx:546
 TGuiBldHintsEditor.cxx:547
 TGuiBldHintsEditor.cxx:548
 TGuiBldHintsEditor.cxx:549
 TGuiBldHintsEditor.cxx:550
 TGuiBldHintsEditor.cxx:551
 TGuiBldHintsEditor.cxx:552
 TGuiBldHintsEditor.cxx:553
 TGuiBldHintsEditor.cxx:554
 TGuiBldHintsEditor.cxx:555
 TGuiBldHintsEditor.cxx:556
 TGuiBldHintsEditor.cxx:557
 TGuiBldHintsEditor.cxx:558
 TGuiBldHintsEditor.cxx:559
 TGuiBldHintsEditor.cxx:560
 TGuiBldHintsEditor.cxx:561
 TGuiBldHintsEditor.cxx:562
 TGuiBldHintsEditor.cxx:563
 TGuiBldHintsEditor.cxx:564
 TGuiBldHintsEditor.cxx:565
 TGuiBldHintsEditor.cxx:566
 TGuiBldHintsEditor.cxx:567
 TGuiBldHintsEditor.cxx:568
 TGuiBldHintsEditor.cxx:569
 TGuiBldHintsEditor.cxx:570
 TGuiBldHintsEditor.cxx:571
 TGuiBldHintsEditor.cxx:572
 TGuiBldHintsEditor.cxx:573
 TGuiBldHintsEditor.cxx:574
 TGuiBldHintsEditor.cxx:575
 TGuiBldHintsEditor.cxx:576
 TGuiBldHintsEditor.cxx:577
 TGuiBldHintsEditor.cxx:578
 TGuiBldHintsEditor.cxx:579
 TGuiBldHintsEditor.cxx:580
 TGuiBldHintsEditor.cxx:581
 TGuiBldHintsEditor.cxx:582
 TGuiBldHintsEditor.cxx:583
 TGuiBldHintsEditor.cxx:584
 TGuiBldHintsEditor.cxx:585
 TGuiBldHintsEditor.cxx:586
 TGuiBldHintsEditor.cxx:587
 TGuiBldHintsEditor.cxx:588
 TGuiBldHintsEditor.cxx:589
 TGuiBldHintsEditor.cxx:590
 TGuiBldHintsEditor.cxx:591
 TGuiBldHintsEditor.cxx:592
 TGuiBldHintsEditor.cxx:593
 TGuiBldHintsEditor.cxx:594
 TGuiBldHintsEditor.cxx:595
 TGuiBldHintsEditor.cxx:596
 TGuiBldHintsEditor.cxx:597
 TGuiBldHintsEditor.cxx:598
 TGuiBldHintsEditor.cxx:599
 TGuiBldHintsEditor.cxx:600
 TGuiBldHintsEditor.cxx:601
 TGuiBldHintsEditor.cxx:602
 TGuiBldHintsEditor.cxx:603
 TGuiBldHintsEditor.cxx:604
 TGuiBldHintsEditor.cxx:605
 TGuiBldHintsEditor.cxx:606
 TGuiBldHintsEditor.cxx:607
 TGuiBldHintsEditor.cxx:608
 TGuiBldHintsEditor.cxx:609
 TGuiBldHintsEditor.cxx:610
 TGuiBldHintsEditor.cxx:611
 TGuiBldHintsEditor.cxx:612
 TGuiBldHintsEditor.cxx:613
 TGuiBldHintsEditor.cxx:614
 TGuiBldHintsEditor.cxx:615
 TGuiBldHintsEditor.cxx:616
 TGuiBldHintsEditor.cxx:617
 TGuiBldHintsEditor.cxx:618
 TGuiBldHintsEditor.cxx:619
 TGuiBldHintsEditor.cxx:620
 TGuiBldHintsEditor.cxx:621
 TGuiBldHintsEditor.cxx:622
 TGuiBldHintsEditor.cxx:623
 TGuiBldHintsEditor.cxx:624
 TGuiBldHintsEditor.cxx:625
 TGuiBldHintsEditor.cxx:626
 TGuiBldHintsEditor.cxx:627
 TGuiBldHintsEditor.cxx:628
 TGuiBldHintsEditor.cxx:629
 TGuiBldHintsEditor.cxx:630
 TGuiBldHintsEditor.cxx:631
 TGuiBldHintsEditor.cxx:632
 TGuiBldHintsEditor.cxx:633
 TGuiBldHintsEditor.cxx:634
 TGuiBldHintsEditor.cxx:635
 TGuiBldHintsEditor.cxx:636
 TGuiBldHintsEditor.cxx:637
 TGuiBldHintsEditor.cxx:638
 TGuiBldHintsEditor.cxx:639
 TGuiBldHintsEditor.cxx:640
 TGuiBldHintsEditor.cxx:641
 TGuiBldHintsEditor.cxx:642
 TGuiBldHintsEditor.cxx:643
 TGuiBldHintsEditor.cxx:644
 TGuiBldHintsEditor.cxx:645
 TGuiBldHintsEditor.cxx:646
 TGuiBldHintsEditor.cxx:647
 TGuiBldHintsEditor.cxx:648