Files
PowerToys/src/modules/fancyzones/FancyZonesLib/Zone.h
Seraphima Zykova ff290eef9d [FancyZones] Window switch shortcut fix (#21426)
* 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
2022-10-31 11:44:25 +00:00

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;
};