2020-04-30 18:16:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
2020-07-10 17:06:01 +08:00
|
|
|
#include "SecondaryMouseButtonsHook.h"
|
|
|
|
|
2020-04-30 18:16:08 +08:00
|
|
|
interface IFancyZonesSettings;
|
|
|
|
interface IZoneWindow;
|
|
|
|
|
|
|
|
class WindowMoveHandler
|
|
|
|
{
|
|
|
|
public:
|
2020-08-24 15:19:39 +08:00
|
|
|
WindowMoveHandler(const winrt::com_ptr<IFancyZonesSettings>& settings, const std::function<void()>& keyUpdateCallback);
|
2020-04-30 18:16:08 +08:00
|
|
|
~WindowMoveHandler();
|
|
|
|
|
|
|
|
bool InMoveSize() const noexcept;
|
|
|
|
bool IsDragEnabled() const 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-08-24 20:39:34 +08:00
|
|
|
void MoveWindowIntoZoneByIndexSet(HWND window, const std::vector<size_t>& indexSet, winrt::com_ptr<IZoneWindow> zoneWindow) noexcept;
|
2020-09-11 17:32:45 +08:00
|
|
|
bool MoveWindowIntoZoneByDirectionAndIndex(HWND window, DWORD vkCode, bool cycle, winrt::com_ptr<IZoneWindow> zoneWindow) noexcept;
|
|
|
|
bool MoveWindowIntoZoneByDirectionAndPosition(HWND window, DWORD vkCode, bool cycle, winrt::com_ptr<IZoneWindow> zoneWindow) noexcept;
|
|
|
|
bool ExtendWindowByDirectionAndPosition(HWND window, DWORD vkCode, winrt::com_ptr<IZoneWindow> zoneWindow) noexcept;
|
2020-04-30 18:16:08 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
class WindowMoveHandlerPrivate* pimpl;
|
|
|
|
};
|