1 #ifndef ALIMUONPAINTERMATRIXFRAME_H
2 #define ALIMUONPAINTERMATRIXFRAME_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONPainterMatrixFrame
11 /// \brief Widget to plot a matrix of painters
13 // Author Laurent Aphecetche, Subatech
20 class AliMUONPainterColorSlider;
21 class AliMUONPainterPlotSelector;
22 class AliMUONPainterMatrix;
23 class AliMUONPainterHighlighter;
24 class AliMUONVPainter;
25 class AliMUONVTrackerData;
30 class TRootEmbeddedCanvas;
32 class AliMUONPainterMatrixFrame : public TGCompositeFrame
35 AliMUONPainterMatrixFrame(const TGWindow* window, UInt_t w, UInt_t h);
36 virtual ~AliMUONPainterMatrixFrame();
38 void Clear(Option_t* opt="");
40 void DataRangeAutoRequested();
42 void DataRangeWasChanged(Double_t* range);
44 void DataSourceWasChanged(const char* name, AliMUONVTrackerData* data, Int_t dataIndex);
46 void EventInfo(Int_t event, Int_t px, Int_t py, TObject* selected);
48 void MouseEnter(AliMUONVPainter* painter); // *SIGNAL*
50 void MouseMotion(AliMUONVPainter* painter, Double_t* position); // *SIGNAL*
52 void MouseLeave(const AliMUONVPainter* painter); // *SIGNAL*
54 void ResponderButtonWasClicked(Int_t id);
56 void OutlineButtonWasClicked(Int_t id);
58 void Use(AliMUONPainterMatrix* group);
60 void TitleHasChanged(const char* newTitle); // *SIGNAL*
64 /// Get the matrix pointer
65 AliMUONPainterMatrix* Matrix() const { return fPainterMatrix; }
67 void SaveAs(const char* filename="", Option_t* option="") const;
69 void UpdateInterface(Bool_t fromScratch);
73 AliMUONPainterMatrixFrame(const AliMUONPainterMatrixFrame& rhs);
75 AliMUONPainterMatrixFrame& operator=(const AliMUONPainterMatrixFrame& rhs);
77 void ChangeTitle(const TString& title);
79 void ChangeTitle(AliMUONVPainter* painter, const char* basename=0x0,
80 Double_t x=FLT_MAX, Double_t y=FLT_MAX);
84 void UpdateDataRange();
89 AliMUONPainterMatrix* fPainterMatrix; ///< the matrix we plot (not owner)
90 TRootEmbeddedCanvas* fView; ///< the canvas used to plot
91 TGHorizontalFrame* fInterface; ///< the interface frame
92 TGButtonGroup* fResponderButtons; ///< the responder buttons
93 TGButtonGroup* fOutlineButtons; ///< the outline buttons
95 AliMUONPainterPlotSelector* fPlotSelector; ///< the data source selection
97 AliMUONPainterHighlighter* fPainterHighlighter; ///< the highlighter
99 UInt_t fCanvasWidth; ///< canvas width
100 UInt_t fCanvasHeight; ///< canvas height
102 TGCompositeFrame* fMainFrame; ///< our main frame
104 AliMUONPainterColorSlider* fColorSlider; ///< color slider (for data)
106 ClassDef(AliMUONPainterMatrixFrame,1) // Widget for drawing painter matrix