2019-09-04 18:26:26 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-10-14 17:42:47 +02:00
|
|
|
namespace ZoneConstants
|
|
|
|
|
{
|
2021-12-20 12:55:20 +01:00
|
|
|
constexpr int MAX_NEGATIVE_SPACING = -20;
|
2020-10-14 17:42:47 +02:00
|
|
|
}
|
|
|
|
|
|
2021-08-11 17:05:03 +03:00
|
|
|
using ZoneIndex = int64_t;
|
|
|
|
|
using ZoneIndexSet = std::vector<ZoneIndex>;
|
|
|
|
|
|
2020-03-09 19:22:53 +01:00
|
|
|
/**
|
|
|
|
|
* Class representing one zone inside applied zone layout, which is basically wrapper around rectangle structure.
|
|
|
|
|
*/
|
2022-10-31 13:44:25 +02:00
|
|
|
class Zone
|
2019-09-04 18:26:26 +02:00
|
|
|
{
|
2022-10-31 13:44:25 +02:00
|
|
|
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;
|
2019-09-04 18:26:26 +02:00
|
|
|
|
2022-10-31 13:44:25 +02:00
|
|
|
private:
|
|
|
|
|
const RECT m_rect;
|
|
|
|
|
const ZoneIndex m_index;
|
|
|
|
|
|
|
|
|
|
bool isValid() const noexcept;
|
|
|
|
|
};
|