diff options
Diffstat (limited to 'src/FbTk/Container.cc')
-rw-r--r-- | src/FbTk/Container.cc | 14 |
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 | ||
35 | using namespace std::placeholders; | ||
36 | |||
35 | namespace FbTk { | 37 | namespace FbTk { |
36 | 38 | ||
37 | typedef CompareEqual_base<FbWindow, Window> CompareWindow; | 39 | typedef CompareEqual_base<FbWindow, Window> CompareWindow; |
@@ -491,27 +493,27 @@ unsigned int Container::maxWidthPerClient() const { | |||
491 | return 1; | 493 | return 1; |
492 | } | 494 | } |
493 | 495 | ||
494 | void Container::for_each(std::mem_fun_t<void, FbWindow> function) { | 496 | void 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 | ||
498 | void Container::setAlpha(int alpha) { | 500 | void 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 | ||
503 | void Container::parentMoved() { | 505 | void 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 | ||
508 | void Container::invalidateBackground() { | 510 | void 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 | ||
513 | void Container::clear() { | 515 | void 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 | ||
517 | void Container::setOrientation(Orientation orient) { | 519 | void 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)) || |