MpdBoxSetEditor.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // -------------------------------------------------------------------------
  2. // ----- MpdBoxSetEditor header file -----
  3. // ----- Created 26/03/09 by T. Stockmanns -----
  4. // -------------------------------------------------------------------------
  5. /** MpdBoxSetEditor
  6. * @author T. Stockmanns
  7. * @since 26.3.2009
  8. * Base class to display 3D Points in Eve as a BoxSet
  9. * One has to overwrite the method GetVector which takes a TObject and writes out a TVector3 which is then taken as an input
  10. * to place the points.
  11. * If one wants to change the color of the points one has to overwrite the method GetValue. This method takes a TObject and
  12. * an integer and translates this into an integer as input for the EveBoxSet method DigitValue
  13. **
  14. **/
  15. #ifndef MPDBOXSETEDITOR_H
  16. #define MPDBOXSETEDITOR_H
  17. #include "MpdBoxSet.h"
  18. #include "TGedFrame.h"
  19. #include "TGWindow.h"
  20. #include "GuiTypes.h" // for Pixel_t
  21. #include "TGFrame.h" // for EFrameType::kChildFrame, etc
  22. #include "TGNumberEntry.h"
  23. class MpdBoxSetEditor : public TGedFrame
  24. {
  25. public:
  26. MpdBoxSetEditor(const TGWindow* p = 0, Int_t width = 170, Int_t height = 30,
  27. UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
  28. virtual ~MpdBoxSetEditor() {}
  29. virtual void Init();
  30. virtual void SetModel(TObject* obj)
  31. {
  32. fM = dynamic_cast<MpdBoxSet*>(obj);
  33. if (fM)
  34. {
  35. fTimeWindowPlus->SetNumber(fM->GetTimeWindowPlus());
  36. fTimeWindowMinus->SetNumber(fM->GetTimeWindowMinus());
  37. }
  38. }
  39. virtual void TimeWindow();
  40. TGVerticalFrame* fInfoFrame;
  41. TGNumberEntry* fTimeWindowPlus;
  42. TGNumberEntry* fTimeWindowMinus;
  43. protected:
  44. TObject* fObject;
  45. MpdBoxSet* fM;
  46. private:
  47. MpdBoxSetEditor(const MpdBoxSetEditor&);
  48. MpdBoxSetEditor& operator=(const MpdBoxSetEditor&);
  49. ClassDef(MpdBoxSetEditor,2);
  50. };
  51. #endif