2009-11-05 19:26:52 +00:00
|
|
|
/********************/
|
|
|
|
/* tool_cvpcb.cpp */
|
|
|
|
/********************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "appl_wxstruct.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "common.h"
|
|
|
|
#include "trigo.h"
|
|
|
|
|
|
|
|
#include "bitmaps.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "cvpcb.h"
|
|
|
|
#include "protos.h"
|
|
|
|
#include "cvstruct.h"
|
2010-11-07 20:06:07 +00:00
|
|
|
#include "cvpcb_id.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2007-09-13 11:55:46 +00:00
|
|
|
void WinEDA_CvpcbFrame::ReCreateHToolbar()
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2008-12-08 15:27:13 +00:00
|
|
|
wxConfig* config = wxGetApp().m_EDA_Config;
|
|
|
|
|
|
|
|
if( m_HToolBar != NULL )
|
|
|
|
return;
|
|
|
|
|
|
|
|
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
|
2009-11-05 19:26:52 +00:00
|
|
|
|
2009-05-21 17:42:42 +00:00
|
|
|
m_HToolBar->AddTool( ID_CVPCB_READ_INPUT_NETLIST, wxEmptyString,
|
|
|
|
wxBitmap( open_xpm ),
|
2009-11-05 19:26:52 +00:00
|
|
|
_( "Open a net list file" ) );
|
2008-12-08 15:27:13 +00:00
|
|
|
|
2009-05-21 17:42:42 +00:00
|
|
|
m_HToolBar->AddTool( ID_CVPCB_SAVEQUITCVPCB, wxEmptyString,
|
|
|
|
wxBitmap( save_xpm ),
|
2009-11-05 19:26:52 +00:00
|
|
|
_( "Save net list and footprint files" ) );
|
2008-12-08 15:27:13 +00:00
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
2009-05-21 17:42:42 +00:00
|
|
|
m_HToolBar->AddTool( ID_CVPCB_CREATE_CONFIGWINDOW, wxEmptyString,
|
|
|
|
wxBitmap( config_xpm ),
|
2008-12-08 15:27:13 +00:00
|
|
|
_( "Configuration" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
2009-05-21 17:42:42 +00:00
|
|
|
m_HToolBar->AddTool( ID_CVPCB_CREATE_SCREENCMP, wxEmptyString,
|
|
|
|
wxBitmap( module_xpm ),
|
2008-12-08 15:27:13 +00:00
|
|
|
_( "View selected footprint" ) );
|
|
|
|
|
2009-05-21 17:42:42 +00:00
|
|
|
m_HToolBar->AddTool( ID_CVPCB_AUTO_ASSOCIE, wxEmptyString,
|
|
|
|
wxBitmap( auto_associe_xpm ),
|
2009-11-05 19:26:52 +00:00
|
|
|
_( "Perform automatic footprint association" ) );
|
2008-12-08 15:27:13 +00:00
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
2009-05-21 17:42:42 +00:00
|
|
|
m_HToolBar->AddTool( ID_CVPCB_GOTO_PREVIOUSNA, wxEmptyString,
|
|
|
|
wxBitmap( left_xpm ),
|
2008-12-08 15:27:13 +00:00
|
|
|
_( "Select previous free component" ) );
|
|
|
|
|
2009-05-21 17:42:42 +00:00
|
|
|
m_HToolBar->AddTool( ID_CVPCB_GOTO_FIRSTNA, wxEmptyString,
|
|
|
|
wxBitmap( right_xpm ),
|
2008-12-08 15:27:13 +00:00
|
|
|
_( "Select next free component" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
2009-05-02 07:35:04 +00:00
|
|
|
m_HToolBar->AddTool( ID_CVPCB_DEL_ASSOCIATIONS, wxEmptyString,
|
2008-12-08 15:27:13 +00:00
|
|
|
wxBitmap( delete_association_xpm ),
|
|
|
|
_( "Delete all associations" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
2009-05-02 07:35:04 +00:00
|
|
|
m_HToolBar->AddTool( ID_CVPCB_CREATE_STUFF_FILE, wxEmptyString,
|
2008-12-08 15:27:13 +00:00
|
|
|
wxBitmap( save_cmpstuff_xpm ),
|
2009-05-21 17:42:42 +00:00
|
|
|
_( "Create export file (component/footprint list, \
|
|
|
|
used by eeschema to fill the footprint field of components)" ) );
|
2008-12-08 15:27:13 +00:00
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
2009-05-02 07:35:04 +00:00
|
|
|
m_HToolBar->AddTool( ID_PCB_DISPLAY_FOOTPRINT_DOC, wxEmptyString,
|
2009-04-21 17:56:27 +00:00
|
|
|
wxBitmap( datasheet_xpm ),
|
2008-12-08 15:27:13 +00:00
|
|
|
_( "Display footprints list documentation" ) );
|
|
|
|
|
|
|
|
m_HToolBar->AddSeparator();
|
|
|
|
m_HToolBar->AddSeparator();
|
|
|
|
m_HToolBar->AddRadioTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,
|
|
|
|
wxEmptyString,
|
|
|
|
wxBitmap( module_filtered_list_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
_( "Display the filtered footprint list for the current component" ) );
|
|
|
|
m_HToolBar->AddRadioTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
|
|
|
|
wxEmptyString, wxBitmap( module_full_list_xpm ),
|
|
|
|
wxNullBitmap,
|
|
|
|
_( "Display the full footprint list (without filtering)" ) );
|
|
|
|
|
|
|
|
if( config )
|
|
|
|
{
|
|
|
|
wxString key = wxT( FILTERFOOTPRINTKEY );
|
|
|
|
int opt = config->Read( key, (long) 1 );
|
|
|
|
m_HToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, opt );
|
|
|
|
m_HToolBar->ToggleTool( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST, !opt );
|
|
|
|
}
|
|
|
|
|
|
|
|
// after adding the buttons to the toolbar, must call Realize() to reflect
|
|
|
|
// the changes
|
|
|
|
m_HToolBar->Realize();
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|