1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:17:35 +00:00

The WindowManager can now react to mouse events on the window title bar.

This commit is contained in:
Andreas Kling 2018-10-12 01:48:18 +02:00
parent 5d125e40d9
commit 22721e6729
4 changed files with 56 additions and 25 deletions

View file

@ -2,16 +2,17 @@
#include "Object.h"
#include "Rect.h"
#include "Color.h"
#include <AK/HashTable.h>
class MouseEvent;
class PaintEvent;
class Widget;
class Window;
class WindowManager : public Object {
public:
static WindowManager& the();
static WindowManager& the();
void addWindow(Window&);
void paintWindowFrames();
@ -26,9 +27,14 @@ private:
~WindowManager();
void processMouseEvent(MouseEvent&);
void handleTitleBarMouseEvent(Window&, MouseEvent&);
void handlePaintEvent(PaintEvent&);
virtual void event(Event&) override;
Color m_windowBorderColor;
Color m_windowTitleColor;
void paintWindowFrame(Window&);
HashTable<Window*> m_windows;
Widget* m_rootWidget { nullptr };