tibia-client/src/framework/ui/uianchor.h

30 lines
727 B
C
Raw Normal View History

2011-08-14 04:09:11 +02:00
#ifndef UIANCHOR_H
#define UIANCHOR_H
2011-08-15 16:06:15 +02:00
#include "declarations.h"
2011-08-14 04:09:11 +02:00
class UIAnchor
{
public:
2011-08-21 21:43:05 +02:00
enum {
INVALID_POINT = -999999
};
UIAnchor(AnchorEdge anchoredEdge, const std::string& hookedWidgetId, AnchorEdge hookedEdge);
AnchorEdge getAnchoredEdge() const { return m_anchoredEdge; }
UIWidgetPtr getHookedWidget() const { return m_hookedWidget.lock(); }
std::string getHookedWidgetId() const { return m_hookedWidgetId; }
int getHookedPoint() const;
void setHookedWidget(const UIWidgetPtr hookedWidget) { m_hookedWidget = hookedWidget; }
2011-08-14 04:09:11 +02:00
private:
2011-08-21 21:43:05 +02:00
AnchorEdge m_anchoredEdge;
UIWidgetWeakPtr m_hookedWidget;
std::string m_hookedWidgetId;
AnchorEdge m_hookedEdge;
2011-08-14 04:09:11 +02:00
};
#endif