Sine Striker
2023-12-12 0586c98f90866e4bc9f0dfe73aefb0a07c56697e
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef WIN10BORDERHANDLER_P_H
#define WIN10BORDERHANDLER_P_H
 
#include <QtGui/QPainter>
 
#include <QWKCore/qwkcoreglobal.h>
 
namespace QWK {
 
    class QWK_CORE_EXPORT Win10BorderHandler {
    public:
        Win10BorderHandler(QWindow *window);
        virtual ~Win10BorderHandler();
 
    public:
        virtual void updateGeometry() = 0;
        virtual void requestUpdate() = 0;
 
        virtual bool isActive() const = 0;
 
        inline int borderThickness() const;
        inline void setBorderThickness(int borderThickness);
 
    protected:
        // implemented in `win32windowcontext.cpp`
        void paintBorder(QPainter &painter, const QRect &rect, const QRegion &region);
 
    protected:
        QWindow *m_window;
        int m_borderThickness;
 
        Q_DISABLE_COPY(Win10BorderHandler)
    };
 
    inline int Win10BorderHandler::borderThickness() const {
        return m_borderThickness;
    }
 
    inline void Win10BorderHandler::setBorderThickness(int borderThickness) {
        m_borderThickness = borderThickness;
        updateGeometry();
    }
 
}
 
#endif // WIN10BORDERHANDLER_P_H