KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_properties_panel.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KICAD, a free EDA CAD application.
3 *
4 * Copyright (C) 2020 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 * @author Maciej Suminski <[email protected]>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 3
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
23
24#include <font/fontconfig.h>
25#include <pgm_base.h>
26#include <connection_graph.h>
30#include <sch_commit.h>
31#include <sch_edit_frame.h>
32#include <symbol_edit_frame.h>
33#include <symbol_viewer_frame.h>
34#include <schematic.h>
35#include <sch_symbol.h>
36#include <sch_field.h>
37#include <template_fieldnames.h>
39#include <string_utils.h>
40#include <tool/tool_manager.h>
42#include <set>
43
44static const wxString MISSING_FIELD_SENTINEL = wxS( "\uE000" );
45
47{
48public:
49 SCH_SYMBOL_FIELD_PROPERTY( const wxString& aName ) :
50 PROPERTY_BASE( aName ),
51 m_name( aName )
52 {
53 }
54
55 size_t OwnerHash() const override { return TYPE_HASH( SCH_SYMBOL ); }
56 size_t BaseHash() const override { return TYPE_HASH( SCH_SYMBOL ); }
57 size_t TypeHash() const override { return TYPE_HASH( wxString ); }
58
59 bool Writeable( INSPECTABLE* aObject ) const override
60 {
61 return PROPERTY_BASE::Writeable( aObject );
62 }
63
64 void setter( void* obj, wxAny& v ) override
65 {
66 wxString value;
67
68 if( !v.GetAs( &value ) )
69 return;
70
71 SCH_SYMBOL* symbol = reinterpret_cast<SCH_SYMBOL*>( obj );
72 SCH_FIELD* field = symbol->GetField( m_name );
73
74 wxString variantName;
75 const SCH_SHEET_PATH* sheetPath = nullptr;
76
77 if( symbol->Schematic() )
78 {
79 variantName = symbol->Schematic()->GetCurrentVariant();
80 sheetPath = &symbol->Schematic()->CurrentSheet();
81 }
82
83 if( !field )
84 {
85 SCH_FIELD newField( symbol, FIELD_T::USER, m_name );
86 newField.SetText( value, sheetPath, variantName );
87 symbol->AddField( newField );
88 }
89 else
90 {
91 field->SetText( value, sheetPath, variantName );
92 }
93 }
94
95 wxAny getter( const void* obj ) const override
96 {
97 const SCH_SYMBOL* symbol = reinterpret_cast<const SCH_SYMBOL*>( obj );
98 const SCH_FIELD* field = symbol->GetField( m_name );
99
100 if( field )
101 {
102 wxString variantName;
103 const SCH_SHEET_PATH* sheetPath = nullptr;
104
105 if( symbol->Schematic() )
106 {
107 variantName = symbol->Schematic()->GetCurrentVariant();
108 sheetPath = &symbol->Schematic()->CurrentSheet();
109 }
110
111 wxString text;
112
113 if( !variantName.IsEmpty() && sheetPath )
114 text = field->GetText( sheetPath, variantName );
115 else
116 text = field->GetText();
117
118 return wxAny( text );
119 }
120 else
121 {
122 return wxAny( MISSING_FIELD_SENTINEL );
123 }
124 }
125
126private:
127 wxString m_name;
128};
129
131
133 PROPERTIES_PANEL( aParent, aFrame ),
134 m_frame( aFrame ),
135 m_propMgr( PROPERTY_MANAGER::Instance() )
136{
137 m_propMgr.Rebuild();
138 bool found = false;
139
140 wxASSERT( wxPGGlobalVars );
141
142 wxString editorKey = PG_UNIT_EDITOR::BuildEditorName( m_frame );
143
144 auto it = wxPGGlobalVars->m_mapEditorClasses.find( editorKey );
145
146 if( it != wxPGGlobalVars->m_mapEditorClasses.end() )
147 {
148 m_unitEditorInstance = static_cast<PG_UNIT_EDITOR*>( it->second );
149 m_unitEditorInstance->UpdateFrame( m_frame );
150 found = true;
151 }
152
153 if( !found )
154 {
155 PG_UNIT_EDITOR* new_editor = new PG_UNIT_EDITOR( m_frame );
156 m_unitEditorInstance = static_cast<PG_UNIT_EDITOR*>( wxPropertyGrid::RegisterEditorClass( new_editor ) );
157 }
158
159 it = wxPGGlobalVars->m_mapEditorClasses.find( PG_CHECKBOX_EDITOR::EDITOR_NAME );
160
161 if( it == wxPGGlobalVars->m_mapEditorClasses.end() )
162 {
163 PG_CHECKBOX_EDITOR* cbEditor = new PG_CHECKBOX_EDITOR();
164 m_checkboxEditorInstance = static_cast<PG_CHECKBOX_EDITOR*>( wxPropertyGrid::RegisterEditorClass( cbEditor ) );
165 }
166 else
167 {
168 m_checkboxEditorInstance = static_cast<PG_CHECKBOX_EDITOR*>( it->second );
169 }
170
171 it = wxPGGlobalVars->m_mapEditorClasses.find( PG_COLOR_EDITOR::EDITOR_NAME );
172
173 if( it == wxPGGlobalVars->m_mapEditorClasses.end() )
174 {
175 PG_COLOR_EDITOR* colorEditor = new PG_COLOR_EDITOR();
176 m_colorEditorInstance = static_cast<PG_COLOR_EDITOR*>( wxPropertyGrid::RegisterEditorClass( colorEditor ) );
177 }
178 else
179 {
180 m_colorEditorInstance = static_cast<PG_COLOR_EDITOR*>( it->second );
181 }
182
183 it = wxPGGlobalVars->m_mapEditorClasses.find( PG_FPID_EDITOR::BuildEditorName( m_frame ) );
184
185 if( it != wxPGGlobalVars->m_mapEditorClasses.end() )
186 {
187 m_fpEditorInstance = static_cast<PG_FPID_EDITOR*>( it->second );
188 m_fpEditorInstance->UpdateFrame( m_frame );
189 }
190 else
191 {
192 PG_FPID_EDITOR* fpEditor = new PG_FPID_EDITOR( m_frame );
193 m_fpEditorInstance = static_cast<PG_FPID_EDITOR*>( wxPropertyGrid::RegisterEditorClass( fpEditor ) );
194 }
195
196 it = wxPGGlobalVars->m_mapEditorClasses.find( PG_URL_EDITOR::BuildEditorName( m_frame ) );
197
198 if( it != wxPGGlobalVars->m_mapEditorClasses.end() )
199 {
200 m_urlEditorInstance = static_cast<PG_URL_EDITOR*>( it->second );
201 m_urlEditorInstance->UpdateFrame( m_frame );
202 }
203 else
204 {
205 PG_URL_EDITOR* urlEditor = new PG_URL_EDITOR( m_frame );
206 m_urlEditorInstance = static_cast<PG_URL_EDITOR*>( wxPropertyGrid::RegisterEditorClass( urlEditor ) );
207 }
208}
209
210
211
213{
214 m_unitEditorInstance->UpdateFrame( nullptr );
215 m_fpEditorInstance->UpdateFrame( nullptr );
216 m_urlEditorInstance->UpdateFrame( nullptr );
217}
218
219
221{
222 SCH_SELECTION_TOOL* selectionTool = m_frame->GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
223 const SELECTION& selection = selectionTool->GetSelection();
224
225 if( selection.Empty() && m_frame->IsType( FRAME_SCH_SYMBOL_EDITOR ) )
226 {
227 SYMBOL_EDIT_FRAME* symbolFrame = static_cast<SYMBOL_EDIT_FRAME*>( m_frame );
228
229 if( symbolFrame->GetCurSymbol() )
230 {
231 aFallbackSelection.Clear();
232 aFallbackSelection.Add( symbolFrame->GetCurSymbol() );
233 return aFallbackSelection;
234 }
235 }
236
237 return selection;
238}
239
240
242{
243 SELECTION fallbackSelection;
244 const SELECTION& selection = getSelection( fallbackSelection );
245
246 return selection.Empty() ? nullptr : selection.Front();
247}
248
249
251{
252 SELECTION fallbackSelection;
253 const SELECTION& selection = getSelection( fallbackSelection );
254
255 // Will actually just be updatePropertyValues() if selection hasn't changed
256 rebuildProperties( selection );
257}
258
259
261{
262 SELECTION fallbackSelection;
263 const SELECTION& selection = getSelection( fallbackSelection );
264
265 rebuildProperties( selection );
266}
267
268
270{
271 m_currentFieldNames.clear();
272
273 for( EDA_ITEM* item : aSelection )
274 {
275 if( item->Type() != SCH_SYMBOL_T )
276 continue;
277
278 SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
279
280 for( const SCH_FIELD& field : symbol->GetFields() )
281 {
282 if( field.IsPrivate() )
283 continue;
284
285 m_currentFieldNames.insert( field.GetCanonicalName() );
286 }
287 }
288
289 const wxString groupFields = _HKI( "Fields" );
290
291 for( const wxString& name : m_currentFieldNames )
292 {
293 if( !m_propMgr.GetProperty( TYPE_HASH( SCH_SYMBOL ), name ) )
294 {
295 m_propMgr.AddProperty( new SCH_SYMBOL_FIELD_PROPERTY( name ), groupFields )
296 .SetAvailableFunc( [name]( INSPECTABLE* )
297 {
299 } );
300 }
301 }
302
304}
305
306
307wxPGProperty* SCH_PROPERTIES_PANEL::createPGProperty( const PROPERTY_BASE* aProperty ) const
308{
309 wxPGProperty* prop = PGPropertyFactory( aProperty, m_frame );
310
311 if( auto colorProp = dynamic_cast<PGPROPERTY_COLOR4D*>( prop ) )
312 {
313 COLOR4D bg = m_frame->GetColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND );
314 colorProp->SetBackgroundColor( bg );
315 }
316
317 if( aProperty->Name() == GetCanonicalFieldName( FIELD_T::FOOTPRINT ) )
318 prop->SetEditor( PG_FPID_EDITOR::BuildEditorName( m_frame ) );
319 else if( aProperty->Name() == GetCanonicalFieldName( FIELD_T::DATASHEET ) )
320 prop->SetEditor( PG_URL_EDITOR::BuildEditorName( m_frame ) );
321
322 return prop;
323}
324
325
326PROPERTY_BASE* SCH_PROPERTIES_PANEL::getPropertyFromEvent( const wxPropertyGridEvent& aEvent ) const
327{
328 EDA_ITEM* item = const_cast<SCH_PROPERTIES_PANEL*>( this )->getFrontItem();
329
330 if( !item || !item->IsSCH_ITEM() )
331 return nullptr;
332
333 SCH_ITEM* firstItem = static_cast<SCH_ITEM*>( item );
334
335 wxCHECK_MSG( firstItem, nullptr,
336 wxT( "getPropertyFromEvent for a property with nothing selected!") );
337
338 PROPERTY_BASE* property = m_propMgr.GetProperty( TYPE_HASH( *firstItem ),
339 aEvent.GetPropertyName() );
340 wxCHECK_MSG( property, nullptr,
341 wxT( "getPropertyFromEvent for a property not found on the selected item!" ) );
342
343 return property;
344}
345
346
347void SCH_PROPERTIES_PANEL::valueChanging( wxPropertyGridEvent& aEvent )
348{
350 return;
351
352 EDA_ITEM* frontItem = getFrontItem();
353
354 if( !frontItem )
355 return;
356
357 if( PROPERTY_BASE* property = getPropertyFromEvent( aEvent ) )
358 {
359 wxVariant newValue = aEvent.GetPropertyValue();
360
361 if( VALIDATOR_RESULT validationFailure = property->Validate( newValue.GetAny(), frontItem ) )
362 {
363 wxString errorMsg = wxString::Format( wxS( "%s: %s" ), wxGetTranslation( property->Name() ),
364 validationFailure->get()->Format( m_frame ) );
365 m_frame->ShowInfoBarError( errorMsg );
366 aEvent.Veto();
367 return;
368 }
369
370 aEvent.Skip();
371 }
372}
373
374
375void SCH_PROPERTIES_PANEL::valueChanged( wxPropertyGridEvent& aEvent )
376{
378 return;
379
380 SELECTION fallbackSelection;
381 const SELECTION& selection = getSelection( fallbackSelection );
382
383 wxCHECK( getPropertyFromEvent( aEvent ), /* void */ );
384
385 wxVariant newValue = aEvent.GetPropertyValue();
386 SCH_COMMIT changes( m_frame );
387 SCH_SCREEN* screen = m_frame->GetScreen();
388
389 PROPERTY_COMMIT_HANDLER handler( &changes );
390
391 for( EDA_ITEM* edaItem : selection )
392 {
393 if( !edaItem->IsSCH_ITEM() )
394 continue;
395
396 SCH_ITEM* item = static_cast<SCH_ITEM*>( edaItem );
397 PROPERTY_BASE* property = m_propMgr.GetProperty( TYPE_HASH( *item ), aEvent.GetPropertyName() );
398 wxCHECK2( property, continue );
399
400 // Editing reference text in the schematic must go through the parent symbol in order to handle
401 // symbol instance data properly.
402 if( item->Type() == SCH_FIELD_T && static_cast<SCH_FIELD*>( item )->GetId() == FIELD_T::REFERENCE
403 && m_frame->IsType( FRAME_SCH )
404 && property->Name() == wxT( "Text" ) )
405 {
406 SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( item->GetParentSymbol() );
407 wxCHECK2( symbol, continue );
408
409 changes.Modify( symbol, screen, RECURSE_MODE::NO_RECURSE );
410 symbol->SetRefProp( newValue.GetString() );
411 symbol->SyncOtherUnits( symbol->Schematic()->CurrentSheet(), changes, property );
412 continue;
413 }
414
415 // Editing field text in the schematic when a variant is active must use variant-aware
416 // SetText to properly store the value as a variant override.
417 if( item->Type() == SCH_FIELD_T
418 && m_frame->IsType( FRAME_SCH )
419 && property->Name() == wxT( "Text" ) )
420 {
421 SCH_FIELD* field = static_cast<SCH_FIELD*>( item );
422 SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( item->GetParentSymbol() );
423
424 if( symbol && symbol->Schematic() )
425 {
426 wxString variantName = symbol->Schematic()->GetCurrentVariant();
427
428 if( !variantName.IsEmpty() )
429 {
430 changes.Modify( symbol, screen, RECURSE_MODE::NO_RECURSE );
431 field->SetText( newValue.GetString(), &symbol->Schematic()->CurrentSheet(),
432 variantName );
433 symbol->SyncOtherUnits( symbol->Schematic()->CurrentSheet(), changes, property );
434 continue;
435 }
436 }
437 }
438
439 if( item->Type() == SCH_TABLECELL_T )
440 changes.Modify( item->GetParent(), screen, RECURSE_MODE::NO_RECURSE );
441 else
442 changes.Modify( item, screen, RECURSE_MODE::NO_RECURSE );
443
444 item->Set( property, newValue );
445
446 if( SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( item ) )
447 symbol->SyncOtherUnits( symbol->Schematic()->CurrentSheet(), changes, property );
448 }
449
450 changes.Push( _( "Edit Properties" ) );
451
452 // Force a repaint of the items whose properties were changed
453 // This is necessary to update field displays in the schematic view
454 for( EDA_ITEM* edaItem : selection )
455 m_frame->UpdateItem( edaItem );
456
457 // Perform grid updates as necessary based on value change
458 AfterCommit();
459
460 aEvent.Skip();
461}
462
463
464void SCH_PROPERTIES_PANEL::OnLanguageChanged( wxCommandEvent& aEvent )
465{
467
468 aEvent.Skip();
469}
470
471
472bool SCH_PROPERTIES_PANEL::getItemValue( EDA_ITEM* aItem, PROPERTY_BASE* aProperty, wxVariant& aValue )
473{
474 // For SCH_FIELD "Text" property, return the variant-aware value when a variant is active
475 if( aItem->Type() == SCH_FIELD_T
476 && m_frame->IsType( FRAME_SCH )
477 && aProperty->Name() == wxT( "Text" ) )
478 {
479 SCH_FIELD* field = static_cast<SCH_FIELD*>( aItem );
480 SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( field->GetParentSymbol() );
481
482 if( symbol && symbol->Schematic() )
483 {
484 wxString variantName = symbol->Schematic()->GetCurrentVariant();
485
486 if( !variantName.IsEmpty() )
487 {
488 wxString text = field->GetText( &symbol->Schematic()->CurrentSheet(), variantName );
489 aValue = wxVariant( text );
490 return true;
491 }
492 }
493 }
494
495 return PROPERTIES_PANEL::getItemValue( aItem, aProperty, aValue );
496}
497
498
const char * name
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
Definition commit.h:106
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:98
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:110
EDA_ITEM * GetParent() const
Definition eda_item.h:112
Class that other classes need to inherit from, in order to be inspectable.
Definition inspectable.h:37
bool Set(PROPERTY_BASE *aProperty, wxAny &aValue, bool aNotify=true)
Definition inspectable.h:43
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:105
bool IsSCH_ITEM() const
Definition view_item.h:101
static const wxString EDITOR_NAME
Definition pg_editors.h:75
static const wxString EDITOR_NAME
Definition pg_editors.h:91
static wxString BuildEditorName(EDA_DRAW_FRAME *aFrame)
static wxString BuildEditorName(EDA_DRAW_FRAME *aFrame)
static wxString BuildEditorName(EDA_DRAW_FRAME *aFrame)
PROPERTIES_PANEL(wxWindow *aParent, EDA_BASE_FRAME *aFrame)
virtual void OnLanguageChanged(wxCommandEvent &aEvent)
virtual bool getItemValue(EDA_ITEM *aItem, PROPERTY_BASE *aProperty, wxVariant &aValue)
Utility to fetch a property value and convert to wxVariant Precondition: aItem is known to have prope...
virtual void rebuildProperties(const SELECTION &aSelection)
Generates the property grid for a given selection of items.
PROPERTY_BASE(const wxString &aName, PROPERTY_DISPLAY aDisplay=PT_DEFAULT, ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType=ORIGIN_TRANSFORMS::NOT_A_COORD)
< Used to generate unique IDs. Must come up front so it's initialized before ctor.
Definition property.h:201
virtual bool Writeable(INSPECTABLE *aObject) const
Definition property.h:282
friend class INSPECTABLE
Definition property.h:459
const wxString & Name() const
Definition property.h:220
Provide class metadata.Helper macro to map type hashes to names.
wxString GetCurrentVariant() const
Return the current variant being edited.
SCH_SHEET_PATH & CurrentSheet() const
Definition schematic.h:187
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Execute the changes.
virtual const wxString & GetText() const override
Return the string associated with the text object.
Definition sch_field.h:118
FIELD_T GetId() const
Definition sch_field.h:122
void SetText(const wxString &aText) override
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:167
const SYMBOL * GetParentSymbol() const
Definition sch_item.cpp:253
SCHEMATIC * Schematic() const
Search the item hierarchy to find a SCHEMATIC.
Definition sch_item.cpp:247
bool getItemValue(EDA_ITEM *aItem, PROPERTY_BASE *aProperty, wxVariant &aValue) override
Utility to fetch a property value and convert to wxVariant Precondition: aItem is known to have prope...
wxPGProperty * createPGProperty(const PROPERTY_BASE *aProperty) const override
PROPERTY_MANAGER & m_propMgr
PG_CHECKBOX_EDITOR * m_checkboxEditorInstance
PG_FPID_EDITOR * m_fpEditorInstance
const SELECTION & getSelection(SELECTION &aFallbackSelection)
Get the current selection from the selection tool.
void valueChanging(wxPropertyGridEvent &aEvent) override
PG_UNIT_EDITOR * m_unitEditorInstance
static std::set< wxString > m_currentFieldNames
void valueChanged(wxPropertyGridEvent &aEvent) override
SCH_PROPERTIES_PANEL(wxWindow *aParent, SCH_BASE_FRAME *aFrame)
PG_COLOR_EDITOR * m_colorEditorInstance
EDA_ITEM * getFrontItem()
Get the front item of the current selection.
PROPERTY_BASE * getPropertyFromEvent(const wxPropertyGridEvent &aEvent) const
void OnLanguageChanged(wxCommandEvent &aEvent) override
void rebuildProperties(const SELECTION &aSelection) override
Generates the property grid for a given selection of items.
PG_URL_EDITOR * m_urlEditorInstance
SCH_SELECTION & GetSelection()
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
size_t BaseHash() const override
Return type-id of the Base class.
size_t OwnerHash() const override
Return type-id of the Owner class.
size_t TypeHash() const override
Return type-id of the property type.
wxAny getter(const void *obj) const override
SCH_SYMBOL_FIELD_PROPERTY(const wxString &aName)
bool Writeable(INSPECTABLE *aObject) const override
void setter(void *obj, wxAny &v) override
Schematic symbol object.
Definition sch_symbol.h:76
void SetRefProp(const wxString &aRef)
void SyncOtherUnits(const SCH_SHEET_PATH &aSourceSheet, SCH_COMMIT &aCommit, PROPERTY_BASE *aProperty)
Keep fields other than the reference, include/exclude flags, and alternate pin assignments in sync in...
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly) const override
Populate a std::vector with SCH_FIELDs, sorted in ordinal order.
SCH_FIELD * AddField(const SCH_FIELD &aField)
Add a field to the symbol.
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
virtual void Add(EDA_ITEM *aItem)
Definition selection.cpp:42
EDA_ITEM * Front() const
Definition selection.h:177
virtual void Clear() override
Remove all the stored items from the group.
Definition selection.h:98
bool Empty() const
Checks if there is anything selected.
Definition selection.h:115
The symbol library editor main window.
LIB_SYMBOL * GetCurSymbol() const
Return the current symbol being edited or NULL if none selected.
#define _(s)
@ NO_RECURSE
Definition eda_item.h:52
@ FRAME_SCH_SYMBOL_EDITOR
Definition frame_type.h:35
@ FRAME_SCH
Definition frame_type.h:34
@ LAYER_SCHEMATIC_BACKGROUND
Definition layer_ids.h:488
#define _HKI(x)
Definition page_info.cpp:44
wxPGProperty * PGPropertyFactory(const PROPERTY_BASE *aProperty, EDA_DRAW_FRAME *aFrame)
Customized abstract wxPGProperty class to handle coordinate/size units.
see class PGM_BASE
APIIMPORT wxPGGlobalVarsClass * wxPGGlobalVars
#define TYPE_HASH(x)
Definition property.h:74
std::optional< std::unique_ptr< VALIDATION_ERROR > > VALIDATOR_RESULT
Null optional means validation succeeded.
static const wxString MISSING_FIELD_SENTINEL
@ USER
The field ID hasn't been set yet; field is invalid.
@ FOOTPRINT
Field Name Module PCB, i.e. "16DIP300".
@ DATASHEET
name of datasheet
@ REFERENCE
Field Reference of part, i.e. "IC21".
wxString GetCanonicalFieldName(FIELD_T aFieldType)
@ SCH_SYMBOL_T
Definition typeinfo.h:176
@ SCH_TABLECELL_T
Definition typeinfo.h:170
@ SCH_FIELD_T
Definition typeinfo.h:154