KiCad PCB EDA Suite
tool_cvpcb.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
6  * Copyright (C) 2007-2016 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
30 #include <fctsys.h>
31 #include <kiface_i.h>
32 #include <common.h>
33 
34 #include <bitmaps.h>
35 #include <cvpcb.h>
36 #include <cvpcb_mainframe.h>
37 #include <cvpcb_id.h>
38 
39 #include <common_help_msg.h>
40 
41 
43 {
44  if( m_mainToolBar != NULL )
45  return;
46 
47  m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
48  wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_HORZ_LAYOUT );
49 
50  m_mainToolBar->AddTool( wxID_SAVE, wxEmptyString, KiBitmap( save_xpm ), SAVE_HLP_MSG );
51 
52  m_mainToolBar->AddSeparator();
53  m_mainToolBar->AddTool( ID_CVPCB_LIB_TABLE_EDIT, wxEmptyString,
54  KiBitmap( config_xpm ),
55  _( "Edit footprint library table" ) );
56 
57  m_mainToolBar->AddSeparator();
58  m_mainToolBar->AddTool( ID_CVPCB_CREATE_SCREENCMP, wxEmptyString,
59  KiBitmap( show_footprint_xpm ),
60  _( "View selected footprint" ) );
61 
62  m_mainToolBar->AddSeparator();
63  m_mainToolBar->AddTool( ID_CVPCB_GOTO_PREVIOUSNA, wxEmptyString,
64  KiBitmap( left_xpm ),
65  _( "Select previous unlinked component" ) );
66 
67  m_mainToolBar->AddTool( ID_CVPCB_GOTO_FIRSTNA, wxEmptyString,
68  KiBitmap( right_xpm ),
69  _( "Select next unlinked component" ) );
70 
71  m_mainToolBar->AddSeparator();
72  m_mainToolBar->AddTool( ID_CVPCB_AUTO_ASSOCIE, wxEmptyString,
73  KiBitmap( auto_associe_xpm ),
74  _( "Perform automatic footprint association" ) );
75 
76  m_mainToolBar->AddTool( ID_CVPCB_DEL_ASSOCIATIONS, wxEmptyString,
77  KiBitmap( delete_association_xpm ),
78  _( "Delete all footprint associations" ) );
79 
80  m_mainToolBar->AddSeparator();
82  KiBitmap( module_filtered_list_xpm ),
83  wxNullBitmap,
84  true, NULL,
85  _( "Filter footprint list by schematic components keywords" ),
86  wxEmptyString );
87 
89  KiBitmap( module_pin_filtered_list_xpm ),
90  wxNullBitmap,
91  true, NULL,
92  _( "Filter footprint list by pin count" ),
93  wxEmptyString );
94 
96  KiBitmap( module_library_list_xpm ),
97  wxNullBitmap, true, NULL,
98  _( "Filter footprint list by library" ),
99  wxEmptyString );
100 
101  m_mainToolBar->AddSeparator();
103  KiBitmap( module_name_filtered_list_xpm ),
104  wxNullBitmap, true, NULL,
105  _( "Filter footprint list using a partial name or a pattern" ),
106  wxEmptyString );
107 
109 
110  m_mainToolBar->AddControl( m_tcFilterString );
111 
112 
113  // after adding the buttons to the toolbar, must call Realize() to reflect the changes
114  m_mainToolBar->Realize();
115 }
void ReCreateHToolbar()
Definition: tool_cvpcb.cpp:42
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
wxTextCtrl * m_tcFilterString
#define SAVE_HLP_MSG
wxAuiToolBar * m_mainToolBar
The common library.