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.
30 lines
727 B
30 lines
727 B
#ifndef UIANCHOR_H
|
|
#define UIANCHOR_H
|
|
|
|
#include "declarations.h"
|
|
|
|
class UIAnchor
|
|
{
|
|
public:
|
|
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; }
|
|
|
|
private:
|
|
AnchorEdge m_anchoredEdge;
|
|
UIWidgetWeakPtr m_hookedWidget;
|
|
std::string m_hookedWidgetId;
|
|
AnchorEdge m_hookedEdge;
|
|
};
|
|
|
|
#endif
|