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());
105 if (end > 0 && end !=
kNPOS) {
108 gClient->GetColorByName(
"#ff0000", pxl);
114 gClient->GetColorByName(
"#000000", pxl);
127 if (strlen(
string) > 1) {
133 if (app->InheritsFrom(
"TRint"))
134 sPrompt = ((
TRint*)
gROOT->GetApplication())->GetPrompt();
135 FILE *lunout = fopen(pathtmp.
Data(),
"a+t");
137 fputs(
Form(
"%s%s\n",sPrompt.
Data(), string), lunout);
142 gROOT->ProcessLine(
string);
144 if (app->InheritsFrom(
"TRint"))
145 Gl_histadd((
char *)string);
virtual int GetPid()
Get process id.
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.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
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.
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.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
void HandleCommand()
Handle command line from the "command" combo box.
R__EXTERN TSystem * gSystem
virtual Bool_t HandleTimer(TTimer *t)
Handle timer event.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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)
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
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.
const char * Data() const