// Mainframe macro generated from application: /usr/local/bin/root.exe // By ROOT version 5.34/23 on 2015-10-09 13:13:58 #ifndef ROOT_TGDockableFrame #include "TGDockableFrame.h" #endif #ifndef ROOT_TGMenu #include "TGMenu.h" #endif #ifndef ROOT_TGMdiDecorFrame #include "TGMdiDecorFrame.h" #endif #ifndef ROOT_TG3DLine #include "TG3DLine.h" #endif #ifndef ROOT_TGMdiFrame #include "TGMdiFrame.h" #endif #ifndef ROOT_TGMdiMainFrame #include "TGMdiMainFrame.h" #endif #ifndef ROOT_TGMdiMenu #include "TGMdiMenu.h" #endif #ifndef ROOT_TGListBox #include "TGListBox.h" #endif #ifndef ROOT_TGNumberEntry #include "TGNumberEntry.h" #endif #ifndef ROOT_TGScrollBar #include "TGScrollBar.h" #endif #ifndef ROOT_TGComboBox #include "TGComboBox.h" #endif #ifndef ROOT_TGuiBldHintsEditor #include "TGuiBldHintsEditor.h" #endif #ifndef ROOT_TGuiBldNameFrame #include "TGuiBldNameFrame.h" #endif #ifndef ROOT_TGFrame #include "TGFrame.h" #endif #ifndef ROOT_TGFileDialog #include "TGFileDialog.h" #endif #ifndef ROOT_TGShutter #include "TGShutter.h" #endif #ifndef ROOT_TGButtonGroup #include "TGButtonGroup.h" #endif #ifndef ROOT_TGCanvas #include "TGCanvas.h" #endif #ifndef ROOT_TGFSContainer #include "TGFSContainer.h" #endif #ifndef ROOT_TGuiBldEditor #include "TGuiBldEditor.h" #endif #ifndef ROOT_TGColorSelect #include "TGColorSelect.h" #endif #ifndef ROOT_TGButton #include "TGButton.h" #endif #ifndef ROOT_TGFSComboBox #include "TGFSComboBox.h" #endif #ifndef ROOT_TGLabel #include "TGLabel.h" #endif #ifndef ROOT_TRootGuiBuilder #include "TRootGuiBuilder.h" #endif #ifndef ROOT_TGTab #include "TGTab.h" #endif #ifndef ROOT_TGListView #include "TGListView.h" #endif #ifndef ROOT_TGSplitter #include "TGSplitter.h" #endif #ifndef ROOT_TGStatusBar #include "TGStatusBar.h" #endif #ifndef ROOT_TGListTree #include "TGListTree.h" #endif #ifndef ROOT_TGuiBldGeometryFrame #include "TGuiBldGeometryFrame.h" #endif #ifndef ROOT_TGToolTip #include "TGToolTip.h" #endif #ifndef ROOT_TGToolBar #include "TGToolBar.h" #endif #ifndef ROOT_TRootEmbeddedCanvas #include "TRootEmbeddedCanvas.h" #endif #ifndef ROOT_TCanvas #include "TCanvas.h" #endif #ifndef ROOT_TGuiBldDragManager #include "TGuiBldDragManager.h" #endif #include "Riostream.h" void test() { // main frame TGMainFrame *fMainFrame673 = new TGMainFrame(gClient->GetRoot(),10,10,kMainFrame | kVerticalFrame); fMainFrame673->SetName("fMainFrame673"); fMainFrame673->SetLayoutBroken(kTRUE); // embedded canvas TRootEmbeddedCanvas *fRootEmbeddedCanvas560 = new TRootEmbeddedCanvas(0,fMainFrame673,360,288); fRootEmbeddedCanvas560->SetName("fRootEmbeddedCanvas560"); Int_t wfRootEmbeddedCanvas560 = fRootEmbeddedCanvas560->GetCanvasWindowId(); TCanvas *c123 = new TCanvas("c123", 10, 10, wfRootEmbeddedCanvas560); fRootEmbeddedCanvas560->AdoptCanvas(c123); fMainFrame673->AddFrame(fRootEmbeddedCanvas560, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fRootEmbeddedCanvas560->MoveResize(0,0,600,600); TH1F *h =new TH1F("h","h",100,0,100); h->Draw(); TF1 *f = new TF1("f","pol1",0,100); f->SetParameters(0,.1); TGaxis *AxisCal = new TGaxis(h->GetXaxis()->GetXmin(), // gPad->PadtoY(0.01), h->GetXaxis()->GetXmax(), gPad->PadtoY(0.01), f->Eval(h->GetXaxis()->GetXmin()), f->Eval(h->GetXaxis()->GetXmax()), 510,"-"); AxisCal->Draw(); fMainFrame673->SetMWMHints(kMWMDecorAll, kMWMFuncAll, kMWMInputModeless); fMainFrame673->MapSubwindows(); fMainFrame673->Resize(fMainFrame673->GetDefaultSize()); fMainFrame673->MapWindow(); fMainFrame673->Resize(600,600); }