KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcbnew/dialogs/dialog_global_edit_text_and_graphics.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) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#include <string_utils.h>
26#include <board_commit.h>
27#include <pcb_edit_frame.h>
30#include <board.h>
32#include <footprint.h>
33#include <pcb_group.h>
34#include <pcb_dimension.h>
35#include <pcb_shape.h>
36#include <pcb_text.h>
37#include <widgets/unit_binder.h>
38#include <widgets/font_choice.h>
39#include <tool/tool_manager.h>
43
44// Columns of layer classes grid
45enum
46{
54};
55
56enum
57{
65};
66
67
69static bool g_modifyValues;
76static bool g_filterByLayer;
77static int g_layerFilter;
79static wxString g_referenceFilter;
81static wxString g_footprintFilter;
82static bool g_filterSelected = false;
83static bool g_setToSpecifiedValues = true;
84
85
87{
92
97
98public:
101
102protected:
103 void onActionButtonChange( wxCommandEvent& event ) override;
104 void onSpecifiedValueUpdateUI( wxUpdateUIEvent& event ) override;
105 void onDimensionItemCheckbox( wxCommandEvent& aEvent ) override;
106
107 void OnLayerFilterSelect( wxCommandEvent& event ) override
108 {
109 m_layerFilterOpt->SetValue( true );
110 }
111 void OnReferenceFilterText( wxCommandEvent& event ) override
112 {
113 m_referenceFilterOpt->SetValue( true );
114 }
115 void OnFootprintFilterText( wxCommandEvent& event ) override
116 {
117 m_footprintFilterOpt->SetValue( true );
118 }
119
120 bool TransferDataToWindow() override;
121 bool TransferDataFromWindow() override;
122
123 void visitItem( BOARD_COMMIT& aCommit, BOARD_ITEM* aItem );
124 void processItem( BOARD_COMMIT& aCommit, BOARD_ITEM* aItem );
125};
126
127
130 m_lineWidth( parent, m_lineWidthLabel, m_LineWidthCtrl, m_lineWidthUnits ),
131 m_textWidth( parent, m_SizeXlabel, m_SizeXCtrl, m_SizeXunit ),
132 m_textHeight( parent, m_SizeYlabel, m_SizeYCtrl, m_SizeYunit ),
133 m_thickness( parent, m_ThicknessLabel, m_ThicknessCtrl, m_ThicknessUnit )
134{
135 m_parent = parent;
136 m_brdSettings = &m_parent->GetDesignSettings();
137 m_isBoardEditor = dynamic_cast<PCB_EDIT_FRAME*>( m_parent ) != nullptr;
138
139 if( !m_isBoardEditor )
140 {
141 m_footprintTexts->SetLabel( _( "Text items" ) );
142 m_footprintGraphics->SetLabel( _( "Graphic items" ) );
143 m_footprintDimensions->SetLabel( _( "Dimension items" ) );
144
145 m_boardText->Show( false );
146 m_boardGraphics->Show( false );
147 m_boardDimensions->Show( false );
148
149 m_referenceFilterOpt->Show( false );
150 m_referenceFilter->Show( false );
151 m_footprintFilterOpt->Show( false );
152 m_footprintFilter->Show( false );
153 }
154
158
163
164 m_grid->SetCellHighlightPenWidth( 0 );
165 m_grid->SetDefaultCellFont( KIUI::GetInfoFont( this ) );
166 m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() - FromDIP( 2 ) );
167
168 if( g_setToSpecifiedValues == true )
169 m_setToSpecifiedValues->SetValue( true );
170 else
171 m_setToLayerDefaults->SetValue( true );
172
173 SetupStandardButtons( { { wxID_OK, _( "Apply and Close" ) },
174 { wxID_CANCEL, _( "Close" ) } } );
175
177}
178
179
181{
182 g_modifyReferences = m_references->GetValue();
183 g_modifyValues = m_values->GetValue();
188
189 if( m_isBoardEditor )
190 {
191 g_modifyBoardText = m_boardText->GetValue();
193 }
194
195 g_filterByLayer = m_layerFilterOpt->GetValue();
197
198 if( m_isBoardEditor )
199 {
204 }
205
208}
209
210
212{
214 m_selection = selTool->GetSelection();
215
216 m_references->SetValue( g_modifyReferences );
217 m_values->SetValue( g_modifyValues );
222
223 if( m_isBoardEditor )
224 {
225 m_boardText->SetValue( g_modifyBoardText );
227 }
228
229 if( m_layerFilter->SetLayerSelection( g_layerFilter ) != wxNOT_FOUND )
231
232 if( m_isBoardEditor )
233 {
234 // SetValue() generates events, ChangeValue() does not
235 m_referenceFilter->ChangeValue( g_referenceFilter );
237 m_footprintFilter->ChangeValue( g_footprintFilter );
239 }
240
242
244
246 m_fontCtrl->SetStringSelection( INDETERMINATE_ACTION );
247
251 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
252 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
253 m_keepUpright->Set3StateValue( wxCHK_UNDETERMINED );
254 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
256
257 wxCommandEvent dummy;
259
260#define SET_INT_VALUE( aRow, aCol, aValue ) \
261 m_grid->SetCellValue( aRow, aCol, m_parent->StringFromValue( aValue, true ) )
262
263#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
264 attr = new wxGridCellAttr; \
265 attr->SetRenderer( new wxGridCellBoolRenderer() ); \
266 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
267 attr->SetReadOnly(); \
268 m_grid->SetAttr( aRow, aCol, attr ); \
269 m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxT( "" ) )
270
271 const BOARD_DESIGN_SETTINGS& bds = m_parent->GetBoard()->GetDesignSettings();
272 wxGridCellAttr* attr;
273
274 m_grid->SetCellValue( ROW_SILK, COL_CLASS_NAME, _( "Silk Layers" ) );
275 m_grid->SetCellValue( ROW_COPPER, COL_CLASS_NAME, _( "Copper Layers" ) );
276 m_grid->SetCellValue( ROW_EDGES, COL_CLASS_NAME, _( "Edge Cuts" ) );
277 m_grid->SetCellValue( ROW_COURTYARD, COL_CLASS_NAME, _( "Courtyards" ) );
278 m_grid->SetCellValue( ROW_FAB, COL_CLASS_NAME, _( "Fab Layers" ) );
279 m_grid->SetCellValue( ROW_OTHERS, COL_CLASS_NAME, _( "Other Layers" ) );
280
281 m_grid->SetCellValue( ROW_HEADER, COL_LINE_THICKNESS, _( "Line Thickness" ) );
288
289 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_WIDTH, _( "Text Width" ) );
294
295 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_HEIGHT, _( "Text Height" ) );
300
301 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_THICKNESS, _( "Text Thickness" ) );
306
307 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_ITALIC, _( "Italic" ) );
312
313 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_UPRIGHT, _( "Keep Upright" ) );
318
319 return true;
320
321#undef SET_INT_VALUE
322#undef SET_BOOL_VALUE
323}
324
325
327{
328 // Update the UNIT_BINDER controls if the action to take is changed
329 bool enable = m_setToSpecifiedValues->GetValue();
330
331 m_LayerLabel->Enable( enable );
332 m_LayerCtrl->Enable( enable );
333
334 m_lineWidth.Enable( enable );
335 m_textWidth.Enable( enable );
336 m_textHeight.Enable( enable );
337 m_thickness.Enable( enable );
338
339 m_fontLabel->Enable( enable );
340 m_fontCtrl->Enable( enable );
341
342 m_centerOnFP->Enable( enable );
343
344 enable = !enable;
345 m_grid->Enable( enable );
346}
347
348
350{
351 // Update the UI for the elements inside the use specified values sizer
352 event.Enable( m_setToSpecifiedValues->GetValue() );
353}
354
355
357{
358 if( m_footprintDimensions->GetValue() || m_boardDimensions->GetValue() )
359 m_setToLayerDefaults->SetLabel( _( "Set to layer and dimension default values:" ) );
360 else
361 m_setToLayerDefaults->SetLabel( _( "Set to layer default values:" ) );
362}
363
364
366{
367 aCommit.Modify( aItem );
368
369 PCB_FIELD* field = dynamic_cast<PCB_FIELD*>( aItem );
370 PCB_TEXT* text = dynamic_cast<PCB_TEXT*>( aItem );
371 PCB_SHAPE* shape = dynamic_cast<PCB_SHAPE*>( aItem );
372 PCB_DIMENSION_BASE* dimension = dynamic_cast<PCB_DIMENSION_BASE*>( aItem );
373 FOOTPRINT* parentFP = aItem->GetParentFootprint();
374
375 if( m_setToSpecifiedValues->GetValue() )
376 {
379
380 if( text )
381 {
383 text->SetTextSize( VECTOR2I( m_textWidth.GetValue(), text->GetTextSize().y ) );
384
386 text->SetTextSize( VECTOR2I( text->GetTextSize().x, m_textHeight.GetValue() ) );
387
389 text->SetTextThickness( m_thickness.GetValue() );
390
391 // Must be after SetTextSize()
392 if( m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
393 text->SetBold( m_bold->GetValue() );
394
395 if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
396 text->SetItalic( m_italic->GetValue() );
397
398 // Must come after setting bold & italic
399 if( m_fontCtrl->GetStringSelection() != INDETERMINATE_ACTION )
400 {
401 text->SetFont( m_fontCtrl->GetFontSelection( text->IsBold(), text->IsItalic() ) );
402 }
403 else if(( m_italic->Get3StateValue() != wxCHK_UNDETERMINED
404 || m_bold->Get3StateValue() != wxCHK_UNDETERMINED ) )
405 {
406 wxString fontName = text->GetFontName();
407
408 if( !text->GetFontName().IsEmpty() )
409 {
410 text->SetFont( KIFONT::FONT::GetFont( text->GetFontName(), text->IsBold(),
411 text->IsItalic(),
412 m_parent->GetBoard()->GetEmbeddedFiles()->GetFontFiles() ) );
413 }
414 }
415
416 if( parentFP )
417 {
418 if( m_keepUpright->Get3StateValue() != wxCHK_UNDETERMINED )
419 text->SetKeepUpright( m_keepUpright->GetValue() );
420
421 if( m_centerOnFP->GetValue() == wxCHK_CHECKED )
422 text->SetTextPos( text->GetParent()->GetCenter() );
423 }
424 }
425
426 if( field )
427 {
428 if( m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
429 field->SetVisible( m_visible->GetValue() );
430 }
431
433 {
434 if( shape )
435 {
436 STROKE_PARAMS stroke = shape->GetStroke();
437 stroke.SetWidth( m_lineWidth.GetValue() );
438 shape->SetStroke( stroke );
439 }
440
441 if( dimension )
442 dimension->SetLineThickness( m_lineWidth.GetValue() );
443 }
444 }
445 else
446 {
447 PCB_LAYER_ID layer = aItem->GetLayer();
448
449 if( text )
450 {
451 text->SetTextSize( m_brdSettings->GetTextSize( layer ) );
452 text->SetTextThickness( m_brdSettings->GetTextThickness( layer ) );
453 text->SetItalic( m_brdSettings->GetTextItalic( layer ) );
454
455 if( parentFP )
456 text->SetKeepUpright( m_brdSettings->GetTextUpright( layer ) );
457 }
458
459 if( shape )
460 {
461 STROKE_PARAMS stroke = shape->GetStroke();
462 stroke.SetWidth( m_brdSettings->GetLineThickness( layer ) );
463 shape->SetStroke( stroke );
464 }
465
466 if( dimension )
467 {
468 dimension->SetLineThickness( m_brdSettings->GetLineThickness( layer ) );
475 dimension->Update(); // refresh text & geometry
476 }
477 }
478}
479
480
482{
483 if( m_selectedItemsFilter->GetValue() )
484 {
485 EDA_ITEM* candidate = aItem;
486
487 if( !candidate->IsSelected() )
488 {
489 if( candidate->GetParent() && candidate->GetParent()->Type() == PCB_FOOTPRINT_T )
490 candidate = candidate->GetParent();
491 }
492
493 if( !candidate->IsSelected() )
494 {
495 candidate = ( candidate->GetParentGroup() ? candidate->GetParentGroup()->AsEdaItem() : nullptr );
496
497 while( candidate && !candidate->IsSelected() )
498 candidate = candidate->GetParentGroup()->AsEdaItem();
499
500 if( !candidate )
501 return;
502 }
503 }
504
506 {
507 if( aItem->GetLayer() != m_layerFilter->GetLayerSelection() )
508 return;
509 }
510
511 if( m_isBoardEditor )
512 {
513 if( m_referenceFilterOpt->GetValue() && !m_referenceFilter->GetValue().IsEmpty() )
514 {
515 if( FOOTPRINT* fp = aItem->GetParentFootprint() )
516 {
517 if( !WildCompareString( m_referenceFilter->GetValue(), fp->GetReference(), false ) )
518 return;
519 }
520 }
521
522 if( m_footprintFilterOpt->GetValue() && !m_footprintFilter->GetValue().IsEmpty() )
523 {
524 if( FOOTPRINT* fp = aItem->GetParentFootprint() )
525 {
526 if( !WildCompareString( m_footprintFilter->GetValue(), fp->GetFPID().Format(), false ) )
527 return;
528 }
529 }
530 }
531
532 processItem( aCommit, aItem );
533}
534
535
537{
538 int minTextSize = pcbIUScale.mmToIU( TEXT_MIN_SIZE_MM );
539 int maxTextSize = pcbIUScale.mmToIU( TEXT_MAX_SIZE_MM );
540
541 if( !m_textWidth.Validate( minTextSize, maxTextSize )
542 || !m_textHeight.Validate( minTextSize, maxTextSize ) )
543 {
544 return false;
545 }
546
547 BOARD_COMMIT commit( m_parent );
548
549 // Go through the footprints
550 for( FOOTPRINT* fp : m_parent->GetBoard()->Footprints() )
551 {
552 if( m_references->GetValue() )
553 visitItem( commit, &fp->Reference() );
554
555 if( m_values->GetValue() )
556 visitItem( commit, &fp->Value() );
557
558 for( PCB_FIELD* field : fp->GetFields() )
559 {
560 if( field->IsReference() )
561 continue;
562
563 if( field->IsValue() )
564 continue;
565
566 if( m_otherFootprintFields->GetValue() )
567 visitItem( commit, field );
568 else if( m_references->GetValue() && field->GetText() == wxT( "${REFERENCE}" ) )
569 visitItem( commit, field );
570 else if( m_values->GetValue() && field->GetText() == wxT( "${VALUE}" ) )
571 visitItem( commit, field );
572 }
573
574 // Go through all other footprint items
575 for( BOARD_ITEM* boardItem : fp->GraphicalItems() )
576 {
577 KICAD_T itemType = boardItem->Type();
578
579 if( itemType == PCB_TEXT_T || itemType == PCB_TEXTBOX_T )
580 {
581 EDA_TEXT* textItem = dynamic_cast<EDA_TEXT*>( boardItem );
582
583 if( m_footprintTexts->GetValue() )
584 visitItem( commit, boardItem );
585 else if( m_references->GetValue() && textItem->GetText() == wxT( "${REFERENCE}" ) )
586 visitItem( commit, boardItem );
587 else if( m_values->GetValue() && textItem->GetText() == wxT( "${VALUE}" ) )
588 visitItem( commit, boardItem );
589 }
590 else if( BaseType( itemType ) == PCB_DIMENSION_T )
591 {
592 if( m_footprintDimensions->GetValue() )
593 visitItem( commit, boardItem );
594 }
595 else if( itemType == PCB_SHAPE_T )
596 {
597 if( m_footprintGraphics->GetValue() )
598 visitItem( commit, boardItem );
599 }
600 }
601 }
602
603 if( m_isBoardEditor )
604 {
605 // Go through the PCB text & graphic items
606 for( BOARD_ITEM* boardItem : m_parent->GetBoard()->Drawings() )
607 {
608 KICAD_T itemType = boardItem->Type();
609
610 if( itemType == PCB_TEXT_T || itemType == PCB_TEXTBOX_T )
611 {
612 if( m_boardText->GetValue() )
613 visitItem( commit, boardItem );
614 }
615 else if( BaseType( itemType ) == PCB_DIMENSION_T )
616 {
617 if( m_boardDimensions->GetValue() )
618 visitItem( commit, boardItem );
619 }
620 else if( itemType == PCB_SHAPE_T )
621 {
622 if( m_boardGraphics->GetValue() )
623 visitItem( commit, boardItem );
624 }
625 }
626 }
627
628 commit.Push( _( "Edit Text and Graphics" ) );
630
631 return true;
632}
633
634
636{
637 PCB_EDIT_FRAME* editFrame = getEditFrame<PCB_EDIT_FRAME>();
639
640 dlg.ShowModal();
641 return 0;
642}
643
644
646{
647 FOOTPRINT_EDIT_FRAME* editFrame = getEditFrame<FOOTPRINT_EDIT_FRAME>();
649
650 dlg.ShowModal();
651 return 0;
652}
653
654
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:112
@ LAYER_CLASS_OTHERS
@ LAYER_CLASS_FAB
@ LAYER_CLASS_COURTYARD
@ LAYER_CLASS_SILK
@ LAYER_CLASS_COPPER
@ LAYER_CLASS_EDGES
Container for design settings for a BOARD object.
DIM_PRECISION m_DimensionPrecision
Number of digits after the decimal.
DIM_UNITS_FORMAT m_DimensionUnitsFormat
bool GetTextUpright(PCB_LAYER_ID aLayer) const
int GetTextThickness(PCB_LAYER_ID aLayer) const
Return the default text thickness from the layer class for the given layer.
bool m_TextUpright[LAYER_CLASS_COUNT]
bool GetTextItalic(PCB_LAYER_ID aLayer) const
int m_TextThickness[LAYER_CLASS_COUNT]
int m_LineThickness[LAYER_CLASS_COUNT]
VECTOR2I GetTextSize(PCB_LAYER_ID aLayer) const
Return the default text size from the layer class for the given layer.
int GetLineThickness(PCB_LAYER_ID aLayer) const
Return the default graphic segment thickness from the layer class for the given layer.
VECTOR2I m_TextSize[LAYER_CLASS_COUNT]
bool m_TextItalic[LAYER_CLASS_COUNT]
DIM_TEXT_POSITION m_DimensionTextPosition
DIM_UNITS_MODE m_DimensionUnitsMode
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:79
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:232
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:283
FOOTPRINT * GetParentFootprint() const
Definition: board_item.cpp:97
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:107
void processItem(SCH_COMMIT *aCommit, const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
void visitItem(SCH_COMMIT *aCommit, const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
int ShowModal() override
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
virtual EDA_ITEM * AsEdaItem()=0
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:97
virtual EDA_GROUP * GetParentGroup() const
Definition: eda_item.h:115
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:109
bool IsSelected() const
Definition: eda_item.h:126
EDA_ITEM * GetParent() const
Definition: eda_item.h:111
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition: eda_text.h:79
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:97
virtual void SetVisible(bool aVisible)
Definition: eda_text.cpp:386
KIFONT::FONT * GetFontSelection(bool aBold, bool aItalic, bool aForDrawingSheet=false) const
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false, const std::vector< wxString > *aEmbeddedFiles=nullptr, bool aForDrawingSheet=false)
Definition: font.cpp:147
int SetLayerSelection(int layer)
bool SetLayersHotkeys(bool value)
Common, abstract interface for edit frames.
Abstract dimension API.
void Update()
Update the dimension's cached text and geometry.
void SetUnitsFormat(const DIM_UNITS_FORMAT aFormat)
void SetSuppressZeroes(bool aSuppress)
void SetTextPositionMode(DIM_TEXT_POSITION aMode)
void SetLineThickness(int aWidth)
void SetPrecision(DIM_PRECISION aPrecision)
void SetUnitsMode(DIM_UNITS_MODE aMode)
void SetKeepTextAligned(bool aKeepAligned)
The main frame for Pcbnew.
void SetBoardFrame(PCB_BASE_FRAME *aFrame)
void SetUndefinedLayerName(const wxString &aName)
The selection tool: currently supports:
PCB_SELECTION & GetSelection()
STROKE_PARAMS GetStroke() const override
Definition: pcb_shape.h:91
void SetStroke(const STROKE_PARAMS &aStroke) override
Definition: pcb_shape.h:92
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
Simple container to manage line stroke parameters.
Definition: stroke_params.h:94
void SetWidth(int aWidth)
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:55
Generic, UI-independent tool event.
Definition: tool_event.h:168
virtual long long int GetValue()
Return the current value in Internal Units.
void Enable(bool aEnable)
Enable/disable the label, widget and units label.
bool IsIndeterminate() const
Return true if the control holds the indeterminate value (for instance, if it represents a multiple s...
virtual bool Validate(double aMin, double aMax, EDA_UNITS aUnits=EDA_UNITS::UNSCALED)
Validate the control against the given range, informing the user of any errors found.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
#define _(s)
#define TEXT_MIN_SIZE_MM
Minimum text size (1 micron).
Definition: eda_text.h:46
#define TEXT_MAX_SIZE_MM
Maximum text size in mm (~10 inches)
Definition: eda_text.h:47
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:60
@ UNDEFINED_LAYER
Definition: layer_ids.h:61
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:747
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
Definition: ui_common.cpp:156
Class to handle a set of BOARD_ITEMs.
#define SET_INT_VALUE(aRow, aCol, aValue)
#define SET_BOOL_VALUE(aRow, aCol, aValue)
std::vector< FAB_LAYER_COLOR > dummy
bool WildCompareString(const wxString &pattern, const wxString &string_to_tst, bool case_sensitive)
Compare a string against wild card (* and ?) pattern using the usual rules.
constexpr int mmToIU(double mm) const
Definition: base_units.h:92
constexpr KICAD_T BaseType(const KICAD_T aType)
Return the underlying type of the given type.
Definition: typeinfo.h:251
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
Definition: typeinfo.h:88
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
Definition: typeinfo.h:93
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
Definition: typeinfo.h:92
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
Definition: typeinfo.h:86
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
Definition: typeinfo.h:100
#define INDETERMINATE_ACTION
Definition: ui_common.h:47