source: trunk/MagicSoft/Mars/mbase/MGMenu.h@ 6937

Last change on this file since 6937 was 6824, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.1 KB
Line 
1#ifndef MARS_MGMenu
2#define MARS_MGMenu
3
4#ifndef ROOT_TGMenu
5#include <TGMenu.h>
6#endif
7
8class MGPopupMenu;
9
10class MGMenuEntry : public TGMenuEntry
11{
12 /*
13 Workaround for the protected data mambers of TGMenuEntry
14 */
15public:
16 MGMenuEntry(TGMenuEntry *ent);
17 ~MGMenuEntry()
18 {
19 fLabel=0;
20 }
21
22 MGPopupMenu *GetPopup() { return (MGPopupMenu*)fPopup; }
23 TGHotString *GetLabel() { return fLabel; }
24 void *GetUserData() { return fUserData; }
25};
26
27class MGPopupMenu : public TGPopupMenu
28{
29public:
30 MGPopupMenu(const TGWindow* p = 0, UInt_t w = 10, UInt_t h = 10, UInt_t options = 0) :
31 TGPopupMenu(p, w, h, options)
32 {
33 }
34
35 UInt_t GetKeyCode(TGMenuEntry *el);
36
37 void BindKeys(const TGWindow *w, TGMainFrame *frame);
38
39 Bool_t HandleKey(Event_t *evt);
40};
41
42class MGMenuBar : public TGMenuBar
43{
44public:
45 MGMenuBar(const TGWindow* p, UInt_t w, UInt_t h, UInt_t options = kHorizontalFrame|kRaisedFrame) :
46 TGMenuBar(p, w, h, options) {}
47
48 void BindKeys(TGMainFrame *frame); // root<=3.10.02
49 void BindKeys(Bool_t b);
50
51 Bool_t HandleKey(Event_t *event);
52};
53
54#endif
Note: See TracBrowser for help on using the repository browser.