1 // $Id: CrystalView.h 1093 2010-12-20 21:48:21Z martin $ 2 // 3 // main header for DRAWxtl V5.5 - the GUI version 4 // Coded using the FLTK 1.1.6 widget set 5 // 6 // Larry W. Finger, Martin Kroeker and Brian Toby 7 // 8 // defines the main mindow class and the various data classes 9 10 #ifndef CRYSTALVIEW_H 11 #define CRYSTALVIEW_H 1 12 #include <FL/Fl.H> 13 #include <FL/glut.H> 14 #include "Tb_Window.h" 15 #include <FL/Fl_Window.H> 16 #include <FL/gl.h> 17 #if defined(__APPLE__) 18 # include <openGL/glu.h> 19 #else 20 # include <GL/glu.h> 21 #endif 22 23 #include <stdlib.h> 24 #include <FL/glut.H> 25 #include <FL/Fl_Text_Editor.H> 26 #include <FL/Fl_File_Chooser.H> 27 #include "Flu_Spinner.h" 28 #include "Flu_Combo_List.h" 29 #include <FL/Fl_Multiline_Output.H> 30 #include <FL/Fl_Input.H> 31 #include <FL/Fl_Group.H> 32 #include <FL/Fl_Radio_Button.H> 33 #ifndef max 34 #define max(a,b) ((a) >= (b) ? (a) : (b)) 35 #define min(a,b) ((a) <= (b) ? (a) : (b)) 36 #endif 37 38 class CrystalView:public Tb_Window 39 { 40 public: 41 CrystalView (int x, int y, int w, int h, const char *t); 42 void draw (void); 43 void draw_overlay (void); 44 ~CrystalView (); 45 }; 46 47 class BondParam 48 { // class to hold bond screen parameters 49 public: 50 Fl_Window * Bond_Edit_Window; 51 Fl_Text_Editor *Bond_Edit; 52 Fl_Text_Buffer *BondBuffer; 53 Fl_Text_Buffer *Bond_Output_Buffer; 54 Flu_Combo_List *Bond_Combo; 55 Fl_Input *New_Bond_From; 56 Fl_Input *New_Bond_To; 57 Fl_Input *New_Bond_Dia; 58 Fl_Input *New_Bond_Min; 59 Fl_Input *New_Bond_Max; 60 Fl_Input *New_Bond_Dashes; 61 Fl_Output *BondInstr; 62 Fl_Output *BondInstr1; 63 Fl_Output *BondInstr2; 64 Flu_Combo_List *New_Bond_Color; 65 Fl_Radio_Button *New_Bond_Style; 66 Fl_Button *New_Bond_Add; 67 Fl_Button *New_Bond_Remove; 68 Flu_Combo_List *Frame_No; 69 }; 70 71 class LonePairParam 72 { // class to hold lone-pair screen parameters 73 public: 74 Fl_Window * LonePair_Edit_Window; 75 Fl_Text_Editor *LonePair_Edit; 76 Fl_Text_Buffer *LonePairBuffer; 77 Flu_Combo_List *LonePair_Combo; 78 Fl_Input *Number; 79 Fl_Input *Height; 80 Fl_Input *Radius1; 81 Fl_Input *Radius2; 82 Fl_Output *LonePairInst; 83 Fl_Output *LonePairInst1; 84 Fl_Output *LonePairInst2; 85 Flu_Combo_List *LonePair_Color; 86 Fl_Button *LonePair_Add; 87 Fl_Button *LonePair_Remove; 88 Flu_Combo_List *Frame_No; 89 }; 90 91 class MapsParam 92 { // class to hold map parameters 93 public: 94 Fl_Window * Maps_Edit_Window; 95 Fl_Text_Buffer *MapsBuffer; 96 Fl_Button *Map_Browse; 97 Fl_Button *Map_Info; 98 Fl_Output *MapsInstr; 99 Fl_Output *MapsInstr1; 100 Fl_Output *MapsInstr2; 101 Fl_Input *Level; 102 Fl_Input *Step; 103 Fl_Input *Top; 104 Flu_Combo_List *Type; 105 Flu_Combo_List *Color; 106 Fl_Output *Filename; 107 Fl_Button *MapCalc; 108 Flu_Combo_List *MapCalcType; 109 Flu_Combo_List *MapType; 110 Fl_Input *XMin; 111 Fl_Input *YMin; 112 Fl_Input *ZMin; 113 Fl_Input *XMax; 114 Fl_Input *YMax; 115 Fl_Input *ZMax; 116 Fl_Input *Resolution; 117 Flu_Spinner *X4; 118 Flu_Spinner *X5; 119 Flu_Spinner *X6; 120 Fl_Button *New_Map_Add; 121 Fl_Button *New_Map_Remove; 122 Fl_Button *Add_Button; 123 Fl_Button *Remove_Button; 124 Flu_Combo_List *Frame_No; 125 }; 126 127 class SliceParam 128 { // class to hold map slice parameters 129 public: 130 Fl_Window * Slice_Edit_Window; 131 Fl_Input *New_x; 132 Fl_Input *New_y; 133 Fl_Input *New_z; 134 Fl_Input *New_nx; 135 Fl_Input *New_ny; 136 Fl_Input *New_nz; 137 Fl_Input *New_type; 138 Fl_Check_Button *Legend; 139 Flu_Combo_List *Frame_No; 140 }; 141 142 class AutomationParam 143 { // class to hold automation parameters 144 public: 145 Fl_Window * Automation_Edit_Window; 146 Fl_Input *t_start; 147 Fl_Input *t_end; 148 Fl_Input *t_step; 149 Fl_Input *width; 150 Fl_Input *height; 151 Fl_Input *fps; 152 Fl_Input *POV_Filename; 153 Fl_Radio_Button *NoMovie; 154 Fl_Radio_Button *Mencoder; 155 Fl_Radio_Button *Ffmpeg; 156 Fl_Radio_Button *FfmpegG; 157 Fl_Check_Button *keeptemps; 158 Fl_Button *Go; 159 Fl_Button *Abort; 160 Fl_Button *Close; 161 }; 162 163 class SurfParam 164 { // class to hold map parameters 165 public: 166 Fl_Window * Surfaces_Edit_Window; 167 Fl_Text_Buffer *AimSurfBuffer; 168 Fl_Output *AimSurfInstr; 169 Fl_Output *AimSurfInstr1; 170 Fl_Output *AimSurfInstr2; 171 Flu_Combo_List *AimSurfType; 172 Flu_Combo_List *AimSurfColor; 173 Flu_Combo_List *AimSurf_Combo; 174 Fl_Input *AimFile; 175 Flu_Combo_List *SurfType; 176 Flu_Combo_List *SurfColor; 177 Fl_Input *Probe; 178 Fl_Input *GridX; 179 Fl_Input *GridY; 180 Fl_Input *GridZ; 181 Fl_Text_Buffer *SurfBuffer; 182 Fl_Output *SurfInstr; 183 Fl_Output *SurfInstr1; 184 Fl_Output *SurfInstr2; 185 Flu_Combo_List *Surf_Combo; 186 Fl_Input *Radius; 187 Fl_Button *New_AimSurf_Add; 188 Fl_Button *New_AimSurf_Remove; 189 Fl_Button *Add_Button; 190 Fl_Button *Remove_Button; 191 Fl_Button *Add_Button2; 192 Fl_Button *Remove_Button2; 193 Flu_Combo_List *Frame_No; 194 }; 195 196 class ModParam 197 { // class to hold modulation parameters 198 public: 199 Fl_Window * Mods_Edit_Window; 200 Flu_Spinner *Mod_t0; 201 Flu_Spinner *Mod_t1; 202 Flu_Spinner *Mod_t2; 203 Fl_Check_Button *Mod_average; 204 Fl_Text_Editor *Occ_Edit; 205 Fl_Text_Buffer *Occ_Buffer; 206 Fl_Output *Occ_Instr; 207 Fl_Output *Occ_Instr1; 208 Flu_Combo_List *Occ_Combo; 209 Fl_Input *New_Occ_Avg; 210 Fl_Input *New_Occ_Min; 211 Fl_Button *New_Occ_Add; 212 Fl_Button *New_Occ_Remove; 213 int saved_avg; 214 float saved_t[3]; 215 }; 216 217 class PolyParam 218 { // class to hold polyhedra screen parameters 219 public: 220 Fl_Window * Polyhedra_Edit_Window; 221 Fl_Text_Editor *Polyhedra_Edit; 222 Fl_Text_Buffer *PolyhedraBuffer; 223 Fl_Text_Buffer *Polyhedra_Output_Buffer; 224 Flu_Combo_List *Polyhedra_Combo; 225 Fl_Input *New_Polyhedra_From; 226 Fl_Input *New_Polyhedra_To; 227 Fl_Input *New_Polyhedra_Min; 228 Fl_Input *New_Polyhedra_Max; 229 Fl_Input *New_Polyhedra_Transp; 230 Flu_Combo_List *New_Polyhedra_Color; 231 Fl_Input *Edge_Radius; 232 Flu_Combo_List *Edge_Color; 233 Fl_Input *Def_Edge_Radius; 234 Flu_Combo_List *Def_Edge_Color; 235 Fl_Button *New_Polyhedra_Add; 236 Fl_Button *New_Polyhedra_Remove; 237 Fl_Radio_Button *Polysz; 238 Fl_Radio_Button *Polyvert; 239 Fl_Radio_Button *Polyshell; 240 Fl_Output *PolyInstr; 241 Fl_Output *PolyInstr1; 242 Fl_Output *PolyInstr2; 243 Fl_Radio_Button *Plane; 244 Flu_Combo_List *Frame_No; 245 }; 246 247 class SphereParam 248 { // class to hold sphere screen parameters 249 public: 250 Fl_Window * Sphere_Edit_Window; 251 Fl_Text_Editor *Sphere_Edit; 252 Fl_Text_Buffer *SphereBuffer; 253 Fl_Output *SphereInstr; 254 Fl_Output *SphereInstr1; 255 Fl_Output *SphereInstr2; 256 Fl_Text_Buffer *Sphere_Output_Buffer; 257 Flu_Combo_List *Sphere_Combo; 258 Fl_Input *New_Sphere_Size; 259 Flu_Combo_List *New_Sphere_Color; 260 Fl_Button *New_Sphere_Add; 261 Fl_Button *New_Sphere_Remove; 262 Fl_Button *New_Sphere_Convert; 263 Flu_Combo_List *Frame_No; 264 }; 265 266 class ConfigParm 267 { // class to hold POV configuration parameters 268 public: 269 Fl_Window * ConfigWindow; 270 Fl_Input *POVOptions; 271 Fl_Input *POVPath; 272 Fl_Input *POVIncludePath; 273 Fl_Input *POVDefaultFinish; 274 Fl_Check_Button *Stereo; 275 Fl_Check_Button *StereoMesh; 276 Fl_Check_Button *CrossEyed; 277 Fl_Input *Stereo_Base; 278 Fl_Input *MencoderPath; 279 Fl_Input *FFmpegPath; 280 }; 281 282 class ConfigMiscParm 283 { // class to hold miscellaneous configuration parameters 284 public: 285 Fl_Window * MiscConfigWindow; 286 Fl_Check_Button *LoadLast; 287 Fl_Check_Button *AutoLabel; 288 Fl_Check_Button *doVrml; 289 Fl_Check_Button *doPOV; 290 Fl_Check_Button *doAsy; 291 }; 292 293 class ConfigMSMSParm 294 { // class to hold MSMS configuration 295 public: 296 Fl_Window * MSMSConfigWindow; 297 Fl_Input *MSMSPath; 298 }; 299 300 class OmitParam 301 { // class to hold omit parameters 302 public: 303 int nomits; // number of omits 304 int omit1[1000]; 305 int omit2[1000]; 306 }; 307 308 class SlabParam 309 { // class to hold slab edit parameters 310 public: 311 Fl_Window * SlabWindow; 312 Fl_Input *Slab_A; 313 Fl_Input *Slab_B; 314 Fl_Input *Slab_C; 315 Fl_Input *Slab_Alpha; 316 Fl_Input *Slab_Beta; 317 Fl_Input *Slab_Gamma; 318 Fl_Input *Slab_Off_X; 319 Fl_Input *Slab_Off_Y; 320 Fl_Input *Slab_Off_Z; 321 Fl_Input *Slab_Rot_X; 322 Fl_Input *Slab_Rot_Y; 323 Fl_Input *Slab_Rot_Z; 324 Fl_Choice *Slab_Mode; 325 }; 326 327 class ArrowParam 328 { // class to hold arrow parameters 329 public: 330 Fl_Window * ArrowWindow; 331 Fl_Input *Px; 332 Fl_Input *Py; 333 Fl_Input *Pz; 334 Fl_Input *Cx; 335 Fl_Input *Cy; 336 Fl_Input *Cz; 337 Fl_Input *Aa; 338 Fl_Input *Ba; 339 Fl_Input *Ca; 340 Fl_Input *Ab; 341 Fl_Input *Bb; 342 Fl_Input *Cb; 343 Fl_Input *Ac; 344 Fl_Input *Bc; 345 Fl_Input *Cc; 346 Fl_Input *Length; 347 Fl_Input *Diameter; 348 Fl_Output *ArrowInstr; 349 Fl_Output *ArrowInstr1; 350 Fl_Output *ArrowInstr2; 351 Flu_Combo_List *Color; 352 Fl_Text_Buffer *ArrowBuffer; 353 Fl_Button *AddButton; 354 Fl_Button *RemoveButton; 355 Flu_Combo_List *Frame_No; 356 }; 357 358 359 #endif 360