1 /* 2 FXiTe - The Free eXtensIble Text Editor 3 Copyright (c) 2009-2011 Jeffrey Pohlmeyer <yetanothergeek@gmail.com> 4 5 This program is free software; you can redistribute it and/or modify it 6 under the terms of the GNU General Public License version 3 as 7 published by the Free Software Foundation. 8 9 This software is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program; if not, write to the Free Software 16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19 class FileSel; 20 21 class FileDlg: public FXFileDialog { 22 private: FXDECLARE(FileDlg)23 FXDECLARE(FileDlg) 24 FileDlg() {} 25 FXToggleButton *multi_btn; 26 FileSel*fsel(); 27 #ifdef WIN32 28 private: 29 FXString*filenames; 30 bool own_filenames; 31 void DeleteFilenames(); 32 public: 33 ~FileDlg(); 34 FXString*getFilenames(); 35 FXString getFilename(); 36 FXuint execute(FXuint placement=PLACEMENT_CURSOR); 37 static bool ReadShortcut(FXWindow*w, FXString &filename); 38 #endif 39 public: 40 FileDlg(FXWindow*win, const FXString&caption, bool optmulti=false); 41 virtual void create(); 42 long onKeyPress(FXObject*o,FXSelector sel,void*p); 43 long onToggleMulti(FXObject*o,FXSelector sel,void*p); 44 void setSelectMode(FXuint mode); MultiMode()45 bool MultiMode() { return multi_btn->shown() && multi_btn->getState(); } 46 enum { 47 ID_TOGGLE_MULTI=FXFileDialog::ID_LAST, 48 ID_LAST 49 }; 50 }; 51 52