KiCad PCB EDA Suite
MODULE_NAME_CHAR_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 MODULE_NAME_CHAR_VALIDATOR:

Public Member Functions

 MODULE_NAME_CHAR_VALIDATOR (wxString *aValue=NULL)
 

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

◆ MODULE_NAME_CHAR_VALIDATOR()

MODULE_NAME_CHAR_VALIDATOR::MODULE_NAME_CHAR_VALIDATOR ( wxString *  aValue = NULL)

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 class_module.cpp
75  // which, in turn mimics the 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: