Batch #904 by ragnarok-clanker: no function's compiled code changes; checked with 3 compiled unit(s), including every includer of Source/Contents/MessageTable.h, Source/Contents/Async/AsyncWorkMgr.h, Source/Contents/Emblems/EmblemDataMgr.h, Source/Contents/Hotkeys/UserHotkeyMgr.h, Source/Contents/Messenger/WhisperBlockMgr.h, Source/Contents/Party/AdventurerAgencyMgr.h, Source/Contents/UserData/AccountLinkedUserDataMgr.h, Source/Contents/UserData/CharacterLinkedUserDataMgr.h, Source/Network/TextEncoding.h, Source/Network/Http/CURLMgr.h, Source/Render/Textures/Texture.h, Source/UI/Layout/SnapMgr.h, Source/UI/Party/UIRequestJoinPartyMgr.h, Source/UI/Window/FrameFocus.h, Source/UI/Window/UIWindow.h, Source/Utility/Async/NMessageMgr.h.
49 lines
1.4 KiB
C++
49 lines
1.4 KiB
C++
#ifndef RAGNAROK_SOURCE_UI_LAYOUT_SNAPMGR_H
|
|
#define RAGNAROK_SOURCE_UI_LAYOUT_SNAPMGR_H
|
|
|
|
#include <list>
|
|
|
|
class SnapObject;
|
|
class UIWindow;
|
|
struct WindowSnapping;
|
|
|
|
class CSnapMgr {
|
|
public:
|
|
CSnapMgr();
|
|
virtual ~CSnapMgr();
|
|
void SetRoot(UIWindow* window);
|
|
void Add(UIWindow* window);
|
|
void Remove(UIWindow* window);
|
|
void Clear();
|
|
bool IsRoot(const UIWindow* window) const;
|
|
bool Contains(const UIWindow* window) const;
|
|
bool Connected(UIWindow* from, UIWindow* to);
|
|
bool ConnectedToRoot(UIWindow* window);
|
|
void UpdateLinks(SnapObject* object);
|
|
void Refresh(UIWindow* window);
|
|
void CaptureOrigins(UIWindow* window);
|
|
void ConstrainGroup(UIWindow* window, int& dx, int& dy, WindowSnapping& snapping);
|
|
void MoveConnected(UIWindow* window, int dx, int dy, WindowSnapping& snapping);
|
|
void MoveEdge(UIWindow* window, int dx, int dy, int side, WindowSnapping& snapping);
|
|
|
|
/* 0004 */ SnapObject* root;
|
|
/* 0008 */ std::list<SnapObject*> objects;
|
|
|
|
private:
|
|
void ResetVisited();
|
|
SnapObject* Find(const UIWindow* window) const;
|
|
static void MoveBranch(SnapObject* object, int dx, int dy, int side, WindowSnapping& snapping);
|
|
CSnapMgr(const CSnapMgr&) = delete;
|
|
CSnapMgr& operator=(const CSnapMgr&) = delete;
|
|
};
|
|
|
|
extern const int g_snapOppositeSide[4];
|
|
extern bool g_snapEnabled;
|
|
extern int g_snapDirection;
|
|
extern SnapObject* g_snapBoundary;
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CSnapMgr) == 16);
|
|
#endif
|
|
|
|
#endif
|