BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesGMenuTitle.cxx
Go to the documentation of this file.
1#include "BesVisLib/BesGMenuTitle.h"
2#include "TVirtualX.h"
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 fPic = 0;
11 fPicHL = 0;
12}
13
14//______________________________________________________________________________
16 // Draw a menu title.
17
18 TGFrame::DoRedraw();
19
20 int x, y, max_ascent, max_descent;
21 x = y = 4;
22
23 gVirtualX->GetFontProperties( fFontStruct, max_ascent, max_descent );
24
25 if ( fState )
26 {
27 if ( fPicHL ) SetBackgroundPixmap( fPicHL );
28 else SetBackgroundColor( GetDefaultSelectedBackground() );
29 gVirtualX->ClearWindow( fId );
30 fLabel->Draw( fId, fSelGC, x, y + max_ascent );
31 }
32 else
33 {
34 if ( fPic ) SetBackgroundPixmap( fPic );
35 else SetBackgroundColor( GetDefaultFrameBackground() );
36 gVirtualX->ClearWindow( fId );
37 fLabel->Draw( fId, fNormGC, x, y + max_ascent );
38 }
39}
ClassImp(BesGMenuTitle)
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)