64PMsgBox::PMsgBox(
const std::string errMsg,
const TGWindow *p, UInt_t w, UInt_t h) : TGMainFrame(p, w, h)
70 size_t end = errMsg.find(
"\n");
73 fListBox->AddEntry(tok.c_str(), i++);
74 while (end != std::string::npos) {
75 tok = errMsg.substr(start, end - start);
77 end = errMsg.find(
"\n", start);
78 fListBox->AddEntry(tok.c_str(), i++);
82 AddFrame(
fListBox,
new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5));
85 TGHorizontalFrame *hframe =
new TGHorizontalFrame(
this, 150, 20, kFixedWidth);
86 TGTextButton *exit =
new TGTextButton(hframe,
"&Exit ");
87 exit->Connect(
"Pressed()",
"PMsgBox",
this,
"DoExit()");
88 hframe->AddFrame(exit,
new TGLayoutHints(kLHintsExpandX, 5, 5, 3, 4));
89 AddFrame(hframe,
new TGLayoutHints(kLHintsExpandX, 2, 2, 5, 1));
92 SetWindowName(
"Error Message");
96 Resize(GetDefaultSize());
PMsgBox(const std::string errMsg, const TGWindow *p, UInt_t w, UInt_t h)
Constructor that creates and displays the message box window.