Backspace sends DEL instead of ^H.
[spft.git] / Run.h
blob449f13df2c222e32f25a2a6f0678e8e2acaf68cf
1 #ifndef Run_h
2 #define Run_h
4 #include "Style.h"
7 class Run {
8 public:
9 Run(Style style);
10 Run(char* initial_characters, Style style);
11 // Takes ownership of "initial characters", which must be null-terminated.
12 ~Run();
14 Style style;
15 bool is_tab;
16 const char* bytes() { return characters; }
18 int num_characters();
19 void append_characters(const char* new_chars, int num_bytes);
20 void append_spaces(int num_spaces);
21 void replace_characters(int column, const char* new_chars, int num_bytes);
22 void insert_characters(int column, const char* new_chars, int num_bytes);
24 void shorten_to(int new_length);
25 void delete_first_characters(int num_chars);
26 void delete_characters(int column, int num_chars);
28 protected:
29 char* characters;
33 #endif // !Run_h