mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00

The window frame is an object that contains a window, its title bar and window border. This way WSWindowManager doesn't have to know about all the different types of window borders, titlebar rects, etc.
22 lines
438 B
C++
22 lines
438 B
C++
#pragma once
|
|
|
|
class Painter;
|
|
class Rect;
|
|
class WSMouseEvent;
|
|
class WSWindow;
|
|
|
|
class WSWindowFrame {
|
|
public:
|
|
WSWindowFrame(WSWindow&);
|
|
~WSWindowFrame();
|
|
|
|
Rect rect() const;
|
|
void paint(Painter&);
|
|
void on_mouse_event(const WSMouseEvent&);
|
|
void notify_window_rect_changed(const Rect& old_rect, const Rect& new_rect);
|
|
|
|
private:
|
|
void handle_close_button_mouse_event(const WSMouseEvent&);
|
|
|
|
WSWindow& m_window;
|
|
};
|