KiCad PCB EDA Suite
toolbars_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_mainframe.h>
32 #include <cvpcb_id.h>
33 
34 
36 {
37  if( m_mainToolBar )
38  m_mainToolBar->Clear();
39  else
40  m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
41  KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
42 
43  m_mainToolBar->AddTool( ID_CVPCB_LIB_TABLE_EDIT, wxEmptyString,
44  KiScaledBitmap( config_xpm, this ),
45  _( "Edit footprint library table" ) );
46 
48  m_mainToolBar->AddTool( ID_CVPCB_CREATE_SCREENCMP, wxEmptyString,
49  KiScaledBitmap( show_footprint_xpm, this ),
50  _( "View selected footprint" ) );
51 
53  m_mainToolBar->AddTool( ID_CVPCB_GOTO_PREVIOUSNA, wxEmptyString,
54  KiScaledBitmap( left_xpm, this ),
55  _( "Select previous unlinked symbol" ) );
56 
57  m_mainToolBar->AddTool( ID_CVPCB_GOTO_FIRSTNA, wxEmptyString,
58  KiScaledBitmap( right_xpm, this ),
59  _( "Select next unlinked symbol" ) );
60 
62  m_mainToolBar->AddTool( ID_CVPCB_AUTO_ASSOCIE, wxEmptyString,
63  KiScaledBitmap( auto_associe_xpm, this ),
64  _( "Perform automatic footprint association" ) );
65 
66  m_mainToolBar->AddTool( ID_CVPCB_DEL_ASSOCIATIONS, wxEmptyString,
67  KiScaledBitmap( delete_association_xpm, this ),
68  _( "Delete all footprint associations" ) );
69 
72  KiScaledBitmap( module_filtered_list_xpm, this ),
73  wxNullBitmap,
74  true, NULL,
75  _( "Filter footprint list by schematic symbol keywords" ),
76  wxEmptyString );
77 
79  KiScaledBitmap( module_pin_filtered_list_xpm, this ),
80  wxNullBitmap,
81  true, NULL,
82  _( "Filter footprint list by pin count" ),
83  wxEmptyString );
84 
86  KiScaledBitmap( module_library_list_xpm, this ),
87  wxNullBitmap, true, NULL,
88  _( "Filter footprint list by library" ),
89  wxEmptyString );
90 
93  KiScaledBitmap( module_name_filtered_list_xpm, this ),
94  wxNullBitmap, true, NULL,
95  _( "Filter footprint list using a partial name or a pattern" ),
96  wxEmptyString );
97 
99 
100  m_mainToolBar->AddControl( m_tcFilterString );
101 
102 
103  // after adding the buttons to the toolbar, must call Realize() to reflect the changes
104  m_mainToolBar->Realize();
105 }
wxBitmap KiScaledBitmap(BITMAP_DEF aBitmap, EDA_BASE_FRAME *aWindow)
Construct a wxBitmap from a memory record, scaling it if device DPI demands it.
Definition: bitmap.cpp:116
wxTextCtrl * m_tcFilterString
wxAuiToolBar * m_mainToolBar
The common library.
void KiScaledSeparator(wxAuiToolBar *aToolbar, EDA_BASE_FRAME *aWindow)
Add a separator to the given toolbar scaled the same way as KiScaledBitmap.
Definition: bitmap.cpp:167
static constexpr int KICAD_AUI_TB_STYLE
Default style flags used for wxAUI toolbars