127 m_lineWidth( parent, m_lineWidthLabel, m_LineWidthCtrl, m_lineWidthUnits ),
128 m_textWidth( parent, m_SizeXlabel, m_SizeXCtrl, m_SizeXunit ),
129 m_textHeight( parent, m_SizeYlabel, m_SizeYCtrl, m_SizeYunit ),
130 m_thickness( parent, m_ThicknessLabel, m_ThicknessCtrl, m_ThicknessUnit )
160 m_grid->SetCellHighlightPenWidth( 0 );
235 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
236 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
238 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
241 wxCommandEvent
dummy;
244#define SET_INT_VALUE( aRow, aCol, aValue ) \
245 m_grid->SetCellValue( aRow, aCol, m_parent->StringFromValue( aValue, true ) )
247#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
248 attr = new wxGridCellAttr; \
249 attr->SetRenderer( new wxGridCellBoolRenderer() ); \
250 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
251 attr->SetReadOnly(); \
252 m_grid->SetAttr( aRow, aCol, attr ); \
253 m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxT( "" ) )
256 wxGridCellAttr* attr;
372 if(
m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
375 if(
m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
383 else if((
m_italic->Get3StateValue() != wxCHK_UNDETERMINED
384 ||
m_bold->Get3StateValue() != wxCHK_UNDETERMINED ) )
386 wxString fontName =
text->GetFontName();
388 if( !
text->GetFontName().IsEmpty() )
391 text->IsItalic() ) );
397 if(
m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
470 while( candidate && !candidate->
IsSelected() )
532 for(
BOARD_ITEM* boardItem : fp->GraphicalItems() )
534 KICAD_T itemType = boardItem->Type();
559 KICAD_T itemType = boardItem->Type();
579 commit.Push( wxT(
"Edit text and graphics properties" ) );
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_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
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) 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.
#define TEXT_MIN_SIZE_MILS
Minimum text size in mils.
#define TEXT_MAX_SIZE_MILS
Maximum text size in mils (10 inches)
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)
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
#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
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 MilsToIU(int mils) 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_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
#define INDETERMINATE_ACTION