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 )
163 m_grid->SetCellHighlightPenWidth( 0 );
172 { wxID_CANCEL,
_(
"Close" ) } } );
249 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
250 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
252 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
255 wxCommandEvent
dummy;
258#define SET_INT_VALUE( aRow, aCol, aValue ) \
259 m_grid->SetCellValue( aRow, aCol, m_parent->StringFromValue( aValue, true ) )
261#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
262 attr = new wxGridCellAttr; \
263 attr->SetRenderer( new wxGridCellBoolRenderer() ); \
264 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
265 attr->SetReadOnly(); \
266 m_grid->SetAttr( aRow, aCol, attr ); \
267 m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxT( "" ) )
270 wxGridCellAttr* attr;
389 if(
m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
392 if(
m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
400 else if((
m_italic->Get3StateValue() != wxCHK_UNDETERMINED
401 ||
m_bold->Get3StateValue() != wxCHK_UNDETERMINED ) )
403 wxString fontName =
text->GetFontName();
405 if( !
text->GetFontName().IsEmpty() )
409 m_parent->GetBoard()->GetEmbeddedFiles()->GetFontFiles() ) );
415 if(
m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
422 text->SetTextPos(
text->GetParent()->GetCenter() );
491 while( candidate && !candidate->
IsSelected() )
554 for(
PCB_FIELD* field : fp->GetFields() )
556 if( field->IsReference() )
559 if( field->IsValue() )
567 for(
BOARD_ITEM* boardItem : fp->GraphicalItems() )
569 KICAD_T itemType = boardItem->Type();
594 KICAD_T itemType = boardItem->Type();
614 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.
PCB_GROUP * GetParentGroup() const
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
FOOTPRINT * GetParentFootprint() const
BOARD_ITEM_CONTAINER * GetParent() const
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
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_otherFootprintTexts
wxCheckBox * m_layerFilterOpt
PCB_LAYER_BOX_SELECTOR * m_layerFilter
wxCheckBox * m_footprintFilterOpt
wxCheckBox * m_footprintGraphics
wxCheckBox * m_referenceFilterOpt
wxCheckBox * m_footprintFields
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
~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
KICAD_T Type() const
Returns the type of object.
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_modifyOtherFootprintTexts
static bool g_setToSpecifiedValues
#define SET_INT_VALUE(aRow, aCol, aValue)
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 bool g_modifyFootprintFields
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