TGMenuBar Class Reference

#include <TGMenu.h>

Inheritance diagram for TGMenuBar:

TGHorizontalFrame TGHorizontalFrame TGCompositeFrame TGCompositeFrame TGCompositeFrame TGCompositeFrame TGFrame TGFrame TGFrame TGFrame TGFrame TGFrame TGFrame TGFrame List of all members.

Public Member Functions

 TGMenuBar (const TGWindow *p=0, UInt_t w=60, UInt_t h=20, UInt_t options=kHorizontalFrame|kRaisedFrame)
virtual ~TGMenuBar ()
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)
virtual TGPopupMenuAddPopup (const TString &s, Int_t padleft=4, Int_t padright=0, Int_t padtop=0, Int_t padbottom=0)
virtual void AddTitle (TGMenuTitle *title, TGLayoutHints *l, TGPopupMenu *before=0)
virtual TGPopupMenuGetPopup (const char *s)
virtual TGPopupMenuRemovePopup (const char *s)
virtual TGMenuTitleGetCurrent () const
virtual TListGetTitles () const
virtual Bool_t HandleButton (Event_t *event)
virtual Bool_t HandleMotion (Event_t *event)
virtual Bool_t HandleKey (Event_t *event)
virtual void SavePrimitive (ostream &out, Option_t *option="")
virtual void Layout ()
void PopupConnection ()
TGFrameElementGetLastOnLeft ()
 TGMenuBar (const TGWindow *p=0, UInt_t w=60, UInt_t h=20, UInt_t options=kHorizontalFrame|kRaisedFrame)
virtual ~TGMenuBar ()
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)
virtual TGPopupMenuAddPopup (const TString &s, Int_t padleft=4, Int_t padright=0, Int_t padtop=0, Int_t padbottom=0)
virtual void AddTitle (TGMenuTitle *title, TGLayoutHints *l, TGPopupMenu *before=0)
virtual TGPopupMenuGetPopup (const char *s)
virtual TGPopupMenuRemovePopup (const char *s)
virtual TGMenuTitleGetCurrent () const
virtual TListGetTitles () const
virtual Bool_t HandleButton (Event_t *event)
virtual Bool_t HandleMotion (Event_t *event)
virtual Bool_t HandleKey (Event_t *event)
virtual void SavePrimitive (ostream &out, Option_t *option="")
virtual void Layout ()
void PopupConnection ()
TGFrameElementGetLastOnLeft ()

Protected Member Functions

virtual void AddFrameBefore (TGFrame *f, TGLayoutHints *l=0, TGPopupMenu *before=0)
virtual void BindHotKey (Int_t keycode, Bool_t on=kTRUE)
virtual void BindKeys (Bool_t on=kTRUE)
void BindMenu (TGPopupMenu *subMenu, Bool_t on)
virtual void AddFrameBefore (TGFrame *f, TGLayoutHints *l=0, TGPopupMenu *before=0)
virtual void BindHotKey (Int_t keycode, Bool_t on=kTRUE)
virtual void BindKeys (Bool_t on=kTRUE)
void BindMenu (TGPopupMenu *subMenu, Bool_t on)

Protected Attributes

TGMenuTitlefCurrent
TListfTitles
Cursor_t fDefaultCursor
Bool_t fStick
TListfTrash
Bool_t fKeyNavigate
TGPopupMenufMenuMore
TGLayoutHintsfMenuBarMoreLayout
Bool_t fWithExt
TListfOutLayouts
TListfNeededSpace
TGMenuTitlefCurrent
TListfTitles
TListfTrash
TGPopupMenufMenuMore
TGLayoutHintsfMenuBarMoreLayout
TListfOutLayouts
TListfNeededSpace

Private Member Functions

 TGMenuBar (const TGMenuBar &)
TGMenuBaroperator= (const TGMenuBar &)
 TGMenuBar (const TGMenuBar &)
TGMenuBaroperator= (const TGMenuBar &)

Friends

class TGPopupMenu

Detailed Description

Definition at line 312 of file TGMenu.h.


Constructor & Destructor Documentation

TGMenuBar::TGMenuBar ( const TGMenuBar  )  [private]

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

Definition at line 118 of file TGMenu.cxx.

References TGPopupMenu::AddLabel(), TGPopupMenu::AddSeparator(), TGObject::fClient, fCurrent, fDefaultCursor, TGObject::fId, fKeyNavigate, fMenuBarMoreLayout, fMenuMore, fNeededSpace, fOutLayouts, fStick, fTitles, fTrash, fWithExt, gClient, TGClient::GetDefaultRoot(), TGResourcePool::GetGrabCursor(), TGClient::GetResourcePool(), gVirtualX, kAnyModifier, kButton1, kButtonPressMask, kButtonReleaseMask, kEnterWindowMask, kFALSE, kLHintsRight, kLHintsTop, kNone, kTRUE, and TGPopupMenu.

TGMenuBar::~TGMenuBar (  )  [virtual]

Definition at line 146 of file TGMenu.cxx.

References TList::Delete(), TGFrameElement::fFrame, TGCompositeFrame::fList, fMenuBarMoreLayout, fMenuMore, fNeededSpace, fOutLayouts, fTitles, fTrash, TGWindow::GetMainFrame(), if(), kKeyMod1Mask, main(), TGCompositeFrame::MustCleanup(), and t.

TGMenuBar::TGMenuBar ( const TGMenuBar  )  [private]

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

virtual TGMenuBar::~TGMenuBar (  )  [virtual]


Member Function Documentation

void TGMenuBar::AddFrameBefore ( TGFrame f,
TGLayoutHints l = 0,
TGPopupMenu before = 0 
) [protected, virtual]

Definition at line 489 of file TGMenu.cxx.

References TList::Add(), TList::AddBefore(), TGCompositeFrame::AddFrame(), TObject::Error(), TGFrameElement::fFrame, TGCompositeFrame::fgDefaultHints, TGFrameElement::fLayout, TGCompositeFrame::fList, TGFrameElement::fState, if(), l, and t.

Referenced by AddPopup(), and AddTitle().

void TGMenuBar::BindHotKey ( Int_t  keycode,
Bool_t  on = kTRUE 
) [protected, virtual]

Definition at line 371 of file TGMenu.cxx.

References TGWindow::GetMainFrame(), kKeyLockMask, kKeyMod1Mask, kKeyMod2Mask, kKeyShiftMask, and main().

Referenced by AddPopup(), AddTitle(), and RemovePopup().

void TGMenuBar::BindKeys ( Bool_t  on = kTRUE  )  [protected, virtual]

Definition at line 324 of file TGMenu.cxx.

References BindMenu(), fCurrent, TGObject::fId, TGMenuTitle::GetMenu(), gVirtualX, kAnyModifier, kKey_Down, kKey_Enter, kKey_Escape, kKey_Left, kKey_Return, kKey_Right, and kKey_Up.

Referenced by TGPopupMenu::EndMenu(), and TGPopupMenu::PlaceMenu().

void TGMenuBar::BindMenu ( TGPopupMenu subMenu,
Bool_t  on 
) [protected]

Definition at line 343 of file TGMenu.cxx.

References TGObject::fId, TGHotString::GetHotChar(), TGMenuEntry::GetLabel(), TGPopupMenu::GetListOfEntries(), TGMenuEntry::GetPopup(), TGMenuEntry::GetType(), gVirtualX, kKeyLockMask, kKeyMod2Mask, kKeyShiftMask, and kMenuPopup.

Referenced by BindKeys().

TGMenuBar& TGMenuBar::operator= ( const TGMenuBar  )  [private]

void TGMenuBar::AddPopup ( TGHotString s,
TGPopupMenu menu,
TGLayoutHints l,
TGPopupMenu before = 0 
) [virtual]

Definition at line 404 of file TGMenu.cxx.

References TList::Add(), AddFrameBefore(), BindHotKey(), fTitles, kTRUE, l, s, and t.

Referenced by TStyleManager::AddMenus(), AddPopup(), TGMdiMenuBar::AddPopup(), TGTextEditor::Build(), TSessionViewer::Build(), TGRootIDE::Build(), TTreeViewer::BuildInterface(), TRootBrowser::CreateBrowser(), TRootBrowserLite::CreateBrowser(), TRootCanvas::CreateCanvas(), TGLSAViewer::CreateMenus(), TViewerX3D::CreateViewer(), DNDMainFrame::DNDMainFrame(), TestMainFrame::HandleMenu(), Layout(), RootShower::MakeMenuBarFrame(), SplitGLView::SplitGLView(), TestFileList::TestFileList(), TestMainFrame::TestMainFrame(), TEveBrowser::TEveBrowser(), TGHtmlBrowser::TGHtmlBrowser(), and XSGui::XSGui().

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

Definition at line 438 of file TGMenu.cxx.

References AddPopup(), and l.

TGPopupMenu * TGMenuBar::AddPopup ( const TString s,
Int_t  padleft = 4,
Int_t  padright = 0,
Int_t  padtop = 0,
Int_t  padbottom = 0 
) [virtual]

Definition at line 448 of file TGMenu.cxx.

References TList::Add(), AddPopup(), TGObject::fClient, fTrash, TGClient::GetDefaultRoot(), kLHintsLeft, kLHintsRight, kLHintsTop, l, s, and TGPopupMenu.

void TGMenuBar::AddTitle ( TGMenuTitle title,
TGLayoutHints l,
TGPopupMenu before = 0 
) [virtual]

Definition at line 423 of file TGMenu.cxx.

References TList::Add(), AddFrameBefore(), BindHotKey(), fTitles, kTRUE, l, and title.

Referenced by TRootGuiBuilder::InitMenu().

TGPopupMenu * TGMenuBar::GetPopup ( const char *  s  )  [virtual]

Definition at line 526 of file TGMenu.cxx.

References TGFrameElement::fFrame, TGCompositeFrame::GetList(), if(), str, and t.

Referenced by TestMainFrame::HandleMenu().

TGPopupMenu * TGMenuBar::RemovePopup ( const char *  s  )  [virtual]

Definition at line 547 of file TGMenu.cxx.

References BindHotKey(), TGFrameElement::fFrame, fTitles, TGCompositeFrame::GetList(), if(), kFALSE, m, TList::Remove(), TGCompositeFrame::RemoveFrame(), str, and t.

Referenced by TestMainFrame::HandleMenu(), and Layout().

virtual TGMenuTitle* TGMenuBar::GetCurrent (  )  const [inline, virtual]

Definition at line 356 of file TGMenu.h.

References fCurrent.

Referenced by TGLSAViewer::HandleMenuBarHiding().

virtual TList* TGMenuBar::GetTitles (  )  const [inline, virtual]

Definition at line 357 of file TGMenu.h.

References fTitles.

Bool_t TGMenuBar::HandleButton ( Event_t event  )  [virtual]

Reimplemented from TGCompositeFrame.

Definition at line 611 of file TGMenu.cxx.

References dummy, TGObject::fClient, fCurrent, fDefaultCursor, TGFrameElement::fFrame, TGObject::fId, fKeyNavigate, TGCompositeFrame::fList, fStick, Event_t::fType, Event_t::fX, Event_t::fY, TGClient::GetWindowById(), gVirtualX, kButtonPress, kButtonPressMask, kButtonRelease, kButtonReleaseMask, kFALSE, kNone, kPointerMotionMask, and kTRUE.

Bool_t TGMenuBar::HandleMotion ( Event_t event  )  [virtual]

Reimplemented from TGCompositeFrame.

Definition at line 578 of file TGMenu.cxx.

References dummy, TGObject::fClient, fCurrent, TGFrameElement::fFrame, TGObject::fId, fKeyNavigate, TGCompositeFrame::fList, Event_t::fState, fStick, Event_t::fX, Event_t::fY, TGClient::GetWindowById(), gVirtualX, kButton1Mask, kFALSE, and kTRUE.

Bool_t TGMenuBar::HandleKey ( Event_t event  )  [virtual]

Reimplemented from TGCompositeFrame.

Definition at line 674 of file TGMenu.cxx.

References TGPopupMenu::Activate(), TList::After(), TList::Before(), dummy, TGPopupMenu::EndMenu(), Event_t::fCode, fCurrent, fDefaultCursor, TGMenuEntry::fEx, TGMenuEntry::fEy, TGFrameElement::fFrame, TGObject::fId, TList::First(), fKeyNavigate, TGCompositeFrame::fList, TGPopupMenu::fMenuWidth, TGPopupMenu::fPoppedUp, TGMenuEntry::fPopup, Event_t::fState, TGPopupMenu::fStick, fStick, Event_t::fType, Event_t::fWindow, TGPopupMenu::GetCurrent(), TGHotString::GetHotChar(), TGObject::GetId(), TGMenuEntry::GetLabel(), TGPopupMenu::GetListOfEntries(), TGMenuTitle::GetMenu(), TGWindow::GetParent(), TGMenuEntry::GetPopup(), TGMenuEntry::GetStatus(), TGMenuEntry::GetType(), gVirtualX, TGPopupMenu::HandleButton(), if(), kButtonPressMask, kButtonRelease, kButtonReleaseMask, kFALSE, kGKeyPress, kKey_Down, kKey_Enter, kKey_Escape, kKey_Left, kKey_Return, kKey_Right, kKey_Up, kKeyMod1Mask, kKeyRelease, kMenuEnableMask, kMenuHideMask, kMenuLabel, kMenuPopup, kMenuSeparator, kNone, kPointerMotionMask, kTRUE, TList::Last(), TGPopupMenu::PlaceMenu(), ptr, TGWindow::RequestFocus(), TIter::Reset(), and TGMenuTitle::SetState().

void TGMenuBar::SavePrimitive ( ostream &  out,
Option_t option = "" 
) [virtual]

Reimplemented from TGHorizontalFrame.

Definition at line 2274 of file TGMenu.cxx.

References TGFrameElement::fFrame, TGFrameElement::fLayout, TGCompositeFrame::fList, TGWindow::fParent, TGFrame::GetHeight(), TGWindow::GetName(), TGFrame::GetOptionString(), TGFrame::GetWidth(), out, TGFrame::SavePrimitive(), and TGLayoutHints::SavePrimitive().

void TGMenuBar::Layout (  )  [virtual]

Reimplemented from TGCompositeFrame.

Definition at line 184 of file TGMenu.cxx.

References TList::AddLast(), AddPopup(), TGPopupMenu::AddPopup(), TQObject::Connect(), TGPopupMenu::DeleteEntry(), TQObject::Disconnect(), entry, fMenuBarMoreLayout, fMenuMore, fNeededSpace, fOutLayouts, fWithExt, TGCompositeFrame::GetDefaultWidth(), GetLastOnLeft(), TGLayoutHints::GetLayoutHints(), TGCompositeFrame::GetList(), TGPopupMenu::GetListOfEntries(), TGMenuTitle::GetMenu(), TGMenuTitle::GetName(), TGMenuEntry::GetName(), TGMenuEntry::GetPopup(), TGFrame::GetSize(), TCollection::GetSize(), TGFrame::GetWidth(), kFALSE, kLHintsRight, kTRUE, TList::Last(), TGCompositeFrame::Layout(), TGCompositeFrame::MapSubwindows(), TList::Remove(), and RemovePopup().

Referenced by TestMainFrame::HandleMenu().

void TGMenuBar::PopupConnection (  ) 

Definition at line 276 of file TGMenu.cxx.

References TQObject::Connect(), TQObject::Disconnect(), fMenuMore, TGPopupMenu::fMsgWindow, TGPopupMenu::GetCurrent(), TQObject::GetListOfSignals(), TGMenuEntry::GetPopup(), TGMenuEntry::GetType(), and kMenuPopup.

TGFrameElement * TGMenuBar::GetLastOnLeft (  ) 

Definition at line 255 of file TGMenu.cxx.

References entry, fMenuMore, TGCompositeFrame::GetList(), TGMenuTitle::GetMenu(), and kLHintsRight.

Referenced by Layout().

virtual void TGMenuBar::AddFrameBefore ( TGFrame f,
TGLayoutHints l = 0,
TGPopupMenu before = 0 
) [protected, virtual]

virtual void TGMenuBar::BindHotKey ( Int_t  keycode,
Bool_t  on = kTRUE 
) [protected, virtual]

virtual void TGMenuBar::BindKeys ( Bool_t  on = kTRUE  )  [protected, virtual]

void TGMenuBar::BindMenu ( TGPopupMenu subMenu,
Bool_t  on 
) [protected]

TGMenuBar& TGMenuBar::operator= ( const TGMenuBar  )  [private]

virtual void TGMenuBar::AddPopup ( TGHotString s,
TGPopupMenu menu,
TGLayoutHints l,
TGPopupMenu before = 0 
) [virtual]

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

virtual TGPopupMenu* TGMenuBar::AddPopup ( const TString s,
Int_t  padleft = 4,
Int_t  padright = 0,
Int_t  padtop = 0,
Int_t  padbottom = 0 
) [virtual]

virtual void TGMenuBar::AddTitle ( TGMenuTitle title,
TGLayoutHints l,
TGPopupMenu before = 0 
) [virtual]

virtual TGPopupMenu* TGMenuBar::GetPopup ( const char *  s  )  [virtual]

virtual TGPopupMenu* TGMenuBar::RemovePopup ( const char *  s  )  [virtual]

virtual TGMenuTitle* TGMenuBar::GetCurrent (  )  const [inline, virtual]

Definition at line 356 of file TGMenu.h.

References fCurrent.

virtual TList* TGMenuBar::GetTitles (  )  const [inline, virtual]

Definition at line 357 of file TGMenu.h.

References fTitles.

virtual Bool_t TGMenuBar::HandleButton ( Event_t event  )  [virtual]

Reimplemented from TGCompositeFrame.

virtual Bool_t TGMenuBar::HandleMotion ( Event_t event  )  [virtual]

Reimplemented from TGCompositeFrame.

virtual Bool_t TGMenuBar::HandleKey ( Event_t event  )  [virtual]

Reimplemented from TGCompositeFrame.

virtual void TGMenuBar::SavePrimitive ( ostream &  out,
Option_t option = "" 
) [virtual]

Reimplemented from TGHorizontalFrame.

virtual void TGMenuBar::Layout (  )  [virtual]

Reimplemented from TGCompositeFrame.

void TGMenuBar::PopupConnection (  ) 

TGFrameElement* TGMenuBar::GetLastOnLeft (  ) 


Friends And Related Function Documentation

TGPopupMenu [friend]

Definition at line 314 of file TGMenu.h.

Referenced by AddPopup(), and TGMenuBar().


Member Data Documentation

TGMenuTitle* TGMenuBar::fCurrent [protected]

Definition at line 317 of file TGMenu.h.

Referenced by BindKeys(), GetCurrent(), HandleButton(), HandleKey(), HandleMotion(), and TGMenuBar().

TList* TGMenuBar::fTitles [protected]

Definition at line 318 of file TGMenu.h.

Referenced by AddPopup(), AddTitle(), GetTitles(), RemovePopup(), TGMenuBar(), and ~TGMenuBar().

Cursor_t TGMenuBar::fDefaultCursor [protected]

Definition at line 319 of file TGMenu.h.

Referenced by HandleButton(), HandleKey(), and TGMenuBar().

Bool_t TGMenuBar::fStick [protected]

Definition at line 320 of file TGMenu.h.

Referenced by HandleButton(), HandleKey(), HandleMotion(), and TGMenuBar().

TList* TGMenuBar::fTrash [protected]

Definition at line 321 of file TGMenu.h.

Referenced by AddPopup(), TGMenuBar(), and ~TGMenuBar().

Bool_t TGMenuBar::fKeyNavigate [protected]

Definition at line 322 of file TGMenu.h.

Referenced by HandleButton(), TGPopupMenu::HandleCrossing(), HandleKey(), HandleMotion(), and TGMenuBar().

TGPopupMenu* TGMenuBar::fMenuMore [protected]

Definition at line 323 of file TGMenu.h.

Referenced by GetLastOnLeft(), Layout(), PopupConnection(), TGMenuBar(), and ~TGMenuBar().

TGLayoutHints* TGMenuBar::fMenuBarMoreLayout [protected]

Definition at line 324 of file TGMenu.h.

Referenced by Layout(), TGMenuBar(), and ~TGMenuBar().

Bool_t TGMenuBar::fWithExt [protected]

Definition at line 325 of file TGMenu.h.

Referenced by Layout(), and TGMenuBar().

TList* TGMenuBar::fOutLayouts [protected]

Definition at line 326 of file TGMenu.h.

Referenced by Layout(), TGMenuBar(), and ~TGMenuBar().

TList* TGMenuBar::fNeededSpace [protected]

Definition at line 327 of file TGMenu.h.

Referenced by Layout(), TGMenuBar(), and ~TGMenuBar().

TGMenuTitle* TGMenuBar::fCurrent [protected]

Definition at line 317 of file TGMenu.h.

TList* TGMenuBar::fTitles [protected]

Definition at line 318 of file TGMenu.h.

TList* TGMenuBar::fTrash [protected]

Definition at line 321 of file TGMenu.h.

TGPopupMenu* TGMenuBar::fMenuMore [protected]

Definition at line 323 of file TGMenu.h.

TGLayoutHints* TGMenuBar::fMenuBarMoreLayout [protected]

Definition at line 324 of file TGMenu.h.

TList* TGMenuBar::fOutLayouts [protected]

Definition at line 326 of file TGMenu.h.

TList* TGMenuBar::fNeededSpace [protected]

Definition at line 327 of file TGMenu.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:40:23 2011 for ROOT_528-00b_version by  doxygen 1.5.1