151 m_grid->SetCellHighlightPenWidth( 0 );
153 m_grid->SetDefaultRowSize(
m_grid->GetDefaultRowSize() - FromDIP( 2 ) );
156 { wxID_CANCEL,
_(
"Close" ) } } );
174 PCB_SELECTION_TOOL* selTool =
m_parent->GetToolManager()->GetTool<PCB_SELECTION_TOOL>();
192 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
193 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
195 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
198 wxCommandEvent
dummy;
201#define SET_INT_VALUE( aRow, aCol, aValue ) \
202 m_grid->SetCellValue( aRow, aCol, m_parent->StringFromValue( aValue, true ) )
204#define SET_BOOL_VALUE( aRow, aCol, aValue ) \
205 attr = new wxGridCellAttr; \
206 attr->SetRenderer( new wxGridCellBoolRenderer() ); \
207 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
208 attr->SetReadOnly(); \
209 m_grid->SetAttr( aRow, aCol, attr ); \
210 m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxT( "" ) )
212 const BOARD_DESIGN_SETTINGS& bds =
m_parent->GetBoard()->GetDesignSettings();
213 wxGridCellAttr* attr;
333 if(
m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
336 if(
m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
344 else if((
m_italic->Get3StateValue() != wxCHK_UNDETERMINED
345 ||
m_bold->Get3StateValue() != wxCHK_UNDETERMINED ) )
347 if( !
text->GetFontName().IsEmpty() )
351 m_parent->GetBoard()->GetEmbeddedFiles()->GetFontFiles() ) );
361 text->SetTextPos(
text->GetParent()->GetCenter() );
367 if(
m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
436 while( candidate && !candidate->
IsSelected() )
497 for( PCB_FIELD* field : fp->GetFields() )
499 if( field->IsReference() )
502 if( field->IsValue() )
507 else if(
m_references->GetValue() && field->GetText() == wxT(
"${REFERENCE}" ) )
509 else if(
m_values->GetValue() && field->GetText() == wxT(
"${VALUE}" ) )
514 for( BOARD_ITEM* boardItem : fp->GraphicalItems() )
516 KICAD_T itemType = boardItem->Type();
520 EDA_TEXT* textItem =
dynamic_cast<EDA_TEXT*
>( boardItem );
526 else if(
m_values->GetValue() && textItem->
GetText() == wxT(
"${VALUE}" ) )
545 for( BOARD_ITEM* boardItem :
m_parent->GetBoard()->Drawings() )
547 KICAD_T itemType = boardItem->Type();
567 commit.Push(
_(
"Edit Text and Graphics" ) );
constexpr EDA_IU_SCALE pcbIUScale
Container for design settings for a BOARD object.
bool m_TextUpright[LAYER_CLASS_COUNT]
int m_TextThickness[LAYER_CLASS_COUNT]
int m_LineThickness[LAYER_CLASS_COUNT]
VECTOR2I m_TextSize[LAYER_CLASS_COUNT]
bool m_TextItalic[LAYER_CLASS_COUNT]
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
DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Edit Text and Graphic Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStaticText * m_SizeXunit
wxStaticText * m_ThicknessLabel
wxStaticText * m_ThicknessUnit
wxCheckBox * m_footprintTexts
wxCheckBox * m_otherFootprintFields
PCB_LAYER_BOX_SELECTOR * m_layerFilter
wxCheckBox * m_footprintFilterOpt
wxCheckBox * m_footprintGraphics
wxCheckBox * m_referenceFilterOpt
wxStaticText * m_lineWidthLabel
wxTextCtrl * m_referenceFilter
wxStaticText * m_lineWidthUnits
wxCheckBox * m_centerOnFP
wxTextCtrl * m_LineWidthCtrl
wxStaticText * m_SizeYunit
wxCheckBox * m_selectedItemsFilter
wxCheckBox * m_keepUpright
wxRadioButton * m_setToSpecifiedValues
wxCheckBox * m_boardGraphics
wxTextCtrl * m_footprintFilter
wxStaticText * m_SizeXlabel
wxCheckBox * m_boardDimensions
wxRadioButton * m_setToLayerDefaults
wxTextCtrl * m_ThicknessCtrl
wxCheckBox * m_references
wxStaticText * m_SizeYlabel
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)
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 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
virtual const wxString & GetText() const
Return the string associated with the text object.
virtual void SetVisible(bool aVisible)
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false, const std::vector< wxString > *aEmbeddedFiles=nullptr, bool aForDrawingSheet=false)
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.
STROKE_PARAMS GetStroke() const override
void SetStroke(const STROKE_PARAMS &aStroke) override
Simple container to manage line stroke parameters.
void SetWidth(int aWidth)
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.
#define TEXT_MIN_SIZE_MM
Minimum text size (1 micron).
#define TEXT_MAX_SIZE_MM
Maximum text size in mm (~10 inches)
static wxString g_referenceFilter
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.
#define SET_INT_VALUE(aRow, aCol, aValue)
static wxString g_footprintFilter
#define SET_BOOL_VALUE(aRow, aCol, aValue)
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 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
VECTOR2< int32_t > VECTOR2I