From 3abd781670e4cd7a82d5ab2966ef9f8131535b54 Mon Sep 17 00:00:00 2001 From: pescuma Date: Tue, 6 Jan 2009 05:45:37 +0000 Subject: skins: Added border to fields State is now got through interface It works! git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@124 c086bb3d-8645-0410-b8da-73a8550f86e7 --- Plugins/skins/SkinLib/DialogState.cpp | 53 ++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) (limited to 'Plugins/skins/SkinLib/DialogState.cpp') diff --git a/Plugins/skins/SkinLib/DialogState.cpp b/Plugins/skins/SkinLib/DialogState.cpp index 8643c06..e1e7654 100644 --- a/Plugins/skins/SkinLib/DialogState.cpp +++ b/Plugins/skins/SkinLib/DialogState.cpp @@ -34,6 +34,36 @@ FieldState * DialogState::getField(const char *name) const return NULL; } +int DialogState::getX() const +{ + return 0; +} + +int DialogState::getY() const +{ + return 0; +} + +int DialogState::getLeft() const +{ + return getX(); +} + +int DialogState::getTop() const +{ + return getY(); +} + +int DialogState::getRight() const +{ + return getX() + getWidth(); +} + +int DialogState::getBottom() const +{ + return getY() + getHeight(); +} + int DialogState::getWidth() const { if (size.x >= 0) @@ -78,4 +108,25 @@ int DialogState::getHorizontalBorders() const int DialogState::getVerticalBorders() const { return borders.getTop() + borders.getBottom(); -} \ No newline at end of file +} + +RECT DialogState::getInsideRect() const +{ + RECT ret; + ret.left = borders.getLeft(); + ret.right = ret.left + getWidth(); + ret.top = borders.getTop(); + ret.bottom = ret.top + getHeight(); + return ret; +} + +RECT DialogState::getRect() const +{ + RECT ret; + ret.left = 0; + ret.right = borders.getLeft() + getWidth() + borders.getRight(); + ret.top = 0; + ret.bottom = borders.getTop() + getHeight() + borders.getBottom(); + return ret; +} + -- cgit v1.2.3