source: trunk/MagicSoft/Cosy/gui/MGMenu.h@ 4787

Last change on this file since 4787 was 1799, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.1 KB
Line 
1#ifndef COSY_MGMenu
2#define COSY_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);
49
50 Bool_t HandleKey(Event_t *event);
51};
52
53#endif
Note: See TracBrowser for help on using the repository browser.