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

28 lines
645 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
struct AnchorLine {
AnchorLine(std::string widgetId, AnchorPoint edge) : widgetId(widgetId), edge(edge) { }
std::string widgetId;
AnchorPoint edge;
};
class UIAnchor
{
public:
UIAnchor(const UIWidgetPtr& anchoredWidget, AnchorPoint anchoredEdge, const AnchorLine& anchorLine);
UIWidgetPtr getAnchorLineWidget() const;
UIWidgetPtr getAnchoredWidget() const;
AnchorPoint getAnchoredEdge() const;
int getAnchorLinePoint() const;
private:
UIWidgetWeakPtr m_anchoredWidget;
AnchorPoint m_anchoredEdge;
AnchorLine m_anchorLine;
};
#endif