1 /***********************************************************************/ 2 /* Open Visualization Data Explorer */ 3 /* (C) Copyright IBM Corp. 1989,1999 */ 4 /* ALL RIGHTS RESERVED */ 5 /* This code licensed under the */ 6 /* "IBM PUBLIC LICENSE - Open Visualization Data Explorer" */ 7 /***********************************************************************/ 8 9 #include <dxconfig.h> 10 11 12 #ifndef _GRID_CHOICE_H 13 #define _GRID_CHOICE_H 14 15 #include "NonimportableChoice.h" 16 #include "SymbolManager.h" 17 18 #define ClassGridChoice "GridChoice" 19 20 class Command; 21 class ToggleButtonInterface; 22 23 class GridChoice : public NonimportableChoice { 24 private: 25 static boolean ClassInitialized; 26 27 // 28 // prevent recursion opening a .general file which points to itself 29 // 30 boolean recursive; 31 32 protected: 33 34 static String DefaultResources[]; 35 36 virtual Widget createBody (Widget parent, Widget top); 37 38 ToggleButtonInterface* grid1Option; 39 ToggleButtonInterface* grid2Option; 40 ToggleButtonInterface* grid3Option; 41 ToggleButtonInterface* grid4Option; 42 ToggleButtonInterface* positionsOption; 43 ToggleButtonInterface* singleTimeStepOption; 44 ToggleButtonInterface* blockOption; 45 ToggleButtonInterface* spreadSheetOption; 46 47 Command* gridTypeCmd; 48 Command* positionsCmd; 49 50 Widget dimension_l; 51 Widget dimension_s; 52 Widget data_org_l; 53 Widget data_org_rb; 54 Widget number_var_l; 55 Widget number_var_s; 56 57 boolean positions_was_on; 58 expandedHeight()59 virtual int expandedHeight() 60 { return (VERTICAL_LAYOUT?300:120); } 61 62 //const char* determineNetToRun(char **); 63 64 public: 65 66 GridChoice (GARChooserWindow* gcw, Symbol sym); Allocator(GARChooserWindow * gcw,Symbol sym)67 static GridChoice* Allocator (GARChooserWindow* gcw, Symbol sym) 68 { return new GridChoice(gcw, sym); } 69 ~GridChoice(); 70 71 virtual void initialize(); getFormalName()72 virtual const char* getFormalName() { 73 return "Grid or Scattered file (General Array Format)"; 74 } getInformalName()75 virtual const char* getInformalName() { return "Grid"; } getFileExtension()76 virtual const char* getFileExtension() { return ""; } getImportType()77 virtual const char* getImportType() { return "general"; } getActiveHelpMsg()78 virtual const char* getActiveHelpMsg() 79 { return "Any flat file, ascii or binary"; } sendDataFile()80 virtual boolean sendDataFile() { return FALSE; } 81 virtual boolean canHandle(const char* ext); 82 virtual boolean prompter(); 83 virtual boolean simplePrompter(); 84 virtual void setCommandActivation (boolean file_checked=FALSE); 85 virtual boolean visualize(); 86 virtual boolean verify(const char* seek = NUL(char*)); usesPrompter()87 virtual boolean usesPrompter() { return TRUE; } 88 virtual boolean retainsControl(const char* new_file); 89 90 boolean setGridType(); 91 boolean usePositions(); 92 getClassName()93 const char * getClassName() { 94 return ClassGridChoice; 95 } 96 97 }; 98 99 #endif // _GRID_CHOICE_H 100 101