CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
BesGMenuTitle.cxx
Go to the documentation of this file.
1
3
5
6//______________________________________________________________________________
7BesGMenuTitle::BesGMenuTitle(const TGWindow *p, TGHotString *s, TGPopupMenu *menu,
8 GContext_t norm, FontStruct_t font, UInt_t options)
9 : TGMenuTitle(p, s, menu, norm, font, options)
10{
11 fPic = 0;
12 fPicHL = 0;
13}
14
15//______________________________________________________________________________
17{
18 // Draw a menu title.
19
20 TGFrame::DoRedraw();
21
22 int x, y, max_ascent, max_descent;
23 x = y = 4;
24
25 gVirtualX->GetFontProperties(fFontStruct, max_ascent, max_descent);
26
27 if (fState) {
28 if (fPicHL) SetBackgroundPixmap(fPicHL);
29 else SetBackgroundColor(GetDefaultSelectedBackground());
30 gVirtualX->ClearWindow(fId);
31 fLabel->Draw(fId, fSelGC, x, y + max_ascent);
32 } else {
33 if (fPic) SetBackgroundPixmap(fPic);
34 else SetBackgroundColor(GetDefaultFrameBackground());
35 gVirtualX->ClearWindow(fId);
36 fLabel->Draw(fId, fNormGC, x, y + max_ascent);
37 }
38}
ClassImp(BesGMenuTitle) BesGMenuTitle
Double_t x[10]
XmlRpcServer s
virtual void DoRedraw()
BesGMenuTitle(const TGWindow *p=0, TGHotString *s=0, TGPopupMenu *menu=0, GContext_t norm=GetDefaultGC()(), FontStruct_t font=GetDefaultFontStruct(), UInt_t options=0)
Pixmap_t fPicHL