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 size_t OwnerHash() const override { return TYPE_HASH( SCH_SYMBOL ); }
55 size_t BaseHash() const override { return TYPE_HASH( SCH_SYMBOL ); }
56 size_t TypeHash() const override { return TYPE_HASH( wxString ); }
57
58 bool Writeable( INSPECTABLE* aObject ) const override
59 {
60 return PROPERTY_BASE::Writeable( aObject );
61 }
62
63 void setter( void* obj, wxAny& v ) override
64 {
65 wxString value;
66
67 if( !v.GetAs( &value ) )
68 return;
69
70 SCH_SYMBOL* symbol = reinterpret_cast<SCH_SYMBOL*>( obj );
71 SCH_FIELD* field = symbol->GetField( m_name );
72
73 wxString variantName;
74 const SCH_SHEET_PATH* sheetPath = nullptr;
75
76 if( symbol->Schematic() )
77 {
78 variantName = symbol->Schematic()->GetCurrentVariant();
79 sheetPath = &symbol->Schematic()->CurrentSheet();
80 }
81
82 if( !field )
83 {
84 SCH_FIELD newField( symbol, FIELD_T::USER, m_name );
85 newField.SetText( value, sheetPath, variantName );
86 symbol->AddField( newField );
87 }
88 else
89 {
90 field->SetText( value, sheetPath, variantName );
91 }
92 }
93
94 wxAny getter( const void* obj ) const override
95 {
96 const SCH_SYMBOL* symbol = reinterpret_cast<const SCH_SYMBOL*>( obj );
97 const SCH_FIELD* field = symbol->GetField( m_name );
98
99 if( field )
100 {
101 wxString variantName;
102 const SCH_SHEET_PATH* sheetPath = nullptr;
103
104 if( symbol->Schematic() )
105 {
106 variantName = symbol->Schematic()->GetCurrentVariant();
107 sheetPath = &symbol->Schematic()->CurrentSheet();
108 }
109
110 wxString text;
111
112 if( !variantName.IsEmpty() && sheetPath )
113 text = field->GetText( sheetPath, variantName );
114 else
115 text = field->GetText();
116
117 return wxAny( text );
118 }
119 else
120 {
121 return wxAny( MISSING_FIELD_SENTINEL );
122 }
123 }
124
125private:
126 wxString m_name;
127};
128
130
132 PROPERTIES_PANEL( aParent, aFrame ),
133 m_frame( aFrame ),
134 m_propMgr( PROPERTY_MANAGER::Instance() ),
135 m_unitEditorInstance( nullptr ),
136 m_checkboxEditorInstance( nullptr ),
137 m_colorEditorInstance( nullptr ),
138 m_fpEditorInstance( nullptr ),
139 m_urlEditorInstance( nullptr )
140{
141 m_propMgr.Rebuild();
142 bool found = false;
143
144 wxASSERT( wxPGGlobalVars );
145
146 wxString editorKey = PG_UNIT_EDITOR::BuildEditorName( m_frame );
147
148 auto it = wxPGGlobalVars->m_mapEditorClasses.find( editorKey );
149
150 if( it != wxPGGlobalVars->m_mapEditorClasses.end() )
151 {
152 m_unitEditorInstance = static_cast<PG_UNIT_EDITOR*>( it->second );
153 m_unitEditorInstance->UpdateFrame( m_frame );
154 found = true;
155 }
156
157 if( !found )
158 {
159 PG_UNIT_EDITOR* new_editor = new PG_UNIT_EDITOR( m_frame );
160 m_unitEditorInstance = static_cast<PG_UNIT_EDITOR*>( wxPropertyGrid::RegisterEditorClass( new_editor ) );
161 }
162
163 it = wxPGGlobalVars->m_mapEditorClasses.find( PG_CHECKBOX_EDITOR::EDITOR_NAME );
164
165 if( it == wxPGGlobalVars->m_mapEditorClasses.end() )
166 {
167 PG_CHECKBOX_EDITOR* cbEditor = new PG_CHECKBOX_EDITOR();
168 m_checkboxEditorInstance = static_cast<PG_CHECKBOX_EDITOR*>( wxPropertyGrid::RegisterEditorClass( cbEditor ) );
169 }
170 else
171 {
172 m_checkboxEditorInstance = static_cast<PG_CHECKBOX_EDITOR*>( it->second );
173 }
174
175 it = wxPGGlobalVars->m_mapEditorClasses.find( PG_COLOR_EDITOR::EDITOR_NAME );
176
177 if( it == wxPGGlobalVars->m_mapEditorClasses.end() )
178 {
179 PG_COLOR_EDITOR* colorEditor = new PG_COLOR_EDITOR();
180 m_colorEditorInstance = static_cast<PG_COLOR_EDITOR*>( wxPropertyGrid::RegisterEditorClass( colorEditor ) );
181 }
182 else
183 {
184 m_colorEditorInstance = static_cast<PG_COLOR_EDITOR*>( it->second );
185 }
186
187 it = wxPGGlobalVars->m_mapEditorClasses.find( PG_FPID_EDITOR::BuildEditorName( m_frame ) );
188
189 if( it != wxPGGlobalVars->m_mapEditorClasses.end() )
190 {
191 m_fpEditorInstance = static_cast<PG_FPID_EDITOR*>( it->second );
192 m_fpEditorInstance->UpdateFrame( m_frame );
193 }
194 else
195 {
196 PG_FPID_EDITOR* fpEditor = new PG_FPID_EDITOR( m_frame );
197 m_fpEditorInstance = static_cast<PG_FPID_EDITOR*>( wxPropertyGrid::RegisterEditorClass( fpEditor ) );
198 }
199
200 it = wxPGGlobalVars->m_mapEditorClasses.find( PG_URL_EDITOR::BuildEditorName( m_frame ) );
201
202 if( it != wxPGGlobalVars->m_mapEditorClasses.end() )
203 {
204 m_urlEditorInstance = static_cast<PG_URL_EDITOR*>( it->second );
205 m_urlEditorInstance->UpdateFrame( m_frame );
206 }
207 else
208 {
209 PG_URL_EDITOR* urlEditor = new PG_URL_EDITOR( m_frame );
210 m_urlEditorInstance = static_cast<PG_URL_EDITOR*>( wxPropertyGrid::RegisterEditorClass( urlEditor ) );
211 }
212}
213
214
216{
217 m_unitEditorInstance->UpdateFrame( nullptr );
218 m_fpEditorInstance->UpdateFrame( nullptr );
219 m_urlEditorInstance->UpdateFrame( nullptr );
220}
221
222
224{
225 SCH_SELECTION_TOOL* selectionTool = m_frame->GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
226 const SELECTION& selection = selectionTool->GetSelection();
227
228 if( selection.Empty() && m_frame->IsType( FRAME_SCH_SYMBOL_EDITOR ) )
229 {
230 SYMBOL_EDIT_FRAME* symbolFrame = static_cast<SYMBOL_EDIT_FRAME*>( m_frame );
231
232 if( symbolFrame->GetCurSymbol() )
233 {
234 aFallbackSelection.Clear();
235 aFallbackSelection.Add( symbolFrame->GetCurSymbol() );
236 return aFallbackSelection;
237 }
238 }
239
240 return selection;
241}
242
243
245{
246 SELECTION fallbackSelection;
247 const SELECTION& selection = getSelection( fallbackSelection );
248
249 return selection.Empty() ? nullptr : selection.Front();
250}
251
252
254{
255 SELECTION fallbackSelection;
256 const SELECTION& selection = getSelection( fallbackSelection );
257
258 // Will actually just be updatePropertyValues() if selection hasn't changed
259 rebuildProperties( selection );
260}
261
262
264{
265 SELECTION fallbackSelection;
266 const SELECTION& selection = getSelection( fallbackSelection );
267
268 rebuildProperties( selection );
269}
270
271
273{
274 m_currentFieldNames.clear();
275
276 for( EDA_ITEM* item : aSelection )
277 {
278 if( item->Type() != SCH_SYMBOL_T )
279 continue;
280
281 SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
282
283 for( const SCH_FIELD& field : symbol->GetFields() )
284 {
285 if( field.IsPrivate() )
286 continue;
287
288 m_currentFieldNames.insert( field.GetCanonicalName() );
289 }
290 }
291
292 const wxString groupFields = _HKI( "Fields" );
293
294 for( const wxString& name : m_currentFieldNames )
295 {
296 if( !m_propMgr.GetProperty( TYPE_HASH( SCH_SYMBOL ), name ) )
297 {
298 m_propMgr.AddProperty( new SCH_SYMBOL_FIELD_PROPERTY( name ), groupFields )
299 .SetAvailableFunc( [name]( INSPECTABLE* )
300 {
302 } );
303 }
304 }
305
307}
308
309
310wxPGProperty* SCH_PROPERTIES_PANEL::createPGProperty( const PROPERTY_BASE* aProperty ) const
311{
312 wxPGProperty* prop = PGPropertyFactory( aProperty, m_frame );
313
314 if( auto colorProp = dynamic_cast<PGPROPERTY_COLOR4D*>( prop ) )
315 {
316 COLOR4D bg = m_frame->GetColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND );
317 colorProp->SetBackgroundColor( bg );
318 }
319
320 if( aProperty->Name() == GetCanonicalFieldName( FIELD_T::FOOTPRINT ) )
321 prop->SetEditor( PG_FPID_EDITOR::BuildEditorName( m_frame ) );
322 else if( aProperty->Name() == GetCanonicalFieldName( FIELD_T::DATASHEET ) )
323 prop->SetEditor( PG_URL_EDITOR::BuildEditorName( m_frame ) );
324
325 return prop;
326}
327
328
329PROPERTY_BASE* SCH_PROPERTIES_PANEL::getPropertyFromEvent( const wxPropertyGridEvent& aEvent ) const
330{
331 EDA_ITEM* item = const_cast<SCH_PROPERTIES_PANEL*>( this )->getFrontItem();
332
333 if( !item || !item->IsSCH_ITEM() )
334 return nullptr;
335
336 SCH_ITEM* firstItem = static_cast<SCH_ITEM*>( item );
337
338 wxCHECK_MSG( firstItem, nullptr, wxT( "getPropertyFromEvent for a property with nothing selected!") );
339
340 PROPERTY_BASE* property = m_propMgr.GetProperty( TYPE_HASH( *firstItem ), aEvent.GetPropertyName() );
341 wxCHECK_MSG( property, nullptr, 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(), variantName );
432 symbol->SyncOtherUnits( symbol->Schematic()->CurrentSheet(), changes, property,
433 variantName );
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 {
448 symbol->SyncOtherUnits( symbol->Schematic()->CurrentSheet(), changes, property,
449 symbol->Schematic()->GetCurrentVariant() );
450 }
451 }
452
453 changes.Push( _( "Edit Properties" ) );
454
455 // Force a repaint of the items whose properties were changed
456 // This is necessary to update field displays in the schematic view
457 for( EDA_ITEM* edaItem : selection )
458 m_frame->UpdateItem( edaItem );
459
460 // Perform grid updates as necessary based on value change
461 AfterCommit();
462
463 aEvent.Skip();
464}
465
466
467void SCH_PROPERTIES_PANEL::OnLanguageChanged( wxCommandEvent& aEvent )
468{
470
471 aEvent.Skip();
472}
473
474
475bool SCH_PROPERTIES_PANEL::getItemValue( EDA_ITEM* aItem, PROPERTY_BASE* aProperty, wxVariant& aValue )
476{
477 // For SCH_FIELD "Text" property, return the variant-aware value when a variant is active
478 if( aItem->Type() == SCH_FIELD_T
479 && m_frame->IsType( FRAME_SCH )
480 && aProperty->Name() == wxT( "Text" ) )
481 {
482 SCH_FIELD* field = static_cast<SCH_FIELD*>( aItem );
483 SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( field->GetParentSymbol() );
484
485 if( symbol && symbol->Schematic() )
486 {
487 wxString variantName = symbol->Schematic()->GetCurrentVariant();
488
489 if( !variantName.IsEmpty() )
490 {
491 wxString text = field->GetText( &symbol->Schematic()->CurrentSheet(), variantName );
492 aValue = wxVariant( text );
493 return true;
494 }
495 }
496 }
497
498 return PROPERTIES_PANEL::getItemValue( aItem, aProperty, aValue );
499}
500
501
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:116
FIELD_T GetId() const
Definition sch_field.h:120
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:258
SCHEMATIC * Schematic() const
Search the item hierarchy to find a SCHEMATIC.
Definition sch_item.cpp:252
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 GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly) const override
Populate a std::vector with SCH_FIELDs, sorted in ordinal order.
void SyncOtherUnits(const SCH_SHEET_PATH &aSourceSheet, SCH_COMMIT &aCommit, PROPERTY_BASE *aProperty, const wxString &aVariantName=wxEmptyString)
Keep fields other than the reference, include/exclude flags, and alternate pin assignments in sync in...
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