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_barcode.h>
35#include <pcb_dimension.h>
36#include <pcb_shape.h>
37#include <pcb_text.h>
38#include <widgets/unit_binder.h>
39#include <widgets/font_choice.h>
41#include <bitmaps.h>
42#include <gr_text.h>
43#include <tool/tool_manager.h>
47
48// Columns of layer classes grid
49enum
50{
58};
59
60enum
61{
69};
70
71
72static wxString g_referenceFilter;
73static wxString g_footprintFilter;
74
75
77{
78public:
81
82protected:
83 void onActionButtonChange( wxCommandEvent& event ) override;
84 void onSpecifiedValueUpdateUI( wxUpdateUIEvent& event ) override;
85 void onDimensionItemCheckbox( wxCommandEvent& aEvent ) override;
86 void onAutoTextThickness( wxCommandEvent& aEvent ) override;
87 void onTextSize( wxCommandEvent& aEvent ) override;
88
89 void OnLayerFilterSelect( wxCommandEvent& event ) override
90 {
91 m_layerFilterOpt->SetValue( true );
92 }
93 void OnReferenceFilterText( wxCommandEvent& event ) override
94 {
95 m_referenceFilterOpt->SetValue( true );
96 }
97 void OnFootprintFilterText( wxCommandEvent& event ) override
98 {
99 m_footprintFilterOpt->SetValue( true );
100 }
101
102 bool TransferDataToWindow() override;
103 bool TransferDataFromWindow() override;
104
105 void visitItem( BOARD_COMMIT& aCommit, BOARD_ITEM* aItem );
106 void processItem( BOARD_COMMIT& aCommit, BOARD_ITEM* aItem );
107
108private:
113
118};
119
120
127{
128 m_parent = parent;
129 m_brdSettings = &m_parent->GetDesignSettings();
130 m_isBoardEditor = dynamic_cast<PCB_EDIT_FRAME*>( m_parent ) != nullptr;
131
132 if( !m_isBoardEditor )
133 {
134 m_footprintTexts->SetLabel( _( "Text items" ) );
135 m_footprintGraphics->SetLabel( _( "Graphic items" ) );
136 m_footprintDimensions->SetLabel( _( "Dimension items" ) );
137
138 m_boardText->Show( false );
139 m_boardGraphics->Show( false );
140 m_boardDimensions->Show( false );
141
142 m_referenceFilterOpt->Show( false );
143 m_referenceFilter->Show( false );
144 m_footprintFilterOpt->Show( false );
145 m_footprintFilter->Show( false );
146 }
147
148 // Allow indeterminate state in font control and rebuild list
149 m_fontCtrl->SetHasIndeterminateChoice();
150 m_fontCtrl->RefreshFonts();
151
152 m_autoTextThickness->SetIsCheckButton();
154
155 m_layerFilter->SetBoardFrame( m_parent );
156 m_layerFilter->SetLayersHotkeys( false );
157 m_layerFilter->Resync();
158
159 m_LayerCtrl->SetBoardFrame( m_parent );
160 m_LayerCtrl->SetLayersHotkeys( false );
161 m_LayerCtrl->SetUndefinedLayerName( INDETERMINATE_ACTION );
162 m_LayerCtrl->Resync();
163
164 m_grid->SetCellHighlightPenWidth( 0 );
165 m_grid->SetDefaultCellFont( KIUI::GetInfoFont( this ) );
166 m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() - FromDIP( 2 ) );
167
168 SetupStandardButtons( { { wxID_OK, _( "Apply and Close" ) },
169 { wxID_CANCEL, _( "Close" ) } } );
170
172}
173
174
176{
177 if( m_isBoardEditor )
178 {
181 }
182}
183
184
186{
187 PCB_SELECTION_TOOL* selTool = m_parent->GetToolManager()->GetTool<PCB_SELECTION_TOOL>();
188 m_selection = selTool->GetSelection();
189
190 if( m_isBoardEditor )
191 {
192 // SetValue() generates events, ChangeValue() does not
193 m_referenceFilter->ChangeValue( g_referenceFilter );
194 m_footprintFilter->ChangeValue( g_footprintFilter );
195 }
196
198
199 m_fontCtrl->SetStringSelection( INDETERMINATE_ACTION );
200
204 m_autoTextThickness->Check( false );
205 m_thickness.Enable( true );
206 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
207 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
208 m_keepUpright->Set3StateValue( wxCHK_UNDETERMINED );
209 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
210 m_LayerCtrl->SetLayerSelection( UNDEFINED_LAYER );
211
212 wxCommandEvent dummy;
214
215#define SET_INT_VALUE( aRow, aCol, aValue ) \
216 m_grid->SetCellValue( aRow, aCol, m_parent->StringFromValue( aValue, true ) )
217
218#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
219 attr = new wxGridCellAttr; \
220 attr->SetRenderer( new wxGridCellBoolRenderer() ); \
221 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
222 attr->SetReadOnly(); \
223 m_grid->SetAttr( aRow, aCol, attr ); \
224 m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxT( "" ) )
225
226 const BOARD_DESIGN_SETTINGS& bds = m_parent->GetBoard()->GetDesignSettings();
227 wxGridCellAttr* attr;
228
229 m_grid->SetCellValue( ROW_SILK, COL_CLASS_NAME, _( "Silk Layers" ) );
230 m_grid->SetCellValue( ROW_COPPER, COL_CLASS_NAME, _( "Copper Layers" ) );
231 m_grid->SetCellValue( ROW_EDGES, COL_CLASS_NAME, _( "Edge Cuts" ) );
232 m_grid->SetCellValue( ROW_COURTYARD, COL_CLASS_NAME, _( "Courtyards" ) );
233 m_grid->SetCellValue( ROW_FAB, COL_CLASS_NAME, _( "Fab Layers" ) );
234 m_grid->SetCellValue( ROW_OTHERS, COL_CLASS_NAME, _( "Other Layers" ) );
235
236 m_grid->SetCellValue( ROW_HEADER, COL_LINE_THICKNESS, _( "Line Thickness" ) );
243
244 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_WIDTH, _( "Text Width" ) );
249
250 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_HEIGHT, _( "Text Height" ) );
255
256 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_THICKNESS, _( "Text Thickness" ) );
261
262 attr = new wxGridCellAttr;
263 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
264 m_grid->SetAttr( ROW_HEADER, COL_TEXT_ITALIC, attr ); \
265 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_ITALIC, _( "Italic" ) );
270
271 attr = new wxGridCellAttr;
272 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
273 m_grid->SetAttr( ROW_HEADER, COL_TEXT_UPRIGHT, attr ); \
274 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_UPRIGHT, _( "Keep Upright" ) );
279
280 return true;
281
282#undef SET_INT_VALUE
283#undef SET_BOOL_VALUE
284}
285
286
288{
289 // Update the UNIT_BINDER controls if the action to take is changed
290 bool enable = m_setToSpecifiedValues->GetValue();
291
292 m_LayerLabel->Enable( enable );
293 m_LayerCtrl->Enable( enable );
294
295 m_lineWidth.Enable( enable );
296 m_textWidth.Enable( enable );
297 m_textHeight.Enable( enable );
298 m_thickness.Enable( enable && !m_autoTextThickness->IsChecked() );
299
300 m_fontLabel->Enable( enable );
301 m_fontCtrl->Enable( enable );
302
303 m_centerOnFP->Enable( enable );
304
305 enable = !enable;
306 m_grid->Enable( enable );
307}
308
309
311{
312 // Update the UI for the elements inside the use specified values sizer
313 event.Enable( m_setToSpecifiedValues->GetValue() );
314}
315
316
318{
319 if( m_footprintDimensions->GetValue() || m_boardDimensions->GetValue() )
320 m_setToLayerDefaults->SetLabel( _( "Set to layer and dimension default values:" ) );
321 else
322 m_setToLayerDefaults->SetLabel( _( "Set to layer default values:" ) );
323}
324
325
327{
328 if( aEvent.IsChecked() )
329 {
330 m_autoTextThickness->Check( true );
331
332 wxCommandEvent dummy;
333 onTextSize( dummy );
334
335 if( m_textWidth.IsIndeterminate() || m_textHeight.IsIndeterminate() )
336 m_thickness.SetValue( _( "(auto)" ) );
337
338 m_thickness.Enable( false );
339 }
340 else
341 {
342 m_thickness.Enable( true );
344 }
345}
346
347
349{
350 if( !m_autoTextThickness->IsChecked() )
351 return;
352
353 if( m_textWidth.IsIndeterminate() || m_textHeight.IsIndeterminate() )
354 return;
355
356 int size = std::min( m_textWidth.GetValue(), m_textHeight.GetValue() );
357 bool bold = ( m_bold->Get3StateValue() == wxCHK_CHECKED );
358
359 m_thickness.SetValue( bold ? GetPenSizeForBold( size )
360 : GetPenSizeForNormal( size ) );
361}
362
363
365{
366 aCommit.Modify( aItem );
367
368 PCB_FIELD* field = dynamic_cast<PCB_FIELD*>( aItem );
369 EDA_TEXT* text = dynamic_cast<EDA_TEXT*>( aItem );
370 PCB_SHAPE* shape = dynamic_cast<PCB_SHAPE*>( aItem );
371 PCB_DIMENSION_BASE* dimension = dynamic_cast<PCB_DIMENSION_BASE*>( aItem );
372 PCB_BARCODE* barcode = dynamic_cast<PCB_BARCODE*>( aItem );
373 FOOTPRINT* parentFP = aItem->GetParentFootprint();
374
375 if( m_setToSpecifiedValues->GetValue() )
376 {
377 if( m_LayerCtrl->GetLayerSelection() != UNDEFINED_LAYER )
378 aItem->SetLayer( ToLAYER_ID( m_LayerCtrl->GetLayerSelection() ) );
379
380 if( text )
381 {
382 if( !m_textWidth.IsIndeterminate() )
383 text->SetTextSize( VECTOR2I( m_textWidth.GetIntValue(), text->GetTextSize().y ) );
384
385 if( !m_textHeight.IsIndeterminate() )
386 text->SetTextSize( VECTOR2I( text->GetTextSize().x, m_textHeight.GetIntValue() ) );
387
388 if( m_autoTextThickness->IsChecked() )
389 text->SetAutoThickness( true );
390 else if( !m_thickness.IsIndeterminate() )
391 text->SetTextThickness( m_thickness.GetIntValue() );
392
393 // Must be after SetTextSize()
394 if( m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
395 text->SetBold( m_bold->GetValue() );
396
397 if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
398 text->SetItalic( m_italic->GetValue() );
399
400 // Must come after setting bold & italic
401 if( m_fontCtrl->GetStringSelection() != INDETERMINATE_ACTION )
402 {
403 text->SetFont( m_fontCtrl->GetFontSelection( text->IsBold(), text->IsItalic() ) );
404 }
405 else if(( m_italic->Get3StateValue() != wxCHK_UNDETERMINED
406 || m_bold->Get3StateValue() != wxCHK_UNDETERMINED ) )
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( aItem->GetParent()->GetCenter() );
423 }
424 }
425
426 if( barcode )
427 {
428 if( !m_textHeight.IsIndeterminate() )
429 barcode->SetTextSize( m_textHeight.GetIntValue() );
430 else if( !m_textWidth.IsIndeterminate() )
431 barcode->SetTextSize( m_textWidth.GetIntValue() );
432 }
433
434 if( field )
435 {
436 if( m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
437 field->SetVisible( m_visible->GetValue() );
438 }
439
440 if( !m_lineWidth.IsIndeterminate() )
441 {
442 if( shape )
443 {
444 STROKE_PARAMS stroke = shape->GetStroke();
445 stroke.SetWidth( m_lineWidth.GetIntValue() );
446 shape->SetStroke( stroke );
447 }
448
449 if( dimension )
450 dimension->SetLineThickness( m_lineWidth.GetIntValue() );
451 }
452 }
453 else
454 {
455 aItem->StyleFromSettings( *m_brdSettings, false );
456 }
457}
458
459
461{
462 if( m_selectedItemsFilter->GetValue() )
463 {
464 EDA_ITEM* candidate = aItem;
465
466 if( !candidate->IsSelected() )
467 {
468 if( candidate->GetParent() && candidate->GetParent()->Type() == PCB_FOOTPRINT_T )
469 candidate = candidate->GetParent();
470 }
471
472 if( !candidate->IsSelected() )
473 {
474 candidate = ( candidate->GetParentGroup() ? candidate->GetParentGroup()->AsEdaItem() : nullptr );
475
476 while( candidate && !candidate->IsSelected() && candidate->GetParentGroup() )
477 candidate = candidate->GetParentGroup()->AsEdaItem();
478
479 if( !candidate || !candidate->IsSelected() )
480 return;
481 }
482 }
483
484 if( m_layerFilterOpt->GetValue() && m_layerFilter->GetLayerSelection() != UNDEFINED_LAYER )
485 {
486 if( aItem->GetLayer() != m_layerFilter->GetLayerSelection() )
487 return;
488 }
489
490 if( m_isBoardEditor )
491 {
492 if( m_referenceFilterOpt->GetValue() && !m_referenceFilter->GetValue().IsEmpty() )
493 {
494 if( FOOTPRINT* fp = aItem->GetParentFootprint() )
495 {
496 if( !WildCompareString( m_referenceFilter->GetValue(), fp->GetReference(), false ) )
497 return;
498 }
499 }
500
501 if( m_footprintFilterOpt->GetValue() && !m_footprintFilter->GetValue().IsEmpty() )
502 {
503 if( FOOTPRINT* fp = aItem->GetParentFootprint() )
504 {
505 if( !WildCompareString( m_footprintFilter->GetValue(), fp->GetFPID().Format(), false ) )
506 return;
507 }
508 }
509 }
510
511 processItem( aCommit, aItem );
512}
513
514
516{
517 int minTextSize = pcbIUScale.mmToIU( TEXT_MIN_SIZE_MM );
518 int maxTextSize = pcbIUScale.mmToIU( TEXT_MAX_SIZE_MM );
519
520 if( !m_textWidth.Validate( minTextSize, maxTextSize )
521 || !m_textHeight.Validate( minTextSize, maxTextSize ) )
522 {
523 return false;
524 }
525
526 BOARD_COMMIT commit( m_parent );
527
528 // Go through the footprints
529 for( FOOTPRINT* fp : m_parent->GetBoard()->Footprints() )
530 {
531 if( m_references->GetValue() )
532 visitItem( commit, &fp->Reference() );
533
534 if( m_values->GetValue() )
535 visitItem( commit, &fp->Value() );
536
537 for( PCB_FIELD* field : fp->GetFields() )
538 {
539 wxCHECK2( field, continue );
540
541 if( field->IsReference() )
542 continue;
543
544 if( field->IsValue() )
545 continue;
546
547 if( m_otherFootprintFields->GetValue() )
548 visitItem( commit, field );
549 else if( m_references->GetValue() && field->GetText() == wxT( "${REFERENCE}" ) )
550 visitItem( commit, field );
551 else if( m_values->GetValue() && field->GetText() == wxT( "${VALUE}" ) )
552 visitItem( commit, field );
553 }
554
555 // Go through all other footprint items
556 for( BOARD_ITEM* boardItem : fp->GraphicalItems() )
557 {
558 KICAD_T itemType = boardItem->Type();
559
560 if( itemType == PCB_TEXT_T || itemType == PCB_TEXTBOX_T )
561 {
562 EDA_TEXT* textItem = dynamic_cast<EDA_TEXT*>( boardItem );
563
564 if( m_footprintTexts->GetValue() )
565 visitItem( commit, boardItem );
566 else if( m_references->GetValue() && textItem->GetText() == wxT( "${REFERENCE}" ) )
567 visitItem( commit, boardItem );
568 else if( m_values->GetValue() && textItem->GetText() == wxT( "${VALUE}" ) )
569 visitItem( commit, boardItem );
570 }
571 else if( itemType == PCB_TABLE_T )
572 {
573 boardItem->RunOnChildren(
574 [&]( BOARD_ITEM* child )
575 {
576 if( child->Type() == PCB_TABLECELL_T && m_footprintTexts->GetValue() )
577 visitItem( commit, child );
578 },
580 }
581 else if( BaseType( itemType ) == PCB_DIMENSION_T )
582 {
583 if( m_footprintDimensions->GetValue() )
584 visitItem( commit, boardItem );
585 }
586 else if( itemType == PCB_SHAPE_T || itemType == PCB_BARCODE_T )
587 {
588 if( m_footprintGraphics->GetValue() )
589 visitItem( commit, boardItem );
590 }
591 }
592 }
593
594 if( m_isBoardEditor )
595 {
596 // Go through the PCB text & graphic items
597 for( BOARD_ITEM* boardItem : m_parent->GetBoard()->Drawings() )
598 {
599 KICAD_T itemType = boardItem->Type();
600
601 if( itemType == PCB_TEXT_T || itemType == PCB_TEXTBOX_T )
602 {
603 if( m_boardText->GetValue() )
604 visitItem( commit, boardItem );
605 }
606 else if( itemType == PCB_TABLE_T )
607 {
608 boardItem->RunOnChildren(
609 [&]( BOARD_ITEM* child )
610 {
611 if( child->Type() == PCB_TABLECELL_T && m_boardText->GetValue() )
612 visitItem( commit, child );
613 },
615 }
616 else if( BaseType( itemType ) == PCB_DIMENSION_T )
617 {
618 if( m_boardDimensions->GetValue() )
619 visitItem( commit, boardItem );
620 }
621 else if( itemType == PCB_SHAPE_T || itemType == PCB_BARCODE_T )
622 {
623 if( m_boardGraphics->GetValue() )
624 visitItem( commit, boardItem );
625 }
626 }
627 }
628
629 commit.Push( _( "Edit Text and Graphics" ) );
630 m_parent->GetCanvas()->Refresh();
631
632 return true;
633}
634
635
637{
640
641 dlg.ShowModal();
642 return 0;
643}
644
645
647{
650
651 dlg.ShowModal();
652 return 0;
653}
654
655
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:125
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Definition bitmap.cpp:110
@ edit_cmp_symb_links
@ 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.
bool m_TextUpright[LAYER_CLASS_COUNT]
int m_TextThickness[LAYER_CLASS_COUNT]
int m_LineThickness[LAYER_CLASS_COUNT]
VECTOR2I m_TextSize[LAYER_CLASS_COUNT]
bool m_TextItalic[LAYER_CLASS_COUNT]
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:84
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition board_item.h:268
virtual VECTOR2I GetCenter() const
This defaults to the center of the bounding box if not overridden.
Definition board_item.h:136
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition board_item.h:316
FOOTPRINT * GetParentFootprint() const
BOARD_ITEM_CONTAINER * GetParent() const
Definition board_item.h:234
virtual void StyleFromSettings(const BOARD_DESIGN_SETTINGS &settings, bool aCheckSide)
Definition board_item.h:363
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
DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Edit Text and Graphic Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
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 EDA_ITEM * AsEdaItem()=0
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:100
virtual EDA_GROUP * GetParentGroup() const
Definition eda_item.h:118
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:112
bool IsSelected() const
Definition eda_item.h:129
EDA_ITEM * GetParent() const
Definition eda_item.h:114
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:93
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition eda_text.h:114
virtual void SetVisible(bool aVisible)
Definition eda_text.cpp:385
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
void SetTextSize(int aTextSize)
Change the height of the human-readable text displayed below the barcode.
Common, abstract interface for edit frames.
Abstract dimension API.
void SetLineThickness(int aWidth)
The main frame for Pcbnew.
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
Simple container to manage line stroke parameters.
void SetWidth(int aWidth)
T * getEditFrame() const
Return the application window object, casted to requested user type.
Definition tool_base.h:186
Generic, UI-independent tool event.
Definition tool_event.h:171
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.
#define _(s)
@ NO_RECURSE
Definition eda_item.h:54
#define TEXT_MIN_SIZE_MM
Minimum text size (1 micron).
Definition eda_text.h:60
#define TEXT_MAX_SIZE_MM
Maximum text size in mm (~10 inches)
Definition eda_text.h:61
int GetPenSizeForBold(int aTextSize)
Definition gr_text.cpp:37
int GetPenSizeForNormal(int aTextSize)
Definition gr_text.cpp:61
@ UNDEFINED_LAYER
Definition layer_ids.h:61
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition lset.cpp:754
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
BARCODE class definition.
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 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:75
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
Definition typeinfo.h:85
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
Definition typeinfo.h:90
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
Definition typeinfo.h:89
@ PCB_BARCODE_T
class PCB_BARCODE, a barcode (graphic item)
Definition typeinfo.h:98
@ PCB_TABLECELL_T
class PCB_TABLECELL, PCB_TEXTBOX for use in tables
Definition typeinfo.h:92
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
Definition typeinfo.h:83
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
Definition typeinfo.h:97
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs
Definition typeinfo.h:91
#define INDETERMINATE_ACTION
Definition ui_common.h:47
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:687