50#include <dialogs/dialog_table_properties.h>
52using namespace std::placeholders;
84 footprint->
SetValue( wxT(
"Val**" ) );
96 if( is_last_fp_from_brd )
139 wxASSERT( aFootprint );
155 wxCHECK( aFootprint, );
159 if( aTreeItem.IsOk() )
176 wxDataViewItem treeItem =
m_adapter->FindItem( oldFPID );
186 switch( aItem->
Type() )
238 ZONE* zone =
static_cast<ZONE*
>( aItem );
239 bool success =
false;
242 zoneSettings << *static_cast<ZONE*>( aItem );
261 commit.
Push(
_(
"Edit Zone" ) );
277 wxFAIL_MSG( wxT(
"FOOTPRINT_EDIT_FRAME::OnEditItemRequest: unsupported item type " )
311 if(
GetBoard()->GetFirstFootprint() )
324 const std::string& payload = mail.
GetPayload();
329 if( !payload.empty() )
331 wxFileName fpFileName( payload );
332 wxString libNickname;
340 msg.Printf(
_(
"The current configuration does not include the footprint library '%s'." ),
341 fpFileName.GetPath() );
342 msg += wxS(
"\n" ) +
_(
"Use Manage Footprint Libraries to edit the configuration." );
350 if( !libTable->
HasLibrary( libNickname,
true ) )
352 msg.Printf(
_(
"The footprint library '%s' is not enabled in the current configuration." ),
354 msg += wxS(
"\n" ) +
_(
"Use Manage Footprint Libraries to edit the configuration." );
359 LIB_ID fpId( libNickname, fpFileName.GetName() );
364 wxCommandEvent event( EVT_LIBITEM_CHOSEN );
void SetContentModified(bool aModified=true)
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
COLOR4D GetColor(int aLayer) const
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
void ReCreateMenuBar()
Recreates the menu bar.
virtual void Zoom_Automatique(bool aWarpPointer)
Redraw the screen with best zoom level and the best centering that shows all the page or the board.
KIGFX::VIEW_CONTROLS * GetViewControls() const
Return a pointer to the #VIEW_CONTROLS instance used in the panel.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
KICAD_T Type() const
Returns the type of object.
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
virtual wxString GetClass() const =0
Return the class name.
virtual const wxString & GetText() const
Return the string associated with the text object.
A color representation with 4 components: red, green, blue, alpha.
virtual void SetCrossHairCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true)=0
Move the graphic crosshair cursor to the requested position expressed in world coordinates.
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
std::string & GetPayload()
Return the payload, which can be any text but it typically self identifying s-expression.
MAIL_T Command()
Returns the MAIL_T associated with this mail.
int GetLayerSelection() const
A logical library item identifier and consists of various portions much like a URI.
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Hold a record identifying a library accessed by the appropriate plug in object in the LIB_TABLE.
const wxString & GetNickName() const
bool HasLibrary(const wxString &aNickname, bool aCheckEnabled=false) const
Test for the existence of aNickname in the library table.
const LIB_TABLE_ROW * FindRowByURI(const wxString &aURI)
void RefreshLibTree()
Refreshes the tree (mainly to update highlighting and asterisking)
void CenterLibId(const LIB_ID &aLibId)
Ensure that an item is visible (preferably centered).
void SelectLibId(const LIB_ID &aLibId)
Select an item in the tree widget.
void ExpandLibId(const LIB_ID &aLibId)
Expand and item i the tree widget.
static TOOL_ACTION layerChanged
static TOOL_ACTION groupProperties
void ShowTextPropertiesDialog(PCB_TEXT *aText)
int ShowTextBoxPropertiesDialog(PCB_TEXTBOX *aTextBox)
APPEARANCE_CONTROLS * m_appearancePanel
void ShowReferenceImagePropertiesDialog(BOARD_ITEM *aBitmap)
Set the angle used for rotate operations.
void ShowGraphicItemPropertiesDialog(PCB_SHAPE *aShape)
void ShowPadPropertiesDialog(PAD *aPad)
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Display options control the way tracks, vias, outlines and other things are shown (for instance solid...
FOOTPRINT * LoadFootprint(const LIB_ID &aFootprintId)
Attempt to load aFootprintId from the footprint library table.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
virtual void SetActiveLayer(PCB_LAYER_ID aLayer)
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
virtual void SetHighContrastLayer(int aLayer) override
SetHighContrastLayer(), with some extra smarts for PCB.
A set of BOARD_ITEMs (i.e., without duplicates).
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
ZONE_SETTINGS handles zones parameters.
void ExportSetting(ZONE &aTarget, bool aFullExport=true) const
Function ExportSetting copy settings to a given zone.
Handle a list of polygons defining a copper zone.
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
bool IsOnCopperLayer() const override
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
int InvokeCopperZonesEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeCopperZonesEditor invokes up a modal dialog window for copper zone editing.
int InvokeNonCopperZonesEditor(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeNonCopperZonesEditor invokes up a modal dialog window for non-copper zone editing.
int InvokeRuleAreaEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aZoneSettings, BOARD *aBoard, CONVERT_SETTINGS *aConvertSettings)
Function InvokeRuleAreaEditor invokes up a modal dialog window for copper zone editing.
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Class to handle a set of BOARD_ITEMs.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_REFERENCE_IMAGE_T
class PCB_REFERENCE_IMAGE, bitmap on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_MARKER_T
class PCB_MARKER, a marker used to show something
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_DIM_ALIGNED_T
class PCB_DIM_ALIGNED, a linear dimension (graphic item)
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs
@ PCB_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
VECTOR2< double > VECTOR2D