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 #include "../base/defines.h" 11 12 13 14 15 16 #ifndef _NoUndoNetworkCommand_h 17 #define _NoUndoNetworkCommand_h 18 19 20 #include "NoUndoCommand.h" 21 22 typedef long NetworkCommandType; 23 24 // 25 // Class name definition: 26 // 27 #define ClassNoUndoNetworkCommand "NoUndoNetworkCommand" 28 29 class Network; 30 31 // 32 // NoUndoNetworkCommand class definition: 33 // 34 class NoUndoNetworkCommand : public NoUndoCommand 35 { 36 37 protected: 38 // 39 // Protected member data: 40 // 41 Network *network; 42 NetworkCommandType commandType; 43 44 virtual boolean doIt(CommandInterface *ci); 45 46 public: 47 // 48 // Constructor: 49 // 50 NoUndoNetworkCommand(const char* name, 51 CommandScope *scope, 52 boolean active, 53 Network *n, 54 NetworkCommandType comType); 55 56 // 57 // Destructor: 58 // ~NoUndoNetworkCommand()59 ~NoUndoNetworkCommand(){} 60 61 // 62 // These are the various operations that the NoUndoNetworkCommand can 63 // implement on behalf of a control panel. 64 // 65 enum { 66 HelpOnNetwork, // Display help on the network. 67 SetNetworkName, // Set the name of the network. 68 SaveNetwork, // Save the network with current name. 69 SaveNetworkAs, // Save network with new name. 70 OpenConfiguration, // 71 SaveConfiguration // 72 }; 73 74 // 75 // Only activate the save and SaveAs commands when theDXApplication 76 // allows saving networks as defined by appAllowsSavingNetFile() 77 // 78 virtual void activate(); 79 80 // 81 // Returns a pointer to the class name. 82 // getClassName()83 const char* getClassName() 84 { 85 return ClassNoUndoNetworkCommand; 86 } 87 }; 88 89 90 #endif // _NoUndoNetworkCommand_h 91