// Mainframe macro generated from application: /opt/PDroot/root_v5.28/bin/root.exe // By ROOT version 5.28/00 on 2011-02-15 10:27:42 #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_TGColorDialog #include "TGColorDialog.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_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_TGFontDialog #include "TGFontDialog.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_TGMsgBox #include "TGMsgBox.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_TGStatusBar #include "TGStatusBar.h" #endif #ifndef ROOT_TGListTree #include "TGListTree.h" #endif #ifndef ROOT_TGuiBldGeometryFrame #include "TGuiBldGeometryFrame.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 #ifndef ROOT_TGObject #include "TGObject.h" #endif #include "TThread.h" #include "TApplication.h" #include "TSystem.h" #include "Riostream.h" TGMainFrame *fMainFrame; TGHorizontalFrame *fHframe; TGNumberEntry *fNumberEntry723; TGNumberEntry *fNumberEntry719; TGTextEntry *fTextEntry954; TGGroupFrame *fGroupFrame715; TGTextButton *fTextButton728; Int_t StartRnNo, RnNo, RnTm, RnTmfx; Bool_t start, autorun; ULong_t ucolor; void StartStopToggle() { fTextButton728->SetState(kButtonDown); if (!start){ gClient->GetColorByName("#ff0000",ucolor); fTextButton728->ChangeBackground(ucolor); fTextButton728->SetTextColor(0x000000); fTextButton728->SetText("&Stop"); gSystem->Exec("date"); printf("DAQ is running...\n"); start = kTRUE; } else{ gClient->GetColorByName("#00ff00",ucolor); fTextButton728->ChangeBackground(ucolor); fTextButton728->SetTextColor(0x000000); fTextButton728->SetText("&Start"); gSystem->Exec("date"); gSystem->Exec("stop"); printf("DAQ is stopped...\n"); fNumberEntry719->SetState(kTRUE); fNumberEntry723->SetState(kTRUE); start = kFALSE; } fTextButton728->SetState(kButtonUp); } void ExitDAQ(){ gApplication->Terminate(0); } void GUI_Resize() { // main frame fMainFrame = new TGMainFrame(gClient->GetRoot(),10,10,kMainFrame | kVerticalFrame); fMainFrame->SetName("fMainFrame"); fMainFrame->SetWindowName("..CARIBU DAQ.."); fMainFrame->SetLayoutBroken(kTRUE); ULong_t ucolor; // will reflect user color changes gClient->GetColorByName("#333300",ucolor); // horizontal frame fHframe = new TGHorizontalFrame(fMainFrame,456,536,kHorizontalFrame | kRaisedFrame,ucolor); fHframe->SetName("fHframe"); fHframe->SetLayoutBroken(kTRUE); TGFont *ufont; // will reflect user font changes ufont = gClient->GetFont("-*-lucidabright-medium-r-*-*-34-*-*-*-*-*-*-*"); TGGC *uGC; // will reflect user GC changes // graphics context changes GCValues_t valButton712; valButton712.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#ffcc33",valButton712.fForeground); gClient->GetColorByName("#c0c0c0",valButton712.fBackground); valButton712.fFillStyle = kFillSolid; valButton712.fFont = ufont->GetFontHandle(); valButton712.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton712, kTRUE); gClient->GetColorByName("#993300",ucolor); TGTextButton *fTextButton712 = new TGTextButton(fHframe,"Setup Scarlet",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton712->SetTextJustify(36); fTextButton712->SetMargins(0,0,0,0); fTextButton712->SetWrapLength(-1); fTextButton712->Resize(440,56); fTextButton712->ChangeBackground(ucolor); fTextButton712->SetToolTipText("Click here to initialize CARIBUE DAQ enviornment"); fHframe->AddFrame(fTextButton712, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton712->MoveResize(8,8,440,56); fTextButton712->Connect("Clicked()", 0, 0, "SetupScarlet()"); // "" group frame fGroupFrame715 = new TGGroupFrame(fHframe,""); fGroupFrame715->SetLayoutBroken(kTRUE); TGLabel *fLabel716 = new TGLabel(fGroupFrame715,"Start Run #"); fLabel716->SetTextJustify(36); fLabel716->SetMargins(0,0,0,0); fLabel716->SetWrapLength(-1); fGroupFrame715->AddFrame(fLabel716, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fLabel716->MoveResize(8,10,104,30); TGLabel *fLabel717 = new TGLabel(fGroupFrame715,"Run Time (s)"); fLabel717->SetTextJustify(36); fLabel717->SetMargins(0,0,0,0); fLabel717->SetWrapLength(-1); fGroupFrame715->AddFrame(fLabel717, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fLabel717->MoveResize(8,41,104,30); TGLabel *fLabel718 = new TGLabel(fGroupFrame715,"Elapsed Time (s)"); fLabel718->SetTextJustify(36); fLabel718->SetMargins(0,0,0,0); fLabel718->SetWrapLength(-1); fGroupFrame715->AddFrame(fLabel718, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fLabel718->MoveResize(8,73,104,30); fNumberEntry719 = new TGNumberEntry(fGroupFrame715, (Double_t) 10,11,-1,(TGNumberFormat::EStyle) 5,(TGNumberFormat::EAttribute) 1,(TGNumberFormat::ELimit) 2,0,1e+07); fGroupFrame715->AddFrame(fNumberEntry719, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fNumberEntry719->MoveResize(112,15,96,22); fNumberEntry719->Connect("ValueSet(long)", 0, 0, "DoSetlabel()"); //fNumberEntry719->Connect("ValueChanged(long)", 0, 0, "DoSetlabel()"); fNumberEntry723 = new TGNumberEntry(fGroupFrame715, (Double_t) 7200,11,-1,(TGNumberFormat::EStyle) 5,(TGNumberFormat::EAttribute) 1,(TGNumberFormat::ELimit) 2,0,1e+07); fGroupFrame715->AddFrame(fNumberEntry723, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fNumberEntry723->MoveResize(112,45,96,22); fNumberEntry723->Connect("ValueSet(long)", 0, 0, "DoSetlabel()"); ufont = gClient->GetFont("-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1"); // graphics context changes GCValues_t valEntry954; valEntry954.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valEntry954.fForeground); gClient->GetColorByName("#c0c0c0",valEntry954.fBackground); valEntry954.fFillStyle = kFillSolid; valEntry954.fFont = ufont->GetFontHandle(); valEntry954.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valEntry954, kTRUE); fTextEntry954 = new TGTextEntry(fGroupFrame715, new TGTextBuffer(15),-1,uGC->GetGC(),ufont->GetFontStruct(),kSunkenFrame | kDoubleBorder | kOwnBackground); fTextEntry954->SetMaxLength(4096); fTextEntry954->SetAlignment(kTextRight); fTextEntry954->SetEnabled(kFALSE); // fTextEntry954->SetText("10"); fTextEntry954->Resize(86,fTextEntry954->GetDefaultHeight()); //fTextEntry954->Connect("TextChanged()", 0, 0, "DoSetlabel()"); fGroupFrame715->AddFrame(fTextEntry954, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextEntry954->MoveResize(118,78,86,22); fGroupFrame715->SetLayoutManager(new TGVerticalLayout(fGroupFrame715)); fGroupFrame715->Resize(215,115); fHframe->AddFrame(fGroupFrame715, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fGroupFrame715->MoveResize(8,72,215,115); ufont = gClient->GetFont("-*-new century schoolbook-bold-r-*-*-34-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton728; valButton728.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton728.fForeground); gClient->GetColorByName("#c0c0c0",valButton728.fBackground); valButton728.fFillStyle = kFillSolid; valButton728.fFont = ufont->GetFontHandle(); valButton728.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton728, kTRUE); gClient->GetColorByName("#00cc00",ucolor); fTextButton728 = new TGTextButton(fHframe,"Start",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton728->SetTextJustify(36); fTextButton728->SetMargins(0,0,0,0); fTextButton728->SetWrapLength(-1); fTextButton728->Resize(215,115); start = kFALSE; fTextButton728->ChangeBackground(ucolor); fTextButton728->SetToolTipText("Start/Stop DAQ"); fHframe->AddFrame(fTextButton728, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton728->MoveResize(232,72,215,115); fTextButton728->Connect("Clicked()", 0, 0, "StartStopToggle()"); ufont = gClient->GetFont("-*-new century schoolbook-bold-r-*-*-25-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton731; valButton731.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#ffff00",valButton731.fForeground); gClient->GetColorByName("#c0c0c0",valButton731.fBackground); valButton731.fFillStyle = kFillSolid; valButton731.fFont = ufont->GetFontHandle(); valButton731.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton731, kTRUE); gClient->GetColorByName("#000066",ucolor); TGTextButton *fTextButton731 = new TGTextButton(fHframe,"Update Spectra",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton731->SetTextJustify(36); fTextButton731->SetMargins(0,0,0,0); fTextButton731->SetWrapLength(-1); fTextButton731->Resize(215,60); fTextButton731->ChangeBackground(ucolor); fTextButton731->SetToolTipText("Update all spectra"); fTextButton731->SetCommand("hup()"); fHframe->AddFrame(fTextButton731, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton731->MoveResize(8,192,215,60); ufont = gClient->GetFont("-*-new century schoolbook-bold-r-*-*-25-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton734; valButton734.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#ffff00",valButton734.fForeground); gClient->GetColorByName("#c0c0c0",valButton734.fBackground); valButton734.fFillStyle = kFillSolid; valButton734.fFont = ufont->GetFontHandle(); valButton734.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton734, kTRUE); TGTextButton *fTextButton734 = new TGTextButton(fHframe,"Zero Spectra",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton734->SetTextJustify(36); fTextButton734->SetMargins(0,0,0,0); fTextButton734->SetWrapLength(-1); fTextButton734->Resize(215,60); fTextButton734->ChangeBackground(ucolor); fTextButton734->SetToolTipText("Zero all spectra"); fTextButton734->SetCommand("zap()"); fHframe->AddFrame(fTextButton734, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton734->MoveResize(232,192,215,60); // tab widget TGTab *fTab737 = new TGTab(fHframe,440,128); // container of "ADC1" TGCompositeFrame *fCompositeFrame740; fCompositeFrame740 = fTab737->AddTab("ADC1"); fCompositeFrame740->SetLayoutManager(new TGVerticalLayout(fCompositeFrame740)); fCompositeFrame740->SetLayoutBroken(kTRUE); // list box TGListBox *fListBox741 = new TGListBox(fCompositeFrame740); fListBox741->AddEntry("ADC1_1",0); fListBox741->AddEntry("ADC1_2",1); fListBox741->AddEntry("ADC1_3",2); fListBox741->AddEntry("ADC1_4",3); fListBox741->Resize(102,68); fCompositeFrame740->AddFrame(fListBox741, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fListBox741->MoveResize(0,0,102,68); ufont = gClient->GetFont("-*-century schoolbook l-bold-r-*-*-0-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton752; valButton752.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton752.fForeground); gClient->GetColorByName("#c0c0c0",valButton752.fBackground); valButton752.fFillStyle = kFillSolid; valButton752.fFont = ufont->GetFontHandle(); valButton752.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton752, kTRUE); TGTextButton *fTextButton752 = new TGTextButton(fCompositeFrame740,"Draw",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton752->SetTextJustify(36); fTextButton752->SetMargins(0,0,0,0); fTextButton752->SetWrapLength(-1); fTextButton752->Resize(100,25); fTextButton752->SetToolTipText("Draw selected spectra"); fCompositeFrame740->AddFrame(fTextButton752, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton752->MoveResize(0,75,100,25); // container of "ADC2" TGCompositeFrame *fCompositeFrame756; fCompositeFrame756 = fTab737->AddTab("ADC2"); fCompositeFrame756->SetLayoutManager(new TGVerticalLayout(fCompositeFrame756)); fCompositeFrame756->SetLayoutBroken(kTRUE); // list box TGListBox *fListBox757 = new TGListBox(fCompositeFrame756); fListBox757->AddEntry("ADC2_1",0); fListBox757->AddEntry("ADC2_2",1); fListBox757->AddEntry("ADC2_3",2); fListBox757->AddEntry("ADC2_4",3); fListBox757->Resize(102,68); fCompositeFrame756->AddFrame(fListBox757, new TGLayoutHints(kLHintsLeft | kLHintsTop,45,0,0,0)); fListBox757->MoveResize(45,0,102,68); ufont = gClient->GetFont("-*-century schoolbook l-bold-r-*-*-0-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton768; valButton768.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton768.fForeground); gClient->GetColorByName("#c0c0c0",valButton768.fBackground); valButton768.fFillStyle = kFillSolid; valButton768.fFont = ufont->GetFontHandle(); valButton768.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton768, kTRUE); TGTextButton *fTextButton768 = new TGTextButton(fCompositeFrame756,"Draw",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton768->SetTextJustify(36); fTextButton768->SetMargins(0,0,0,0); fTextButton768->SetWrapLength(-1); fTextButton768->Resize(100,25); fCompositeFrame756->AddFrame(fTextButton768, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton768->MoveResize(0,75,100,25); // container of "ADC3" TGCompositeFrame *fCompositeFrame770; fCompositeFrame770 = fTab737->AddTab("ADC3"); fCompositeFrame770->SetLayoutManager(new TGVerticalLayout(fCompositeFrame770)); fCompositeFrame770->SetLayoutBroken(kTRUE); // list box TGListBox *fListBox771 = new TGListBox(fCompositeFrame770); fListBox771->AddEntry("ADC3_1",0); fListBox771->AddEntry("ADC3_2",1); fListBox771->AddEntry("ADC3_3",2); fListBox771->AddEntry("ADC3_4",3); fListBox771->Resize(102,68); fCompositeFrame770->AddFrame(fListBox771, new TGLayoutHints(kLHintsLeft | kLHintsTop,91,0,0,0)); fListBox771->MoveResize(91,0,102,68); ufont = gClient->GetFont("-*-century schoolbook l-bold-r-*-*-0-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton782; valButton782.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton782.fForeground); gClient->GetColorByName("#c0c0c0",valButton782.fBackground); valButton782.fFillStyle = kFillSolid; valButton782.fFont = ufont->GetFontHandle(); valButton782.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton782, kTRUE); TGTextButton *fTextButton782 = new TGTextButton(fCompositeFrame770,"Draw",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton782->SetTextJustify(36); fTextButton782->SetMargins(0,0,0,0); fTextButton782->SetWrapLength(-1); fTextButton782->Resize(100,25); fCompositeFrame770->AddFrame(fTextButton782, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton782->MoveResize(0,75,100,25); // container of "ADC4" TGCompositeFrame *fCompositeFrame784; fCompositeFrame784 = fTab737->AddTab("ADC4"); fCompositeFrame784->SetLayoutManager(new TGVerticalLayout(fCompositeFrame784)); fCompositeFrame784->SetLayoutBroken(kTRUE); // list box TGListBox *fListBox785 = new TGListBox(fCompositeFrame784); fListBox785->AddEntry("ADC4_1",0); fListBox785->AddEntry("ADC4_2",1); fListBox785->AddEntry("ADC4_3",2); fListBox785->AddEntry("ADC4_4",3); fListBox785->Resize(102,68); fCompositeFrame784->AddFrame(fListBox785, new TGLayoutHints(kLHintsLeft | kLHintsTop,137,0,0,0)); fListBox785->MoveResize(137,0,102,68); ufont = gClient->GetFont("-*-century schoolbook l-bold-r-*-*-0-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton796; valButton796.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton796.fForeground); gClient->GetColorByName("#c0c0c0",valButton796.fBackground); valButton796.fFillStyle = kFillSolid; valButton796.fFont = ufont->GetFontHandle(); valButton796.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton796, kTRUE); TGTextButton *fTextButton796 = new TGTextButton(fCompositeFrame784,"Draw",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton796->SetTextJustify(36); fTextButton796->SetMargins(0,0,0,0); fTextButton796->SetWrapLength(-1); fTextButton796->Resize(100,25); fCompositeFrame784->AddFrame(fTextButton796, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton796->MoveResize(0,75,100,25); // container of "ADC5" TGCompositeFrame *fCompositeFrame798; fCompositeFrame798 = fTab737->AddTab("ADC5"); fCompositeFrame798->SetLayoutManager(new TGVerticalLayout(fCompositeFrame798)); fCompositeFrame798->SetLayoutBroken(kTRUE); // list box TGListBox *fListBox799 = new TGListBox(fCompositeFrame798); fListBox799->AddEntry("ADC5_1",0); fListBox799->AddEntry("ADC5_2",1); fListBox799->AddEntry("ADC5_3",2); fListBox799->AddEntry("ADC5_4",3); fListBox799->Resize(102,68); fCompositeFrame798->AddFrame(fListBox799, new TGLayoutHints(kLHintsLeft | kLHintsTop,183,0,0,0)); fListBox799->MoveResize(183,0,102,68); ufont = gClient->GetFont("-*-century schoolbook l-bold-r-*-*-0-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton810; valButton810.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton810.fForeground); gClient->GetColorByName("#c0c0c0",valButton810.fBackground); valButton810.fFillStyle = kFillSolid; valButton810.fFont = ufont->GetFontHandle(); valButton810.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton810, kTRUE); TGTextButton *fTextButton810 = new TGTextButton(fCompositeFrame798,"Draw",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton810->SetTextJustify(36); fTextButton810->SetMargins(0,0,0,0); fTextButton810->SetWrapLength(-1); fTextButton810->Resize(100,25); fCompositeFrame798->AddFrame(fTextButton810, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton810->MoveResize(0,75,100,25); // container of "ADC6" TGCompositeFrame *fCompositeFrame812; fCompositeFrame812 = fTab737->AddTab("ADC6"); fCompositeFrame812->SetLayoutManager(new TGVerticalLayout(fCompositeFrame812)); fCompositeFrame812->SetLayoutBroken(kTRUE); // list box TGListBox *fListBox813 = new TGListBox(fCompositeFrame812); fListBox813->AddEntry("ADC6_1",0); fListBox813->AddEntry("ADC6_2",1); fListBox813->AddEntry("ADC6_3",2); fListBox813->AddEntry("ADC6_4",3); fListBox813->AddEntry("ADC6_5",4); fListBox813->AddEntry("ADC6_6",5); fListBox813->AddEntry("ADC6_7",6); fListBox813->AddEntry("ADC6_8",6); fListBox813->AddEntry("ADC6_9",0); fListBox813->AddEntry("ADC6_10",1); fListBox813->AddEntry("ADC6_11",2); fListBox813->AddEntry("ADC6_12",3); fListBox813->AddEntry("ADC6_13",4); fListBox813->AddEntry("ADC6_14",5); fListBox813->AddEntry("ADC6_15",6); fListBox813->AddEntry("ADC6_16",6); fListBox813->Resize(102,100); fCompositeFrame812->AddFrame(fListBox813, new TGLayoutHints(kLHintsLeft | kLHintsTop,229,0,0,0)); fListBox813->MoveResize(229,0,102,100); ufont = gClient->GetFont("-*-century schoolbook l-bold-r-*-*-0-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton836; valButton836.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton836.fForeground); gClient->GetColorByName("#c0c0c0",valButton836.fBackground); valButton836.fFillStyle = kFillSolid; valButton836.fFont = ufont->GetFontHandle(); valButton836.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton836, kTRUE); TGTextButton *fTextButton836 = new TGTextButton(fCompositeFrame812,"Draw",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton836->SetTextJustify(36); fTextButton836->SetMargins(0,0,0,0); fTextButton836->SetWrapLength(-1); fTextButton836->Resize(100,25); fCompositeFrame812->AddFrame(fTextButton836, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton836->MoveResize(0,75,100,25); // container of "TDC1" TGCompositeFrame *fCompositeFrame838; fCompositeFrame838 = fTab737->AddTab("TDC1"); fCompositeFrame838->SetLayoutManager(new TGVerticalLayout(fCompositeFrame838)); fCompositeFrame838->SetLayoutBroken(kTRUE); // list box TGListBox *fListBox839 = new TGListBox(fCompositeFrame838); fListBox839->AddEntry("TDC1_1",0); fListBox839->AddEntry("TDC1_2",1); fListBox839->AddEntry("TDC1_3",2); fListBox839->AddEntry("TDC1_4",3); fListBox839->AddEntry("TDC1_5",4); fListBox839->AddEntry("TDC1_6",5); fListBox839->AddEntry("TDC1_7",6); fListBox839->AddEntry("TDC1_8",6); fListBox839->AddEntry("TDC1_9",0); fListBox839->AddEntry("TDC1_10",1); fListBox839->AddEntry("TDC1_11",2); fListBox839->AddEntry("TDC1_12",3); fListBox839->AddEntry("TDC1_13",4); fListBox839->AddEntry("TDC1_14",5); fListBox839->AddEntry("TDC1_15",6); fListBox839->AddEntry("TDC1_16",6); fListBox839->Resize(102,100); fCompositeFrame838->AddFrame(fListBox839, new TGLayoutHints(kLHintsLeft | kLHintsTop,275,0,0,0)); fListBox839->MoveResize(275,0,102,100); ufont = gClient->GetFont("-*-century schoolbook l-bold-r-*-*-0-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton862; valButton862.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton862.fForeground); gClient->GetColorByName("#c0c0c0",valButton862.fBackground); valButton862.fFillStyle = kFillSolid; valButton862.fFont = ufont->GetFontHandle(); valButton862.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton862, kTRUE); TGTextButton *fTextButton862 = new TGTextButton(fCompositeFrame838,"Draw",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton862->SetTextJustify(36); fTextButton862->SetMargins(0,0,0,0); fTextButton862->SetWrapLength(-1); fTextButton862->Resize(100,25); fCompositeFrame838->AddFrame(fTextButton862, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton862->MoveResize(0,75,100,25); // container of "TDC2" TGCompositeFrame *fCompositeFrame864; fCompositeFrame864 = fTab737->AddTab("TDC2"); fCompositeFrame864->SetLayoutManager(new TGVerticalLayout(fCompositeFrame864)); fCompositeFrame864->SetLayoutBroken(kTRUE); // list box TGListBox *fListBox865 = new TGListBox(fCompositeFrame864); fListBox865->AddEntry("TDC2_1",0); fListBox865->AddEntry("TDC2_2",1); fListBox865->AddEntry("TDC2_3",2); fListBox865->AddEntry("TDC2_4",3); fListBox865->AddEntry("TDC2_5",4); fListBox865->AddEntry("TDC2_6",5); fListBox865->AddEntry("TDC2_7",6); fListBox865->AddEntry("TDC2_8",6); fListBox865->AddEntry("TDC2_9",0); fListBox865->AddEntry("TDC2_10",1); fListBox865->AddEntry("TDC2_11",2); fListBox865->AddEntry("TDC2_12",3); fListBox865->AddEntry("TDC2_13",4); fListBox865->AddEntry("TDC2_14",5); fListBox865->AddEntry("TDC2_15",6); fListBox865->AddEntry("TDC2_16",6); fListBox865->Resize(102,100); fCompositeFrame864->AddFrame(fListBox865, new TGLayoutHints(kLHintsLeft | kLHintsTop,320,0,0,0)); fListBox865->MoveResize(320,0,102,100); ufont = gClient->GetFont("-*-century schoolbook l-bold-r-*-*-0-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton888; valButton888.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton888.fForeground); gClient->GetColorByName("#c0c0c0",valButton888.fBackground); valButton888.fFillStyle = kFillSolid; valButton888.fFont = ufont->GetFontHandle(); valButton888.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton888, kTRUE); TGTextButton *fTextButton888 = new TGTextButton(fCompositeFrame864,"Draw",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton888->SetTextJustify(36); fTextButton888->SetMargins(0,0,0,0); fTextButton888->SetWrapLength(-1); fTextButton888->Resize(100,25); fCompositeFrame864->AddFrame(fTextButton888, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton888->MoveResize(0,75,100,25); // container of "Scalar" TGCompositeFrame *fCompositeFrame890; fCompositeFrame890 = fTab737->AddTab("Scalar"); fCompositeFrame890->SetLayoutManager(new TGVerticalLayout(fCompositeFrame890)); fCompositeFrame890->SetLayoutBroken(kTRUE); ufont = gClient->GetFont("-*-century schoolbook l-bold-r-*-*-0-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton891; valButton891.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton891.fForeground); gClient->GetColorByName("#c0c0c0",valButton891.fBackground); valButton891.fFillStyle = kFillSolid; valButton891.fFont = ufont->GetFontHandle(); valButton891.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton891, kTRUE); TGTextButton *fTextButton891 = new TGTextButton(fCompositeFrame890,"Draw",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton891->SetTextJustify(36); fTextButton891->SetMargins(0,0,0,0); fTextButton891->SetWrapLength(-1); fTextButton891->Resize(100,25); fCompositeFrame890->AddFrame(fTextButton891, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton891->MoveResize(0,75,100,25); fTab737->SetTab(6); fTab737->Resize(fTab737->GetDefaultSize()); fHframe->AddFrame(fTab737, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTab737->MoveResize(8,264,440,128); ufont = gClient->GetFont("-*-new century schoolbook-bold-r-*-*-34-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton892; valButton892.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#003300",valButton892.fForeground); gClient->GetColorByName("#c0c0c0",valButton892.fBackground); valButton892.fFillStyle = kFillSolid; valButton892.fFont = ufont->GetFontHandle(); valButton892.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton892, kTRUE); gClient->GetColorByName("#cc0000",ucolor); TGTextButton *fTextButton892 = new TGTextButton(fHframe,"Exit DAQ",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton892->SetTextJustify(36); fTextButton892->SetMargins(0,0,0,0); fTextButton892->SetWrapLength(-1); fTextButton892->Resize(176,120); fTextButton892->ChangeBackground(ucolor); fTextButton892->SetToolTipText("Exit DAQ!"); fTextButton892->Connect("Clicked()",0,0,"ExitDAQ()"); fHframe->AddFrame(fTextButton892, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton892->MoveResize(144,400,176,120); fMainFrame->AddFrame(fHframe, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY)); fHframe->MoveResize(0,0,456,536); fMainFrame->SetMWMHints(kMWMDecorAll, kMWMFuncAll, kMWMInputModeless); fMainFrame->MapSubwindows(); fMainFrame->Resize(fMainFrame->GetDefaultSize()); fMainFrame->MapWindow(); fMainFrame->Resize(457,539); } void SetupScarlet() { cout << "slot SetupScarlet()" << endl; } void DoSetlabel() { StartRnNo = fNumberEntry719->GetNumberEntry()->GetIntNumber(); RnTm = fNumberEntry723->GetNumberEntry()->GetIntNumber(); fTextEntry954->SetText(Form("%d",RnNo)); fTextEntry954->Layout(); RnTmfx = RnTm; }