13using namespace MaxOS::common;
14using namespace MaxOS::gui;
15using namespace MaxOS::gui::widgets;
27:
Widget(left, top, width, height),
29 foreground_colour(
Colour(0, 0, 0)),
30 background_colour(
Colour(255, 255, 255))
37Text::~Text() =
default;
72 m_widget_text.copy(new_text);
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,...
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.
Type left
The left coordinate of the rectangle.
Type width
The width of the rectangle.
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
common::Colour foreground_colour
The colour of the text characters.
void draw(common::GraphicsContext *gc, common::Rectangle< int32_t > &area) override
Draw the text on the screen.
common::Colour background_colour
The colour to draw behind the text characters.
void update_text(const string &)
Update the text of the widget.
gui::Font font
The font to use for the text.
Text(int32_t left, int32_t top, uint32_t width, uint32_t height, const string &text)
Construct a new Text object at a specific position and size with text.
Defines a Text widget for displaying text in the GUI.