/usr/include/root/TGFileDialog.h is in libroot-gui-dev 5.34.19+dfsg-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | // @(#)root/gui:$Id$
// Author: Fons Rademakers 20/01/98
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TGFileDialog
#define ROOT_TGFileDialog
//////////////////////////////////////////////////////////////////////////
// //
// TGFileDialog //
// //
// This class creates a file selection dialog. It contains a combo box //
// to select the desired directory. A listview with the different //
// files in the current directory and a combo box with which you can //
// select a filter (on file extensions). //
// When creating a file dialog one passes a pointer to a TGFileInfo //
// object. In this object you can set the fFileTypes and fIniDir to //
// specify the list of file types for the filter combo box and the //
// initial directory. When the TGFileDialog ctor returns the selected //
// file name can be found in the TGFileInfo::fFilename field and the //
// selected directory in TGFileInfo::fIniDir. The fFilename and //
// fIniDir are deleted by the TGFileInfo dtor. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
enum EFileDialogMode {
kFDOpen,
kFDSave
};
class TGTextBuffer;
class TGTextEntry;
class TGComboBox;
class TGPictureButton;
class TGTextButton;
class TGCheckButton;
class TGListView;
class TGFileContainer;
class TGFSComboBox;
class TGFileInfo {
private:
TGFileInfo(const TGFileInfo&); // not implemented
TGFileInfo& operator=(const TGFileInfo&); // not implemented
public:
char *fFilename; // selected file name
char *fIniDir; // on input: initial directory, on output: new directory
const char **fFileTypes; // file types used to filter selectable files
Int_t fFileTypeIdx; // selected file type, index in fFileTypes
Bool_t fOverwrite; // if true overwrite the file with existing name on save
Bool_t fMultipleSelection; // if true, allow multiple file selection
TList *fFileNamesList; // list of selected file names
TGFileInfo() : fFilename(0), fIniDir(0), fFileTypes(0), fFileTypeIdx(0),
fOverwrite(kFALSE), fMultipleSelection(0), fFileNamesList(0) { }
~TGFileInfo();
void SetMultipleSelection(Bool_t option);
};
class TGFileDialog : public TGTransientFrame {
protected:
TGTextBuffer *fTbfname; // text buffer of file name
TGTextEntry *fName; // file name text entry
TGComboBox *fTypes; // file type combo box
TGFSComboBox *fTreeLB; // file system path combo box
TGPictureButton *fCdup; // top toolbar button
TGPictureButton *fNewf; // top toolbar button
TGPictureButton *fList; // top toolbar button
TGPictureButton *fDetails; // top toolbar button
TGCheckButton *fCheckB; // set on/off file overwriting for Open dialog
// OR set on/off multiple file selection for SaveAs dialog
const TGPicture *fPcdup; // picture for fCdup
const TGPicture *fPnewf; // picture for fNewf
const TGPicture *fPlist; // picture for fList
const TGPicture *fPdetails; // picture for fDetails
TGTextButton *fOk; // ok button
TGTextButton *fCancel; // cancel button
TGListView *fFv; // file list view
TGFileContainer *fFc; // file list view container (containing the files)
TGFileInfo *fFileInfo; // file info passed to this dialog
private:
TGFileDialog(const TGFileDialog&); // not implemented
TGFileDialog& operator=(const TGFileDialog&); // not implemented
public:
TGFileDialog(const TGWindow *p = 0, const TGWindow *main = 0,
EFileDialogMode dlg_type = kFDOpen, TGFileInfo *file_info = 0);
virtual ~TGFileDialog();
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
virtual void CloseWindow();
ClassDef(TGFileDialog,0) //File selection dialog
};
#endif
|