* Starting work on resource manager.

* Modified rak::accumulate to require accessing ::result instead of
using a reference.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@568 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-09-20 13:53:45 +00:00
parent 94d31cc681
commit 108ad78d30
4 changed files with 135 additions and 9 deletions
+6 -5
View File
@@ -64,11 +64,12 @@ Manager::find(Window* w) {
void
Manager::adjust_layout() {
int countDynamic = 0;
int staticHeight = 0;
std::for_each(begin(), end(), rak::if_then(std::mem_fun(&Window::is_active), rak::accumulate(staticHeight, std::mem_fun(&Window::get_min_height))));
std::for_each(begin(), end(), rak::if_then(std::mem_fun(&Window::is_active), rak::accumulate(countDynamic, std::mem_fun(&Window::is_dynamic))));
int staticHeight = std::for_each(begin(), end(),
rak::if_then(std::mem_fun(&Window::is_active),
rak::accumulate(0, std::mem_fun(&Window::get_min_height)))).m_then.result;
int countDynamic = std::for_each(begin(), end(),
rak::if_then(std::mem_fun(&Window::is_active),
rak::accumulate(0, std::mem_fun(&Window::is_dynamic)))).m_then.result;
int dynamic = std::max(0, Canvas::get_screen_height() - staticHeight);
int height = 0, h;