mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
[FancyZones] Improve code quality (part 4) (#23638)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <FancyZonesLib/FancyZonesDataTypes.h>
|
||||
#include <FancyZonesLib/HighlightedZones.h>
|
||||
#include <FancyZonesLib/Layout.h>
|
||||
#include <FancyZonesLib/LayoutAssignedWindows.h>
|
||||
#include <FancyZonesLib/util.h>
|
||||
@@ -30,12 +29,10 @@ public:
|
||||
FancyZonesDataTypes::WorkAreaId UniqueId() const noexcept { return { m_uniqueId }; }
|
||||
const std::unique_ptr<Layout>& GetLayout() const noexcept { return m_layout; }
|
||||
const std::unique_ptr<LayoutAssignedWindows>& GetLayoutWindows() const noexcept { return m_layoutWindows; }
|
||||
const HWND GetWorkAreaWindow() const noexcept { return m_window; }
|
||||
|
||||
ZoneIndexSet GetWindowZoneIndexes(HWND window) const noexcept;
|
||||
|
||||
HRESULT MoveSizeEnter(HWND window) noexcept;
|
||||
HRESULT MoveSizeUpdate(POINT const& ptScreen, bool dragEnabled, bool selectManyZones) noexcept;
|
||||
HRESULT MoveSizeEnd(HWND window) noexcept;
|
||||
void MoveWindowIntoZoneByIndex(HWND window, ZoneIndex index) noexcept;
|
||||
void MoveWindowIntoZoneByIndexSet(HWND window, const ZoneIndexSet& indexSet, bool updatePosition = true) noexcept;
|
||||
bool MoveWindowIntoZoneByDirectionAndIndex(HWND window, DWORD vkCode, bool cycle) noexcept;
|
||||
@@ -46,10 +43,9 @@ public:
|
||||
|
||||
void UpdateActiveZoneSet() noexcept;
|
||||
|
||||
void ShowZonesOverlay() noexcept;
|
||||
void HideZonesOverlay() noexcept;
|
||||
void FlashZones() noexcept;
|
||||
void ClearSelectedZones() noexcept;
|
||||
void ShowZonesOverlay(const ZoneIndexSet& highlight, HWND draggedWindow = nullptr);
|
||||
void HideZonesOverlay();
|
||||
void FlashZones();
|
||||
|
||||
void CycleWindows(HWND window, bool reverse) noexcept;
|
||||
|
||||
@@ -61,7 +57,7 @@ private:
|
||||
void InitLayout(const FancyZonesDataTypes::WorkAreaId& parentUniqueId) noexcept;
|
||||
void CalculateZoneSet() noexcept;
|
||||
LRESULT WndProc(UINT message, WPARAM wparam, LPARAM lparam) noexcept;
|
||||
void SetAsTopmostWindow() noexcept;
|
||||
void SetWorkAreaWindowAsTopmost(HWND draggedWindow) noexcept;
|
||||
|
||||
const FancyZonesUtils::Rect m_workAreaRect{};
|
||||
const FancyZonesDataTypes::WorkAreaId m_uniqueId;
|
||||
@@ -69,9 +65,6 @@ private:
|
||||
std::unique_ptr<Layout> m_layout;
|
||||
std::unique_ptr<LayoutAssignedWindows> m_layoutWindows;
|
||||
std::unique_ptr<ZonesOverlay> m_zonesOverlay;
|
||||
HighlightedZones m_highlightedZones;
|
||||
|
||||
HWND m_windowMoveSize{};
|
||||
};
|
||||
|
||||
inline std::shared_ptr<WorkArea> MakeWorkArea(HINSTANCE hinstance, const FancyZonesDataTypes::WorkAreaId& uniqueId, const FancyZonesDataTypes::WorkAreaId& parentUniqueId, const FancyZonesUtils::Rect& workAreaRect)
|
||||
|
||||
Reference in New Issue
Block a user