Flu_File_Chooser.H 20 KB

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