mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[FancyZones] Improve code quality (part 2: WorkArea init) (#23030)
* init WorkArea with a rectangle * keep the highlighted zones state in a separate class
This commit is contained in:
22
src/modules/fancyzones/FancyZonesLib/HighlightedZones.h
Normal file
22
src/modules/fancyzones/FancyZonesLib/HighlightedZones.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <FancyZonesLib/Zone.h>
|
||||
|
||||
class Layout;
|
||||
|
||||
class HighlightedZones
|
||||
{
|
||||
public:
|
||||
HighlightedZones();
|
||||
~HighlightedZones() = default;
|
||||
|
||||
const ZoneIndexSet& Zones() const noexcept;
|
||||
bool Empty() const noexcept;
|
||||
|
||||
bool Update(const Layout* layout, POINT const& point, bool selectManyZones) noexcept;
|
||||
void Reset() noexcept;
|
||||
|
||||
private:
|
||||
ZoneIndexSet m_initialHighlightZone;
|
||||
ZoneIndexSet m_highlightZone;
|
||||
};
|
||||
Reference in New Issue
Block a user