GitOS
Operating system exercise
Loading...
Searching...
No Matches
TextModeGraphics Class Reference

#include <text_mode.hpp>

Inherits Graphics.

Public Member Functions

void print_char (char c) override
 Prints char to screen.
 
void print_char_color (char c, TEXT_MODE_COLOR color) override
 Prints char to screen with specified color.
 
void print_string (const char *str) override
 Prints string to screen.
 
void print_string_color (const char *str, TEXT_MODE_COLOR color) override
 Prints string to screen with specified color.
 
void clear_screen () override
 Clears screen.
 
void set_text_color (TEXT_MODE_COLOR color) override
 Sets new framebuffer color to print.
 
void set_cursor (uint32_t x, uint32_t y) override
 Sets framebuffer cursor to specified values.
 
uint32_t get_cursor_x () override
 
uint32_t get_cursor_y () override
 
TEXT_MODE_COLOR get_current_color () override
 
 ~TextModeGraphics () override
 
- Public Member Functions inherited from Graphics
virtual ~Graphics ()=default
 

Static Public Member Functions

static Graphicsthe ()
 
- Static Public Member Functions inherited from Graphics
static Graphicsthe ()
 

Additional Inherited Members

- Public Types inherited from Graphics
enum  TEXT_MODE_COLOR {
  BLACK , BLUE , GREEN , CYAN ,
  RED , PURPLE , BROWN , GREY ,
  DARK_GREY , LIGHT_BLUE , LIGHT_GREEN , LIGHT_CYAN ,
  LIGHT_RED , LIGHT_PURPLE , YELLOW , WHITE
}
 

Constructor & Destructor Documentation

◆ ~TextModeGraphics()

~TextModeGraphics ( )
inlineoverride

Member Function Documentation

◆ clear_screen()

void clear_screen ( )
overridevirtual

Clears screen.

Implements Graphics.

References memset().

◆ get_current_color()

Graphics::TEXT_MODE_COLOR get_current_color ( )
overridevirtual
Returns
TEXT_MODE_COLORS Current color

Implements Graphics.

◆ get_cursor_x()

uint32_t get_cursor_x ( )
overridevirtual
Returns
int X

Implements Graphics.

◆ get_cursor_y()

uint32_t get_cursor_y ( )
overridevirtual
Returns
int Y

Implements Graphics.

◆ print_char()

void print_char ( char  c)
overridevirtual

Prints char to screen.

Parameters
cCharacter to print

Implements Graphics.

References print_char_color().

◆ print_char_color()

void print_char_color ( char  c,
TEXT_MODE_COLOR  color 
)
overridevirtual

Prints char to screen with specified color.

Parameters
cCharacter to print
colorColor

Implements Graphics.

◆ print_string()

void print_string ( const char *  str)
overridevirtual

Prints string to screen.

Parameters
strString to print

Implements Graphics.

References print_string_color().

◆ print_string_color()

void print_string_color ( const char *  str,
TEXT_MODE_COLOR  color 
)
overridevirtual

Prints string to screen with specified color.

Parameters
strString to print
colorColor

Implements Graphics.

References print_char_color(), and strlen().

◆ set_cursor()

void set_cursor ( uint32_t  x,
uint32_t  y 
)
overridevirtual

Sets framebuffer cursor to specified values.

Parameters
xX to be set
yY to be set

Implements Graphics.

◆ set_text_color()

void set_text_color ( TEXT_MODE_COLOR  color)
overridevirtual

Sets new framebuffer color to print.

Parameters
colorNew color to be set

Implements Graphics.

◆ the()

Graphics * the ( )
static

The documentation for this class was generated from the following files: