More window cleaning
This commit is contained in:
parent
6adc441e6f
commit
53c98a227d
29 changed files with 422 additions and 261 deletions
|
@ -14,7 +14,7 @@ Window::Window()
|
|||
mHeight(600),
|
||||
mWidget(Widget::Create())
|
||||
{
|
||||
|
||||
mWidget->setBounds(mWidth, mHeight);
|
||||
}
|
||||
|
||||
Window::~Window()
|
||||
|
@ -29,23 +29,22 @@ std::unique_ptr<Window> Window::Create()
|
|||
|
||||
std::vector<VisualLayer*> Window::GetLayers()
|
||||
{
|
||||
return mWidget->GetLayers();
|
||||
return mWidget->getLayers();
|
||||
}
|
||||
|
||||
void Window::OnMouseEvent(const MouseEvent* event)
|
||||
{
|
||||
mWidget->OnMouseEvent(event);
|
||||
mWidget->onMouseEvent(event);
|
||||
}
|
||||
|
||||
void Window::OnKeyboardEvent(const KeyboardEvent* event)
|
||||
{
|
||||
mWidget->OnKeyboardEvent(event);
|
||||
mWidget->onKeyboardEvent(event);
|
||||
}
|
||||
|
||||
void Window::OnPaint(const PaintEvent* event)
|
||||
{
|
||||
mWidget->SetBounds(mWidth, mHeight);
|
||||
mWidget->OnPaintEvent(event);
|
||||
mWidget->onPaintEvent(event);
|
||||
}
|
||||
|
||||
void Window::AddWidget(WidgetUPtr widget)
|
||||
|
@ -55,6 +54,7 @@ void Window::AddWidget(WidgetUPtr widget)
|
|||
mWidget.reset();
|
||||
}
|
||||
mWidget = std::move(widget);
|
||||
mWidget->setBounds(mWidth, mHeight);
|
||||
}
|
||||
|
||||
Widget* Window::GetWidget() const
|
||||
|
@ -76,6 +76,7 @@ void Window::SetSize(unsigned width, unsigned height)
|
|||
{
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
mWidget->setBounds(mWidth, mHeight);
|
||||
}
|
||||
|
||||
IPlatformWindow* Window::GetPlatformWindow() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue