65 "HandleArrows(=kKey_Up)");
67 "HandleArrows(=kKey_Down)");
71 "HandleTextChanged(const char *)");
75 gClient->GetColorByName(
"#a0a0a0", pxl);
84 FILE *lunin = fopen(defhist.
Data(),
"rt");
89 while (fgets(histline, 256, lunin))
92 if (linecount > 500) {
94 while(--linecount > 0)
95 if (!fgets(histline, 256, lunin))
99 while (fgets(histline, 256, lunin)) {
100 histline[strlen(histline)-1] = 0;
103 if (++linecount > 500)
145 if (end > 0 && end !=
kNPOS) {
148 gClient->GetColorByName(
"#ff0000", pxl);
154 gClient->GetColorByName(
"#000000", pxl);
196 if (strlen(
string) > 0) {
203 sPrompt = ((
TRint*)
gROOT->GetApplication())->GetPrompt();
204 FILE *lunout = fopen(pathtmp.
Data(),
"a+t");
206 fputs(
Form(
"%s%s\n",sPrompt.
Data(),
string), lunout);
211 gROOT->ProcessLine(
string);
216 Gl_histadd((
char *)
string);
232 std::vector<std::string>
result;
233 size_t cur =
line.length();
237 std::string found =
result[0];
239 size_t colon =
line.find_last_of(
"::");
240 if (colon != std::string::npos)
242 size_t pos = found.find(
what) +
what.length();
243 std::string suffix = found.substr(pos);
248 if (prompt.find(
"root") == std::string::npos)
254 for (
auto& res :
result) {
ULong_t Pixel_t
Pixel value.
R__EXTERN TApplication * gApplication
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char text
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TSystem * gSystem
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual TGTextEntry * GetTextEntry() const
virtual TGListBox * GetListBox() const
virtual void InsertEntry(TGString *s, Int_t id, Int_t afterID)
virtual Int_t GetNumberOfEntries() const
Class used to redirect the command line input/output.
TGHorizontalFrame * fHf
horizontal frame
void SetHistAdd(Bool_t add=kTRUE)
The function SetHistAdd() is needed for a standalone TApplication to log the TGCommandPlugin commands...
Bool_t fHistAdd
flag to add commands to history
TGTextBuffer * fCommandBuf
command text buffer
Int_t fPid
current process id
TTimer * fTimer
for local/remote update
void HandleCommand()
Handle command line from the "command" combo box.
TGTextEntry * fCommand
command text entry widget
void HandleTextChanged(const char *)
Handle the text changed events.
TGCommandPlugin(const TGWindow *p, UInt_t w, UInt_t h)
TGCommandPlugin Constructor.
TString fTempString
temporary command string
void ToggleTimer(Bool_t on)
Let user stop the internal timer when there is no need to check for remote.
void HandleTab()
Handle the 'TAB' key events.
Bool_t HandleTimer(TTimer *t) override
Handle timer event.
TGComboBox * fComboCmd
commands combobox
virtual ~TGCommandPlugin()
Destructor.
void CheckRemote(const char *)
Check if actual ROOT session is a remote one or a local one.
TGTextView * fStatus
output capture view
TGLabel * fLabel
"command :" label
Int_t fPos
current history position
void HandleArrows(Int_t keysym)
Handle the 'up' and 'down' arrow key events.
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
void Layout() override
Layout the elements of the composite frame.
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual UInt_t GetDefaultHeight() const
void MapWindow() override
map window
A composite frame that layout their children in horizontal way.
This class handles GUI labels.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
virtual void SetText(TGString *newText)
Set new text in label.
This class describes layout hints used by the layout classes.
virtual TGLBEntry * GetEntry(Int_t id) const
Returns list box entry with specified id.
Defines top level windows that interact with the system Window Manager.
const char * GetString() const
const char * GetString() const
void Clear(Option_t *option="") override
Clears up the text entry.
TGTextBuffer * GetBuffer() const
virtual void AppendText(const char *text)
Appends text to the end of text entry, clears the selection and moves the cursor to the end of the li...
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
Text string listbox entries.
const TGString * GetText() const
A TGTextView is a text viewer widget.
virtual Bool_t LoadFile(const char *fname, long startpos=0, long length=-1)
Load a file in the text view widget.
virtual void AddLine(const char *string)
Add a line of text to the view widget.
virtual void SetSelectBack(Pixel_t p)
set selected text background color
virtual void ShowBottom()
Show bottom of the page.
virtual void SetSelectFore(Pixel_t p)
set selected text color
ROOT GUI Window base class.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
void Clear()
Clear string without changing its capacity.
const char * Data() const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=nullptr)
Redirect standard output (stdout, stderr) to the specified file.
virtual int GetPid()
Get process id.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual const char * HomeDirectory(const char *userName=nullptr)
Return the user's home directory.
virtual int Unlink(const char *name)
Unlink, i.e.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
Handles synchronous and a-synchronous timer events.
virtual void TurnOff()
Remove timer from system timer list.
virtual void TurnOn()
Add the timer to the system timer list.
void Reset()
Reset the timer.