diff options
author | Stijn Buys <ingar@osirion.org> | 2011-09-04 17:54:51 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-09-04 17:54:51 +0000 |
commit | 69eed715f80c24c2435c82bb9fa1954697bf3af0 (patch) | |
tree | a21aa14d2ecfa86b94d3b122c2c972d758425782 /src/ui/container.cc | |
parent | edd5dfcd15198f5d5d277835fdf75108eb67472d (diff) |
Moved main menu infrastructure into client namespace,
removed ui::Container and ui::Menu classes.
Diffstat (limited to 'src/ui/container.cc')
-rw-r--r-- | src/ui/container.cc | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/ui/container.cc b/src/ui/container.cc deleted file mode 100644 index ebe2821..0000000 --- a/src/ui/container.cc +++ /dev/null @@ -1,45 +0,0 @@ -/* - ui/container.cc - This file is part of the Osirion project and is distributed under - the terms of the GNU General Public License version 2 -*/ - - -#include "ui/container.h" -#include "ui/paint.h" -#include "ui/ui.h" - -namespace ui -{ - -// TODO Container::direction -Container::Container(Widget *parent) : Window(parent) -{ - set_label("container"); - set_border(true); - set_background(true); -} - -Container::~Container() -{ -} - -void Container::resize() -{ - float w = UI::elementsize.width() * 1.5f; - float h = children().size() * (UI::elementsize.height() + UI::elementmargin) + UI::elementsize.height(); - set_size(w, h); - - const float x = UI::elementsize.width() * 0.25f; - float y = UI::elementsize.height() * 0.5f; - - // reposition all children within the container - for (Children::iterator it = children().begin(); it != children().end(); it++) { - Widget *w = (*it); - w->set_size(UI::elementsize); - w->set_location(x, y); - y += UI::elementsize.height() + UI::elementmargin; - } -} - -} |