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, see <https://www.gnu.org/licenses/>.
19 */
20
21#include <string_utils.h>
22#include <board_commit.h>
23#include <pcb_edit_frame.h>
26#include <board.h>
28#include <footprint.h>
29#include <pcb_group.h>
30#include <pcb_barcode.h>
31#include <pcb_dimension.h>
32#include <pcb_shape.h>
33#include <pcb_text.h>
34#include <widgets/unit_binder.h>
35#include <widgets/font_choice.h>
37#include <bitmaps.h>
38#include <gr_text.h>
39#include <tool/tool_manager.h>
43
44// Columns of layer classes grid
45enum
46{
54};
55
56enum
57{
65};
66
67
68static wxString g_referenceFilter;
69static wxString g_footprintFilter;
70
71
73{
74public:
77
78protected:
79 void onActionButtonChange( wxCommandEvent& event ) override;
80 void onSpecifiedValueUpdateUI( wxUpdateUIEvent& event ) override;
81 void onDimensionItemCheckbox( wxCommandEvent& aEvent ) override;
82 void onAutoTextThickness( wxCommandEvent& aEvent ) override;
83 void onTextSize( wxCommandEvent& aEvent ) override;
84
85 void OnLayerFilterSelect( wxCommandEvent& event ) override
86 {
87 m_layerFilterOpt->SetValue( true );
88 }
89 void OnReferenceFilterText( wxCommandEvent& event ) override
90 {
91 m_referenceFilterOpt->SetValue( true );
92 }
93 void OnFootprintFilterText( wxCommandEvent& event ) override
94 {
95 m_footprintFilterOpt->SetValue( true );
96 }
97
98 bool TransferDataToWindow() override;
99 bool TransferDataFromWindow() override;
100
101 void visitItem( BOARD_COMMIT& aCommit, BOARD_ITEM* aItem );
102 void processItem( BOARD_COMMIT& aCommit, BOARD_ITEM* aItem );
103
104private:
109
114};
115
116
123{
124 m_parent = parent;
125 m_brdSettings = &m_parent->GetDesignSettings();
126 m_isBoardEditor = dynamic_cast<PCB_EDIT_FRAME*>( m_parent ) != nullptr;
127
128 if( !m_isBoardEditor )
129 {
130 m_footprintTexts->SetLabel( _( "Text items" ) );
131 m_footprintGraphics->SetLabel( _( "Graphic items" ) );
132 m_footprintDimensions->SetLabel( _( "Dimension items" ) );
133
134 m_boardText->Show( false );
135 m_boardGraphics->Show( false );
136 m_boardDimensions->Show( false );
137
138 m_referenceFilterOpt->Show( false );
139 m_referenceFilter->Show( false );
140 m_footprintFilterOpt->Show( false );
141 m_footprintFilter->Show( false );
142 }
143
144 // Allow indeterminate state in font control and rebuild list
145 m_fontCtrl->SetHasIndeterminateChoice();
146 m_fontCtrl->RefreshFonts();
147
148 m_autoTextThickness->SetIsCheckButton();
150
151 m_layerFilter->SetBoardFrame( m_parent );
152 m_layerFilter->SetLayersHotkeys( false );
153 m_layerFilter->Resync();
154
155 m_LayerCtrl->SetBoardFrame( m_parent );
156 m_LayerCtrl->SetLayersHotkeys( false );
157 m_LayerCtrl->SetUndefinedLayerName( INDETERMINATE_ACTION );
158 m_LayerCtrl->Resync();
159
160 m_grid->SetCellHighlightPenWidth( 0 );
161 m_grid->SetDefaultCellFont( KIUI::GetInfoFont( this ) );
162 m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() - FromDIP( 2 ) );
163
164 SetupStandardButtons( { { wxID_OK, _( "Apply and Close" ) },
165 { wxID_CANCEL, _( "Close" ) } } );
166
168}
169
170
172{
173 if( m_isBoardEditor )
174 {
177 }
178}
179
180
182{
183 PCB_SELECTION_TOOL* selTool = m_parent->GetToolManager()->GetTool<PCB_SELECTION_TOOL>();
184 m_selection = selTool->GetSelection();
185
186 if( m_isBoardEditor )
187 {
188 // SetValue() generates events, ChangeValue() does not
189 m_referenceFilter->ChangeValue( g_referenceFilter );
190 m_footprintFilter->ChangeValue( g_footprintFilter );
191 }
192
194
195 m_fontCtrl->SetStringSelection( INDETERMINATE_ACTION );
196
200 m_autoTextThickness->Check( false );
201 m_thickness.Enable( true );
202 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
203 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
204 m_keepUpright->Set3StateValue( wxCHK_UNDETERMINED );
205 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
206 m_LayerCtrl->SetLayerSelection( UNDEFINED_LAYER );
207
208 wxCommandEvent dummy;
210
211#define SET_INT_VALUE( aRow, aCol, aValue ) \
212 m_grid->SetCellValue( aRow, aCol, m_parent->StringFromValue( aValue, true ) )
213
214#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
215 attr = new wxGridCellAttr; \
216 attr->SetRenderer( new wxGridCellBoolRenderer() ); \
217 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
218 attr->SetReadOnly(); \
219 m_grid->SetAttr( aRow, aCol, attr ); \
220 m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxT( "" ) )
221
222 const BOARD_DESIGN_SETTINGS& bds = m_parent->GetBoard()->GetDesignSettings();
223 wxGridCellAttr* attr;
224
225 m_grid->SetCellValue( ROW_SILK, COL_CLASS_NAME, _( "Silk Layers" ) );
226 m_grid->SetCellValue( ROW_COPPER, COL_CLASS_NAME, _( "Copper Layers" ) );
227 m_grid->SetCellValue( ROW_EDGES, COL_CLASS_NAME, _( "Edge Cuts" ) );
228 m_grid->SetCellValue( ROW_COURTYARD, COL_CLASS_NAME, _( "Courtyards" ) );
229 m_grid->SetCellValue( ROW_FAB, COL_CLASS_NAME, _( "Fab Layers" ) );
230 m_grid->SetCellValue( ROW_OTHERS, COL_CLASS_NAME, _( "Other Layers" ) );
231
232 m_grid->SetCellValue( ROW_HEADER, COL_LINE_THICKNESS, _( "Line Thickness" ) );
239
240 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_WIDTH, _( "Text Width" ) );
245
246 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_HEIGHT, _( "Text Height" ) );
251
252 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_THICKNESS, _( "Text Thickness" ) );
257
258 attr = new wxGridCellAttr;
259 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
260 m_grid->SetAttr( ROW_HEADER, COL_TEXT_ITALIC, attr ); \
261 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_ITALIC, _( "Italic" ) );
266
267 attr = new wxGridCellAttr;
268 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
269 m_grid->SetAttr( ROW_HEADER, COL_TEXT_UPRIGHT, attr ); \
270 m_grid->SetCellValue( ROW_HEADER, COL_TEXT_UPRIGHT, _( "Keep Upright" ) );
275
276 return true;
277
278#undef SET_INT_VALUE
279#undef SET_BOOL_VALUE
280}
281
282
284{
285 // Update the UNIT_BINDER controls if the action to take is changed
286 bool enable = m_setToSpecifiedValues->GetValue();
287
288 m_LayerLabel->Enable( enable );
289 m_LayerCtrl->Enable( enable );
290
291 m_lineWidth.Enable( enable );
292 m_textWidth.Enable( enable );
293 m_textHeight.Enable( enable );
294 m_thickness.Enable( enable && !m_autoTextThickness->IsChecked() );
295
296 m_fontLabel->Enable( enable );
297 m_fontCtrl->Enable( enable );
298
299 m_centerOnFP->Enable( enable );
300
301 enable = !enable;
302 m_grid->Enable( enable );
303}
304
305
307{
308 // Update the UI for the elements inside the use specified values sizer
309 event.Enable( m_setToSpecifiedValues->GetValue() );
310}
311
312
314{
315 if( m_footprintDimensions->GetValue() || m_boardDimensions->GetValue() )
316 m_setToLayerDefaults->SetLabel( _( "Set to layer and dimension default values:" ) );
317 else
318 m_setToLayerDefaults->SetLabel( _( "Set to layer default values:" ) );
319}
320
321
323{
324 if( aEvent.IsChecked() )
325 {
326 m_autoTextThickness->Check( true );
327
328 wxCommandEvent dummy;
329 onTextSize( dummy );
330
331 if( m_textWidth.IsIndeterminate() || m_textHeight.IsIndeterminate() )
332 m_thickness.SetValue( _( "(auto)" ) );
333
334 m_thickness.Enable( false );
335 }
336 else
337 {
338 m_thickness.Enable( true );
340 }
341}
342
343
345{
346 if( !m_autoTextThickness->IsChecked() )
347 return;
348
349 if( m_textWidth.IsIndeterminate() || m_textHeight.IsIndeterminate() )
350 return;
351
352 int size = std::min( m_textWidth.GetValue(), m_textHeight.GetValue() );
353 bool bold = ( m_bold->Get3StateValue() == wxCHK_CHECKED );
354
355 m_thickness.SetValue( bold ? GetPenSizeForBold( size )
356 : GetPenSizeForNormal( size ) );
357}
358
359
361{
362 aCommit.Modify( aItem );
363
364 PCB_FIELD* field = dynamic_cast<PCB_FIELD*>( aItem );
365 EDA_TEXT* text = dynamic_cast<EDA_TEXT*>( aItem );
366 PCB_SHAPE* shape = dynamic_cast<PCB_SHAPE*>( aItem );
367 PCB_DIMENSION_BASE* dimension = dynamic_cast<PCB_DIMENSION_BASE*>( aItem );
368 PCB_BARCODE* barcode = dynamic_cast<PCB_BARCODE*>( aItem );
369 FOOTPRINT* parentFP = aItem->GetParentFootprint();
370
371 if( m_setToSpecifiedValues->GetValue() )
372 {
373 if( m_LayerCtrl->GetLayerSelection() != UNDEFINED_LAYER )
374 aItem->SetLayer( ToLAYER_ID( m_LayerCtrl->GetLayerSelection() ) );
375
376 if( text )
377 {
378 if( !m_textWidth.IsIndeterminate() )
379 text->SetTextSize( VECTOR2I( m_textWidth.GetIntValue(), text->GetTextSize().y ) );
380
381 if( !m_textHeight.IsIndeterminate() )
382 text->SetTextSize( VECTOR2I( text->GetTextSize().x, m_textHeight.GetIntValue() ) );
383
384 if( m_autoTextThickness->IsChecked() )
385 text->SetAutoThickness( true );
386 else if( !m_thickness.IsIndeterminate() )
387 text->SetTextThickness( m_thickness.GetIntValue() );
388
389 // Must be after SetTextSize()
390 if( m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
391 text->SetBold( m_bold->GetValue() );
392
393 if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
394 text->SetItalic( m_italic->GetValue() );
395
396 // Must come after setting bold & italic
397 if( m_fontCtrl->GetStringSelection() != INDETERMINATE_ACTION )
398 {
399 text->SetFont( m_fontCtrl->GetFontSelection( text->IsBold(), text->IsItalic() ) );
400 }
401 else if(( m_italic->Get3StateValue() != wxCHK_UNDETERMINED
402 || m_bold->Get3StateValue() != wxCHK_UNDETERMINED ) )
403 {
404 if( !text->GetFontName().IsEmpty() )
405 {
406 text->SetFont( KIFONT::FONT::GetFont( text->GetFontName(), text->IsBold(),
407 text->IsItalic(),
408 m_parent->GetBoard()->GetEmbeddedFiles()->GetFontFiles() ) );
409 }
410 }
411
412 if( parentFP )
413 {
414 if( m_keepUpright->Get3StateValue() != wxCHK_UNDETERMINED )
415 text->SetKeepUpright( m_keepUpright->GetValue() );
416
417 if( m_centerOnFP->GetValue() == wxCHK_CHECKED )
418 text->SetTextPos( aItem->GetParent()->GetCenter() );
419 }
420 }
421
422 if( barcode )
423 {
424 if( !m_textHeight.IsIndeterminate() )
425 barcode->SetTextSize( m_textHeight.GetIntValue() );
426 else if( !m_textWidth.IsIndeterminate() )
427 barcode->SetTextSize( m_textWidth.GetIntValue() );
428 }
429
430 if( field )
431 {
432 if( m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
433 field->SetVisible( m_visible->GetValue() );
434 }
435
436 if( !m_lineWidth.IsIndeterminate() )
437 {
438 if( shape )
439 {
440 STROKE_PARAMS stroke = shape->GetStroke();
441 stroke.SetWidth( m_lineWidth.GetIntValue() );
442 shape->SetStroke( stroke );
443 }
444
445 if( dimension )
446 dimension->SetLineThickness( m_lineWidth.GetIntValue() );
447 }
448 }
449 else
450 {
451 aItem->StyleFromSettings( *m_brdSettings, false );
452 }
453}
454
455
457{
458 if( m_selectedItemsFilter->GetValue() )
459 {
460 EDA_ITEM* candidate = aItem;
461
462 if( !candidate->IsSelected() )
463 {
464 if( candidate->GetParent() && candidate->GetParent()->Type() == PCB_FOOTPRINT_T )
465 candidate = candidate->GetParent();
466 }
467
468 if( !candidate->IsSelected() )
469 {
470 candidate = ( candidate->GetParentGroup() ? candidate->GetParentGroup()->AsEdaItem() : nullptr );
471
472 while( candidate && !candidate->IsSelected() && candidate->GetParentGroup() )
473 candidate = candidate->GetParentGroup()->AsEdaItem();
474
475 if( !candidate || !candidate->IsSelected() )
476 return;
477 }
478 }
479
480 if( m_layerFilterOpt->GetValue() && m_layerFilter->GetLayerSelection() != UNDEFINED_LAYER )
481 {
482 if( aItem->GetLayer() != m_layerFilter->GetLayerSelection() )
483 return;
484 }
485
486 if( m_isBoardEditor )
487 {
488 if( m_referenceFilterOpt->GetValue() && !m_referenceFilter->GetValue().IsEmpty() )
489 {
490 if( FOOTPRINT* fp = aItem->GetParentFootprint() )
491 {
492 if( !WildCompareString( m_referenceFilter->GetValue(), fp->GetReference(), false ) )
493 return;
494 }
495 }
496
497 if( m_footprintFilterOpt->GetValue() && !m_footprintFilter->GetValue().IsEmpty() )
498 {
499 if( FOOTPRINT* fp = aItem->GetParentFootprint() )
500 {
501 if( !WildCompareString( m_footprintFilter->GetValue(), fp->GetFPID().Format(), false ) )
502 return;
503 }
504 }
505 }
506
507 processItem( aCommit, aItem );
508}
509
510
512{
513 int minTextSize = pcbIUScale.mmToIU( TEXT_MIN_SIZE_MM );
514 int maxTextSize = pcbIUScale.mmToIU( TEXT_MAX_SIZE_MM );
515
516 if( !m_textWidth.Validate( minTextSize, maxTextSize )
517 || !m_textHeight.Validate( minTextSize, maxTextSize ) )
518 {
519 return false;
520 }
521
522 BOARD_COMMIT commit( m_parent );
523
524 // Go through the footprints
525 for( FOOTPRINT* fp : m_parent->GetBoard()->Footprints() )
526 {
527 if( m_references->GetValue() )
528 visitItem( commit, &fp->Reference() );
529
530 if( m_values->GetValue() )
531 visitItem( commit, &fp->Value() );
532
533 for( PCB_FIELD* field : fp->GetFields() )
534 {
535 wxCHECK2( field, continue );
536
537 if( field->IsReference() )
538 continue;
539
540 if( field->IsValue() )
541 continue;
542
543 if( m_otherFootprintFields->GetValue() )
544 visitItem( commit, field );
545 else if( m_references->GetValue() && field->GetText() == wxT( "${REFERENCE}" ) )
546 visitItem( commit, field );
547 else if( m_values->GetValue() && field->GetText() == wxT( "${VALUE}" ) )
548 visitItem( commit, field );
549 }
550
551 // Go through all other footprint items
552 for( BOARD_ITEM* boardItem : fp->GraphicalItems() )
553 {
554 KICAD_T itemType = boardItem->Type();
555
556 if( itemType == PCB_TEXT_T || itemType == PCB_TEXTBOX_T )
557 {
558 EDA_TEXT* textItem = dynamic_cast<EDA_TEXT*>( boardItem );
559
560 if( m_footprintTexts->GetValue() )
561 visitItem( commit, boardItem );
562 else if( m_references->GetValue() && textItem->GetText() == wxT( "${REFERENCE}" ) )
563 visitItem( commit, boardItem );
564 else if( m_values->GetValue() && textItem->GetText() == wxT( "${VALUE}" ) )
565 visitItem( commit, boardItem );
566 }
567 else if( itemType == PCB_TABLE_T )
568 {
569 boardItem->RunOnChildren(
570 [&]( BOARD_ITEM* child )
571 {
572 if( child->Type() == PCB_TABLECELL_T && m_footprintTexts->GetValue() )
573 visitItem( commit, child );
574 },
576 }
577 else if( BaseType( itemType ) == PCB_DIMENSION_T )
578 {
579 if( m_footprintDimensions->GetValue() )
580 visitItem( commit, boardItem );
581 }
582 else if( itemType == PCB_SHAPE_T || itemType == PCB_BARCODE_T )
583 {
584 if( m_footprintGraphics->GetValue() )
585 visitItem( commit, boardItem );
586 }
587 }
588 }
589
590 if( m_isBoardEditor )
591 {
592 // Go through the PCB text & graphic items
593 for( BOARD_ITEM* boardItem : m_parent->GetBoard()->Drawings() )
594 {
595 KICAD_T itemType = boardItem->Type();
596
597 if( itemType == PCB_TEXT_T || itemType == PCB_TEXTBOX_T )
598 {
599 if( m_boardText->GetValue() )
600 visitItem( commit, boardItem );
601 }
602 else if( itemType == PCB_TABLE_T )
603 {
604 boardItem->RunOnChildren(
605 [&]( BOARD_ITEM* child )
606 {
607 if( child->Type() == PCB_TABLECELL_T && m_boardText->GetValue() )
608 visitItem( commit, child );
609 },
611 }
612 else if( BaseType( itemType ) == PCB_DIMENSION_T )
613 {
614 if( m_boardDimensions->GetValue() )
615 visitItem( commit, boardItem );
616 }
617 else if( itemType == PCB_SHAPE_T || itemType == PCB_BARCODE_T )
618 {
619 if( m_boardGraphics->GetValue() )
620 visitItem( commit, boardItem );
621 }
622 }
623 }
624
625 commit.Push( _( "Edit Text and Graphics" ) );
626 m_parent->GetCanvas()->Refresh();
627
628 return true;
629}
630
631
633{
636
637 dlg.ShowModal();
638 return 0;
639}
640
641
643{
646
647 dlg.ShowModal();
648 return 0;
649}
650
651
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:121
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Definition bitmap.cpp:106
@ 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:81
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition board_item.h:265
virtual VECTOR2I GetCenter() const
This defaults to the center of the bounding box if not overridden.
Definition board_item.h:133
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition board_item.h:313
FOOTPRINT * GetParentFootprint() const
BOARD_ITEM_CONTAINER * GetParent() const
Definition board_item.h:231
virtual void StyleFromSettings(const BOARD_DESIGN_SETTINGS &settings, bool aCheckSide)
Definition board_item.h:360
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:102
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:96
virtual EDA_GROUP * GetParentGroup() const
Definition eda_item.h:114
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:108
bool IsSelected() const
Definition eda_item.h:132
EDA_ITEM * GetParent() const
Definition eda_item.h:110
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:89
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition eda_text.h:110
virtual void SetVisible(bool aVisible)
Definition eda_text.cpp:381
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:143
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
void SetStroke(const STROKE_PARAMS &aStroke) override
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:182
Generic, UI-independent tool event.
Definition tool_event.h:167
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:50
#define TEXT_MIN_SIZE_MM
Minimum text size (1 micron).
Definition eda_text.h:56
#define TEXT_MAX_SIZE_MM
Maximum text size in mm (~10 inches)
Definition eda_text.h:57
int GetPenSizeForBold(int aTextSize)
Definition gr_text.cpp:33
int GetPenSizeForNormal(int aTextSize)
Definition gr_text.cpp:57
@ UNDEFINED_LAYER
Definition layer_ids.h:57
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition lset.cpp:750
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:256
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:71
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
Definition typeinfo.h:81
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
Definition typeinfo.h:86
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
Definition typeinfo.h:85
@ PCB_BARCODE_T
class PCB_BARCODE, a barcode (graphic item)
Definition typeinfo.h:94
@ PCB_TABLECELL_T
class PCB_TABLECELL, PCB_TEXTBOX for use in tables
Definition typeinfo.h:88
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
Definition typeinfo.h:79
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
Definition typeinfo.h:93
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs
Definition typeinfo.h:87
#define INDETERMINATE_ACTION
Definition ui_common.h:47
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683