66 lines
1.5 KiB
C++
66 lines
1.5 KiB
C++
#ifndef MD_CHARGUI
|
|
#define MD_CHARGUI
|
|
|
|
#define MAX_CMDS 20
|
|
|
|
typedef
|
|
struct {
|
|
int name;
|
|
char *s;
|
|
}
|
|
eppArgDef;
|
|
|
|
class mdCommander {
|
|
|
|
bool acceptingInput,deleted[MAX_CMDS];
|
|
int activeCommands, argsNow[MAX_CMDS], cmdNow, cmdsNow, mdStdDevIdx;
|
|
int row,col, thisArg;
|
|
int commandsNow[MAX_CMDS]; // type index into cmdNames
|
|
eppArgDef *commandArgs[MAX_CMDS][MAX_CMD_ARGS];
|
|
char wwork[1024];
|
|
|
|
public:
|
|
|
|
mdCommander() {mdStdDevIdx=0; cmdsNow=0; cmdNow = 0;
|
|
memset(commandArgs,0,sizeof(commandArgs));
|
|
}
|
|
~mdCommander() {}
|
|
|
|
void say(char *what) ;
|
|
|
|
void acMainMenu();
|
|
void check(bool run);
|
|
void create(bool run);
|
|
void doHeader();
|
|
void driver();
|
|
void getArgStringsByType();
|
|
void eppMainMenu();
|
|
void flushCommand(int which,bool allowsZero);
|
|
void greet();
|
|
void help();
|
|
void info(bool run);
|
|
bool isValidCmd(int which,bool isX)
|
|
{ if (which == 0 && !isX) return false;
|
|
if (which > cmdsNow) return false;
|
|
if (!isX && which < 1) return false;
|
|
if (which && deleted[which-1]) return false;
|
|
return true;
|
|
}
|
|
void poll(bool run);
|
|
void prompt(bool forStrings);
|
|
void queryTransfer(bool run);
|
|
void renew(bool run);
|
|
int selectArg();
|
|
void sendCommand(int which);
|
|
void showCommand(bool all);
|
|
void trash(bool run);
|
|
void transfer(bool run);
|
|
void update(bool run);
|
|
|
|
bool editingCommand(bool run);
|
|
bool runCommand(bool all);
|
|
|
|
};
|
|
|
|
#endif
|