36 virtual ~TextViewMainFrame() {}
60 fCommand =
new TGTextEntry(fCommandFrame, (
const char *)
"", 20);
61 fCommand->Connect(
"ReturnPressed()",
"TextViewMainFrame",
this,
"HandleReturn()");
62 fCommandFrame->AddFrame(
new TGLabel(fCommandFrame,
"Command: "),
69 fReset->SetToolTipText(
"Press to clear the command entry\nand the TGTextView", 200);
70 fReset->Connect(
"Clicked()",
"TextViewMainFrame",
this,
"Reset()");
74 fExit->SetToolTipText(
"Terminate the application", 200);
76 fExit->Connect(
"Pressed()",
"TApplication",
gApplication,
"Terminate()");
79 Connect(
"CloseWindow()",
"TApplication",
gApplication,
"Terminate()");
84 Resize(GetDefaultSize());
86 SetWindowName(
"TGTextView Demo");
91void TextViewMainFrame::Reset()
98void TextViewMainFrame::HandleReturn()
101 std::string command = fCommand->GetText();
103 fTextView->ShowBottom();
108void textviewostream()
112 new TextViewMainFrame();
#define ClassDef(name, id)
R__EXTERN TApplication * gApplication
R__EXTERN TSystem * gSystem
const char * Data() const
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.