//______________________________________________________________________________ void make_gui() { // Create minimal GUI for event navigation. TEveBrowser* browser = gEve->GetBrowser(); browser->StartEmbedding(TRootBrowser::kLeft); TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600); frmMain->SetWindowName("XX GUI"); frmMain->SetCleanup(kDeepCleanup); TGHorizontalFrame* hf = new TGHorizontalFrame(frmMain); { TString icondir( Form("%s/icons/", gSystem->Getenv("ROOTSYS")) ); TGPictureButton* b = 0; EvNavHandler *fh = new EvNavHandler; b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoBack.gif")); hf->AddFrame(b); b->Connect("Clicked()", "EvNavHandler", fh, "Bck()"); b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoForward.gif")); hf->AddFrame(b); b->Connect("Clicked()", "EvNavHandler", fh, "Fwd()"); } frmMain->AddFrame(hf); frmMain->MapSubwindows(); frmMain->Resize(); frmMain->MapWindow(); browser->StopEmbedding(); browser->SetTabTitle("Event Control", 0); }
//______________________________________________________________________________ void make_gui() { // Create minimal GUI for event navigation. gROOT->ProcessLine(".L SplitGLView.C+"); TEveBrowser* browser = gEve->GetBrowser(); browser->ShowCloseTab(kFALSE); browser->ExecPlugin("SplitGLView", 0, "new SplitGLView(gClient->GetRoot(), 600, 450, kTRUE)"); browser->ShowCloseTab(kTRUE); browser->StartEmbedding(TRootBrowser::kLeft); TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600); frmMain->SetWindowName("XX GUI"); frmMain->SetCleanup(kDeepCleanup); TGHorizontalFrame* hf = new TGHorizontalFrame(frmMain); { TString icondir( Form("%s/icons/", gSystem->Getenv("ROOTSYS")) ); TGPictureButton* b = 0; EvNavHandler *fh = new EvNavHandler; b = new TGPictureButton(hf, gClient->GetPicture(icondir + "GoBack.gif")); hf->AddFrame(b, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 10, 2, 10, 10)); b->Connect("Clicked()", "EvNavHandler", fh, "Bck()"); b = new TGPictureButton(hf, gClient->GetPicture(icondir + "GoForward.gif")); hf->AddFrame(b, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 10, 10, 10)); b->Connect("Clicked()", "EvNavHandler", fh, "Fwd()"); gTextEntry = new TGTextEntry(hf); gTextEntry->SetEnabled(kFALSE); hf->AddFrame(gTextEntry, new TGLayoutHints(kLHintsLeft | kLHintsCenterY | kLHintsExpandX, 2, 10, 10, 10)); } frmMain->AddFrame(hf, new TGLayoutHints(kLHintsTop | kLHintsExpandX,0,0,20,0)); gProgress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100); gProgress->ShowPosition(kTRUE, kFALSE, "%.0f tracks"); gProgress->SetBarColor("green"); frmMain->AddFrame(gProgress, new TGLayoutHints(kLHintsExpandX, 10, 10, 5, 5)); frmMain->MapSubwindows(); frmMain->Resize(); frmMain->MapWindow(); browser->StopEmbedding(); browser->SetTabTitle("Event Control", 0); }
KVFileDialog::KVFileDialog(const TGWindow *p, const TGWindow *main, EKVFileDialogMode dlg_type, TGFileInfo *file_info) : TGTransientFrame(p, main, 10, 10, kVerticalFrame) { // Create a file selection dialog. Depending on the dlg_type it can be // used for opening or saving a file or selecting a directory. fDlgMode=dlg_type; SetCleanup(kDeepCleanup); Connect("CloseWindow()", "KVFileDialog", this, "CloseWindow()"); DontCallClose(); int i; if (!p && !main) { MakeZombie(); return; } if (!file_info) { Error("KVFileDialog", "file_info argument not set"); fFileInfo = &gInfo; if (fFileInfo->fIniDir) { delete [] fFileInfo->fIniDir; fFileInfo->fIniDir = 0; } if (fFileInfo->fFilename) { delete [] fFileInfo->fFilename; fFileInfo->fFilename = 0; } fFileInfo->fFileTypeIdx = 0; } else fFileInfo = file_info; if (!fFileInfo->fFileTypes) fFileInfo->fFileTypes = gDefTypes; if (!fFileInfo->fIniDir) fFileInfo->fIniDir = StrDup("."); TGHorizontalFrame *fHtop = new TGHorizontalFrame(this, 10, 10); //--- top toolbar elements TGLabel *fLookin = new TGLabel(fHtop, new TGHotString((dlg_type == kKVFDSave) ? "S&ave in:" : "&Look in:")); fTreeLB = new TGFSComboBox(fHtop, kIDF_FSLB); fTreeLB->Associate(this); fPcdup = fClient->GetPicture("tb_uplevel.xpm"); fPnewf = fClient->GetPicture("tb_newfolder.xpm"); fPlist = fClient->GetPicture("tb_list.xpm"); fPdetails = fClient->GetPicture("tb_details.xpm"); if (!(fPcdup && fPnewf && fPlist && fPdetails)) Error("KVFileDialog", "missing toolbar pixmap(s).\n"); fCdup = new TGPictureButton(fHtop, fPcdup, kIDF_CDUP); fNewf = new TGPictureButton(fHtop, fPnewf, kIDF_NEW_FOLDER); fList = new TGPictureButton(fHtop, fPlist, kIDF_LIST); fDetails = new TGPictureButton(fHtop, fPdetails, kIDF_DETAILS); fCdup->SetStyle(gClient->GetStyle()); fNewf->SetStyle(gClient->GetStyle()); fList->SetStyle(gClient->GetStyle()); fDetails->SetStyle(gClient->GetStyle()); fCdup->SetToolTipText("Up One Level"); fNewf->SetToolTipText("Create New Folder"); fList->SetToolTipText("List"); fDetails->SetToolTipText("Details"); fCdup->Associate(this); fNewf->Associate(this); fList->Associate(this); fDetails->Associate(this); fList->AllowStayDown(kTRUE); fDetails->AllowStayDown(kTRUE); fTreeLB->Resize(200, fTreeLB->GetDefaultHeight()); fHtop->AddFrame(fLookin, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2)); fHtop->AddFrame(fTreeLB, new TGLayoutHints(kLHintsLeft | kLHintsExpandY, 3, 0, 2, 2)); fHtop->AddFrame(fCdup, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 2, 2)); fHtop->AddFrame(fNewf, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 2, 2)); fHtop->AddFrame(fList, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 2, 2)); fHtop->AddFrame(fDetails, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 8, 2, 2)); if (dlg_type == kKVFDSave) { fCheckB = new TGCheckButton(fHtop, "&Overwrite", kIDF_CHECKB); fCheckB->SetToolTipText("Overwrite a file without displaying a message if selected"); } else { fCheckB = new TGCheckButton(fHtop, "&Multiple files", kIDF_CHECKB); fCheckB->SetToolTipText("Allows multiple file selection when SHIFT is pressed"); fCheckB->Connect("Toggled(Bool_t)","TGFileInfo",fFileInfo,"SetMultipleSelection(Bool_t)"); } fHtop->AddFrame(fCheckB, new TGLayoutHints(kLHintsLeft | kLHintsCenterY)); fCheckB->SetOn(fFileInfo->fMultipleSelection); AddFrame(fHtop, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 4, 4, 3, 1)); //--- file view fFv = new TGListView(this, 400, 161); fFc = new TGFileContainer(fFv->GetViewPort(), 10, 10, kHorizontalFrame, fgWhitePixel); fFc->Associate(this); fFv->GetViewPort()->SetBackgroundColor(fgWhitePixel); fFv->SetContainer(fFc); fFv->SetViewMode(kLVList); fFv->SetIncrements(1, 19); // set vertical scroll one line height at a time TGTextButton** buttons = fFv->GetHeaderButtons(); if (buttons) { buttons[0]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByName)"); buttons[1]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByType)"); buttons[2]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortBySize)"); buttons[3]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByOwner)"); buttons[4]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByGroup)"); buttons[5]->Connect("Clicked()", "TGFileContainer", fFc, "Sort(=kSortByDate)"); } fFc->SetFilter(fFileInfo->fFileTypes[fFileInfo->fFileTypeIdx+1]); fFc->Sort(kSortByName); fFc->ChangeDirectory(fFileInfo->fIniDir); fFc->SetMultipleSelection(fFileInfo->fMultipleSelection); fTreeLB->Update(fFc->GetDirectory()); fList->SetState(kButtonEngaged); AddFrame(fFv, new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 4, 4, 3, 1)); if (dlg_type == kKVFDOpen) { fCheckB->Connect("Toggled(Bool_t)","TGFileContainer",fFc,"SetMultipleSelection(Bool_t)"); fCheckB->Connect("Toggled(Bool_t)","TGFileContainer",fFc,"UnSelectAll()"); } //--- file name and types TGHorizontalFrame *fHf = new TGHorizontalFrame(this, 10, 10); TGVerticalFrame *fVf = new TGVerticalFrame(fHf, 10, 10); TGHorizontalFrame *fHfname = new TGHorizontalFrame(fVf, 10, 10); TGLabel *fLfname = new TGLabel(fHfname, new TGHotString("File &name:")); fTbfname = new TGTextBuffer(1034); fName = new TGTextEntry(fHfname, fTbfname); fName->Resize(230, fName->GetDefaultHeight()); fName->Associate(this); fHfname->AddFrame(fLfname, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2)); fHfname->AddFrame(fName, new TGLayoutHints(kLHintsRight | kLHintsCenterY, 0, 20, 2, 2)); fVf->AddFrame(fHfname, new TGLayoutHints(kLHintsLeft | kLHintsCenterY | kLHintsExpandX)); TGHorizontalFrame *fHftype = new TGHorizontalFrame(fVf, 10, 10); TGLabel *fLftypes = new TGLabel(fHftype, new TGHotString("Files of &type:")); fTypes = new TGComboBox(fHftype, kIDF_FTYPESLB); fTypes->Associate(this); fTypes->Resize(230, fName->GetDefaultHeight()); TString s; for (i = 0; fFileInfo->fFileTypes[i] != 0; i += 2) { s.Form("%s (%s)", fFileInfo->fFileTypes[i], fFileInfo->fFileTypes[i+1]); fTypes->AddEntry(s.Data(), i); } fTypes->Select(fFileInfo->fFileTypeIdx); // Show all items in combobox without scrollbar //TGDimension fw = fTypes->GetListBox()->GetContainer()->GetDefaultSize(); //fTypes->GetListBox()->Resize(fw.fWidth, fw.fHeight); if (fFileInfo->fFilename && fFileInfo->fFilename[0]) fTbfname->AddText(0, fFileInfo->fFilename); else fTbfname->Clear(); fTypes->GetListBox()->Resize(230, 120); fHftype->AddFrame(fLftypes, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 5, 2, 2)); fHftype->AddFrame(fTypes, new TGLayoutHints(kLHintsRight | kLHintsCenterY, 0, 20, 2, 2)); fVf->AddFrame(fHftype, new TGLayoutHints(kLHintsLeft | kLHintsCenterY | kLHintsExpandX)); fHf->AddFrame(fVf, new TGLayoutHints(kLHintsLeft | kLHintsCenterY | kLHintsExpandX)); //--- Open/Save and Cancel buttons TGVerticalFrame *fVbf = new TGVerticalFrame(fHf, 10, 10, kFixedWidth); fOk = new TGTextButton(fVbf, new TGHotString((dlg_type == kKVFDSave) ? "&Save" : "&Open"), kIDF_OK); fCancel = new TGTextButton(fVbf, new TGHotString("Cancel"), kIDF_CANCEL); fOk->Associate(this); fCancel->Associate(this); fVbf->AddFrame(fOk, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 2, 2)); fVbf->AddFrame(fCancel, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 2, 2)); UInt_t width = TMath::Max(fOk->GetDefaultWidth(), fCancel->GetDefaultWidth()) + 20; fVbf->Resize(width + 20, fVbf->GetDefaultHeight()); fHf->AddFrame(fVbf, new TGLayoutHints(kLHintsLeft | kLHintsCenterY)); AddFrame(fHf, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 4, 4, 3, 1)); SetEditDisabled(kEditDisable); MapSubwindows(); TGDimension size = GetDefaultSize(); Resize(size); //---- position relative to the parent's window CenterOnParent(); //---- make the message box non-resizable SetWMSize(size.fWidth, size.fHeight); SetWMSizeHints(size.fWidth, size.fHeight, 10000, 10000, 1, 1); const char *wname = ((dlg_type == kKVFDSave) ? "Save As..." : (dlg_type==kKVFDOpen) ? "Open" : "Choose directory..."); SetWindowName(wname); SetIconName(wname); SetClassHints("FileDialog", "FileDialog"); SetMWMHints(kMWMDecorAll | kMWMDecorResizeH | kMWMDecorMaximize | kMWMDecorMinimize | kMWMDecorMenu, kMWMFuncAll | kMWMFuncResize | kMWMFuncMaximize | kMWMFuncMinimize, kMWMInputModeless); MapWindow(); fFc->DisplayDirectory(); fClient->WaitFor(this); }
//______________________________________________________________________________ Bool_t ArgusWindow::Start() { // Start Argus Window fWatchAll.Start(false); ROMEPrint::Debug("ArgusWindow::Start()\n"); // Create status bar Int_t parts[2] = {70, 30}; fStatusBar = new TGStatusBar(this, 50, 10, kHorizontalFrame); fStatusBar->SetParts(parts, sizeof(parts) / sizeof(Int_t)); fProgress = new TGHProgressBar(fStatusBar->GetBarPart(1), TGProgressBar::kStandard, 20); fProgress->SetPosition(0); fStatusBar->GetBarPart(1)->AddFrame(fProgress, new TGLayoutHints(kLHintsExpandX|kLHintsExpandY, 10, 10)); if (fStatusBarSwitch) { this->AddFrame(fStatusBar, new TGLayoutHints(kLHintsBottom | kLHintsLeft | kLHintsExpandX, 0, 0, 2, 0)); } // Create horizontal frame which holds menu bar TGHorizontalFrame *hMenuFrame = new TGHorizontalFrame(this, 0, 0); AddFrame(hMenuFrame, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0)); { // Create menubar fMenuBar = new TGMenuBar(hMenuFrame, 1, 1, kHorizontalFrame); hMenuFrame->AddFrame(fMenuBar, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 0, 0)); { // Create popup menu fMenuFile = new TGPopupMenu(fClient->GetRoot()); fMenuFile->Associate(this); fMenuBar->AddPopup("&File", fMenuFile, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0)); if (fTabWindow) { fMenuFile->AddEntry("New Window", M_FILE_NEW_WINDOW); if (gROME->GetNumberOfNetFolders()>0) { TGPopupMenu *fMenuNetFolder = new TGPopupMenu(fClient->GetRoot()); if (AddMenuNetFolder(fMenuNetFolder)) { fMenuFile->AddPopup("&Connect NetFolder", fMenuNetFolder); fMenuNetFolder->Associate(this); } } // fMenuFile->AddEntry("Start C&ontroller", M_FILE_CONTROLLER); fMenuFile->AddEntry("E&xit", M_FILE_EXIT); } else { fMenuFile->AddEntry("C&lose", M_FILE_EXIT); } } } { // separator TGHorizontal3DLine *hline = new TGHorizontal3DLine(this); AddFrame(hline, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX)); } // Horizontal frame which holds the main canvas TGHorizontalFrame *hFrame = new TGHorizontalFrame(this); AddFrame(hFrame, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY)); // Vertical frame which holds the info frame and listtree TGVerticalFrame *vFrame = new TGVerticalFrame(hFrame); hFrame->AddFrame(vFrame, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandY, 0, 1)); { // now analyzer controller is dockable if (fTabWindow && !gROME->IsStandAloneARGUS()) { fController = new ArgusAnalyzerController(vFrame, -1, fControllerNetFolder); fController->Associate(this); vFrame->AddFrame(fController, new TGLayoutHints (kLHintsTop | kLHintsLeft)); } if (!gROME->IsStandAloneARGUS()) { // run# TGHorizontalFrame *runFrame = new TGHorizontalFrame(vFrame); vFrame->AddFrame(runFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 15, 10, 2, 2)); TGLabel *fRunLabel = new TGLabel(runFrame, "Run : "); fRunLabel->SetTextJustify(kTextLeft | kTextCenterY); runFrame->AddFrame(fRunLabel, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0)); fRunNumber = new TGLabel(runFrame, "0"); fRunNumber->SetTextJustify(kTextRight | kTextCenterY); runFrame->AddFrame(fRunNumber, new TGLayoutHints(kLHintsRight, 5, 0, 0, 0)); // evnet# TGHorizontalFrame *eventFrame = new TGHorizontalFrame(vFrame); vFrame->AddFrame(eventFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 15, 10, 2, 2)); TGLabel *fEventLabel = new TGLabel(eventFrame, "Event : "); fEventLabel->SetTextJustify(kTextLeft | kTextCenterY); eventFrame->AddFrame(fEventLabel, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0)); fEventNumber = new TGLabel(eventFrame, "0"); fEventNumber->SetTextJustify(kTextLeft | kTextCenterY); eventFrame->AddFrame(fEventNumber, new TGLayoutHints(kLHintsRight, 5, 0, 0, 0)); // Year/Mon/Day TGHorizontalFrame *YearMonDayFrame = new TGHorizontalFrame(vFrame); vFrame->AddFrame(YearMonDayFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 15, 10, 2, 2)); TGLabel *fYearMonDayLabel = new TGLabel(YearMonDayFrame, "Date : "); fYearMonDayLabel->SetTextJustify(kTextLeft | kTextCenterY); YearMonDayFrame->AddFrame(fYearMonDayLabel, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0)); fYearMonDay = new TGLabel(YearMonDayFrame, "1970-Jan-01"); fYearMonDay->SetTextJustify(kTextLeft | kTextCenterY); YearMonDayFrame->AddFrame(fYearMonDay, new TGLayoutHints(kLHintsRight, 5, 0, 0, 0)); // Hour/Min/Sec TGHorizontalFrame *HourMinSecFrame = new TGHorizontalFrame(vFrame); vFrame->AddFrame(HourMinSecFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 15, 10, 2, 2)); TGLabel *fHourMinSecLabel = new TGLabel(HourMinSecFrame, "Time : "); fHourMinSecLabel->SetTextJustify(kTextLeft | kTextCenterY); HourMinSecFrame->AddFrame(fHourMinSecLabel, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0)); fHourMinSec = new TGLabel(HourMinSecFrame, "00:00:00"); fHourMinSec->SetTextJustify(kTextLeft | kTextCenterY); HourMinSecFrame->AddFrame(fHourMinSec, new TGLayoutHints(kLHintsRight, 5, 0, 0, 0)); } // Vertical frame which holds users info frame fUserInfoFrame = new TGVerticalFrame(vFrame); vFrame->AddFrame(fUserInfoFrame, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0)); // fControllerDock = new TGDockableFrame(vFrame, 0, kVerticalFrame); // vFrame->AddFrame(fControllerDock, new TGLayoutHints(kLHintsTop | kLHintsLeft)); // fControllerDock->EnableUndock(kTRUE); // fControllerDock->EnableHide(kTRUE); // fControllerDock->Associate(this); if (fListTreeView && fTabWindow) { // Create ListTree TGCanvas *canvas = new TGCanvas(vFrame, 120, 400); vFrame->AddFrame(canvas, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY)); fListTree = new TGListTree(canvas, kHorizontalFrame); fListTree->Connect("Clicked(TGListTreeItem*,Int_t)", "ArgusWindow", this, "OnClick(TGListTreeItem*,Int_t)"); fListTree->Connect("DoubleClicked(TGListTreeItem*,Int_t)", "ArgusWindow", this, "OnDoubleClick(TGListTreeItem*,Int_t)"); fListTree->Associate(this); } // Create the main frame const UInt_t width = static_cast<UInt_t>(640 * GetWindowScale()); const UInt_t height = static_cast<UInt_t>(480 * GetWindowScale()); if (!fListTreeView && fTabWindow) { fTab = new TGTab(hFrame, width, height); fTab->Associate(this); hFrame->AddFrame(fTab, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0)); } else { fMainFrame = new ROMECompositeFrame(hFrame, width, height); hFrame->AddFrame(fMainFrame, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY)); } } ROMEPrint::Debug("Creating Tabs\n"); CheckActiveFlags(); if (!CreateTabs()) { fWatchAll.Stop(); return kFALSE; } ROMEPrint::Debug("Tabs Created\n"); MapSubwindows(); TGDimension size = GetDefaultSize(); ArgusTab *tab; Int_t lastTabIndex = -1; Int_t iTab; const Int_t nTabs = fTabObjects->GetEntriesFast(); if (fListTreeView) { ArgusTab *lastTab = 0; TGDimension framesize(0,0); // first, hide all the tabs for (iTab = 0; iTab < nTabs; iTab++) { tab = GetTabObjectAt(iTab); fMainFrame->HideFrame(tab); } // show all the tabs one by one to get the maximum window size size = GetDefaultSize(); for (iTab = nTabs-1; iTab >=0; iTab--) { tab = GetTabObjectAt(iTab); if (tab->IsSwitch() && fNumberOfChildren[iTab]<=0) { fMainFrame->HideFrame(lastTab); fMainFrame->ShowFrame(tab); framesize = GetDefaultSize(); if (size.fWidth < framesize.fWidth) { size.fWidth = framesize.fWidth; } if (size.fHeight < framesize.fHeight) { size.fHeight = framesize.fHeight; } if (fTabWindow) { // we don't have listtrees for sub-windows fListTree->HighlightItem(fListTreeItem[iTab]); } lastTab = tab; lastTabIndex = iTab; } } } else { for (iTab = nTabs-1; iTab >=0; iTab--) { tab = GetTabObjectAt(iTab); if (tab->IsSwitch() && fNumberOfChildren[iTab]<=0) { fCurrentTabID = tab->GetID(); lastTabIndex = iTab; } } } Resize(size); fInitialWidth = size.fWidth; fInitialHeight = size.fHeight; // Adjust size of the sub window so that the main frame has the // same size as the parent's. This is not done if the parent window // is tab-view, because the size of the main frame is not trivial. if (!fTabWindow) { if (gROME->GetWindow()->IsListTreeView()) { TGDimension size1 = gROME->GetWindow()->GetInitialSize(); TGDimension size3 = gROME->GetWindow()->GetUserInfoFrame()->GetSize(); TGDimension size4 = GetUserInfoFrame()->GetSize(); // Height shall be the same as the parent, but width might be // different because of different width of info frame. Resize(size1.fWidth - size3.fWidth + size4.fWidth, size1.fHeight); } } gSystem->Sleep(500); MapWindow(); while (!IsMapped()) { gSystem->Sleep(20); } if (!gROME->IsStandAloneARGUS()) { // hide run# and event# if argus controller is shown/docked if (fController && (!fController->IsHidden() || !fController->IsUndocked())) { ((TGCompositeFrame*)(fRunNumber->GetParent()->GetParent()))->HideFrame((TGFrame*)(fRunNumber->GetParent())); ((TGCompositeFrame*)(fEventNumber->GetParent()->GetParent()))->HideFrame((TGFrame*)(fEventNumber->GetParent())); } } TriggerTabSelected(lastTabIndex); gSystem->Sleep(500); ROMEPrint::Debug("End of ArgusWindow::Start()\n"); fWatchAll.Stop(); return kTRUE; }