71#include <wx/combobox.h>
87 wxPGWindowList
CreateControls( wxPropertyGrid* aGrid, wxPGProperty* aProperty,
const wxPoint& aPos,
88 const wxSize& aSize )
const override
103 editor->SetNetInfo( &board->GetNetInfo() );
110 editor->Bind( FILTERED_ITEM_SELECTED,
111 [=]( wxCommandEvent& aEvt )
113 auto& choices =
const_cast<wxPGChoices&
>( aProperty->GetChoices() );
114 wxString netname =
editor->GetSelectedNetname();
116 if( choices.Index( netname ) == wxNOT_FOUND )
117 choices.Add( netname,
editor->GetSelectedNetcode() );
119 wxVariant val(
editor->GetSelectedNetcode() );
120 aGrid->ChangePropertyValue( aProperty, val );
126 void UpdateControl( wxPGProperty* aProperty, wxWindow* aCtrl )
const override
130 if( aProperty->IsValueUnspecified() )
131 editor->SetIndeterminate();
133 editor->SetSelectedNetcode( (
int) aProperty->GetValue().GetLong() );
144 aVariant =
static_cast<long>(
editor->GetSelectedNetcode() );
148 bool OnEvent( wxPropertyGrid* aGrid, wxPGProperty* aProperty, wxWindow* aWindow, wxEvent& aEvent )
const override
199 wxPGWindowList
CreateControls( wxPropertyGrid* aGrid, wxPGProperty* aProperty,
const wxPoint& aPos,
200 const wxSize& aSize )
const override
204 wxComboBox*
editor =
new wxComboBox( aGrid->GetPanel(), wxID_ANY, wxEmptyString, aPos, aSize, 0,
nullptr,
205 wxCB_DROPDOWN | wxTE_PROCESS_ENTER );
214 std::shared_ptr<bool> popupShown = std::make_shared<bool>(
false );
216 [
this, aGrid, aProperty,
editor]()
221 wxVariant val(
static_cast<long>(
m_unitBinder->GetValue() ) );
222 aGrid->ChangePropertyValue( aProperty, val );
225 editor->Bind( wxEVT_COMBOBOX_DROPDOWN,
226 [popupShown]( wxCommandEvent& aEvent )
232 editor->Bind( wxEVT_COMBOBOX,
233 [commitValue, popupShown]( wxCommandEvent& aEvent )
242 editor->Bind( wxEVT_COMBOBOX_CLOSEUP,
243 [aGrid, popupShown]( wxCommandEvent& aEvent )
245 aGrid->CallAfter( [popupShown]()
253 editor->Bind( wxEVT_CHAR_HOOK,
254 [commitValue,
editor, popupShown]( wxKeyEvent& aEvent )
258 if( ( aEvent.GetKeyCode() == WXK_RETURN
259 || aEvent.GetKeyCode() == WXK_NUMPAD_ENTER )
274 editor->Bind( wxEVT_KILL_FOCUS,
275 [commitValue, popupShown]( wxFocusEvent& aEvent )
284 return wxPGWindowList(
editor,
nullptr );
287 void UpdateControl( wxPGProperty* aProperty, wxWindow* aCtrl )
const override
292 wxComboBox*
editor =
dynamic_cast<wxComboBox*
>( aCtrl );
295 if( aProperty->IsValueUnspecified() )
298 m_unitBinder->ChangeValue( aProperty->GetValue().GetLong() );
306 wxComboBox*
editor =
dynamic_cast<wxComboBox*
>( aCtrl );
307 wxCHECK_MSG(
editor,
false,
"PG_TRACK_WIDTH_EDITOR requires a combo box!" );
316 bool changed = aVariant.IsNull() ||
result != aVariant.GetLong();
324 bool OnEvent( wxPropertyGrid* aGrid, wxPGProperty* aProperty, wxWindow* aWindow, wxEvent& aEvent )
const override
332 std::vector<long long int> trackWidths;
335 for(
unsigned ii = 1; ii <
m_frame->GetDesignSettings().m_TrackWidthList.size(); ++ii )
336 trackWidths.push_back(
m_frame->GetDesignSettings().m_TrackWidthList[ii] );
342 for(
unsigned ii = 0; ii < aEditor->GetCount(); ++ii )
343 aEditor->SetString( ii, aEditor->GetString( ii ) + wxS(
" " ) + unitLabel );
503 if(
FOOTPRINT* footprint = board->GetFirstFootprint() )
505 aFallbackSelection.
Clear();
506 aFallbackSelection.
Add( footprint );
507 return aFallbackSelection;
521 return selection.
Empty() ? nullptr : selection.
Front();
567 if( prop->
Group() ==
_HKI(
"Custom Properties" ) )
586 return m_propMgr.GetProperty( item, aName ) !=
nullptr;
600 if( !item->IsBOARD_ITEM() )
628 changes.
Push(
_(
"Rename Property" ) );
636 if( aPGProp->IsCategory() )
638 if( aPGProp->GetLabel() == wxGetTranslation(
_HKI(
"Fields" ) ) )
640 else if( aPGProp->GetLabel() == wxGetTranslation(
_HKI(
"Custom Properties" ) ) )
657 else if( prop->
Group() ==
_HKI(
"Custom Properties" ) )
664 return aMenu.GetMenuItemCount() > 0;
670 switch( aEvent.GetId() )
689 if( selection.
Empty() )
695 for(
int n = 0; ; ++n )
724 field->
SetText( wxEmptyString );
727 footprint->
Add( field );
730 changes.
Push(
_(
"Add Field" ) );
746 if( selection.
Empty() )
751 for(
int n = 0; ; ++n )
753 name = wxString::Format( wxS(
"Property%d" ), n );
760 if( item->GetCustomProperty(
name,
dummy ) )
776 if( item->IsBOARD_ITEM() )
779 item->SetCustomProperty(
name, wxEmptyString );
783 changes.
Push(
_(
"Add Custom Property" ) );
813 footprint->
Remove( field );
817 changes.
Push(
_(
"Remove Field" ) );
832 if( item->IsBOARD_ITEM() )
835 item->RemoveCustomProperty( aName );
839 changes.
Push(
_(
"Remove Custom Property" ) );
867 if( item->IsBOARD_ITEM() )
878 filtered.
Add( item );
889 const SELECTION& aSelection = editableSelection;
902 const wxPGChoices& canonicalLayers = aProperty->
Choices();
903 wxArrayString boardLayerNames;
904 wxArrayInt boardLayerIDs;
906 for(
int ii = 0; ii < (int) aProperty->
Choices().GetCount(); ++ii )
908 int layer = canonicalLayers.GetValue( ii );
910 boardLayerNames.push_back(
m_frame->GetBoard()->GetLayerName(
ToLAYER_ID( layer ) ) );
911 boardLayerIDs.push_back( canonicalLayers.GetValue( ii ) );
917 [&](
int aValue ) -> wxColour
922 ret->SetLabel( wxGetTranslation( aProperty->
Name() ) );
923 ret->SetName( aProperty->
Name() );
924 ret->SetHelpString( wxGetTranslation( aProperty->
Name() ) );
925 ret->SetClientData(
const_cast<PROPERTY_BASE*
>( aProperty ) );
954 wxCHECK_MSG( firstItem,
nullptr, wxT(
"getPropertyFromEvent for a property with nothing selected!") );
957 wxCHECK_MSG( property,
nullptr, wxT(
"getPropertyFromEvent for a property not found on the selected item!" ) );
971 wxCHECK( property, );
974 wxVariant newValue = aEvent.GetPropertyValue();
976 if(
VALIDATOR_RESULT validationFailure = property->Validate( newValue.GetAny(), item ) )
978 wxString errorMsg = wxString::Format( wxS(
"%s: %s" ), wxGetTranslation( property->Name() ),
979 validationFailure->get()->Format(
m_frame ) );
980 m_frame->ShowInfoBarError( errorMsg );
987 const wxString propName = aEvent.GetPropertyName();
989 if( propName ==
_HKI(
"Scale X" ) || propName ==
_HKI(
"Scale Y" ) )
991 const double newScale = newValue.GetDouble();
994 if( !std::isfinite( newScale ) || newScale <= 0.0 )
996 m_frame->ShowInfoBarError(
_(
"Scale must be a positive number." ) );
1001 if( newScale != 1.0 )
1007 for(
EDA_ITEM* edaItem : selection )
1016 if( fpWithPads > 0 )
1027 wxString msg = wxString::Format(
_(
"%d footprint(s) in the selection have pads. Scaling changes "
1028 "the drawn pad positions but not the physical part. Continue?" ),
1032 [
this, msg, propName, newValue]()
1034 if( wxMessageBox( msg,
_(
"Scale footprint with pads?" ), wxYES_NO | wxICON_WARNING,
this )
1054 wxPGProperty* pgProp =
m_grid->GetPropertyByName( aPropName );
1060 wxPropertyGridEvent evt( wxEVT_PG_CHANGED );
1061 evt.SetEventObject(
m_grid );
1062 evt.SetProperty( pgProp );
1063 evt.SetPropertyValue( aValue );
1080 if( filtered.
Empty() )
1090 wxVariant newValue = aEvent.GetPropertyValue();
1098 const wxString propName = aEvent.GetPropertyName();
1099 const bool isScaleX = ( propName ==
_HKI(
"Scale X" ) );
1100 const bool isScaleY = ( propName ==
_HKI(
"Scale Y" ) );
1101 int fpInSelection = 0;
1102 BOX2I selectionBBox;
1104 if( isScaleX || isScaleY )
1106 for(
EDA_ITEM* edaItem : selection )
1111 selectionBBox.
Merge(
static_cast<FOOTPRINT*
>( edaItem )->GetBoundingBox() );
1116 const bool useSelectionCenter = fpInSelection > 1;
1120 std::vector<PCB_CONSTRAINT*> drivingConstraints;
1122 for(
EDA_ITEM* edaItem : selection )
1124 if( !edaItem->IsBOARD_ITEM() )
1129 wxCHECK( property, );
1141 && !
m_frame->GetPcbNewSettings()->m_AllowFreePads
1142 && ( aEvent.GetPropertyName() ==
_HKI(
"Position X" )
1143 || aEvent.GetPropertyName() ==
_HKI(
"Position Y" ) ) )
1153 if( aEvent.GetPropertyName() ==
_HKI(
"Position X" ) )
1154 newPos.
x = (int) newValue.GetLong();
1156 newPos.
y = (int) newValue.GetLong();
1174 wxString variantName;
1179 if( !variantName.IsEmpty() )
1181 if( propName ==
_HKI(
"Do not Populate" )
1182 || propName ==
_HKI(
"Exclude From Bill of Materials" )
1183 || propName ==
_HKI(
"Exclude From Simulation" )
1184 || propName ==
_HKI(
"Exclude From Position Files" ) )
1189 variant = footprint->
AddVariant( variantName );
1193 bool boolValue = newValue.GetBool();
1195 if( propName ==
_HKI(
"Do not Populate" ) )
1196 variant->
SetDNP( boolValue );
1197 else if( propName ==
_HKI(
"Exclude From Bill of Materials" ) )
1199 else if( propName ==
_HKI(
"Exclude From Simulation" ) )
1201 else if( propName ==
_HKI(
"Exclude From Position Files" ) )
1213 double newScale = newValue.GetDouble();
1214 double relSx = isScaleX ? newScale / fp->
GetScaleX() : 1.0;
1215 double relSy = isScaleY ? newScale / fp->
GetScaleY() : 1.0;
1228 if( propName ==
_HKI(
"Value Mode" ) )
1233 std::optional<int> length;
1239 if( existing && existing->
GetValue() )
1246 std::optional<wxString> overrideText;
1252 board, dim, mode, length, overrideText,
1258 drivingConstraints.push_back( driving );
1268 newValue.GetString() );
1274 changes.
Modify( driving );
1275 driving->SetValue(
KiROUND( iu ) );
1276 drivingConstraints.push_back( driving );
1284 item->
Set( property, newValue );
1295 changes.
Push(
_(
"Edit Properties" ) );
1301 std::vector<PCB_SHAPE*> shapes;
1302 EDIT_TOOL::collectConstraintShapes( selection, shapes );
1303 constraintTool->SolveAfterEdit( shapes );
1308 if( !drivingConstraints.empty() )
1317 solveCommit.Modify( aItem );
1321 if( !solveCommit.
Empty() )
1331 if( aEvent.GetPropertyName() ==
_HKI(
"Locked" ) )
1340 wxPGChoices layersAll;
1341 wxPGChoices layersCu;
1367 std::vector<std::pair<wxString, int>> netNames;
1371 netNames.emplace_back(
UnescapeString( netInfo->GetNetname() ), netCode );
1373 std::sort( netNames.begin(), netNames.end(),
1374 [](
const auto& a,
const auto& b )
1376 return a.first.CmpNoCase( b.first ) < 0;
1379 for(
const auto& [ netName, netCode ] : netNames )
1380 nets.Add( netName, netCode );
1383 netProperty->SetChoices( nets );
1386 tuningNet->SetChoices( nets );
1389 stitchNet->SetChoices( nets );
1392 stitchGuardedNet->SetChoices( nets );
1399 spans.Add(
_(
"All spans" ), -1 );
1405 spans.Add( wxString::Format( wxT(
"%s - %s%s" ),
1408 span.m_IsBackdrill ?
_(
" (backdrill)" )
1409 : wxString( wxEmptyString ) ),
1414 ->SetChoices( spans );
1425 const wxString& propName = aProperty->
Name();
1426 wxString variantName;
1431 if( propName ==
_HKI(
"Do not Populate" ) )
1436 else if( propName ==
_HKI(
"Exclude From Bill of Materials" ) )
1441 else if( propName ==
_HKI(
"Exclude From Simulation" ) )
1446 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)
virtual 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
A drill chart placed on the board, kept in step with the holes.
void RebuildCells(const BOARD &aBoard, DRILL_SYMBOL_PROFILE *aAssignedProfile=nullptr)
Regenerate the cells from the board.
Turns on drill symbols at the holes, for one layer.
void SetName(const wxString &aName)
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)
Regenerates caches storing layer and net names.
void updateLists(const BOARD *aBoard)
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
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.
Provide class metadata.Helper macro to map type hashes to names.
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)
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)
Customized abstract wxPGProperty class to handle coordinate/size units.
APIIMPORT wxPGGlobalVarsClass * wxPGGlobalVars
@ ID_CTX_REMOVE_CUSTOM_PROPERTY
@ ID_CTX_ADD_CUSTOM_PROPERTY
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
@ PCB_DRILL_CHART_T
class PCB_DRILL_CHART, a live drill chart derived from PCB_TABLE
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