KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint_editor_utils.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#include <board_commit.h>
21#include <confirm.h>
24#include <footprint_info.h>
25#include <footprint_tree_pane.h>
27#include <functional>
28#include <kiway_mail.h>
29#include <pcb_group.h>
30#include <pcb_marker.h>
31#include <pcb_textbox.h>
32#include <pcb_barcode.h>
33#include <pcb_table.h>
34#include <pcb_shape.h>
35#include <pad.h>
36#include <zone.h>
38#include <tool/tool_manager.h>
39#include <tools/pcb_actions.h>
43#include <widgets/lib_tree.h>
45#include <pcb_dimension.h>
46#include <project_pcb.h>
47#include <view/view_controls.h>
50
51using namespace std::placeholders;
52
53
55{
56 bool is_last_fp_from_brd = IsCurrentFPFromBoard();
57
58 if( aFPID.IsValid() )
59 {
60 const wxString key = aFPID.GetLibNickname().wx_str() + wxT( ':' ) + aFPID.GetLibItemName().wx_str();
61
62 // Reactivate rather than reload, which would discard in-tab edits.
63 if( int existing = m_tabsPanel->FindTab( key ); existing >= 0 )
64 {
65 m_tabsPanel->SelectTab( existing );
66
67 m_treePane->GetLibTree()->ExpandLibId( aFPID );
68
69 m_centerItemOnIdle = aFPID;
70 Bind( wxEVT_IDLE, &FOOTPRINT_EDIT_FRAME::centerItemIdleHandler, this );
71
72 m_treePane->GetLibTree()->RefreshLibTree(); // update highlighting
73
74 return;
75 }
76 }
77
78 FOOTPRINT* footprint = LoadFootprint( aFPID );
79
80 if( !footprint )
81 return;
82
83 // A board-sourced or new footprint occupies the frame-owned board with no backing tab.
84 // Switching to the library footprint's tab frees that board, so prompt to save those edits
85 // first, the same way the legacy single-board path did. A tab-owned board survives the
86 // switch untouched and needs no prompt.
88 {
89 if( !::HandleUnsavedChanges( this, _( "The current footprint has been modified. Save changes?" ),
90 [&]() -> bool
91 {
92 return SaveFootprint( GetBoard()->Footprints().front() );
93 } ) )
94 {
95 // AddFootprintToBoard would have taken ownership; on cancel we still own the clone.
96 delete footprint;
97 return;
98 }
99 }
100
102 AddFootprintToBoard( footprint );
103
104 footprint->ClearFlags();
105
106 // if either reference or value are missing, reinstall them -
107 // otherwise you cannot see what you are doing on board
108 if( footprint->Reference().GetText().IsEmpty() )
109 footprint->SetReference( wxT( "Ref**" ) );
110
111 if( footprint->Value().GetText().IsEmpty() )
112 footprint->SetValue( wxT( "Val**" ) );
113
114 Zoom_Automatique( false );
115
116 Update3DView( true, true );
117
118 GetScreen()->SetContentModified( false );
119
120 UpdateView();
121 GetCanvas()->Refresh();
122
123 // Update the save items if needed.
124 if( is_last_fp_from_brd )
125 {
128 }
129
130 m_treePane->GetLibTree()->ExpandLibId( aFPID );
131
132 m_centerItemOnIdle = aFPID;
133 Bind( wxEVT_IDLE, &FOOTPRINT_EDIT_FRAME::centerItemIdleHandler, this );
134
135 m_treePane->GetLibTree()->RefreshLibTree(); // update highlighting
136}
137
138
139bool FOOTPRINT_EDIT_FRAME::BeginNewFootprint( const wxString& aLibrary )
140{
141 // No tab strip or target library to key a tab on, so use the legacy single-board clear.
142 if( aLibrary.IsEmpty() )
143 {
144 if( !HandleUnsavedChanges( false ) )
145 return false;
146
147 Clear_Pcb();
148 return true;
149 }
150
151 // The new footprint opens in its own tab. Only a dirty tab-less frame board needs saving.
153 {
154 if( !::HandleUnsavedChanges( this, _( "The current footprint has been modified. Save changes?" ),
155 [&]() -> bool
156 {
157 return SaveFootprint( GetBoard()->Footprints().front() );
158 } ) )
159 {
160 return false;
161 }
162 }
163
164 return true;
165}
166
167
169{
170 m_treePane->GetLibTree()->CenterLibId( m_centerItemOnIdle );
171 Unbind( wxEVT_IDLE, &FOOTPRINT_EDIT_FRAME::centerItemIdleHandler, this );
172}
173
174
175void FOOTPRINT_EDIT_FRAME::OnTabCharHook( wxKeyEvent& aEvent )
176{
177 const bool isTab = aEvent.GetKeyCode() == WXK_TAB;
178 const bool ctrlOnly = aEvent.ControlDown() && !aEvent.AltDown() && !aEvent.MetaDown();
179
180 // Ctrl+W arrives as 'W' or the control char depending on platform, so accept both.
181 const int keyCode = aEvent.GetKeyCode();
182 const bool isCtrlW = ctrlOnly && !aEvent.ShiftDown()
183 && ( keyCode == 'W' || keyCode == ( 'W' - '@' ) );
184
185 if( isCtrlW && m_tabsPanel && m_tabsPanel->Model().Entries().size() >= 1 )
186 {
188 return;
189 }
190
191 if( !isTab || !ctrlOnly || !m_tabsPanel )
192 {
193 aEvent.Skip();
194 return;
195 }
196
197 // The appearance panel owns Ctrl+Tab for its layer-preset cycle while focused, so defer to it.
198 if( APPEARANCE_CONTROLS* appearance = GetAppearancePanel() )
199 {
200 for( wxWindow* focus = wxWindow::FindFocus(); focus; focus = focus->GetParent() )
201 {
202 if( focus == appearance )
203 {
204 aEvent.Skip();
205 return;
206 }
207 }
208 }
209
210 AdvanceFootprintTab( !aEvent.ShiftDown() );
211
212 // Do not Skip, so the GTK default Tab focus-traversal does not also run.
213}
214
215
217{
218public:
220 {
221 wxASSERT( aFootprint );
222
223 m_nickname = aFootprint->GetFPID().GetLibNickname().wx_str();
224 m_fpname = aFootprint->GetFPID().GetLibItemName().wx_str();
225 m_keywords = aFootprint->GetKeywords();
226 m_doc = aFootprint->GetLibDescription();
227 m_loaded = true;
228 }
229};
230
231
232void FOOTPRINT_EDIT_FRAME::UpdateLibraryTree( const wxDataViewItem& aTreeItem, FOOTPRINT* aFootprint )
233{
234 wxCHECK( aFootprint, /* void */ );
235
236 BASIC_FOOTPRINT_INFO footprintInfo( aFootprint );
237
238 if( aTreeItem.IsOk() ) // Can be not found in tree if the current footprint is imported
239 // from file therefore not yet in tree.
240 {
241 static_cast<LIB_TREE_NODE_ITEM*>( aTreeItem.GetID() )->Update( &footprintInfo );
242 m_treePane->GetLibTree()->RefreshLibTree();
243 }
244}
245
246
248{
249 LIB_ID oldFPID = aFootprint->GetFPID();
250
251 DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR dialog( this, aFootprint );
252 dialog.ShowQuasiModal();
253
254 // Update design settings for footprint layers
256
257 // Update library tree and title in case of a name change
258 wxDataViewItem treeItem = m_adapter->FindItem( oldFPID );
259 UpdateLibraryTree( treeItem, aFootprint );
260
261 RenameFootprintTab( oldFPID, aFootprint->GetFPID() );
262
265}
266
267
269{
270 switch( aItem->Type() )
271 {
274 break;
275
276 case PCB_BARCODE_T:
277 ShowBarcodePropertiesDialog( static_cast<PCB_BARCODE*>( aItem ) );
278 break;
279
280 case PCB_PAD_T:
281 ShowPadPropertiesDialog( static_cast<PAD*>( aItem ) );
282 break;
283
284 case PCB_FOOTPRINT_T:
285 editFootprintProperties( static_cast<FOOTPRINT*>( aItem ) );
286 GetCanvas()->Refresh();
287 break;
288
289 case PCB_FIELD_T:
290 case PCB_TEXT_T:
291 ShowTextPropertiesDialog( static_cast<PCB_TEXT*>( aItem ) );
292 break;
293
294 case PCB_TEXTBOX_T:
295 ShowTextBoxPropertiesDialog( static_cast<PCB_TEXTBOX*>( aItem ) );
296 break;
297
298 case PCB_TABLE_T:
300 {
301 DIALOG_TABLE_PROPERTIES dlg( this, static_cast<PCB_TABLE*>( aItem ) );
302
303 //QuasiModal required for Scintilla auto-complete
304 dlg.ShowQuasiModal();
305 break;
306 }
307
308 case PCB_SHAPE_T :
309 ShowGraphicItemPropertiesDialog( static_cast<PCB_SHAPE*>( aItem ) );
310 break;
311
313 case PCB_DIM_CENTER_T:
314 case PCB_DIM_RADIAL_T:
316 case PCB_DIM_LEADER_T:
317 {
318 DIALOG_DIMENSION_PROPERTIES dlg( this, static_cast<PCB_DIMENSION_BASE*>( aItem ) );
319
320 dlg.ShowModal();
321 break;
322 }
323
324 case PCB_ZONE_T:
325 {
326 ZONE* zone = static_cast<ZONE*>( aItem );
327 bool success = false;
328 ZONE_SETTINGS zoneSettings;
329
330 zoneSettings << *static_cast<ZONE*>( aItem );
331
332 if( zone->GetIsRuleArea() )
333 success = InvokeRuleAreaEditor( this, &zoneSettings ) == wxID_OK;
334 else if( zone->IsOnCopperLayer() )
335 success = InvokeCopperZonesEditor( this, zone, &zoneSettings ) == wxID_OK;
336 else
337 success = InvokeNonCopperZonesEditor( this, &zoneSettings ) == wxID_OK;
338
339 if( success )
340 {
341 BOARD_COMMIT commit( this );
342 commit.Modify( zone );
343 commit.Push( _( "Edit Zone" ) );
344 zoneSettings.ExportSetting( *static_cast<ZONE*>( aItem ) );
345 }
346
347 break;
348 }
349
350 case PCB_GROUP_T:
352 static_cast<EDA_GROUP*>( static_cast<PCB_GROUP*>( aItem ) ) );
353 break;
354
355 case PCB_MARKER_T:
356 m_toolManager->GetTool<FOOTPRINT_EDITOR_CONTROL>()->CrossProbe( static_cast<PCB_MARKER*>( aItem ) );
357 break;
358
359 case PCB_POINT_T:
360 break;
361
362 default:
363 wxFAIL_MSG( wxT( "FOOTPRINT_EDIT_FRAME::OnEditItemRequest: unsupported item type " )
364 + aItem->GetClass() );
365 break;
366 }
367}
368
369
374
375
377{
378 const PCB_LAYER_ID oldLayer = GetActiveLayer();
379
380 if( oldLayer == aLayer )
381 return;
382
384
385 /*
386 * Follow the PCB editor logic for showing/hiding clearance layers: show only for
387 * the active copper layer or a front/back non-copper layer.
388 */
389 const auto getClearanceLayerForActive = []( PCB_LAYER_ID aActiveLayer ) -> std::optional<int>
390 {
391 if( IsCopperLayer( aActiveLayer ) )
392 return CLEARANCE_LAYER_FOR( aActiveLayer );
393
394 return std::nullopt;
395 };
396
397 if( std::optional<int> oldClearanceLayer = getClearanceLayerForActive( oldLayer ) )
398 GetCanvas()->GetView()->SetLayerVisible( *oldClearanceLayer, false );
399
400 if( std::optional<int> newClearanceLayer = getClearanceLayerForActive( aLayer ) )
401 GetCanvas()->GetView()->SetLayerVisible( *newClearanceLayer, true );
402
403 m_appearancePanel->OnLayerChanged();
404
405 m_toolManager->RunAction( PCB_ACTIONS::layerChanged ); // notify other tools
406 GetCanvas()->SetFocus(); // allow capture of hotkeys
407 GetCanvas()->SetHighContrastLayer( aLayer );
408 GetCanvas()->Refresh();
409}
410
411
412bool FOOTPRINT_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl )
413{
415
416 if( !ImportFootprint( aFileSet[ 0 ] ) )
417 return false;
418
419 if( GetBoard()->GetFirstFootprint() )
421
422 Zoom_Automatique( false );
423 GetCanvas()->Refresh();
424
425 return true;
426}
427
428
430{
431 const std::string& payload = mail.GetPayload();
432
433 switch( mail.Command() )
434 {
435 case MAIL_FP_EDIT:
436 if( !payload.empty() )
437 {
438 wxFileName fpFileName( payload );
439 wxString libNickname;
440 wxString msg;
441
443 std::optional<LIBRARY_TABLE_ROW*> optRow = adapter->FindRowByURI( fpFileName.GetPath() );
444
445 if( !optRow )
446 {
447 msg.Printf( _( "The current configuration does not include the footprint library '%s'." ),
448 fpFileName.GetPath() );
449 msg += wxS( "\n" ) + _( "Use Manage Footprint Libraries to edit the configuration." );
450 DisplayErrorMessage( this, _( "Library not found in footprint library table." ),
451 msg );
452 break;
453 }
454
455 libNickname = ( *optRow )->Nickname();
456
457 if( !adapter->HasLibrary( libNickname, true ) )
458 {
459 msg.Printf( _( "The footprint library '%s' is not enabled in the current configuration." ),
460 libNickname );
461 msg += wxS( "\n" ) + _( "Use Manage Footprint Libraries to edit the configuration." );
462 DisplayErrorMessage( this, _( "Footprint library not enabled." ), msg );
463 break;
464 }
465
466 LIB_ID fpId( libNickname, fpFileName.GetName() );
467
468 if( m_treePane )
469 {
470 m_treePane->GetLibTree()->SelectLibId( fpId );
471 wxCommandEvent event( EVT_LIBITEM_CHOSEN );
472 wxPostEvent( m_treePane, event );
473 }
474 }
475
476 break;
477
478 case MAIL_RELOAD_LIB:
479 SyncLibraryTree( true );
481 break;
482
483 default:
484 break;
485 }
486}
static TOOL_ACTION groupProperties
Definition actions.h:243
void SetContentModified(bool aModified=true)
Definition base_screen.h:55
BASIC_FOOTPRINT_INFO(FOOTPRINT *aFootprint)
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:84
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
Definition board.h:704
COLOR4D GetColor(int aLayer) const
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
Definition commit.h:102
int ShowModal() override
void ReCreateMenuBar()
Recreate the menu bar.
virtual void ReCreateHToolbar()
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
void SetFocus() override
A set of EDA_ITEMs (i.e., without duplicates).
Definition eda_group.h:43
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:110
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition eda_item.h:160
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition eda_text.h:118
Module editor specific tools.
void editFootprintProperties(FOOTPRINT *aFootprint)
Run the Footprint Properties dialog and handle changes made in it.
void Clear_Pcb()
Delete all and reinitialize the current board.
Definition initpcb.cpp:107
void UpdateLibraryTree(const wxDataViewItem &treeItem, FOOTPRINT *aFootprint)
Update a single node in the library tree.
void SyncLibraryTree(bool aProgress)
Synchronize the footprint library tree to the current state of the footprint library table.
void UpdateMsgPanel() override
Redraw the message panel.
EDITOR_TABS_PANEL * m_tabsPanel
bool SaveFootprint(FOOTPRINT *aFootprint)
Save in an existing library a given footprint.
void OnTabCharHook(wxKeyEvent &aEvent)
Cycle footprint tabs from the CHAR_HOOK stream, since GTK cannot register WXK_TAB as a menu accelerat...
void LoadFootprintFromLibrary(LIB_ID aFPID)
bool BeginNewFootprint(const wxString &aLibrary)
Prepare the editor for a new footprint, returning false if the user cancels.
FOOTPRINT * ImportFootprint(const wxString &aName=wxT(""))
Read a file containing only one footprint.
bool IsContentModified() const override
Get if any footprints or libraries have been modified but not saved.
void UpdateUserInterface()
Update the layer manager and other widgets from the board setup (layer and items visibility,...
wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > m_adapter
void centerItemIdleHandler(wxIdleEvent &aEvent)
void RenameFootprintTab(const LIB_ID &aOldId, const LIB_ID &aNewId)
Update the open tab for aOldId, if any, to the renamed footprint aNewId so its label and key track th...
bool HandleUnsavedChanges(bool aFromBoardOnly)
Prompt to save each dirty tab that meets the requirements.
void KiwayMailIn(KIWAY_MAIL_EVENT &mail) override
Receive #KIWAY_ROUTED_EVENT messages from other players.
void OnEditItemRequest(BOARD_ITEM *aItem) override
Install the corresponding dialog editor for the given item.
void AdvanceFootprintTab(bool aForward)
Advance the active tab forward or backward in MRU order.
void SetActiveLayer(PCB_LAYER_ID aLayer) override
void AddFootprintToBoard(FOOTPRINT *aFootprint) override
Override from PCB_BASE_EDIT_FRAME which adds a footprint to the editor's dummy board,...
bool activeBoardOwnedByTab() const
True when a tab context owns the frame's borrowed board, so the frame must not delete it.
void CloseActiveFootprintTab()
Request closing the active tab, prompting to save if it is modified.
FOOTPRINT_TREE_PANE * m_treePane
void RefreshLibraryTree()
Redisplay the library tree.
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Load a KiCad board (.kicad_pcb) from aFileName.
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
wxString m_doc
Footprint description.
wxString m_fpname
Module name.
wxString m_keywords
Footprint keywords.
wxString m_nickname
library as known in FP_LIB_TABLE
An interface to the global shared library manager that is schematic-specific and linked to one projec...
wxString GetLibDescription() const
Definition footprint.h:490
PCB_FIELD & Value()
read/write accessors:
Definition footprint.h:939
const LIB_ID & GetFPID() const
Definition footprint.h:473
void SetReference(const wxString &aReference)
Definition footprint.h:907
void SetValue(const wxString &aValue)
Definition footprint.h:930
PCB_FIELD & Reference()
Definition footprint.h:940
wxString GetKeywords() const
Definition footprint.h:493
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
virtual void SetCrossHairCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true)=0
Move the graphic crosshair cursor to the requested position expressed in world coordinates.
virtual wxString GetClass() const =0
Return the class name.
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
Definition view.h:405
Carry a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition kiway_mail.h:34
std::string & GetPayload()
Return the payload, which can be any text but it typically self identifying s-expression.
Definition kiway_mail.h:52
MAIL_T Command()
Returns the MAIL_T associated with this mail.
Definition kiway_mail.h:44
std::optional< LIBRARY_TABLE_ROW * > FindRowByURI(const wxString &aUri, LIBRARY_TABLE_SCOPE aScope=LIBRARY_TABLE_SCOPE::BOTH) const
Like LIBRARY_MANAGER::FindRowByURI but filtered to the LIBRARY_TABLE_TYPE of this adapter.
bool HasLibrary(const wxString &aNickname, bool aCheckEnabled=false) const
Test for the existence of aNickname in the library tables.
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:45
bool IsValid() const
Check if this LID_ID is valid.
Definition lib_id.h:168
const UTF8 & GetLibItemName() const
Definition lib_id.h:98
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition lib_id.h:83
Node type: LIB_ID.
void Update(LIB_TREE_ITEM *aItem)
Update the node using data from a LIB_ALIAS object.
Definition pad.h:61
static TOOL_ACTION layerChanged
int ShowTextBoxPropertiesDialog(PCB_TEXTBOX *aTextBox)
APPEARANCE_CONTROLS * GetAppearancePanel()
APPEARANCE_CONTROLS * m_appearancePanel
void ShowReferenceImagePropertiesDialog(BOARD_ITEM *aBitmap)
void ShowBarcodePropertiesDialog(PCB_BARCODE *aText)
void ShowGraphicItemPropertiesDialog(PCB_SHAPE *aShape)
void ShowPadPropertiesDialog(PAD *aPad)
virtual void SetActiveLayer(PCB_LAYER_ID aLayer)
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.
virtual PCB_LAYER_ID GetActiveLayer() const
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
BOARD * GetBoard() const
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
Abstract dimension API.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
virtual void SetHighContrastLayer(int aLayer) override
SetHighContrastLayer(), with some extra smarts for PCB.
A set of BOARD_ITEMs (i.e., without duplicates).
Definition pcb_group.h:51
static FOOTPRINT_LIBRARY_ADAPTER * FootprintLibAdapter(PROJECT *aProject)
TOOL_MANAGER * m_toolManager
wxString wx_str() const
Definition utf8.cpp:41
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.
Definition zone.h:70
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
Definition zone.h:807
bool IsOnCopperLayer() const override
Definition zone.cpp:616
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition confirm.cpp:217
This file is part of the common library.
int InvokeCopperZonesEditor(PCB_BASE_FRAME *aCaller, ZONE *aZone, 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.
#define _(s)
PROJECT & Prj()
Definition kicad.cpp:727
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
Definition layer_ids.h:703
@ LAYER_GRID
Definition layer_ids.h:250
#define CLEARANCE_LAYER_FOR(boardLayer)
Definition layer_ids.h:390
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
@ MAIL_FP_EDIT
Definition mail_type.h:52
@ MAIL_RELOAD_LIB
Definition mail_type.h:53
BARCODE class definition.
Class to handle a set of BOARD_ITEMs.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
Definition typeinfo.h:80
@ PCB_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
Definition typeinfo.h:98
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
Definition typeinfo.h:95
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
Definition typeinfo.h:96
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
Definition typeinfo.h:103
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
Definition typeinfo.h:85
@ PCB_ZONE_T
class ZONE, a copper pour area
Definition typeinfo.h:100
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
Definition typeinfo.h:84
@ PCB_REFERENCE_IMAGE_T
class PCB_REFERENCE_IMAGE, bitmap on a layer
Definition typeinfo.h:81
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
Definition typeinfo.h:82
@ PCB_MARKER_T
class PCB_MARKER, a marker used to show something
Definition typeinfo.h:91
@ PCB_BARCODE_T
class PCB_BARCODE, a barcode (graphic item)
Definition typeinfo.h:93
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
Definition typeinfo.h:78
@ PCB_DIM_ALIGNED_T
class PCB_DIM_ALIGNED, a linear dimension (graphic item)
Definition typeinfo.h:94
@ PCB_PAD_T
class PAD, a pad in a footprint
Definition typeinfo.h:79
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs
Definition typeinfo.h:86
@ PCB_POINT_T
class PCB_POINT, a 0-dimensional point
Definition typeinfo.h:105
@ PCB_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
Definition typeinfo.h:97
@ PCB_DRILL_CHART_T
class PCB_DRILL_CHART, a live drill chart derived from PCB_TABLE
Definition typeinfo.h:239
VECTOR2< double > VECTOR2D
Definition vector2d.h:682