KiCad PCB EDA Suite
footprint_wizard.h
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) 2013 NBEE Embedded Systems SL, Miguel Angel Ajo <miguelangel@ajo.es>
5
* Copyright (C) 2013-2020 KiCad Developers, see AUTHORS.txt for contributors.
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, you may find one here:
19
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20
* or you may search the http://www.gnu.org website for the version 2 license,
21
* or you may write to the Free Software Foundation, Inc.,
22
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23
*/
24
25
31
#ifndef FOOTPRINT_WIZARD_H
32
#define FOOTPRINT_WIZARD_H
33
34
#include <vector>
35
#include <
pcb_edit_frame.h
>
36
37
// Allowable parameter types for PCB wizards
38
const
wxString
WIZARD_PARAM_UNITS_MM
=
"mm"
;
// Millimetres
39
const
wxString
WIZARD_PARAM_UNITS_MILS
=
"mils"
;
// Mils / thou
40
const
wxString
WIZARD_PARAM_UNITS_FLOAT
=
"float"
;
// Floating point (dimensionless)
41
const
wxString
WIZARD_PARAM_UNITS_INTEGER
=
"integer"
;
// Integer (dimensionless)
42
const
wxString
WIZARD_PARAM_UNITS_BOOL
=
"bool"
;
// Boolean option
43
const
wxString
WIZARD_PARAM_UNITS_RADIANS
=
"radians"
;
// Angle (radians)
44
const
wxString
WIZARD_PARAM_UNITS_DEGREES
=
"degrees"
;
// Angle (degrees)
45
const
wxString
WIZARD_PARAM_UNITS_PERCENT
=
"%"
;
// Percent (0% -> 100%)
46
const
wxString
WIZARD_PARAM_UNITS_STRING
=
"string"
;
// String
47
52
class
FOOTPRINT_WIZARD
53
{
54
public
:
55
FOOTPRINT_WIZARD
() {}
56
virtual
~FOOTPRINT_WIZARD
();
57
62
virtual
wxString
GetName
() = 0;
63
68
virtual
wxString
GetImage
() = 0;
69
74
virtual
wxString
GetDescription
() = 0;
75
80
virtual
int
GetNumParameterPages
() = 0;
81
87
virtual
wxString
GetParameterPageName
(
int
aPage ) = 0;
88
94
virtual
wxArrayString
GetParameterNames
(
int
aPage ) = 0;
95
102
virtual
wxArrayString
GetParameterTypes
(
int
aPage ) = 0;
103
104
110
virtual
wxArrayString
GetParameterValues
(
int
aPage ) = 0;
111
117
virtual
wxArrayString
GetParameterErrors
(
int
aPage ) = 0;
118
124
virtual
wxArrayString
GetParameterHints
(
int
aPage ) = 0;
125
131
virtual
wxArrayString
GetParameterDesignators
(
int
aPage ) = 0;
132
139
virtual
wxString
SetParameterValues
(
int
aPage, wxArrayString& aValues ) = 0;
140
145
virtual
void
ResetParameters
() = 0;
146
154
virtual
FOOTPRINT
*
GetFootprint
( wxString* aMessage ) = 0;
155
161
virtual
void
*
GetObject
() = 0;
162
168
void
register_wizard
();
169
};
170
171
172
class
FOOTPRINT_WIZARD_LIST
173
{
174
private
:
178
static
std::vector<FOOTPRINT_WIZARD*>
m_FootprintWizards
;
179
180
public
:
181
191
static
void
register_wizard
(
FOOTPRINT_WIZARD
* aWizard );
192
201
static
bool
deregister_object
(
void
* aObject );
202
208
static
FOOTPRINT_WIZARD
*
GetWizard
(
const
wxString& aName );
209
215
static
FOOTPRINT_WIZARD
*
GetWizard
(
int
aIndex );
216
221
static
int
GetWizardsCount
();
222
};
223
224
#endif
/* PCBNEW_FOOTPRINT_WIZARDS_H */
FOOTPRINT_WIZARD::GetParameterErrors
virtual wxArrayString GetParameterErrors(int aPage)=0
Function GetParameterErrors.
WIZARD_PARAM_UNITS_MM
const wxString WIZARD_PARAM_UNITS_MM
Definition:
footprint_wizard.h:38
FOOTPRINT_WIZARD_LIST::GetWizard
static FOOTPRINT_WIZARD * GetWizard(const wxString &aName)
Function GetWizard.
Definition:
footprint_wizard.cpp:53
FOOTPRINT_WIZARD::GetFootprint
virtual FOOTPRINT * GetFootprint(wxString *aMessage)=0
Function GetFootprint This method builds the footprint itself and returns it to the caller function.
FOOTPRINT_WIZARD::SetParameterValues
virtual wxString SetParameterValues(int aPage, wxArrayString &aValues)=0
Function SetParameterValues.
FOOTPRINT_WIZARD::GetParameterPageName
virtual wxString GetParameterPageName(int aPage)=0
Function GetParameterPageName.
FOOTPRINT_WIZARD::GetParameterTypes
virtual wxArrayString GetParameterTypes(int aPage)=0
Function GetParameterTypes.
FOOTPRINT_WIZARD::GetObject
virtual void * GetObject()=0
Function GetObject This method gets the pointer to the object from where this wizard constructs.
FOOTPRINT_WIZARD::register_wizard
void register_wizard()
Function register_wizard It's the standard method of a "FOOTPRINT_WIZARD" to register itself into the...
Definition:
footprint_wizard.cpp:39
FOOTPRINT_WIZARD::~FOOTPRINT_WIZARD
virtual ~FOOTPRINT_WIZARD()
Definition:
footprint_wizard.cpp:34
FOOTPRINT_WIZARD::GetParameterNames
virtual wxArrayString GetParameterNames(int aPage)=0
Function GetParameterNames.
WIZARD_PARAM_UNITS_DEGREES
const wxString WIZARD_PARAM_UNITS_DEGREES
Definition:
footprint_wizard.h:44
WIZARD_PARAM_UNITS_RADIANS
const wxString WIZARD_PARAM_UNITS_RADIANS
Definition:
footprint_wizard.h:43
WIZARD_PARAM_UNITS_INTEGER
const wxString WIZARD_PARAM_UNITS_INTEGER
Definition:
footprint_wizard.h:41
FOOTPRINT_WIZARD_LIST::GetWizardsCount
static int GetWizardsCount()
Function GetWizardsCount.
Definition:
footprint_wizard.cpp:71
FOOTPRINT_WIZARD::GetParameterDesignators
virtual wxArrayString GetParameterDesignators(int aPage)=0
Function GetParamaterDesignators.
WIZARD_PARAM_UNITS_MILS
const wxString WIZARD_PARAM_UNITS_MILS
Definition:
footprint_wizard.h:39
WIZARD_PARAM_UNITS_FLOAT
const wxString WIZARD_PARAM_UNITS_FLOAT
Definition:
footprint_wizard.h:40
FOOTPRINT_WIZARD::GetDescription
virtual wxString GetDescription()=0
Function GetDescription.
FOOTPRINT_WIZARD_LIST::m_FootprintWizards
static std::vector< FOOTPRINT_WIZARD * > m_FootprintWizards
FOOTPRINT_WIZARD system wide static list.
Definition:
footprint_wizard.h:178
FOOTPRINT_WIZARD::FOOTPRINT_WIZARD
FOOTPRINT_WIZARD()
Definition:
footprint_wizard.h:55
WIZARD_PARAM_UNITS_PERCENT
const wxString WIZARD_PARAM_UNITS_PERCENT
Definition:
footprint_wizard.h:45
pcb_edit_frame.h
FOOTPRINT_WIZARD::GetImage
virtual wxString GetImage()=0
Function GetImage.
FOOTPRINT_WIZARD::GetNumParameterPages
virtual int GetNumParameterPages()=0
Function GetNumParameterPages.
FOOTPRINT_WIZARD_LIST
Definition:
footprint_wizard.h:172
FOOTPRINT_WIZARD::GetName
virtual wxString GetName()=0
Function GetName.
WIZARD_PARAM_UNITS_STRING
const wxString WIZARD_PARAM_UNITS_STRING
Definition:
footprint_wizard.h:46
FOOTPRINT_WIZARD::GetParameterValues
virtual wxArrayString GetParameterValues(int aPage)=0
Function GetParameterValues.
FOOTPRINT_WIZARD::ResetParameters
virtual void ResetParameters()=0
Function ResetParameters Reset all wizard parameters to default values.
FOOTPRINT_WIZARD::GetParameterHints
virtual wxArrayString GetParameterHints(int aPage)=0
Function GetParameterHints.
FOOTPRINT_WIZARD_LIST::register_wizard
static void register_wizard(FOOTPRINT_WIZARD *aWizard)
Function register_wizard A footprint wizard calls this static method when it wants to register itself...
Definition:
footprint_wizard.cpp:77
FOOTPRINT_WIZARD_LIST::deregister_object
static bool deregister_object(void *aObject)
Function deregister_object Anyone calls this method to deregister an object which builds a wizard,...
Definition:
footprint_wizard.cpp:103
WIZARD_PARAM_UNITS_BOOL
const wxString WIZARD_PARAM_UNITS_BOOL
Definition:
footprint_wizard.h:42
FOOTPRINT_WIZARD
FOOTPRINT_WIZARD This is the parent class from where any footprint wizard class must derive.
Definition:
footprint_wizard.h:52
FOOTPRINT
Definition:
footprint.h:108
pcbnew
footprint_wizard.h
Generated on Thu Jan 21 2021 04:12:50 for KiCad PCB EDA Suite by
1.8.15