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:
parent
5d125e40d9
commit
22721e6729
4 changed files with 56 additions and 25 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue