CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
BesGMenuTitle Class Reference

#include <BesGMenuTitle.h>

+ Inheritance diagram for BesGMenuTitle:

Public Member Functions

 BesGMenuTitle (const TGWindow *p=0, TGHotString *s=0, TGPopupMenu *menu=0, GContext_t norm=GetDefaultGC()(), FontStruct_t font=GetDefaultFontStruct(), UInt_t options=0)
 
virtual void SetPicture (Pixmap_t pic)
 
virtual void SetPictureHL (Pixmap_t pic)
 

Protected Member Functions

virtual void DoRedraw ()
 

Protected Attributes

Pixmap_t fPic
 
Pixmap_t fPicHL
 

Detailed Description

Definition at line 12 of file BesGMenuTitle.h.

Constructor & Destructor Documentation

◆ BesGMenuTitle()

BesGMenuTitle::BesGMenuTitle ( const TGWindow *  p = 0,
TGHotString *  s = 0,
TGPopupMenu *  menu = 0,
GContext_t  norm = GetDefaultGC()(),
FontStruct_t  font = GetDefaultFontStruct(),
UInt_t  options = 0 
)

Member Function Documentation

◆ DoRedraw()

void BesGMenuTitle::DoRedraw ( )
protectedvirtual

Definition at line 16 of file BesGMenuTitle.cxx.

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}
Double_t x[10]
Pixmap_t fPic
Definition: BesGMenuTitle.h:16
Pixmap_t fPicHL
Definition: BesGMenuTitle.h:17

◆ SetPicture()

virtual void BesGMenuTitle::SetPicture ( Pixmap_t  pic)
inlinevirtual

Definition at line 28 of file BesGMenuTitle.h.

28{ fPic = pic; }

Referenced by BesClient::CreateMenuBar().

◆ SetPictureHL()

virtual void BesGMenuTitle::SetPictureHL ( Pixmap_t  pic)
inlinevirtual

Definition at line 29 of file BesGMenuTitle.h.

29{ fPicHL = pic; }

Referenced by BesClient::CreateMenuBar().

Member Data Documentation

◆ fPic

Pixmap_t BesGMenuTitle::fPic
protected

Definition at line 16 of file BesGMenuTitle.h.

Referenced by DoRedraw(), and SetPicture().

◆ fPicHL

Pixmap_t BesGMenuTitle::fPicHL
protected

Definition at line 17 of file BesGMenuTitle.h.

Referenced by DoRedraw(), and SetPictureHL().


The documentation for this class was generated from the following files: