00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef COMMAND_H
00036 #define COMMAND_H
00037
00038 #include "Inform.h"
00039 class CommandQueue;
00040
00045 class Command {
00046 public:
00047
00048
00049
00050 enum Cmdtype {
00051 ROTMAT, ROTATE, TRANSLATE, SCALE, ROCKON, ROCKOFF, STOPROT,
00052 ANIM_DIRECTION, ANIM_JUMP, ANIM_SKIP, ANIM_STYLE, ANIM_SPEED,
00053 ANIM_READ, ANIM_WRITE, ANIM_DELETE, ANIM_DUP, ANIM_NEW_FRAME,
00054 ANIM_NEW_NUM_FRAMES,
00055 ATOMSEL_ADDMACRO, ATOMSEL_DELMACRO,
00056 COLOR_NAME, COLOR_CHANGE, COLOR_SCALE_METHOD, COLOR_SCALE_SETTINGS,
00057 COLOR_SCALE_COLORS,
00058 COLOR_ADD_ITEM,
00059 DISP_BACKGROUNDGRADIENT,
00060 DISP_RESETVIEW, DISP_STEREO, DISP_STEREOSWAP,
00061 DISP_CACHEMODE, DISP_RENDERMODE,
00062 DISP_PROJ, DISP_EYESEP,
00063 DISP_FOCALLEN, DISP_LIGHT_ON, DISP_LIGHT_HL, DISP_LIGHT_ROT,
00064 DISP_LIGHT_MOVE, DISP_FPS,
00065 DISP_CLIP, DISP_DEPTHCUE, DISP_CULLING,
00066 DISP_ANTIALIAS, CMD_AXES, CMD_STAGE,
00067 DISP_SCRHEIGHT, DISP_SCRDIST,
00068 DISP_CUESTART, DISP_CUEEND, DISP_CUEDENSITY, DISP_CUEMODE,
00069 DISP_SHADOW,
00070 DISP_AO, DISP_AO_AMBIENT, DISP_AO_DIRECT,
00071 DISP_DOF, DISP_DOF_FNUMBER, DISP_DOF_FOCALDIST,
00072 IMD_ATTACH, IMD_SIM, IMD_RATE, IMD_COPYUNITCELL,
00073 INTERP_EVENT,
00074 LABEL_ADD, LABEL_ADDSPRING, LABEL_SHOW, LABEL_DELETE,
00075 LABEL_TEXTSIZE, LABEL_TEXTTHICKNESS, LABEL_TEXTOFFSET, LABEL_TEXTFORMAT,
00076 MATERIAL_ADD, MATERIAL_RENAME, MATERIAL_CHANGE,
00077 MATERIAL_DELETE, MATERIAL_DEFAULT,
00078 MENU_SHOW, MENU_TK_ADD, MENU_TK_REMOVE,
00079 MOL_NEW, MOL_DEL, MOL_ACTIVE, MOL_FIX, MOL_ON, MOL_TOP,
00080 MOL_SELECT, MOL_REP, MOL_COLOR, MOL_ADDREP, MOL_DELREP,
00081 MOL_MODREPITEM, MOL_MODREP, MOL_MATERIAL, MOL_CANCEL,
00082 MOL_REANALYZE, MOL_BONDRECALC, MOL_SSRECALC,
00083 MOL_REPSELUPDATE, MOL_REPCOLORUPDATE, MOL_DRAWFRAMES,
00084 MOL_SHOWPERIODIC, MOL_NUMPERIODIC, MOL_SCALEMINMAX, MOL_SMOOTHREP,
00085 MOL_VOLUME, MOL_RENAME,
00086 MOL_SHOWREP,
00087 MOUSE_MODE,
00088 PICK_EVENT, PLUGIN_UPDATE,
00089 RENDER, RENDER_OPTION,
00090 MOBILE_MODE, SPACEBALL_MODE,
00091 TOOL_CREATE, TOOL_CHANGE, TOOL_DELETE, TOOL_SCALE, TOOL_SCALE_FORCE,
00092 TOOL_SCALE_SPRING,
00093 TOOL_OFFSET, TOOL_REP,
00094 TOOL_ADD_DEVICE, TOOL_DELETE_DEVICE, TOOL_CALLBACK,
00095 TOTAL
00096 };
00097
00098 private:
00099 Cmdtype mytype;
00100 int hasTextCmd;
00101
00102 protected:
00104 Inform *cmdText;
00105
00108 virtual void create_text() {
00109 hasTextCmd = 0;
00110 }
00111
00112 public:
00116 Command(Cmdtype newtype)
00117 : mytype(newtype), hasTextCmd(1), cmdText((Inform *) 0) {}
00118
00120 virtual ~Command() {}
00121
00124 int has_text(Inform *str) {
00125 cmdText = str;
00126 create_text();
00127 return hasTextCmd;
00128 }
00129
00131 Cmdtype gettype() {
00132 return mytype;
00133 }
00134 };
00135
00136 #endif
00137