TGMenuBar


class description - source file - inheritance tree

class TGMenuBar : public TGHorizontalFrame


    protected:
virtual void AddFrameBefore(TGFrame* f, TGLayoutHints* l = 0, TGPopupMenu* before = 0) public:
TGMenuBar TGMenuBar(const TGWindow* p, UInt_t w, UInt_t h, UInt_t options = kHorizontalFrame|kRaisedFrame) TGMenuBar TGMenuBar(TGMenuBar&) virtual void ~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) static TClass* Class() virtual TGPopupMenu* GetPopup(const char* s) virtual Bool_t HandleButton(Event_t* event) virtual Bool_t HandleKey(Event_t* event) virtual Bool_t HandleMotion(Event_t* event) virtual TClass* IsA() const virtual TGPopupMenu* RemovePopup(const char* s) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
protected:
TGMenuTitle* fCurrent current menu title TList* fTitles list of menu titles Bool_t fStick stick mode (popup menu stays sticked on screen) static Cursor_t fgDefaultCursor

Class Description

                                                                      
 TGMenuBar, TGPopupMenu, TGMenuTitle and TGMenuEntry                  
                                                                      
 This header contains all different menu classes.                     
                                                                      
 Selecting a menu item will generate the event:                       
 kC_COMMAND, kCM_MENU, menu id, user data.                            
                                                                      


TGMenuBar(const TGWindow *p, UInt_t w, UInt_t h, UInt_t options) : TGHorizontalFrame(p, w, h, options | kHorizontalFrame)
 Create a menu bar object.

~TGMenuBar()
 Delete menu bar object. Removes also the hot keys from the main frame,
 so hitting them will not cause the menus to popup.

void AddPopup(TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before)
 Add popup menu to menu bar. The hot string will be adopted by the
 menubar (actually the menu title) and deleted when possible.
 If before is not 0 the menu will be added before it.

void AddPopup(const char *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before)
 Add popup menu to menu bar. If before is not 0 the menu will be
 added before it.

void AddFrameBefore(TGFrame *f, TGLayoutHints *l, TGPopupMenu *before)
 Private version of AddFrame for menubar, to make sure that we
 indeed only add TGMenuTitle objects to it. If before is not 0
 the menu will be added before it.

TGPopupMenu* GetPopup(const char *s)
 Return popup menu with the specified name. Returns 0 if menu is
 not found. Returnes menu can be used as "before" in AddPopup().
 Don't use hot key (&) in name.

TGPopupMenu* RemovePopup(const char *s)
 Remove popup menu from menu bar. Returned menu has to be deleted by
 the user, or can be re-used in another AddPopup(). Returns 0 if
 menu is not found. Don't use hot key (&) in name.

Bool_t HandleMotion(Event_t *event)
 Handle a mouse motion event in a menu bar.

Bool_t HandleButton(Event_t *event)
 Handle a mouse button event in a menubar.

Bool_t HandleKey(Event_t *event)
 Handle keyboard events in a menu bar.



Inline Functions


            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
          TGMenuBar TGMenuBar(TGMenuBar&)


Author: Fons Rademakers 09/01/98
Last update: root/gui:$Name: $:$Id: TGMenu.cxx,v 1.5 2001/11/18 17:25:25 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.