// Mainframe macro generated from application: /usr/local//bin/root.exe // By ROOT version 5.26/00 on 2010-03-08 11:57:05 #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_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_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_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_TGuiBldDragManager #include "TGuiBldDragManager.h" #endif #include "Riostream.h" class testBox{ public: testBox(); TGListBox *fListBox560; void KeyPressed(TGFrame*,UInt_t,UInt_t); ClassDef(testBox,0); }; ClassImp(testBox); void testBox::KeyPressed(TGFrame* f,UInt_t,UInt_t){ TGTextLBEntry *lbe = (TGTextLBEntry*)f; cout<GetTitle()<GetRoot(),10,10,kMainFrame | kVerticalFrame); fMainFrame915->SetLayoutBroken(kTRUE); // list box TGListBox *fListBox560 = new TGListBox(fMainFrame915); fListBox560->AddEntry("Entry 1",0); fListBox560->AddEntry("Entry 2",1); fListBox560->AddEntry("Entry 3",2); fListBox560->AddEntry("Entry 4",3); fListBox560->AddEntry("Entry 5",4); fListBox560->AddEntry("Entry 6",5); fListBox560->AddEntry("Entry 7",6); fListBox560->Resize(128,244); TGLBContainer *lbc = (TGLBContainer*)fListBox560->GetContainer(); lbc->Connect("KeyPressed(TGFrame*,UInt_t,UInt_t)","testBox", this,"KeyPressed(TGFrame*,UInt_t,UInt_t)"); fMainFrame915->AddFrame(fListBox560, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2)); fListBox560->MoveResize(88,40,128,244); fMainFrame915->SetMWMHints(kMWMDecorAll, kMWMFuncAll, kMWMInputModeless); fMainFrame915->MapSubwindows(); fMainFrame915->Resize(fMainFrame915->GetDefaultSize()); fMainFrame915->MapWindow(); fMainFrame915->Resize(490,372); }