KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
template_fieldnames.h File Reference
#include <wx/string.h>

Go to the source code of this file.

Classes

struct  TEMPLATE_FIELDNAME
 Hold a name of a symbol's field, field value, and default visibility. More...
 
class  TEMPLATES
 

Macros

#define MANDATORY_FIELDS
 
#define GLOBALLABEL_MANDATORY_FIELDS   { FIELD_T::INTERSHEET_REFS }
 
#define SHEET_MANDATORY_FIELDS
 
#define DO_TRANSLATE   true
 

Enumerations

enum class  FIELD_T : int {
  USER , REFERENCE , VALUE , FOOTPRINT ,
  DATASHEET , DESCRIPTION , INTERSHEET_REFS , SHEET_NAME ,
  SHEET_FILENAME , SHEET_USER
}
 The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hold. More...
 

Functions

wxString GetDefaultFieldName (FIELD_T aFieldId, bool aTranslateForHI)
 Return a default symbol field name for a mandatory field type.
 
wxString GetUserFieldName (int aFieldNdx, bool aTranslateForHI)
 
wxString GetCanonicalFieldName (FIELD_T aFieldType)
 

Macro Definition Documentation

◆ DO_TRANSLATE

#define DO_TRANSLATE   true

Definition at line 70 of file template_fieldnames.h.

◆ GLOBALLABEL_MANDATORY_FIELDS

#define GLOBALLABEL_MANDATORY_FIELDS   { FIELD_T::INTERSHEET_REFS }

Definition at line 63 of file template_fieldnames.h.

◆ MANDATORY_FIELDS

#define MANDATORY_FIELDS
Value:
@ DESCRIPTION
Field Description of part, i.e. "1/4W 1% Metal Film Resistor".
@ FOOTPRINT
Field Name Module PCB, i.e. "16DIP300".
@ DATASHEET
name of datasheet
@ REFERENCE
Field Reference of part, i.e. "IC21".
@ VALUE
Field Value of part, i.e. "3.3K".

Definition at line 57 of file template_fieldnames.h.

◆ SHEET_MANDATORY_FIELDS

#define SHEET_MANDATORY_FIELDS
Value:

Definition at line 65 of file template_fieldnames.h.

Enumeration Type Documentation

◆ FIELD_T

enum class FIELD_T : int
strong

The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hold.

The first fields are fixed fields and are defined by MANDATORY_FIELDS. After that come an unlimited number of user defined fields, only some of which have indices defined here.

NOTE: this must stay a enum class to prevent developers from trying to use it as an array index.

Enumerator
USER 

The field ID hasn't been set yet; field is invalid.

REFERENCE 

Field Reference of part, i.e. "IC21".

VALUE 

Field Value of part, i.e. "3.3K".

FOOTPRINT 

Field Name Module PCB, i.e. "16DIP300".

DATASHEET 

name of datasheet

DESCRIPTION 

Field Description of part, i.e. "1/4W 1% Metal Film Resistor".

INTERSHEET_REFS 

Global label cross-reference page numbers.

SHEET_NAME 
SHEET_FILENAME 
SHEET_USER 

Definition at line 43 of file template_fieldnames.h.

Function Documentation

◆ GetCanonicalFieldName()

◆ GetDefaultFieldName()

◆ GetUserFieldName()