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