KiCad PCB EDA Suite
FILE_NAME_CHAR_VALIDATOR Class Reference

Class FILE_NAME_CHAR_VALIDATOR. More...

#include <validators.h>

Inheritance diagram for FILE_NAME_CHAR_VALIDATOR:

Public Member Functions

 FILE_NAME_CHAR_VALIDATOR (wxString *aValue=NULL)
 

Detailed Description

Class FILE_NAME_CHAR_VALIDATOR.

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 43 of file validators.h.

Constructor & Destructor Documentation

FILE_NAME_CHAR_VALIDATOR::FILE_NAME_CHAR_VALIDATOR ( wxString *  aValue = NULL)

Definition at line 37 of file validators.cpp.

37  :
38  wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, aValue )
39 {
40  // The Windows (DOS) file system forbidden characters already include the forbidden
41  // file name characters for both Posix and OSX systems. The characters \/:*?|"<> are
42  // illegal and filtered by the validator.
43  wxString illegalChars = wxFileName::GetForbiddenChars( wxPATH_DOS );
44  wxTextValidator nameValidator( wxFILTER_EXCLUDE_CHAR_LIST );
45  wxArrayString illegalCharList;
46 
47  for( unsigned i = 0; i < illegalChars.size(); i++ )
48  illegalCharList.Add( wxString( illegalChars[i] ) );
49 
50  SetExcludes( illegalCharList );
51  }

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