1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
|
---|
19 | ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)
|
---|
20 | !
|
---|
21 | ! Copyright: MAGIC Software Development, 2000-2001
|
---|
22 | !
|
---|
23 | !
|
---|
24 | \* ======================================================================== */
|
---|
25 |
|
---|
26 | #include "MMonteCarlo.h"
|
---|
27 |
|
---|
28 | #include <TGButton.h> // TGTextButton
|
---|
29 |
|
---|
30 | ClassImp(MMonteCarlo)
|
---|
31 |
|
---|
32 | enum {
|
---|
33 | M_BUTTON_ACTION
|
---|
34 | };
|
---|
35 |
|
---|
36 | MMonteCarlo::MMonteCarlo(const TGWindow *main, const TGWindow *p,
|
---|
37 | const UInt_t w, const UInt_t h)
|
---|
38 | : MBrowser(main, p, w, h)
|
---|
39 | {
|
---|
40 | TGTextButton *action = new TGTextButton(fTop1, "ACTION", M_BUTTON_ACTION);
|
---|
41 | fList->Add(action);
|
---|
42 | action->Associate(this);
|
---|
43 |
|
---|
44 | TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5);
|
---|
45 | fList->Add(laybut);
|
---|
46 |
|
---|
47 | fTop1->AddFrame(action, laybut);
|
---|
48 |
|
---|
49 | MapSubwindows();
|
---|
50 |
|
---|
51 | Layout();
|
---|
52 |
|
---|
53 | SetWindowName("MonteCarlo Main");
|
---|
54 | SetIconName("MonteCarlo");
|
---|
55 |
|
---|
56 | MapWindow();
|
---|
57 | }
|
---|
58 |
|
---|
59 | // ======================================================================
|
---|
60 |
|
---|
61 | Bool_t MMonteCarlo::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
|
---|
62 | {
|
---|
63 | if (GET_MSG(msg) == kC_COMMAND &&
|
---|
64 | GET_SUBMSG(msg) == kCM_BUTTON &&
|
---|
65 | parm1 == M_BUTTON_ACTION)
|
---|
66 | {
|
---|
67 | DisplInfo("Put Intelligence here!");
|
---|
68 | return kTRUE;
|
---|
69 | }
|
---|
70 |
|
---|
71 | return MBrowser::ProcessMessage(msg, parm1, parm2);
|
---|
72 | }
|
---|