Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#ifndef EDITOR_COMMANDS_H
#define EDITOR_COMMANDS_H
#include "Command.h"
#include "EditorDataController.h"
#include "EditorTextViewCont.h"
class EditorCommand: public Command
{
public:
typedef EditorDataController EDC;
EditorCommand(EditorDataController *edc, FormatterInterface *formatter);
~EditorCommand();
protected:
EditorDataController *edc;
FormatterInterface *formatter;
int row, col;
};
class BackspaceCommand: public EditorCommand
{
public:
BackspaceCommand(EDC *edc, FormatterInterface *formatter);
void Execute();
void UnExecute();
private:
enum DType {
DUD,
NEWLINE,
STANDARD,
};
DType mode;
int record;
};
class DeleteCommand: public EditorCommand
{
public:
DeleteCommand(EDC *edc, FormatterInterface *formatter);
void Execute();
void UnExecute();
private:
enum DType {
DUD,
ENDOFLINE,
MIDDLEOFLINE,
};
DType mode;
char record;
};
class InsertCommand: public EditorCommand
{
public:
InsertCommand(EDC *edc, FormatterInterface *formatter, char c);
void Execute();
void UnExecute();
private:
char c;
};
class NewLineCommand: public EditorCommand
{
public:
NewLineCommand(EDC *edc, FormatterInterface *formatter);
void Execute();
void UnExecute();
};
#endif /* EDITOR_COMMANDS_H */