![]() |
Max OS 0.3
|
Abstract class for a console, allows for the printing of characters and strings with colours. More...
#include <console.h>
Public Member Functions | |
| virtual uint16_t | width () |
| Get the width of the console in characters. | |
| virtual uint16_t | height () |
| Get the height of the console in characters. | |
| virtual void | put_character (uint16_t x, uint16_t y, char c) |
| Put a character on the console. | |
| virtual char | get_character (uint16_t x, uint16_t y) |
| Get the character at a given coordinate on the console. | |
| virtual void | set_foreground_color (uint16_t x, uint16_t y, common::ConsoleColour foreground) |
| Set the foreground color of a character on the console. | |
| virtual void | set_background_color (uint16_t x, uint16_t y, common::ConsoleColour background) |
| Set the background color of a character on the console. | |
| virtual common::ConsoleColour | get_foreground_color (uint16_t x, uint16_t y) |
| Get the background color of a character on the console. | |
| virtual common::ConsoleColour | get_background_color (uint16_t x, uint16_t y) |
| Get the background color of a character on the 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. | |
Abstract class for a console, allows for the printing of characters and strings with colours.
|
virtual |
Clear the entire console
Definition at line 175 of file console.cpp.
References clear(), height(), and width().
Referenced by clear(), and MaxOS::drivers::console::VESABootConsole::VESABootConsole().
|
virtual |
Clear an area of the console.
| left | The left coordinate of the area to clear |
| top | The top coordinate of the area to clear |
| width | The m_width of the area to clear |
| height | The m_height of the area to clear |
| foreground | The foreground color of the area |
| background | The background color of the area |
| fill | The character to fill the area with |
Definition at line 192 of file console.cpp.
References height(), put_character(), and width().
|
virtual |
Get the background color of a character on the console.
| x | The x coordinate of the character |
| y | The y coordinate of the character |
Reimplemented in MaxOS::drivers::console::TextModeConsole, MaxOS::drivers::console::VESABootConsole, and MaxOS::drivers::console::ConsoleArea.
Definition at line 99 of file console.cpp.
Referenced by MaxOS::drivers::console::ConsoleArea::get_background_color(), invert_colors(), and scroll_up().
Get the character at a given coordinate on the console.
| x | The x coordinate of the character |
| y | The y coordinate of the character |
Reimplemented in MaxOS::drivers::console::TextModeConsole, MaxOS::drivers::console::VESABootConsole, and MaxOS::drivers::console::ConsoleArea.
Definition at line 77 of file console.cpp.
Referenced by MaxOS::drivers::console::ConsoleArea::get_character(), and scroll_up().
|
virtual |
Get the background color of a character on the console.
| x | The x coordinate of the character |
| y | The y coordinate of the character |
Reimplemented in MaxOS::drivers::console::TextModeConsole, MaxOS::drivers::console::VESABootConsole, and MaxOS::drivers::console::ConsoleArea.
Definition at line 88 of file console.cpp.
Referenced by MaxOS::drivers::console::ConsoleArea::get_foreground_color(), invert_colors(), and scroll_up().
|
virtual |
Get the height of the console in characters.
Reimplemented in MaxOS::drivers::console::TextModeConsole, MaxOS::drivers::console::VESABootConsole, and MaxOS::drivers::console::ConsoleArea.
Definition at line 34 of file console.cpp.
Referenced by clear(), clear(), scroll_up(), scroll_up(), and MaxOS::drivers::console::ConsoleStream::write_char().
Invert the colors of a character on the console.
| x | The x coordinate of the character |
| y | The y coordinate of the character |
Definition at line 211 of file console.cpp.
References get_background_color(), get_foreground_color(), set_background_color(), and set_foreground_color().
Put a character on the console.
| x | The x coordinate of the character |
| y | The y coordinate of the character |
| c | The character to put on the console |
Reimplemented in MaxOS::drivers::console::TextModeConsole, MaxOS::drivers::console::ConsoleArea, and MaxOS::drivers::console::VESABootConsole.
Definition at line 45 of file console.cpp.
Referenced by clear(), MaxOS::drivers::console::ConsoleArea::put_character(), put_character(), put_string(), scroll_up(), and MaxOS::drivers::console::ConsoleStream::write_char().
|
virtual |
Put a character on the console with a given foreground and background color.
| x | The x coordinate of the character |
| y | The y coordinate of the character |
| c | The character to put on the console |
| foreground | The foreground color of the character |
| background | The background color of the character |
Definition at line 112 of file console.cpp.
References put_character(), set_background_color(), and set_foreground_color().
|
virtual |
Put a string on the console.
| x | The x coordinate of the string |
| y | The y coordinate of the string |
| string | The string to put on the console |
| foreground | The foreground color of the string |
| background | The background color of the string |
Definition at line 132 of file console.cpp.
References put_character().
|
virtual |
Scroll the entire console up by 1 line.
Reimplemented in MaxOS::drivers::console::ConsoleArea.
Definition at line 142 of file console.cpp.
References height(), scroll_up(), and width().
Referenced by scroll_up(), MaxOS::drivers::console::ConsoleArea::scroll_up(), MaxOS::drivers::console::ConsoleArea::scroll_up(), and MaxOS::drivers::console::ConsoleStream::write_char().
|
virtual |
Scroll an area of the console up by 1 line.
| left | The left coordinate of the area to scroll |
| top | The top coordinate of the area to scroll |
| width | The m_width of the area to scroll |
| height | The m_height of the area to scroll |
| foreground | The foreground color of the new line |
| background | The background color of the new line |
| fill | The character to fill the new line with |
Reimplemented in MaxOS::drivers::console::VESABootConsole, and MaxOS::drivers::console::ConsoleArea.
Definition at line 158 of file console.cpp.
References get_background_color(), get_character(), get_foreground_color(), height(), put_character(), and width().
|
virtual |
Set the background color of a character on the console.
| x | The x coordinate of the character |
| y | The y coordinate of the character |
| background | The background color to set |
Reimplemented in MaxOS::drivers::console::ConsoleArea, MaxOS::drivers::console::TextModeConsole, and MaxOS::drivers::console::VESABootConsole.
Definition at line 66 of file console.cpp.
Referenced by MaxOS::drivers::console::ConsoleArea::ConsoleArea(), invert_colors(), put_character(), and MaxOS::drivers::console::ConsoleArea::set_background_color().
|
virtual |
Set the foreground color of a character on the console.
| x | The x coordinate of the character |
| y | The y coordinate of the character |
| foreground | The foreground color to set |
Reimplemented in MaxOS::drivers::console::ConsoleArea, MaxOS::drivers::console::TextModeConsole, and MaxOS::drivers::console::VESABootConsole.
Definition at line 55 of file console.cpp.
Referenced by MaxOS::drivers::console::ConsoleArea::ConsoleArea(), invert_colors(), put_character(), and MaxOS::drivers::console::ConsoleArea::set_foreground_color().
|
virtual |
Get the width of the console in characters.
Reimplemented in MaxOS::drivers::console::TextModeConsole, MaxOS::drivers::console::VESABootConsole, and MaxOS::drivers::console::ConsoleArea.
Definition at line 25 of file console.cpp.
Referenced by clear(), clear(), scroll_up(), scroll_up(), and MaxOS::drivers::console::ConsoleStream::write_char().