1 #pragma once
2 #include "NanoVG.hpp"
3 #include <functional>
4 class ColorPalette;
5 
6 class ResizeHandle : public NanoWidget {
7 public:
8     ResizeHandle(Widget *group, const ColorPalette &palette);
9 
10     bool onMouse(const MouseEvent &event) override;
11     bool onMotion(const MotionEvent &event) override;
12     void onNanoDisplay() override;
13 
14     std::function<void(DGL::Size<uint>)> RequestToResizeCallback;
15 
16 private:
17     const ColorPalette &fPalette;
18     DGL::Size<uint> fMinWindowSize { 50u, 50u };
19     bool fIsDragging = false;
20 };
21