58 "ROOT files",
"*.root",
132 fTypes(0), fTreeLB(0), fCdup(0), fNewf(0), fList(0), fDetails(0), fCheckB(0),
133 fPcdup(0), fPnewf(0), fPlist(0), fPdetails(0), fOk(0), fCancel(0), fFv(0),
134 fFc(0), fFileInfo(0), fDlgType(dlg_type)
137 Connect(
"CloseWindow()",
"TGFileDialog",
this,
"CloseWindow()");
147 Error(
"TGFileDialog",
"file_info argument not set");
165 ?
"S&ave in:" :
"&Look in:"));
175 Error(
"TGFileDialog",
"missing toolbar pixmap(s).\n");
212 }
else if (dlg_type ==
kFDOpen) {
238 buttons[0]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByName)");
239 buttons[1]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByType)");
240 buttons[2]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortBySize)");
241 buttons[3]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByOwner)");
242 buttons[4]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByGroup)");
243 buttons[5]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByDate)");
257 fCheckB->
Connect(
"Toggled(Bool_t)",
"TGFileContainer",
fFc,
"SetMultipleSelection(Bool_t)");
270 (dlg_type ==
kDOpen || dlg_type ==
kDSave ) ?
"Folder &name:" :
"File &name:"));
333 ?
"&Save" :
"&Open"),
kIDF_OK);
365 const char *wname = (dlg_type ==
kFDSave || dlg_type ==
kDSave) ?
"Save As..." :
"Open";
414 static inline void pExpandUnixPathName(
TGFileInfo &file_info) {
443 txt =
"Please provide file name or use \"Cancel\"";
452 txt =
TString::Format(
"File name %s already exists, OK to overwrite it?",
499 strlcpy(answer,
"(empty)",
sizeof(answer));
501 "Enter directory name:",
504 while ( strcmp(answer,
"(empty)") == 0 ) {
506 "Please enter a valid directory name.",
509 "Enter directory name:",
512 if ( strcmp(answer,
"") == 0 )
613 tmpString +=
"\"" + el->
GetString() +
"\" ";
649 txt =
TString::Format(
"File name %s already exists, OK to overwrite it?",
692 const char *txt2 =
"Please provide file name or use \"Cancel\"";
712 txt =
TString::Format(
"File name %s already exists, OK to overwrite it?",
include TDocParser_001 C image html pict1_TDocParser_001 png width
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
static const char * gDefTypes[]
char * StrDup(const char *str)
Duplicate the string str.
Bool_t R_ISDIR(Int_t mode)
R__EXTERN TSystem * gSystem
TGViewPort * GetViewPort() const
const TGWindow * GetRoot() const
Returns current root (i.e.
void WaitFor(TGWindow *w)
Wait for window to be destroyed.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
void FreePicture(const TGPicture *pic)
Free picture resource.
virtual TGLBEntry * GetSelectedEntry() const
virtual void AddEntry(TGString *s, Int_t id)
virtual TGListBox * GetListBox() const
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
virtual void SetEnabled(Bool_t on=kTRUE)
Set state of combo box. If kTRUE=enabled, kFALSE=disabled.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual UInt_t GetDefaultHeight() const
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
virtual void Associate(const TGWindow *w)
virtual const TGFrame * GetNextSelected(void **current)
Return the next selected item.
virtual Int_t NumSelected() const
virtual void Update(const char *path)
Update file system combo box.
virtual void SetDisplayStat(Bool_t stat=kTRUE)
virtual void Sort(EFSSortMode sortType)
Sort file system list view container according to sortType.
virtual void ChangeDirectory(const char *path)
Change current directory.
virtual void DisplayDirectory()
Display the contents of the current directory in the container.
virtual void SetFilter(const char *filter)
Set file selection filter.
const char * GetDirectory() const
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages generated by the user input in the file dialog.
const TGPicture * fPdetails
TGPictureButton * fDetails
virtual void CloseWindow()
Close file dialog.
virtual ~TGFileDialog()
Delete file dialog.
TGFileDialog(const TGFileDialog &)=delete
void SetMultipleSelection(Bool_t option)
Turn on/off multiple selection.
~TGFileInfo()
TGFileInfo Destructor.
void DeleteFileNamesList()
Delete file names list.
void SetFilename(const char *fname)
Set file name.
Bool_t fMultipleSelection
void SetIniDir(const char *inidir)
Set directory name.
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual void DeleteWindow()
Delete window.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void MapWindow()
map window
static Pixel_t fgWhitePixel
TList * GetSelectedItems()
Get list of selected items in container.
void SetMultipleSelection(Bool_t multi=kTRUE)
TGString * GetItemName() const
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual void SetIncrements(Int_t hInc, Int_t vInc)
Set horizontal and vertical scrollbar increments.
TGTextButton ** GetHeaderButtons()
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode.
virtual void SetContainer(TGFrame *f)
Set list view container.
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
const char * GetString() const
void AddText(Int_t pos, const char *text)
const char * GetString() const
UInt_t GetTextLength() const
virtual const char * GetTitle() const
Returns title of object.
TString GetString() const
virtual void SetFocus()
Set focus to this text entry.
virtual void SelectAll()
Selects all text (i.e.
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.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void Add(TObject *obj)
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Collectable string class.
const TString & GetString() const
R__ALWAYS_INLINE Bool_t IsZombie() const
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=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Bool_t cd(const char *path)
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
virtual int MakeDirectory(const char *name)
Make a directory.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
virtual const char * WorkingDirectory()
Return working directory.
Short_t Max(Short_t a, Short_t b)