MCPcopy Create free account
hub / github.com/ZDoom/Raze / OnPaint

Method OnPaint

source/common/widgets/errorwindow.cpp:200–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void LogViewer::OnPaint(Canvas* canvas)
201{
202 double width = GetWidth() - scrollbar->GetFrameGeometry().width;
203 double y = GetHeight();
204 size_t start = std::min((size_t)std::round(scrollbar->GetPosition() + 1.0), lines.size());
205 for (size_t i = start; i > 0 && y > 0.0; i--)
206 {
207 SpanLayout& layout = lines[i - 1];
208 layout.Layout(canvas, width);
209 layout.SetPosition(Point(0.0, y - layout.GetSize().height));
210 layout.DrawLayout(canvas);
211 y -= layout.GetSize().height;
212 }
213}
214
215bool LogViewer::OnMouseWheel(const Point& pos, EInputKey key)
216{

Callers

nothing calls this directly

Calls 9

GetHeightFunction · 0.85
GetFrameGeometryMethod · 0.80
LayoutMethod · 0.80
DrawLayoutMethod · 0.80
PointClass · 0.50
GetPositionMethod · 0.45
sizeMethod · 0.45
SetPositionMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected