2016-07-19 13:35:25 -04:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
|
|
|
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
2018-03-16 08:38:36 -04:00
|
|
|
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
|
2023-08-11 18:40:13 +01:00
|
|
|
* Copyright (C) 2023 CERN
|
2025-01-01 13:30:11 -08:00
|
|
|
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
2016-07-19 13:35:25 -04:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2020-03-18 22:48:36 +00:00
|
|
|
#include <wx/wupdlock.h>
|
2022-06-06 21:58:00 +01:00
|
|
|
#include <wx/choice.h>
|
2021-03-07 15:31:19 -05:00
|
|
|
|
|
|
|
#include <bitmaps.h>
|
2022-10-27 11:32:52 +01:00
|
|
|
#include <dialogs/eda_view_switcher.h>
|
2021-08-05 13:03:59 +01:00
|
|
|
#include <eda_3d_viewer_frame.h>
|
2020-03-18 22:48:36 +00:00
|
|
|
#include <tool/action_toolbar.h>
|
2021-06-19 18:28:45 +01:00
|
|
|
#include <tools/eda_3d_actions.h>
|
2016-07-19 13:35:25 -04:00
|
|
|
#include <3d_viewer_id.h>
|
|
|
|
|
2025-02-20 02:53:15 +00:00
|
|
|
std::optional<TOOLBAR_CONFIGURATION> EDA_3D_VIEWER_FRAME::DefaultTopMainToolbarConfig()
|
2016-07-19 13:35:25 -04:00
|
|
|
{
|
2025-02-20 02:53:15 +00:00
|
|
|
TOOLBAR_CONFIGURATION config;
|
2016-07-19 13:35:25 -04:00
|
|
|
|
2025-02-20 02:53:15 +00:00
|
|
|
// clang-format off
|
2025-02-20 13:44:29 +00:00
|
|
|
config.AppendAction( EDA_3D_ACTIONS::reloadBoard );
|
2025-02-20 02:53:15 +00:00
|
|
|
|
2025-02-20 13:44:29 +00:00
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::copyToClipboard );
|
2025-02-20 02:53:15 +00:00
|
|
|
|
2025-02-20 13:44:29 +00:00
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::toggleRaytacing );
|
2025-02-20 02:53:15 +00:00
|
|
|
|
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( ACTIONS::zoomRedraw )
|
|
|
|
.AppendAction( ACTIONS::zoomInCenter )
|
|
|
|
.AppendAction( ACTIONS::zoomOutCenter )
|
|
|
|
.AppendAction( ACTIONS::zoomFitScreen );
|
|
|
|
|
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::rotateXCW )
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::rotateXCCW );
|
|
|
|
|
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::rotateYCW )
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::rotateYCCW );
|
|
|
|
|
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::rotateZCW )
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::rotateZCCW );
|
|
|
|
|
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::flipView );
|
|
|
|
|
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::moveLeft )
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::moveRight )
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::moveUp )
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::moveDown );
|
|
|
|
|
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::toggleOrtho );
|
|
|
|
|
|
|
|
config.AppendSeparator()
|
|
|
|
.AppendAction( EDA_3D_ACTIONS::showLayersManager );
|
|
|
|
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
return config;
|
2020-03-18 22:48:36 +00:00
|
|
|
}
|