本文整理汇总了C++中TPad::GetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ TPad::GetTitle方法的具体用法?C++ TPad::GetTitle怎么用?C++ TPad::GetTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPad
的用法示例。
在下文中一共展示了TPad::GetTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleInput
//.........这里部分代码省略.........
// we will only use its coordinate system
FeedbackMode(kTRUE);
if (!fSelected->InheritsFrom("TH1")) fSelected->Pop(); // pop object to foreground
pad->cd(); // and make its pad the current pad
if (fSelected->InheritsFrom("TH2") && !fSelected->InheritsFrom("TH3")) {
// implement pan & scan
X0 = px;
Y0 = py; // u clikd here
theXaxis = ((TH2*)FindHisto())->GetXaxis();
theYaxis = ((TH2*)FindHisto())->GetYaxis();
NXbins = theXaxis->GetNbins(); // maximum bin number in X
NYbins = theYaxis->GetNbins(); // maximum bin number in Y
Xf1 = Xfirst0 = theXaxis->GetFirst(); // initial displayed bin range in X
Xl1 = Xlast0 = theXaxis->GetLast();
Yf1 = Yfirst0 = theYaxis->GetFirst(); // initial displayed bin range in Y
Yl1 = Ylast0 = theYaxis->GetLast();
// size of axes in pixels
Int_t pixelWidthX = gPad->XtoAbsPixel(gPad->GetUxmax()) - gPad->XtoAbsPixel(gPad->GetUxmin());
Int_t pixelWidthY = gPad->YtoAbsPixel(gPad->GetUymax()) - gPad->YtoAbsPixel(gPad->GetUymin());
// sizes of bins in pixels
NdisXbins = Xlast0 - Xfirst0 + 1;
NdisYbins = Ylast0 - Yfirst0 + 1;
XbinPixel = pixelWidthX / (1.0 * NdisXbins);
YbinPixel = pixelWidthY / (1.0 * NdisYbins);
}
if (gDebug)
printf("Current Pad: %s / %s\n", pad->GetName(), pad->GetTitle());
// loop over all canvases to make sure that only one pad is highlighted
{
TIter next(gROOT->GetListOfCanvases());
TCanvas* tc;
while ((tc = (TCanvas*)next()))
tc->Update();
}
/*if (pad->GetGLDevice() != -1 && fSelected)
fSelected->ExecuteEvent(event, px, py);*/
break; // don't want fPadSave->cd() to be executed at the end
case kButton2Motion:
//was empty!
if (fSelected && fSelected->InheritsFrom("TH2") && !fSelected->InheritsFrom("TH3")) {
// implement pan & scan
Int_t dX = px - X0; // how far have i moved ?
Int_t dY = py - Y0;
Int_t dXbins = dX / XbinPixel;
Int_t dYbins = dY / YbinPixel;
Bool_t changed = kFALSE;
Int_t newXfirst = Xfirst0 - dXbins;
Int_t newXlast;
if (newXfirst < 1) {
newXfirst = 1;
newXlast = NdisXbins;
} else {
newXlast = Xlast0 - dXbins;
if (newXlast > NXbins) {
newXlast = NXbins;