mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +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
900 B
C++
32 lines
900 B
C++
#pragma once
|
|
|
|
#include <FancyZonesLib/FancyZonesData/LayoutData.h>
|
|
#include <FancyZonesLib/util.h>
|
|
|
|
#include <FancyZonesLib/LayoutConfigurator.h> // ZonesMap
|
|
|
|
class Layout
|
|
{
|
|
public:
|
|
Layout(const LayoutData& data);
|
|
~Layout() = default;
|
|
|
|
bool Init(const FancyZonesUtils::Rect& workAreaRect, HMONITOR monitor) noexcept;
|
|
|
|
GUID Id() const noexcept;
|
|
FancyZonesDataTypes::ZoneSetLayoutType Type() const noexcept;
|
|
|
|
const ZonesMap& Zones() const noexcept;
|
|
ZoneIndexSet ZonesFromPoint(POINT pt) const noexcept;
|
|
/**
|
|
* Returns all zones spanned by the minimum bounding rectangle containing the two given zone index sets.
|
|
*/
|
|
ZoneIndexSet GetCombinedZoneRange(const ZoneIndexSet& initialZones, const ZoneIndexSet& finalZones) const noexcept;
|
|
|
|
RECT GetCombinedZonesRect(const ZoneIndexSet& zones);
|
|
|
|
private:
|
|
const LayoutData m_data;
|
|
ZonesMap m_zones{};
|
|
};
|