// @(#)root/gui:$Id: ee86415852b0e43b57190b9645717cf508b7920e $
// Author: Fons Rademakers   06/01/98

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

    This source is based on Xclass95, a Win95-looking GUI toolkit.
    Copyright (C) 1996, 1997 David Barth, Ricky Ralston, Hector Peraza.

    Xclass95 is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

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

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGButton, TGTextButton, TGPictureButton, TGCheckButton,              //
// TGRadioButton and TGSplitButton                                      //
//                                                                      //
// This header defines all GUI button widgets.                          //
//                                                                      //
// TGButton is a button abstract base class. It defines general button  //
// behaviour.                                                           //
//                                                                      //
// TGTextButton and TGPictureButton yield an action as soon as they are //
// clicked. These buttons usually provide fast access to frequently     //
// used or critical commands. They may appear alone or placed in a      //
// group.                                                               //
//                                                                      //
// The action they perform can be inscribed with a meaningful tooltip   //
// set by SetToolTipText(const char* text, Long_t delayms=400).         //
//                                                                      //
// The text button has a label indicating the action to be taken when   //
// the button is pressed. The text can be a hot string ("&Exit") that   //
// defines the label "Exit" and keyboard mnemonics Alt+E for button     //
// selection. A button label can be changed by SetText(new_label).      //
//                                                                      //
// Selecting a text or picture button will generate the event:          //
// kC_COMMAND, kCM_BUTTON, button id, user data.                        //
//                                                                      //
// The purpose of TGCheckButton and TGRadioButton is for selecting      //
// different options. Like text buttons, they have text or hot string   //
// as a label.                                                          //
//                                                                      //
// Radio buttons are grouped usually in logical sets of two or more     //
// buttons to present mutually exclusive choices.                       //
//                                                                      //
// Selecting a check button will generate the event:                    //
// kC_COMMAND, kCM_CHECKBUTTON, button id, user data.                   //
//                                                                      //
// Selecting a radio button will generate the event:                    //
// kC_COMMAND, kCM_RADIOBUTTON, button id, user data.                   //
//                                                                      //
// If a command string has been specified (via SetCommand()) then this  //
// command string will be executed via the interpreter whenever a       //
// button is selected. A command string can contain the macros:         //
// $MSG   -- kC_COMMAND, kCM[CHECK|RADIO]BUTTON packed message          //
//           (use GET_MSG() and GET_SUBMSG() to unpack)                 //
// $PARM1 -- button id                                                  //
// $PARM2 -- user data pointer                                          //
// Before executing these macros are expanded into the respective       //
// Long_t's                                                             //
//                                                                      //
// TGSplitButton implements a button with added menu functionality.     //
// There are 2 modes of operation available.                            //
//                                                                      //
// If the button is split, a menu will popup when the menu area of the  //
// button is clicked. Activating a menu item changes the functionality  //
// of the button by having it emit a additional signal when it is       //
// clicked. The signal emitted when the button is clicked, is the       //
// ItemClicked(Int_t) signal with a different fixed value for the       //
// Int_t that corresponds to the id of the activated menu entry.        //
//                                                                      //
// If the button is not split, clicking it will popup the menu and the  //
// ItemClicked(Int_t) signal will be emitted when a menu entry is       //
// acitvated. The value of the Int_t is again equal to the value of     //
// the id of the activated menu entry.                                  //
//                                                                      //
// The mode of operation of a SplitButton can be changed on the fly     //
// by calling the SetSplit(Bool_t) method.                              //
//////////////////////////////////////////////////////////////////////////

#include "TGButton.h"
#include "TGWidget.h"
#include "TGPicture.h"
#include "TGToolTip.h"
#include "TGButtonGroup.h"
#include "TGResourcePool.h"
#include "Riostream.h"
#include "TSystem.h"
#include "TImage.h"
#include "TEnv.h"
#include "TClass.h"
#include "TGMenu.h"
#include "KeySymbols.h"

const TGGC *TGButton::fgHibckgndGC = 0;
const TGGC *TGButton::fgDefaultGC = 0;

const TGFont *TGTextButton::fgDefaultFont = 0;

const TGFont *TGCheckButton::fgDefaultFont = 0;
const TGGC   *TGCheckButton::fgDefaultGC = 0;

const TGFont *TGRadioButton::fgDefaultFont = 0;
const TGGC   *TGRadioButton::fgDefaultGC = 0;

Window_t TGButton::fgReleaseBtn = 0;

ClassImp(TGButton)
ClassImp(TGTextButton)
ClassImp(TGPictureButton)
ClassImp(TGCheckButton)
ClassImp(TGRadioButton)
ClassImp(TGSplitButton)

//______________________________________________________________________________
TGButton::TGButton(const TGWindow *p, Int_t id, GContext_t norm, UInt_t options)
    : TGFrame(p, 1, 1, options)
{
   // Create button base class part.
 
   fWidgetId    = id;
   fWidgetFlags = kWidgetWantFocus;
   fMsgWindow   = p;
   fUserData    = 0;
   fTip         = 0;
   fGroup       = 0;
   fStyle       = 0;

   fNormGC   = norm;
   fState    = kButtonUp;
   fStayDown = kFALSE;
   fWidgetFlags = kWidgetIsEnabled;

//   fStyle = gClient->GetStyle();
//   if (fStyle > 0) {
//      fOptions &= ~(kRaisedFrame | kDoubleBorder);
//   }

   // coverity[returned_null]
   // coverity[dereference]
   if (p && p->IsA()->InheritsFrom(TGButtonGroup::Class())) {
      TGButtonGroup *bg = (TGButtonGroup*) p;
      bg->Insert(this, id);
   }

   fBgndColor = fBackground;
   fHighColor = gClient->GetResourcePool()->GetHighLightColor();

   gVirtualX->GrabButton(fId, kButton1, kAnyModifier,
                         kButtonPressMask | kButtonReleaseMask,
                         kNone, kNone);

   AddInput(kEnterWindowMask | kLeaveWindowMask);
   SetWindowName();
}

//______________________________________________________________________________
TGButton::~TGButton()
{
   // Delete button.

   // remove from button group
   if (fGroup) {
      fGroup->Remove(this);
      fGroup = 0;
   }

   if (fTip) delete fTip;
}

//______________________________________________________________________________
void TGButton::SetState(EButtonState state, Bool_t emit)
{
   // Set button state.

   Bool_t was = !IsDown();   // kTRUE if button was off

   if (state == kButtonDisabled)
      fWidgetFlags &= ~kWidgetIsEnabled;
   else 
      fWidgetFlags |= kWidgetIsEnabled;
   if (state != fState) {
      switch (state) {
         case kButtonEngaged:
         case kButtonDown:
            fOptions &= ~kRaisedFrame;
            fOptions |= kSunkenFrame;
            break;
         case kButtonDisabled:
         case kButtonUp:
            if (fStyle > 0) {
               fOptions &= ~kRaisedFrame;
               fOptions &= ~kSunkenFrame;
            }
            else {
               fOptions &= ~kSunkenFrame;
               fOptions |= kRaisedFrame;
            }
            break;
      }
      fState = state;
      DoRedraw();
      if (emit || fGroup) EmitSignals(was);
   }
}

//______________________________________________________________________________
void TGButton::SetStyle(UInt_t newstyle)
{
   // Set the button style (modern or classic).

   fStyle = newstyle;
   fBgndColor = fBackground;
   if (fStyle > 0) {
      ChangeOptions(GetOptions() & ~kRaisedFrame);
   }
   else {
      ChangeOptions(GetOptions() | kRaisedFrame);
   }
}

//______________________________________________________________________________
void TGButton::SetStyle(const char *style)
{
   // Set the button style (modern or classic).

   fBgndColor = fBackground;
   if (style && strstr(style, "modern")) {
      fStyle = 1;
      ChangeOptions(GetOptions() & ~kRaisedFrame);
   }
   else {
      fStyle = 0;
      ChangeOptions(GetOptions() | kRaisedFrame);
   }
}

//______________________________________________________________________________
Bool_t TGButton::IsDown() const
{ 
   if (fStyle > 0) 
      return (fOptions & kSunkenFrame);
   return !(fOptions & kRaisedFrame);
}

//______________________________________________________________________________
void TGButton::SetDown(Bool_t on, Bool_t emit)
{

   // Set button state down according to the parameter 'on'.

   if (GetState() == kButtonDisabled) return;

   SetState(on ? kButtonDown : kButtonUp, emit);
}

//______________________________________________________________________________
void TGButton::SetGroup(TGButtonGroup *group)
{
   // Sets new button-group for this button.

   fGroup = group;
}

//______________________________________________________________________________
Bool_t TGButton::HandleButton(Event_t *event)
{
   // Handle mouse button event.

   Bool_t click = kFALSE;

   if (fTip) fTip->Hide();

   if (fState == kButtonDisabled) return kTRUE;

   Bool_t in = (event->fX >= 0) && (event->fY >= 0) &&
               (event->fX <= (Int_t)fWidth) && (event->fY <= (Int_t)fHeight);

   // We don't need to check the button number as GrabButton will
   // only allow button1 events
   if (event->fType == kButtonPress) {
      fgReleaseBtn = 0;

      if (fState == kButtonEngaged) {
         return kTRUE;
      }
      if (in) SetState(kButtonDown, kTRUE);
   } else { // ButtonRelease
      if (fState == kButtonEngaged) {
         if (in) SetState(kButtonUp, kTRUE);
         click = kTRUE;
      } else {
         click = (fState == kButtonDown) && in;
         if (click && fStayDown) {
            if (in) {
               SetState(kButtonEngaged, kTRUE);
               fgReleaseBtn = 0;
            }
         } else {
            if (in) {
               SetState(kButtonUp, kTRUE);
               fgReleaseBtn = fId;
            }
         }
      }
   }
   if (click) {
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                  (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                           (Long_t) fUserData);
   }
   if ((fStyle > 0) && (event->fType == kButtonRelease)) {
      fBgndColor = fBackground;
   }
   DoRedraw();
   return kTRUE;
}

//______________________________________________________________________________
void TGButton::EmitSignals(Bool_t was)
{
   // Emit button signals.

   Bool_t now = !IsDown();       // kTRUE if button now is off

   // emit signals
   if (was && !now) {
      Pressed();                 // emit Pressed  = was off , now on
      if (fStayDown) Clicked();  // emit Clicked
   }
   if (!was && now) {
      Released();                // emit Released = was on , now off
      Clicked();                 // emit Clicked
   }
   if ((was != now) && IsToggleButton()) Toggled(!now); // emit Toggled  = was != now
}

//______________________________________________________________________________
Bool_t TGButton::HandleCrossing(Event_t *event)
{
   // Handle mouse crossing event.

   if (fTip) {
      if (event->fType == kEnterNotify)
         fTip->Reset();
      else
         fTip->Hide();
   }
   
   if (fStyle > 0) {
      if ((event->fType == kEnterNotify) && (fState != kButtonDisabled)) {
         fBgndColor = fHighColor;
      } else {
         fBgndColor = fBackground;
      }
      if (event->fType == kLeaveNotify) {
         fBgndColor = fBackground;
      }
      DoRedraw();
   }

   if ((fgDbw != event->fWindow) || (fgReleaseBtn == event->fWindow)) return kTRUE;

   if (!(event->fState & (kButton1Mask | kButton2Mask | kButton3Mask)))
      return kTRUE;

   if (fState == kButtonEngaged || fState == kButtonDisabled) return kTRUE;

   if (event->fType == kLeaveNotify) {
      fgReleaseBtn = fId;
      SetState(kButtonUp, kFALSE);
   }
   DoRedraw();
   return kTRUE;
}

//______________________________________________________________________________
void TGButton::SetToolTipText(const char *text, Long_t delayms)
{
   // Set tool tip text associated with this button. The delay is in
   // milliseconds (minimum 250). To remove tool tip call method with
   // text = 0.

   if (fTip) {
      delete fTip;
      fTip = 0;
   }

   if (text && strlen(text))
      fTip = new TGToolTip(fClient->GetDefaultRoot(), this, text, delayms);
}

//______________________________________________________________________________
void TGButton::SetEnabled(Bool_t e)
{
   // Set enabled or disabled state of button

   SetState(e ? kButtonUp : kButtonDisabled);

   if (e) fWidgetFlags |= kWidgetIsEnabled;
   else   fWidgetFlags &= ~kWidgetIsEnabled;
}

//______________________________________________________________________________
const TGGC &TGButton::GetDefaultGC()
{
   // Return default graphics context.

   if (!fgDefaultGC)
      fgDefaultGC = gClient->GetResourcePool()->GetFrameGC();
   return *fgDefaultGC;
}

//______________________________________________________________________________
const TGGC &TGButton::GetHibckgndGC()
{
   // Return graphics context for highlighted frame background.

   if (!fgHibckgndGC) {
      GCValues_t gval;
      gval.fMask = kGCForeground | kGCBackground | kGCTile |
                   kGCFillStyle  | kGCGraphicsExposures;
      gval.fForeground = gClient->GetResourcePool()->GetFrameHiliteColor();
      gval.fBackground = gClient->GetResourcePool()->GetFrameBgndColor();
      gval.fFillStyle  = kFillTiled;
      gval.fTile       = gClient->GetResourcePool()->GetCheckeredPixmap();
      gval.fGraphicsExposures = kFALSE;
      fgHibckgndGC = gClient->GetGC(&gval, kTRUE);
   }
   return *fgHibckgndGC;
}


//______________________________________________________________________________
TGTextButton::TGTextButton(const TGWindow *p, TGHotString *s, Int_t id,
                           GContext_t norm, FontStruct_t font,
                           UInt_t options) : TGButton(p, id, norm, options)
{
   // Create a text button widget. The hotstring will be adopted and deleted
   // by the text button.

   fLabel = s;
   fFontStruct = font;

   Init();
}

//______________________________________________________________________________
TGTextButton::TGTextButton(const TGWindow *p, const char *s, Int_t id,
                           GContext_t norm, FontStruct_t font,
                           UInt_t options) : TGButton(p, id, norm, options)
{
   // Create a text button widget.

   fLabel = new TGHotString(!p && !s ? GetName() : s);
   fFontStruct = font;

   Init();
}

//______________________________________________________________________________
TGTextButton::TGTextButton(const TGWindow *p, const char *s, const char *cmd,
                           Int_t id, GContext_t norm, FontStruct_t font,
                           UInt_t options) : TGButton(p, id, norm, options)
{
   // Create a text button widget and set cmd string at same time.

   fLabel = new TGHotString(s);
   fFontStruct = font;
   fCommand = cmd;

   Init();
}

//______________________________________________________________________________
void TGTextButton::Init()
{
   // Common initialization used by the different ctors.

   int hotchar;

   fTMode       = kTextCenterX | kTextCenterY;
   fHKeycode    = 0;
   fHasOwnFont  = kFALSE;
   fPrevStateOn =
   fStateOn     = kFALSE;
   fWrapLength  = -1;
   fMLeft = fMRight = fMTop = fMBottom = 0;

   TGFont *font = fClient->GetFontPool()->FindFont(fFontStruct);
   if (!font) {
      font = fClient->GetFontPool()->GetFont(fgDefaultFont);
      if (font) fFontStruct = font->GetFontStruct();
   }
   if (font) {
      fTLayout = font->ComputeTextLayout(fLabel->GetString(), fLabel->GetLength(),
                                         fWrapLength, kTextLeft, 0,
                                         &fTWidth, &fTHeight);
   }
   Resize();
   fWidth = fTWidth;
   fHeight = fTHeight;

   if ((hotchar = fLabel->GetHotChar()) != 0) {
      if ((fHKeycode = gVirtualX->KeysymToKeycode(hotchar)) != 0) {
         const TGMainFrame *main = (TGMainFrame *) GetMainFrame();
         if (main) {
            main->BindKey(this, fHKeycode, kKeyMod1Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyLockMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyLockMask);

            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask | kKeyLockMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask | kKeyLockMask);
         }
      }
   }
   SetWindowAttributes_t wattr;
   wattr.fMask = kWAWinGravity | kWABitGravity;
   wattr.fBitGravity = 5; // center
   wattr.fWinGravity = 1;
   gVirtualX->ChangeWindowAttributes(fId, &wattr);

   SetWindowName();
}

//______________________________________________________________________________
TGTextButton::~TGTextButton()
{
   // Delete a text button widget.

   if (fHKeycode && (fParent->MustCleanup() != kDeepCleanup)) {
      const TGMainFrame *main = (TGMainFrame *) GetMainFrame();
      if (main) {
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyLockMask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyLockMask);

         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask | kKeyLockMask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask | kKeyLockMask);
      }
   }
   if (fLabel) delete fLabel;
   if (fHasOwnFont) {
      TGGCPool *pool = fClient->GetGCPool();
      TGGC *gc = pool->FindGC(fNormGC);
      pool->FreeGC(gc);
   }

   delete fTLayout;
}

//______________________________________________________________________________
void TGTextButton::Layout()
{
   // layout text button

   delete fTLayout;

   TGFont *font = fClient->GetFontPool()->FindFont(fFontStruct);
   if (!font) {
      font = fClient->GetFontPool()->GetFont(fgDefaultFont);
      if (font) fFontStruct = font->GetFontStruct();
   }
   if (font) {
      fTLayout = font->ComputeTextLayout(fLabel->GetString(), fLabel->GetLength(),
                                         fWrapLength, kTextLeft, 0,
                                         &fTWidth, &fTHeight);
   }
   fClient->NeedRedraw(this);
}

//______________________________________________________________________________
void TGTextButton::SetText(TGHotString *new_label)
{
   // Set new button text.

   int hotchar;
   const TGMainFrame *main = (TGMainFrame *) GetMainFrame();

   if (fLabel) {
      if (main && fHKeycode) {
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyLockMask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyLockMask);

         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask | kKeyLockMask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask | kKeyLockMask);
      }
      delete fLabel;
   }
   
   fLabel = new_label;
   if ((hotchar = fLabel->GetHotChar()) != 0) {
      if (main && ((fHKeycode = gVirtualX->KeysymToKeycode(hotchar)) != 0)) {
         main->BindKey(this, fHKeycode, kKeyMod1Mask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyLockMask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyLockMask);

         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask | kKeyLockMask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask | kKeyLockMask);
      }
   }

   Layout();
}

//______________________________________________________________________________
void TGTextButton::SetText(const TString &new_label)
{
   // Set new button text.

   SetText(new TGHotString(new_label));
}

//______________________________________________________________________________
void TGTextButton::SetTextJustify(Int_t mode)
{
   // Set text justification. Mode is an OR of the bits:
   // kTextTop, kTextBottom, kTextLeft, kTextRight, kTextCenterX and
   // kTextCenterY.

   fTMode = mode;

   SetWindowAttributes_t wattr;
   wattr.fMask = kWAWinGravity | kWABitGravity;
   wattr.fWinGravity = 1;

   switch (mode) {
      case kTextTop | kTextLeft:
         wattr.fBitGravity = 1; //NorthWestGravity
         break;
      case kTextTop | kTextCenterX:
      case kTextTop:
         wattr.fBitGravity = 2; //NorthGravity
         break;
      case kTextTop | kTextRight:
         wattr.fBitGravity = 3; //NorthEastGravity
         break;
      case kTextLeft | kTextCenterY:
      case kTextLeft:
         wattr.fBitGravity = 4; //WestGravity
         break;
      case kTextCenterY | kTextCenterX:
         wattr.fBitGravity = 5; //CenterGravity
         break;
      case kTextRight | kTextCenterY:
      case kTextRight:
         wattr.fBitGravity = 6; //EastGravity
         break;
      case kTextBottom | kTextLeft:
         wattr.fBitGravity = 7; //SouthWestGravity
         break;
      case kTextBottom | kTextCenterX:
      case kTextBottom:
         wattr.fBitGravity = 8; //SouthGravity
         break;
      case kTextBottom | kTextRight:
         wattr.fBitGravity = 9; //SouthEastGravity
         break;
      default:
         wattr.fBitGravity = 5; //CenterGravity
         break;
   }

   gVirtualX->ChangeWindowAttributes(fId, &wattr);
   Layout();
}

//______________________________________________________________________________
void TGTextButton::DoRedraw()
{
   // Draw the text button.

   int x, y;
   UInt_t w = GetWidth() - 1;
   UInt_t h = GetHeight()- 1;

   if ((fStyle > 0) && !(fOptions & kOwnBackground))
      gVirtualX->SetWindowBackground(fId, fBgndColor);
   TGFrame::DoRedraw();

   if (fTMode & kTextLeft) {
      x = fMLeft + 4;
   } else if (fTMode & kTextRight) {
      x = fWidth - fTWidth - fMRight - 4;
   } else {
      x = (fWidth - fTWidth + fMLeft - fMRight) >> 1;
   }

   if (fTMode & kTextTop) {
      y = fMTop + 3;
   } else if (fTMode & kTextBottom) {
      y = fHeight - fTHeight - fMBottom - 3;
   } else {
      y = (fHeight - fTHeight + fMTop - fMBottom) >> 1;
   }

   if (fState == kButtonDown || fState == kButtonEngaged) {
      ++x; ++y;
      w--; h--;
   }
   if (fStyle == 0) {
      if (fState == kButtonEngaged) {
         gVirtualX->FillRectangle(fId, GetHibckgndGC()(), 2, 2, fWidth-4, fHeight-4);
         gVirtualX->DrawLine(fId, GetHilightGC()(), 2, 2, fWidth-3, 2);
      }
   }

   Int_t hotpos = fLabel->GetHotPos();

   if (fStyle > 0) {
      gVirtualX->DrawRectangle(fId, TGFrame::GetShadowGC()(), 0, 0, w, h);
   }
   if (fState == kButtonDisabled) {
      TGGCPool *pool =  fClient->GetResourcePool()->GetGCPool();
      TGGC *gc = pool->FindGC(fNormGC);
      if (gc) {
         Pixel_t fore = gc->GetForeground();
         Pixel_t hi = GetHilightGC().GetForeground();
         Pixel_t sh = GetShadowGC().GetForeground();

         gc->SetForeground(hi);
         fTLayout->DrawText(fId, gc->GetGC(), x + 1, y + 1, 0, -1);
         if (hotpos) fTLayout->UnderlineChar(fId, gc->GetGC(), x + 1, y + 1, hotpos - 1);

         gc->SetForeground(sh);
         fTLayout->DrawText(fId, gc->GetGC(), x, y, 0, -1);
         if (hotpos) fTLayout->UnderlineChar(fId, gc->GetGC(), x, y, hotpos - 1);
         gc->SetForeground(fore);
      }
   } else {
      fTLayout->DrawText(fId, fNormGC, x, y, 0, -1);
      if (hotpos) fTLayout->UnderlineChar(fId, fNormGC, x, y, hotpos - 1);
   }
}

//______________________________________________________________________________
Bool_t TGTextButton::HandleKey(Event_t *event)
{
   // Handle key event. This function will be called when the hotkey is hit.

   Bool_t click = kFALSE;
   Bool_t was = !IsDown();   // kTRUE if button was off

   if (event->fType == kGKeyPress) {
      gVirtualX->SetKeyAutoRepeat(kFALSE);
   } else {
      gVirtualX->SetKeyAutoRepeat(kTRUE);
   }

   if (fTip && event->fType == kGKeyPress) fTip->Hide();

   if (fState == kButtonDisabled) return kTRUE;

   // We don't need to check the key number as GrabKey will only
   // allow fHotchar events if Alt button is pressed (kKeyMod1Mask)

   if ((event->fType == kGKeyPress) && (event->fState & kKeyMod1Mask)) {
      if (fState == kButtonEngaged) return kTRUE;
      SetState(kButtonDown);
   } else if ((event->fType == kKeyRelease) && (event->fState & kKeyMod1Mask)) {
      if (fState == kButtonEngaged /*&& !allowRelease*/) return kTRUE;
      click = (fState == kButtonDown);
      if (click && fStayDown) {
         SetState(kButtonEngaged);
      } else {
         SetState(kButtonUp);
      }
   }
   if (click) {
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                  (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                           (Long_t) fUserData);
   }
   EmitSignals(was);

   return kTRUE;
}

//______________________________________________________________________________
TGDimension TGTextButton::GetDefaultSize() const
{
   // returns default size

   UInt_t w = GetOptions() & kFixedWidth ? fWidth : fTWidth + fMLeft + fMRight + 8;
   UInt_t h = GetOptions() & kFixedHeight ? fHeight : fTHeight + fMTop + fMBottom + 7;
   return TGDimension(w, h);
}

//______________________________________________________________________________
FontStruct_t TGTextButton::GetDefaultFontStruct()
{
   // Return default font structure.

   if (!fgDefaultFont)
      fgDefaultFont = gClient->GetResourcePool()->GetDefaultFont();
   return fgDefaultFont->GetFontStruct();
}

//______________________________________________________________________________
void TGTextButton::SetFont(FontStruct_t font, Bool_t global)
{
   // Changes text font.
   // If global is kTRUE font is changed globally, otherwise - locally.

   if (font != fFontStruct) {
      FontH_t v = gVirtualX->GetFontHandle(font);
      if (!v) return;

      fFontStruct = font;
      TGGCPool *pool =  fClient->GetResourcePool()->GetGCPool();
      TGGC *gc = pool->FindGC(fNormGC);

      if (gc && !global) {
         gc = pool->GetGC((GCValues_t*)gc->GetAttributes(), kTRUE); // copy
         fHasOwnFont = kTRUE;
      }
      if (gc) {
         gc->SetFont(v);
         fNormGC = gc->GetGC();
      }
      Layout();
   }
}

//______________________________________________________________________________
void TGTextButton::SetFont(const char *fontName, Bool_t global)
{
   // Changes text font specified by name.
   // If global is true color is changed globally, otherwise - locally.

   TGFont *font = fClient->GetFont(fontName);
   if (font) {
      SetFont(font->GetFontStruct(), global);
   }
}

//______________________________________________________________________________
void TGTextButton::SetTextColor(Pixel_t color, Bool_t global)
{
   // Changes text color.
   // If global is true color is changed globally, otherwise - locally.

   TGGCPool *pool =  fClient->GetResourcePool()->GetGCPool();
   TGGC *gc = pool->FindGC(fNormGC);

   if (gc && !global) {
      gc = pool->GetGC((GCValues_t*)gc->GetAttributes(), kTRUE); // copy
      fHasOwnFont = kTRUE;
   }
   if (gc) {
      gc->SetForeground(color);
      fNormGC = gc->GetGC();
   }
   fClient->NeedRedraw(this);
}

//______________________________________________________________________________
Bool_t TGTextButton::HasOwnFont() const
{
   // Returns kTRUE if text attributes are unique,
   // returns kFALSE if text attributes are shared (global).

   return fHasOwnFont;
}

//______________________________________________________________________________
TGPictureButton::TGPictureButton(const TGWindow *p, const TGPicture *pic,
      Int_t id, GContext_t norm, UInt_t option) : TGButton(p, id, norm, option)
{
   // Create a picture button widget. The picture is not adopted and must
   // later be freed by the user once the picture button is deleted (a single
   // picture reference might be used by other buttons).

   if (!pic) {
      Error("TGPictureButton", "pixmap not found for button %d", id);
      fPic = fClient->GetPicture("mb_question_s.xpm");
   } else {
      fPic = pic;
   }

   if (fPic) {
      fTWidth  = fPic->GetWidth();
      fTHeight = fPic->GetHeight();

      Resize(fTWidth  + (fBorderWidth << 1) + fBorderWidth + 1,
             fTHeight + (fBorderWidth << 1) + fBorderWidth); // *3
   }
   fPicD = 0;
   fOwnDisabledPic = kFALSE;
   SetWindowName();
}

//______________________________________________________________________________
TGPictureButton::TGPictureButton(const TGWindow *p, const TGPicture *pic,
      const char *cmd, Int_t id, GContext_t norm, UInt_t option)
   : TGButton(p, id, norm, option)
{
   // Create a picture button widget and set action command. The picture is
   // not adopted and must later be freed by the user once the picture button
   // is deleted (a single picture reference might be used by other
   // buttons).

   if (!pic) {
      Error("TGPictureButton", "pixmap not found for button\n%s",
            cmd ? cmd : "");
      fPic = fClient->GetPicture("mb_question_s.xpm");
   } else {
      fPic = pic;
   }

   fCommand = cmd;

   if (fPic) {
      fTWidth  = fPic->GetWidth();
      fTHeight = fPic->GetHeight();

      Resize(fTWidth  + (fBorderWidth << 1) + fBorderWidth + 1,
             fTHeight + (fBorderWidth << 1) + fBorderWidth); // *3
   }
   fPicD = 0;
   fOwnDisabledPic = kFALSE;
   SetWindowName();
}

//______________________________________________________________________________
TGPictureButton::TGPictureButton(const TGWindow *p, const char *pic,
   Int_t id, GContext_t norm, UInt_t option) : TGButton(p, id, norm, option)
{
   // Create a picture button. Where pic is the file name of the picture.

   if (!pic || !pic[0]) {
      if (p) Error("TGPictureButton", "pixmap not found for button");
      fPic = fClient->GetPicture("mb_question_s.xpm");
   } else {
      fPic = fClient->GetPicture(pic);
   }

   if (fPic) {
      fTWidth  = fPic->GetWidth();
      fTHeight = fPic->GetHeight();

      Resize(fTWidth  + (fBorderWidth << 1) + fBorderWidth + 1,
             fTHeight + (fBorderWidth << 1) + fBorderWidth); // *3
   }
   fPicD = 0;
   fOwnDisabledPic = kFALSE;
   SetWindowName();
}

//______________________________________________________________________________
TGPictureButton::~TGPictureButton()
{
   // Destructor.

   if (fOwnDisabledPic) fClient->FreePicture(fPicD);
}

//______________________________________________________________________________
void TGPictureButton::SetPicture(const TGPicture *new_pic)
{
   // Change a picture in a picture button. The picture is not adopted and
   // must later be freed by the user once the picture button is deleted
   // (a single picture reference might be used by other buttons).

   if (!new_pic) {
      Error("SetPicture", "pixmap not found for button %d\n%s",
            fWidgetId, fCommand.Data());
      return;
   }

   fPic = new_pic;

   if (fState == kButtonDisabled) {
      fClient->FreePicture(fPicD);
      fPicD = 0;
   }

   fTWidth  = fPic->GetWidth();
   fTHeight = fPic->GetHeight();

   fClient->NeedRedraw(this);
}

//______________________________________________________________________________
void TGPictureButton::DoRedraw()
{
   // Redraw picture button.

   if (!fPic) {
      TGFrame::DoRedraw();
      return;
   }

   int x = (fWidth - fTWidth) >> 1;
   int y = (fHeight - fTHeight) >> 1;
   UInt_t w = GetWidth() - 1;
   UInt_t h = GetHeight()- 1;

   if ((fStyle > 0) && !(fOptions & kOwnBackground))
      gVirtualX->SetWindowBackground(fId, fBgndColor);
   TGFrame::DoRedraw();

   if (fState == kButtonDown || fState == kButtonEngaged) {
      ++x; ++y;
      w--; h--;
   }
   if (fStyle == 0) {
      if (fState == kButtonEngaged) {
         gVirtualX->FillRectangle(fId, GetHibckgndGC()(), 2, 2, fWidth-4, fHeight-4);
         gVirtualX->DrawLine(fId, GetHilightGC()(), 2, 2, fWidth-3, 2);
      }
   }

   const TGPicture *pic = fPic;
   if (fState == kButtonDisabled) {
      if (!fPicD) CreateDisabledPicture();
      pic = fPicD ? fPicD : fPic;
   }
   if (fStyle > 0) {
      if (fBgndColor == fHighColor) {
         gVirtualX->DrawRectangle(fId, TGFrame::GetShadowGC()(), 0, 0, w, h);
      }
   }

   pic->Draw(fId, fNormGC, x, y);
}

//______________________________________________________________________________
void TGPictureButton::CreateDisabledPicture()
{
   // Creates disabled picture.

   TImage *img = TImage::Create();
   if (!img) return;
   TImage *img2 = TImage::Create();
   if (!img2) {
      if (img) delete img;
      return;
   }
   TString back = gEnv->GetValue("Gui.BackgroundColor", "#c0c0c0");
   img2->FillRectangle(back.Data(), 0, 0, fPic->GetWidth(), fPic->GetHeight());
   img->SetImage(fPic->GetPicture(), fPic->GetMask());
   Pixmap_t mask = img->GetMask();
   img2->Merge(img, "overlay");

   TString name = "disbl_";
   name += fPic->GetName();
   fPicD = fClient->GetPicturePool()->GetPicture(name.Data(), img2->GetPixmap(),
                                                 mask);
   fOwnDisabledPic = kTRUE;
   delete img;
   delete img2;
}

//______________________________________________________________________________
void TGPictureButton::SetDisabledPicture(const TGPicture *pic)
{
   // Changes disabled picture.

   if (!pic) return;

   if (fOwnDisabledPic && fPicD) fClient->FreePicture(fPicD);
   fPicD = pic;
   ((TGPicture*)pic)->AddReference();
   fOwnDisabledPic = kFALSE;
}

//______________________________________________________________________________
TGCheckButton::TGCheckButton(const TGWindow *p, TGHotString *s, Int_t id,
                             GContext_t norm, FontStruct_t font, UInt_t option)
   : TGTextButton(p, s, id, norm, font, option)
{
   // Create a check button widget. The hotstring will be adopted and deleted
   // by the check button.

   Init();
}

//______________________________________________________________________________
TGCheckButton::TGCheckButton(const TGWindow *p, const char *s, Int_t id,
                             GContext_t norm, FontStruct_t font, UInt_t option)
   : TGTextButton(p, s, id, norm, font, option)
{
   // Create a check button widget.

   Init();
}

//______________________________________________________________________________
TGCheckButton::TGCheckButton(const TGWindow *p, const char *s, const char *cmd,
                             Int_t id, GContext_t norm, FontStruct_t font,
                             UInt_t option) : TGTextButton(p, s, cmd, id, norm, font, option)
{
   // Create a check button widget.

   Init();
}

//______________________________________________________________________________
void TGCheckButton::Init()
{
   // Common check button initialization.

   fPrevState =
   fState     = kButtonUp;
   fHKeycode = 0;

   fOn  = fClient->GetPicture("checked_t.xpm");
   fOff = fClient->GetPicture("unchecked_t.xpm");
   fDisOn  = fClient->GetPicture("checked_dis_t.xpm");
   fDisOff = fClient->GetPicture("unchecked_dis_t.xpm");

   Resize();

   if (!fOn) {
      Error("TGCheckButton", "checked_t.xpm not found");
   } else if (!fOff) {     
      Error("TGCheckButton", "unchecked_t.xpm not found");
   } else if (!fDisOn) {     
      Error("TGCheckButton", "checked_dis_t.xpm not found");
   } else if (!fDisOff) {     
      Error("TGCheckButton", "unchecked_dis_t.xpm not found");
   }
   int hotchar;

   if ((hotchar = fLabel->GetHotChar()) != 0) {
      if ((fHKeycode = gVirtualX->KeysymToKeycode(hotchar)) != 0) {
         const TGMainFrame *main = (TGMainFrame *) GetMainFrame();
         if (main) {
            main->BindKey(this, fHKeycode, kKeyMod1Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyLockMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyLockMask);

            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask | kKeyLockMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask | kKeyLockMask);
         }
      }
   }
   SetWindowName();
}

//______________________________________________________________________________
TGCheckButton::~TGCheckButton()
{
   // Delete a check button.
   
   if (fOn)  fClient->FreePicture(fOn);
   if (fOff) fClient->FreePicture(fOff);
   if (fDisOn)  fClient->FreePicture(fDisOn);
   if (fDisOff) fClient->FreePicture(fDisOff);
}

//______________________________________________________________________________
TGDimension TGCheckButton::GetDefaultSize() const
{
   // default size

   UInt_t w = !fTWidth ? fOff->GetWidth() : fTWidth + fOff->GetWidth() + 9;
   UInt_t h = !fTHeight ? fOff->GetHeight() : fTHeight + 2;                      

   w = GetOptions() & kFixedWidth ? fWidth : w;
   h = GetOptions() & kFixedHeight ? fHeight : h;

   return TGDimension(w, h);           
}

//______________________________________________________________________________
void TGCheckButton::SetState(EButtonState state, Bool_t emit)
{
   // Set check button state.

   if (state == kButtonDisabled)
      fWidgetFlags &= ~kWidgetIsEnabled;
   else 
      fWidgetFlags |= kWidgetIsEnabled;
   PSetState(state, emit);
}

//______________________________________________________________________________
void TGCheckButton::EmitSignals(Bool_t /*wasUp*/)
{
   // Emit signals.

   if (fState == kButtonUp)   Released();            // emit Released
   if (fState == kButtonDown) Pressed();             // emit Pressed
   Clicked();                                        // emit Clicked
   Toggled(fStateOn);                                // emit Toggled
}

//______________________________________________________________________________
void TGCheckButton::PSetState(EButtonState state, Bool_t emit)
{
   // Set check button state.

   if (state != fState) {
      if (state == kButtonUp) {
         if (fPrevState == kButtonDisabled) {
            if (fStateOn) {
               fState = kButtonDown;
               fPrevState = kButtonDown;
            } else {
               fState = state;
               fPrevState = state;
            }
         } else if (fPrevState == kButtonDown) {
            fStateOn = kFALSE;
            fState = state;
            fPrevState = state;
         }
      } else if (state == kButtonDown) {
         fStateOn = kTRUE;
         fState = state;
         fPrevState = state;
      } else {
         fState = state;
         fPrevState = state;
      }
      if (emit) {
         // button signals
         EmitSignals();
      }
      DoRedraw();
   }
}

//______________________________________________________________________________
void TGCheckButton::SetDisabledAndSelected(Bool_t enable) 
{
   // Set the state of a check button to disabled and either on or
   // off.

   if (!enable) {
      if (fState == kButtonDisabled && fStateOn) {
         PSetState(kButtonUp, kFALSE);         // enable button
         PSetState(kButtonUp, kFALSE);         // set button up
         PSetState(kButtonDisabled, kFALSE);   // disable button
      } else {
         PSetState(kButtonUp, kFALSE);
         PSetState(kButtonDisabled, kFALSE);
      }
   } else {
      PSetState(kButtonDown, kFALSE);          // set button down
      PSetState(kButtonDisabled, kFALSE);      // disable button
   }
}

//______________________________________________________________________________
Bool_t TGCheckButton::HandleButton(Event_t *event)
{
   // Handle mouse button event.

   Bool_t click = kFALSE;

   if (fTip) fTip->Hide();

   if (fState == kButtonDisabled) return kTRUE;

   Bool_t in = (event->fX >= 0) && (event->fY >= 0) &&
               (event->fX <= (Int_t)fWidth) && (event->fY <= (Int_t)fHeight);

   // We don't need to check the button number as GrabButton will
   // only allow button1 events
   if (event->fType == kButtonPress) {
      fgReleaseBtn = 0;
      if (in) {
         fOptions |= kSunkenFrame;
         Pressed();
      }
   } else { // ButtonRelease
      if (in) {
         PSetState((fPrevState == kButtonUp) ? kButtonDown : kButtonUp, kFALSE);
         click = kTRUE;
         fPrevStateOn = fStateOn;
         Released();
      }
      fgReleaseBtn = fId;
      fOptions &= ~kSunkenFrame;
   }
   if (click) {
      Clicked();
      Toggled(fStateOn);
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_CHECKBUTTON),
                  fWidgetId, (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_CHECKBUTTON),
                           fWidgetId, (Long_t) fUserData);
   }
   DoRedraw();
   return kTRUE;
}

//______________________________________________________________________________
Bool_t TGCheckButton::HandleCrossing(Event_t *event)
{
   // Handle mouse crossing event.

   if (fTip) {
      if (event->fType == kEnterNotify)
         fTip->Reset();
      else
         fTip->Hide();
   }

   if ((fgDbw != event->fWindow) || (fgReleaseBtn == event->fWindow)) return kTRUE;

   if (!(event->fState & (kButton1Mask | kButton2Mask | kButton3Mask)))
      return kTRUE;

   if (fState == kButtonDisabled) return kTRUE;

   if (event->fType == kEnterNotify) {
      fOptions |= kSunkenFrame;
   } else {
      fOptions &= ~kSunkenFrame;
   }
   DoRedraw();

   return kTRUE;
}

//______________________________________________________________________________
Bool_t TGCheckButton::HandleKey(Event_t *event)
{
   // Handle key event. This function will be called when the hotkey is hit.

   Bool_t click = kFALSE;

   if (event->fType == kGKeyPress)
      gVirtualX->SetKeyAutoRepeat(kFALSE);
   else
      gVirtualX->SetKeyAutoRepeat(kTRUE);

   if (fTip && event->fType == kGKeyPress) fTip->Hide();

   if (fState == kButtonDisabled) return kTRUE;

   // We don't need to check the key number as GrabKey will only
   // allow fHotchar events if Alt button is pressed (kKeyMod1Mask)

   if ((event->fType == kGKeyPress) && (event->fState & kKeyMod1Mask)) {
      PSetState((fPrevState == kButtonUp) ? kButtonDown : kButtonUp, kTRUE);
   } else if ((event->fType == kKeyRelease) && (event->fState & kKeyMod1Mask)) {
      click = (fState != fPrevState);
      fPrevState = fState;
   }
   if (click) {
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_CHECKBUTTON), fWidgetId,
                  (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_CHECKBUTTON), fWidgetId,
                           (Long_t) fUserData);
   }
   return kTRUE;
}

//______________________________________________________________________________
void TGCheckButton::DoRedraw()
{
   // Draw the check button widget.

   int x, y, y0;

   TGFrame::DoRedraw();

   x = 20;
   y = (fHeight - fTHeight) >> 1;

   y0 = !fTHeight ? 0 : y + 1;
   if (fOn && fOff) {
      Int_t smax = TMath::Max(fOn->GetHeight(), fOff->GetHeight());
      y0 = ((Int_t)fHeight <= smax) ? 0 : 1 + (((Int_t)fHeight - smax) >> 1);
   }

   if (fStateOn) {
      if (fOn) fOn->Draw(fId, fNormGC, 0, y0);
   } else {
      if (fOff) fOff->Draw(fId, fNormGC, 0, y0);
   }

   Int_t hotpos = fLabel->GetHotPos();

   if (fState == kButtonDisabled) {
      if (fStateOn == kTRUE) {
         if (fDisOn) fDisOn->Draw(fId, fNormGC, 0, y0);
      } else {
         if (fDisOff) fDisOff->Draw(fId, fNormGC, 0, y0);
      }

      TGGCPool *pool =  fClient->GetResourcePool()->GetGCPool();
      TGGC *gc = pool->FindGC(fNormGC);
      if (gc) {
         Pixel_t fore = gc->GetForeground();
         Pixel_t hi = GetHilightGC().GetForeground();
         Pixel_t sh = GetShadowGC().GetForeground();

         gc->SetForeground(hi);
         fTLayout->DrawText(fId, gc->GetGC(), x + 1, y + 1, 0, -1);
         if (hotpos) fTLayout->UnderlineChar(fId, gc->GetGC(), x, y, hotpos - 1);

         gc->SetForeground(sh);
         fTLayout->DrawText(fId, gc->GetGC(), x, y, 0, -1);
         if (hotpos) fTLayout->UnderlineChar(fId, gc->GetGC(), x, y, hotpos - 1);

         gc->SetForeground(fore);
      }
   } else {
      fTLayout->DrawText(fId, fNormGC, x, y, 0, -1);
      if (hotpos) fTLayout->UnderlineChar(fId, fNormGC, x, y, hotpos - 1);
   }
}

//______________________________________________________________________________
FontStruct_t TGCheckButton::GetDefaultFontStruct()
{
   // Return default font structure.

   if (!fgDefaultFont)
      fgDefaultFont = gClient->GetResourcePool()->GetDefaultFont();
   return fgDefaultFont->GetFontStruct();
}

//______________________________________________________________________________
const TGGC &TGCheckButton::GetDefaultGC()
{
   // Return default graphics context.

   if (!fgDefaultGC)
      fgDefaultGC = gClient->GetResourcePool()->GetFrameGC();
   return *fgDefaultGC;
}


//______________________________________________________________________________
TGRadioButton::TGRadioButton(const TGWindow *p, TGHotString *s, Int_t id,
                             GContext_t norm, FontStruct_t font, UInt_t option)
   : TGTextButton(p, s, id, norm, font, option)
{
   // Create a radio button widget. The hotstring will be adopted and deleted
   // by the radio button.

   Init();
}

//______________________________________________________________________________
TGRadioButton::TGRadioButton(const TGWindow *p, const char *s, Int_t id,
                             GContext_t norm, FontStruct_t font, UInt_t option)
   : TGTextButton(p, s, id, norm, font, option)
{
   // Create a radio button widget.

   Init();
}
//______________________________________________________________________________
TGRadioButton::TGRadioButton(const TGWindow *p, const char *s, const char *cmd,
                             Int_t id, GContext_t norm,
                             FontStruct_t font, UInt_t option)
    : TGTextButton(p, s, cmd, id, norm, font, option)
{
   // Create a radio button widget.

   Init();
}

//______________________________________________________________________________
void TGRadioButton::Init()
{
   // Common radio button initialization.

   fPrevState =
   fState     = kButtonUp;
   fHKeycode  = 0;

   fOn  = fClient->GetPicture("rbutton_on.xpm");
   fOff = fClient->GetPicture("rbutton_off.xpm");
   fDisOn  = fClient->GetPicture("rbutton_dis_on.xpm");
   fDisOff = fClient->GetPicture("rbutton_dis_off.xpm");

   if (!fOn || !fOff || !fDisOn || !fDisOff)
      Error("TGRadioButton", "rbutton_*.xpm not found");

   Resize();

   int hotchar;

   if ((hotchar = fLabel->GetHotChar()) != 0) {
      if ((fHKeycode = gVirtualX->KeysymToKeycode(hotchar)) != 0) {
         const TGMainFrame *main = (TGMainFrame *) GetMainFrame();
         if (main) {
            main->BindKey(this, fHKeycode, kKeyMod1Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyLockMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyLockMask);

            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask | kKeyLockMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask | kKeyLockMask);
         }
      }
   }

   if (fParent->IsA()->InheritsFrom(TGButtonGroup::Class())) {
      ((TGButtonGroup*)fParent)->SetRadioButtonExclusive(kTRUE);
   }
   SetWindowName();
}

//______________________________________________________________________________
TGRadioButton::~TGRadioButton()
{
   // Delete a radio button.

   if (fOn)  fClient->FreePicture(fOn);
   if (fOff) fClient->FreePicture(fOff);
   if (fDisOn)  fClient->FreePicture(fDisOn);
   if (fDisOff) fClient->FreePicture(fDisOff);
}

//______________________________________________________________________________
TGDimension TGRadioButton::GetDefaultSize() const
{
   // default size

   UInt_t w = !fTWidth ? fOff->GetWidth() : fTWidth + fOff->GetWidth() + 10;
   UInt_t h = !fTHeight ? fOff->GetHeight() : fTHeight + 2;

   w = GetOptions() & kFixedWidth ? fWidth : w;
   h = GetOptions() & kFixedHeight ? fHeight : h;
                      
   return TGDimension(w, h);           
}
//______________________________________________________________________________
void TGRadioButton::SetState(EButtonState state, Bool_t emit)
{
   // Set radio button state.

   if (state == kButtonDisabled)
      fWidgetFlags &= ~kWidgetIsEnabled;
   else 
      fWidgetFlags |= kWidgetIsEnabled;
   PSetState(state, emit);
}

//______________________________________________________________________________
void TGRadioButton::SetDisabledAndSelected(Bool_t enable) 
{
   // Set the state of a radio button to disabled and either on or
   // off.

   if (!enable) {
      if (fState == kButtonDisabled && fStateOn) {
         PSetState(kButtonUp, kFALSE);         // enable button
         PSetState(kButtonUp, kFALSE);         // set button up
         PSetState(kButtonDisabled, kFALSE);   // disable button
      } else {
         PSetState(kButtonUp, kFALSE);
         PSetState(kButtonDisabled, kFALSE);
      }
   } else {
      PSetState(kButtonDown, kFALSE);          // set button down
      PSetState(kButtonDisabled, kFALSE);      // disable button
   }
}

//______________________________________________________________________________
void TGRadioButton::EmitSignals(Bool_t /*wasUp*/)
{
   // Emit signals.

   if (fState == kButtonUp) Released();              // emit Released
   if (fState == kButtonDown) Pressed();             // emit Pressed
   Clicked();                                        // emit Clicked
   Toggled(fStateOn);                                // emit Toggled
}

//______________________________________________________________________________
void TGRadioButton::PSetState(EButtonState state, Bool_t emit)
{
   // Set radio button state.

   if (state != fState) {
      //      fPrevState = fState = state;
      if (state == kButtonUp) {
         if (fPrevState == kButtonDisabled) {
            if (fStateOn) {
               fState = kButtonDown;
               fPrevState = kButtonDown;
            } else {
               fState = state;
               fPrevState = state;
            }
         } else if (fPrevState == kButtonDown) {
            fStateOn = kFALSE;
            fState = state;
            fPrevState = state;
         }
      } else if (state == kButtonDown) {
         fStateOn = kTRUE;
         fState = state;
         fPrevState = state;
      } else {
         fState = state;
         fPrevState = state;
      }
      if (emit) {
         // button signals
         EmitSignals();
      }
      DoRedraw();
   }
}

//______________________________________________________________________________
Bool_t TGRadioButton::HandleButton(Event_t *event)
{
   // Handle mouse button event.

   Bool_t click = kFALSE;
   Bool_t toggled = kFALSE;

   if (fTip) fTip->Hide();

   if (fState == kButtonDisabled) return kFALSE;


   Bool_t in = (event->fX >= 0) && (event->fY >= 0) &&
               (event->fX <= (Int_t)fWidth) && (event->fY <= (Int_t)fHeight);

   if (event->fType == kButtonPress) { // button pressed
      fgReleaseBtn = 0;
      if (in) {
         fOptions |= kSunkenFrame;
         Pressed();
      }
   } else { // ButtonRelease
      if (in) {
         if (!fStateOn) {
            PSetState(kButtonDown, kFALSE);
            toggled = kTRUE;
         }
         fPrevStateOn = fStateOn;
         Released();
         click = kTRUE;
      }
      fOptions &= ~kSunkenFrame;
      fgReleaseBtn = fId;
   }
   if (click) {
      Clicked();
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_RADIOBUTTON),
                  fWidgetId, (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_RADIOBUTTON),
                           fWidgetId, (Long_t) fUserData);
   }
   if (toggled) {
      Toggled(fStateOn);
   }
   DoRedraw();
   return kTRUE;
}

//______________________________________________________________________________
Bool_t TGRadioButton::HandleCrossing(Event_t *event)
{
   // Handle mouse crossing event.

   if (fTip) {
      if (event->fType == kEnterNotify)
         fTip->Reset();
      else
         fTip->Hide();
   }

   if ((fgDbw != event->fWindow) || (fgReleaseBtn == event->fWindow)) return kTRUE;

   if (!(event->fState & (kButton1Mask | kButton2Mask | kButton3Mask)))
      return kTRUE;

   if (fState == kButtonDisabled) return kTRUE;

   if (event->fType == kEnterNotify) {
      fOptions |= kSunkenFrame;
   } else {
      fOptions &= ~kSunkenFrame;
   }
   DoRedraw();

   return kTRUE;
}

//______________________________________________________________________________
Bool_t TGRadioButton::HandleKey(Event_t *event)
{
   // Handle key event. This function will be called when the hotkey is hit.

   if (event->fType == kGKeyPress)
      gVirtualX->SetKeyAutoRepeat(kFALSE);
   else
      gVirtualX->SetKeyAutoRepeat(kTRUE);

   if (fTip && event->fType == kGKeyPress)
      fTip->Hide();

   if (fState == kButtonDisabled) return kTRUE;

   // We don't need to check the key number as GrabKey will only
   // allow fHotchar events if Alt button is pressed (kKeyMod1Mask)

   if ((event->fType == kGKeyPress) && (event->fState & kKeyMod1Mask)) {
      PSetState(kButtonDown, kTRUE);
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_RADIOBUTTON),
                  fWidgetId, (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_RADIOBUTTON),
                           fWidgetId, (Long_t) fUserData);
   } else if ((event->fType == kKeyRelease) && (event->fState & kKeyMod1Mask)) {
      fPrevState = fState;
   }
   return kTRUE;
}

//______________________________________________________________________________
void TGRadioButton::DoRedraw()
{
   // Draw a radio button.

   Int_t tx, ty, y0;

   TGFrame::DoRedraw();

   tx = 20;
   ty = (fHeight - fTHeight) >> 1;

//   pw = 12;
   y0 = !fTHeight ? 0 : ty + 1;
   if (fOn && fOff) {
      Int_t smax = TMath::Max(fOn->GetHeight(), fOff->GetHeight());
      y0 = ((Int_t)fHeight <= smax) ? 0 : 1 + (((Int_t)fHeight - smax) >> 1);
   }

   if (fStateOn) {
      if (fOn) fOn->Draw(fId, fNormGC, 0, y0);
   } else {
      if (fOff) fOff->Draw(fId, fNormGC, 0, y0);
   }

   Int_t hotpos = fLabel->GetHotPos();

   if (fState == kButtonDisabled) {
      if (fStateOn == kTRUE) {
         if (fDisOn) fDisOn->Draw(fId, fNormGC, 0, y0);
      } else {
         if (fDisOff) fDisOff->Draw(fId, fNormGC, 0, y0);
      }

      TGGCPool *pool =  fClient->GetResourcePool()->GetGCPool();
      TGGC *gc = pool->FindGC(fNormGC);
      if (gc) {
         Pixel_t fore = gc->GetForeground();
         Pixel_t hi = GetHilightGC().GetForeground();
         Pixel_t sh = GetShadowGC().GetForeground();

         gc->SetForeground(hi);
         fTLayout->DrawText(fId, gc->GetGC(), tx + 1, ty + 1, 0, -1);
         if (hotpos) fTLayout->UnderlineChar(fId, gc->GetGC(), tx, ty, hotpos - 1);

         gc->SetForeground(sh);
         fTLayout->DrawText(fId, gc->GetGC(), tx, ty, 0, -1);
         if (hotpos) fTLayout->UnderlineChar(fId, gc->GetGC(), tx, ty, hotpos - 1);

         gc->SetForeground(fore);
      }
   } else {
      fTLayout->DrawText(fId, fNormGC, tx, ty, 0, -1);
      if (hotpos) fTLayout->UnderlineChar(fId, fNormGC, tx, ty, hotpos-1);
   }
}

//______________________________________________________________________________
FontStruct_t TGRadioButton::GetDefaultFontStruct()
{
   // Return default font structure.

   if (!fgDefaultFont)
      fgDefaultFont = gClient->GetResourcePool()->GetDefaultFont();
   return fgDefaultFont->GetFontStruct();
}

//______________________________________________________________________________
const TGGC &TGRadioButton::GetDefaultGC()
{
   // Return default graphics context.

   if (!fgDefaultGC)
      fgDefaultGC = gClient->GetResourcePool()->GetFrameGC();
   return *fgDefaultGC;
}

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

   char quote = '"';

   if (option && strstr(option, "keep_names"))
      out << "   " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
   
   if (fState == kButtonDown) {
      out << "   " << GetName() << "->SetState(kButtonDown);"  << std::endl;
   }
   if (fState == kButtonDisabled) {
      out << "   " << GetName() << "->SetState(kButtonDisabled);"  << std::endl;
   }
   if (fState == kButtonEngaged) {
      out << "   " << GetName() << "->SetState(kButtonEngaged);"  << std::endl;
   }
   if (fBackground != fgDefaultFrameBackground) {
      SaveUserColor(out, option);
      out << "   " << GetName() << "->ChangeBackground(ucolor);" << std::endl;
   }

   if (fTip) {
      TString tiptext = fTip->GetText()->GetString();
      tiptext.ReplaceAll("\n", "\\n");
      out << "   ";
      out << GetName() << "->SetToolTipText(" << quote
          << tiptext << quote << ");"  << std::endl;
   }
   if (strlen(fCommand)) {
      out << "   " << GetName() << "->SetCommand(" << quote << fCommand
          << quote << ");" << std::endl;
   }
}

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

   char quote = '"';
   TString outext(fLabel->GetString());
   if (fLabel->GetHotPos() > 0)
      outext.Insert(fLabel->GetHotPos()-1, "&");
   if (outext.First('\n') >= 0)
      outext.ReplaceAll("\n", "\\n");

   // font + GC
   option = GetName()+5;         // unique digit id of the name
   TString parGC, parFont;
   parFont.Form("%s::GetDefaultFontStruct()",IsA()->GetName());
   parGC.Form("%s::GetDefaultGC()()",IsA()->GetName());

   if ((GetDefaultFontStruct() != fFontStruct) || (GetDefaultGC()() != fNormGC)) {
      TGFont *ufont = gClient->GetResourcePool()->GetFontPool()->FindFont(fFontStruct);
      if (ufont) {
         ufont->SavePrimitive(out, option);
         parFont.Form("ufont->GetFontStruct()");
      }

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

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

   out << "   TGTextButton *";
   out << GetName() << " = new TGTextButton(" << fParent->GetName()
       << "," << quote << outext.Data() << quote;

   if (GetOptions() == (kRaisedFrame | kDoubleBorder)) {
      if (fFontStruct == GetDefaultFontStruct()) {
         if (fNormGC == GetDefaultGC()()) {
            if (fWidgetId == -1) {
               out << ");" << std::endl;
            } else {
               out << "," << fWidgetId <<");" << std::endl;
            }
         } else {
            out << "," << fWidgetId << "," << parGC << ");" << std::endl;
         }
      } else {
         out << "," << fWidgetId << "," << parGC << "," << parFont << ");" << std::endl;
      }
   } else {
      out << "," << fWidgetId << "," << parGC << "," << parFont << "," << GetOptionString() << ");" << std::endl;
   }

   out << "   " << GetName() << "->SetTextJustify(" << fTMode << ");" << std::endl;
   out << "   " << GetName() << "->SetMargins(" << fMLeft << "," << fMRight << ",";
   out << fMTop << "," << fMBottom << ");" << std::endl;
   out << "   " << GetName() << "->SetWrapLength(" << fWrapLength << ");" << std::endl;

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

   TGButton::SavePrimitive(out,option);
}

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

   if (!fPic) {
      Error("SavePrimitive()", "pixmap not found for picture button %d ", fWidgetId);
      return;
   }

   // GC
   option = GetName()+5;         // unique digit id of the name
   TString parGC;
   parGC.Form("%s::GetDefaultGC()()",IsA()->GetName());

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

   char quote = '"';
   const char *picname = fPic->GetName();

   out <<"   TGPictureButton *";

   out << GetName() << " = new TGPictureButton(" << fParent->GetName()
       << ",gClient->GetPicture(" << quote
       << gSystem->ExpandPathName(gSystem->UnixPathName(picname)) << quote << ")";

   if (GetOptions() == (kRaisedFrame | kDoubleBorder)) {
      if (fNormGC == GetDefaultGC()()) {
         if (fWidgetId == -1) {
            out << ");" << std::endl;
         } else {
            out << "," << fWidgetId << ");" << std::endl;
         }
      } else {
         out << "," << fWidgetId << "," << parGC.Data() << ");" << std::endl;
      }
   } else {
      out << "," << fWidgetId << "," << parGC.Data() << "," << GetOptionString()
          << ");" << std::endl;
   }

   TGButton::SavePrimitive(out,option);
}

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

   char quote = '"';

   TString outext(fLabel->GetString());
   if (fLabel->GetHotPos() > 0)
      outext.Insert(fLabel->GetHotPos()-1, "&");
   if (outext.First('\n') >= 0)
      outext.ReplaceAll("\n", "\\n");

   out <<"   TGCheckButton *";
   out << GetName() << " = new TGCheckButton(" << fParent->GetName()
       << "," << quote << outext.Data() << quote;

   // font + GC
   option = GetName()+5;         // unique digit id of the name
   TString parGC, parFont;
   parFont.Form("%s::GetDefaultFontStruct()",IsA()->GetName());
   parGC.Form("%s::GetDefaultGC()()",IsA()->GetName());

   if ((GetDefaultFontStruct() != fFontStruct) || (GetDefaultGC()() != fNormGC)) {
      TGFont *ufont = gClient->GetResourcePool()->GetFontPool()->FindFont(fFontStruct);
      if (ufont) {
         ufont->SavePrimitive(out, option);
         parFont.Form("ufont->GetFontStruct()");
      }

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

   if (GetOptions() == kChildFrame) {
      if (fFontStruct == GetDefaultFontStruct()) {
         if (fNormGC == GetDefaultGC()()) {
            if (fWidgetId == -1) {
               out << ");" << std::endl;
            } else {
               out << "," << fWidgetId << ");" << std::endl;
            }
         } else {
            out << "," << fWidgetId << "," << parGC << ");" << std::endl;
         }
      } else {
         out << "," << fWidgetId << "," << parGC << "," << parFont << ");" << std::endl;
      }
   } else {
      out << "," << fWidgetId << "," << parGC << "," << parFont << "," << GetOptionString() << ");" << std::endl;
   }

   TGButton::SavePrimitive(out,option);
   if (fState == kButtonDisabled) {
      if (IsDisabledAndSelected())
         out << "   " << GetName() << "->SetDisabledAndSelected(kTRUE);" << std::endl;
      else
         out << "   " << GetName() << "->SetDisabledAndSelected(kFALSE);" << std::endl;
   }
   out << "   " << GetName() << "->SetTextJustify(" << fTMode << ");" << std::endl;
   out << "   " << GetName() << "->SetMargins(" << fMLeft << "," << fMRight << ",";
   out << fMTop << "," << fMBottom << ");" << std::endl;
   out << "   " << GetName() << "->SetWrapLength(" << fWrapLength << ");" << std::endl;
}

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

   char quote = '"';

   TString outext(fLabel->GetString());
   if (fLabel->GetHotPos() > 0)
      outext.Insert(fLabel->GetHotPos()-1, "&");
   if (outext.First('\n') >= 0)
      outext.ReplaceAll("\n", "\\n");
   
   out << "   TGRadioButton *";
   out << GetName() << " = new TGRadioButton(" << fParent->GetName()
       << "," << quote << outext.Data() << quote;

   // font + GC
   option = GetName()+5;         // unique digit id of the name
   TString parGC, parFont;
   parFont.Form("%s::GetDefaultFontStruct()",IsA()->GetName());
   parGC.Form("%s::GetDefaultGC()()",IsA()->GetName());

   if ((GetDefaultFontStruct() != fFontStruct) || (GetDefaultGC()() != fNormGC)) {
      TGFont *ufont = gClient->GetResourcePool()->GetFontPool()->FindFont(fFontStruct);
      if (ufont) {
         ufont->SavePrimitive(out, option);
         parFont.Form("ufont->GetFontStruct()");
      }

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

   if (GetOptions() == (kChildFrame)) {
      if (fFontStruct == GetDefaultFontStruct()) {
         if (fNormGC == GetDefaultGC()()) {
            if (fWidgetId == -1) {
               out <<");" << std::endl;
            } else {
               out << "," << fWidgetId << ");" << std::endl;
            }
         } else {
            out << "," << fWidgetId << "," << parGC << ");" << std::endl;
         }
      } else {
         out << "," << fWidgetId << "," << parGC << "," << parFont << ");" << std::endl;
      }
   } else {
      out << "," << fWidgetId << "," << parGC << "," << parFont << "," << GetOptionString() << ");" << std::endl;
   }

   TGButton::SavePrimitive(out,option);
   if (fState == kButtonDisabled) {
      if (IsDisabledAndSelected())
         out << "   " << GetName() << "->SetDisabledAndSelected(kTRUE);" << std::endl;
      else
         out << "   " << GetName() << "->SetDisabledAndSelected(kFALSE);" << std::endl;
   }
   out << "   " << GetName() << "->SetTextJustify(" << fTMode << ");" << std::endl;
   out << "   " << GetName() << "->SetMargins(" << fMLeft << "," << fMRight << ",";
   out << fMTop << "," << fMBottom << ");" << std::endl;
   out << "   " << GetName() << "->SetWrapLength(" << fWrapLength << ");" << std::endl;
}

//______________________________________________________________________________
TGSplitButton::TGSplitButton(const TGWindow *p, TGHotString* menulabel, 
                           TGPopupMenu *popmenu, Bool_t split, Int_t id, 
                           GContext_t norm, FontStruct_t fontstruct, UInt_t options)
                           : TGTextButton(p, menulabel, id, norm, fontstruct, options)
{
   // Create a menu button widget. The hotstring will be adopted and
   // deleted by the menu button. This constructior creates a
   // menubutton with a popup menu attached that appears when the
   // button for it is clicked. The popup menu is adopted.

   fFontStruct = fontstruct;
   fMBWidth = 16;
   fMenuLabel = new TGHotString(*menulabel);
   fPopMenu = popmenu;
   fPopMenu->fSplitButton = this;
   fSplit = split;
   fTMode = 0;
   fHKeycode = 0;
   fMBState = kButtonUp; fDefaultCursor = fClient->GetResourcePool()->GetGrabCursor();
   fKeyNavigate = kFALSE;
   fWidestLabel = "";
   fHeighestLabel = "";

   // Find and set the correct size for the menu and the button.
   TGMenuEntry *entry = 0;
   TGHotString lstring(*fMenuLabel);
   TGHotString hstring(*fMenuLabel);
   const TList *list = fPopMenu->GetListOfEntries();
   UInt_t lwidth = 0, lheight = 0;
   UInt_t twidth = 0, theight = 0;
   
   TGFont *font = fClient->GetFontPool()->FindFont(fFontStruct);
   if (!font) {
      font = fClient->GetFontPool()->GetFont(fgDefaultFont);
      if (font) fFontStruct = font->GetFontStruct();
   }

   if (font) font->ComputeTextLayout(lstring, lstring.GetLength(),
                                     fWrapLength, kTextLeft, 0,
                                     &lwidth, &lheight);

   TIter iter(list);
   entry = (TGMenuEntry *)iter.Next();
   while (entry != 0) {
      if (entry->GetType() == kMenuEntry) {
         const TGHotString string(*(entry->GetLabel()));
         if (font) font->ComputeTextLayout(string, string.GetLength(),
                                           fWrapLength, kTextLeft, 0,
                                           &twidth, &theight);
         if(twidth > lwidth) {
            lstring = string;
         }
         if(theight > lheight) {
            hstring = string;
         }
      }
      entry = (TGMenuEntry *)iter.Next();
   }
   fWidestLabel = lstring;
   fHeighestLabel =  hstring;

   if (font) {
      UInt_t dummy = 0;
      font->ComputeTextLayout(lstring, lstring.GetLength(),
                              fWrapLength, kTextLeft, 0,
                              &fTWidth, &dummy);
      font->ComputeTextLayout(hstring, hstring.GetLength(),
                              fWrapLength, kTextLeft, 0,
                              &dummy, &fTHeight);
   }
   fTBWidth = fTWidth + 8;
   fHeight = fTHeight + 7;      
   Resize(fTBWidth + fMBWidth, fHeight);

   ChangeOptions(GetOptions() | kFixedSize);

   // Save the id of the 1st item on the menu.
   TIter iter1(list);
   do {
      entry = (TGMenuEntry *)iter1.Next();
      if ((entry) && (entry->GetStatus() & kMenuEnableMask) &&
          !(entry->GetStatus() & kMenuHideMask) &&
          (entry->GetType() != kMenuSeparator) &&
          (entry->GetType() != kMenuLabel)) break;
      entry = (TGMenuEntry *)iter1.Next();
   } while (entry);
   if (entry) fEntryId = entry->GetEntryId();

   // An additional connection that is needed.
   fPopMenu->Connect("Activated(Int_t)", "TGSplitButton", this, "HandleMenu(Int_t)");
   SetSplit(fSplit);

   Init();
}


//______________________________________________________________________________
void TGSplitButton::Init()
{
   // Common initialization used by the different ctors.

   Int_t hotchar;

   fTMode       = kTextCenterX | kTextCenterY;
   fHKeycode    = 0;
   fHasOwnFont  = kFALSE;
   fPrevStateOn =
   fStateOn     = kFALSE;
   fMBState     = kButtonUp;

   SetSize(TGDimension(fWidth, fHeight));

   if ((hotchar = fLabel->GetHotChar()) != 0) {
      if ((fHKeycode = gVirtualX->KeysymToKeycode(hotchar)) != 0) {
         const TGMainFrame *main = (TGMainFrame *) GetMainFrame();
         if (main) {
            main->BindKey(this, fHKeycode, kKeyMod1Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyLockMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyLockMask);

            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask | kKeyLockMask);
            main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask | kKeyLockMask);
         }
      }
   }
   SetWindowAttributes_t wattr;
   wattr.fMask = kWAWinGravity | kWABitGravity;
   wattr.fBitGravity = 5; // center
   wattr.fWinGravity = 1;
   gVirtualX->ChangeWindowAttributes(fId, &wattr);

   // Make sure motion is detected too.
   AddInput(kPointerMotionMask | kEnterWindowMask | kLeaveWindowMask);

   SetWindowName();
}

//______________________________________________________________________________
TGSplitButton::~TGSplitButton()
{
   // Delete a split button widget.

   if (fPopMenu) delete fPopMenu;
   if (fMenuLabel) delete fMenuLabel;
}

//________________________________________________________________________________
void TGSplitButton::DrawTriangle(const GContext_t gc, Int_t x, Int_t y)
{
   // Draw triangle (arrow) on which user can click to open Popup.

   Point_t points[3];

   points[0].fX = x;
   points[0].fY = y;
   points[1].fX = x + 5;
   points[1].fY = y;
   points[2].fX = x + 2;
   points[2].fY = y + 3;

   gVirtualX->FillPolygon(fId, gc, points, 3);
}

//______________________________________________________________________________
void TGSplitButton::CalcSize() 
{
   // Calculate the size of the button.

   Int_t max_ascent, max_descent;
   fTWidth = gVirtualX->TextWidth(fFontStruct, fLabel->GetString(), fLabel->GetLength());
   gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
   fTHeight = max_ascent + max_descent;
   
   fTBWidth = fTWidth + 8;
   fHeight = fTHeight + 7;      
   fWidth = fTBWidth;
}

//______________________________________________________________________________
Bool_t TGSplitButton::HandleSButton(Event_t *event)
{                    
   // Handle mouse button event in case the button is split.

   if (fState == kButtonDisabled) return kFALSE;

   Bool_t activate = kFALSE;
   Bool_t bclick = kFALSE;
   static Bool_t mbpress = kFALSE;
   static Bool_t tbpress = kFALSE;
   static Bool_t outpress = kFALSE;

   Bool_t inTB = (event->fX >= 0) && (event->fY >= 0) &&
                 (event->fX <= (Int_t)fTBWidth) && (event->fY <= (Int_t)fHeight);

   Bool_t inMB = (event->fX >= (Int_t)(fWidth -fMBWidth)) && (event->fY >= 0) &&
      (event->fX <= (Int_t)fWidth) && (event->fY <= (Int_t)fHeight);
   
   // We don't need to check the button number as GrabButton will
   // only allow button1 events

   if (inTB) {
      if (event->fType == kButtonPress) {
         mbpress = kFALSE;
         tbpress = kTRUE;
         fgReleaseBtn = 0;
         if (fState == kButtonEngaged) {
            return kTRUE;
         }
         SetState(kButtonDown);
         Pressed();
      } else { // ButtonRelease
         if (fMBState == kButtonDown) {
            SetMBState(kButtonUp);
         }
         if (fState == kButtonEngaged && tbpress) {
            SetState(kButtonUp);
            Released();
            bclick = kTRUE;
         } else if (fState == kButtonDown && tbpress) {
            tbpress = kFALSE;
            if (fStayDown) {
               bclick = kTRUE;
               SetState(kButtonEngaged);
               fgReleaseBtn = 0;
            } else {
               bclick = kTRUE;
               SetState(kButtonUp);
               Released();
               fgReleaseBtn = fId;               
            } 
         }else {
            SetState(kButtonUp);
         }
      }
   } else if (inMB) {
      if (event->fType == kButtonPress) {
         fgReleaseBtn = 0;
         mbpress = kTRUE;
         tbpress = kFALSE;
         if (fMBState == kButtonEngaged) {
            return kTRUE;
         }
         SetMBState(kButtonDown);
         MBPressed();
         gVirtualX->GrabPointer(fId, kButtonPressMask | kButtonReleaseMask |
                                kPointerMotionMask, kNone, fDefaultCursor);
      } else { // ButtonRelease
         if (fState == kButtonDown) {
            SetState(kButtonUp);
         }                
         if (fMBState == kButtonEngaged && mbpress) {
            mbpress = kFALSE;
            SetMBState(kButtonUp);
            SetMenuState(kFALSE);
            MBReleased();
            MBClicked();
            gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);  // ungrab pointer
         } else if (fMBState == kButtonDown && mbpress) {
            MBClicked();
            SetMBState(kButtonEngaged);
            SetMenuState(kTRUE);            
            fgReleaseBtn = 0;
         } else {
            SetMBState(kButtonUp);
         }
      }
   } else {
      if (event->fType == kButtonPress) {
         fgReleaseBtn = 0;
         outpress = kTRUE;
      } else { // ButtonRelease
         if(outpress) {
            outpress = kFALSE;
            SetMBState(kButtonUp);
            SetMenuState(kFALSE);
            gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);  // ungrab pointer
            activate = kTRUE;
         }
      }      
   }
   if (bclick) {
      Clicked();
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                  (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                           (Long_t) fUserData);
   }
   if (activate) {
      TGMenuEntry *entry =  fPopMenu->GetCurrent();
      if (entry) {
         if ((entry->GetStatus() & kMenuEnableMask) &&
             !(entry->GetStatus() & kMenuHideMask) &&
             (entry->GetType() != kMenuSeparator) &&
             (entry->GetType() != kMenuLabel)) {
            Int_t id = entry->GetEntryId();
            fPopMenu->Activated(id);
         }
      }
   }
   //   if (mbclick) {
   //      MBClicked();
   //      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
   //             (Long_t) fUserData);
   //      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
   //                      (Long_t) fUserData);
   // }
   return kTRUE;
}

//______________________________________________________________________________
Bool_t TGSplitButton::HandleSCrossing(Event_t *event)
{
   // Handle mouse crossing event in case of split menu.

   if (fTip) {
      if (event->fType == kEnterNotify)
         fTip->Reset();
      else
         fTip->Hide();
   }

   if ((fgDbw != event->fWindow) || (fgReleaseBtn == event->fWindow)) return kTRUE;

   if (!(event->fState & (kButton1Mask | kButton2Mask | kButton3Mask)))
      return kTRUE;

   if (fState == kButtonEngaged || fState == kButtonDisabled) return kTRUE;

   Bool_t inTB = (event->fX <= (Int_t)fTBWidth);

   //   Bool_t inMB = (event->fX >= (Int_t)(fWidth -fMBWidth)) && (event->fY >= 0) &&
   //      (event->fX <= (Int_t)fWidth) && (event->fY <= (Int_t)fHeight);

   if (event->fType == kEnterNotify) {
      if (inTB) {
         SetState(kButtonDown, kFALSE);
      } else {
         if(fMBState == kButtonEngaged)  return kTRUE;
         SetMBState(kButtonDown);
      }
   } else {
      // kLeaveNotify
      if(fState == kButtonDown) {
         SetState(kButtonUp, kFALSE);
      }
      if (fMBState == kButtonEngaged) return kTRUE;
      SetMBState(kButtonUp);
   }
   return kTRUE;
}

//______________________________________________________________________________
Bool_t TGSplitButton::HandleSKey(Event_t *event)
{
   // Handle key event. This function will be called when the hotkey is hit.

   if (fState == kButtonDisabled) return kFALSE;

   Bool_t click = kFALSE;

   if (event->fType == kGKeyPress) {
      gVirtualX->SetKeyAutoRepeat(kFALSE);
   } else {
      gVirtualX->SetKeyAutoRepeat(kTRUE);
   }

   if (fTip && event->fType == kGKeyPress) fTip->Hide();

   // We don't need to check the key number as GrabKey will only
   // allow fHotchar events if Alt button is pressed (kKeyMod1Mask)
   
   if ((event->fType == kGKeyPress) && (event->fState & kKeyMod1Mask)) {
      if (fState == kButtonEngaged) return kTRUE;
      SetState(kButtonDown);
      Pressed();
   } else if ((event->fType == kKeyRelease) && (event->fState & kKeyMod1Mask)) {
      if (fState == kButtonEngaged) {
         SetState(kButtonUp);
         Released();
      }
      if (fStayDown) {
         SetState(kButtonEngaged);
      } else {
         SetState(kButtonUp);         
         Released();
      }
      click = kTRUE;
   }
   if (click) {
      Clicked();
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                  (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                           (Long_t) fUserData);
   }

   return kTRUE;
}

//______________________________________________________________________________
void TGSplitButton::SetMenuState(Bool_t state) 
{
   // Popup the attached menu. 

   if (state) {
      Int_t    ax, ay;
      Window_t wdummy;

      if (fSplit) {
         Int_t n_entries = 0;
         TGMenuEntry *entry = 0;
         TIter next(fPopMenu->GetListOfEntries());
         
         while ((entry = (TGMenuEntry *) next())) {
            if ((entry->GetType() != kMenuSeparator) &&
                (entry->GetType() != kMenuLabel)) {
               n_entries++;
            }
         }
         if (n_entries <= 1) {
            Info("TGSplitButton", "Only one entry in the menu.");
            return;
         }
      }

      gVirtualX->TranslateCoordinates(fId, fPopMenu->GetParent()->GetId(),
                                      0, 0, ax, ay, wdummy);

      // place the menu just under the window:
      fPopMenu->PlaceMenu(ax-1, ay+fHeight, kTRUE, kFALSE); //kTRUE);
      BindKeys(kTRUE);
      BindMenuKeys(kTRUE);
   } else {
      fPopMenu->EndMenu(fUserData);
      BindKeys(kFALSE);
      BindMenuKeys(kFALSE);
      fPopMenu->EndMenu(fUserData);
   }
}

//______________________________________________________________________________
void TGSplitButton::DoRedraw()
{
   // Draw the text button.

   int x, y;
   TGFrame::DoRedraw();
   
   if (fState == kButtonDisabled) fMBState = kButtonDisabled;
   else if (fMBState == kButtonDisabled) fMBState = kButtonUp;

   if (fTMode & kTextLeft) {
      x = fMLeft + 4;
   } else if (fTMode & kTextRight) {
      x = fWidth - fTWidth -fMBWidth - fMRight - 4;
   } else {
      x = (fWidth - fTWidth -fMBWidth + fMLeft - fMRight) >> 1;
   }

   if (fTMode & kTextTop) {
      y = fMTop + 3;
   } else if (fTMode & kTextBottom) {
      y = fHeight - fTHeight - fMBottom - 3;
   } else {
      y = (fHeight - fTHeight + fMTop - fMBottom) >> 1;
   }

   if (fState == kButtonDown || fState == kButtonEngaged) { ++x; ++y; }
   if (fState == kButtonEngaged) {
      gVirtualX->FillRectangle(fId, GetHibckgndGC()(), 2, 2, fWidth-4, fHeight-4);
      gVirtualX->DrawLine(fId, GetHilightGC()(), 2, 2, fWidth-3, 2);
   }

   Int_t hotpos = fLabel->GetHotPos();

   if (fState == kButtonDisabled) {
      TGGCPool *pool =  fClient->GetResourcePool()->GetGCPool();
      TGGC *gc = pool->FindGC(fNormGC);
      if (gc) {
         Pixel_t fore = gc->GetForeground();
         Pixel_t hi = GetHilightGC().GetForeground();
         Pixel_t sh = GetShadowGC().GetForeground();

         gc->SetForeground(hi);
         fTLayout->DrawText(fId, gc->GetGC(), x + 1, y + 1, 0, -1);
         if (hotpos) fTLayout->UnderlineChar(fId, gc->GetGC(), x + 1, y + 1, hotpos - 1);

         gc->SetForeground(sh);
         fTLayout->DrawText(fId, gc->GetGC(), x, y, 0, -1);
         if (hotpos) fTLayout->UnderlineChar(fId, gc->GetGC(), x, y, hotpos - 1);
         gc->SetForeground(fore);
      }
   } else {
      fTLayout->DrawText(fId, fNormGC, x, y, 0, -1);
      if (hotpos) fTLayout->UnderlineChar(fId, fNormGC, x, y, hotpos - 1);
   }

   // Draw the parts of the button needed when a menu is attached.
   
   // triangle position
   x = fWidth - 11;
   y = fHeight - 10;
   
   if (fSplit) {
      // separator position
      Int_t lx = fWidth - fMBWidth;
      Int_t ly = 2;
      Int_t lh = fHeight - 2;
      
      if(fMBState == kButtonDown || fMBState == kButtonEngaged) {
         x++;
         y++;
      }

      gVirtualX->DrawLine(fId, GetShadowGC()(),  lx, ly + 2, lx, lh - 4);
      gVirtualX->DrawLine(fId, GetHilightGC()(), lx + 1, ly + 2, lx + 1, lh - 3);
      gVirtualX->DrawLine(fId, GetHilightGC()(), lx, lh - 3, lx + 1, lh - 3);

      if (fMBState == kButtonEngaged) {
         gVirtualX->FillRectangle(fId, GetHibckgndGC()(), fTBWidth + 1, 1, fMBWidth - 3, fHeight - 3);
      }

      if (fMBState == kButtonDisabled) {
         DrawTriangle(GetHilightGC()(), x + 1, y + 1);
         DrawTriangle(GetShadowGC()(), x, y);
      } else {
         DrawTriangle(fNormGC, x, y);
      }

   } else {
      x -= 2;
      if(fState == kButtonDown || fState == kButtonEngaged) {
         x++;
         y++;
      }
      if (fState == kButtonDisabled) {
         DrawTriangle(GetHilightGC()(), x + 1, y + 1);
         DrawTriangle(GetShadowGC()(), x, y);
      } else {
         DrawTriangle(fNormGC, x, y);
      }
   }
   
}

//______________________________________________________________________________
void TGSplitButton::BindKeys(Bool_t on)
{
   // If on kTRUE bind arrow, popup menu hot keys, otherwise
   // remove key bindings.

   gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(kKey_Up), kAnyModifier, on);
   gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(kKey_Down), kAnyModifier, on);
   gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(kKey_Enter), kAnyModifier, on);
   gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(kKey_Return), kAnyModifier, on);
   gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(kKey_Escape), kAnyModifier, on);
}

//______________________________________________________________________________
void TGSplitButton::BindMenuKeys(Bool_t on)
{
   // If on kTRUE bind Menu hot keys, otherwise remove key bindings.

   TGMenuEntry *e = 0;
   TIter next(fPopMenu->GetListOfEntries());
   
   while ((e = (TGMenuEntry*)next())) {
      Int_t hot = 0;
      if (e->GetLabel()) {
         hot = e->GetLabel()->GetHotChar();
      }
      if (!hot) continue;
      gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(hot), 0, on);
      gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(hot), kKeyShiftMask, on);
      gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(hot), kKeyLockMask, on);
      gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(hot), kKeyMod2Mask, on);
      gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(hot), kKeyShiftMask | kKeyLockMask, on);
      gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(hot), kKeyShiftMask | kKeyMod2Mask, on);
      gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(hot), kKeyLockMask  | kKeyMod2Mask, on);
      gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(hot), kKeyShiftMask | kKeyLockMask | kKeyMod2Mask, on);
   }
}

//______________________________________________________________________________
TGDimension TGSplitButton::GetDefaultSize() const
{
   // returns default size

   UInt_t w = GetOptions() & kFixedWidth ? fWidth + fMBWidth : fTWidth + fMLeft + fMRight + fMBWidth + 8;
   UInt_t h = GetOptions() & kFixedHeight ? fHeight : fTHeight + fMTop + fMBottom + 7;
   return TGDimension(w, h);
}

//______________________________________________________________________________
void TGSplitButton::SetText(TGHotString *new_label)
{
   // Set new button text.

   Int_t hotchar;
   static Bool_t longlabeltip = kFALSE;
   const TGMainFrame *main = (TGMainFrame *) GetMainFrame();   

   TGFont *font = fClient->GetFontPool()->FindFont(fFontStruct);
   if (!font) {
      font = fClient->GetFontPool()->GetFont(fgDefaultFont);
      if (font) fFontStruct = font->GetFontStruct();
   }

   UInt_t width = 0, bwidth = 0, dummy;
   if (font) {
      font->ComputeTextLayout(new_label->GetString(), new_label->GetLength(),
                              fWrapLength, kTextLeft, 0,
                              &width, &dummy);
      font->ComputeTextLayout(fWidestLabel.GetString(), fWidestLabel.GetLength(),
                              fWrapLength, kTextLeft, 0,
                              &bwidth, &dummy);
   }
   if (width > bwidth) {
      if (!fTip) {
         SetToolTipText(new_label->GetString());
         longlabeltip = kTRUE;
      }
      Info("TGSplitbutton", "Length of new label to long, label truncated.");
      new_label->Resize(fWidestLabel.GetLength());
   } else if (new_label->GetLength() <= fWidestLabel.GetLength() && longlabeltip) {
      if (fTip) delete fTip;
      fTip = 0;
      longlabeltip = kFALSE;
   }
         
   if (fLabel) {
      if (main && fHKeycode) {
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyLockMask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyLockMask);

         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask | kKeyLockMask);
         main->RemoveBind(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask | kKeyLockMask);
      }
      delete fLabel;
   }

   fLabel = new_label;
   if ((hotchar = fLabel->GetHotChar()) != 0) {
      if (main && ((fHKeycode = gVirtualX->KeysymToKeycode(hotchar)) != 0)) {
         main->BindKey(this, fHKeycode, kKeyMod1Mask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyLockMask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyLockMask);

         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyMod2Mask | kKeyLockMask);
         main->BindKey(this, fHKeycode, kKeyMod1Mask | kKeyShiftMask | kKeyMod2Mask | kKeyLockMask);
      }
   }

   Layout();
}

//______________________________________________________________________________
void TGSplitButton::SetText(const TString &new_label)
{
   // Set new button text.

   SetText(new TGHotString(new_label));
}

//______________________________________________________________________________
void TGSplitButton::SetFont(FontStruct_t font, Bool_t global)
{
   // Changes text font.
   // If global is kTRUE font is changed globally, otherwise - locally.

   if (font != fFontStruct) {
      FontH_t v = gVirtualX->GetFontHandle(font);
      if (!v) return;

      fFontStruct = font;
      TGGCPool *pool =  fClient->GetResourcePool()->GetGCPool();
      TGGC *gc = pool->FindGC(fNormGC);

      if ((gc) && !global) {
         gc = pool->GetGC((GCValues_t*)gc->GetAttributes(), kTRUE); // copy
         fHasOwnFont = kTRUE;
      }
      if (gc) {
         gc->SetFont(v);
         fNormGC = gc->GetGC();
      }
      fClient->NeedRedraw(this);
   }
}

//______________________________________________________________________________
void TGSplitButton::SetFont(const char *fontName, Bool_t global)
{
   // Changes text font specified by name.
   // If global is true color is changed globally, otherwise - locally.

   TGFont *font = fClient->GetFont(fontName);
   if (font) {
      SetFont(font->GetFontStruct(), global);
   }
}

//______________________________________________________________________________
void TGSplitButton::SetMBState(EButtonState state)
{
   // Set the state of the Menu Button part
   
   if (state != fMBState) {
      fMBState = state;
      DoRedraw();
   }
}

//______________________________________________________________________________
void TGSplitButton::SetSplit(Bool_t split)
{
   // Set the split status of a button.
   
   if(split) {
      fStayDown = kFALSE;
      Disconnect(fPopMenu, "PoppedDown()");
      fPopMenu->Connect("PoppedDown()", "TGSplitButton", this, "SetMBState(=kButtonUp)");
      fPopMenu->Connect("PoppedDown()", "TGSplitButton", this, "MBReleased()");

      TGMenuEntry *entry = fPopMenu->GetEntry(fEntryId);
      if (entry) {
         TGHotString *tmp = new TGHotString(*(entry->GetLabel()));
         SetText(tmp);

         TString str("ItemClicked(=");
         str += entry->GetEntryId();
         str += ")";
         Connect("Clicked()", "TGSplitButton", this, str);
         fEntryId = entry->GetEntryId();
         fPopMenu->HideEntry(fEntryId);
      }
   } else {
      fStayDown = kTRUE;
      Disconnect(fPopMenu, "PoppedDown()");
      Disconnect(this, "Clicked()", this);
      fPopMenu->Connect("PoppedDown()", "TGSplitButton", this, "SetState(=kButtonUp)");
      fPopMenu->Connect("PoppedDown()", "TGSplitButton", this, "Released()");
      fPopMenu->EnableEntry(fEntryId);
      TGHotString *tmp = new TGHotString(*fMenuLabel);
      SetText(tmp);
   }

   fSplit = split;
   DoRedraw();
}

//______________________________________________________________________________
Bool_t TGSplitButton::HandleButton(Event_t *event)
{                    
   // Handle button events.

   if (fState == kButtonDisabled) return kFALSE;

   if (fSplit) return HandleSButton(event);

   Bool_t in = (event->fX >= 0) && (event->fY >= 0) &&
               (event->fX <= (Int_t)fWidth) && (event->fY <= (Int_t)fHeight);

   Bool_t activate = kFALSE;
   Bool_t click = kFALSE;

   if (in) {
      if (event->fType == kButtonPress) {
         fgReleaseBtn = 0;
         if (fState == kButtonEngaged) {
            return kTRUE;
         }
         SetState(kButtonDown);
         Pressed();
         gVirtualX->GrabPointer(fId, kButtonPressMask | kButtonReleaseMask |
                                kPointerMotionMask, kNone, fDefaultCursor);
      } else { // ButtonRelease
         if (fState == kButtonEngaged) {
            SetState(kButtonUp);
            SetMenuState(kFALSE);
            Released();
            click = kTRUE;
            gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);  // ungrab pointer
         } else {
            click = (fState == kButtonDown);
            if (click && fStayDown) {
               SetState(kButtonEngaged);
               SetMenuState(kTRUE);
               fgReleaseBtn = 0;
            } else {
               SetState(kButtonUp);
               Released();
               fgReleaseBtn = fId;
            }
         }
         fKeyNavigate = kFALSE;
      }
   } else {
      if (event->fType == kButtonPress) {
         fgReleaseBtn = 0;
      } else { // ButtonRelease
         SetState(kButtonUp);
         SetMenuState(kFALSE);
         gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);  // ungrab pointer
         activate = kTRUE;
      }      
   }
   if (click) {
      Clicked();
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                  (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                           (Long_t) fUserData);
   }
   if (activate && !fKeyNavigate) {
      TGMenuEntry *entry =  fPopMenu->GetCurrent();
      if (entry) {
         if ((entry->GetStatus() & kMenuEnableMask) &&
             !(entry->GetStatus() & kMenuHideMask) &&
             (entry->GetType() != kMenuSeparator) &&
             (entry->GetType() != kMenuLabel)) {
            Int_t id = entry->GetEntryId();
            fPopMenu->Activated(id);
         }
      }
   }
     
   return kTRUE;

}

//______________________________________________________________________________
Bool_t TGSplitButton::HandleCrossing(Event_t *event)
{
   // Handle mouse crossing event.

   if (fSplit) { 
      return HandleSCrossing(event);
   } else {
      return TGButton::HandleCrossing(event);
   }
}
   
//______________________________________________________________________________
Bool_t TGSplitButton::HandleKey(Event_t *event)
{
   // Handle key event. This function will be called when the hotkey is hit.

   Bool_t click = kFALSE;

   if (fState == kButtonDisabled) return kTRUE;

   if(fSplit) return HandleSKey(event);

   if (event->fType == kGKeyPress) {
      gVirtualX->SetKeyAutoRepeat(kFALSE);
   } else {
      gVirtualX->SetKeyAutoRepeat(kTRUE);
   }

   if (fTip && event->fType == kGKeyPress) fTip->Hide();

   // We don't need to check the key number as GrabKey will only
   // allow fHotchar events if Alt button is pressed (kKeyMod1Mask)
   if (event->fState & kKeyMod1Mask) {
      RequestFocus();
      fKeyNavigate = kTRUE;
      if (event->fType == kGKeyPress) {
         if (fState == kButtonEngaged) return kTRUE;
         SetState(kButtonDown);
         Pressed();
      } else if (event->fType == kKeyRelease) {
         click = kTRUE;
         if (fState == kButtonEngaged) {
            SetState(kButtonUp);
            SetMenuState(kFALSE);
            gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);
         } else if (fState == kButtonDown && fStayDown) {
            SetState(kButtonEngaged);
            SetMenuState(kTRUE);
            gVirtualX->GrabPointer(fId, kButtonPressMask | kButtonReleaseMask |
                                   kPointerMotionMask, kNone, fDefaultCursor);
            TGMenuEntry *entry = 0;
            TIter next(fPopMenu->GetListOfEntries());

            while ((entry = (TGMenuEntry *) next())) {
               if ((entry->GetStatus() & kMenuEnableMask) &&
                   !(entry->GetStatus() & kMenuHideMask) &&
                   (entry->GetType() != kMenuSeparator) &&
                   (entry->GetType() != kMenuLabel)) break;
            }
            if (entry) {
               fPopMenu->Activate(entry);
            }
         } else {
            Released();
            SetState(kButtonUp);
         }
      }
   } else {
      fKeyNavigate = kTRUE;
      if (event->fType == kGKeyPress) {
         Event_t ev;
         ev.fX = ev.fY = 1;
         UInt_t keysym;
         char tmp[2];
         
         gVirtualX->LookupString(event, tmp, sizeof(tmp), keysym);

         TGMenuEntry *ce = 0;
         TIter next(fPopMenu->GetListOfEntries());
         
         while ((ce = (TGMenuEntry*)next())) {
            UInt_t hot = 0;
            if (ce->GetLabel()) hot = ce->GetLabel()->GetHotChar();
            if (!hot || (hot != keysym)) continue;
         
            fPopMenu->Activate(ce);
            gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);
            SetMenuState(kFALSE);
            ev.fType = kButtonRelease;
            ev.fWindow = fPopMenu->GetId();
            fKeyNavigate = kFALSE;
            return HandleButton(&ev);            
         }

         ce = fPopMenu->GetCurrent();
         
         switch ((EKeySym)keysym) {
         case kKey_Up:
            if (ce) ce = (TGMenuEntry*)fPopMenu->GetListOfEntries()->Before(ce);
            while (ce && ((ce->GetType() == kMenuSeparator) ||
                          (ce->GetType() == kMenuLabel) ||
                          !(ce->GetStatus() & kMenuEnableMask))) {
               ce = (TGMenuEntry*)fPopMenu->GetListOfEntries()->Before(ce);
            }
            if (!ce) ce = (TGMenuEntry*)fPopMenu->GetListOfEntries()->Last();
            break;
         case kKey_Down:
            if (ce) ce = (TGMenuEntry*)fPopMenu->GetListOfEntries()->After(ce);
            while (ce && ((ce->GetType() == kMenuSeparator) ||
                          (ce->GetType() == kMenuLabel) ||
                          !(ce->GetStatus() & kMenuEnableMask))) {
               ce = (TGMenuEntry*)fPopMenu->GetListOfEntries()->After(ce);
            }
            if (!ce) ce = (TGMenuEntry*)fPopMenu->GetListOfEntries()->First();
            break;
         case kKey_Enter:
         case kKey_Return:
            gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);
            SetMenuState(kFALSE);
            ev.fType = kButtonRelease;
            ev.fWindow = fPopMenu->GetId();
            fKeyNavigate = kFALSE;
            HandleButton(&ev);
            break;
         case kKey_Escape:
            gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE);
            SetMenuState(kFALSE);
            break;
         default:
            break;
         }
         if (ce) fPopMenu->Activate(ce);
      }
   }
   if (click) {
      Clicked();
      SendMessage(fMsgWindow, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                  (Long_t) fUserData);
      fClient->ProcessLine(fCommand, MK_MSG(kC_COMMAND, kCM_BUTTON), fWidgetId,
                           (Long_t) fUserData);
   }

   return kTRUE;
}

//______________________________________________________________________________
Bool_t TGSplitButton::HandleMotion(Event_t *event)
{
   // Handle a motion event in a TGSplitButton.

   if (fKeyNavigate) return kTRUE;

   if (fSplit) {
      if (fMBState == kButtonDown) {
         if (event->fX < (Int_t)fTBWidth) {
            SetMBState(kButtonUp);
            SetState(kButtonDown);
         }
      } else if (fState == kButtonDown) {
         if (event->fX > (Int_t)fTBWidth) {
            SetState(kButtonUp);
            SetMBState(kButtonDown);
         }
            
      }
   }
   return kTRUE;
}

//______________________________________________________________________________
void TGSplitButton::Layout()
{
   // layout text button

   UInt_t dummya = 0, dummyb = 0;
   delete fTLayout;

   TGFont *font = fClient->GetFontPool()->FindFont(fFontStruct);
   if (!font) {
      font = fClient->GetFontPool()->GetFont(fgDefaultFont);
      if (font) fFontStruct = font->GetFontStruct();
   }
   if (font) {
      fTLayout = font->ComputeTextLayout(fLabel->GetString(), 
                                         fLabel->GetLength(),
                                         fWrapLength, kTextLeft, 0,
                                         &dummya, &dummyb);
      UInt_t dummy = 0;
      font->ComputeTextLayout(fWidestLabel.GetString(), fWidestLabel.GetLength(),
                              fWrapLength, kTextLeft, 0,
                              &fTWidth, &dummy);
      font->ComputeTextLayout(fHeighestLabel.GetString(), fHeighestLabel.GetLength(),
                              fWrapLength, kTextLeft, 0,
                              &dummy, &fTHeight);
   }
   fTBWidth = fTWidth + 8;
   fWidth = fTBWidth + fMBWidth;
   fHeight = fTHeight + 7;
   fClient->NeedRedraw(this);
}

//______________________________________________________________________________
void TGSplitButton::HandleMenu(Int_t id) 
{
   // Handle a menu item activation.
   
   SetMenuState(kFALSE);

   if (fSplit) {
      SetMBState(kButtonUp);
      Disconnect(this, "Clicked()", this);
      // connect clicked to the ItemClicked signal with the correct id
      Connect("Clicked()", "TGSplitButton", this, 
              TString::Format("ItemClicked(=%d)", id));

      // reenable hidden entries
      const TList *list = fPopMenu->GetListOfEntries();
      TIter iter(list);
      fPopMenu->EnableEntry(fEntryId);
      TGMenuEntry *entry = fPopMenu->GetEntry(id);
      if (entry) {
         TGHotString *label = entry->GetLabel();
         TGHotString *tmp = new TGHotString(*label);
         SetText(tmp);
      }
      fPopMenu->HideEntry(id);
      if (entry) fEntryId = entry->GetEntryId();
   } else {
      SetState(kButtonUp);
      ItemClicked(id);
   }
   DoRedraw();
}
 TGButton.cxx:1
 TGButton.cxx:2
 TGButton.cxx:3
 TGButton.cxx:4
 TGButton.cxx:5
 TGButton.cxx:6
 TGButton.cxx:7
 TGButton.cxx:8
 TGButton.cxx:9
 TGButton.cxx:10
 TGButton.cxx:11
 TGButton.cxx:12
 TGButton.cxx:13
 TGButton.cxx:14
 TGButton.cxx:15
 TGButton.cxx:16
 TGButton.cxx:17
 TGButton.cxx:18
 TGButton.cxx:19
 TGButton.cxx:20
 TGButton.cxx:21
 TGButton.cxx:22
 TGButton.cxx:23
 TGButton.cxx:24
 TGButton.cxx:25
 TGButton.cxx:26
 TGButton.cxx:27
 TGButton.cxx:28
 TGButton.cxx:29
 TGButton.cxx:30
 TGButton.cxx:31
 TGButton.cxx:32
 TGButton.cxx:33
 TGButton.cxx:34
 TGButton.cxx:35
 TGButton.cxx:36
 TGButton.cxx:37
 TGButton.cxx:38
 TGButton.cxx:39
 TGButton.cxx:40
 TGButton.cxx:41
 TGButton.cxx:42
 TGButton.cxx:43
 TGButton.cxx:44
 TGButton.cxx:45
 TGButton.cxx:46
 TGButton.cxx:47
 TGButton.cxx:48
 TGButton.cxx:49
 TGButton.cxx:50
 TGButton.cxx:51
 TGButton.cxx:52
 TGButton.cxx:53
 TGButton.cxx:54
 TGButton.cxx:55
 TGButton.cxx:56
 TGButton.cxx:57
 TGButton.cxx:58
 TGButton.cxx:59
 TGButton.cxx:60
 TGButton.cxx:61
 TGButton.cxx:62
 TGButton.cxx:63
 TGButton.cxx:64
 TGButton.cxx:65
 TGButton.cxx:66
 TGButton.cxx:67
 TGButton.cxx:68
 TGButton.cxx:69
 TGButton.cxx:70
 TGButton.cxx:71
 TGButton.cxx:72
 TGButton.cxx:73
 TGButton.cxx:74
 TGButton.cxx:75
 TGButton.cxx:76
 TGButton.cxx:77
 TGButton.cxx:78
 TGButton.cxx:79
 TGButton.cxx:80
 TGButton.cxx:81
 TGButton.cxx:82
 TGButton.cxx:83
 TGButton.cxx:84
 TGButton.cxx:85
 TGButton.cxx:86
 TGButton.cxx:87
 TGButton.cxx:88
 TGButton.cxx:89
 TGButton.cxx:90
 TGButton.cxx:91
 TGButton.cxx:92
 TGButton.cxx:93
 TGButton.cxx:94
 TGButton.cxx:95
 TGButton.cxx:96
 TGButton.cxx:97
 TGButton.cxx:98
 TGButton.cxx:99
 TGButton.cxx:100
 TGButton.cxx:101
 TGButton.cxx:102
 TGButton.cxx:103
 TGButton.cxx:104
 TGButton.cxx:105
 TGButton.cxx:106
 TGButton.cxx:107
 TGButton.cxx:108
 TGButton.cxx:109
 TGButton.cxx:110
 TGButton.cxx:111
 TGButton.cxx:112
 TGButton.cxx:113
 TGButton.cxx:114
 TGButton.cxx:115
 TGButton.cxx:116
 TGButton.cxx:117
 TGButton.cxx:118
 TGButton.cxx:119
 TGButton.cxx:120
 TGButton.cxx:121
 TGButton.cxx:122
 TGButton.cxx:123
 TGButton.cxx:124
 TGButton.cxx:125
 TGButton.cxx:126
 TGButton.cxx:127
 TGButton.cxx:128
 TGButton.cxx:129
 TGButton.cxx:130
 TGButton.cxx:131
 TGButton.cxx:132
 TGButton.cxx:133
 TGButton.cxx:134
 TGButton.cxx:135
 TGButton.cxx:136
 TGButton.cxx:137
 TGButton.cxx:138
 TGButton.cxx:139
 TGButton.cxx:140
 TGButton.cxx:141
 TGButton.cxx:142
 TGButton.cxx:143
 TGButton.cxx:144
 TGButton.cxx:145
 TGButton.cxx:146
 TGButton.cxx:147
 TGButton.cxx:148
 TGButton.cxx:149
 TGButton.cxx:150
 TGButton.cxx:151
 TGButton.cxx:152
 TGButton.cxx:153
 TGButton.cxx:154
 TGButton.cxx:155
 TGButton.cxx:156
 TGButton.cxx:157
 TGButton.cxx:158
 TGButton.cxx:159
 TGButton.cxx:160
 TGButton.cxx:161
 TGButton.cxx:162
 TGButton.cxx:163
 TGButton.cxx:164
 TGButton.cxx:165
 TGButton.cxx:166
 TGButton.cxx:167
 TGButton.cxx:168
 TGButton.cxx:169
 TGButton.cxx:170
 TGButton.cxx:171
 TGButton.cxx:172
 TGButton.cxx:173
 TGButton.cxx:174
 TGButton.cxx:175
 TGButton.cxx:176
 TGButton.cxx:177
 TGButton.cxx:178
 TGButton.cxx:179
 TGButton.cxx:180
 TGButton.cxx:181
 TGButton.cxx:182
 TGButton.cxx:183
 TGButton.cxx:184
 TGButton.cxx:185
 TGButton.cxx:186
 TGButton.cxx:187
 TGButton.cxx:188
 TGButton.cxx:189
 TGButton.cxx:190
 TGButton.cxx:191
 TGButton.cxx:192
 TGButton.cxx:193
 TGButton.cxx:194
 TGButton.cxx:195
 TGButton.cxx:196
 TGButton.cxx:197
 TGButton.cxx:198
 TGButton.cxx:199
 TGButton.cxx:200
 TGButton.cxx:201
 TGButton.cxx:202
 TGButton.cxx:203
 TGButton.cxx:204
 TGButton.cxx:205
 TGButton.cxx:206
 TGButton.cxx:207
 TGButton.cxx:208
 TGButton.cxx:209
 TGButton.cxx:210
 TGButton.cxx:211
 TGButton.cxx:212
 TGButton.cxx:213
 TGButton.cxx:214
 TGButton.cxx:215
 TGButton.cxx:216
 TGButton.cxx:217
 TGButton.cxx:218
 TGButton.cxx:219
 TGButton.cxx:220
 TGButton.cxx:221
 TGButton.cxx:222
 TGButton.cxx:223
 TGButton.cxx:224
 TGButton.cxx:225
 TGButton.cxx:226
 TGButton.cxx:227
 TGButton.cxx:228
 TGButton.cxx:229
 TGButton.cxx:230
 TGButton.cxx:231
 TGButton.cxx:232
 TGButton.cxx:233
 TGButton.cxx:234
 TGButton.cxx:235
 TGButton.cxx:236
 TGButton.cxx:237
 TGButton.cxx:238
 TGButton.cxx:239
 TGButton.cxx:240
 TGButton.cxx:241
 TGButton.cxx:242
 TGButton.cxx:243
 TGButton.cxx:244
 TGButton.cxx:245
 TGButton.cxx:246
 TGButton.cxx:247
 TGButton.cxx:248
 TGButton.cxx:249
 TGButton.cxx:250
 TGButton.cxx:251
 TGButton.cxx:252
 TGButton.cxx:253
 TGButton.cxx:254
 TGButton.cxx:255
 TGButton.cxx:256
 TGButton.cxx:257
 TGButton.cxx:258
 TGButton.cxx:259
 TGButton.cxx:260
 TGButton.cxx:261
 TGButton.cxx:262
 TGButton.cxx:263
 TGButton.cxx:264
 TGButton.cxx:265
 TGButton.cxx:266
 TGButton.cxx:267
 TGButton.cxx:268
 TGButton.cxx:269
 TGButton.cxx:270
 TGButton.cxx:271
 TGButton.cxx:272
 TGButton.cxx:273
 TGButton.cxx:274
 TGButton.cxx:275
 TGButton.cxx:276
 TGButton.cxx:277
 TGButton.cxx:278
 TGButton.cxx:279
 TGButton.cxx:280
 TGButton.cxx:281
 TGButton.cxx:282
 TGButton.cxx:283
 TGButton.cxx:284
 TGButton.cxx:285
 TGButton.cxx:286
 TGButton.cxx:287
 TGButton.cxx:288
 TGButton.cxx:289
 TGButton.cxx:290
 TGButton.cxx:291
 TGButton.cxx:292
 TGButton.cxx:293
 TGButton.cxx:294
 TGButton.cxx:295
 TGButton.cxx:296
 TGButton.cxx:297
 TGButton.cxx:298
 TGButton.cxx:299
 TGButton.cxx:300
 TGButton.cxx:301
 TGButton.cxx:302
 TGButton.cxx:303
 TGButton.cxx:304
 TGButton.cxx:305
 TGButton.cxx:306
 TGButton.cxx:307
 TGButton.cxx:308
 TGButton.cxx:309
 TGButton.cxx:310
 TGButton.cxx:311
 TGButton.cxx:312
 TGButton.cxx:313
 TGButton.cxx:314
 TGButton.cxx:315
 TGButton.cxx:316
 TGButton.cxx:317
 TGButton.cxx:318
 TGButton.cxx:319
 TGButton.cxx:320
 TGButton.cxx:321
 TGButton.cxx:322
 TGButton.cxx:323
 TGButton.cxx:324
 TGButton.cxx:325
 TGButton.cxx:326
 TGButton.cxx:327
 TGButton.cxx:328
 TGButton.cxx:329
 TGButton.cxx:330
 TGButton.cxx:331
 TGButton.cxx:332
 TGButton.cxx:333
 TGButton.cxx:334
 TGButton.cxx:335
 TGButton.cxx:336
 TGButton.cxx:337
 TGButton.cxx:338
 TGButton.cxx:339
 TGButton.cxx:340
 TGButton.cxx:341
 TGButton.cxx:342
 TGButton.cxx:343
 TGButton.cxx:344
 TGButton.cxx:345
 TGButton.cxx:346
 TGButton.cxx:347
 TGButton.cxx:348
 TGButton.cxx:349
 TGButton.cxx:350
 TGButton.cxx:351
 TGButton.cxx:352
 TGButton.cxx:353
 TGButton.cxx:354
 TGButton.cxx:355
 TGButton.cxx:356
 TGButton.cxx:357
 TGButton.cxx:358
 TGButton.cxx:359
 TGButton.cxx:360
 TGButton.cxx:361
 TGButton.cxx:362
 TGButton.cxx:363
 TGButton.cxx:364
 TGButton.cxx:365
 TGButton.cxx:366
 TGButton.cxx:367
 TGButton.cxx:368
 TGButton.cxx:369
 TGButton.cxx:370
 TGButton.cxx:371
 TGButton.cxx:372
 TGButton.cxx:373
 TGButton.cxx:374
 TGButton.cxx:375
 TGButton.cxx:376
 TGButton.cxx:377
 TGButton.cxx:378
 TGButton.cxx:379
 TGButton.cxx:380
 TGButton.cxx:381
 TGButton.cxx:382
 TGButton.cxx:383
 TGButton.cxx:384
 TGButton.cxx:385
 TGButton.cxx:386
 TGButton.cxx:387
 TGButton.cxx:388
 TGButton.cxx:389
 TGButton.cxx:390
 TGButton.cxx:391
 TGButton.cxx:392
 TGButton.cxx:393
 TGButton.cxx:394
 TGButton.cxx:395
 TGButton.cxx:396
 TGButton.cxx:397
 TGButton.cxx:398
 TGButton.cxx:399
 TGButton.cxx:400
 TGButton.cxx:401
 TGButton.cxx:402
 TGButton.cxx:403
 TGButton.cxx:404
 TGButton.cxx:405
 TGButton.cxx:406
 TGButton.cxx:407
 TGButton.cxx:408
 TGButton.cxx:409
 TGButton.cxx:410
 TGButton.cxx:411
 TGButton.cxx:412
 TGButton.cxx:413
 TGButton.cxx:414
 TGButton.cxx:415
 TGButton.cxx:416
 TGButton.cxx:417
 TGButton.cxx:418
 TGButton.cxx:419
 TGButton.cxx:420
 TGButton.cxx:421
 TGButton.cxx:422
 TGButton.cxx:423
 TGButton.cxx:424
 TGButton.cxx:425
 TGButton.cxx:426
 TGButton.cxx:427
 TGButton.cxx:428
 TGButton.cxx:429
 TGButton.cxx:430
 TGButton.cxx:431
 TGButton.cxx:432
 TGButton.cxx:433
 TGButton.cxx:434
 TGButton.cxx:435
 TGButton.cxx:436
 TGButton.cxx:437
 TGButton.cxx:438
 TGButton.cxx:439
 TGButton.cxx:440
 TGButton.cxx:441
 TGButton.cxx:442
 TGButton.cxx:443
 TGButton.cxx:444
 TGButton.cxx:445
 TGButton.cxx:446
 TGButton.cxx:447
 TGButton.cxx:448
 TGButton.cxx:449
 TGButton.cxx:450
 TGButton.cxx:451
 TGButton.cxx:452
 TGButton.cxx:453
 TGButton.cxx:454
 TGButton.cxx:455
 TGButton.cxx:456
 TGButton.cxx:457
 TGButton.cxx:458
 TGButton.cxx:459
 TGButton.cxx:460
 TGButton.cxx:461
 TGButton.cxx:462
 TGButton.cxx:463
 TGButton.cxx:464
 TGButton.cxx:465
 TGButton.cxx:466
 TGButton.cxx:467
 TGButton.cxx:468
 TGButton.cxx:469
 TGButton.cxx:470
 TGButton.cxx:471
 TGButton.cxx:472
 TGButton.cxx:473
 TGButton.cxx:474
 TGButton.cxx:475
 TGButton.cxx:476
 TGButton.cxx:477
 TGButton.cxx:478
 TGButton.cxx:479
 TGButton.cxx:480
 TGButton.cxx:481
 TGButton.cxx:482
 TGButton.cxx:483
 TGButton.cxx:484
 TGButton.cxx:485
 TGButton.cxx:486
 TGButton.cxx:487
 TGButton.cxx:488
 TGButton.cxx:489
 TGButton.cxx:490
 TGButton.cxx:491
 TGButton.cxx:492
 TGButton.cxx:493
 TGButton.cxx:494
 TGButton.cxx:495
 TGButton.cxx:496
 TGButton.cxx:497
 TGButton.cxx:498
 TGButton.cxx:499
 TGButton.cxx:500
 TGButton.cxx:501
 TGButton.cxx:502
 TGButton.cxx:503
 TGButton.cxx:504
 TGButton.cxx:505
 TGButton.cxx:506
 TGButton.cxx:507
 TGButton.cxx:508
 TGButton.cxx:509
 TGButton.cxx:510
 TGButton.cxx:511
 TGButton.cxx:512
 TGButton.cxx:513
 TGButton.cxx:514
 TGButton.cxx:515
 TGButton.cxx:516
 TGButton.cxx:517
 TGButton.cxx:518
 TGButton.cxx:519
 TGButton.cxx:520
 TGButton.cxx:521
 TGButton.cxx:522
 TGButton.cxx:523
 TGButton.cxx:524
 TGButton.cxx:525
 TGButton.cxx:526
 TGButton.cxx:527
 TGButton.cxx:528
 TGButton.cxx:529
 TGButton.cxx:530
 TGButton.cxx:531
 TGButton.cxx:532
 TGButton.cxx:533
 TGButton.cxx:534
 TGButton.cxx:535
 TGButton.cxx:536
 TGButton.cxx:537
 TGButton.cxx:538
 TGButton.cxx:539
 TGButton.cxx:540
 TGButton.cxx:541
 TGButton.cxx:542
 TGButton.cxx:543
 TGButton.cxx:544
 TGButton.cxx:545
 TGButton.cxx:546
 TGButton.cxx:547
 TGButton.cxx:548
 TGButton.cxx:549
 TGButton.cxx:550
 TGButton.cxx:551
 TGButton.cxx:552
 TGButton.cxx:553
 TGButton.cxx:554
 TGButton.cxx:555
 TGButton.cxx:556
 TGButton.cxx:557
 TGButton.cxx:558
 TGButton.cxx:559
 TGButton.cxx:560
 TGButton.cxx:561
 TGButton.cxx:562
 TGButton.cxx:563
 TGButton.cxx:564
 TGButton.cxx:565
 TGButton.cxx:566
 TGButton.cxx:567
 TGButton.cxx:568
 TGButton.cxx:569
 TGButton.cxx:570
 TGButton.cxx:571
 TGButton.cxx:572
 TGButton.cxx:573
 TGButton.cxx:574
 TGButton.cxx:575
 TGButton.cxx:576
 TGButton.cxx:577
 TGButton.cxx:578
 TGButton.cxx:579
 TGButton.cxx:580
 TGButton.cxx:581
 TGButton.cxx:582
 TGButton.cxx:583
 TGButton.cxx:584
 TGButton.cxx:585
 TGButton.cxx:586
 TGButton.cxx:587
 TGButton.cxx:588
 TGButton.cxx:589
 TGButton.cxx:590
 TGButton.cxx:591
 TGButton.cxx:592
 TGButton.cxx:593
 TGButton.cxx:594
 TGButton.cxx:595
 TGButton.cxx:596
 TGButton.cxx:597
 TGButton.cxx:598
 TGButton.cxx:599
 TGButton.cxx:600
 TGButton.cxx:601
 TGButton.cxx:602
 TGButton.cxx:603
 TGButton.cxx:604
 TGButton.cxx:605
 TGButton.cxx:606
 TGButton.cxx:607
 TGButton.cxx:608
 TGButton.cxx:609
 TGButton.cxx:610
 TGButton.cxx:611
 TGButton.cxx:612
 TGButton.cxx:613
 TGButton.cxx:614
 TGButton.cxx:615
 TGButton.cxx:616
 TGButton.cxx:617
 TGButton.cxx:618
 TGButton.cxx:619
 TGButton.cxx:620
 TGButton.cxx:621
 TGButton.cxx:622
 TGButton.cxx:623
 TGButton.cxx:624
 TGButton.cxx:625
 TGButton.cxx:626
 TGButton.cxx:627
 TGButton.cxx:628
 TGButton.cxx:629
 TGButton.cxx:630
 TGButton.cxx:631
 TGButton.cxx:632
 TGButton.cxx:633
 TGButton.cxx:634
 TGButton.cxx:635
 TGButton.cxx:636
 TGButton.cxx:637
 TGButton.cxx:638
 TGButton.cxx:639
 TGButton.cxx:640
 TGButton.cxx:641
 TGButton.cxx:642
 TGButton.cxx:643
 TGButton.cxx:644
 TGButton.cxx:645
 TGButton.cxx:646
 TGButton.cxx:647
 TGButton.cxx:648
 TGButton.cxx:649
 TGButton.cxx:650
 TGButton.cxx:651
 TGButton.cxx:652
 TGButton.cxx:653
 TGButton.cxx:654
 TGButton.cxx:655
 TGButton.cxx:656
 TGButton.cxx:657
 TGButton.cxx:658
 TGButton.cxx:659
 TGButton.cxx:660
 TGButton.cxx:661
 TGButton.cxx:662
 TGButton.cxx:663
 TGButton.cxx:664
 TGButton.cxx:665
 TGButton.cxx:666
 TGButton.cxx:667
 TGButton.cxx:668
 TGButton.cxx:669
 TGButton.cxx:670
 TGButton.cxx:671
 TGButton.cxx:672
 TGButton.cxx:673
 TGButton.cxx:674
 TGButton.cxx:675
 TGButton.cxx:676
 TGButton.cxx:677
 TGButton.cxx:678
 TGButton.cxx:679
 TGButton.cxx:680
 TGButton.cxx:681
 TGButton.cxx:682
 TGButton.cxx:683
 TGButton.cxx:684
 TGButton.cxx:685
 TGButton.cxx:686
 TGButton.cxx:687
 TGButton.cxx:688
 TGButton.cxx:689
 TGButton.cxx:690
 TGButton.cxx:691
 TGButton.cxx:692
 TGButton.cxx:693
 TGButton.cxx:694
 TGButton.cxx:695
 TGButton.cxx:696
 TGButton.cxx:697
 TGButton.cxx:698
 TGButton.cxx:699
 TGButton.cxx:700
 TGButton.cxx:701
 TGButton.cxx:702
 TGButton.cxx:703
 TGButton.cxx:704
 TGButton.cxx:705
 TGButton.cxx:706
 TGButton.cxx:707
 TGButton.cxx:708
 TGButton.cxx:709
 TGButton.cxx:710
 TGButton.cxx:711
 TGButton.cxx:712
 TGButton.cxx:713
 TGButton.cxx:714
 TGButton.cxx:715
 TGButton.cxx:716
 TGButton.cxx:717
 TGButton.cxx:718
 TGButton.cxx:719
 TGButton.cxx:720
 TGButton.cxx:721
 TGButton.cxx:722
 TGButton.cxx:723
 TGButton.cxx:724
 TGButton.cxx:725
 TGButton.cxx:726
 TGButton.cxx:727
 TGButton.cxx:728
 TGButton.cxx:729
 TGButton.cxx:730
 TGButton.cxx:731
 TGButton.cxx:732
 TGButton.cxx:733
 TGButton.cxx:734
 TGButton.cxx:735
 TGButton.cxx:736
 TGButton.cxx:737
 TGButton.cxx:738
 TGButton.cxx:739
 TGButton.cxx:740
 TGButton.cxx:741
 TGButton.cxx:742
 TGButton.cxx:743
 TGButton.cxx:744
 TGButton.cxx:745
 TGButton.cxx:746
 TGButton.cxx:747
 TGButton.cxx:748
 TGButton.cxx:749
 TGButton.cxx:750
 TGButton.cxx:751
 TGButton.cxx:752
 TGButton.cxx:753
 TGButton.cxx:754
 TGButton.cxx:755
 TGButton.cxx:756
 TGButton.cxx:757
 TGButton.cxx:758
 TGButton.cxx:759
 TGButton.cxx:760
 TGButton.cxx:761
 TGButton.cxx:762
 TGButton.cxx:763
 TGButton.cxx:764
 TGButton.cxx:765
 TGButton.cxx:766
 TGButton.cxx:767
 TGButton.cxx:768
 TGButton.cxx:769
 TGButton.cxx:770
 TGButton.cxx:771
 TGButton.cxx:772
 TGButton.cxx:773
 TGButton.cxx:774
 TGButton.cxx:775
 TGButton.cxx:776
 TGButton.cxx:777
 TGButton.cxx:778
 TGButton.cxx:779
 TGButton.cxx:780
 TGButton.cxx:781
 TGButton.cxx:782
 TGButton.cxx:783
 TGButton.cxx:784
 TGButton.cxx:785
 TGButton.cxx:786
 TGButton.cxx:787
 TGButton.cxx:788
 TGButton.cxx:789
 TGButton.cxx:790
 TGButton.cxx:791
 TGButton.cxx:792
 TGButton.cxx:793
 TGButton.cxx:794
 TGButton.cxx:795
 TGButton.cxx:796
 TGButton.cxx:797
 TGButton.cxx:798
 TGButton.cxx:799
 TGButton.cxx:800
 TGButton.cxx:801
 TGButton.cxx:802
 TGButton.cxx:803
 TGButton.cxx:804
 TGButton.cxx:805
 TGButton.cxx:806
 TGButton.cxx:807
 TGButton.cxx:808
 TGButton.cxx:809
 TGButton.cxx:810
 TGButton.cxx:811
 TGButton.cxx:812
 TGButton.cxx:813
 TGButton.cxx:814
 TGButton.cxx:815
 TGButton.cxx:816
 TGButton.cxx:817
 TGButton.cxx:818
 TGButton.cxx:819
 TGButton.cxx:820
 TGButton.cxx:821
 TGButton.cxx:822
 TGButton.cxx:823
 TGButton.cxx:824
 TGButton.cxx:825
 TGButton.cxx:826
 TGButton.cxx:827
 TGButton.cxx:828
 TGButton.cxx:829
 TGButton.cxx:830
 TGButton.cxx:831
 TGButton.cxx:832
 TGButton.cxx:833
 TGButton.cxx:834
 TGButton.cxx:835
 TGButton.cxx:836
 TGButton.cxx:837
 TGButton.cxx:838
 TGButton.cxx:839
 TGButton.cxx:840
 TGButton.cxx:841
 TGButton.cxx:842
 TGButton.cxx:843
 TGButton.cxx:844
 TGButton.cxx:845
 TGButton.cxx:846
 TGButton.cxx:847
 TGButton.cxx:848
 TGButton.cxx:849
 TGButton.cxx:850
 TGButton.cxx:851
 TGButton.cxx:852
 TGButton.cxx:853
 TGButton.cxx:854
 TGButton.cxx:855
 TGButton.cxx:856
 TGButton.cxx:857
 TGButton.cxx:858
 TGButton.cxx:859
 TGButton.cxx:860
 TGButton.cxx:861
 TGButton.cxx:862
 TGButton.cxx:863
 TGButton.cxx:864
 TGButton.cxx:865
 TGButton.cxx:866
 TGButton.cxx:867
 TGButton.cxx:868
 TGButton.cxx:869
 TGButton.cxx:870
 TGButton.cxx:871
 TGButton.cxx:872
 TGButton.cxx:873
 TGButton.cxx:874
 TGButton.cxx:875
 TGButton.cxx:876
 TGButton.cxx:877
 TGButton.cxx:878
 TGButton.cxx:879
 TGButton.cxx:880
 TGButton.cxx:881
 TGButton.cxx:882
 TGButton.cxx:883
 TGButton.cxx:884
 TGButton.cxx:885
 TGButton.cxx:886
 TGButton.cxx:887
 TGButton.cxx:888
 TGButton.cxx:889
 TGButton.cxx:890
 TGButton.cxx:891
 TGButton.cxx:892
 TGButton.cxx:893
 TGButton.cxx:894
 TGButton.cxx:895
 TGButton.cxx:896
 TGButton.cxx:897
 TGButton.cxx:898
 TGButton.cxx:899
 TGButton.cxx:900
 TGButton.cxx:901
 TGButton.cxx:902
 TGButton.cxx:903
 TGButton.cxx:904
 TGButton.cxx:905
 TGButton.cxx:906
 TGButton.cxx:907
 TGButton.cxx:908
 TGButton.cxx:909
 TGButton.cxx:910
 TGButton.cxx:911
 TGButton.cxx:912
 TGButton.cxx:913
 TGButton.cxx:914
 TGButton.cxx:915
 TGButton.cxx:916
 TGButton.cxx:917
 TGButton.cxx:918
 TGButton.cxx:919
 TGButton.cxx:920
 TGButton.cxx:921
 TGButton.cxx:922
 TGButton.cxx:923
 TGButton.cxx:924
 TGButton.cxx:925
 TGButton.cxx:926
 TGButton.cxx:927
 TGButton.cxx:928
 TGButton.cxx:929
 TGButton.cxx:930
 TGButton.cxx:931
 TGButton.cxx:932
 TGButton.cxx:933
 TGButton.cxx:934
 TGButton.cxx:935
 TGButton.cxx:936
 TGButton.cxx:937
 TGButton.cxx:938
 TGButton.cxx:939
 TGButton.cxx:940
 TGButton.cxx:941
 TGButton.cxx:942
 TGButton.cxx:943
 TGButton.cxx:944
 TGButton.cxx:945
 TGButton.cxx:946
 TGButton.cxx:947
 TGButton.cxx:948
 TGButton.cxx:949
 TGButton.cxx:950
 TGButton.cxx:951
 TGButton.cxx:952
 TGButton.cxx:953
 TGButton.cxx:954
 TGButton.cxx:955
 TGButton.cxx:956
 TGButton.cxx:957
 TGButton.cxx:958
 TGButton.cxx:959
 TGButton.cxx:960
 TGButton.cxx:961
 TGButton.cxx:962
 TGButton.cxx:963
 TGButton.cxx:964
 TGButton.cxx:965
 TGButton.cxx:966
 TGButton.cxx:967
 TGButton.cxx:968
 TGButton.cxx:969
 TGButton.cxx:970
 TGButton.cxx:971
 TGButton.cxx:972
 TGButton.cxx:973
 TGButton.cxx:974
 TGButton.cxx:975
 TGButton.cxx:976
 TGButton.cxx:977
 TGButton.cxx:978
 TGButton.cxx:979
 TGButton.cxx:980
 TGButton.cxx:981
 TGButton.cxx:982
 TGButton.cxx:983
 TGButton.cxx:984
 TGButton.cxx:985
 TGButton.cxx:986
 TGButton.cxx:987
 TGButton.cxx:988
 TGButton.cxx:989
 TGButton.cxx:990
 TGButton.cxx:991
 TGButton.cxx:992
 TGButton.cxx:993
 TGButton.cxx:994
 TGButton.cxx:995
 TGButton.cxx:996
 TGButton.cxx:997
 TGButton.cxx:998
 TGButton.cxx:999
 TGButton.cxx:1000
 TGButton.cxx:1001
 TGButton.cxx:1002
 TGButton.cxx:1003
 TGButton.cxx:1004
 TGButton.cxx:1005
 TGButton.cxx:1006
 TGButton.cxx:1007
 TGButton.cxx:1008
 TGButton.cxx:1009
 TGButton.cxx:1010
 TGButton.cxx:1011
 TGButton.cxx:1012
 TGButton.cxx:1013
 TGButton.cxx:1014
 TGButton.cxx:1015
 TGButton.cxx:1016
 TGButton.cxx:1017
 TGButton.cxx:1018
 TGButton.cxx:1019
 TGButton.cxx:1020
 TGButton.cxx:1021
 TGButton.cxx:1022
 TGButton.cxx:1023
 TGButton.cxx:1024
 TGButton.cxx:1025
 TGButton.cxx:1026
 TGButton.cxx:1027
 TGButton.cxx:1028
 TGButton.cxx:1029
 TGButton.cxx:1030
 TGButton.cxx:1031
 TGButton.cxx:1032
 TGButton.cxx:1033
 TGButton.cxx:1034
 TGButton.cxx:1035
 TGButton.cxx:1036
 TGButton.cxx:1037
 TGButton.cxx:1038
 TGButton.cxx:1039
 TGButton.cxx:1040
 TGButton.cxx:1041
 TGButton.cxx:1042
 TGButton.cxx:1043
 TGButton.cxx:1044
 TGButton.cxx:1045
 TGButton.cxx:1046
 TGButton.cxx:1047
 TGButton.cxx:1048
 TGButton.cxx:1049
 TGButton.cxx:1050
 TGButton.cxx:1051
 TGButton.cxx:1052
 TGButton.cxx:1053
 TGButton.cxx:1054
 TGButton.cxx:1055
 TGButton.cxx:1056
 TGButton.cxx:1057
 TGButton.cxx:1058
 TGButton.cxx:1059
 TGButton.cxx:1060
 TGButton.cxx:1061
 TGButton.cxx:1062
 TGButton.cxx:1063
 TGButton.cxx:1064
 TGButton.cxx:1065
 TGButton.cxx:1066
 TGButton.cxx:1067
 TGButton.cxx:1068
 TGButton.cxx:1069
 TGButton.cxx:1070
 TGButton.cxx:1071
 TGButton.cxx:1072
 TGButton.cxx:1073
 TGButton.cxx:1074
 TGButton.cxx:1075
 TGButton.cxx:1076
 TGButton.cxx:1077
 TGButton.cxx:1078
 TGButton.cxx:1079
 TGButton.cxx:1080
 TGButton.cxx:1081
 TGButton.cxx:1082
 TGButton.cxx:1083
 TGButton.cxx:1084
 TGButton.cxx:1085
 TGButton.cxx:1086
 TGButton.cxx:1087
 TGButton.cxx:1088
 TGButton.cxx:1089
 TGButton.cxx:1090
 TGButton.cxx:1091
 TGButton.cxx:1092
 TGButton.cxx:1093
 TGButton.cxx:1094
 TGButton.cxx:1095
 TGButton.cxx:1096
 TGButton.cxx:1097
 TGButton.cxx:1098
 TGButton.cxx:1099
 TGButton.cxx:1100
 TGButton.cxx:1101
 TGButton.cxx:1102
 TGButton.cxx:1103
 TGButton.cxx:1104
 TGButton.cxx:1105
 TGButton.cxx:1106
 TGButton.cxx:1107
 TGButton.cxx:1108
 TGButton.cxx:1109
 TGButton.cxx:1110
 TGButton.cxx:1111
 TGButton.cxx:1112
 TGButton.cxx:1113
 TGButton.cxx:1114
 TGButton.cxx:1115
 TGButton.cxx:1116
 TGButton.cxx:1117
 TGButton.cxx:1118
 TGButton.cxx:1119
 TGButton.cxx:1120
 TGButton.cxx:1121
 TGButton.cxx:1122
 TGButton.cxx:1123
 TGButton.cxx:1124
 TGButton.cxx:1125
 TGButton.cxx:1126
 TGButton.cxx:1127
 TGButton.cxx:1128
 TGButton.cxx:1129
 TGButton.cxx:1130
 TGButton.cxx:1131
 TGButton.cxx:1132
 TGButton.cxx:1133
 TGButton.cxx:1134
 TGButton.cxx:1135
 TGButton.cxx:1136
 TGButton.cxx:1137
 TGButton.cxx:1138
 TGButton.cxx:1139
 TGButton.cxx:1140
 TGButton.cxx:1141
 TGButton.cxx:1142
 TGButton.cxx:1143
 TGButton.cxx:1144
 TGButton.cxx:1145
 TGButton.cxx:1146
 TGButton.cxx:1147
 TGButton.cxx:1148
 TGButton.cxx:1149
 TGButton.cxx:1150
 TGButton.cxx:1151
 TGButton.cxx:1152
 TGButton.cxx:1153
 TGButton.cxx:1154
 TGButton.cxx:1155
 TGButton.cxx:1156
 TGButton.cxx:1157
 TGButton.cxx:1158
 TGButton.cxx:1159
 TGButton.cxx:1160
 TGButton.cxx:1161
 TGButton.cxx:1162
 TGButton.cxx:1163
 TGButton.cxx:1164
 TGButton.cxx:1165
 TGButton.cxx:1166
 TGButton.cxx:1167
 TGButton.cxx:1168
 TGButton.cxx:1169
 TGButton.cxx:1170
 TGButton.cxx:1171
 TGButton.cxx:1172
 TGButton.cxx:1173
 TGButton.cxx:1174
 TGButton.cxx:1175
 TGButton.cxx:1176
 TGButton.cxx:1177
 TGButton.cxx:1178
 TGButton.cxx:1179
 TGButton.cxx:1180
 TGButton.cxx:1181
 TGButton.cxx:1182
 TGButton.cxx:1183
 TGButton.cxx:1184
 TGButton.cxx:1185
 TGButton.cxx:1186
 TGButton.cxx:1187
 TGButton.cxx:1188
 TGButton.cxx:1189
 TGButton.cxx:1190
 TGButton.cxx:1191
 TGButton.cxx:1192
 TGButton.cxx:1193
 TGButton.cxx:1194
 TGButton.cxx:1195
 TGButton.cxx:1196
 TGButton.cxx:1197
 TGButton.cxx:1198
 TGButton.cxx:1199
 TGButton.cxx:1200
 TGButton.cxx:1201
 TGButton.cxx:1202
 TGButton.cxx:1203
 TGButton.cxx:1204
 TGButton.cxx:1205
 TGButton.cxx:1206
 TGButton.cxx:1207
 TGButton.cxx:1208
 TGButton.cxx:1209
 TGButton.cxx:1210
 TGButton.cxx:1211
 TGButton.cxx:1212
 TGButton.cxx:1213
 TGButton.cxx:1214
 TGButton.cxx:1215
 TGButton.cxx:1216
 TGButton.cxx:1217
 TGButton.cxx:1218
 TGButton.cxx:1219
 TGButton.cxx:1220
 TGButton.cxx:1221
 TGButton.cxx:1222
 TGButton.cxx:1223
 TGButton.cxx:1224
 TGButton.cxx:1225
 TGButton.cxx:1226
 TGButton.cxx:1227
 TGButton.cxx:1228
 TGButton.cxx:1229
 TGButton.cxx:1230
 TGButton.cxx:1231
 TGButton.cxx:1232
 TGButton.cxx:1233
 TGButton.cxx:1234
 TGButton.cxx:1235
 TGButton.cxx:1236
 TGButton.cxx:1237
 TGButton.cxx:1238
 TGButton.cxx:1239
 TGButton.cxx:1240
 TGButton.cxx:1241
 TGButton.cxx:1242
 TGButton.cxx:1243
 TGButton.cxx:1244
 TGButton.cxx:1245
 TGButton.cxx:1246
 TGButton.cxx:1247
 TGButton.cxx:1248
 TGButton.cxx:1249
 TGButton.cxx:1250
 TGButton.cxx:1251
 TGButton.cxx:1252
 TGButton.cxx:1253
 TGButton.cxx:1254
 TGButton.cxx:1255
 TGButton.cxx:1256
 TGButton.cxx:1257
 TGButton.cxx:1258
 TGButton.cxx:1259
 TGButton.cxx:1260
 TGButton.cxx:1261
 TGButton.cxx:1262
 TGButton.cxx:1263
 TGButton.cxx:1264
 TGButton.cxx:1265
 TGButton.cxx:1266
 TGButton.cxx:1267
 TGButton.cxx:1268
 TGButton.cxx:1269
 TGButton.cxx:1270
 TGButton.cxx:1271
 TGButton.cxx:1272
 TGButton.cxx:1273
 TGButton.cxx:1274
 TGButton.cxx:1275
 TGButton.cxx:1276
 TGButton.cxx:1277
 TGButton.cxx:1278
 TGButton.cxx:1279
 TGButton.cxx:1280
 TGButton.cxx:1281
 TGButton.cxx:1282
 TGButton.cxx:1283
 TGButton.cxx:1284
 TGButton.cxx:1285
 TGButton.cxx:1286
 TGButton.cxx:1287
 TGButton.cxx:1288
 TGButton.cxx:1289
 TGButton.cxx:1290
 TGButton.cxx:1291
 TGButton.cxx:1292
 TGButton.cxx:1293
 TGButton.cxx:1294
 TGButton.cxx:1295
 TGButton.cxx:1296
 TGButton.cxx:1297
 TGButton.cxx:1298
 TGButton.cxx:1299
 TGButton.cxx:1300
 TGButton.cxx:1301
 TGButton.cxx:1302
 TGButton.cxx:1303
 TGButton.cxx:1304
 TGButton.cxx:1305
 TGButton.cxx:1306
 TGButton.cxx:1307
 TGButton.cxx:1308
 TGButton.cxx:1309
 TGButton.cxx:1310
 TGButton.cxx:1311
 TGButton.cxx:1312
 TGButton.cxx:1313
 TGButton.cxx:1314
 TGButton.cxx:1315
 TGButton.cxx:1316
 TGButton.cxx:1317
 TGButton.cxx:1318
 TGButton.cxx:1319
 TGButton.cxx:1320
 TGButton.cxx:1321
 TGButton.cxx:1322
 TGButton.cxx:1323
 TGButton.cxx:1324
 TGButton.cxx:1325
 TGButton.cxx:1326
 TGButton.cxx:1327
 TGButton.cxx:1328
 TGButton.cxx:1329
 TGButton.cxx:1330
 TGButton.cxx:1331
 TGButton.cxx:1332
 TGButton.cxx:1333
 TGButton.cxx:1334
 TGButton.cxx:1335
 TGButton.cxx:1336
 TGButton.cxx:1337
 TGButton.cxx:1338
 TGButton.cxx:1339
 TGButton.cxx:1340
 TGButton.cxx:1341
 TGButton.cxx:1342
 TGButton.cxx:1343
 TGButton.cxx:1344
 TGButton.cxx:1345
 TGButton.cxx:1346
 TGButton.cxx:1347
 TGButton.cxx:1348
 TGButton.cxx:1349
 TGButton.cxx:1350
 TGButton.cxx:1351
 TGButton.cxx:1352
 TGButton.cxx:1353
 TGButton.cxx:1354
 TGButton.cxx:1355
 TGButton.cxx:1356
 TGButton.cxx:1357
 TGButton.cxx:1358
 TGButton.cxx:1359
 TGButton.cxx:1360
 TGButton.cxx:1361
 TGButton.cxx:1362
 TGButton.cxx:1363
 TGButton.cxx:1364
 TGButton.cxx:1365
 TGButton.cxx:1366
 TGButton.cxx:1367
 TGButton.cxx:1368
 TGButton.cxx:1369
 TGButton.cxx:1370
 TGButton.cxx:1371
 TGButton.cxx:1372
 TGButton.cxx:1373
 TGButton.cxx:1374
 TGButton.cxx:1375
 TGButton.cxx:1376
 TGButton.cxx:1377
 TGButton.cxx:1378
 TGButton.cxx:1379
 TGButton.cxx:1380
 TGButton.cxx:1381
 TGButton.cxx:1382
 TGButton.cxx:1383
 TGButton.cxx:1384
 TGButton.cxx:1385
 TGButton.cxx:1386
 TGButton.cxx:1387
 TGButton.cxx:1388
 TGButton.cxx:1389
 TGButton.cxx:1390
 TGButton.cxx:1391
 TGButton.cxx:1392
 TGButton.cxx:1393
 TGButton.cxx:1394
 TGButton.cxx:1395
 TGButton.cxx:1396
 TGButton.cxx:1397
 TGButton.cxx:1398
 TGButton.cxx:1399
 TGButton.cxx:1400
 TGButton.cxx:1401
 TGButton.cxx:1402
 TGButton.cxx:1403
 TGButton.cxx:1404
 TGButton.cxx:1405
 TGButton.cxx:1406
 TGButton.cxx:1407
 TGButton.cxx:1408
 TGButton.cxx:1409
 TGButton.cxx:1410
 TGButton.cxx:1411
 TGButton.cxx:1412
 TGButton.cxx:1413
 TGButton.cxx:1414
 TGButton.cxx:1415
 TGButton.cxx:1416
 TGButton.cxx:1417
 TGButton.cxx:1418
 TGButton.cxx:1419
 TGButton.cxx:1420
 TGButton.cxx:1421
 TGButton.cxx:1422
 TGButton.cxx:1423
 TGButton.cxx:1424
 TGButton.cxx:1425
 TGButton.cxx:1426
 TGButton.cxx:1427
 TGButton.cxx:1428
 TGButton.cxx:1429
 TGButton.cxx:1430
 TGButton.cxx:1431
 TGButton.cxx:1432
 TGButton.cxx:1433
 TGButton.cxx:1434
 TGButton.cxx:1435
 TGButton.cxx:1436
 TGButton.cxx:1437
 TGButton.cxx:1438
 TGButton.cxx:1439
 TGButton.cxx:1440
 TGButton.cxx:1441
 TGButton.cxx:1442
 TGButton.cxx:1443
 TGButton.cxx:1444
 TGButton.cxx:1445
 TGButton.cxx:1446
 TGButton.cxx:1447
 TGButton.cxx:1448
 TGButton.cxx:1449
 TGButton.cxx:1450
 TGButton.cxx:1451
 TGButton.cxx:1452
 TGButton.cxx:1453
 TGButton.cxx:1454
 TGButton.cxx:1455
 TGButton.cxx:1456
 TGButton.cxx:1457
 TGButton.cxx:1458
 TGButton.cxx:1459
 TGButton.cxx:1460
 TGButton.cxx:1461
 TGButton.cxx:1462
 TGButton.cxx:1463
 TGButton.cxx:1464
 TGButton.cxx:1465
 TGButton.cxx:1466
 TGButton.cxx:1467
 TGButton.cxx:1468
 TGButton.cxx:1469
 TGButton.cxx:1470
 TGButton.cxx:1471
 TGButton.cxx:1472
 TGButton.cxx:1473
 TGButton.cxx:1474
 TGButton.cxx:1475
 TGButton.cxx:1476
 TGButton.cxx:1477
 TGButton.cxx:1478
 TGButton.cxx:1479
 TGButton.cxx:1480
 TGButton.cxx:1481
 TGButton.cxx:1482
 TGButton.cxx:1483
 TGButton.cxx:1484
 TGButton.cxx:1485
 TGButton.cxx:1486
 TGButton.cxx:1487
 TGButton.cxx:1488
 TGButton.cxx:1489
 TGButton.cxx:1490
 TGButton.cxx:1491
 TGButton.cxx:1492
 TGButton.cxx:1493
 TGButton.cxx:1494
 TGButton.cxx:1495
 TGButton.cxx:1496
 TGButton.cxx:1497
 TGButton.cxx:1498
 TGButton.cxx:1499
 TGButton.cxx:1500
 TGButton.cxx:1501
 TGButton.cxx:1502
 TGButton.cxx:1503
 TGButton.cxx:1504
 TGButton.cxx:1505
 TGButton.cxx:1506
 TGButton.cxx:1507
 TGButton.cxx:1508
 TGButton.cxx:1509
 TGButton.cxx:1510
 TGButton.cxx:1511
 TGButton.cxx:1512
 TGButton.cxx:1513
 TGButton.cxx:1514
 TGButton.cxx:1515
 TGButton.cxx:1516
 TGButton.cxx:1517
 TGButton.cxx:1518
 TGButton.cxx:1519
 TGButton.cxx:1520
 TGButton.cxx:1521
 TGButton.cxx:1522
 TGButton.cxx:1523
 TGButton.cxx:1524
 TGButton.cxx:1525
 TGButton.cxx:1526
 TGButton.cxx:1527
 TGButton.cxx:1528
 TGButton.cxx:1529
 TGButton.cxx:1530
 TGButton.cxx:1531
 TGButton.cxx:1532
 TGButton.cxx:1533
 TGButton.cxx:1534
 TGButton.cxx:1535
 TGButton.cxx:1536
 TGButton.cxx:1537
 TGButton.cxx:1538
 TGButton.cxx:1539
 TGButton.cxx:1540
 TGButton.cxx:1541
 TGButton.cxx:1542
 TGButton.cxx:1543
 TGButton.cxx:1544
 TGButton.cxx:1545
 TGButton.cxx:1546
 TGButton.cxx:1547
 TGButton.cxx:1548
 TGButton.cxx:1549
 TGButton.cxx:1550
 TGButton.cxx:1551
 TGButton.cxx:1552
 TGButton.cxx:1553
 TGButton.cxx:1554
 TGButton.cxx:1555
 TGButton.cxx:1556
 TGButton.cxx:1557
 TGButton.cxx:1558
 TGButton.cxx:1559
 TGButton.cxx:1560
 TGButton.cxx:1561
 TGButton.cxx:1562
 TGButton.cxx:1563
 TGButton.cxx:1564
 TGButton.cxx:1565
 TGButton.cxx:1566
 TGButton.cxx:1567
 TGButton.cxx:1568
 TGButton.cxx:1569
 TGButton.cxx:1570
 TGButton.cxx:1571
 TGButton.cxx:1572
 TGButton.cxx:1573
 TGButton.cxx:1574
 TGButton.cxx:1575
 TGButton.cxx:1576
 TGButton.cxx:1577
 TGButton.cxx:1578
 TGButton.cxx:1579
 TGButton.cxx:1580
 TGButton.cxx:1581
 TGButton.cxx:1582
 TGButton.cxx:1583
 TGButton.cxx:1584
 TGButton.cxx:1585
 TGButton.cxx:1586
 TGButton.cxx:1587
 TGButton.cxx:1588
 TGButton.cxx:1589
 TGButton.cxx:1590
 TGButton.cxx:1591
 TGButton.cxx:1592
 TGButton.cxx:1593
 TGButton.cxx:1594
 TGButton.cxx:1595
 TGButton.cxx:1596
 TGButton.cxx:1597
 TGButton.cxx:1598
 TGButton.cxx:1599
 TGButton.cxx:1600
 TGButton.cxx:1601
 TGButton.cxx:1602
 TGButton.cxx:1603
 TGButton.cxx:1604
 TGButton.cxx:1605
 TGButton.cxx:1606
 TGButton.cxx:1607
 TGButton.cxx:1608
 TGButton.cxx:1609
 TGButton.cxx:1610
 TGButton.cxx:1611
 TGButton.cxx:1612
 TGButton.cxx:1613
 TGButton.cxx:1614
 TGButton.cxx:1615
 TGButton.cxx:1616
 TGButton.cxx:1617
 TGButton.cxx:1618
 TGButton.cxx:1619
 TGButton.cxx:1620
 TGButton.cxx:1621
 TGButton.cxx:1622
 TGButton.cxx:1623
 TGButton.cxx:1624
 TGButton.cxx:1625
 TGButton.cxx:1626
 TGButton.cxx:1627
 TGButton.cxx:1628
 TGButton.cxx:1629
 TGButton.cxx:1630
 TGButton.cxx:1631
 TGButton.cxx:1632
 TGButton.cxx:1633
 TGButton.cxx:1634
 TGButton.cxx:1635
 TGButton.cxx:1636
 TGButton.cxx:1637
 TGButton.cxx:1638
 TGButton.cxx:1639
 TGButton.cxx:1640
 TGButton.cxx:1641
 TGButton.cxx:1642
 TGButton.cxx:1643
 TGButton.cxx:1644
 TGButton.cxx:1645
 TGButton.cxx:1646
 TGButton.cxx:1647
 TGButton.cxx:1648
 TGButton.cxx:1649
 TGButton.cxx:1650
 TGButton.cxx:1651
 TGButton.cxx:1652
 TGButton.cxx:1653
 TGButton.cxx:1654
 TGButton.cxx:1655
 TGButton.cxx:1656
 TGButton.cxx:1657
 TGButton.cxx:1658
 TGButton.cxx:1659
 TGButton.cxx:1660
 TGButton.cxx:1661
 TGButton.cxx:1662
 TGButton.cxx:1663
 TGButton.cxx:1664
 TGButton.cxx:1665
 TGButton.cxx:1666
 TGButton.cxx:1667
 TGButton.cxx:1668
 TGButton.cxx:1669
 TGButton.cxx:1670
 TGButton.cxx:1671
 TGButton.cxx:1672
 TGButton.cxx:1673
 TGButton.cxx:1674
 TGButton.cxx:1675
 TGButton.cxx:1676
 TGButton.cxx:1677
 TGButton.cxx:1678
 TGButton.cxx:1679
 TGButton.cxx:1680
 TGButton.cxx:1681
 TGButton.cxx:1682
 TGButton.cxx:1683
 TGButton.cxx:1684
 TGButton.cxx:1685
 TGButton.cxx:1686
 TGButton.cxx:1687
 TGButton.cxx:1688
 TGButton.cxx:1689
 TGButton.cxx:1690
 TGButton.cxx:1691
 TGButton.cxx:1692
 TGButton.cxx:1693
 TGButton.cxx:1694
 TGButton.cxx:1695
 TGButton.cxx:1696
 TGButton.cxx:1697
 TGButton.cxx:1698
 TGButton.cxx:1699
 TGButton.cxx:1700
 TGButton.cxx:1701
 TGButton.cxx:1702
 TGButton.cxx:1703
 TGButton.cxx:1704
 TGButton.cxx:1705
 TGButton.cxx:1706
 TGButton.cxx:1707
 TGButton.cxx:1708
 TGButton.cxx:1709
 TGButton.cxx:1710
 TGButton.cxx:1711
 TGButton.cxx:1712
 TGButton.cxx:1713
 TGButton.cxx:1714
 TGButton.cxx:1715
 TGButton.cxx:1716
 TGButton.cxx:1717
 TGButton.cxx:1718
 TGButton.cxx:1719
 TGButton.cxx:1720
 TGButton.cxx:1721
 TGButton.cxx:1722
 TGButton.cxx:1723
 TGButton.cxx:1724
 TGButton.cxx:1725
 TGButton.cxx:1726
 TGButton.cxx:1727
 TGButton.cxx:1728
 TGButton.cxx:1729
 TGButton.cxx:1730
 TGButton.cxx:1731
 TGButton.cxx:1732
 TGButton.cxx:1733
 TGButton.cxx:1734
 TGButton.cxx:1735
 TGButton.cxx:1736
 TGButton.cxx:1737
 TGButton.cxx:1738
 TGButton.cxx:1739
 TGButton.cxx:1740
 TGButton.cxx:1741
 TGButton.cxx:1742
 TGButton.cxx:1743
 TGButton.cxx:1744
 TGButton.cxx:1745
 TGButton.cxx:1746
 TGButton.cxx:1747
 TGButton.cxx:1748
 TGButton.cxx:1749
 TGButton.cxx:1750
 TGButton.cxx:1751
 TGButton.cxx:1752
 TGButton.cxx:1753
 TGButton.cxx:1754
 TGButton.cxx:1755
 TGButton.cxx:1756
 TGButton.cxx:1757
 TGButton.cxx:1758
 TGButton.cxx:1759
 TGButton.cxx:1760
 TGButton.cxx:1761
 TGButton.cxx:1762
 TGButton.cxx:1763
 TGButton.cxx:1764
 TGButton.cxx:1765
 TGButton.cxx:1766
 TGButton.cxx:1767
 TGButton.cxx:1768
 TGButton.cxx:1769
 TGButton.cxx:1770
 TGButton.cxx:1771
 TGButton.cxx:1772
 TGButton.cxx:1773
 TGButton.cxx:1774
 TGButton.cxx:1775
 TGButton.cxx:1776
 TGButton.cxx:1777
 TGButton.cxx:1778
 TGButton.cxx:1779
 TGButton.cxx:1780
 TGButton.cxx:1781
 TGButton.cxx:1782
 TGButton.cxx:1783
 TGButton.cxx:1784
 TGButton.cxx:1785
 TGButton.cxx:1786
 TGButton.cxx:1787
 TGButton.cxx:1788
 TGButton.cxx:1789
 TGButton.cxx:1790
 TGButton.cxx:1791
 TGButton.cxx:1792
 TGButton.cxx:1793
 TGButton.cxx:1794
 TGButton.cxx:1795
 TGButton.cxx:1796
 TGButton.cxx:1797
 TGButton.cxx:1798
 TGButton.cxx:1799
 TGButton.cxx:1800
 TGButton.cxx:1801
 TGButton.cxx:1802
 TGButton.cxx:1803
 TGButton.cxx:1804
 TGButton.cxx:1805
 TGButton.cxx:1806
 TGButton.cxx:1807
 TGButton.cxx:1808
 TGButton.cxx:1809
 TGButton.cxx:1810
 TGButton.cxx:1811
 TGButton.cxx:1812
 TGButton.cxx:1813
 TGButton.cxx:1814
 TGButton.cxx:1815
 TGButton.cxx:1816
 TGButton.cxx:1817
 TGButton.cxx:1818
 TGButton.cxx:1819
 TGButton.cxx:1820
 TGButton.cxx:1821
 TGButton.cxx:1822
 TGButton.cxx:1823
 TGButton.cxx:1824
 TGButton.cxx:1825
 TGButton.cxx:1826
 TGButton.cxx:1827
 TGButton.cxx:1828
 TGButton.cxx:1829
 TGButton.cxx:1830
 TGButton.cxx:1831
 TGButton.cxx:1832
 TGButton.cxx:1833
 TGButton.cxx:1834
 TGButton.cxx:1835
 TGButton.cxx:1836
 TGButton.cxx:1837
 TGButton.cxx:1838
 TGButton.cxx:1839
 TGButton.cxx:1840
 TGButton.cxx:1841
 TGButton.cxx:1842
 TGButton.cxx:1843
 TGButton.cxx:1844
 TGButton.cxx:1845
 TGButton.cxx:1846
 TGButton.cxx:1847
 TGButton.cxx:1848
 TGButton.cxx:1849
 TGButton.cxx:1850
 TGButton.cxx:1851
 TGButton.cxx:1852
 TGButton.cxx:1853
 TGButton.cxx:1854
 TGButton.cxx:1855
 TGButton.cxx:1856
 TGButton.cxx:1857
 TGButton.cxx:1858
 TGButton.cxx:1859
 TGButton.cxx:1860
 TGButton.cxx:1861
 TGButton.cxx:1862
 TGButton.cxx:1863
 TGButton.cxx:1864
 TGButton.cxx:1865
 TGButton.cxx:1866
 TGButton.cxx:1867
 TGButton.cxx:1868
 TGButton.cxx:1869
 TGButton.cxx:1870
 TGButton.cxx:1871
 TGButton.cxx:1872
 TGButton.cxx:1873
 TGButton.cxx:1874
 TGButton.cxx:1875
 TGButton.cxx:1876
 TGButton.cxx:1877
 TGButton.cxx:1878
 TGButton.cxx:1879
 TGButton.cxx:1880
 TGButton.cxx:1881
 TGButton.cxx:1882
 TGButton.cxx:1883
 TGButton.cxx:1884
 TGButton.cxx:1885
 TGButton.cxx:1886
 TGButton.cxx:1887
 TGButton.cxx:1888
 TGButton.cxx:1889
 TGButton.cxx:1890
 TGButton.cxx:1891
 TGButton.cxx:1892
 TGButton.cxx:1893
 TGButton.cxx:1894
 TGButton.cxx:1895
 TGButton.cxx:1896
 TGButton.cxx:1897
 TGButton.cxx:1898
 TGButton.cxx:1899
 TGButton.cxx:1900
 TGButton.cxx:1901
 TGButton.cxx:1902
 TGButton.cxx:1903
 TGButton.cxx:1904
 TGButton.cxx:1905
 TGButton.cxx:1906
 TGButton.cxx:1907
 TGButton.cxx:1908
 TGButton.cxx:1909
 TGButton.cxx:1910
 TGButton.cxx:1911
 TGButton.cxx:1912
 TGButton.cxx:1913
 TGButton.cxx:1914
 TGButton.cxx:1915
 TGButton.cxx:1916
 TGButton.cxx:1917
 TGButton.cxx:1918
 TGButton.cxx:1919
 TGButton.cxx:1920
 TGButton.cxx:1921
 TGButton.cxx:1922
 TGButton.cxx:1923
 TGButton.cxx:1924
 TGButton.cxx:1925
 TGButton.cxx:1926
 TGButton.cxx:1927
 TGButton.cxx:1928
 TGButton.cxx:1929
 TGButton.cxx:1930
 TGButton.cxx:1931
 TGButton.cxx:1932
 TGButton.cxx:1933
 TGButton.cxx:1934
 TGButton.cxx:1935
 TGButton.cxx:1936
 TGButton.cxx:1937
 TGButton.cxx:1938
 TGButton.cxx:1939
 TGButton.cxx:1940
 TGButton.cxx:1941
 TGButton.cxx:1942
 TGButton.cxx:1943
 TGButton.cxx:1944
 TGButton.cxx:1945
 TGButton.cxx:1946
 TGButton.cxx:1947
 TGButton.cxx:1948
 TGButton.cxx:1949
 TGButton.cxx:1950
 TGButton.cxx:1951
 TGButton.cxx:1952
 TGButton.cxx:1953
 TGButton.cxx:1954
 TGButton.cxx:1955
 TGButton.cxx:1956
 TGButton.cxx:1957
 TGButton.cxx:1958
 TGButton.cxx:1959
 TGButton.cxx:1960
 TGButton.cxx:1961
 TGButton.cxx:1962
 TGButton.cxx:1963
 TGButton.cxx:1964
 TGButton.cxx:1965
 TGButton.cxx:1966
 TGButton.cxx:1967
 TGButton.cxx:1968
 TGButton.cxx:1969
 TGButton.cxx:1970
 TGButton.cxx:1971
 TGButton.cxx:1972
 TGButton.cxx:1973
 TGButton.cxx:1974
 TGButton.cxx:1975
 TGButton.cxx:1976
 TGButton.cxx:1977
 TGButton.cxx:1978
 TGButton.cxx:1979
 TGButton.cxx:1980
 TGButton.cxx:1981
 TGButton.cxx:1982
 TGButton.cxx:1983
 TGButton.cxx:1984
 TGButton.cxx:1985
 TGButton.cxx:1986
 TGButton.cxx:1987
 TGButton.cxx:1988
 TGButton.cxx:1989
 TGButton.cxx:1990
 TGButton.cxx:1991
 TGButton.cxx:1992
 TGButton.cxx:1993
 TGButton.cxx:1994
 TGButton.cxx:1995
 TGButton.cxx:1996
 TGButton.cxx:1997
 TGButton.cxx:1998
 TGButton.cxx:1999
 TGButton.cxx:2000
 TGButton.cxx:2001
 TGButton.cxx:2002
 TGButton.cxx:2003
 TGButton.cxx:2004
 TGButton.cxx:2005
 TGButton.cxx:2006
 TGButton.cxx:2007
 TGButton.cxx:2008
 TGButton.cxx:2009
 TGButton.cxx:2010
 TGButton.cxx:2011
 TGButton.cxx:2012
 TGButton.cxx:2013
 TGButton.cxx:2014
 TGButton.cxx:2015
 TGButton.cxx:2016
 TGButton.cxx:2017
 TGButton.cxx:2018
 TGButton.cxx:2019
 TGButton.cxx:2020
 TGButton.cxx:2021
 TGButton.cxx:2022
 TGButton.cxx:2023
 TGButton.cxx:2024
 TGButton.cxx:2025
 TGButton.cxx:2026
 TGButton.cxx:2027
 TGButton.cxx:2028
 TGButton.cxx:2029
 TGButton.cxx:2030
 TGButton.cxx:2031
 TGButton.cxx:2032
 TGButton.cxx:2033
 TGButton.cxx:2034
 TGButton.cxx:2035
 TGButton.cxx:2036
 TGButton.cxx:2037
 TGButton.cxx:2038
 TGButton.cxx:2039
 TGButton.cxx:2040
 TGButton.cxx:2041
 TGButton.cxx:2042
 TGButton.cxx:2043
 TGButton.cxx:2044
 TGButton.cxx:2045
 TGButton.cxx:2046
 TGButton.cxx:2047
 TGButton.cxx:2048
 TGButton.cxx:2049
 TGButton.cxx:2050
 TGButton.cxx:2051
 TGButton.cxx:2052
 TGButton.cxx:2053
 TGButton.cxx:2054
 TGButton.cxx:2055
 TGButton.cxx:2056
 TGButton.cxx:2057
 TGButton.cxx:2058
 TGButton.cxx:2059
 TGButton.cxx:2060
 TGButton.cxx:2061
 TGButton.cxx:2062
 TGButton.cxx:2063
 TGButton.cxx:2064
 TGButton.cxx:2065
 TGButton.cxx:2066
 TGButton.cxx:2067
 TGButton.cxx:2068
 TGButton.cxx:2069
 TGButton.cxx:2070
 TGButton.cxx:2071
 TGButton.cxx:2072
 TGButton.cxx:2073
 TGButton.cxx:2074
 TGButton.cxx:2075
 TGButton.cxx:2076
 TGButton.cxx:2077
 TGButton.cxx:2078
 TGButton.cxx:2079
 TGButton.cxx:2080
 TGButton.cxx:2081
 TGButton.cxx:2082
 TGButton.cxx:2083
 TGButton.cxx:2084
 TGButton.cxx:2085
 TGButton.cxx:2086
 TGButton.cxx:2087
 TGButton.cxx:2088
 TGButton.cxx:2089
 TGButton.cxx:2090
 TGButton.cxx:2091
 TGButton.cxx:2092
 TGButton.cxx:2093
 TGButton.cxx:2094
 TGButton.cxx:2095
 TGButton.cxx:2096
 TGButton.cxx:2097
 TGButton.cxx:2098
 TGButton.cxx:2099
 TGButton.cxx:2100
 TGButton.cxx:2101
 TGButton.cxx:2102
 TGButton.cxx:2103
 TGButton.cxx:2104
 TGButton.cxx:2105
 TGButton.cxx:2106
 TGButton.cxx:2107
 TGButton.cxx:2108
 TGButton.cxx:2109
 TGButton.cxx:2110
 TGButton.cxx:2111
 TGButton.cxx:2112
 TGButton.cxx:2113
 TGButton.cxx:2114
 TGButton.cxx:2115
 TGButton.cxx:2116
 TGButton.cxx:2117
 TGButton.cxx:2118
 TGButton.cxx:2119
 TGButton.cxx:2120
 TGButton.cxx:2121
 TGButton.cxx:2122
 TGButton.cxx:2123
 TGButton.cxx:2124
 TGButton.cxx:2125
 TGButton.cxx:2126
 TGButton.cxx:2127
 TGButton.cxx:2128
 TGButton.cxx:2129
 TGButton.cxx:2130
 TGButton.cxx:2131
 TGButton.cxx:2132
 TGButton.cxx:2133
 TGButton.cxx:2134
 TGButton.cxx:2135
 TGButton.cxx:2136
 TGButton.cxx:2137
 TGButton.cxx:2138
 TGButton.cxx:2139
 TGButton.cxx:2140
 TGButton.cxx:2141
 TGButton.cxx:2142
 TGButton.cxx:2143
 TGButton.cxx:2144
 TGButton.cxx:2145
 TGButton.cxx:2146
 TGButton.cxx:2147
 TGButton.cxx:2148
 TGButton.cxx:2149
 TGButton.cxx:2150
 TGButton.cxx:2151
 TGButton.cxx:2152
 TGButton.cxx:2153
 TGButton.cxx:2154
 TGButton.cxx:2155
 TGButton.cxx:2156
 TGButton.cxx:2157
 TGButton.cxx:2158
 TGButton.cxx:2159
 TGButton.cxx:2160
 TGButton.cxx:2161
 TGButton.cxx:2162
 TGButton.cxx:2163
 TGButton.cxx:2164
 TGButton.cxx:2165
 TGButton.cxx:2166
 TGButton.cxx:2167
 TGButton.cxx:2168
 TGButton.cxx:2169
 TGButton.cxx:2170
 TGButton.cxx:2171
 TGButton.cxx:2172
 TGButton.cxx:2173
 TGButton.cxx:2174
 TGButton.cxx:2175
 TGButton.cxx:2176
 TGButton.cxx:2177
 TGButton.cxx:2178
 TGButton.cxx:2179
 TGButton.cxx:2180
 TGButton.cxx:2181
 TGButton.cxx:2182
 TGButton.cxx:2183
 TGButton.cxx:2184
 TGButton.cxx:2185
 TGButton.cxx:2186
 TGButton.cxx:2187
 TGButton.cxx:2188
 TGButton.cxx:2189
 TGButton.cxx:2190
 TGButton.cxx:2191
 TGButton.cxx:2192
 TGButton.cxx:2193
 TGButton.cxx:2194
 TGButton.cxx:2195
 TGButton.cxx:2196
 TGButton.cxx:2197
 TGButton.cxx:2198
 TGButton.cxx:2199
 TGButton.cxx:2200
 TGButton.cxx:2201
 TGButton.cxx:2202
 TGButton.cxx:2203
 TGButton.cxx:2204
 TGButton.cxx:2205
 TGButton.cxx:2206
 TGButton.cxx:2207
 TGButton.cxx:2208
 TGButton.cxx:2209
 TGButton.cxx:2210
 TGButton.cxx:2211
 TGButton.cxx:2212
 TGButton.cxx:2213
 TGButton.cxx:2214
 TGButton.cxx:2215
 TGButton.cxx:2216
 TGButton.cxx:2217
 TGButton.cxx:2218
 TGButton.cxx:2219
 TGButton.cxx:2220
 TGButton.cxx:2221
 TGButton.cxx:2222
 TGButton.cxx:2223
 TGButton.cxx:2224
 TGButton.cxx:2225
 TGButton.cxx:2226
 TGButton.cxx:2227
 TGButton.cxx:2228
 TGButton.cxx:2229
 TGButton.cxx:2230
 TGButton.cxx:2231
 TGButton.cxx:2232
 TGButton.cxx:2233
 TGButton.cxx:2234
 TGButton.cxx:2235
 TGButton.cxx:2236
 TGButton.cxx:2237
 TGButton.cxx:2238
 TGButton.cxx:2239
 TGButton.cxx:2240
 TGButton.cxx:2241
 TGButton.cxx:2242
 TGButton.cxx:2243
 TGButton.cxx:2244
 TGButton.cxx:2245
 TGButton.cxx:2246
 TGButton.cxx:2247
 TGButton.cxx:2248
 TGButton.cxx:2249
 TGButton.cxx:2250
 TGButton.cxx:2251
 TGButton.cxx:2252
 TGButton.cxx:2253
 TGButton.cxx:2254
 TGButton.cxx:2255
 TGButton.cxx:2256
 TGButton.cxx:2257
 TGButton.cxx:2258
 TGButton.cxx:2259
 TGButton.cxx:2260
 TGButton.cxx:2261
 TGButton.cxx:2262
 TGButton.cxx:2263
 TGButton.cxx:2264
 TGButton.cxx:2265
 TGButton.cxx:2266
 TGButton.cxx:2267
 TGButton.cxx:2268
 TGButton.cxx:2269
 TGButton.cxx:2270
 TGButton.cxx:2271
 TGButton.cxx:2272
 TGButton.cxx:2273
 TGButton.cxx:2274
 TGButton.cxx:2275
 TGButton.cxx:2276
 TGButton.cxx:2277
 TGButton.cxx:2278
 TGButton.cxx:2279
 TGButton.cxx:2280
 TGButton.cxx:2281
 TGButton.cxx:2282
 TGButton.cxx:2283
 TGButton.cxx:2284
 TGButton.cxx:2285
 TGButton.cxx:2286
 TGButton.cxx:2287
 TGButton.cxx:2288
 TGButton.cxx:2289
 TGButton.cxx:2290
 TGButton.cxx:2291
 TGButton.cxx:2292
 TGButton.cxx:2293
 TGButton.cxx:2294
 TGButton.cxx:2295
 TGButton.cxx:2296
 TGButton.cxx:2297
 TGButton.cxx:2298
 TGButton.cxx:2299
 TGButton.cxx:2300
 TGButton.cxx:2301
 TGButton.cxx:2302
 TGButton.cxx:2303
 TGButton.cxx:2304
 TGButton.cxx:2305
 TGButton.cxx:2306
 TGButton.cxx:2307
 TGButton.cxx:2308
 TGButton.cxx:2309
 TGButton.cxx:2310
 TGButton.cxx:2311
 TGButton.cxx:2312
 TGButton.cxx:2313
 TGButton.cxx:2314
 TGButton.cxx:2315
 TGButton.cxx:2316
 TGButton.cxx:2317
 TGButton.cxx:2318
 TGButton.cxx:2319
 TGButton.cxx:2320
 TGButton.cxx:2321
 TGButton.cxx:2322
 TGButton.cxx:2323
 TGButton.cxx:2324
 TGButton.cxx:2325
 TGButton.cxx:2326
 TGButton.cxx:2327
 TGButton.cxx:2328
 TGButton.cxx:2329
 TGButton.cxx:2330
 TGButton.cxx:2331
 TGButton.cxx:2332
 TGButton.cxx:2333
 TGButton.cxx:2334
 TGButton.cxx:2335
 TGButton.cxx:2336
 TGButton.cxx:2337
 TGButton.cxx:2338
 TGButton.cxx:2339
 TGButton.cxx:2340
 TGButton.cxx:2341
 TGButton.cxx:2342
 TGButton.cxx:2343
 TGButton.cxx:2344
 TGButton.cxx:2345
 TGButton.cxx:2346
 TGButton.cxx:2347
 TGButton.cxx:2348
 TGButton.cxx:2349
 TGButton.cxx:2350
 TGButton.cxx:2351
 TGButton.cxx:2352
 TGButton.cxx:2353
 TGButton.cxx:2354
 TGButton.cxx:2355
 TGButton.cxx:2356
 TGButton.cxx:2357
 TGButton.cxx:2358
 TGButton.cxx:2359
 TGButton.cxx:2360
 TGButton.cxx:2361
 TGButton.cxx:2362
 TGButton.cxx:2363
 TGButton.cxx:2364
 TGButton.cxx:2365
 TGButton.cxx:2366
 TGButton.cxx:2367
 TGButton.cxx:2368
 TGButton.cxx:2369
 TGButton.cxx:2370
 TGButton.cxx:2371
 TGButton.cxx:2372
 TGButton.cxx:2373
 TGButton.cxx:2374
 TGButton.cxx:2375
 TGButton.cxx:2376
 TGButton.cxx:2377
 TGButton.cxx:2378
 TGButton.cxx:2379
 TGButton.cxx:2380
 TGButton.cxx:2381
 TGButton.cxx:2382
 TGButton.cxx:2383
 TGButton.cxx:2384
 TGButton.cxx:2385
 TGButton.cxx:2386
 TGButton.cxx:2387
 TGButton.cxx:2388
 TGButton.cxx:2389
 TGButton.cxx:2390
 TGButton.cxx:2391
 TGButton.cxx:2392
 TGButton.cxx:2393
 TGButton.cxx:2394
 TGButton.cxx:2395
 TGButton.cxx:2396
 TGButton.cxx:2397
 TGButton.cxx:2398
 TGButton.cxx:2399
 TGButton.cxx:2400
 TGButton.cxx:2401
 TGButton.cxx:2402
 TGButton.cxx:2403
 TGButton.cxx:2404
 TGButton.cxx:2405
 TGButton.cxx:2406
 TGButton.cxx:2407
 TGButton.cxx:2408
 TGButton.cxx:2409
 TGButton.cxx:2410
 TGButton.cxx:2411
 TGButton.cxx:2412
 TGButton.cxx:2413
 TGButton.cxx:2414
 TGButton.cxx:2415
 TGButton.cxx:2416
 TGButton.cxx:2417
 TGButton.cxx:2418
 TGButton.cxx:2419
 TGButton.cxx:2420
 TGButton.cxx:2421
 TGButton.cxx:2422
 TGButton.cxx:2423
 TGButton.cxx:2424
 TGButton.cxx:2425
 TGButton.cxx:2426
 TGButton.cxx:2427
 TGButton.cxx:2428
 TGButton.cxx:2429
 TGButton.cxx:2430
 TGButton.cxx:2431
 TGButton.cxx:2432
 TGButton.cxx:2433
 TGButton.cxx:2434
 TGButton.cxx:2435
 TGButton.cxx:2436
 TGButton.cxx:2437
 TGButton.cxx:2438
 TGButton.cxx:2439
 TGButton.cxx:2440
 TGButton.cxx:2441
 TGButton.cxx:2442
 TGButton.cxx:2443
 TGButton.cxx:2444
 TGButton.cxx:2445
 TGButton.cxx:2446
 TGButton.cxx:2447
 TGButton.cxx:2448
 TGButton.cxx:2449
 TGButton.cxx:2450
 TGButton.cxx:2451
 TGButton.cxx:2452
 TGButton.cxx:2453
 TGButton.cxx:2454
 TGButton.cxx:2455
 TGButton.cxx:2456
 TGButton.cxx:2457
 TGButton.cxx:2458
 TGButton.cxx:2459
 TGButton.cxx:2460
 TGButton.cxx:2461
 TGButton.cxx:2462
 TGButton.cxx:2463
 TGButton.cxx:2464
 TGButton.cxx:2465
 TGButton.cxx:2466
 TGButton.cxx:2467
 TGButton.cxx:2468
 TGButton.cxx:2469
 TGButton.cxx:2470
 TGButton.cxx:2471
 TGButton.cxx:2472
 TGButton.cxx:2473
 TGButton.cxx:2474
 TGButton.cxx:2475
 TGButton.cxx:2476
 TGButton.cxx:2477
 TGButton.cxx:2478
 TGButton.cxx:2479
 TGButton.cxx:2480
 TGButton.cxx:2481
 TGButton.cxx:2482
 TGButton.cxx:2483
 TGButton.cxx:2484
 TGButton.cxx:2485
 TGButton.cxx:2486
 TGButton.cxx:2487
 TGButton.cxx:2488
 TGButton.cxx:2489
 TGButton.cxx:2490
 TGButton.cxx:2491
 TGButton.cxx:2492
 TGButton.cxx:2493
 TGButton.cxx:2494
 TGButton.cxx:2495
 TGButton.cxx:2496
 TGButton.cxx:2497
 TGButton.cxx:2498
 TGButton.cxx:2499
 TGButton.cxx:2500
 TGButton.cxx:2501
 TGButton.cxx:2502
 TGButton.cxx:2503
 TGButton.cxx:2504
 TGButton.cxx:2505
 TGButton.cxx:2506
 TGButton.cxx:2507
 TGButton.cxx:2508
 TGButton.cxx:2509
 TGButton.cxx:2510
 TGButton.cxx:2511
 TGButton.cxx:2512
 TGButton.cxx:2513
 TGButton.cxx:2514
 TGButton.cxx:2515
 TGButton.cxx:2516
 TGButton.cxx:2517
 TGButton.cxx:2518
 TGButton.cxx:2519
 TGButton.cxx:2520
 TGButton.cxx:2521
 TGButton.cxx:2522
 TGButton.cxx:2523
 TGButton.cxx:2524
 TGButton.cxx:2525
 TGButton.cxx:2526
 TGButton.cxx:2527
 TGButton.cxx:2528
 TGButton.cxx:2529
 TGButton.cxx:2530
 TGButton.cxx:2531
 TGButton.cxx:2532
 TGButton.cxx:2533
 TGButton.cxx:2534
 TGButton.cxx:2535
 TGButton.cxx:2536
 TGButton.cxx:2537
 TGButton.cxx:2538
 TGButton.cxx:2539
 TGButton.cxx:2540
 TGButton.cxx:2541
 TGButton.cxx:2542
 TGButton.cxx:2543
 TGButton.cxx:2544
 TGButton.cxx:2545
 TGButton.cxx:2546
 TGButton.cxx:2547
 TGButton.cxx:2548
 TGButton.cxx:2549
 TGButton.cxx:2550
 TGButton.cxx:2551
 TGButton.cxx:2552
 TGButton.cxx:2553
 TGButton.cxx:2554
 TGButton.cxx:2555
 TGButton.cxx:2556
 TGButton.cxx:2557
 TGButton.cxx:2558
 TGButton.cxx:2559
 TGButton.cxx:2560
 TGButton.cxx:2561
 TGButton.cxx:2562
 TGButton.cxx:2563
 TGButton.cxx:2564
 TGButton.cxx:2565
 TGButton.cxx:2566
 TGButton.cxx:2567
 TGButton.cxx:2568
 TGButton.cxx:2569
 TGButton.cxx:2570
 TGButton.cxx:2571
 TGButton.cxx:2572
 TGButton.cxx:2573
 TGButton.cxx:2574
 TGButton.cxx:2575
 TGButton.cxx:2576
 TGButton.cxx:2577
 TGButton.cxx:2578
 TGButton.cxx:2579
 TGButton.cxx:2580
 TGButton.cxx:2581
 TGButton.cxx:2582
 TGButton.cxx:2583
 TGButton.cxx:2584
 TGButton.cxx:2585
 TGButton.cxx:2586
 TGButton.cxx:2587
 TGButton.cxx:2588
 TGButton.cxx:2589
 TGButton.cxx:2590
 TGButton.cxx:2591
 TGButton.cxx:2592
 TGButton.cxx:2593
 TGButton.cxx:2594
 TGButton.cxx:2595
 TGButton.cxx:2596
 TGButton.cxx:2597
 TGButton.cxx:2598
 TGButton.cxx:2599
 TGButton.cxx:2600
 TGButton.cxx:2601
 TGButton.cxx:2602
 TGButton.cxx:2603
 TGButton.cxx:2604
 TGButton.cxx:2605
 TGButton.cxx:2606
 TGButton.cxx:2607
 TGButton.cxx:2608
 TGButton.cxx:2609
 TGButton.cxx:2610
 TGButton.cxx:2611
 TGButton.cxx:2612
 TGButton.cxx:2613
 TGButton.cxx:2614
 TGButton.cxx:2615
 TGButton.cxx:2616
 TGButton.cxx:2617
 TGButton.cxx:2618
 TGButton.cxx:2619
 TGButton.cxx:2620
 TGButton.cxx:2621
 TGButton.cxx:2622
 TGButton.cxx:2623
 TGButton.cxx:2624
 TGButton.cxx:2625
 TGButton.cxx:2626
 TGButton.cxx:2627
 TGButton.cxx:2628
 TGButton.cxx:2629
 TGButton.cxx:2630
 TGButton.cxx:2631
 TGButton.cxx:2632
 TGButton.cxx:2633
 TGButton.cxx:2634
 TGButton.cxx:2635
 TGButton.cxx:2636
 TGButton.cxx:2637
 TGButton.cxx:2638
 TGButton.cxx:2639
 TGButton.cxx:2640
 TGButton.cxx:2641
 TGButton.cxx:2642
 TGButton.cxx:2643
 TGButton.cxx:2644
 TGButton.cxx:2645
 TGButton.cxx:2646
 TGButton.cxx:2647
 TGButton.cxx:2648
 TGButton.cxx:2649
 TGButton.cxx:2650
 TGButton.cxx:2651
 TGButton.cxx:2652
 TGButton.cxx:2653
 TGButton.cxx:2654
 TGButton.cxx:2655
 TGButton.cxx:2656
 TGButton.cxx:2657
 TGButton.cxx:2658
 TGButton.cxx:2659
 TGButton.cxx:2660
 TGButton.cxx:2661
 TGButton.cxx:2662
 TGButton.cxx:2663
 TGButton.cxx:2664
 TGButton.cxx:2665
 TGButton.cxx:2666
 TGButton.cxx:2667
 TGButton.cxx:2668
 TGButton.cxx:2669
 TGButton.cxx:2670
 TGButton.cxx:2671
 TGButton.cxx:2672
 TGButton.cxx:2673
 TGButton.cxx:2674
 TGButton.cxx:2675
 TGButton.cxx:2676
 TGButton.cxx:2677
 TGButton.cxx:2678
 TGButton.cxx:2679
 TGButton.cxx:2680
 TGButton.cxx:2681
 TGButton.cxx:2682
 TGButton.cxx:2683
 TGButton.cxx:2684
 TGButton.cxx:2685
 TGButton.cxx:2686
 TGButton.cxx:2687
 TGButton.cxx:2688
 TGButton.cxx:2689
 TGButton.cxx:2690
 TGButton.cxx:2691
 TGButton.cxx:2692
 TGButton.cxx:2693
 TGButton.cxx:2694
 TGButton.cxx:2695
 TGButton.cxx:2696
 TGButton.cxx:2697
 TGButton.cxx:2698
 TGButton.cxx:2699
 TGButton.cxx:2700
 TGButton.cxx:2701
 TGButton.cxx:2702
 TGButton.cxx:2703
 TGButton.cxx:2704
 TGButton.cxx:2705
 TGButton.cxx:2706
 TGButton.cxx:2707
 TGButton.cxx:2708
 TGButton.cxx:2709
 TGButton.cxx:2710
 TGButton.cxx:2711
 TGButton.cxx:2712
 TGButton.cxx:2713
 TGButton.cxx:2714
 TGButton.cxx:2715
 TGButton.cxx:2716
 TGButton.cxx:2717
 TGButton.cxx:2718
 TGButton.cxx:2719
 TGButton.cxx:2720
 TGButton.cxx:2721
 TGButton.cxx:2722
 TGButton.cxx:2723
 TGButton.cxx:2724
 TGButton.cxx:2725
 TGButton.cxx:2726
 TGButton.cxx:2727
 TGButton.cxx:2728
 TGButton.cxx:2729
 TGButton.cxx:2730
 TGButton.cxx:2731
 TGButton.cxx:2732
 TGButton.cxx:2733
 TGButton.cxx:2734
 TGButton.cxx:2735
 TGButton.cxx:2736
 TGButton.cxx:2737
 TGButton.cxx:2738
 TGButton.cxx:2739
 TGButton.cxx:2740
 TGButton.cxx:2741
 TGButton.cxx:2742
 TGButton.cxx:2743
 TGButton.cxx:2744
 TGButton.cxx:2745
 TGButton.cxx:2746
 TGButton.cxx:2747
 TGButton.cxx:2748
 TGButton.cxx:2749
 TGButton.cxx:2750
 TGButton.cxx:2751
 TGButton.cxx:2752
 TGButton.cxx:2753
 TGButton.cxx:2754
 TGButton.cxx:2755
 TGButton.cxx:2756
 TGButton.cxx:2757
 TGButton.cxx:2758
 TGButton.cxx:2759
 TGButton.cxx:2760
 TGButton.cxx:2761
 TGButton.cxx:2762
 TGButton.cxx:2763
 TGButton.cxx:2764
 TGButton.cxx:2765
 TGButton.cxx:2766
 TGButton.cxx:2767
 TGButton.cxx:2768
 TGButton.cxx:2769
 TGButton.cxx:2770
 TGButton.cxx:2771
 TGButton.cxx:2772
 TGButton.cxx:2773
 TGButton.cxx:2774
 TGButton.cxx:2775
 TGButton.cxx:2776
 TGButton.cxx:2777
 TGButton.cxx:2778
 TGButton.cxx:2779
 TGButton.cxx:2780
 TGButton.cxx:2781
 TGButton.cxx:2782
 TGButton.cxx:2783
 TGButton.cxx:2784
 TGButton.cxx:2785
 TGButton.cxx:2786
 TGButton.cxx:2787
 TGButton.cxx:2788
 TGButton.cxx:2789
 TGButton.cxx:2790
 TGButton.cxx:2791
 TGButton.cxx:2792
 TGButton.cxx:2793
 TGButton.cxx:2794
 TGButton.cxx:2795
 TGButton.cxx:2796
 TGButton.cxx:2797
 TGButton.cxx:2798
 TGButton.cxx:2799
 TGButton.cxx:2800
 TGButton.cxx:2801
 TGButton.cxx:2802
 TGButton.cxx:2803
 TGButton.cxx:2804
 TGButton.cxx:2805
 TGButton.cxx:2806
 TGButton.cxx:2807
 TGButton.cxx:2808
 TGButton.cxx:2809
 TGButton.cxx:2810
 TGButton.cxx:2811
 TGButton.cxx:2812
 TGButton.cxx:2813
 TGButton.cxx:2814
 TGButton.cxx:2815
 TGButton.cxx:2816
 TGButton.cxx:2817
 TGButton.cxx:2818
 TGButton.cxx:2819
 TGButton.cxx:2820
 TGButton.cxx:2821
 TGButton.cxx:2822
 TGButton.cxx:2823
 TGButton.cxx:2824
 TGButton.cxx:2825
 TGButton.cxx:2826
 TGButton.cxx:2827
 TGButton.cxx:2828
 TGButton.cxx:2829
 TGButton.cxx:2830
 TGButton.cxx:2831
 TGButton.cxx:2832
 TGButton.cxx:2833
 TGButton.cxx:2834
 TGButton.cxx:2835
 TGButton.cxx:2836
 TGButton.cxx:2837
 TGButton.cxx:2838
 TGButton.cxx:2839
 TGButton.cxx:2840
 TGButton.cxx:2841
 TGButton.cxx:2842
 TGButton.cxx:2843
 TGButton.cxx:2844
 TGButton.cxx:2845
 TGButton.cxx:2846
 TGButton.cxx:2847
 TGButton.cxx:2848
 TGButton.cxx:2849
 TGButton.cxx:2850
 TGButton.cxx:2851
 TGButton.cxx:2852
 TGButton.cxx:2853
 TGButton.cxx:2854
 TGButton.cxx:2855
 TGButton.cxx:2856
 TGButton.cxx:2857
 TGButton.cxx:2858
 TGButton.cxx:2859
 TGButton.cxx:2860
 TGButton.cxx:2861
 TGButton.cxx:2862
 TGButton.cxx:2863
 TGButton.cxx:2864
 TGButton.cxx:2865
 TGButton.cxx:2866
 TGButton.cxx:2867
 TGButton.cxx:2868
 TGButton.cxx:2869
 TGButton.cxx:2870
 TGButton.cxx:2871
 TGButton.cxx:2872
 TGButton.cxx:2873
 TGButton.cxx:2874
 TGButton.cxx:2875
 TGButton.cxx:2876
 TGButton.cxx:2877
 TGButton.cxx:2878
 TGButton.cxx:2879
 TGButton.cxx:2880
 TGButton.cxx:2881
 TGButton.cxx:2882
 TGButton.cxx:2883
 TGButton.cxx:2884
 TGButton.cxx:2885
 TGButton.cxx:2886
 TGButton.cxx:2887
 TGButton.cxx:2888
 TGButton.cxx:2889
 TGButton.cxx:2890
 TGButton.cxx:2891
 TGButton.cxx:2892
 TGButton.cxx:2893
 TGButton.cxx:2894
 TGButton.cxx:2895
 TGButton.cxx:2896
 TGButton.cxx:2897
 TGButton.cxx:2898
 TGButton.cxx:2899
 TGButton.cxx:2900
 TGButton.cxx:2901
 TGButton.cxx:2902
 TGButton.cxx:2903
 TGButton.cxx:2904
 TGButton.cxx:2905
 TGButton.cxx:2906
 TGButton.cxx:2907
 TGButton.cxx:2908
 TGButton.cxx:2909
 TGButton.cxx:2910
 TGButton.cxx:2911
 TGButton.cxx:2912
 TGButton.cxx:2913
 TGButton.cxx:2914
 TGButton.cxx:2915
 TGButton.cxx:2916
 TGButton.cxx:2917
 TGButton.cxx:2918
 TGButton.cxx:2919
 TGButton.cxx:2920
 TGButton.cxx:2921
 TGButton.cxx:2922
 TGButton.cxx:2923
 TGButton.cxx:2924
 TGButton.cxx:2925
 TGButton.cxx:2926
 TGButton.cxx:2927
 TGButton.cxx:2928
 TGButton.cxx:2929
 TGButton.cxx:2930
 TGButton.cxx:2931
 TGButton.cxx:2932
 TGButton.cxx:2933
 TGButton.cxx:2934
 TGButton.cxx:2935
 TGButton.cxx:2936
 TGButton.cxx:2937
 TGButton.cxx:2938
 TGButton.cxx:2939
 TGButton.cxx:2940
 TGButton.cxx:2941
 TGButton.cxx:2942
 TGButton.cxx:2943
 TGButton.cxx:2944
 TGButton.cxx:2945
 TGButton.cxx:2946
 TGButton.cxx:2947
 TGButton.cxx:2948
 TGButton.cxx:2949
 TGButton.cxx:2950
 TGButton.cxx:2951
 TGButton.cxx:2952
 TGButton.cxx:2953
 TGButton.cxx:2954
 TGButton.cxx:2955
 TGButton.cxx:2956
 TGButton.cxx:2957
 TGButton.cxx:2958
 TGButton.cxx:2959
 TGButton.cxx:2960
 TGButton.cxx:2961
 TGButton.cxx:2962
 TGButton.cxx:2963
 TGButton.cxx:2964
 TGButton.cxx:2965
 TGButton.cxx:2966
 TGButton.cxx:2967
 TGButton.cxx:2968
 TGButton.cxx:2969
 TGButton.cxx:2970
 TGButton.cxx:2971
 TGButton.cxx:2972
 TGButton.cxx:2973
 TGButton.cxx:2974
 TGButton.cxx:2975
 TGButton.cxx:2976
 TGButton.cxx:2977
 TGButton.cxx:2978
 TGButton.cxx:2979
 TGButton.cxx:2980
 TGButton.cxx:2981
 TGButton.cxx:2982
 TGButton.cxx:2983
 TGButton.cxx:2984
 TGButton.cxx:2985
 TGButton.cxx:2986
 TGButton.cxx:2987
 TGButton.cxx:2988
 TGButton.cxx:2989
 TGButton.cxx:2990
 TGButton.cxx:2991
 TGButton.cxx:2992
 TGButton.cxx:2993
 TGButton.cxx:2994
 TGButton.cxx:2995
 TGButton.cxx:2996
 TGButton.cxx:2997
 TGButton.cxx:2998
 TGButton.cxx:2999
 TGButton.cxx:3000
 TGButton.cxx:3001
 TGButton.cxx:3002
 TGButton.cxx:3003
 TGButton.cxx:3004
 TGButton.cxx:3005
 TGButton.cxx:3006
 TGButton.cxx:3007
 TGButton.cxx:3008
 TGButton.cxx:3009
 TGButton.cxx:3010
 TGButton.cxx:3011
 TGButton.cxx:3012
 TGButton.cxx:3013
 TGButton.cxx:3014
 TGButton.cxx:3015
 TGButton.cxx:3016
 TGButton.cxx:3017
 TGButton.cxx:3018
 TGButton.cxx:3019
 TGButton.cxx:3020
 TGButton.cxx:3021
 TGButton.cxx:3022
 TGButton.cxx:3023
 TGButton.cxx:3024
 TGButton.cxx:3025
 TGButton.cxx:3026
 TGButton.cxx:3027
 TGButton.cxx:3028
 TGButton.cxx:3029
 TGButton.cxx:3030
 TGButton.cxx:3031
 TGButton.cxx:3032
 TGButton.cxx:3033
 TGButton.cxx:3034
 TGButton.cxx:3035
 TGButton.cxx:3036
 TGButton.cxx:3037
 TGButton.cxx:3038
 TGButton.cxx:3039
 TGButton.cxx:3040
 TGButton.cxx:3041
 TGButton.cxx:3042
 TGButton.cxx:3043
 TGButton.cxx:3044
 TGButton.cxx:3045
 TGButton.cxx:3046
 TGButton.cxx:3047
 TGButton.cxx:3048
 TGButton.cxx:3049
 TGButton.cxx:3050
 TGButton.cxx:3051
 TGButton.cxx:3052
 TGButton.cxx:3053
 TGButton.cxx:3054
 TGButton.cxx:3055
 TGButton.cxx:3056
 TGButton.cxx:3057
 TGButton.cxx:3058
 TGButton.cxx:3059
 TGButton.cxx:3060
 TGButton.cxx:3061
 TGButton.cxx:3062
 TGButton.cxx:3063
 TGButton.cxx:3064
 TGButton.cxx:3065
 TGButton.cxx:3066
 TGButton.cxx:3067
 TGButton.cxx:3068
 TGButton.cxx:3069
 TGButton.cxx:3070
 TGButton.cxx:3071
 TGButton.cxx:3072
 TGButton.cxx:3073
 TGButton.cxx:3074
 TGButton.cxx:3075
 TGButton.cxx:3076
 TGButton.cxx:3077
 TGButton.cxx:3078
 TGButton.cxx:3079
 TGButton.cxx:3080
 TGButton.cxx:3081
 TGButton.cxx:3082
 TGButton.cxx:3083
 TGButton.cxx:3084
 TGButton.cxx:3085
 TGButton.cxx:3086
 TGButton.cxx:3087
 TGButton.cxx:3088
 TGButton.cxx:3089
 TGButton.cxx:3090
 TGButton.cxx:3091
 TGButton.cxx:3092
 TGButton.cxx:3093
 TGButton.cxx:3094
 TGButton.cxx:3095
 TGButton.cxx:3096
 TGButton.cxx:3097
 TGButton.cxx:3098
 TGButton.cxx:3099
 TGButton.cxx:3100
 TGButton.cxx:3101
 TGButton.cxx:3102
 TGButton.cxx:3103
 TGButton.cxx:3104
 TGButton.cxx:3105
 TGButton.cxx:3106
 TGButton.cxx:3107
 TGButton.cxx:3108
 TGButton.cxx:3109
 TGButton.cxx:3110
 TGButton.cxx:3111
 TGButton.cxx:3112
 TGButton.cxx:3113
 TGButton.cxx:3114
 TGButton.cxx:3115
 TGButton.cxx:3116
 TGButton.cxx:3117
 TGButton.cxx:3118
 TGButton.cxx:3119
 TGButton.cxx:3120
 TGButton.cxx:3121
 TGButton.cxx:3122
 TGButton.cxx:3123
 TGButton.cxx:3124
 TGButton.cxx:3125
 TGButton.cxx:3126
 TGButton.cxx:3127
 TGButton.cxx:3128
 TGButton.cxx:3129
 TGButton.cxx:3130
 TGButton.cxx:3131
 TGButton.cxx:3132
 TGButton.cxx:3133
 TGButton.cxx:3134
 TGButton.cxx:3135
 TGButton.cxx:3136
 TGButton.cxx:3137
 TGButton.cxx:3138
 TGButton.cxx:3139
 TGButton.cxx:3140
 TGButton.cxx:3141
 TGButton.cxx:3142
 TGButton.cxx:3143
 TGButton.cxx:3144
 TGButton.cxx:3145
 TGButton.cxx:3146
 TGButton.cxx:3147
 TGButton.cxx:3148
 TGButton.cxx:3149
 TGButton.cxx:3150
 TGButton.cxx:3151
 TGButton.cxx:3152
 TGButton.cxx:3153
 TGButton.cxx:3154
 TGButton.cxx:3155
 TGButton.cxx:3156
 TGButton.cxx:3157
 TGButton.cxx:3158
 TGButton.cxx:3159
 TGButton.cxx:3160
 TGButton.cxx:3161
 TGButton.cxx:3162
 TGButton.cxx:3163
 TGButton.cxx:3164
 TGButton.cxx:3165
 TGButton.cxx:3166
 TGButton.cxx:3167
 TGButton.cxx:3168
 TGButton.cxx:3169
 TGButton.cxx:3170
 TGButton.cxx:3171
 TGButton.cxx:3172
 TGButton.cxx:3173
 TGButton.cxx:3174
 TGButton.cxx:3175
 TGButton.cxx:3176
 TGButton.cxx:3177
 TGButton.cxx:3178
 TGButton.cxx:3179
 TGButton.cxx:3180
 TGButton.cxx:3181
 TGButton.cxx:3182
 TGButton.cxx:3183
 TGButton.cxx:3184
 TGButton.cxx:3185
 TGButton.cxx:3186
 TGButton.cxx:3187
 TGButton.cxx:3188
 TGButton.cxx:3189