KiCad PCB EDA Suite
FOOTPRINT_NAME_VALIDATOR Class Reference

This class provides a custom wxValidator object for limiting the allowable characters when defining footprint names. More...

#include <validators.h>

Inheritance diagram for FOOTPRINT_NAME_VALIDATOR:

Public Member Functions

 FOOTPRINT_NAME_VALIDATOR (wxString *aValue=nullptr)
 

Detailed Description

This class provides a custom wxValidator object for limiting the allowable characters when defining footprint names.

Since the introduction of the PRETTY footprint library format, footprint names cannot have any characters that would prevent file creation on any platform. The characters \/:*?|"<> are illegal and filtered by the validator.

Definition at line 63 of file validators.h.

Constructor & Destructor Documentation

◆ FOOTPRINT_NAME_VALIDATOR()

FOOTPRINT_NAME_VALIDATOR::FOOTPRINT_NAME_VALIDATOR ( wxString *  aValue = nullptr)

Definition at line 71 of file validators.cpp.

71  :
72  wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, aValue )
73 {
74  // This list of characters follows the string from footprint.cpp which, in turn mimics the
75  // strings from lib_id.cpp
76  // TODO: Unify forbidden character lists
77  wxString illegalChars = "%$<>\t\n\r\"\\/:";
78  SetCharExcludes( illegalChars );
79  }

The documentation for this class was generated from the following files: