Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGCommandPlugin.h
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Bertrand Bellenot 26/09/2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGCommandPlugin
13#define ROOT_TGCommandPlugin
14
15
16#include "TGFrame.h"
17
18class TGLabel;
19class TGComboBox;
20class TGTextEntry;
21class TGTextBuffer;
22class TGTextView;
23class TTimer;
24
26
27protected:
28 Bool_t fHistAdd; ///< flag to add commands to history
29 Int_t fPid; ///< current process id
30 Int_t fPos; ///< current history position
31 TGHorizontalFrame *fHf; ///< horizontal frame
32 TGLabel *fLabel; ///< "command :" label
33 TGComboBox *fComboCmd; ///< commands combobox
34 TGTextEntry *fCommand; ///< command text entry widget
35 TGTextBuffer *fCommandBuf; ///< command text buffer
36 TGTextView *fStatus; ///< output capture view
37 TTimer *fTimer; ///< for local/remote update
38 TString fTempString; ///< temporary command string
39
40public:
41
43 virtual ~TGCommandPlugin();
44
45 void CheckRemote(const char * /*str*/);
46 void HandleArrows(Int_t keysym);
47 void HandleCommand();
48 void HandleTab();
49 void HandleTextChanged(const char *);
51 void SetHistAdd(Bool_t add = kTRUE);
52
53 Bool_t HandleTimer(TTimer *t) override;
54 void ToggleTimer(Bool_t on);
55
56 ClassDefOverride(TGCommandPlugin, 0) // Command (I/O redirection) plugin for the new ROOT Browser
57};
58
59#endif
#define h(i)
Definition RSha256.hxx:106
bool Bool_t
Definition RtypesCore.h:63
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition TGComboBox.h:47
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.
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.
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:385
This class handles GUI labels.
Definition TGLabel.h:24
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:397
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
A TGTextView is a text viewer widget.
Definition TGTextView.h:22
ROOT GUI Window base class.
Definition TGWindow.h:23
Basic string class.
Definition TString.h:139
Handles synchronous and a-synchronous timer events.
Definition TTimer.h:51