39 fCommand = fComboCmd->GetTextEntry();
40 fCommandBuf = fCommand->GetBuffer();
41 fComboCmd->Resize(200, fCommand->GetDefaultHeight());
44 fHf->AddFrame(fLabel =
new TGLabel(fHf,
"Command (local):"),
49 fCommand->Connect(
"ReturnPressed()",
"TGCommandPlugin",
this,
54 gClient->GetColorByName(
"#a0a0a0", pxl);
55 fStatus->SetSelectBack(pxl);
63 FILE *lunin = fopen(defhist.Data(),
"rt");
66 while (fgets(histline, 256, lunin)) {
67 histline[strlen(histline)-1] = 0;
68 fComboCmd->InsertEntry(histline, 0, -1);
72 fTimer =
new TTimer(
this, 1000);
76 Resize(GetDefaultSize());
103 if (end > 0 && end !=
kNPOS) {
106 gClient->GetColorByName(
"#ff0000", pxl);
112 gClient->GetColorByName(
"#000000", pxl);
125 if (strlen(
string) > 1) {
131 if (app->InheritsFrom(
"TRint"))
132 sPrompt = ((
TRint*)
gROOT->GetApplication())->GetPrompt();
133 FILE *lunout = fopen(pathtmp.
Data(),
"a+t");
135 fputs(
Form(
"%s%s\n",sPrompt.
Data(), string), lunout);
140 gROOT->ProcessLine(
string);
142 if (app->InheritsFrom(
"TRint"))
143 Gl_histadd((
char *)string);
virtual int GetPid()
Get process id.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
TGTextBuffer * fCommandBuf
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
virtual void InsertEntry(TGString *s, Int_t id, Int_t afterID)
virtual ~TGCommandPlugin()
Destructor.
R__EXTERN TApplication * gApplication
virtual void Layout()
Layout the elements of the composite frame.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
ClassImp(TGCommandPlugin) TGCommandPlugin
TGCommandPlugin Constructor.
const char * Data() const
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual void SetText(TGString *newText)
Set new text in label.
const char * GetString() const
virtual void ShowBottom()
Show bottom of the page.
virtual Bool_t LoadFile(const char *fname, long startpos=0, long length=-1)
Load a file in the text view widget.
void HandleCommand()
Handle command line from the "command" combo box.
R__EXTERN TSystem * gSystem
virtual Bool_t HandleTimer(TTimer *t)
Handle timer event.
char * Form(const char *fmt,...)
Handles synchronous and a-synchronous timer events.
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=0)
Redirect standard output (stdout, stderr) to the specified file.
TString & Remove(Ssiz_t pos)
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
void Clear(Option_t *option="")
Clears up the text entry.
void CheckRemote(const char *)
Check if actual ROOT session is a remote one or a local one.