4 * $TOG: NoOpCmd.C /main/5 1998/07/24 16:06:19 mgreess $
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.C: Example, dummy command class
43 //////////////////////////////////////////////////////////
45 #include "EUSDebug.hh"
47 #include "Application.h"
49 void okCallback (void *);
51 NoOpCmd::NoOpCmd ( char *name,
53 int active ) : Cmd ( name, label, active )
60 // Just print a message that allows us to trace the execution
62 char *buf = new char[1024];
65 tmpName = (char *) name();
67 sprintf(buf, "%s : Sorry, not implemented.", tmpName);
69 theInfoDialogManager->post(tmpName, buf, (void *) this,
72 // this->setQuestion(buf);
78 // cout << name() << ":" << "doit\n" << flush;
81 void NoOpCmd::undoit()
83 // Just print a message that allows us to trace the execution
85 DebugPrintf(1, "%s:\n", name());
89 void okCallback( void *)
94 #ifndef CAN_INLINE_VIRTUALS
95 LabelCmd::~LabelCmd(void)
106 LabelCmd::undoit(void)
112 LabelCmd::className(void)
116 #endif /* ! CAN_INLINE_VIRTUALS */