1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

Start adding a Window class.

This commit is contained in:
Andreas Kling 2018-10-12 01:03:22 +02:00
parent bd6172e3c7
commit 415c4b90c5
12 changed files with 159 additions and 55 deletions

View file

@ -22,17 +22,6 @@ void Widget::setRect(const Rect& rect)
update();
}
void Widget::setIsWindow(bool value)
{
if (m_isWindow == value)
return;
m_isWindow = value;
if (m_isWindow) {
WindowManager::the().addWindow(*this);
}
update();
}
void Widget::event(Event& event)
{
switch (event.type()) {
@ -116,10 +105,3 @@ Widget::HitTestResult Widget::hitTest(int x, int y)
return { this, x, y };
}
void Widget::setWindowTitle(String&& title)
{
if (title == m_windowTitle)
return;
m_windowTitle = std::move(title);
WindowManager::the().notifyTitleChanged(*this);
}