2020-04-30 18:16:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
interface IFancyZonesSettings;
|
|
|
|
interface IZoneWindow;
|
2020-06-05 22:53:08 +08:00
|
|
|
interface SecondaryMouseButtonsHook;
|
2020-04-30 18:16:08 +08:00
|
|
|
|
|
|
|
class WindowMoveHandler
|
|
|
|
{
|
|
|
|
public:
|
2020-06-05 22:53:08 +08:00
|
|
|
WindowMoveHandler(const winrt::com_ptr<IFancyZonesSettings>& settings, SecondaryMouseButtonsHook* mouseHook);
|
2020-04-30 18:16:08 +08:00
|
|
|
~WindowMoveHandler();
|
|
|
|
|
|
|
|
bool InMoveSize() const noexcept;
|
|
|
|
bool IsDragEnabled() const noexcept;
|
|
|
|
|
2020-06-05 22:53:08 +08:00
|
|
|
void OnMouseDown() noexcept;
|
|
|
|
|
2020-05-31 18:36:45 +08:00
|
|
|
void MoveSizeStart(HWND window, HMONITOR monitor, POINT const& ptScreen, const std::unordered_map<HMONITOR, winrt::com_ptr<IZoneWindow>>& zoneWindowMap) noexcept;
|
|
|
|
void MoveSizeUpdate(HMONITOR monitor, POINT const& ptScreen, const std::unordered_map<HMONITOR, winrt::com_ptr<IZoneWindow>>& zoneWindowMap) noexcept;
|
|
|
|
void MoveSizeEnd(HWND window, POINT const& ptScreen, const std::unordered_map<HMONITOR, winrt::com_ptr<IZoneWindow>>& zoneWindowMap) noexcept;
|
2020-04-30 18:16:08 +08:00
|
|
|
|
2020-05-31 18:36:45 +08:00
|
|
|
void MoveWindowIntoZoneByIndexSet(HWND window, const std::vector<int>& indexSet, winrt::com_ptr<IZoneWindow> zoneWindow) noexcept;
|
|
|
|
bool MoveWindowIntoZoneByDirection(HWND window, DWORD vkCode, bool cycle, winrt::com_ptr<IZoneWindow> zoneWindow);
|
2020-04-30 18:16:08 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
class WindowMoveHandlerPrivate* pimpl;
|
|
|
|
};
|