BesGMenuTitle Class Reference

#include <BesGMenuTitle.h>

List of all members.

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 ( 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

void BesGMenuTitle::DoRedraw (  )  [protected, virtual]

Definition at line 16 of file BesGMenuTitle.cxx.

References fPic, fPicHL, and x.

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 }

virtual void BesGMenuTitle::SetPicture ( Pixmap_t  pic  )  [inline, virtual]

Definition at line 28 of file BesGMenuTitle.h.

References fPic.

Referenced by BesClient::CreateMenuBar().

00028 { fPic   = pic; }

virtual void BesGMenuTitle::SetPictureHL ( Pixmap_t  pic  )  [inline, virtual]

Definition at line 29 of file BesGMenuTitle.h.

References fPicHL.

Referenced by BesClient::CreateMenuBar().

00029 { fPicHL = pic; }


Member Data Documentation

Pixmap_t BesGMenuTitle::fPic [protected]

Definition at line 16 of file BesGMenuTitle.h.

Referenced by DoRedraw(), and SetPicture().

Pixmap_t BesGMenuTitle::fPicHL [protected]

Definition at line 17 of file BesGMenuTitle.h.

Referenced by DoRedraw(), and SetPictureHL().


Generated on Tue Nov 29 23:17:31 2016 for BOSS_7.0.2 by  doxygen 1.4.7