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 #ifndef _NoUndoEditorCommand_h 16 #define _NoUndoEditorCommand_h 17 18 19 #include "NoUndoCommand.h" 20 21 typedef long EditorCommandType; 22 typedef long EditorUndoType; 23 24 // 25 // Class name definition: 26 // 27 #define ClassNoUndoEditorCommand "NoUndoEditorCommand" 28 29 class EditorWindow; 30 31 // 32 // NoUndoEditorCommand class definition: 33 // 34 class NoUndoEditorCommand : public NoUndoCommand 35 { 36 37 protected: 38 // 39 // Protected member data: 40 // 41 EditorWindow *editor; 42 EditorCommandType commandType; 43 EditorUndoType undoType; 44 45 virtual boolean doIt(CommandInterface *ci); 46 47 public: 48 // 49 // Constructor: 50 // 51 NoUndoEditorCommand(const char* name, 52 CommandScope *scope, 53 boolean active, 54 EditorWindow *editor, 55 EditorCommandType comType, 56 EditorUndoType undoType=AffectsUndo); 57 58 // 59 // Destructor: 60 // ~NoUndoEditorCommand()61 ~NoUndoEditorCommand(){} 62 63 // 64 // Each command has a potential impact on EditorWindow's undo stack. 65 // There are really 2 bits in this mask with 3 possible values. 66 // Inside the doit(), we'll call on EditorWindow to (maybe) rollback 67 // its undo stack. 68 // 69 enum { 70 Ignore = 0, // example: print 71 CanBeUndone = 1, // example: move a standIn 72 AffectsUndo = 2, // example: delete a node or remove a tab 73 }; 74 75 // 76 // These are the various operations that the NoUndoEditorCommand can 77 // implement on behalf of an editor . 78 // 79 enum { 80 ShowConfiguration, // Open configuration dialog box... 81 SelectAll, // Select all nodes... 82 DeselectAll, // Deselect all nodes... 83 AddInputTab, // Add repeatable tabs to a node 84 RemoveInputTab, // Remove repeatable tabs from a node 85 AddOutputTab, // Add repeatable tabs to a node 86 RemoveOutputTab, // Remove repeatable tabs from a node 87 SelectDownward, // Select all down stream nodes 88 SelectUpward, // Select all up stream nodes 89 SelectConnected, // Select all connected nodes 90 SelectUnconnected, // Select all unconnected nodes 91 SelectUnselected, // Select all unselected nodes 92 NewControlPanel, // Open a new control panel. 93 EditComment, // Edit the network comment 94 EditMacroName, // Edit the network name 95 Macroify, // Make the selected nodes into a macro 96 OpenFindTool, // Open the find tool dialog 97 HideAllTabs, // Hide hideable tabs 98 RevealAllTabs, // Reveal hidden tabs 99 OpenGrid, // Open the grid dialog 100 OpenControlPanel, // Open selected interactor nodes. 101 SetPanelGroup, // Open the dialog to set panel group. 102 SetCPAccess, // Open the dialog to set panel Access. 103 CreateProcessGroup, // Open Process Group creating dialog. 104 OpenSelectedColormaps, // Open the Selected Colormaps 105 OpenSelectedMacros, // Open the Selected Macros 106 OpenSelectedImageWindows, // Open the Selected Images 107 AssignProcessGroup, // Open Process Group assignment dialog. 108 PrintProgram, // Print the program in postscript 109 SetOutputsNotCached, // All outputs of selected nodes to uncached 110 SetOutputsFullyCached, // All outputs of selected nodes to cached 111 SetOutputsCacheOnce, // All outputs of selected nodes to cache last 112 ShowOutputsNotCached, // Show nodes that are not cached. 113 ShowOutputsFullyCached, // Show nodes that are cached. 114 ShowOutputsCacheOnce, // Show nodes that are cached once. 115 OptimizeOutputCacheability, // Set cachability optimally. 116 InsertNetwork, // merge a new network into vpe 117 ShowExecutedNodes, // Change the label color of executed standins 118 #ifndef FORGET_GETSET 119 ToGlobal, // Convert Get/Set modules to Local or Global 120 ToLocal, 121 SelectedToGlobal, 122 SelectedToLocal, 123 PostGetSet, 124 #endif 125 CutNode, // Edit/Cut 126 CopyNode, // Edit/Copy 127 PasteNode, // Edit/Paste 128 AddAnnotation, // Edit/Add Annotation 129 #if WORKSPACE_PAGES 130 Pagify, // Create a new vpe page 131 PagifySelected, // Create a new vpe page including selected tools 132 AutoChopSelected, // Separate selected using Transmitters/Receivers 133 AutoFuseSelected, // Replace matching Transmitters/Receivers with arcs 134 DeletePage, // Delete a vpe page 135 ConfigurePage, // Change the name,postscript,position 136 MoveSelected, // Move selected tools to a new page 137 #endif 138 JavifyNetwork, 139 UnjavifyNetwork, 140 HitDetection, // change a resource in in the Workspace widget 141 ReflowGraph, // Layout the entire graph automatically 142 Undo, // undo movements in the canvas 143 SaveAsCCode 144 }; 145 // 146 // Returns a pointer to the class name. 147 // getClassName()148 const char* getClassName() 149 { 150 return ClassNoUndoEditorCommand; 151 } 152 }; 153 154 155 #endif // _NoUndoEditorCommand_h 156