mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 11:39:44 +03:00
36 lines
716 B
C++
36 lines
716 B
C++
#pragma once
|
|
|
|
#include "Object.h"
|
|
#include "Rect.h"
|
|
#include <AK/HashTable.h>
|
|
|
|
class MouseEvent;
|
|
class Widget;
|
|
class Window;
|
|
|
|
class WindowManager : public Object {
|
|
public:
|
|
static WindowManager& the();
|
|
|
|
void addWindow(Window&);
|
|
void paintWindowFrames();
|
|
|
|
void notifyTitleChanged(Window&);
|
|
void notifyRectChanged(Window&, const Rect& oldRect, const Rect& newRect);
|
|
|
|
Widget* rootWidget() { return m_rootWidget; }
|
|
void setRootWidget(Widget*);
|
|
|
|
private:
|
|
WindowManager();
|
|
~WindowManager();
|
|
|
|
void processMouseEvent(MouseEvent&);
|
|
|
|
virtual void event(Event&) override;
|
|
|
|
void paintWindowFrame(Window&);
|
|
HashTable<Window*> m_windows;
|
|
Widget* m_rootWidget { nullptr };
|
|
};
|