ROOT logo
// @(#)root/gui:$Id: TGButtonGroup.cxx 23115 2008-04-10 13:35:37Z rdm $
// Author: Valeriy Onuchin & Fons Rademakers   16/10/2000

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

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// The TGButtonGroup widget organizes TGButton widgets in a group.      //
//                                                                      //
// A button group widget makes it easier to deal with groups of buttons.//
// A button in a button group is associated with a unique identifier.   //
// The button group emits a Clicked() signal with this identifier when  //
// the button is clicked. Thus, a button group is an ideal solution     //
// when you have several similar buttons and want to connect all their  //
// Clicked() signals, for example, to one slot.                         //
//                                                                      //
// An exclusive button group switches off all toggle buttons except     //
// the one that was clicked. A button group is by default non-exclusive.//
// All radio buttons that are inserted, will be mutually exclusive even //
// if the button group is non-exclusive.                                //
//                                                                      //
//                                                                      //
// There are two ways of using a button group:                          //
//                                                                      //
//    The button group is a parent widget of a number of buttons,       //
//    i.e. the button group is the parent argument in the button        //
//    constructor. The buttons are assigned identifiers 1, 2, 3 etc.    //
///   in the order they are created or you can specify button id in     //
//    the button constructor. A TGButtonGroup can display a frame and   //
//    a title because it inherits from TGGroupFrame.                    //
//                                                                      //
// Example:                                                             //
//                                                                      //
//    // vertical frame without border and title                        //
//    TGVButtonGroup *bg = new TGVButtonGroup(main_frame);              //
//                                                                      //
//    // create text button with id=1                                   //
//    TGTextButton *button1 = new TGTextButton(bg,"some text");         //
//                                                                      //
//    // create another text button with id=2                           //
//    TGTextButton *button2 = new TGTextButton(bg,"another text");      //
//                                                                      //
//    // map all buttons                                                //
//    bg->Show();                                                       //
//                                                                      //
// NOTE: there is no need to call AddFrame() since the buttons are      //
// automatically added with a default layout hint to their parent,      //
// i.e. the buttongroup. To override the default layout hints use the   //
// SetLayoutHints() method.                                             //
//                                                                      //
//  ButtonGroup Signals:                                                //
//                                                                      //
//    Pressed(Int_t id)  -->  is emitted when a button in the group is  //
//                            pressed down. The id argument is the      //
//                            button's identifier.                      //
//    Released(Int_t id) -->  is emitted when a button in the group is  //
//                            released. The id argument is the button's //
//                            identifier.                               //
//    Clicked(Int_t id)  -->  is emitted when a button in the group is  //
//                            clicked. The id argument is the button's  //
//                            identifier.                               //
//                                                                      //
//                                                                      //
// The TGHButtonGroup widget organizes TGButton widgets in a group      //
// with one horizontal row. TGHButtonGroup is a convenience class that  //
// offers a thin layer on top of TGButtonGroup. It inherits from        //
// TGButtonGroup.                                                       //
//                                                                      //
// The TGVButtonGroup widget organizes TGButton widgets in a group      //
// with one vertical column. TGVButtonGroup is a convenience class that //
// offers a thin layer on top of TGButtonGroup. It inherits from        //
// TGButtonGroup.                                                       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TGButtonGroup.h"
#include "TGButton.h"
#include "TClass.h"
#include "TGLayout.h"
#include "TList.h"
#include "TGResourcePool.h"
#include "Riostream.h"


ClassImp(TGButtonGroup)
ClassImp(TGHButtonGroup)
ClassImp(TGVButtonGroup)

//______________________________________________________________________________
TGButtonGroup::TGButtonGroup(const TGWindow *parent,
                             const TString &title,
                             UInt_t options,
                             GContext_t norm,
                             FontStruct_t font,
                             ULong_t back) :
   TGGroupFrame(parent, new TGString(title), options, norm, font, back)
{
   // Constructor. Layout 1 row or 1 column.

   Init();
   if (options & kVerticalFrame) {
      SetLayoutManager(new TGVerticalLayout(this));
   } else {
      SetLayoutManager(new TGHorizontalLayout(this));
   }

   fDrawBorder = !title.IsNull();
}

//______________________________________________________________________________
TGButtonGroup::TGButtonGroup(const TGWindow *parent,
                             UInt_t r, UInt_t c,
                             Int_t s, Int_t h,
                             const TString &title,
                             GContext_t norm ,
                             FontStruct_t font ,
                             ULong_t back) :
   TGGroupFrame(parent, new TGString(title), 0, norm, font, back)
{
   // Constructor. Layout defined by TGMatrixLayout:
   //    r = number of rows
   //    c = number of columns
   //    s = interval between frames
   //    h = layout hints

   Init();
   fDrawBorder = !title.IsNull();
   SetLayoutManager(new TGMatrixLayout(this,r,c,s,h));
}

//______________________________________________________________________________
void TGButtonGroup::Init()
{
   // Default init.

   fState        = kTRUE;
   fMapOfButtons = new TMap();  // map of button/id pairs
   fExclGroup    = kFALSE;
   fRadioExcl    = kFALSE;
   fDrawBorder   = kTRUE;
   
   SetWindowName();
}

//______________________________________________________________________________
TGButtonGroup::~TGButtonGroup()
{
   // Destructor, we do not delete the buttons.

   TIter next(fMapOfButtons);
   register TGButton *item = 0;

   while ((item = (TGButton*)next())) {
      item->SetGroup(0);
   }

   SafeDelete(fMapOfButtons);
}

//______________________________________________________________________________
void TGButtonGroup::DoRedraw()
{
   // Redraw the group frame. Need special DoRedraw() since we need to
   // redraw with fBorderWidth=0.

   gVirtualX->ClearArea(fId, 0, 0, fWidth, fHeight);

   DrawBorder();
}

//______________________________________________________________________________
void TGButtonGroup::DrawBorder()
{
   // Draw border of around the group frame.
   //
   // if frame is kRaisedFrame  - a frame border is of "wall style",
   // otherwise of "groove style".
   
   if (!fDrawBorder) return;

   Int_t x, y, l, t, r, b, gl, gr, sep, max_ascent, max_descent;

   UInt_t tw = gVirtualX->TextWidth(fFontStruct, fText->GetString(), fText->GetLength());
   gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);

   l = 0;
   t = (max_ascent + max_descent + 2) >> 1;
   r = fWidth - 1;
   // next three lines are for backward compatibility in case of horizontal layout
   TGLayoutManager * lm = GetLayoutManager();
   if ((lm->InheritsFrom(TGHorizontalLayout::Class())) ||
       (lm->InheritsFrom(TGMatrixLayout::Class())))
      b = fHeight - 1;
   else
      b = fHeight - t;

   sep = 3;
   UInt_t rr = 5 + (sep << 1) + tw;

   switch (fTitlePos) {
      case kRight:
         gl = fWidth>rr ? fWidth - rr : 5 + sep;
         break;
      case kCenter:
         gl = fWidth>tw ? ((fWidth - tw)>>1) - sep : 5 + sep;
         break;
      case kLeft:
      default:
         gl = 5 + sep;
   }
   gr = gl + tw + (sep << 1);

   switch (fOptions & (kSunkenFrame | kRaisedFrame)) {
      case kRaisedFrame:
         gVirtualX->DrawLine(fId, GetHilightGC()(),  l,   t,   gl,  t);
         gVirtualX->DrawLine(fId, GetShadowGC()(), l+1, t+1, gl,  t+1);

         gVirtualX->DrawLine(fId, GetHilightGC()(),  gr,  t,   r-1, t);
         gVirtualX->DrawLine(fId, GetShadowGC()(), gr,  t+1, r-2, t+1);

         gVirtualX->DrawLine(fId, GetHilightGC()(),  r-1, t,   r-1, b-1);
         gVirtualX->DrawLine(fId, GetShadowGC()(), r,   t,   r,   b);

         gVirtualX->DrawLine(fId, GetHilightGC()(),  r-1, b-1, l,   b-1);
         gVirtualX->DrawLine(fId, GetShadowGC()(), r,   b,   l,   b);

         gVirtualX->DrawLine(fId, GetHilightGC()(),  l,   b-1, l,   t);
         gVirtualX->DrawLine(fId, GetShadowGC()(), l+1, b-2, l+1, t+1);
         break;
      case kSunkenFrame:
      default:
         gVirtualX->DrawLine(fId, GetShadowGC()(),  l,   t,   gl,  t);
         gVirtualX->DrawLine(fId, GetHilightGC()(), l+1, t+1, gl,  t+1);

         gVirtualX->DrawLine(fId, GetShadowGC()(),  gr,  t,   r-1, t);
         gVirtualX->DrawLine(fId, GetHilightGC()(), gr,  t+1, r-2, t+1);

         gVirtualX->DrawLine(fId, GetShadowGC()(),  r-1, t,   r-1, b-1);
         gVirtualX->DrawLine(fId, GetHilightGC()(), r,   t,   r,   b);

         gVirtualX->DrawLine(fId, GetShadowGC()(),  r-1, b-1, l,   b-1);
         gVirtualX->DrawLine(fId, GetHilightGC()(), r,   b,   l,   b);

         gVirtualX->DrawLine(fId, GetShadowGC()(),  l,   b-1, l,   t);
         gVirtualX->DrawLine(fId, GetHilightGC()(), l+1, b-2, l+1, t+1);
         break;
   }

   x = gl + sep;
   y = 1;

   if (fState) {
      fText->Draw(fId, fNormGC, x, y + max_ascent);
   } else {
      fText->Draw(fId, GetHilightGC()(), x, y + 1 + max_ascent);
      fText->Draw(fId, GetShadowGC()(), x, y + max_ascent);
   }
}

//______________________________________________________________________________
void TGButtonGroup::SetBorderDrawn(Bool_t enable)
{
   // Makes border to be visible/invisible.

   if (enable != IsBorderDrawn()) {
      fDrawBorder = enable;
      ChangedBy("SetBorderDrawn");        // emit signal
   }
}

//______________________________________________________________________________
void TGButtonGroup::SetExclusive(Bool_t enable)
{
   // Sets the button group to be exclusive if enable is kTRUE,
   // or to be non-exclusive if enable is kFALSE.
   // An exclusive button group switches off all other toggle buttons when
   // one is switched on. This is ideal for groups of radio-buttons
   // A non-exclusive group allow many buttons to be switched on at the same
   // time. The default setting is kFALSE.

   if (enable != IsExclusive()) {
      fExclGroup = enable;
      ChangedBy("SetExclusive");  // emit signal
   }
}

//______________________________________________________________________________
void TGButtonGroup::SetRadioButtonExclusive(Bool_t enable)
{
   // If enable is kTRUE, this button group will treat radio buttons as
   // mutually exclusive, and other buttons according to IsExclusive().
   // This function is called automatically whenever a TGRadioButton
   // is inserted, so you should normally never have to call it.

   if (enable != IsRadioButtonExclusive()) {
      fRadioExcl = enable;
      ChangedBy("SetRadioButtonExclusive"); // emit signal
   }
}

//______________________________________________________________________________
void TGButtonGroup::SetState(Bool_t state) 
{
   // Sets the state of all the buttons in the group to enable or disable.

   fState = state;

   TIter next(fMapOfButtons);
   register TGButton *item = 0;

   while ((item = (TGButton*)next())) {    // loop over all buttons
      if (state) {
         item->SetState(kButtonUp);
      } else {
         item->SetState(kButtonDisabled);
      }
   }
   DoRedraw();
}
//______________________________________________________________________________
void TGButtonGroup::SetButton(Int_t id, Bool_t down)
{
   // Sets the button with id to be on/down, and if this is an
   // exclusive group, all other button in the group to be off/up.

   TGButton *b = Find(id);

   if (b && (b->IsDown() != down)) {
      b->SetState(kButtonDown, kTRUE);
   }
}

//______________________________________________________________________________
Int_t TGButtonGroup::Insert(TGButton *button, Int_t id)
{
   // Inserts a button with the identifier id into the button group.
   // Returns the button identifier.
   //
   // It is not necessary to manually insert buttons that have this button
   // group as their parent widget. An exception is when you want custom
   // identifiers instead of the default 1, 2, 3 etc.
   //
   // The button is assigned the identifier id or an automatically
   // generated identifier.  It works as follows: If id > 0, this
   // identifier is assigned.  If id == -1 (default), the identifier is
   // equal to the number of buttons in the group+1.  If id is any other
   // negative integer, for instance -2, a unique identifier (negative
   // integer <= -2) is generated.
   //
   // Inserting several buttons with id = -1 assigns the identifiers 1,
   // 2, 3, etc.

   if (button->fGroup && button->fGroup != this)
      button->fGroup->Remove(button);

   if (button->fGroup == this) {
      if (id == -1)
         return GetId(button);    // the button is already in group
      else
         button->fGroup->Remove(button);  // want to set a new id
   }

   button->fGroup = this;
   button->Associate(this);
   
   static Int_t seq_no = -2;
   Long_t bid;

   if (id < -1)       bid = seq_no--;
   else if (id == -1) bid = GetCount()+1;
   else               bid = id;

   fMapOfButtons->Add(button, (TObject*)bid);
   AddFrame(button);

   SetRadioButtonExclusive(button->IsA()->InheritsFrom(TGRadioButton::Class()));

   Connect(button, "Clicked()" , "TGButtonGroup", this, "ReleaseButtons()");
   Connect(button, "Pressed()" , "TGButtonGroup", this, "ButtonPressed()");
   Connect(button, "Released()", "TGButtonGroup", this, "ButtonReleased()");
   Connect(button, "Clicked()" , "TGButtonGroup", this, "ButtonClicked()");

   return (Int_t) bid;
}

//______________________________________________________________________________
void TGButtonGroup::Remove(TGButton *button)
{
   // Removes a button from the button group.

   TGButton *item = (TGButton*) fMapOfButtons->Remove(button);
   if (item) {
      button->SetGroup(0);
      button->Disconnect(this);
      button->DestroyWindow();
   }

   RemoveFrame(button);
}

//______________________________________________________________________________
TGButton *TGButtonGroup::Find(Int_t id) const
{
   // Finds and returns a pointer to the button with the specified
   // identifier id. Returns null if the button was not found.

   TIter next(fMapOfButtons);
   register TGButton *item = 0;

   while ((item = (TGButton*)next())) {
      if ((Long_t)fMapOfButtons->GetValue(item) == id) break;   // found
   }

   return item;
}

//______________________________________________________________________________
Int_t TGButtonGroup::GetId(TGButton *button) const
{
   // Finds and returns the id of the button.
   // Returns -1 if the button is not a member of this group.

   TPair *a = (TPair*) fMapOfButtons->FindObject(button);
   if (a)
      return (Int_t)Long_t(a->Value());
   else
      return -1;
}

//______________________________________________________________________________
void TGButtonGroup::ButtonPressed()
{
   // This slot is activated when one of the buttons in the group emits the
   // Pressed() signal.

#if 0
   // Is here for historical purposes and example. Now this is not needed
   // anymore since TGButton has has its own GetSender() method returning
   // the TGButton proper.

   // This is needed since gTQSender points to TQObject part of TGButton
   TGButton *btn = dynamic_cast<TGButton*>((TQObject*)gTQSender);

   if (!btn) {
      Error("ButtonPressed", "gTQSender not a TGButton");
      return;
   }
#else
      TGButton *btn = (TGButton*)gTQSender;
#endif

   TPair *a = (TPair*) fMapOfButtons->FindObject(btn);
   if (a) {
      Int_t id = (Int_t)Long_t(a->Value());
      Pressed(id);
   }
}

//______________________________________________________________________________
void TGButtonGroup::ButtonReleased()
{
   // This slot is activated when one of the buttons in the group emits the
   // Released() signal.

   TGButton *btn = (TGButton*)gTQSender;

   TPair *a = (TPair*) fMapOfButtons->FindObject(btn);
   if (a) {
      Int_t id = (Int_t)Long_t(a->Value());
      Released(id);
   }
}

//______________________________________________________________________________
void TGButtonGroup::ButtonClicked()
{
   // This slot is activated when one of the buttons in the group emits the
   // Clicked() signal.

   TGButton *btn = (TGButton*)gTQSender;

   TPair *a = (TPair*) fMapOfButtons->FindObject(btn);
   if (a) {
      Int_t id = (Int_t)Long_t(a->Value());
      Clicked(id);
   }
}

//______________________________________________________________________________
void TGButtonGroup::ReleaseButtons()
{
   // This slot is activated when one of the buttons in the
   // exclusive group emits the Pressed() signal.

   if (!fExclGroup && !fRadioExcl) return;

   TGButton *btn = (TGButton*)gTQSender;

   if (!fExclGroup && !btn)
      return;

   TIter next(fMapOfButtons);
   register TGButton *item = 0;

   while ((item = (TGButton*)next())) {    // loop over all buttons
      if (btn != item && item->IsToggleButton() && item->IsOn() &&
          (fExclGroup || (item->IsA()->InheritsFrom(TGRadioButton::Class())
                          && btn->IsA()->InheritsFrom(TGRadioButton::Class())))) {
         item->SetOn(kFALSE);
      }
   }
}

//______________________________________________________________________________
void TGButtonGroup::Show()
{
   // Show group of buttons.

   MapSubwindows();
   Resize();
   MapRaised();
   fClient->NeedRedraw(this);
}

//______________________________________________________________________________
void TGButtonGroup::Hide()
{
   // Hide group of buttons.

   UnmapWindow();
}

//______________________________________________________________________________
void TGButtonGroup::SetTitle(TGString *title)
{
   // Set or change title.

   if (!title) {
      Error("SetTitle", "title cannot be 0, try \"\"");
      return;
   }

   if (strcmp(fText->GetString(), title->GetString())) {
      SetBorderDrawn(title->GetLength() ? kTRUE : kFALSE);
      TGGroupFrame::SetTitle(title);
      ChangedBy("SetTitle");
   }
}

//______________________________________________________________________________
void TGButtonGroup::SetTitle(const char *title)
{
   // Set or change title.

   if (!title) {
      Error("SetTitle", "title cannot be 0, try \"\"");
      return;
   }

   if (strcmp(fText->GetString(), title)) {
      SetBorderDrawn(title && strlen(title));
      TGGroupFrame::SetTitle(title);
      ChangedBy("SetTitle");
   }
}

//______________________________________________________________________________
void TGButtonGroup::SetLayoutHints(TGLayoutHints *l, TGButton *button)
{
   // Set layout hints for the specified button or if button=0 for all
   // buttons.

   TGFrameElement *el;
   TIter next(fList);

   while ((el = (TGFrameElement *)next())) {
      if ((el->fFrame==(TGFrame*)button) || !button) {
         el->fLayout = l ? l : fgDefaultHints;
      }
   }
   Layout();
}

//______________________________________________________________________________
void TGButtonGroup::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
{
   // Save a button group widget as a C++ statement(s) on output stream out.

   char quote ='"';

   // font + GC
   option = GetName()+5;         // unique digit id of the name
   char parGC[50], parFont[50];
   sprintf(parFont,"%s::GetDefaultFontStruct()",IsA()->GetName());
   sprintf(parGC,"%s::GetDefaultGC()()",IsA()->GetName());
   
   if ((GetDefaultFontStruct() != fFontStruct) || (GetDefaultGC()() != fNormGC)) {
      TGFont *ufont = gClient->GetResourcePool()->GetFontPool()->FindFont(fFontStruct);
      if (ufont) {
         ufont->SavePrimitive(out, option);
         sprintf(parFont,"ufont->GetFontStruct()");
      } 

      TGGC *userGC = gClient->GetResourcePool()->GetGCPool()->FindGC(fNormGC);
      if (userGC) {
         userGC->SavePrimitive(out, option);
         sprintf(parGC,"uGC->GetGC()");
      } 
   }

   if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);

   out << endl << "   // buttongroup frame" << endl;

   out << "   TGButtonGroup *";
   out << GetName() << " = new TGButtonGroup(" << fParent->GetName()
       << ","<< quote << fText->GetString() << quote;

   if (fBackground == GetDefaultFrameBackground()) {
      if (fFontStruct == GetDefaultFontStruct()) {
         if (fNormGC == GetDefaultGC()()) {
            if (!GetOptions()) {
               out <<");" << endl;
            } else {
               out << "," << GetOptionString() <<");" << endl;
            }
         } else {
            out << "," << GetOptionString() << "," << parGC <<");" << endl;
         }
      } else {
         out << "," << GetOptionString() << "," << parGC << "," << parFont <<");" << endl;
      }
   } else {
      out << "," << GetOptionString() << "," << parGC << "," << parFont << ",ucolor);" << endl;
   }
   
   // setting layout manager
   out << "   " << GetName() <<"->SetLayoutManager(";
   GetLayoutManager()->SavePrimitive(out, option);
   out << ");"<< endl;

   TGFrameElement *f;
   TIter next(GetList());
   while ((f = (TGFrameElement *)next())) {
      f->fFrame->SavePrimitive(out,option);
      if (f->fFrame->InheritsFrom("TGButton")) continue;
      else {
         out << "   " << GetName() << "->AddFrame(" << f->fFrame->GetName();
         f->fLayout->SavePrimitive(out, option);
         out << ");"<< endl;
      }
   }

   if (IsExclusive())
      out << "   " << GetName() <<"->SetExclusive(kTRUE);" << endl;

   if (IsRadioButtonExclusive())
      out << "   " << GetName() <<"->SetRadioButtonExclusive(kTRUE);" << endl;

   if (!IsBorderDrawn())
      out << "   " << GetName() <<"->SetBorderDrawn(kFALSE);" << endl;


   out << "   " << GetName() << "->Resize(" << GetWidth()
       << "," << GetHeight() << ");" << endl;

   if (!IsEnabled())
      out << "   " << GetName() <<"->SetState(kFALSE);" << endl;
   
   out << "   " << GetName() << "->Show();" << endl;
}

//______________________________________________________________________________
void TGHButtonGroup::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
{
   // Save a button group widget as a C++ statement(s) on output stream out.

   char quote ='"';

   // font + GC
   option = GetName()+5;         // unique digit id of the name
   char parGC[50], parFont[50];
   sprintf(parFont,"%s::GetDefaultFontStruct()",IsA()->GetName());
   sprintf(parGC,"%s::GetDefaultGC()()",IsA()->GetName());
   
   if ((GetDefaultFontStruct() != fFontStruct) || (GetDefaultGC()() != fNormGC)) {
      TGFont *ufont = gClient->GetResourcePool()->GetFontPool()->FindFont(fFontStruct);
      if (ufont) {
         ufont->SavePrimitive(out, option);
         sprintf(parFont,"ufont->GetFontStruct()");
      } 

      TGGC *userGC = gClient->GetResourcePool()->GetGCPool()->FindGC(fNormGC);
      if (userGC) {
         userGC->SavePrimitive(out, option);
         sprintf(parGC,"uGC->GetGC()");
      } 
   }

   if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);

   out << endl << "   // horizontal buttongroup frame" << endl;

   out << "   TGHButtonGroup *";
   out << GetName() << " = new TGHButtonGroup(" << fParent->GetName()
       << "," << quote << fText->GetString() << quote;
   if (fBackground == GetDefaultFrameBackground()) {

      if (fFontStruct == GetDefaultFontStruct()) {

         if (fNormGC == GetDefaultGC()()) {
            out << ");" << endl;
         } else {
            out << "," << parGC <<");" << endl;
         }
      } else {
         out << "," << parGC << "," << parFont <<");" << endl;
      }
   } else {
      out << "," << parGC << "," << parFont << ",ucolor);" << endl;
   }

   TGFrameElement *f;
   TIter next(GetList());
   while ((f = (TGFrameElement *)next())) {
      f->fFrame->SavePrimitive(out,option);
      if (f->fFrame->InheritsFrom("TGButton")){
         out << "   " << GetName() << "->SetLayoutHints(";
         f->fLayout->SavePrimitive(out, "nocoma");
         out << "," << f->fFrame->GetName();
         out << ");"<< endl;
      }
      else {
         out << "   " << GetName() << "->AddFrame(" << f->fFrame->GetName();
         f->fLayout->SavePrimitive(out, option);
         out << ");"<< endl;
      }
   }

   if (!IsEnabled())
      out << "   " << GetName() <<"->SetState(kFALSE);" << endl;

   if (IsExclusive())
      out << "   " << GetName() <<"->SetExclusive(kTRUE);" << endl;

   if (IsRadioButtonExclusive())
      out << "   " << GetName() <<"->SetRadioButtonExclusive(kTRUE);" << endl;

   if (!IsBorderDrawn())
      out << "   " << GetName() <<"->SetBorderDrawn(kFALSE);" << endl;

   out << "   " << GetName() <<"->Resize(" << GetWidth() << ","
       << GetHeight() << ");" << endl;

   out << "   " << GetName() << "->Show();" << endl;
}

//______________________________________________________________________________
void TGVButtonGroup::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
{
   // Save a button group widget as a C++ statement(s) on output stream out.

   char quote ='"';

   // font + GC
   option = GetName()+5;         // unique digit id of the name
   char parGC[50], parFont[50];
   sprintf(parFont,"%s::GetDefaultFontStruct()",IsA()->GetName());
   sprintf(parGC,"%s::GetDefaultGC()()",IsA()->GetName());
   
   if ((GetDefaultFontStruct() != fFontStruct) || (GetDefaultGC()() != fNormGC)) {
      TGFont *ufont = gClient->GetResourcePool()->GetFontPool()->FindFont(fFontStruct);
      if (ufont) {
         ufont->SavePrimitive(out, option);
         sprintf(parFont,"ufont->GetFontStruct()");
      } 

      TGGC *userGC = gClient->GetResourcePool()->GetGCPool()->FindGC(fNormGC);
      if (userGC) {
         userGC->SavePrimitive(out, option);
         sprintf(parGC,"uGC->GetGC()");
      } 
   }

   if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);

   out << endl << "   // vertical buttongroup frame" << endl;

   out << "   TGVButtonGroup *";
   out << GetName() << " = new TGVButtonGroup(" << fParent->GetName()
       << "," << quote << fText->GetString() << quote;

   if (fBackground == GetDefaultFrameBackground()) {
      if (fFontStruct == GetDefaultFontStruct()) {
         if (fNormGC == GetDefaultGC()()) {
            out <<");" << endl;
         } else {
            out << "," << parGC <<");" << endl;
         }
      } else {
         out << "," << parGC << "," << parFont <<");" << endl;
      }
   } else {
      out << "," << parGC << "," << parFont << ",ucolor);" << endl;
   }

   TGFrameElement *f;
   TIter next(GetList());
   while ((f = (TGFrameElement *)next())) {
      f->fFrame->SavePrimitive(out,option);
      if (f->fFrame->InheritsFrom("TGButton")) continue;
      else {
         out << "   " << GetName() << "->AddFrame(" << f->fFrame->GetName();
         f->fLayout->SavePrimitive(out, option);
         out << ");"<< endl;
      }
   }

   if (!IsEnabled())
      out << "   " << GetName() <<"->SetState(kFALSE);" << endl;

   if (IsExclusive())
      out << "   " << GetName() <<"->SetExclusive(kTRUE);" << endl;

   if (IsRadioButtonExclusive())
      out << "   " << GetName() <<"->SetRadioButtonExclusive(kTRUE);" << endl;

   if (!IsBorderDrawn())
      out << "   " << GetName() <<"->SetBorderDrawn(kFALSE);" << endl;

   out << "   " << GetName() << "->Resize(" << GetWidth()
       << "," << GetHeight() << ");"<< endl;
    
   out << "   " << GetName() << "->Show();" << endl;
}
 TGButtonGroup.cxx:1
 TGButtonGroup.cxx:2
 TGButtonGroup.cxx:3
 TGButtonGroup.cxx:4
 TGButtonGroup.cxx:5
 TGButtonGroup.cxx:6
 TGButtonGroup.cxx:7
 TGButtonGroup.cxx:8
 TGButtonGroup.cxx:9
 TGButtonGroup.cxx:10
 TGButtonGroup.cxx:11
 TGButtonGroup.cxx:12
 TGButtonGroup.cxx:13
 TGButtonGroup.cxx:14
 TGButtonGroup.cxx:15
 TGButtonGroup.cxx:16
 TGButtonGroup.cxx:17
 TGButtonGroup.cxx:18
 TGButtonGroup.cxx:19
 TGButtonGroup.cxx:20
 TGButtonGroup.cxx:21
 TGButtonGroup.cxx:22
 TGButtonGroup.cxx:23
 TGButtonGroup.cxx:24
 TGButtonGroup.cxx:25
 TGButtonGroup.cxx:26
 TGButtonGroup.cxx:27
 TGButtonGroup.cxx:28
 TGButtonGroup.cxx:29
 TGButtonGroup.cxx:30
 TGButtonGroup.cxx:31
 TGButtonGroup.cxx:32
 TGButtonGroup.cxx:33
 TGButtonGroup.cxx:34
 TGButtonGroup.cxx:35
 TGButtonGroup.cxx:36
 TGButtonGroup.cxx:37
 TGButtonGroup.cxx:38
 TGButtonGroup.cxx:39
 TGButtonGroup.cxx:40
 TGButtonGroup.cxx:41
 TGButtonGroup.cxx:42
 TGButtonGroup.cxx:43
 TGButtonGroup.cxx:44
 TGButtonGroup.cxx:45
 TGButtonGroup.cxx:46
 TGButtonGroup.cxx:47
 TGButtonGroup.cxx:48
 TGButtonGroup.cxx:49
 TGButtonGroup.cxx:50
 TGButtonGroup.cxx:51
 TGButtonGroup.cxx:52
 TGButtonGroup.cxx:53
 TGButtonGroup.cxx:54
 TGButtonGroup.cxx:55
 TGButtonGroup.cxx:56
 TGButtonGroup.cxx:57
 TGButtonGroup.cxx:58
 TGButtonGroup.cxx:59
 TGButtonGroup.cxx:60
 TGButtonGroup.cxx:61
 TGButtonGroup.cxx:62
 TGButtonGroup.cxx:63
 TGButtonGroup.cxx:64
 TGButtonGroup.cxx:65
 TGButtonGroup.cxx:66
 TGButtonGroup.cxx:67
 TGButtonGroup.cxx:68
 TGButtonGroup.cxx:69
 TGButtonGroup.cxx:70
 TGButtonGroup.cxx:71
 TGButtonGroup.cxx:72
 TGButtonGroup.cxx:73
 TGButtonGroup.cxx:74
 TGButtonGroup.cxx:75
 TGButtonGroup.cxx:76
 TGButtonGroup.cxx:77
 TGButtonGroup.cxx:78
 TGButtonGroup.cxx:79
 TGButtonGroup.cxx:80
 TGButtonGroup.cxx:81
 TGButtonGroup.cxx:82
 TGButtonGroup.cxx:83
 TGButtonGroup.cxx:84
 TGButtonGroup.cxx:85
 TGButtonGroup.cxx:86
 TGButtonGroup.cxx:87
 TGButtonGroup.cxx:88
 TGButtonGroup.cxx:89
 TGButtonGroup.cxx:90
 TGButtonGroup.cxx:91
 TGButtonGroup.cxx:92
 TGButtonGroup.cxx:93
 TGButtonGroup.cxx:94
 TGButtonGroup.cxx:95
 TGButtonGroup.cxx:96
 TGButtonGroup.cxx:97
 TGButtonGroup.cxx:98
 TGButtonGroup.cxx:99
 TGButtonGroup.cxx:100
 TGButtonGroup.cxx:101
 TGButtonGroup.cxx:102
 TGButtonGroup.cxx:103
 TGButtonGroup.cxx:104
 TGButtonGroup.cxx:105
 TGButtonGroup.cxx:106
 TGButtonGroup.cxx:107
 TGButtonGroup.cxx:108
 TGButtonGroup.cxx:109
 TGButtonGroup.cxx:110
 TGButtonGroup.cxx:111
 TGButtonGroup.cxx:112
 TGButtonGroup.cxx:113
 TGButtonGroup.cxx:114
 TGButtonGroup.cxx:115
 TGButtonGroup.cxx:116
 TGButtonGroup.cxx:117
 TGButtonGroup.cxx:118
 TGButtonGroup.cxx:119
 TGButtonGroup.cxx:120
 TGButtonGroup.cxx:121
 TGButtonGroup.cxx:122
 TGButtonGroup.cxx:123
 TGButtonGroup.cxx:124
 TGButtonGroup.cxx:125
 TGButtonGroup.cxx:126
 TGButtonGroup.cxx:127
 TGButtonGroup.cxx:128
 TGButtonGroup.cxx:129
 TGButtonGroup.cxx:130
 TGButtonGroup.cxx:131
 TGButtonGroup.cxx:132
 TGButtonGroup.cxx:133
 TGButtonGroup.cxx:134
 TGButtonGroup.cxx:135
 TGButtonGroup.cxx:136
 TGButtonGroup.cxx:137
 TGButtonGroup.cxx:138
 TGButtonGroup.cxx:139
 TGButtonGroup.cxx:140
 TGButtonGroup.cxx:141
 TGButtonGroup.cxx:142
 TGButtonGroup.cxx:143
 TGButtonGroup.cxx:144
 TGButtonGroup.cxx:145
 TGButtonGroup.cxx:146
 TGButtonGroup.cxx:147
 TGButtonGroup.cxx:148
 TGButtonGroup.cxx:149
 TGButtonGroup.cxx:150
 TGButtonGroup.cxx:151
 TGButtonGroup.cxx:152
 TGButtonGroup.cxx:153
 TGButtonGroup.cxx:154
 TGButtonGroup.cxx:155
 TGButtonGroup.cxx:156
 TGButtonGroup.cxx:157
 TGButtonGroup.cxx:158
 TGButtonGroup.cxx:159
 TGButtonGroup.cxx:160
 TGButtonGroup.cxx:161
 TGButtonGroup.cxx:162
 TGButtonGroup.cxx:163
 TGButtonGroup.cxx:164
 TGButtonGroup.cxx:165
 TGButtonGroup.cxx:166
 TGButtonGroup.cxx:167
 TGButtonGroup.cxx:168
 TGButtonGroup.cxx:169
 TGButtonGroup.cxx:170
 TGButtonGroup.cxx:171
 TGButtonGroup.cxx:172
 TGButtonGroup.cxx:173
 TGButtonGroup.cxx:174
 TGButtonGroup.cxx:175
 TGButtonGroup.cxx:176
 TGButtonGroup.cxx:177
 TGButtonGroup.cxx:178
 TGButtonGroup.cxx:179
 TGButtonGroup.cxx:180
 TGButtonGroup.cxx:181
 TGButtonGroup.cxx:182
 TGButtonGroup.cxx:183
 TGButtonGroup.cxx:184
 TGButtonGroup.cxx:185
 TGButtonGroup.cxx:186
 TGButtonGroup.cxx:187
 TGButtonGroup.cxx:188
 TGButtonGroup.cxx:189
 TGButtonGroup.cxx:190
 TGButtonGroup.cxx:191
 TGButtonGroup.cxx:192
 TGButtonGroup.cxx:193
 TGButtonGroup.cxx:194
 TGButtonGroup.cxx:195
 TGButtonGroup.cxx:196
 TGButtonGroup.cxx:197
 TGButtonGroup.cxx:198
 TGButtonGroup.cxx:199
 TGButtonGroup.cxx:200
 TGButtonGroup.cxx:201
 TGButtonGroup.cxx:202
 TGButtonGroup.cxx:203
 TGButtonGroup.cxx:204
 TGButtonGroup.cxx:205
 TGButtonGroup.cxx:206
 TGButtonGroup.cxx:207
 TGButtonGroup.cxx:208
 TGButtonGroup.cxx:209
 TGButtonGroup.cxx:210
 TGButtonGroup.cxx:211
 TGButtonGroup.cxx:212
 TGButtonGroup.cxx:213
 TGButtonGroup.cxx:214
 TGButtonGroup.cxx:215
 TGButtonGroup.cxx:216
 TGButtonGroup.cxx:217
 TGButtonGroup.cxx:218
 TGButtonGroup.cxx:219
 TGButtonGroup.cxx:220
 TGButtonGroup.cxx:221
 TGButtonGroup.cxx:222
 TGButtonGroup.cxx:223
 TGButtonGroup.cxx:224
 TGButtonGroup.cxx:225
 TGButtonGroup.cxx:226
 TGButtonGroup.cxx:227
 TGButtonGroup.cxx:228
 TGButtonGroup.cxx:229
 TGButtonGroup.cxx:230
 TGButtonGroup.cxx:231
 TGButtonGroup.cxx:232
 TGButtonGroup.cxx:233
 TGButtonGroup.cxx:234
 TGButtonGroup.cxx:235
 TGButtonGroup.cxx:236
 TGButtonGroup.cxx:237
 TGButtonGroup.cxx:238
 TGButtonGroup.cxx:239
 TGButtonGroup.cxx:240
 TGButtonGroup.cxx:241
 TGButtonGroup.cxx:242
 TGButtonGroup.cxx:243
 TGButtonGroup.cxx:244
 TGButtonGroup.cxx:245
 TGButtonGroup.cxx:246
 TGButtonGroup.cxx:247
 TGButtonGroup.cxx:248
 TGButtonGroup.cxx:249
 TGButtonGroup.cxx:250
 TGButtonGroup.cxx:251
 TGButtonGroup.cxx:252
 TGButtonGroup.cxx:253
 TGButtonGroup.cxx:254
 TGButtonGroup.cxx:255
 TGButtonGroup.cxx:256
 TGButtonGroup.cxx:257
 TGButtonGroup.cxx:258
 TGButtonGroup.cxx:259
 TGButtonGroup.cxx:260
 TGButtonGroup.cxx:261
 TGButtonGroup.cxx:262
 TGButtonGroup.cxx:263
 TGButtonGroup.cxx:264
 TGButtonGroup.cxx:265
 TGButtonGroup.cxx:266
 TGButtonGroup.cxx:267
 TGButtonGroup.cxx:268
 TGButtonGroup.cxx:269
 TGButtonGroup.cxx:270
 TGButtonGroup.cxx:271
 TGButtonGroup.cxx:272
 TGButtonGroup.cxx:273
 TGButtonGroup.cxx:274
 TGButtonGroup.cxx:275
 TGButtonGroup.cxx:276
 TGButtonGroup.cxx:277
 TGButtonGroup.cxx:278
 TGButtonGroup.cxx:279
 TGButtonGroup.cxx:280
 TGButtonGroup.cxx:281
 TGButtonGroup.cxx:282
 TGButtonGroup.cxx:283
 TGButtonGroup.cxx:284
 TGButtonGroup.cxx:285
 TGButtonGroup.cxx:286
 TGButtonGroup.cxx:287
 TGButtonGroup.cxx:288
 TGButtonGroup.cxx:289
 TGButtonGroup.cxx:290
 TGButtonGroup.cxx:291
 TGButtonGroup.cxx:292
 TGButtonGroup.cxx:293
 TGButtonGroup.cxx:294
 TGButtonGroup.cxx:295
 TGButtonGroup.cxx:296
 TGButtonGroup.cxx:297
 TGButtonGroup.cxx:298
 TGButtonGroup.cxx:299
 TGButtonGroup.cxx:300
 TGButtonGroup.cxx:301
 TGButtonGroup.cxx:302
 TGButtonGroup.cxx:303
 TGButtonGroup.cxx:304
 TGButtonGroup.cxx:305
 TGButtonGroup.cxx:306
 TGButtonGroup.cxx:307
 TGButtonGroup.cxx:308
 TGButtonGroup.cxx:309
 TGButtonGroup.cxx:310
 TGButtonGroup.cxx:311
 TGButtonGroup.cxx:312
 TGButtonGroup.cxx:313
 TGButtonGroup.cxx:314
 TGButtonGroup.cxx:315
 TGButtonGroup.cxx:316
 TGButtonGroup.cxx:317
 TGButtonGroup.cxx:318
 TGButtonGroup.cxx:319
 TGButtonGroup.cxx:320
 TGButtonGroup.cxx:321
 TGButtonGroup.cxx:322
 TGButtonGroup.cxx:323
 TGButtonGroup.cxx:324
 TGButtonGroup.cxx:325
 TGButtonGroup.cxx:326
 TGButtonGroup.cxx:327
 TGButtonGroup.cxx:328
 TGButtonGroup.cxx:329
 TGButtonGroup.cxx:330
 TGButtonGroup.cxx:331
 TGButtonGroup.cxx:332
 TGButtonGroup.cxx:333
 TGButtonGroup.cxx:334
 TGButtonGroup.cxx:335
 TGButtonGroup.cxx:336
 TGButtonGroup.cxx:337
 TGButtonGroup.cxx:338
 TGButtonGroup.cxx:339
 TGButtonGroup.cxx:340
 TGButtonGroup.cxx:341
 TGButtonGroup.cxx:342
 TGButtonGroup.cxx:343
 TGButtonGroup.cxx:344
 TGButtonGroup.cxx:345
 TGButtonGroup.cxx:346
 TGButtonGroup.cxx:347
 TGButtonGroup.cxx:348
 TGButtonGroup.cxx:349
 TGButtonGroup.cxx:350
 TGButtonGroup.cxx:351
 TGButtonGroup.cxx:352
 TGButtonGroup.cxx:353
 TGButtonGroup.cxx:354
 TGButtonGroup.cxx:355
 TGButtonGroup.cxx:356
 TGButtonGroup.cxx:357
 TGButtonGroup.cxx:358
 TGButtonGroup.cxx:359
 TGButtonGroup.cxx:360
 TGButtonGroup.cxx:361
 TGButtonGroup.cxx:362
 TGButtonGroup.cxx:363
 TGButtonGroup.cxx:364
 TGButtonGroup.cxx:365
 TGButtonGroup.cxx:366
 TGButtonGroup.cxx:367
 TGButtonGroup.cxx:368
 TGButtonGroup.cxx:369
 TGButtonGroup.cxx:370
 TGButtonGroup.cxx:371
 TGButtonGroup.cxx:372
 TGButtonGroup.cxx:373
 TGButtonGroup.cxx:374
 TGButtonGroup.cxx:375
 TGButtonGroup.cxx:376
 TGButtonGroup.cxx:377
 TGButtonGroup.cxx:378
 TGButtonGroup.cxx:379
 TGButtonGroup.cxx:380
 TGButtonGroup.cxx:381
 TGButtonGroup.cxx:382
 TGButtonGroup.cxx:383
 TGButtonGroup.cxx:384
 TGButtonGroup.cxx:385
 TGButtonGroup.cxx:386
 TGButtonGroup.cxx:387
 TGButtonGroup.cxx:388
 TGButtonGroup.cxx:389
 TGButtonGroup.cxx:390
 TGButtonGroup.cxx:391
 TGButtonGroup.cxx:392
 TGButtonGroup.cxx:393
 TGButtonGroup.cxx:394
 TGButtonGroup.cxx:395
 TGButtonGroup.cxx:396
 TGButtonGroup.cxx:397
 TGButtonGroup.cxx:398
 TGButtonGroup.cxx:399
 TGButtonGroup.cxx:400
 TGButtonGroup.cxx:401
 TGButtonGroup.cxx:402
 TGButtonGroup.cxx:403
 TGButtonGroup.cxx:404
 TGButtonGroup.cxx:405
 TGButtonGroup.cxx:406
 TGButtonGroup.cxx:407
 TGButtonGroup.cxx:408
 TGButtonGroup.cxx:409
 TGButtonGroup.cxx:410
 TGButtonGroup.cxx:411
 TGButtonGroup.cxx:412
 TGButtonGroup.cxx:413
 TGButtonGroup.cxx:414
 TGButtonGroup.cxx:415
 TGButtonGroup.cxx:416
 TGButtonGroup.cxx:417
 TGButtonGroup.cxx:418
 TGButtonGroup.cxx:419
 TGButtonGroup.cxx:420
 TGButtonGroup.cxx:421
 TGButtonGroup.cxx:422
 TGButtonGroup.cxx:423
 TGButtonGroup.cxx:424
 TGButtonGroup.cxx:425
 TGButtonGroup.cxx:426
 TGButtonGroup.cxx:427
 TGButtonGroup.cxx:428
 TGButtonGroup.cxx:429
 TGButtonGroup.cxx:430
 TGButtonGroup.cxx:431
 TGButtonGroup.cxx:432
 TGButtonGroup.cxx:433
 TGButtonGroup.cxx:434
 TGButtonGroup.cxx:435
 TGButtonGroup.cxx:436
 TGButtonGroup.cxx:437
 TGButtonGroup.cxx:438
 TGButtonGroup.cxx:439
 TGButtonGroup.cxx:440
 TGButtonGroup.cxx:441
 TGButtonGroup.cxx:442
 TGButtonGroup.cxx:443
 TGButtonGroup.cxx:444
 TGButtonGroup.cxx:445
 TGButtonGroup.cxx:446
 TGButtonGroup.cxx:447
 TGButtonGroup.cxx:448
 TGButtonGroup.cxx:449
 TGButtonGroup.cxx:450
 TGButtonGroup.cxx:451
 TGButtonGroup.cxx:452
 TGButtonGroup.cxx:453
 TGButtonGroup.cxx:454
 TGButtonGroup.cxx:455
 TGButtonGroup.cxx:456
 TGButtonGroup.cxx:457
 TGButtonGroup.cxx:458
 TGButtonGroup.cxx:459
 TGButtonGroup.cxx:460
 TGButtonGroup.cxx:461
 TGButtonGroup.cxx:462
 TGButtonGroup.cxx:463
 TGButtonGroup.cxx:464
 TGButtonGroup.cxx:465
 TGButtonGroup.cxx:466
 TGButtonGroup.cxx:467
 TGButtonGroup.cxx:468
 TGButtonGroup.cxx:469
 TGButtonGroup.cxx:470
 TGButtonGroup.cxx:471
 TGButtonGroup.cxx:472
 TGButtonGroup.cxx:473
 TGButtonGroup.cxx:474
 TGButtonGroup.cxx:475
 TGButtonGroup.cxx:476
 TGButtonGroup.cxx:477
 TGButtonGroup.cxx:478
 TGButtonGroup.cxx:479
 TGButtonGroup.cxx:480
 TGButtonGroup.cxx:481
 TGButtonGroup.cxx:482
 TGButtonGroup.cxx:483
 TGButtonGroup.cxx:484
 TGButtonGroup.cxx:485
 TGButtonGroup.cxx:486
 TGButtonGroup.cxx:487
 TGButtonGroup.cxx:488
 TGButtonGroup.cxx:489
 TGButtonGroup.cxx:490
 TGButtonGroup.cxx:491
 TGButtonGroup.cxx:492
 TGButtonGroup.cxx:493
 TGButtonGroup.cxx:494
 TGButtonGroup.cxx:495
 TGButtonGroup.cxx:496
 TGButtonGroup.cxx:497
 TGButtonGroup.cxx:498
 TGButtonGroup.cxx:499
 TGButtonGroup.cxx:500
 TGButtonGroup.cxx:501
 TGButtonGroup.cxx:502
 TGButtonGroup.cxx:503
 TGButtonGroup.cxx:504
 TGButtonGroup.cxx:505
 TGButtonGroup.cxx:506
 TGButtonGroup.cxx:507
 TGButtonGroup.cxx:508
 TGButtonGroup.cxx:509
 TGButtonGroup.cxx:510
 TGButtonGroup.cxx:511
 TGButtonGroup.cxx:512
 TGButtonGroup.cxx:513
 TGButtonGroup.cxx:514
 TGButtonGroup.cxx:515
 TGButtonGroup.cxx:516
 TGButtonGroup.cxx:517
 TGButtonGroup.cxx:518
 TGButtonGroup.cxx:519
 TGButtonGroup.cxx:520
 TGButtonGroup.cxx:521
 TGButtonGroup.cxx:522
 TGButtonGroup.cxx:523
 TGButtonGroup.cxx:524
 TGButtonGroup.cxx:525
 TGButtonGroup.cxx:526
 TGButtonGroup.cxx:527
 TGButtonGroup.cxx:528
 TGButtonGroup.cxx:529
 TGButtonGroup.cxx:530
 TGButtonGroup.cxx:531
 TGButtonGroup.cxx:532
 TGButtonGroup.cxx:533
 TGButtonGroup.cxx:534
 TGButtonGroup.cxx:535
 TGButtonGroup.cxx:536
 TGButtonGroup.cxx:537
 TGButtonGroup.cxx:538
 TGButtonGroup.cxx:539
 TGButtonGroup.cxx:540
 TGButtonGroup.cxx:541
 TGButtonGroup.cxx:542
 TGButtonGroup.cxx:543
 TGButtonGroup.cxx:544
 TGButtonGroup.cxx:545
 TGButtonGroup.cxx:546
 TGButtonGroup.cxx:547
 TGButtonGroup.cxx:548
 TGButtonGroup.cxx:549
 TGButtonGroup.cxx:550
 TGButtonGroup.cxx:551
 TGButtonGroup.cxx:552
 TGButtonGroup.cxx:553
 TGButtonGroup.cxx:554
 TGButtonGroup.cxx:555
 TGButtonGroup.cxx:556
 TGButtonGroup.cxx:557
 TGButtonGroup.cxx:558
 TGButtonGroup.cxx:559
 TGButtonGroup.cxx:560
 TGButtonGroup.cxx:561
 TGButtonGroup.cxx:562
 TGButtonGroup.cxx:563
 TGButtonGroup.cxx:564
 TGButtonGroup.cxx:565
 TGButtonGroup.cxx:566
 TGButtonGroup.cxx:567
 TGButtonGroup.cxx:568
 TGButtonGroup.cxx:569
 TGButtonGroup.cxx:570
 TGButtonGroup.cxx:571
 TGButtonGroup.cxx:572
 TGButtonGroup.cxx:573
 TGButtonGroup.cxx:574
 TGButtonGroup.cxx:575
 TGButtonGroup.cxx:576
 TGButtonGroup.cxx:577
 TGButtonGroup.cxx:578
 TGButtonGroup.cxx:579
 TGButtonGroup.cxx:580
 TGButtonGroup.cxx:581
 TGButtonGroup.cxx:582
 TGButtonGroup.cxx:583
 TGButtonGroup.cxx:584
 TGButtonGroup.cxx:585
 TGButtonGroup.cxx:586
 TGButtonGroup.cxx:587
 TGButtonGroup.cxx:588
 TGButtonGroup.cxx:589
 TGButtonGroup.cxx:590
 TGButtonGroup.cxx:591
 TGButtonGroup.cxx:592
 TGButtonGroup.cxx:593
 TGButtonGroup.cxx:594
 TGButtonGroup.cxx:595
 TGButtonGroup.cxx:596
 TGButtonGroup.cxx:597
 TGButtonGroup.cxx:598
 TGButtonGroup.cxx:599
 TGButtonGroup.cxx:600
 TGButtonGroup.cxx:601
 TGButtonGroup.cxx:602
 TGButtonGroup.cxx:603
 TGButtonGroup.cxx:604
 TGButtonGroup.cxx:605
 TGButtonGroup.cxx:606
 TGButtonGroup.cxx:607
 TGButtonGroup.cxx:608
 TGButtonGroup.cxx:609
 TGButtonGroup.cxx:610
 TGButtonGroup.cxx:611
 TGButtonGroup.cxx:612
 TGButtonGroup.cxx:613
 TGButtonGroup.cxx:614
 TGButtonGroup.cxx:615
 TGButtonGroup.cxx:616
 TGButtonGroup.cxx:617
 TGButtonGroup.cxx:618
 TGButtonGroup.cxx:619
 TGButtonGroup.cxx:620
 TGButtonGroup.cxx:621
 TGButtonGroup.cxx:622
 TGButtonGroup.cxx:623
 TGButtonGroup.cxx:624
 TGButtonGroup.cxx:625
 TGButtonGroup.cxx:626
 TGButtonGroup.cxx:627
 TGButtonGroup.cxx:628
 TGButtonGroup.cxx:629
 TGButtonGroup.cxx:630
 TGButtonGroup.cxx:631
 TGButtonGroup.cxx:632
 TGButtonGroup.cxx:633
 TGButtonGroup.cxx:634
 TGButtonGroup.cxx:635
 TGButtonGroup.cxx:636
 TGButtonGroup.cxx:637
 TGButtonGroup.cxx:638
 TGButtonGroup.cxx:639
 TGButtonGroup.cxx:640
 TGButtonGroup.cxx:641
 TGButtonGroup.cxx:642
 TGButtonGroup.cxx:643
 TGButtonGroup.cxx:644
 TGButtonGroup.cxx:645
 TGButtonGroup.cxx:646
 TGButtonGroup.cxx:647
 TGButtonGroup.cxx:648
 TGButtonGroup.cxx:649
 TGButtonGroup.cxx:650
 TGButtonGroup.cxx:651
 TGButtonGroup.cxx:652
 TGButtonGroup.cxx:653
 TGButtonGroup.cxx:654
 TGButtonGroup.cxx:655
 TGButtonGroup.cxx:656
 TGButtonGroup.cxx:657
 TGButtonGroup.cxx:658
 TGButtonGroup.cxx:659
 TGButtonGroup.cxx:660
 TGButtonGroup.cxx:661
 TGButtonGroup.cxx:662
 TGButtonGroup.cxx:663
 TGButtonGroup.cxx:664
 TGButtonGroup.cxx:665
 TGButtonGroup.cxx:666
 TGButtonGroup.cxx:667
 TGButtonGroup.cxx:668
 TGButtonGroup.cxx:669
 TGButtonGroup.cxx:670
 TGButtonGroup.cxx:671
 TGButtonGroup.cxx:672
 TGButtonGroup.cxx:673
 TGButtonGroup.cxx:674
 TGButtonGroup.cxx:675
 TGButtonGroup.cxx:676
 TGButtonGroup.cxx:677
 TGButtonGroup.cxx:678
 TGButtonGroup.cxx:679
 TGButtonGroup.cxx:680
 TGButtonGroup.cxx:681
 TGButtonGroup.cxx:682
 TGButtonGroup.cxx:683
 TGButtonGroup.cxx:684
 TGButtonGroup.cxx:685
 TGButtonGroup.cxx:686
 TGButtonGroup.cxx:687
 TGButtonGroup.cxx:688
 TGButtonGroup.cxx:689
 TGButtonGroup.cxx:690
 TGButtonGroup.cxx:691
 TGButtonGroup.cxx:692
 TGButtonGroup.cxx:693
 TGButtonGroup.cxx:694
 TGButtonGroup.cxx:695
 TGButtonGroup.cxx:696
 TGButtonGroup.cxx:697
 TGButtonGroup.cxx:698
 TGButtonGroup.cxx:699
 TGButtonGroup.cxx:700
 TGButtonGroup.cxx:701
 TGButtonGroup.cxx:702
 TGButtonGroup.cxx:703
 TGButtonGroup.cxx:704
 TGButtonGroup.cxx:705
 TGButtonGroup.cxx:706
 TGButtonGroup.cxx:707
 TGButtonGroup.cxx:708
 TGButtonGroup.cxx:709
 TGButtonGroup.cxx:710
 TGButtonGroup.cxx:711
 TGButtonGroup.cxx:712
 TGButtonGroup.cxx:713
 TGButtonGroup.cxx:714
 TGButtonGroup.cxx:715
 TGButtonGroup.cxx:716
 TGButtonGroup.cxx:717
 TGButtonGroup.cxx:718
 TGButtonGroup.cxx:719
 TGButtonGroup.cxx:720
 TGButtonGroup.cxx:721
 TGButtonGroup.cxx:722
 TGButtonGroup.cxx:723
 TGButtonGroup.cxx:724
 TGButtonGroup.cxx:725
 TGButtonGroup.cxx:726
 TGButtonGroup.cxx:727
 TGButtonGroup.cxx:728
 TGButtonGroup.cxx:729
 TGButtonGroup.cxx:730
 TGButtonGroup.cxx:731
 TGButtonGroup.cxx:732
 TGButtonGroup.cxx:733
 TGButtonGroup.cxx:734
 TGButtonGroup.cxx:735
 TGButtonGroup.cxx:736
 TGButtonGroup.cxx:737
 TGButtonGroup.cxx:738
 TGButtonGroup.cxx:739
 TGButtonGroup.cxx:740
 TGButtonGroup.cxx:741
 TGButtonGroup.cxx:742
 TGButtonGroup.cxx:743
 TGButtonGroup.cxx:744
 TGButtonGroup.cxx:745
 TGButtonGroup.cxx:746
 TGButtonGroup.cxx:747
 TGButtonGroup.cxx:748
 TGButtonGroup.cxx:749
 TGButtonGroup.cxx:750
 TGButtonGroup.cxx:751
 TGButtonGroup.cxx:752
 TGButtonGroup.cxx:753
 TGButtonGroup.cxx:754
 TGButtonGroup.cxx:755
 TGButtonGroup.cxx:756
 TGButtonGroup.cxx:757
 TGButtonGroup.cxx:758
 TGButtonGroup.cxx:759
 TGButtonGroup.cxx:760
 TGButtonGroup.cxx:761
 TGButtonGroup.cxx:762
 TGButtonGroup.cxx:763
 TGButtonGroup.cxx:764
 TGButtonGroup.cxx:765
 TGButtonGroup.cxx:766
 TGButtonGroup.cxx:767
 TGButtonGroup.cxx:768
 TGButtonGroup.cxx:769
 TGButtonGroup.cxx:770
 TGButtonGroup.cxx:771
 TGButtonGroup.cxx:772
 TGButtonGroup.cxx:773
 TGButtonGroup.cxx:774
 TGButtonGroup.cxx:775
 TGButtonGroup.cxx:776
 TGButtonGroup.cxx:777
 TGButtonGroup.cxx:778
 TGButtonGroup.cxx:779
 TGButtonGroup.cxx:780
 TGButtonGroup.cxx:781
 TGButtonGroup.cxx:782
 TGButtonGroup.cxx:783
 TGButtonGroup.cxx:784
 TGButtonGroup.cxx:785
 TGButtonGroup.cxx:786
 TGButtonGroup.cxx:787
 TGButtonGroup.cxx:788
 TGButtonGroup.cxx:789
 TGButtonGroup.cxx:790
 TGButtonGroup.cxx:791
 TGButtonGroup.cxx:792
 TGButtonGroup.cxx:793
 TGButtonGroup.cxx:794
 TGButtonGroup.cxx:795
 TGButtonGroup.cxx:796
 TGButtonGroup.cxx:797
 TGButtonGroup.cxx:798
 TGButtonGroup.cxx:799
 TGButtonGroup.cxx:800
 TGButtonGroup.cxx:801
 TGButtonGroup.cxx:802
 TGButtonGroup.cxx:803
 TGButtonGroup.cxx:804
 TGButtonGroup.cxx:805
 TGButtonGroup.cxx:806
 TGButtonGroup.cxx:807
 TGButtonGroup.cxx:808
 TGButtonGroup.cxx:809
 TGButtonGroup.cxx:810
 TGButtonGroup.cxx:811
 TGButtonGroup.cxx:812
 TGButtonGroup.cxx:813
 TGButtonGroup.cxx:814
 TGButtonGroup.cxx:815
 TGButtonGroup.cxx:816
 TGButtonGroup.cxx:817
 TGButtonGroup.cxx:818
 TGButtonGroup.cxx:819
 TGButtonGroup.cxx:820
 TGButtonGroup.cxx:821
 TGButtonGroup.cxx:822
 TGButtonGroup.cxx:823
 TGButtonGroup.cxx:824
 TGButtonGroup.cxx:825
 TGButtonGroup.cxx:826
 TGButtonGroup.cxx:827
 TGButtonGroup.cxx:828
 TGButtonGroup.cxx:829
 TGButtonGroup.cxx:830
 TGButtonGroup.cxx:831
 TGButtonGroup.cxx:832
 TGButtonGroup.cxx:833
 TGButtonGroup.cxx:834
 TGButtonGroup.cxx:835
 TGButtonGroup.cxx:836
 TGButtonGroup.cxx:837
 TGButtonGroup.cxx:838
 TGButtonGroup.cxx:839
 TGButtonGroup.cxx:840
 TGButtonGroup.cxx:841