mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +00:00
WindowServer: Add a maximize/unmaximize button to windows.
This commit is contained in:
parent
dddf45f563
commit
641893104a
8 changed files with 95 additions and 7 deletions
|
@ -12,7 +12,7 @@ class WSWindowFrame;
|
|||
|
||||
class WSButton : public Weakable<WSButton> {
|
||||
public:
|
||||
WSButton(WSWindowFrame&, Retained<CharacterBitmap>&&, Function<void()>&& on_click_handler);
|
||||
WSButton(WSWindowFrame&, Retained<CharacterBitmap>&&, Function<void(WSButton&)>&& on_click_handler);
|
||||
~WSButton();
|
||||
|
||||
Rect relative_rect() const { return m_relative_rect; }
|
||||
|
@ -25,10 +25,12 @@ public:
|
|||
|
||||
void on_mouse_event(const WSMouseEvent&);
|
||||
|
||||
Function<void()> on_click;
|
||||
Function<void(WSButton&)> on_click;
|
||||
|
||||
bool is_visible() const { return m_visible; }
|
||||
|
||||
void set_bitmap(const CharacterBitmap& bitmap) { m_bitmap = bitmap; }
|
||||
|
||||
private:
|
||||
WSWindowFrame& m_frame;
|
||||
Rect m_relative_rect;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue