#include <BesGMenuTitle.h>
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) | |
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 | SetPicture (Pixmap_t pic) |
virtual void | SetPictureHL (Pixmap_t pic) |
virtual void | SetPictureHL (Pixmap_t pic) |
Protected Member Functions | |
virtual void | DoRedraw () |
virtual void | DoRedraw () |
Protected Attributes | |
Pixmap_t | fPic |
Pixmap_t | fPicHL |
|
|
|
|
|
|
|
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 }
|
|
00028 { fPic = pic; }
|
|
00028 { fPic = pic; }
|
|
00029 { fPicHL = pic; }
|
|
00029 { fPicHL = pic; }
|
|
|
|
|