2022-10-04 01:53:37 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
|
|
|
|
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
|
|
|
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2022-10-25 23:03:21 -04:00
|
|
|
#ifndef COMMAND_EXPORT_PCB_BASE_H
|
|
|
|
#define COMMAND_EXPORT_PCB_BASE_H
|
2022-10-04 01:53:37 +00:00
|
|
|
|
|
|
|
#include "command.h"
|
2022-10-25 23:03:21 -04:00
|
|
|
#include <layer_ids.h>
|
2022-10-04 01:53:37 +00:00
|
|
|
|
|
|
|
namespace CLI
|
|
|
|
{
|
2022-10-25 23:03:21 -04:00
|
|
|
#define ARG_OUTPUT "--output"
|
|
|
|
#define ARG_INPUT "input"
|
2023-01-08 22:37:48 -05:00
|
|
|
|
2022-10-28 09:43:35 -04:00
|
|
|
#define ARG_BLACKANDWHITE "--black-and-white"
|
2023-01-08 22:37:48 -05:00
|
|
|
#define ARG_BLACKANDWHITE_DESC "Black and white only"
|
|
|
|
|
2022-10-28 09:43:35 -04:00
|
|
|
#define ARG_LAYERS "--layers"
|
|
|
|
#define ARG_INCLUDE_REFDES "--include-refdes"
|
|
|
|
#define ARG_INCLUDE_VALUE "--include-value"
|
|
|
|
#define ARG_THEME "--theme"
|
|
|
|
#define ARG_INCLUDE_BORDER_TITLE "--include-border-title"
|
2022-10-25 23:03:21 -04:00
|
|
|
|
|
|
|
struct EXPORT_PCB_BASE_COMMAND : public COMMAND
|
2022-10-04 01:53:37 +00:00
|
|
|
{
|
2022-12-11 13:57:21 -05:00
|
|
|
EXPORT_PCB_BASE_COMMAND( const std::string& aName );
|
2022-10-25 23:03:21 -04:00
|
|
|
|
|
|
|
protected:
|
2023-01-01 11:50:40 -05:00
|
|
|
int doPerform( KIWAY& aKiway ) override;
|
2022-12-11 13:57:21 -05:00
|
|
|
LSET convertLayerStringList( wxString& aLayerString, bool& aLayerArgSet ) const;
|
2022-10-28 09:43:35 -04:00
|
|
|
void addLayerArg( bool aRequire );
|
2022-10-04 01:53:37 +00:00
|
|
|
|
2022-10-25 23:03:21 -04:00
|
|
|
std::map<std::string, LSET> m_layerMasks;
|
2022-10-28 09:43:35 -04:00
|
|
|
LSET m_selectedLayers;
|
2022-12-11 13:57:21 -05:00
|
|
|
bool m_selectedLayersSet;
|
2022-10-28 09:43:35 -04:00
|
|
|
|
2022-12-11 13:57:21 -05:00
|
|
|
bool m_hasLayerArg;
|
|
|
|
bool m_requireLayers;
|
2022-10-04 01:53:37 +00:00
|
|
|
};
|
2022-10-25 23:03:21 -04:00
|
|
|
} // namespace CLI
|
2022-10-04 01:53:37 +00:00
|
|
|
|
|
|
|
#endif
|