12using namespace MaxOS::common;
13using namespace MaxOS::gui;
14using namespace MaxOS::gui::widgets;
15using namespace MaxOS::drivers;
16using namespace MaxOS::drivers::peripherals;
18ButtonEventHandler::ButtonEventHandler() =
default;
20ButtonEventHandler::~ButtonEventHandler() =
default;
30 switch (
event->type) {
32 case ButtonEvents::PRESSED:
36 case ButtonEvents::RELEASED:
72:
Widget(left, top, width, height),
73 background_colour(
Colour(0xFF, 0xFF, 0xFF)),
74 foreground_colour(
Colour(0x00, 0x00, 0x00)),
75 border_colour(
Colour(0x57, 0x57, 0x57)),
82Button::~Button() =
default;
203ButtonReleasedEvent::~ButtonReleasedEvent() =
default;
215ButtonPressedEvent::~ButtonPressedEvent() =
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< ButtonEvents > * > raise_event(Event< ButtonEvents > *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.
Handles events that are triggered by the mouse driver.
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