00001 /*************************************************************************** 00002 *cr 00003 *cr (C) Copyright 1995-2019 The Board of Trustees of the 00004 *cr University of Illinois 00005 *cr All Rights Reserved 00006 *cr 00007 ***************************************************************************/ 00008 00009 00010 #ifndef GEOMETRYFLTKMENU_H 00011 #define GEOMETRYFLTKMENU_H 00012 00013 #include <FL/Fl.H> 00014 #include <FL/Fl_Window.H> 00015 #include <FL/Fl_Multi_Browser.H> 00016 #include <FL/Fl_Choice.H> 00017 #include <FL/Fl_Tabs.H> 00018 #include <FL/Fl_Group.H> 00019 #include <FL/Fl_Output.H> 00020 #include <FL/Fl_Value_Output.H> 00021 #include <FL/Fl_Button.H> 00022 #include <FL/Fl_Float_Input.H> 00023 #include <FL/Fl_Positioner.H> 00024 #include "VMDFltkMenu.h" 00025 00026 #define VMD_FLCHART_WORKAROUND 1 00027 00028 #if defined(VMD_FLCHART_WORKAROUND) 00029 class myFl_Chart; // XXX workaround bug in Fl_Chart 00030 #else 00031 class Fl_Chart; 00032 #endif 00033 class Fl_Input; 00034 class GeometryList; 00035 class Molecule; 00036 00038 class GeometryFltkMenu : public VMDFltkMenu { 00039 public: 00040 GeometryFltkMenu(VMDApp *); 00041 void apply_offset_to_selected_labels(float x, float y); 00042 void apply_format_to_selected_labels(const char *format); 00043 00044 protected: 00045 int act_on_command(int, Command *); 00046 00047 private: 00049 GeometryList *glist; 00050 00051 int user_is_typing_in_format_input; 00052 00053 void make_window(); 00054 void update_geometry_types(); 00055 void update_labelprops(); 00056 void fill_label_browser(); 00057 void handle_pick(Molecule *, int, float); 00058 00059 static void typechooser_cb(Fl_Widget *, void *); 00060 static void graphinwindow_cb(Fl_Widget *, void *); 00061 static void show_cb(Fl_Widget *, void *); 00062 static void hide_cb(Fl_Widget *, void *); 00063 static void delete_cb(Fl_Widget *, void *); 00064 static void labelbrowser_cb(Fl_Widget *, void *); 00065 static void exportgraph_cb(Fl_Widget *, void *); 00066 static void savetofile_cb(Fl_Widget *, void *); 00067 static void close_cb(Fl_Widget *, void *); 00068 00069 Fl_Browser *labelbrowser; 00070 Fl_Choice *labeltypechooser; 00071 Fl_Group *pickinggroup; 00072 Fl_Output *pickedmolecule; 00073 Fl_Output *pickedresname; 00074 Fl_Output *pickedresid; 00075 Fl_Output *pickedname; 00076 Fl_Output *pickedtype; 00077 Fl_Output *pickedindex; 00078 Fl_Output *pickedchain; 00079 Fl_Output *pickedsegname; 00080 Fl_Output *pickedpos; 00081 Fl_Output *pickedvalue; 00082 Fl_Group *geometrygroup; 00083 Fl_Button *savetofilebutton; 00084 Fl_Button *previewcheckbutton; 00085 Fl_Button *exportgraphbutton; 00086 #if defined(VMD_FLCHART_WORKAROUND) 00087 myFl_Chart *chart; // XXX workaround bug in Fl_Chart 00088 #else 00089 Fl_Chart *chart; 00090 #endif 00091 Fl_Button *showbutton; 00092 Fl_Button *hidebutton; 00093 Fl_Button *deletebutton; 00094 Fl_Group *propertiesgroup; 00095 Fl_Positioner *textoffsetpositioner; 00096 Fl_Button *offsetresetbutton; 00097 Fl_Input *textformatinput; 00098 Fl_Group *globalpropsgroup; 00099 Fl_Slider *textsizeslider; 00100 Fl_Float_Input *textsizeinput; 00101 Fl_Slider *textthicknessslider; 00102 Fl_Float_Input *textthicknessinput; 00103 }; 00104 #endif