aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Container.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Container.cc')
-rw-r--r--src/FbTk/Container.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/FbTk/Container.cc b/src/FbTk/Container.cc
index cea761b..713d36b 100644
--- a/src/FbTk/Container.cc
+++ b/src/FbTk/Container.cc
@@ -32,6 +32,8 @@
32#include <algorithm> 32#include <algorithm>
33#include <vector> 33#include <vector>
34 34
35using namespace std::placeholders;
36
35namespace FbTk { 37namespace FbTk {
36 38
37typedef CompareEqual_base<FbWindow, Window> CompareWindow; 39typedef CompareEqual_base<FbWindow, Window> CompareWindow;
@@ -491,27 +493,27 @@ unsigned int Container::maxWidthPerClient() const {
491 return 1; 493 return 1;
492} 494}
493 495
494void Container::for_each(std::mem_fun_t<void, FbWindow> function) { 496void Container::for_each(std::function<void(Item)> function) {
495 std::for_each(begin(), end(), function); 497 std::for_each(begin(), end(), function);
496} 498}
497 499
498void Container::setAlpha(int alpha) { 500void Container::setAlpha(int alpha) {
499 FbWindow::setAlpha(alpha); 501 FbWindow::setAlpha(alpha);
500 STLUtil::forAll(m_item_list, std::bind2nd(std::mem_fun(&Button::setAlpha), alpha)); 502 STLUtil::forAll(m_item_list, std::bind(std::mem_fn(&Button::setAlpha), _1, alpha));
501} 503}
502 504
503void Container::parentMoved() { 505void Container::parentMoved() {
504 FbWindow::parentMoved(); 506 FbWindow::parentMoved();
505 STLUtil::forAll(m_item_list, std::mem_fun(&Button::parentMoved)); 507 STLUtil::forAll(m_item_list, std::mem_fn(&Button::parentMoved));
506} 508}
507 509
508void Container::invalidateBackground() { 510void Container::invalidateBackground() {
509 FbWindow::invalidateBackground(); 511 FbWindow::invalidateBackground();
510 STLUtil::forAll(m_item_list, std::mem_fun(&Button::invalidateBackground)); 512 STLUtil::forAll(m_item_list, std::mem_fn(&Button::invalidateBackground));
511} 513}
512 514
513void Container::clear() { 515void Container::clear() {
514 STLUtil::forAll(m_item_list, std::mem_fun(&Button::clear)); 516 STLUtil::forAll(m_item_list, std::mem_fn(&Button::clear));
515} 517}
516 518
517void Container::setOrientation(Orientation orient) { 519void Container::setOrientation(Orientation orient) {
@@ -519,7 +521,7 @@ void Container::setOrientation(Orientation orient) {
519 return; 521 return;
520 522
521 FbWindow::invalidateBackground(); 523 FbWindow::invalidateBackground();
522 STLUtil::forAll(m_item_list, std::bind2nd(std::mem_fun(&Button::setOrientation), orient)); 524 STLUtil::forAll(m_item_list, std::bind(std::mem_fn(&Button::setOrientation),_1, orient));
523 525
524 if (((m_orientation == ROT0 || m_orientation == ROT180) && 526 if (((m_orientation == ROT0 || m_orientation == ROT180) &&
525 (orient == ROT90 || orient == ROT270)) || 527 (orient == ROT90 || orient == ROT270)) ||