mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
merge total remake
This commit is contained in:
27
src/framework/ui/uianchor.h
Normal file
27
src/framework/ui/uianchor.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef UIANCHOR_H
|
||||
#define UIANCHOR_H
|
||||
|
||||
#include "uideclarations.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
|
Reference in New Issue
Block a user