00001 /*************************************************************************** 00002 *cr 00003 *cr (C) Copyright 1995-2019 The Board of Trustees of the 00004 *cr University of Illinois 00005 *cr All Rights Reserved 00006 *cr 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * RCS INFORMATION: 00011 * 00012 * $RCSfile: CmdMenu.h,v $ 00013 * $Author: johns $ $Locker: $ $State: Exp $ 00014 * $Revision: 1.33 $ $Date: 2019/01/17 21:20:58 $ 00015 * 00016 *************************************************************************** 00017 * DESCRIPTION: 00018 * The menu commands are defined here. These tell the app to turn a 00019 * menu on or off; to move a menu; or print the cooordinates of a menu 00020 * to infoMsg. A "menu" is a UIObject that has a window. 00021 * 00022 ***************************************************************************/ 00023 #ifndef CMDMENU_H 00024 #define CMDMENU_H 00025 00026 #include "Command.h" 00027 #include "utilities.h" 00028 00030 class CmdMenuShow : public Command { 00031 public: 00032 int turnOn; // if T, turn on; if F, turn off 00033 char *menuname; // name of menu to switch 00034 00035 protected: 00036 virtual void create_text(void); 00037 00038 public: 00039 CmdMenuShow(const char *name, int turnon); 00040 ~CmdMenuShow(void); 00041 }; 00042 00043 00045 class CmdMenuExtensionAdd : public Command { 00046 public: 00047 char *name; 00048 char *menupath; 00049 CmdMenuExtensionAdd(const char *aName, const char *aPath) 00050 : Command(Command::MENU_TK_ADD) { 00051 name = stringdup(aName); 00052 menupath = stringdup(aPath); 00053 } 00054 ~CmdMenuExtensionAdd() { 00055 delete [] name; 00056 delete [] menupath; 00057 } 00058 }; 00059 00061 class CmdMenuExtensionRemove : public Command { 00062 public: 00063 char *name; 00064 CmdMenuExtensionRemove(const char *aName) 00065 : Command(Command::MENU_TK_REMOVE) { 00066 name = stringdup(aName); 00067 } 00068 ~CmdMenuExtensionRemove() { 00069 delete [] name; 00070 } 00071 }; 00072 00073 #endif 00074 00075