95 void OnUpdateUI( wxUpdateUIEvent& event )
override;
119 m_lineWidth( parent, m_lineWidthLabel, m_LineWidthCtrl, m_lineWidthUnits, true ),
120 m_textWidth( parent, m_SizeXlabel, m_SizeXCtrl, m_SizeXunit, true ),
121 m_textHeight( parent, m_SizeYlabel, m_SizeYCtrl, m_SizeYunit, true ),
122 m_thickness( parent, m_ThicknessLabel, m_ThicknessCtrl, m_ThicknessUnit, true )
136 m_grid->SetCellHighlightPenWidth( 0 );
137 wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
138 infoFont.SetSymbolicSize( wxFONTSIZE_SMALL );
139 m_grid->SetDefaultCellFont( infoFont );
192 m_Italic->Set3StateValue( wxCHK_UNDETERMINED );
194 m_Visible->Set3StateValue( wxCHK_UNDETERMINED );
197 #define SET_INT_VALUE( aRow, aCol, aValue ) \ 198 m_grid->SetCellValue( aRow, aCol, StringFromValue( GetUserUnits(), aValue, true ) ) 200 #define SET_BOOL_VALUE( aRow, aCol, aValue ) \ 201 attr = new wxGridCellAttr; \ 202 attr->SetRenderer( new wxGridCellBoolRenderer() ); \ 203 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \ 204 attr->SetReadOnly(); \ 205 m_grid->SetAttr( aRow, aCol, attr ); \ 206 m_grid->SetCellValue( aRow, aCol, ( aValue ) ? "1" : "" ) 209 wxGridCellAttr* attr;
259 #undef SET_BOOL_VALUE 281 EDA_TEXT* textItem = dynamic_cast<EDA_TEXT*>( aItem );
282 FP_TEXT* fpTextItem = dynamic_cast<FP_TEXT*>( aItem );
283 PCB_SHAPE* drawItem = dynamic_cast<PCB_SHAPE*>( aItem );
284 DIMENSION_BASE* dimension = dynamic_cast<DIMENSION_BASE*>( aItem );
287 textItem = &dimension->
Text();
303 if(
m_Italic->Get3StateValue() != wxCHK_UNDETERMINED && textItem )
306 if(
m_Visible->Get3StateValue() != wxCHK_UNDETERMINED && textItem )
309 if(
m_keepUpright->Get3StateValue() != wxCHK_UNDETERMINED && fpTextItem )
401 for(
BOARD_ITEM* boardItem : fp->GraphicalItems() )
407 const wxString text = dynamic_cast<EDA_TEXT*>( boardItem )->GetText();
409 if(
m_references->GetValue() && text == wxT(
"${REFERENCE}" ) )
411 else if(
m_values->GetValue() && text == wxT(
"${VALUE}" ) )
427 KICAD_T itemType = boardItem->Type();
441 commit.Push(
"Edit text and graphics properties" );
#define SET_INT_VALUE(aRow, aCol, aValue)
static bool g_modifyBoardText
wxCheckBox * m_selectedItemsFilter
PCB_EDIT_FRAME * m_parent
COMMIT & Modify(EDA_ITEM *aItem)
Create an undo entry for an item that has been already modified.
static bool g_filterByFootprint
void OnUpdateUI(wxUpdateUIEvent &event) override
wxStaticText * m_LayerLabel
class FP_TEXT, text in a footprint
void OnFootprintFilterText(wxCommandEvent &event) override
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
void visitItem(const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
constexpr KICAD_T BaseType(const KICAD_T aType)
Returns the underlying type of the given type.
wxCheckBox * m_references
void SetItalic(bool isItalic)
void SetVisible(bool aVisible)
class PCB_TEXT, text on a layer
void OnReferenceFilterText(wxCommandEvent &event) override
class FP_SHAPE, a footprint edge
void SetTextSize(const wxSize &aNewSize)
bool IsIndeterminate() const
Return true if the control holds the indeterminate value (for instance, if it represents a multiple s...
void SetBoardFrame(PCB_BASE_FRAME *aFrame)
int GetTextThickness(PCB_LAYER_ID aLayer) const
Return the default text thickness from the layer class for the given layer.
~DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS() override
static wxString g_referenceFilter
static wxString g_footprintFilter
Class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
wxCheckBox * m_boardGraphics
static bool g_modifyFootprintGraphics
BOARD_DESIGN_SETTINGS * m_brdSettings
bool GetTextUpright(PCB_LAYER_ID aLayer) const
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
bool GetTextItalic(PCB_LAYER_ID aLayer) const
int GetLineThickness(PCB_LAYER_ID aLayer) const
Return the default graphic segment thickness from the layer class for the given layer.
wxSize m_TextSize[LAYER_CLASS_COUNT]
LAYER_NUM GetLayerSelection() const
wxButton * m_sdbSizerButtonsOK
PCB_LAYER_ID
A quick note on layer IDs:
int m_TextThickness[LAYER_CLASS_COUNT]
DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(SCH_EDIT_FRAME *parent)
PCB_LAYER_BOX_SELECTOR * m_layerFilter
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.
const wxSize & GetTextSize() const
wxCheckBox * m_otherFields
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
bool Contains(EDA_ITEM *aItem) const
wxCheckBox * m_keepUpright
bool m_TextItalic[LAYER_CLASS_COUNT]
SCH_EDIT_FRAME * m_parent
PCB_LAYER_BOX_SELECTOR * m_LayerCtrl
wxCheckBox * m_layerFilterOpt
wxCheckBox * m_footprintFilterOpt
int SetLayerSelection(LAYER_NUM layer)
bool TransferDataFromWindow() override
#define TEXTS_MAX_SIZE
Maximum text size in internal units (10 inches)
bool SetLayersHotkeys(bool value)
class DIMENSION_BASE: abstract dimension meta-type
int m_LineThickness[LAYER_CLASS_COUNT]
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
static bool g_modifyOtherFields
#define TEXTS_MIN_SIZE
Minimum text size in internal units (1 mil)
int LAYER_NUM
This can be replaced with int and removed.
void SetUndefinedLayerName(const wxString &aName)
wxCheckBox * m_footprintGraphics
static bool g_modifyBoardGraphics
void OnLayerFilterSelect(wxCommandEvent &event) override
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
void SetKeepUpright(bool aKeepUpright)
wxTextCtrl * m_footprintFilter
bool TransferDataToWindow() override
static bool g_modifyReferences
static LAYER_NUM g_layerFilter
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(int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
wxCheckBox * m_referenceFilterOpt
#define SET_BOOL_VALUE(aRow, aCol, aValue)
The main frame for Pcbnew.
void SetWidth(int aWidth)
wxTextCtrl * m_referenceFilter
void processItem(const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
virtual long long int GetValue()
Return the current value in Internal Units.
static bool g_filterByLayer
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
void SetLineThickness(int aWidth)
static bool g_filterSelected
wxRadioButton * m_setToSpecifiedValues
static bool g_filterByReference
#define INDETERMINATE_ACTION
BOARD_ITEM_CONTAINER * GetParent() const
class PCB_SHAPE, a segment not on copper layers
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
PCB_LAYER_ID ToLAYER_ID(int aLayer)
wxSize GetTextSize(PCB_LAYER_ID aLayer) const
Return the default text size from the layer class for the given layer.
bool m_TextUpright[LAYER_CLASS_COUNT]
void Enable(bool aEnable)
Enable/disable the label, widget and units label.
PCB_SELECTION m_selection
static bool g_modifyValues
Container for design settings for a BOARD object.