Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtmail / dtmail / NoOpCmd.h
1 /*
2  *+SNOTICE
3  *
4  *      $XConsortium: NoOpCmd.h /main/3 1995/11/06 16:10:29 rswiston $
5  *
6  *      RESTRICTED CONFIDENTIAL INFORMATION:
7  *      
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
14  *      Sun's request.
15  *
16  *      Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
17  *
18  *+ENOTICE
19  */
20
21 ///////////////////////////////////////////////////////////////////////////////
22 //////////////////////////////////////////////////////////////////////////////
23 //         This example code is from the book:
24 //
25 //           Object-Oriented Programming with C++ and OSF/Motif
26 //         by
27 //           Douglas Young
28 //           Prentice Hall, 1992
29 //           ISBN 0-13-630252-1 
30 //
31 //         Copyright 1991 by Prentice Hall
32 //         All Rights Reserved
33 //
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 //////////////////////////////////////////////////////////////////////////////
39
40
41 /////////////////////////////////////////////////////////////
42 // NoOpCmd.h: Example, dummy command class
43 /////////////////////////////////////////////////////////////
44 #ifndef NOOPCMD_H
45 #define NOOPCMD_H
46
47 #include "Cmd.h"
48 #include "AskFirstCmd.h"
49 #include "InfoDialogManager.h"
50
51 class NoOpCmd : public Cmd {
52     
53   protected:
54     
55     virtual void doit();   
56     virtual void undoit(); 
57 //    virtual void okCallback(void *);
58
59   public:
60     
61     NoOpCmd ( char *, char *, int );
62     virtual const char *const className () { return "NoOpCmd"; }
63 };
64
65 class LabelCmd: public Cmd {
66 protected:
67
68 #ifdef CAN_INLINE_VIRTUALS
69     virtual void doit() {}
70     virtual void undoit() {}
71 #else /* ! CAN_INLINE_VIRTUALS */
72     virtual void doit();
73     virtual void undoit();
74 #endif /* ! CAN_INLINE_VIRTUALS */
75
76 public:
77     LabelCmd ( char *name, char *label, int active) :Cmd(name, label, active){}
78 #ifdef CAN_INLINE_VIRTUALS
79     virtual ~LabelCmd(){}
80     virtual const char *const className () { return "LabelCmd"; }
81 #else /* CAN_INLINE_VIRTUALS */
82     ~LabelCmd();
83     virtual const char *const className ();
84 #endif /* CAN_INLINE_VIRTUALS */
85 };
86
87 #endif