KiCad PCB EDA Suite
Loading...
Searching...
No Matches
toolbars_display_footprints.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
21
22#include <tool/action_toolbar.h>
23#include <tool/actions.h>
25#include <tools/pcb_actions.h>
26
27std::optional<TOOLBAR_CONFIGURATION> DISPLAY_FOOTPRINTS_TOOLBAR_SETTINGS::DefaultToolbarConfig( TOOLBAR_LOC aToolbar )
28{
30
31 // clang-format off
32 switch( aToolbar )
33 {
34 // Currently, no top aux or right toolbars
37 return std::nullopt;
38
40 config.AppendAction( ACTIONS::selectionTool )
41 .AppendAction( ACTIONS::measureTool );
42
43 config.AppendSeparator()
44 .AppendAction( ACTIONS::toggleGrid )
45 .AppendAction( ACTIONS::togglePolarCoords )
46 .AppendAction( ACTIONS::inchesUnits )
47 .AppendAction( ACTIONS::milsUnits )
48 .AppendAction( ACTIONS::millimetersUnits )
49 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Crosshair modes" ) )
52 .AddAction( ACTIONS::cursor45Crosshairs ) );
53
54 config.AppendSeparator()
55 .AppendAction( PCB_ACTIONS::showPadNumbers )
56 .AppendAction( PCB_ACTIONS::padDisplayMode )
57 .AppendAction( PCB_ACTIONS::textOutlines )
58 .AppendAction( PCB_ACTIONS::graphicsOutlines );
59 break;
60
62 config.AppendAction( ACTIONS::zoomRedraw )
63 .AppendAction( ACTIONS::zoomInCenter )
64 .AppendAction( ACTIONS::zoomOutCenter )
65 .AppendAction( ACTIONS::zoomFitScreen )
66 .AppendAction( ACTIONS::zoomTool );
67
68 config.AppendSeparator()
69 .AppendAction( ACTIONS::show3DViewer );
70
71 config.AppendSeparator()
73
74 config.AppendSeparator()
76
77 config.AppendSeparator()
78 .AppendAction( PCB_ACTIONS::fpAutoZoom );
79 break;
80 }
81
82 // clang-format on
83 return config;
84}
static TOOL_ACTION toggleGrid
Definition actions.h:197
static TOOL_ACTION zoomRedraw
Definition actions.h:131
static TOOL_ACTION millimetersUnits
Definition actions.h:205
static TOOL_ACTION show3DViewer
Definition actions.h:257
static TOOL_ACTION cursorSmallCrosshairs
Definition actions.h:151
static TOOL_ACTION zoomOutCenter
Definition actions.h:135
static TOOL_ACTION togglePolarCoords
Definition actions.h:208
static TOOL_ACTION milsUnits
Definition actions.h:204
static TOOL_ACTION inchesUnits
Definition actions.h:203
static TOOL_ACTION measureTool
Definition actions.h:251
static TOOL_ACTION selectionTool
Definition actions.h:250
static TOOL_ACTION zoomFitScreen
Definition actions.h:141
static TOOL_ACTION zoomTool
Definition actions.h:145
static TOOL_ACTION cursor45Crosshairs
Definition actions.h:153
static TOOL_ACTION zoomInCenter
Definition actions.h:134
static TOOL_ACTION cursorFullCrosshairs
Definition actions.h:152
static ACTION_TOOLBAR_CONTROL gridSelect
static ACTION_TOOLBAR_CONTROL zoomSelect
std::optional< TOOLBAR_CONFIGURATION > DefaultToolbarConfig(TOOLBAR_LOC aToolbar) override
Get the default tools to show on the specified canvas toolbar.
static TOOL_ACTION padDisplayMode
static TOOL_ACTION graphicsOutlines
Display footprint graphics as outlines.
static TOOL_ACTION fpAutoZoom
static TOOL_ACTION textOutlines
Display texts as lines.
static TOOL_ACTION showPadNumbers
#define _(s)
@ RIGHT
Toolbar on the right side of the canvas.
@ LEFT
Toolbar on the left side of the canvas.
@ TOP_AUX
Toolbar on the top of the canvas.
@ TOP_MAIN
Toolbar on the top of the canvas.