2007-06-05 12:10:51 +00:00
|
|
|
|
/********************************************************************************/
|
2007-08-04 01:08:43 +00:00
|
|
|
|
/* tool_onrightclick.cpp: fonctions appel<65>s par le bouton droit sur un TOOL */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
/********************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
|
#include "gr_basic.h"
|
|
|
|
|
#include "common.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
|
#include "confirm.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
#include "pcbnew.h"
|
|
|
|
|
#include "autorout.h"
|
|
|
|
|
|
|
|
|
|
#include "id.h"
|
|
|
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************/
|
2007-08-04 01:08:43 +00:00
|
|
|
|
void WinEDA_PcbFrame::ToolOnRightClick( wxCommandEvent& event )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
/*****************************************************************/
|
|
|
|
|
{
|
2007-08-04 01:08:43 +00:00
|
|
|
|
wxPoint pos;
|
|
|
|
|
int id = event.GetSelection();
|
|
|
|
|
|
|
|
|
|
wxGetMousePosition( &pos.x, &pos.y );
|
|
|
|
|
pos.x -= 400;
|
|
|
|
|
pos.y -= 30;
|
|
|
|
|
|
|
|
|
|
switch( id )
|
|
|
|
|
{
|
|
|
|
|
case ID_TRACK_BUTT:
|
|
|
|
|
InstallPcbOptionsFrame( pos, NULL, ID_PCB_TRACK_SIZE_SETUP );
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case ID_COMPONENT_BUTT:
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case ID_PCB_CIRCLE_BUTT:
|
|
|
|
|
case ID_PCB_ARC_BUTT:
|
|
|
|
|
case ID_LINE_COMMENT_BUTT:
|
|
|
|
|
case ID_PCB_COTATION_BUTT:
|
|
|
|
|
case ID_TEXT_COMMENT_BUTT:
|
|
|
|
|
InstallPcbOptionsFrame( pos, NULL, ID_PCB_DRAWINGS_WIDTHS_SETUP );
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-08-04 01:08:43 +00:00
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
|
/************************************************************************/
|
2007-08-04 01:08:43 +00:00
|
|
|
|
void WinEDA_ModuleEditFrame::ToolOnRightClick( wxCommandEvent& event )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
/************************************************************************/
|
|
|
|
|
{
|
2007-08-04 01:08:43 +00:00
|
|
|
|
wxPoint pos;
|
|
|
|
|
int id = event.GetSelection();
|
|
|
|
|
|
|
|
|
|
wxGetMousePosition( &pos.x, &pos.y );
|
|
|
|
|
pos.x -= 400;
|
|
|
|
|
pos.y -= 30;
|
|
|
|
|
|
|
|
|
|
switch( id )
|
|
|
|
|
{
|
|
|
|
|
case ID_MODEDIT_ADD_PAD:
|
|
|
|
|
InstallPadOptionsFrame( NULL, NULL, wxPoint( -1, -1 ) );
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case ID_PCB_CIRCLE_BUTT:
|
|
|
|
|
case ID_PCB_ARC_BUTT:
|
|
|
|
|
case ID_LINE_COMMENT_BUTT:
|
|
|
|
|
case ID_PCB_COTATION_BUTT:
|
|
|
|
|
case ID_TEXT_COMMENT_BUTT:
|
|
|
|
|
InstallOptionsFrame( pos );
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
DisplayError( this, wxT( "ToolOnRightClick() error" ) );
|
|
|
|
|
break;
|
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|