13using namespace MaxOS::common;
14using namespace MaxOS::gui;
15using namespace MaxOS::gui::widgets;
16using namespace MaxOS::drivers::peripherals;
18InputBoxEventHandler::InputBoxEventHandler() =
default;
20InputBoxEventHandler::~InputBoxEventHandler() =
default;
30 switch (
event->type) {
31 case InputBoxEvents::TEXT_CHANGED:
57:
Widget(left, top, width, height),
58 background_colour(
Colour(0xFF, 0xFF, 0xFF)),
59 foreground_colour(
Colour(0x00, 0x00, 0x00)),
60 border_colour(
Colour(0x57, 0x57, 0x57)),
76:
Widget(left, top, width, height),
77 background_colour(
Colour(0xFF, 0xFF, 0xFF)),
78 foreground_colour(
Colour(0x00, 0x00, 0x00)),
79 border_colour(
Colour(0x57, 0x57, 0x57)),
88InputBox::~InputBox() =
default;
184 case KeyCode::backspace: {
192 case KeyCode::deleteKey: {
202 case KeyCode::leftArrow: {
208 case KeyCode::rightArrow: {
298InputBoxTextChangedEvent::~InputBoxTextChangedEvent() =
default;
Defines the Amiga system font used in the GUI.
Stores the red, green, blue and alpha values of a colour. Can be parsed from a hex string,...
Vector< Event< InputBoxEvents > * > raise_event(Event< InputBoxEvents > *event)
Calls the on_event function of all the event m_handlers connected to the event manager and returns a ...
Used to store information about an event, has a type and a return value.
Draws pixels to the screen, and handles drawing lines, rectangles and circles.
Stores the left, top, width and height of a rectangle.
Type height
The height of the rectangle.
Type top
The top coordinate of the rectangle.
bool intersects(const Rectangle< Type > &)
Type left
The left coordinate of the rectangle.
Type width
The width of the rectangle.
Holds the state of the keyboard.
virtual void draw_text(int32_t x, int32_t y, common::Colour foreground_colour, common::Colour background_colour, common::GraphicsContext *context, string text)
write the entire text to the screen
Event that is triggered when the text in an input box is changed.
InputBoxTextChangedEvent(const string &)
Construct a new Input Box Text Changed Event object.
KeyCode
A mapping of key codes to their values.