/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/EventDisplay/BesVisLib/BesVisLib-00-04-04/src/BesGMenuTitle.cxx

Go to the documentation of this file.
00001 
00002 #include "BesVisLib/BesGMenuTitle.h"
00003 
00004 ClassImp(BesGMenuTitle)
00005 
00006 //______________________________________________________________________________
00007 BesGMenuTitle::BesGMenuTitle(const TGWindow *p, TGHotString *s, TGPopupMenu *menu,
00008                              GContext_t norm, FontStruct_t font, UInt_t options)
00009         : TGMenuTitle(p, s, menu, norm, font, options)
00010 {
00011     fPic   = 0;
00012     fPicHL = 0;
00013 }
00014 
00015 //______________________________________________________________________________
00016 void BesGMenuTitle::DoRedraw()
00017 {
00018     // Draw a menu title.
00019 
00020     TGFrame::DoRedraw();
00021 
00022     int x, y, max_ascent, max_descent;
00023     x = y = 4;
00024 
00025     gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
00026 
00027     if (fState) {
00028         if (fPicHL) SetBackgroundPixmap(fPicHL);
00029         else SetBackgroundColor(GetDefaultSelectedBackground());
00030         gVirtualX->ClearWindow(fId);
00031         fLabel->Draw(fId, fSelGC, x, y + max_ascent);
00032     } else {
00033         if (fPic) SetBackgroundPixmap(fPic);
00034         else SetBackgroundColor(GetDefaultFrameBackground());
00035         gVirtualX->ClearWindow(fId);
00036         fLabel->Draw(fId, fNormGC, x, y + max_ascent);
00037     }
00038 }

Generated on Tue Nov 29 23:12:04 2016 for BOSS_7.0.2 by  doxygen 1.4.7