129 m_lineWidth( parent, m_lineWidthLabel, m_LineWidthCtrl, m_lineWidthUnits ),
130 m_textWidth( parent, m_SizeXlabel, m_SizeXCtrl, m_SizeXunit ),
131 m_textHeight( parent, m_SizeYlabel, m_SizeYCtrl, m_SizeYunit ),
132 m_thickness( parent, m_ThicknessLabel, m_ThicknessCtrl, m_ThicknessUnit )
162 m_grid->SetCellHighlightPenWidth( 0 );
237 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
238 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
240 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
243#define SET_INT_VALUE( aRow, aCol, aValue ) \
244 m_grid->SetCellValue( aRow, aCol, m_parent->StringFromValue( aValue, true ) )
246#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
247 attr = new wxGridCellAttr; \
248 attr->SetRenderer( new wxGridCellBoolRenderer() ); \
249 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
250 attr->SetReadOnly(); \
251 m_grid->SetAttr( aRow, aCol, attr ); \
252 m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxT( "" ) )
255 wxGridCellAttr* attr;
362 if(
m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
365 if(
m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
374 else if((
m_italic->Get3StateValue() != wxCHK_UNDETERMINED
375 ||
m_bold->Get3StateValue() != wxCHK_UNDETERMINED ) )
387 if(
m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
462 while( candidate && !candidate->
IsSelected() )
525 for(
BOARD_ITEM* boardItem : fp->GraphicalItems() )
527 KICAD_T itemType = boardItem->Type();
552 KICAD_T itemType = boardItem->Type();
572 commit.Push( wxT(
"Edit text and graphics properties" ) );
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.
BOARD_ITEM_CONTAINER * GetParent() const
COMMIT & Modify(EDA_ITEM *aItem)
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
wxCheckBox * m_footprintDimensions
wxCheckBox * m_layerFilterOpt
PCB_LAYER_BOX_SELECTOR * m_layerFilter
wxCheckBox * m_footprintFilterOpt
wxCheckBox * m_footprintGraphics
wxCheckBox * m_referenceFilterOpt
wxCheckBox * m_otherFields
wxTextCtrl * m_referenceFilter
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
void visitItem(const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
BOARD_DESIGN_SETTINGS * m_brdSettings
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
void processItem(const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
~DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS() override
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
Update the board display after modifying it by a python script (note: it is automatically called by a...
KICAD_T Type() const
Returns the type of object.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
wxString GetFontName() const
virtual void SetVisible(bool aVisible)
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
void SetKeepUpright(bool aKeepUpright)
void SetTextSize(const VECTOR2I &aNewSize)
void SetItalic(bool aItalic)
void SetFont(KIFONT::FONT *aFont)
VECTOR2I GetTextSize() const
KIFONT::FONT * GetFontSelection(bool aBold, bool aItalic) const
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=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.
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)
wxFont GetInfoFont(wxWindow *aWindow)
static bool g_modifyValues
static bool g_modifyFootprintGraphics
static bool g_filterByFootprint
static bool g_filterByReference
static bool g_modifyBoardGraphics
static bool g_filterSelected
#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_filterByLayer
static bool g_modifyOtherFields
static bool g_modifyBoardText
static wxString g_referenceFilter
#define TEXTS_MAX_SIZE
Maximum text size in internal units (10 inches)
#define TEXTS_MIN_SIZE
Minimum text size in internal units (1 mil)
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.
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_FP_SHAPE_T
class FP_SHAPE, a footprint edge
@ PCB_FP_TEXTBOX_T
class FP_TEXTBOX, wrapped text in a footprint
@ 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_FP_TEXT_T
class FP_TEXT, text in a footprint
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
#define INDETERMINATE_ACTION