当前位置: 首页>>代码示例>>C++>>正文


C++ TPad::GetTitle方法代码示例

本文整理汇总了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;
开发者ID:GiuseppePast,项目名称:kaliveda,代码行数:67,代码来源:KVCanvas.cpp


注:本文中的TPad::GetTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。