MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / OnWindowPaint

Function OnWindowPaint

Applications/TextEdit/main.cpp:127–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void OnWindowPaint(surface_t* surface){
128 Lemon::Graphics::DrawRect(0, window->GetSize().y - 20, window->GetSize().x, 20, 160, 160, 160, surface);
129
130 char buf[38];
131 sprintf(buf, "Line: %d Col: %d", textBox->cursorPos.y + 1, textBox->cursorPos.x + 1); // lines and columns don't start at 0
132
133 Lemon::Graphics::DrawString(buf, 4 + WINDOW_MENUBAR_HEIGHT, window->GetSize().y - 20 + 4, 0, 0, 0, surface);
134}
135
136void OnWindowCmd(unsigned short cmd, Lemon::GUI::Window* win){
137 if(cmd == TEXTEDIT_OPEN){

Callers

nothing calls this directly

Calls 3

DrawRectFunction · 0.50
DrawStringFunction · 0.50
GetSizeMethod · 0.45

Tested by

no test coverage detected