mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
* rename Layout -> LayoutData * simplify zone * split ZoneSet: Layout * refactoring * split ZoneSet: LayoutWindows * update trace * split ZoneSet: remove ZoneSet * fix initialization * split unit tests * remove unused * warning * nullptr check * use current rect * update work area tests * use current rect * simplify * more meaningful name * dismiss * safety checks * resolve conflicts * reassign windows after switching vd * avoid double-processing for window on switching vd * extend windows fix * check if window is on current desktop before cycling * separated extend * not reinit layout windows
32 lines
666 B
C++
32 lines
666 B
C++
#pragma once
|
|
|
|
namespace ZoneConstants
|
|
{
|
|
constexpr int MAX_NEGATIVE_SPACING = -20;
|
|
}
|
|
|
|
using ZoneIndex = int64_t;
|
|
using ZoneIndexSet = std::vector<ZoneIndex>;
|
|
|
|
/**
|
|
* Class representing one zone inside applied zone layout, which is basically wrapper around rectangle structure.
|
|
*/
|
|
class Zone
|
|
{
|
|
public:
|
|
Zone(const RECT& zoneRect, const ZoneIndex zoneIndex);
|
|
Zone(const Zone& other);
|
|
~Zone() = default;
|
|
|
|
ZoneIndex Id() const noexcept;
|
|
bool IsValid() const noexcept;
|
|
RECT GetZoneRect() const noexcept;
|
|
long GetZoneArea() const noexcept;
|
|
|
|
private:
|
|
const RECT m_rect;
|
|
const ZoneIndex m_index;
|
|
|
|
bool isValid() const noexcept;
|
|
};
|