00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef newfilebrowser_h
00022 #define newfilebrowser_h
00023 #include <FL/Fl.H>
00024 #include <FL/Fl_Double_Window.H>
00025 #include <FL/Fl_Choice.H>
00026 #include <FL/Fl_Input.H>
00027 #include <FL/Fl_Button.H>
00028 #include <FL/Fl_Box.H>
00029 #include "VMDFltkMenu.h"
00030
00031
00033 class FileChooserFltkMenu : public VMDFltkMenu {
00034 public:
00035 FileChooserFltkMenu(VMDApp *);
00036
00037 int selectmol(int molno);
00038
00039 private:
00040 void make_window();
00041 void add_file(const char *);
00042 void load_file(const char *);
00043 void browse_files();
00044
00045 Fl_Choice *molchooser;
00046 Fl_Input *filenameinput;
00047 Fl_Choice *filetypechooser;
00048 Fl_Button *loadbutton;
00049 Fl_Button *browsebutton;
00050
00051 Fl_Group *timestepgroup;
00052 Fl_Button *allatoncebutton;
00053 Fl_Button *loadinbackgroundbutton;
00054 Fl_Input *firstinput;
00055 Fl_Input *lastinput;
00056 Fl_Input *strideinput;
00057
00058 Fl_Browser *datasetbrowser;
00059
00060 static void browse_cb(Fl_Widget *, void *);
00061 static void filenameinput_cb(Fl_Widget *, void *);
00062 static void filetype_cb(Fl_Widget *, void *);
00063 static void load_cb(Fl_Widget *, void *);
00064
00067 void update_molchooser(int selmol=-1);
00068
00069 void update_filetypes();
00070 void update_checkboxes();
00071
00072 int has_structure;
00073 int has_bonds;
00074 int has_timesteps;
00075 int has_graphics;
00076 int has_volumetric;
00077
00078 protected:
00079 int act_on_command(int, Command *);
00080 };
00081 #endif