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

#include <BesGMenuBar.h>

Inheritance diagram for BesGMenuBar:

Public Member Functions

 BesGMenuBar (const TGWindow *p=0, UInt_t w=60, UInt_t h=20, UInt_t options=kHorizontalFrame|kRaisedFrame)
virtual void AddPopup (TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
virtual void AddPopup (const char *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
BesGMenuTitleGetMenuTitle (Int_t i)
 BesGMenuBar (const TGWindow *p=0, UInt_t w=60, UInt_t h=20, UInt_t options=kHorizontalFrame|kRaisedFrame)
virtual void AddPopup (TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
virtual void AddPopup (const char *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
BesGMenuTitleGetMenuTitle (Int_t i)
 BesGMenuBar (const TGWindow *p=0, UInt_t w=60, UInt_t h=20, UInt_t options=kHorizontalFrame|kRaisedFrame)
virtual void AddPopup (TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
virtual void AddPopup (const char *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
BesGMenuTitleGetMenuTitle (Int_t i)

Protected Member Functions

virtual void AddFrameBefore (TGFrame *f, TGLayoutHints *l=0, TGPopupMenu *before=0)
virtual void AddFrameBefore (TGFrame *f, TGLayoutHints *l=0, TGPopupMenu *before=0)
virtual void AddFrameBefore (TGFrame *f, TGLayoutHints *l=0, TGPopupMenu *before=0)

Detailed Description

Constructor & Destructor Documentation

◆ BesGMenuBar() [1/3]

BesGMenuBar::BesGMenuBar ( const TGWindow * p = 0,
UInt_t w = 60,
UInt_t h = 20,
UInt_t options = kHorizontalFrame|kRaisedFrame )

Referenced by BesGMenuBar(), and GetMenuTitle().

◆ BesGMenuBar() [2/3]

BesGMenuBar::BesGMenuBar ( const TGWindow * p = 0,
UInt_t w = 60,
UInt_t h = 20,
UInt_t options = kHorizontalFrame|kRaisedFrame )

◆ BesGMenuBar() [3/3]

BesGMenuBar::BesGMenuBar ( const TGWindow * p = 0,
UInt_t w = 60,
UInt_t h = 20,
UInt_t options = kHorizontalFrame|kRaisedFrame )

Member Function Documentation

◆ AddFrameBefore() [1/3]

void BesGMenuBar::AddFrameBefore ( TGFrame * f,
TGLayoutHints * l = 0,
TGPopupMenu * before = 0 )
protectedvirtual

Definition at line 36 of file BesGMenuBar.cxx.

36 {
37 // Private version of AddFrame for menubar, to make sure that we
38 // indeed only add BesGMenuTitle objects to it. If before is not 0
39 // the menu will be added before it.
40
41 if ( f->IsA() != BesGMenuTitle::Class() )
42 {
43 Error( "AddFrameBefore", "may only add BesGMenuTitle objects to a menu bar" );
44 return;
45 }
46
47 if ( !before )
48 {
49 AddFrame( f, l );
50 return;
51 }
52
53 TGFrameElement* nw;
54
55 nw = new TGFrameElement;
56 nw->fFrame = f;
57 nw->fLayout = l ? l : fgDefaultHints;
58 nw->fState = 1;
59
60 TGFrameElement* el;
61 TIter next( fList );
62 while ( ( el = (TGFrameElement*)next() ) )
63 {
64 BesGMenuTitle* t = (BesGMenuTitle*)el->fFrame;
65 if ( t->GetMenu() == before )
66 {
67 fList->AddBefore( el, nw );
68 return;
69 }
70 }
71 fList->Add( nw );
72}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
Index next(Index i)
int t()
Definition t.c:1

Referenced by AddPopup().

◆ AddFrameBefore() [2/3]

virtual void BesGMenuBar::AddFrameBefore ( TGFrame * f,
TGLayoutHints * l = 0,
TGPopupMenu * before = 0 )
protectedvirtual

◆ AddFrameBefore() [3/3]

virtual void BesGMenuBar::AddFrameBefore ( TGFrame * f,
TGLayoutHints * l = 0,
TGPopupMenu * before = 0 )
protectedvirtual

◆ AddPopup() [1/6]

void BesGMenuBar::AddPopup ( const char * s,
TGPopupMenu * menu,
TGLayoutHints * l,
TGPopupMenu * before = 0 )
virtual

Definition at line 27 of file BesGMenuBar.cxx.

28 {
29 // Add popup menu to menu bar. If before is not 0 the menu will be
30 // added before it.
31
32 AddPopup( new TGHotString( s ), menu, l, before );
33}
XmlRpcServer s
virtual void AddPopup(TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)

◆ AddPopup() [2/6]

virtual void BesGMenuBar::AddPopup ( const char * s,
TGPopupMenu * menu,
TGLayoutHints * l,
TGPopupMenu * before = 0 )
virtual

◆ AddPopup() [3/6]

virtual void BesGMenuBar::AddPopup ( const char * s,
TGPopupMenu * menu,
TGLayoutHints * l,
TGPopupMenu * before = 0 )
virtual

◆ AddPopup() [4/6]

void BesGMenuBar::AddPopup ( TGHotString * s,
TGPopupMenu * menu,
TGLayoutHints * l,
TGPopupMenu * before = 0 )
virtual

Definition at line 11 of file BesGMenuBar.cxx.

12 {
13 // Add popup menu to menu bar. The hot string will be adopted by the
14 // menubar (actually the menu title) and deleted when possible.
15 // If before is not 0 the menu will be added before it.
16
17 BesGMenuTitle* t;
18 Int_t keycode;
19
20 AddFrameBefore( t = new BesGMenuTitle( this, s, menu ), l, before );
21 fTitles->Add( t ); // keep track of menu titles for later cleanup in dtor
22
23 if ( ( keycode = t->GetHotKeyCode() ) != 0 ) { BindHotKey( keycode, kTRUE ); }
24}
virtual void AddFrameBefore(TGFrame *f, TGLayoutHints *l=0, TGPopupMenu *before=0)

Referenced by AddPopup().

◆ AddPopup() [5/6]

virtual void BesGMenuBar::AddPopup ( TGHotString * s,
TGPopupMenu * menu,
TGLayoutHints * l,
TGPopupMenu * before = 0 )
virtual

◆ AddPopup() [6/6]

virtual void BesGMenuBar::AddPopup ( TGHotString * s,
TGPopupMenu * menu,
TGLayoutHints * l,
TGPopupMenu * before = 0 )
virtual

◆ GetMenuTitle() [1/3]

BesGMenuTitle * BesGMenuBar::GetMenuTitle ( Int_t i)

Definition at line 75 of file BesGMenuBar.cxx.

75 {
76 if ( i >= 0 && i < fTitles->GetSize() ) return (BesGMenuTitle*)fTitles->At( i );
77 else return 0;
78}

◆ GetMenuTitle() [2/3]

BesGMenuTitle * BesGMenuBar::GetMenuTitle ( Int_t i)

◆ GetMenuTitle() [3/3]

BesGMenuTitle * BesGMenuBar::GetMenuTitle ( Int_t i)

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