1 #ifndef bqtRenderingScreenHH
2 #define bqtRenderingScreenHH
31 std::size_t lastcursx, lastcursy;
41 void FillBox(std::size_t x, std::size_t y, std::size_t width, std::size_t height)
43 for(std::size_t h=0; h<height; ++h)
44 for(std::size_t w=0; w<width; ++w)
46 auto tx = x+w, ty = y+h;
53 void FillBox(std::size_t x, std::size_t y, std::size_t width, std::size_t height,
Cell with)
55 for(std::size_t h=0; h<height; ++h)
56 for(std::size_t w=0; w<width; ++w)
58 auto tx = x+w, ty = y+h;
71 void CopyText(std::size_t tgtx,std::size_t tgty, std::size_t srcx,std::size_t srcy,
72 std::size_t width,std::size_t height)
74 auto hcopy_oneline = [&](std::size_t ty, std::size_t sy)
77 for(std::size_t w=0; w<width; ++w)
80 for(std::size_t w=width; w-- > 0; )
84 for(std::size_t h=0; h<height; ++h)
85 hcopy_oneline(tgty+h, srcy+h);
87 for(std::size_t h=height; h-- > 0; )
88 hcopy_oneline(tgty+h, srcy+h);
92 void Dirtify(std::size_t x, std::size_t y)
123 void PutCh(std::size_t x, std::size_t y, char32_t c,
int cset = 0)
179 void Render(std::size_t fx, std::size_t fy, std::uint32_t* pixels);
186 void Resize(std::size_t newsx, std::size_t newsy);
Defines Cell, the structure that represents a character on screen.
char32_t TranslateCSet(char32_t c, int cset)
Definition: cset.cc:10
unsigned char render_size
bit 12-13 0=normal,1=doublewidth,2=doublewidth+topline,3=doublewidth+bottomline
Definition: cell.hh:57
bool dirty
bit 31 (placed last for efficient access)
Definition: cell.hh:70
char32_t ch
the character symbol (unicode codepoint)
Definition: cell.hh:44
unsigned mousecolor2
Ignored.
Definition: window.hh:27
void PutCh(std::size_t x, std::size_t y, const Cell &c)
Definition: window.hh:109
std::size_t cursx
Cursor location (horizontal)
Definition: window.hh:21
void Dirtify()
Definition: window.cc:285
Window(std::size_t xs, std::size_t ys)
Definition: window.hh:35
std::size_t xsize
Width of window in cells.
Definition: window.hh:19
std::size_t cursy
Cursor location (vertical)
Definition: window.hh:22
void Render(std::size_t fx, std::size_t fy, std::uint32_t *pixels)
Definition: window.cc:83
unsigned cursorcolor
Color of cursor.
Definition: window.hh:25
void PutCh(std::size_t x, std::size_t y, char32_t c, int cset=0)
Definition: window.hh:123
void CopyText(std::size_t tgtx, std::size_t tgty, std::size_t srcx, std::size_t srcy, std::size_t width, std::size_t height)
Definition: window.hh:71
unsigned mousecolor1
Ignored.
Definition: window.hh:26
void LineSetRenderSize(unsigned val)
Definition: window.cc:292
void PutCh_KeepChar(std::size_t x, std::size_t y, const Cell &c)
Definition: window.hh:159
bool cursorvis
Whether cursor is visible.
Definition: window.hh:24
bool inverse
Whether screen-wide inverse effect is in effect.
Definition: window.hh:23
void Resize(std::size_t newsx, std::size_t newsy)
Definition: window.cc:270
Cell blank
The current "blank" cell. It is used as the model cell for inserting empty rows.
Definition: window.hh:29
std::vector< Cell > cells
Storage for cells. Indexed row-first. Size: xsize*ysize */.
Definition: window.hh:18
std::size_t ysize
Height of window in cells.
Definition: window.hh:20
void PutCh_KeepAttr(std::size_t x, std::size_t y, char32_t c, int cset=0)
Definition: window.hh:146
void Dirtify(std::size_t x, std::size_t y)
Definition: window.hh:92
unsigned mouseselectcolor
Ignored.
Definition: window.hh:28
void FillBox(std::size_t x, std::size_t y, std::size_t width, std::size_t height, Cell with)
Definition: window.hh:53
void FillBox(std::size_t x, std::size_t y, std::size_t width, std::size_t height)
Definition: window.hh:41