2012-05-09 17:37:25 +00:00
|
|
|
/**
|
|
|
|
* @file pcbnew_footprint_wizards.h
|
|
|
|
* @brief Class PCBNEW_FOOTPRINT_WIZARDS
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CLASS_FOOTPRINT_WIZARD_H
|
|
|
|
#define CLASS_FOOTPRINT_WIZARD_H
|
|
|
|
#include <vector>
|
|
|
|
#include <wxPcbStruct.h>
|
|
|
|
|
2012-07-06 19:10:55 +00:00
|
|
|
/**
|
|
|
|
* Class FOOTPRINT_WIZARD
|
|
|
|
* This is the parent class from where any footprint wizard class must
|
2012-05-09 17:37:25 +00:00
|
|
|
* derive */
|
|
|
|
class FOOTPRINT_WIZARD
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
FOOTPRINT_WIZARD() {}
|
|
|
|
~FOOTPRINT_WIZARD() {}
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetName
|
|
|
|
* @return the name of the wizard
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
virtual wxString GetName()=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetImage
|
|
|
|
* @return an svg image of the wizard to be rendered
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
virtual wxString GetImage()=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetDescription
|
|
|
|
* @return a description of the footprint wizard
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
virtual wxString GetDescription()=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetNumParameterPages
|
|
|
|
* @return the number of parameter pages that this wizard will show to the user
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
virtual int GetNumParameterPages()=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetParameterPageName
|
|
|
|
* @param aPage is the page we want the name of
|
|
|
|
* @return a string with the page name
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
virtual wxString GetParameterPageName(int aPage)=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetParameterNames
|
|
|
|
* @param aPage is the page we want the parameter names of
|
|
|
|
* @return an array string with the parameter names on a certain page
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
virtual wxArrayString GetParameterNames(int aPage)=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
2012-07-22 22:23:17 +00:00
|
|
|
/**
|
|
|
|
* Function GetParameterTypes
|
|
|
|
* @param aPage is the page we want the parameter types of
|
|
|
|
* @return an array string with the parameter types on a certain page
|
|
|
|
* "IU" for internal units, "UNITS" for units (0,1,2,3...,N)
|
|
|
|
*/
|
|
|
|
virtual wxArrayString GetParameterTypes(int aPage)=0;
|
|
|
|
|
|
|
|
|
2012-06-27 21:19:19 +00:00
|
|
|
/**
|
|
|
|
* Function GetParameterValues
|
|
|
|
* @param aPage is the page we want the parameter values of
|
|
|
|
* @return an array of parameter values
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
virtual wxArrayString GetParameterValues(int aPage)=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetParameterErrors
|
|
|
|
* @param aPAge is the page we want to know the errors of
|
|
|
|
* @return an array of errors (if any) for the parameters, empty strings for OK parameters
|
|
|
|
*/
|
2012-05-16 09:35:18 +00:00
|
|
|
virtual wxArrayString GetParameterErrors(int aPage)=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function SetParameterValues
|
|
|
|
* @param aPage is the page we want to set the parameters in
|
|
|
|
* @param aValues are the values we want to set into the parameters
|
|
|
|
* @return an array of parameter values
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
virtual wxString SetParameterValues(int aPage,wxArrayString& aValues)=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetModule
|
|
|
|
* This method builds the module itself and returns it to the caller function
|
|
|
|
* @return PCB module built from the parameters given to the class
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
virtual MODULE *GetModule()=0;
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function register_wizard
|
|
|
|
* It's the standard method of a "FOOTPRINT_WIZARD" to register itself into
|
|
|
|
* the FOOTPRINT_WIZARDS singleton manager
|
|
|
|
*
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
void register_wizard();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class FOOTPRINT_WIZARDS
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static std::vector<FOOTPRINT_WIZARD*> m_FootprintWizards;
|
|
|
|
|
|
|
|
public:
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function register_wizard
|
|
|
|
* A footprint wizard calls this static method when it wants to register itself
|
|
|
|
* into the system wizards
|
|
|
|
*
|
|
|
|
* @param aWizard is the footprint wizard to be registered
|
|
|
|
*
|
|
|
|
*/
|
2012-05-09 17:37:25 +00:00
|
|
|
static void register_wizard(FOOTPRINT_WIZARD *wizard);
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetWizard
|
|
|
|
* @return a wizard object by it's name or NULL if it isn't available.
|
|
|
|
*
|
|
|
|
*/
|
2012-05-09 23:04:08 +00:00
|
|
|
static FOOTPRINT_WIZARD* GetWizard(wxString aName);
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetWizard
|
|
|
|
* @return a wizard object by it's number or NULL if it isn't available.
|
|
|
|
*
|
|
|
|
*/
|
2012-05-09 23:04:08 +00:00
|
|
|
static FOOTPRINT_WIZARD* GetWizard(int aIndex);
|
2012-06-27 21:19:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetSize
|
|
|
|
* @return the number of wizards available into the system
|
|
|
|
*/
|
2012-05-09 23:04:08 +00:00
|
|
|
static int GetSize();
|
2012-05-09 17:37:25 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* PCBNEW_FOOTPRINT_WIZARDS_H */
|
|
|
|
|