You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
645 B
28 lines
645 B
#ifndef UIANCHOR_H
|
|
#define UIANCHOR_H
|
|
|
|
#include "declarations.h"
|
|
|
|
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
|