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
A composite frame that layout their children in horizontal way.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
A composite frame that layout their children in vertical way.
const char * Data() const
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.