2021-11-18 18:04:09 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "defines.hpp"
|
2021-11-20 10:04:14 +01:00
|
|
|
#include "utilities/Workspace.hpp"
|
2021-11-18 18:04:09 +01:00
|
|
|
|
|
|
|
class CWindow {
|
|
|
|
public:
|
|
|
|
CWindow();
|
|
|
|
~CWindow();
|
|
|
|
|
|
|
|
void move(Vector2D dest);
|
|
|
|
void moveByDelta(Vector2D delta);
|
|
|
|
|
|
|
|
void resize(Vector2D size);
|
|
|
|
void resize(float percx, float percy);
|
|
|
|
|
2021-11-22 18:43:55 +01:00
|
|
|
// ------------------------------------- //
|
|
|
|
// Node Stuff //
|
|
|
|
// ------------------------------------- //
|
|
|
|
|
|
|
|
// IDs:
|
|
|
|
// > 0 : Windows
|
|
|
|
// == 0 : None
|
|
|
|
// < 0 : Nodes
|
|
|
|
|
|
|
|
EXPOSED_MEMBER(ParentNodeID, int64_t, i);
|
|
|
|
|
|
|
|
EXPOSED_MEMBER(ChildNodeAID, int64_t, i);
|
|
|
|
EXPOSED_MEMBER(ChildNodeBID, int64_t, i);
|
|
|
|
|
|
|
|
void generateNodeID();
|
|
|
|
|
|
|
|
// ------------------------------------- //
|
|
|
|
|
2021-11-18 18:04:09 +01:00
|
|
|
std::string getName();
|
|
|
|
|
|
|
|
// Tells the window manager to reload the window's params
|
|
|
|
EXPOSED_MEMBER(Dirty, bool, b);
|
|
|
|
|
2021-11-22 18:43:55 +01:00
|
|
|
void setDirtyRecursive(bool);
|
|
|
|
void recalcSizePosRecursive();
|
|
|
|
|
2021-11-18 18:04:09 +01:00
|
|
|
EXPOSED_MEMBER(Size, Vector2D, vec);
|
2021-11-18 22:08:28 +01:00
|
|
|
EXPOSED_MEMBER(EffectiveSize, Vector2D, vec);
|
|
|
|
EXPOSED_MEMBER(EffectivePosition, Vector2D, vec);
|
2021-11-18 18:04:09 +01:00
|
|
|
EXPOSED_MEMBER(Position, Vector2D, vec);
|
2021-11-23 18:48:03 +01:00
|
|
|
EXPOSED_MEMBER(RealSize, Vector2D, vec);
|
|
|
|
EXPOSED_MEMBER(RealPosition, Vector2D, vec);
|
2021-11-18 18:04:09 +01:00
|
|
|
EXPOSED_MEMBER(IsFloating, bool, b);
|
2021-11-22 18:43:55 +01:00
|
|
|
EXPOSED_MEMBER(Drawable, int64_t, i); // int64_t because it's my internal ID system too.
|
2021-11-20 10:04:14 +01:00
|
|
|
|
2021-11-21 11:42:44 +01:00
|
|
|
// Fullscreen
|
|
|
|
EXPOSED_MEMBER(Fullscreen, bool, b);
|
|
|
|
|
2021-11-20 10:04:14 +01:00
|
|
|
// Workspace pointer
|
|
|
|
EXPOSED_MEMBER(WorkspaceID, int, i);
|
2021-11-21 15:15:33 +01:00
|
|
|
|
|
|
|
// For floating
|
|
|
|
EXPOSED_MEMBER(DefaultSize, Vector2D, vec);
|
|
|
|
EXPOSED_MEMBER(DefaultPosition, Vector2D, vec);
|
2021-11-21 17:40:02 +01:00
|
|
|
|
|
|
|
// Monitors
|
|
|
|
EXPOSED_MEMBER(Monitor, int, i);
|
2021-11-18 18:04:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
};
|