KiCad PCB EDA Suite
pcbnew_footprint_wizards.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) 2016 KiCad Developers, see CHANGELOG.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 
30 #ifndef PCBNEW_FOOTPRINT_WIZARDS_H
31 #define PCBNEW_FOOTPRINT_WIZARDS_H
32 #include <Python.h>
33 #include <vector>
34 #include <class_footprint_wizard.h>
35 
36 
38 {
39  PyObject* m_PyWizard;
40  PyObject* CallMethod( const char* aMethod, PyObject* aArglist = NULL );
41  wxString CallRetStrMethod( const char* aMethod, PyObject* aArglist = NULL );
42  wxArrayString CallRetArrayStrMethod( const char* aMethod,
43  PyObject* aArglist = NULL );
44 
45 public:
46  PYTHON_FOOTPRINT_WIZARD( PyObject* wizard );
48 
49  wxString GetName() override;
50  wxString GetImage() override;
51  wxString GetDescription() override;
52  int GetNumParameterPages() override;
53  wxString GetParameterPageName( int aPage ) override;
54  wxArrayString GetParameterNames( int aPage ) override;
55  wxArrayString GetParameterTypes( int aPage ) override;
56  wxArrayString GetParameterValues( int aPage ) override;
57  wxArrayString GetParameterErrors( int aPage ) override;
58  // must return an empty string or an error description:
59  wxString SetParameterValues( int aPage, wxArrayString& aValues ) override;
60  MODULE* GetFootprint( wxString * aMessages ) override;
61  void* GetObject() override;
62  wxArrayString GetParameterHints( int aPage ) override;
63  wxArrayString GetParameterDesignators( int aPage = 0) override;
64 
65  void ResetParameters() override;
66 };
67 
68 
70 {
71 public:
72  static void register_wizard( PyObject* aPyWizard );
73  static void deregister_wizard( PyObject* aPyWizard );
74 };
75 
76 #endif /* PCBNEW_FOOTPRINT_WIZARDS_H */
static void deregister_wizard(PyObject *aPyWizard)
static void register_wizard(PyObject *aPyWizard)
void ResetParameters() override
Function ResetParameters Reset all wizard parameters to default values.
Class PCBNEW_FOOTPRINT_WIZARDS.
wxArrayString GetParameterTypes(int aPage) override
Function GetParameterTypes.
wxArrayString CallRetArrayStrMethod(const char *aMethod, PyObject *aArglist=NULL)
PYTHON_FOOTPRINT_WIZARD(PyObject *wizard)
wxArrayString GetParameterNames(int aPage) override
Function GetParameterNames.
wxArrayString GetParameterHints(int aPage) override
Function GetParameterHints.
wxArrayString GetParameterErrors(int aPage) override
Function GetParameterErrors.
wxArrayString GetParameterDesignators(int aPage=0) override
Function GetParamaterDesignators.
int GetNumParameterPages() override
Function GetNumParameterPages.
PyObject * CallMethod(const char *aMethod, PyObject *aArglist=NULL)
wxString CallRetStrMethod(const char *aMethod, PyObject *aArglist=NULL)
wxString SetParameterValues(int aPage, wxArrayString &aValues) override
Function SetParameterValues.
wxString GetImage() override
Function GetImage.
MODULE * GetFootprint(wxString *aMessages) override
Function GetModule This method builds the module itself and returns it to the caller function...
wxArrayString GetParameterValues(int aPage) override
Function GetParameterValues.
void * GetObject() override
Function GetObject This method gets the pointer to the object from where this wizard constructs...
wxString GetName() override
Function GetName.
wxString GetDescription() override
Function GetDescription.
wxString GetParameterPageName(int aPage) override
Function GetParameterPageName.
Class FOOTPRINT_WIZARD This is the parent class from where any footprint wizard class must derive...