KiCad PCB EDA Suite
Loading...
Searching...
No Matches
toolbars_3d.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 Mario Luzeiro <[email protected]>
5 * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
6 * Copyright (C) 2013 Wayne Stambaugh <[email protected]>
7 * Copyright (C) 2023 CERN
8 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
24#include <wx/wupdlock.h>
25#include <wx/choice.h>
26
27#include <bitmaps.h>
29#include <eda_3d_viewer_frame.h>
30#include <tool/action_toolbar.h>
32#include <3d_viewer_id.h>
33
34#include <toolbars_3d.h>
35
36
37std::optional<TOOLBAR_CONFIGURATION> EDA_3D_VIEWER_TOOLBAR_SETTINGS::DefaultToolbarConfig( TOOLBAR_LOC aToolbar )
38{
40
41 // clang-format off
42 switch( aToolbar )
43 {
47 return std::nullopt;
49 config.AppendAction( EDA_3D_ACTIONS::reloadBoard );
50
51 config.AppendSeparator()
52 .AppendAction( EDA_3D_ACTIONS::copyToClipboard );
53
54 config.AppendSeparator()
55 .AppendAction( EDA_3D_ACTIONS::toggleRaytacing );
56
57 config.AppendSeparator()
58 .AppendAction( ACTIONS::zoomRedraw )
59 .AppendAction( ACTIONS::zoomInCenter )
60 .AppendAction( ACTIONS::zoomOutCenter )
61 .AppendAction( ACTIONS::zoomFitScreen );
62
63 config.AppendSeparator()
64 .AppendAction( EDA_3D_ACTIONS::rotateXCW )
65 .AppendAction( EDA_3D_ACTIONS::rotateXCCW );
66
67 config.AppendSeparator()
68 .AppendAction( EDA_3D_ACTIONS::rotateYCW )
69 .AppendAction( EDA_3D_ACTIONS::rotateYCCW );
70
71 config.AppendSeparator()
72 .AppendAction( EDA_3D_ACTIONS::rotateZCW )
73 .AppendAction( EDA_3D_ACTIONS::rotateZCCW );
74
75 config.AppendSeparator()
76 .AppendAction( EDA_3D_ACTIONS::flipView );
77
78 config.AppendSeparator()
79 .AppendAction( EDA_3D_ACTIONS::moveLeft )
80 .AppendAction( EDA_3D_ACTIONS::moveRight )
81 .AppendAction( EDA_3D_ACTIONS::moveUp )
82 .AppendAction( EDA_3D_ACTIONS::moveDown );
83
84 config.AppendSeparator()
85 .AppendAction( EDA_3D_ACTIONS::toggleOrtho );
86
87 config.AppendSeparator()
88 .AppendAction( EDA_3D_ACTIONS::showLayersManager );
89 break;
90 }
91
92 // clang-format on
93 return config;
94}
static TOOL_ACTION zoomRedraw
Definition actions.h:128
static TOOL_ACTION zoomOutCenter
Definition actions.h:132
static TOOL_ACTION zoomFitScreen
Definition actions.h:138
static TOOL_ACTION zoomInCenter
Definition actions.h:131
static TOOL_ACTION showLayersManager
static TOOL_ACTION rotateXCCW
static TOOL_ACTION reloadBoard
static TOOL_ACTION rotateZCCW
static TOOL_ACTION rotateZCW
static TOOL_ACTION rotateYCCW
static TOOL_ACTION rotateXCW
static TOOL_ACTION toggleOrtho
static TOOL_ACTION moveLeft
static TOOL_ACTION toggleRaytacing
static TOOL_ACTION moveUp
static TOOL_ACTION flipView
static TOOL_ACTION moveDown
static TOOL_ACTION copyToClipboard
static TOOL_ACTION moveRight
static TOOL_ACTION rotateYCW
std::optional< TOOLBAR_CONFIGURATION > DefaultToolbarConfig(TOOLBAR_LOC aToolbar) override
Get the default tools to show on the specified canvas toolbar.
Declaration of the eda_3d_viewer class.
@ 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.