BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesGPictureButton Class Reference

#include <BesGPictureButton.h>

Inheritance diagram for BesGPictureButton:

Public Member Functions

 BesGPictureButton (const TGWindow *p, const TGPicture *pic, 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=0, const char *pic=0, Int_t id=-1, GContext_t norm=GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder)
Bool_t HandleCrossing (Event_t *event)
Bool_t IsStateOn ()
virtual void SetState (Bool_t state)
virtual void SetPicture (const TGPicture *new_pic)
virtual void SetPictureHL (const TGPicture *hl_pic)
 BesGPictureButton (const TGWindow *p, const TGPicture *pic, 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=0, const char *pic=0, Int_t id=-1, GContext_t norm=GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder)
Bool_t HandleCrossing (Event_t *event)
Bool_t IsStateOn ()
virtual void SetState (Bool_t state)
virtual void SetPicture (const TGPicture *new_pic)
virtual void SetPictureHL (const TGPicture *hl_pic)
 BesGPictureButton (const TGWindow *p, const TGPicture *pic, 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=0, const char *pic=0, Int_t id=-1, GContext_t norm=GetDefaultGC()(), UInt_t option=kRaisedFrame|kDoubleBorder)
Bool_t HandleCrossing (Event_t *event)
Bool_t IsStateOn ()
virtual void SetState (Bool_t state)
virtual void SetPicture (const TGPicture *new_pic)
virtual void SetPictureHL (const TGPicture *hl_pic)

Protected Attributes

const TGPicture * fPicHL
Bool_t fState

Detailed Description

Constructor & Destructor Documentation

◆ BesGPictureButton() [1/9]

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

◆ BesGPictureButton() [2/9]

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

Definition at line 19 of file BesGPictureButton.cxx.

21 : TGPictureButton( p, pic, cmd, id, norm, option ) {
22 fPicHL = 0;
23 fState = false;
24}

◆ BesGPictureButton() [3/9]

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

Definition at line 27 of file BesGPictureButton.cxx.

29 : TGPictureButton( p, pic, id, norm, option ) {
30 fPicHL = 0;
31 fState = false;
32}

◆ BesGPictureButton() [4/9]

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

◆ BesGPictureButton() [5/9]

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() [6/9]

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

◆ BesGPictureButton() [7/9]

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

◆ BesGPictureButton() [8/9]

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() [9/9]

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

◆ HandleCrossing() [1/3]

Bool_t BesGPictureButton::HandleCrossing ( Event_t * event)

Definition at line 35 of file BesGPictureButton.cxx.

35 {
36 // Handle mouse crossing event.
37
38 static const TGPicture* picTemp;
39 static Bool_t state; // state when entering
40
41 if ( fPicHL )
42 {
43 if ( event->fType == kEnterNotify )
44 {
45 picTemp = fPic;
46 state = fState;
48 }
49 else
50 {
51 if ( fState == state )
52 SetPicture( picTemp ); // if state unchanged, set to pic when cursor entering
53 else SetPicture( fPic ); // else, set to state pic
54 }
55 }
56
57 /*
58 if (fTip) {
59 if (event->fType == kEnterNotify)
60 fTip->Reset();
61 else
62 fTip->Hide();
63 }
64
65 if ((fgDbw != event->fWindow) || (fgReleaseBtn == event->fWindow)) return kTRUE;
66
67 if (!(event->fState & (kButton1Mask | kButton2Mask | kButton3Mask)))
68 return kTRUE;
69
70 if (fState == kButtonEngaged || fState == kButtonDisabled) return kTRUE;
71
72 if (event->fType == kEnterNotify) {
73 SetState(kButtonDown, kFALSE);
74 } else {
75 SetState(kButtonUp, kFALSE);
76 }
77
78 */
79 TGButton::HandleCrossing( event );
80 return kTRUE;
81}
virtual void SetPicture(const TGPicture *new_pic)

◆ HandleCrossing() [2/3]

Bool_t BesGPictureButton::HandleCrossing ( Event_t * event)

◆ HandleCrossing() [3/3]

Bool_t BesGPictureButton::HandleCrossing ( Event_t * event)

◆ IsStateOn() [1/3]

Bool_t BesGPictureButton::IsStateOn ( )
inline

Definition at line 21 of file EventDisplay/BesVisLib/include/BesVisLib/BesGPictureButton.h.

21{ return fState; }

◆ IsStateOn() [2/3]

Bool_t BesGPictureButton::IsStateOn ( )
inline

◆ IsStateOn() [3/3]

Bool_t BesGPictureButton::IsStateOn ( )
inline

◆ SetPicture() [1/3]

void BesGPictureButton::SetPicture ( const TGPicture * new_pic)
virtual

Definition at line 84 of file BesGPictureButton.cxx.

84 {
85 // once you SetPicture, you show set the button state
86 TGPictureButton::SetPicture( new_pic );
87}

Referenced by HandleCrossing().

◆ SetPicture() [2/3]

virtual void BesGPictureButton::SetPicture ( const TGPicture * new_pic)
virtual

◆ SetPicture() [3/3]

virtual void BesGPictureButton::SetPicture ( const TGPicture * new_pic)
virtual

◆ SetPictureHL() [1/3]

virtual void BesGPictureButton::SetPictureHL ( const TGPicture * hl_pic)
inlinevirtual

Definition at line 25 of file EventDisplay/BesVisLib/include/BesVisLib/BesGPictureButton.h.

25{ fPicHL = hl_pic; }

◆ SetPictureHL() [2/3]

virtual void BesGPictureButton::SetPictureHL ( const TGPicture * hl_pic)
inlinevirtual

◆ SetPictureHL() [3/3]

virtual void BesGPictureButton::SetPictureHL ( const TGPicture * hl_pic)
inlinevirtual

◆ SetState() [1/3]

virtual void BesGPictureButton::SetState ( Bool_t state)
inlinevirtual

Definition at line 22 of file EventDisplay/BesVisLib/include/BesVisLib/BesGPictureButton.h.

22{ fState = state; }

◆ SetState() [2/3]

virtual void BesGPictureButton::SetState ( Bool_t state)
inlinevirtual

◆ SetState() [3/3]

virtual void BesGPictureButton::SetState ( Bool_t state)
inlinevirtual

Member Data Documentation

◆ fPicHL

const TGPicture * BesGPictureButton::fPicHL
protected

◆ fState

Bool_t BesGPictureButton::fState
protected

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