72#include <wx/combobox.h>
88 wxPGWindowList
CreateControls( wxPropertyGrid* aGrid, wxPGProperty* aProperty,
const wxPoint& aPos,
89 const wxSize& aSize )
const override
104 editor->SetNetInfo( &board->GetNetInfo() );
111 editor->Bind( FILTERED_ITEM_SELECTED,
112 [=]( wxCommandEvent& aEvt )
114 auto& choices =
const_cast<wxPGChoices&
>( aProperty->GetChoices() );
115 wxString netname =
editor->GetSelectedNetname();
117 if( choices.Index( netname ) == wxNOT_FOUND )
118 choices.Add( netname,
editor->GetSelectedNetcode() );
120 wxVariant val(
editor->GetSelectedNetcode() );
121 aGrid->ChangePropertyValue( aProperty, val );
127 void UpdateControl( wxPGProperty* aProperty, wxWindow* aCtrl )
const override
131 if( aProperty->IsValueUnspecified() )
132 editor->SetIndeterminate();
134 editor->SetSelectedNetcode( (
int) aProperty->GetValue().GetLong() );
145 aVariant =
static_cast<long>(
editor->GetSelectedNetcode() );
149 bool OnEvent( wxPropertyGrid* aGrid, wxPGProperty* aProperty, wxWindow* aWindow, wxEvent& aEvent )
const override
200 wxPGWindowList
CreateControls( wxPropertyGrid* aGrid, wxPGProperty* aProperty,
const wxPoint& aPos,
201 const wxSize& aSize )
const override
205 wxComboBox*
editor =
new wxComboBox( aGrid->GetPanel(), wxID_ANY, wxEmptyString, aPos, aSize, 0,
nullptr,
206 wxCB_DROPDOWN | wxTE_PROCESS_ENTER );
215 std::shared_ptr<bool> popupShown = std::make_shared<bool>(
false );
217 [
this, aGrid, aProperty,
editor]()
222 wxVariant val(
static_cast<long>(
m_unitBinder->GetValue() ) );
223 aGrid->ChangePropertyValue( aProperty, val );
226 editor->Bind( wxEVT_COMBOBOX_DROPDOWN,
227 [popupShown]( wxCommandEvent& aEvent )
233 editor->Bind( wxEVT_COMBOBOX,
234 [commitValue, popupShown]( wxCommandEvent& aEvent )
243 editor->Bind( wxEVT_COMBOBOX_CLOSEUP,
244 [aGrid, popupShown]( wxCommandEvent& aEvent )
246 aGrid->CallAfter( [popupShown]()
254 editor->Bind( wxEVT_CHAR_HOOK,
255 [commitValue,
editor, popupShown]( wxKeyEvent& aEvent )
259 if( ( aEvent.GetKeyCode() == WXK_RETURN
260 || aEvent.GetKeyCode() == WXK_NUMPAD_ENTER )
275 editor->Bind( wxEVT_KILL_FOCUS,
276 [commitValue, popupShown]( wxFocusEvent& aEvent )
285 return wxPGWindowList(
editor,
nullptr );
288 void UpdateControl( wxPGProperty* aProperty, wxWindow* aCtrl )
const override
293 wxComboBox*
editor =
dynamic_cast<wxComboBox*
>( aCtrl );
296 if( aProperty->IsValueUnspecified() )
299 m_unitBinder->ChangeValue( aProperty->GetValue().GetLong() );
307 wxComboBox*
editor =
dynamic_cast<wxComboBox*
>( aCtrl );
308 wxCHECK_MSG(
editor,
false,
"PG_TRACK_WIDTH_EDITOR requires a combo box!" );
317 bool changed = aVariant.IsNull() ||
result != aVariant.GetLong();
325 bool OnEvent( wxPropertyGrid* aGrid, wxPGProperty* aProperty, wxWindow* aWindow, wxEvent& aEvent )
const override
333 std::vector<long long int> trackWidths;
336 for(
unsigned ii = 1; ii <
m_frame->GetDesignSettings().m_TrackWidthList.size(); ++ii )
337 trackWidths.push_back(
m_frame->GetDesignSettings().m_TrackWidthList[ii] );
343 for(
unsigned ii = 0; ii < aEditor->GetCount(); ++ii )
344 aEditor->SetString( ii, aEditor->GetString( ii ) + wxS(
" " ) + unitLabel );
504 if(
FOOTPRINT* footprint = board->GetFirstFootprint() )
506 aFallbackSelection.
Clear();
507 aFallbackSelection.
Add( footprint );
508 return aFallbackSelection;
522 return selection.
Empty() ? nullptr : selection.
Front();
568 if( prop->
Group() ==
_HKI(
"Custom Properties" ) )
587 return m_propMgr.GetProperty( item, aName ) !=
nullptr;
601 if( !item->IsBOARD_ITEM() )
629 changes.
Push(
_(
"Rename Property" ) );
637 if( aPGProp->IsCategory() )
639 if( aPGProp->GetLabel() == wxGetTranslation(
_HKI(
"Fields" ) ) )
641 else if( aPGProp->GetLabel() == wxGetTranslation(
_HKI(
"Custom Properties" ) ) )
658 else if( prop->
Group() ==
_HKI(
"Custom Properties" ) )
665 return aMenu.GetMenuItemCount() > 0;
671 switch( aEvent.GetId() )
690 if( selection.
Empty() )
696 for(
int n = 0; ; ++n )
725 field->
SetText( wxEmptyString );
728 footprint->
Add( field );
731 changes.
Push(
_(
"Add Field" ) );
747 if( selection.
Empty() )
752 for(
int n = 0; ; ++n )
754 name = wxString::Format( wxS(
"Property%d" ), n );
761 if( item->GetCustomProperty(
name,
dummy ) )
777 if( item->IsBOARD_ITEM() )
780 item->SetCustomProperty(
name, wxEmptyString );
784 changes.
Push(
_(
"Add Custom Property" ) );
814 footprint->
Remove( field );
818 changes.
Push(
_(
"Remove Field" ) );
833 if( item->IsBOARD_ITEM() )
836 item->RemoveCustomProperty( aName );
840 changes.
Push(
_(
"Remove Custom Property" ) );
868 if( item->IsBOARD_ITEM() )
879 filtered.
Add( item );
890 const SELECTION& aSelection = editableSelection;
903 const wxPGChoices& canonicalLayers = aProperty->
Choices();
904 wxArrayString boardLayerNames;
905 wxArrayInt boardLayerIDs;
907 for(
int ii = 0; ii < (int) aProperty->
Choices().GetCount(); ++ii )
909 int layer = canonicalLayers.GetValue( ii );
911 boardLayerNames.push_back(
m_frame->GetBoard()->GetLayerName(
ToLAYER_ID( layer ) ) );
912 boardLayerIDs.push_back( canonicalLayers.GetValue( ii ) );
918 [&](
int aValue ) -> wxColour
923 ret->SetLabel( wxGetTranslation( aProperty->
Name() ) );
924 ret->SetName( aProperty->
Name() );
925 ret->SetHelpString( wxGetTranslation( aProperty->
Name() ) );
926 ret->SetClientData(
const_cast<PROPERTY_BASE*
>( aProperty ) );
955 wxCHECK_MSG( firstItem,
nullptr, wxT(
"getPropertyFromEvent for a property with nothing selected!") );
958 wxCHECK_MSG( property,
nullptr, wxT(
"getPropertyFromEvent for a property not found on the selected item!" ) );
972 wxCHECK( property, );
975 wxVariant newValue = aEvent.GetPropertyValue();
977 if(
VALIDATOR_RESULT validationFailure = property->Validate( newValue.GetAny(), item ) )
979 wxString errorMsg = wxString::Format( wxS(
"%s: %s" ), wxGetTranslation( property->Name() ),
980 validationFailure->get()->Format(
m_frame ) );
981 m_frame->ShowInfoBarError( errorMsg );
988 const wxString propName = aEvent.GetPropertyName();
990 if( propName ==
_HKI(
"Scale X" ) || propName ==
_HKI(
"Scale Y" ) )
992 const double newScale = newValue.GetDouble();
995 if( !std::isfinite( newScale ) || newScale <= 0.0 )
997 m_frame->ShowInfoBarError(
_(
"Scale must be a positive number." ) );
1002 if( newScale != 1.0 )
1008 for(
EDA_ITEM* edaItem : selection )
1017 if( fpWithPads > 0 )
1028 wxString msg = wxString::Format(
_(
"%d footprint(s) in the selection have pads. Scaling changes "
1029 "the drawn pad positions but not the physical part. Continue?" ),
1033 [
this, msg, propName, newValue]()
1035 if( wxMessageBox( msg,
_(
"Scale footprint with pads?" ), wxYES_NO | wxICON_WARNING,
this )
1055 wxPGProperty* pgProp =
m_grid->GetPropertyByName( aPropName );
1061 wxPropertyGridEvent evt( wxEVT_PG_CHANGED );
1062 evt.SetEventObject(
m_grid );
1063 evt.SetProperty( pgProp );
1064 evt.SetPropertyValue( aValue );
1081 if( filtered.
Empty() )
1091 wxVariant newValue = aEvent.GetPropertyValue();
1099 const wxString propName = aEvent.GetPropertyName();
1100 const bool isScaleX = ( propName ==
_HKI(
"Scale X" ) );
1101 const bool isScaleY = ( propName ==
_HKI(
"Scale Y" ) );
1102 int fpInSelection = 0;
1103 BOX2I selectionBBox;
1105 if( isScaleX || isScaleY )
1107 for(
EDA_ITEM* edaItem : selection )
1112 selectionBBox.
Merge(
static_cast<FOOTPRINT*
>( edaItem )->GetBoundingBox() );
1117 const bool useSelectionCenter = fpInSelection > 1;
1121 std::vector<PCB_CONSTRAINT*> drivingConstraints;
1123 for(
EDA_ITEM* edaItem : selection )
1125 if( !edaItem->IsBOARD_ITEM() )
1130 wxCHECK( property, );
1142 && !
m_frame->GetPcbNewSettings()->m_AllowFreePads
1143 && ( aEvent.GetPropertyName() ==
_HKI(
"Position X" )
1144 || aEvent.GetPropertyName() ==
_HKI(
"Position Y" ) ) )
1154 if( aEvent.GetPropertyName() ==
_HKI(
"Position X" ) )
1155 newPos.
x = (int) newValue.GetLong();
1157 newPos.
y = (int) newValue.GetLong();
1175 wxString variantName;
1180 if( !variantName.IsEmpty() )
1182 if( propName ==
_HKI(
"Do not Populate" )
1183 || propName ==
_HKI(
"Exclude From Bill of Materials" )
1184 || propName ==
_HKI(
"Exclude From Simulation" )
1185 || propName ==
_HKI(
"Exclude From Position Files" ) )
1190 variant = footprint->
AddVariant( variantName );
1194 bool boolValue = newValue.GetBool();
1196 if( propName ==
_HKI(
"Do not Populate" ) )
1197 variant->
SetDNP( boolValue );
1198 else if( propName ==
_HKI(
"Exclude From Bill of Materials" ) )
1200 else if( propName ==
_HKI(
"Exclude From Simulation" ) )
1202 else if( propName ==
_HKI(
"Exclude From Position Files" ) )
1214 double newScale = newValue.GetDouble();
1215 double relSx = isScaleX ? newScale / fp->
GetScaleX() : 1.0;
1216 double relSy = isScaleY ? newScale / fp->
GetScaleY() : 1.0;
1229 if( propName ==
_HKI(
"Value Mode" ) )
1234 std::optional<int> length;
1240 if( existing && existing->
GetValue() )
1247 std::optional<wxString> overrideText;
1253 board, dim, mode, length, overrideText,
1259 drivingConstraints.push_back( driving );
1269 newValue.GetString() );
1275 changes.
Modify( driving );
1276 driving->SetValue(
KiROUND( iu ) );
1277 drivingConstraints.push_back( driving );
1285 item->
Set( property, newValue );
1293 changes.
Push(
_(
"Edit Properties" ) );
1299 std::vector<PCB_SHAPE*> shapes;
1300 EDIT_TOOL::collectConstraintShapes( selection, shapes );
1301 constraintTool->SolveAfterEdit( shapes );
1306 if( !drivingConstraints.empty() )
1315 solveCommit.Modify( aItem );
1319 if( !solveCommit.
Empty() )
1329 if( aEvent.GetPropertyName() ==
_HKI(
"Locked" ) )
1338 wxPGChoices layersAll;
1339 wxPGChoices layersCu;
1365 std::vector<std::pair<wxString, int>> netNames;
1369 netNames.emplace_back(
UnescapeString( netInfo->GetNetname() ), netCode );
1371 std::sort( netNames.begin(), netNames.end(),
1372 [](
const auto& a,
const auto& b )
1374 return a.first.CmpNoCase( b.first ) < 0;
1377 for(
const auto& [ netName, netCode ] : netNames )
1378 nets.Add( netName, netCode );
1381 netProperty->SetChoices( nets );
1384 tuningNet->SetChoices( nets );
1387 stitchNet->SetChoices( nets );
1390 stitchGuardedNet->SetChoices( nets );
1397 spans.Add(
_(
"All spans" ), -1 );
1403 spans.Add( wxString::Format( wxT(
"%s - %s%s" ),
1406 span.m_IsBackdrill ?
_(
" (backdrill)" )
1407 : wxString( wxEmptyString ) ),
1412 ->SetChoices( spans );
1423 const wxString& propName = aProperty->
Name();
1424 wxString variantName;
1429 if( propName ==
_HKI(
"Do not Populate" ) )
1434 else if( propName ==
_HKI(
"Exclude From Bill of Materials" ) )
1439 else if( propName ==
_HKI(
"Exclude From Simulation" ) )
1444 else if( propName ==
_HKI(
"Exclude From Position Files" ) )
constexpr EDA_IU_SCALE pcbIUScale
CONSTRAINT_DIAGNOSIS ApplyConstraintImmediately(BOARD *aBoard, const PCB_CONSTRAINT *aConstraint, std::vector< PCB_SHAPE * > *aModified, const std::function< void(BOARD_ITEM *)> &aBeforeModify, const std::set< KIID > &aFixedShapes)
Solve a just-created constraint's cluster so the geometry snaps to satisfy it (SolidWorks-style),...
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
BOARD_ITEM_CONTAINER * GetParent() const
Information pertinent to a Pcbnew printed circuit board.
const NETINFO_LIST & GetNetInfo() const
const LSET & DrillSymbolLayers() const
Layers that currently have a drill map on them.
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
wxString GetCurrentVariant() const
const LSET & GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
constexpr const Vec GetCenter() const
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Remove a new item from the model.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
A set of EDA_ITEMs (i.e., without duplicates).
virtual EDA_ITEM * AsEdaItem()=0
A base class for most all the KiCad significant classes used in schematics and boards.
bool GetCustomProperty(const wxString &aKey, wxString &aValue) const
void RemoveCustomProperty(const wxString &aKey)
KICAD_T Type() const
Returns the type of object.
void SetCustomProperty(const wxString &aKey, const wxString &aValue)
virtual void SetVisible(bool aVisible)
virtual void SetText(const wxString &aText)
static const TOOL_EVENT SelectedEvent
bool Set(PROPERTY_BASE *aProperty, wxAny &aValue, bool aNotify=true)
bool IsBOARD_ITEM() const
LSET is a set of PCB_LAYER_IDs.
LSEQ UIOrder() const
Return the copper, technical and user layers in the order shown in layer widget.
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
static wxString Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
const NETCODES_MAP & NetsByNetcode() const
Return the netcode map, at least for python.
Common, abstract interface for edit frames.
A geometric constraint between board items (issue #2329).
std::optional< double > GetValue() const
EDA_UNITS GetUnits() const
DIM_VALUE_MODE GetValueMode() const
Value mode from board state via DimensionValueMode.
int GetMeasuredValue() const
wxString GetValueText() const
bool GetOverrideTextEnabled() const
Turns on drill symbols at the holes, for one layer.
void SetName(const wxString &aName)
A table whose cell text is derived from the board and rebuilt whenever it goes stale.
virtual bool ChildrenAreReadOnly() const
PCB_BASE_EDIT_FRAME * m_frame
PG_NET_SELECTOR_EDITOR * m_netSelectorEditorInstance
void onNewItemLeftBlank(const wxString &aKey) override
void valueChanged(wxPropertyGridEvent &aEvent) override
PG_UNIT_EDITOR * m_unitEditorInstance
void addBlankCustomProperty()
PG_RATIO_EDITOR * m_ratioEditorInstance
wxPGProperty * createPGProperty(const PROPERTY_BASE *aProperty) const override
void UpdateData() override
static SELECTION filterOutReadOnlyGenChildren(const SELECTION &aSelection)
Creates a new selection with any generator children removed that are part of a read only generator.
void rebuildProperties(const SELECTION &aSelection) override
Generates the property grid for a given selection of items.
PCB_PROPERTIES_PANEL(wxWindow *aParent, PCB_BASE_EDIT_FRAME *aFrame)
bool m_scaleConfirmPending
const SELECTION & getSelection(SELECTION &aFallbackSelection)
Get the current selection from the selection tool.
EDA_ITEM * getFrontItem()
Get the front item of the current selection.
virtual ~PCB_PROPERTIES_PANEL()
void removeCustomProperty(const wxString &aName)
PROPERTY_BASE * getPropertyFromEvent(const wxPropertyGridEvent &aEvent) const
void removeField(const wxString &aName)
bool buildContextMenu(wxMenu &aMenu, wxPGProperty *aPGProp) override
bool isKeyEditable(const wxPGProperty *aPGProp) const override
PROPERTY_MANAGER & m_propMgr
PG_URL_EDITOR * m_urlEditorInstance
void AfterCommit() override
PG_CHECKBOX_EDITOR * m_checkboxEditorInstance
void applyConfirmedScale(const wxString &aPropName, const wxVariant &aValue)
void updateLists(const BOARD *aBoard)
Regenerates caches storing layer and net names.
void onContextMenu(wxCommandEvent &aEvent)
void valueChanging(wxPropertyGridEvent &aEvent) override
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...
PG_TRACK_WIDTH_EDITOR * m_trackWidthEditorInstance
void onKeyRenamed(const wxString &aOldName, const wxString &aNewName) override
PG_FPID_EDITOR * m_fpEditorInstance
bool isKeyNameInUse(const wxString &aName) const override
A wxEnumProperty that displays a color next to the enum value.
static const wxString EDITOR_NAME
static wxString BuildEditorName(EDA_DRAW_FRAME *aFrame)
wxPGWindowList CreateControls(wxPropertyGrid *aGrid, wxPGProperty *aProperty, const wxPoint &aPos, const wxSize &aSize) const override
bool OnEvent(wxPropertyGrid *aGrid, wxPGProperty *aProperty, wxWindow *aWindow, wxEvent &aEvent) const override
void UpdateControl(wxPGProperty *aProperty, wxWindow *aCtrl) const override
wxString GetName() const override
bool GetValueFromControl(wxVariant &aVariant, wxPGProperty *aProperty, wxWindow *aCtrl) const override
static const wxString EDITOR_NAME
PG_NET_SELECTOR_EDITOR()=default
static const wxString EDITOR_NAME
std::unique_ptr< PROPERTY_EDITOR_UNIT_BINDER > m_unitBinder
void UpdateControl(wxPGProperty *aProperty, wxWindow *aCtrl) const override
void UpdateFrame(PCB_BASE_EDIT_FRAME *aFrame)
wxString GetName() const override
PG_TRACK_WIDTH_EDITOR(PCB_BASE_EDIT_FRAME *aFrame)
static const wxString EDITOR_NAME
PCB_BASE_EDIT_FRAME * m_frame
void setTrackWidthOptions(wxComboBox *aEditor) const
wxPGWindowList CreateControls(wxPropertyGrid *aGrid, wxPGProperty *aProperty, const wxPoint &aPos, const wxSize &aSize) const override
bool GetValueFromControl(wxVariant &aVariant, wxPGProperty *aProperty, wxWindow *aCtrl) const override
static wxString BuildEditorName(PCB_BASE_EDIT_FRAME *aFrame)
bool OnEvent(wxPropertyGrid *aGrid, wxPGProperty *aProperty, wxWindow *aWindow, wxEvent &aEvent) const override
static wxString BuildEditorName(EDA_DRAW_FRAME *aFrame)
static wxString BuildEditorName(EDA_DRAW_FRAME *aFrame)
wxString m_contextMenuPropertyName
PROPERTIES_PANEL(wxWindow *aParent, EDA_BASE_FRAME *aFrame)
void beginLabelEdit(const wxString &aKey, bool aStartBlank=false)
void settlePendingLabelEdit()
Synchronously ends any in-progress label edit; potentially canceling a newly added row.
int m_SuppressGridChangeEvents
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.
void addCategoryButton(const wxString &aGroupKey, const wxString &aTooltip, BITMAPS aBitmap, std::function< void()> aAction, std::function< bool()> aEnableFunc=nullptr, bool aForceCategory=false)
Registers an overlay button on a category caption row.
wxString m_pendingNewKey
Key of a freshly-added blank field/custom property awaiting a name from the user.
virtual size_t TypeHash() const =0
Return type-id of the property type.
virtual bool HasChoices() const
Return true if this PROPERTY has a limited set of possible values.
const wxString & Name() const
virtual const wxPGChoices & Choices() const
Return a limited set of possible values (e.g.
virtual size_t OwnerHash() const =0
Return type-id of the Owner class.
virtual void Add(EDA_ITEM *aItem)
A null aItem is ignored; the selection never holds null members.
void SetIsHover(bool aIsHover)
virtual void Clear() override
Remove all the stored items from the group.
bool Empty() const
Checks if there is anything selected.
PCB_CONSTRAINT * FindDimensionLengthConstraint(BOARD *aBoard, const PCB_DIMENSION_BASE *aDimension)
Self FIXED_LENGTH constraint whose members are exactly aDimension START and END or nullptr the drivin...
PCB_CONSTRAINT * SetDimensionValueMode(BOARD *aBoard, PCB_DIMENSION_BASE *aDimension, DIM_VALUE_MODE aMode, std::optional< int > aDrivingLengthIU, const std::optional< wxString > &aOverrideText, const std::function< void(BOARD_ITEM *)> &aBeforeModify, const std::function< void(BOARD_ITEM *)> &aStageAdd, const std::function< void(BOARD_ITEM *)> &aBeforeRemove)
Apply a value mode transition to aDimension Driving creates or updates the driving length with aDrivi...
DIM_VALUE_MODE
Mode a value bearing dimension value is in Driven mirrors measured geometry Driving forces geometry t...
std::vector< DRILL_SPAN > EnumerateDrillSpans(const BOARD &aBoard, bool aPadBackdrills)
Every drill span present on the board, through-holes first.
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)
KICOMMON_API double DoubleValueFromString(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Convert aTextValue to a double.
KICOMMON_API wxString GetLabel(EDA_UNITS aUnits, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Get the units string for a given units type.
wxPGProperty * PGPropertyFactory(const PROPERTY_BASE *aProperty, EDA_DRAW_FRAME *aFrame)
APIIMPORT wxPGGlobalVarsClass * wxPGGlobalVars
@ ID_CTX_REMOVE_CUSTOM_PROPERTY
@ ID_CTX_ADD_CUSTOM_PROPERTY
#define TYPE_HASH(x)
Macro to generate unique identifier for a type.
std::optional< std::unique_ptr< VALIDATION_ERROR > > VALIDATOR_RESULT
Null optional means validation succeeded.
std::vector< FAB_LAYER_COLOR > dummy
wxString UnescapeString(const wxString &aSource)
wxString GetUserFieldName(int aFieldNdx, TRANSLATION aTranslation)
wxString GetDefaultFieldName(FIELD_T aFieldId, TRANSLATION aTranslation)
Return a default symbol field name for a mandatory field type.
@ USER
The field ID hasn't been set yet; field is invalid.
@ FOOTPRINT
Field Name Module PCB, i.e. "16DIP300".
@ DATASHEET
name of datasheet
wxString result
Test unit parsing edge cases and error handling.
constexpr KICAD_T BaseType(const KICAD_T aType)
Return the underlying type of the given type.
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
@ PCB_TABLECELL_T
class PCB_TABLECELL, PCB_TEXTBOX for use in tables
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
constexpr bool IsGeneratedTableType(const KICAD_T aType)
A PCB_TABLE subclass whose cells are generated from the board rather than typed by the user.
Functions to provide common constants and other functions to assist in making a consistent UI.
#define INDETERMINATE_STATE
Used for holding indeterminate values, such as with multiple selections holding different values or c...
VECTOR2< int32_t > VECTOR2I