| 1 |
#if defined(Hiro_Console) |
| 2 |
|
| 3 |
namespace hiro { |
| 4 |
|
| 5 |
struct pConsole : pWidget { |
| 6 |
Declare(Console, Widget) |
| 7 |
|
| 8 |
auto print(const string& text) -> void; |
| 9 |
auto reset() -> void override; |
| 10 |
auto setBackgroundColor(Color color) -> void; |
| 11 |
auto setForegroundColor(Color color) -> void; |
| 12 |
auto setPrompt(const string& prompt) -> void; |
| 13 |
|
| 14 |
auto _keyPress(u32 scancode, u32 mask) -> bool; |
| 15 |
auto _seekToEnd() -> void; |
| 16 |
auto _seekToMark() -> void; |
| 17 |
|
| 18 |
GtkWidget* subWidget = nullptr; |
| 19 |
GtkTextBuffer* textBuffer = nullptr; |
| 20 |
string previousPrompt; |
| 21 |
std::vector<string> history; |
| 22 |
u32 historyOffset = 0; |
| 23 |
}; |
| 24 |
|
| 25 |
} |
| 26 |
|
| 27 |
#endif |