rodecomp/Source/UI/SnapObject.h
2026-10-24 00:35:19 +00:00

28 lines
676 B
C++

#ifndef RAGNAROK_SOURCE_UI_SNAPOBJECT_H
#define RAGNAROK_SOURCE_UI_SNAPOBJECT_H
#include <list>
class UIWindow;
// RTTI SnapObject, owned by CSnapMgr. Window/edge pointers are borrowed.
class SnapObject {
public:
SnapObject();
virtual ~SnapObject();
int AdjacentSide(const SnapObject& other) const;
void Remove(SnapObject* object);
bool Contains(SnapObject* target);
bool Connected(SnapObject* target);
void AccumulateHeight(int& height, int side) const;
/* 0004 */ UIWindow* window;
/* 0008 */ std::list<SnapObject*> edges[4];
/* 0028 */ int visited;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(SnapObject) == 44);
#endif
#endif