Changeset 10775 for code/branches/cpp11_v2/src/libraries/core/GUIManager.cc
- Timestamp:
- Nov 8, 2015, 10:40:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/GUIManager.cc
r10773 r10775 32 32 #include <fstream> 33 33 #include <memory> 34 #include < boost/bind.hpp>34 #include <functional> 35 35 #include <OgreRenderQueue.h> 36 36 #include <OgreRenderWindow.h> … … 115 115 namespace orxonox 116 116 { 117 namespace arg = std::placeholders; 118 117 119 static void key_esc() 118 120 { GUIManager::getInstance().keyESC(); } … … 451 453 { 452 454 assert(guiSystem_); 453 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectTimePulse,_1, time.getDeltaTime()));455 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectTimePulse, arg::_1, time.getDeltaTime())); 454 456 } 455 457 … … 627 629 { 628 630 #if CEGUI_VERSION >= 0x000800 629 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectKeyDown,_1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work?630 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectChar,_1, evt.getText()));631 #else 632 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectKeyDown,_1, evt.getKeyCode()));633 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectChar,_1, evt.getText()));631 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectKeyDown, arg::_1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work? 632 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectChar, arg::_1, evt.getText())); 633 #else 634 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectKeyDown, arg::_1, evt.getKeyCode())); 635 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectChar, arg::_1, evt.getText())); 634 636 #endif 635 637 } … … 638 640 { 639 641 #if CEGUI_VERSION >= 0x000800 640 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectKeyUp,_1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work?641 #else 642 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectKeyUp,_1, evt.getKeyCode()));642 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectKeyUp, arg::_1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work? 643 #else 644 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectKeyUp, arg::_1, evt.getKeyCode())); 643 645 #endif 644 646 } … … 656 658 { 657 659 #if CEGUI_VERSION >= 0x000800 658 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMouseButtonDown,_1, convertButton(id)));659 #else 660 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMouseButtonDown,_1, convertButton(id)));660 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMouseButtonDown, arg::_1, convertButton(id))); 661 #else 662 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMouseButtonDown, arg::_1, convertButton(id))); 661 663 #endif 662 664 } … … 674 676 { 675 677 #if CEGUI_VERSION >= 0x000800 676 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMouseButtonUp,_1, convertButton(id)));677 #else 678 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMouseButtonUp,_1, convertButton(id)));678 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMouseButtonUp, arg::_1, convertButton(id))); 679 #else 680 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMouseButtonUp, arg::_1, convertButton(id))); 679 681 #endif 680 682 } … … 683 685 { 684 686 #if CEGUI_VERSION >= 0x000800 685 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMousePosition,_1, (float)abs.x, (float)abs.y));686 #else 687 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMousePosition,_1, (float)abs.x, (float)abs.y));687 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMousePosition, arg::_1, (float)abs.x, (float)abs.y)); 688 #else 689 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMousePosition, arg::_1, (float)abs.x, (float)abs.y)); 688 690 #endif 689 691 } … … 692 694 { 693 695 #if CEGUI_VERSION >= 0x000800 694 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMouseWheelChange,_1, (float)sgn(rel) * this->numScrollLines_));695 #else 696 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMouseWheelChange,_1, (float)sgn(rel) * this->numScrollLines_));696 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMouseWheelChange, arg::_1, (float)sgn(rel) * this->numScrollLines_)); 697 #else 698 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMouseWheelChange, arg::_1, (float)sgn(rel) * this->numScrollLines_)); 697 699 #endif 698 700 } … … 704 706 { 705 707 #if CEGUI_VERSION >= 0x000800 706 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMouseLeaves,_1));707 #else 708 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMouseLeaves,_1));708 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMouseLeaves, arg::_1)); 709 #else 710 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMouseLeaves, arg::_1)); 709 711 #endif 710 712 } … … 753 755 terminate the whole program... 754 756 @note 755 Your life gets easier if you use boost::bind to create the object/function.757 Your life gets easier if you use std::bind to create the object/function. 756 758 @param function 757 759 Any callable object/function that takes this->guiSystem_ as its only parameter.
Note: See TracChangeset
for help on using the changeset viewer.