Flu_File_Chooser.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616
  1. // $Id: Flu_File_Chooser.h,v 1.63 2004/10/18 15:14:58 jbryan Exp $
  2. /***************************************************************
  3. * FLU - FLTK Utility Widgets
  4. * Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University
  5. *
  6. * This file and its content is protected by a software license.
  7. * You should have received a copy of this license with this file.
  8. * If not, please contact the Ohio Supercomputer Center immediately:
  9. * Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212
  10. *
  11. ***************************************************************/
  12. #ifndef _FLU_FILE_CHOOSER_H
  13. #define _FLU_FILE_CHOOSER_H
  14. #include <FL/Fl_Double_Window.H>
  15. #include <FL/Fl_Input.H>
  16. #include <FL/Fl_Menu_Button.H>
  17. #include <FL/Fl_Tile.H>
  18. #include <FL/Fl_Pack.H>
  19. #include <FL/Fl_Scroll.H>
  20. #include <FL/Fl_Check_Button.H>
  21. #include "FLU/Flu_Button.h"
  22. #include "FLU/Flu_Return_Button.h"
  23. #include "FLU/Flu_Wrap_Group.h"
  24. #include "FLU/Flu_Combo_Tree.h"
  25. #include "FLU/Flu_Combo_List.h"
  26. #include "FLU/flu_export.h"
  27. #include "FLU/FluSimpleString.h"
  28. #include "FLU/FluVectorClass.h"
  29. FluMakeVectorClass( FluSimpleString, FluStringVector );
  30. FLU_EXPORT const char* flu_file_chooser( const char *message, const char *pattern, const char *filename );
  31. FLU_EXPORT int flu_multi_file_chooser( const char *message, const char *pattern, const char *filename, FluStringVector *filelist );
  32. FLU_EXPORT const char* flu_save_chooser( const char *message, const char *pattern, const char *filename );
  33. FLU_EXPORT const char* flu_dir_chooser( const char *message, const char *filename );
  34. FLU_EXPORT const char* flu_dir_chooser( const char *message, const char *filename, bool showFiles );
  35. FLU_EXPORT const char* flu_file_and_dir_chooser( const char *message, const char *filename );
  36. //! A file and directory choosing widget that looks and acts similar to the stock Windows file chooser
  37. class FLU_EXPORT Flu_File_Chooser : public Fl_Double_Window
  38. {
  39. friend class FileInput;
  40. class FileInput : public Fl_Input
  41. {
  42. public:
  43. FileInput( int x, int y, int w, int h, const char *l, Flu_File_Chooser *c );
  44. ~FileInput();
  45. int handle( int event );
  46. protected:
  47. Flu_File_Chooser *chooser;
  48. };
  49. public:
  50. //! strings to be set by a programmer to the correct phrase or name for their language
  51. /*! (they are in english by default) */
  52. static FluSimpleString favoritesTxt;
  53. static FluSimpleString desktopTxt;
  54. static FluSimpleString myComputerTxt;
  55. static FluSimpleString myDocumentsTxt;
  56. static FluSimpleString filenameTxt;
  57. static FluSimpleString okTxt;
  58. static FluSimpleString cancelTxt;
  59. static FluSimpleString locationTxt;
  60. static FluSimpleString showHiddenTxt;
  61. static FluSimpleString fileTypesTxt;
  62. static FluSimpleString directoryTxt;
  63. static FluSimpleString allFilesTxt;
  64. static FluSimpleString defaultFolderNameTxt;
  65. static FluSimpleString backTTxt;
  66. static FluSimpleString forwardTTxt;
  67. static FluSimpleString upTTxt;
  68. static FluSimpleString reloadTTxt;
  69. static FluSimpleString trashTTxt;
  70. static FluSimpleString newDirTTxt;
  71. static FluSimpleString addFavoriteTTxt;
  72. static FluSimpleString previewTTxt;
  73. static FluSimpleString listTTxt;
  74. static FluSimpleString wideListTTxt;
  75. static FluSimpleString detailTTxt;
  76. static FluSimpleString detailTxt[4];
  77. static FluSimpleString contextMenuTxt[3];
  78. static FluSimpleString diskTypesTxt[6];
  79. static FluSimpleString createFolderErrTxt;
  80. static FluSimpleString deleteFileErrTxt;
  81. static FluSimpleString fileExistsErrTxt;
  82. static FluSimpleString renameErrTxt;
  83. //! This class must be derived from to create a "preview" widget.
  84. /*! Simply derive from this class and overload Fl_Group's methods to create a widget
  85. able to preview whatever file type you want. Register it with Flu_File_Chooser::add_preview_handler()
  86. When a file is previewed, all registered handlers are visited until the preview() virtual function
  87. for one of them returns nonzero. When preview() is called, the absolute path of the file is passed in,
  88. and the widget should determine whether it can preview the file and update itself accordingly. If
  89. it can preview the file, it should return nonzero, else it should return zero.
  90. */
  91. class FLU_EXPORT PreviewWidgetBase : public Fl_Group
  92. {
  93. public:
  94. PreviewWidgetBase();
  95. virtual ~PreviewWidgetBase();
  96. virtual int preview( const char *filename ) = 0;
  97. };
  98. //! File entry type
  99. enum {
  100. ENTRY_NONE = 1, /*!< An empty (or non-existant) entry */
  101. ENTRY_DIR = 2, /*!< A directory entry */
  102. ENTRY_FILE = 4, /*!< A file entry */
  103. ENTRY_FAVORITE = 8, /*!< A favorite entry */
  104. ENTRY_DRIVE = 16, /*!< An entry that refers to a disk drive */
  105. ENTRY_MYDOCUMENTS = 32, /*!< The entry referring to the current user's documents */
  106. ENTRY_MYCOMPUTER = 64 /*!< The entry referring to "My Computer" in Windows */
  107. };
  108. //! Chooser type
  109. enum {
  110. SINGLE = 0, /*!< Choose a single file or directory */
  111. MULTI = 1, /*!< Choose multiple files or directories */
  112. DIRECTORY = 4, /*!< Choose directories (choosing files is implicit if this bit is clear) */
  113. DEACTIVATE_FILES = 8, /*!< When choosing directories, also show the files in a deactivated state */
  114. SAVING = 16, /*!< When choosing files, whether to keep the current filename always in the input area */
  115. STDFILE = 32 /*!< Choose both files and directories at the same time */
  116. };
  117. //! Structure holding the info needed for custom file types
  118. struct FileTypeInfo
  119. {
  120. Fl_Image *icon;
  121. FluSimpleString extensions;
  122. FluSimpleString type, shortType;
  123. };
  124. //! Constructor opening a file chooser with title \b title visiting directory \b path with files filtered according to \b pattern. \b type is a logical OR of Flu_File_Chooser::SINGLE, Flu_File_Chooser::MULTI, and Flu_File_Chooser::DIRECTORY
  125. Flu_File_Chooser( const char *path, const char *pattern, int type, const char *title );
  126. //! Destructor
  127. ~Flu_File_Chooser();
  128. //! Add a custom callback that is called when the user right-clicks on an entry
  129. /*! \param type is the type of entry to handle (i.e. a logical OR of \c ENTRY_NONE, \c ENTRY_DIR, \c ENTRY_FILE, \c ENTRY_FAVORITE, \c ENTRY_DRIVE, \c ENTRY_MYDOCUMENTS, \c ENTRY_MYCOMPUTER). To add a "nothing" handler (when the user right-clicks on nothing), use ENTRY_NONE
  130. \param ext is the extension of the file that will cause this handler to be added to the popup menu
  131. \param name is the name that will appear in the popup menu for this handler
  132. */
  133. static void add_context_handler( int type, const char *ext, const char *name,
  134. void (*cb)(const char*,int,void*), void *cbd );
  135. //! Add a "preview" widget (derived from class Flu_File_Chooser::PreviewWidgetBase) that will handle custom previewing of files
  136. static void add_preview_handler( PreviewWidgetBase *w );
  137. //! Add descriptive information and an icon for a file type
  138. /*! \param extensions is a space- or comma-delimited list of file extensions, or \c NULL for directories. e.g. "zip,tgz,rar"
  139. \param short_description is a short description (!) of the file type. e.g. "Compressed Archive"
  140. \param icon is an optional custom icon to use for this file type
  141. */
  142. static void add_type( const char *extensions, const char *short_description, Fl_Image *icon = NULL );
  143. //! deprecated - do not use - right click to change filenames
  144. inline void allow_file_editing( bool b )
  145. { fileEditing = b; }
  146. //! deprecated - do not use - right click to change filenames
  147. inline bool allow_file_editing() const
  148. { return fileEditing; }
  149. //! Set whether file sorting is case insensitive. Default value is case-insensitive for windows, case-sensitive for everything else
  150. inline void case_insensitive_sort( bool b )
  151. { caseSort = !b; }
  152. //! Get whether file sorting is case insensitive
  153. inline bool case_insensitive_sort() const
  154. { return !caseSort; }
  155. //! Change the current directory the chooser is browsing to \b path
  156. void cd( const char *path );
  157. //! Clear the history of which directories have been visited
  158. void clear_history();
  159. //! \return how many files are selected
  160. int count();
  161. //! Set the default icon to use for all files for which no other icon has been specified
  162. inline void default_file_icon( Fl_Image* i )
  163. { defaultFileIcon = i; }
  164. //! Alias for cd()
  165. inline void directory( const char *d )
  166. { cd( d ); }
  167. //! Alias for pattern()
  168. inline void filter( const char *p )
  169. { pattern( p ); }
  170. //! Alias for pattern()
  171. inline const char* filter() const
  172. { return pattern(); }
  173. //! \return a pointer to a FileTypeInfo structure for files with type \b extension
  174. static FileTypeInfo *find_type( const char *extension );
  175. //! \return the current directory that the browser is visiting
  176. inline const char* get_current_directory() const
  177. { return currentDir.c_str(); }
  178. //! Override of Fl_Double_Window::handle()
  179. int handle( int event );
  180. //! Change the file filter pattern to \b p
  181. void pattern( const char *p );
  182. //! Get the current file filter pattern
  183. inline const char* pattern() const
  184. { return rawPattern.c_str(); }
  185. //! Set the state of the preview button
  186. inline void preview( bool b )
  187. { previewBtn->value(b); previewBtn->do_callback(); }
  188. //! Get the state of the preview button
  189. inline int preview() const
  190. { return previewBtn->value(); }
  191. //! Refresh the current directory
  192. inline void rescan() { reloadCB(); }
  193. //! Override of Fl_Double_Window::resize()
  194. void resize( int x, int y, int w, int h );
  195. //! Select all entries (only valid for multiple-selections)
  196. void select_all();
  197. //! Set a custom sorting function for sorting entries based on filename
  198. inline void set_sort_function( int (*cb)(const char*,const char*) )
  199. { customSort = cb; rescan(); }
  200. //! Set the type of the chooser (see constructor)
  201. inline void type( int t )
  202. { selectionType = t; rescan(); }
  203. //! Get the type of the chooser
  204. inline int type( int t ) const
  205. { return selectionType; }
  206. //! Unselect all entries
  207. void unselect_all();
  208. //! Set the current file the chooser is selecting
  209. void value( const char *v );
  210. //! Get the current file the chooser is selecting
  211. const char *value();
  212. //! For MULTI file queries, get selected file \b n (base 1 - i.e. 1 returns the first file, 2 the second, etc)
  213. const char *value( int n );
  214. FileInput filename;
  215. // the <Enter> key behavior is not correct for versions before 1.1.4rc2
  216. #if FL_MAJOR_VERSION >= 1 && FL_MINOR_VERSION >= 1 && FL_PATCH_VERSION >= 4
  217. Flu_Return_Button ok;
  218. #else
  219. Flu_Button ok;
  220. #endif
  221. Flu_Button cancel;
  222. // apparently there is a bug in VC6 that prevents friend classes from accessing
  223. // non-public members. stupid windows
  224. // several other compilers were reported to have a problem with this too, so
  225. // i'm just making the whole class public to eliminate potential problems.
  226. // bad c++ - i know...
  227. //#ifndef WIN32
  228. //protected:
  229. //#endif
  230. class ContextHandler
  231. {
  232. public:
  233. FluSimpleString ext, name;
  234. int type;
  235. void (*callback)(const char*,int,void*);
  236. void *callbackData;
  237. inline ContextHandler& operator =( const ContextHandler &c )
  238. { ext = c.ext; name = c.name; type = c.type; callback = c.callback; callbackData = c.callbackData; return *this; }
  239. };
  240. FluMakeVectorClass( ContextHandler, ContextHandlerVector );
  241. static ContextHandlerVector contextHandlers;
  242. typedef PreviewWidgetBase* pPreviewWidgetBase;
  243. FluMakeVectorClass( pPreviewWidgetBase, PreviewHandlerVector );
  244. static PreviewHandlerVector previewHandlers;
  245. Fl_Check_Button *hiddenFiles;
  246. Flu_Combo_Tree *location;
  247. inline static void _backCB( Fl_Widget *w, void *arg )
  248. { ((Flu_File_Chooser*)arg)->backCB(); }
  249. void backCB();
  250. inline static void _forwardCB( Fl_Widget *w, void *arg )
  251. { ((Flu_File_Chooser*)arg)->forwardCB(); }
  252. void forwardCB();
  253. inline static void _sortCB( Fl_Widget *w, void *arg )
  254. { ((Flu_File_Chooser*)arg)->sortCB( w ); }
  255. void sortCB( Fl_Widget *w );
  256. inline static void _previewCB( Fl_Widget*, void *arg )
  257. { ((Flu_File_Chooser*)arg)->previewCB(); }
  258. void previewCB();
  259. inline static void _listModeCB( Fl_Widget *w, void *arg )
  260. { ((Flu_File_Chooser*)arg)->listModeCB(); }
  261. void listModeCB();
  262. inline static void _filenameCB( Fl_Widget *w, void *arg )
  263. { ((Flu_File_Chooser*)arg)->filenameCB(); }
  264. void filenameCB();
  265. inline static void _locationCB( Fl_Widget *w, void *arg )
  266. { ((Flu_File_Chooser*)arg)->locationCB( ((Flu_Combo_Tree*)w)->value() ); }
  267. void locationCB( const char *path );
  268. inline static void _locationQJCB( Fl_Widget *w, void *arg )
  269. { ((Flu_File_Chooser*)arg)->cd( ((Fl_Button*)w)->label() ); }
  270. inline static void delayedCdCB( void *arg )
  271. { ((Flu_File_Chooser*)arg)->cd( ((Flu_File_Chooser*)arg)->delayedCd.c_str() ); }
  272. inline static void selectCB( void *arg )
  273. { ((Flu_File_Chooser*)arg)->okCB(); }
  274. inline static void _cancelCB( Fl_Widget*, void *arg )
  275. { ((Flu_File_Chooser*)arg)->cancelCB(); }
  276. void cancelCB();
  277. inline static void _okCB( Fl_Widget*, void *arg )
  278. { ((Flu_File_Chooser*)arg)->okCB(); }
  279. void okCB();
  280. inline static void _trashCB( Fl_Widget*, void *arg )
  281. { ((Flu_File_Chooser*)arg)->trashCB(); }
  282. void trashCB( bool recycle = true );
  283. inline static void _newFolderCB( Fl_Widget*, void *arg )
  284. { ((Flu_File_Chooser*)arg)->newFolderCB(); }
  285. void newFolderCB();
  286. inline static void upDirCB( Fl_Widget*, void *arg )
  287. { ((Flu_File_Chooser*)arg)->cd( "../" ); }
  288. inline static void reloadCB( Fl_Widget*, void *arg )
  289. { ((Flu_File_Chooser*)arg)->reloadCB(); }
  290. void reloadCB();
  291. inline static void _homeCB( Fl_Widget*, void *arg )
  292. { ((Flu_File_Chooser*)arg)->homeCB(); }
  293. void homeCB();
  294. inline static void _desktopCB( Fl_Widget*, void *arg )
  295. { ((Flu_File_Chooser*)arg)->desktopCB(); }
  296. void desktopCB();
  297. inline static void _favoritesCB( Fl_Widget*, void *arg )
  298. { ((Flu_File_Chooser*)arg)->favoritesCB(); }
  299. void favoritesCB();
  300. inline static void _myComputerCB( Fl_Widget*, void *arg )
  301. { ((Flu_File_Chooser*)arg)->myComputerCB(); }
  302. void myComputerCB();
  303. inline static void _addToFavoritesCB( Fl_Widget*, void *arg )
  304. { ((Flu_File_Chooser*)arg)->addToFavoritesCB(); }
  305. void addToFavoritesCB();
  306. inline static void _documentsCB( Fl_Widget*, void *arg )
  307. { ((Flu_File_Chooser*)arg)->documentsCB(); }
  308. void documentsCB();
  309. inline static void _hideCB( Fl_Widget*, void *arg )
  310. { ((Flu_File_Chooser*)arg)->hideCB(); }
  311. void hideCB();
  312. void do_callback();
  313. enum {
  314. SORT_NAME = 1,
  315. SORT_SIZE = 2,
  316. SORT_TYPE = 4,
  317. SORT_DATE = 8,
  318. SORT_REVERSE = 16
  319. };
  320. static void _qSort( int how, bool caseSort, Fl_Widget **array, int low, int high );
  321. friend class Entry;
  322. class Entry : public Fl_Input
  323. {
  324. public:
  325. Entry( const char* name, int t, bool d, Flu_File_Chooser *c );
  326. ~Entry();
  327. int handle( int event );
  328. void draw();
  329. void updateSize();
  330. void updateIcon();
  331. FluSimpleString filename, date, filesize, shortname,
  332. description, shortDescription, toolTip, altname;
  333. //FluSimpleString permissions;
  334. //unsigned char pU, pG, pO; // 3-bit unix style permissions
  335. unsigned int type, idate;
  336. unsigned long isize;
  337. bool selected;
  338. int editMode;
  339. Flu_File_Chooser *chooser;
  340. Fl_Image *icon;
  341. int nameW, typeW, sizeW, dateW;
  342. bool details;
  343. inline static void _inputCB( Fl_Widget *w, void *arg )
  344. { ((Entry*)arg)->inputCB(); }
  345. void inputCB();
  346. inline static void _editCB( void *arg )
  347. { ((Entry*)arg)->editCB(); }
  348. void editCB();
  349. };
  350. friend class FileList;
  351. class FileList : public Flu_Wrap_Group
  352. {
  353. public:
  354. FileList( int x, int y, int w, int h, Flu_File_Chooser *c );
  355. ~FileList();
  356. int handle( int event );
  357. void sort( int numDirs = -1 );
  358. inline Fl_Widget *child(int n) const
  359. { return Flu_Wrap_Group::child(n); }
  360. inline int children() const
  361. { return Flu_Wrap_Group::children(); }
  362. int numDirs;
  363. Flu_File_Chooser *chooser;
  364. };
  365. friend class FileDetails;
  366. class FileDetails : public Fl_Pack
  367. {
  368. public:
  369. FileDetails( int x, int y, int w, int h, Flu_File_Chooser *c );
  370. ~FileDetails();
  371. int handle( int event );
  372. void sort( int numDirs = -1 );
  373. void scroll_to( Fl_Widget *w );
  374. Fl_Widget* next( Fl_Widget* w );
  375. Fl_Widget* previous( Fl_Widget* w );
  376. int numDirs;
  377. Flu_File_Chooser *chooser;
  378. };
  379. friend class CBTile;
  380. class CBTile : public Fl_Tile
  381. {
  382. public:
  383. CBTile( int x, int y, int w, int h, Flu_File_Chooser *c );
  384. int handle( int event );
  385. Flu_File_Chooser *chooser;
  386. };
  387. friend class FileColumns;
  388. class FileColumns : public Fl_Tile
  389. {
  390. public:
  391. FileColumns( int x, int y, int w, int h, Flu_File_Chooser *c );
  392. ~FileColumns();
  393. int handle( int event );
  394. void resize( int x, int y, int w, int h );
  395. Flu_File_Chooser *chooser;
  396. int W1, W2, W3, W4;
  397. };
  398. friend class PreviewTile;
  399. class PreviewTile : public Fl_Tile
  400. {
  401. public:
  402. PreviewTile( int x, int y, int w, int h, Flu_File_Chooser *c );
  403. int handle( int event );
  404. Flu_File_Chooser *chooser;
  405. int last;
  406. };
  407. class ImgTxtPreview : public PreviewWidgetBase
  408. {
  409. public:
  410. int preview( const char *filename );
  411. unsigned char previewTxt[1024];
  412. };
  413. friend class PreviewGroup;
  414. class PreviewGroup : public Fl_Group
  415. {
  416. public:
  417. PreviewGroup( int x, int y, int w, int h, Flu_File_Chooser *c );
  418. void draw();
  419. Flu_File_Chooser *chooser;
  420. FluSimpleString lastFile, file;
  421. PreviewWidgetBase* handled;
  422. };
  423. Fl_Group *getEntryGroup();
  424. Fl_Group *getEntryContainer();
  425. void win2unix( FluSimpleString &s );
  426. void cleanupPath( FluSimpleString &s );
  427. bool correctPath( FluSimpleString &path );
  428. void updateEntrySizes();
  429. void buildLocationCombo();
  430. void updateLocationQJ();
  431. void addToHistory();
  432. FluSimpleString formatDate( const char *d );
  433. void recursiveScan( const char *dir, FluStringVector *files );
  434. bool stripPatterns( FluSimpleString s, FluStringVector* patterns );
  435. int popupContextMenu( Entry *entry );
  436. FluSimpleString commonStr();
  437. static ImgTxtPreview *imgTxtPreview;
  438. static int (*customSort)(const char*,const char*);
  439. PreviewGroup *previewGroup;
  440. PreviewTile *previewTile;
  441. Fl_Group *fileGroup, *locationQuickJump;
  442. Fl_Menu_Button entryPopup;
  443. Fl_Image *defaultFileIcon;
  444. Entry *lastSelected;
  445. FileList *filelist;
  446. FileColumns *filecolumns;
  447. Fl_Group *fileDetailsGroup;
  448. Fl_Scroll *filescroll;
  449. FileDetails *filedetails;
  450. Flu_Button *detailNameBtn, *detailTypeBtn, *detailSizeBtn, *detailDateBtn;
  451. FluSimpleString currentDir, delayedCd, rawPattern;
  452. FluSimpleString configFilename;
  453. FluSimpleString userHome, userDesktop, userDocs;
  454. FluSimpleString drives[26];
  455. Fl_Pixmap* driveIcons[26];
  456. Flu_Button *fileListBtn, *fileListWideBtn, *fileDetailsBtn, *backBtn, *forwardBtn, *upDirBtn, *trashBtn,
  457. *newDirBtn, *addFavoriteBtn, *reloadBtn, *previewBtn;
  458. Fl_Browser *favoritesList;
  459. Flu_Combo_List *filePattern;
  460. int selectionType;
  461. bool filenameEnterCallback, filenameTabCallback, walkingHistory, caseSort, fileEditing;
  462. int sortMethod;
  463. FluStringVector patterns;
  464. static FileTypeInfo *types;
  465. static int numTypes;
  466. static int typeArraySize;
  467. static FluSimpleString dArrow[4];
  468. static FluSimpleString uArrow[4];
  469. #ifdef WIN32
  470. unsigned int driveMask;
  471. unsigned int driveTypes[26];
  472. FluSimpleString volumeNames[26];
  473. bool refreshDrives;
  474. #endif
  475. class History
  476. {
  477. public:
  478. History() { last = next = NULL; }
  479. FluSimpleString path;
  480. History *last, *next;
  481. };
  482. History *history, *currentHist;
  483. Fl_Callback *_callback;
  484. void *_userdata;
  485. };
  486. #endif