Replace boost::function and boost::bind with their std:: counterparts
This commit is contained in:
parent
cef8b388a5
commit
fde12ebd25
|
@ -39,7 +39,8 @@
|
||||||
#endif /* __WXDEBUG__ */
|
#endif /* __WXDEBUG__ */
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
|
|
||||||
using namespace KIGFX;
|
using namespace KIGFX;
|
||||||
|
@ -1532,7 +1533,7 @@ void OPENGL_GAL::OPENGL_TEST::Render( wxPaintEvent& WXUNUSED( aEvent ) )
|
||||||
|
|
||||||
// One test is enough - close the testing dialog when the test is finished
|
// One test is enough - close the testing dialog when the test is finished
|
||||||
Disconnect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::OPENGL_TEST::Render ) );
|
Disconnect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::OPENGL_TEST::Render ) );
|
||||||
CallAfter( boost::bind( &wxDialog::EndModal, m_parent, wxID_NONE ) );
|
CallAfter( std::bind( &wxDialog::EndModal, m_parent, wxID_NONE ) );
|
||||||
|
|
||||||
GL_CONTEXT_MANAGER::Get().LockCtx( m_context, this );
|
GL_CONTEXT_MANAGER::Get().LockCtx( m_context, this );
|
||||||
GLenum err = glewInit();
|
GLenum err = glewInit();
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
#include <tool/tool_interactive.h>
|
#include <tool/tool_interactive.h>
|
||||||
#include <tool/context_menu.h>
|
#include <tool/context_menu.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
CONTEXT_MENU::CONTEXT_MENU() :
|
CONTEXT_MENU::CONTEXT_MENU() :
|
||||||
|
@ -190,7 +191,7 @@ void CONTEXT_MENU::UpdateAll()
|
||||||
if( m_tool )
|
if( m_tool )
|
||||||
updateHotKeys();
|
updateHotKeys();
|
||||||
|
|
||||||
runOnSubmenus( boost::bind( &CONTEXT_MENU::UpdateAll, _1 ) );
|
runOnSubmenus( std::bind( &CONTEXT_MENU::UpdateAll, _1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,7 +199,7 @@ void CONTEXT_MENU::SetTool( TOOL_INTERACTIVE* aTool )
|
||||||
{
|
{
|
||||||
m_tool = aTool;
|
m_tool = aTool;
|
||||||
|
|
||||||
runOnSubmenus( boost::bind( &CONTEXT_MENU::SetTool, _1, aTool ) );
|
runOnSubmenus( std::bind( &CONTEXT_MENU::SetTool, _1, aTool ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -306,11 +307,11 @@ void CONTEXT_MENU::runEventHandlers( const wxMenuEvent& aMenuEvent, OPT_TOOL_EVE
|
||||||
aToolEvent = m_menu_handler( aMenuEvent );
|
aToolEvent = m_menu_handler( aMenuEvent );
|
||||||
|
|
||||||
if( !aToolEvent )
|
if( !aToolEvent )
|
||||||
runOnSubmenus( boost::bind( &CONTEXT_MENU::runEventHandlers, _1, aMenuEvent, aToolEvent ) );
|
runOnSubmenus( std::bind( &CONTEXT_MENU::runEventHandlers, _1, aMenuEvent, aToolEvent ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CONTEXT_MENU::runOnSubmenus( boost::function<void(CONTEXT_MENU*)> aFunction )
|
void CONTEXT_MENU::runOnSubmenus( std::function<void(CONTEXT_MENU*)> aFunction )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <boost/function.hpp>
|
#include <functional>
|
||||||
|
|
||||||
#include <wx/menu.h>
|
#include <wx/menu.h>
|
||||||
#include <tool/tool_action.h>
|
#include <tool/tool_action.h>
|
||||||
|
@ -126,8 +126,8 @@ public:
|
||||||
void UpdateAll();
|
void UpdateAll();
|
||||||
|
|
||||||
// Helper typedefs
|
// Helper typedefs
|
||||||
typedef boost::function<OPT_TOOL_EVENT(const wxMenuEvent&)> MENU_HANDLER;
|
typedef std::function<OPT_TOOL_EVENT(const wxMenuEvent&)> MENU_HANDLER;
|
||||||
typedef boost::function<void()> UPDATE_HANDLER;
|
typedef std::function<void()> UPDATE_HANDLER;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SetMenuHandler()
|
* Function SetMenuHandler()
|
||||||
|
@ -192,7 +192,7 @@ private:
|
||||||
void runEventHandlers( const wxMenuEvent& aMenuEvent, OPT_TOOL_EVENT& aToolEvent );
|
void runEventHandlers( const wxMenuEvent& aMenuEvent, OPT_TOOL_EVENT& aToolEvent );
|
||||||
|
|
||||||
///> Runs a function on the menu and all its submenus.
|
///> Runs a function on the menu and all its submenus.
|
||||||
void runOnSubmenus( boost::function<void(CONTEXT_MENU*)> aFunction );
|
void runOnSubmenus( std::function<void(CONTEXT_MENU*)> aFunction );
|
||||||
|
|
||||||
///> Flag indicating that the menu title was set up.
|
///> Flag indicating that the menu title was set up.
|
||||||
bool m_titleSet;
|
bool m_titleSet;
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
#include <class_drawpanel.h>
|
#include <class_drawpanel.h>
|
||||||
#include <class_draw_panel_gal.h>
|
#include <class_draw_panel_gal.h>
|
||||||
|
@ -569,7 +570,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed
|
||||||
if( item->Type() == PCB_MODULE_T )
|
if( item->Type() == PCB_MODULE_T )
|
||||||
{
|
{
|
||||||
MODULE* oldModule = static_cast<MODULE*>( item );
|
MODULE* oldModule = static_cast<MODULE*>( item );
|
||||||
oldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
oldModule->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
||||||
}
|
}
|
||||||
view->Remove( item );
|
view->Remove( item );
|
||||||
ratsnest->Remove( item );
|
ratsnest->Remove( item );
|
||||||
|
@ -581,7 +582,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed
|
||||||
if( item->Type() == PCB_MODULE_T )
|
if( item->Type() == PCB_MODULE_T )
|
||||||
{
|
{
|
||||||
MODULE* newModule = static_cast<MODULE*>( item );
|
MODULE* newModule = static_cast<MODULE*>( item );
|
||||||
newModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
newModule->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
||||||
}
|
}
|
||||||
view->Add( item );
|
view->Add( item );
|
||||||
ratsnest->Add( item );
|
ratsnest->Add( item );
|
||||||
|
@ -598,7 +599,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed
|
||||||
if( item->Type() == PCB_MODULE_T )
|
if( item->Type() == PCB_MODULE_T )
|
||||||
{
|
{
|
||||||
MODULE* module = static_cast<MODULE*>( item );
|
MODULE* module = static_cast<MODULE*>( item );
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
view->Remove( item );
|
view->Remove( item );
|
||||||
|
@ -612,7 +613,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed
|
||||||
if( item->Type() == PCB_MODULE_T )
|
if( item->Type() == PCB_MODULE_T )
|
||||||
{
|
{
|
||||||
MODULE* module = static_cast<MODULE*>( item );
|
MODULE* module = static_cast<MODULE*>( item );
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1) );
|
||||||
}
|
}
|
||||||
view->Add( item );
|
view->Add( item );
|
||||||
|
|
||||||
|
|
|
@ -853,7 +853,7 @@ EDA_ITEM* MODULE::Clone() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MODULE::RunOnChildren( boost::function<void (BOARD_ITEM*)> aFunction )
|
void MODULE::RunOnChildren( std::function<void (BOARD_ITEM*)> aFunction )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -866,7 +866,7 @@ void MODULE::RunOnChildren( boost::function<void (BOARD_ITEM*)> aFunction )
|
||||||
aFunction( static_cast<BOARD_ITEM*>( m_Reference ) );
|
aFunction( static_cast<BOARD_ITEM*>( m_Reference ) );
|
||||||
aFunction( static_cast<BOARD_ITEM*>( m_Value ) );
|
aFunction( static_cast<BOARD_ITEM*>( m_Value ) );
|
||||||
}
|
}
|
||||||
catch( boost::bad_function_call& e )
|
catch( std::bad_function_call& e )
|
||||||
{
|
{
|
||||||
DisplayError( NULL, wxT( "Error running MODULE::RunOnChildren" ) );
|
DisplayError( NULL, wxT( "Error running MODULE::RunOnChildren" ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include <PolyLine.h>
|
#include <PolyLine.h>
|
||||||
#include "zones.h"
|
#include "zones.h"
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <functional>
|
||||||
|
|
||||||
class LINE_READER;
|
class LINE_READER;
|
||||||
class EDA_3D_CANVAS;
|
class EDA_3D_CANVAS;
|
||||||
|
@ -551,7 +551,7 @@ public:
|
||||||
* Invokes a function on all BOARD_ITEMs that belong to the module (pads, drawings, texts).
|
* Invokes a function on all BOARD_ITEMs that belong to the module (pads, drawings, texts).
|
||||||
* @param aFunction is the function to be invoked.
|
* @param aFunction is the function to be invoked.
|
||||||
*/
|
*/
|
||||||
void RunOnChildren( boost::function<void (BOARD_ITEM*)> aFunction );
|
void RunOnChildren( std::function<void (BOARD_ITEM*)> aFunction );
|
||||||
|
|
||||||
/// @copydoc VIEW_ITEM::ViewUpdate()
|
/// @copydoc VIEW_ITEM::ViewUpdate()
|
||||||
void ViewUpdate( int aUpdateFlags = KIGFX::VIEW_ITEM::ALL );
|
void ViewUpdate( int aUpdateFlags = KIGFX::VIEW_ITEM::ALL );
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
#include <class_drawpanel.h>
|
#include <class_drawpanel.h>
|
||||||
|
@ -207,7 +208,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete()
|
||||||
itemPicker.SetItem( item );
|
itemPicker.SetItem( item );
|
||||||
pickersList.PushItem( itemPicker );
|
pickersList.PushItem( itemPicker );
|
||||||
static_cast<MODULE*>( item )->RunOnChildren(
|
static_cast<MODULE*>( item )->RunOnChildren(
|
||||||
boost::bind( &KIGFX::VIEW_ITEM::ViewRelease, _1 ) );
|
std::bind( &KIGFX::VIEW_ITEM::ViewRelease, _1 ) );
|
||||||
ratsnest->Remove( item );
|
ratsnest->Remove( item );
|
||||||
item->ViewRelease();
|
item->ViewRelease();
|
||||||
item->UnLink();
|
item->UnLink();
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
#include <ratsnest_data.h>
|
#include <ratsnest_data.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST *aNetlist ) :
|
DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST *aNetlist ) :
|
||||||
DIALOG_UPDATE_PCB_BASE ( aParent ),
|
DIALOG_UPDATE_PCB_BASE ( aParent ),
|
||||||
|
@ -44,7 +45,7 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun )
|
||||||
// Remove old modules
|
// Remove old modules
|
||||||
for( MODULE* module = board->m_Modules; module; module = module->Next() )
|
for( MODULE* module = board->m_Modules; module; module = module->Next() )
|
||||||
{
|
{
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
||||||
view->Remove( module );
|
view->Remove( module );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +93,7 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun )
|
||||||
// Reload modules
|
// Reload modules
|
||||||
for( MODULE* module = board->m_Modules; module; module = module->Next() )
|
for( MODULE* module = board->m_Modules; module; module = module->Next() )
|
||||||
{
|
{
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
||||||
view->Add( module );
|
view->Add( module );
|
||||||
module->ViewUpdate();
|
module->ViewUpdate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
* @brief Footprints selection and loading functions.
|
* @brief Footprints selection and loading functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
#include <class_drawpanel.h>
|
#include <class_drawpanel.h>
|
||||||
|
@ -99,7 +100,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule )
|
||||||
aModule = newModule;
|
aModule = newModule;
|
||||||
|
|
||||||
newModule->ClearFlags();
|
newModule->ClearFlags();
|
||||||
newModule->RunOnChildren( boost::bind( &clearModuleItemFlags, _1 ) );
|
newModule->RunOnChildren( std::bind( &clearModuleItemFlags, _1 ) );
|
||||||
|
|
||||||
GetBoard()->Add( newModule );
|
GetBoard()->Add( newModule );
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,8 @@
|
||||||
#include <footprint_wizard_frame.h>
|
#include <footprint_wizard_frame.h>
|
||||||
#include <pcbnew_config.h>
|
#include <pcbnew_config.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
|
|
||||||
// Functions defined in block_module_editor, but used here
|
// Functions defined in block_module_editor, but used here
|
||||||
|
@ -463,7 +464,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
if( pcbframe->IsGalCanvasActive() )
|
if( pcbframe->IsGalCanvasActive() )
|
||||||
{
|
{
|
||||||
KIGFX::VIEW* view = pcbframe->GetGalCanvas()->GetView();
|
KIGFX::VIEW* view = pcbframe->GetGalCanvas()->GetView();
|
||||||
source_module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
source_module->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view,
|
||||||
|
std::placeholders::_1 ) );
|
||||||
view->Remove( source_module );
|
view->Remove( source_module );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,7 +499,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
ratsnest->Recalculate();
|
ratsnest->Recalculate();
|
||||||
|
|
||||||
KIGFX::VIEW* view = pcbframe->GetGalCanvas()->GetView();
|
KIGFX::VIEW* view = pcbframe->GetGalCanvas()->GetView();
|
||||||
newmodule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
newmodule->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view,
|
||||||
|
std::placeholders::_1 ) );
|
||||||
view->Add( newmodule );
|
view->Add( newmodule );
|
||||||
pcbframe->GetGalCanvas()->ForceRefresh();
|
pcbframe->GetGalCanvas()->ForceRefresh();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
#include <class_drawpanel.h>
|
#include <class_drawpanel.h>
|
||||||
#include <class_draw_panel_gal.h>
|
#include <class_draw_panel_gal.h>
|
||||||
|
@ -104,7 +106,7 @@ void FOOTPRINT_EDIT_FRAME::RestoreCopyFromRedoList( wxCommandEvent& aEvent )
|
||||||
GetScreen()->PushCommandToUndoList( lastcmd );
|
GetScreen()->PushCommandToUndoList( lastcmd );
|
||||||
|
|
||||||
view->Remove( module );
|
view->Remove( module );
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
||||||
|
|
||||||
// Retrieve last module state from undo list
|
// Retrieve last module state from undo list
|
||||||
lastcmd = GetScreen()->PopCommandFromRedoList();
|
lastcmd = GetScreen()->PopCommandFromRedoList();
|
||||||
|
@ -116,7 +118,7 @@ void FOOTPRINT_EDIT_FRAME::RestoreCopyFromRedoList( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
GetBoard()->Add( module );
|
GetBoard()->Add( module );
|
||||||
GetGalCanvas()->GetView()->Add( module );
|
GetGalCanvas()->GetView()->Add( module );
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
||||||
module->ViewUpdate();
|
module->ViewUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +153,7 @@ void FOOTPRINT_EDIT_FRAME::RestoreCopyFromUndoList( wxCommandEvent& aEvent )
|
||||||
GetScreen()->PushCommandToRedoList( lastcmd );
|
GetScreen()->PushCommandToRedoList( lastcmd );
|
||||||
|
|
||||||
view->Remove( module );
|
view->Remove( module );
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
||||||
|
|
||||||
// Retrieve last module state from undo list
|
// Retrieve last module state from undo list
|
||||||
lastcmd = GetScreen()->PopCommandFromUndoList();
|
lastcmd = GetScreen()->PopCommandFromUndoList();
|
||||||
|
@ -163,7 +165,7 @@ void FOOTPRINT_EDIT_FRAME::RestoreCopyFromUndoList( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
GetBoard()->Add( module, ADD_APPEND );
|
GetBoard()->Add( module, ADD_APPEND );
|
||||||
view->Add( module );
|
view->Add( module );
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
||||||
module->ViewUpdate();
|
module->ViewUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,8 @@
|
||||||
#include "tools/pcbnew_control.h"
|
#include "tools/pcbnew_control.h"
|
||||||
#include "tools/common_actions.h"
|
#include "tools/common_actions.h"
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
|
|
||||||
#define NEXT_PART 1
|
#define NEXT_PART 1
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include <class_drawpanel.h>
|
#include <class_drawpanel.h>
|
||||||
|
@ -105,7 +107,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
|
||||||
// Remove old modules
|
// Remove old modules
|
||||||
for( MODULE* module = board->m_Modules; module; module = module->Next() )
|
for( MODULE* module = board->m_Modules; module; module = module->Next() )
|
||||||
{
|
{
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view, _1 ) );
|
||||||
view->Remove( module );
|
view->Remove( module );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,7 +142,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
|
||||||
// Reload modules
|
// Reload modules
|
||||||
for( MODULE* module = board->m_Modules; module; module = module->Next() )
|
for( MODULE* module = board->m_Modules; module; module = module->Next() )
|
||||||
{
|
{
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
||||||
view->Add( module );
|
view->Add( module );
|
||||||
module->ViewUpdate();
|
module->ViewUpdate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
#include <class_track.h>
|
#include <class_track.h>
|
||||||
#include <wxBasePcbFrame.h>
|
#include <wxBasePcbFrame.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
const LAYER_NUM GAL_LAYER_ORDER[] =
|
const LAYER_NUM GAL_LAYER_ORDER[] =
|
||||||
{
|
{
|
||||||
|
@ -145,7 +146,7 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( const BOARD* aBoard )
|
||||||
// Load modules and its additional elements
|
// Load modules and its additional elements
|
||||||
for( MODULE* module = aBoard->m_Modules; module; module = module->Next() )
|
for( MODULE* module = aBoard->m_Modules; module; module = module->Next() )
|
||||||
{
|
{
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, m_view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Add, m_view, _1 ) );
|
||||||
m_view->Add( module );
|
m_view->Add( module );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,8 @@
|
||||||
|
|
||||||
#include <pcb_draw_panel_gal.h>
|
#include <pcb_draw_panel_gal.h>
|
||||||
#include <gal/graphics_abstraction_layer.h>
|
#include <gal/graphics_abstraction_layer.h>
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
///@{
|
///@{
|
||||||
/// \ingroup config
|
/// \ingroup config
|
||||||
|
|
|
@ -42,7 +42,8 @@
|
||||||
#include <boost/range/adaptor/map.hpp>
|
#include <boost/range/adaptor/map.hpp>
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include <geometry/shape_poly_set.h>
|
#include <geometry/shape_poly_set.h>
|
||||||
|
|
||||||
|
@ -379,7 +380,7 @@ void RN_NET::clearNode( const RN_NODE_PTR& aNode )
|
||||||
|
|
||||||
// Remove all ratsnest edges for associated with the node
|
// Remove all ratsnest edges for associated with the node
|
||||||
newEnd = std::remove_if( m_rnEdges->begin(), m_rnEdges->end(),
|
newEnd = std::remove_if( m_rnEdges->begin(), m_rnEdges->end(),
|
||||||
boost::bind( isEdgeConnectingNode, _1, boost::cref( aNode ) ) );
|
std::bind( isEdgeConnectingNode, _1, std::cref( aNode ) ) );
|
||||||
|
|
||||||
m_rnEdges->resize( std::distance( m_rnEdges->begin(), newEnd ) );
|
m_rnEdges->resize( std::distance( m_rnEdges->begin(), newEnd ) );
|
||||||
}
|
}
|
||||||
|
@ -618,7 +619,7 @@ std::list<RN_NODE_PTR> RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode, int aN
|
||||||
closest.push_back( node );
|
closest.push_back( node );
|
||||||
|
|
||||||
// Sort by the distance from aNode
|
// Sort by the distance from aNode
|
||||||
closest.sort( boost::bind( sortDistance, boost::cref( aNode ), _1, _2 ) );
|
closest.sort( std::bind( sortDistance, std::cref( aNode ), _1, _2 ) );
|
||||||
|
|
||||||
// aNode should not be returned in the results
|
// aNode should not be returned in the results
|
||||||
closest.remove( aNode );
|
closest.remove( aNode );
|
||||||
|
@ -642,7 +643,7 @@ std::list<RN_NODE_PTR> RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode,
|
||||||
closest.push_back( node );
|
closest.push_back( node );
|
||||||
|
|
||||||
// Sort by the distance from aNode
|
// Sort by the distance from aNode
|
||||||
closest.sort( boost::bind( sortDistance, boost::cref( aNode ), _1, _2 ) );
|
closest.sort( std::bind( sortDistance, std::cref( aNode ), _1, _2 ) );
|
||||||
|
|
||||||
// aNode should not be returned in the results
|
// aNode should not be returned in the results
|
||||||
closest.remove( aNode );
|
closest.remove( aNode );
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include "class_draw_panel_gal.h"
|
#include "class_draw_panel_gal.h"
|
||||||
#include "class_board.h"
|
#include "class_board.h"
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include "class_draw_panel_gal.h"
|
#include "class_draw_panel_gal.h"
|
||||||
#include "class_board.h"
|
#include "class_board.h"
|
||||||
|
@ -121,7 +122,7 @@ public:
|
||||||
CONTEXT_TRACK_WIDTH_MENU()
|
CONTEXT_TRACK_WIDTH_MENU()
|
||||||
: CONTEXT_TRACK_VIA_SIZE_MENU( true, true ), m_board( NULL )
|
: CONTEXT_TRACK_VIA_SIZE_MENU( true, true ), m_board( NULL )
|
||||||
{
|
{
|
||||||
SetMenuHandler( boost::bind( &CONTEXT_TRACK_WIDTH_MENU::EventHandler, this, _1 ) );
|
SetMenuHandler( std::bind( &CONTEXT_TRACK_WIDTH_MENU::EventHandler, this, _1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetBoard( BOARD* aBoard )
|
void SetBoard( BOARD* aBoard )
|
||||||
|
|
|
@ -44,7 +44,8 @@
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include "common_actions.h"
|
#include "common_actions.h"
|
||||||
#include "selection_tool.h"
|
#include "selection_tool.h"
|
||||||
|
@ -370,9 +371,10 @@ int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
|
||||||
editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED );
|
editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED );
|
||||||
dlg.Apply();
|
dlg.Apply();
|
||||||
|
|
||||||
selection.ForAll<KIGFX::VIEW_ITEM>( boost::bind( &KIGFX::VIEW_ITEM::ViewUpdate, _1,
|
selection.ForAll<KIGFX::VIEW_ITEM>( std::bind( &KIGFX::VIEW_ITEM::ViewUpdate,
|
||||||
KIGFX::VIEW_ITEM::ALL ) );
|
std::placeholders::_1, KIGFX::VIEW_ITEM::ALL ) );
|
||||||
selection.ForAll<BOARD_ITEM>( boost::bind( &RN_DATA::Update, ratsnest, _1 ) );
|
selection.ForAll<BOARD_ITEM>( std::bind( &RN_DATA::Update, ratsnest,
|
||||||
|
std::placeholders::_1 ) );
|
||||||
ratsnest->Recalculate();
|
ratsnest->Recalculate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -559,7 +561,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem )
|
||||||
{
|
{
|
||||||
MODULE* module = static_cast<MODULE*>( aItem );
|
MODULE* module = static_cast<MODULE*>( aItem );
|
||||||
module->ClearFlags();
|
module->ClearFlags();
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, getView(), _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, getView(), std::placeholders::_1 ) );
|
||||||
|
|
||||||
// Module itself is deleted after the switch scope is finished
|
// Module itself is deleted after the switch scope is finished
|
||||||
// list of pads is rebuild by BOARD::BuildListOfNets()
|
// list of pads is rebuild by BOARD::BuildListOfNets()
|
||||||
|
@ -763,8 +765,8 @@ int EDIT_TOOL::Duplicate( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
if( new_item->Type() == PCB_MODULE_T )
|
if( new_item->Type() == PCB_MODULE_T )
|
||||||
{
|
{
|
||||||
static_cast<MODULE*>( new_item )->RunOnChildren( boost::bind( &KIGFX::VIEW::Add,
|
static_cast<MODULE*>( new_item )->RunOnChildren( std::bind( &KIGFX::VIEW::Add,
|
||||||
getView(), _1 ) );
|
getView(), std::placeholders::_1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
editFrame->GetGalCanvas()->GetView()->Add( new_item );
|
editFrame->GetGalCanvas()->GetView()->Add( new_item );
|
||||||
|
@ -850,8 +852,8 @@ private:
|
||||||
KIGFX::VIEW* view = m_parent.GetToolManager()->GetView();
|
KIGFX::VIEW* view = m_parent.GetToolManager()->GetView();
|
||||||
if( new_item->Type() == PCB_MODULE_T)
|
if( new_item->Type() == PCB_MODULE_T)
|
||||||
{
|
{
|
||||||
static_cast<MODULE*>( new_item )->RunOnChildren(
|
static_cast<MODULE*>(new_item)->RunOnChildren(
|
||||||
boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
std::bind(&KIGFX::VIEW::Add, view, std::placeholders::_1));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_parent.GetGalCanvas()->GetView()->Add( new_item );
|
m_parent.GetGalCanvas()->GetView()->Add( new_item );
|
||||||
|
@ -1014,8 +1016,8 @@ void EDIT_TOOL::processPickedList( const PICKED_ITEMS_LIST* aList )
|
||||||
|
|
||||||
case UR_DELETED:
|
case UR_DELETED:
|
||||||
if( updItem->Type() == PCB_MODULE_T )
|
if( updItem->Type() == PCB_MODULE_T )
|
||||||
static_cast<MODULE*>( updItem )->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove,
|
static_cast<MODULE*>( updItem )->RunOnChildren( std::bind( &KIGFX::VIEW::Remove,
|
||||||
view, _1 ) );
|
view, std::placeholders::_1 ) );
|
||||||
|
|
||||||
view->Remove( updItem );
|
view->Remove( updItem );
|
||||||
//ratsnest->Remove( updItem ); // this is done in BOARD::Remove
|
//ratsnest->Remove( updItem ); // this is done in BOARD::Remove
|
||||||
|
@ -1023,8 +1025,8 @@ void EDIT_TOOL::processPickedList( const PICKED_ITEMS_LIST* aList )
|
||||||
|
|
||||||
case UR_NEW:
|
case UR_NEW:
|
||||||
if( updItem->Type() == PCB_MODULE_T )
|
if( updItem->Type() == PCB_MODULE_T )
|
||||||
static_cast<MODULE*>( updItem )->RunOnChildren( boost::bind( &KIGFX::VIEW::Add,
|
static_cast<MODULE*>( updItem )->RunOnChildren( std::bind( &KIGFX::VIEW::Add,
|
||||||
view, _1 ) );
|
view, std::placeholders::_1 ) );
|
||||||
|
|
||||||
view->Add( updItem );
|
view->Add( updItem );
|
||||||
//ratsnest->Add( updItem ); // this is done in BOARD::Add
|
//ratsnest->Add( updItem ); // this is done in BOARD::Add
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include <wxPcbStruct.h>
|
#include <wxPcbStruct.h>
|
||||||
|
|
||||||
|
|
|
@ -28,15 +28,16 @@
|
||||||
#include <class_base_screen.h>
|
#include <class_base_screen.h>
|
||||||
#include <tools/common_actions.h>
|
#include <tools/common_actions.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
GRID_MENU::GRID_MENU( EDA_DRAW_FRAME* aParent ) : m_parent( aParent )
|
GRID_MENU::GRID_MENU( EDA_DRAW_FRAME* aParent ) : m_parent( aParent )
|
||||||
{
|
{
|
||||||
BASE_SCREEN* screen = aParent->GetScreen();
|
BASE_SCREEN* screen = aParent->GetScreen();
|
||||||
|
|
||||||
SetIcon( grid_select_xpm );
|
SetIcon( grid_select_xpm );
|
||||||
SetMenuHandler( boost::bind( &GRID_MENU::EventHandler, this, _1 ) );
|
SetMenuHandler( std::bind( &GRID_MENU::EventHandler, this, _1 ) );
|
||||||
SetUpdateHandler( boost::bind( &GRID_MENU::Update, this ) );
|
SetUpdateHandler( std::bind( &GRID_MENU::Update, this ) );
|
||||||
|
|
||||||
wxArrayString gridsList;
|
wxArrayString gridsList;
|
||||||
screen->BuildGridsChoiceList( gridsList, g_UserUnit != INCHES );
|
screen->BuildGridsChoiceList( gridsList, g_UserUnit != INCHES );
|
||||||
|
|
|
@ -44,7 +44,8 @@
|
||||||
#include <class_module.h>
|
#include <class_module.h>
|
||||||
#include <class_edge_mod.h>
|
#include <class_edge_mod.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <wx/defs.h>
|
#include <wx/defs.h>
|
||||||
|
|
||||||
|
@ -431,7 +432,8 @@ int MODULE_TOOLS::PasteItems( const TOOL_EVENT& aEvent )
|
||||||
KIGFX::VIEW_GROUP preview( m_view );
|
KIGFX::VIEW_GROUP preview( m_view );
|
||||||
pastedModule->SetParent( m_board );
|
pastedModule->SetParent( m_board );
|
||||||
pastedModule->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) );
|
pastedModule->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) );
|
||||||
pastedModule->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, boost::ref( preview ), _1 ) );
|
pastedModule->RunOnChildren( std::bind( &KIGFX::VIEW_GROUP::Add,
|
||||||
|
std::ref( preview ), _1 ) );
|
||||||
preview.Add( pastedModule );
|
preview.Add( pastedModule );
|
||||||
m_view->Add( &preview );
|
m_view->Add( &preview );
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
|
||||||
|
|
||||||
#include "pcb_editor_control.h"
|
#include "pcb_editor_control.h"
|
||||||
#include "common_actions.h"
|
#include "common_actions.h"
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
|
@ -48,7 +46,8 @@
|
||||||
#include <view/view_controls.h>
|
#include <view/view_controls.h>
|
||||||
#include <origin_viewitem.h>
|
#include <origin_viewitem.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
|
|
||||||
class ZONE_CONTEXT_MENU : public CONTEXT_MENU
|
class ZONE_CONTEXT_MENU : public CONTEXT_MENU
|
||||||
|
@ -57,7 +56,7 @@ public:
|
||||||
ZONE_CONTEXT_MENU()
|
ZONE_CONTEXT_MENU()
|
||||||
{
|
{
|
||||||
SetIcon( add_zone_xpm );
|
SetIcon( add_zone_xpm );
|
||||||
SetUpdateHandler( boost::bind( &ZONE_CONTEXT_MENU::update, this ) );
|
SetUpdateHandler( std::bind( &ZONE_CONTEXT_MENU::update, this ) );
|
||||||
Add( COMMON_ACTIONS::zoneFill );
|
Add( COMMON_ACTIONS::zoneFill );
|
||||||
Add( COMMON_ACTIONS::zoneFillAll );
|
Add( COMMON_ACTIONS::zoneFillAll );
|
||||||
Add( COMMON_ACTIONS::zoneUnfill );
|
Add( COMMON_ACTIONS::zoneUnfill );
|
||||||
|
@ -293,14 +292,14 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
// Add all the drawable parts to preview
|
// Add all the drawable parts to preview
|
||||||
preview.Add( module );
|
preview.Add( module );
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, &preview, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW_GROUP::Add, &preview, _1 ) );
|
||||||
|
|
||||||
preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
|
preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Place the selected module
|
// Place the selected module
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
||||||
view->Add( module );
|
view->Add( module );
|
||||||
module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
|
module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
|
||||||
|
|
||||||
|
@ -309,7 +308,7 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
// Remove from preview
|
// Remove from preview
|
||||||
preview.Remove( module );
|
preview.Remove( module );
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Remove, &preview, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW_GROUP::Remove, &preview, _1 ) );
|
||||||
module = NULL; // to indicate that there is no module that we currently modify
|
module = NULL; // to indicate that there is no module that we currently modify
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -734,7 +733,7 @@ int PCB_EDITOR_CONTROL::DrillOrigin( const TOOL_EVENT& aEvent )
|
||||||
assert( picker );
|
assert( picker );
|
||||||
|
|
||||||
m_frame->SetToolID( ID_PCB_PLACE_OFFSET_COORD_BUTT, wxCURSOR_PENCIL, _( "Adjust zero" ) );
|
m_frame->SetToolID( ID_PCB_PLACE_OFFSET_COORD_BUTT, wxCURSOR_PENCIL, _( "Adjust zero" ) );
|
||||||
picker->SetClickHandler( boost::bind( setDrillOrigin, getView(), m_frame, m_placeOrigin, _1 ) );
|
picker->SetClickHandler( std::bind( setDrillOrigin, getView(), m_frame, m_placeOrigin, _1 ) );
|
||||||
picker->Activate();
|
picker->Activate();
|
||||||
Wait();
|
Wait();
|
||||||
|
|
||||||
|
@ -806,7 +805,7 @@ int PCB_EDITOR_CONTROL::HighlightNetCursor( const TOOL_EVENT& aEvent )
|
||||||
assert( picker );
|
assert( picker );
|
||||||
|
|
||||||
m_frame->SetToolID( ID_PCB_HIGHLIGHT_BUTT, wxCURSOR_PENCIL, _( "Highlight net" ) );
|
m_frame->SetToolID( ID_PCB_HIGHLIGHT_BUTT, wxCURSOR_PENCIL, _( "Highlight net" ) );
|
||||||
picker->SetClickHandler( boost::bind( highlightNet, m_toolMgr, _1 ) );
|
picker->SetClickHandler( std::bind( highlightNet, m_toolMgr, _1 ) );
|
||||||
picker->SetSnapping( false );
|
picker->SetSnapping( false );
|
||||||
picker->Activate();
|
picker->Activate();
|
||||||
Wait();
|
Wait();
|
||||||
|
|
|
@ -48,7 +48,8 @@
|
||||||
#include <pcb_painter.h>
|
#include <pcb_painter.h>
|
||||||
#include <origin_viewitem.h>
|
#include <origin_viewitem.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
|
|
||||||
// files.cpp
|
// files.cpp
|
||||||
|
@ -651,7 +652,7 @@ int PCBNEW_CONTROL::GridSetOrigin( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
// TODO it will not check the toolbar button in module editor, as it uses a different ID..
|
// TODO it will not check the toolbar button in module editor, as it uses a different ID..
|
||||||
m_frame->SetToolID( ID_PCB_PLACE_GRID_COORD_BUTT, wxCURSOR_PENCIL, _( "Adjust grid origin" ) );
|
m_frame->SetToolID( ID_PCB_PLACE_GRID_COORD_BUTT, wxCURSOR_PENCIL, _( "Adjust grid origin" ) );
|
||||||
picker->SetClickHandler( boost::bind( setOrigin, getView(), m_frame, m_gridOrigin, _1 ) );
|
picker->SetClickHandler( std::bind( setOrigin, getView(), m_frame, m_gridOrigin, _1 ) );
|
||||||
picker->Activate();
|
picker->Activate();
|
||||||
Wait();
|
Wait();
|
||||||
}
|
}
|
||||||
|
@ -756,7 +757,7 @@ int PCBNEW_CONTROL::DeleteItemCursor( const TOOL_EVENT& aEvent )
|
||||||
// TODO it will not check the toolbar button in the module editor, as it uses a different ID..
|
// TODO it will not check the toolbar button in the module editor, as it uses a different ID..
|
||||||
m_frame->SetToolID( ID_PCB_DELETE_ITEM_BUTT, wxCURSOR_PENCIL, _( "Delete item" ) );
|
m_frame->SetToolID( ID_PCB_DELETE_ITEM_BUTT, wxCURSOR_PENCIL, _( "Delete item" ) );
|
||||||
picker->SetSnapping( false );
|
picker->SetSnapping( false );
|
||||||
picker->SetClickHandler( boost::bind( deleteItem, m_toolMgr, _1 ) );
|
picker->SetClickHandler( std::bind( deleteItem, m_toolMgr, _1 ) );
|
||||||
picker->Activate();
|
picker->Activate();
|
||||||
Wait();
|
Wait();
|
||||||
|
|
||||||
|
@ -850,7 +851,7 @@ int PCBNEW_CONTROL::AppendBoard( const TOOL_EVENT& aEvent )
|
||||||
picker.SetItem( module );
|
picker.SetItem( module );
|
||||||
undoListPicker.PushItem( picker );
|
undoListPicker.PushItem( picker );
|
||||||
|
|
||||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
module->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
|
||||||
view->Add( module );
|
view->Add( module );
|
||||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectItem, true, module );
|
m_toolMgr->RunAction( COMMON_ACTIONS::selectItem, true, module );
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
#include <view/view_controls.h>
|
#include <view/view_controls.h>
|
||||||
|
@ -141,7 +142,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
points->Line( i ).SetConstraint( new EC_SNAPLINE( points->Line( i ),
|
points->Line( i ).SetConstraint( new EC_SNAPLINE( points->Line( i ),
|
||||||
boost::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) );
|
std::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// The last missing line, connecting the last and the first polygon point
|
// The last missing line, connecting the last and the first polygon point
|
||||||
|
@ -150,7 +151,7 @@ public:
|
||||||
|
|
||||||
points->Line( points->LinesSize() - 1 ).SetConstraint(
|
points->Line( points->LinesSize() - 1 ).SetConstraint(
|
||||||
new EC_SNAPLINE( points->Line( points->LinesSize() - 1 ),
|
new EC_SNAPLINE( points->Line( points->LinesSize() - 1 ),
|
||||||
boost::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) );
|
std::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +214,7 @@ bool POINT_EDITOR::Init()
|
||||||
m_selectionTool->GetMenu().AddItem( COMMON_ACTIONS::pointEditorAddCorner,
|
m_selectionTool->GetMenu().AddItem( COMMON_ACTIONS::pointEditorAddCorner,
|
||||||
POINT_EDITOR::addCornerCondition );
|
POINT_EDITOR::addCornerCondition );
|
||||||
m_selectionTool->GetMenu().AddItem( COMMON_ACTIONS::pointEditorRemoveCorner,
|
m_selectionTool->GetMenu().AddItem( COMMON_ACTIONS::pointEditorRemoveCorner,
|
||||||
boost::bind( &POINT_EDITOR::removeCornerCondition, this, _1 ) );
|
std::bind( &POINT_EDITOR::removeCornerCondition, this, _1 ) );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
#include "selection_tool.h"
|
#include "selection_tool.h"
|
||||||
#include <class_board_connected_item.h>
|
#include <class_board_connected_item.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
|
|
||||||
bool SELECTION_CONDITIONS::NotEmpty( const SELECTION& aSelection )
|
bool SELECTION_CONDITIONS::NotEmpty( const SELECTION& aSelection )
|
||||||
|
@ -54,55 +55,55 @@ bool SELECTION_CONDITIONS::OnlyConnectedItems( const SELECTION& aSelection )
|
||||||
|
|
||||||
SELECTION_CONDITION SELECTION_CONDITIONS::SameNet( bool aAllowUnconnected )
|
SELECTION_CONDITION SELECTION_CONDITIONS::SameNet( bool aAllowUnconnected )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::sameNetFunc, _1, aAllowUnconnected );
|
return std::bind( &SELECTION_CONDITIONS::sameNetFunc, _1, aAllowUnconnected );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SELECTION_CONDITION SELECTION_CONDITIONS::SameLayer()
|
SELECTION_CONDITION SELECTION_CONDITIONS::SameLayer()
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::sameLayerFunc, _1 );
|
return std::bind( &SELECTION_CONDITIONS::sameLayerFunc, _1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SELECTION_CONDITION SELECTION_CONDITIONS::HasType( KICAD_T aType )
|
SELECTION_CONDITION SELECTION_CONDITIONS::HasType( KICAD_T aType )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::hasTypeFunc, _1, aType );
|
return std::bind( &SELECTION_CONDITIONS::hasTypeFunc, _1, aType );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SELECTION_CONDITION SELECTION_CONDITIONS::OnlyType( KICAD_T aType )
|
SELECTION_CONDITION SELECTION_CONDITIONS::OnlyType( KICAD_T aType )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::onlyTypeFunc, _1, aType );
|
return std::bind( &SELECTION_CONDITIONS::onlyTypeFunc, _1, aType );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SELECTION_CONDITION SELECTION_CONDITIONS::OnlyTypes( const std::vector<KICAD_T>& aTypes )
|
SELECTION_CONDITION SELECTION_CONDITIONS::OnlyTypes( const std::vector<KICAD_T>& aTypes )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::onlyTypesFunc, _1, aTypes );
|
return std::bind( &SELECTION_CONDITIONS::onlyTypesFunc, _1, aTypes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SELECTION_CONDITION SELECTION_CONDITIONS::OnlyTypes( const KICAD_T aTypes[] )
|
SELECTION_CONDITION SELECTION_CONDITIONS::OnlyTypes( const KICAD_T aTypes[] )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::onlyTypesFuncArr, _1, aTypes );
|
return std::bind( &SELECTION_CONDITIONS::onlyTypesFuncArr, _1, aTypes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SELECTION_CONDITION SELECTION_CONDITIONS::Count( int aNumber )
|
SELECTION_CONDITION SELECTION_CONDITIONS::Count( int aNumber )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::countFunc, _1, aNumber );
|
return std::bind( &SELECTION_CONDITIONS::countFunc, _1, aNumber );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SELECTION_CONDITION SELECTION_CONDITIONS::MoreThan( int aNumber )
|
SELECTION_CONDITION SELECTION_CONDITIONS::MoreThan( int aNumber )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::moreThanFunc, _1, aNumber );
|
return std::bind( &SELECTION_CONDITIONS::moreThanFunc, _1, aNumber );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SELECTION_CONDITION SELECTION_CONDITIONS::LessThan( int aNumber )
|
SELECTION_CONDITION SELECTION_CONDITIONS::LessThan( int aNumber )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::lessThanFunc, _1, aNumber );
|
return std::bind( &SELECTION_CONDITIONS::lessThanFunc, _1, aNumber );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -280,12 +281,12 @@ bool SELECTION_CONDITIONS::lessThanFunc( const SELECTION& aSelection, int aNumbe
|
||||||
SELECTION_CONDITION operator||( const SELECTION_CONDITION& aConditionA,
|
SELECTION_CONDITION operator||( const SELECTION_CONDITION& aConditionA,
|
||||||
const SELECTION_CONDITION& aConditionB )
|
const SELECTION_CONDITION& aConditionB )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::orFunc, aConditionA, aConditionB, _1 );
|
return std::bind( &SELECTION_CONDITIONS::orFunc, aConditionA, aConditionB, _1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SELECTION_CONDITION operator&&( const SELECTION_CONDITION& aConditionA,
|
SELECTION_CONDITION operator&&( const SELECTION_CONDITION& aConditionA,
|
||||||
const SELECTION_CONDITION& aConditionB )
|
const SELECTION_CONDITION& aConditionB )
|
||||||
{
|
{
|
||||||
return boost::bind( &SELECTION_CONDITIONS::andFunc, aConditionA, aConditionB, _1 );
|
return std::bind( &SELECTION_CONDITIONS::andFunc, aConditionA, aConditionB, _1 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,14 +25,14 @@
|
||||||
#ifndef SELECTION_CONDITIONS_H_
|
#ifndef SELECTION_CONDITIONS_H_
|
||||||
#define SELECTION_CONDITIONS_H_
|
#define SELECTION_CONDITIONS_H_
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
#include <functional>
|
||||||
#include <core/typeinfo.h>
|
#include <core/typeinfo.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
struct SELECTION;
|
struct SELECTION;
|
||||||
|
|
||||||
///> Functor type that checks a specific condition for selected items.
|
///> Functor type that checks a specific condition for selected items.
|
||||||
typedef boost::function<bool (const SELECTION&)> SELECTION_CONDITION;
|
typedef std::function<bool (const SELECTION&)> SELECTION_CONDITION;
|
||||||
|
|
||||||
SELECTION_CONDITION operator||( const SELECTION_CONDITION& aConditionA,
|
SELECTION_CONDITION operator||( const SELECTION_CONDITION& aConditionA,
|
||||||
const SELECTION_CONDITION& aConditionB );
|
const SELECTION_CONDITION& aConditionB );
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
#include <boost/function.hpp>
|
using namespace std::placeholders;
|
||||||
|
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
#include <class_board_item.h>
|
#include <class_board_item.h>
|
||||||
|
@ -729,7 +729,7 @@ int SELECTION_TOOL::find( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
DIALOG_FIND dlg( m_frame );
|
DIALOG_FIND dlg( m_frame );
|
||||||
dlg.EnableWarp( false );
|
dlg.EnableWarp( false );
|
||||||
dlg.SetCallback( boost::bind( &SELECTION_TOOL::findCallback, this, _1 ) );
|
dlg.SetCallback( std::bind( &SELECTION_TOOL::findCallback, this, _1 ) );
|
||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -986,7 +986,7 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem )
|
||||||
if( aItem->Type() == PCB_MODULE_T )
|
if( aItem->Type() == PCB_MODULE_T )
|
||||||
{
|
{
|
||||||
MODULE* module = static_cast<MODULE*>( aItem );
|
MODULE* module = static_cast<MODULE*>( aItem );
|
||||||
module->RunOnChildren( boost::bind( &SELECTION_TOOL::selectVisually, this, _1 ) );
|
module->RunOnChildren( std::bind( &SELECTION_TOOL::selectVisually, this, _1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aItem->Type() == PCB_PAD_T )
|
if( aItem->Type() == PCB_PAD_T )
|
||||||
|
@ -1024,7 +1024,7 @@ void SELECTION_TOOL::unselect( BOARD_ITEM* aItem )
|
||||||
if( aItem->Type() == PCB_MODULE_T )
|
if( aItem->Type() == PCB_MODULE_T )
|
||||||
{
|
{
|
||||||
MODULE* module = static_cast<MODULE*>( aItem );
|
MODULE* module = static_cast<MODULE*>( aItem );
|
||||||
module->RunOnChildren( boost::bind( &SELECTION_TOOL::unselectVisually, this, _1 ) );
|
module->RunOnChildren( std::bind( &SELECTION_TOOL::unselectVisually, this, _1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
unselectVisually( aItem );
|
unselectVisually( aItem );
|
||||||
|
|
|
@ -79,7 +79,7 @@ struct SELECTION
|
||||||
|
|
||||||
/// Runs a function on all selected items.
|
/// Runs a function on all selected items.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void ForAll( boost::function<void (T*)> aFunction ) const
|
void ForAll( std::function<void (T*)> aFunction ) const
|
||||||
{
|
{
|
||||||
for( unsigned int i = 0; i < items.GetCount(); ++i )
|
for( unsigned int i = 0; i < items.GetCount(); ++i )
|
||||||
aFunction( Item<T>( i ) );
|
aFunction( Item<T>( i ) );
|
||||||
|
|
|
@ -28,15 +28,16 @@
|
||||||
#include <class_base_screen.h>
|
#include <class_base_screen.h>
|
||||||
#include <tools/common_actions.h>
|
#include <tools/common_actions.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <functional>
|
||||||
|
using namespace std::placeholders;
|
||||||
|
|
||||||
ZOOM_MENU::ZOOM_MENU( EDA_DRAW_FRAME* aParent ) : m_parent( aParent )
|
ZOOM_MENU::ZOOM_MENU( EDA_DRAW_FRAME* aParent ) : m_parent( aParent )
|
||||||
{
|
{
|
||||||
BASE_SCREEN* screen = aParent->GetScreen();
|
BASE_SCREEN* screen = aParent->GetScreen();
|
||||||
|
|
||||||
SetIcon( zoom_selection_xpm );
|
SetIcon( zoom_selection_xpm );
|
||||||
SetMenuHandler( boost::bind( &ZOOM_MENU::EventHandler, this, _1 ) );
|
SetMenuHandler( std::bind( &ZOOM_MENU::EventHandler, this, _1 ) );
|
||||||
SetUpdateHandler( boost::bind( &ZOOM_MENU::Update, this ) );
|
SetUpdateHandler( std::bind( &ZOOM_MENU::Update, this ) );
|
||||||
|
|
||||||
//int zoom = screen->GetZoom();
|
//int zoom = screen->GetZoom();
|
||||||
int maxZoomIds = std::min( ID_POPUP_ZOOM_LEVEL_END - ID_POPUP_ZOOM_LEVEL_START,
|
int maxZoomIds = std::min( ID_POPUP_ZOOM_LEVEL_END - ID_POPUP_ZOOM_LEVEL_START,
|
||||||
|
|
Loading…
Reference in New Issue