4 #include "KVIDGridEditorCanvas.h"
5 #include "KVIDGridEditor.h"
79 pad =
Pick(px, py, prevSelObj);
120 pad =
Pick(px, py, prevSelObj);
224 pad =
Pick(px, py, prevSelObj);
244 Xf1 = Xfirst0 = theXaxis->
GetFirst();
245 Xl1 = Xlast0 = theXaxis->
GetLast();
246 Yf1 = Yfirst0 = theYaxis->
GetFirst();
247 Yl1 = Ylast0 = theYaxis->
GetLast();
252 NdisXbins = Xlast0 - Xfirst0 + 1;
253 NdisYbins = Ylast0 - Yfirst0 + 1;
254 XbinPixel = pixelWidthX / (1.0 * NdisXbins);
255 YbinPixel = pixelWidthY / (1.0 * NdisYbins);
265 while ((tc = (
TCanvas*)next()))
279 Int_t dXbins = dX / XbinPixel;
280 Int_t dYbins = dY / YbinPixel;
282 Int_t newXfirst = Xfirst0 - dXbins;
286 newXlast = NdisXbins;
289 newXlast = Xlast0 - dXbins;
290 if (newXlast > NXbins) {
292 newXfirst = newXlast - NdisXbins + 1;
295 if (newXfirst != Xf1) {
301 Int_t newYfirst = Yfirst0 - dYbins;
305 newYlast = NdisYbins;
308 newYlast = Ylast0 - dYbins;
309 if (newYlast > NYbins) {
311 newYfirst = newYlast - NdisYbins + 1;
314 if (newYfirst != Yf1) {
343 pad =
Pick(px, py, prevSelObj);
381 pad =
Pick(px, py, prevSelObj);
396 pad =
Pick(px, py, prevSelObj);
424 if (gIDGridEditor) gIDGridEditor->HandleKey(px, py);
434 void KVIDGridEditorCanvas::RunAutoExec()
TCanvas with mouse-controlled dynamic zoom and pan & scan.
Extended version of KVCanvas used by KVIDGridEditor.
virtual ~KVIDGridEditorCanvas()
Destructor.
KVIDGridEditorCanvas()
Default constructor.
void HandleInput(EEventType event, Int_t px, Int_t py) override
void MakeTransformation()
virtual void SetRange(Int_t first=0, Int_t last=0)
virtual Int_t IsInside(Double_t x, Double_t y) const
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Int_t GetEventY() const override
virtual TPad * Pick(Int_t px, Int_t py, TObject *prevSelObj)
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Int_t GetEventX() const override
TVirtualPad * cd(Int_t subpadnumber=0) override
TContextMenu * fContextMenu
void FeedbackMode(Bool_t set)
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual Bool_t InheritsFrom(const char *classname) const
Double_t AbsPixeltoY(Int_t py) override
const char * GetTitle() const override
Double_t AbsPixeltoX(Int_t px) override
void Modified(Bool_t flag=1) override
Int_t YtoAbsPixel(Double_t y) const override
TVirtualPad * cd(Int_t subpadnumber=0) override
TFrame * GetFrame() override
const char * GetName() const override
Int_t XtoAbsPixel(Double_t x) const override