blob: 4cd0cc8db5f50eca0bfc103b455892c8b98ec4b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include "RootWidget.h"
#include "Painter.h"
#include "WindowManager.h"
#include <cstdio>
RootWidget::RootWidget()
{
}
RootWidget::~RootWidget()
{
}
void RootWidget::onPaint(PaintEvent& event)
{
Widget::onPaint(event);
printf("RootWidget::onPaint: %d,%d %dx%d\n",
event.rect().x(),
event.rect().y(),
event.rect().width(),
event.rect().height());
Painter painter(*this);
painter.fillRect(event.rect(), Color(0, 72, 96));
}
void RootWidget::onMouseMove(MouseEvent& event)
{
//printf("RootWidget::onMouseMove: x=%d, y=%d\n", event.x(), event.y());
Widget::onMouseMove(event);
}
|