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-2018 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software: you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by the
10  * Free Software Foundation, either version 3 of the License, or (at your
11  * option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
26 #include <fctsys.h>
27 #include <kiface_i.h>
28 #include <common.h>
29 
30 #include <bitmaps.h>
31 #include <cvpcb.h>
32 #include <cvpcb_mainframe.h>
33 #include <cvpcb_id.h>
34 
35 #include <common_help_msg.h>
36 
37 
39 {
40  if( m_mainToolBar )
41  m_mainToolBar->Clear();
42  else
43  m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
44  KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
45 
46  m_mainToolBar->AddTool( wxID_SAVE, wxEmptyString, KiScaledBitmap( save_xpm, this ), SAVE_HLP_MSG );
47 
49  m_mainToolBar->AddTool( ID_CVPCB_LIB_TABLE_EDIT, wxEmptyString,
50  KiScaledBitmap( config_xpm, this ),
51  _( "Edit footprint library table" ) );
52 
54  m_mainToolBar->AddTool( ID_CVPCB_CREATE_SCREENCMP, wxEmptyString,
55  KiScaledBitmap( show_footprint_xpm, this ),
56  _( "View selected footprint" ) );
57 
59  m_mainToolBar->AddTool( ID_CVPCB_GOTO_PREVIOUSNA, wxEmptyString,
60  KiScaledBitmap( left_xpm, this ),
61  _( "Select previous unlinked symbol" ) );
62 
63  m_mainToolBar->AddTool( ID_CVPCB_GOTO_FIRSTNA, wxEmptyString,
64  KiScaledBitmap( right_xpm, this ),
65  _( "Select next unlinked symbol" ) );
66 
68  m_mainToolBar->AddTool( ID_CVPCB_AUTO_ASSOCIE, wxEmptyString,
69  KiScaledBitmap( auto_associe_xpm, this ),
70  _( "Perform automatic footprint association" ) );
71 
72  m_mainToolBar->AddTool( ID_CVPCB_DEL_ASSOCIATIONS, wxEmptyString,
73  KiScaledBitmap( delete_association_xpm, this ),
74  _( "Delete all footprint associations" ) );
75 
78  KiScaledBitmap( module_filtered_list_xpm, this ),
79  wxNullBitmap,
80  true, NULL,
81  _( "Filter footprint list by schematic symbol keywords" ),
82  wxEmptyString );
83 
85  KiScaledBitmap( module_pin_filtered_list_xpm, this ),
86  wxNullBitmap,
87  true, NULL,
88  _( "Filter footprint list by pin count" ),
89  wxEmptyString );
90 
92  KiScaledBitmap( module_library_list_xpm, this ),
93  wxNullBitmap, true, NULL,
94  _( "Filter footprint list by library" ),
95  wxEmptyString );
96 
99  KiScaledBitmap( module_name_filtered_list_xpm, this ),
100  wxNullBitmap, true, NULL,
101  _( "Filter footprint list using a partial name or a pattern" ),
102  wxEmptyString );
103 
105 
106  m_mainToolBar->AddControl( m_tcFilterString );
107 
108 
109  // after adding the buttons to the toolbar, must call Realize() to reflect the changes
110  m_mainToolBar->Realize();
111 }
void ReCreateHToolbar()
Definition: tool_cvpcb.cpp:38
wxBitmap KiScaledBitmap(BITMAP_DEF aBitmap, EDA_BASE_FRAME *aWindow)
Function KiScaledBitmap Constructs a wxBitmap from a memory record, scaling it if device DPI demands ...
Definition: bitmap.cpp:114
wxTextCtrl * m_tcFilterString
#define SAVE_HLP_MSG
wxAuiToolBar * m_mainToolBar
The common library.
void KiScaledSeparator(wxAuiToolBar *aToolbar, EDA_BASE_FRAME *aWindow)
Function KiScaledSeparator Adds a separator to the given toolbar scaled the same way as KiScaledBitma...
Definition: bitmap.cpp:146
static constexpr int KICAD_AUI_TB_STYLE
Default style flags used for wxAUI toolbars