Line | |
---|
1 | #include "MMonteCarlo.h"
|
---|
2 |
|
---|
3 | #include <TGButton.h> // TGTextButton
|
---|
4 |
|
---|
5 | ClassImp(MMonteCarlo)
|
---|
6 |
|
---|
7 | enum {
|
---|
8 | M_BUTTON_ACTION
|
---|
9 | };
|
---|
10 |
|
---|
11 | MMonteCarlo::MMonteCarlo(const TGWindow *main, const TGWindow *p,
|
---|
12 | const UInt_t w, const UInt_t h )
|
---|
13 | : MBrowser(p, main, w, h)
|
---|
14 | {
|
---|
15 |
|
---|
16 | fButAction = new TGTextButton(fTop1, "ACTION", M_BUTTON_ACTION );
|
---|
17 | fButAction->Associate(this) ;
|
---|
18 | fTop1->AddFrame (fButAction, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) );
|
---|
19 |
|
---|
20 | MapSubwindows();
|
---|
21 |
|
---|
22 | Layout();
|
---|
23 |
|
---|
24 | SetWindowName("MonteCarlo Main");
|
---|
25 | SetIconName("MonteCarlo");
|
---|
26 |
|
---|
27 | MapWindow();
|
---|
28 | }
|
---|
29 |
|
---|
30 | MMonteCarlo::~MMonteCarlo()
|
---|
31 | {
|
---|
32 | delete fButAction;
|
---|
33 | }
|
---|
34 |
|
---|
35 | // ======================================================================
|
---|
36 |
|
---|
37 | Bool_t MMonteCarlo::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
|
---|
38 | {
|
---|
39 | if (GET_MSG(msg) == kC_COMMAND &&
|
---|
40 | GET_SUBMSG(msg) == kCM_BUTTON &&
|
---|
41 | parm1 == M_BUTTON_ACTION)
|
---|
42 | {
|
---|
43 | DisplInfo("Put Intelligence here!");
|
---|
44 | return kTRUE;
|
---|
45 | }
|
---|
46 |
|
---|
47 | return MBrowser::ProcessMessage(msg, parm1, parm2);
|
---|
48 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.