// Mainframe macro generated from application: /home/admin/root/bin/root.exe // By ROOT version 5.34/10 on 2014-12-16 16:03:09 #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_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_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_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 "Riostream.h" void table02() { int columns; int rows; TGVerticalFrame **Column; TGTextEntry *cl0;//label for the title of the column[0] TGTextEntry **CLabel;//labels for the numeric columns TGNumberEntryField ***NumEntry;//numeric entries [column][row], //column[0] has the labels char n[20]; int height, width; char text2233[30]; // main frame TGMainFrame *fMainFrame1329 = new TGMainFrame(gClient->GetRoot(),10,10,kMainFrame | kVerticalFrame); fMainFrame1329->SetName("fMainFrame1329"); fMainFrame1329->SetLayoutBroken(kFALSE); // vertical frame TGVerticalFrame *fVerticalFrame556 = new TGVerticalFrame(fMainFrame1329,756,694,kVerticalFrame); fVerticalFrame556->SetName("fVerticalFrame556"); fVerticalFrame556->SetLayoutBroken(kFALSE); // vertical frame TGHorizontalFrame *fHorizontalFrame561 = new TGHorizontalFrame(fVerticalFrame556,744,608,kHorizontalFrame); fHorizontalFrame561->SetName("fHorizontalFrame561"); fHorizontalFrame561->SetLayoutBroken(kFALSE); // canvas widget TGCanvas *fCanvas587 = new TGCanvas(fHorizontalFrame561,740,604); fCanvas587->SetName("fCanvas587"); // canvas viewport TGViewPort *fViewPort588 = fCanvas587->GetViewPort(); // composite frame TGCompositeFrame *fCompositeFrame597 = new TGCompositeFrame(fViewPort588,736,600,kHorizontalFrame | kOwnBackground); fCompositeFrame597->SetName("fCompositeFrame597"); fCompositeFrame597->SetLayoutManager(new TGHorizontalLayout(fCompositeFrame597)); fViewPort588->AddFrame(fCompositeFrame597); fCompositeFrame597->SetLayoutManager(new TGHorizontalLayout(fCompositeFrame597)); fCompositeFrame597->MapSubwindows(); fCanvas587->SetContainer(fCompositeFrame597); fCanvas587->MapSubwindows(); fHorizontalFrame561->AddFrame(fCanvas587, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fCanvas587->MoveResize(2,2,740,604); fVerticalFrame556->AddFrame(fHorizontalFrame561, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); // vertical frame TGHorizontalFrame *fHorizontalFrame570 = new TGHorizontalFrame(fVerticalFrame556,744,78,kHorizontalFrame); fHorizontalFrame570->SetName("fHorizontalFrame570"); fHorizontalFrame570->SetLayoutBroken(kTRUE); TGFont *ufont; // will reflect user font changes ufont = gClient->GetFont("-*-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*"); TGGC *uGC; // will reflect user GC changes // graphics context changes GCValues_t valButton680; valButton680.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton680.fForeground); gClient->GetColorByName("#e0e0e0",valButton680.fBackground); valButton680.fFillStyle = kFillSolid; valButton680.fFont = ufont->GetFontHandle(); valButton680.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton680, kTRUE); ULong_t ucolor; // will reflect user color changes gClient->GetColorByName("#33ffff",ucolor); TGTextButton *fTextButton680 = new TGTextButton(fHorizontalFrame570,"Hexadecimal",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton680->SetTextJustify(36); fTextButton680->SetMargins(0,0,0,0); fTextButton680->SetWrapLength(-1); fTextButton680->Resize(120,48); fTextButton680->ChangeBackground(ucolor); fHorizontalFrame570->AddFrame(fTextButton680, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton680->MoveResize(232,16,120,48); ufont = gClient->GetFont("-*-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*"); ////0000000000000000000000000000000000000000000000000000000000000000000000 //=========================================================================================================== columns = 3; rows = 2000; height = 20 + (20 * rows) + 15 ; width = 35 + 120 + 300 + 40 ; // 460 + 35 = 495 + 900 = 1395 Column = new TGVerticalFrame *[columns]; for (int i = 0; i < columns; i++) { // Column[i] = new TGVerticalFrame (mn, 200, 300); Column[i] = new TGVerticalFrame (fCompositeFrame597, 200, 300); // mn->AddFrame (Column[i], // new TGLayoutHints (kLHintsTop | kLHintsLeft, 0, 0, 0, 0)); fCompositeFrame597->AddFrame (Column[i], new TGLayoutHints (kLHintsTop | kLHintsLeft, 0, 0, 0, 0)); } //////////////////labels column/////////////////////////////////////////// cl0 = new TGTextEntry(Column[0], new TGTextBuffer(31),-1,uGC->GetGC(), ufont->GetFontStruct(),kSunkenFrame | kDoubleBorder | kOwnBackground); /* new TGTextEntry (Column[0], new TGTextBuffer (100), 10000, uGC->GetGC(),ufont->GetFontStruct(), kRaisedFrame | kDoubleBorder, GetWhitePixel ()); */ cl0->SetFont ("-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-iso8859-1", false); cl0->SetText ("Address"); cl0->SetAlignment(kTextCenterX); cl0->Resize (150, 20); cl0->SetEnabled (kFALSE); cl0->SetFrameDrawn (kTRUE); Column[0]->AddFrame (cl0, new TGLayoutHints (kLHintsCenterX, 0, 0, 10, 0)); TGTextEntry **Labels; //labels in the left most column Labels = new TGTextEntry *[rows]; for (int i = 0; i < rows; i++) { Labels[i] = new TGTextEntry (Column[0], new TGTextBuffer (100), -1, uGC->GetGC(),ufont->GetFontStruct(), kSunkenFrame | kDoubleBorder | kOwnBackground); Labels[i]->Resize (150, 20); Labels[i]->SetEnabled (kFALSE); Labels[i]->SetFrameDrawn (kTRUE); Column[0]->AddFrame (Labels[i], new TGLayoutHints (kLHintsCenterX, 0, 3, 0, 0)); } ///////////////////////////////////////////////// CLabel = new TGTextEntry *[columns - 1]; for (int i = 0; i < columns - 1; i++) { CLabel[i] = new TGTextEntry (Column[i + 1], new TGTextBuffer (100), -1, uGC->GetGC(),ufont->GetFontStruct(), kRaisedFrame | kDoubleBorder); CLabel[i]->SetFont ("-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-iso8859-1", false); //->SetText ("Trace Length[us]"); int kkl = (i==0) ? 160 : 220 ; CLabel[i]->Resize (kkl, 20); CLabel[i]->SetEnabled (kFALSE); CLabel[i]->SetFrameDrawn (kTRUE); Column[i + 1]->AddFrame (CLabel[i], new TGLayoutHints (kLHintsCenterX, 0, 0, 10, 0)); } ///////////////////////////////////////////////// NumEntry = new TGNumberEntryField **[columns]; for (int i = 0; i < columns; i++) NumEntry[i] = new TGNumberEntryField *[rows]; for (int i = 1; i < columns; i++) { for (int j = 0; j < rows; j++) { NumEntry[i][j] = new TGNumberEntryField (Column[i], i, 0, TGNumberFormat::kNESInteger); int kkj = (i==1) ? 160 : 220 ; NumEntry[i][j]->Resize (kkj , 20); // NumEntry[i][j]->Associate (this); Column[i]-> AddFrame (NumEntry[i][j], new TGLayoutHints (kLHintsCenterX, 0, 0, 0, 0)); } } for(int i=0;iSetText(n); } CLabel[0]->SetText("DSP Val"); CLabel[0]->SetAlignment(kTextCenterX); CLabel[1]->SetText("DSP Par"); CLabel[1]->SetAlignment(kTextCenterX); //for (int i = 1; i < columns ; i++) for (int j = 0 ; j < rows ; j++ ) { sprintf (text2233, "%i", j); NumEntry[1][j]->SetText (text2233); NumEntry[1][j]->SetState(kFALSE); sprintf (text2233, "%i", j); NumEntry[2][j]->SetText (text2233); NumEntry[2][j]->SetState(kFALSE); } //=========================================================================================================== ////0000000000000000000000000000000000000000000000000000000000000000000000 // graphics context changes GCValues_t vall865; vall865.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",vall865.fForeground); gClient->GetColorByName("#e0e0e0",vall865.fBackground); vall865.fFillStyle = kFillSolid; vall865.fFont = ufont->GetFontHandle(); vall865.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&vall865, kTRUE); gClient->GetColorByName("#ff00ff",ucolor); TGLabel *fLabel865 = new TGLabel(fHorizontalFrame570,"Module Number",uGC->GetGC(),ufont->GetFontStruct(),kChildFrame,ucolor); fLabel865->SetTextJustify(36); fLabel865->SetMargins(0,0,0,0); fLabel865->SetWrapLength(-1); fHorizontalFrame570->AddFrame(fLabel865, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fLabel865->MoveResize(0,24,128,32); TGNumberEntry *fNumberEntry670 = new TGNumberEntry(fHorizontalFrame570, (Double_t) 0,5,-1,(TGNumberFormat::EStyle) 0,(TGNumberFormat::EAttribute) 1,(TGNumberFormat::ELimit) 2,0,32); fNumberEntry670->SetName("fNumberEntry670"); fHorizontalFrame570->AddFrame(fNumberEntry670, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fNumberEntry670->MoveResize(128,32,56,22); ufont = gClient->GetFont("-*-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton1062; valButton1062.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton1062.fForeground); gClient->GetColorByName("#e0e0e0",valButton1062.fBackground); valButton1062.fFillStyle = kFillSolid; valButton1062.fFont = ufont->GetFontHandle(); valButton1062.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton1062, kTRUE); gClient->GetColorByName("#66ff33",ucolor); TGTextButton *fTextButton1062 = new TGTextButton(fHorizontalFrame570,"Refresh",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton1062->SetTextJustify(36); fTextButton1062->SetMargins(0,0,0,0); fTextButton1062->SetWrapLength(-1); fTextButton1062->Resize(104,48); fTextButton1062->ChangeBackground(ucolor); fHorizontalFrame570->AddFrame(fTextButton1062, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton1062->MoveResize(408,16,104,48); ufont = gClient->GetFont("-*-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*"); // graphics context changes GCValues_t valButton1091; valButton1091.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures; gClient->GetColorByName("#000000",valButton1091.fForeground); gClient->GetColorByName("#e0e0e0",valButton1091.fBackground); valButton1091.fFillStyle = kFillSolid; valButton1091.fFont = ufont->GetFontHandle(); valButton1091.fGraphicsExposures = kFALSE; uGC = gClient->GetGC(&valButton1091, kTRUE); gClient->GetColorByName("#ff0000",ucolor); TGTextButton *fTextButton1091 = new TGTextButton(fHorizontalFrame570,"Close",-1,uGC->GetGC(),ufont->GetFontStruct()); fTextButton1091->SetTextJustify(36); fTextButton1091->SetMargins(0,0,0,0); fTextButton1091->SetWrapLength(-1); fTextButton1091->Resize(120,48); fTextButton1091->ChangeBackground(ucolor); fHorizontalFrame570->AddFrame(fTextButton1091, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fTextButton1091->MoveResize(576,16,120,48); fVerticalFrame556->AddFrame(fHorizontalFrame570, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fMainFrame1329->AddFrame(fVerticalFrame556, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,1,1,1,1)); fMainFrame1329->SetMWMHints(kMWMDecorAll, kMWMFuncAll, kMWMInputModeless); fMainFrame1329->MapSubwindows(); fMainFrame1329->Resize(fMainFrame1329->GetDefaultSize()); fMainFrame1329->MapWindow(); fMainFrame1329->Resize(758,696); }