![]() |
Max OS 0.3
|
Driver for the text mode console, handles the printing of characters and strings to the screen using VGA. More...
#include <textmode.h>
Public Member Functions | |
| uint16_t | width () final |
| Gets the width of the console. | |
| uint16_t | height () final |
| Gets the height of the console. | |
| void | put_character (uint16_t x, uint16_t y, char c) final |
| Places a character at the specified location if it is in bounds. | |
| void | set_foreground_color (uint16_t x, uint16_t y, common::ConsoleColour) final |
| Sets the foreground color at the specified location. | |
| void | set_background_color (uint16_t x, uint16_t y, common::ConsoleColour) final |
| Sets the background color at the specified location. | |
| char | get_character (uint16_t x, uint16_t y) final |
| Gets the character at the specified location. | |
| common::ConsoleColour | get_foreground_color (uint16_t x, uint16_t y) final |
| Gets the foreground color at the specified location. | |
| common::ConsoleColour | get_background_color (uint16_t x, uint16_t y) final |
| Gets the background color at the specified location. | |
Public Member Functions inherited from MaxOS::drivers::Driver | |
| virtual void | activate () |
| Activate the driver. | |
| virtual void | deactivate () |
| Deactivate the driver. | |
| virtual void | initialise () |
| Initialise the driver. | |
| virtual uint32_t | reset () |
| Reset the driver. | |
| virtual string | vendor_name () |
| Get who created the device. | |
| virtual string | device_name () |
| Get the device name of the driver. | |
Public Member Functions inherited from MaxOS::drivers::console::Console | |
| virtual void | put_character (uint16_t x, uint16_t y, char c, common::ConsoleColour foreground, common::ConsoleColour background) |
| Put a character on the console with a given foreground and background color. | |
| virtual void | put_string (uint16_t x, uint16_t y, string s, common::ConsoleColour foreground=common::ConsoleColour::LightGrey, common::ConsoleColour background=common::ConsoleColour::Black) |
| Put a string on the console. | |
| virtual void | scroll_up () |
| Scroll the entire console up by 1 line. | |
| virtual void | scroll_up (uint16_t left, uint16_t top, uint16_t width, uint16_t height, common::ConsoleColour foreground=common::ConsoleColour::LightGrey, common::ConsoleColour background=common::ConsoleColour::Black, char fill=' ') |
| Scroll an area of the console up by 1 line. | |
| virtual void | clear () |
| virtual void | clear (uint16_t left, uint16_t top, uint16_t width, uint16_t height, common::ConsoleColour foreground=common::ConsoleColour::LightGrey, common::ConsoleColour background=common::ConsoleColour::Black, char fill=' ') |
| Clear an area of the console. | |
| virtual void | invert_colors (uint16_t x, uint16_t y) |
| Invert the colors of a character on the console. | |
Driver for the text mode console, handles the printing of characters and strings to the screen using VGA.
Definition at line 23 of file textmode.h.
|
finalvirtual |
Gets the background color at the specified location.
| x | The x coordinate |
| y | The y coordinate |
Reimplemented from MaxOS::drivers::console::Console.
Definition at line 145 of file textmode.cpp.
Gets the character at the specified location.
| x | The x coordinate |
| y | The y coordinate |
Reimplemented from MaxOS::drivers::console::Console.
Definition at line 105 of file textmode.cpp.
|
finalvirtual |
Gets the foreground color at the specified location.
| x | The x coordinate |
| y | The y coordinate |
Reimplemented from MaxOS::drivers::console::Console.
Definition at line 125 of file textmode.cpp.
|
finalvirtual |
Gets the height of the console.
Reimplemented from MaxOS::drivers::console::Console.
Definition at line 34 of file textmode.cpp.
Referenced by get_background_color(), get_character(), get_foreground_color(), put_character(), set_background_color(), and set_foreground_color().
Places a character at the specified location if it is in bounds.
| x | The x coordinate |
| y | The y coordinate |
| c | The character to place |
Reimplemented from MaxOS::drivers::console::Console.
Definition at line 45 of file textmode.cpp.
|
finalvirtual |
Sets the background color at the specified location.
| x | The x coordinate |
| y | The y coordinate |
| background | The background color |
Reimplemented from MaxOS::drivers::console::Console.
Definition at line 85 of file textmode.cpp.
|
finalvirtual |
Sets the foreground color at the specified location.
| x | The x coordinate |
| y | The y coordinate |
| foreground | The foreground color |
Reimplemented from MaxOS::drivers::console::Console.
Definition at line 65 of file textmode.cpp.
|
finalvirtual |
Gets the width of the console.
Reimplemented from MaxOS::drivers::console::Console.
Definition at line 25 of file textmode.cpp.
Referenced by get_background_color(), get_character(), get_foreground_color(), put_character(), set_background_color(), and set_foreground_color().