2022-05-28 20:46:20 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "IHyprWindowDecoration.hpp"
|
|
|
|
#include <deque>
|
2023-05-22 21:40:32 +02:00
|
|
|
#include "../Texture.hpp"
|
|
|
|
#include <string>
|
2023-07-11 20:57:33 +02:00
|
|
|
#include <memory>
|
2023-05-22 21:40:32 +02:00
|
|
|
|
|
|
|
class CTitleTex {
|
|
|
|
public:
|
|
|
|
CTitleTex(CWindow* pWindow, const Vector2D& bufferSize);
|
|
|
|
~CTitleTex();
|
|
|
|
|
|
|
|
CTexture tex;
|
|
|
|
std::string szContent;
|
|
|
|
CWindow* pWindowOwner = nullptr;
|
|
|
|
};
|
2022-05-28 20:46:20 +02:00
|
|
|
|
|
|
|
class CHyprGroupBarDecoration : public IHyprWindowDecoration {
|
2022-12-16 18:17:31 +01:00
|
|
|
public:
|
2022-05-28 20:46:20 +02:00
|
|
|
CHyprGroupBarDecoration(CWindow*);
|
|
|
|
virtual ~CHyprGroupBarDecoration();
|
|
|
|
|
|
|
|
virtual SWindowDecorationExtents getWindowDecorationExtents();
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
virtual void draw(CMonitor*, float a, const Vector2D& offset);
|
2022-05-28 20:46:20 +02:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
virtual eDecorationType getDecorationType();
|
2022-05-28 20:46:20 +02:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
virtual void updateWindow(CWindow*);
|
2022-05-28 20:46:20 +02:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
virtual void damageEntire();
|
2022-05-28 20:46:20 +02:00
|
|
|
|
2023-05-22 20:52:41 +02:00
|
|
|
virtual SWindowDecorationExtents getWindowDecorationReservedArea();
|
|
|
|
|
2023-08-30 17:39:22 +02:00
|
|
|
virtual bool allowsInput();
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
private:
|
2023-05-22 22:06:40 +02:00
|
|
|
SWindowDecorationExtents m_seExtents;
|
2023-05-22 21:40:32 +02:00
|
|
|
|
2023-05-22 22:06:40 +02:00
|
|
|
CWindow* m_pWindow = nullptr;
|
2023-05-22 21:40:32 +02:00
|
|
|
|
2023-05-22 22:06:40 +02:00
|
|
|
Vector2D m_vLastWindowPos;
|
|
|
|
Vector2D m_vLastWindowSize;
|
2022-05-28 20:46:20 +02:00
|
|
|
|
2023-05-22 22:06:40 +02:00
|
|
|
std::deque<CWindow*> m_dwGroupMembers;
|
2022-05-28 20:46:20 +02:00
|
|
|
|
2023-05-22 22:06:40 +02:00
|
|
|
CTitleTex* textureFromTitle(const std::string&);
|
|
|
|
void invalidateTextures();
|
2022-05-28 20:46:20 +02:00
|
|
|
|
2023-05-22 22:06:40 +02:00
|
|
|
void refreshGradients();
|
2023-07-11 20:57:33 +02:00
|
|
|
|
|
|
|
struct STitleTexs {
|
|
|
|
// STitleTexs* overriden = nullptr; // TODO: make shit shared in-group to decrease VRAM usage.
|
|
|
|
std::deque<std::unique_ptr<CTitleTex>> titleTexs;
|
|
|
|
} m_sTitleTexs;
|
2023-08-30 17:39:22 +02:00
|
|
|
};
|