First steps of implementing command-line processing in the ascii driver.
This commit is contained in:
@@ -28,15 +28,19 @@ public:
|
||||
void set_print_callback(print_callback cb);
|
||||
|
||||
// change the prompt.
|
||||
void set_prompt(const std::u32string &prompt);
|
||||
void set_prompt(std::string_view prompt);
|
||||
|
||||
// Use this to print anything on the console.
|
||||
void print(const std::u32string &cps);
|
||||
//
|
||||
// if the string doesn't end in a newline, one will
|
||||
// be automatically added.
|
||||
//
|
||||
void printline(std::string_view cps);
|
||||
|
||||
// Whenever the user types a character, call 'putcode'. If the code is
|
||||
// newline, this returns the line of text that was entered, including the
|
||||
// newline. Otherwise returns empty string. Backspace is handled here.
|
||||
std::u32string putcode(char32_t codepoint);
|
||||
std::string putcode(char32_t codepoint);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user