From 9242a80a84fa5c96dbadec9594177875aeeec1ac Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 10 Jul 2012 18:37:21 +0000 Subject: only added MyDetails and Skins. not adopted yet git-svn-id: http://svn.miranda-ng.org/main/trunk@892 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Skins/SkinLib/BorderState.cpp | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 plugins/Skins/SkinLib/BorderState.cpp (limited to 'plugins/Skins/SkinLib/BorderState.cpp') diff --git a/plugins/Skins/SkinLib/BorderState.cpp b/plugins/Skins/SkinLib/BorderState.cpp new file mode 100644 index 0000000000..83dcdbcf11 --- /dev/null +++ b/plugins/Skins/SkinLib/BorderState.cpp @@ -0,0 +1,61 @@ +#include "globals.h" +#include +#include "BorderState.h" + +BorderState::BorderState(int aLeft, int aRight, int aTop, int aBottom) + : left(aLeft), right(aRight), top(aTop), bottom(aBottom) +{ +} + +BorderState::~BorderState() +{ +} + +int BorderState::getLeft() const +{ + return left; +} + +void BorderState::setLeft(int left) +{ + this->left = max(0, left); +} + +int BorderState::getRight() const +{ + return right; +} + +void BorderState::setRight(int right) +{ + this->right = max(0, right); +} + +int BorderState::getTop() const +{ + return top; +} + +void BorderState::setTop(int top) +{ + this->top = max(0, top); +} + +int BorderState::getBottom() const +{ + return bottom; +} + +void BorderState::setBottom(int bottom) +{ + this->bottom = max(0, bottom); +} + +void BorderState::setAll(int border) +{ + border = max(0, border); + left = border; + right = border; + top = border; + bottom = border; +} -- cgit v1.2.3