4 * $XConsortium: NoOpCmd.h /main/3 1995/11/06 16:10:29 rswiston $
6 * RESTRICTED CONFIDENTIAL INFORMATION:
8 * The information in this document is subject to special
9 * restrictions in a confidential disclosure agreement between
10 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
11 * document outside HP, IBM, Sun, USL, SCO, or Univel without
12 * Sun's specific written approval. This document and all copies
13 * and derivative works thereof must be returned or destroyed at
16 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
21 ///////////////////////////////////////////////////////////////////////////////
22 //////////////////////////////////////////////////////////////////////////////
23 // This example code is from the book:
25 // Object-Oriented Programming with C++ and OSF/Motif
28 // Prentice Hall, 1992
31 // Copyright 1991 by Prentice Hall
32 // All Rights Reserved
34 // Permission to use, copy, modify, and distribute this software for
35 // any purpose except publication and without fee is hereby granted, provided
36 // that the above copyright notice appear in all copies of the software.
37 ///////////////////////////////////////////////////////////////////////////////
38 //////////////////////////////////////////////////////////////////////////////
41 /////////////////////////////////////////////////////////////
42 // NoOpCmd.h: Example, dummy command class
43 /////////////////////////////////////////////////////////////
48 #include "AskFirstCmd.h"
49 #include "InfoDialogManager.h"
51 class NoOpCmd : public Cmd {
56 virtual void undoit();
57 // virtual void okCallback(void *);
61 NoOpCmd ( char *, char *, int );
62 virtual const char *const className () { return "NoOpCmd"; }
65 class LabelCmd: public Cmd {
68 #ifdef CAN_INLINE_VIRTUALS
69 virtual void doit() {}
70 virtual void undoit() {}
71 #else /* ! CAN_INLINE_VIRTUALS */
73 virtual void undoit();
74 #endif /* ! CAN_INLINE_VIRTUALS */
77 LabelCmd ( char *name, char *label, int active) :Cmd(name, label, active){}
78 #ifdef CAN_INLINE_VIRTUALS
80 virtual const char *const className () { return "LabelCmd"; }
81 #else /* CAN_INLINE_VIRTUALS */
83 virtual const char *const className ();
84 #endif /* CAN_INLINE_VIRTUALS */