#include <BesGPictureButton.h>
Public Member Functions | |
BesGPictureButton (const TGWindow *p=0, const char *pic=0, Int_t id=-1, GContext_t norm=GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder) | |
BesGPictureButton (const TGWindow *p, const TGPicture *pic, const char *cmd, Int_t id=-1, GContext_t norm=GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder) | |
BesGPictureButton (const TGWindow *p, const TGPicture *pic, Int_t id=-1, GContext_t norm=GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder) | |
BesGPictureButton (const TGWindow *p=0, const char *pic=0, Int_t id=-1, GContext_t norm=GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder) | |
BesGPictureButton (const TGWindow *p, const TGPicture *pic, const char *cmd, Int_t id=-1, GContext_t norm=GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder) | |
BesGPictureButton (const TGWindow *p, const TGPicture *pic, Int_t id=-1, GContext_t norm=GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder) | |
Bool_t | HandleCrossing (Event_t *event) |
Bool_t | HandleCrossing (Event_t *event) |
Bool_t | IsStateOn () |
Bool_t | IsStateOn () |
virtual void | SetPicture (const TGPicture *new_pic) |
virtual void | SetPicture (const TGPicture *new_pic) |
virtual void | SetPictureHL (const TGPicture *hl_pic) |
virtual void | SetPictureHL (const TGPicture *hl_pic) |
virtual void | SetState (Bool_t state) |
virtual void | SetState (Bool_t state) |
Protected Attributes | |
const TGPicture * | fPicHL |
const TGPicture * | fPicHL |
Bool_t | fState |
|
|
|
00021 : TGPictureButton(p, pic, cmd, id, norm, option) 00022 { 00023 fPicHL = 0; 00024 fState = false; 00025 }
|
|
00029 : TGPictureButton(p, pic, id, norm, option) 00030 { 00031 fPicHL = 0; 00032 fState = false; 00033 }
|
|
|
|
|
|
|
|
|
|
00037 { 00038 // Handle mouse crossing event. 00039 00040 static const TGPicture *picTemp; 00041 static Bool_t state; // state when entering 00042 00043 if (fPicHL) { 00044 if (event->fType == kEnterNotify) { 00045 picTemp = fPic; 00046 state = fState; 00047 SetPicture(fPicHL); 00048 } 00049 else { 00050 if (fState == state) SetPicture(picTemp); // if state unchanged, set to pic when cursor entering 00051 else SetPicture(fPic); // else, set to state pic 00052 } 00053 } 00054 00055 /* 00056 if (fTip) { 00057 if (event->fType == kEnterNotify) 00058 fTip->Reset(); 00059 else 00060 fTip->Hide(); 00061 } 00062 00063 if ((fgDbw != event->fWindow) || (fgReleaseBtn == event->fWindow)) return kTRUE; 00064 00065 if (!(event->fState & (kButton1Mask | kButton2Mask | kButton3Mask))) 00066 return kTRUE; 00067 00068 if (fState == kButtonEngaged || fState == kButtonDisabled) return kTRUE; 00069 00070 if (event->fType == kEnterNotify) { 00071 SetState(kButtonDown, kFALSE); 00072 } else { 00073 SetState(kButtonUp, kFALSE); 00074 } 00075 00076 */ 00077 TGButton::HandleCrossing(event); 00078 return kTRUE; 00079 }
|
|
00022 { return fState; }
|
|
00022 { return fState; }
|
|
|
|
00083 {
00084 // once you SetPicture, you show set the button state
00085 TGPictureButton::SetPicture(new_pic);
00086 }
|
|
00026 { fPicHL = hl_pic; }
|
|
00026 { fPicHL = hl_pic; }
|
|
00023 { fState = state; }
|
|
00023 { fState = state; }
|
|
|
|
|
|
|