58 "ROOT files",
"*.root",
108 fTypes(0), fTreeLB(0), fCdup(0), fNewf(0), fList(0), fDetails(0), fCheckB(0),
109 fPcdup(0), fPnewf(0), fPlist(0), fPdetails(0), fOk(0), fCancel(0), fFv(0),
113 Connect(
"CloseWindow()",
"TGFileDialog",
this,
"CloseWindow()");
123 Error(
"TGFileDialog",
"file_info argument not set");
147 ?
"S&ave in:" :
"&Look in:"));
157 Error(
"TGFileDialog",
"missing toolbar pixmap(s).\n");
218 buttons[0]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByName)");
219 buttons[1]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByType)");
220 buttons[2]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortBySize)");
221 buttons[3]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByOwner)");
222 buttons[4]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByGroup)");
223 buttons[5]->
Connect(
"Clicked()",
"TGFileContainer",
fFc,
"Sort(=kSortByDate)");
237 fCheckB->
Connect(
"Toggled(Bool_t)",
"TGFileContainer",
fFc,
"SetMultipleSelection(Bool_t)");
308 ?
"&Save" :
"&Open"),
kIDF_OK);
340 const char *wname = (dlg_type ==
kFDSave) ?
"Save As..." :
"Open";
394 static inline void pExpandUnixPathName(
TGFileInfo &file_info) {
424 txt =
"Please provide file name or use \"Cancel\"";
433 txt =
TString::Format(
"File name %s already exists, OK to overwrite it?",
489 strlcpy(answer,
"(empty)",
sizeof(answer));
491 "Enter directory name:",
494 while ( strcmp(answer,
"(empty)") == 0 ) {
496 "Please enter a valid directory name.",
499 "Enter directory name:",
502 if ( strcmp(answer,
"") == 0 )
593 tmpString +=
"\"" + el->
GetString() +
"\" ";
623 txt =
TString::Format(
"File name %s already exists, OK to overwrite it?",
662 const char *txt2 =
"Please provide file name or use \"Cancel\"";
682 txt =
TString::Format(
"File name %s already exists, OK to overwrite it?",
include TDocParser_001 C image html pict1_TDocParser_001 png width
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 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.
TGFileDialog(const TGFileDialog &)
virtual ~TGFileDialog()
Delete file dialog.
void SetMultipleSelection(Bool_t option)
Turn on/off multiple selection.
~TGFileInfo()
TGFileInfo Destructor.
Bool_t fMultipleSelection
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.
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
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
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 Unix pathname to a local pathname.
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
virtual const char * WorkingDirectory()
Return working directory.
int main(int argc, char **argv)
Type GetType(const std::string &Name)
static constexpr double s
Short_t Max(Short_t a, Short_t b)