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 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Units" ) )
47 .AddAction( ACTIONS::millimetersUnits )
48 .AddAction( ACTIONS::inchesUnits )
49 .AddAction( ACTIONS::milsUnits ) )
50 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Crosshair modes" ) )
53 .AddAction( ACTIONS::cursor45Crosshairs ) );
54
55 config.AppendSeparator()
56 .AppendAction( PCB_ACTIONS::showPadNumbers )
57 .AppendAction( PCB_ACTIONS::padDisplayMode )
58 .AppendAction( PCB_ACTIONS::textOutlines )
59 .AppendAction( PCB_ACTIONS::graphicsOutlines );
60 break;
61
63 config.AppendAction( ACTIONS::zoomRedraw )
64 .AppendAction( ACTIONS::zoomInCenter )
65 .AppendAction( ACTIONS::zoomOutCenter )
66 .AppendAction( ACTIONS::zoomFitScreen )
67 .AppendAction( ACTIONS::zoomTool );
68
69 config.AppendSeparator()
70 .AppendAction( ACTIONS::show3DViewer );
71
72 config.AppendSeparator()
74
75 config.AppendSeparator()
77
78 config.AppendSeparator()
79 .AppendAction( PCB_ACTIONS::fpAutoZoom );
80 break;
81 }
82
83 // clang-format on
84 return config;
85}
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.