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 )
164 m_grid->SetCellHighlightPenWidth( 0 );
166 m_grid->SetDefaultRowSize(
m_grid->GetDefaultRowSize() - FromDIP( 2 ) );
174 { wxID_CANCEL,
_(
"Close" ) } } );
251 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
252 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
254 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
257 wxCommandEvent
dummy;
260#define SET_INT_VALUE( aRow, aCol, aValue ) \
261 m_grid->SetCellValue( aRow, aCol, m_parent->StringFromValue( aValue, true ) )
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( "" ) )
272 wxGridCellAttr* attr;
392 if(
m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
395 if(
m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
403 else if((
m_italic->Get3StateValue() != wxCHK_UNDETERMINED
404 ||
m_bold->Get3StateValue() != wxCHK_UNDETERMINED ) )
406 wxString fontName =
text->GetFontName();
408 if( !
text->GetFontName().IsEmpty() )
412 m_parent->GetBoard()->GetEmbeddedFiles()->GetFontFiles() ) );
422 text->SetTextPos(
text->GetParent()->GetCenter() );
428 if(
m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
497 while( candidate && !candidate->
IsSelected() )
558 for(
PCB_FIELD* field : fp->GetFields() )
560 if( field->IsReference() )
563 if( field->IsValue() )
568 else if(
m_references->GetValue() && field->GetText() == wxT(
"${REFERENCE}" ) )
570 else if(
m_values->GetValue() && field->GetText() == wxT(
"${VALUE}" ) )
575 for(
BOARD_ITEM* boardItem : fp->GraphicalItems() )
577 KICAD_T itemType = boardItem->Type();
587 else if(
m_values->GetValue() && textItem->
GetText() == wxT(
"${VALUE}" ) )
608 KICAD_T itemType = boardItem->Type();
628 commit.Push(
_(
"Edit Text and Graphics" ) );
constexpr EDA_IU_SCALE pcbIUScale
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
bool m_DimensionSuppressZeroes
int m_TextThickness[LAYER_CLASS_COUNT]
int m_LineThickness[LAYER_CLASS_COUNT]
bool m_DimensionKeepTextAligned
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...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
FOOTPRINT * GetParentFootprint() const
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
Class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE.
PCB_LAYER_BOX_SELECTOR * m_LayerCtrl
wxStaticText * m_fontLabel
wxCheckBox * m_footprintDimensions
wxStaticText * m_LayerLabel
wxCheckBox * m_layerFilterOpt
wxCheckBox * m_footprintTexts
wxCheckBox * m_otherFootprintFields
PCB_LAYER_BOX_SELECTOR * m_layerFilter
wxCheckBox * m_footprintFilterOpt
wxCheckBox * m_footprintGraphics
wxCheckBox * m_referenceFilterOpt
wxTextCtrl * m_referenceFilter
wxCheckBox * m_centerOnFP
wxCheckBox * m_selectedItemsFilter
wxCheckBox * m_keepUpright
wxRadioButton * m_setToSpecifiedValues
wxCheckBox * m_boardGraphics
wxTextCtrl * m_footprintFilter
wxCheckBox * m_boardDimensions
wxRadioButton * m_setToLayerDefaults
wxCheckBox * m_references
PCB_BASE_EDIT_FRAME * m_parent
void onActionButtonChange(wxCommandEvent &event) override
void OnFootprintFilterText(wxCommandEvent &event) override
void OnReferenceFilterText(wxCommandEvent &event) override
void onSpecifiedValueUpdateUI(wxUpdateUIEvent &event) override
BOARD_DESIGN_SETTINGS * m_brdSettings
void processItem(SCH_COMMIT *aCommit, const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
bool TransferDataFromWindow() override
bool TransferDataToWindow() override
void onDimensionItemCheckbox(wxCommandEvent &aEvent) override
DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(SCH_EDIT_FRAME *parent)
SCH_EDIT_FRAME * m_parent
void OnLayerFilterSelect(wxCommandEvent &event) override
SCH_SELECTION m_selection
~DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS() override
void visitItem(SCH_COMMIT *aCommit, const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
PCB_SELECTION m_selection
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...
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.
virtual EDA_GROUP * GetParentGroup() const
KICAD_T Type() const
Returns the type of object.
EDA_ITEM * GetParent() const
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
virtual const wxString & GetText() const
Return the string associated with the text object.
virtual void SetVisible(bool aVisible)
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)
int GetLayerSelection() const
int SetLayerSelection(int layer)
bool SetLayersHotkeys(bool value)
Common, abstract interface for edit frames.
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)
STROKE_PARAMS GetStroke() const override
void SetStroke(const STROKE_PARAMS &aStroke) override
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.
void SetWidth(int aWidth)
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 TEXT_MIN_SIZE_MM
Minimum text size (1 micron).
#define TEXT_MAX_SIZE_MM
Maximum text size in mm (~10 inches)
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
Class to handle a set of BOARD_ITEMs.
static bool g_modifyValues
static bool g_modifyFootprintGraphics
static bool g_filterByFootprint
static bool g_filterByReference
static bool g_modifyBoardGraphics
static bool g_filterSelected
static bool g_modifyFootprintTexts
static bool g_setToSpecifiedValues
#define SET_INT_VALUE(aRow, aCol, aValue)
static bool g_modifyOtherFootprintFields
static bool g_modifyReferences
static wxString g_footprintFilter
#define SET_BOOL_VALUE(aRow, aCol, aValue)
static bool g_modifyFootprintDimensions
static bool g_filterByLayer
static bool g_modifyBoardText
static wxString g_referenceFilter
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
constexpr KICAD_T BaseType(const KICAD_T aType)
Return the underlying type of the given type.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
#define INDETERMINATE_ACTION