KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_create_array.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
25
26#include <wx/msgdlg.h>
27
28#include <base_units.h>
29#include <footprint.h>
30#include <pcb_edit_frame.h>
31#include <tools/pcb_actions.h>
33#include <tool/tool_manager.h>
35
36
41{
47
48 bool m_OptionsSet = true;
49
50 long m_GridNx = 5;
51 long m_GridNy = 5;
52 long m_GridDx = pcbIUScale.mmToIU( 2.54 );
53 long m_GridDy = pcbIUScale.mmToIU( 2.54 );
54 long m_GridOffsetX = 0;
55 long m_GridOffsetY = 0;
56 long m_GridStagger = 1;
57 bool m_GridStaggerRows = true;
60
61 bool m_GridRenumberPads = true;
62 long m_GridNumberingAxis = 0; // h then v
63 bool m_GridNumReverseAlt = false;
64 long m_GridNumStartSet = 1; // use specified start
65 long m_Grid2dArrayNumbering = 0; // linear numbering
66 long m_GridPrimaryAxisScheme = 0; // numeric
67 long m_GridSecondaryAxisScheme = 0; // numeric
68 wxString m_GridPrimaryNumOffset = wxT( "1" ); // numeric
69 wxString m_GridSecondaryNumOffset = wxT( "1" ); // numeric
72
73 long m_CircCentreX = 0;
74 long m_CircCentreY = 0;
76 long m_CircleDirection = 0; // clockwise
78 long m_CircCount = 4;
80 long m_CircNumStartSet = 1; // use specified start
82 wxString m_CircNumberingOffset = wxT("1");
85 long m_ArrayTypeTab = 0; // start on grid view
86 bool m_SelectionArrange = false;
87 bool m_SelectionDuplicate = true; // Duplicate by default
89 bool m_FootprintReannotate = true; // Assign unique by default
90};
91
92// Persistent options settings
94
99{
101 wxString m_label;
102};
103
108static const std::vector<NUMBERING_LIST_DATA> numberingTypeData {
109 {
111 _( "Numerals (0,1,2,...,9,10)" ),
112 },
113 {
115 _( "Hexadecimal (0,1,...,F,10,...)" ),
116 },
117 {
119 _( "Alphabet, minus IOSQXZ" ),
120 },
121 {
123 _( "Alphabet, full 26 characters" ),
124 },
125};
126
128 std::unique_ptr<ARRAY_OPTIONS>& aSettings,
129 bool aIsFootprintEditor, const VECTOR2I& aOrigPos ) :
130 DIALOG_CREATE_ARRAY_BASE( aParent ),
131 m_frame( aParent ),
132 m_settings( aSettings ),
133 m_originalItemPosition( aOrigPos ), m_isFootprintEditor( aIsFootprintEditor ),
134 m_hSpacing( aParent, m_labelDx, m_entryDx, m_unitLabelDx ),
135 m_vSpacing( aParent, m_labelDy, m_entryDy, m_unitLabelDy ),
136 m_hOffset( aParent, m_labelOffsetX, m_entryOffsetX, m_unitLabelOffsetX ),
137 m_vOffset( aParent, m_labelOffsetY, m_entryOffsetY, m_unitLabelOffsetY ),
138 m_hCentre( aParent, m_labelCentreX, m_entryCentreX, m_unitLabelCentreX ),
139 m_vCentre( aParent, m_labelCentreY, m_entryCentreY, m_unitLabelCentreY ),
140 m_circAngle( aParent, m_labelCircAngle, m_entryCircAngle, m_unitLabelCircAngle ),
141 m_circOffset( aParent, m_labelCircOffset, m_entryCircOffset, m_unitLabelCircOffset ),
142 m_cfg_persister( pcbIUScale, s_arrayOptions.m_OptionsSet )
143{
144 // Configure display origin transforms
151
152 // Set up numbering scheme drop downs character set strings
153 for( const auto& numData : numberingTypeData )
154 {
155 const wxString label = wxGetTranslation( numData.m_label );
156 void* clientData = (void*) &numData;
157
158 m_choicePriAxisNumbering->Append( label, clientData );
159 m_choiceSecAxisNumbering->Append( label, clientData );
160 m_choiceCircNumbering->Append( label, clientData );
161 }
162
163 m_choicePriAxisNumbering->SetSelection( 0 );
164 m_choiceSecAxisNumbering->SetSelection( 0 );
165 m_choiceCircNumbering->SetSelection( 0 );
166
167 m_circAngle.SetUnits( EDA_UNITS::DEGREES );
168 m_circOffset.SetUnits( EDA_UNITS::DEGREES );
169
170 // bind grid options to persister
175
179
181
184
188
193
198
199 // bind circular options to persister
202
209
214
216
219
222
224
225 // Run the callbacks once to process the dialog contents
228
230 Fit();
231 SetMinSize( GetSize() );
232}
233
234
236{
237}
238
239
240void DIALOG_CREATE_ARRAY::OnParameterChanged( wxCommandEvent& event )
241{
242 if( m_checkBoxFullCircle->GetValue() && m_entryCircAngle == event.GetEventObject() )
243 {
244 return;
245 }
246
249}
250
251
252void DIALOG_CREATE_ARRAY::OnSelectCenterButton( wxCommandEvent& event )
253{
254 event.Skip();
255
256 TOOL_MANAGER* toolMgr = m_frame->GetToolManager();
257 PCB_PICKER_TOOL* pickerTool = toolMgr->GetTool<PCB_PICKER_TOOL>();
258 wxCHECK( pickerTool, /* void */ );
259
260 // Hide, but do not close, the dialog
261 Hide();
262
263 if( event.GetEventObject() == m_btnSelectCenterItem )
264 {
266 PCB_PICKER_TOOL::INTERACTIVE_PARAMS { this, _( "Select center item..." ) } );
267 }
268 else if( event.GetEventObject() == m_btnSelectCenterPoint )
269 {
271 PCB_PICKER_TOOL::INTERACTIVE_PARAMS { this, _( "Select center point..." ) } );
272 }
273 else
274 {
275 wxFAIL_MSG( "Unknown event source" );
276 }
277}
278
279
280void DIALOG_CREATE_ARRAY::OnAxisNumberingChange( wxCommandEvent& aEvent )
281{
282 // On an alphabet change, make sure the offset control is valid by default.
283
284 const int newAlphabet = aEvent.GetSelection();
285
286 wxCHECK( newAlphabet >= 0 && newAlphabet < static_cast<int>( numberingTypeData.size() ),
287 /* void */ );
288
289 const ARRAY_AXIS::NUMBERING_TYPE numberingType =
290 numberingTypeData[newAlphabet].m_numbering_type;
291
292 wxTextCtrl* matchingTextCtrl = nullptr;
293
294 if( aEvent.GetEventObject() == m_choicePriAxisNumbering )
295 matchingTextCtrl = m_entryGridPriNumberingOffset;
296 else if( aEvent.GetEventObject() == m_choiceSecAxisNumbering )
297 matchingTextCtrl = m_entryGridSecNumberingOffset;
298 else if( aEvent.GetEventObject() == m_choiceCircNumbering )
299 matchingTextCtrl = m_entryCircNumberingStart;
300
301 wxCHECK( matchingTextCtrl, /* void */ );
302
303 ARRAY_AXIS dummyAxis;
304 dummyAxis.SetAxisType( numberingType );
305
306 // If the text control has a valid value for the new alphabet, keep it
307 // else reset to the first value in the new alphabet.
308
309 const bool isAlreadyOK = dummyAxis.SetOffset( matchingTextCtrl->GetValue() );
310
311 if( !isAlreadyOK )
312 {
313 dummyAxis.SetOffset( ARRAY_AXIS::TypeIsNumeric( numberingType ) ? 1 : 0 );
314 matchingTextCtrl->SetValue( dummyAxis.GetItemNumber( 0 ) );
315 }
316}
317
318
319// Implement the RECEIVER interface for the callback from the TOOL
321{
322 if( aItem )
323 {
324 m_hCentre.SetValue( aItem->GetPosition().x );
325 m_vCentre.SetValue( aItem->GetPosition().y );
326 }
327
328 Show( true );
329}
330
331
332void DIALOG_CREATE_ARRAY::UpdatePickedPoint( const std::optional<VECTOR2I>& aPoint )
333{
334 if( aPoint )
335 {
336 m_hCentre.SetValue( aPoint->x );
337 m_vCentre.SetValue( aPoint->y );
338 }
339
340 Show( true );
341}
342
343
353static bool validateLongEntry( const wxTextEntry& entry, long& dest, const wxString& description,
354 wxArrayString& errors )
355{
356 bool ok = true;
357
358 if( !entry.GetValue().ToLong( &dest ) )
359 {
360 wxString err;
361 err.Printf( _( "Bad numeric value for %s: %s" ), description, entry.GetValue() );
362 errors.Add( err );
363 ok = false;
364 }
365
366 return ok;
367}
368
369
380static bool validateAxisOptions( const wxTextCtrl& offsetEntry, const wxChoice& typeEntry,
381 const wxTextCtrl& aStepEntry, ARRAY_AXIS& aAxis,
382 wxArrayString& errors )
383{
384 void* clientData = typeEntry.GetClientData( typeEntry.GetSelection() );
385 const NUMBERING_LIST_DATA* numberingData = static_cast<NUMBERING_LIST_DATA*>( clientData );
386
387 wxCHECK_MSG( numberingData, false, wxT( "Failed to get client data from list control." ) );
388
389 aAxis.SetAxisType( numberingData->m_numbering_type );
390
391 const wxString text = offsetEntry.GetValue();
392
393 bool ok = aAxis.SetOffset( text );
394
395 if( !ok )
396 {
397 errors.Add( wxString::Format( _( "Could not determine numbering start from '%s': "
398 "expected value consistent with alphabet '%s'." ),
399 text,
400 aAxis.GetAlphabet() ) );
401 return false;
402 }
403
404 long step;
405 ok = validateLongEntry( aStepEntry, step, _( "step value" ), errors );
406
407 if( ok )
408 aAxis.SetStep( step );
409
410 return ok;
411}
412
413
415{
416 std::unique_ptr<ARRAY_OPTIONS> newSettings;
417
418 wxArrayString errors;
419 const wxWindow* page = m_gridTypeNotebook->GetCurrentPage();
420
421 if( page == m_gridPanel )
422 {
423 auto newGrid = std::make_unique<ARRAY_GRID_OPTIONS>();
424 bool ok = true;
425
426 // ints
427 ok &= validateLongEntry(*m_entryNx, newGrid->m_nx, _("horizontal count"), errors);
428 ok &= validateLongEntry(*m_entryNy, newGrid->m_ny, _("vertical count"), errors);
429
430 newGrid->m_delta.x = m_hSpacing.GetIntValue();
431 newGrid->m_delta.y = m_vSpacing.GetIntValue();
432
433 newGrid->m_offset.x = m_hOffset.GetIntValue();
434 newGrid->m_offset.y = m_vOffset.GetIntValue();
435
436 newGrid->m_centred = m_rbCentreOnSource->GetValue();
437
438 ok &= validateLongEntry(*m_entryStagger, newGrid->m_stagger, _("stagger"), errors);
439
440 newGrid->m_stagger_rows = m_staggerRows->GetValue();
441
442 newGrid->m_horizontalThenVertical = m_radioBoxGridNumberingAxis->GetSelection() == 0;
443 newGrid->m_reverseNumberingAlternate = m_checkBoxGridReverseNumbering->GetValue();
444
445 newGrid->SetShouldNumber( m_isFootprintEditor && m_cbRenumberPads->GetValue() );
446
448 {
449 newGrid->SetNumberingStartIsSpecified( m_rbGridStartNumberingOpt->GetSelection() == 1 );
450
451 if( newGrid->GetNumberingStartIsSpecified() )
452 {
453 newGrid->m_2dArrayNumbering = m_radioBoxGridNumberingScheme->GetSelection() != 0;
454
455 // validate from the input fields
459 newGrid->m_pri_axis, errors );
460
461 if( newGrid->m_2dArrayNumbering )
462 {
466 newGrid->m_sec_axis, errors );
467 }
468
469 ok &= numOk;
470 }
471 else
472 {
473 // artificial linear numeric scheme from 1
474 newGrid->m_2dArrayNumbering = false;
475 newGrid->m_pri_axis.SetAxisType( ARRAY_AXIS::NUMBERING_TYPE::NUMBERING_NUMERIC );
476 newGrid->m_pri_axis.SetOffset( 1 );
477 }
478 }
479
480 // Only use settings if all values are good
481 if( ok )
482 newSettings = std::move( newGrid );
483 }
484 else if( page == m_circularPanel )
485 {
486 auto newCirc = std::make_unique<ARRAY_CIRCULAR_OPTIONS>();
487 bool ok = true;
490
491 newCirc->m_centre.x = m_hCentre.GetIntValue();
492 newCirc->m_centre.y = m_vCentre.GetIntValue();
493 newCirc->m_angle = EDA_ANGLE( angle, DEGREES_T );
494 newCirc->m_angleOffset = EDA_ANGLE( offset, DEGREES_T );
495 newCirc->m_clockwise = m_rbCircDirection->GetSelection() == 0;
496
497 ok = validateLongEntry(*m_entryCircCount, newCirc->m_nPts, _("point count"), errors);
498
499 newCirc->m_rotateItems = m_entryRotateItemsCb->GetValue();
500 newCirc->SetShouldNumber( m_isFootprintEditor );
501
503 {
504 newCirc->SetNumberingStartIsSpecified( m_rbCircStartNumberingOpt->GetSelection() == 1 );
505
506 if( newCirc->GetNumberingStartIsSpecified() )
507 {
509 *m_entryCircNumberingStep, newCirc->m_axis, errors );
510 }
511 else
512 {
513 // artificial linear numeric scheme from 1
514 newCirc->m_axis.SetAxisType( ARRAY_AXIS::NUMBERING_TYPE::NUMBERING_NUMERIC );
515 newCirc->m_axis.SetOffset( 1 ); // Start at "1"
516 }
517 }
518
519 // Only use settings if all values are good
520 if( ok )
521 newSettings = std::move( newCirc );
522 }
523
524 bool ret = false;
525
526 // If we got good settings, send them out and finish
527 if( newSettings )
528 {
529 // assign pointer and ownership here
530 m_settings = std::move( newSettings );
531
532 m_settings->SetShouldArrangeSelection( m_radioBtnArrangeSelection->GetValue() );
533 m_settings->SetSShouldReannotateFootprints( m_radioBtnUniqueRefs->GetValue() );
534
535 // persist the control state for next time
537
538 ret = true;
539 }
540 else
541 {
542 wxString errorStr;
543
544 if( errors.IsEmpty() )
545 errorStr = _("Bad parameters");
546 else
547 errorStr = wxJoin( errors, '\n' );
548
549 wxMessageBox( errorStr );
550 ret = false;
551 }
552
553 // This dialog is not modal, so close it now if successful
554 if( ret )
555 Close();
556
557 return ret;
558}
559
560
562{
563 if( m_checkBoxFullCircle->GetValue() )
564 {
565 m_entryCircAngle->Disable();
566 }
567 else
568 {
569 m_entryCircAngle->Enable();
570 }
571
573 {
574 m_footprintReannotatePanel->Show( false );
575
576 m_gridPadNumberingPanel->Show( true );
577 m_circularPadNumberingPanel->Show( true );
578
579 // In no pad re-numbering, everything is disabled
580 bool renumber_pads = m_cbRenumberPads->GetValue();
581
582 m_radioBoxGridNumberingAxis->Enable( renumber_pads );
583 m_checkBoxGridReverseNumbering->Enable( renumber_pads );
584 m_rbGridStartNumberingOpt->Enable( renumber_pads );
585
586 // If we set the start number, we can set the other options,
587 // otherwise it's a hardcoded linear array
588 const bool use_set_start_grid = renumber_pads && m_rbGridStartNumberingOpt->GetSelection() == 1;
589
590 m_radioBoxGridNumberingScheme->Enable( use_set_start_grid );
591 m_labelPriAxisNumbering->Enable( use_set_start_grid );
592 m_choicePriAxisNumbering->Enable( use_set_start_grid );
593
594 // Disable the secondary axis numbering option if the
595 // numbering scheme doesn't have two axes
596 const bool num2d = m_radioBoxGridNumberingScheme->GetSelection() != 0;
597
598 m_labelSecAxisNumbering->Enable( use_set_start_grid && num2d );
599 m_choiceSecAxisNumbering->Enable( use_set_start_grid && num2d );
600
601 // We can only set an offset if we're setting the start number
602 m_labelGridNumberingOffset->Enable( use_set_start_grid );
603 m_labelGridNumberingStep->Enable( use_set_start_grid );
604 m_entryGridPriNumberingOffset->Enable( use_set_start_grid );
605 m_entryGridPriNumberingStep->Enable( use_set_start_grid );
606 m_entryGridSecNumberingOffset->Enable( use_set_start_grid && num2d );
607 m_entryGridSecNumberingStep->Enable( use_set_start_grid && num2d );
608
609 // disable the circular number offset in the same way
610 const bool use_set_start_circ = renumber_pads && m_rbCircStartNumberingOpt->GetSelection() == 1;
611 m_entryCircNumberingStart->Enable( use_set_start_circ );
612 }
613 else
614 {
615 // grid
616 m_rbGridStartNumberingOpt->Enable( false );
617 m_radioBoxGridNumberingScheme->Enable( false );
618
619 m_labelPriAxisNumbering->Enable( false );
620 m_labelSecAxisNumbering->Enable( false );
621
622 m_choiceSecAxisNumbering->Enable( false );
623 m_choicePriAxisNumbering->Enable( false );
624
625 m_labelGridNumberingOffset->Enable( false );
626 m_entryGridPriNumberingOffset->Enable( false );
627 m_entryGridSecNumberingOffset->Enable( false );
628
629 m_gridPadNumberingPanel->Show( false );
630
631 // circular
632 m_rbCircStartNumberingOpt->Enable( false );
633 m_entryCircNumberingStart->Enable( false );
634
635 m_circularPadNumberingPanel->Show( false );
636
637 m_footprintReannotatePanel->Show( true );
638 }
639
640 if( m_radioBtnArrangeSelection->GetValue() )
641 {
642 m_footprintReannotatePanel->Show( false );
643 }
644}
645
646
648{
649 // In full circle mode, the division angle is computed from the number of points
650 if( m_checkBoxFullCircle->GetValue() )
651 {
652 long nPts;
653 if( m_entryCircCount->GetValue().ToLong( &nPts ) )
654 {
655 EDA_ANGLE division = EDA_ANGLE( 360, DEGREES_T ) / nPts;
656 m_circAngle.SetAngleValue( division );
657 }
658 }
659}
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:112
Class that contains information about a single array axis and the numbering of items along that axis.
Definition: array_axis.h:40
bool SetOffset(const wxString &aOffsetName)
Set the axis start (as a string, which should decode to a valid index in the alphabet),...
Definition: array_axis.cpp:104
wxString GetItemNumber(int n) const
Get the position number (name) for the n'th axis point.
Definition: array_axis.cpp:135
static bool TypeIsNumeric(NUMBERING_TYPE type)
Check if a numbering type is a numeric type.
Definition: array_axis.h:60
const wxString & GetAlphabet() const
Get the alphabet for the current numbering scheme.
Definition: array_axis.cpp:45
void SetAxisType(NUMBERING_TYPE aType)
Set the axis numbering type.
Definition: array_axis.cpp:98
@ NUMBERING_NUMERIC
Arabic numerals: 0,1,2,3,4,5,6,7,8,9,10,11...
Definition: array_axis.h:44
@ NUMBERING_HEX
Definition: array_axis.h:45
@ NUMBERING_ALPHA_NO_IOSQXZ
Alphabet, excluding IOSQXZ.
Definition: array_axis.h:53
@ NUMBERING_ALPHA_FULL
Full 26-character alphabet.
Definition: array_axis.h:54
void SetStep(int aStep)
Set the skip between consecutive numbers (useful when doing a partial array, e.g.
Definition: array_axis.cpp:129
Class DIALOG_CREATE_ARRAY_BASE.
wxRadioButton * m_radioBtnDuplicateSelection
WIDGET_SAVE_RESTORE m_cfg_persister
DIALOG_CREATE_ARRAY(PCB_BASE_FRAME *aParent, std::unique_ptr< ARRAY_OPTIONS > &aOptions, bool enableNumbering, const VECTOR2I &aOrigPos)
Construct a new dialog.
bool TransferDataFromWindow() override
PCB_BASE_FRAME * m_frame
void OnSelectCenterButton(wxCommandEvent &aEvent) override
std::unique_ptr< ARRAY_OPTIONS > & m_settings
The settings to re-seat on dialog OK.
void OnParameterChanged(wxCommandEvent &aEvent) override
void UpdatePickedItem(const EDA_ITEM *aItem) override
void UpdatePickedPoint(const std::optional< VECTOR2I > &aPoint) override
void OnAxisNumberingChange(wxCommandEvent &aEvent) override
bool Show(bool show) override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:98
virtual VECTOR2I GetPosition() const
Definition: eda_item.h:272
static TOOL_ACTION selectPointInteractively
Definition: pcb_actions.h:311
static TOOL_ACTION selectItemInteractively
Selection of reference points/items.
Definition: pcb_actions.h:310
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
Generic tool for picking an item.
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:55
Master controller class:
Definition: tool_manager.h:62
bool RunAction(const std::string &aActionName, T aParam)
Run the specified action immediately, pausing the current action to run the new one.
Definition: tool_manager.h:150
int GetIntValue()
Definition: unit_binder.h:134
virtual void SetUnits(EDA_UNITS aUnits)
Normally not needed (as the UNIT_BINDER inherits from the parent frame), but can be used to set to DE...
virtual void SetAngleValue(const EDA_ANGLE &aValue)
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
void SetCoordType(ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType)
Set the current origin transform mode.
Definition: unit_binder.h:205
void Add(wxRadioBox &ctrl, long &dest)
Bind a radiobox to a choice.
void RestoreConfigToControls()
Restore the values from the internally-stored references to the underlying data to each bound control...
void ReadConfigFromControls()
Read values of all bound controls into the internally-stored references to the underlying data.
static const std::vector< NUMBERING_LIST_DATA > numberingTypeData
List of type <--> name mappings (in order) for the numbering type list boxes.
static bool validateAxisOptions(const wxTextCtrl &offsetEntry, const wxChoice &typeEntry, const wxTextCtrl &aStepEntry, ARRAY_AXIS &aAxis, wxArrayString &errors)
Validates and saves (if valid) the type and offset of an array axis numbering.
static bool validateLongEntry(const wxTextEntry &entry, long &dest, const wxString &description, wxArrayString &errors)
Validate and save a long integer entry.
static CREATE_ARRAY_DIALOG_ENTRIES s_arrayOptions
#define _(s)
static constexpr EDA_ANGLE ANGLE_0
Definition: eda_angle.h:411
static constexpr EDA_ANGLE ANGLE_90
Definition: eda_angle.h:413
@ DEGREES_T
Definition: eda_angle.h:31
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.
Definition: eda_units.cpp:569
Struct containing the last-entered values for the dialog.
CREATE_ARRAY_DIALOG_ENTRIES()
Construct with some sensible defaults.
constexpr int mmToIU(double mm) const
Definition: base_units.h:92
Local mapping for list-box <-> numbering type.
ARRAY_AXIS::NUMBERING_TYPE m_numbering_type