blob: 7ed541e4ccd41bb0560444157ce4dc0a9472ca37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
#include <AK/Vector.h>
class Painter;
class Rect;
class WSButton;
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);
void invalidate_title_bar();
private:
Rect title_bar_rect() const;
Rect title_bar_icon_rect() const;
Rect title_bar_text_rect() const;
Rect middle_border_rect() const;
WSWindow& m_window;
Vector<OwnPtr<WSButton>> m_buttons;
};
|