blob: 6efb040e33868409da2ad3ae31eeced49b689552 (
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
|
#pragma once
#include <LibGUI/GFrame.h>
class GSplitter : public GFrame {
C_OBJECT(GSplitter)
public:
virtual ~GSplitter() override;
protected:
GSplitter(Orientation, GWidget* parent);
virtual void mousedown_event(GMouseEvent&) override;
virtual void mousemove_event(GMouseEvent&) override;
virtual void mouseup_event(GMouseEvent&) override;
virtual void enter_event(CEvent&) override;
virtual void leave_event(CEvent&) override;
private:
Orientation m_orientation;
bool m_resizing { false };
Point m_resize_origin;
WeakPtr<GWidget> m_first_resizee;
WeakPtr<GWidget> m_second_resizee;
Size m_first_resizee_start_size;
Size m_second_resizee_start_size;
};
|