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 _NoUndoPanelCommand_h
16 #define _NoUndoPanelCommand_h
17 
18 
19 #include "NoUndoCommand.h"
20 
21 typedef long PanelCommandType;
22 
23 //
24 // Class name definition:
25 //
26 #define ClassNoUndoPanelCommand	"NoUndoPanelCommand"
27 
28 class   ControlPanel;
29 
30 //
31 // NoUndoPanelCommand class definition:
32 //
33 class NoUndoPanelCommand : public NoUndoCommand
34 {
35 
36   protected:
37     //
38     // Protected member data:
39     //
40     ControlPanel *controlPanel;
41     PanelCommandType commandType;
42 
43     virtual boolean doIt(CommandInterface *ci);
44 
45   public:
46     //
47     // Constructor:
48     //
49     NoUndoPanelCommand(const char*   name,
50                    CommandScope  *scope,
51                    boolean       active,
52 		   ControlPanel  *cp,
53 		   PanelCommandType comType);
54 
55     //
56     // Destructor:
57     //
~NoUndoPanelCommand()58     ~NoUndoPanelCommand(){}
59 
60     //
61     // These are the various operations that the NoUndoPanelCommand can
62     // implement on behalf of a control panel.
63     //
64     enum {
65 	AddInteractors		= 1,	// Add Selected Interactors
66 	ShowInteractors		= 2,	// Show Selected Interactors
67 	DeleteInteractors	= 3,	// Delete selected interactors
68 	SetInteractorAttributes = 4,	// Set Attributes of Selected interactor
69 	SetInteractorLabel	= 5,	// Set the selected interactors label
70 	SetPanelComment		= 6,	// Set the control panel comment
71 	SetPanelName 		= 7,	// Set the control panel name
72 	SetPanelGrid		= 8,	// Manipulate the grid settings
73 #if 0
74 	TogglePanelStartup	= 9,	// Flip startup state of panel on/off
75 #endif
76 #if 00
77 	OpenFile		= 10,	// Open a cfg file
78 	SaveFile		= 11,   // Save a cfg file
79 #endif
80 	SetHorizontalLayout	= 12,	// Change the Layout of an interactor
81 	SetVerticalLayout	= 13,   // Change the Layout of an interactor
82 	SetPanelAccess		= 14,   // Pop up the PanelAccessDialog
83 	ShowStandIns		= 15,	// Show the Selected Interactor's Node
84 	HelpOnPanel		= 16,	// Display help on this panel.
85 	TogglePanelStyle	= 17,	// Toggle between user/developer mode
86 	HitDetection		= 18 	// Toggle a Workspace widget resource
87     };
88     //
89     // Returns a pointer to the class name.
90     //
getClassName()91     const char* getClassName()
92     {
93 	return ClassNoUndoPanelCommand;
94     }
95 };
96 
97 
98 #endif // _NoUndoPanelCommand_h
99