Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BesGPictureButton Class Reference

#include <BesGPictureButton.h>

List of all members.

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


Constructor & Destructor Documentation

BesGPictureButton::BesGPictureButton const TGWindow *  p,
const TGPicture *  pic,
Int_t  id = -1,
GContext_t  norm = GetDefaultGC()(),
UInt_t  option = kRaisedFrame|kDoubleBorder
 

BesGPictureButton::BesGPictureButton const TGWindow *  p,
const TGPicture *  pic,
const char *  cmd,
Int_t  id = -1,
GContext_t  norm = GetDefaultGC()(),
UInt_t  option = kRaisedFrame|kDoubleBorder
 

00021         : TGPictureButton(p, pic, cmd, id, norm, option)
00022 {
00023     fPicHL = 0;
00024     fState = false;
00025 }

BesGPictureButton::BesGPictureButton const TGWindow *  p = 0,
const char *  pic = 0,
Int_t  id = -1,
GContext_t  norm = GetDefaultGC()(),
UInt_t  option = kRaisedFrame|kDoubleBorder
 

00029                                                                                : TGPictureButton(p, pic, id, norm, option)
00030 {
00031     fPicHL = 0;
00032     fState = false;
00033 }

BesGPictureButton::BesGPictureButton const TGWindow *  p,
const TGPicture *  pic,
Int_t  id = -1,
GContext_t  norm = GetDefaultGC()(),
UInt_t  option = kRaisedFrame|kDoubleBorder
 

BesGPictureButton::BesGPictureButton const TGWindow *  p,
const TGPicture *  pic,
const char *  cmd,
Int_t  id = -1,
GContext_t  norm = GetDefaultGC()(),
UInt_t  option = kRaisedFrame|kDoubleBorder
 

BesGPictureButton::BesGPictureButton const TGWindow *  p = 0,
const char *  pic = 0,
Int_t  id = -1,
GContext_t  norm = GetDefaultGC()(),
UInt_t  option = kRaisedFrame|kDoubleBorder
 


Member Function Documentation

Bool_t BesGPictureButton::HandleCrossing Event_t *  event  ) 
 

Bool_t BesGPictureButton::HandleCrossing Event_t *  event  ) 
 

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 }

Bool_t BesGPictureButton::IsStateOn  )  [inline]
 

00022 { return fState; }

Bool_t BesGPictureButton::IsStateOn  )  [inline]
 

00022 { return fState; }

virtual void BesGPictureButton::SetPicture const TGPicture *  new_pic  )  [virtual]
 

void BesGPictureButton::SetPicture const TGPicture *  new_pic  )  [virtual]
 

00083 {
00084     // once you SetPicture, you show set the button state
00085     TGPictureButton::SetPicture(new_pic);
00086 }

virtual void BesGPictureButton::SetPictureHL const TGPicture *  hl_pic  )  [inline, virtual]
 

00026 { fPicHL = hl_pic; }

virtual void BesGPictureButton::SetPictureHL const TGPicture *  hl_pic  )  [inline, virtual]
 

00026 { fPicHL = hl_pic; }

virtual void BesGPictureButton::SetState Bool_t  state  )  [inline, virtual]
 

00023 { fState = state; }

virtual void BesGPictureButton::SetState Bool_t  state  )  [inline, virtual]
 

00023 { fState = state; }


Member Data Documentation

const TGPicture* BesGPictureButton::fPicHL [protected]
 

const TGPicture* BesGPictureButton::fPicHL [protected]
 

Bool_t BesGPictureButton::fState [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 15:52:38 2011 for BOSS6.5.5 by  doxygen 1.3.9.1