190 "ROOT Macros",
"*.C",
191 "Source files",
"*.cxx",
192 "Text files",
"*.txt",
244 if (p && p !=
gClient->GetDefaultRoot()) {
247 fComboCmd->UnmapWindow();
248 fToolBar->RemoveFrame(fComboCmd);
249 fLabel->UnmapWindow();
250 fToolBar->RemoveFrame(fLabel);
268 if (p && p !=
gClient->GetDefaultRoot()) {
284 tmp.
Form(
"TMacro : %s: %ld lines read.",
289 tmp.
Form(
"TMacro : %s - TGTextEditor", macro->
GetName());
400 for (i = 0; fTbData[i].
fPixmap; i++) {
401 if (strlen(fTbData[i].fPixmap) == 0) {
431 gClient->GetColorByName(
"#3399ff", pxl);
438 Int_t parts[] = { 75, 25 };
457 fTextEdit->
Connect(
"DataDropped(char *)",
"TGTextEditor",
this,
"DataDropped(char *)");
488 tmp.
Form(
"%s - TGTextEditor", fname);
534 tmp.
Form(
"Error opening file \"%s\"", fname);
541 tmp.
Form(
"%s - TGTextEditor", fname);
558 tmp.
Form(
"Error saving file \"%s\"", fname);
563 if ((p = (
char *)strrchr(fname,
'/')) == 0) {
571 tmp.
Form(
"%s - TGTextEditor", p);
609 tmp.
Form(
"The text has been modified. Do you want to save the changes?");
678 gVirtualX->LookupString(event, input,
sizeof(input), keysym);
798 "The text has been modified. Do you want to save the changes?",
850 if (!rootx.
IsNull()) rootx +=
"/bin";
852 rootx +=
"/root -a &";
859 sprintf(str,
"About ROOT %s...",
gROOT->GetVersion());
875 if ((
gVirtualX->InheritsFrom(
"TGX11")) &&
908 tmp.
Form(
"Ln %ld, Ch %ld", pos.
fY, pos.
fX);
985 if (prop.
fName !=
"") {
986 fontname.
Form(
"-*-%s-%s-%c-*-*-%d-*-*-*-*-*-*-*",
988 prop.
fBold ?
"bold" :
"medium",
991 if (!
gVirtualX->ListFonts(fontname, 10, count)) {
992 fontname.
Form(
"-*-%s-%s-%c-*-*-%d-*-*-*-*-*-*-*",
994 prop.
fBold ?
"bold" :
"medium",
1049 if(strlen(
string) > 1) {
1050 gROOT->ProcessLine(
string);
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
R__EXTERN const char gHelpTextEditor[]
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
void Search(Bool_t ret)
Invokes search dialog, or just search previous string if again is true.
void Goto()
Invokes goto dialog, and go to the specified line.
virtual const char * WorkingDirectory()
Return working directory.
void Reset()
Reset the timer.
void CompileMacro()
Save the edited text in a temporary macro, then compile it.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Collectable string class.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
void ClearText()
Clear text edit widget.
const Mask_t kKeyShiftMask
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual void CloseWindow()
Close TGTextEditor window.
virtual Bool_t HandleTimer(TTimer *t)
Handle timer event.
ClassImp(TGTextEditor) TGTextEditor
TGTextEditor constructor with file name as first argument.
virtual void SetSelectBack(Pixel_t p)
set selected text background color
const TGWindow * GetRoot() const
Returns current root (i.e.
static Pixel_t GetWhitePixel()
Get white pixel value.
const Mask_t kLeaveWindowMask
virtual Bool_t HandleKey(Event_t *event)
Keyboard event handler.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
static const char * filename()
virtual Long_t Exec(const char *params=0, Int_t *error=0)
Execute this macro with params, if params is 0, default parameters (set via SetParams) are used...
TGTextBuffer * fCommandBuf
Class supporting a collection of lines with C++ code.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
virtual void Print(Option_t *="") const
Send current buffer to printer.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual void Delete(Option_t *="")
Delete selection.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle menu and other command generated by the user.
R__EXTERN TApplication * gApplication
virtual void Layout()
Layout the elements of the composite frame.
R__EXTERN const char gHelpAbout[]
void DataChanged()
Slot setting the fTextChanged flag to true when the text has been modified in fTextEdit.
TGLayoutHints * fMenuBarLayout
const char * Data() const
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
TGPopupMenu * fMenuSearch
virtual int CompileMacro(const char *filename, Option_t *opt="", const char *library_name="", const char *build_dir="", UInt_t dirmode=0)
This method compiles and loads a shared library containing the code from the file "filename"...
virtual void AddLine(const char *string)
Add a line of text to the view widget.
const char * GetString() const
virtual const char * Getenv(const char *env)
Get environment variable.
static char * gEPrintCommand
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
virtual void Update()
update the whole window of text view
virtual Bool_t LoadFile(const char *fname, long startpos=0, long length=-1)
Load a file in the text view widget.
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
void ExecuteMacro()
Save the edited text in a temporary macro, execute it, and then delete the temporary file...
const char Int_t const char TProof Int_t const char * workdir
const Mask_t kKeyPressMask
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...
TGPopupMenu * GetMenu() const
void About()
Display ROOT splash screen.
virtual void Layout()
Layout the components of view.
R__EXTERN TSystem * gSystem
virtual UInt_t GetDefaultWidth() const
void Popup()
Show help dialog.
virtual void Build()
Build TGTextEditor widget.
virtual void SetFont(FontStruct_t font)
Changes text entry font.
virtual Bool_t SelectAll()
Select all text in the viewer.
TList * GetListOfLines() const
virtual UInt_t GetDefaultHeight() const
virtual void CloseWindow()
Close and delete main frame.
void LoadFile(const char *fname=0)
Load a file into the editor. If fname is 0, a TGFileDialog will popup.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Handles synchronous and a-synchronous timer events.
virtual const char * GetName() const
Returns name of object.
void SaveFile(const char *fname)
Save the edited text in the file "fname".
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Bool_t SaveFileAs()
Save the edited text in a file selected with TGFileDialog.
virtual void Clear(Option_t *="")
Clear text edit widget.
virtual void SetSelectFore(Pixel_t p)
set selected text color
char * StrDup(const char *str)
Duplicate the string str.
virtual Long_t ReturnLineCount()
const Mask_t kEnterWindowMask
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
virtual Bool_t Search(const char *string, Bool_t direction=kTRUE, Bool_t caseSensitive=kFALSE)
Search for string in the specified direction.
TGLayoutHints * fMenuBarItemLayout
const Mask_t kStructureNotifyMask
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
void PrintText()
Open the print dialog and send current buffer to printer.
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
TGLongPosition GetCurrentPos() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void Copy(TObject &) const
Copy this to obj.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
const char * ed_filetypes[]
virtual Bool_t Cut()
Cut text.
virtual void UnmapWindow()
virtual UInt_t GetDefaultHeight() const
virtual void ReturnPressed()
Add new entry to combo box when return key pressed inside text entry ReturnPressed signal is emitted...
FontStruct_t GetFontStruct() const
TGTextEditor(const char *filename=0, const TGWindow *p=0, UInt_t w=900, UInt_t h=600)
Int_t IsSaved()
Check if file has to be saved in case of modifications.
const Mask_t kFocusChangeMask
void InterruptMacro()
Interrupt execution of a macro.
TGTextBuffer * GetBuffer() const
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
virtual void DeleteWindow()
Delete TGTextEditor Window.
virtual Bool_t Paste()
Paste text into widget.
virtual Bool_t Goto(Long_t line, Long_t column=0)
Goto the specified line.
const Mask_t kKeyControlMask
virtual ~TGTextEditor()
TGTextEditor destructor.
virtual Bool_t SaveFile(const char *fname, Bool_t saveas=kFALSE)
Save file.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void DeleteWindow()
Delete window.
virtual void TurnOn()
Add the timer to the system timer list.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
void DataDropped(char *fname)
Update file information when receiving the signal DataDropped from TGTextEdit widget.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
virtual TGTextEntry * GetTextEntry() const