12#ifndef ROOT_TGTextEditor
13#define ROOT_TGTextEditor
68 void LoadFile(
const char *fname =
nullptr);
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
#define ClassDefOverride(name, id)
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
This class handles GUI labels.
This class describes layout hints used by the layout classes.
TGMainFrame(const TGMainFrame &)=delete
Provides a StatusBar widget.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
A TGTextEdit is a specialization of TGTextView.
Bool_t LoadBuffer(const char *buf)
TGStatusBar * fStatusBar
for file name, line and col number
Bool_t fTextChanged
true if text has changed
TGPopupMenu * fMenuTools
"Tools" menu entry
void DataChanged()
Slot setting the fTextChanged flag to true when the text has been modified in fTextEdit.
TString fFilename
name of the opened file
void InterruptMacro()
Interrupt execution of a macro.
void CloseWindow() override
Close TGTextEditor window.
Int_t IsSaved()
Check if file has to be saved in case of modifications.
void Search(Bool_t ret)
Invokes search dialog, or just search previous string if again is true.
TTimer * fTimer
for statusbar and toolbar update
void SetText(TGText *text)
TGPopupMenu * fMenuFile
"File" menu entry
TGLayoutHints * fMenuBarLayout
used for the menubar
TGTextEntry * fCommand
command text entry widget
TGLabel * fLabel
"command" label
void DataDropped(char *fname)
Update file information when receiving the signal DataDropped from TGTextEdit widget.
void CompileMacro()
Save the edited text in a temporary macro, then compile it.
Bool_t HandleKey(Event_t *event) override
Keyboard event handler.
~TGTextEditor() override
TGTextEditor destructor.
void ClearText()
Clear text edit widget.
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Handle menu and other command generated by the user.
virtual void Build()
Build TGTextEditor widget.
void AddLineFast(const char *string)
void Goto()
Invokes goto dialog, and go to the specified line.
void About()
Display ROOT splash screen.
void ExecuteMacro()
Save the edited text in a temporary macro, execute it, and then delete the temporary file.
Bool_t SaveFileAs()
Save the edited text in a file selected with TGFileDialog.
TMacro * fMacro
pointer on the opened macro
TGMenuBar * fMenuBar
editor's menu bar
TGTextEditor(const char *filename=nullptr, const TGWindow *p=nullptr, UInt_t w=900, UInt_t h=600)
TGTextEditor constructor with file name as first argument.
TGTextEdit * fTextEdit
text edit widget
void PrintText()
Open the print dialog and send current buffer to printer.
void AddLine(const char *string)
TGLayoutHints * fMenuBarItemLayout
used for for menubar items
void SaveFile(const char *fname)
Save the edited text in the file "fname".
TGComboBox * fComboCmd
commands combobox
TGPopupMenu * fMenuEdit
"Edit" menu entry
TGPopupMenu * fMenuSearch
"Search" menu entry
TGTextBuffer * fCommandBuf
command text buffer
TGPopupMenu * fMenuHelp
"Help" menu entry
void DeleteWindow() override
Delete TGTextEditor Window.
void AddText(TGText *text)
Bool_t HandleTimer(TTimer *t) override
Handle timer event.
void LoadFile(const char *fname=nullptr)
Load a file into the editor. If fname is 0, a TGFileDialog will popup.
TGToolBar * fToolBar
toolbar with common tool buttons
Bool_t fExiting
true if editor is closing
A TGTextEntry is a one line text input widget.
A TGText is a multi line text buffer.
ROOT GUI Window base class.
Class supporting a collection of lines with C++ code.
Handles synchronous and a-synchronous timer events.