ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TSystemFile.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Rene Brun 26/06/96
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, 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_TSystemFile
13 #define ROOT_TSystemFile
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TSystemFile //
19 // //
20 // Describes an Operating System file for the browser. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 
25 #ifndef ROOT_TNamed
26 #include "TNamed.h"
27 #endif
28 
29 class TBrowser;
30 
31 class TSystemFile : public TNamed {
32 private:
33  TString fIconName; // icon name
34 
35 public:
36  TSystemFile();
37  TSystemFile(const char *filename, const char *dirname);
38  virtual ~TSystemFile();
39  virtual void Browse(TBrowser *b);
40  virtual void Rename(const char *name); // *MENU*
41  virtual void Delete(); // *MENU*
42  virtual void Copy(const char *to); // *MENU*
43  virtual void Move(const char *to); // *MENU*
44  virtual void Edit(); // *MENU*
45 
46  virtual Bool_t IsDirectory(const char *dir = 0) const;
47  virtual void SetIconName(const char *name) { fIconName = name; }
48  const char *GetIconName() const { return fIconName.Data(); }
49 
50  // dummy methods from TObject
51  virtual void Inspect() const;
52  virtual void Dump() const;
53 
54  void DrawClass() const { }
55  TObject *DrawClone(Option_t *) const { return 0; }
56  void SetDrawOption(Option_t *) { }
57  void SetName(const char *name) { TNamed::SetName(name); }
58  void SetTitle(const char *title) { TNamed::SetTitle(title); }
59  void Delete(Option_t *) { }
60  void Copy(TObject & ) const { }
61 
62  ClassDef(TSystemFile,0) //A system file
63 };
64 
65 #endif
66 
virtual void Inspect() const
inspect this file
void Copy(TObject &) const
Copy this to obj.
Definition: TSystemFile.h:60
TObject * DrawClone(Option_t *) const
Draw a clone of this object in the current pad.
Definition: TSystemFile.h:55
virtual ~TSystemFile()
Delete TSystemFile object.
Definition: TSystemFile.cxx:44
virtual void Move(const char *to)
move this file
const char Option_t
Definition: RtypesCore.h:62
void Delete(Option_t *)
Delete this object.
Definition: TSystemFile.h:59
virtual void SetName(const char *name)
Change (i.e.
Definition: TNamed.cxx:128
virtual void SetIconName(const char *name)
Definition: TSystemFile.h:47
static const char * filename()
Basic string class.
Definition: TString.h:137
bool Bool_t
Definition: RtypesCore.h:59
const char * GetIconName() const
Returns mime type name of object.
Definition: TSystemFile.h:48
void DrawClass() const
Draw class inheritance tree of the class to which this object belongs.
Definition: TSystemFile.h:54
virtual void Copy(const char *to)
copy this file
const char * Data() const
Definition: TString.h:349
TString fIconName
Definition: TSystemFile.h:33
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void Rename(const char *name)
rename this file
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
void SetName(const char *name)
Change (i.e.
Definition: TSystemFile.h:57
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
virtual void Delete()
delete this file
virtual void Dump() const
dump this file
void SetDrawOption(Option_t *)
Set drawing option for object.
Definition: TSystemFile.h:56
virtual Bool_t IsDirectory(const char *dir=0) const
Check if object is a directory.
Definition: TSystemFile.cxx:51
void dir(char *path=0)
Definition: rootalias.C:30
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
void SetTitle(const char *title)
Change (i.e. set) the title of the TNamed.
Definition: TSystemFile.h:58
virtual void Browse(TBrowser *b)
Execute default action for this system file (action is specified in the $HOME/.root.mimes or $ROOTSYS/etc/root.mimes file.
Definition: TSystemFile.cxx:67
A TSystemFile describes an operating system file.
Definition: TSystemFile.h:31
virtual void Edit()
Invoke text editor on this file.
Definition: TSystemFile.cxx:76
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
Definition: TNamed.cxx:152