]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | // $Header$ |
2 | ||
3 | #include "CLASS.h" | |
092578a7 | 4 | #include <Alieve/STEM.h> |
5a5a1232 | 5 | |
6 | #include <TVirtualPad.h> | |
7 | #include <TColor.h> | |
8 | ||
9 | #include <TGLabel.h> | |
10 | #include <TGButton.h> | |
11 | #include <TGNumberEntry.h> | |
12 | #include <TGColorSelect.h> | |
13 | #include <TGDoubleSlider.h> | |
14 | ||
15 | using namespace Reve; | |
16 | using namespace Alieve; | |
17 | ||
18 | //______________________________________________________________________ | |
19 | // CLASS | |
20 | // | |
21 | ||
2aef44c1 | 22 | ClassImp(CLASS) |
5a5a1232 | 23 | |
24 | CLASS::CLASS(const TGWindow *p, Int_t id, Int_t width, Int_t height, | |
25 | UInt_t options, Pixel_t back) : | |
26 | TGedFrame(p, id, width, height, options | kVerticalFrame, back) | |
27 | { | |
28 | fM = 0; | |
29 | MakeTitle("STEM"); | |
30 | ||
31 | //!!! create the widgets here ... | |
32 | ||
33 | // Register the editor. | |
34 | TClass *cl = STEM::Class(); | |
35 | TGedElement *ge = new TGedElement; | |
36 | ge->fGedFrame = this; | |
37 | ge->fCanvas = 0; | |
38 | cl->GetEditorList()->Add(ge); | |
39 | } | |
40 | ||
41 | CLASS::~CLASS() | |
42 | {} | |
43 | ||
44 | /**************************************************************************/ | |
45 | ||
46 | void CLASS::SetModel(TVirtualPad* pad, TObject* obj, Int_t event) | |
47 | { | |
48 | fModel = 0; | |
49 | fPad = 0; | |
50 | ||
51 | if (!obj || !obj->InheritsFrom(STEM::Class()) || obj->InheritsFrom(TVirtualPad::Class())) { | |
52 | SetActive(kFALSE); | |
53 | return; | |
54 | } | |
55 | ||
56 | fModel = obj; | |
57 | fPad = pad; | |
58 | ||
59 | fM = dynamic_cast<STEM*>(fModel); | |
60 | ||
61 | SetActive(); | |
62 | } | |
63 | ||
64 | /**************************************************************************/ |