aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2008-11-03 16:38:47 +0000
committerMax Horn2008-11-03 16:38:47 +0000
commit55da1fdd290554bd79b39981182bb7a536799580 (patch)
treef7d9e8eb1ca4d35d6cd961b39ae7566ff9c6fea8 /gui
parent9e74c41dbd5050a819f4e10ce17f45f3edb534d3 (diff)
downloadscummvm-rg350-55da1fdd290554bd79b39981182bb7a536799580.tar.gz
scummvm-rg350-55da1fdd290554bd79b39981182bb7a536799580.tar.bz2
scummvm-rg350-55da1fdd290554bd79b39981182bb7a536799580.zip
Renamed ThemeLayout::buildCopy to buildCopy::makeClone
svn-id: r34881
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeLayout.cpp7
-rw-r--r--gui/ThemeLayout.h18
2 files changed, 12 insertions, 13 deletions
diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp
index 247c1c0d5e..676fa0789b 100644
--- a/gui/ThemeLayout.cpp
+++ b/gui/ThemeLayout.cpp
@@ -45,9 +45,9 @@ void ThemeLayout::importLayout(ThemeLayout *layout) {
if (getLayoutType() == layout->getLayoutType()) {
for (uint i = 0; i < layout->_children.size(); ++i)
- _children.push_back(layout->_children[i]->buildCopy());
+ _children.push_back(layout->_children[i]->makeClone());
} else {
- _children.push_back(layout->buildCopy());
+ _children.push_back(layout->makeClone());
}
}
@@ -152,8 +152,7 @@ void ThemeLayoutVertical::reflowLayout() {
if (_centered && _children[i]->getWidth() < _w && _w != -1) {
_children[i]->setX((_w >> 1) - (_children[i]->getWidth() >> 1));
- }
- else
+ } else
_children[i]->setX(curX);
curY += _children[i]->getHeight() + _spacing;
diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h
index 87078d086e..0c4b65a1a8 100644
--- a/gui/ThemeLayout.h
+++ b/gui/ThemeLayout.h
@@ -115,7 +115,7 @@ public:
return true;
}
- virtual ThemeLayout *buildCopy() = 0;
+ virtual ThemeLayout *makeClone() = 0;
void importLayout(ThemeLayout *layout);
protected:
@@ -148,7 +148,7 @@ public:
const char *getName() { return "Global Layout"; }
LayoutType getLayoutType() { return kLayoutMain; }
- ThemeLayout *buildCopy() { assert(!"Do not copy Main Layouts!"); return 0; }
+ ThemeLayout *makeClone() { assert(!"Do not copy Main Layouts!"); return 0; }
protected:
int16 _defaultX;
@@ -168,11 +168,11 @@ public:
LayoutType getLayoutType() { return kLayoutVertical; }
- ThemeLayout *buildCopy() {
+ ThemeLayout *makeClone() {
ThemeLayoutVertical *n = new ThemeLayoutVertical(*this);
- for (uint i = 0; i < n->_children.size(); ++ i)
- n->_children[i] = n->_children[i]->buildCopy();
+ for (uint i = 0; i < n->_children.size(); ++i)
+ n->_children[i] = n->_children[i]->makeClone();
return n;
}
@@ -190,11 +190,11 @@ public:
const char *getName() { return "Horizontal Layout"; }
LayoutType getLayoutType() { return kLayoutHorizontal; }
- ThemeLayout *buildCopy() {
+ ThemeLayout *makeClone() {
ThemeLayoutHorizontal *n = new ThemeLayoutHorizontal(*this);
for (uint i = 0; i < n->_children.size(); ++ i)
- n->_children[i] = n->_children[i]->buildCopy();
+ n->_children[i] = n->_children[i]->makeClone();
return n;
}
@@ -211,7 +211,7 @@ public:
void reflowLayout() {}
LayoutType getLayoutType() { return kLayoutWidget; }
- ThemeLayout *buildCopy() { return new ThemeLayoutWidget(*this); }
+ ThemeLayout *makeClone() { return new ThemeLayoutWidget(*this); }
};
class ThemeLayoutSpacing : public ThemeLayout {
@@ -231,7 +231,7 @@ public:
LayoutType getLayoutType() { return kLayoutWidget; }
const char *getName() { return "SPACE"; }
- ThemeLayout *buildCopy() { return new ThemeLayoutSpacing(*this); }
+ ThemeLayout *makeClone() { return new ThemeLayoutSpacing(*this); }
};
}